mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-19 20:09:14 +03:00
Merge pull request #39 from tuxis-ie/zonename_lightgrey
Change the displayContent() function . . .
This commit is contained in:
commit
b0c35bde5e
2 changed files with 14 additions and 3 deletions
|
@ -5,6 +5,9 @@ body, html {
|
|||
background:#ffffff;
|
||||
}
|
||||
|
||||
.lightgrey {
|
||||
opacity: .6;
|
||||
}
|
||||
#wrap {
|
||||
}
|
||||
#menu {
|
||||
|
|
14
index.php
14
index.php
|
@ -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'
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue