Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/herald/HeraldRuleEditor.js
Show First 20 Lines • Show All 271 Lines • ▼ Show 20 Lines | _renderValueInputForRow : function(row_id) { | ||||
this._conditionTypes[row_id] = type; | this._conditionTypes[row_id] = type; | ||||
this._conditionGetters[row_id] = get_fn; | this._conditionGetters[row_id] = get_fn; | ||||
return node; | return node; | ||||
}, | }, | ||||
_newTokenizer : function(type) { | _newTokenizer : function(type) { | ||||
var template = JX.$N( | |||||
'div', | |||||
JX.$H(this._config.template.markup)); | |||||
template = template.firstChild; | |||||
template.id = ''; | |||||
var tokenizerConfig = { | var tokenizerConfig = { | ||||
root : template, | |||||
src : this._config.template.source[type].uri, | src : this._config.template.source[type].uri, | ||||
placeholder: this._config.template.source[type].placeholder, | placeholder: this._config.template.source[type].placeholder, | ||||
browseURI: this._config.template.source[type].browseURI, | |||||
icons : this._config.template.icons, | icons : this._config.template.icons, | ||||
username : this._config.username | username : this._config.username | ||||
}; | }; | ||||
var build = JX.Prefab.buildTokenizer(tokenizerConfig); | var build = JX.Prefab.newTokenizerFromTemplate( | ||||
this._config.template.markup, | |||||
tokenizerConfig); | |||||
build.tokenizer.start(); | build.tokenizer.start(); | ||||
return [ | return [ | ||||
template, | build.node, | ||||
function() { | function() { | ||||
return build.tokenizer.getTokens(); | return build.tokenizer.getTokens(); | ||||
}, | }, | ||||
function(map) { | function(map) { | ||||
for (var k in map) { | for (var k in map) { | ||||
build.tokenizer.addToken(k, map[k]); | build.tokenizer.addToken(k, map[k]); | ||||
} | } | ||||
}]; | }]; | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |