Merge pull request #39 from tuxis-ie/zonename_lightgrey

Change the displayContent() function . . .
This commit is contained in:
Tuxis Internet Engineering V.O.F. 2015-03-11 12:31:10 +01:00
commit b0c35bde5e
2 changed files with 14 additions and 3 deletions

View file

@ -5,6 +5,9 @@ body, html {
background:#ffffff;
}
.lightgrey {
opacity: .6;
}
#wrap {
}
#menu {

View file

@ -196,9 +196,17 @@ function displayExportIcon(zone) {
return $img;
}
function displayContent(fieldName) {
function displayContent(fieldName, zone) {
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',
width: '7%',
create: true,
display: displayContent('name'),
display: displayContent('name', zone.record.name),
inputClass: 'name',
listClass: 'name'
},