mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
Change the displayContent() function so that a the zonename is a bit faded, so we can see the names of the labels better. Closes #28
This commit is contained in:
parent
94f722b4d5
commit
88d7ef7d36
2 changed files with 14 additions and 3 deletions
|
@ -5,6 +5,9 @@ body, html {
|
||||||
background:#ffffff;
|
background:#ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lightgrey {
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
#wrap {
|
#wrap {
|
||||||
}
|
}
|
||||||
#menu {
|
#menu {
|
||||||
|
|
14
index.php
14
index.php
|
@ -196,9 +196,17 @@ function displayExportIcon(zone) {
|
||||||
return $img;
|
return $img;
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayContent(fieldName) {
|
function displayContent(fieldName, zone) {
|
||||||
return function(data) {
|
return function(data) {
|
||||||
return $('<span>').text(data.record[fieldName]);
|
if (typeof(zone) != 'undefined') {
|
||||||
|
var rexp = new RegExp("(.*)"+zone);
|
||||||
|
var label = rexp.exec(data.record[fieldName]);
|
||||||
|
var lspan = $('<span>').text(label[1]);
|
||||||
|
var zspan = $('<span class="lightgrey">').text(zone);
|
||||||
|
return lspan.add(zspan);
|
||||||
|
} else {
|
||||||
|
return $('<span>').text(data.record[fieldName]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -545,7 +553,7 @@ $(document).ready(function () {
|
||||||
title: 'Label',
|
title: 'Label',
|
||||||
width: '7%',
|
width: '7%',
|
||||||
create: true,
|
create: true,
|
||||||
display: displayContent('name'),
|
display: displayContent('name', zone.record.name),
|
||||||
inputClass: 'name',
|
inputClass: 'name',
|
||||||
listClass: 'name'
|
listClass: 'name'
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue