put back operator filtering in parseRows. Do it for all attrs. Fix Zone name in AlarmedZoneId attr
This commit is contained in:
parent
df5bf788d9
commit
52dfbc92e9
|
@ -209,7 +209,7 @@ function parseRows(rows) {
|
|||
for ( zone_id in zones ) {
|
||||
var zone = zones[zone_id];
|
||||
if ( monitor_id == zone.MonitorId ) {
|
||||
zoneSelect.append('<option value="' + zone_id + '">' + (monitors[zone.MonitorId] ? monitors[zone.MonitorId].Name + ': ' : '') + zone.Name + '</option>');
|
||||
zoneSelect.append('<option value="' + zone_id + '">' + zone.Name + '</option>');
|
||||
}
|
||||
} // end foreach zone
|
||||
} // end foreach monitor
|
||||
|
@ -251,8 +251,12 @@ function parseRows(rows) {
|
|||
var monitorVal = inputTds.eq(4).children().val();
|
||||
inputTds.eq(4).html(monitorSelect).children().val(monitorVal);
|
||||
} else { // Reset to regular text field and operator for everything that isn't special
|
||||
if ( 0 ) {
|
||||
// We don't actually do anything different in terms of operators. So why do it for text?
|
||||
var textInput = $j('<input></input>').attr('type', 'text').attr('name', queryPrefix + rowNum + '][val]').attr('id', queryPrefix + rowNum + '][val]');
|
||||
var textVal = inputTds.eq(4).children().val();
|
||||
inputTds.eq(4).html(textInput).children().val(textVal);
|
||||
}
|
||||
|
||||
// Validate the operator
|
||||
var opSelect = $j('<select></select>').attr('name', queryPrefix + rowNum + '][op]').attr('id', queryPrefix + rowNum + '][op]');
|
||||
var opVal = inputTds.eq(3).children().val();
|
||||
if ( ! opVal ) {
|
||||
|
@ -264,12 +268,6 @@ if ( 0 ) {
|
|||
opSelect.append('<option value="' + key + '"'+(key == opVal ? ' selected="selected"' : '')+'>' + opTypes[key] + '</option>');
|
||||
}
|
||||
inputTds.eq(3).html(opSelect).children().val(opVal).chosen({width: "101%"});
|
||||
}
|
||||
|
||||
var textInput = $j('<input></input>').attr('type', 'text').attr('name', queryPrefix + rowNum + '][val]').attr('id', queryPrefix + rowNum + '][val]');
|
||||
var textVal = inputTds.eq(4).children().val();
|
||||
inputTds.eq(4).html(textInput).children().val(textVal);
|
||||
}
|
||||
if ( attr.endsWith('DateTime') ) { //Start/End DateTime
|
||||
inputTds.eq(4).children().datetimepicker({timeFormat: "HH:mm:ss", dateFormat: "yy-mm-dd", maxDate: 0, constrainInput: false});
|
||||
} else if ( attr.endsWith('Date') ) { //Start/End Date
|
||||
|
|
Loading…
Reference in New Issue