mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-04-20 20:13:40 +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;
|
background:#ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lightgrey {
|
||||||
|
opacity: .6;
|
||||||
|
}
|
||||||
#wrap {
|
#wrap {
|
||||||
}
|
}
|
||||||
#menu {
|
#menu {
|
||||||
|
|
12
index.php
12
index.php
|
@ -196,10 +196,18 @@ function displayExportIcon(zone) {
|
||||||
return $img;
|
return $img;
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayContent(fieldName) {
|
function displayContent(fieldName, zone) {
|
||||||
return function(data) {
|
return function(data) {
|
||||||
|
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]);
|
return $('<span>').text(data.record[fieldName]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getEpoch() {
|
function getEpoch() {
|
||||||
|
@ -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