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/DomEvent.js | function (evt) {
if (evt && evt._ariaDomEvent) {
evt._wrapperNumber++;
return evt;
} else {
return new aria.DomEvent(evt);
}
} | javascript | function (evt) {
if (evt && evt._ariaDomEvent) {
evt._wrapperNumber++;
return evt;
} else {
return new aria.DomEvent(evt);
}
} | [
"function",
"(",
"evt",
")",
"{",
"if",
"(",
"evt",
"&&",
"evt",
".",
"_ariaDomEvent",
")",
"{",
"evt",
".",
"_wrapperNumber",
"++",
";",
"return",
"evt",
";",
"}",
"else",
"{",
"return",
"new",
"aria",
".",
"DomEvent",
"(",
"evt",
")",
";",
"}",
... | Return a wrapper on the event passed as a parameter. The parameter can either be already a wrapper, in
which case the parameter is returned without other object creation, or an event from the dom, in which
case a wrapper is created.
<pre>
Instead of using the following code:
_dom_onmouseover : function (evt) {
this.$W... | [
"Return",
"a",
"wrapper",
"on",
"the",
"event",
"passed",
"as",
"a",
"parameter",
".",
"The",
"parameter",
"can",
"either",
"be",
"already",
"a",
"wrapper",
"in",
"which",
"case",
"the",
"parameter",
"is",
"returned",
"without",
"other",
"object",
"creation"... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/DomEvent.js#L322-L329 | train | |
ariatemplates/ariatemplates | src/aria/DomEvent.js | function (kc, specials) {
// changed for PTR04462051 as spaces were included and this was breaking the AutoComplete widget.
if (kc > 32 && kc < 41) {
return true; // space, page or arrow
}
if (kc == 8 || kc == 9 || kc == 13 || kc == 27)... | javascript | function (kc, specials) {
// changed for PTR04462051 as spaces were included and this was breaking the AutoComplete widget.
if (kc > 32 && kc < 41) {
return true; // space, page or arrow
}
if (kc == 8 || kc == 9 || kc == 13 || kc == 27)... | [
"function",
"(",
"kc",
",",
"specials",
")",
"{",
"// changed for PTR04462051 as spaces were included and this was breaking the AutoComplete widget.",
"if",
"(",
"kc",
">",
"32",
"&&",
"kc",
"<",
"41",
")",
"{",
"return",
"true",
";",
"// space, page or arrow",
"}",
"... | Static method indicating if a key code corresponds to a special key generally used to navigate or control
the user input
@param {Number} kc the key code (cf. onkeyup/onkeydown)
@param {Object} specials Object that tells if ctrlKey and altKey are pressed
@return {Boolean} true if kc corresponds to a special key | [
"Static",
"method",
"indicating",
"if",
"a",
"key",
"code",
"corresponds",
"to",
"a",
"special",
"key",
"generally",
"used",
"to",
"navigate",
"or",
"control",
"the",
"user",
"input"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/DomEvent.js#L438-L466 | train | |
ariatemplates/ariatemplates | src/aria/DomEvent.js | function (type, target) {
var evt = new aria.DomEvent({
type : type
});
evt.type = type;
evt.target = target;
return evt;
} | javascript | function (type, target) {
var evt = new aria.DomEvent({
type : type
});
evt.type = type;
evt.target = target;
return evt;
} | [
"function",
"(",
"type",
",",
"target",
")",
"{",
"var",
"evt",
"=",
"new",
"aria",
".",
"DomEvent",
"(",
"{",
"type",
":",
"type",
"}",
")",
";",
"evt",
".",
"type",
"=",
"type",
";",
"evt",
".",
"target",
"=",
"target",
";",
"return",
"evt",
... | Returns an object with appropriate
@param {String} type
@param {HTMLElement} target | [
"Returns",
"an",
"object",
"with",
"appropriate"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/DomEvent.js#L489-L496 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/DropDownTextInput.js | function (event) {
// PROFILING // var profilingId = this.$startMeasure("handle key " + String.fromCharCode(event.charCode)
// PROFILING // + " (" + event.charCode + ")");
if (this.controller) {
if (!event.ctrlKey && !event.altKey) {
// we ignore C... | javascript | function (event) {
// PROFILING // var profilingId = this.$startMeasure("handle key " + String.fromCharCode(event.charCode)
// PROFILING // + " (" + event.charCode + ")");
if (this.controller) {
if (!event.ctrlKey && !event.altKey) {
// we ignore C... | [
"function",
"(",
"event",
")",
"{",
"// PROFILING // var profilingId = this.$startMeasure(\"handle key \" + String.fromCharCode(event.charCode)",
"// PROFILING // + \" (\" + event.charCode + \")\");",
"if",
"(",
"this",
".",
"controller",
")",
"{",
"if",
"(",
"!",
"event",
".",
... | Handle key event on keydown or keypress. This function is asynchronous for special keys
@protected
@param {Object|aria.DomEvent} event object containing keyboard event information (at least charCode and
keyCode properties). This object may be or may not be an instance of aria.DomEvent. | [
"Handle",
"key",
"event",
"on",
"keydown",
"or",
"keypress",
".",
"This",
"function",
"is",
"asynchronous",
"for",
"special",
"keys"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/DropDownTextInput.js#L113-L132 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/DropDownTextInput.js | function (event) {
if (this._cfg.waiAria && !this._dropdownPopup && event.keyCode === DomEvent.KC_DOWN) {
// disable arrow down key when waiAria is enabled and the popup is closed
return;
}
var controller = this.controller;
var cp = this.ge... | javascript | function (event) {
if (this._cfg.waiAria && !this._dropdownPopup && event.keyCode === DomEvent.KC_DOWN) {
// disable arrow down key when waiAria is enabled and the popup is closed
return;
}
var controller = this.controller;
var cp = this.ge... | [
"function",
"(",
"event",
")",
"{",
"if",
"(",
"this",
".",
"_cfg",
".",
"waiAria",
"&&",
"!",
"this",
".",
"_dropdownPopup",
"&&",
"event",
".",
"keyCode",
"===",
"DomEvent",
".",
"KC_DOWN",
")",
"{",
"// disable arrow down key when waiAria is enabled and the p... | Handle key event on keydown or keypress. Synchronous function
@see _handleKey
@protected
@param {Object|aria.DomEvent} event object containing keyboard event information (at least charCode and
keyCode properties). This object may be or may not be an instance of aria.DomEvent. | [
"Handle",
"key",
"event",
"on",
"keydown",
"or",
"keypress",
".",
"Synchronous",
"function"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/DropDownTextInput.js#L141-L163 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/DropDownTextInput.js | function (event) {
var browser = ariaCoreBrowser;
if (browser.isAndroid && browser.isChrome && !event.isSpecialKey && event.keyCode == 229) {
event.charCode = 0;
this._handleKey(event);
}
this.$TextInput._dom_onkeyup.call(this, event);
... | javascript | function (event) {
var browser = ariaCoreBrowser;
if (browser.isAndroid && browser.isChrome && !event.isSpecialKey && event.keyCode == 229) {
event.charCode = 0;
this._handleKey(event);
}
this.$TextInput._dom_onkeyup.call(this, event);
... | [
"function",
"(",
"event",
")",
"{",
"var",
"browser",
"=",
"ariaCoreBrowser",
";",
"if",
"(",
"browser",
".",
"isAndroid",
"&&",
"browser",
".",
"isChrome",
"&&",
"!",
"event",
".",
"isSpecialKey",
"&&",
"event",
".",
"keyCode",
"==",
"229",
")",
"{",
... | Internal method to handle the keyup event. It is needed because in some cases the keypress event is not
raised
@protected
@param {aria.DomEvent} event | [
"Internal",
"method",
"to",
"handle",
"the",
"keyup",
"event",
".",
"It",
"is",
"needed",
"because",
"in",
"some",
"cases",
"the",
"keypress",
"event",
"is",
"not",
"raised"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/DropDownTextInput.js#L186-L193 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/DropDownTextInput.js | function () {
var touchFocusSpan = this._touchFocusSpan;
if (!touchFocusSpan) {
touchFocusSpan = this._touchFocusSpan = Aria.$window.document.createElement("span");
touchFocusSpan.setAttribute("tabIndex", "-1");
var widgetDomElt = this.getDom();
... | javascript | function () {
var touchFocusSpan = this._touchFocusSpan;
if (!touchFocusSpan) {
touchFocusSpan = this._touchFocusSpan = Aria.$window.document.createElement("span");
touchFocusSpan.setAttribute("tabIndex", "-1");
var widgetDomElt = this.getDom();
... | [
"function",
"(",
")",
"{",
"var",
"touchFocusSpan",
"=",
"this",
".",
"_touchFocusSpan",
";",
"if",
"(",
"!",
"touchFocusSpan",
")",
"{",
"touchFocusSpan",
"=",
"this",
".",
"_touchFocusSpan",
"=",
"Aria",
".",
"$window",
".",
"document",
".",
"createElement... | This method focuses the widget without making the virtual keyboard appear on touch devices. | [
"This",
"method",
"focuses",
"the",
"widget",
"without",
"making",
"the",
"virtual",
"keyboard",
"appear",
"on",
"touch",
"devices",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/DropDownTextInput.js#L290-L299 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/DropDownTextInput.js | function (evt) {
var domEvent = evt.domEvent;
if (domEvent.target == this.getTextInputField()) {
// Clicking on the input should directly give the focus to the input.
// Setting this boolean to false prevents the focus from being given
// to this._... | javascript | function (evt) {
var domEvent = evt.domEvent;
if (domEvent.target == this.getTextInputField()) {
// Clicking on the input should directly give the focus to the input.
// Setting this boolean to false prevents the focus from being given
// to this._... | [
"function",
"(",
"evt",
")",
"{",
"var",
"domEvent",
"=",
"evt",
".",
"domEvent",
";",
"if",
"(",
"domEvent",
".",
"target",
"==",
"this",
".",
"getTextInputField",
"(",
")",
")",
"{",
"// Clicking on the input should directly give the focus to the input.",
"// Se... | Callback for the event onMouseClickClose raised by the popup.
@protected | [
"Callback",
"for",
"the",
"event",
"onMouseClickClose",
"raised",
"by",
"the",
"popup",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/DropDownTextInput.js#L305-L315 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/DropDownTextInput.js | function () {
var dropDownIcon = this._dropDownIcon;
if (!dropDownIcon && this._frame && this._frame.getIcon) {
dropDownIcon = this._dropDownIcon = this._frame.getIcon("dropdown");
}
return dropDownIcon;
} | javascript | function () {
var dropDownIcon = this._dropDownIcon;
if (!dropDownIcon && this._frame && this._frame.getIcon) {
dropDownIcon = this._dropDownIcon = this._frame.getIcon("dropdown");
}
return dropDownIcon;
} | [
"function",
"(",
")",
"{",
"var",
"dropDownIcon",
"=",
"this",
".",
"_dropDownIcon",
";",
"if",
"(",
"!",
"dropDownIcon",
"&&",
"this",
".",
"_frame",
"&&",
"this",
".",
"_frame",
".",
"getIcon",
")",
"{",
"dropDownIcon",
"=",
"this",
".",
"_dropDownIcon... | Return the dropdown icon
@protected | [
"Return",
"the",
"dropdown",
"icon"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/DropDownTextInput.js#L321-L327 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/Select.js | function () {
this._hasFocus = false;
this._updateState();
if (this._cfg.formatError && this._cfg.validationEvent === 'onBlur') {// show
// errortip on blur used for debug purposes
this._validationPopupShow();
} else { // dispose of error t... | javascript | function () {
this._hasFocus = false;
this._updateState();
if (this._cfg.formatError && this._cfg.validationEvent === 'onBlur') {// show
// errortip on blur used for debug purposes
this._validationPopupShow();
} else { // dispose of error t... | [
"function",
"(",
")",
"{",
"this",
".",
"_hasFocus",
"=",
"false",
";",
"this",
".",
"_updateState",
"(",
")",
";",
"if",
"(",
"this",
".",
"_cfg",
".",
"formatError",
"&&",
"this",
".",
"_cfg",
".",
"validationEvent",
"===",
"'onBlur'",
")",
"{",
"/... | Internal method to handle the blur event
@protected
@param {aria.DomEvent} event Blur event | [
"Internal",
"method",
"to",
"handle",
"the",
"blur",
"event"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Select.js#L218-L246 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/Select.js | function (evt) {
var target = evt.target;
var inputDomElt = this._getInputMarkupDomElt();
if (this.controller && ariaUtilsDom.isAncestor(target, inputDomElt)) {
this._toggleDropdown();
evt.preventDefault(); // prevent the selection of the text when cli... | javascript | function (evt) {
var target = evt.target;
var inputDomElt = this._getInputMarkupDomElt();
if (this.controller && ariaUtilsDom.isAncestor(target, inputDomElt)) {
this._toggleDropdown();
evt.preventDefault(); // prevent the selection of the text when cli... | [
"function",
"(",
"evt",
")",
"{",
"var",
"target",
"=",
"evt",
".",
"target",
";",
"var",
"inputDomElt",
"=",
"this",
".",
"_getInputMarkupDomElt",
"(",
")",
";",
"if",
"(",
"this",
".",
"controller",
"&&",
"ariaUtilsDom",
".",
"isAncestor",
"(",
"target... | Internal method to handle the mousedown event
@protected
@param {aria.DomEvent} event Mouse down event | [
"Internal",
"method",
"to",
"handle",
"the",
"mousedown",
"event"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Select.js#L269-L276 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/Select.js | function (event) {
var domEvent = aria.DomEvent;
if (event.keyCode === domEvent.KC_ENTER) {
this._updateValue(false);
}
this.$DropDownInput._dom_onkeypress.call(this, event);
} | javascript | function (event) {
var domEvent = aria.DomEvent;
if (event.keyCode === domEvent.KC_ENTER) {
this._updateValue(false);
}
this.$DropDownInput._dom_onkeypress.call(this, event);
} | [
"function",
"(",
"event",
")",
"{",
"var",
"domEvent",
"=",
"aria",
".",
"DomEvent",
";",
"if",
"(",
"event",
".",
"keyCode",
"===",
"domEvent",
".",
"KC_ENTER",
")",
"{",
"this",
".",
"_updateValue",
"(",
"false",
")",
";",
"}",
"this",
".",
"$DropD... | Internal method to handle the keypress event
@protected
@param {aria.DomEvent} event Key press event | [
"Internal",
"method",
"to",
"handle",
"the",
"keypress",
"event"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Select.js#L301-L307 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/Select.js | function (includeController) {
var hasChanged = null;
if (this._skinObj.simpleHTML) {
hasChanged = this.setProperty("value", this.getSelectField().value);
} else if (includeController) {
var controller = this.controller;
var dataModel =... | javascript | function (includeController) {
var hasChanged = null;
if (this._skinObj.simpleHTML) {
hasChanged = this.setProperty("value", this.getSelectField().value);
} else if (includeController) {
var controller = this.controller;
var dataModel =... | [
"function",
"(",
"includeController",
")",
"{",
"var",
"hasChanged",
"=",
"null",
";",
"if",
"(",
"this",
".",
"_skinObj",
".",
"simpleHTML",
")",
"{",
"hasChanged",
"=",
"this",
".",
"setProperty",
"(",
"\"value\"",
",",
"this",
".",
"getSelectField",
"("... | Copies the value from the widget to the data model.
@param {Boolean} includeController whether to copy the value from the controller to the data model.
@protected | [
"Copies",
"the",
"value",
"from",
"the",
"widget",
"to",
"the",
"data",
"model",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Select.js#L327-L351 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/Select.js | function (out) {
var cfg = this._cfg;
var width = this._frame.innerWidth;
var disabledOrReadonly = cfg.disabled || cfg.readOnly;
var tabIndex = disabledOrReadonly ? '' : ' tabindex="' + this._calculateTabIndex() + '"';
if (this._skinObj.simpleHTML) {
... | javascript | function (out) {
var cfg = this._cfg;
var width = this._frame.innerWidth;
var disabledOrReadonly = cfg.disabled || cfg.readOnly;
var tabIndex = disabledOrReadonly ? '' : ' tabindex="' + this._calculateTabIndex() + '"';
if (this._skinObj.simpleHTML) {
... | [
"function",
"(",
"out",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"var",
"width",
"=",
"this",
".",
"_frame",
".",
"innerWidth",
";",
"var",
"disabledOrReadonly",
"=",
"cfg",
".",
"disabled",
"||",
"cfg",
".",
"readOnly",
";",
"var",
"ta... | Creates the markup for the select for both the simple HTML and AT skin versions.
@param {aria.templates.MarkupWriter} out Markup writer
@protected | [
"Creates",
"the",
"markup",
"for",
"the",
"select",
"for",
"both",
"the",
"simple",
"HTML",
"and",
"AT",
"skin",
"versions",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Select.js#L369-L411 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/Select.js | function (propertyName, newValue, oldValue) {
if (propertyName === 'value') {
this._checkValue();// checks the value changed in the data model is a valid value from the select
// options
if (this.controller) {
var report = this.controller.c... | javascript | function (propertyName, newValue, oldValue) {
if (propertyName === 'value') {
this._checkValue();// checks the value changed in the data model is a valid value from the select
// options
if (this.controller) {
var report = this.controller.c... | [
"function",
"(",
"propertyName",
",",
"newValue",
",",
"oldValue",
")",
"{",
"if",
"(",
"propertyName",
"===",
"'value'",
")",
"{",
"this",
".",
"_checkValue",
"(",
")",
";",
"// checks the value changed in the data model is a valid value from the select",
"// options",... | Internal method called when the value property that the select is bound to has changed.
@param {String} propertyName the property name
@param {Object} newValue the new value
@param {Object} oldValue the old property value
@protected | [
"Internal",
"method",
"called",
"when",
"the",
"value",
"property",
"that",
"the",
"select",
"is",
"bound",
"to",
"has",
"changed",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Select.js#L420-L487 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/Select.js | function (value) {
var selectField = this.getSelectField();
var options = selectField.options;
for (var i = 0; i < options.length; i++) {
var option = options[i];
if (option.value === value) {
option.selected = true;
... | javascript | function (value) {
var selectField = this.getSelectField();
var options = selectField.options;
for (var i = 0; i < options.length; i++) {
var option = options[i];
if (option.value === value) {
option.selected = true;
... | [
"function",
"(",
"value",
")",
"{",
"var",
"selectField",
"=",
"this",
".",
"getSelectField",
"(",
")",
";",
"var",
"options",
"=",
"selectField",
".",
"options",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"options",
".",
"length",
";",
... | Set the 'selected' attribut on each options to true or false depending on the value
@param {String} value The value to compare
@private | [
"Set",
"the",
"selected",
"attribut",
"on",
"each",
"options",
"to",
"true",
"or",
"false",
"depending",
"on",
"the",
"value"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/Select.js#L494-L507 | train | |
ariatemplates/ariatemplates | src/aria/utils/History.js | function (title) {
var document = window.document;
if (ariaUtilsType.isString(title)) {
document.title = title;
} else {
title = document.title;
}
return title;
} | javascript | function (title) {
var document = window.document;
if (ariaUtilsType.isString(title)) {
document.title = title;
} else {
title = document.title;
}
return title;
} | [
"function",
"(",
"title",
")",
"{",
"var",
"document",
"=",
"window",
".",
"document",
";",
"if",
"(",
"ariaUtilsType",
".",
"isString",
"(",
"title",
")",
")",
"{",
"document",
".",
"title",
"=",
"title",
";",
"}",
"else",
"{",
"title",
"=",
"docume... | Set the title of the page.
@param {String} title
@return {String} Actual title of the page. If no argument is provided, it represents the actual title of
the page
@private | [
"Set",
"the",
"title",
"of",
"the",
"page",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/History.js#L361-L369 | train | |
ariatemplates/ariatemplates | src/aria/utils/History.js | function () {
stateMemory.discarded = [];
if (this._isIE7OrLess) {
stateMemory.states = [stateMemory.states[this._currentPos]];
return;
}
var states = stateMemory.states;
var expirationTime = ((new Da... | javascript | function () {
stateMemory.discarded = [];
if (this._isIE7OrLess) {
stateMemory.states = [stateMemory.states[this._currentPos]];
return;
}
var states = stateMemory.states;
var expirationTime = ((new Da... | [
"function",
"(",
")",
"{",
"stateMemory",
".",
"discarded",
"=",
"[",
"]",
";",
"if",
"(",
"this",
".",
"_isIE7OrLess",
")",
"{",
"stateMemory",
".",
"states",
"=",
"[",
"stateMemory",
".",
"states",
"[",
"this",
".",
"_currentPos",
"]",
"]",
";",
"r... | Remove old states that are present in the state store. States are considered old if they have been stored
more than aria.utils.History.EXPIRATION_TIME seconds before
@private | [
"Remove",
"old",
"states",
"that",
"are",
"present",
"in",
"the",
"state",
"store",
".",
"States",
"are",
"considered",
"old",
"if",
"they",
"have",
"been",
"stored",
"more",
"than",
"aria",
".",
"utils",
".",
"History",
".",
"EXPIRATION_TIME",
"seconds",
... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/History.js#L449-L463 | train | |
ariatemplates/ariatemplates | src/aria/utils/History.js | function (evt) {
var state = ariaUtilsJson.copy(evt.state), title;
if (state && state.__info) {
title = state.__info.title;
delete state.__info;
} else {
var stateInfo = this._retrieveFromMemory();
... | javascript | function (evt) {
var state = ariaUtilsJson.copy(evt.state), title;
if (state && state.__info) {
title = state.__info.title;
delete state.__info;
} else {
var stateInfo = this._retrieveFromMemory();
... | [
"function",
"(",
"evt",
")",
"{",
"var",
"state",
"=",
"ariaUtilsJson",
".",
"copy",
"(",
"evt",
".",
"state",
")",
",",
"title",
";",
"if",
"(",
"state",
"&&",
"state",
".",
"__info",
")",
"{",
"title",
"=",
"state",
".",
"__info",
".",
"title",
... | Methods that are specific to browsers that support HTML5 history API.
React to native onpopstate event by setting the title and raising the onpopstate class event. Only used
in browsers that support HTML5 history API.
@param {Object} Event object
@private | [
"Methods",
"that",
"are",
"specific",
"to",
"browsers",
"that",
"support",
"HTML5",
"history",
"API",
".",
"React",
"to",
"native",
"onpopstate",
"event",
"by",
"setting",
"the",
"title",
"and",
"raising",
"the",
"onpopstate",
"class",
"event",
".",
"Only",
... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/History.js#L473-L490 | train | |
ariatemplates/ariatemplates | src/aria/utils/History.js | function () {
var stateInfo = this._retrieveFromMemory();
var id = stateInfo ? stateInfo.state.id : null;
if (id && this._currentId != id && this._applyState(stateInfo)) {
this.state = this.getState();
this.$raiseEvent({
... | javascript | function () {
var stateInfo = this._retrieveFromMemory();
var id = stateInfo ? stateInfo.state.id : null;
if (id && this._currentId != id && this._applyState(stateInfo)) {
this.state = this.getState();
this.$raiseEvent({
... | [
"function",
"(",
")",
"{",
"var",
"stateInfo",
"=",
"this",
".",
"_retrieveFromMemory",
"(",
")",
";",
"var",
"id",
"=",
"stateInfo",
"?",
"stateInfo",
".",
"state",
".",
"id",
":",
"null",
";",
"if",
"(",
"id",
"&&",
"this",
".",
"_currentId",
"!=",... | React to a hash change by retrieving the state from the store and raising the onpopstate event.
@private | [
"React",
"to",
"a",
"hash",
"change",
"by",
"retrieving",
"the",
"state",
"from",
"the",
"store",
"and",
"raising",
"the",
"onpopstate",
"event",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/History.js#L512-L522 | train | |
ariatemplates/ariatemplates | src/aria/widgets/frames/FrameWithIcons.js | function (cfg) {
var skinObject = cfg.skinObject;
this._baseId = cfg.id;
this._skinObject = skinObject;
this._stateName = cfg.state;
this._iconsLeft = cfg.iconsLeft;
this._iconsRight = cfg.iconsRight;
this._icons = {};
/**
* Labels for the to... | javascript | function (cfg) {
var skinObject = cfg.skinObject;
this._baseId = cfg.id;
this._skinObject = skinObject;
this._stateName = cfg.state;
this._iconsLeft = cfg.iconsLeft;
this._iconsRight = cfg.iconsRight;
this._icons = {};
/**
* Labels for the to... | [
"function",
"(",
"cfg",
")",
"{",
"var",
"skinObject",
"=",
"cfg",
".",
"skinObject",
";",
"this",
".",
"_baseId",
"=",
"cfg",
".",
"id",
";",
"this",
".",
"_skinObject",
"=",
"skinObject",
";",
"this",
".",
"_stateName",
"=",
"cfg",
".",
"state",
";... | FrameWithIcons constructor. Do not use directly, use the createFrame static method instead, so that the
FrameWithIcons is not used when there is no icon defined in the skin.
@private | [
"FrameWithIcons",
"constructor",
".",
"Do",
"not",
"use",
"directly",
"use",
"the",
"createFrame",
"static",
"method",
"instead",
"so",
"that",
"the",
"FrameWithIcons",
"is",
"not",
"used",
"when",
"there",
"is",
"no",
"icon",
"defined",
"in",
"the",
"skin",
... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/frames/FrameWithIcons.js#L36-L73 | train | |
ariatemplates/ariatemplates | src/aria/widgets/frames/FrameWithIcons.js | function (skinObject, hideIconNames) {
// normalize the skin:
if (skinObject.iconsLeft == null || skinObject.iconsLeft === "") {
skinObject.iconsLeft = [];
} else if (ariaUtilsType.isString(skinObject.iconsLeft)) {
skinObject.iconsLeft = skinObject.ico... | javascript | function (skinObject, hideIconNames) {
// normalize the skin:
if (skinObject.iconsLeft == null || skinObject.iconsLeft === "") {
skinObject.iconsLeft = [];
} else if (ariaUtilsType.isString(skinObject.iconsLeft)) {
skinObject.iconsLeft = skinObject.ico... | [
"function",
"(",
"skinObject",
",",
"hideIconNames",
")",
"{",
"// normalize the skin:",
"if",
"(",
"skinObject",
".",
"iconsLeft",
"==",
"null",
"||",
"skinObject",
".",
"iconsLeft",
"===",
"\"\"",
")",
"{",
"skinObject",
".",
"iconsLeft",
"=",
"[",
"]",
";... | Computes the icons and returns the information about if the frame has icons or not.
@param {Object} skinObject Skin class object
@param {Array} hideIconNames Icons to be hidden
@return {Object} | [
"Computes",
"the",
"icons",
"and",
"returns",
"the",
"information",
"about",
"if",
"the",
"frame",
"has",
"icons",
"or",
"not",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/frames/FrameWithIcons.js#L164-L185 | train | |
ariatemplates/ariatemplates | src/aria/widgets/frames/FrameWithIcons.js | function (iconsList, iconNames) {
if (iconNames && iconNames.length > 0) {
var icons = [];
ariaUtilsArray.forEach(iconsList, function (item, i) {
if (!ariaUtilsArray.contains(iconNames, iconsList[i])) {
icons.push(iconsList[i]);
... | javascript | function (iconsList, iconNames) {
if (iconNames && iconNames.length > 0) {
var icons = [];
ariaUtilsArray.forEach(iconsList, function (item, i) {
if (!ariaUtilsArray.contains(iconNames, iconsList[i])) {
icons.push(iconsList[i]);
... | [
"function",
"(",
"iconsList",
",",
"iconNames",
")",
"{",
"if",
"(",
"iconNames",
"&&",
"iconNames",
".",
"length",
">",
"0",
")",
"{",
"var",
"icons",
"=",
"[",
"]",
";",
"ariaUtilsArray",
".",
"forEach",
"(",
"iconsList",
",",
"function",
"(",
"item"... | Does the filtering of icons
@param {Array} iconsList Icons to be displayed left or right
@param {Array} iconNames Icons to be removed from iconsList
@return {Array} | [
"Does",
"the",
"filtering",
"of",
"icons"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/frames/FrameWithIcons.js#L192-L203 | train | |
ariatemplates/ariatemplates | src/aria/widgets/frames/FrameWithIcons.js | function (out) {
var oSelf = this;
ariaUtilsArray.forEach(this._iconsLeft, function (value) {
oSelf._writeIcon(value, out);
});
this._frame.writeMarkupBegin(out);
} | javascript | function (out) {
var oSelf = this;
ariaUtilsArray.forEach(this._iconsLeft, function (value) {
oSelf._writeIcon(value, out);
});
this._frame.writeMarkupBegin(out);
} | [
"function",
"(",
"out",
")",
"{",
"var",
"oSelf",
"=",
"this",
";",
"ariaUtilsArray",
".",
"forEach",
"(",
"this",
".",
"_iconsLeft",
",",
"function",
"(",
"value",
")",
"{",
"oSelf",
".",
"_writeIcon",
"(",
"value",
",",
"out",
")",
";",
"}",
")",
... | Generate the begining of the markup for the frame.
@param {aria.templates.MarkupWriter} out | [
"Generate",
"the",
"begining",
"of",
"the",
"markup",
"for",
"the",
"frame",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/frames/FrameWithIcons.js#L228-L234 | train | |
ariatemplates/ariatemplates | src/aria/widgets/frames/FrameWithIcons.js | function (iconName) {
this._icons[iconName].domElts = null;
ariaUtilsDelegate.remove(this._icons[iconName].iconDelegateId);
this._icons[iconName] = null;
delete this._icons[iconName];
} | javascript | function (iconName) {
this._icons[iconName].domElts = null;
ariaUtilsDelegate.remove(this._icons[iconName].iconDelegateId);
this._icons[iconName] = null;
delete this._icons[iconName];
} | [
"function",
"(",
"iconName",
")",
"{",
"this",
".",
"_icons",
"[",
"iconName",
"]",
".",
"domElts",
"=",
"null",
";",
"ariaUtilsDelegate",
".",
"remove",
"(",
"this",
".",
"_icons",
"[",
"iconName",
"]",
".",
"iconDelegateId",
")",
";",
"this",
".",
"_... | Destroy dom links for a given icon
@param {String} iconName | [
"Destroy",
"dom",
"links",
"for",
"a",
"given",
"icon"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/frames/FrameWithIcons.js#L304-L309 | train | |
ariatemplates/ariatemplates | src/aria/widgets/frames/FrameWithIcons.js | function () {
var param = {
width : 0,
activeIconIndex : 0
}, oSelf = this;
ariaUtilsArray.forEach(this._iconsLeft, function (value) {
oSelf._computeIconSize(value, param);
});
ariaUtilsArray.forEach(this._iconsR... | javascript | function () {
var param = {
width : 0,
activeIconIndex : 0
}, oSelf = this;
ariaUtilsArray.forEach(this._iconsLeft, function (value) {
oSelf._computeIconSize(value, param);
});
ariaUtilsArray.forEach(this._iconsR... | [
"function",
"(",
")",
"{",
"var",
"param",
"=",
"{",
"width",
":",
"0",
",",
"activeIconIndex",
":",
"0",
"}",
",",
"oSelf",
"=",
"this",
";",
"ariaUtilsArray",
".",
"forEach",
"(",
"this",
".",
"_iconsLeft",
",",
"function",
"(",
"value",
")",
"{",
... | Updates this._iconsWidth and the iconInfo property for all icons, based on the current state.
@protected | [
"Updates",
"this",
".",
"_iconsWidth",
"and",
"the",
"iconInfo",
"property",
"for",
"all",
"icons",
"based",
"on",
"the",
"current",
"state",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/frames/FrameWithIcons.js#L315-L327 | train | |
ariatemplates/ariatemplates | src/aria/widgets/frames/FrameWithIcons.js | function () {
var outerWidth = this._outerWidth;
var newValue;
if (outerWidth < 0) {
newValue = -1;
} else {
newValue = outerWidth - this._iconsWidth;
if (newValue < 0) {
newValue = 0;
}
... | javascript | function () {
var outerWidth = this._outerWidth;
var newValue;
if (outerWidth < 0) {
newValue = -1;
} else {
newValue = outerWidth - this._iconsWidth;
if (newValue < 0) {
newValue = 0;
}
... | [
"function",
"(",
")",
"{",
"var",
"outerWidth",
"=",
"this",
".",
"_outerWidth",
";",
"var",
"newValue",
";",
"if",
"(",
"outerWidth",
"<",
"0",
")",
"{",
"newValue",
"=",
"-",
"1",
";",
"}",
"else",
"{",
"newValue",
"=",
"outerWidth",
"-",
"this",
... | Updates the value of this._frameWidth, based on the value of this._outerWidth and this._iconsWidth.
@return {Boolean} true if the frame width changed
@protected | [
"Updates",
"the",
"value",
"of",
"this",
".",
"_frameWidth",
"based",
"on",
"the",
"value",
"of",
"this",
".",
"_outerWidth",
"and",
"this",
".",
"_iconsWidth",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/frames/FrameWithIcons.js#L334-L350 | train | |
ariatemplates/ariatemplates | src/aria/widgets/frames/FrameWithIcons.js | function (icon, param) {
var stateObject = this.getStateObject();
var iconParts = stateObject.icons[icon].split(":");
var iconInfo = ariaWidgetsAriaSkinInterface.getIcon(iconParts[0], iconParts[1]);
var active = stateObject.icons[icon + "IsActive"];
if (iconIn... | javascript | function (icon, param) {
var stateObject = this.getStateObject();
var iconParts = stateObject.icons[icon].split(":");
var iconInfo = ariaWidgetsAriaSkinInterface.getIcon(iconParts[0], iconParts[1]);
var active = stateObject.icons[icon + "IsActive"];
if (iconIn... | [
"function",
"(",
"icon",
",",
"param",
")",
"{",
"var",
"stateObject",
"=",
"this",
".",
"getStateObject",
"(",
")",
";",
"var",
"iconParts",
"=",
"stateObject",
".",
"icons",
"[",
"icon",
"]",
".",
"split",
"(",
"\":\"",
")",
";",
"var",
"iconInfo",
... | Compute the size of the given icon, after updating its iconInfo property based on the current state.
@protected | [
"Compute",
"the",
"size",
"of",
"the",
"given",
"icon",
"after",
"updating",
"its",
"iconInfo",
"property",
"based",
"on",
"the",
"current",
"state",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/frames/FrameWithIcons.js#L356-L371 | train | |
ariatemplates/ariatemplates | src/aria/widgets/frames/FrameWithIcons.js | function (iconInfo, active) {
// TODO: mutualize with the icon widget
var style = ['padding:0;display:inline-block;background-position:-', iconInfo.iconLeft, 'px -',
iconInfo.iconTop, 'px;width:', iconInfo.width, 'px;height:', iconInfo.height,
'px;vertical... | javascript | function (iconInfo, active) {
// TODO: mutualize with the icon widget
var style = ['padding:0;display:inline-block;background-position:-', iconInfo.iconLeft, 'px -',
iconInfo.iconTop, 'px;width:', iconInfo.width, 'px;height:', iconInfo.height,
'px;vertical... | [
"function",
"(",
"iconInfo",
",",
"active",
")",
"{",
"// TODO: mutualize with the icon widget",
"var",
"style",
"=",
"[",
"'padding:0;display:inline-block;background-position:-'",
",",
"iconInfo",
".",
"iconLeft",
",",
"'px -'",
",",
"iconInfo",
".",
"iconTop",
",",
... | Return icon style as a string
@protected
@param {Object} iconInfo
@param {Boolean} active
@return {String} | [
"Return",
"icon",
"style",
"as",
"a",
"string"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/frames/FrameWithIcons.js#L430-L439 | train | |
ariatemplates/ariatemplates | src/aria/widgets/frames/FrameWithIcons.js | function (event, iconName) {
var eventType = event.type;
if (eventType == "safetap" && !registerSafeTap(event)) {
// $SafeTap does not load the SafeTap class on non-touch devices
// however, that class may be loaded for any other reason, in which case
... | javascript | function (event, iconName) {
var eventType = event.type;
if (eventType == "safetap" && !registerSafeTap(event)) {
// $SafeTap does not load the SafeTap class on non-touch devices
// however, that class may be loaded for any other reason, in which case
... | [
"function",
"(",
"event",
",",
"iconName",
")",
"{",
"var",
"eventType",
"=",
"event",
".",
"type",
";",
"if",
"(",
"eventType",
"==",
"\"safetap\"",
"&&",
"!",
"registerSafeTap",
"(",
"event",
")",
")",
"{",
"// $SafeTap does not load the SafeTap class on non-t... | Delegate Icon event
@param {aria.DomEvent} event
@param {String} iconName | [
"Delegate",
"Icon",
"event"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/frames/FrameWithIcons.js#L493-L510 | train | |
ariatemplates/ariatemplates | src/aria/utils/Bridge.js | function (config, options) {
if (this._subWindow) {
if (this._subWindow.closed) {
// we probably did not catch correctly the unload event
this.close();
} else {
// TODO: log error
return;
... | javascript | function (config, options) {
if (this._subWindow) {
if (this._subWindow.closed) {
// we probably did not catch correctly the unload event
this.close();
} else {
// TODO: log error
return;
... | [
"function",
"(",
"config",
",",
"options",
")",
"{",
"if",
"(",
"this",
".",
"_subWindow",
")",
"{",
"if",
"(",
"this",
".",
"_subWindow",
".",
"closed",
")",
"{",
"// we probably did not catch correctly the unload event",
"this",
".",
"close",
"(",
")",
";"... | Create external display with given module controller classpath
@param {Object} config moduleControllerClasspath, displayClasspath, skinPath and title
@param {String} options for opening the subwindow. Default is "width=1024, height=800" | [
"Create",
"external",
"display",
"with",
"given",
"module",
"controller",
"classpath"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Bridge.js#L90-L149 | train | |
ariatemplates/ariatemplates | src/aria/utils/Bridge.js | function () {
// start working in subwindow
var Aria = this._subWindow.Aria, aria = this._subWindow.aria;
// link the url map and the root map in the sub-window
// to the corresponding maps in the main window:
Aria.rootFolderPath = this.getAria().rootFolderPat... | javascript | function () {
// start working in subwindow
var Aria = this._subWindow.Aria, aria = this._subWindow.aria;
// link the url map and the root map in the sub-window
// to the corresponding maps in the main window:
Aria.rootFolderPath = this.getAria().rootFolderPat... | [
"function",
"(",
")",
"{",
"// start working in subwindow",
"var",
"Aria",
"=",
"this",
".",
"_subWindow",
".",
"Aria",
",",
"aria",
"=",
"this",
".",
"_subWindow",
".",
"aria",
";",
"// link the url map and the root map in the sub-window",
"// to the corresponding maps... | Function called from the sub window to start the module | [
"Function",
"called",
"from",
"the",
"sub",
"window",
"to",
"start",
"the",
"module"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Bridge.js#L189-L212 | train | |
ariatemplates/ariatemplates | src/aria/utils/Bridge.js | function () {
// continue working in subwindow
// var Aria = this._subWindow.Aria;
var aria = this._subWindow.aria;
// creates module instance first to be able to dispose it when window close
var self = this;
aria.templates.ModuleCtrlFactory.create... | javascript | function () {
// continue working in subwindow
// var Aria = this._subWindow.Aria;
var aria = this._subWindow.aria;
// creates module instance first to be able to dispose it when window close
var self = this;
aria.templates.ModuleCtrlFactory.create... | [
"function",
"(",
")",
"{",
"// continue working in subwindow",
"// var Aria = this._subWindow.Aria;",
"var",
"aria",
"=",
"this",
".",
"_subWindow",
".",
"aria",
";",
"// creates module instance first to be able to dispose it when window close",
"var",
"self",
"=",
"this",
";... | Called when templates package is ready. It will create associated module.
@protected | [
"Called",
"when",
"templates",
"package",
"is",
"ready",
".",
"It",
"will",
"create",
"associated",
"module",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Bridge.js#L218-L239 | train | |
ariatemplates/ariatemplates | src/aria/utils/Bridge.js | function (moduleCtrlObject) {
// finish working in subwindow
var Aria = this._subWindow.Aria; // , aria = this._subWindow.aria;
var moduleCtrl = moduleCtrlObject.moduleCtrlPrivate;
Aria.loadTemplate({
classpath : this._config.displayClasspath,
... | javascript | function (moduleCtrlObject) {
// finish working in subwindow
var Aria = this._subWindow.Aria; // , aria = this._subWindow.aria;
var moduleCtrl = moduleCtrlObject.moduleCtrlPrivate;
Aria.loadTemplate({
classpath : this._config.displayClasspath,
... | [
"function",
"(",
"moduleCtrlObject",
")",
"{",
"// finish working in subwindow",
"var",
"Aria",
"=",
"this",
".",
"_subWindow",
".",
"Aria",
";",
"// , aria = this._subWindow.aria;",
"var",
"moduleCtrl",
"=",
"moduleCtrlObject",
".",
"moduleCtrlPrivate",
";",
"Aria",
... | Callback when module source is loaded
@param {Object} moduleCtrl and moduleCtrlPrivate
@protected | [
"Callback",
"when",
"module",
"source",
"is",
"loaded"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Bridge.js#L246-L266 | train | |
ariatemplates/ariatemplates | src/aria/utils/Bridge.js | function () {
var subWindow = this._subWindow;
if (subWindow) {
this._subWindow = null;
if (!subWindow.closed) {
if (this._rootTplCtxtRef) {
this._rootTplCtxtRef.$dispose();
}
if (... | javascript | function () {
var subWindow = this._subWindow;
if (subWindow) {
this._subWindow = null;
if (!subWindow.closed) {
if (this._rootTplCtxtRef) {
this._rootTplCtxtRef.$dispose();
}
if (... | [
"function",
"(",
")",
"{",
"var",
"subWindow",
"=",
"this",
".",
"_subWindow",
";",
"if",
"(",
"subWindow",
")",
"{",
"this",
".",
"_subWindow",
"=",
"null",
";",
"if",
"(",
"!",
"subWindow",
".",
"closed",
")",
"{",
"if",
"(",
"this",
".",
"_rootT... | Close subwindow and restore environment | [
"Close",
"subwindow",
"and",
"restore",
"environment"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Bridge.js#L279-L300 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/CheckBox.js | function () {
var cfg = this._cfg;
return ariaCoreBrowser.isIE11 && cfg.waiAria && cfg.disabled && this._isChecked() && cfg._inputType === "checkbox";
} | javascript | function () {
var cfg = this._cfg;
return ariaCoreBrowser.isIE11 && cfg.waiAria && cfg.disabled && this._isChecked() && cfg._inputType === "checkbox";
} | [
"function",
"(",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"return",
"ariaCoreBrowser",
".",
"isIE11",
"&&",
"cfg",
".",
"waiAria",
"&&",
"cfg",
".",
"disabled",
"&&",
"this",
".",
"_isChecked",
"(",
")",
"&&",
"cfg",
".",
"_inputType",
... | Returns true if it is needed to use the work-around for a bug in IE 11 with screen readers.
@param {Boolean} true if the work-around is needed | [
"Returns",
"true",
"if",
"it",
"is",
"needed",
"to",
"use",
"the",
"work",
"-",
"around",
"for",
"a",
"bug",
"in",
"IE",
"11",
"with",
"screen",
"readers",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/CheckBox.js#L103-L106 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/CheckBox.js | function (hasIds, visible) {
var cfg = this._cfg;
var waiAria = cfg.waiAria;
var markup = ['<input type="', cfg._inputType, '"', ' value="', cfg.value, '"'];
var checked = this._isChecked();
if (checked) {
markup.push(' checked');
}... | javascript | function (hasIds, visible) {
var cfg = this._cfg;
var waiAria = cfg.waiAria;
var markup = ['<input type="', cfg._inputType, '"', ' value="', cfg.value, '"'];
var checked = this._isChecked();
if (checked) {
markup.push(' checked');
}... | [
"function",
"(",
"hasIds",
",",
"visible",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"var",
"waiAria",
"=",
"cfg",
".",
"waiAria",
";",
"var",
"markup",
"=",
"[",
"'<input type=\"'",
",",
"cfg",
".",
"_inputType",
",",
"'\"'",
",",
"' va... | Returns the markup of an input element representing the current state of the widget.
@param {Boolean} hasIds Whether the input should have a name and ids (if configured so).
@param {Boolean} visible Whether the input should be visible (or have the xSROnly class)
@return {String} | [
"Returns",
"the",
"markup",
"of",
"an",
"input",
"element",
"representing",
"the",
"current",
"state",
"of",
"the",
"widget",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/CheckBox.js#L145-L182 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/CheckBox.js | function () {
var newState = this._state;
if (this._icon) {
this._icon.changeIcon(this._getIconName(newState));
}
var inpEl = this._getFocusableElement();
if (inpEl != null) {
var hasWaiWorkaroundMarkup = this._hasWaiWorkarou... | javascript | function () {
var newState = this._state;
if (this._icon) {
this._icon.changeIcon(this._getIconName(newState));
}
var inpEl = this._getFocusableElement();
if (inpEl != null) {
var hasWaiWorkaroundMarkup = this._hasWaiWorkarou... | [
"function",
"(",
")",
"{",
"var",
"newState",
"=",
"this",
".",
"_state",
";",
"if",
"(",
"this",
".",
"_icon",
")",
"{",
"this",
".",
"_icon",
".",
"changeIcon",
"(",
"this",
".",
"_getIconName",
"(",
"newState",
")",
")",
";",
"}",
"var",
"inpEl"... | Internal method to change the state of the checkbox
@protected | [
"Internal",
"method",
"to",
"change",
"the",
"state",
"of",
"the",
"checkbox"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/CheckBox.js#L342-L384 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/CheckBox.js | function () {
var newValue = !this.getProperty("value");
this._cfg.value = newValue;
this.setProperty("value", newValue);
// setProperty on value might destroy the widget
if (this._cfg) {
this._setState();
this._updateDomForStat... | javascript | function () {
var newValue = !this.getProperty("value");
this._cfg.value = newValue;
this.setProperty("value", newValue);
// setProperty on value might destroy the widget
if (this._cfg) {
this._setState();
this._updateDomForStat... | [
"function",
"(",
")",
"{",
"var",
"newValue",
"=",
"!",
"this",
".",
"getProperty",
"(",
"\"value\"",
")",
";",
"this",
".",
"_cfg",
".",
"value",
"=",
"newValue",
";",
"this",
".",
"setProperty",
"(",
"\"value\"",
",",
"newValue",
")",
";",
"// setPro... | Toggles the value of the checkbox and updates states, DOM etc. Typically called when user performs action
that toggles the value
@protected | [
"Toggles",
"the",
"value",
"of",
"the",
"checkbox",
"and",
"updates",
"states",
"DOM",
"etc",
".",
"Typically",
"called",
"when",
"user",
"performs",
"action",
"that",
"toggles",
"the",
"value"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/CheckBox.js#L433-L446 | train | |
ariatemplates/ariatemplates | src/aria/html/DisabledTrait.js | function () {
var bindings = this._cfg.bind;
var binding = bindings.disabled;
if (binding) {
var newValue = this._transform(binding.transform, binding.inside[binding.to], "toWidget");
if (ariaUtilsType.isBoolean(newValue)) {
this._d... | javascript | function () {
var bindings = this._cfg.bind;
var binding = bindings.disabled;
if (binding) {
var newValue = this._transform(binding.transform, binding.inside[binding.to], "toWidget");
if (ariaUtilsType.isBoolean(newValue)) {
this._d... | [
"function",
"(",
")",
"{",
"var",
"bindings",
"=",
"this",
".",
"_cfg",
".",
"bind",
";",
"var",
"binding",
"=",
"bindings",
".",
"disabled",
";",
"if",
"(",
"binding",
")",
"{",
"var",
"newValue",
"=",
"this",
".",
"_transform",
"(",
"binding",
".",... | Initialize the disabled attribute of the widget by taking into account the data model to which it might be
bound. | [
"Initialize",
"the",
"disabled",
"attribute",
"of",
"the",
"widget",
"by",
"taking",
"into",
"account",
"the",
"data",
"model",
"to",
"which",
"it",
"might",
"be",
"bound",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/DisabledTrait.js#L31-L42 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (tree, optionsOrAllDeps, callback, context, debug, skipLogError) {
var options = normalizeOptions(optionsOrAllDeps, context, debug, skipLogError);
this.__buildClass(tree, options, callback);
} | javascript | function (tree, optionsOrAllDeps, callback, context, debug, skipLogError) {
var options = normalizeOptions(optionsOrAllDeps, context, debug, skipLogError);
this.__buildClass(tree, options, callback);
} | [
"function",
"(",
"tree",
",",
"optionsOrAllDeps",
",",
"callback",
",",
"context",
",",
"debug",
",",
"skipLogError",
")",
"{",
"var",
"options",
"=",
"normalizeOptions",
"(",
"optionsOrAllDeps",
",",
"context",
",",
"debug",
",",
"skipLogError",
")",
";",
"... | Parse a debug template from the tree
@param {aria.templates.TreeBeans:Root} tree tree returned by the parser.
@param {aria.templates.CfgBeans:ClassGeneratorCfg} options Options for class generation.
@param {aria.core.CfgBeans:Callback} callback callback the callback description | [
"Parse",
"a",
"debug",
"template",
"from",
"the",
"tree"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L154-L157 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (statements) {
for (var i = 0, len = statements.length; i < len; i += 1) {
var statement = statements[i];
this.STATEMENTS[statement] = this.ALLSTATEMENTS[statement];
}
} | javascript | function (statements) {
for (var i = 0, len = statements.length; i < len; i += 1) {
var statement = statements[i];
this.STATEMENTS[statement] = this.ALLSTATEMENTS[statement];
}
} | [
"function",
"(",
"statements",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"len",
"=",
"statements",
".",
"length",
";",
"i",
"<",
"len",
";",
"i",
"+=",
"1",
")",
"{",
"var",
"statement",
"=",
"statements",
"[",
"i",
"]",
";",
"this",
"."... | Load the list of statements that are allowed for this class generator. The list is specified by the
descendant class aria.templates.TplClassGenerator and aria.templates.CSSClassGenerator
@param {Array} statements List of statements name
@protected | [
"Load",
"the",
"list",
"of",
"statements",
"that",
"are",
"allowed",
"for",
"this",
"class",
"generator",
".",
"The",
"list",
"is",
"specified",
"by",
"the",
"descendant",
"class",
"aria",
".",
"templates",
".",
"TplClassGenerator",
"and",
"aria",
".",
"temp... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L165-L170 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (tree, options, callback) {
ariaCoreJsonValidator.check(tree, "aria.templates.TreeBeans.Root");
var out = new ariaTemplatesClassWriter({
fn : this.__processStatement,
scope : this
}, options.skipLogError ? null : {
fn : this.__... | javascript | function (tree, options, callback) {
ariaCoreJsonValidator.check(tree, "aria.templates.TreeBeans.Root");
var out = new ariaTemplatesClassWriter({
fn : this.__processStatement,
scope : this
}, options.skipLogError ? null : {
fn : this.__... | [
"function",
"(",
"tree",
",",
"options",
",",
"callback",
")",
"{",
"ariaCoreJsonValidator",
".",
"check",
"(",
"tree",
",",
"\"aria.templates.TreeBeans.Root\"",
")",
";",
"var",
"out",
"=",
"new",
"ariaTemplatesClassWriter",
"(",
"{",
"fn",
":",
"this",
".",
... | Build the template class from the tree given by the parser.
@private
@param {aria.templates.TreeBeans:Root} tree tree returned by the parser.
@param {aria.templates.CfgBeans:ClassGeneratorCfg} options Options for class generation.
@param {aria.core.CfgBeans:Callback} callback the callback description | [
"Build",
"the",
"template",
"class",
"from",
"the",
"tree",
"given",
"by",
"the",
"parser",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L187-L214 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (out, tree) {
var rootStatement = tree.content[0];
if (tree.content.length != 1 || (rootStatement.name != this._rootStatement)) {
return out.logError(tree, this.TEMPLATE_STATEMENT_EXPECTED, [this._rootStatement]);
}
if (rootStatement.content == nu... | javascript | function (out, tree) {
var rootStatement = tree.content[0];
if (tree.content.length != 1 || (rootStatement.name != this._rootStatement)) {
return out.logError(tree, this.TEMPLATE_STATEMENT_EXPECTED, [this._rootStatement]);
}
if (rootStatement.content == nu... | [
"function",
"(",
"out",
",",
"tree",
")",
"{",
"var",
"rootStatement",
"=",
"tree",
".",
"content",
"[",
"0",
"]",
";",
"if",
"(",
"tree",
".",
"content",
".",
"length",
"!=",
"1",
"||",
"(",
"rootStatement",
".",
"name",
"!=",
"this",
".",
"_rootS... | Process the root statement of the template.
@param {aria.templates.ClassWriter} out
@param {aria.templates.TreeBeans:Statement} tree
@protected | [
"Process",
"the",
"root",
"statement",
"of",
"the",
"template",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L222-L251 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (out, statement) {
var statname = statement.name;
if (statname.charAt(0) == '@') {
statname = '@';
}
var handler = this.STATEMENTS[statname];
if (handler == null) {
out.logError(statement, this.UNKNOWN_STATEMENT, [stat... | javascript | function (out, statement) {
var statname = statement.name;
if (statname.charAt(0) == '@') {
statname = '@';
}
var handler = this.STATEMENTS[statname];
if (handler == null) {
out.logError(statement, this.UNKNOWN_STATEMENT, [stat... | [
"function",
"(",
"out",
",",
"statement",
")",
"{",
"var",
"statname",
"=",
"statement",
".",
"name",
";",
"if",
"(",
"statname",
".",
"charAt",
"(",
"0",
")",
"==",
"'@'",
")",
"{",
"statname",
"=",
"'@'",
";",
"}",
"var",
"handler",
"=",
"this",
... | This method is called for each statement to produce an output in the class definition. It propagates the call
to the correct process function in this.STATEMENTS, or logs errors, if the statement is unknown, or misused.
@private
@param {aria.templates.ClassWriter} out
@param {aria.templates.TreeBeans:Statement} statemen... | [
"This",
"method",
"is",
"called",
"for",
"each",
"statement",
"to",
"produce",
"an",
"output",
"in",
"the",
"class",
"definition",
".",
"It",
"propagates",
"the",
"call",
"to",
"the",
"correct",
"process",
"function",
"in",
"this",
".",
"STATEMENTS",
"or",
... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L260-L297 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (statement, msgId, msgArgs, errorContext) {
if (msgArgs == null) {
msgArgs = [];
}
msgArgs.push(statement.lineNumber);
this.$logError(msgId, msgArgs, errorContext);
} | javascript | function (statement, msgId, msgArgs, errorContext) {
if (msgArgs == null) {
msgArgs = [];
}
msgArgs.push(statement.lineNumber);
this.$logError(msgId, msgArgs, errorContext);
} | [
"function",
"(",
"statement",
",",
"msgId",
",",
"msgArgs",
",",
"errorContext",
")",
"{",
"if",
"(",
"msgArgs",
"==",
"null",
")",
"{",
"msgArgs",
"=",
"[",
"]",
";",
"}",
"msgArgs",
".",
"push",
"(",
"statement",
".",
"lineNumber",
")",
";",
"this"... | Log the given error.
@private
@param {aria.templates.TreeBeans:Statement} statement Statement in the template tree from which the error is
being raised. It will be transformed into the corresponding line number in the source template and added at
the end of otherParams.
@param {String} msgId error id, used to find the ... | [
"Log",
"the",
"given",
"error",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L309-L315 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (out) {
out.newBlock("main", 0);
out.newBlock("classDefinition", 0);
out.newBlock("prototype", 2);
out.newBlock("globalVars", 5);
out.newBlock("initTemplate", 3);
out.newBlock("classInit", 3);
} | javascript | function (out) {
out.newBlock("main", 0);
out.newBlock("classDefinition", 0);
out.newBlock("prototype", 2);
out.newBlock("globalVars", 5);
out.newBlock("initTemplate", 3);
out.newBlock("classInit", 3);
} | [
"function",
"(",
"out",
")",
"{",
"out",
".",
"newBlock",
"(",
"\"main\"",
",",
"0",
")",
";",
"out",
".",
"newBlock",
"(",
"\"classDefinition\"",
",",
"0",
")",
";",
"out",
".",
"newBlock",
"(",
"\"prototype\"",
",",
"2",
")",
";",
"out",
".",
"ne... | Create the required blocks in the class writer.
@param {aria.templates.ClassWriter} out
@protected | [
"Create",
"the",
"required",
"blocks",
"in",
"the",
"class",
"writer",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L322-L329 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (out) {
var tplParam = out.templateParam;
out.writeln("module.exports = Aria.classDefinition({");
out.increaseIndent();
out.writeln("$classpath: ", out.stringify(tplParam.$classpath), ",");
if (out.parentClasspath) {
out.writeln("$exte... | javascript | function (out) {
var tplParam = out.templateParam;
out.writeln("module.exports = Aria.classDefinition({");
out.increaseIndent();
out.writeln("$classpath: ", out.stringify(tplParam.$classpath), ",");
if (out.parentClasspath) {
out.writeln("$exte... | [
"function",
"(",
"out",
")",
"{",
"var",
"tplParam",
"=",
"out",
".",
"templateParam",
";",
"out",
".",
"writeln",
"(",
"\"module.exports = Aria.classDefinition({\"",
")",
";",
"out",
".",
"increaseIndent",
"(",
")",
";",
"out",
".",
"writeln",
"(",
"\"$clas... | Write to the current block of the class writer the begining of the class definition.
@param {aria.templates.ClassWriter} out
@protected | [
"Write",
"to",
"the",
"current",
"block",
"of",
"the",
"class",
"writer",
"the",
"begining",
"of",
"the",
"class",
"definition",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L336-L344 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (out) {
var tplParam = out.templateParam;
// normal inheritance processing: set out.parentClasspath, out.parentClassName and out.parentClassType
if (tplParam.$extends) {
out.parentClasspath = tplParam.$extends;
out.parentClassType = this._clas... | javascript | function (out) {
var tplParam = out.templateParam;
// normal inheritance processing: set out.parentClasspath, out.parentClassName and out.parentClassType
if (tplParam.$extends) {
out.parentClasspath = tplParam.$extends;
out.parentClassType = this._clas... | [
"function",
"(",
"out",
")",
"{",
"var",
"tplParam",
"=",
"out",
".",
"templateParam",
";",
"// normal inheritance processing: set out.parentClasspath, out.parentClassName and out.parentClassType",
"if",
"(",
"tplParam",
".",
"$extends",
")",
"{",
"out",
".",
"parentClass... | Set the out.parentClasspath, out.parentClassName and out.parentClassType from the values available in
out.templateParam.
@param {aria.templates.ClassWriter} out
@protected | [
"Set",
"the",
"out",
".",
"parentClasspath",
"out",
".",
"parentClassName",
"and",
"out",
".",
"parentClassType",
"from",
"the",
"values",
"available",
"in",
"out",
".",
"templateParam",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L363-L375 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (out) {
var tplParam = out.templateParam;
if (tplParam.$hasScript) {
out.scriptClasspath = tplParam.$classpath + "Script";
out.scriptClassName = this._getClassName(out.scriptClasspath);
out.addDependency(out.scriptClasspath);
}... | javascript | function (out) {
var tplParam = out.templateParam;
if (tplParam.$hasScript) {
out.scriptClasspath = tplParam.$classpath + "Script";
out.scriptClassName = this._getClassName(out.scriptClasspath);
out.addDependency(out.scriptClasspath);
}... | [
"function",
"(",
"out",
")",
"{",
"var",
"tplParam",
"=",
"out",
".",
"templateParam",
";",
"if",
"(",
"tplParam",
".",
"$hasScript",
")",
"{",
"out",
".",
"scriptClasspath",
"=",
"tplParam",
".",
"$classpath",
"+",
"\"Script\"",
";",
"out",
".",
"script... | Set the out.scriptClasspath, out.scriptClassName from the values available in out.templateParam.
@param {aria.templates.ClassWriter} out
@protected | [
"Set",
"the",
"out",
".",
"scriptClasspath",
"out",
".",
"scriptClassName",
"from",
"the",
"values",
"available",
"in",
"out",
".",
"templateParam",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L382-L389 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (out) {
out.writeln("$constructor: function() { ");
out.increaseIndent();
var parentClassName = out.parentClassName;
if (parentClassName) {
out.writeln("this.$", parentClassName, ".constructor.call(this);");
}
var scriptCla... | javascript | function (out) {
out.writeln("$constructor: function() { ");
out.increaseIndent();
var parentClassName = out.parentClassName;
if (parentClassName) {
out.writeln("this.$", parentClassName, ".constructor.call(this);");
}
var scriptCla... | [
"function",
"(",
"out",
")",
"{",
"out",
".",
"writeln",
"(",
"\"$constructor: function() { \"",
")",
";",
"out",
".",
"increaseIndent",
"(",
")",
";",
"var",
"parentClassName",
"=",
"out",
".",
"parentClassName",
";",
"if",
"(",
"parentClassName",
")",
"{",... | Write to the current block of the class writer the constructor of the class definition. The body of the
method contains a call to the parent constructor and a call to the script constructor.
@param {aria.templates.ClassWriter} out
@protected | [
"Write",
"to",
"the",
"current",
"block",
"of",
"the",
"class",
"writer",
"the",
"constructor",
"of",
"the",
"class",
"definition",
".",
"The",
"body",
"of",
"the",
"method",
"contains",
"a",
"call",
"to",
"the",
"parent",
"constructor",
"and",
"a",
"call"... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L397-L410 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (out, res) {
if (typeof res == "string") {
var logicalPath = Aria.getLogicalPath(res);
var serverRes = /([^\/]*)\/Res$/.exec(logicalPath);
return 'require("ariatemplates/$resources").' + (serverRes ? "module(" + out.stringify(serverRes[1]) + "," : "fi... | javascript | function (out, res) {
if (typeof res == "string") {
var logicalPath = Aria.getLogicalPath(res);
var serverRes = /([^\/]*)\/Res$/.exec(logicalPath);
return 'require("ariatemplates/$resources").' + (serverRes ? "module(" + out.stringify(serverRes[1]) + "," : "fi... | [
"function",
"(",
"out",
",",
"res",
")",
"{",
"if",
"(",
"typeof",
"res",
"==",
"\"string\"",
")",
"{",
"var",
"logicalPath",
"=",
"Aria",
".",
"getLogicalPath",
"(",
"res",
")",
";",
"var",
"serverRes",
"=",
"/",
"([^\\/]*)\\/Res$",
"/",
".",
"exec",
... | Returns a resource dependency
@param {Object|String} res | [
"Returns",
"a",
"resource",
"dependency"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L454-L470 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (out) {
var tplParam = out.templateParam;
var res = tplParam.$res;
if (res) {
out.writeln("$resources: {");
out.increaseIndent();
var first = true;
for (var key in res) {
if (res.hasOwnProper... | javascript | function (out) {
var tplParam = out.templateParam;
var res = tplParam.$res;
if (res) {
out.writeln("$resources: {");
out.increaseIndent();
var first = true;
for (var key in res) {
if (res.hasOwnProper... | [
"function",
"(",
"out",
")",
"{",
"var",
"tplParam",
"=",
"out",
".",
"templateParam",
";",
"var",
"res",
"=",
"tplParam",
".",
"$res",
";",
"if",
"(",
"res",
")",
"{",
"out",
".",
"writeln",
"(",
"\"$resources: {\"",
")",
";",
"out",
".",
"increaseI... | Write to the current block of the class writer the dependencies of the template, including JS classes,
resources, templates, css, macrolibs and text templates.
@param {aria.templates.ClassWriter} out
@protected | [
"Write",
"to",
"the",
"current",
"block",
"of",
"the",
"class",
"writer",
"the",
"dependencies",
"of",
"the",
"template",
"including",
"JS",
"classes",
"resources",
"templates",
"css",
"macrolibs",
"and",
"text",
"templates",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L478-L521 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (out) {
out.writeln("$prototype: {");
out.increaseIndent();
out.write(out.getBlockContent("prototype"));
out.decreaseIndent();
out.writeln("}");
out.decreaseIndent();
out.writeln("});");
out.leaveBlock();
} | javascript | function (out) {
out.writeln("$prototype: {");
out.increaseIndent();
out.write(out.getBlockContent("prototype"));
out.decreaseIndent();
out.writeln("}");
out.decreaseIndent();
out.writeln("});");
out.leaveBlock();
} | [
"function",
"(",
"out",
")",
"{",
"out",
".",
"writeln",
"(",
"\"$prototype: {\"",
")",
";",
"out",
".",
"increaseIndent",
"(",
")",
";",
"out",
".",
"write",
"(",
"out",
".",
"getBlockContent",
"(",
"\"prototype\"",
")",
")",
";",
"out",
".",
"decreas... | Write to the current block of the class writer the end of the class definition, including the prototype block
of the class writer.
@param {aria.templates.ClassWriter} out
@protected | [
"Write",
"to",
"the",
"current",
"block",
"of",
"the",
"class",
"writer",
"the",
"end",
"of",
"the",
"class",
"definition",
"including",
"the",
"prototype",
"block",
"of",
"the",
"class",
"writer",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L642-L651 | train | |
ariatemplates/ariatemplates | src/aria/templates/ClassGenerator.js | function (arg) {
var out = arg.out;
var statement = arg.statement;
// Add dependencies specified explicitly in the template declaration
this._processDependencies(out);
this._createBlocks(out);
this._processInheritance(out);
this._proc... | javascript | function (arg) {
var out = arg.out;
var statement = arg.statement;
// Add dependencies specified explicitly in the template declaration
this._processDependencies(out);
this._createBlocks(out);
this._processInheritance(out);
this._proc... | [
"function",
"(",
"arg",
")",
"{",
"var",
"out",
"=",
"arg",
".",
"out",
";",
"var",
"statement",
"=",
"arg",
".",
"statement",
";",
"// Add dependencies specified explicitly in the template declaration",
"this",
".",
"_processDependencies",
"(",
"out",
")",
";",
... | Process template content. This method is called from _processRootStatement.
@param {Object} Process template content properties (contains out and statement objects).
@protected | [
"Process",
"template",
"content",
".",
"This",
"method",
"is",
"called",
"from",
"_processRootStatement",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ClassGenerator.js#L658-L723 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function (elt1, elt2) {
if (elt1.sortKey == elt2.sortKey) {
return 0;
}
return (elt1.sortKey > elt2.sortKey ? 1 : -1);
} | javascript | function (elt1, elt2) {
if (elt1.sortKey == elt2.sortKey) {
return 0;
}
return (elt1.sortKey > elt2.sortKey ? 1 : -1);
} | [
"function",
"(",
"elt1",
",",
"elt2",
")",
"{",
"if",
"(",
"elt1",
".",
"sortKey",
"==",
"elt2",
".",
"sortKey",
")",
"{",
"return",
"0",
";",
"}",
"return",
"(",
"elt1",
".",
"sortKey",
">",
"elt2",
".",
"sortKey",
"?",
"1",
":",
"-",
"1",
")"... | Sorting function by ascending sortKey. Function given as a parameter to the Array.sort JavaScript function for
sorting. It compares two elements and return a value telling which one should be put before the other.
@param {aria.templates.ViewCfgBeans:Item} elt1
@param {aria.templates.ViewCfgBeans:Item} elt2
@return {Int... | [
"Sorting",
"function",
"by",
"ascending",
"sortKey",
".",
"Function",
"given",
"as",
"a",
"parameter",
"to",
"the",
"Array",
".",
"sort",
"JavaScript",
"function",
"for",
"sorting",
".",
"It",
"compares",
"two",
"elements",
"and",
"return",
"a",
"value",
"te... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L32-L37 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function (obj) {
if (!(ariaUtilsType.isObject(obj) || ariaUtilsType.isArray(obj))) {
this.$logError(this.INVALID_TYPE_OF_ARGUMENT);
return;
}
/**
* Contains the initial array or map from which the view is built. This can be changed outsi... | javascript | function (obj) {
if (!(ariaUtilsType.isObject(obj) || ariaUtilsType.isArray(obj))) {
this.$logError(this.INVALID_TYPE_OF_ARGUMENT);
return;
}
/**
* Contains the initial array or map from which the view is built. This can be changed outsi... | [
"function",
"(",
"obj",
")",
"{",
"if",
"(",
"!",
"(",
"ariaUtilsType",
".",
"isObject",
"(",
"obj",
")",
"||",
"ariaUtilsType",
".",
"isArray",
"(",
"obj",
")",
")",
")",
"{",
"this",
".",
"$logError",
"(",
"this",
".",
"INVALID_TYPE_OF_ARGUMENT",
")"... | Create a new view on the given array.
@param {Array|Object} obj array or map on which to create the view | [
"Create",
"a",
"new",
"view",
"on",
"the",
"given",
"array",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L88-L198 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function (changeType) {
if (changeType) {
this.notifyChange(changeType);
}
var curState = this._currentState;
// initial array synchronization
this._refreshInitialArray();
this.$assert(156, curState.initi... | javascript | function (changeType) {
if (changeType) {
this.notifyChange(changeType);
}
var curState = this._currentState;
// initial array synchronization
this._refreshInitialArray();
this.$assert(156, curState.initi... | [
"function",
"(",
"changeType",
")",
"{",
"if",
"(",
"changeType",
")",
"{",
"this",
".",
"notifyChange",
"(",
"changeType",
")",
";",
"}",
"var",
"curState",
"=",
"this",
".",
"_currentState",
";",
"// initial array synchronization",
"this",
".",
"_refreshInit... | Refresh the view data after something has changed. Do nothing if nothing has changed.
@param {Integer} changeType If specified, call notifyChange with that parameter before doing the refresh. This
parameter can be either CHANGED_INITIAL_ARRAY or CHANGED_SORT_CRITERIA or a bitwise OR of both. | [
"Refresh",
"the",
"view",
"data",
"after",
"something",
"has",
"changed",
".",
"Do",
"nothing",
"if",
"nothing",
"has",
"changed",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L265-L317 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function (items) {
var itemsLength = items.length;
for (var i = 0; i < itemsLength; i++) {
json.removeListener(items[i], "filteredIn", this._jsonChangeCallback);
}
} | javascript | function (items) {
var itemsLength = items.length;
for (var i = 0; i < itemsLength; i++) {
json.removeListener(items[i], "filteredIn", this._jsonChangeCallback);
}
} | [
"function",
"(",
"items",
")",
"{",
"var",
"itemsLength",
"=",
"items",
".",
"length",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"itemsLength",
";",
"i",
"++",
")",
"{",
"json",
".",
"removeListener",
"(",
"items",
"[",
"i",
"]",
",",... | Remove the 'this' listener on each item of the given array.
@param {Array} array
@protected | [
"Remove",
"the",
"this",
"listener",
"on",
"each",
"item",
"of",
"the",
"given",
"array",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L334-L339 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function () {
var curState = this._currentState;
var initialArray = this.initialArray;
var oldValues; // map of old values
if (curState.initialArray == initialArray && !(this._changes & this.CHANGED_INITIAL_ARRAY)) {
return;
... | javascript | function () {
var curState = this._currentState;
var initialArray = this.initialArray;
var oldValues; // map of old values
if (curState.initialArray == initialArray && !(this._changes & this.CHANGED_INITIAL_ARRAY)) {
return;
... | [
"function",
"(",
")",
"{",
"var",
"curState",
"=",
"this",
".",
"_currentState",
";",
"var",
"initialArray",
"=",
"this",
".",
"initialArray",
";",
"var",
"oldValues",
";",
"// map of old values",
"if",
"(",
"curState",
".",
"initialArray",
"==",
"initialArray... | Creates this.items corresponding to this.initialArray. It reuses the current this.items elements if
possible.
@protected | [
"Creates",
"this",
".",
"items",
"corresponding",
"to",
"this",
".",
"initialArray",
".",
"It",
"reuses",
"the",
"current",
"this",
".",
"items",
"elements",
"if",
"possible",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L346-L393 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function (oldValues) {
var initialArray = this.initialArray;
var items = [];
var filteredOutElements = 0;
var arrayLength = initialArray.length;
for (var i = 0; i < arrayLength; i++) {
var iaElt = initialArray[i];
... | javascript | function (oldValues) {
var initialArray = this.initialArray;
var items = [];
var filteredOutElements = 0;
var arrayLength = initialArray.length;
for (var i = 0; i < arrayLength; i++) {
var iaElt = initialArray[i];
... | [
"function",
"(",
"oldValues",
")",
"{",
"var",
"initialArray",
"=",
"this",
".",
"initialArray",
";",
"var",
"items",
"=",
"[",
"]",
";",
"var",
"filteredOutElements",
"=",
"0",
";",
"var",
"arrayLength",
"=",
"initialArray",
".",
"length",
";",
"for",
"... | Build the items array starting from the initial array and taking into account the items that are already
present in the items array of the view
@protected
@param {aria.utils.StackHashMap} oldValues map of the items that are already present in the items array,
indexed by item value
@return {Object} contains the items ar... | [
"Build",
"the",
"items",
"array",
"starting",
"from",
"the",
"initial",
"array",
"and",
"taking",
"into",
"account",
"the",
"items",
"that",
"are",
"already",
"present",
"in",
"the",
"items",
"array",
"of",
"the",
"view"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L403-L445 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function (oldValues) {
var j = 0, items = [], filteredOutElements = 0;
var initialArray = this.initialArray;
for (var p in initialArray) {
if (initialArray.hasOwnProperty(p) && !json.isMetadata(p)) {
var iaElt = initialArray[p];... | javascript | function (oldValues) {
var j = 0, items = [], filteredOutElements = 0;
var initialArray = this.initialArray;
for (var p in initialArray) {
if (initialArray.hasOwnProperty(p) && !json.isMetadata(p)) {
var iaElt = initialArray[p];... | [
"function",
"(",
"oldValues",
")",
"{",
"var",
"j",
"=",
"0",
",",
"items",
"=",
"[",
"]",
",",
"filteredOutElements",
"=",
"0",
";",
"var",
"initialArray",
"=",
"this",
".",
"initialArray",
";",
"for",
"(",
"var",
"p",
"in",
"initialArray",
")",
"{"... | Build the items array starting from the initial map and taking into account the items that are already
present in the items array of the view
@protected
@param {aria.utils.StackHashMap} oldValues map of the items that are already present in the items array,
indexed by item value
@return {Object} contains the items arra... | [
"Build",
"the",
"items",
"array",
"starting",
"from",
"the",
"initial",
"map",
"and",
"taking",
"into",
"account",
"the",
"items",
"that",
"are",
"already",
"present",
"in",
"the",
"items",
"array",
"of",
"the",
"view"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L455-L490 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function () {
var oldItems = this.items;
var oldItemsLength = oldItems.length;
var newItems = [];
var initialArray = this.initialArray;
if (ariaUtilsType.isObject(initialArray)) {
var oldItemsMap = new ariaUtilsStackHas... | javascript | function () {
var oldItems = this.items;
var oldItemsLength = oldItems.length;
var newItems = [];
var initialArray = this.initialArray;
if (ariaUtilsType.isObject(initialArray)) {
var oldItemsMap = new ariaUtilsStackHas... | [
"function",
"(",
")",
"{",
"var",
"oldItems",
"=",
"this",
".",
"items",
";",
"var",
"oldItemsLength",
"=",
"oldItems",
".",
"length",
";",
"var",
"newItems",
"=",
"[",
"]",
";",
"var",
"initialArray",
"=",
"this",
".",
"initialArray",
";",
"if",
"(",
... | Reset this.items to match the order of the initial array or map.
@protected | [
"Reset",
"this",
".",
"items",
"to",
"match",
"the",
"order",
"of",
"the",
"initial",
"array",
"or",
"map",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L496-L532 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function () {
var sortKeyGetter = this.sortKeyGetter;
var items = this.items;
var itemsLength = items.length;
for (var i = 0; i < itemsLength; i++) {
var elt = items[i];
elt.sortKey = sortKeyGetter.fn.call(sortKeyGet... | javascript | function () {
var sortKeyGetter = this.sortKeyGetter;
var items = this.items;
var itemsLength = items.length;
for (var i = 0; i < itemsLength; i++) {
var elt = items[i];
elt.sortKey = sortKeyGetter.fn.call(sortKeyGet... | [
"function",
"(",
")",
"{",
"var",
"sortKeyGetter",
"=",
"this",
".",
"sortKeyGetter",
";",
"var",
"items",
"=",
"this",
".",
"items",
";",
"var",
"itemsLength",
"=",
"items",
".",
"length",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"ite... | Sort this.items according to this.sortKeyGetter and this.sortOrder. Should not be called if
this.sortOrder == this.SORT_INITIAL. Call _resetSortOrder instead.
@protected | [
"Sort",
"this",
".",
"items",
"according",
"to",
"this",
".",
"sortKeyGetter",
"and",
"this",
".",
"sortOrder",
".",
"Should",
"not",
"be",
"called",
"if",
"this",
".",
"sortOrder",
"==",
"this",
".",
"SORT_INITIAL",
".",
"Call",
"_resetSortOrder",
"instead"... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L539-L555 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function () {
var items = this.items;
var itemsLength = items.length;
var pageSize = this.pageSize;
if (pageSize <= 0) {
pageSize = -1;
}
var pages = [], pageLength = 0;
var pageIndex = 0;... | javascript | function () {
var items = this.items;
var itemsLength = items.length;
var pageSize = this.pageSize;
if (pageSize <= 0) {
pageSize = -1;
}
var pages = [], pageLength = 0;
var pageIndex = 0;... | [
"function",
"(",
")",
"{",
"var",
"items",
"=",
"this",
".",
"items",
";",
"var",
"itemsLength",
"=",
"items",
".",
"length",
";",
"var",
"pageSize",
"=",
"this",
".",
"pageSize",
";",
"if",
"(",
"pageSize",
"<=",
"0",
")",
"{",
"pageSize",
"=",
"-... | Build this.pages array.
@protected | [
"Build",
"this",
".",
"pages",
"array",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L561-L615 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function (filteredIn) {
if (filteredIn == null) {
filteredIn = true;
}
// if not already done, we must first refresh the initial array before marking all elements:
this._refreshInitialArray();
var items = this.items;
... | javascript | function (filteredIn) {
if (filteredIn == null) {
filteredIn = true;
}
// if not already done, we must first refresh the initial array before marking all elements:
this._refreshInitialArray();
var items = this.items;
... | [
"function",
"(",
"filteredIn",
")",
"{",
"if",
"(",
"filteredIn",
"==",
"null",
")",
"{",
"filteredIn",
"=",
"true",
";",
"}",
"// if not already done, we must first refresh the initial array before marking all elements:",
"this",
".",
"_refreshInitialArray",
"(",
")",
... | Filter in all elements.
@param {Boolean} filteredIn [optional, default: true] If true, filter in all elements. If false, filter
out all elements. | [
"Filter",
"in",
"all",
"elements",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L622-L634 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function (filterType, filterCallback) {
// normalize callback only once
filterCallback = this.$normCallback(filterCallback);
var filterFn = filterCallback.fn, filterScope = filterCallback.scope;
// if not already done, we must first refresh the initial arr... | javascript | function (filterType, filterCallback) {
// normalize callback only once
filterCallback = this.$normCallback(filterCallback);
var filterFn = filterCallback.fn, filterScope = filterCallback.scope;
// if not already done, we must first refresh the initial arr... | [
"function",
"(",
"filterType",
",",
"filterCallback",
")",
"{",
"// normalize callback only once",
"filterCallback",
"=",
"this",
".",
"$normCallback",
"(",
"filterCallback",
")",
";",
"var",
"filterFn",
"=",
"filterCallback",
".",
"fn",
",",
"filterScope",
"=",
"... | Filters the items with a callback function called on each element. Does not refresh the view.
@param {Integer} filterType Can be either FILTER_SET (in this case, filterCallback will be called on all elements
whether they are filtered in or not), FILTER_ADD (filterCallback will only be called on filtered out
elements, s... | [
"Filters",
"the",
"items",
"with",
"a",
"callback",
"function",
"called",
"on",
"each",
"element",
".",
"Does",
"not",
"refresh",
"the",
"view",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L714-L730 | train | |
ariatemplates/ariatemplates | src/aria/templates/View.js | function (array) {
if (!(ariaUtilsType.isObject(array) || ariaUtilsType.isArray(array))) {
this.$logError(this.INVALID_TYPE_OF_ARGUMENT);
return;
}
this.initialArray = array;
this._refreshInitialArray();
... | javascript | function (array) {
if (!(ariaUtilsType.isObject(array) || ariaUtilsType.isArray(array))) {
this.$logError(this.INVALID_TYPE_OF_ARGUMENT);
return;
}
this.initialArray = array;
this._refreshInitialArray();
... | [
"function",
"(",
"array",
")",
"{",
"if",
"(",
"!",
"(",
"ariaUtilsType",
".",
"isObject",
"(",
"array",
")",
"||",
"ariaUtilsType",
".",
"isArray",
"(",
"array",
")",
")",
")",
"{",
"this",
".",
"$logError",
"(",
"this",
".",
"INVALID_TYPE_OF_ARGUMENT",... | Updates initial array of the view. Needed in case where the previous initial array is replaced by another object
@param {Array|Object} new obj array or map on which to create the view | [
"Updates",
"initial",
"array",
"of",
"the",
"view",
".",
"Needed",
"in",
"case",
"where",
"the",
"previous",
"initial",
"array",
"is",
"replaced",
"by",
"another",
"object"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/View.js#L746-L753 | train | |
ariatemplates/ariatemplates | src/aria/core/Interfaces.js | function (instances) {
var r = 10000000 * Math.random(); // todo: could be replaced with algo generating keys with numbers and
// letters
var key = '' + (r | r); // r|r = equivalent to Math.floor - but faster in old browsers
while (instances[key]) {
key += 'x';
}
... | javascript | function (instances) {
var r = 10000000 * Math.random(); // todo: could be replaced with algo generating keys with numbers and
// letters
var key = '' + (r | r); // r|r = equivalent to Math.floor - but faster in old browsers
while (instances[key]) {
key += 'x';
}
... | [
"function",
"(",
"instances",
")",
"{",
"var",
"r",
"=",
"10000000",
"*",
"Math",
".",
"random",
"(",
")",
";",
"// todo: could be replaced with algo generating keys with numbers and",
"// letters",
"var",
"key",
"=",
"''",
"+",
"(",
"r",
"|",
"r",
")",
";",
... | Generate a key that does not exist in the given object.
@param {Object} instances Object for which a non-existent key must be generated.
@return {String|Number} key which does not exist in instances.
@private | [
"Generate",
"a",
"key",
"that",
"does",
"not",
"exist",
"in",
"the",
"given",
"object",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Interfaces.js#L36-L44 | train | |
ariatemplates/ariatemplates | src/aria/core/Interfaces.js | function (def, classpath, member) {
var res;
if (typeUtils.isFunction(def)) {
// should already be normalized:
return __simpleFunctionDefinition;
} else if (typeUtils.isString(def)) {
res = {
$type : def
};
} else if (typeUt... | javascript | function (def, classpath, member) {
var res;
if (typeUtils.isFunction(def)) {
// should already be normalized:
return __simpleFunctionDefinition;
} else if (typeUtils.isString(def)) {
res = {
$type : def
};
} else if (typeUt... | [
"function",
"(",
"def",
",",
"classpath",
",",
"member",
")",
"{",
"var",
"res",
";",
"if",
"(",
"typeUtils",
".",
"isFunction",
"(",
"def",
")",
")",
"{",
"// should already be normalized:",
"return",
"__simpleFunctionDefinition",
";",
"}",
"else",
"if",
"(... | Normalize interface member definition in the interface.
@param {String|Function|Object|Array} Interface member definition.
@return {Object} json object containing at least the $type property.
@private | [
"Normalize",
"interface",
"member",
"definition",
"in",
"the",
"interface",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Interfaces.js#L104-L132 | train | |
ariatemplates/ariatemplates | src/aria/core/Interfaces.js | function (src) {
var res = {};
for (var k in src) {
if (src.hasOwnProperty(k)) {
res[k] = src[k];
}
}
return res;
} | javascript | function (src) {
var res = {};
for (var k in src) {
if (src.hasOwnProperty(k)) {
res[k] = src[k];
}
}
return res;
} | [
"function",
"(",
"src",
")",
"{",
"var",
"res",
"=",
"{",
"}",
";",
"for",
"(",
"var",
"k",
"in",
"src",
")",
"{",
"if",
"(",
"src",
".",
"hasOwnProperty",
"(",
"k",
")",
")",
"{",
"res",
"[",
"k",
"]",
"=",
"src",
"[",
"k",
"]",
";",
"}"... | Simple 1 level copy of a map.
@param {Object}
@return {Object} | [
"Simple",
"1",
"level",
"copy",
"of",
"a",
"map",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/Interfaces.js#L139-L147 | train | |
ariatemplates/ariatemplates | src/aria/utils/DomNavigationManager.js | sliceArguments | function sliceArguments(args, startIndex) {
if (startIndex == null) {
startIndex = 0;
}
return Array.prototype.slice.call(args, startIndex);
} | javascript | function sliceArguments(args, startIndex) {
if (startIndex == null) {
startIndex = 0;
}
return Array.prototype.slice.call(args, startIndex);
} | [
"function",
"sliceArguments",
"(",
"args",
",",
"startIndex",
")",
"{",
"if",
"(",
"startIndex",
"==",
"null",
")",
"{",
"startIndex",
"=",
"0",
";",
"}",
"return",
"Array",
".",
"prototype",
".",
"slice",
".",
"call",
"(",
"args",
",",
"startIndex",
"... | Turns all or part of the "arguments" of a function into an array. An optional start index can be specified, for the common use case of "splat args".
@param {Arguments} args The arguments of a function
@param {Number} startIndex An optional index at which to start the copy of the arguments; defaults to 0
@return {Arra... | [
"Turns",
"all",
"or",
"part",
"of",
"the",
"arguments",
"of",
"a",
"function",
"into",
"an",
"array",
".",
"An",
"optional",
"start",
"index",
"can",
"be",
"specified",
"for",
"the",
"common",
"use",
"case",
"of",
"splat",
"args",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/DomNavigationManager.js#L79-L85 | train |
ariatemplates/ariatemplates | src/aria/utils/DomNavigationManager.js | createHiddenElement | function createHiddenElement() {
// -------------------------------------------------------------- properties
var element = document.createElement('div');
var style = element.style;
style.width = 0;
style.height = 0;
element.setAttribute('aria-hidden', 'true');
// -----------------------... | javascript | function createHiddenElement() {
// -------------------------------------------------------------- properties
var element = document.createElement('div');
var style = element.style;
style.width = 0;
style.height = 0;
element.setAttribute('aria-hidden', 'true');
// -----------------------... | [
"function",
"createHiddenElement",
"(",
")",
"{",
"// -------------------------------------------------------------- properties",
"var",
"element",
"=",
"document",
".",
"createElement",
"(",
"'div'",
")",
";",
"var",
"style",
"=",
"element",
".",
"style",
";",
"style",... | Creates a DOM element that is not visible.
<p>
It uses a technique that doesn't prevent the element from being focused.
</p>
<p>
It also respects accessibility by setting aria-hidden to true.
</p>
@return {HTMLElement} The created element. | [
"Creates",
"a",
"DOM",
"element",
"that",
"is",
"not",
"visible",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/DomNavigationManager.js#L263-L277 | train |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (args) {
if (!this._cfg) {
//template has been disposed no need to refresh
return;
}
if (ariaTemplatesRefreshManager.isStopped()) {
// look for the section to be refreshed, and notify it:
if (args) {
... | javascript | function (args) {
if (!this._cfg) {
//template has been disposed no need to refresh
return;
}
if (ariaTemplatesRefreshManager.isStopped()) {
// look for the section to be refreshed, and notify it:
if (args) {
... | [
"function",
"(",
"args",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_cfg",
")",
"{",
"//template has been disposed no need to refresh",
"return",
";",
"}",
"if",
"(",
"ariaTemplatesRefreshManager",
".",
"isStopped",
"(",
")",
")",
"{",
"// look for the section to be ... | Do a partial or whole refresh of the template, using the specified macro and section. This method can be
called from templates and template scripts.
@param {aria.templates.CfgBeans:RefreshCfg} args macro and section for the refresh. If not specified, do
a complete refresh.
@implements aria.templates.ITemplate | [
"Do",
"a",
"partial",
"or",
"whole",
"refresh",
"of",
"the",
"template",
"using",
"the",
"specified",
"macro",
"and",
"section",
".",
"This",
"method",
"can",
"be",
"called",
"from",
"templates",
"and",
"template",
"scripts",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L390-L480 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (element) {
if (element.tagName === "BODY" || !ariaUtilsDom.isInDom(element)) {
return [];
}
var Ids = [];
while (!element.__widget) {
element = element.parentElement || element.parentNode; // Fx < 9 compat
}
... | javascript | function (element) {
if (element.tagName === "BODY" || !ariaUtilsDom.isInDom(element)) {
return [];
}
var Ids = [];
while (!element.__widget) {
element = element.parentElement || element.parentNode; // Fx < 9 compat
}
... | [
"function",
"(",
"element",
")",
"{",
"if",
"(",
"element",
".",
"tagName",
"===",
"\"BODY\"",
"||",
"!",
"ariaUtilsDom",
".",
"isInDom",
"(",
"element",
")",
")",
"{",
"return",
"[",
"]",
";",
"}",
"var",
"Ids",
"=",
"[",
"]",
";",
"while",
"(",
... | Tries to find the widget id based on an HTML element, if no id can be found then null is returned.
@param {HTMLElement} element which is a part of a widget that the id needs to be retrieved for.
@return {Array} contains ids for the widget and templates that make the focused widget path. | [
"Tries",
"to",
"find",
"the",
"widget",
"id",
"based",
"on",
"an",
"HTML",
"element",
"if",
"no",
"id",
"can",
"be",
"found",
"then",
"null",
"is",
"returned",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L504-L530 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (macro) {
/* must not be already linked */
this.$assert(299, this._cfg.tplDiv == null);
/* must not have already been called */
this.$assert(301, this._mainSection == null);
// run the section
var section = this.getRefreshedSection({
... | javascript | function (macro) {
/* must not be already linked */
this.$assert(299, this._cfg.tplDiv == null);
/* must not have already been called */
this.$assert(301, this._mainSection == null);
// run the section
var section = this.getRefreshedSection({
... | [
"function",
"(",
"macro",
")",
"{",
"/* must not be already linked */",
"this",
".",
"$assert",
"(",
"299",
",",
"this",
".",
"_cfg",
".",
"tplDiv",
"==",
"null",
")",
";",
"/* must not have already been called */",
"this",
".",
"$assert",
"(",
"301",
",",
"th... | Build and return the HTML string containing the markup for the template. This method must only be called
once per template context instance, and only if the tplDiv property of the parameter of InitTemplate was
undefined. When this function returns a non-null argument, you must call linkToPreviousMarkup after
inserting ... | [
"Build",
"and",
"return",
"the",
"HTML",
"string",
"containing",
"the",
"markup",
"for",
"the",
"template",
".",
"This",
"method",
"must",
"only",
"be",
"called",
"once",
"per",
"template",
"context",
"instance",
"and",
"only",
"if",
"the",
"tplDiv",
"proper... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L544-L556 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (tplDiv) {
var params = this._cfg;
/* check parameter: */
this.$assert(320, tplDiv != null);
/* must not be already linked: */
this.$assert(322, params.tplDiv == null);
/* must already have a markup waiting to be linked: */
thi... | javascript | function (tplDiv) {
var params = this._cfg;
/* check parameter: */
this.$assert(320, tplDiv != null);
/* must not be already linked: */
this.$assert(322, params.tplDiv == null);
/* must already have a markup waiting to be linked: */
thi... | [
"function",
"(",
"tplDiv",
")",
"{",
"var",
"params",
"=",
"this",
".",
"_cfg",
";",
"/* check parameter: */",
"this",
".",
"$assert",
"(",
"320",
",",
"tplDiv",
"!=",
"null",
")",
";",
"/* must not be already linked: */",
"this",
".",
"$assert",
"(",
"322",... | Initializes the widgets of the template after the HTML markup returned by getMarkup has been inserted in
the DOM.
@param {HTMLElement} tplDiv element in which the HTML markup has been inserted | [
"Initializes",
"the",
"widgets",
"of",
"the",
"template",
"after",
"the",
"HTML",
"markup",
"returned",
"by",
"getMarkup",
"has",
"been",
"inserted",
"in",
"the",
"DOM",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L563-L582 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (tplDiv) {
if (tplDiv && tplDiv.setAttribute) {
tplDiv.setAttribute("_template", this.tplClasspath);
tplDiv.__template = this._tpl;
tplDiv.__moduleCtrl = (this.moduleCtrlPrivate ? this.moduleCtrlPrivate : this.moduleCtrl);
tplDiv.__dat... | javascript | function (tplDiv) {
if (tplDiv && tplDiv.setAttribute) {
tplDiv.setAttribute("_template", this.tplClasspath);
tplDiv.__template = this._tpl;
tplDiv.__moduleCtrl = (this.moduleCtrlPrivate ? this.moduleCtrlPrivate : this.moduleCtrl);
tplDiv.__dat... | [
"function",
"(",
"tplDiv",
")",
"{",
"if",
"(",
"tplDiv",
"&&",
"tplDiv",
".",
"setAttribute",
")",
"{",
"tplDiv",
".",
"setAttribute",
"(",
"\"_template\"",
",",
"this",
".",
"tplClasspath",
")",
";",
"tplDiv",
".",
"__template",
"=",
"this",
".",
"_tpl... | Add debug information as expandos on the tplDiv element.
@param {aria.templates.CfgBeans:Div} tplDiv Reference to the div where to store debug information. Do
nothing if tplDiv is either null or does not have the setAttribute method. | [
"Add",
"debug",
"information",
"as",
"expandos",
"on",
"the",
"tplDiv",
"element",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L589-L596 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (tplDiv) {
if (tplDiv) {
tplDiv.__data = null;
tplDiv.__moduleCtrl = null;
tplDiv.__template = null;
}
} | javascript | function (tplDiv) {
if (tplDiv) {
tplDiv.__data = null;
tplDiv.__moduleCtrl = null;
tplDiv.__template = null;
}
} | [
"function",
"(",
"tplDiv",
")",
"{",
"if",
"(",
"tplDiv",
")",
"{",
"tplDiv",
".",
"__data",
"=",
"null",
";",
"tplDiv",
".",
"__moduleCtrl",
"=",
"null",
";",
"tplDiv",
".",
"__template",
"=",
"null",
";",
"}",
"}"
] | Remove debug information from the DOM element. Do nothing if the parameter is null.
@param {HTMLElement} tplDiv | [
"Remove",
"debug",
"information",
"from",
"the",
"DOM",
"element",
".",
"Do",
"nothing",
"if",
"the",
"parameter",
"is",
"null",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L602-L608 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (args) {
// PROFILING // var profilingId = this.$startMeasure("Generate markup for " + this.tplClasspath);
var validatorParam = {
json : args,
beanName : "aria.templates.CfgBeans.GetRefreshedSectionCfg"
};
ariaCoreJsonValidator.nor... | javascript | function (args) {
// PROFILING // var profilingId = this.$startMeasure("Generate markup for " + this.tplClasspath);
var validatorParam = {
json : args,
beanName : "aria.templates.CfgBeans.GetRefreshedSectionCfg"
};
ariaCoreJsonValidator.nor... | [
"function",
"(",
"args",
")",
"{",
"// PROFILING // var profilingId = this.$startMeasure(\"Generate markup for \" + this.tplClasspath);",
"var",
"validatorParam",
"=",
"{",
"json",
":",
"args",
",",
"beanName",
":",
"\"aria.templates.CfgBeans.GetRefreshedSectionCfg\"",
"}",
";",
... | Generate the markup for a specific section and return the section object.
@param {aria.templates.CfgBeans:GetRefreshedSectionCfg} args | [
"Generate",
"the",
"markup",
"for",
"a",
"specific",
"section",
"and",
"return",
"the",
"section",
"object",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L614-L672 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (out) {
this._out = out;
var macrolibs = this._macrolibs || [];
for (var i = 0, l = macrolibs.length; i < l; i++) {
macrolibs[i]._setOut(out);
}
} | javascript | function (out) {
this._out = out;
var macrolibs = this._macrolibs || [];
for (var i = 0, l = macrolibs.length; i < l; i++) {
macrolibs[i]._setOut(out);
}
} | [
"function",
"(",
"out",
")",
"{",
"this",
".",
"_out",
"=",
"out",
";",
"var",
"macrolibs",
"=",
"this",
".",
"_macrolibs",
"||",
"[",
"]",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"l",
"=",
"macrolibs",
".",
"length",
";",
"i",
"<",
"l",
... | Set the out object on this context and all its macro libs.
@param {aria.templates.MarkupWriter} out markup writer | [
"Set",
"the",
"out",
"object",
"on",
"this",
"context",
"and",
"all",
"its",
"macro",
"libs",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L678-L684 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (out, args) {
var sections = args.sections;
for (var i = 0, l = sections.length; i < l; i++) {
this.__$insertSection(null, sections[i]);
}
} | javascript | function (out, args) {
var sections = args.sections;
for (var i = 0, l = sections.length; i < l; i++) {
this.__$insertSection(null, sections[i]);
}
} | [
"function",
"(",
"out",
",",
"args",
")",
"{",
"var",
"sections",
"=",
"args",
".",
"sections",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"l",
"=",
"sections",
".",
"length",
";",
"i",
"<",
"l",
";",
"i",
"++",
")",
"{",
"this",
".",
"__$in... | Write dynamic sections.
@param {aria.templates.MarkupWriter} out markup writer.
@param {aria.templates.CfgBeans:InsertAdjacentSectionsCfg} args Adjacent sections configuration.
@private | [
"Write",
"dynamic",
"sections",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L729-L734 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (callback, options) {
if (this._out != null) {
// calling refresh while the HTML is being generated is not permitted
this.$logError(this.INVALID_STATE_FOR_REFRESH, [this.tplClasspath]);
return null;
}
var out = new ariaTemplate... | javascript | function (callback, options) {
if (this._out != null) {
// calling refresh while the HTML is being generated is not permitted
this.$logError(this.INVALID_STATE_FOR_REFRESH, [this.tplClasspath]);
return null;
}
var out = new ariaTemplate... | [
"function",
"(",
"callback",
",",
"options",
")",
"{",
"if",
"(",
"this",
".",
"_out",
"!=",
"null",
")",
"{",
"// calling refresh while the HTML is being generated is not permitted",
"this",
".",
"$logError",
"(",
"this",
".",
"INVALID_STATE_FOR_REFRESH",
",",
"[",... | Create a section. The section is not inserted in the sections tree of the template.
@param {aria.core.CfgBeans:Callback} callback callback which creates the content of the section. The
parameter given to this callback is the markup writer out object.
@param {Object} options optional object containing options for the ma... | [
"Create",
"a",
"section",
".",
"The",
"section",
"is",
"not",
"inserted",
"in",
"the",
"sections",
"tree",
"of",
"the",
"template",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L742-L756 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (section, skipInsertHTML, refreshArgs) {
// PROFILING // var profilingId = this.$startMeasure("Inserting section in DOM from " +
// PROFILING // this.tplClasspath);
var differed;
var params = this._cfg;
var tpl = this._tpl;
var domElt = se... | javascript | function (section, skipInsertHTML, refreshArgs) {
// PROFILING // var profilingId = this.$startMeasure("Inserting section in DOM from " +
// PROFILING // this.tplClasspath);
var differed;
var params = this._cfg;
var tpl = this._tpl;
var domElt = se... | [
"function",
"(",
"section",
",",
"skipInsertHTML",
",",
"refreshArgs",
")",
"{",
"// PROFILING // var profilingId = this.$startMeasure(\"Inserting section in DOM from \" +",
"// PROFILING // this.tplClasspath);",
"var",
"differed",
";",
"var",
"params",
"=",
"this",
".",
"_cfg"... | Insert the section's markup in the DOM | [
"Insert",
"the",
"section",
"s",
"markup",
"in",
"the",
"DOM"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L761-L793 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (evt) {
if (evt) {
var src = evt.src, differed = this._differed;
if (differed) {
ariaUtilsArray.remove(differed, src);
}
}
if (!differed || !differed.length) {
this._differed = null;
... | javascript | function (evt) {
if (evt) {
var src = evt.src, differed = this._differed;
if (differed) {
ariaUtilsArray.remove(differed, src);
}
}
if (!differed || !differed.length) {
this._differed = null;
... | [
"function",
"(",
"evt",
")",
"{",
"if",
"(",
"evt",
")",
"{",
"var",
"src",
"=",
"evt",
".",
"src",
",",
"differed",
"=",
"this",
".",
"_differed",
";",
"if",
"(",
"differed",
")",
"{",
"ariaUtilsArray",
".",
"remove",
"(",
"differed",
",",
"src",
... | Callback used differed element are ready. When all elements are ready, raise "Ready" event.
@private
@param {Object} evt | [
"Callback",
"used",
"differed",
"element",
"are",
"ready",
".",
"When",
"all",
"elements",
"are",
"ready",
"raise",
"Ready",
"event",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L823-L837 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (baseId) {
baseId = this._id + "_" + baseId.replace(/\+/g, "");
// Calculate and return the new id
var prefixIds = this._prefixIds;
var id = prefixIds[baseId] = (prefixIds[baseId] || 0) + 1;
return baseId + "_auto_" + id;
} | javascript | function (baseId) {
baseId = this._id + "_" + baseId.replace(/\+/g, "");
// Calculate and return the new id
var prefixIds = this._prefixIds;
var id = prefixIds[baseId] = (prefixIds[baseId] || 0) + 1;
return baseId + "_auto_" + id;
} | [
"function",
"(",
"baseId",
")",
"{",
"baseId",
"=",
"this",
".",
"_id",
"+",
"\"_\"",
"+",
"baseId",
".",
"replace",
"(",
"/",
"\\+",
"/",
"g",
",",
"\"\"",
")",
";",
"// Calculate and return the new id",
"var",
"prefixIds",
"=",
"this",
".",
"_prefixIds... | Generate an automatic id computed from a base id, with an incremental counter
@param {String} baseId specified in the template
@return {String} The global id to be used in the dom | [
"Generate",
"an",
"automatic",
"id",
"computed",
"from",
"a",
"base",
"id",
"with",
"an",
"incremental",
"counter"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L1263-L1270 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (id) {
var id = id + "";
if (id && id.indexOf("+") != -1) {
if (Aria.testMode) {
return this.$getAutoId(id);
}
return null;
}
return this.$getId(id);
} | javascript | function (id) {
var id = id + "";
if (id && id.indexOf("+") != -1) {
if (Aria.testMode) {
return this.$getAutoId(id);
}
return null;
}
return this.$getId(id);
} | [
"function",
"(",
"id",
")",
"{",
"var",
"id",
"=",
"id",
"+",
"\"\"",
";",
"if",
"(",
"id",
"&&",
"id",
".",
"indexOf",
"(",
"\"+\"",
")",
"!=",
"-",
"1",
")",
"{",
"if",
"(",
"Aria",
".",
"testMode",
")",
"{",
"return",
"this",
".",
"$getAut... | Return the generated domId for specified id.
@param {String|Number} id specified in the template. If it contains "+", an automatic id will be
generated if in the test mode.
@return {String} | [
"Return",
"the",
"generated",
"domId",
"for",
"specified",
"id",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L1295-L1304 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function () {
var res = this._persistentStorage;
if (res == null) {
if (this.data) {
res = this.data[Aria.FRAMEWORK_PREFIX + "persist::" + this.tplClasspath];
if (res == null) {
res = {};
this... | javascript | function () {
var res = this._persistentStorage;
if (res == null) {
if (this.data) {
res = this.data[Aria.FRAMEWORK_PREFIX + "persist::" + this.tplClasspath];
if (res == null) {
res = {};
this... | [
"function",
"(",
")",
"{",
"var",
"res",
"=",
"this",
".",
"_persistentStorage",
";",
"if",
"(",
"res",
"==",
"null",
")",
"{",
"if",
"(",
"this",
".",
"data",
")",
"{",
"res",
"=",
"this",
".",
"data",
"[",
"Aria",
".",
"FRAMEWORK_PREFIX",
"+",
... | Get a persistent storage place. | [
"Get",
"a",
"persistent",
"storage",
"place",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L1370-L1385 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (idArray) {
ariaUtilsDelegate.ieFocusFix();
var idToFocus;
if (ariaUtilsType.isArray(idArray)) {
idArray = idArray.slice(0);
idToFocus = idArray.shift();
} else {
idToFocus = idArray;
idArray = [];
... | javascript | function (idArray) {
ariaUtilsDelegate.ieFocusFix();
var idToFocus;
if (ariaUtilsType.isArray(idArray)) {
idArray = idArray.slice(0);
idToFocus = idArray.shift();
} else {
idToFocus = idArray;
idArray = [];
... | [
"function",
"(",
"idArray",
")",
"{",
"ariaUtilsDelegate",
".",
"ieFocusFix",
"(",
")",
";",
"var",
"idToFocus",
";",
"if",
"(",
"ariaUtilsType",
".",
"isArray",
"(",
"idArray",
")",
")",
"{",
"idArray",
"=",
"idArray",
".",
"slice",
"(",
"0",
")",
";"... | Focus a widget with a specified id programmatically. This method can be called from templates and
template scripts. If the focus fails, an error is thrown.
@param {String|Array} containing a path of ids of the widget to focus
@implements aria.templates.ITemplate | [
"Focus",
"a",
"widget",
"with",
"a",
"specified",
"id",
"programmatically",
".",
"This",
"method",
"can",
"be",
"called",
"from",
"templates",
"and",
"template",
"scripts",
".",
"If",
"the",
"focus",
"fails",
"an",
"error",
"is",
"thrown",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L1393-L1424 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (evt) {
var reloading = evt.reloadingObject;
var tmpCfg = this._getReloadCfg();
var isUsingModuleData = reloading && (this.moduleCtrl.getData() == tmpCfg.data);
Aria.disposeTemplate(tmpCfg.div); // dispose the old template
if (reloading) {
... | javascript | function (evt) {
var reloading = evt.reloadingObject;
var tmpCfg = this._getReloadCfg();
var isUsingModuleData = reloading && (this.moduleCtrl.getData() == tmpCfg.data);
Aria.disposeTemplate(tmpCfg.div); // dispose the old template
if (reloading) {
... | [
"function",
"(",
"evt",
")",
"{",
"var",
"reloading",
"=",
"evt",
".",
"reloadingObject",
";",
"var",
"tmpCfg",
"=",
"this",
".",
"_getReloadCfg",
"(",
")",
";",
"var",
"isUsingModuleData",
"=",
"reloading",
"&&",
"(",
"this",
".",
"moduleCtrl",
".",
"ge... | Called when the module controller is about to be disposed.
@param {Object} event Module controller event.
@protected | [
"Called",
"when",
"the",
"module",
"controller",
"is",
"about",
"to",
"be",
"disposed",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L1488-L1506 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function () {
var container = this.getContainerDiv();
var origCP = this._cfg.origClasspath ? this._cfg.origClasspath : this._cfg.classpath;
var tmpCfg = {
classpath : origCP,
width : this._cfg.width,
height : this._cfg.height,
... | javascript | function () {
var container = this.getContainerDiv();
var origCP = this._cfg.origClasspath ? this._cfg.origClasspath : this._cfg.classpath;
var tmpCfg = {
classpath : origCP,
width : this._cfg.width,
height : this._cfg.height,
... | [
"function",
"(",
")",
"{",
"var",
"container",
"=",
"this",
".",
"getContainerDiv",
"(",
")",
";",
"var",
"origCP",
"=",
"this",
".",
"_cfg",
".",
"origClasspath",
"?",
"this",
".",
"_cfg",
".",
"origClasspath",
":",
"this",
".",
"_cfg",
".",
"classpat... | Return the configuration object to use with Aria.loadTemplate to reload this template. With the result of
this method, it is possible to call this._callLoadTemplate.
@return {aria.templates.CfgBeans:LoadTemplateCfg}
@protected | [
"Return",
"the",
"configuration",
"object",
"to",
"use",
"with",
"Aria",
".",
"loadTemplate",
"to",
"reload",
"this",
"template",
".",
"With",
"the",
"result",
"of",
"this",
"method",
"it",
"is",
"possible",
"to",
"call",
"this",
".",
"_callLoadTemplate",
".... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L1514-L1532 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (tmpCfg, callback) {
var div = tmpCfg.div;
// check if the div is still in the dom
// (because it could be inside a template which was refreshed, so no longer in the dom)
if (!ariaUtilsDom.isInDom(div)) {
this.$callback(callback);
... | javascript | function (tmpCfg, callback) {
var div = tmpCfg.div;
// check if the div is still in the dom
// (because it could be inside a template which was refreshed, so no longer in the dom)
if (!ariaUtilsDom.isInDom(div)) {
this.$callback(callback);
... | [
"function",
"(",
"tmpCfg",
",",
"callback",
")",
"{",
"var",
"div",
"=",
"tmpCfg",
".",
"div",
";",
"// check if the div is still in the dom",
"// (because it could be inside a template which was refreshed, so no longer in the dom)",
"if",
"(",
"!",
"ariaUtilsDom",
".",
"is... | Call Aria.loadTemplate to reload this template.
@param {aria.templates.CfgBeans:LoadTemplateCfg} tmpCfg configuration for Aria.loadTemplate
@param {aria.core.CfgBeans:Callback} callback callback to be called when the reload is finished
@protected | [
"Call",
"Aria",
".",
"loadTemplate",
"to",
"reload",
"this",
"template",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L1540-L1569 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (onlyCSSDep) {
var classes = this._cssClasses;
if (!classes) {
if (this._cfg.isRootTemplate) {
// PTR 05086835: load the global CSS here, and remember that it was loaded
var deps = ['aria.templates.GlobalStyle'];
... | javascript | function (onlyCSSDep) {
var classes = this._cssClasses;
if (!classes) {
if (this._cfg.isRootTemplate) {
// PTR 05086835: load the global CSS here, and remember that it was loaded
var deps = ['aria.templates.GlobalStyle'];
... | [
"function",
"(",
"onlyCSSDep",
")",
"{",
"var",
"classes",
"=",
"this",
".",
"_cssClasses",
";",
"if",
"(",
"!",
"classes",
")",
"{",
"if",
"(",
"this",
".",
"_cfg",
".",
"isRootTemplate",
")",
"{",
"// PTR 05086835: load the global CSS here, and remember that i... | Get the list of CSS classnames that should be added to the Template container DOM element
@param {Boolean} onlyCSSDep if true, only include CSS class names corresponding to CSS template
dependencies.
@return {String} | [
"Get",
"the",
"list",
"of",
"CSS",
"classnames",
"that",
"should",
"be",
"added",
"to",
"the",
"Template",
"container",
"DOM",
"element"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L1626-L1651 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (status, id) {
this.$assert(1200, id != null);
if (status) {
this.__loadingOverlays.push(id);
} else {
ariaUtilsArray.remove(this.__loadingOverlays, id);
}
} | javascript | function (status, id) {
this.$assert(1200, id != null);
if (status) {
this.__loadingOverlays.push(id);
} else {
ariaUtilsArray.remove(this.__loadingOverlays, id);
}
} | [
"function",
"(",
"status",
",",
"id",
")",
"{",
"this",
".",
"$assert",
"(",
"1200",
",",
"id",
"!=",
"null",
")",
";",
"if",
"(",
"status",
")",
"{",
"this",
".",
"__loadingOverlays",
".",
"push",
"(",
"id",
")",
";",
"}",
"else",
"{",
"ariaUtil... | Register a processing indicator, either around a DomElementWrapper or a SectionWrapper. This function
necessary to know which are the visible indicators during a refresh.
@param {Boolean} status if the indicator is visible or not
@param {String} id Unique indicator identifier | [
"Register",
"a",
"processing",
"indicator",
"either",
"around",
"a",
"DomElementWrapper",
"or",
"a",
"SectionWrapper",
".",
"This",
"function",
"necessary",
"to",
"know",
"which",
"are",
"the",
"visible",
"indicators",
"during",
"a",
"refresh",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L1659-L1666 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function () {
var scrollPositions = null;
var containerDiv = this.getContainerDiv();
if (containerDiv) {
scrollPositions = {
scrollLeft : containerDiv.scrollLeft,
scrollTop : containerDiv.scrollTop
};
... | javascript | function () {
var scrollPositions = null;
var containerDiv = this.getContainerDiv();
if (containerDiv) {
scrollPositions = {
scrollLeft : containerDiv.scrollLeft,
scrollTop : containerDiv.scrollTop
};
... | [
"function",
"(",
")",
"{",
"var",
"scrollPositions",
"=",
"null",
";",
"var",
"containerDiv",
"=",
"this",
".",
"getContainerDiv",
"(",
")",
";",
"if",
"(",
"containerDiv",
")",
"{",
"scrollPositions",
"=",
"{",
"scrollLeft",
":",
"containerDiv",
".",
"scr... | Return an object with the scrollTop and the scrollLeft values of the HTMLElement that contains the div of
the template
@return {Object} scrollTop and scrollLeft of the div that contains the template | [
"Return",
"an",
"object",
"with",
"the",
"scrollTop",
"and",
"the",
"scrollLeft",
"values",
"of",
"the",
"HTMLElement",
"that",
"contains",
"the",
"div",
"of",
"the",
"template"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L1693-L1703 | train | |
ariatemplates/ariatemplates | src/aria/templates/TemplateCtxt.js | function (scrollPositions) {
var containerDiv = this.getContainerDiv();
if (containerDiv && scrollPositions) {
if (scrollPositions.hasOwnProperty('scrollLeft') && scrollPositions.scrollLeft != null) {
containerDiv.scrollLeft = scrollPositions.scrollLeft;
... | javascript | function (scrollPositions) {
var containerDiv = this.getContainerDiv();
if (containerDiv && scrollPositions) {
if (scrollPositions.hasOwnProperty('scrollLeft') && scrollPositions.scrollLeft != null) {
containerDiv.scrollLeft = scrollPositions.scrollLeft;
... | [
"function",
"(",
"scrollPositions",
")",
"{",
"var",
"containerDiv",
"=",
"this",
".",
"getContainerDiv",
"(",
")",
";",
"if",
"(",
"containerDiv",
"&&",
"scrollPositions",
")",
"{",
"if",
"(",
"scrollPositions",
".",
"hasOwnProperty",
"(",
"'scrollLeft'",
")"... | Set the scrollTop and the scrollLeft values of the HTMLElement that contains the div of the template
@param {Object} contains the desired scrollTop and scrollLeft values | [
"Set",
"the",
"scrollTop",
"and",
"the",
"scrollLeft",
"values",
"of",
"the",
"HTMLElement",
"that",
"contains",
"the",
"div",
"of",
"the",
"template"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TemplateCtxt.js#L1709-L1719 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/SelectBox.js | function () {
this.$DropDownTextInput._checkCfgConsistency.call(this);
var opt = this._cfg.options;
var values = [];
var dupValues = [];
var map = {};
for (var count = 0; count < opt.length; count++) {
if (map[opt[count].value]) {
... | javascript | function () {
this.$DropDownTextInput._checkCfgConsistency.call(this);
var opt = this._cfg.options;
var values = [];
var dupValues = [];
var map = {};
for (var count = 0; count < opt.length; count++) {
if (map[opt[count].value]) {
... | [
"function",
"(",
")",
"{",
"this",
".",
"$DropDownTextInput",
".",
"_checkCfgConsistency",
".",
"call",
"(",
"this",
")",
";",
"var",
"opt",
"=",
"this",
".",
"_cfg",
".",
"options",
";",
"var",
"values",
"=",
"[",
"]",
";",
"var",
"dupValues",
"=",
... | This method checks the consistancy of the values provided in the attributes of SelectBox and logs and error
if there are any descripancies | [
"This",
"method",
"checks",
"the",
"consistancy",
"of",
"the",
"values",
"provided",
"in",
"the",
"attributes",
"of",
"SelectBox",
"and",
"logs",
"and",
"error",
"if",
"there",
"are",
"any",
"descripancies"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/SelectBox.js#L88-L108 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/SelectBox.js | function (propertyName, newValue, oldValue) {
if (propertyName === "options") {
this.controller.setListOptions(newValue);
var report = this.controller.checkValue(null);
this._reactToControllerReport(report, {
stopValueProp : true
... | javascript | function (propertyName, newValue, oldValue) {
if (propertyName === "options") {
this.controller.setListOptions(newValue);
var report = this.controller.checkValue(null);
this._reactToControllerReport(report, {
stopValueProp : true
... | [
"function",
"(",
"propertyName",
",",
"newValue",
",",
"oldValue",
")",
"{",
"if",
"(",
"propertyName",
"===",
"\"options\"",
")",
"{",
"this",
".",
"controller",
".",
"setListOptions",
"(",
"newValue",
")",
";",
"var",
"report",
"=",
"this",
".",
"control... | Internal method called when one of the model property that the widget is bound to has changed Must be
@param {String} propertyName the property name
@param {Object} newValue the new value
@param {Object} oldValue the old property value
@protected | [
"Internal",
"method",
"called",
"when",
"one",
"of",
"the",
"model",
"property",
"that",
"the",
"widget",
"is",
"bound",
"to",
"has",
"changed",
"Must",
"be"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/SelectBox.js#L117-L128 | train | |
ariatemplates/ariatemplates | src/aria/html/Select.js | function () {
var bindings = this._cfg.bind;
var isBound = false;
// it doesn't make sense to bind both index and value,
// so we just state that the index takes precedence on the value
if (bindings.selectedIndex) {
var index = this._transform... | javascript | function () {
var bindings = this._cfg.bind;
var isBound = false;
// it doesn't make sense to bind both index and value,
// so we just state that the index takes precedence on the value
if (bindings.selectedIndex) {
var index = this._transform... | [
"function",
"(",
")",
"{",
"var",
"bindings",
"=",
"this",
".",
"_cfg",
".",
"bind",
";",
"var",
"isBound",
"=",
"false",
";",
"// it doesn't make sense to bind both index and value,",
"// so we just state that the index takes precedence on the value",
"if",
"(",
"binding... | Return the selected index from the value bound to the data model. if both selectedIndex and value are bound,
compute the index from selectedIndex. Throws a warning if there is no binding defined in the widget | [
"Return",
"the",
"selected",
"index",
"from",
"the",
"value",
"bound",
"to",
"the",
"data",
"model",
".",
"if",
"both",
"selectedIndex",
"and",
"value",
"are",
"bound",
"compute",
"the",
"index",
"from",
"selectedIndex",
".",
"Throws",
"a",
"warning",
"if",
... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/Select.js#L182-L209 | train | |
ariatemplates/ariatemplates | src/aria/html/Select.js | function () {
if (!this.options) {
this.options = [];
if (this._domElt.options) {
for (var i = 0, l = this._domElt.options.length; i < l; i++) {
var elementToPush = {
value : this._domElt.options[i].value... | javascript | function () {
if (!this.options) {
this.options = [];
if (this._domElt.options) {
for (var i = 0, l = this._domElt.options.length; i < l; i++) {
var elementToPush = {
value : this._domElt.options[i].value... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"options",
")",
"{",
"this",
".",
"options",
"=",
"[",
"]",
";",
"if",
"(",
"this",
".",
"_domElt",
".",
"options",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"l",
"=",
"this",
"... | get the options from the dom if they haven't been set from the cfg | [
"get",
"the",
"options",
"from",
"the",
"dom",
"if",
"they",
"haven",
"t",
"been",
"set",
"from",
"the",
"cfg"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/Select.js#L214-L227 | train |
Subsets and Splits
SQL Console for semeru/code-text-javascript
Retrieves 20,000 non-null code samples labeled as JavaScript, providing a basic overview of the dataset.