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/popups/PopupManager.js | function (popup) {
var curZIndex = popup.getZIndex();
var newBaseZIndex = this.currentZIndex;
if (curZIndex === newBaseZIndex) {
// already top most, nothing to do in any case!
return;
}
// gets all p... | javascript | function (popup) {
var curZIndex = popup.getZIndex();
var newBaseZIndex = this.currentZIndex;
if (curZIndex === newBaseZIndex) {
// already top most, nothing to do in any case!
return;
}
// gets all p... | [
"function",
"(",
"popup",
")",
"{",
"var",
"curZIndex",
"=",
"popup",
".",
"getZIndex",
"(",
")",
";",
"var",
"newBaseZIndex",
"=",
"this",
".",
"currentZIndex",
";",
"if",
"(",
"curZIndex",
"===",
"newBaseZIndex",
")",
"{",
"// already top most, nothing to do... | Bring the given popup to the front, changing its zIndex, if it is necessary.
@param {aria.popups.Popup} popup popup whose zIndex is to be changed | [
"Bring",
"the",
"given",
"popup",
"to",
"the",
"front",
"changing",
"its",
"zIndex",
"if",
"it",
"is",
"necessary",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L445-L487 | train | |
ariatemplates/ariatemplates | src/aria/popups/PopupManager.js | function (event) {
var domEvent = /** @type aria.DomEvent */
new ariaDomEvent(event), target = /** @type HTMLElement */
domEvent.target;
if (this.openedPopups.length === 0) {
domEvent.$dispose();
return;
... | javascript | function (event) {
var domEvent = /** @type aria.DomEvent */
new ariaDomEvent(event), target = /** @type HTMLElement */
domEvent.target;
if (this.openedPopups.length === 0) {
domEvent.$dispose();
return;
... | [
"function",
"(",
"event",
")",
"{",
"var",
"domEvent",
"=",
"/** @type aria.DomEvent */",
"new",
"ariaDomEvent",
"(",
"event",
")",
",",
"target",
"=",
"/** @type HTMLElement */",
"domEvent",
".",
"target",
";",
"if",
"(",
"this",
".",
"openedPopups",
".",
"le... | Callback when the user clicks on the document
@param {Object} event The DOM click event triggering the callback | [
"Callback",
"when",
"the",
"user",
"clicks",
"on",
"the",
"document"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L493-L525 | train | |
ariatemplates/ariatemplates | src/aria/popups/PopupManager.js | function (event) {
var domEvent = /** @type aria.DomEvent */
new ariaDomEvent(event);
var fromTarget = /** @type HTMLElement */
domEvent.target;
var toTarget = /** @type HTMLElement */
domEvent.relatedTarget;
... | javascript | function (event) {
var domEvent = /** @type aria.DomEvent */
new ariaDomEvent(event);
var fromTarget = /** @type HTMLElement */
domEvent.target;
var toTarget = /** @type HTMLElement */
domEvent.relatedTarget;
... | [
"function",
"(",
"event",
")",
"{",
"var",
"domEvent",
"=",
"/** @type aria.DomEvent */",
"new",
"ariaDomEvent",
"(",
"event",
")",
";",
"var",
"fromTarget",
"=",
"/** @type HTMLElement */",
"domEvent",
".",
"target",
";",
"var",
"toTarget",
"=",
"/** @type HTMLEl... | Callback when the mouse move on the document. This is required to close some popups.
@param {Object} event | [
"Callback",
"when",
"the",
"mouse",
"move",
"on",
"the",
"document",
".",
"This",
"is",
"required",
"to",
"close",
"some",
"popups",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L531-L547 | train | |
ariatemplates/ariatemplates | src/aria/popups/PopupManager.js | function (event) {
var domEvent = /** @type aria.DomEvent */
new ariaDomEvent(event);
// Retrieve the dom target
var target = /** @type HTMLElement */
domEvent.target;
// Close first popup on the stack that can be closed
... | javascript | function (event) {
var domEvent = /** @type aria.DomEvent */
new ariaDomEvent(event);
// Retrieve the dom target
var target = /** @type HTMLElement */
domEvent.target;
// Close first popup on the stack that can be closed
... | [
"function",
"(",
"event",
")",
"{",
"var",
"domEvent",
"=",
"/** @type aria.DomEvent */",
"new",
"ariaDomEvent",
"(",
"event",
")",
";",
"// Retrieve the dom target",
"var",
"target",
"=",
"/** @type HTMLElement */",
"domEvent",
".",
"target",
";",
"// Close first pop... | Callback for mouse scroll. This is required to close some popups.
@param {Object} event | [
"Callback",
"for",
"mouse",
"scroll",
".",
"This",
"is",
"required",
"to",
"close",
"some",
"popups",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L553-L581 | train | |
ariatemplates/ariatemplates | src/aria/popups/PopupManager.js | function (popup) {
if (utilsArray.isEmpty(this.openedPopups)) {
this.connectEvents();
}
if (popup.modalMaskDomElement) {
if (this.modalPopups === 0) {
this.connectModalEvents();
this.$... | javascript | function (popup) {
if (utilsArray.isEmpty(this.openedPopups)) {
this.connectEvents();
}
if (popup.modalMaskDomElement) {
if (this.modalPopups === 0) {
this.connectModalEvents();
this.$... | [
"function",
"(",
"popup",
")",
"{",
"if",
"(",
"utilsArray",
".",
"isEmpty",
"(",
"this",
".",
"openedPopups",
")",
")",
"{",
"this",
".",
"connectEvents",
"(",
")",
";",
"}",
"if",
"(",
"popup",
".",
"modalMaskDomElement",
")",
"{",
"if",
"(",
"this... | Manager handler when a popup is open. Register the popup as opened, register global events if needed.
@param {aria.popups.Popup} popup | [
"Manager",
"handler",
"when",
"a",
"popup",
"is",
"open",
".",
"Register",
"the",
"popup",
"as",
"opened",
"register",
"global",
"events",
"if",
"needed",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L587-L617 | train | |
ariatemplates/ariatemplates | src/aria/popups/PopupManager.js | function (popup) {
var openedPopups = this.openedPopups;
utilsArray.remove(openedPopups, popup);
if (popup.modalMaskDomElement) {
this.modalPopups -= 1;
if (this.modalPopups === 0) {
this.disconnectModalEvent... | javascript | function (popup) {
var openedPopups = this.openedPopups;
utilsArray.remove(openedPopups, popup);
if (popup.modalMaskDomElement) {
this.modalPopups -= 1;
if (this.modalPopups === 0) {
this.disconnectModalEvent... | [
"function",
"(",
"popup",
")",
"{",
"var",
"openedPopups",
"=",
"this",
".",
"openedPopups",
";",
"utilsArray",
".",
"remove",
"(",
"openedPopups",
",",
"popup",
")",
";",
"if",
"(",
"popup",
".",
"modalMaskDomElement",
")",
"{",
"this",
".",
"modalPopups"... | Manager handler when a popup is closed. Unregister the popup as opened, unregister global events if needed.
@param {aria.popups.Popup} popup | [
"Manager",
"handler",
"when",
"a",
"popup",
"is",
"closed",
".",
"Unregister",
"the",
"popup",
"as",
"opened",
"unregister",
"global",
"events",
"if",
"needed",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L623-L646 | train | |
ariatemplates/ariatemplates | src/aria/popups/PopupManager.js | function (popup) {
if (utilsArray.contains(this.openedPopups, popup)) {
utilsArray.remove(this.openedPopups, popup);
}
if (utilsArray.contains(this.popups, popup)) {
utilsArray.remove(this.popups, popup);
}
... | javascript | function (popup) {
if (utilsArray.contains(this.openedPopups, popup)) {
utilsArray.remove(this.openedPopups, popup);
}
if (utilsArray.contains(this.popups, popup)) {
utilsArray.remove(this.popups, popup);
}
... | [
"function",
"(",
"popup",
")",
"{",
"if",
"(",
"utilsArray",
".",
"contains",
"(",
"this",
".",
"openedPopups",
",",
"popup",
")",
")",
"{",
"utilsArray",
".",
"remove",
"(",
"this",
".",
"openedPopups",
",",
"popup",
")",
";",
"}",
"if",
"(",
"utils... | Unregister the popup in the manager.
@param {aria.popups.Popup} popup | [
"Unregister",
"the",
"popup",
"in",
"the",
"manager",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L674-L684 | train | |
ariatemplates/ariatemplates | src/aria/popups/PopupManager.js | function (domElement) {
var popups = this.popups;
for (var i = 0, l = popups.length; i < l; i++) {
var curPopup = popups[i];
if (curPopup.domElement == domElement) {
return curPopup;
}
}
... | javascript | function (domElement) {
var popups = this.popups;
for (var i = 0, l = popups.length; i < l; i++) {
var curPopup = popups[i];
if (curPopup.domElement == domElement) {
return curPopup;
}
}
... | [
"function",
"(",
"domElement",
")",
"{",
"var",
"popups",
"=",
"this",
".",
"popups",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"l",
"=",
"popups",
".",
"length",
";",
"i",
"<",
"l",
";",
"i",
"++",
")",
"{",
"var",
"curPopup",
"=",
"popups",... | Get the popup object from its DOM element.
@param {HTMLElement} domElement DOM element of the popup
@return {aria.popups.Popup} | [
"Get",
"the",
"popup",
"object",
"from",
"its",
"DOM",
"element",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/PopupManager.js#L691-L700 | train | |
ariatemplates/ariatemplates | src/aria/widgets/calendar/RangeCalendar.js | function (evt) {
if (this._inOnBoundPropertyChange) {
return;
}
if (evt.name == "update") {
if (evt.properties["startDate"]) {
this.setProperty("startDate", this._subTplData.settings.startDate);
}
} else ... | javascript | function (evt) {
if (this._inOnBoundPropertyChange) {
return;
}
if (evt.name == "update") {
if (evt.properties["startDate"]) {
this.setProperty("startDate", this._subTplData.settings.startDate);
}
} else ... | [
"function",
"(",
"evt",
")",
"{",
"if",
"(",
"this",
".",
"_inOnBoundPropertyChange",
")",
"{",
"return",
";",
"}",
"if",
"(",
"evt",
".",
"name",
"==",
"\"update\"",
")",
"{",
"if",
"(",
"evt",
".",
"properties",
"[",
"\"startDate\"",
"]",
")",
"{",... | React to the events coming from the module controller.
@param {Object} evt Module event | [
"React",
"to",
"the",
"events",
"coming",
"from",
"the",
"module",
"controller",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/calendar/RangeCalendar.js#L86-L104 | train | |
ariatemplates/ariatemplates | src/aria/widgets/calendar/RangeCalendar.js | function () {
var res = [];
var cfg = this._cfg;
if (cfg.fromDate || cfg.toDate) {
var cssPrefix = "x" + this._skinnableClass + "_" + this._cfg.sclass;
res.push({
fromDate : cfg.fromDate || cfg.toDate,
toDate : c... | javascript | function () {
var res = [];
var cfg = this._cfg;
if (cfg.fromDate || cfg.toDate) {
var cssPrefix = "x" + this._skinnableClass + "_" + this._cfg.sclass;
res.push({
fromDate : cfg.fromDate || cfg.toDate,
toDate : c... | [
"function",
"(",
")",
"{",
"var",
"res",
"=",
"[",
"]",
";",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"if",
"(",
"cfg",
".",
"fromDate",
"||",
"cfg",
".",
"toDate",
")",
"{",
"var",
"cssPrefix",
"=",
"\"x\"",
"+",
"this",
".",
"_skinnableClas... | Returns the array of ranges to be passed to the calendar controller.
@return {Array} | [
"Returns",
"the",
"array",
"of",
"ranges",
"to",
"be",
"passed",
"to",
"the",
"calendar",
"controller",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/calendar/RangeCalendar.js#L110-L131 | train | |
ariatemplates/ariatemplates | src/aria/widgets/calendar/RangeCalendar.js | function (propertyName, newValue, oldValue) {
this._inOnBoundPropertyChange = true;
try {
if (propertyName == "startDate") {
this._subTplModuleCtrl.navigate({}, {
date : newValue
});
} else if (proper... | javascript | function (propertyName, newValue, oldValue) {
this._inOnBoundPropertyChange = true;
try {
if (propertyName == "startDate") {
this._subTplModuleCtrl.navigate({}, {
date : newValue
});
} else if (proper... | [
"function",
"(",
"propertyName",
",",
"newValue",
",",
"oldValue",
")",
"{",
"this",
".",
"_inOnBoundPropertyChange",
"=",
"true",
";",
"try",
"{",
"if",
"(",
"propertyName",
"==",
"\"startDate\"",
")",
"{",
"this",
".",
"_subTplModuleCtrl",
".",
"navigate",
... | Internal method called when one of the model property that the widget is bound to has changed.
@protected
@param {String} propertyName the property name
@param {Object} newValue the new value. If transformation is used, refers to widget value and not data model
value.
@param {Object} oldValue the old property value. If... | [
"Internal",
"method",
"called",
"when",
"one",
"of",
"the",
"model",
"property",
"that",
"the",
"widget",
"is",
"bound",
"to",
"has",
"changed",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/calendar/RangeCalendar.js#L142-L155 | train | |
ariatemplates/ariatemplates | src/aria/widgets/calendar/RangeCalendar.js | function (domEvt) {
var domElt = this.getDom();
if (this.sendKey(domEvt.charCode, domEvt.keyCode)) {
domEvt.preventDefault(true);
domElt.focus();
}
} | javascript | function (domEvt) {
var domElt = this.getDom();
if (this.sendKey(domEvt.charCode, domEvt.keyCode)) {
domEvt.preventDefault(true);
domElt.focus();
}
} | [
"function",
"(",
"domEvt",
")",
"{",
"var",
"domElt",
"=",
"this",
".",
"getDom",
"(",
")",
";",
"if",
"(",
"this",
".",
"sendKey",
"(",
"domEvt",
".",
"charCode",
",",
"domEvt",
".",
"keyCode",
")",
")",
"{",
"domEvt",
".",
"preventDefault",
"(",
... | Keyboard support for the calendar.
@protected
@param {aria.DomEvent} domEvt Key down event | [
"Keyboard",
"support",
"for",
"the",
"calendar",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/calendar/RangeCalendar.js#L162-L168 | train | |
ariatemplates/ariatemplates | src/aria/widgets/calendar/RangeCalendar.js | function () {
this._plannedFocusUpdate = null;
if (this._focusStyle == this._hasFocus) {
// nothing to do!
return;
}
var moduleCtrl = this._subTplModuleCtrl, dom = this.getDom();
if (moduleCtrl && dom && this._cfg.tabIndex != nu... | javascript | function () {
this._plannedFocusUpdate = null;
if (this._focusStyle == this._hasFocus) {
// nothing to do!
return;
}
var moduleCtrl = this._subTplModuleCtrl, dom = this.getDom();
if (moduleCtrl && dom && this._cfg.tabIndex != nu... | [
"function",
"(",
")",
"{",
"this",
".",
"_plannedFocusUpdate",
"=",
"null",
";",
"if",
"(",
"this",
".",
"_focusStyle",
"==",
"this",
".",
"_hasFocus",
")",
"{",
"// nothing to do!",
"return",
";",
"}",
"var",
"moduleCtrl",
"=",
"this",
".",
"_subTplModule... | Notify the calendar module controller of a change of focus.
@protected | [
"Notify",
"the",
"calendar",
"module",
"controller",
"of",
"a",
"change",
"of",
"focus",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/calendar/RangeCalendar.js#L217-L261 | train | |
ariatemplates/ariatemplates | src/aria/widgets/calendar/RangeCalendar.js | function (charCode, keyCode) {
var moduleCtrl = this._subTplModuleCtrl;
if (moduleCtrl) {
var value = this._subTplData.settings.value;
if ((keyCode == 13 || keyCode == 32) && value) {
// SPACE or ENTER -> call dateSelect
thi... | javascript | function (charCode, keyCode) {
var moduleCtrl = this._subTplModuleCtrl;
if (moduleCtrl) {
var value = this._subTplData.settings.value;
if ((keyCode == 13 || keyCode == 32) && value) {
// SPACE or ENTER -> call dateSelect
thi... | [
"function",
"(",
"charCode",
",",
"keyCode",
")",
"{",
"var",
"moduleCtrl",
"=",
"this",
".",
"_subTplModuleCtrl",
";",
"if",
"(",
"moduleCtrl",
")",
"{",
"var",
"value",
"=",
"this",
".",
"_subTplData",
".",
"settings",
".",
"value",
";",
"if",
"(",
"... | Send a key to the calendar module controller
@param {String} charCode Character code
@param {String} keyCode Key code
@return {Boolean} true if default action and key propagation should be canceled. | [
"Send",
"a",
"key",
"to",
"the",
"calendar",
"module",
"controller"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/calendar/RangeCalendar.js#L269-L286 | train | |
ariatemplates/ariatemplates | src/aria/storage/HTML5Storage.js | function (options, storage, throwIfMissing) {
this.$AbstractStorage.constructor.call(this, options);
/**
* Type of html5 storage. E.g. localStorage, sessionStorage
* @type String
*/
this.type = storage;
/**
* Keep a reference to the global storage ob... | javascript | function (options, storage, throwIfMissing) {
this.$AbstractStorage.constructor.call(this, options);
/**
* Type of html5 storage. E.g. localStorage, sessionStorage
* @type String
*/
this.type = storage;
/**
* Keep a reference to the global storage ob... | [
"function",
"(",
"options",
",",
"storage",
",",
"throwIfMissing",
")",
"{",
"this",
".",
"$AbstractStorage",
".",
"constructor",
".",
"call",
"(",
"this",
",",
"options",
")",
";",
"/**\n * Type of html5 storage. E.g. localStorage, sessionStorage\n * @typ... | Create a generic instance of HTML5Storage
@param {aria.storage.Beans:ConstructorArgs} options Constructor options
@param {String} storage Type of storage: either localStorage or sessionStorage | [
"Create",
"a",
"generic",
"instance",
"of",
"HTML5Storage"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/storage/HTML5Storage.js#L36-L66 | train | |
ariatemplates/ariatemplates | src/aria/storage/HTML5Storage.js | function (event) {
// In FF 3.6 this event is raised also inside the same window
if (aria.storage.EventBus.stop) {
return;
}
var isInteresting = this.namespace
? event.key.substring(0, this.namespace.length) === this.namespace
... | javascript | function (event) {
// In FF 3.6 this event is raised also inside the same window
if (aria.storage.EventBus.stop) {
return;
}
var isInteresting = this.namespace
? event.key.substring(0, this.namespace.length) === this.namespace
... | [
"function",
"(",
"event",
")",
"{",
"// In FF 3.6 this event is raised also inside the same window",
"if",
"(",
"aria",
".",
"storage",
".",
"EventBus",
".",
"stop",
")",
"{",
"return",
";",
"}",
"var",
"isInteresting",
"=",
"this",
".",
"namespace",
"?",
"event... | React to storage event raised by the browser. We react only if this class does not have a namespace or if the
key appears to be correctly namespaced.
@param {HTMLEvent} event Event raised by the browser | [
"React",
"to",
"storage",
"event",
"raised",
"by",
"the",
"browser",
".",
"We",
"react",
"only",
"if",
"this",
"class",
"does",
"not",
"have",
"a",
"namespace",
"or",
"if",
"the",
"key",
"appears",
"to",
"be",
"correctly",
"namespaced",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/storage/HTML5Storage.js#L115-L146 | train | |
ariatemplates/ariatemplates | src/aria/storage/HTML5Storage.js | function () {
if (!this.storage) {
return;
}
var listeners = !!this._listeners;
var registeredBrowserEvent = !!this._browserEventCb;
if (listeners !== registeredBrowserEvent) {
if (listeners) {
this._browser... | javascript | function () {
if (!this.storage) {
return;
}
var listeners = !!this._listeners;
var registeredBrowserEvent = !!this._browserEventCb;
if (listeners !== registeredBrowserEvent) {
if (listeners) {
this._browser... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"storage",
")",
"{",
"return",
";",
"}",
"var",
"listeners",
"=",
"!",
"!",
"this",
".",
"_listeners",
";",
"var",
"registeredBrowserEvent",
"=",
"!",
"!",
"this",
".",
"_browserEventCb",
";",
"... | Depending on whether there is any listener, registers or unregisters the browser storage event. | [
"Depending",
"on",
"whether",
"there",
"is",
"any",
"listener",
"registers",
"or",
"unregisters",
"the",
"browser",
"storage",
"event",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/storage/HTML5Storage.js#L151-L172 | train | |
ariatemplates/ariatemplates | src/aria/jsunit/Assert.js | function () {
this.$Test._endTest.call(this);
this.checkExpectedEventListEnd();
this.resetClassOverrides();
this.assertLogsEmpty(false, false);
this._assertCount = 0;
this._currentTestName = '';
this._isFini... | javascript | function () {
this.$Test._endTest.call(this);
this.checkExpectedEventListEnd();
this.resetClassOverrides();
this.assertLogsEmpty(false, false);
this._assertCount = 0;
this._currentTestName = '';
this._isFini... | [
"function",
"(",
")",
"{",
"this",
".",
"$Test",
".",
"_endTest",
".",
"call",
"(",
"this",
")",
";",
"this",
".",
"checkExpectedEventListEnd",
"(",
")",
";",
"this",
".",
"resetClassOverrides",
"(",
")",
";",
"this",
".",
"assertLogsEmpty",
"(",
"false"... | Reset the object and notify the end of the test to the listener
@private | [
"Reset",
"the",
"object",
"and",
"notify",
"the",
"end",
"of",
"the",
"test",
"to",
"the",
"listener"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/jsunit/Assert.js#L128-L144 | train | |
ariatemplates/ariatemplates | src/aria/jsunit/Assert.js | function (value, optMsg) {
this._assertCount++;
this._totalAssertCount++;
if (value !== true) {
var msg = "Assert #" + this._assertCount + " failed";
if (optMsg) {
msg += " : " + optMsg;
}... | javascript | function (value, optMsg) {
this._assertCount++;
this._totalAssertCount++;
if (value !== true) {
var msg = "Assert #" + this._assertCount + " failed";
if (optMsg) {
msg += " : " + optMsg;
}... | [
"function",
"(",
"value",
",",
"optMsg",
")",
"{",
"this",
".",
"_assertCount",
"++",
";",
"this",
".",
"_totalAssertCount",
"++",
";",
"if",
"(",
"value",
"!==",
"true",
")",
"{",
"var",
"msg",
"=",
"\"Assert #\"",
"+",
"this",
".",
"_assertCount",
"+... | Check that value is true - if not a failure will be raised in the test context
@param {Boolean} value the value to test
@param {String} optMsg optional message to add to the failure description | [
"Check",
"that",
"value",
"is",
"true",
"-",
"if",
"not",
"a",
"failure",
"will",
"be",
"raised",
"in",
"the",
"test",
"context"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/jsunit/Assert.js#L166-L188 | train | |
ariatemplates/ariatemplates | src/aria/jsunit/Assert.js | function (errorMsg, count) {
var res = null;
var logAppender = this._logAppender;
var logs = logAppender.getLogs(), errFound = false, newLogs = [];
if (!errorMsg) {
this.assertTrue(false, "assertErrorInLogs was called with a null error ... | javascript | function (errorMsg, count) {
var res = null;
var logAppender = this._logAppender;
var logs = logAppender.getLogs(), errFound = false, newLogs = [];
if (!errorMsg) {
this.assertTrue(false, "assertErrorInLogs was called with a null error ... | [
"function",
"(",
"errorMsg",
",",
"count",
")",
"{",
"var",
"res",
"=",
"null",
";",
"var",
"logAppender",
"=",
"this",
".",
"_logAppender",
";",
"var",
"logs",
"=",
"logAppender",
".",
"getLogs",
"(",
")",
",",
"errFound",
"=",
"false",
",",
"newLogs"... | Asserts that an error should be present in the logs at least 'count' number of times. Once called,
'count' occurrences of the error will be discarded. If the parameter 'count' is not present, all
occurrences will be removed.
@param {String} errorMsg Must not be null or undefined
@param {Number} count [optional] number ... | [
"Asserts",
"that",
"an",
"error",
"should",
"be",
"present",
"in",
"the",
"logs",
"at",
"least",
"count",
"number",
"of",
"times",
".",
"Once",
"called",
"count",
"occurrences",
"of",
"the",
"error",
"will",
"be",
"discarded",
".",
"If",
"the",
"parameter"... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/jsunit/Assert.js#L368-L402 | train | |
ariatemplates/ariatemplates | src/aria/jsunit/Assert.js | function (evtName) {
for (var i = 0; i < this.evtLogs.length; i++) {
if (this.evtLogs[i].name == evtName) {
return this.evtLogs[i];
}
}
return null;
} | javascript | function (evtName) {
for (var i = 0; i < this.evtLogs.length; i++) {
if (this.evtLogs[i].name == evtName) {
return this.evtLogs[i];
}
}
return null;
} | [
"function",
"(",
"evtName",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"evtLogs",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"evtLogs",
"[",
"i",
"]",
".",
"name",
"==",
"evtName",
")",
"{",
... | Retrieve the event object corresponding to a given event name
@param {String} evtName The name of the event
@return {Object} event object corresponding to evtName | [
"Retrieve",
"the",
"event",
"object",
"corresponding",
"to",
"a",
"given",
"event",
"name"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/jsunit/Assert.js#L529-L536 | train | |
ariatemplates/ariatemplates | src/aria/jsunit/Assert.js | function () {
if (this._expectedEventsList != null) {
this.$raiseEvent({
name : "failure",
testClass : this.$classpath,
testState : this._currentTestName,
description : 'Not all expected e... | javascript | function () {
if (this._expectedEventsList != null) {
this.$raiseEvent({
name : "failure",
testClass : this.$classpath,
testState : this._currentTestName,
description : 'Not all expected e... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"_expectedEventsList",
"!=",
"null",
")",
"{",
"this",
".",
"$raiseEvent",
"(",
"{",
"name",
":",
"\"failure\"",
",",
"testClass",
":",
"this",
".",
"$classpath",
",",
"testState",
":",
"this",
".",
"_... | Check that all events in the list registered with registerExpectedEventsList have occurred. | [
"Check",
"that",
"all",
"events",
"in",
"the",
"list",
"registered",
"with",
"registerExpectedEventsList",
"have",
"occurred",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/jsunit/Assert.js#L609-L621 | train | |
ariatemplates/ariatemplates | src/aria/jsunit/Assert.js | function (initialClass, mockClass) {
if (this._overriddenClasses == null) {
this._overriddenClasses = {};
}
var cacheKey = Aria.getLogicalPath(initialClass, ".js", true);
var clsInfos = this._overriddenClasses[initialClass];
... | javascript | function (initialClass, mockClass) {
if (this._overriddenClasses == null) {
this._overriddenClasses = {};
}
var cacheKey = Aria.getLogicalPath(initialClass, ".js", true);
var clsInfos = this._overriddenClasses[initialClass];
... | [
"function",
"(",
"initialClass",
",",
"mockClass",
")",
"{",
"if",
"(",
"this",
".",
"_overriddenClasses",
"==",
"null",
")",
"{",
"this",
".",
"_overriddenClasses",
"=",
"{",
"}",
";",
"}",
"var",
"cacheKey",
"=",
"Aria",
".",
"getLogicalPath",
"(",
"in... | Overrides a class with another.
@param {String} Classpath of the class to be overridden (e.g. 'aria.core.DownloadMgr')
@param {Object} Overriding class (e.g. test.aria.core.DownloadMgrMock) If the class was already
overridden, the current class with namespace initialClass is not saved. It is not specific to classes
whi... | [
"Overrides",
"a",
"class",
"with",
"another",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/jsunit/Assert.js#L641-L690 | train | |
ariatemplates/ariatemplates | src/aria/jsunit/Assert.js | function () {
if (this._overriddenClasses != null) {
for (var i in this._overriddenClasses) {
var clsInfos = this._overriddenClasses[i];
// restore the global classpath to point to the original
var ns = Aria.nsp... | javascript | function () {
if (this._overriddenClasses != null) {
for (var i in this._overriddenClasses) {
var clsInfos = this._overriddenClasses[i];
// restore the global classpath to point to the original
var ns = Aria.nsp... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"_overriddenClasses",
"!=",
"null",
")",
"{",
"for",
"(",
"var",
"i",
"in",
"this",
".",
"_overriddenClasses",
")",
"{",
"var",
"clsInfos",
"=",
"this",
".",
"_overriddenClasses",
"[",
"i",
"]",
";",
... | Reset overridden classes. | [
"Reset",
"overridden",
"classes",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/jsunit/Assert.js#L695-L711 | train | |
ariatemplates/ariatemplates | src/aria/core/FileLoader.js | function () {
if (this._isProcessing) {
return;
}
this.$assert(33, this._logicalPaths.length > 0);
this._isProcessing = true;
(require("./IO")).asyncRequest({
sender : {
classpath : this.$classpath,
... | javascript | function () {
if (this._isProcessing) {
return;
}
this.$assert(33, this._logicalPaths.length > 0);
this._isProcessing = true;
(require("./IO")).asyncRequest({
sender : {
classpath : this.$classpath,
... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"_isProcessing",
")",
"{",
"return",
";",
"}",
"this",
".",
"$assert",
"(",
"33",
",",
"this",
".",
"_logicalPaths",
".",
"length",
">",
"0",
")",
";",
"this",
".",
"_isProcessing",
"=",
"true",
";... | Start the download of the file associated to the loader url | [
"Start",
"the",
"download",
"of",
"the",
"file",
"associated",
"to",
"the",
"loader",
"url"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/FileLoader.js#L76-L96 | train | |
ariatemplates/ariatemplates | src/aria/templates/ModuleCtrlFactory.js | function (args, ex) {
if (ex) {
this.$logError(this.EXCEPTION_CREATING_MODULECTRL, [args.desc.classpath], ex);
}
this.$callback(args.cb, {
error : true
});
} | javascript | function (args, ex) {
if (ex) {
this.$logError(this.EXCEPTION_CREATING_MODULECTRL, [args.desc.classpath], ex);
}
this.$callback(args.cb, {
error : true
});
} | [
"function",
"(",
"args",
",",
"ex",
")",
"{",
"if",
"(",
"ex",
")",
"{",
"this",
".",
"$logError",
"(",
"this",
".",
"EXCEPTION_CREATING_MODULECTRL",
",",
"[",
"args",
".",
"desc",
".",
"classpath",
"]",
",",
"ex",
")",
";",
"}",
"this",
".",
"$cal... | Error callback method called if there is a failure while loading the module controller class, or the flow
controller class. It is also called if there is an exception in the module controller creation process.
@param {Object} args
@param {Object} ex exception
@private | [
"Error",
"callback",
"method",
"called",
"if",
"there",
"is",
"a",
"failure",
"while",
"loading",
"the",
"module",
"controller",
"class",
"or",
"the",
"flow",
"controller",
"class",
".",
"It",
"is",
"also",
"called",
"if",
"there",
"is",
"an",
"exception",
... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ModuleCtrlFactory.js#L64-L71 | train | |
ariatemplates/ariatemplates | src/aria/templates/ModuleCtrlFactory.js | function (desc, cb, skipInit) {
var args = {
desc : desc,
cb : cb,
skipInit : skipInit
};
createModuleCtrl.call(this, args);
} | javascript | function (desc, cb, skipInit) {
var args = {
desc : desc,
cb : cb,
skipInit : skipInit
};
createModuleCtrl.call(this, args);
} | [
"function",
"(",
"desc",
",",
"cb",
",",
"skipInit",
")",
"{",
"var",
"args",
"=",
"{",
"desc",
":",
"desc",
",",
"cb",
":",
"cb",
",",
"skipInit",
":",
"skipInit",
"}",
";",
"createModuleCtrl",
".",
"call",
"(",
"this",
",",
"args",
")",
";",
"}... | Create a module controller and its corresponding flow controller according to its description object and
send in the callback an object. The callback may be called synchronously if the initialization can be
done synchronously.
@param {aria.templates.CfgBeans:InitModuleCtrl} desc Module controller description
@param {ar... | [
"Create",
"a",
"module",
"controller",
"and",
"its",
"corresponding",
"flow",
"controller",
"according",
"to",
"its",
"description",
"object",
"and",
"send",
"in",
"the",
"callback",
"an",
"object",
".",
"The",
"callback",
"may",
"be",
"called",
"synchronously",... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ModuleCtrlFactory.js#L665-L672 | train | |
ariatemplates/ariatemplates | src/aria/templates/ModuleCtrlFactory.js | function (moduleCtrlPrivate, subModulesArray, cb) {
var res = getModulePrivateInfoWithCheck(moduleCtrlPrivate, "loadSubModules");
if (!res) {
return this.$callback(cb, {
error : true
});
}
loa... | javascript | function (moduleCtrlPrivate, subModulesArray, cb) {
var res = getModulePrivateInfoWithCheck(moduleCtrlPrivate, "loadSubModules");
if (!res) {
return this.$callback(cb, {
error : true
});
}
loa... | [
"function",
"(",
"moduleCtrlPrivate",
",",
"subModulesArray",
",",
"cb",
")",
"{",
"var",
"res",
"=",
"getModulePrivateInfoWithCheck",
"(",
"moduleCtrlPrivate",
",",
"\"loadSubModules\"",
")",
";",
"if",
"(",
"!",
"res",
")",
"{",
"return",
"this",
".",
"$call... | This method should only be called from aria.templates.ModuleCtrl to load sub-modules.
@param {aria.templates.ModuleCtrl} moduleCtrlPrivate module controller instance to which child modules
should be attached
@param {Array} array of type aria.templates.CfgBeans.SubModuleDefinition, giving information about which
modules... | [
"This",
"method",
"should",
"only",
"be",
"called",
"from",
"aria",
".",
"templates",
".",
"ModuleCtrl",
"to",
"load",
"sub",
"-",
"modules",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ModuleCtrlFactory.js#L707-L715 | train | |
ariatemplates/ariatemplates | src/aria/templates/ModuleCtrlFactory.js | function (moduleCtrlPrivate) {
if (moduleCtrlPrivate == null) {
return false;
}
var k = moduleCtrlPrivate[MODULECTRL_ID_PROPERTY];
var res = modulesPrivateInfo[k];
if (!res) {
return false;
... | javascript | function (moduleCtrlPrivate) {
if (moduleCtrlPrivate == null) {
return false;
}
var k = moduleCtrlPrivate[MODULECTRL_ID_PROPERTY];
var res = modulesPrivateInfo[k];
if (!res) {
return false;
... | [
"function",
"(",
"moduleCtrlPrivate",
")",
"{",
"if",
"(",
"moduleCtrlPrivate",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"var",
"k",
"=",
"moduleCtrlPrivate",
"[",
"MODULECTRL_ID_PROPERTY",
"]",
";",
"var",
"res",
"=",
"modulesPrivateInfo",
"[",
... | Return true if the argument passed is a module controller whole object instance that is reloadable, false
otherwise.
@param {aria.templates.ModuleCtrl} moduleCtrlPrivate module controller whole object instance.
@return {Boolean} | [
"Return",
"true",
"if",
"the",
"argument",
"passed",
"is",
"a",
"module",
"controller",
"whole",
"object",
"instance",
"that",
"is",
"reloadable",
"false",
"otherwise",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ModuleCtrlFactory.js#L736-L750 | train | |
ariatemplates/ariatemplates | src/aria/templates/ModuleCtrlFactory.js | function (moduleCtrlPrivate, cb) {
var res = getModulePrivateInfoWithCheck(moduleCtrlPrivate, "reloadModuleCtrl");
if (!res) {
// error is already logged
return;
}
var subModuleInfos = res.subModuleInfos;
... | javascript | function (moduleCtrlPrivate, cb) {
var res = getModulePrivateInfoWithCheck(moduleCtrlPrivate, "reloadModuleCtrl");
if (!res) {
// error is already logged
return;
}
var subModuleInfos = res.subModuleInfos;
... | [
"function",
"(",
"moduleCtrlPrivate",
",",
"cb",
")",
"{",
"var",
"res",
"=",
"getModulePrivateInfoWithCheck",
"(",
"moduleCtrlPrivate",
",",
"\"reloadModuleCtrl\"",
")",
";",
"if",
"(",
"!",
"res",
")",
"{",
"// error is already logged",
"return",
";",
"}",
"va... | Reload a module controller. A module can be dynamically reloaded only if it is a sub-module. To check if
a module controller is reloadable, you can use isModuleReloadable.
@param {aria.templates.ModuleCtrl} moduleCtrlPrivate module controller instance which is to be reloaded
@param {aria.core.CfgBeans:Callback} cb call... | [
"Reload",
"a",
"module",
"controller",
".",
"A",
"module",
"can",
"be",
"dynamically",
"reloaded",
"only",
"if",
"it",
"is",
"a",
"sub",
"-",
"module",
".",
"To",
"check",
"if",
"a",
"module",
"controller",
"is",
"reloadable",
"you",
"can",
"use",
"isMod... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ModuleCtrlFactory.js#L758-L797 | train | |
ariatemplates/ariatemplates | src/aria/templates/ModuleCtrlFactory.js | function (moduleCtrlPrivate) {
var k = moduleCtrlPrivate[MODULECTRL_ID_PROPERTY];
var res = getModulePrivateInfoWithCheck(moduleCtrlPrivate, "notifyModuleCtrlDisposed");
if (!res) {
// error is already logged
return;
... | javascript | function (moduleCtrlPrivate) {
var k = moduleCtrlPrivate[MODULECTRL_ID_PROPERTY];
var res = getModulePrivateInfoWithCheck(moduleCtrlPrivate, "notifyModuleCtrlDisposed");
if (!res) {
// error is already logged
return;
... | [
"function",
"(",
"moduleCtrlPrivate",
")",
"{",
"var",
"k",
"=",
"moduleCtrlPrivate",
"[",
"MODULECTRL_ID_PROPERTY",
"]",
";",
"var",
"res",
"=",
"getModulePrivateInfoWithCheck",
"(",
"moduleCtrlPrivate",
",",
"\"notifyModuleCtrlDisposed\"",
")",
";",
"if",
"(",
"!"... | This method should only be called from aria.templates.ModuleCtrl when a module controller is disposed, so
that its sub-modules and flow can be disposed as well.
@param {aria.templates.ModuleCtrl} moduleCtrlPrivate module controller instance which is being disposed
@private | [
"This",
"method",
"should",
"only",
"be",
"called",
"from",
"aria",
".",
"templates",
".",
"ModuleCtrl",
"when",
"a",
"module",
"controller",
"is",
"disposed",
"so",
"that",
"its",
"sub",
"-",
"modules",
"and",
"flow",
"can",
"be",
"disposed",
"as",
"well"... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/ModuleCtrlFactory.js#L805-L848 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinInterface.js | function (widgetName, skinClass, skipError) {
var widgetSkinObj = this.getSkinClasses(widgetName);
if (widgetSkinObj) {
if (skinClass == null) {
skinClass = 'std';
}
var skinClassObj = widgetSkinObj[skinClass];
i... | javascript | function (widgetName, skinClass, skipError) {
var widgetSkinObj = this.getSkinClasses(widgetName);
if (widgetSkinObj) {
if (skinClass == null) {
skinClass = 'std';
}
var skinClassObj = widgetSkinObj[skinClass];
i... | [
"function",
"(",
"widgetName",
",",
"skinClass",
",",
"skipError",
")",
"{",
"var",
"widgetSkinObj",
"=",
"this",
".",
"getSkinClasses",
"(",
"widgetName",
")",
";",
"if",
"(",
"widgetSkinObj",
")",
"{",
"if",
"(",
"skinClass",
"==",
"null",
")",
"{",
"s... | Returns the skin configuration for the given skin class of the given widget. It is normalized if it was not
done before. If the skin class does not exist, returns the std one with a warning on the console, unless
skipError is true.
@param {String} widgetName name of the widget (in fact, the skinnable class, which may n... | [
"Returns",
"the",
"skin",
"configuration",
"for",
"the",
"given",
"skin",
"class",
"of",
"the",
"given",
"widget",
".",
"It",
"is",
"normalized",
"if",
"it",
"was",
"not",
"done",
"before",
".",
"If",
"the",
"skin",
"class",
"does",
"not",
"exist",
"retu... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinInterface.js#L88-L103 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinInterface.js | function (widgetName) {
var widgetSkinObj = aria.widgets.AriaSkin.skinObject[widgetName];
if (!widgetSkinObj || !widgetSkinObj['aria:skinNormalized']) {
var newValue = ariaWidgetsAriaSkinNormalization.normalizeWidget(widgetName, widgetSkinObj);
if (newValue && new... | javascript | function (widgetName) {
var widgetSkinObj = aria.widgets.AriaSkin.skinObject[widgetName];
if (!widgetSkinObj || !widgetSkinObj['aria:skinNormalized']) {
var newValue = ariaWidgetsAriaSkinNormalization.normalizeWidget(widgetName, widgetSkinObj);
if (newValue && new... | [
"function",
"(",
"widgetName",
")",
"{",
"var",
"widgetSkinObj",
"=",
"aria",
".",
"widgets",
".",
"AriaSkin",
".",
"skinObject",
"[",
"widgetName",
"]",
";",
"if",
"(",
"!",
"widgetSkinObj",
"||",
"!",
"widgetSkinObj",
"[",
"'aria:skinNormalized'",
"]",
")"... | Returns the skin configuration containing all skin classes for the given widget. This method calls the
normalization function, if it was not called before.
@param {String} widgetName name of the widget (in fact, the skinnable class, which may not correspond exactly
to widgets)
@return {Object} | [
"Returns",
"the",
"skin",
"configuration",
"containing",
"all",
"skin",
"classes",
"for",
"the",
"given",
"widget",
".",
"This",
"method",
"calls",
"the",
"normalization",
"function",
"if",
"it",
"was",
"not",
"called",
"before",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinInterface.js#L112-L122 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinInterface.js | function (sprite, icon) {
var curSprite = this.getSkinObject("Icon", sprite, true), iconContent, iconLeft = 0, iconTop = 0;
if (curSprite && (iconContent = curSprite.content[icon]) !== undefined) {
if (curSprite.biDimensional) {
var XY = iconContent.split("_")... | javascript | function (sprite, icon) {
var curSprite = this.getSkinObject("Icon", sprite, true), iconContent, iconLeft = 0, iconTop = 0;
if (curSprite && (iconContent = curSprite.content[icon]) !== undefined) {
if (curSprite.biDimensional) {
var XY = iconContent.split("_")... | [
"function",
"(",
"sprite",
",",
"icon",
")",
"{",
"var",
"curSprite",
"=",
"this",
".",
"getSkinObject",
"(",
"\"Icon\"",
",",
"sprite",
",",
"true",
")",
",",
"iconContent",
",",
"iconLeft",
"=",
"0",
",",
"iconTop",
"=",
"0",
";",
"if",
"(",
"curSp... | Return icon information for given sprite and icon name
@param {String} sprite
@param {String} icon
@return {Object} | [
"Return",
"icon",
"information",
"for",
"given",
"sprite",
"and",
"icon",
"name"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinInterface.js#L162-L188 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinInterface.js | function (object, images) {
if (object) {
var skinImageProperties = this.skinImageProperties;
for (var i = 0, l = skinImageProperties.length; i < l; i++) {
var propName = skinImageProperties[i];
var value = object[propName];
... | javascript | function (object, images) {
if (object) {
var skinImageProperties = this.skinImageProperties;
for (var i = 0, l = skinImageProperties.length; i < l; i++) {
var propName = skinImageProperties[i];
var value = object[propName];
... | [
"function",
"(",
"object",
",",
"images",
")",
"{",
"if",
"(",
"object",
")",
"{",
"var",
"skinImageProperties",
"=",
"this",
".",
"skinImageProperties",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"l",
"=",
"skinImageProperties",
".",
"length",
";",
"... | Extract skin images from an object from the skin and add them to a map.
@param {Object} object Object from the skin. It can be either a skin class, a state, a frame or frame state
object. Any property of this object whose name is inside this.skinImageProperties is supposed to contain the
URL of an image.
@param {Object... | [
"Extract",
"skin",
"images",
"from",
"an",
"object",
"from",
"the",
"skin",
"and",
"add",
"them",
"to",
"a",
"map",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinInterface.js#L205-L216 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinInterface.js | function (color, imageurl, otherparams) {
var fullUrl = "";
var gifUrl = "";
if (imageurl) {
var imageFullUrl = /^(data|https?):/i.test(imageurl) ? imageurl : this.getSkinImageFullUrl(imageurl);
fullUrl = "url(" + imageFullUrl + ") ";
... | javascript | function (color, imageurl, otherparams) {
var fullUrl = "";
var gifUrl = "";
if (imageurl) {
var imageFullUrl = /^(data|https?):/i.test(imageurl) ? imageurl : this.getSkinImageFullUrl(imageurl);
fullUrl = "url(" + imageFullUrl + ") ";
... | [
"function",
"(",
"color",
",",
"imageurl",
",",
"otherparams",
")",
"{",
"var",
"fullUrl",
"=",
"\"\"",
";",
"var",
"gifUrl",
"=",
"\"\"",
";",
"if",
"(",
"imageurl",
")",
"{",
"var",
"imageFullUrl",
"=",
"/",
"^(data|https?):",
"/",
"i",
".",
"test",
... | Build the backgroung rule of a CSS selector. It is equivalent to the background macro inside .ftl files. It
computes the path to the css image from the baseUrl FIXME This function is needed because the packager
modifies any url(
@param {String} color Color description
@param {String} imageurl Image path, relative to th... | [
"Build",
"the",
"backgroung",
"rule",
"of",
"a",
"CSS",
"selector",
".",
"It",
"is",
"equivalent",
"to",
"the",
"background",
"macro",
"inside",
".",
"ftl",
"files",
".",
"It",
"computes",
"the",
"path",
"to",
"the",
"css",
"image",
"from",
"the",
"baseU... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinInterface.js#L301-L322 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/DatePicker.js | function (evt) {
this.$DropDownTextInput._frame_events.apply(this, arguments);
if (evt.event.hasPreventDefault) {
evt.event.stopPropagation();
}
} | javascript | function (evt) {
this.$DropDownTextInput._frame_events.apply(this, arguments);
if (evt.event.hasPreventDefault) {
evt.event.stopPropagation();
}
} | [
"function",
"(",
"evt",
")",
"{",
"this",
".",
"$DropDownTextInput",
".",
"_frame_events",
".",
"apply",
"(",
"this",
",",
"arguments",
")",
";",
"if",
"(",
"evt",
".",
"event",
".",
"hasPreventDefault",
")",
"{",
"evt",
".",
"event",
".",
"stopPropagati... | Handle events raised by the frame
@protected
@override
@param {Object} evt | [
"Handle",
"events",
"raised",
"by",
"the",
"frame"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/DatePicker.js#L109-L114 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/DatePicker.js | function (evt) {
// when clicking on a date in the calendar, close the calendar, and save the date
var date = evt.date;
this._closeDropdown();
var report = this.controller.checkValue(date);
this._reactToControllerReport(report);
} | javascript | function (evt) {
// when clicking on a date in the calendar, close the calendar, and save the date
var date = evt.date;
this._closeDropdown();
var report = this.controller.checkValue(date);
this._reactToControllerReport(report);
} | [
"function",
"(",
"evt",
")",
"{",
"// when clicking on a date in the calendar, close the calendar, and save the date",
"var",
"date",
"=",
"evt",
".",
"date",
";",
"this",
".",
"_closeDropdown",
"(",
")",
";",
"var",
"report",
"=",
"this",
".",
"controller",
".",
... | Callback called when the user clicks on a date in the calendar. | [
"Callback",
"called",
"when",
"the",
"user",
"clicks",
"on",
"a",
"date",
"in",
"the",
"calendar",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/DatePicker.js#L119-L126 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/DatePicker.js | function (property, targetCfg) {
var cfg = this._cfg, skinObj = this._skinObj;
var calendarProp = 'calendar' + property.substring(0, 1).toUpperCase() + property.substring(1);
targetCfg[property] = (typeof cfg[calendarProp] != 'undefined')
? cfg[calendarProp]
... | javascript | function (property, targetCfg) {
var cfg = this._cfg, skinObj = this._skinObj;
var calendarProp = 'calendar' + property.substring(0, 1).toUpperCase() + property.substring(1);
targetCfg[property] = (typeof cfg[calendarProp] != 'undefined')
? cfg[calendarProp]
... | [
"function",
"(",
"property",
",",
"targetCfg",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
",",
"skinObj",
"=",
"this",
".",
"_skinObj",
";",
"var",
"calendarProp",
"=",
"'calendar'",
"+",
"property",
".",
"substring",
"(",
"0",
",",
"1",
")",
... | Helper. Does mapping between calendar config property and datepicker configuration, including skin overriding
@protected
@param {String} property
@param {Object} targetCfg, targeted calendar configuration | [
"Helper",
".",
"Does",
"mapping",
"between",
"calendar",
"config",
"property",
"and",
"datepicker",
"configuration",
"including",
"skin",
"overriding"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/DatePicker.js#L245-L251 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/DatePicker.js | function (domEvtWrapper) {
if (domEvtWrapper.keyCode === 32) {
domEvtWrapper.charCode = 32;
}
if (this._isShiftF10Pressed(domEvtWrapper)) {
this._toggleDropdown();
return;
}
this._handleKey(domEvtWrapper);
... | javascript | function (domEvtWrapper) {
if (domEvtWrapper.keyCode === 32) {
domEvtWrapper.charCode = 32;
}
if (this._isShiftF10Pressed(domEvtWrapper)) {
this._toggleDropdown();
return;
}
this._handleKey(domEvtWrapper);
... | [
"function",
"(",
"domEvtWrapper",
")",
"{",
"if",
"(",
"domEvtWrapper",
".",
"keyCode",
"===",
"32",
")",
"{",
"domEvtWrapper",
".",
"charCode",
"=",
"32",
";",
"}",
"if",
"(",
"this",
".",
"_isShiftF10Pressed",
"(",
"domEvtWrapper",
")",
")",
"{",
"this... | DOM Event raised when a key is pressed while the focus is on the calendar.
@param {aria.templates.DomEventWrapper} domEvtWrapper event | [
"DOM",
"Event",
"raised",
"when",
"a",
"key",
"is",
"pressed",
"while",
"the",
"focus",
"is",
"on",
"the",
"calendar",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/DatePicker.js#L324-L333 | train | |
ariatemplates/ariatemplates | src/aria/widgets/errorlist/ErrorListTemplateScript.js | function (proto) {
// Using push instead of resetting the reference because items are not copied from proto but from the
// parameter of tplScriptDefinition directly
proto.ICONS.push({
type : ariaUtilsData.TYPE_ERROR,
icon : "std:error"
}, ... | javascript | function (proto) {
// Using push instead of resetting the reference because items are not copied from proto but from the
// parameter of tplScriptDefinition directly
proto.ICONS.push({
type : ariaUtilsData.TYPE_ERROR,
icon : "std:error"
}, ... | [
"function",
"(",
"proto",
")",
"{",
"// Using push instead of resetting the reference because items are not copied from proto but from the",
"// parameter of tplScriptDefinition directly",
"proto",
".",
"ICONS",
".",
"push",
"(",
"{",
"type",
":",
"ariaUtilsData",
".",
"TYPE_ERRO... | Initialize this class building the icons object. It's done here so we are sure that aria.utils.Data is
already loaded
@param {aria.widgets.errorlist.ErrorListTemplateScript} proto Class prototype | [
"Initialize",
"this",
"class",
"building",
"the",
"icons",
"object",
".",
"It",
"s",
"done",
"here",
"so",
"we",
"are",
"sure",
"that",
"aria",
".",
"utils",
".",
"Data",
"is",
"already",
"loaded"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/errorlist/ErrorListTemplateScript.js#L46-L71 | train | |
ariatemplates/ariatemplates | src/aria/widgets/errorlist/ErrorListTemplateScript.js | function () {
var messageTypes = this.data.messageTypes;
var res = this.DEFAULT_ICON;
var icons = this.ICONS;
for (var i = 0, l = icons.length; i < l; i++) {
var curIcon = icons[i];
if (messageTypes[curIcon.type] > 0) {
... | javascript | function () {
var messageTypes = this.data.messageTypes;
var res = this.DEFAULT_ICON;
var icons = this.ICONS;
for (var i = 0, l = icons.length; i < l; i++) {
var curIcon = icons[i];
if (messageTypes[curIcon.type] > 0) {
... | [
"function",
"(",
")",
"{",
"var",
"messageTypes",
"=",
"this",
".",
"data",
".",
"messageTypes",
";",
"var",
"res",
"=",
"this",
".",
"DEFAULT_ICON",
";",
"var",
"icons",
"=",
"this",
".",
"ICONS",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"l",
... | Get the icon name for the current message type
@return {String} Icon name | [
"Get",
"the",
"icon",
"name",
"for",
"the",
"current",
"message",
"type"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/errorlist/ErrorListTemplateScript.js#L100-L112 | train | |
ariatemplates/ariatemplates | src/aria/widgets/errorlist/ErrorListTemplateScript.js | function (msg) {
if (this.data.displayCodes && (msg.code || msg.code === 0)) {
return msg.localizedMessage + " (" + msg.code + ")";
}
return msg.localizedMessage;
} | javascript | function (msg) {
if (this.data.displayCodes && (msg.code || msg.code === 0)) {
return msg.localizedMessage + " (" + msg.code + ")";
}
return msg.localizedMessage;
} | [
"function",
"(",
"msg",
")",
"{",
"if",
"(",
"this",
".",
"data",
".",
"displayCodes",
"&&",
"(",
"msg",
".",
"code",
"||",
"msg",
".",
"code",
"===",
"0",
")",
")",
"{",
"return",
"msg",
".",
"localizedMessage",
"+",
"\" (\"",
"+",
"msg",
".",
"... | Get the message to be displayed as label of the error list item
@param {Object} msg Error message
@return {String} localized message | [
"Get",
"the",
"message",
"to",
"be",
"displayed",
"as",
"label",
"of",
"the",
"error",
"list",
"item"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/errorlist/ErrorListTemplateScript.js#L119-L124 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/SiteRootModule.js | function (pageId, moduleId) {
var isCommon = (moduleId.indexOf("common:") != -1);
var refpath = this.buildModuleRefpath(moduleId.replace(/^common:/, ""), isCommon, pageId);
return this._utils.resolvePath(refpath, this);
} | javascript | function (pageId, moduleId) {
var isCommon = (moduleId.indexOf("common:") != -1);
var refpath = this.buildModuleRefpath(moduleId.replace(/^common:/, ""), isCommon, pageId);
return this._utils.resolvePath(refpath, this);
} | [
"function",
"(",
"pageId",
",",
"moduleId",
")",
"{",
"var",
"isCommon",
"=",
"(",
"moduleId",
".",
"indexOf",
"(",
"\"common:\"",
")",
"!=",
"-",
"1",
")",
";",
"var",
"refpath",
"=",
"this",
".",
"buildModuleRefpath",
"(",
"moduleId",
".",
"replace",
... | Get the module controller instance for a specific refpath in a page
@param {String} pageId Page identifier
@param {String} moduleId Module's refpath as specified in the configuration
@return {aria.template.ModuleCtrl} Instance of module controller | [
"Get",
"the",
"module",
"controller",
"instance",
"for",
"a",
"specific",
"refpath",
"in",
"a",
"page"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/SiteRootModule.js#L174-L178 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/SiteRootModule.js | function (pageId, modulesDescription, callback) {
var definitions = [];
var descriptions = [];
var modules, refpath, isCommon, def;
var loopArray = [{
modules : modulesDescription.page,
isCommon : false
}... | javascript | function (pageId, modulesDescription, callback) {
var definitions = [];
var descriptions = [];
var modules, refpath, isCommon, def;
var loopArray = [{
modules : modulesDescription.page,
isCommon : false
}... | [
"function",
"(",
"pageId",
",",
"modulesDescription",
",",
"callback",
")",
"{",
"var",
"definitions",
"=",
"[",
"]",
";",
"var",
"descriptions",
"=",
"[",
"]",
";",
"var",
"modules",
",",
"refpath",
",",
"isCommon",
",",
"def",
";",
"var",
"loopArray",
... | Load a list of page sub modules. These modules exists only in this page and should be loaded and initialized
connecting their datamodel to the defined bindings
@param {String} pageId Id of the page, used to prefix a refpath
@param {Object} modulesDescriptions
<ul>
<li> page: List of page-specific modules described by a... | [
"Load",
"a",
"list",
"of",
"page",
"sub",
"modules",
".",
"These",
"modules",
"exists",
"only",
"in",
"this",
"page",
"and",
"should",
"be",
"loaded",
"and",
"initialized",
"connecting",
"their",
"datamodel",
"to",
"the",
"defined",
"bindings"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/SiteRootModule.js#L204-L245 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/SiteRootModule.js | function (args) {
var modules = args.modules;
for (var i = 0; i < modules.length; i += 1) {
var services = modules[i].services, refpath = modules[i].refpath, moduleInstance = this._utils.resolvePath(refpath, this);
if (services) {
for (var serv... | javascript | function (args) {
var modules = args.modules;
for (var i = 0; i < modules.length; i += 1) {
var services = modules[i].services, refpath = modules[i].refpath, moduleInstance = this._utils.resolvePath(refpath, this);
if (services) {
for (var serv... | [
"function",
"(",
"args",
")",
"{",
"var",
"modules",
"=",
"args",
".",
"modules",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"modules",
".",
"length",
";",
"i",
"+=",
"1",
")",
"{",
"var",
"services",
"=",
"modules",
"[",
"i",
"]",
... | Exposes methods of module controllers as services
@param {Object} args | [
"Exposes",
"methods",
"of",
"module",
"controllers",
"as",
"services"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/SiteRootModule.js#L251-L277 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/SiteRootModule.js | function (modRefpaths) {
var refpath;
for (var i = 0, len = modRefpaths.length; i < len; i++) {
refpath = modRefpaths[i];
this._disconnectModuleBindings(refpath);
this.disposeSubModule(this._utils.resolvePath(refpath, this));
if (th... | javascript | function (modRefpaths) {
var refpath;
for (var i = 0, len = modRefpaths.length; i < len; i++) {
refpath = modRefpaths[i];
this._disconnectModuleBindings(refpath);
this.disposeSubModule(this._utils.resolvePath(refpath, this));
if (th... | [
"function",
"(",
"modRefpaths",
")",
"{",
"var",
"refpath",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"len",
"=",
"modRefpaths",
".",
"length",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"refpath",
"=",
"modRefpaths",
"[",
"i",
"]",
";",
... | Unload modules whose refpath in is modRefpaths and disconnects the related bindings
@param {Array} modRefpaths refpaths of the modules to unload | [
"Unload",
"modules",
"whose",
"refpath",
"in",
"is",
"modRefpaths",
"and",
"disconnects",
"the",
"related",
"bindings"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/SiteRootModule.js#L289-L302 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/SiteRootModule.js | function (pageId) {
var modRefpaths = (pageId && this._modulesPaths.page[pageId]) ? this._modulesPaths.page[pageId] : [];
this._unloadModules(modRefpaths);
delete this._modulesPaths.page[pageId];
} | javascript | function (pageId) {
var modRefpaths = (pageId && this._modulesPaths.page[pageId]) ? this._modulesPaths.page[pageId] : [];
this._unloadModules(modRefpaths);
delete this._modulesPaths.page[pageId];
} | [
"function",
"(",
"pageId",
")",
"{",
"var",
"modRefpaths",
"=",
"(",
"pageId",
"&&",
"this",
".",
"_modulesPaths",
".",
"page",
"[",
"pageId",
"]",
")",
"?",
"this",
".",
"_modulesPaths",
".",
"page",
"[",
"pageId",
"]",
":",
"[",
"]",
";",
"this",
... | Unload all the modules of a specific page
@param {String} pageId | [
"Unload",
"all",
"the",
"modules",
"of",
"a",
"specific",
"page"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/SiteRootModule.js#L317-L321 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/SiteRootModule.js | function () {
this.unloadCommonModules();
var pageModRefpaths = this._modulesPaths.page;
for (var pageId in pageModRefpaths) {
if (pageModRefpaths.hasOwnProperty(pageId)) {
this.unloadPageModules(pageId);
}
}
} | javascript | function () {
this.unloadCommonModules();
var pageModRefpaths = this._modulesPaths.page;
for (var pageId in pageModRefpaths) {
if (pageModRefpaths.hasOwnProperty(pageId)) {
this.unloadPageModules(pageId);
}
}
} | [
"function",
"(",
")",
"{",
"this",
".",
"unloadCommonModules",
"(",
")",
";",
"var",
"pageModRefpaths",
"=",
"this",
".",
"_modulesPaths",
".",
"page",
";",
"for",
"(",
"var",
"pageId",
"in",
"pageModRefpaths",
")",
"{",
"if",
"(",
"pageModRefpaths",
".",
... | Unload both common and page-specific modules | [
"Unload",
"both",
"common",
"and",
"page",
"-",
"specific",
"modules"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/SiteRootModule.js#L326-L334 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/SiteRootModule.js | function (pageId, isCommon, refpath) {
var modulesPath = this._modulesPaths;
if (isCommon) {
modulesPath.common.push(refpath);
return;
}
modulesPath.page[pageId] = modulesPath.page[pageId] || [];
modulesPath.page[pageId].push(re... | javascript | function (pageId, isCommon, refpath) {
var modulesPath = this._modulesPaths;
if (isCommon) {
modulesPath.common.push(refpath);
return;
}
modulesPath.page[pageId] = modulesPath.page[pageId] || [];
modulesPath.page[pageId].push(re... | [
"function",
"(",
"pageId",
",",
"isCommon",
",",
"refpath",
")",
"{",
"var",
"modulesPath",
"=",
"this",
".",
"_modulesPaths",
";",
"if",
"(",
"isCommon",
")",
"{",
"modulesPath",
".",
"common",
".",
"push",
"(",
"refpath",
")",
";",
"return",
";",
"}"... | Store the refpath
@param {String} pageId
@param {Boolean} isCommon
@param {String} refpath | [
"Store",
"the",
"refpath"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/SiteRootModule.js#L342-L350 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/SiteRootModule.js | function (refpath) {
var bindings = this._bindings[refpath];
if (bindings) {
for (var bind in bindings) {
if (bindings.hasOwnProperty(bind)) {
var moduleDescription = this._getModuleDataDescription(refpath, bind);
... | javascript | function (refpath) {
var bindings = this._bindings[refpath];
if (bindings) {
for (var bind in bindings) {
if (bindings.hasOwnProperty(bind)) {
var moduleDescription = this._getModuleDataDescription(refpath, bind);
... | [
"function",
"(",
"refpath",
")",
"{",
"var",
"bindings",
"=",
"this",
".",
"_bindings",
"[",
"refpath",
"]",
";",
"if",
"(",
"bindings",
")",
"{",
"for",
"(",
"var",
"bind",
"in",
"bindings",
")",
"{",
"if",
"(",
"bindings",
".",
"hasOwnProperty",
"(... | Remove the listener on the module data model and unregisters the binding
@param {String} refpath
@private | [
"Remove",
"the",
"listener",
"on",
"the",
"module",
"data",
"model",
"and",
"unregisters",
"the",
"binding"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/SiteRootModule.js#L416-L427 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/SiteRootModule.js | function () {
var bindings = this._bindings;
for (var refpath in bindings) {
if (bindings.hasOwnProperty(refpath)) {
var moduleBindings = bindings[refpath];
for (var bind in moduleBindings) {
if (moduleBindings.hasOw... | javascript | function () {
var bindings = this._bindings;
for (var refpath in bindings) {
if (bindings.hasOwnProperty(refpath)) {
var moduleBindings = bindings[refpath];
for (var bind in moduleBindings) {
if (moduleBindings.hasOw... | [
"function",
"(",
")",
"{",
"var",
"bindings",
"=",
"this",
".",
"_bindings",
";",
"for",
"(",
"var",
"refpath",
"in",
"bindings",
")",
"{",
"if",
"(",
"bindings",
".",
"hasOwnProperty",
"(",
"refpath",
")",
")",
"{",
"var",
"moduleBindings",
"=",
"bind... | Synchronize the storage data with the modules data model according to the registered bindings | [
"Synchronize",
"the",
"storage",
"data",
"with",
"the",
"modules",
"data",
"model",
"according",
"to",
"the",
"registered",
"bindings"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/SiteRootModule.js#L432-L447 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/SiteRootModule.js | function (refpath, bind) {
var moduleData = this._utils.resolvePath(refpath, this._data);
// If the path is not present in the module, set it to null
if (!this._utils.resolvePath(bind, moduleData)) {
this._pathUtils.setValue(moduleData, bind, null);
}
... | javascript | function (refpath, bind) {
var moduleData = this._utils.resolvePath(refpath, this._data);
// If the path is not present in the module, set it to null
if (!this._utils.resolvePath(bind, moduleData)) {
this._pathUtils.setValue(moduleData, bind, null);
}
... | [
"function",
"(",
"refpath",
",",
"bind",
")",
"{",
"var",
"moduleData",
"=",
"this",
".",
"_utils",
".",
"resolvePath",
"(",
"refpath",
",",
"this",
".",
"_data",
")",
";",
"// If the path is not present in the module, set it to null",
"if",
"(",
"!",
"this",
... | Computes the description of a part of the datamodel inside a submodule. It creates the correct path if it is
not defined
@param {String} refpath Refpath of the module
@param {String} bind Path inside the module data model
@return {Object} container and property of the specified part of the data model
@private | [
"Computes",
"the",
"description",
"of",
"a",
"part",
"of",
"the",
"datamodel",
"inside",
"a",
"submodule",
".",
"It",
"creates",
"the",
"correct",
"path",
"if",
"it",
"is",
"not",
"defined"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/SiteRootModule.js#L457-L464 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/SiteRootModule.js | function (res, args) {
var newValue = args.moduleDescription.container[args.moduleDescription.property];
var boundTo = args.boundTo;
if (this._utils.resolvePath(boundTo.path, boundTo.storage) == null) {
this._pathUtils.setValue(boundTo.storage, boundTo.path, null);
... | javascript | function (res, args) {
var newValue = args.moduleDescription.container[args.moduleDescription.property];
var boundTo = args.boundTo;
if (this._utils.resolvePath(boundTo.path, boundTo.storage) == null) {
this._pathUtils.setValue(boundTo.storage, boundTo.path, null);
... | [
"function",
"(",
"res",
",",
"args",
")",
"{",
"var",
"newValue",
"=",
"args",
".",
"moduleDescription",
".",
"container",
"[",
"args",
".",
"moduleDescription",
".",
"property",
"]",
";",
"var",
"boundTo",
"=",
"args",
".",
"boundTo",
";",
"if",
"(",
... | Callback for a change in the page module's data model. Propagate the change to the root module's storage
location
@param {Object} res Description of the change given by the json utility
@param {Object} args Contains the description of bindings.
@private | [
"Callback",
"for",
"a",
"change",
"in",
"the",
"page",
"module",
"s",
"data",
"model",
".",
"Propagate",
"the",
"change",
"to",
"the",
"root",
"module",
"s",
"storage",
"location"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/SiteRootModule.js#L502-L510 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/AutoComplete.js | function (event) {
if (this._cfg.autoFill && event.domEvent) {
// Closing the dropdown after typing is not a domEvent
var value = this.controller.getDataModel().value;
if (value != null) {
var report = this.controller.checkDropdownValue(val... | javascript | function (event) {
if (this._cfg.autoFill && event.domEvent) {
// Closing the dropdown after typing is not a domEvent
var value = this.controller.getDataModel().value;
if (value != null) {
var report = this.controller.checkDropdownValue(val... | [
"function",
"(",
"event",
")",
"{",
"if",
"(",
"this",
".",
"_cfg",
".",
"autoFill",
"&&",
"event",
".",
"domEvent",
")",
"{",
"// Closing the dropdown after typing is not a domEvent",
"var",
"value",
"=",
"this",
".",
"controller",
".",
"getDataModel",
"(",
"... | React to a dropdown close. If the widget is using autofill we want to select the pre-selected value in the
datamodel and report it to the input field also when the user clicks away from the field instead of
navigating through TAB or selecting an item from the dropdown. This function is called any time we close the
drop... | [
"React",
"to",
"a",
"dropdown",
"close",
".",
"If",
"the",
"widget",
"is",
"using",
"autofill",
"we",
"want",
"to",
"select",
"the",
"pre",
"-",
"selected",
"value",
"in",
"the",
"datamodel",
"and",
"report",
"it",
"to",
"the",
"input",
"field",
"also",
... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/AutoComplete.js#L217-L226 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/AutoComplete.js | function(event, cb) {
if (this._cfg.waiAria) {
var field = this.getTextInputField();
var listWidget = this.controller.getListWidget();
var ariaActiveDescendant = listWidget ? listWidget.getSelectedOptionDomId() : null;
if (ariaActiveDescendant ... | javascript | function(event, cb) {
if (this._cfg.waiAria) {
var field = this.getTextInputField();
var listWidget = this.controller.getListWidget();
var ariaActiveDescendant = listWidget ? listWidget.getSelectedOptionDomId() : null;
if (ariaActiveDescendant ... | [
"function",
"(",
"event",
",",
"cb",
")",
"{",
"if",
"(",
"this",
".",
"_cfg",
".",
"waiAria",
")",
"{",
"var",
"field",
"=",
"this",
".",
"getTextInputField",
"(",
")",
";",
"var",
"listWidget",
"=",
"this",
".",
"controller",
".",
"getListWidget",
... | Updates the aria-activedescendant attribute on the input DOM element.
This method supposes that the popup is open.
This method is registered as the onchange callback for the list widget,
if accessibility is enabled. It is also called from _afterDropdownOpen. | [
"Updates",
"the",
"aria",
"-",
"activedescendant",
"attribute",
"on",
"the",
"input",
"DOM",
"element",
".",
"This",
"method",
"supposes",
"that",
"the",
"popup",
"is",
"open",
".",
"This",
"method",
"is",
"registered",
"as",
"the",
"onchange",
"callback",
"... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/AutoComplete.js#L234-L248 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/AutoComplete.js | function () {
if (this._cfg.waiAria) {
var field = this.getTextInputField();
field.removeAttribute("aria-owns");
var dropDownIcon = this._getDropdownIcon();
if (dropDownIcon) {
dropDownIcon.setAttribute("aria-expanded", "fa... | javascript | function () {
if (this._cfg.waiAria) {
var field = this.getTextInputField();
field.removeAttribute("aria-owns");
var dropDownIcon = this._getDropdownIcon();
if (dropDownIcon) {
dropDownIcon.setAttribute("aria-expanded", "fa... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"_cfg",
".",
"waiAria",
")",
"{",
"var",
"field",
"=",
"this",
".",
"getTextInputField",
"(",
")",
";",
"field",
".",
"removeAttribute",
"(",
"\"aria-owns\"",
")",
";",
"var",
"dropDownIcon",
"=",
"thi... | Called after the dropdown is closed.
@override | [
"Called",
"after",
"the",
"dropdown",
"is",
"closed",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/AutoComplete.js#L285-L296 | train | |
ariatemplates/ariatemplates | src/aria/popups/Popup.js | function (conf) {
this.conf = conf;
if (conf.waiAria == null) {
conf.waiAria = environment.isWaiAria();
}
ariaCoreJsonValidator.normalize({
json : conf,
beanName : "aria.popups.Beans.PopupConf"
});
... | javascript | function (conf) {
this.conf = conf;
if (conf.waiAria == null) {
conf.waiAria = environment.isWaiAria();
}
ariaCoreJsonValidator.normalize({
json : conf,
beanName : "aria.popups.Beans.PopupConf"
});
... | [
"function",
"(",
"conf",
")",
"{",
"this",
".",
"conf",
"=",
"conf",
";",
"if",
"(",
"conf",
".",
"waiAria",
"==",
"null",
")",
"{",
"conf",
".",
"waiAria",
"=",
"environment",
".",
"isWaiAria",
"(",
")",
";",
"}",
"ariaCoreJsonValidator",
".",
"norm... | Save the configuration information for this popup.
@param {aria.popups.Beans:PopupCfg} conf
@protected | [
"Save",
"the",
"configuration",
"information",
"for",
"this",
"popup",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/Popup.js#L249-L292 | train | |
ariatemplates/ariatemplates | src/aria/popups/Popup.js | function () {
var document = this._document;
var cfg = this.conf;
var div = document.createElement("div");
div.style.cssText = "position:absolute;top:-15000px;left:-15000px;";
document.body.appendChild(div);
var html = [
"<div ",
... | javascript | function () {
var document = this._document;
var cfg = this.conf;
var div = document.createElement("div");
div.style.cssText = "position:absolute;top:-15000px;left:-15000px;";
document.body.appendChild(div);
var html = [
"<div ",
... | [
"function",
"(",
")",
"{",
"var",
"document",
"=",
"this",
".",
"_document",
";",
"var",
"cfg",
"=",
"this",
".",
"conf",
";",
"var",
"div",
"=",
"document",
".",
"createElement",
"(",
"\"div\"",
")",
";",
"div",
".",
"style",
".",
"cssText",
"=",
... | Create the DOM element of the popup, which will be used as the container
@protected
@return {HTMLElement} The DOM element created for this popup | [
"Create",
"the",
"DOM",
"element",
"of",
"the",
"popup",
"which",
"will",
"be",
"used",
"as",
"the",
"container"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/Popup.js#L323-L355 | train | |
ariatemplates/ariatemplates | src/aria/popups/Popup.js | function (className) {
var document = this._document;
var div = document.createElement("div");
div.className = className || "xModalMask-default";
div.style.cssText = "position:absolute;top:-15000px;left:-15000px;visibility:hidden;display:block;";
return this.p... | javascript | function (className) {
var document = this._document;
var div = document.createElement("div");
div.className = className || "xModalMask-default";
div.style.cssText = "position:absolute;top:-15000px;left:-15000px;visibility:hidden;display:block;";
return this.p... | [
"function",
"(",
"className",
")",
"{",
"var",
"document",
"=",
"this",
".",
"_document",
";",
"var",
"div",
"=",
"document",
".",
"createElement",
"(",
"\"div\"",
")",
";",
"div",
".",
"className",
"=",
"className",
"||",
"\"xModalMask-default\"",
";",
"d... | Create the DOM element of the mask, for modal popups.
@protected
@param {String} className CSS classes for the dialog mask.
@return {HTMLElement} | [
"Create",
"the",
"DOM",
"element",
"of",
"the",
"mask",
"for",
"modal",
"popups",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/Popup.js#L363-L369 | train | |
ariatemplates/ariatemplates | src/aria/popups/Popup.js | function (size) {
var position, isInViewSet;
if (this.conf.maximized) {
var offset = this.conf.offset;
var containerScroll = this.popupContainer.getContainerScroll();
position = {
top : containerScroll.scrollTop - offset.top,
... | javascript | function (size) {
var position, isInViewSet;
if (this.conf.maximized) {
var offset = this.conf.offset;
var containerScroll = this.popupContainer.getContainerScroll();
position = {
top : containerScroll.scrollTop - offset.top,
... | [
"function",
"(",
"size",
")",
"{",
"var",
"position",
",",
"isInViewSet",
";",
"if",
"(",
"this",
".",
"conf",
".",
"maximized",
")",
"{",
"var",
"offset",
"=",
"this",
".",
"conf",
".",
"offset",
";",
"var",
"containerScroll",
"=",
"this",
".",
"pop... | Retrieve the absolute position of the popup on the page The position is calculated from the popup's size and
configuration
@param {aria.popups.Beans:Size} size The computed size of the popup
@return {aria.popups.Beans:Position} The absolute position where the popup should be displayed
@protected | [
"Retrieve",
"the",
"absolute",
"position",
"of",
"the",
"popup",
"on",
"the",
"page",
"The",
"position",
"is",
"calculated",
"from",
"the",
"popup",
"s",
"size",
"and",
"configuration"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/Popup.js#L489-L535 | train | |
ariatemplates/ariatemplates | src/aria/popups/Popup.js | function () {
if (!this.domElement) {
return;
}
if (this.conf.animateOut) {
this._startAnimation(this.conf.animateOut, {
from : this.domElement,
type : 1
}, true);
} else {
... | javascript | function () {
if (!this.domElement) {
return;
}
if (this.conf.animateOut) {
this._startAnimation(this.conf.animateOut, {
from : this.domElement,
type : 1
}, true);
} else {
... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"domElement",
")",
"{",
"return",
";",
"}",
"if",
"(",
"this",
".",
"conf",
".",
"animateOut",
")",
"{",
"this",
".",
"_startAnimation",
"(",
"this",
".",
"conf",
".",
"animateOut",
",",
"{",
... | Hide the popup and the modal mask. The popup is not removed from the DOM, neither disposed.
@protected | [
"Hide",
"the",
"popup",
"and",
"the",
"modal",
"mask",
".",
"The",
"popup",
"is",
"not",
"removed",
"from",
"the",
"DOM",
"neither",
"disposed",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/Popup.js#L635-L666 | train | |
ariatemplates/ariatemplates | src/aria/popups/Popup.js | function (conf) {
if (conf) {
if ("center" in conf) {
this.conf.center = conf.center;
}
if ("absolutePosition" in conf) {
this.setPositionAsReference(conf.absolutePosition);
}
}
th... | javascript | function (conf) {
if (conf) {
if ("center" in conf) {
this.conf.center = conf.center;
}
if ("absolutePosition" in conf) {
this.setPositionAsReference(conf.absolutePosition);
}
}
th... | [
"function",
"(",
"conf",
")",
"{",
"if",
"(",
"conf",
")",
"{",
"if",
"(",
"\"center\"",
"in",
"conf",
")",
"{",
"this",
".",
"conf",
".",
"center",
"=",
"conf",
".",
"center",
";",
"}",
"if",
"(",
"\"absolutePosition\"",
"in",
"conf",
")",
"{",
... | Set absolute position of the popup and refresh it. Refresh also processing indicators that might be displayed
on top of it
@param {aria.utils.DomBeans:Position} absolutePosition | [
"Set",
"absolute",
"position",
"of",
"the",
"popup",
"and",
"refresh",
"it",
".",
"Refresh",
"also",
"processing",
"indicators",
"that",
"might",
"be",
"displayed",
"on",
"top",
"of",
"it"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/Popup.js#L835-L846 | train | |
ariatemplates/ariatemplates | src/aria/popups/Popup.js | function (domEvent) {
if (this.conf.closeOnMouseClick) {
var event = {
name : "onMouseClickClose",
cancelClose : false,
domEvent : domEvent
};
this.$raiseEvent(event);
// timeout need... | javascript | function (domEvent) {
if (this.conf.closeOnMouseClick) {
var event = {
name : "onMouseClickClose",
cancelClose : false,
domEvent : domEvent
};
this.$raiseEvent(event);
// timeout need... | [
"function",
"(",
"domEvent",
")",
"{",
"if",
"(",
"this",
".",
"conf",
".",
"closeOnMouseClick",
")",
"{",
"var",
"event",
"=",
"{",
"name",
":",
"\"onMouseClickClose\"",
",",
"cancelClose",
":",
"false",
",",
"domEvent",
":",
"domEvent",
"}",
";",
"this... | Close triggered by a mouse click, coming from the popup manager Close the popup according to the
configuration
@param {aria.DomEvent} domEvent event that triggered the closing of the popup | [
"Close",
"triggered",
"by",
"a",
"mouse",
"click",
"coming",
"from",
"the",
"popup",
"manager",
"Close",
"the",
"popup",
"according",
"to",
"the",
"configuration"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/Popup.js#L911-L932 | train | |
ariatemplates/ariatemplates | src/aria/popups/Popup.js | function (domEvent) {
if (this.conf.closeOnMouseOut) {
if (!this.conf.closeOnMouseOutDelay) { // If delay is not set
// OR is equal to zero
this.close(domEvent);
} else {
this.cancelMouseOutTimer();
... | javascript | function (domEvent) {
if (this.conf.closeOnMouseOut) {
if (!this.conf.closeOnMouseOutDelay) { // If delay is not set
// OR is equal to zero
this.close(domEvent);
} else {
this.cancelMouseOutTimer();
... | [
"function",
"(",
"domEvent",
")",
"{",
"if",
"(",
"this",
".",
"conf",
".",
"closeOnMouseOut",
")",
"{",
"if",
"(",
"!",
"this",
".",
"conf",
".",
"closeOnMouseOutDelay",
")",
"{",
"// If delay is not set",
"// OR is equal to zero",
"this",
".",
"close",
"("... | Close triggered by a mouse out event, coming from the popup manager Close the popup according to the
configuration
@param {aria.DomEvent} event mouseout event that triggered the action | [
"Close",
"triggered",
"by",
"a",
"mouse",
"out",
"event",
"coming",
"from",
"the",
"popup",
"manager",
"Close",
"the",
"popup",
"according",
"to",
"the",
"configuration"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/Popup.js#L939-L955 | train | |
ariatemplates/ariatemplates | src/aria/popups/Popup.js | function (element) {
var size = ariaUtilsSize.getSize(element), domUtil = ariaUtilsDom;
domUtil.scrollIntoView(element);
var position = this.popupContainer.calculatePosition(element);
this.reference = element;
this.referencePosition = position;
th... | javascript | function (element) {
var size = ariaUtilsSize.getSize(element), domUtil = ariaUtilsDom;
domUtil.scrollIntoView(element);
var position = this.popupContainer.calculatePosition(element);
this.reference = element;
this.referencePosition = position;
th... | [
"function",
"(",
"element",
")",
"{",
"var",
"size",
"=",
"ariaUtilsSize",
".",
"getSize",
"(",
"element",
")",
",",
"domUtil",
"=",
"ariaUtilsDom",
";",
"domUtil",
".",
"scrollIntoView",
"(",
"element",
")",
";",
"var",
"position",
"=",
"this",
".",
"po... | Set the given HTML element as the reference which will be used to position the popup. Calculate the position
and size of the element
@param {HTMLElement} element Element which will be used as a reference to position the popup | [
"Set",
"the",
"given",
"HTML",
"element",
"as",
"the",
"reference",
"which",
"will",
"be",
"used",
"to",
"position",
"the",
"popup",
".",
"Calculate",
"the",
"position",
"and",
"size",
"of",
"the",
"element"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/Popup.js#L1073-L1081 | train | |
ariatemplates/ariatemplates | src/aria/popups/Popup.js | function (section) {
// PROFILING // var profilingId = this.$startMeasure("Inserting
// section in DOM");
ariaUtilsDom.replaceHTML(this.domElement, section.html);
// var sectionDomElement = this.domElement.firstChild;
// Maybe the initWidget should be done a... | javascript | function (section) {
// PROFILING // var profilingId = this.$startMeasure("Inserting
// section in DOM");
ariaUtilsDom.replaceHTML(this.domElement, section.html);
// var sectionDomElement = this.domElement.firstChild;
// Maybe the initWidget should be done a... | [
"function",
"(",
"section",
")",
"{",
"// PROFILING // var profilingId = this.$startMeasure(\"Inserting",
"// section in DOM\");",
"ariaUtilsDom",
".",
"replaceHTML",
"(",
"this",
".",
"domElement",
",",
"section",
".",
"html",
")",
";",
"// var sectionDomElement = this.domEl... | Set the section which will be used as the content of this popup Calculate its size and initialize the widgets
inside it
@param {aria.templates.Section} section | [
"Set",
"the",
"section",
"which",
"will",
"be",
"used",
"as",
"the",
"content",
"of",
"this",
"popup",
"Calculate",
"its",
"size",
"and",
"initialize",
"the",
"widgets",
"inside",
"it"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/Popup.js#L1088-L1100 | train | |
ariatemplates/ariatemplates | src/aria/popups/Popup.js | function (zIndex, modalMaskZIndex) {
var computedStyle = this.computedStyle;
if (computedStyle) {
computedStyle.zIndex = zIndex;
if (modalMaskZIndex != null) {
this.modalMaskZIndex = modalMaskZIndex;
}
this.refre... | javascript | function (zIndex, modalMaskZIndex) {
var computedStyle = this.computedStyle;
if (computedStyle) {
computedStyle.zIndex = zIndex;
if (modalMaskZIndex != null) {
this.modalMaskZIndex = modalMaskZIndex;
}
this.refre... | [
"function",
"(",
"zIndex",
",",
"modalMaskZIndex",
")",
"{",
"var",
"computedStyle",
"=",
"this",
".",
"computedStyle",
";",
"if",
"(",
"computedStyle",
")",
"{",
"computedStyle",
".",
"zIndex",
"=",
"zIndex",
";",
"if",
"(",
"modalMaskZIndex",
"!=",
"null",... | Sets the zIndex of the popup, and refreshes. The zIndex of the modal mask, if any, is not changed,
unless the second parameter is defined.
This method does nothing if the popup has not already been displayed.
@param {Number} zIndex zIndex to set on the popup.
@param {Number} modalMaskZIndex zIndex to set on the modal m... | [
"Sets",
"the",
"zIndex",
"of",
"the",
"popup",
"and",
"refreshes",
".",
"The",
"zIndex",
"of",
"the",
"modal",
"mask",
"if",
"any",
"is",
"not",
"changed",
"unless",
"the",
"second",
"parameter",
"is",
"defined",
".",
"This",
"method",
"does",
"nothing",
... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/popups/Popup.js#L1109-L1118 | train | |
ariatemplates/ariatemplates | src/aria/utils/Path.js | function (path, inside) {
if (ariaUtilsType.isString(path)) {
path = this.parse(path);
}
inside = inside ? inside : Aria.$window;
if (ariaUtilsType.isArray(path)) {
for (var index = 0, param, len = path.length; index < len; index++) {
... | javascript | function (path, inside) {
if (ariaUtilsType.isString(path)) {
path = this.parse(path);
}
inside = inside ? inside : Aria.$window;
if (ariaUtilsType.isArray(path)) {
for (var index = 0, param, len = path.length; index < len; index++) {
... | [
"function",
"(",
"path",
",",
"inside",
")",
"{",
"if",
"(",
"ariaUtilsType",
".",
"isString",
"(",
"path",
")",
")",
"{",
"path",
"=",
"this",
".",
"parse",
"(",
"path",
")",
";",
"}",
"inside",
"=",
"inside",
"?",
"inside",
":",
"Aria",
".",
"$... | Resolve a path inside an object, and return result
@param {String|Array} path If a string, will parse it. If Array, specifies the suite of parameters to
follow.
@param {Object} inside If not specified, window is used. | [
"Resolve",
"a",
"path",
"inside",
"an",
"object",
"and",
"return",
"result"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Path.js#L83-L107 | train | |
ariatemplates/ariatemplates | src/aria/utils/Path.js | function (path) {
// edge case
if (!path) {
return [];
}
// first letter will give the type
var first = path.charAt(0), closing, part, next, nextParse;
// case brackets
if (first == "[") {
closing = pat... | javascript | function (path) {
// edge case
if (!path) {
return [];
}
// first letter will give the type
var first = path.charAt(0), closing, part, next, nextParse;
// case brackets
if (first == "[") {
closing = pat... | [
"function",
"(",
"path",
")",
"{",
"// edge case",
"if",
"(",
"!",
"path",
")",
"{",
"return",
"[",
"]",
";",
"}",
"// first letter will give the type",
"var",
"first",
"=",
"path",
".",
"charAt",
"(",
"0",
")",
",",
"closing",
",",
"part",
",",
"next"... | Parse parameters in path
@protected
@param {String} path like .param1[0]["param2"]
@return {Array} | [
"Parse",
"parameters",
"in",
"path"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Path.js#L124-L170 | train | |
ariatemplates/ariatemplates | src/aria/utils/Path.js | function (pathParts) {
var path = [pathParts[0]];
for (var index = 1, len = pathParts.length; index < len; index++) {
path.push("[\"" + ("" + pathParts[index]).replace(/"/gi, '\\"') + "\"]");
}
return path.join('');
} | javascript | function (pathParts) {
var path = [pathParts[0]];
for (var index = 1, len = pathParts.length; index < len; index++) {
path.push("[\"" + ("" + pathParts[index]).replace(/"/gi, '\\"') + "\"]");
}
return path.join('');
} | [
"function",
"(",
"pathParts",
")",
"{",
"var",
"path",
"=",
"[",
"pathParts",
"[",
"0",
"]",
"]",
";",
"for",
"(",
"var",
"index",
"=",
"1",
",",
"len",
"=",
"pathParts",
".",
"length",
";",
"index",
"<",
"len",
";",
"index",
"++",
")",
"{",
"p... | Transform an array of paths part into a path
@param {Array} pathParts
@return {String} | [
"Transform",
"an",
"array",
"of",
"paths",
"part",
"into",
"a",
"path"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Path.js#L177-L183 | train | |
ariatemplates/ariatemplates | src/aria/templates/Template.js | function (evt) {
if (!evt || !evt.changedProperties || ArrayUtils.contains(evt.changedProperties, "contextualMenu")) {
Aria.load({
classes : ["aria.tools.contextual.ContextualMenu"]
});
}
} | javascript | function (evt) {
if (!evt || !evt.changedProperties || ArrayUtils.contains(evt.changedProperties, "contextualMenu")) {
Aria.load({
classes : ["aria.tools.contextual.ContextualMenu"]
});
}
} | [
"function",
"(",
"evt",
")",
"{",
"if",
"(",
"!",
"evt",
"||",
"!",
"evt",
".",
"changedProperties",
"||",
"ArrayUtils",
".",
"contains",
"(",
"evt",
".",
"changedProperties",
",",
"\"contextualMenu\"",
")",
")",
"{",
"Aria",
".",
"load",
"(",
"{",
"cl... | This function handles environment change. When the contextual menu is enabled it loads the required classes. | [
"This",
"function",
"handles",
"environment",
"change",
".",
"When",
"the",
"contextual",
"menu",
"is",
"enabled",
"it",
"loads",
"the",
"required",
"classes",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Template.js#L30-L36 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function (event) {
var containerSize = this._popupContainer.getClientSize();
if (!this._popup.isOpen || containerSize.width <= 0 || containerSize.height <= 0) {
// do nothing if the container is not visible
// or if the popup was manually hidden from external code... | javascript | function (event) {
var containerSize = this._popupContainer.getClientSize();
if (!this._popup.isOpen || containerSize.width <= 0 || containerSize.height <= 0) {
// do nothing if the container is not visible
// or if the popup was manually hidden from external code... | [
"function",
"(",
"event",
")",
"{",
"var",
"containerSize",
"=",
"this",
".",
"_popupContainer",
".",
"getClientSize",
"(",
")",
";",
"if",
"(",
"!",
"this",
".",
"_popup",
".",
"isOpen",
"||",
"containerSize",
".",
"width",
"<=",
"0",
"||",
"containerSi... | Manage the viewport resize event
@param {aria.DomEvent} event
@protected | [
"Manage",
"the",
"viewport",
"resize",
"event"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L188-L212 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function (cfg) {
// Note also some related operations are done beforehand, in _registerBindings
if (!("macro" in cfg) && !("bind" in cfg && "macro" in cfg.bind)) {
this.$logError(this.MISSING_CONTENT_MACRO);
}
var appEnvDialogSettings = aria.widgets.enviro... | javascript | function (cfg) {
// Note also some related operations are done beforehand, in _registerBindings
if (!("macro" in cfg) && !("bind" in cfg && "macro" in cfg.bind)) {
this.$logError(this.MISSING_CONTENT_MACRO);
}
var appEnvDialogSettings = aria.widgets.enviro... | [
"function",
"(",
"cfg",
")",
"{",
"// Note also some related operations are done beforehand, in _registerBindings",
"if",
"(",
"!",
"(",
"\"macro\"",
"in",
"cfg",
")",
"&&",
"!",
"(",
"\"bind\"",
"in",
"cfg",
"&&",
"\"macro\"",
"in",
"cfg",
".",
"bind",
")",
")"... | Check that a content macro is specified or bound to the dataModel
@param {aria.widgets.CfgBeans:DialogCfg} cfg
@protected | [
"Check",
"that",
"a",
"content",
"macro",
"is",
"specified",
"or",
"bound",
"to",
"the",
"dataModel"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L219-L246 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function (out) {
var cfg = this._cfg;
var containerSize = this._popupContainer.getClientSize();
// constrain dialog to containerSize
var math = ariaUtilsMath;
var maxHeight, maxWidth;
if (this._cfg.maximized) {
maxHeight = containe... | javascript | function (out) {
var cfg = this._cfg;
var containerSize = this._popupContainer.getClientSize();
// constrain dialog to containerSize
var math = ariaUtilsMath;
var maxHeight, maxWidth;
if (this._cfg.maximized) {
maxHeight = containe... | [
"function",
"(",
"out",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"var",
"containerSize",
"=",
"this",
".",
"_popupContainer",
".",
"getClientSize",
"(",
")",
";",
"// constrain dialog to containerSize",
"var",
"math",
"=",
"ariaUtilsMath",
";",
... | Callback called when the dialog's main section is refreshed
@param {aria.templates.MarkupWriter} out the writer Object to use to output markup
@private | [
"Callback",
"called",
"when",
"the",
"dialog",
"s",
"main",
"section",
"is",
"refreshed"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L379-L446 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function (propertyName, newValue, oldValue) {
if (propertyName === "visible") {
this._cfg.visible = newValue;
if (newValue) {
this.open();
} else {
this.close();
}
} else if (propertyName ===... | javascript | function (propertyName, newValue, oldValue) {
if (propertyName === "visible") {
this._cfg.visible = newValue;
if (newValue) {
this.open();
} else {
this.close();
}
} else if (propertyName ===... | [
"function",
"(",
"propertyName",
",",
"newValue",
",",
"oldValue",
")",
"{",
"if",
"(",
"propertyName",
"===",
"\"visible\"",
")",
"{",
"this",
".",
"_cfg",
".",
"visible",
"=",
"newValue",
";",
"if",
"(",
"newValue",
")",
"{",
"this",
".",
"open",
"("... | Internal method called when one of the model property that the widget is bound to has changed. Must be
overridden by sub-classes defining bindable properties
@param {String} propertyName the property name
@param {Object} newValue the new value
@param {Object} oldValue the old property value
@protected
@override | [
"Internal",
"method",
"called",
"when",
"one",
"of",
"the",
"model",
"property",
"that",
"the",
"widget",
"is",
"bound",
"to",
"has",
"changed",
".",
"Must",
"be",
"overridden",
"by",
"sub",
"-",
"classes",
"defining",
"bindable",
"properties"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L541-L595 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
var cfg = this._cfg;
var waiEscapeMsg = cfg.waiEscapeMsg;
var confirmed = !(cfg.waiAria && waiEscapeMsg);
if (!confirmed) {
var now = new Date().getTime();
confirmed = this._firstEscapeTime && (now - this._firstEscapeTime) <= ... | javascript | function () {
var cfg = this._cfg;
var waiEscapeMsg = cfg.waiEscapeMsg;
var confirmed = !(cfg.waiAria && waiEscapeMsg);
if (!confirmed) {
var now = new Date().getTime();
confirmed = this._firstEscapeTime && (now - this._firstEscapeTime) <= ... | [
"function",
"(",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"var",
"waiEscapeMsg",
"=",
"cfg",
".",
"waiEscapeMsg",
";",
"var",
"confirmed",
"=",
"!",
"(",
"cfg",
".",
"waiAria",
"&&",
"waiEscapeMsg",
")",
";",
"if",
"(",
"!",
"confirmed"... | This function is called when escape is pressed.
If waiAria is true and waiEscapeMsg is defined, escape has to be
pressed twice in less than 3s to close the popup. | [
"This",
"function",
"is",
"called",
"when",
"escape",
"is",
"pressed",
".",
"If",
"waiAria",
"is",
"true",
"and",
"waiEscapeMsg",
"is",
"defined",
"escape",
"has",
"to",
"be",
"pressed",
"twice",
"in",
"less",
"than",
"3s",
"to",
"close",
"the",
"popup",
... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L661-L677 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
// --------------------------------------------------- destructuring
var cfg = this._cfg;
var modal = cfg.modal;
var waiAria = cfg.waiAria;
// ------------------------------------------------------ processing
// refreshParams ----... | javascript | function () {
// --------------------------------------------------- destructuring
var cfg = this._cfg;
var modal = cfg.modal;
var waiAria = cfg.waiAria;
// ------------------------------------------------------ processing
// refreshParams ----... | [
"function",
"(",
")",
"{",
"// --------------------------------------------------- destructuring",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"var",
"modal",
"=",
"cfg",
".",
"modal",
";",
"var",
"waiAria",
"=",
"cfg",
".",
"waiAria",
";",
"// ------------------... | Creates and displays the popup. | [
"Creates",
"and",
"displays",
"the",
"popup",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L718-L826 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
var cfg = this._cfg;
var getDomElementChild = ariaUtilsDom.getDomElementChild;
this._domElt = this._popup.domElement;
var titleBarDomElt = this._titleBarDomElt = getDomElementChild(this._domElt, 0, titleLast);
this._titleDomElt = getDomElementChi... | javascript | function () {
var cfg = this._cfg;
var getDomElementChild = ariaUtilsDom.getDomElementChild;
this._domElt = this._popup.domElement;
var titleBarDomElt = this._titleBarDomElt = getDomElementChild(this._domElt, 0, titleLast);
this._titleDomElt = getDomElementChi... | [
"function",
"(",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"var",
"getDomElementChild",
"=",
"ariaUtilsDom",
".",
"getDomElementChild",
";",
"this",
".",
"_domElt",
"=",
"this",
".",
"_popup",
".",
"domElement",
";",
"var",
"titleBarDomElt",
"... | Is called right after the popup is displayed. | [
"Is",
"called",
"right",
"after",
"the",
"popup",
"is",
"displayed",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L831-L874 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
if (aria.utils.dragdrop && aria.utils.dragdrop.Drag) {
this._createDraggable();
} else {
Aria.load({
classes : ["aria.utils.dragdrop.Drag"],
oncomplete : {
fn : this._createDraggable,
... | javascript | function () {
if (aria.utils.dragdrop && aria.utils.dragdrop.Drag) {
this._createDraggable();
} else {
Aria.load({
classes : ["aria.utils.dragdrop.Drag"],
oncomplete : {
fn : this._createDraggable,
... | [
"function",
"(",
")",
"{",
"if",
"(",
"aria",
".",
"utils",
".",
"dragdrop",
"&&",
"aria",
".",
"utils",
".",
"dragdrop",
".",
"Drag",
")",
"{",
"this",
".",
"_createDraggable",
"(",
")",
";",
"}",
"else",
"{",
"Aria",
".",
"load",
"(",
"{",
"cla... | Create the Drag element; load the dependency before if not loaded yet. | [
"Create",
"the",
"Drag",
"element",
";",
"load",
"the",
"dependency",
"before",
"if",
"not",
"loaded",
"yet",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L879-L891 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
if (aria.utils.resize && aria.utils.resize.Resize) {
this._createResize();
} else {
Aria.load({
classes : ["aria.utils.resize.Resize"],
oncomplete : {
fn : this._createResize,
... | javascript | function () {
if (aria.utils.resize && aria.utils.resize.Resize) {
this._createResize();
} else {
Aria.load({
classes : ["aria.utils.resize.Resize"],
oncomplete : {
fn : this._createResize,
... | [
"function",
"(",
")",
"{",
"if",
"(",
"aria",
".",
"utils",
".",
"resize",
"&&",
"aria",
".",
"utils",
".",
"resize",
".",
"Resize",
")",
"{",
"this",
".",
"_createResize",
"(",
")",
";",
"}",
"else",
"{",
"Aria",
".",
"load",
"(",
"{",
"classes"... | Create the Resize element; load the dependency before if not loaded yet. | [
"Create",
"the",
"Resize",
"element",
";",
"load",
"the",
"dependency",
"before",
"if",
"not",
"loaded",
"yet",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L896-L908 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
var cfg = this._cfg;
var modal = cfg.modal;
if (this._showBack != null) {
this._showBack();
this._showBack = null;
}
if (this._popup) {
this.waiReadText(cfg.waiCloseMsg);
this._de... | javascript | function () {
var cfg = this._cfg;
var modal = cfg.modal;
if (this._showBack != null) {
this._showBack();
this._showBack = null;
}
if (this._popup) {
this.waiReadText(cfg.waiCloseMsg);
this._de... | [
"function",
"(",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"var",
"modal",
"=",
"cfg",
".",
"modal",
";",
"if",
"(",
"this",
".",
"_showBack",
"!=",
"null",
")",
"{",
"this",
".",
"_showBack",
"(",
")",
";",
"this",
".",
"_showBack",... | Hides and destroys the dialog | [
"Hides",
"and",
"destroys",
"the",
"dialog"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L922-L977 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
if (this._popup && this._popup.isOpen) {
this._popup.moveTo({
center : this._cfg.center,
absolutePosition : {
left : this._cfg.xpos, // in maximized mode, positioning is handled by the Popup itself
... | javascript | function () {
if (this._popup && this._popup.isOpen) {
this._popup.moveTo({
center : this._cfg.center,
absolutePosition : {
left : this._cfg.xpos, // in maximized mode, positioning is handled by the Popup itself
... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"_popup",
"&&",
"this",
".",
"_popup",
".",
"isOpen",
")",
"{",
"this",
".",
"_popup",
".",
"moveTo",
"(",
"{",
"center",
":",
"this",
".",
"_cfg",
".",
"center",
",",
"absolutePosition",
":",
"{",... | Move the popup to the current position if it is visible | [
"Move",
"the",
"popup",
"to",
"the",
"current",
"position",
"if",
"it",
"is",
"visible"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L1066-L1079 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
if (!this._cfg.maximized) { // in maximized mode, positioning is handled by the Popup itself
var position = this._popupContainer.calculatePosition(this._domElt);
this.setProperty("xpos", position.left);
this.setProperty("ypos", position.top);
... | javascript | function () {
if (!this._cfg.maximized) { // in maximized mode, positioning is handled by the Popup itself
var position = this._popupContainer.calculatePosition(this._domElt);
this.setProperty("xpos", position.left);
this.setProperty("ypos", position.top);
... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_cfg",
".",
"maximized",
")",
"{",
"// in maximized mode, positioning is handled by the Popup itself",
"var",
"position",
"=",
"this",
".",
"_popupContainer",
".",
"calculatePosition",
"(",
"this",
".",
"_do... | Compute the actual position of the popup and update the data model with the correct values | [
"Compute",
"the",
"actual",
"position",
"of",
"the",
"popup",
"and",
"update",
"the",
"data",
"model",
"with",
"the",
"correct",
"values"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L1084-L1090 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
var opts = this._optionsBeforeMaximize;
if (!opts) {
return;
}
// reapply the old options
if (this._popup) {
this._popup.conf.maximized = false;
this._popup.conf.offset = this._shadowsZero;
... | javascript | function () {
var opts = this._optionsBeforeMaximize;
if (!opts) {
return;
}
// reapply the old options
if (this._popup) {
this._popup.conf.maximized = false;
this._popup.conf.offset = this._shadowsZero;
... | [
"function",
"(",
")",
"{",
"var",
"opts",
"=",
"this",
".",
"_optionsBeforeMaximize",
";",
"if",
"(",
"!",
"opts",
")",
"{",
"return",
";",
"}",
"// reapply the old options",
"if",
"(",
"this",
".",
"_popup",
")",
"{",
"this",
".",
"_popup",
".",
"conf... | Unmaximize the Dialog. Reapply all the original options stored before maximizing. | [
"Unmaximize",
"the",
"Dialog",
".",
"Reapply",
"all",
"the",
"original",
"options",
"stored",
"before",
"maximizing",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L1140-L1179 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function (cfg) {
return {
center : cfg.center,
width : cfg.width,
height : cfg.height,
maxWidth : cfg.maxWidth,
maxHeight : cfg.maxHeight,
xpos : cfg.xpos,
ypos : cfg.ypos,
contain... | javascript | function (cfg) {
return {
center : cfg.center,
width : cfg.width,
height : cfg.height,
maxWidth : cfg.maxWidth,
maxHeight : cfg.maxHeight,
xpos : cfg.xpos,
ypos : cfg.ypos,
contain... | [
"function",
"(",
"cfg",
")",
"{",
"return",
"{",
"center",
":",
"cfg",
".",
"center",
",",
"width",
":",
"cfg",
".",
"width",
",",
"height",
":",
"cfg",
".",
"height",
",",
"maxWidth",
":",
"cfg",
".",
"maxWidth",
",",
"maxHeight",
":",
"cfg",
".",... | Returns the subset of config options which might be useful to restore the Dialog from maximized state.
@param {aria.widgets.CfgBeans:DialogCfg} cfg the widget configuration
@return {Object} | [
"Returns",
"the",
"subset",
"of",
"config",
"options",
"which",
"might",
"be",
"useful",
"to",
"restore",
"the",
"Dialog",
"from",
"maximized",
"state",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L1186-L1197 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
if (!this._popup || !this._popup.isOpen || this._draggable) {
// maybe the popup was closed while loading aria.utils.dragdrop.Drag,
// or it was closed and re-opened very quickly (and we should avoid
// creating the _draggable object twice)
... | javascript | function () {
if (!this._popup || !this._popup.isOpen || this._draggable) {
// maybe the popup was closed while loading aria.utils.dragdrop.Drag,
// or it was closed and re-opened very quickly (and we should avoid
// creating the _draggable object twice)
... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_popup",
"||",
"!",
"this",
".",
"_popup",
".",
"isOpen",
"||",
"this",
".",
"_draggable",
")",
"{",
"// maybe the popup was closed while loading aria.utils.dragdrop.Drag,",
"// or it was closed and re-opened ve... | Create the Drag element with the specified configuration
@protected | [
"Create",
"the",
"Drag",
"element",
"with",
"the",
"specified",
"configuration"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L1231-L1259 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
if (!this._popup || !this._popup.isOpen || this._resizable) {
// maybe the popup was closed while loading aria.utils.resize.Resize,
// or it was closed and re-opened very quickly (and we should avoid
// creating the _resizable object twice)
... | javascript | function () {
if (!this._popup || !this._popup.isOpen || this._resizable) {
// maybe the popup was closed while loading aria.utils.resize.Resize,
// or it was closed and re-opened very quickly (and we should avoid
// creating the _resizable object twice)
... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_popup",
"||",
"!",
"this",
".",
"_popup",
".",
"isOpen",
"||",
"this",
".",
"_resizable",
")",
"{",
"// maybe the popup was closed while loading aria.utils.resize.Resize,",
"// or it was closed and re-opened ve... | Creates the Resize element with all the resize handle element.
@protected | [
"Creates",
"the",
"Resize",
"element",
"with",
"all",
"the",
"resize",
"handle",
"element",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L1272-L1313 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
// this.updatePosition();
if (this._popup) {
this._popup.refreshProcessingIndicators();
}
this.setProperty("center", false);
this._calculatePosition();
this.updatePosition();
this.evalCallback(this._cfg.ond... | javascript | function () {
// this.updatePosition();
if (this._popup) {
this._popup.refreshProcessingIndicators();
}
this.setProperty("center", false);
this._calculatePosition();
this.updatePosition();
this.evalCallback(this._cfg.ond... | [
"function",
"(",
")",
"{",
"// this.updatePosition();",
"if",
"(",
"this",
".",
"_popup",
")",
"{",
"this",
".",
"_popup",
".",
"refreshProcessingIndicators",
"(",
")",
";",
"}",
"this",
".",
"setProperty",
"(",
"\"center\"",
",",
"false",
")",
";",
"this"... | Internal handler for the "dragend" event raised by the Drag instance. Refresh the data model with the new
position
@protected | [
"Internal",
"handler",
"for",
"the",
"dragend",
"event",
"raised",
"by",
"the",
"Drag",
"instance",
".",
"Refresh",
"the",
"data",
"model",
"with",
"the",
"new",
"position"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L1339-L1348 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
this._calculatePosition();
this._calculateSize();
this.setProperty("center", false);
if (this._popup) {
this._onDimensionsChanged();
this._popup.refreshProcessingIndicators();
}
this.evalCallback(this._... | javascript | function () {
this._calculatePosition();
this._calculateSize();
this.setProperty("center", false);
if (this._popup) {
this._onDimensionsChanged();
this._popup.refreshProcessingIndicators();
}
this.evalCallback(this._... | [
"function",
"(",
")",
"{",
"this",
".",
"_calculatePosition",
"(",
")",
";",
"this",
".",
"_calculateSize",
"(",
")",
";",
"this",
".",
"setProperty",
"(",
"\"center\"",
",",
"false",
")",
";",
"if",
"(",
"this",
".",
"_popup",
")",
"{",
"this",
".",... | Internal handler for the "resizeend " event raised by the Drag instance on refresh handler. Refresh the data
model with the new position and reopen the popup
@protected | [
"Internal",
"handler",
"for",
"the",
"resizeend",
"event",
"raised",
"by",
"the",
"Drag",
"instance",
"on",
"refresh",
"handler",
".",
"Refresh",
"the",
"data",
"model",
"with",
"the",
"new",
"position",
"and",
"reopen",
"the",
"popup"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L1374-L1383 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
if (!this._draggable) {
return;
}
this._draggable.$removeListeners({
"dragstart" : {
fn : this._onDragStart,
scope : this
},
"move" : {
fn : this... | javascript | function () {
if (!this._draggable) {
return;
}
this._draggable.$removeListeners({
"dragstart" : {
fn : this._onDragStart,
scope : this
},
"move" : {
fn : this... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_draggable",
")",
"{",
"return",
";",
"}",
"this",
".",
"_draggable",
".",
"$removeListeners",
"(",
"{",
"\"dragstart\"",
":",
"{",
"fn",
":",
"this",
".",
"_onDragStart",
",",
"scope",
":",
"t... | Remove listeners and dispose the Drag instance
@protected | [
"Remove",
"listeners",
"and",
"dispose",
"the",
"Drag",
"instance"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L1389-L1410 | train | |
ariatemplates/ariatemplates | src/aria/widgets/container/Dialog.js | function () {
var handleArr = this._handlesArr;
if (!handleArr || !this._resizable) {
return;
}
for (var i = 0, ii = handleArr.length; i < ii; i++) {
var cursor = handleArr[i];
if (this._resizable[cursor]) {
... | javascript | function () {
var handleArr = this._handlesArr;
if (!handleArr || !this._resizable) {
return;
}
for (var i = 0, ii = handleArr.length; i < ii; i++) {
var cursor = handleArr[i];
if (this._resizable[cursor]) {
... | [
"function",
"(",
")",
"{",
"var",
"handleArr",
"=",
"this",
".",
"_handlesArr",
";",
"if",
"(",
"!",
"handleArr",
"||",
"!",
"this",
".",
"_resizable",
")",
"{",
"return",
";",
"}",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"ii",
"=",
"handleArr",
"... | Remove listeners and dispose the resize instance
@protected | [
"Remove",
"listeners",
"and",
"dispose",
"the",
"resize",
"instance"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/container/Dialog.js#L1415-L1429 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/utils/BaseNavigationManager.js | function () {
var cache = this._cache;
var expirationTime = ((new Date()).getTime() - this._expiresAfter * 1000);
for (var url in cache) {
if (cache.hasOwnProperty(url) && cache[url].age < expirationTime) {
delete cache[url];
}
... | javascript | function () {
var cache = this._cache;
var expirationTime = ((new Date()).getTime() - this._expiresAfter * 1000);
for (var url in cache) {
if (cache.hasOwnProperty(url) && cache[url].age < expirationTime) {
delete cache[url];
}
... | [
"function",
"(",
")",
"{",
"var",
"cache",
"=",
"this",
".",
"_cache",
";",
"var",
"expirationTime",
"=",
"(",
"(",
"new",
"Date",
"(",
")",
")",
".",
"getTime",
"(",
")",
"-",
"this",
".",
"_expiresAfter",
"*",
"1000",
")",
";",
"for",
"(",
"var... | Remove old cache items. An item considered old if has been stored more than EXPIRATION_TIME seconds before
@protected | [
"Remove",
"old",
"cache",
"items",
".",
"An",
"item",
"considered",
"old",
"if",
"has",
"been",
"stored",
"more",
"than",
"EXPIRATION_TIME",
"seconds",
"before"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/utils/BaseNavigationManager.js#L157-L166 | train | |
ariatemplates/ariatemplates | src/aria/html/TextInput.js | callNormalizedCallback | function callNormalizedCallback (callback, arg) {
callback.fn.call(callback.scope, arg, callback.args);
} | javascript | function callNormalizedCallback (callback, arg) {
callback.fn.call(callback.scope, arg, callback.args);
} | [
"function",
"callNormalizedCallback",
"(",
"callback",
",",
"arg",
")",
"{",
"callback",
".",
"fn",
".",
"call",
"(",
"callback",
".",
"scope",
",",
"arg",
",",
"callback",
".",
"args",
")",
";",
"}"
] | Call a normalized callback with the correct arguments.
@param {aria.core.CfgBeans:Callback} callback Function to be called
@param {Object} arg first argument of the callback
@private | [
"Call",
"a",
"normalized",
"callback",
"with",
"the",
"correct",
"arguments",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/TextInput.js#L33-L35 | train |
ariatemplates/ariatemplates | src/aria/html/TextInput.js | typeCallback | function typeCallback (callbackArray) {
this._typeCallback = null;
var callback;
for (var i = 0, count = callbackArray.length; i < count; i++) {
callback = this.$normCallback.call(this._context._tpl, callbackArray[i]);
callNormalizedCallback(callback, this._domElt.value);... | javascript | function typeCallback (callbackArray) {
this._typeCallback = null;
var callback;
for (var i = 0, count = callbackArray.length; i < count; i++) {
callback = this.$normCallback.call(this._context._tpl, callbackArray[i]);
callNormalizedCallback(callback, this._domElt.value);... | [
"function",
"typeCallback",
"(",
"callbackArray",
")",
"{",
"this",
".",
"_typeCallback",
"=",
"null",
";",
"var",
"callback",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"count",
"=",
"callbackArray",
".",
"length",
";",
"i",
"<",
"count",
";",
"i",
... | Callback for the type event timer.
@private
@param {Array} callbackArray Array whose entries are of type aria.core.CfgBeans:Callback. They are the handlers
for the type event. | [
"Callback",
"for",
"the",
"type",
"event",
"timer",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/TextInput.js#L43-L50 | train |
ariatemplates/ariatemplates | src/aria/html/TextInput.js | keyDownToType | function keyDownToType (event, callbackArray) {
this._typeCallback = ariaCoreTimer.addCallback({
fn : typeCallback,
scope : this,
delay : 12,
args : callbackArray
});
} | javascript | function keyDownToType (event, callbackArray) {
this._typeCallback = ariaCoreTimer.addCallback({
fn : typeCallback,
scope : this,
delay : 12,
args : callbackArray
});
} | [
"function",
"keyDownToType",
"(",
"event",
",",
"callbackArray",
")",
"{",
"this",
".",
"_typeCallback",
"=",
"ariaCoreTimer",
".",
"addCallback",
"(",
"{",
"fn",
":",
"typeCallback",
",",
"scope",
":",
"this",
",",
"delay",
":",
"12",
",",
"args",
":",
... | Convert a keydown event into a type event. This is achieved adding a very short callback on keydown. The reason
being the fact that on keydown the input has still the previous value. In the callback we'll see the correct text
input value. This function should have the same scope as the widget instance.
@param {aria.Dom... | [
"Convert",
"a",
"keydown",
"event",
"into",
"a",
"type",
"event",
".",
"This",
"is",
"achieved",
"adding",
"a",
"very",
"short",
"callback",
"on",
"keydown",
".",
"The",
"reason",
"being",
"the",
"fact",
"that",
"on",
"keydown",
"the",
"input",
"has",
"s... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/TextInput.js#L60-L67 | train |
ariatemplates/ariatemplates | src/aria/html/TextInput.js | keyDownCallback | function keyDownCallback (event) {
if (this._hasPlaceholder) {
if (!ariaUtilsArray.contains(specialKeys, event.keyCode)) {
this._removePlaceholder();
} else {
event.preventDefault();
}
}
} | javascript | function keyDownCallback (event) {
if (this._hasPlaceholder) {
if (!ariaUtilsArray.contains(specialKeys, event.keyCode)) {
this._removePlaceholder();
} else {
event.preventDefault();
}
}
} | [
"function",
"keyDownCallback",
"(",
"event",
")",
"{",
"if",
"(",
"this",
".",
"_hasPlaceholder",
")",
"{",
"if",
"(",
"!",
"ariaUtilsArray",
".",
"contains",
"(",
"specialKeys",
",",
"event",
".",
"keyCode",
")",
")",
"{",
"this",
".",
"_removePlaceholder... | Internal callback for placeholder handling on keydown.
@param {aria.DomEvent} event keydown event
@private | [
"Internal",
"callback",
"for",
"placeholder",
"handling",
"on",
"keydown",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/TextInput.js#L81-L89 | train |
ariatemplates/ariatemplates | src/aria/html/TextInput.js | function (listeners, context) {
if (listeners.type) {
this._chainListener(listeners, "keydown", {
fn : keyDownToType,
scope : this,
args : ariaUtilsType.isArray(listeners.type) ? listeners.type : [listeners.type]... | javascript | function (listeners, context) {
if (listeners.type) {
this._chainListener(listeners, "keydown", {
fn : keyDownToType,
scope : this,
args : ariaUtilsType.isArray(listeners.type) ? listeners.type : [listeners.type]... | [
"function",
"(",
"listeners",
",",
"context",
")",
"{",
"if",
"(",
"listeners",
".",
"type",
")",
"{",
"this",
".",
"_chainListener",
"(",
"listeners",
",",
"\"keydown\"",
",",
"{",
"fn",
":",
"keyDownToType",
",",
"scope",
":",
"this",
",",
"args",
":... | Convert the special event type into a keydown event listener.
@param {Object} listeners On listeners taken from the widget configuration.
@param {aria.templates.TemplateCtxt} context Reference of the template context.
@return {Boolean} Whether the keydown events should be converted back to type events.
@protected | [
"Convert",
"the",
"special",
"event",
"type",
"into",
"a",
"keydown",
"event",
"listener",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/TextInput.js#L292-L301 | train | |
ariatemplates/ariatemplates | src/aria/html/TextInput.js | function () {
if (this._hasPlaceholder) {
var element = this._domElt;
var cssClass = new aria.utils.ClassList(element);
element.value = "";
this._hasPlaceholder = false;
cssClass.remove('placeholder');
... | javascript | function () {
if (this._hasPlaceholder) {
var element = this._domElt;
var cssClass = new aria.utils.ClassList(element);
element.value = "";
this._hasPlaceholder = false;
cssClass.remove('placeholder');
... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"_hasPlaceholder",
")",
"{",
"var",
"element",
"=",
"this",
".",
"_domElt",
";",
"var",
"cssClass",
"=",
"new",
"aria",
".",
"utils",
".",
"ClassList",
"(",
"element",
")",
";",
"element",
".",
"valu... | Remove the css class and value for placeholder if needed by browsers that don't support it natively.
@protected | [
"Remove",
"the",
"css",
"class",
"and",
"value",
"for",
"placeholder",
"if",
"needed",
"by",
"browsers",
"that",
"don",
"t",
"support",
"it",
"natively",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/html/TextInput.js#L340-L350 | train | |
ariatemplates/ariatemplates | src/aria/utils/Caret.js | function (element) {
var pos = {
start : 0,
end : 0
};
if ("selectionStart" in element) {
// w3c standard, available in all but IE<9
pos.start = element.selectionStart;
pos.end = element.selectionEnd;
... | javascript | function (element) {
var pos = {
start : 0,
end : 0
};
if ("selectionStart" in element) {
// w3c standard, available in all but IE<9
pos.start = element.selectionStart;
pos.end = element.selectionEnd;
... | [
"function",
"(",
"element",
")",
"{",
"var",
"pos",
"=",
"{",
"start",
":",
"0",
",",
"end",
":",
"0",
"}",
";",
"if",
"(",
"\"selectionStart\"",
"in",
"element",
")",
"{",
"// w3c standard, available in all but IE<9",
"pos",
".",
"start",
"=",
"element",
... | Return the caret position of the HTML element
@param {HTMLElement} element The html element
@return {Object} The caret position (start and end) | [
"Return",
"the",
"caret",
"position",
"of",
"the",
"HTML",
"element"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Caret.js#L31-L55 | 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.