Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/trigger/TriggerRule.js
| Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | _getTypeCell: function() { | ||||
| options.push( | options.push( | ||||
| JX.$N('option', {value: type.getType()}, type.getName())); | JX.$N('option', {value: type.getType()}, type.getName())); | ||||
| } | } | ||||
| var control = JX.$N('select', {}, options); | var control = JX.$N('select', {}, options); | ||||
| control.value = this.getType(); | control.value = this.getType(); | ||||
| var on_change = JX.bind(this, this._onTypeChange); | var on_change = JX.bind(this, this._onTypeChange, control); | ||||
| JX.DOM.listen(control, 'onchange', null, on_change); | JX.DOM.listen(control, 'change', null, on_change); | ||||
| var attributes = { | var attributes = { | ||||
| className: 'type-cell' | className: 'type-cell' | ||||
| }; | }; | ||||
| this._typeCell = JX.$N('td', attributes, control); | this._typeCell = JX.$N('td', attributes, control); | ||||
| } | } | ||||
| return this._typeCell; | return this._typeCell; | ||||
| }, | }, | ||||
| _onTypeChange: function() { | _onTypeChange: function(control) { | ||||
| var control = this._getTypeCell(); | |||||
| this.setType(control.value); | this.setType(control.value); | ||||
| this._rebuildValueControl(); | this._rebuildValueControl(); | ||||
| }, | }, | ||||
| _getValueCell: function() { | _getValueCell: function() { | ||||
| if (!this._valueCell) { | if (!this._valueCell) { | ||||
| var attributes = { | var attributes = { | ||||
| className: 'value-cell' | className: 'value-cell' | ||||
| }; | }; | ||||
| Show All 29 Lines | |||||