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
partition
stringclasses
1 value
ariatemplates/ariatemplates
src/aria/html/Select.js
function (value) { if (this.options) { for (var i = 0, l = this.options.length; i < l; i++) { if (this.options[i].value === value) { return i; } } } return -1; }
javascript
function (value) { if (this.options) { for (var i = 0, l = this.options.length; i < l; i++) { if (this.options[i].value === value) { return i; } } } return -1; }
[ "function", "(", "value", ")", "{", "if", "(", "this", ".", "options", ")", "{", "for", "(", "var", "i", "=", "0", ",", "l", "=", "this", ".", "options", ".", "length", ";", "i", "<", "l", ";", "i", "++", ")", "{", "if", "(", "this", ".", ...
Function called to retrieve the selected index from a selected value @param {Object} value Value to retrieve from the options
[ "Function", "called", "to", "retrieve", "the", "selected", "index", "from", "a", "selected", "value" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/Select.js#L260-L269
train
ariatemplates/ariatemplates
src/aria/html/Select.js
function () { var bind = this._bindingListeners.value; if (bind) { var selectedIndex = this._domElt.selectedIndex; var value = ""; if (selectedIndex != -1) { value = this.options[this._domElt.selectedIndex].value; ...
javascript
function () { var bind = this._bindingListeners.value; if (bind) { var selectedIndex = this._domElt.selectedIndex; var value = ""; if (selectedIndex != -1) { value = this.options[this._domElt.selectedIndex].value; ...
[ "function", "(", ")", "{", "var", "bind", "=", "this", ".", "_bindingListeners", ".", "value", ";", "if", "(", "bind", ")", "{", "var", "selectedIndex", "=", "this", ".", "_domElt", ".", "selectedIndex", ";", "var", "value", "=", "\"\"", ";", "if", "...
set the value in the data model from the binding
[ "set", "the", "value", "in", "the", "data", "model", "from", "the", "binding" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/Select.js#L287-L301
train
ariatemplates/ariatemplates
src/aria/html/Select.js
function () { var bind = this._bindingListeners.selectedIndex; if (bind) { var newIndex = this._transform(bind.transform, this._domElt.selectedIndex, "fromWidget"); ariaUtilsJson.setValue(bind.inside, bind.to, newIndex, bind.cb); } }
javascript
function () { var bind = this._bindingListeners.selectedIndex; if (bind) { var newIndex = this._transform(bind.transform, this._domElt.selectedIndex, "fromWidget"); ariaUtilsJson.setValue(bind.inside, bind.to, newIndex, bind.cb); } }
[ "function", "(", ")", "{", "var", "bind", "=", "this", ".", "_bindingListeners", ".", "selectedIndex", ";", "if", "(", "bind", ")", "{", "var", "newIndex", "=", "this", ".", "_transform", "(", "bind", ".", "transform", ",", "this", ".", "_domElt", ".",...
set the selectedIndex in the data model from the binding
[ "set", "the", "selectedIndex", "in", "the", "data", "model", "from", "the", "binding" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/Select.js#L306-L312
train
ariatemplates/ariatemplates
src/aria/modules/requestHandler/RequestHandler.js
function (jsonData, requestObject) { var reqSerializer = requestObject ? requestObject.requestJsonSerializer : null; var options = reqSerializer ? reqSerializer.options : null; var instance = reqSerializer ? reqSerializer.instance : null; if (instance) { ...
javascript
function (jsonData, requestObject) { var reqSerializer = requestObject ? requestObject.requestJsonSerializer : null; var options = reqSerializer ? reqSerializer.options : null; var instance = reqSerializer ? reqSerializer.instance : null; if (instance) { ...
[ "function", "(", "jsonData", ",", "requestObject", ")", "{", "var", "reqSerializer", "=", "requestObject", "?", "requestObject", ".", "requestJsonSerializer", ":", "null", ";", "var", "options", "=", "reqSerializer", "?", "reqSerializer", ".", "options", ":", "n...
Serializes the data by using the serializer specified in the request or the one specified in the application environment @param {Object} jsonData @param {aria.modules.RequestBeans:RequestObject} requestObject @return {String} Stringified representation of the input data
[ "Serializes", "the", "data", "by", "using", "the", "serializer", "specified", "in", "the", "request", "or", "the", "one", "specified", "in", "the", "application", "environment" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/modules/requestHandler/RequestHandler.js#L135-L148
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (event) { this.$AutoComplete._dom_onclick.call(this, event); var element = event.target; if (element.className === "closeBtn") { this._removeMultiselectValue(element, event); this._textInputField.focus(); } if (element....
javascript
function (event) { this.$AutoComplete._dom_onclick.call(this, event); var element = event.target; if (element.className === "closeBtn") { this._removeMultiselectValue(element, event); this._textInputField.focus(); } if (element....
[ "function", "(", "event", ")", "{", "this", ".", "$AutoComplete", ".", "_dom_onclick", ".", "call", "(", "this", ",", "event", ")", ";", "var", "element", "=", "event", ".", "target", ";", "if", "(", "element", ".", "className", "===", "\"closeBtn\"", ...
Internal method to handle the click event to remove suggestion. This event is used to set focus on input field @param {aria.DomEvent} event Event object @protected
[ "Internal", "method", "to", "handle", "the", "click", "event", "to", "remove", "suggestion", ".", "This", "event", "is", "used", "to", "set", "focus", "on", "input", "field" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L181-L198
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function () { var skinObj = this._skinObj, frame = this._frame, obj = this._textInputField; if (obj) { var frameWidth = frame.innerWidth - skinObj.innerPaddingLeft - skinObj.innerPaddingRight, inputWidth = obj.offsetLeft; obj.style.width = (frameWidth - inputWidth...
javascript
function () { var skinObj = this._skinObj, frame = this._frame, obj = this._textInputField; if (obj) { var frameWidth = frame.innerWidth - skinObj.innerPaddingLeft - skinObj.innerPaddingRight, inputWidth = obj.offsetLeft; obj.style.width = (frameWidth - inputWidth...
[ "function", "(", ")", "{", "var", "skinObj", "=", "this", ".", "_skinObj", ",", "frame", "=", "this", ".", "_frame", ",", "obj", "=", "this", ".", "_textInputField", ";", "if", "(", "obj", ")", "{", "var", "frameWidth", "=", "frame", ".", "innerWidth...
Private method to increase the textInput width on focus @private
[ "Private", "method", "to", "increase", "the", "textInput", "width", "on", "focus" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L215-L222
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function () { this.$AutoComplete.initWidget.call(this); var cfg = this._cfg; if (cfg.value) { var report = this.controller.checkValue(cfg.value); this._reactToControllerReport(report); } }
javascript
function () { this.$AutoComplete.initWidget.call(this); var cfg = this._cfg; if (cfg.value) { var report = this.controller.checkValue(cfg.value); this._reactToControllerReport(report); } }
[ "function", "(", ")", "{", "this", ".", "$AutoComplete", ".", "initWidget", ".", "call", "(", "this", ")", ";", "var", "cfg", "=", "this", ".", "_cfg", ";", "if", "(", "cfg", ".", "value", ")", "{", "var", "report", "=", "this", ".", "controller", ...
Initialization method called by the delegate engine when the DOM is loaded
[ "Initialization", "method", "called", "by", "the", "delegate", "engine", "when", "the", "DOM", "is", "loaded" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L226-L233
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (value) { var cfg = this._cfg; var label = ariaUtilsString.escapeHTML(value.label || value); return '<div class="xMultiAutoComplete_' + cfg.sclass + '_options"><span class="xMultiAutoComplete_Option_Text">' + label + '</span><span clas...
javascript
function (value) { var cfg = this._cfg; var label = ariaUtilsString.escapeHTML(value.label || value); return '<div class="xMultiAutoComplete_' + cfg.sclass + '_options"><span class="xMultiAutoComplete_Option_Text">' + label + '</span><span clas...
[ "function", "(", "value", ")", "{", "var", "cfg", "=", "this", ".", "_cfg", ";", "var", "label", "=", "ariaUtilsString", ".", "escapeHTML", "(", "value", ".", "label", "||", "value", ")", ";", "return", "'<div class=\"xMultiAutoComplete_'", "+", "cfg", "."...
Generate markup for selected suggestion @param {String} report @param {aria.widgets.form.MultiAutoComplete} ref @return {String}
[ "Generate", "markup", "for", "selected", "suggestion" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L269-L275
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (input) { var ellipsisContainer = input.previousSibling, elementoffsetWidth = ellipsisContainer.offsetWidth, frameWidth = this._frame.innerWidth; // 10 is to consider margin and padding if (elementoffsetWidth >= (frameWidth - 10)) { ellipsisContainer.firstChi...
javascript
function (input) { var ellipsisContainer = input.previousSibling, elementoffsetWidth = ellipsisContainer.offsetWidth, frameWidth = this._frame.innerWidth; // 10 is to consider margin and padding if (elementoffsetWidth >= (frameWidth - 10)) { ellipsisContainer.firstChi...
[ "function", "(", "input", ")", "{", "var", "ellipsisContainer", "=", "input", ".", "previousSibling", ",", "elementoffsetWidth", "=", "ellipsisContainer", ".", "offsetWidth", ",", "frameWidth", "=", "this", ".", "_frame", ".", "innerWidth", ";", "// 10 is to consi...
Method to create ellipsis for an added Suggestion @param {HTMLElement} input textInputField @private
[ "Method", "to", "create", "ellipsis", "for", "an", "added", "Suggestion" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L281-L291
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (event) { if (event.type == "dblclick" && this.controller.freeText) { var element = event.target; if (element.className.indexOf("xMultiAutoComplete_Option_Text") != -1) { this._editMultiselectValue(element, event); } } ...
javascript
function (event) { if (event.type == "dblclick" && this.controller.freeText) { var element = event.target; if (element.className.indexOf("xMultiAutoComplete_Option_Text") != -1) { this._editMultiselectValue(element, event); } } ...
[ "function", "(", "event", ")", "{", "if", "(", "event", ".", "type", "==", "\"dblclick\"", "&&", "this", ".", "controller", ".", "freeText", ")", "{", "var", "element", "=", "event", ".", "target", ";", "if", "(", "element", ".", "className", ".", "i...
Handling double click event for editing suggestion @param {aria.utils.Event} event @protected
[ "Handling", "double", "click", "event", "for", "editing", "suggestion" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L297-L304
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (event) { var inputField = this.getTextInputField(); var blurredElement = event.target; if (blurredElement === inputField) { if (inputField.nextSibling != null && inputField.value === "") { this._makeInputFieldLastChild(); ...
javascript
function (event) { var inputField = this.getTextInputField(); var blurredElement = event.target; if (blurredElement === inputField) { if (inputField.nextSibling != null && inputField.value === "") { this._makeInputFieldLastChild(); ...
[ "function", "(", "event", ")", "{", "var", "inputField", "=", "this", ".", "getTextInputField", "(", ")", ";", "var", "blurredElement", "=", "event", ".", "target", ";", "if", "(", "blurredElement", "===", "inputField", ")", "{", "if", "(", "inputField", ...
Handling blur event @param {aria.utils.Event} event @protected
[ "Handling", "blur", "event" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L311-L343
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (event) { // flag that avoids to trigger the user callback when browsing the checkbox list var avoidCallback = (this._hasFocus || this._keepFocus); this.$TextInput._dom_onfocus.call(this, event, true); if (this._cfg.onfocus && !avoidCallback) { th...
javascript
function (event) { // flag that avoids to trigger the user callback when browsing the checkbox list var avoidCallback = (this._hasFocus || this._keepFocus); this.$TextInput._dom_onfocus.call(this, event, true); if (this._cfg.onfocus && !avoidCallback) { th...
[ "function", "(", "event", ")", "{", "// flag that avoids to trigger the user callback when browsing the checkbox list", "var", "avoidCallback", "=", "(", "this", ".", "_hasFocus", "||", "this", ".", "_keepFocus", ")", ";", "this", ".", "$TextInput", ".", "_dom_onfocus",...
Handling focus event @param {aria.utils.Event} event @protected
[ "Handling", "focus", "event" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L350-L357
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function () { var inputField = this._textInputField; var inputFieldParent = inputField.parentNode; if (inputFieldParent.lastChild !== inputField) { inputFieldParent.removeChild(inputField); inputFieldParent.appendChild(inputField); inpu...
javascript
function () { var inputField = this._textInputField; var inputFieldParent = inputField.parentNode; if (inputFieldParent.lastChild !== inputField) { inputFieldParent.removeChild(inputField); inputFieldParent.appendChild(inputField); inpu...
[ "function", "(", ")", "{", "var", "inputField", "=", "this", ".", "_textInputField", ";", "var", "inputFieldParent", "=", "inputField", ".", "parentNode", ";", "if", "(", "inputFieldParent", ".", "lastChild", "!==", "inputField", ")", "{", "inputFieldParent", ...
Make the inputfield as last child of widget @protected
[ "Make", "the", "inputfield", "as", "last", "child", "of", "widget" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L362-L371
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (domElement, event, isParent) { var parent = (!isParent) ? domElement.parentNode : domElement; var domUtil = ariaUtilsDom; var label = parent.firstChild.textContent || parent.firstChild.innerText; domUtil.removeElement(parent); this._removeValue(label...
javascript
function (domElement, event, isParent) { var parent = (!isParent) ? domElement.parentNode : domElement; var domUtil = ariaUtilsDom; var label = parent.firstChild.textContent || parent.firstChild.innerText; domUtil.removeElement(parent); this._removeValue(label...
[ "function", "(", "domElement", ",", "event", ",", "isParent", ")", "{", "var", "parent", "=", "(", "!", "isParent", ")", "?", "domElement", ".", "parentNode", ":", "domElement", ";", "var", "domUtil", "=", "ariaUtilsDom", ";", "var", "label", "=", "paren...
To remove suggestion on click of close @protected @param {aria.utils.HTML} domElement @param {aria.widgets.form.MultiAutoComplete} ref @param {aria.utils.Event} event @param {Boolean} if current element is a parent element itself
[ "To", "remove", "suggestion", "on", "click", "of", "close" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L513-L524
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (domElement, event) { var label; var domUtil = ariaUtilsDom; label = domElement.textContent || domElement.innerText; domUtil.replaceDomElement(domElement.parentNode, this._textInputField); var removedSuggestionInfo = this._removeValue(label); ...
javascript
function (domElement, event) { var label; var domUtil = ariaUtilsDom; label = domElement.textContent || domElement.innerText; domUtil.replaceDomElement(domElement.parentNode, this._textInputField); var removedSuggestionInfo = this._removeValue(label); ...
[ "function", "(", "domElement", ",", "event", ")", "{", "var", "label", ";", "var", "domUtil", "=", "ariaUtilsDom", ";", "label", "=", "domElement", ".", "textContent", "||", "domElement", ".", "innerText", ";", "domUtil", ".", "replaceDomElement", "(", "domE...
To edit suggestion on doubleclick @param {aria.utils.HTML} domElement @param {aria.utils.Event} event @protected
[ "To", "edit", "suggestion", "on", "doubleclick" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L531-L546
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (label) { var report = this.controller.removeValue(label); var removedSuggestion = report.removedSuggestion; var removedSuggestionIndex = report.removedSuggestionIndex; this._reactToControllerReport(report); this._textInputField.style.width = "0px"; ...
javascript
function (label) { var report = this.controller.removeValue(label); var removedSuggestion = report.removedSuggestion; var removedSuggestionIndex = report.removedSuggestionIndex; this._reactToControllerReport(report); this._textInputField.style.width = "0px"; ...
[ "function", "(", "label", ")", "{", "var", "report", "=", "this", ".", "controller", ".", "removeValue", "(", "label", ")", ";", "var", "removedSuggestion", "=", "report", ".", "removedSuggestion", ";", "var", "removedSuggestionIndex", "=", "report", ".", "r...
To remove the label from widget @param {String} label @return {String|Object} the item removed from the controller.selectedValues array. @protected
[ "To", "remove", "the", "label", "from", "widget" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L570-L581
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (suggestionNode, className) { var suggestionNodeClassList = new aria.utils.ClassList(suggestionNode); suggestionNodeClassList.remove(className); suggestionNodeClassList.$dispose(); }
javascript
function (suggestionNode, className) { var suggestionNodeClassList = new aria.utils.ClassList(suggestionNode); suggestionNodeClassList.remove(className); suggestionNodeClassList.$dispose(); }
[ "function", "(", "suggestionNode", ",", "className", ")", "{", "var", "suggestionNodeClassList", "=", "new", "aria", ".", "utils", ".", "ClassList", "(", "suggestionNode", ")", ";", "suggestionNodeClassList", ".", "remove", "(", "className", ")", ";", "suggestio...
To remove class from DomElement @param {HTMLElement} suggestionNode @param {String} className @protected
[ "To", "remove", "class", "from", "DomElement" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L613-L617
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (suggestionNode) { if (suggestionNode == null) { suggestionNode = Aria.$window.document.activeElement; if (suggestionNode.className.indexOf("highlight") === -1) { suggestionNode = this._getSuggestionsContainer().children[this.getHighlightedOptionI...
javascript
function (suggestionNode) { if (suggestionNode == null) { suggestionNode = Aria.$window.document.activeElement; if (suggestionNode.className.indexOf("highlight") === -1) { suggestionNode = this._getSuggestionsContainer().children[this.getHighlightedOptionI...
[ "function", "(", "suggestionNode", ")", "{", "if", "(", "suggestionNode", "==", "null", ")", "{", "suggestionNode", "=", "Aria", ".", "$window", ".", "document", ".", "activeElement", ";", "if", "(", "suggestionNode", ".", "className", ".", "indexOf", "(", ...
Removes the highlighted state from the given option. @param {HTMLElement} suggestionNode The HTML element corresponding to the highlighted option
[ "Removes", "the", "highlighted", "state", "from", "the", "given", "option", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L623-L636
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (suggestionNode, className) { var suggestionNodeClassList = new aria.utils.ClassList(suggestionNode); suggestionNodeClassList.add(className); suggestionNodeClassList.$dispose(); }
javascript
function (suggestionNode, className) { var suggestionNodeClassList = new aria.utils.ClassList(suggestionNode); suggestionNodeClassList.add(className); suggestionNodeClassList.$dispose(); }
[ "function", "(", "suggestionNode", ",", "className", ")", "{", "var", "suggestionNodeClassList", "=", "new", "aria", ".", "utils", ".", "ClassList", "(", "suggestionNode", ")", ";", "suggestionNodeClassList", ".", "add", "(", "className", ")", ";", "suggestionNo...
To add class for DomElement @param {HTMLElement} suggestionNode @param {String} className @protected
[ "To", "add", "class", "for", "DomElement" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L679-L683
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function (index) { var count = this.insertedOptionsCount(); if (index < 1 || index > count) { this.$logError(this.INDEX_OUT_OF_BOUNDS, [count, index]); return; } this.removeHighlight(); var suggestionNode = this._getSuggestio...
javascript
function (index) { var count = this.insertedOptionsCount(); if (index < 1 || index > count) { this.$logError(this.INDEX_OUT_OF_BOUNDS, [count, index]); return; } this.removeHighlight(); var suggestionNode = this._getSuggestio...
[ "function", "(", "index", ")", "{", "var", "count", "=", "this", ".", "insertedOptionsCount", "(", ")", ";", "if", "(", "index", "<", "1", "||", "index", ">", "count", ")", "{", "this", ".", "$logError", "(", "this", ".", "INDEX_OUT_OF_BOUNDS", ",", ...
Exclusively highlights the inserted option located at the given index. That means that any other highlighted option will not be highlighted anymore, and this even if the targeted option is already highlighted. @param {Number} index Index of the option to highlight. 1-based. @see removeHighlight @see addHighlight
[ "Exclusively", "highlights", "the", "inserted", "option", "located", "at", "the", "given", "index", ".", "That", "means", "that", "any", "other", "highlighted", "option", "will", "not", "be", "highlighted", "anymore", "and", "this", "even", "if", "the", "targe...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L692-L707
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function () { var suggestionContainer = this._textInputField.parentNode; var highlightedArray = []; for (var i = 0; i < suggestionContainer.children.length - 1; i++) { var suggestionNode = suggestionContainer.children[i]; var suggestionNodeClassList = ...
javascript
function () { var suggestionContainer = this._textInputField.parentNode; var highlightedArray = []; for (var i = 0; i < suggestionContainer.children.length - 1; i++) { var suggestionNode = suggestionContainer.children[i]; var suggestionNodeClassList = ...
[ "function", "(", ")", "{", "var", "suggestionContainer", "=", "this", ".", "_textInputField", ".", "parentNode", ";", "var", "highlightedArray", "=", "[", "]", ";", "for", "(", "var", "i", "=", "0", ";", "i", "<", "suggestionContainer", ".", "children", ...
Returns an array of indices of suggestions which have highlight class. Indexing starts with 1 @public @return {Array}
[ "Returns", "an", "array", "of", "indices", "of", "suggestions", "which", "have", "highlight", "class", ".", "Indexing", "starts", "with", "1" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L714-L726
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function () { var maxCount = 0, suggestion = this.controller.selectedSuggestions; if (suggestion.length < this.controller.maxOptions) { return this.controller.maxOptions; } else { for (var i = 0, len = suggestion.length; i < len; i++) { ...
javascript
function () { var maxCount = 0, suggestion = this.controller.selectedSuggestions; if (suggestion.length < this.controller.maxOptions) { return this.controller.maxOptions; } else { for (var i = 0, len = suggestion.length; i < len; i++) { ...
[ "function", "(", ")", "{", "var", "maxCount", "=", "0", ",", "suggestion", "=", "this", ".", "controller", ".", "selectedSuggestions", ";", "if", "(", "suggestion", ".", "length", "<", "this", ".", "controller", ".", "maxOptions", ")", "{", "return", "th...
Internal method for calculating the maxOptions allowed for setting it in template @return {Number}
[ "Internal", "method", "for", "calculating", "the", "maxOptions", "allowed", "for", "setting", "it", "in", "template" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L753-L765
train
ariatemplates/ariatemplates
src/aria/widgets/form/MultiAutoComplete.js
function () { var indexes = this.getHighlight(); var rightMostIndex = indexes[indexes.length - 1]; var limit = this.insertedOptionsCount(); var index = rightMostIndex + 1; if (index <= limit) { this.highlightOption(index); } else ...
javascript
function () { var indexes = this.getHighlight(); var rightMostIndex = indexes[indexes.length - 1]; var limit = this.insertedOptionsCount(); var index = rightMostIndex + 1; if (index <= limit) { this.highlightOption(index); } else ...
[ "function", "(", ")", "{", "var", "indexes", "=", "this", ".", "getHighlight", "(", ")", ";", "var", "rightMostIndex", "=", "indexes", "[", "indexes", ".", "length", "-", "1", "]", ";", "var", "limit", "=", "this", ".", "insertedOptionsCount", "(", ")"...
Performs right navigation when the widget is in highlighted mode. What it means is that it highlights the next inserted option if there is one, otherwise it goes back to the text input field at its beginning.
[ "Performs", "right", "navigation", "when", "the", "widget", "is", "in", "highlighted", "mode", ".", "What", "it", "means", "is", "that", "it", "highlights", "the", "next", "inserted", "option", "if", "there", "is", "one", "otherwise", "it", "goes", "back", ...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/MultiAutoComplete.js#L843-L856
train
ariatemplates/ariatemplates
src/aria/utils/Accessibility.js
function (text, options) { // -------------------------------------- input arguments processing var document = Aria.$window.document; if (options == null) { options = {}; } var parent = options.parent; if (parent == null) { ...
javascript
function (text, options) { // -------------------------------------- input arguments processing var document = Aria.$window.document; if (options == null) { options = {}; } var parent = options.parent; if (parent == null) { ...
[ "function", "(", "text", ",", "options", ")", "{", "// -------------------------------------- input arguments processing", "var", "document", "=", "Aria", ".", "$window", ".", "document", ";", "if", "(", "options", "==", "null", ")", "{", "options", "=", "{", "}...
Forces the screen reader to read the given piece of text. <p>The options object can contain the following properties: </p> <ul> <li><em>parent</em>: the DOM element in which to put the temporarily generated element</li> <li><em>alert</em>: whether or not to treat the generated element as an alert (role = "alert" inste...
[ "Forces", "the", "screen", "reader", "to", "read", "the", "given", "piece", "of", "text", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Accessibility.js#L46-L87
train
ariatemplates/ariatemplates
src/aria/storage/LocalStorage.js
fallback
function fallback (self, instance) { self._get = instance._get; self._set = instance._set; self._remove = instance._remove; self._clear = instance._clear; self.storage = ariaStorageUserData._STORAGE; self.__keys = ariaStorageUserData._ALL_KEYS; }
javascript
function fallback (self, instance) { self._get = instance._get; self._set = instance._set; self._remove = instance._remove; self._clear = instance._clear; self.storage = ariaStorageUserData._STORAGE; self.__keys = ariaStorageUserData._ALL_KEYS; }
[ "function", "fallback", "(", "self", ",", "instance", ")", "{", "self", ".", "_get", "=", "instance", ".", "_get", ";", "self", ".", "_set", "=", "instance", ".", "_set", ";", "self", ".", "_remove", "=", "instance", ".", "_remove", ";", "self", ".",...
Modify a class instance to use methods from an instance of aria.storage.UserData used as fallback. This should happen in IE7 since it doesn't support localStorage but UserData that provides the same functionalities
[ "Modify", "a", "class", "instance", "to", "use", "methods", "from", "an", "instance", "of", "aria", ".", "storage", ".", "UserData", "used", "as", "fallback", ".", "This", "should", "happen", "in", "IE7", "since", "it", "doesn", "t", "support", "localStora...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/storage/LocalStorage.js#L26-L34
train
ariatemplates/ariatemplates
src/aria/storage/LocalStorage.js
function (options) { var isIE7 = ariaCoreBrowser.isIE7; // Throw an error only in IE7 this.$HTML5Storage.constructor.call(this, options, "localStorage", !isIE7); if (!this.storage && isIE7) { var instance = new ariaStorageUserData(options); ...
javascript
function (options) { var isIE7 = ariaCoreBrowser.isIE7; // Throw an error only in IE7 this.$HTML5Storage.constructor.call(this, options, "localStorage", !isIE7); if (!this.storage && isIE7) { var instance = new ariaStorageUserData(options); ...
[ "function", "(", "options", ")", "{", "var", "isIE7", "=", "ariaCoreBrowser", ".", "isIE7", ";", "// Throw an error only in IE7", "this", ".", "$HTML5Storage", ".", "constructor", ".", "call", "(", "this", ",", "options", ",", "\"localStorage\"", ",", "!", "is...
Create an instance of LocalStorage. Try ot use userData if missing @param {aria.storage.Beans:ConstructorArgs} options Constructor options
[ "Create", "an", "instance", "of", "LocalStorage", ".", "Try", "ot", "use", "userData", "if", "missing" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/storage/LocalStorage.js#L54-L71
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (property, recursive) { var metaName = recursive ? jsonUtils.META_FOR_RECLISTENERS : jsonUtils.META_FOR_LISTENERS; if (property != null) {// the comparison with null is important, as 0 or "" must be considered as valid // property names metaName += "_" + property; ...
javascript
function (property, recursive) { var metaName = recursive ? jsonUtils.META_FOR_RECLISTENERS : jsonUtils.META_FOR_LISTENERS; if (property != null) {// the comparison with null is important, as 0 or "" must be considered as valid // property names metaName += "_" + property; ...
[ "function", "(", "property", ",", "recursive", ")", "{", "var", "metaName", "=", "recursive", "?", "jsonUtils", ".", "META_FOR_RECLISTENERS", ":", "jsonUtils", ".", "META_FOR_LISTENERS", ";", "if", "(", "property", "!=", "null", ")", "{", "// the comparison with...
Returns the container for listener for an optional target property. Returns a different container for recursive listeners. @private @param {String} property can be null @param {Boolean} recursive @return {String} the property name of the container
[ "Returns", "the", "container", "for", "listener", "for", "an", "optional", "target", "property", ".", "Returns", "a", "different", "container", "for", "recursive", "listeners", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L34-L41
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (child, parent, oldProperty, newProperty) { var childParents = child ? child[parProp] : null; if (childParents) { for (var index = 0, parentDescription; parentDescription = childParents[index]; index++) { if (parentDescription.parent == parent && parentDescription.pr...
javascript
function (child, parent, oldProperty, newProperty) { var childParents = child ? child[parProp] : null; if (childParents) { for (var index = 0, parentDescription; parentDescription = childParents[index]; index++) { if (parentDescription.parent == parent && parentDescription.pr...
[ "function", "(", "child", ",", "parent", ",", "oldProperty", ",", "newProperty", ")", "{", "var", "childParents", "=", "child", "?", "child", "[", "parProp", "]", ":", "null", ";", "if", "(", "childParents", ")", "{", "for", "(", "var", "index", "=", ...
Update back-references when the property name under which a parent was referencing a child changed. @param {Object} child child. This method does nothing if the child is null or does not have any back references) @param {Object} parent @param {String} oldProperty @param {String} newProperty @private
[ "Update", "back", "-", "references", "when", "the", "property", "name", "under", "which", "a", "parent", "was", "referencing", "a", "child", "changed", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L89-L100
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (propertyName) { if (!ariaUtilsType.isString(propertyName)) { return true; } // which property names are included for back references return (propertyName != jsonUtils.OBJECT_PARENT_PROPERTY && propertyName.substr(0, jsonUtils.META_FOR_LISTENERS.length) ...
javascript
function (propertyName) { if (!ariaUtilsType.isString(propertyName)) { return true; } // which property names are included for back references return (propertyName != jsonUtils.OBJECT_PARENT_PROPERTY && propertyName.substr(0, jsonUtils.META_FOR_LISTENERS.length) ...
[ "function", "(", "propertyName", ")", "{", "if", "(", "!", "ariaUtilsType", ".", "isString", "(", "propertyName", ")", ")", "{", "return", "true", ";", "}", "// which property names are included for back references", "return", "(", "propertyName", "!=", "jsonUtils",...
Returns whether back references recursive methods will go down through links with that name. @param {String} propertyName Property name. @return {Boolean} @private
[ "Returns", "whether", "back", "references", "recursive", "methods", "will", "go", "down", "through", "links", "with", "that", "name", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L108-L117
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (node) { var recMarker = jsonUtils.TEMP_REC_MARKER; if (node[recMarker]) { node[recMarker] = false; delete node[recMarker]; var parents = node[jsonUtils.OBJECT_PARENT_PROPERTY]; if (parents) { for (var index = 0, l = parents.length...
javascript
function (node) { var recMarker = jsonUtils.TEMP_REC_MARKER; if (node[recMarker]) { node[recMarker] = false; delete node[recMarker]; var parents = node[jsonUtils.OBJECT_PARENT_PROPERTY]; if (parents) { for (var index = 0, l = parents.length...
[ "function", "(", "node", ")", "{", "var", "recMarker", "=", "jsonUtils", ".", "TEMP_REC_MARKER", ";", "if", "(", "node", "[", "recMarker", "]", ")", "{", "node", "[", "recMarker", "]", "=", "false", ";", "delete", "node", "[", "recMarker", "]", ";", ...
Clean temporary markers pushed in the structure by exploring parents @private @param {Object} node to start with
[ "Clean", "temporary", "markers", "pushed", "in", "the", "structure", "by", "exploring", "parents" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L152-L164
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (newListeners, existingListeners) { if (newListeners != null) { if (!existingListeners) { existingListeners = []; } existingListeners.push.apply(existingListeners, newListeners); } return existingListeners; }
javascript
function (newListeners, existingListeners) { if (newListeners != null) { if (!existingListeners) { existingListeners = []; } existingListeners.push.apply(existingListeners, newListeners); } return existingListeners; }
[ "function", "(", "newListeners", ",", "existingListeners", ")", "{", "if", "(", "newListeners", "!=", "null", ")", "{", "if", "(", "!", "existingListeners", ")", "{", "existingListeners", "=", "[", "]", ";", "}", "existingListeners", ".", "push", ".", "app...
Append the given new array of listeners to the existing array of listeners. It is used when retrieving the array of listeners to call. The resulting array of listeners can be modified without changing newListeners. If both element are null, will return null @param {Array} newListeners listeners to add, can be null @par...
[ "Append", "the", "given", "new", "array", "of", "listeners", "to", "the", "existing", "array", "of", "listeners", ".", "It", "is", "used", "when", "retrieving", "the", "array", "of", "listeners", "to", "call", ".", "The", "resulting", "array", "of", "liste...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L175-L183
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (node, property, recursive, listeners) { if (property != null) { // add property specific listeners listeners = __retrievePropertySpecificListeners(node, property, recursive, listeners); } // recursive check if (node[jsonUtils.TEMP_REC_MARKER]) { ...
javascript
function (node, property, recursive, listeners) { if (property != null) { // add property specific listeners listeners = __retrievePropertySpecificListeners(node, property, recursive, listeners); } // recursive check if (node[jsonUtils.TEMP_REC_MARKER]) { ...
[ "function", "(", "node", ",", "property", ",", "recursive", ",", "listeners", ")", "{", "if", "(", "property", "!=", "null", ")", "{", "// add property specific listeners", "listeners", "=", "__retrievePropertySpecificListeners", "(", "node", ",", "property", ",",...
Retrieve listeners in node and its parents @private @param {Object} node @param {String} property (may be null, for changes which are not related to a specific property, e.g. splice on an array) @param {Boolean} retrieve recursive listeners only, default is false @param {Array} listeners
[ "Retrieve", "listeners", "in", "node", "and", "its", "parents" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L194-L224
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (listeners, change, listenerToExclude) { for (var idx = 0, length = listeners.length; idx < length; idx++) { var lsn = listeners[idx]; if (lsn == listenerToExclude || !lsn) { continue; } var fn = lsn.fn; if (fn) { ...
javascript
function (listeners, change, listenerToExclude) { for (var idx = 0, length = listeners.length; idx < length; idx++) { var lsn = listeners[idx]; if (lsn == listenerToExclude || !lsn) { continue; } var fn = lsn.fn; if (fn) { ...
[ "function", "(", "listeners", ",", "change", ",", "listenerToExclude", ")", "{", "for", "(", "var", "idx", "=", "0", ",", "length", "=", "listeners", ".", "length", ";", "idx", "<", "length", ";", "idx", "++", ")", "{", "var", "lsn", "=", "listeners"...
Call the given listeners with the given parameter. @param {Array} listeners array of listeners to call (can be retrieved with __retrieveListeners) @param {Object} change object describing the change @param {Object} listenerToExclude (optional) potential listener callback belonging to the object that raised the change a...
[ "Call", "the", "given", "listeners", "with", "the", "given", "parameter", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L251-L264
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (container, property, change, listenerToExclude) { // retrieve listeners for this node and its parents // arguments given to the callback var listeners = __retrieveListeners(container, property); if (listeners) { change.dataHolder = container; change.data...
javascript
function (container, property, change, listenerToExclude) { // retrieve listeners for this node and its parents // arguments given to the callback var listeners = __retrieveListeners(container, property); if (listeners) { change.dataHolder = container; change.data...
[ "function", "(", "container", ",", "property", ",", "change", ",", "listenerToExclude", ")", "{", "// retrieve listeners for this node and its parents", "// arguments given to the callback", "var", "listeners", "=", "__retrieveListeners", "(", "container", ",", "property", ...
Notifies JSON listeners that a value on the object they listen to has changed @private @param {Object} container reference to the data holder object - e.g. data.search.preferedCity @param {String} property name of the property - e.g. '$value' @param {Object} change object describing the change made to the property (con...
[ "Notifies", "JSON", "listeners", "that", "a", "value", "on", "the", "object", "they", "listen", "to", "has", "changed" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L276-L285
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (container) { if (container[parProp]) { // back references already present, nothing to do return; } // back references are not present yet container[parProp] = []; for (var childName in conta...
javascript
function (container) { if (container[parProp]) { // back references already present, nothing to do return; } // back references are not present yet container[parProp] = []; for (var childName in conta...
[ "function", "(", "container", ")", "{", "if", "(", "container", "[", "parProp", "]", ")", "{", "// back references already present, nothing to do", "return", ";", "}", "// back references are not present yet", "container", "[", "parProp", "]", "=", "[", "]", ";", ...
This method checks that back references up to container are present in the data model. If not, they are added recursively. @param {Object} container Must already be checked as a container according to __isValidContainer. @private
[ "This", "method", "checks", "that", "back", "references", "up", "to", "container", "are", "present", "in", "the", "data", "model", ".", "If", "not", "they", "are", "added", "recursively", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L419-L445
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (item, options, serializerInstance) { if (serializerInstance) { if ("serialize" in serializerInstance) { return serializerInstance.serialize(item, options); } else { this.$logError(this.INVALID_JSON_SERIALIZ...
javascript
function (item, options, serializerInstance) { if (serializerInstance) { if ("serialize" in serializerInstance) { return serializerInstance.serialize(item, options); } else { this.$logError(this.INVALID_JSON_SERIALIZ...
[ "function", "(", "item", ",", "options", ",", "serializerInstance", ")", "{", "if", "(", "serializerInstance", ")", "{", "if", "(", "\"serialize\"", "in", "serializerInstance", ")", "{", "return", "serializerInstance", ".", "serialize", "(", "item", ",", "opti...
Converts an object to a JSON string @param {Object|Array|String|Number|Boolean|Date|RegExp|Function} item item to serialize @param {Object} options options for the serialize method of the serializer - optional @param {Object} serializerInstance instance of a serializer - optional. If not provided, an instance of the de...
[ "Converts", "an", "object", "to", "a", "JSON", "string" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L456-L467
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (str, ctxt, errMsg) { var JSON = Aria.$global.JSON; if (ctxt && ctxt.$classpath) { ctxt = ctxt.$classpath; } if (typeof JSON !== "undefined" && typeof JSON.parse === "function") { ...
javascript
function (str, ctxt, errMsg) { var JSON = Aria.$global.JSON; if (ctxt && ctxt.$classpath) { ctxt = ctxt.$classpath; } if (typeof JSON !== "undefined" && typeof JSON.parse === "function") { ...
[ "function", "(", "str", ",", "ctxt", ",", "errMsg", ")", "{", "var", "JSON", "=", "Aria", ".", "$global", ".", "JSON", ";", "if", "(", "ctxt", "&&", "ctxt", ".", "$classpath", ")", "{", "ctxt", "=", "ctxt", ".", "$classpath", ";", "}", "if", "(",...
Load a JSON string and return the corresponding object @param {String} str the JSON string @param {Object} ctxt caller object - optional - used to retrieve the caller classpath in case of error @param {String} errMsg the error message to use in case of problem - optional - default: aria.utils.Json.INVALID_JSON_CONTENT ...
[ "Load", "a", "JSON", "string", "and", "return", "the", "corresponding", "object" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L839-L857
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (str, ctxt, errMsg) { var res = null; try { str = ('' + str).replace(/^\s/, ''); // remove first spaces res = Aria["eval"]('return (' + str + ');'); } catch (ex) { if (!errMsg) { ...
javascript
function (str, ctxt, errMsg) { var res = null; try { str = ('' + str).replace(/^\s/, ''); // remove first spaces res = Aria["eval"]('return (' + str + ');'); } catch (ex) { if (!errMsg) { ...
[ "function", "(", "str", ",", "ctxt", ",", "errMsg", ")", "{", "var", "res", "=", "null", ";", "try", "{", "str", "=", "(", "''", "+", "str", ")", ".", "replace", "(", "/", "^\\s", "/", ",", "''", ")", ";", "// remove first spaces", "res", "=", ...
Load a JSON string and return the corresponding object using eval @param {String} str the JSON string @param {Object} ctxt caller object - optional - used to retrieve the caller classpath in case of error @param {String} errMsg the error message to use in case of problem - optional - default: aria.utils.Json.INVALID_JS...
[ "Load", "a", "JSON", "string", "and", "return", "the", "corresponding", "object", "using", "eval" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L868-L882
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (big, small) { var isBigArray = typeUtils.isArray(big), isBigObject = typeUtils.isObject(big), isSmallArray = typeUtils.isArray(small), isSmallObject = typeUtils.isObject(small); if (isBigArray && isSmallArray) { for (var i = 0, l = small.length; i < l; i++)...
javascript
function (big, small) { var isBigArray = typeUtils.isArray(big), isBigObject = typeUtils.isObject(big), isSmallArray = typeUtils.isArray(small), isSmallObject = typeUtils.isObject(small); if (isBigArray && isSmallArray) { for (var i = 0, l = small.length; i < l; i++)...
[ "function", "(", "big", ",", "small", ")", "{", "var", "isBigArray", "=", "typeUtils", ".", "isArray", "(", "big", ")", ",", "isBigObject", "=", "typeUtils", ".", "isObject", "(", "big", ")", ",", "isSmallArray", "=", "typeUtils", ".", "isArray", "(", ...
Checks whether a JSON object is fully contained in another. @param {Object} big the container JSON structure @param {Object} small the contained JSON structure @return {Boolean} true if <i>small</i> is contained in <i>big</i>
[ "Checks", "whether", "a", "JSON", "object", "is", "fully", "contained", "in", "another", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L969-L1000
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (array, item, index) { if (index == null) { index = array.length; } this.splice(array, index, 0, item); }
javascript
function (array, item, index) { if (index == null) { index = array.length; } this.splice(array, index, 0, item); }
[ "function", "(", "array", ",", "item", ",", "index", ")", "{", "if", "(", "index", "==", "null", ")", "{", "index", "=", "array", ".", "length", ";", "}", "this", ".", "splice", "(", "array", ",", "index", ",", "0", ",", "item", ")", ";", "}" ]
Add an item to an array, optionally giving the index, and notify listeners. If the index is not provided, the item is added at the end of the array. @param {Array} array array to be modified @param {Object} item item to be added @param {Number} index index where to add the item
[ "Add", "an", "item", "to", "an", "array", "optionally", "giving", "the", "index", "and", "notify", "listeners", ".", "If", "the", "index", "is", "not", "provided", "the", "item", "is", "added", "at", "the", "end", "of", "the", "array", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L1009-L1014
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (container) { var raw = ariaUtilsObject.keys(container); return ariaUtilsArray.filter(raw, function (key) { return !aria.utils.Json.isMetadata(key); }); }
javascript
function (container) { var raw = ariaUtilsObject.keys(container); return ariaUtilsArray.filter(raw, function (key) { return !aria.utils.Json.isMetadata(key); }); }
[ "function", "(", "container", ")", "{", "var", "raw", "=", "ariaUtilsObject", ".", "keys", "(", "container", ")", ";", "return", "ariaUtilsArray", ".", "filter", "(", "raw", ",", "function", "(", "key", ")", "{", "return", "!", "aria", ".", "utils", "....
Retrieves all non metadata keys of a JSON object @param {Object} container reference to the data holder object @return {Array} an array containing all non metadata keys of the object @see aria.utils.Object.keys
[ "Retrieves", "all", "non", "metadata", "keys", "of", "a", "JSON", "object" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L1041-L1046
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function (object) { if (!object || !__isValidContainer(object)) { return object; } var clone = typeUtils.isArray(object) ? [] : {}; for (var key in object) { if (!this.isMetadata(key)) { clone...
javascript
function (object) { if (!object || !__isValidContainer(object)) { return object; } var clone = typeUtils.isArray(object) ? [] : {}; for (var key in object) { if (!this.isMetadata(key)) { clone...
[ "function", "(", "object", ")", "{", "if", "(", "!", "object", "||", "!", "__isValidContainer", "(", "object", ")", ")", "{", "return", "object", ";", "}", "var", "clone", "=", "typeUtils", ".", "isArray", "(", "object", ")", "?", "[", "]", ":", "{...
Creates a copy of the object without metadata inside @param {Object} object the object to copy @return {Object}
[ "Creates", "a", "copy", "of", "the", "object", "without", "metadata", "inside" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L1065-L1076
train
ariatemplates/ariatemplates
src/aria/utils/Json.js
function( left, right) { var isLeftArray = typeUtils.isArray(left), isLeftObject = typeUtils.isObject(left), isRightArray = typeUtils.isArray(right), isRightObject = typeUtils.isObject(right), leftDiff = null, ...
javascript
function( left, right) { var isLeftArray = typeUtils.isArray(left), isLeftObject = typeUtils.isObject(left), isRightArray = typeUtils.isArray(right), isRightObject = typeUtils.isObject(right), leftDiff = null, ...
[ "function", "(", "left", ",", "right", ")", "{", "var", "isLeftArray", "=", "typeUtils", ".", "isArray", "(", "left", ")", ",", "isLeftObject", "=", "typeUtils", ".", "isObject", "(", "left", ")", ",", "isRightArray", "=", "typeUtils", ".", "isArray", "(...
Will determine whether two objects are equal and if not will provide the differences between the two. A return object contains three properties, a boolean equals, an object left and an object right. If the equals is true, the left and right objects will be null. If not, it will provide all the properties that are in th...
[ "Will", "determine", "whether", "two", "objects", "are", "equal", "and", "if", "not", "will", "provide", "the", "differences", "between", "the", "two", ".", "A", "return", "object", "contains", "three", "properties", "a", "boolean", "equals", "an", "object", ...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Json.js#L1091-L1162
train
ariatemplates/ariatemplates
src/aria/widgets/Template.js
function () { var tplDiv = this._subTplDiv; // may be null at this time if (tplDiv) { tplDiv.className = "xTplContent"; // remove the loading indicator ariaUtilsDom.replaceHTML(tplDiv, "#ERROR WHILE LOADING TEMPLATE#"); } this._deleteTplcfg...
javascript
function () { var tplDiv = this._subTplDiv; // may be null at this time if (tplDiv) { tplDiv.className = "xTplContent"; // remove the loading indicator ariaUtilsDom.replaceHTML(tplDiv, "#ERROR WHILE LOADING TEMPLATE#"); } this._deleteTplcfg...
[ "function", "(", ")", "{", "var", "tplDiv", "=", "this", ".", "_subTplDiv", ";", "// may be null at this time", "if", "(", "tplDiv", ")", "{", "tplDiv", ".", "className", "=", "\"xTplContent\"", ";", "// remove the loading indicator", "ariaUtilsDom", ".", "replace...
Display an error message inside the template div. This might happen because the template context wasn't able to initialize the template. @protected
[ "Display", "an", "error", "message", "inside", "the", "template", "div", ".", "This", "might", "happen", "because", "the", "template", "context", "wasn", "t", "able", "to", "initialize", "the", "template", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/Template.js#L154-L164
train
ariatemplates/ariatemplates
src/aria/widgets/Template.js
function () { var tplcfg = this._tplcfg; var cfg = this._cfg; if (this._needCreatingModuleCtrl) { if (!ariaCoreJsonValidator.normalize({ json : cfg.moduleCtrl, beanName : "aria.templates.CfgBeans.InitModuleCtrl" ...
javascript
function () { var tplcfg = this._tplcfg; var cfg = this._cfg; if (this._needCreatingModuleCtrl) { if (!ariaCoreJsonValidator.normalize({ json : cfg.moduleCtrl, beanName : "aria.templates.CfgBeans.InitModuleCtrl" ...
[ "function", "(", ")", "{", "var", "tplcfg", "=", "this", ".", "_tplcfg", ";", "var", "cfg", "=", "this", ".", "_cfg", ";", "if", "(", "this", ".", "_needCreatingModuleCtrl", ")", "{", "if", "(", "!", "ariaCoreJsonValidator", ".", "normalize", "(", "{",...
Verify that the configuration is valid. This will set this._cfgOk to either true or false @protected
[ "Verify", "that", "the", "configuration", "is", "valid", ".", "This", "will", "set", "this", ".", "_cfgOk", "to", "either", "true", "or", "false" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/Template.js#L170-L193
train
ariatemplates/ariatemplates
src/aria/templates/SectionWrapper.js
function (domElt, sectionObject) { if (domElt) { while (domElt.nodeType != 1) { domElt = domElt.parentNode; } } this.$DomElementWrapper.constructor.call(this, domElt, sectionObject.tplCtxt); /** * Dynamically insert an adjacent section, w...
javascript
function (domElt, sectionObject) { if (domElt) { while (domElt.nodeType != 1) { domElt = domElt.parentNode; } } this.$DomElementWrapper.constructor.call(this, domElt, sectionObject.tplCtxt); /** * Dynamically insert an adjacent section, w...
[ "function", "(", "domElt", ",", "sectionObject", ")", "{", "if", "(", "domElt", ")", "{", "while", "(", "domElt", ".", "nodeType", "!=", "1", ")", "{", "domElt", "=", "domElt", ".", "parentNode", ";", "}", "}", "this", ".", "$DomElementWrapper", ".", ...
Create a Wrapper object to allow safe changes in the DOM without giving direct access to the DOM. Note that a closure is used to prevent access to the domElt object from the template. @param {HTMLElement} domElt DOM element which is wrapped @param {aria.templates.Section} sectionObject Section object which is wrapped
[ "Create", "a", "Wrapper", "object", "to", "allow", "safe", "changes", "in", "the", "DOM", "without", "giving", "direct", "access", "to", "the", "DOM", ".", "Note", "that", "a", "closure", "is", "used", "to", "prevent", "access", "to", "the", "domElt", "o...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/SectionWrapper.js#L33-L98
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (tplCtxt) { this.$assert(133, tplCtxt.$TemplateCtxt); var toLoad = tplCtxt.getCSSDependencies(); var tplClasspath = tplCtxt.tplClasspath; var loadResult = this.loadClassPathDependencies(tplClasspath, toLoad, { isTemplate : true }); ...
javascript
function (tplCtxt) { this.$assert(133, tplCtxt.$TemplateCtxt); var toLoad = tplCtxt.getCSSDependencies(); var tplClasspath = tplCtxt.tplClasspath; var loadResult = this.loadClassPathDependencies(tplClasspath, toLoad, { isTemplate : true }); ...
[ "function", "(", "tplCtxt", ")", "{", "this", ".", "$assert", "(", "133", ",", "tplCtxt", ".", "$TemplateCtxt", ")", ";", "var", "toLoad", "=", "tplCtxt", ".", "getCSSDependencies", "(", ")", ";", "var", "tplClasspath", "=", "tplCtxt", ".", "tplClasspath",...
Load the CSS dependencies of a template, it will prefix the CSS selectors and generate a style tag in the head. @param {aria.templates.TemplateCtxt} tplCtxt template context @return {Array} Array of class prefixes
[ "Load", "the", "CSS", "dependencies", "of", "a", "template", "it", "will", "prefix", "the", "CSS", "selectors", "and", "generate", "a", "style", "tag", "in", "the", "head", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L236-L258
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (classpath, dependencies) { if (this.__cssDependencies[classpath]) { dependencies = this.__cssDependencies[classpath]; } else { // Look at in the parents for the css inheritance. var tpl = Aria.getClassRef(classpath); var ...
javascript
function (classpath, dependencies) { if (this.__cssDependencies[classpath]) { dependencies = this.__cssDependencies[classpath]; } else { // Look at in the parents for the css inheritance. var tpl = Aria.getClassRef(classpath); var ...
[ "function", "(", "classpath", ",", "dependencies", ")", "{", "if", "(", "this", ".", "__cssDependencies", "[", "classpath", "]", ")", "{", "dependencies", "=", "this", ".", "__cssDependencies", "[", "classpath", "]", ";", "}", "else", "{", "// Look at in the...
Load the CSS dependencies of a Widget. It won't prefix the CSS selectors @param {String} classpath Classpath of the widget @param {Array} dependencies Array of CSS template classpaths to be loaded
[ "Load", "the", "CSS", "dependencies", "of", "a", "Widget", ".", "It", "won", "t", "prefix", "the", "CSS", "selectors" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L265-L301
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (tplClasspath, cssClasspath, contextArgs) { this.$assert(195, tplClasspath && cssClasspath); // Do something only if this CSS class is not yet loaded var usage = this.__cssUsage[cssClasspath]; if (usage && usage.length) { usage.push(tplClasspath)...
javascript
function (tplClasspath, cssClasspath, contextArgs) { this.$assert(195, tplClasspath && cssClasspath); // Do something only if this CSS class is not yet loaded var usage = this.__cssUsage[cssClasspath]; if (usage && usage.length) { usage.push(tplClasspath)...
[ "function", "(", "tplClasspath", ",", "cssClasspath", ",", "contextArgs", ")", "{", "this", ".", "$assert", "(", "195", ",", "tplClasspath", "&&", "cssClasspath", ")", ";", "// Do something only if this CSS class is not yet loaded", "var", "usage", "=", "this", ".",...
Mark a CSS template dependency as "to be loaded". If it's already loaded this will simply register a new dependency, otherwise it will buffer the changes that should be applied to the style tag or the pool of styles @param {String} tplClasspath Template classpath @param {String} cssClasspath CSS template classpath @ret...
[ "Mark", "a", "CSS", "template", "dependency", "as", "to", "be", "loaded", ".", "If", "it", "s", "already", "loaded", "this", "will", "simply", "register", "a", "new", "dependency", "otherwise", "it", "will", "buffer", "the", "changes", "that", "should", "b...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L361-L404
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (cssCtxt) { var classpath = cssCtxt.tplClasspath; var associatedTo = this.__styleTagAssociation[classpath]; if (associatedTo) { return associatedTo; } if (cssCtxt.isTemplate()) { associatedTo = "tpl"; } el...
javascript
function (cssCtxt) { var classpath = cssCtxt.tplClasspath; var associatedTo = this.__styleTagAssociation[classpath]; if (associatedTo) { return associatedTo; } if (cssCtxt.isTemplate()) { associatedTo = "tpl"; } el...
[ "function", "(", "cssCtxt", ")", "{", "var", "classpath", "=", "cssCtxt", ".", "tplClasspath", ";", "var", "associatedTo", "=", "this", ".", "__styleTagAssociation", "[", "classpath", "]", ";", "if", "(", "associatedTo", ")", "{", "return", "associatedTo", "...
Get the style tag id for a CSS classpath @param {aria.templates.CSSCtxt} cssCtxt CSS Template Context
[ "Get", "the", "style", "tag", "id", "for", "a", "CSS", "classpath" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L410-L428
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (classpath, dependencies) { if (this.__cssDependencies[classpath]) { dependencies = this.__cssDependencies[classpath]; } this.unloadClassPathDependencies(classpath, dependencies); }
javascript
function (classpath, dependencies) { if (this.__cssDependencies[classpath]) { dependencies = this.__cssDependencies[classpath]; } this.unloadClassPathDependencies(classpath, dependencies); }
[ "function", "(", "classpath", ",", "dependencies", ")", "{", "if", "(", "this", ".", "__cssDependencies", "[", "classpath", "]", ")", "{", "dependencies", "=", "this", ".", "__cssDependencies", "[", "classpath", "]", ";", "}", "this", ".", "unloadClassPathDe...
Unload the CSS dependencies of a widget. This method will unload any dependency on the parent widgets. @param {String} classpath Classpath of the widget @param {Array} dependencies Array of CSS template classpaths to be loaded
[ "Unload", "the", "CSS", "dependencies", "of", "a", "widget", ".", "This", "method", "will", "unload", "any", "dependency", "on", "the", "parent", "widgets", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L435-L441
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (classpath, dependencies) { if (!dependencies) { return; } for (var i = 0, len = dependencies.length; i < len; i += 1) { var cssClasspath = Aria.getClasspath(dependencies[i]); this.__unload(classpath, cssClasspath); ...
javascript
function (classpath, dependencies) { if (!dependencies) { return; } for (var i = 0, len = dependencies.length; i < len; i += 1) { var cssClasspath = Aria.getClasspath(dependencies[i]); this.__unload(classpath, cssClasspath); ...
[ "function", "(", "classpath", ",", "dependencies", ")", "{", "if", "(", "!", "dependencies", ")", "{", "return", ";", "}", "for", "(", "var", "i", "=", "0", ",", "len", "=", "dependencies", ".", "length", ";", "i", "<", "len", ";", "i", "+=", "1"...
Unload the CSS dependencies of any classpath. This method is not observable through events. This function does not trigger a DOM update. CSS style elements are only removed if not needed during the next CSS insertion. @param {String} classpath Classpath on which the CSS templates depends on @param {Array} dependencies ...
[ "Unload", "the", "CSS", "dependencies", "of", "any", "classpath", ".", "This", "method", "is", "not", "observable", "through", "events", ".", "This", "function", "does", "not", "trigger", "a", "DOM", "update", ".", "CSS", "style", "elements", "are", "only", ...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L450-L459
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (tplCtxt) { this.$assert(169, tplCtxt.$TemplateCtxt); var unload = tplCtxt.getCSSDependencies(); var tplClasspath = tplCtxt.tplClasspath; this.unloadClassPathDependencies(tplClasspath, unload); this.$raiseEvent({ name : "dependencie...
javascript
function (tplCtxt) { this.$assert(169, tplCtxt.$TemplateCtxt); var unload = tplCtxt.getCSSDependencies(); var tplClasspath = tplCtxt.tplClasspath; this.unloadClassPathDependencies(tplClasspath, unload); this.$raiseEvent({ name : "dependencie...
[ "function", "(", "tplCtxt", ")", "{", "this", ".", "$assert", "(", "169", ",", "tplCtxt", ".", "$TemplateCtxt", ")", ";", "var", "unload", "=", "tplCtxt", ".", "getCSSDependencies", "(", ")", ";", "var", "tplClasspath", "=", "tplCtxt", ".", "tplClasspath",...
Unload all the CSS dependencies of a template. This function does not trigger a DOM update. CSS style elements are only removed if not needed during the next CSS insertion. @param {aria.templates.TemplateCtxt} tplCtxt template context
[ "Unload", "all", "the", "CSS", "dependencies", "of", "a", "template", ".", "This", "function", "does", "not", "trigger", "a", "DOM", "update", ".", "CSS", "style", "elements", "are", "only", "removed", "if", "not", "needed", "during", "the", "next", "CSS",...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L466-L478
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (cssClasspath) { var prefixClass = this.__prefixes[cssClasspath]; if (!prefixClass) { prefixClass = this.__PREFIX + this.__NEXT_PREFIX_INDEX; this.__NEXT_PREFIX_INDEX += 1; this.__prefixes[cssClasspath] = prefixClass; } ...
javascript
function (cssClasspath) { var prefixClass = this.__prefixes[cssClasspath]; if (!prefixClass) { prefixClass = this.__PREFIX + this.__NEXT_PREFIX_INDEX; this.__NEXT_PREFIX_INDEX += 1; this.__prefixes[cssClasspath] = prefixClass; } ...
[ "function", "(", "cssClasspath", ")", "{", "var", "prefixClass", "=", "this", ".", "__prefixes", "[", "cssClasspath", "]", ";", "if", "(", "!", "prefixClass", ")", "{", "prefixClass", "=", "this", ".", "__PREFIX", "+", "this", ".", "__NEXT_PREFIX_INDEX", "...
Get the prefix for a CSS template. @param {String} cssClasspath CSS template classpath @return {String) class used as a prefix @private
[ "Get", "the", "prefix", "for", "a", "CSS", "template", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L486-L496
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (tplClasspath, cssClasspath) { this.$assert(230, tplClasspath && cssClasspath); var removeUtil = ariaUtilsArray.remove; // There should be someone using this css var usage = this.__cssUsage[cssClasspath]; if (usage && usage.length) { ...
javascript
function (tplClasspath, cssClasspath) { this.$assert(230, tplClasspath && cssClasspath); var removeUtil = ariaUtilsArray.remove; // There should be someone using this css var usage = this.__cssUsage[cssClasspath]; if (usage && usage.length) { ...
[ "function", "(", "tplClasspath", ",", "cssClasspath", ")", "{", "this", ".", "$assert", "(", "230", ",", "tplClasspath", "&&", "cssClasspath", ")", ";", "var", "removeUtil", "=", "ariaUtilsArray", ".", "remove", ";", "// There should be someone using this css", "v...
Update the private properties to mark a CSS template as unloaded. It won't update the list of prefixes @param {String} tplClasspath Template classpath @param {String} cssClasspath CSS template classpath @private
[ "Update", "the", "private", "properties", "to", "mark", "a", "CSS", "template", "as", "unloaded", ".", "It", "won", "t", "update", "the", "list", "of", "prefixes" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L504-L521
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (tagName) { // A pointer to the style might be already there or an element with the correct id might be there var tag = this.__styleTagPool[tagName]; if (!tag) { var id = this.__TAG_PREFX + tagName; tag = ariaUtilsDom.getElementById(id); ...
javascript
function (tagName) { // A pointer to the style might be already there or an element with the correct id might be there var tag = this.__styleTagPool[tagName]; if (!tag) { var id = this.__TAG_PREFX + tagName; tag = ariaUtilsDom.getElementById(id); ...
[ "function", "(", "tagName", ")", "{", "// A pointer to the style might be already there or an element with the correct id might be there", "var", "tag", "=", "this", ".", "__styleTagPool", "[", "tagName", "]", ";", "if", "(", "!", "tag", ")", "{", "var", "id", "=", ...
Get the HTMLElement associated to a tag id. If it is missing it will be added to the DOM @param {String} tagName Id of the tag @return {HTMLElement} style tag @private
[ "Get", "the", "HTMLElement", "associated", "to", "a", "tag", "id", ".", "If", "it", "is", "missing", "it", "will", "be", "added", "to", "the", "DOM" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L654-L680
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function () { // Remove the style tags from the DOM for (var tagName in this.__styleTagPool) { if (this.__styleTagPool.hasOwnProperty(tagName)) { this.__styleTagPool[tagName].parentNode.removeChild(this.__styleTagPool[tagName]); } }...
javascript
function () { // Remove the style tags from the DOM for (var tagName in this.__styleTagPool) { if (this.__styleTagPool.hasOwnProperty(tagName)) { this.__styleTagPool[tagName].parentNode.removeChild(this.__styleTagPool[tagName]); } }...
[ "function", "(", ")", "{", "// Remove the style tags from the DOM", "for", "(", "var", "tagName", "in", "this", ".", "__styleTagPool", ")", "{", "if", "(", "this", ".", "__styleTagPool", ".", "hasOwnProperty", "(", "tagName", ")", ")", "{", "this", ".", "__s...
Reset the singleton to it's initial state after creation.
[ "Reset", "the", "singleton", "to", "it", "s", "initial", "state", "after", "creation", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L685-L712
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (classpath, cssTemplates) { for (var i = 0, length = cssTemplates.length; i < length; i++) { var cssClasspath = Aria.getClasspath(cssTemplates[i]); if (!this.__globalUsage[cssClasspath]) { this.__globalUsage[cssClasspath] = []; } ...
javascript
function (classpath, cssTemplates) { for (var i = 0, length = cssTemplates.length; i < length; i++) { var cssClasspath = Aria.getClasspath(cssTemplates[i]); if (!this.__globalUsage[cssClasspath]) { this.__globalUsage[cssClasspath] = []; } ...
[ "function", "(", "classpath", ",", "cssTemplates", ")", "{", "for", "(", "var", "i", "=", "0", ",", "length", "=", "cssTemplates", ".", "length", ";", "i", "<", "length", ";", "i", "++", ")", "{", "var", "cssClasspath", "=", "Aria", ".", "getClasspat...
Register a link between a classpath and a CSSTemplate. This is used during CSS reload to identify if a CSS has to be reloaded. @param {String} classpath classpath that have a dependency on some css @param {Array} cssTemplates css classpaths or references
[ "Register", "a", "link", "between", "a", "classpath", "and", "a", "CSSTemplate", ".", "This", "is", "used", "during", "CSS", "reload", "to", "identify", "if", "a", "CSS", "has", "to", "be", "reloaded", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L758-L766
train
ariatemplates/ariatemplates
src/aria/templates/CSSMgr.js
function (classpath, cssTemplates, unload, timestampNextTime) { var array = ariaUtilsArray, classMgr = ariaCoreClassMgr; for (var i = 0, length = cssTemplates.length; i < length; i++) { var cssClasspath = Aria.getClasspath(cssTemplates[i]); var usage = this.__glob...
javascript
function (classpath, cssTemplates, unload, timestampNextTime) { var array = ariaUtilsArray, classMgr = ariaCoreClassMgr; for (var i = 0, length = cssTemplates.length; i < length; i++) { var cssClasspath = Aria.getClasspath(cssTemplates[i]); var usage = this.__glob...
[ "function", "(", "classpath", ",", "cssTemplates", ",", "unload", ",", "timestampNextTime", ")", "{", "var", "array", "=", "ariaUtilsArray", ",", "classMgr", "=", "ariaCoreClassMgr", ";", "for", "(", "var", "i", "=", "0", ",", "length", "=", "cssTemplates", ...
Unregister a link between a classpath and a CSSTemplate. This is used during CSS reload to identify if a CSS has to be reloaded. @param {String} classpath classpath that have a dependency on some css @param {Array} cssTemplates classpaths or references @param {Boolean} unload if true unload cssTemplate class as well an...
[ "Unregister", "a", "link", "between", "a", "classpath", "and", "a", "CSSTemplate", ".", "This", "is", "used", "during", "CSS", "reload", "to", "identify", "if", "a", "CSS", "has", "to", "be", "reloaded", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/CSSMgr.js#L776-L788
train
ariatemplates/ariatemplates
src/aria/utils/validators/Validator.js
function (msg) { if (this.utilsType.isObject(msg)) { this.message = msg; this.localized_message = msg.localizedMessage; } else if (this.utilsType.isString(msg)) { this.localized_message = msg; this.message = ariaUtilsData.createMess...
javascript
function (msg) { if (this.utilsType.isObject(msg)) { this.message = msg; this.localized_message = msg.localizedMessage; } else if (this.utilsType.isString(msg)) { this.localized_message = msg; this.message = ariaUtilsData.createMess...
[ "function", "(", "msg", ")", "{", "if", "(", "this", ".", "utilsType", ".", "isObject", "(", "msg", ")", ")", "{", "this", ".", "message", "=", "msg", ";", "this", ".", "localized_message", "=", "msg", ".", "localizedMessage", ";", "}", "else", "if",...
Sets the message if there is one otherwise set the message. @param {String|Object} msg
[ "Sets", "the", "message", "if", "there", "is", "one", "otherwise", "set", "the", "message", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/validators/Validator.js#L96-L104
train
ariatemplates/ariatemplates
src/aria/html/Element.js
makeUseless
function makeUseless (instance) { instance.writeMarkup = Aria.empty; instance.writeMarkupBegin = Aria.empty; instance.writeMarkupEnd = Aria.empty; instance.initWidget = Aria.empty; }
javascript
function makeUseless (instance) { instance.writeMarkup = Aria.empty; instance.writeMarkupBegin = Aria.empty; instance.writeMarkupEnd = Aria.empty; instance.initWidget = Aria.empty; }
[ "function", "makeUseless", "(", "instance", ")", "{", "instance", ".", "writeMarkup", "=", "Aria", ".", "empty", ";", "instance", ".", "writeMarkupBegin", "=", "Aria", ".", "empty", ";", "instance", ".", "writeMarkupEnd", "=", "Aria", ".", "empty", ";", "i...
This function is called when the widget validation fails. It sets every public function to Aria.empty so that we can safely assume that the configuration is valid inside the methods defined in the prototype. @param {aria.html.Element) instance Instance of Element widget that should be made useless @private
[ "This", "function", "is", "called", "when", "the", "widget", "validation", "fails", ".", "It", "sets", "every", "public", "function", "to", "Aria", ".", "empty", "so", "that", "we", "can", "safely", "assume", "that", "the", "configuration", "is", "valid", ...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/Element.js#L32-L37
train
ariatemplates/ariatemplates
src/aria/html/Element.js
function () { var eventListeners = this._cfg.on, hasListeners = false, listArray; var delegateManager = ariaUtilsDelegate; var delegateFallbackEvents = []; for (var listener in eventListeners) { if (eventListeners.hasOwnProperty(listen...
javascript
function () { var eventListeners = this._cfg.on, hasListeners = false, listArray; var delegateManager = ariaUtilsDelegate; var delegateFallbackEvents = []; for (var listener in eventListeners) { if (eventListeners.hasOwnProperty(listen...
[ "function", "(", ")", "{", "var", "eventListeners", "=", "this", ".", "_cfg", ".", "on", ",", "hasListeners", "=", "false", ",", "listArray", ";", "var", "delegateManager", "=", "ariaUtilsDelegate", ";", "var", "delegateFallbackEvents", "=", "[", "]", ";", ...
Since event's callbacks can be have several signatures as specified in aria.widgetLibs.CommonBeans.Callback this function normalizes the callbacks for later use. It'll also ask Delegate to generate a delegateId if needed. @protected
[ "Since", "event", "s", "callbacks", "can", "be", "have", "several", "signatures", "as", "specified", "in", "aria", ".", "widgetLibs", ".", "CommonBeans", ".", "Callback", "this", "function", "normalizes", "the", "callbacks", "for", "later", "use", ".", "It", ...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/Element.js#L135-L164
train
ariatemplates/ariatemplates
src/aria/html/Element.js
function (event) { var type = event.type, callbackArray = this._cfg.on[type], callback, returnValue; if (callbackArray) { var wrapped = new ariaTemplatesDomEventWrapper(event); for (var i = 0, listCount = callbackArray.length; i < listCount; i++) {...
javascript
function (event) { var type = event.type, callbackArray = this._cfg.on[type], callback, returnValue; if (callbackArray) { var wrapped = new ariaTemplatesDomEventWrapper(event); for (var i = 0, listCount = callbackArray.length; i < listCount; i++) {...
[ "function", "(", "event", ")", "{", "var", "type", "=", "event", ".", "type", ",", "callbackArray", "=", "this", ".", "_cfg", ".", "on", "[", "type", "]", ",", "callback", ",", "returnValue", ";", "if", "(", "callbackArray", ")", "{", "var", "wrapped...
Callback for delegated events. If an 'on' callback was registered it calls the appropriate callback passing a aria.templates.DomEventWrapper to the callback function @param {aria.DomEvent} event Wrapped event @protected
[ "Callback", "for", "delegated", "events", ".", "If", "an", "on", "callback", "was", "registered", "it", "calls", "the", "appropriate", "callback", "passing", "a", "aria", ".", "templates", ".", "DomEventWrapper", "to", "the", "callback", "function" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/Element.js#L172-L186
train
ariatemplates/ariatemplates
src/aria/html/Element.js
function (out) { var cfg = this._cfg; var attributes = ariaUtilsHtml.buildAttributeList(cfg.attributes); var markup = ["<", cfg.tagName, " id='", this._id, "' "]; if (attributes) { markup.push(attributes, " "); } ...
javascript
function (out) { var cfg = this._cfg; var attributes = ariaUtilsHtml.buildAttributeList(cfg.attributes); var markup = ["<", cfg.tagName, " id='", this._id, "' "]; if (attributes) { markup.push(attributes, " "); } ...
[ "function", "(", "out", ")", "{", "var", "cfg", "=", "this", ".", "_cfg", ";", "var", "attributes", "=", "ariaUtilsHtml", ".", "buildAttributeList", "(", "cfg", ".", "attributes", ")", ";", "var", "markup", "=", "[", "\"<\"", ",", "cfg", ".", "tagName"...
Write the opening tag without adding the ending '>'. This part is common to both opening and self closing tag. @param {aria.templates.MarkupWriter} out @protected
[ "Write", "the", "opening", "tag", "without", "adding", "the", "ending", ">", ".", "This", "part", "is", "common", "to", "both", "opening", "and", "self", "closing", "tag", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/Element.js#L245-L265
train
ariatemplates/ariatemplates
src/aria/html/Element.js
function (args, propertyName) { if (this._cfg) { this.onbind(propertyName, this._transform(this._cfg.bind[propertyName].transform, args.newValue, "toWidget"), args.oldValue); } }
javascript
function (args, propertyName) { if (this._cfg) { this.onbind(propertyName, this._transform(this._cfg.bind[propertyName].transform, args.newValue, "toWidget"), args.oldValue); } }
[ "function", "(", "args", ",", "propertyName", ")", "{", "if", "(", "this", ".", "_cfg", ")", "{", "this", ".", "onbind", "(", "propertyName", ",", "this", ".", "_transform", "(", "this", ".", "_cfg", ".", "bind", "[", "propertyName", "]", ".", "trans...
Called when a change occurs for a value with binding. @protected @param {Object} args details about what changed @param {String} propertyName key of the binding configuration that registered this callback @override
[ "Called", "when", "a", "change", "occurs", "for", "a", "value", "with", "binding", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/Element.js#L274-L278
train
ariatemplates/ariatemplates
src/aria/html/Element.js
function (listeners, eventType, callback, after) { var listArray = listeners[eventType] || []; if (!ariaUtilsType.isArray(listArray)) { listArray = [listArray]; } if (after) { listArray.push(callback); ...
javascript
function (listeners, eventType, callback, after) { var listArray = listeners[eventType] || []; if (!ariaUtilsType.isArray(listArray)) { listArray = [listArray]; } if (after) { listArray.push(callback); ...
[ "function", "(", "listeners", ",", "eventType", ",", "callback", ",", "after", ")", "{", "var", "listArray", "=", "listeners", "[", "eventType", "]", "||", "[", "]", ";", "if", "(", "!", "ariaUtilsType", ".", "isArray", "(", "listArray", ")", ")", "{",...
Add a listener for an event. It will be called before an already registered event, if any. @protected @param {aria.html.beans.ElementCfg:Properties.on} listeners Map of listeners @param {String} eventType Type of the event @param {aria.core.CfgBeans:Callback} callback listener to chain @param {Boolean} after True if th...
[ "Add", "a", "listener", "for", "an", "event", ".", "It", "will", "be", "called", "before", "an", "already", "registered", "event", "if", "any", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/Element.js#L289-L301
train
ariatemplates/ariatemplates
src/aria/$resourcesProviders.js
function (args) { var output = [args.provider, args.caller]; if (args.onLoad) { output.push(args.onLoad); } if (args.handler) { output.push(args.handler); } if (args.resources) { output.push(args.resources.join("-")); } return output.join("-"); }
javascript
function (args) { var output = [args.provider, args.caller]; if (args.onLoad) { output.push(args.onLoad); } if (args.handler) { output.push(args.handler); } if (args.resources) { output.push(args.resources.join("-")); } return output.join("-"); }
[ "function", "(", "args", ")", "{", "var", "output", "=", "[", "args", ".", "provider", ",", "args", ".", "caller", "]", ";", "if", "(", "args", ".", "onLoad", ")", "{", "output", ".", "push", "(", "args", ".", "onLoad", ")", ";", "}", "if", "("...
Compute the key that will be used to store a certain instance of provider in the providers store @param {Object} args @return {String} @private
[ "Compute", "the", "key", "that", "will", "be", "used", "to", "store", "a", "certain", "instance", "of", "provider", "in", "the", "providers", "store" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/$resourcesProviders.js#L34-L46
train
ariatemplates/ariatemplates
src/aria/$resourcesProviders.js
function (referencePath, baseLogicalPath, callerClasspath, onLoad, handler) { var args = convertArguments(arguments); if (args.onLoad) { asyncRequire(args.provider).spreadSync(function (providerConstr) { return fetchDataAfterLoading(providerConstr, args); }).then(function () { ...
javascript
function (referencePath, baseLogicalPath, callerClasspath, onLoad, handler) { var args = convertArguments(arguments); if (args.onLoad) { asyncRequire(args.provider).spreadSync(function (providerConstr) { return fetchDataAfterLoading(providerConstr, args); }).then(function () { ...
[ "function", "(", "referencePath", ",", "baseLogicalPath", ",", "callerClasspath", ",", "onLoad", ",", "handler", ")", "{", "var", "args", "=", "convertArguments", "(", "arguments", ")", ";", "if", "(", "args", ".", "onLoad", ")", "{", "asyncRequire", "(", ...
Public method that has to be used to obtain the instance of provider @param {String} referencePath reference path of the provider module @param {String} baseLogicalPath path of the provider module @param {String} callerClasspath classpath of the caller, @param {String} onLoad onLoad method of the caller prototype to ca...
[ "Public", "method", "that", "has", "to", "be", "used", "to", "obtain", "the", "instance", "of", "provider" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/$resourcesProviders.js#L169-L182
train
ariatemplates/ariatemplates
src/aria/$resourcesProviders.js
function (providerConstr, args) { return new Promise(function (resolve) { var instance = new providerConstr(); addInstanceToStore(args, instance); createGetData(instance, args.caller); if (args.hasOwnProperty("handler")) { instance.setHandler(args.handler); } ...
javascript
function (providerConstr, args) { return new Promise(function (resolve) { var instance = new providerConstr(); addInstanceToStore(args, instance); createGetData(instance, args.caller); if (args.hasOwnProperty("handler")) { instance.setHandler(args.handler); } ...
[ "function", "(", "providerConstr", ",", "args", ")", "{", "return", "new", "Promise", "(", "function", "(", "resolve", ")", "{", "var", "instance", "=", "new", "providerConstr", "(", ")", ";", "addInstanceToStore", "(", "args", ",", "instance", ")", ";", ...
Create an instance of the contructor, set the handler and the resources, call the fetch method @param {Function} providerConstr contructor of the provider @param {Object} args see the value returned by "convertArguments" method @return {Object} promise
[ "Create", "an", "instance", "of", "the", "contructor", "set", "the", "handler", "and", "the", "resources", "call", "the", "fetch", "method" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/$resourcesProviders.js#L190-L203
train
ariatemplates/ariatemplates
src/aria/core/JsonValidator.js
function (errors, throwsErrors) { if (errors.length === 0) { return true; } if (!throwsErrors) { for (var i = 0; i < errors.length; i++) { this.$logError(errors[i].msgId, errors[i].msgArgs); ...
javascript
function (errors, throwsErrors) { if (errors.length === 0) { return true; } if (!throwsErrors) { for (var i = 0; i < errors.length; i++) { this.$logError(errors[i].msgId, errors[i].msgArgs); ...
[ "function", "(", "errors", ",", "throwsErrors", ")", "{", "if", "(", "errors", ".", "length", "===", "0", ")", "{", "return", "true", ";", "}", "if", "(", "!", "throwsErrors", ")", "{", "for", "(", "var", "i", "=", "0", ";", "i", "<", "errors", ...
Log all errors. @param {Array} array of errors @param {Boolean} throwsErrors (default false) @return {Boolean} True if there were no error, false otherwise.
[ "Log", "all", "errors", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/JsonValidator.js#L259-L284
train
ariatemplates/ariatemplates
src/aria/core/JsonValidator.js
function (packageDef, typeName) { var path = { '$properties' : packageDef.$beans }; var typeParts = typeName.split('.'); for (var i = 0; i < typeParts.length; i++) { var elt = typeParts[i]; if (el...
javascript
function (packageDef, typeName) { var path = { '$properties' : packageDef.$beans }; var typeParts = typeName.split('.'); for (var i = 0; i < typeParts.length; i++) { var elt = typeParts[i]; if (el...
[ "function", "(", "packageDef", ",", "typeName", ")", "{", "var", "path", "=", "{", "'$properties'", ":", "packageDef", ".", "$beans", "}", ";", "var", "typeParts", "=", "typeName", ".", "split", "(", "'.'", ")", ";", "for", "(", "var", "i", "=", "0",...
Find the given type in the given bean package. @param {aria.core.BaseTypes:Package} packageDef bean package @param {String} typeName type name. May not contain ':'. Contains the path to the bean inside the package bp. @return {aria.core.BaseTypes:Bean} definition of the requested bean, or this._typeRefError if it could...
[ "Find", "the", "given", "type", "in", "the", "given", "bean", "package", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/JsonValidator.js#L294-L316
train
ariatemplates/ariatemplates
src/aria/core/JsonValidator.js
function (typeName, packageDef) { var packageName, otherBP; var i = typeName.indexOf(':'); // if no semicolumn, type is defined inside this package if (i == -1) { packageName = packageDef.$package; otherBP = packageD...
javascript
function (typeName, packageDef) { var packageName, otherBP; var i = typeName.indexOf(':'); // if no semicolumn, type is defined inside this package if (i == -1) { packageName = packageDef.$package; otherBP = packageD...
[ "function", "(", "typeName", ",", "packageDef", ")", "{", "var", "packageName", ",", "otherBP", ";", "var", "i", "=", "typeName", ".", "indexOf", "(", "':'", ")", ";", "// if no semicolumn, type is defined inside this package", "if", "(", "i", "==", "-", "1", ...
Find a bean definition by its type name. It relies on the bean package currently being processed. @param {String} typeName A string composed of two parts: 'namespace:value' where the namespace is optional if the value refers a type defined in the package currently being processed. @param {aria.core.BaseTypes:Package} p...
[ "Find", "a", "bean", "definition", "by", "its", "type", "name", ".", "It", "relies", "on", "the", "bean", "package", "currently", "being", "processed", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/JsonValidator.js#L326-L368
train
ariatemplates/ariatemplates
src/aria/core/JsonValidator.js
function (def) { // prepare error stack this._errors = []; var beans = def.$beans; for (var beanName in beans) { if (!beans.hasOwnProperty(beanName) || beanName.indexOf(':') != -1) { continue; ...
javascript
function (def) { // prepare error stack this._errors = []; var beans = def.$beans; for (var beanName in beans) { if (!beans.hasOwnProperty(beanName) || beanName.indexOf(':') != -1) { continue; ...
[ "function", "(", "def", ")", "{", "// prepare error stack", "this", ".", "_errors", "=", "[", "]", ";", "var", "beans", "=", "def", ".", "$beans", ";", "for", "(", "var", "beanName", "in", "beans", ")", "{", "if", "(", "!", "beans", ".", "hasOwnPrope...
Main function to preprocess a bean package definition. All dependencies should have already bean loaded. @param {aria.core.BaseTypes:Package} def
[ "Main", "function", "to", "preprocess", "a", "bean", "package", "definition", ".", "All", "dependencies", "should", "have", "already", "bean", "loaded", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/JsonValidator.js#L539-L569
train
ariatemplates/ariatemplates
src/aria/core/JsonValidator.js
function (beanDef) { var typeDef = this.__baseTypes[beanDef.$type]; this.$assert(298, typeDef != null); beanDef[this._MD_BUILTIN] = true; beanDef[this._MD_BASETYPE] = typeDef; var beanName = beanDef[this._MD_TYPENAME] = [this._BASE_TYPES_PA...
javascript
function (beanDef) { var typeDef = this.__baseTypes[beanDef.$type]; this.$assert(298, typeDef != null); beanDef[this._MD_BUILTIN] = true; beanDef[this._MD_BASETYPE] = typeDef; var beanName = beanDef[this._MD_TYPENAME] = [this._BASE_TYPES_PA...
[ "function", "(", "beanDef", ")", "{", "var", "typeDef", "=", "this", ".", "__baseTypes", "[", "beanDef", ".", "$type", "]", ";", "this", ".", "$assert", "(", "298", ",", "typeDef", "!=", "null", ")", ";", "beanDef", "[", "this", ".", "_MD_BUILTIN", "...
Preprocessing function for base types of package aria.core.JsonTypes @param {aria.core.BaseTypes:Bean} beanDef
[ "Preprocessing", "function", "for", "base", "types", "of", "package", "aria", ".", "core", ".", "JsonTypes" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/JsonValidator.js#L575-L583
train
ariatemplates/ariatemplates
src/aria/core/JsonValidator.js
function (typeDef) { this.__baseTypes[typeDef.typeName] = typeDef; if (!(typeDef.dontSkip || this._options.checkEnabled)) { typeDef.process = null; typeDef.preprocess = null; } }
javascript
function (typeDef) { this.__baseTypes[typeDef.typeName] = typeDef; if (!(typeDef.dontSkip || this._options.checkEnabled)) { typeDef.process = null; typeDef.preprocess = null; } }
[ "function", "(", "typeDef", ")", "{", "this", ".", "__baseTypes", "[", "typeDef", ".", "typeName", "]", "=", "typeDef", ";", "if", "(", "!", "(", "typeDef", ".", "dontSkip", "||", "this", ".", "_options", ".", "checkEnabled", ")", ")", "{", "typeDef", ...
Add the given base type to the list of errors. It is called from JsonTypesCheck.js. @param {Object} typeDef [typeDef] { typeName: {String} name of the base type preprocess(beanDef): (Function) executed during preprocessing process(args): (Function) executed during processing dontSkip: {Boolean} if true, preprocess and ...
[ "Add", "the", "given", "base", "type", "to", "the", "list", "of", "errors", ".", "It", "is", "called", "from", "JsonTypesCheck", ".", "js", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/JsonValidator.js#L591-L597
train
ariatemplates/ariatemplates
src/aria/core/JsonValidator.js
function (args) { var beanDef = (args.beanDef ? args.beanDef : this._getBean(args.beanName)); if (!beanDef) { this._errors = []; this._logError(this.BEAN_NOT_FOUND, args.beanName); return this._errors; } ...
javascript
function (args) { var beanDef = (args.beanDef ? args.beanDef : this._getBean(args.beanName)); if (!beanDef) { this._errors = []; this._logError(this.BEAN_NOT_FOUND, args.beanName); return this._errors; } ...
[ "function", "(", "args", ")", "{", "var", "beanDef", "=", "(", "args", ".", "beanDef", "?", "args", ".", "beanDef", ":", "this", ".", "_getBean", "(", "args", ".", "beanName", ")", ")", ";", "if", "(", "!", "beanDef", ")", "{", "this", ".", "_err...
Process the validation of a Json object with the given bean definition. @param args [args] { beanName/beanDef: beanName or beanDef json: structure to validate } Return the array of errors.
[ "Process", "the", "validation", "of", "a", "Json", "object", "with", "the", "given", "bean", "definition", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/JsonValidator.js#L654-L672
train
ariatemplates/ariatemplates
src/aria/core/JsonValidator.js
function (beanDef) { if (this._options.checkBeans && (!this._options.checkMultiTypes) && this.__loadedBeans[this._BEANS_SCHEMA_PACKAGE]) { var baseType = beanDef[this._MD_BASETYPE]; if (baseType == this._typeError) { ...
javascript
function (beanDef) { if (this._options.checkBeans && (!this._options.checkMultiTypes) && this.__loadedBeans[this._BEANS_SCHEMA_PACKAGE]) { var baseType = beanDef[this._MD_BASETYPE]; if (baseType == this._typeError) { ...
[ "function", "(", "beanDef", ")", "{", "if", "(", "this", ".", "_options", ".", "checkBeans", "&&", "(", "!", "this", ".", "_options", ".", "checkMultiTypes", ")", "&&", "this", ".", "__loadedBeans", "[", "this", ".", "_BEANS_SCHEMA_PACKAGE", "]", ")", "{...
Called when preprocessing, just after having determined the type of bean. If beans check is enabled and multitypes check is disabled, it checks that the bean is valid according to the corresponding schema in aria.core.BaseTypes @param {aria.core.BaseTypes:Bean} bean to check
[ "Called", "when", "preprocessing", "just", "after", "having", "determined", "the", "type", "of", "bean", ".", "If", "beans", "check", "is", "enabled", "and", "multitypes", "check", "is", "disabled", "it", "checks", "that", "the", "bean", "is", "valid", "acco...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/JsonValidator.js#L680-L706
train
ariatemplates/ariatemplates
src/aria/core/JsonValidator.js
function (bp) { var noerrors = true; // bean definition will be available in the waiting beans var def = this.__waitingBeans[bp]; delete this.__waitingBeans[bp]; this.$assert(58, def); var compiled = def.$compiled; ...
javascript
function (bp) { var noerrors = true; // bean definition will be available in the waiting beans var def = this.__waitingBeans[bp]; delete this.__waitingBeans[bp]; this.$assert(58, def); var compiled = def.$compiled; ...
[ "function", "(", "bp", ")", "{", "var", "noerrors", "=", "true", ";", "// bean definition will be available in the waiting beans", "var", "def", "=", "this", ".", "__waitingBeans", "[", "bp", "]", ";", "delete", "this", ".", "__waitingBeans", "[", "bp", "]", "...
Load the specified beans package. @param {String} bp beans package
[ "Load", "the", "specified", "beans", "package", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/JsonValidator.js#L712-L745
train
ariatemplates/ariatemplates
src/aria/core/JsonValidator.js
function (def) { var bp = def.$package; // beans package Aria.$classes.push({ $classpath : bp }); this.__waitingBeans[bp] = def; var dep = []; // load missing dependencies // add $depend...
javascript
function (def) { var bp = def.$package; // beans package Aria.$classes.push({ $classpath : bp }); this.__waitingBeans[bp] = def; var dep = []; // load missing dependencies // add $depend...
[ "function", "(", "def", ")", "{", "var", "bp", "=", "def", ".", "$package", ";", "// beans package", "Aria", ".", "$classes", ".", "push", "(", "{", "$classpath", ":", "bp", "}", ")", ";", "this", ".", "__waitingBeans", "[", "bp", "]", "=", "def", ...
PUBLIC API Base method used to declare beans. You should use Aria. beanDefinitions instead of this method. @param {aria.core.BaseTypes:Package} beans beans package to declare
[ "PUBLIC", "API", "Base", "method", "used", "to", "declare", "beans", ".", "You", "should", "use", "Aria", ".", "beanDefinitions", "instead", "of", "this", "method", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/JsonValidator.js#L753-L787
train
ariatemplates/ariatemplates
src/aria/core/JsonValidator.js
function (json, beanName, throwsErrors) { if (!this._options.checkEnabled) { return true; } this._options.addDefaults = false; return this.__logAllErrors(this._processJsonValidation({ json : json, ...
javascript
function (json, beanName, throwsErrors) { if (!this._options.checkEnabled) { return true; } this._options.addDefaults = false; return this.__logAllErrors(this._processJsonValidation({ json : json, ...
[ "function", "(", "json", ",", "beanName", ",", "throwsErrors", ")", "{", "if", "(", "!", "this", ".", "_options", ".", "checkEnabled", ")", "{", "return", "true", ";", "}", "this", ".", "_options", ".", "addDefaults", "=", "false", ";", "return", "this...
Check that the json structure complies with the given bean. All errors are logged. @param {Object} json json to check; @param {String} bean bean to use @param {Boolean} throwsErrors (default false) @return {Boolean} true if the json structure complies with the given bean, false otherwise
[ "Check", "that", "the", "json", "structure", "complies", "with", "the", "given", "bean", ".", "All", "errors", "are", "logged", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/JsonValidator.js#L818-L827
train
ariatemplates/ariatemplates
src/aria/utils/ClassList.js
function (domElt) { this.setClassName = function (className) { domElt.className = className; }; this.getClassName = function () { return domElt.className; }; this._dispose = function () { domElt = null; this._dispose = null; ...
javascript
function (domElt) { this.setClassName = function (className) { domElt.className = className; }; this.getClassName = function () { return domElt.className; }; this._dispose = function () { domElt = null; this._dispose = null; ...
[ "function", "(", "domElt", ")", "{", "this", ".", "setClassName", "=", "function", "(", "className", ")", "{", "domElt", ".", "className", "=", "className", ";", "}", ";", "this", ".", "getClassName", "=", "function", "(", ")", "{", "return", "domElt", ...
Create a DOM Wrapper object to allow safe changes in the DOM classes without giving direct access to the DOM. Note that a closure is used to prevent access to the domElt object from the template. @param {HTMLElement} domElt DOM element which is wrapped
[ "Create", "a", "DOM", "Wrapper", "object", "to", "allow", "safe", "changes", "in", "the", "DOM", "classes", "without", "giving", "direct", "access", "to", "the", "DOM", ".", "Note", "that", "a", "closure", "is", "used", "to", "prevent", "access", "to", "...
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/ClassList.js#L29-L42
train
ariatemplates/ariatemplates
src/aria/utils/ClassList.js
function (className) { var classes = this.getClassName().split(" "); for (var i = 0, ii = classes.length; i < ii; i++) { if (classes[i] == className) { return true; } } return false; }
javascript
function (className) { var classes = this.getClassName().split(" "); for (var i = 0, ii = classes.length; i < ii; i++) { if (classes[i] == className) { return true; } } return false; }
[ "function", "(", "className", ")", "{", "var", "classes", "=", "this", ".", "getClassName", "(", ")", ".", "split", "(", "\" \"", ")", ";", "for", "(", "var", "i", "=", "0", ",", "ii", "=", "classes", ".", "length", ";", "i", "<", "ii", ";", "i...
Returns true if the class name is in the class attribute @param {String} className The class name to test @return {Boolean}
[ "Returns", "true", "if", "the", "class", "name", "is", "in", "the", "class", "attribute" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/ClassList.js#L81-L89
train
ariatemplates/ariatemplates
src/aria/utils/ClassList.js
function (oldClassName, newClassName) { var rem = [], add = []; if (!!oldClassName) { rem = (typeof oldClassName == "string") ? oldClassName.split(" ") : oldClassName; } if (!!newClassName) { add = (typeof newClassName == "string") ? newC...
javascript
function (oldClassName, newClassName) { var rem = [], add = []; if (!!oldClassName) { rem = (typeof oldClassName == "string") ? oldClassName.split(" ") : oldClassName; } if (!!newClassName) { add = (typeof newClassName == "string") ? newC...
[ "function", "(", "oldClassName", ",", "newClassName", ")", "{", "var", "rem", "=", "[", "]", ",", "add", "=", "[", "]", ";", "if", "(", "!", "!", "oldClassName", ")", "{", "rem", "=", "(", "typeof", "oldClassName", "==", "\"string\"", ")", "?", "ol...
Replaces a class with another class. If no oldClassName is present, the newClassName is simply added. @param {String|Array} oldClassName The class name or an array of class names to be replaced @param {String|Array} newClassName The class name or an array of class names that will be replacing the old class name
[ "Replaces", "a", "class", "with", "another", "class", ".", "If", "no", "oldClassName", "is", "present", "the", "newClassName", "is", "simply", "added", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/ClassList.js#L96-L139
train
ariatemplates/ariatemplates
src/aria/touch/Pinch.js
function () { return [{ evt : this.touchEventMap.touchmove, cb : { fn : this._pinchMove, scope : this } }, { evt : this.touchEventMap.to...
javascript
function () { return [{ evt : this.touchEventMap.touchmove, cb : { fn : this._pinchMove, scope : this } }, { evt : this.touchEventMap.to...
[ "function", "(", ")", "{", "return", "[", "{", "evt", ":", "this", ".", "touchEventMap", ".", "touchmove", ",", "cb", ":", "{", "fn", ":", "this", ".", "_pinchMove", ",", "scope", ":", "this", "}", "}", ",", "{", "evt", ":", "this", ".", "touchEv...
Additional listeners for the Pinch gesture. @protected
[ "Additional", "listeners", "for", "the", "Pinch", "gesture", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/touch/Pinch.js#L107-L121
train
ariatemplates/ariatemplates
src/aria/touch/Pinch.js
function (x1, y1, x2, y2) { return Math.atan2(y2 - y1, x2 - x1) * 180 / Math.PI; }
javascript
function (x1, y1, x2, y2) { return Math.atan2(y2 - y1, x2 - x1) * 180 / Math.PI; }
[ "function", "(", "x1", ",", "y1", ",", "x2", ",", "y2", ")", "{", "return", "Math", ".", "atan2", "(", "y2", "-", "y1", ",", "x2", "-", "x1", ")", "*", "180", "/", "Math", ".", "PI", ";", "}" ]
Returns the angle of the line defined by two points, and the x axes. @param {Integer} x1 x of the first point @param {Integer} y1 y of the first point @param {Integer} x2 x of the second point @param {Integer} y2 y of the second point @private @return {Number} the angle in degrees ]-180; 180]
[ "Returns", "the", "angle", "of", "the", "line", "defined", "by", "two", "points", "and", "the", "x", "axes", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/touch/Pinch.js#L285-L287
train
ariatemplates/ariatemplates
src/aria/touch/widgets/Popup.js
function (cfg, context, lineNumber) { this.$BindableWidget.constructor.apply(this, arguments); this._cfgOk = ariaCoreJsonValidator.validateCfg(this.WIDGET_CFG, cfg); if (!this._cfgOk) { return; } this._registerBindings(); /** * Id generated for th...
javascript
function (cfg, context, lineNumber) { this.$BindableWidget.constructor.apply(this, arguments); this._cfgOk = ariaCoreJsonValidator.validateCfg(this.WIDGET_CFG, cfg); if (!this._cfgOk) { return; } this._registerBindings(); /** * Id generated for th...
[ "function", "(", "cfg", ",", "context", ",", "lineNumber", ")", "{", "this", ".", "$BindableWidget", ".", "constructor", ".", "apply", "(", "this", ",", "arguments", ")", ";", "this", ".", "_cfgOk", "=", "ariaCoreJsonValidator", ".", "validateCfg", "(", "t...
Popup Constructor. @param {aria.touch.widgets.PopupCfgBeans:PopupCfg} cfg popup configuration @param {aria.templates.TemplateCtxt} context template context @param {Number} lineNumber line number in the template
[ "Popup", "Constructor", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/touch/widgets/Popup.js#L43-L61
train
ariatemplates/ariatemplates
src/aria/touch/widgets/Popup.js
function (out) { out.write("<div class=\"" + this.CSS_CLASS + "\">"); if (this._cfg.contentMacro) { out.callMacro(this._cfg.contentMacro); } out.write("</div>"); }
javascript
function (out) { out.write("<div class=\"" + this.CSS_CLASS + "\">"); if (this._cfg.contentMacro) { out.callMacro(this._cfg.contentMacro); } out.write("</div>"); }
[ "function", "(", "out", ")", "{", "out", ".", "write", "(", "\"<div class=\\\"\"", "+", "this", ".", "CSS_CLASS", "+", "\"\\\">\"", ")", ";", "if", "(", "this", ".", "_cfg", ".", "contentMacro", ")", "{", "out", ".", "callMacro", "(", "this", ".", "_...
Callback called when the popup's main section is refreshed @param {aria.templates.MarkupWriter} out the writer Object to use to output markup @private
[ "Callback", "called", "when", "the", "popup", "s", "main", "section", "is", "refreshed" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/touch/widgets/Popup.js#L119-L127
train
ariatemplates/ariatemplates
src/aria/touch/widgets/Popup.js
function () { var cfg = this._cfg; var refreshParams = { section : "__popup_" + this._domId, writerCallback : { fn : this._writerCallback, scope : this } }; var section = this._contex...
javascript
function () { var cfg = this._cfg; var refreshParams = { section : "__popup_" + this._domId, writerCallback : { fn : this._writerCallback, scope : this } }; var section = this._contex...
[ "function", "(", ")", "{", "var", "cfg", "=", "this", ".", "_cfg", ";", "var", "refreshParams", "=", "{", "section", ":", "\"__popup_\"", "+", "this", ".", "_domId", ",", "writerCallback", ":", "{", "fn", ":", "this", ".", "_writerCallback", ",", "scop...
Shows the popup
[ "Shows", "the", "popup" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/touch/widgets/Popup.js#L163-L220
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function () { for (var i = this.openedPopups.length - 1; i >= 0; i--) { var popup = this.openedPopups[i]; popup.close(); } }
javascript
function () { for (var i = this.openedPopups.length - 1; i >= 0; i--) { var popup = this.openedPopups[i]; popup.close(); } }
[ "function", "(", ")", "{", "for", "(", "var", "i", "=", "this", ".", "openedPopups", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "var", "popup", "=", "this", ".", "openedPopups", "[", "i", "]", ";", "popup", ".", "...
Close all opened popups @protected
[ "Close", "all", "opened", "popups" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L145-L150
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function (domEvent, popup) { var documentScroll = ariaUtilsDom._getDocumentScroll(); var clickPosition = { 'top' : domEvent.clientY + documentScroll.scrollTop, 'left' : domEvent.clientX + documentScroll.scrollLeft }; ...
javascript
function (domEvent, popup) { var documentScroll = ariaUtilsDom._getDocumentScroll(); var clickPosition = { 'top' : domEvent.clientY + documentScroll.scrollTop, 'left' : domEvent.clientX + documentScroll.scrollLeft }; ...
[ "function", "(", "domEvent", ",", "popup", ")", "{", "var", "documentScroll", "=", "ariaUtilsDom", ".", "_getDocumentScroll", "(", ")", ";", "var", "clickPosition", "=", "{", "'top'", ":", "domEvent", ".", "clientY", "+", "documentScroll", ".", "scrollTop", ...
Check if an event happen in the box a a popup @protected @param {aria.DomEvent} domEvent @param {aria.popups.Popup} popup @return {Boolean}
[ "Check", "if", "an", "event", "happen", "in", "the", "box", "a", "a", "popup" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L159-L178
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function () { for (var i = this.popups.length - 1; i >= 0; i--) { var popup = this.popups[i]; this.unregisterPopup(popup); } }
javascript
function () { for (var i = this.popups.length - 1; i >= 0; i--) { var popup = this.popups[i]; this.unregisterPopup(popup); } }
[ "function", "(", ")", "{", "for", "(", "var", "i", "=", "this", ".", "popups", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "var", "popup", "=", "this", ".", "popups", "[", "i", "]", ";", "this", ".", "unregisterPop...
Unregister all popups @protected
[ "Unregister", "all", "popups" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L184-L189
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function () { this.disconnectEvents(); ariaUtilsAriaWindow.attachWindow(); this._document = Aria.$window.document; utilsEvent.addListener(this._document, "mousedown", { fn : this.onDocumentClick, scope : this ...
javascript
function () { this.disconnectEvents(); ariaUtilsAriaWindow.attachWindow(); this._document = Aria.$window.document; utilsEvent.addListener(this._document, "mousedown", { fn : this.onDocumentClick, scope : this ...
[ "function", "(", ")", "{", "this", ".", "disconnectEvents", "(", ")", ";", "ariaUtilsAriaWindow", ".", "attachWindow", "(", ")", ";", "this", ".", "_document", "=", "Aria", ".", "$window", ".", "document", ";", "utilsEvent", ".", "addListener", "(", "this"...
Connect or reconnect global events on the document
[ "Connect", "or", "reconnect", "global", "events", "on", "the", "document" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L194-L234
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function () { if (this._document) { utilsEvent.removeListener(this._document, "mousedown", { fn : this.onDocumentClick }); utilsEvent.removeListener(this._document, "touchend", { fn : this.onDocum...
javascript
function () { if (this._document) { utilsEvent.removeListener(this._document, "mousedown", { fn : this.onDocumentClick }); utilsEvent.removeListener(this._document, "touchend", { fn : this.onDocum...
[ "function", "(", ")", "{", "if", "(", "this", ".", "_document", ")", "{", "utilsEvent", ".", "removeListener", "(", "this", ".", "_document", ",", "\"mousedown\"", ",", "{", "fn", ":", "this", ".", "onDocumentClick", "}", ")", ";", "utilsEvent", ".", "...
Disconnect global events on the document
[ "Disconnect", "global", "events", "on", "the", "document" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L239-L268
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function () { var navManager = ariaTemplatesNavigationManager; navManager.addGlobalKeyMap({ key : "ESCAPE", modal : true, callback : { fn : this._raiseOnEscapeEvent, scope : this ...
javascript
function () { var navManager = ariaTemplatesNavigationManager; navManager.addGlobalKeyMap({ key : "ESCAPE", modal : true, callback : { fn : this._raiseOnEscapeEvent, scope : this ...
[ "function", "(", ")", "{", "var", "navManager", "=", "ariaTemplatesNavigationManager", ";", "navManager", ".", "addGlobalKeyMap", "(", "{", "key", ":", "\"ESCAPE\"", ",", "modal", ":", "true", ",", "callback", ":", "{", "fn", ":", "this", ".", "_raiseOnEscap...
Connect events specific to modal popups.
[ "Connect", "events", "specific", "to", "modal", "popups", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L273-L285
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function () { var navManager = ariaTemplatesNavigationManager; navManager.removeGlobalKeyMap({ key : "ESCAPE", modal : true, callback : { fn : this._raiseOnEscapeEvent, scope : thi...
javascript
function () { var navManager = ariaTemplatesNavigationManager; navManager.removeGlobalKeyMap({ key : "ESCAPE", modal : true, callback : { fn : this._raiseOnEscapeEvent, scope : thi...
[ "function", "(", ")", "{", "var", "navManager", "=", "ariaTemplatesNavigationManager", ";", "navManager", ".", "removeGlobalKeyMap", "(", "{", "key", ":", "\"ESCAPE\"", ",", "modal", ":", "true", ",", "callback", ":", "{", "fn", ":", "this", ".", "_raiseOnEs...
Disconnect events specific to modal popups.
[ "Disconnect", "events", "specific", "to", "modal", "popups", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L290-L302
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function () { for (var i = this.openedPopups.length - 1; i >= 0; i--) { var popup = this.openedPopups[i]; popup.updatePosition(); } }
javascript
function () { for (var i = this.openedPopups.length - 1; i >= 0; i--) { var popup = this.openedPopups[i]; popup.updatePosition(); } }
[ "function", "(", ")", "{", "for", "(", "var", "i", "=", "this", ".", "openedPopups", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "var", "popup", "=", "this", ".", "openedPopups", "[", "i", "]", ";", "popup", ".", "...
Updates the position of all opened popups.
[ "Updates", "the", "position", "of", "all", "opened", "popups", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L307-L312
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function (event) { if (event.type === "mousewheel") { ariaCoreTimer.addCallback({ fn : this.updatePositions, scope : this }); } else if (event.type === "scroll") { this.updatePosit...
javascript
function (event) { if (event.type === "mousewheel") { ariaCoreTimer.addCallback({ fn : this.updatePositions, scope : this }); } else if (event.type === "scroll") { this.updatePosit...
[ "function", "(", "event", ")", "{", "if", "(", "event", ".", "type", "===", "\"mousewheel\"", ")", "{", "ariaCoreTimer", ".", "addCallback", "(", "{", "fn", ":", "this", ".", "updatePositions", ",", "scope", ":", "this", "}", ")", ";", "}", "else", "...
handles the scroll for the popup @param {Object} Event that triggered the scroll.
[ "handles", "the", "scroll", "for", "the", "popup" ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L318-L327
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function (target, notifyTargetBehindModalPopup) { var searchPopup = this._document && target !== this._document.body; if (searchPopup) { for (var i = this.openedPopups.length - 1; i >= 0; i--) { var popup = this.openedPopups[i]; ...
javascript
function (target, notifyTargetBehindModalPopup) { var searchPopup = this._document && target !== this._document.body; if (searchPopup) { for (var i = this.openedPopups.length - 1; i >= 0; i--) { var popup = this.openedPopups[i]; ...
[ "function", "(", "target", ",", "notifyTargetBehindModalPopup", ")", "{", "var", "searchPopup", "=", "this", ".", "_document", "&&", "target", "!==", "this", ".", "_document", ".", "body", ";", "if", "(", "searchPopup", ")", "{", "for", "(", "var", "i", ...
Returns the popup which contains the given target DOM element, if the DOM element is not hidden behind a modal popup. @param {HTMLElement} target DOM element for which the containing popup has to be found @param {Function} notifyTargetBehindModalPopup function which is called in case the target is behind a modal popup....
[ "Returns", "the", "popup", "which", "contains", "the", "given", "target", "DOM", "element", "if", "the", "DOM", "element", "is", "not", "hidden", "behind", "a", "modal", "popup", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L356-L374
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function (event) { var domEvent = new ariaDomEvent(event); var target = domEvent.target; var self = this; var popup = this.findParentPopup(target, function (popup) { var navigation; navigation = self._viewportNavigat...
javascript
function (event) { var domEvent = new ariaDomEvent(event); var target = domEvent.target; var self = this; var popup = this.findParentPopup(target, function (popup) { var navigation; navigation = self._viewportNavigat...
[ "function", "(", "event", ")", "{", "var", "domEvent", "=", "new", "ariaDomEvent", "(", "event", ")", ";", "var", "target", "=", "domEvent", ".", "target", ";", "var", "self", "=", "this", ";", "var", "popup", "=", "this", ".", "findParentPopup", "(", ...
Callback after the focus is put on an element in the document, when a modal popup is displayed. @param {Object} event The DOM focusin event triggering the callback
[ "Callback", "after", "the", "focus", "is", "put", "on", "an", "element", "in", "the", "document", "when", "a", "modal", "popup", "is", "displayed", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L380-L418
train
ariatemplates/ariatemplates
src/aria/popups/PopupManager.js
function () { var openedPopups = this.openedPopups; var topPopup = null; if (openedPopups.length > 0) { topPopup = openedPopups[openedPopups.length - 1]; var topZIndex = topPopup.getZIndex(); for (var i = openedP...
javascript
function () { var openedPopups = this.openedPopups; var topPopup = null; if (openedPopups.length > 0) { topPopup = openedPopups[openedPopups.length - 1]; var topZIndex = topPopup.getZIndex(); for (var i = openedP...
[ "function", "(", ")", "{", "var", "openedPopups", "=", "this", ".", "openedPopups", ";", "var", "topPopup", "=", "null", ";", "if", "(", "openedPopups", ".", "length", ">", "0", ")", "{", "topPopup", "=", "openedPopups", "[", "openedPopups", ".", "length...
Returns the popup with the highest zIndex.
[ "Returns", "the", "popup", "with", "the", "highest", "zIndex", "." ]
7ed5d065818ae159bf361c9dfb209b1cf3883c90
https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L423-L439
train