id
int32
0
58k
repo
stringlengths
5
67
path
stringlengths
4
116
func_name
stringlengths
0
58
original_string
stringlengths
52
373k
language
stringclasses
1 value
code
stringlengths
52
373k
code_tokens
list
docstring
stringlengths
4
11.8k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
86
226
27,900
ariatemplates/ariatemplates
src/aria/tools/inspector/InspectorModule.js
function (domElt, color) { this.clearHightlight(); color = color ? color : "#ACC2FF"; var pos = this.bridge.getAriaPackage().utils.Dom.calculatePosition(domElt); var marker = this.bridge.getDocument().createElement('div'); marker.style.cssText = ["position:abs...
javascript
function (domElt, color) { this.clearHightlight(); color = color ? color : "#ACC2FF"; var pos = this.bridge.getAriaPackage().utils.Dom.calculatePosition(domElt); var marker = this.bridge.getDocument().createElement('div'); marker.style.cssText = ["position:abs...
[ "function", "(", "domElt", ",", "color", ")", "{", "this", ".", "clearHightlight", "(", ")", ";", "color", "=", "color", "?", "color", ":", "\"#ACC2FF\"", ";", "var", "pos", "=", "this", ".", "bridge", ".", "getAriaPackage", "(", ")", ".", "utils", "...
Highlight a dom element with borders @param {HTMLElement} domElt @param {String} color. default is #ACC2FF
[ "Highlight", "a", "dom", "element", "with", "borders" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/tools/inspector/InspectorModule.js#L347-L359
27,901
ariatemplates/ariatemplates
src/aria/tools/inspector/InspectorModule.js
function (templateCtxt, tplSource) { ariaUtilsJson.setValue(this._data, "locked", true); if (tplSource) { tplSource = this._data.selectedTemplate.tplSrcEdit; } // do some cleaning this.clearHightlight(); // do not close if targe...
javascript
function (templateCtxt, tplSource) { ariaUtilsJson.setValue(this._data, "locked", true); if (tplSource) { tplSource = this._data.selectedTemplate.tplSrcEdit; } // do some cleaning this.clearHightlight(); // do not close if targe...
[ "function", "(", "templateCtxt", ",", "tplSource", ")", "{", "ariaUtilsJson", ".", "setValue", "(", "this", ".", "_data", ",", "\"locked\"", ",", "true", ")", ";", "if", "(", "tplSource", ")", "{", "tplSource", "=", "this", ".", "_data", ".", "selectedTe...
Reload a template for given template context @param {aria.templates.TemplateCtxt} templateCtxt @source {Boolean} tplSource optional template source provided ?
[ "Reload", "a", "template", "for", "given", "template", "context" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/tools/inspector/InspectorModule.js#L366-L395
27,902
ariatemplates/ariatemplates
src/aria/tools/inspector/InspectorModule.js
function (moduleCtrl) { var moduleFactory = this.bridge.getAriaPackage().templates.ModuleCtrlFactory; ariaUtilsJson.setValue(this._data, "locked", true); // do some cleaning this.clearHightlight(); moduleFactory.reloadModuleCtrl(moduleCtrl, { ...
javascript
function (moduleCtrl) { var moduleFactory = this.bridge.getAriaPackage().templates.ModuleCtrlFactory; ariaUtilsJson.setValue(this._data, "locked", true); // do some cleaning this.clearHightlight(); moduleFactory.reloadModuleCtrl(moduleCtrl, { ...
[ "function", "(", "moduleCtrl", ")", "{", "var", "moduleFactory", "=", "this", ".", "bridge", ".", "getAriaPackage", "(", ")", ".", "templates", ".", "ModuleCtrlFactory", ";", "ariaUtilsJson", ".", "setValue", "(", "this", ".", "_data", ",", "\"locked\"", ","...
Reload a module @param {aria.templates.ModuleCtrl} moduleCtrl
[ "Reload", "a", "module" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/tools/inspector/InspectorModule.js#L411-L422
27,903
ariatemplates/ariatemplates
src/aria/tools/inspector/InspectorModule.js
function (templateCtxt) { var moduleCtrl = templateCtxt.moduleCtrlPrivate; // find associated module var modules = this._data.modules, i, l; for (i = 0, l = modules.length; i < l; i++) { if (modules[i].moduleCtrl == moduleCtrl) { this._...
javascript
function (templateCtxt) { var moduleCtrl = templateCtxt.moduleCtrlPrivate; // find associated module var modules = this._data.modules, i, l; for (i = 0, l = modules.length; i < l; i++) { if (modules[i].moduleCtrl == moduleCtrl) { this._...
[ "function", "(", "templateCtxt", ")", "{", "var", "moduleCtrl", "=", "templateCtxt", ".", "moduleCtrlPrivate", ";", "// find associated module", "var", "modules", "=", "this", ".", "_data", ".", "modules", ",", "i", ",", "l", ";", "for", "(", "i", "=", "0"...
Set in selected template and moduleCtrl descriptions from a given template context @protected @param {aria.templates.TemplateCtxt} templateCtxt
[ "Set", "in", "selected", "template", "and", "moduleCtrl", "descriptions", "from", "a", "given", "template", "context" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/tools/inspector/InspectorModule.js#L451-L466
27,904
ariatemplates/ariatemplates
src/aria/tools/inspector/InspectorModule.js
function (container, templateCtxt) { var contentSearch = null, i, l; for (i = 0, l = container.length; i < l; i++) { var description = container[i]; if (description.templateCtxt == templateCtxt) { return description; } else { ...
javascript
function (container, templateCtxt) { var contentSearch = null, i, l; for (i = 0, l = container.length; i < l; i++) { var description = container[i]; if (description.templateCtxt == templateCtxt) { return description; } else { ...
[ "function", "(", "container", ",", "templateCtxt", ")", "{", "var", "contentSearch", "=", "null", ",", "i", ",", "l", ";", "for", "(", "i", "=", "0", ",", "l", "=", "container", ".", "length", ";", "i", "<", "l", ";", "i", "++", ")", "{", "var"...
Find description linked with given templateCtxt @protected @param {Array} container @param {aria.templates.TemplateCtxt} templateCtxt @return {Object}
[ "Find", "description", "linked", "with", "given", "templateCtxt" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/tools/inspector/InspectorModule.js#L475-L489
27,905
ariatemplates/ariatemplates
src/aria/widgets/container/Div.js
function (cfg) { var hasChanged = false, prefName, newVal; var prefs = ['maxWidth', 'maxHeight', 'minWidth', 'width', 'height']; for (var i = 0, len = prefs.length; i < len; i++) { prefName = prefs[i]; newVal = cfg[prefName]; if (newVa...
javascript
function (cfg) { var hasChanged = false, prefName, newVal; var prefs = ['maxWidth', 'maxHeight', 'minWidth', 'width', 'height']; for (var i = 0, len = prefs.length; i < len; i++) { prefName = prefs[i]; newVal = cfg[prefName]; if (newVa...
[ "function", "(", "cfg", ")", "{", "var", "hasChanged", "=", "false", ",", "prefName", ",", "newVal", ";", "var", "prefs", "=", "[", "'maxWidth'", ",", "'maxHeight'", ",", "'minWidth'", ",", "'width'", ",", "'height'", "]", ";", "for", "(", "var", "i", ...
Change the width, height, max width and max height of the configuration, then update the container size @param {aria.widgets.CfgBeans:DivCfg} cfg the widget configuration (only width, height, maxWidth, maxHeight, maximized will be used)
[ "Change", "the", "width", "height", "max", "width", "and", "max", "height", "of", "the", "configuration", "then", "update", "the", "container", "size" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Div.js#L107-L137
27,906
ariatemplates/ariatemplates
src/aria/core/TplClassLoader.js
function (args) { var div = args.cfg.tplDiv; if (div) { aria.utils.Dom.replaceHTML(div, "#TEMPLATE ERROR#"); } this.$callback(args.cb, { success : false }); }
javascript
function (args) { var div = args.cfg.tplDiv; if (div) { aria.utils.Dom.replaceHTML(div, "#TEMPLATE ERROR#"); } this.$callback(args.cb, { success : false }); }
[ "function", "(", "args", ")", "{", "var", "div", "=", "args", ".", "cfg", ".", "tplDiv", ";", "if", "(", "div", ")", "{", "aria", ".", "utils", ".", "Dom", ".", "replaceHTML", "(", "div", ",", "\"#TEMPLATE ERROR#\"", ")", ";", "}", "this", ".", "...
Display an error in the template container and call the callback notifying the error. @param {Object} args @private
[ "Display", "an", "error", "in", "the", "template", "container", "and", "call", "the", "callback", "notifying", "the", "error", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/TplClassLoader.js#L27-L36
27,907
ariatemplates/ariatemplates
src/aria/core/TplClassLoader.js
function (classes, printOptions) { classes = classes.replace(/(\s|^)\s*xPrint\w*/g, ''); if (printOptions == "adaptX") { classes += " xPrintAdaptX"; } else if (printOptions == "adaptY") { classes += " xPrintAdaptY"; ...
javascript
function (classes, printOptions) { classes = classes.replace(/(\s|^)\s*xPrint\w*/g, ''); if (printOptions == "adaptX") { classes += " xPrintAdaptX"; } else if (printOptions == "adaptY") { classes += " xPrintAdaptY"; ...
[ "function", "(", "classes", ",", "printOptions", ")", "{", "classes", "=", "classes", ".", "replace", "(", "/", "(\\s|^)\\s*xPrint\\w*", "/", "g", ",", "''", ")", ";", "if", "(", "printOptions", "==", "\"adaptX\"", ")", "{", "classes", "+=", "\" xPrintAdap...
Convert print options into a set of CSS classes and add them to the provided set of classes. @param {String} classes Set of classes separated by a space (e.g. className property). If print options CSS classes are already present in this string, they will be removed. @param {aria.templates.CfgBeans:PrintOptions} printOp...
[ "Convert", "print", "options", "into", "a", "set", "of", "CSS", "classes", "and", "add", "them", "to", "the", "provided", "set", "of", "classes", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/TplClassLoader.js#L324-L336
27,908
ariatemplates/ariatemplates
src/aria/core/TplClassLoader.js
function (cfg, cb) { var appE = Aria.getClassRef("aria.core.environment.Customizations"); if (appE && appE.isCustomized() && !appE.descriptorLoaded()) { // the application is customized but the descriptor hasn't been loaded yet: register to the event ...
javascript
function (cfg, cb) { var appE = Aria.getClassRef("aria.core.environment.Customizations"); if (appE && appE.isCustomized() && !appE.descriptorLoaded()) { // the application is customized but the descriptor hasn't been loaded yet: register to the event ...
[ "function", "(", "cfg", ",", "cb", ")", "{", "var", "appE", "=", "Aria", ".", "getClassRef", "(", "\"aria.core.environment.Customizations\"", ")", ";", "if", "(", "appE", "&&", "appE", ".", "isCustomized", "(", ")", "&&", "!", "appE", ".", "descriptorLoade...
Load a template in a div. You should call Aria.loadTemplate, instead of this method. @param {aria.templates.CfgBeans:LoadTemplateCfg} cfg configuration object @param {aria.core.CfgBeans:Callback} callback which will be called when the template is loaded or if there is an error. The first parameter of the callback is a ...
[ "Load", "a", "template", "in", "a", "div", ".", "You", "should", "call", "Aria", ".", "loadTemplate", "instead", "of", "this", "method", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/TplClassLoader.js#L348-L369
27,909
ariatemplates/ariatemplates
src/aria/core/TplClassLoader.js
function (div) { if (typeof(div) == "string") { div = aria.utils.Dom.getElementById(div); } if (aria && aria.utils && aria.utils.Dom) { return aria.templates.TemplateCtxtManager.disposeFromDom(div); } }
javascript
function (div) { if (typeof(div) == "string") { div = aria.utils.Dom.getElementById(div); } if (aria && aria.utils && aria.utils.Dom) { return aria.templates.TemplateCtxtManager.disposeFromDom(div); } }
[ "function", "(", "div", ")", "{", "if", "(", "typeof", "(", "div", ")", "==", "\"string\"", ")", "{", "div", "=", "aria", ".", "utils", ".", "Dom", ".", "getElementById", "(", "div", ")", ";", "}", "if", "(", "aria", "&&", "aria", ".", "utils", ...
Unload a template loaded with Aria.loadTemplate. You should call Aria.disposeTemplate, instead of this method. @param {aria.templates.CfgBeans:Div} div The div given to Aria.loadTemplate.
[ "Unload", "a", "template", "loaded", "with", "Aria", ".", "loadTemplate", ".", "You", "should", "call", "Aria", ".", "disposeTemplate", "instead", "of", "this", "method", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/TplClassLoader.js#L406-L413
27,910
ariatemplates/ariatemplates
src/aria/templates/CSSCtxt.js
function (cfg) { if (!ariaCoreJsonValidator.normalize({ json : cfg, beanName : "aria.templates.CfgBeans.InitCSSTemplateCfg" })) { return false; } this._cfg = cfg; // Get an insatnce of the CSS template ...
javascript
function (cfg) { if (!ariaCoreJsonValidator.normalize({ json : cfg, beanName : "aria.templates.CfgBeans.InitCSSTemplateCfg" })) { return false; } this._cfg = cfg; // Get an insatnce of the CSS template ...
[ "function", "(", "cfg", ")", "{", "if", "(", "!", "ariaCoreJsonValidator", ".", "normalize", "(", "{", "json", ":", "cfg", ",", "beanName", ":", "\"aria.templates.CfgBeans.InitCSSTemplateCfg\"", "}", ")", ")", "{", "return", "false", ";", "}", "this", ".", ...
Init the CSS template with the given configuration. @param {aria.templates.CfgBeans:InitCSSTemplateCfg} cfg Template context configuration @return {Boolean} true if there was no error
[ "Init", "the", "CSS", "template", "with", "the", "given", "configuration", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSCtxt.js#L101-L144
27,911
ariatemplates/ariatemplates
src/aria/templates/CSSCtxt.js
function () { if (this.__cachedOutput) { return this.__cachedOutput; } // Call the main macro to let the template engine evaluate the text this.$assert(156, this._out == null); this._out = []; this._callMacro(null, "main"); ...
javascript
function () { if (this.__cachedOutput) { return this.__cachedOutput; } // Call the main macro to let the template engine evaluate the text this.$assert(156, this._out == null); this._out = []; this._callMacro(null, "main"); ...
[ "function", "(", ")", "{", "if", "(", "this", ".", "__cachedOutput", ")", "{", "return", "this", ".", "__cachedOutput", ";", "}", "// Call the main macro to let the template engine evaluate the text", "this", ".", "$assert", "(", "156", ",", "this", ".", "_out", ...
Returns the output of the main macro. It only actually calls the main macro the first time, and then only returns a cached version. @return {String}
[ "Returns", "the", "output", "of", "the", "main", "macro", ".", "It", "only", "actually", "calls", "the", "main", "macro", "the", "first", "time", "and", "then", "only", "returns", "a", "cached", "version", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSCtxt.js#L180-L197
27,912
ariatemplates/ariatemplates
src/aria/templates/CSSCtxt.js
function (classPrefix) { var text = this._getOutput(); // Format the prefix for the CSS text var prefix = "." + classPrefix + " "; var prefixed = this.__prefixingAlgorithm(text, prefix); this.__prefixedText = prefixed.text; this.__numSelectors = ...
javascript
function (classPrefix) { var text = this._getOutput(); // Format the prefix for the CSS text var prefix = "." + classPrefix + " "; var prefixed = this.__prefixingAlgorithm(text, prefix); this.__prefixedText = prefixed.text; this.__numSelectors = ...
[ "function", "(", "classPrefix", ")", "{", "var", "text", "=", "this", ".", "_getOutput", "(", ")", ";", "// Format the prefix for the CSS text", "var", "prefix", "=", "\".\"", "+", "classPrefix", "+", "\" \"", ";", "var", "prefixed", "=", "this", ".", "__pre...
Prefix the CSS text @param {String} classPrefix class prefix for each selector
[ "Prefix", "the", "CSS", "text" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSCtxt.js#L203-L212
27,913
ariatemplates/ariatemplates
src/aria/templates/CSSCtxt.js
function (cssText) { cssText = cssText.replace(/\burl\s*\(\s*["']?([^"'\r\n,]+|[^'\r\n,]+|[^"\r\n,]+)["']?\s*\)/gi, ariaUtilsFunction.bind(function (match, urlpart) { var prefixedUrl = ariaCoreAppEnvironment.applicationSettings.imgUrlMapping(urlpart, this.tplClasspath); retur...
javascript
function (cssText) { cssText = cssText.replace(/\burl\s*\(\s*["']?([^"'\r\n,]+|[^'\r\n,]+|[^"\r\n,]+)["']?\s*\)/gi, ariaUtilsFunction.bind(function (match, urlpart) { var prefixedUrl = ariaCoreAppEnvironment.applicationSettings.imgUrlMapping(urlpart, this.tplClasspath); retur...
[ "function", "(", "cssText", ")", "{", "cssText", "=", "cssText", ".", "replace", "(", "/", "\\burl\\s*\\(\\s*[\"']?([^\"'\\r\\n,]+|[^'\\r\\n,]+|[^\"\\r\\n,]+)[\"']?\\s*\\)", "/", "gi", ",", "ariaUtilsFunction", ".", "bind", "(", "function", "(", "match", ",", "urlpart...
Prefix the image URLs calling the method set inside the app environment @param {String} cssText CSS text @return {String}
[ "Prefix", "the", "image", "URLs", "calling", "the", "method", "set", "inside", "the", "app", "environment" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSCtxt.js#L219-L226
27,914
ariatemplates/ariatemplates
src/aria/templates/CSSCtxt.js
function (url) { var tmp = url.replace(/\burl\s*/gi, ""); // removing url word tmp = tmp.charAt(0) === "(" ? tmp.substring(1, tmp.length - 1) : tmp; // removing brackets tmp = tmp.charAt(0) === "\'" || tmp.charAt(0) === "\"" ? tmp.substring(1, tmp.length - 1) : tmp; // removing qu...
javascript
function (url) { var tmp = url.replace(/\burl\s*/gi, ""); // removing url word tmp = tmp.charAt(0) === "(" ? tmp.substring(1, tmp.length - 1) : tmp; // removing brackets tmp = tmp.charAt(0) === "\'" || tmp.charAt(0) === "\"" ? tmp.substring(1, tmp.length - 1) : tmp; // removing qu...
[ "function", "(", "url", ")", "{", "var", "tmp", "=", "url", ".", "replace", "(", "/", "\\burl\\s*", "/", "gi", ",", "\"\"", ")", ";", "// removing url word", "tmp", "=", "tmp", ".", "charAt", "(", "0", ")", "===", "\"(\"", "?", "tmp", ".", "substri...
Clean the url removing brackets, quotes, etc. @param {String} url URL @return {String}
[ "Clean", "the", "url", "removing", "brackets", "quotes", "etc", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSCtxt.js#L242-L247
27,915
ariatemplates/ariatemplates
src/aria/widgets/form/RadioButton.js
function (event) { if (event.keyCode == aria.DomEvent.KC_SPACE) { this._setRadioValue(); event.preventDefault(true); } else if (event.keyCode == aria.DomEvent.KC_LEFT) { this._navigate(-1); event.preventDefau...
javascript
function (event) { if (event.keyCode == aria.DomEvent.KC_SPACE) { this._setRadioValue(); event.preventDefault(true); } else if (event.keyCode == aria.DomEvent.KC_LEFT) { this._navigate(-1); event.preventDefau...
[ "function", "(", "event", ")", "{", "if", "(", "event", ".", "keyCode", "==", "aria", ".", "DomEvent", ".", "KC_SPACE", ")", "{", "this", ".", "_setRadioValue", "(", ")", ";", "event", ".", "preventDefault", "(", "true", ")", ";", "}", "else", "if", ...
Toggle value on SPACE key down @param {aria.DomEvent} event
[ "Toggle", "value", "on", "SPACE", "key", "down" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/RadioButton.js#L128-L145
27,916
ariatemplates/ariatemplates
src/aria/widgets/form/RadioButton.js
function (direction) { if (!this._cfg || !this._cfg.bind || !this._cfg.bind.value) { // no binding for the value : return return; } var currentBinding = this._cfg.bind.value; var index = ariaUtilsArray.indexOf(this._...
javascript
function (direction) { if (!this._cfg || !this._cfg.bind || !this._cfg.bind.value) { // no binding for the value : return return; } var currentBinding = this._cfg.bind.value; var index = ariaUtilsArray.indexOf(this._...
[ "function", "(", "direction", ")", "{", "if", "(", "!", "this", ".", "_cfg", "||", "!", "this", ".", "_cfg", ".", "bind", "||", "!", "this", ".", "_cfg", ".", "bind", ".", "value", ")", "{", "// no binding for the value : return", "return", ";", "}", ...
Find next valid radio button to activate @protected @param {Number} direction, 1 or -1
[ "Find", "next", "valid", "radio", "button", "to", "activate" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/RadioButton.js#L168-L203
27,917
ariatemplates/ariatemplates
src/aria/widgets/form/RadioButton.js
function () { var newValue = this._cfg.keyValue; this._cfg.value = newValue; this.setProperty("value", newValue); // setProperty on value might destroy the widget if (this._cfg) { this._setState(); th...
javascript
function () { var newValue = this._cfg.keyValue; this._cfg.value = newValue; this.setProperty("value", newValue); // setProperty on value might destroy the widget if (this._cfg) { this._setState(); th...
[ "function", "(", ")", "{", "var", "newValue", "=", "this", ".", "_cfg", ".", "keyValue", ";", "this", ".", "_cfg", ".", "value", "=", "newValue", ";", "this", ".", "setProperty", "(", "\"value\"", ",", "newValue", ")", ";", "// setProperty on value might d...
Sets the value property to the key value of this radio button and updates state, dom etc. Typically called when user "selects" the radio button
[ "Sets", "the", "value", "property", "to", "the", "key", "value", "of", "this", "radio", "button", "and", "updates", "state", "dom", "etc", ".", "Typically", "called", "when", "user", "selects", "the", "radio", "button" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/RadioButton.js#L234-L246
27,918
ariatemplates/ariatemplates
src/aria/core/Log.js
function (className) { var loggingLevel = this._loggingLevels[className]; if (!!loggingLevel) { // If there is a logging level stored for the exact classname passed in parameter return loggingLevel; } else { // Else, look for package na...
javascript
function (className) { var loggingLevel = this._loggingLevels[className]; if (!!loggingLevel) { // If there is a logging level stored for the exact classname passed in parameter return loggingLevel; } else { // Else, look for package na...
[ "function", "(", "className", ")", "{", "var", "loggingLevel", "=", "this", ".", "_loggingLevels", "[", "className", "]", ";", "if", "(", "!", "!", "loggingLevel", ")", "{", "// If there is a logging level stored for the exact classname passed in parameter", "return", ...
Get the currently allowed logging level for a particular className @param {String} className @return {Number} level or false if no logging level is defined
[ "Get", "the", "currently", "allowed", "logging", "level", "for", "a", "particular", "className" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Log.js#L207-L227
27,919
ariatemplates/ariatemplates
src/aria/core/Log.js
function (appender) { var apps = this._appenders; for (var i = 0, l = apps.length; i < l; i++) { if (!appender || apps[i] === appender) { apps[i].$dispose(); apps.splice(i, 1); i--; l--; ...
javascript
function (appender) { var apps = this._appenders; for (var i = 0, l = apps.length; i < l; i++) { if (!appender || apps[i] === appender) { apps[i].$dispose(); apps.splice(i, 1); i--; l--; ...
[ "function", "(", "appender", ")", "{", "var", "apps", "=", "this", ".", "_appenders", ";", "for", "(", "var", "i", "=", "0", ",", "l", "=", "apps", ".", "length", ";", "i", "<", "l", ";", "i", "++", ")", "{", "if", "(", "!", "appender", "||",...
Remove all appenders in the logging system, if an appender is passed then will remove just a specific appender instance @param {aria.core.log.DefaultAppender} appender An instance of appender to be removed (must implement the same methods as aria.core.log.DefaultAppender)
[ "Remove", "all", "appenders", "in", "the", "logging", "system", "if", "an", "appender", "is", "passed", "then", "will", "remove", "just", "a", "specific", "appender", "instance" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Log.js#L277-L287
27,920
ariatemplates/ariatemplates
src/aria/core/Log.js
function (classpath) { var apps = this._appenders; if (classpath) { apps = []; for (var i = 0; i < this._appenders.length; i++) { if (this._appenders[i].$classpath == classpath) { apps.push(this._appenders[i]); ...
javascript
function (classpath) { var apps = this._appenders; if (classpath) { apps = []; for (var i = 0; i < this._appenders.length; i++) { if (this._appenders[i].$classpath == classpath) { apps.push(this._appenders[i]); ...
[ "function", "(", "classpath", ")", "{", "var", "apps", "=", "this", ".", "_appenders", ";", "if", "(", "classpath", ")", "{", "apps", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "this", ".", "_appenders", ".", "length", ...
Get the list of current appenders @param {String} classpath Optional argument, if passed, only the appenders of the given classpath will be returned @return {Array} The list of appenders
[ "Get", "the", "list", "of", "current", "appenders" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Log.js#L302-L315
27,921
ariatemplates/ariatemplates
src/aria/core/Log.js
function (msg, msgArgs, errorContext) { if (msgArgs) { msg = ariaUtilsString.substitute(msg, msgArgs); } for (var error in errorContext) { if (errorContext.hasOwnProperty(error)) { msg += "\n" + error + " : " + errorContext[error] +...
javascript
function (msg, msgArgs, errorContext) { if (msgArgs) { msg = ariaUtilsString.substitute(msg, msgArgs); } for (var error in errorContext) { if (errorContext.hasOwnProperty(error)) { msg += "\n" + error + " : " + errorContext[error] +...
[ "function", "(", "msg", ",", "msgArgs", ",", "errorContext", ")", "{", "if", "(", "msgArgs", ")", "{", "msg", "=", "ariaUtilsString", ".", "substitute", "(", "msg", ",", "msgArgs", ")", ";", "}", "for", "(", "var", "error", "in", "errorContext", ")", ...
Prepare a message to be logged from a message text and an optional array of arguments @param {String} msg Message text (which may contain %n) @param {Array} msgArgs optional list of arguments to be replaced in the message with %n @param {Object} errorContext Optional object passed in case of template parsing error only...
[ "Prepare", "a", "message", "to", "be", "logged", "from", "a", "message", "text", "and", "an", "optional", "array", "of", "arguments" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Log.js#L324-L334
27,922
ariatemplates/ariatemplates
src/aria/core/Log.js
function (className, msg, msgArgs, o) { this.log(className, this.LEVEL_INFO, msgArgs, msg, o); }
javascript
function (className, msg, msgArgs, o) { this.log(className, this.LEVEL_INFO, msgArgs, msg, o); }
[ "function", "(", "className", ",", "msg", ",", "msgArgs", ",", "o", ")", "{", "this", ".", "log", "(", "className", ",", "this", ".", "LEVEL_INFO", ",", "msgArgs", ",", "msg", ",", "o", ")", ";", "}" ]
Log an info message @param {String} className The classname for which the log is to be done @param {String} msg the message text @param {Array} msgArgs An array of arguments to be used for string replacement in the message text @param {Object} o An optional object to inspect
[ "Log", "an", "info", "message" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Log.js#L354-L356
27,923
ariatemplates/ariatemplates
src/aria/core/Log.js
function (className, msg, msgArgs, o) { this.log(className, this.LEVEL_WARN, msgArgs, msg, o); }
javascript
function (className, msg, msgArgs, o) { this.log(className, this.LEVEL_WARN, msgArgs, msg, o); }
[ "function", "(", "className", ",", "msg", ",", "msgArgs", ",", "o", ")", "{", "this", ".", "log", "(", "className", ",", "this", ".", "LEVEL_WARN", ",", "msgArgs", ",", "msg", ",", "o", ")", ";", "}" ]
Log a warning message @param {String} className The classname for which the log is to be done @param {String} msg the message text @param {Array} msgArgs An array of arguments to be used for string replacement in the message text @param {Object} o An optional object to inspect
[ "Log", "a", "warning", "message" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Log.js#L365-L367
27,924
ariatemplates/ariatemplates
src/aria/core/Log.js
function (className, level, msgArgs, msgText, objOrErr) { if (!this.isValidLevel(level)) { this.error(this.$classpath, "Invalid level passed for logging the message"); } else { if (this.isLogEnabled(level, className)) { var msg = this.prepareLo...
javascript
function (className, level, msgArgs, msgText, objOrErr) { if (!this.isValidLevel(level)) { this.error(this.$classpath, "Invalid level passed for logging the message"); } else { if (this.isLogEnabled(level, className)) { var msg = this.prepareLo...
[ "function", "(", "className", ",", "level", ",", "msgArgs", ",", "msgText", ",", "objOrErr", ")", "{", "if", "(", "!", "this", ".", "isValidLevel", "(", "level", ")", ")", "{", "this", ".", "error", "(", "this", ".", "$classpath", ",", "\"Invalid level...
Actually do the logging to the current appenders @param {String} className The className that is logging @param {String} level The level to log the message @param {Array} msgArgs An array of arguments to be used for string replacement in the message text @param {String} msg The message text @param {Object} objOrErr Eit...
[ "Actually", "do", "the", "logging", "to", "the", "current", "appenders" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Log.js#L389-L412
27,925
ariatemplates/ariatemplates
src/aria/core/IOFilter.js
function (req, jsonData) { var sender = req.sender; req.data = (sender && sender.classpath == "aria.modules.RequestMgr") ? sender.requestObject.requestHandler.prepareRequestBody(jsonData, sender.requestObject) : ariaUtilsJson.convertToJsonString(jsonData);...
javascript
function (req, jsonData) { var sender = req.sender; req.data = (sender && sender.classpath == "aria.modules.RequestMgr") ? sender.requestObject.requestHandler.prepareRequestBody(jsonData, sender.requestObject) : ariaUtilsJson.convertToJsonString(jsonData);...
[ "function", "(", "req", ",", "jsonData", ")", "{", "var", "sender", "=", "req", ".", "sender", ";", "req", ".", "data", "=", "(", "sender", "&&", "sender", ".", "classpath", "==", "\"aria.modules.RequestMgr\"", ")", "?", "sender", ".", "requestObject", "...
Helper method to set a json object as the POST data in a request. @param {aria.core.CfgBeans:IOAsyncRequestCfg} req @param {Object} jsonData
[ "Helper", "method", "to", "set", "a", "json", "object", "as", "the", "POST", "data", "in", "a", "request", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/IOFilter.js#L73-L79
27,926
ariatemplates/ariatemplates
src/aria/core/IOFilter.js
function (req, path, preventTimestamp) { if (path) { // change request url and method to target the requested file: req.url = ariaCoreDownloadMgr.resolveURL(path, true); if (preventTimestamp !== true) { req.url = ariaCoreDownloadMgr.getURLW...
javascript
function (req, path, preventTimestamp) { if (path) { // change request url and method to target the requested file: req.url = ariaCoreDownloadMgr.resolveURL(path, true); if (preventTimestamp !== true) { req.url = ariaCoreDownloadMgr.getURLW...
[ "function", "(", "req", ",", "path", ",", "preventTimestamp", ")", "{", "if", "(", "path", ")", "{", "// change request url and method to target the requested file:", "req", ".", "url", "=", "ariaCoreDownloadMgr", ".", "resolveURL", "(", "path", ",", "true", ")", ...
Helper method to help redirecting a request to a file @param {aria.core.CfgBeans:IOAsyncRequestCfg} req the filter request object @param {String} path the file logical path or full URL. It can be null or empty and in this case the request is not redirected. It is passed to aria.core.DownloadMgr.resolveURL(path,true), t...
[ "Helper", "method", "to", "help", "redirecting", "a", "request", "to", "a", "file" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/IOFilter.js#L90-L100
27,927
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (force, cssText) { if (force !== true) { aria.templates.CSSMgr.__textToDOM(ariaUtilsObject.keys(aria.templates.CSSMgr.__styleTagPool)); } else { // Having an empty text to dom go deeper in the CSSMgr to force a reload var styleBuilder = {}; for (v...
javascript
function (force, cssText) { if (force !== true) { aria.templates.CSSMgr.__textToDOM(ariaUtilsObject.keys(aria.templates.CSSMgr.__styleTagPool)); } else { // Having an empty text to dom go deeper in the CSSMgr to force a reload var styleBuilder = {}; for (v...
[ "function", "(", "force", ",", "cssText", ")", "{", "if", "(", "force", "!==", "true", ")", "{", "aria", ".", "templates", ".", "CSSMgr", ".", "__textToDOM", "(", "ariaUtilsObject", ".", "keys", "(", "aria", ".", "templates", ".", "CSSMgr", ".", "__sty...
Trigger a refresh of the style tags in the page @param {Boolean} force If true forces a reload with empty text @param {String} cssText If force is true, this is the only text added to the style tag "tpl" all the others will be empty
[ "Trigger", "a", "refresh", "of", "the", "style", "tags", "in", "the", "page" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L60-L73
27,928
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function () { var scope = aria.ext.StressCss; scope.original__load = aria.templates.CSSMgr.__load; scope.original__unload = aria.templates.CSSMgr.__unload; aria.templates.CSSMgr.__load = function () { return []; }; aria.templates.CSSMgr.__unload = function () ...
javascript
function () { var scope = aria.ext.StressCss; scope.original__load = aria.templates.CSSMgr.__load; scope.original__unload = aria.templates.CSSMgr.__unload; aria.templates.CSSMgr.__load = function () { return []; }; aria.templates.CSSMgr.__unload = function () ...
[ "function", "(", ")", "{", "var", "scope", "=", "aria", ".", "ext", ".", "StressCss", ";", "scope", ".", "original__load", "=", "aria", ".", "templates", ".", "CSSMgr", ".", "__load", ";", "scope", ".", "original__unload", "=", "aria", ".", "templates", ...
Prevent the CSSMgr to change the page while doing the loop.
[ "Prevent", "the", "CSSMgr", "to", "change", "the", "page", "while", "doing", "the", "loop", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L78-L88
27,929
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function () { var scope = aria.ext.StressCss; aria.templates.CSSMgr.__load = scope.original__load; aria.templates.CSSMgr.__unload = scope.original__unload; refreshCSS(); }
javascript
function () { var scope = aria.ext.StressCss; aria.templates.CSSMgr.__load = scope.original__load; aria.templates.CSSMgr.__unload = scope.original__unload; refreshCSS(); }
[ "function", "(", ")", "{", "var", "scope", "=", "aria", ".", "ext", ".", "StressCss", ";", "aria", ".", "templates", ".", "CSSMgr", ".", "__load", "=", "scope", ".", "original__load", ";", "aria", ".", "templates", ".", "CSSMgr", ".", "__unload", "=", ...
Unlock the CSSMgr bringing it to its default state.
[ "Unlock", "the", "CSSMgr", "bringing", "it", "to", "its", "default", "state", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L93-L98
27,930
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (includeWidgetCSS) { // __textLoaded contains a copy of what is inside the DOM var cm = aria.templates.CSSMgr, all = cm.__textLoaded; var selectors = []; for (var path in all) { if (all.hasOwnProperty(path)) { if (includeWidgetCSS !== true && cm.__sty...
javascript
function (includeWidgetCSS) { // __textLoaded contains a copy of what is inside the DOM var cm = aria.templates.CSSMgr, all = cm.__textLoaded; var selectors = []; for (var path in all) { if (all.hasOwnProperty(path)) { if (includeWidgetCSS !== true && cm.__sty...
[ "function", "(", "includeWidgetCSS", ")", "{", "// __textLoaded contains a copy of what is inside the DOM", "var", "cm", "=", "aria", ".", "templates", ".", "CSSMgr", ",", "all", "=", "cm", ".", "__textLoaded", ";", "var", "selectors", "=", "[", "]", ";", "for",...
Get the list of CSS selectors in the page. @return {Array} List of CSS selectors to test
[ "Get", "the", "list", "of", "CSS", "selectors", "in", "the", "page", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L130-L144
27,931
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (selector, incremental) { if (!selector) { // This is a baseline if (incremental) { // Everything should be removed refreshCSS(true); } else { // Nothing should be removed return; } }...
javascript
function (selector, incremental) { if (!selector) { // This is a baseline if (incremental) { // Everything should be removed refreshCSS(true); } else { // Nothing should be removed return; } }...
[ "function", "(", "selector", ",", "incremental", ")", "{", "if", "(", "!", "selector", ")", "{", "// This is a baseline", "if", "(", "incremental", ")", "{", "// Everything should be removed", "refreshCSS", "(", "true", ")", ";", "}", "else", "{", "// Nothing ...
Remove a selector from the page. @param {Object} selector CSS selector as returned by @param {Boolean} incremental If true all selectors except "selector" are removed, otherwise only "selector" is removed @see extractSelectors
[ "Remove", "a", "selector", "from", "the", "page", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L153-L176
27,932
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (selector, incremental) { if (!selector) { if (incremental) { // Everything was removed refreshCSS(); } else { // Nothing was be removed return; } } else { // Simply put back the orig...
javascript
function (selector, incremental) { if (!selector) { if (incremental) { // Everything was removed refreshCSS(); } else { // Nothing was be removed return; } } else { // Simply put back the orig...
[ "function", "(", "selector", ",", "incremental", ")", "{", "if", "(", "!", "selector", ")", "{", "if", "(", "incremental", ")", "{", "// Everything was removed", "refreshCSS", "(", ")", ";", "}", "else", "{", "// Nothing was be removed", "return", ";", "}", ...
Add back a selector to the page. @param {Object} selector CSS selector as returned by extractSelectors
[ "Add", "back", "a", "selector", "to", "the", "page", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L182-L196
27,933
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (test) { if (test.callback) { test.callback.fn.apply(test.callback.scope, test.callback.args); } }
javascript
function (test) { if (test.callback) { test.callback.fn.apply(test.callback.scope, test.callback.args); } }
[ "function", "(", "test", ")", "{", "if", "(", "test", ".", "callback", ")", "{", "test", ".", "callback", ".", "fn", ".", "apply", "(", "test", ".", "callback", ".", "scope", ",", "test", ".", "callback", ".", "args", ")", ";", "}", "}" ]
Run the next test. @param {Object} test Current test object
[ "Run", "the", "next", "test", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L202-L206
27,934
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (test) { var end = +(new Date()); test.runTime = end - test.start; results[test.name] = { name : test.name, runTime : test.runTime, baseline : results["__baseline__"] ? (results["__baseline__"].runTime - test.runTime) : NaN }; addSe...
javascript
function (test) { var end = +(new Date()); test.runTime = end - test.start; results[test.name] = { name : test.name, runTime : test.runTime, baseline : results["__baseline__"] ? (results["__baseline__"].runTime - test.runTime) : NaN }; addSe...
[ "function", "(", "test", ")", "{", "var", "end", "=", "+", "(", "new", "Date", "(", ")", ")", ";", "test", ".", "runTime", "=", "end", "-", "test", ".", "start", ";", "results", "[", "test", ".", "name", "]", "=", "{", "name", ":", "test", "....
Complete the test execution. This function measures the run time @param {Object} test Test object
[ "Complete", "the", "test", "execution", ".", "This", "function", "measures", "the", "run", "time" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L212-L229
27,935
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (test) { if (test.iteration >= test.cfg.repeat) { return completeTest(test); } test.iteration += 1; test.cfg.action.call(null, test.name, test.iteration - 1, generateTestCallback(test, this)); }
javascript
function (test) { if (test.iteration >= test.cfg.repeat) { return completeTest(test); } test.iteration += 1; test.cfg.action.call(null, test.name, test.iteration - 1, generateTestCallback(test, this)); }
[ "function", "(", "test", ")", "{", "if", "(", "test", ".", "iteration", ">=", "test", ".", "cfg", ".", "repeat", ")", "{", "return", "completeTest", "(", "test", ")", ";", "}", "test", ".", "iteration", "+=", "1", ";", "test", ".", "cfg", ".", "a...
Execute a single iteration of the test. @param {Object} test Test object
[ "Execute", "a", "single", "iteration", "of", "the", "test", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L251-L258
27,936
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (elm, properties) { for (var prop in properties) { if (properties.hasOwnProperty(prop)) { try { var name = prop.replace(/\-([a-z])/ig, innerReplaceRule); var value = properties[prop]; elm.style[name] = (typeof value...
javascript
function (elm, properties) { for (var prop in properties) { if (properties.hasOwnProperty(prop)) { try { var name = prop.replace(/\-([a-z])/ig, innerReplaceRule); var value = properties[prop]; elm.style[name] = (typeof value...
[ "function", "(", "elm", ",", "properties", ")", "{", "for", "(", "var", "prop", "in", "properties", ")", "{", "if", "(", "properties", ".", "hasOwnProperty", "(", "prop", ")", ")", "{", "try", "{", "var", "name", "=", "prop", ".", "replace", "(", "...
Apply style information to an HTML Object @param {HTMLElement} elm DOM element @param {Object} properties Map of key value properties to be added
[ "Apply", "style", "information", "to", "an", "HTML", "Object" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L272-L282
27,937
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function () { var document = Aria.$window.document; reportHolder = document.createElement('iframe'); var block = document.createElement('iframe'); reportHolder.scrolling = 'no'; reportHolder.frameBorder = 'no'; document.body.appendChild(reportHolder); reportHolde...
javascript
function () { var document = Aria.$window.document; reportHolder = document.createElement('iframe'); var block = document.createElement('iframe'); reportHolder.scrolling = 'no'; reportHolder.frameBorder = 'no'; document.body.appendChild(reportHolder); reportHolde...
[ "function", "(", ")", "{", "var", "document", "=", "Aria", ".", "$window", ".", "document", ";", "reportHolder", "=", "document", ".", "createElement", "(", "'iframe'", ")", ";", "var", "block", "=", "document", ".", "createElement", "(", "'iframe'", ")", ...
Create the report holder to display log information about the tests while running the stress test.
[ "Create", "the", "report", "holder", "to", "display", "log", "information", "about", "the", "tests", "while", "running", "the", "stress", "test", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L298-L379
27,938
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (test) { var baseline = !(test.selector && test.selector.name !== "*"); if (!logHolder) { return; // logging was not enabled } var remaining = test.cfg.allSelectors.length; var heading = 'Testing <strong>' + (baseline ? test.name : test.selector.name) + '</s...
javascript
function (test) { var baseline = !(test.selector && test.selector.name !== "*"); if (!logHolder) { return; // logging was not enabled } var remaining = test.cfg.allSelectors.length; var heading = 'Testing <strong>' + (baseline ? test.name : test.selector.name) + '</s...
[ "function", "(", "test", ")", "{", "var", "baseline", "=", "!", "(", "test", ".", "selector", "&&", "test", ".", "selector", ".", "name", "!==", "\"*\"", ")", ";", "if", "(", "!", "logHolder", ")", "{", "return", ";", "// logging was not enabled", "}",...
Log some test information in the report holder @param {Object} test Test object
[ "Log", "some", "test", "information", "in", "the", "report", "holder" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L385-L397
27,939
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (incremental) { if (!reportHolder || !results) { return; // logging was not enabled } var table = '<table><thead><tr><th>Selector</th><th> </th><th>ms</th><th>Total</th></tr></thead><tbody>'; // Extract the 10 slowest results var resultsArray = []; ...
javascript
function (incremental) { if (!reportHolder || !results) { return; // logging was not enabled } var table = '<table><thead><tr><th>Selector</th><th> </th><th>ms</th><th>Total</th></tr></thead><tbody>'; // Extract the 10 slowest results var resultsArray = []; ...
[ "function", "(", "incremental", ")", "{", "if", "(", "!", "reportHolder", "||", "!", "results", ")", "{", "return", ";", "// logging was not enabled", "}", "var", "table", "=", "'<table><thead><tr><th>Selector</th><th> </th><th>ms</th><th>Total</th></tr></thead><tbody>'", ...
Log the CSS stress test results in the report holder @param {Boolean} incremental Type of test. If incremental we are interested in the selectors that make us waste more, otherwise in the ones that make us gain more
[ "Log", "the", "CSS", "stress", "test", "results", "in", "the", "report", "holder" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L404-L456
27,940
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (test) { test.iteration = 0; removeSelector(test.selector, test.cfg.incremental); log(test); test.start = +(new Date()); executeAction(test); }
javascript
function (test) { test.iteration = 0; removeSelector(test.selector, test.cfg.incremental); log(test); test.start = +(new Date()); executeAction(test); }
[ "function", "(", "test", ")", "{", "test", ".", "iteration", "=", "0", ";", "removeSelector", "(", "test", ".", "selector", ",", "test", ".", "cfg", ".", "incremental", ")", ";", "log", "(", "test", ")", ";", "test", ".", "start", "=", "+", "(", ...
Start a test @param {Object} test Test object
[ "Start", "a", "test" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L462-L470
27,941
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (cfg, callback) { if (cfg.allSelectors.length > 0) { var selector = cfg.allSelectors.splice(0, 1)[0]; var one = { name : selector.name, cfg : cfg, selector : selector, callback : { fn : allTests,...
javascript
function (cfg, callback) { if (cfg.allSelectors.length > 0) { var selector = cfg.allSelectors.splice(0, 1)[0]; var one = { name : selector.name, cfg : cfg, selector : selector, callback : { fn : allTests,...
[ "function", "(", "cfg", ",", "callback", ")", "{", "if", "(", "cfg", ".", "allSelectors", ".", "length", ">", "0", ")", "{", "var", "selector", "=", "cfg", ".", "allSelectors", ".", "splice", "(", "0", ",", "1", ")", "[", "0", "]", ";", "var", ...
Run the tests on all selectors in the page, removing them one by one and comparing with the baselines @param {Object} cfg User defined configuration parameters @param {Object} callback Function to be executed after this measure.
[ "Run", "the", "tests", "on", "all", "selectors", "in", "the", "page", "removing", "them", "one", "by", "one", "and", "comparing", "with", "the", "baselines" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L477-L496
27,942
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (cfg, callback) { results = {}; // Generate a test targeting any CSS var all = { name : "__baseline__", cfg : cfg, selector : null, callback : { fn : allTests, scope : this, args : [cfg, cal...
javascript
function (cfg, callback) { results = {}; // Generate a test targeting any CSS var all = { name : "__baseline__", cfg : cfg, selector : null, callback : { fn : allTests, scope : this, args : [cfg, cal...
[ "function", "(", "cfg", ",", "callback", ")", "{", "results", "=", "{", "}", ";", "// Generate a test targeting any CSS", "var", "all", "=", "{", "name", ":", "\"__baseline__\"", ",", "cfg", ":", "cfg", ",", "selector", ":", "null", ",", "callback", ":", ...
Get the test results for the baseline containing all selectors. @param {Object} cfg User defined configuration parameters @param {Object} callback Function to be executed after this measure.
[ "Get", "the", "test", "results", "for", "the", "baseline", "containing", "all", "selectors", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L503-L519
27,943
ariatemplates/ariatemplates
src/aria/ext/StressCss.js
function (cfg) { cfg = cfg || {}; for (var prop in defaults) { if (defaults.hasOwnProperty(prop) && !(prop in cfg)) { cfg[prop] = defaults[prop]; } } cfg.allSelectors = getAllSelectors(cfg.widget); return cfg; }
javascript
function (cfg) { cfg = cfg || {}; for (var prop in defaults) { if (defaults.hasOwnProperty(prop) && !(prop in cfg)) { cfg[prop] = defaults[prop]; } } cfg.allSelectors = getAllSelectors(cfg.widget); return cfg; }
[ "function", "(", "cfg", ")", "{", "cfg", "=", "cfg", "||", "{", "}", ";", "for", "(", "var", "prop", "in", "defaults", ")", "{", "if", "(", "defaults", ".", "hasOwnProperty", "(", "prop", ")", "&&", "!", "(", "prop", "in", "cfg", ")", ")", "{",...
Normalize the user defined configuration object. It will add default values from @see defaults and generate the whole list of selectors to be tested. @param {Object} cfg Configuration information @return {Object} Normalized configuration object
[ "Normalize", "the", "user", "defined", "configuration", "object", ".", "It", "will", "add", "default", "values", "from" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/ext/StressCss.js#L553-L565
27,944
ariatemplates/ariatemplates
src/aria/pageEngine/utils/PageEngineUtils.js
function (item, container) { if (item && !ariaUtilsArray.contains(container, item)) { container.push(item); } }
javascript
function (item, container) { if (item && !ariaUtilsArray.contains(container, item)) { container.push(item); } }
[ "function", "(", "item", ",", "container", ")", "{", "if", "(", "item", "&&", "!", "ariaUtilsArray", ".", "contains", "(", "container", ",", "item", ")", ")", "{", "container", ".", "push", "(", "item", ")", ";", "}", "}" ]
Add an item inside a container only if it is not already there @param {MultiTypes} item @param {Array} container
[ "Add", "an", "item", "inside", "a", "container", "only", "if", "it", "is", "not", "already", "there" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/utils/PageEngineUtils.js#L33-L37
27,945
ariatemplates/ariatemplates
src/aria/pageEngine/utils/PageEngineUtils.js
function (container, toAdd) { var entry; for (var i = 0, len = toAdd.length; i < len; i++) { entry = toAdd[i]; this.addIfMissing(entry, container); } }
javascript
function (container, toAdd) { var entry; for (var i = 0, len = toAdd.length; i < len; i++) { entry = toAdd[i]; this.addIfMissing(entry, container); } }
[ "function", "(", "container", ",", "toAdd", ")", "{", "var", "entry", ";", "for", "(", "var", "i", "=", "0", ",", "len", "=", "toAdd", ".", "length", ";", "i", "<", "len", ";", "i", "++", ")", "{", "entry", "=", "toAdd", "[", "i", "]", ";", ...
Add all the entries of the array toAdd into the array container only if container does not already have them @param {Array} container @param {Array} toAdd
[ "Add", "all", "the", "entries", "of", "the", "array", "toAdd", "into", "the", "array", "container", "only", "if", "container", "does", "not", "already", "have", "them" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/utils/PageEngineUtils.js#L44-L50
27,946
ariatemplates/ariatemplates
src/aria/pageEngine/utils/PageEngineUtils.js
function (container, property) { var output = [], entry; for (var i = 0, len = container.length; i < len; i++) { entry = container[i]; if (entry[property]) { output.push(entry[property]); } } return outpu...
javascript
function (container, property) { var output = [], entry; for (var i = 0, len = container.length; i < len; i++) { entry = container[i]; if (entry[property]) { output.push(entry[property]); } } return outpu...
[ "function", "(", "container", ",", "property", ")", "{", "var", "output", "=", "[", "]", ",", "entry", ";", "for", "(", "var", "i", "=", "0", ",", "len", "=", "container", ".", "length", ";", "i", "<", "len", ";", "i", "++", ")", "{", "entry", ...
Extract a certain property from all the elements of the container array @param {Array} container @param {String} property @return {Array}
[ "Extract", "a", "certain", "property", "from", "all", "the", "elements", "of", "the", "container", "array" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/utils/PageEngineUtils.js#L58-L67
27,947
ariatemplates/ariatemplates
src/aria/pageEngine/utils/PageEngineUtils.js
function (container, keyName) { for (var element in container) { if (container.hasOwnProperty(element)) { container[element][keyName] = element; } } }
javascript
function (container, keyName) { for (var element in container) { if (container.hasOwnProperty(element)) { container[element][keyName] = element; } } }
[ "function", "(", "container", ",", "keyName", ")", "{", "for", "(", "var", "element", "in", "container", ")", "{", "if", "(", "container", ".", "hasOwnProperty", "(", "element", ")", ")", "{", "container", "[", "element", "]", "[", "keyName", "]", "=",...
Go through all the values of an object and adds the corresponding value inside its entries using the provided keyName @param {Object} container @param {String} keyName
[ "Go", "through", "all", "the", "values", "of", "an", "object", "and", "adds", "the", "corresponding", "value", "inside", "its", "entries", "using", "the", "provided", "keyName" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/utils/PageEngineUtils.js#L75-L81
27,948
ariatemplates/ariatemplates
src/aria/pageEngine/utils/PageEngineUtils.js
function (msg, errors, scope) { scope.$logError.apply(scope, [msg + ":"]); for (var i = 0, len = errors.length; i < len; i++) { scope.$logError.apply(scope, [(i + 1) + " - " + errors[i].msgId, errors[i].msgArgs]); } }
javascript
function (msg, errors, scope) { scope.$logError.apply(scope, [msg + ":"]); for (var i = 0, len = errors.length; i < len; i++) { scope.$logError.apply(scope, [(i + 1) + " - " + errors[i].msgId, errors[i].msgArgs]); } }
[ "function", "(", "msg", ",", "errors", ",", "scope", ")", "{", "scope", ".", "$logError", ".", "apply", "(", "scope", ",", "[", "msg", "+", "\":\"", "]", ")", ";", "for", "(", "var", "i", "=", "0", ",", "len", "=", "errors", ".", "length", ";",...
Log multiple errors to the default logger @param {String} msg The global error message @param {Array} errors List of all errors in this batch @param {Object} scope Scope of the $logError method
[ "Log", "multiple", "errors", "to", "the", "default", "logger" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/utils/PageEngineUtils.js#L104-L109
27,949
ariatemplates/ariatemplates
src/aria/widgets/form/InputValidationHandler.js
function (errorMessage) { var msg = null; for (var i = 0; i < errorMessage.length; i++) { if (msg === null && errorMessage[i]) { msg = errorMessage[i]; } } return msg; }
javascript
function (errorMessage) { var msg = null; for (var i = 0; i < errorMessage.length; i++) { if (msg === null && errorMessage[i]) { msg = errorMessage[i]; } } return msg; }
[ "function", "(", "errorMessage", ")", "{", "var", "msg", "=", "null", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "errorMessage", ".", "length", ";", "i", "++", ")", "{", "if", "(", "msg", "===", "null", "&&", "errorMessage", "[", "i", ...
Error messages can be declared in the template or within the widget via the framework itself. Need to determine which is which. @param {Array} errorMessage @private
[ "Error", "messages", "can", "be", "declared", "in", "the", "template", "or", "within", "the", "widget", "via", "the", "framework", "itself", ".", "Need", "to", "determine", "which", "is", "which", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/InputValidationHandler.js#L88-L99
27,950
ariatemplates/ariatemplates
src/aria/widgets/form/InputValidationHandler.js
function (out) { var errorMessage; if (this._WidgetCfg.formatError) {// framework errors errorMessage = this._WidgetCfg.formatErrorMessages; } else if (this._WidgetCfg.error) {// template errors errorMessage = this._WidgetCfg.errorMessages; ...
javascript
function (out) { var errorMessage; if (this._WidgetCfg.formatError) {// framework errors errorMessage = this._WidgetCfg.formatErrorMessages; } else if (this._WidgetCfg.error) {// template errors errorMessage = this._WidgetCfg.errorMessages; ...
[ "function", "(", "out", ")", "{", "var", "errorMessage", ";", "if", "(", "this", ".", "_WidgetCfg", ".", "formatError", ")", "{", "// framework errors", "errorMessage", "=", "this", ".", "_WidgetCfg", ".", "formatErrorMessages", ";", "}", "else", "if", "(", ...
Creates the container markup with the error message @param {aria.templates.MarkupWriter} out Markup writer which should receive the content of the popup. @private
[ "Creates", "the", "container", "markup", "with", "the", "error", "message" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/InputValidationHandler.js#L106-L135
27,951
ariatemplates/ariatemplates
src/aria/widgets/form/InputValidationHandler.js
function () { if (this._validationPopup) { return; } // create the section var section = this._context.createSection({ fn : this._renderValidationContent, scope : this }); // we no longer store the se...
javascript
function () { if (this._validationPopup) { return; } // create the section var section = this._context.createSection({ fn : this._renderValidationContent, scope : this }); // we no longer store the se...
[ "function", "(", ")", "{", "if", "(", "this", ".", "_validationPopup", ")", "{", "return", ";", "}", "// create the section", "var", "section", "=", "this", ".", "_context", ".", "createSection", "(", "{", "fn", ":", "this", ".", "_renderValidationContent", ...
Internal method called when the validation must be open @private
[ "Internal", "method", "called", "when", "the", "validation", "must", "be", "open" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/InputValidationHandler.js#L141-L172
27,952
ariatemplates/ariatemplates
src/aria/widgets/form/InputValidationHandler.js
function () { var errorTipPosition = this._WidgetCfg.errorTipPosition; var preferredPositions = [this._preferredPositions[errorTipPosition]]; for (var i in this._preferredPositions) { if (this._preferredPositions.hasOwnProperty(i) && errorTipPosition != i) { ...
javascript
function () { var errorTipPosition = this._WidgetCfg.errorTipPosition; var preferredPositions = [this._preferredPositions[errorTipPosition]]; for (var i in this._preferredPositions) { if (this._preferredPositions.hasOwnProperty(i) && errorTipPosition != i) { ...
[ "function", "(", ")", "{", "var", "errorTipPosition", "=", "this", ".", "_WidgetCfg", ".", "errorTipPosition", ";", "var", "preferredPositions", "=", "[", "this", ".", "_preferredPositions", "[", "errorTipPosition", "]", "]", ";", "for", "(", "var", "i", "in...
Creates an array of preferred positions, will first get the preferred position specified in the widgets errorTipPosition property. @return {Array} Returns an array of preferred positions.
[ "Creates", "an", "array", "of", "preferred", "positions", "will", "first", "get", "the", "preferred", "position", "specified", "in", "the", "widgets", "errorTipPosition", "property", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/InputValidationHandler.js#L179-L188
27,953
ariatemplates/ariatemplates
src/aria/widgets/form/InputValidationHandler.js
function (evt) { var position = evt.position; if (position) { // state is named after the position, except for topRight where it is named normal var state = position.reference.replace(" right", "Right").replace(" left", "Left"); if (state === 'topR...
javascript
function (evt) { var position = evt.position; if (position) { // state is named after the position, except for topRight where it is named normal var state = position.reference.replace(" right", "Right").replace(" left", "Left"); if (state === 'topR...
[ "function", "(", "evt", ")", "{", "var", "position", "=", "evt", ".", "position", ";", "if", "(", "position", ")", "{", "// state is named after the position, except for topRight where it is named normal", "var", "state", "=", "position", ".", "reference", ".", "rep...
Raised by the popup when its positioned. Needed to change the skin of the popup to place the arrow properly. @param {Object} evt
[ "Raised", "by", "the", "popup", "when", "its", "positioned", ".", "Needed", "to", "change", "the", "skin", "of", "the", "popup", "to", "place", "the", "arrow", "properly", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/InputValidationHandler.js#L218-L236
27,954
ariatemplates/ariatemplates
src/aria/utils/FireDomEvent.js
function (target, options) { if (ariaCoreBrowser.isOldIE || ariaCoreBrowser.isSafari) { this.fireKeydownEventAdaptedForKeyNav = function (target, options) { // For IE and Safari: simulate(target, "keydown", options); ...
javascript
function (target, options) { if (ariaCoreBrowser.isOldIE || ariaCoreBrowser.isSafari) { this.fireKeydownEventAdaptedForKeyNav = function (target, options) { // For IE and Safari: simulate(target, "keydown", options); ...
[ "function", "(", "target", ",", "options", ")", "{", "if", "(", "ariaCoreBrowser", ".", "isOldIE", "||", "ariaCoreBrowser", ".", "isSafari", ")", "{", "this", ".", "fireKeydownEventAdaptedForKeyNav", "=", "function", "(", "target", ",", "options", ")", "{", ...
Simulate a keydown event used inside key navigation. @method
[ "Simulate", "a", "keydown", "event", "used", "inside", "key", "navigation", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/FireDomEvent.js#L645-L662
27,955
ariatemplates/ariatemplates
src/aria/core/environment/Environment.js
function (mode) { var debug = this.isDebug(); if (debug !== mode && (mode === true || mode === false)) { ariaCoreAppEnvironment.setEnvironment({ "appSettings" : { "debug" : mode } }, null, true); ...
javascript
function (mode) { var debug = this.isDebug(); if (debug !== mode && (mode === true || mode === false)) { ariaCoreAppEnvironment.setEnvironment({ "appSettings" : { "debug" : mode } }, null, true); ...
[ "function", "(", "mode", ")", "{", "var", "debug", "=", "this", ".", "isDebug", "(", ")", ";", "if", "(", "debug", "!==", "mode", "&&", "(", "mode", "===", "true", "||", "mode", "===", "false", ")", ")", "{", "ariaCoreAppEnvironment", ".", "setEnviro...
Enable debug mode, and notify listeners. @public @param {Boolean} mode
[ "Enable", "debug", "mode", "and", "notify", "listeners", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/environment/Environment.js#L136-L145
27,956
ariatemplates/ariatemplates
src/aria/core/environment/Environment.js
function (mode) { var dev = this.isDevMode(); if (dev !== mode && (mode === true || mode === false)) { ariaCoreAppEnvironment.setEnvironment({ "appSettings" : { "devMode" : mode } }, null, true); ...
javascript
function (mode) { var dev = this.isDevMode(); if (dev !== mode && (mode === true || mode === false)) { ariaCoreAppEnvironment.setEnvironment({ "appSettings" : { "devMode" : mode } }, null, true); ...
[ "function", "(", "mode", ")", "{", "var", "dev", "=", "this", ".", "isDevMode", "(", ")", ";", "if", "(", "dev", "!==", "mode", "&&", "(", "mode", "===", "true", "||", "mode", "===", "false", ")", ")", "{", "ariaCoreAppEnvironment", ".", "setEnvironm...
Enable dev mode, and notify listeners. @public @param {Boolean} mode
[ "Enable", "dev", "mode", "and", "notify", "listeners", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/environment/Environment.js#L152-L161
27,957
ariatemplates/ariatemplates
src/aria/core/environment/Environment.js
function (escape) { var currentValue = this.hasEscapeHtmlByDefault(); if (currentValue !== escape && (escape === true || escape === false)) { aria.core.AppEnvironment.setEnvironment({ "templateSettings" : { "escapeHtmlByDefault" : escap...
javascript
function (escape) { var currentValue = this.hasEscapeHtmlByDefault(); if (currentValue !== escape && (escape === true || escape === false)) { aria.core.AppEnvironment.setEnvironment({ "templateSettings" : { "escapeHtmlByDefault" : escap...
[ "function", "(", "escape", ")", "{", "var", "currentValue", "=", "this", ".", "hasEscapeHtmlByDefault", "(", ")", ";", "if", "(", "currentValue", "!==", "escape", "&&", "(", "escape", "===", "true", "||", "escape", "===", "false", ")", ")", "{", "aria", ...
Turn on or off auto-escaping of HTML in statements @public @param {Boolean} escape
[ "Turn", "on", "or", "off", "auto", "-", "escaping", "of", "HTML", "in", "statements" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/environment/Environment.js#L204-L213
27,958
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (config) { this._config = config; this._pageProvider = config.pageProvider; ariaEmbedPlaceholderManager.register(this); this._pageProvider.$addListeners({ "pageDefinitionChange" : this._onPageDefinitionChangeListener }); ...
javascript
function (config) { this._config = config; this._pageProvider = config.pageProvider; ariaEmbedPlaceholderManager.register(this); this._pageProvider.$addListeners({ "pageDefinitionChange" : this._onPageDefinitionChangeListener }); ...
[ "function", "(", "config", ")", "{", "this", ".", "_config", "=", "config", ";", "this", ".", "_pageProvider", "=", "config", ".", "pageProvider", ";", "ariaEmbedPlaceholderManager", ".", "register", "(", "this", ")", ";", "this", ".", "_pageProvider", ".", ...
Start the page engine by loading the site configuration @param {aria.pageEngine.CfgBeans:Start} config json configuration
[ "Start", "the", "page", "engine", "by", "loading", "the", "site", "configuration" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L260-L277
27,959
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (siteConfig) { var valid = this.isConfigValid(siteConfig, "aria.pageEngine.CfgBeans.Site", this.INVALID_SITE_CONFIGURATION); if (!valid) { return; } var helper = new ariaPageEngineUtilsSiteConfigHelper(siteConfig); this._siteConfigHelp...
javascript
function (siteConfig) { var valid = this.isConfigValid(siteConfig, "aria.pageEngine.CfgBeans.Site", this.INVALID_SITE_CONFIGURATION); if (!valid) { return; } var helper = new ariaPageEngineUtilsSiteConfigHelper(siteConfig); this._siteConfigHelp...
[ "function", "(", "siteConfig", ")", "{", "var", "valid", "=", "this", ".", "isConfigValid", "(", "siteConfig", ",", "\"aria.pageEngine.CfgBeans.Site\"", ",", "this", ".", "INVALID_SITE_CONFIGURATION", ")", ";", "if", "(", "!", "valid", ")", "{", "return", ";",...
Callback for the site configuration module controller. Initialize whatever is needed by the root module controller, like the data model and the router @param {aria.pageEngine.CfgBeans:Site} siteConfig Site configuration
[ "Callback", "for", "the", "site", "configuration", "module", "controller", ".", "Initialize", "whatever", "is", "needed", "by", "the", "root", "module", "controller", "like", "the", "data", "model", "and", "the", "router" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L284-L326
27,960
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (loadModule) { this._rootModule = loadModule.moduleCtrlPrivate; this._data = this._rootModule.getData().storage; var siteHelper = this._siteConfigHelper; ariaUtilsCSSLoader.add(siteHelper.getSiteCss()); var classesToLoad = siteHelper.getListOfConten...
javascript
function (loadModule) { this._rootModule = loadModule.moduleCtrlPrivate; this._data = this._rootModule.getData().storage; var siteHelper = this._siteConfigHelper; ariaUtilsCSSLoader.add(siteHelper.getSiteCss()); var classesToLoad = siteHelper.getListOfConten...
[ "function", "(", "loadModule", ")", "{", "this", ".", "_rootModule", "=", "loadModule", ".", "moduleCtrlPrivate", ";", "this", ".", "_data", "=", "this", ".", "_rootModule", ".", "getData", "(", ")", ".", "storage", ";", "var", "siteHelper", "=", "this", ...
Load any dependency global for the site, like common modules. This is a callback of a createModuleCtrl @param {Object} loadModule Module controller description
[ "Load", "any", "dependency", "global", "for", "the", "site", "like", "common", "modules", ".", "This", "is", "a", "callback", "of", "a", "createModuleCtrl" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L344-L376
27,961
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (commonModulesToLoad) { this._rootModule.loadModules(null, { page : [], common : commonModulesToLoad }, { fn : this._onSiteReady, scope : this }); }
javascript
function (commonModulesToLoad) { this._rootModule.loadModules(null, { page : [], common : commonModulesToLoad }, { fn : this._onSiteReady, scope : this }); }
[ "function", "(", "commonModulesToLoad", ")", "{", "this", ".", "_rootModule", ".", "loadModules", "(", "null", ",", "{", "page", ":", "[", "]", ",", "common", ":", "commonModulesToLoad", "}", ",", "{", "fn", ":", "this", ".", "_onSiteReady", ",", "scope"...
Load the global modules with priority 1 @param {Array} commonModulesToLoad Array containing objects of type aria.templates.ModuleCtrl.SubModuleDefinition @protected
[ "Load", "the", "global", "modules", "with", "priority", "1" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L384-L392
27,962
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function () { var helper = this._siteConfigHelper; this.contentProcessors = helper.getContentProcessorInstances(); this._firstDiv = helper.getRootDiv(); if (!this._animationsDisabled && helper.siteConfig.animations) { this._animationsManager = new aria.pag...
javascript
function () { var helper = this._siteConfigHelper; this.contentProcessors = helper.getContentProcessorInstances(); this._firstDiv = helper.getRootDiv(); if (!this._animationsDisabled && helper.siteConfig.animations) { this._animationsManager = new aria.pag...
[ "function", "(", ")", "{", "var", "helper", "=", "this", ".", "_siteConfigHelper", ";", "this", ".", "contentProcessors", "=", "helper", ".", "getContentProcessorInstances", "(", ")", ";", "this", ".", "_firstDiv", "=", "helper", ".", "getRootDiv", "(", ")",...
Trigger the navigation to the first page @protected
[ "Trigger", "the", "navigation", "to", "the", "first", "page" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L398-L415
27,963
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (pageRequest, cb) { var pageId = pageRequest.pageId; var forceReload = pageRequest.forceReload; if (!forceReload && pageId && pageId == this.currentPageId) { this.$callback(cb); if (this._navigationManager) { this._navigati...
javascript
function (pageRequest, cb) { var pageId = pageRequest.pageId; var forceReload = pageRequest.forceReload; if (!forceReload && pageId && pageId == this.currentPageId) { this.$callback(cb); if (this._navigationManager) { this._navigati...
[ "function", "(", "pageRequest", ",", "cb", ")", "{", "var", "pageId", "=", "pageRequest", ".", "pageId", ";", "var", "forceReload", "=", "pageRequest", ".", "forceReload", ";", "if", "(", "!", "forceReload", "&&", "pageId", "&&", "pageId", "==", "this", ...
Navigate to a specific page @param {aria.pageEngine.CfgBeans:PageNavigationInformation} pageRequest @param {aria.core.CfgBeans:Callback} cb To be called when the navigation is complete
[ "Navigate", "to", "a", "specific", "page" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L422-L446
27,964
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (cfg, args) { var valid = this.isConfigValid(cfg, "aria.pageEngine.CfgBeans.PageDefinition", this.INVALID_PAGE_DEFINITION); if (!valid) { this.$callback(args.cb); return; } var pageConfigHelper = this._getPageConfigHelper(cfg); ...
javascript
function (cfg, args) { var valid = this.isConfigValid(cfg, "aria.pageEngine.CfgBeans.PageDefinition", this.INVALID_PAGE_DEFINITION); if (!valid) { this.$callback(args.cb); return; } var pageConfigHelper = this._getPageConfigHelper(cfg); ...
[ "function", "(", "cfg", ",", "args", ")", "{", "var", "valid", "=", "this", ".", "isConfigValid", "(", "cfg", ",", "\"aria.pageEngine.CfgBeans.PageDefinition\"", ",", "this", ".", "INVALID_PAGE_DEFINITION", ")", ";", "if", "(", "!", "valid", ")", "{", "this"...
Callback for loading the page dependencies after loading the page description while doing navigation. @param {aria.pageEngine.CfgBeans:PageDefinition} cfg Page configuration @param {Object} args Contains the pageId and the callback
[ "Callback", "for", "loading", "the", "page", "dependencies", "after", "loading", "the", "page", "description", "while", "doing", "navigation", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L453-L478
27,965
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (args) { var subModules = args.subModules; this._rootModule.loadModules(args.pageId, subModules, args.cb); }
javascript
function (args) { var subModules = args.subModules; this._rootModule.loadModules(args.pageId, subModules, args.cb); }
[ "function", "(", "args", ")", "{", "var", "subModules", "=", "args", ".", "subModules", ";", "this", ".", "_rootModule", ".", "loadModules", "(", "args", ".", "pageId", ",", "subModules", ",", "args", ".", "cb", ")", ";", "}" ]
Load any module that is needed by the page @param {Object} args Contains the pageId and the callback @protected
[ "Load", "any", "module", "that", "is", "needed", "by", "the", "page" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L541-L544
27,966
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (cfg, beanName, error) { try { ariaCoreJsonValidator.normalize({ json : cfg, beanName : beanName }, true); } catch (ex) { this._utils.logMultipleErrors(error, ex.errors, this); if (th...
javascript
function (cfg, beanName, error) { try { ariaCoreJsonValidator.normalize({ json : cfg, beanName : beanName }, true); } catch (ex) { this._utils.logMultipleErrors(error, ex.errors, this); if (th...
[ "function", "(", "cfg", ",", "beanName", ",", "error", ")", "{", "try", "{", "ariaCoreJsonValidator", ".", "normalize", "(", "{", "json", ":", "cfg", ",", "beanName", ":", "beanName", "}", ",", "true", ")", ";", "}", "catch", "(", "ex", ")", "{", "...
Normalize a configuration. It logs an error in case of validation failure @param {Object} cfg Configuration to validate @param {String} beanName name of the bean @param {String} error Error message to log along with the validation errors @return {Boolean}
[ "Normalize", "a", "configuration", ".", "It", "logs", "an", "error", "in", "case", "of", "validation", "failure" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L553-L567
27,967
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (args) { if (!this._pageConfigHelper) { this.$callback(args.cb); return; } var pageConfig = args.pageConfig, cfg = pageConfig.pageComposition, pageId = pageConfig.pageId; this.$raiseEvent({ name : "beforePageTransit...
javascript
function (args) { if (!this._pageConfigHelper) { this.$callback(args.cb); return; } var pageConfig = args.pageConfig, cfg = pageConfig.pageComposition, pageId = pageConfig.pageId; this.$raiseEvent({ name : "beforePageTransit...
[ "function", "(", "args", ")", "{", "if", "(", "!", "this", ".", "_pageConfigHelper", ")", "{", "this", ".", "$callback", "(", "args", ".", "cb", ")", ";", "return", ";", "}", "var", "pageConfig", "=", "args", ".", "pageConfig", ",", "cfg", "=", "pa...
Load the page page template in the DOM @param {Object} args Contains the pageId and the callback @protected
[ "Load", "the", "page", "page", "template", "in", "the", "DOM" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L574-L617
27,968
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (success, args) { if (this._navigationManager) { this._navigationManager.update(args.pageRequest); } var browser = ariaCoreBrowser; if (browser.isOldIE && browser.majorVersion < 8) { ariaCoreTimer.addCallback({ ...
javascript
function (success, args) { if (this._navigationManager) { this._navigationManager.update(args.pageRequest); } var browser = ariaCoreBrowser; if (browser.isOldIE && browser.majorVersion < 8) { ariaCoreTimer.addCallback({ ...
[ "function", "(", "success", ",", "args", ")", "{", "if", "(", "this", ".", "_navigationManager", ")", "{", "this", ".", "_navigationManager", ".", "update", "(", "args", ".", "pageRequest", ")", ";", "}", "var", "browser", "=", "ariaCoreBrowser", ";", "i...
Callback called after template is loaded inside the DOM @param {Object} success Status about the loadTemplate action @param {Object} args Contains params about the page @protected
[ "Callback", "called", "after", "template", "is", "loaded", "inside", "the", "DOM" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L625-L657
27,969
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (args, params) { this._animationsManager.$removeListeners({ "animationend" : this._pageTransitionComplete, scope : this }); this._activeDiv = (this._activeDiv + 1) % 2; Aria.disposeTemplate(this._getContainer(false)); t...
javascript
function (args, params) { this._animationsManager.$removeListeners({ "animationend" : this._pageTransitionComplete, scope : this }); this._activeDiv = (this._activeDiv + 1) % 2; Aria.disposeTemplate(this._getContainer(false)); t...
[ "function", "(", "args", ",", "params", ")", "{", "this", ".", "_animationsManager", ".", "$removeListeners", "(", "{", "\"animationend\"", ":", "this", ".", "_pageTransitionComplete", ",", "scope", ":", "this", "}", ")", ";", "this", ".", "_activeDiv", "=",...
Callback called after page transition is completed @param {Object} args Contains params about the page @param {Object} params Contains params about the page @protected
[ "Callback", "called", "after", "page", "transition", "is", "completed" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L665-L673
27,970
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (params) { ariaUtilsCSSLoader.remove(this._previousPageCSS); this.$raiseEvent({ name : "pageReady", pageId : params.pageConfig.pageId }); if (params.cb) { this.$callback(params.cb); } this._l...
javascript
function (params) { ariaUtilsCSSLoader.remove(this._previousPageCSS); this.$raiseEvent({ name : "pageReady", pageId : params.pageConfig.pageId }); if (params.cb) { this.$callback(params.cb); } this._l...
[ "function", "(", "params", ")", "{", "ariaUtilsCSSLoader", ".", "remove", "(", "this", ".", "_previousPageCSS", ")", ";", "this", ".", "$raiseEvent", "(", "{", "name", ":", "\"pageReady\"", ",", "pageId", ":", "params", ".", "pageConfig", ".", "pageId", "}...
Raise the page ready event and starts the load of the dependencies @param {Object} params Contains params about the page @protected
[ "Raise", "the", "page", "ready", "event", "and", "starts", "the", "load", "of", "the", "dependencies" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L680-L697
27,971
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (active) { if (!this._animationsManager) { return this._firstDiv; } active = !(active === false); if (active) { return this._activeDiv === 0 ? this._firstDiv : this._secondDiv; } else { return this._acti...
javascript
function (active) { if (!this._animationsManager) { return this._firstDiv; } active = !(active === false); if (active) { return this._activeDiv === 0 ? this._firstDiv : this._secondDiv; } else { return this._acti...
[ "function", "(", "active", ")", "{", "if", "(", "!", "this", ".", "_animationsManager", ")", "{", "return", "this", ".", "_firstDiv", ";", "}", "active", "=", "!", "(", "active", "===", "false", ")", ";", "if", "(", "active", ")", "{", "return", "t...
Return the element in which the page is shown right now or the other one, according to the argument @param {Boolean} active Whether the active HEMLElement should be returned, namely the element in which the page is loaded. It defaults to true @return {HTMLElement} Container of a page @protected
[ "Return", "the", "element", "in", "which", "the", "page", "is", "shown", "right", "now", "or", "the", "other", "one", "according", "to", "the", "argument" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L706-L716
27,972
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function () { if (!this._pageConfigHelper) { return; } var lazyPlaceholders = this._pageConfigHelper.getLazyPlaceholdersIds(); this._lazyContent = false; this.$raiseEvent({ name : "contentChange", contentPaths : ...
javascript
function () { if (!this._pageConfigHelper) { return; } var lazyPlaceholders = this._pageConfigHelper.getLazyPlaceholdersIds(); this._lazyContent = false; this.$raiseEvent({ name : "contentChange", contentPaths : ...
[ "function", "(", ")", "{", "if", "(", "!", "this", ".", "_pageConfigHelper", ")", "{", "return", ";", "}", "var", "lazyPlaceholders", "=", "this", ".", "_pageConfigHelper", ".", "getLazyPlaceholdersIds", "(", ")", ";", "this", ".", "_lazyContent", "=", "fa...
Trigger a content change in order to notify placeholder widgets @protected
[ "Trigger", "a", "content", "change", "in", "order", "to", "notify", "placeholder", "widgets" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L722-L734
27,973
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (placeholderPath) { var outputContent; var typeUtil = ariaUtilsType; var pageConfig = this._pageConfigs[this.currentPageId]; if (pageConfig) { var placeholders = pageConfig.pageComposition.placeholders; var content = placeholders[p...
javascript
function (placeholderPath) { var outputContent; var typeUtil = ariaUtilsType; var pageConfig = this._pageConfigs[this.currentPageId]; if (pageConfig) { var placeholders = pageConfig.pageComposition.placeholders; var content = placeholders[p...
[ "function", "(", "placeholderPath", ")", "{", "var", "outputContent", ";", "var", "typeUtil", "=", "ariaUtilsType", ";", "var", "pageConfig", "=", "this", ".", "_pageConfigs", "[", "this", ".", "currentPageId", "]", ";", "if", "(", "pageConfig", ")", "{", ...
Main content provider method @param {String} placeholderPath path of the placeholder @return {Array} List of content descriptions accepted by placeholders
[ "Main", "content", "provider", "method" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L741-L779
27,974
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (item, pageConfig) { var templateCfg = { classpath : item.template }; var args = item.args || []; var extraArg = {}; if (item.contentId) { extraArg.contents = this._getPlaceholderContents(pageConfig, item.contentId); ...
javascript
function (item, pageConfig) { var templateCfg = { classpath : item.template }; var args = item.args || []; var extraArg = {}; if (item.contentId) { extraArg.contents = this._getPlaceholderContents(pageConfig, item.contentId); ...
[ "function", "(", "item", ",", "pageConfig", ")", "{", "var", "templateCfg", "=", "{", "classpath", ":", "item", ".", "template", "}", ";", "var", "args", "=", "item", ".", "args", "||", "[", "]", ";", "var", "extraArg", "=", "{", "}", ";", "if", ...
Extract the template configuration to be given to the Placeholder widget @param {aria.pageEngine.CfgBeans:Placeholder} item @param {aria.pageEngine.CfgBeans:PageDefinition} pageConfig @return {aria.html.beans.TemplateCfg:Properties} @protected
[ "Extract", "the", "template", "configuration", "to", "be", "given", "to", "the", "Placeholder", "widget" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L788-L809
27,975
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (pageConfig, contentId) { var outputContent = []; var content = pageConfig.contents.placeholderContents ? pageConfig.contents.placeholderContents[contentId] : null; if (!content) { return outputContent; } ...
javascript
function (pageConfig, contentId) { var outputContent = []; var content = pageConfig.contents.placeholderContents ? pageConfig.contents.placeholderContents[contentId] : null; if (!content) { return outputContent; } ...
[ "function", "(", "pageConfig", ",", "contentId", ")", "{", "var", "outputContent", "=", "[", "]", ";", "var", "content", "=", "pageConfig", ".", "contents", ".", "placeholderContents", "?", "pageConfig", ".", "contents", ".", "placeholderContents", "[", "conte...
Retrieve the contents corresponding to a certain contentId from the page definition @param {aria.pageEngine.CfgBeans:PageDefinition} pageConfig @param {String} contentId @return {Array} Array of strings corresponding to processed content @protected
[ "Retrieve", "the", "contents", "corresponding", "to", "a", "certain", "contentId", "from", "the", "page", "definition" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L818-L833
27,976
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (content) { var contentType = content.contentType; if (contentType && contentType in this.contentProcessors) { return this.processContent(this.contentProcessors[contentType].processContent(content)); } return content.value || ""; }
javascript
function (content) { var contentType = content.contentType; if (contentType && contentType in this.contentProcessors) { return this.processContent(this.contentProcessors[contentType].processContent(content)); } return content.value || ""; }
[ "function", "(", "content", ")", "{", "var", "contentType", "=", "content", ".", "contentType", ";", "if", "(", "contentType", "&&", "contentType", "in", "this", ".", "contentProcessors", ")", "{", "return", "this", ".", "processContent", "(", "this", ".", ...
Process according to the content type @param {aria.pageEngine.CfgBeans:Content} content @return {String} processed content
[ "Process", "according", "to", "the", "content", "type" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L840-L847
27,977
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (msg) { var config = this._config; this.$logError.apply(this, msg); if (config.onerror) { this.$callback(config.onerror, msg); } }
javascript
function (msg) { var config = this._config; this.$logError.apply(this, msg); if (config.onerror) { this.$callback(config.onerror, msg); } }
[ "function", "(", "msg", ")", "{", "var", "config", "=", "this", ".", "_config", ";", "this", ".", "$logError", ".", "apply", "(", "this", ",", "msg", ")", ";", "if", "(", "config", ".", "onerror", ")", "{", "this", ".", "$callback", "(", "config", ...
Logs an error and calls the onerror callback if specified in the configuration @param {Array} msg Parameters to pass to the $logError method or to the error method provided in the configuration @protected
[ "Logs", "an", "error", "and", "calls", "the", "onerror", "callback", "if", "specified", "in", "the", "configuration" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L855-L861
27,978
ariatemplates/ariatemplates
src/aria/pageEngine/PageEngine.js
function (event) { var pageId = event.pageId; if (this.currentPageId == pageId) { this._rootModule.unloadPageModules(pageId); this.navigate({ pageId : pageId, url : this._navigationManager ? this._navigationManager.getUrl() ...
javascript
function (event) { var pageId = event.pageId; if (this.currentPageId == pageId) { this._rootModule.unloadPageModules(pageId); this.navigate({ pageId : pageId, url : this._navigationManager ? this._navigationManager.getUrl() ...
[ "function", "(", "event", ")", "{", "var", "pageId", "=", "event", ".", "pageId", ";", "if", "(", "this", ".", "currentPageId", "==", "pageId", ")", "{", "this", ".", "_rootModule", ".", "unloadPageModules", "(", "pageId", ")", ";", "this", ".", "navig...
Actual method called after a pageChange event is raised by the page provider @param {Object} event @protected
[ "Actual", "method", "called", "after", "a", "pageChange", "event", "is", "raised", "by", "the", "page", "provider" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/PageEngine.js#L882-L892
27,979
throneless-tech/libsignal-service-javascript
examples/LocalSignalProtocolStore.js
function() { var groupId = getString(libsignal.crypto.getRandomBytes(16)); return this.getGroup(groupId).then(function(group) { if (group === undefined) { return groupId; } else { console.warn("group id collision"); // probably a bad sign. return this.generateNewGroupId(); ...
javascript
function() { var groupId = getString(libsignal.crypto.getRandomBytes(16)); return this.getGroup(groupId).then(function(group) { if (group === undefined) { return groupId; } else { console.warn("group id collision"); // probably a bad sign. return this.generateNewGroupId(); ...
[ "function", "(", ")", "{", "var", "groupId", "=", "getString", "(", "libsignal", ".", "crypto", ".", "getRandomBytes", "(", "16", ")", ")", ";", "return", "this", ".", "getGroup", "(", "groupId", ")", ".", "then", "(", "function", "(", "group", ")", ...
create a random group id that we haven't seen before.
[ "create", "a", "random", "group", "id", "that", "we", "haven", "t", "seen", "before", "." ]
50cf3f681b6c98290ef8c38431e93436c83bfe56
https://github.com/throneless-tech/libsignal-service-javascript/blob/50cf3f681b6c98290ef8c38431e93436c83bfe56/examples/LocalSignalProtocolStore.js#L136-L146
27,980
throneless-tech/libsignal-service-javascript
examples/LocalSignalProtocolStore.js
function() { var collection = []; for (let id of this.store._keys) { if (id.startsWith("unprocessed")) { collection.push(this.get(id)); } } return Promise.resolve(collection); }
javascript
function() { var collection = []; for (let id of this.store._keys) { if (id.startsWith("unprocessed")) { collection.push(this.get(id)); } } return Promise.resolve(collection); }
[ "function", "(", ")", "{", "var", "collection", "=", "[", "]", ";", "for", "(", "let", "id", "of", "this", ".", "store", ".", "_keys", ")", "{", "if", "(", "id", ".", "startsWith", "(", "\"unprocessed\"", ")", ")", "{", "collection", ".", "push", ...
Not yet processed messages - for resiliency
[ "Not", "yet", "processed", "messages", "-", "for", "resiliency" ]
50cf3f681b6c98290ef8c38431e93436c83bfe56
https://github.com/throneless-tech/libsignal-service-javascript/blob/50cf3f681b6c98290ef8c38431e93436c83bfe56/examples/LocalSignalProtocolStore.js#L440-L448
27,981
anthonynichols/node-include
include.js
findProjectRoot
function findProjectRoot(currentPath) { var result = undefined; try { var packageStats = lstatSync(path.join(currentPath, 'package.json')); if (packageStats.isFile()) { result = currentPath; } } catch (error) { if (currentPath !== path.resolve('/')) { result = findProjectRoot(path.jo...
javascript
function findProjectRoot(currentPath) { var result = undefined; try { var packageStats = lstatSync(path.join(currentPath, 'package.json')); if (packageStats.isFile()) { result = currentPath; } } catch (error) { if (currentPath !== path.resolve('/')) { result = findProjectRoot(path.jo...
[ "function", "findProjectRoot", "(", "currentPath", ")", "{", "var", "result", "=", "undefined", ";", "try", "{", "var", "packageStats", "=", "lstatSync", "(", "path", ".", "join", "(", "currentPath", ",", "'package.json'", ")", ")", ";", "if", "(", "packag...
Attempts to find the project root by finding the nearest package.json file. @private @param {String} currentPath - Path of the file doing the including. @return {String?}
[ "Attempts", "to", "find", "the", "project", "root", "by", "finding", "the", "nearest", "package", ".", "json", "file", "." ]
d17bbe7f196f26c863ee6aca44e431c3d5168635
https://github.com/anthonynichols/node-include/blob/d17bbe7f196f26c863ee6aca44e431c3d5168635/include.js#L13-L29
27,982
material-foundation/material-remixer-js
examples/src/demo-app.js
loadTemplate
function loadTemplate() { generateData(); return new Promise(function(resolve, reject) { // Load handlebars page template. $.get('src/demo-template.html', function(response) { template = response; render(); resolve(); }).fail(function() { reject(); }); }); }
javascript
function loadTemplate() { generateData(); return new Promise(function(resolve, reject) { // Load handlebars page template. $.get('src/demo-template.html', function(response) { template = response; render(); resolve(); }).fail(function() { reject(); }); }); }
[ "function", "loadTemplate", "(", ")", "{", "generateData", "(", ")", ";", "return", "new", "Promise", "(", "function", "(", "resolve", ",", "reject", ")", "{", "// Load handlebars page template.", "$", ".", "get", "(", "'src/demo-template.html'", ",", "function"...
Loads the demo template. @return {Promise} Returns promise for loading template as successful/failure.
[ "Loads", "the", "demo", "template", "." ]
9ecd2cda79f68a307ac57f17e66b46f080afa3d0
https://github.com/material-foundation/material-remixer-js/blob/9ecd2cda79f68a307ac57f17e66b46f080afa3d0/examples/src/demo-app.js#L27-L41
27,983
material-foundation/material-remixer-js
examples/src/demo-app.js
generateData
function generateData() { var totalTransactions = 20; var totalAmount = 0; var transactions = []; // Generate transactions for (var i = 0; i < totalTransactions; i++) { // Transactions var transaction = faker.helpers.createTransaction(); transaction.date = getDate(); totalAmount += parseFloat...
javascript
function generateData() { var totalTransactions = 20; var totalAmount = 0; var transactions = []; // Generate transactions for (var i = 0; i < totalTransactions; i++) { // Transactions var transaction = faker.helpers.createTransaction(); transaction.date = getDate(); totalAmount += parseFloat...
[ "function", "generateData", "(", ")", "{", "var", "totalTransactions", "=", "20", ";", "var", "totalAmount", "=", "0", ";", "var", "transactions", "=", "[", "]", ";", "// Generate transactions", "for", "(", "var", "i", "=", "0", ";", "i", "<", "totalTran...
Generates fake data using faker.js script.
[ "Generates", "fake", "data", "using", "faker", ".", "js", "script", "." ]
9ecd2cda79f68a307ac57f17e66b46f080afa3d0
https://github.com/material-foundation/material-remixer-js/blob/9ecd2cda79f68a307ac57f17e66b46f080afa3d0/examples/src/demo-app.js#L44-L70
27,984
material-foundation/material-remixer-js
examples/src/demo-app.js
compare
function compare(a, b) { var date1 = new Date(a.date); var date2 = new Date(b.date); if (date1 < date2) { return -1; } if (date1 > date2) { return 1; } return 0; }
javascript
function compare(a, b) { var date1 = new Date(a.date); var date2 = new Date(b.date); if (date1 < date2) { return -1; } if (date1 > date2) { return 1; } return 0; }
[ "function", "compare", "(", "a", ",", "b", ")", "{", "var", "date1", "=", "new", "Date", "(", "a", ".", "date", ")", ";", "var", "date2", "=", "new", "Date", "(", "b", ".", "date", ")", ";", "if", "(", "date1", "<", "date2", ")", "{", "return...
Sorts by date.
[ "Sorts", "by", "date", "." ]
9ecd2cda79f68a307ac57f17e66b46f080afa3d0
https://github.com/material-foundation/material-remixer-js/blob/9ecd2cda79f68a307ac57f17e66b46f080afa3d0/examples/src/demo-app.js#L73-L83
27,985
material-foundation/material-remixer-js
examples/src/demo-app.js
addClickHandler
function addClickHandler() { $('.transaction-list-item').click(function() { var index = $('.transaction-list-item').index(this); dataView.selectedTransaction = dataView.transactions[index]; render(); }); }
javascript
function addClickHandler() { $('.transaction-list-item').click(function() { var index = $('.transaction-list-item').index(this); dataView.selectedTransaction = dataView.transactions[index]; render(); }); }
[ "function", "addClickHandler", "(", ")", "{", "$", "(", "'.transaction-list-item'", ")", ".", "click", "(", "function", "(", ")", "{", "var", "index", "=", "$", "(", "'.transaction-list-item'", ")", ".", "index", "(", "this", ")", ";", "dataView", ".", "...
Adds a click listener for transaction list items.
[ "Adds", "a", "click", "listener", "for", "transaction", "list", "items", "." ]
9ecd2cda79f68a307ac57f17e66b46f080afa3d0
https://github.com/material-foundation/material-remixer-js/blob/9ecd2cda79f68a307ac57f17e66b46f080afa3d0/examples/src/demo-app.js#L136-L142
27,986
ciena-frost/ember-frost-bunsen
addon/components/array-container.js
clearSubObject
function clearSubObject (object, path, pathIndex) { const key = path[pathIndex] if (path.length < pathIndex + 2) { delete object[key] return true } const subObj = object[key] const didClear = clearSubObject(subObj, path, pathIndex + 1) if (didClear && keys(subObj).length <= 0) { delete object[ke...
javascript
function clearSubObject (object, path, pathIndex) { const key = path[pathIndex] if (path.length < pathIndex + 2) { delete object[key] return true } const subObj = object[key] const didClear = clearSubObject(subObj, path, pathIndex + 1) if (didClear && keys(subObj).length <= 0) { delete object[ke...
[ "function", "clearSubObject", "(", "object", ",", "path", ",", "pathIndex", ")", "{", "const", "key", "=", "path", "[", "pathIndex", "]", "if", "(", "path", ".", "length", "<", "pathIndex", "+", "2", ")", "{", "delete", "object", "[", "key", "]", "re...
Recursively clears empty objects based on a path @param {Object} object Hash containing object @param {String[]} path Array of path segments to the desired value to clear @param {Number} pathIndex Index of the path segment to use as a key @returns {Boolean} True if a key was deleted from the passed in object
[ "Recursively", "clears", "empty", "objects", "based", "on", "a", "path" ]
0a4d323484e49aca86404204e4139a64d43829ad
https://github.com/ciena-frost/ember-frost-bunsen/blob/0a4d323484e49aca86404204e4139a64d43829ad/addon/components/array-container.js#L34-L47
27,987
ciena-frost/ember-frost-bunsen
addon/utils.js
removeChildInternals
function removeChildInternals (withoutInternal) { return _.chain(withoutInternal) .map((item, key) => { const withoutInternal = removeInternalValues(item) if (withoutInternal !== undefined && withoutInternal !== item) { return [key, withoutInternal] } }) .filter() .fromPairs(...
javascript
function removeChildInternals (withoutInternal) { return _.chain(withoutInternal) .map((item, key) => { const withoutInternal = removeInternalValues(item) if (withoutInternal !== undefined && withoutInternal !== item) { return [key, withoutInternal] } }) .filter() .fromPairs(...
[ "function", "removeChildInternals", "(", "withoutInternal", ")", "{", "return", "_", ".", "chain", "(", "withoutInternal", ")", ".", "map", "(", "(", "item", ",", "key", ")", "=>", "{", "const", "withoutInternal", "=", "removeInternalValues", "(", "item", ")...
Removes nested _internal keys from an object @param {Object} withoutInternal Object to remove nested _internal keys from @returns {Object} Copy of the object with no _internal keys
[ "Removes", "nested", "_internal", "keys", "from", "an", "object" ]
0a4d323484e49aca86404204e4139a64d43829ad
https://github.com/ciena-frost/ember-frost-bunsen/blob/0a4d323484e49aca86404204e4139a64d43829ad/addon/utils.js#L431-L442
27,988
ciena-frost/ember-frost-bunsen
addon/utils.js
maybeMerge
function maybeMerge (first, second) { if (Object.keys(second).length > 0) { return Object.assign({}, first, second) // don't mutate the object } return first }
javascript
function maybeMerge (first, second) { if (Object.keys(second).length > 0) { return Object.assign({}, first, second) // don't mutate the object } return first }
[ "function", "maybeMerge", "(", "first", ",", "second", ")", "{", "if", "(", "Object", ".", "keys", "(", "second", ")", ".", "length", ">", "0", ")", "{", "return", "Object", ".", "assign", "(", "{", "}", ",", "first", ",", "second", ")", "// don't ...
Merges properties from an object into another if the second object has enumerable properties @param {Object} first Object @param {Object} second Object with properties to merge into the first @returns {Object} The merged object if the second object has enumerable properties or the first object otherwise
[ "Merges", "properties", "from", "an", "object", "into", "another", "if", "the", "second", "object", "has", "enumerable", "properties" ]
0a4d323484e49aca86404204e4139a64d43829ad
https://github.com/ciena-frost/ember-frost-bunsen/blob/0a4d323484e49aca86404204e4139a64d43829ad/addon/utils.js#L452-L457
27,989
winjs/react-winjs
react-winjs.js
typeToPropType
function typeToPropType(typeInfo) { if (typeInfo.type === "string") { return React.PropTypes.string; } else if (typeInfo.type === "boolean") { return React.PropTypes.bool; } else if (typeInfo.type === "number") { return React.PropTypes.number; } else if (typeInfo.type === "enum")...
javascript
function typeToPropType(typeInfo) { if (typeInfo.type === "string") { return React.PropTypes.string; } else if (typeInfo.type === "boolean") { return React.PropTypes.bool; } else if (typeInfo.type === "number") { return React.PropTypes.number; } else if (typeInfo.type === "enum")...
[ "function", "typeToPropType", "(", "typeInfo", ")", "{", "if", "(", "typeInfo", ".", "type", "===", "\"string\"", ")", "{", "return", "React", ".", "PropTypes", ".", "string", ";", "}", "else", "if", "(", "typeInfo", ".", "type", "===", "\"boolean\"", ")...
Given a type from RawControlApis returns a React propType.
[ "Given", "a", "type", "from", "RawControlApis", "returns", "a", "React", "propType", "." ]
1a117744f24cbeb1729f38debde43550e34affeb
https://github.com/winjs/react-winjs/blob/1a117744f24cbeb1729f38debde43550e34affeb/react-winjs.js#L1725-L1749
27,990
winjs/react-winjs
react-winjs.js
function (propType) { return { propType: propType, preCtorInit: function property_preCtorInit(element, options, data, displayName, propName, value) { options[propName] = value; }, update: function property_update(winjsComponent, propName, oldValue,...
javascript
function (propType) { return { propType: propType, preCtorInit: function property_preCtorInit(element, options, data, displayName, propName, value) { options[propName] = value; }, update: function property_update(winjsComponent, propName, oldValue,...
[ "function", "(", "propType", ")", "{", "return", "{", "propType", ":", "propType", ",", "preCtorInit", ":", "function", "property_preCtorInit", "(", "element", ",", "options", ",", "data", ",", "displayName", ",", "propName", ",", "value", ")", "{", "options...
Maps to a property on the winControl.
[ "Maps", "to", "a", "property", "on", "the", "winControl", "." ]
1a117744f24cbeb1729f38debde43550e34affeb
https://github.com/winjs/react-winjs/blob/1a117744f24cbeb1729f38debde43550e34affeb/react-winjs.js#L1938-L1950
27,991
winjs/react-winjs
react-winjs.js
function (propType) { return { propType: propType, preCtorInit: function focusProperty_preCtorInit(element, options, data, displayName, propName, value) { options[propName] = value; }, update: function focusProperty_update(winjsComponent, propName,...
javascript
function (propType) { return { propType: propType, preCtorInit: function focusProperty_preCtorInit(element, options, data, displayName, propName, value) { options[propName] = value; }, update: function focusProperty_update(winjsComponent, propName,...
[ "function", "(", "propType", ")", "{", "return", "{", "propType", ":", "propType", ",", "preCtorInit", ":", "function", "focusProperty_preCtorInit", "(", "element", ",", "options", ",", "data", ",", "displayName", ",", "propName", ",", "value", ")", "{", "op...
Maps to a property on the winControl which involves setting focus. Such properties are set outside of componentWillReceiveProps to prevent React from undoing the focus move.
[ "Maps", "to", "a", "property", "on", "the", "winControl", "which", "involves", "setting", "focus", ".", "Such", "properties", "are", "set", "outside", "of", "componentWillReceiveProps", "to", "prevent", "React", "from", "undoing", "the", "focus", "move", "." ]
1a117744f24cbeb1729f38debde43550e34affeb
https://github.com/winjs/react-winjs/blob/1a117744f24cbeb1729f38debde43550e34affeb/react-winjs.js#L1955-L1976
27,992
winjs/react-winjs
react-winjs.js
function (propType) { return { propType: propType, preCtorInit: function domProperty_preCtorInit(element, options, data, displayName, propName, value) { element[propName] = value; }, update: function domProperty_update(winjsComponent, propName, old...
javascript
function (propType) { return { propType: propType, preCtorInit: function domProperty_preCtorInit(element, options, data, displayName, propName, value) { element[propName] = value; }, update: function domProperty_update(winjsComponent, propName, old...
[ "function", "(", "propType", ")", "{", "return", "{", "propType", ":", "propType", ",", "preCtorInit", ":", "function", "domProperty_preCtorInit", "(", "element", ",", "options", ",", "data", ",", "displayName", ",", "propName", ",", "value", ")", "{", "elem...
Maps to a property on the winControl's element.
[ "Maps", "to", "a", "property", "on", "the", "winControl", "s", "element", "." ]
1a117744f24cbeb1729f38debde43550e34affeb
https://github.com/winjs/react-winjs/blob/1a117744f24cbeb1729f38debde43550e34affeb/react-winjs.js#L1979-L1991
27,993
winjs/react-winjs
react-winjs.js
function (propType) { return { propType: propType, update: function domAttribute_update(winjsComponent, propName, oldValue, newValue) { if (oldValue !== newValue) { if (newValue !== null && newValue !== undefined) { winjsCompone...
javascript
function (propType) { return { propType: propType, update: function domAttribute_update(winjsComponent, propName, oldValue, newValue) { if (oldValue !== newValue) { if (newValue !== null && newValue !== undefined) { winjsCompone...
[ "function", "(", "propType", ")", "{", "return", "{", "propType", ":", "propType", ",", "update", ":", "function", "domAttribute_update", "(", "winjsComponent", ",", "propName", ",", "oldValue", ",", "newValue", ")", "{", "if", "(", "oldValue", "!==", "newVa...
Maps to an attribute on the winControl's element.
[ "Maps", "to", "an", "attribute", "on", "the", "winControl", "s", "element", "." ]
1a117744f24cbeb1729f38debde43550e34affeb
https://github.com/winjs/react-winjs/blob/1a117744f24cbeb1729f38debde43550e34affeb/react-winjs.js#L1994-L2007
27,994
winjs/react-winjs
react-winjs.js
event_update
function event_update(winjsComponent, propName, oldValue, newValue) { if (oldValue !== newValue) { winjsComponent.winControl[propName.toLowerCase()] = newValue; } }
javascript
function event_update(winjsComponent, propName, oldValue, newValue) { if (oldValue !== newValue) { winjsComponent.winControl[propName.toLowerCase()] = newValue; } }
[ "function", "event_update", "(", "winjsComponent", ",", "propName", ",", "oldValue", ",", "newValue", ")", "{", "if", "(", "oldValue", "!==", "newValue", ")", "{", "winjsComponent", ".", "winControl", "[", "propName", ".", "toLowerCase", "(", ")", "]", "=", ...
Can't set options in preCtorInit for events. The problem is WinJS control options use a different code path to hook up events than the event property setters. Consequently, setting an event property will not automatically unhook the event listener that was specified in the options during initialization. To avoid this p...
[ "Can", "t", "set", "options", "in", "preCtorInit", "for", "events", ".", "The", "problem", "is", "WinJS", "control", "options", "use", "a", "different", "code", "path", "to", "hook", "up", "events", "than", "the", "event", "property", "setters", ".", "Cons...
1a117744f24cbeb1729f38debde43550e34affeb
https://github.com/winjs/react-winjs/blob/1a117744f24cbeb1729f38debde43550e34affeb/react-winjs.js#L2017-L2021
27,995
winjs/react-winjs
react-winjs.js
PropHandlers_warn
function PropHandlers_warn(warnMessage) { return { // Don't need preCtorInit because this prop handler doesn't have any side // effects on the WinJS control. update also runs during initialization so // update is just as good as preCtorInit for our use case. updat...
javascript
function PropHandlers_warn(warnMessage) { return { // Don't need preCtorInit because this prop handler doesn't have any side // effects on the WinJS control. update also runs during initialization so // update is just as good as preCtorInit for our use case. updat...
[ "function", "PropHandlers_warn", "(", "warnMessage", ")", "{", "return", "{", "// Don't need preCtorInit because this prop handler doesn't have any side", "// effects on the WinJS control. update also runs during initialization so", "// update is just as good as preCtorInit for our use case.", ...
Emits a warning to the console whenever prop gets used.
[ "Emits", "a", "warning", "to", "the", "console", "whenever", "prop", "gets", "used", "." ]
1a117744f24cbeb1729f38debde43550e34affeb
https://github.com/winjs/react-winjs/blob/1a117744f24cbeb1729f38debde43550e34affeb/react-winjs.js#L2101-L2110
27,996
winjs/react-winjs
react-winjs.js
PropHandlers_mountTo
function PropHandlers_mountTo(getMountPoint) { return { propType: React.PropTypes.element, // Can't use preCtorInit because the mount point may not exist until the // constructor has run. update: function mountTo_update(winjsComponent, propName, oldValue, newValue...
javascript
function PropHandlers_mountTo(getMountPoint) { return { propType: React.PropTypes.element, // Can't use preCtorInit because the mount point may not exist until the // constructor has run. update: function mountTo_update(winjsComponent, propName, oldValue, newValue...
[ "function", "PropHandlers_mountTo", "(", "getMountPoint", ")", "{", "return", "{", "propType", ":", "React", ".", "PropTypes", ".", "element", ",", "// Can't use preCtorInit because the mount point may not exist until the", "// constructor has run.", "update", ":", "function"...
Mounts a React component on whatever element gets returned by getMountPoint.
[ "Mounts", "a", "React", "component", "on", "whatever", "element", "gets", "returned", "by", "getMountPoint", "." ]
1a117744f24cbeb1729f38debde43550e34affeb
https://github.com/winjs/react-winjs/blob/1a117744f24cbeb1729f38debde43550e34affeb/react-winjs.js#L2150-L2206
27,997
winjs/react-winjs
react-winjs.js
mountTo_update
function mountTo_update(winjsComponent, propName, oldValue, newValue) { var data = winjsComponent.data[propName] || {}; var version = (data.version || 0) + 1; winjsComponent.data[propName] = { // *mountComponent* may run asynchronously and we may queue...
javascript
function mountTo_update(winjsComponent, propName, oldValue, newValue) { var data = winjsComponent.data[propName] || {}; var version = (data.version || 0) + 1; winjsComponent.data[propName] = { // *mountComponent* may run asynchronously and we may queue...
[ "function", "mountTo_update", "(", "winjsComponent", ",", "propName", ",", "oldValue", ",", "newValue", ")", "{", "var", "data", "=", "winjsComponent", ".", "data", "[", "propName", "]", "||", "{", "}", ";", "var", "version", "=", "(", "data", ".", "vers...
Can't use preCtorInit because the mount point may not exist until the constructor has run.
[ "Can", "t", "use", "preCtorInit", "because", "the", "mount", "point", "may", "not", "exist", "until", "the", "constructor", "has", "run", "." ]
1a117744f24cbeb1729f38debde43550e34affeb
https://github.com/winjs/react-winjs/blob/1a117744f24cbeb1729f38debde43550e34affeb/react-winjs.js#L2155-L2199
27,998
winjs/react-winjs
react-winjs.js
PropHandlers_syncChildrenWithBindingList
function PropHandlers_syncChildrenWithBindingList(bindingListName) { return { preCtorInit: function syncChildrenWithBindingList_preCtorInit(element, options, data, displayName, propName, value) { var latest = processChildren(displayName, value, {}); data[propName] = {...
javascript
function PropHandlers_syncChildrenWithBindingList(bindingListName) { return { preCtorInit: function syncChildrenWithBindingList_preCtorInit(element, options, data, displayName, propName, value) { var latest = processChildren(displayName, value, {}); data[propName] = {...
[ "function", "PropHandlers_syncChildrenWithBindingList", "(", "bindingListName", ")", "{", "return", "{", "preCtorInit", ":", "function", "syncChildrenWithBindingList_preCtorInit", "(", "element", ",", "options", ",", "data", ",", "displayName", ",", "propName", ",", "va...
Uses the Binding.List's editing APIs to make it match the children prop. Does this to the Binding.List stored in the winControl's property called bindingListName.
[ "Uses", "the", "Binding", ".", "List", "s", "editing", "APIs", "to", "make", "it", "match", "the", "children", "prop", ".", "Does", "this", "to", "the", "Binding", ".", "List", "stored", "in", "the", "winControl", "s", "property", "called", "bindingListNam...
1a117744f24cbeb1729f38debde43550e34affeb
https://github.com/winjs/react-winjs/blob/1a117744f24cbeb1729f38debde43550e34affeb/react-winjs.js#L2210-L2256
27,999
winjs/react-winjs
react-winjs.js
function (winjsComponent, propName, oldValue, newValue) { // TODO: dispose ReactDOM.render(React.DOM.div(null, newValue), winjsComponent.winControl.element); }
javascript
function (winjsComponent, propName, oldValue, newValue) { // TODO: dispose ReactDOM.render(React.DOM.div(null, newValue), winjsComponent.winControl.element); }
[ "function", "(", "winjsComponent", ",", "propName", ",", "oldValue", ",", "newValue", ")", "{", "// TODO: dispose", "ReactDOM", ".", "render", "(", "React", ".", "DOM", ".", "div", "(", "null", ",", "newValue", ")", ",", "winjsComponent", ".", "winControl", ...
children propHandler looks like this rather than using mountTo on winControl.element because this enables props.children to have multiple components whereas the other technique restricts it to one.
[ "children", "propHandler", "looks", "like", "this", "rather", "than", "using", "mountTo", "on", "winControl", ".", "element", "because", "this", "enables", "props", ".", "children", "to", "have", "multiple", "components", "whereas", "the", "other", "technique", ...
1a117744f24cbeb1729f38debde43550e34affeb
https://github.com/winjs/react-winjs/blob/1a117744f24cbeb1729f38debde43550e34affeb/react-winjs.js#L2626-L2629