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/tools/contextual/ContextualMenu.js | function () {
if (!aria.tools.ToolsBridge || !aria.tools.ToolsBridge.isOpen) {
Aria.load({
classes : ['aria.tools.ToolsBridge'],
oncomplete : function () {
aria.tools.ToolsBridge.open();
... | javascript | function () {
if (!aria.tools.ToolsBridge || !aria.tools.ToolsBridge.isOpen) {
Aria.load({
classes : ['aria.tools.ToolsBridge'],
oncomplete : function () {
aria.tools.ToolsBridge.open();
... | [
"function",
"(",
")",
"{",
"if",
"(",
"!",
"aria",
".",
"tools",
".",
"ToolsBridge",
"||",
"!",
"aria",
".",
"tools",
".",
"ToolsBridge",
".",
"isOpen",
")",
"{",
"Aria",
".",
"load",
"(",
"{",
"classes",
":",
"[",
"'aria.tools.ToolsBridge'",
"]",
",... | Start the tools module with a template context to inspect | [
"Start",
"the",
"tools",
"module",
"with",
"a",
"template",
"context",
"to",
"inspect"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/tools/contextual/ContextualMenu.js#L395-L405 | train | |
ariatemplates/ariatemplates | src/aria/jsunit/RobotJavaSelenium.js | function (cb) {
if (!this._robot) {
this._robot = Aria.$frameworkWindow.top.SeleniumJavaRobot;
this._robot.getOffset({
fn : this._offsetReceived,
scope : this
});
}
if (cb) {
if (t... | javascript | function (cb) {
if (!this._robot) {
this._robot = Aria.$frameworkWindow.top.SeleniumJavaRobot;
this._robot.getOffset({
fn : this._offsetReceived,
scope : this
});
}
if (cb) {
if (t... | [
"function",
"(",
"cb",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_robot",
")",
"{",
"this",
".",
"_robot",
"=",
"Aria",
".",
"$frameworkWindow",
".",
"top",
".",
"SeleniumJavaRobot",
";",
"this",
".",
"_robot",
".",
"getOffset",
"(",
"{",
"fn",
":",
... | Initialize the robot, if not already done. This must be called before any other method on the robot.
@param {aria.core.CfgBeans:Callback} callback callback to be called when the robot is ready to be used. | [
"Initialize",
"the",
"robot",
"if",
"not",
"already",
"done",
".",
"This",
"must",
"be",
"called",
"before",
"any",
"other",
"method",
"on",
"the",
"robot",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/jsunit/RobotJavaSelenium.js#L79-L96 | train | |
ariatemplates/ariatemplates | src/aria/core/environment/EnvironmentBase.js | function (evt) {
var changedProperties = evt.changedProperties;
var localCfg = this._localDefCfg;
var doUpdate = (changedProperties == null); // always do an update on reset
if (changedProperties) {
// look if the changed keys are part of this local enviro... | javascript | function (evt) {
var changedProperties = evt.changedProperties;
var localCfg = this._localDefCfg;
var doUpdate = (changedProperties == null); // always do an update on reset
if (changedProperties) {
// look if the changed keys are part of this local enviro... | [
"function",
"(",
"evt",
")",
"{",
"var",
"changedProperties",
"=",
"evt",
".",
"changedProperties",
";",
"var",
"localCfg",
"=",
"this",
".",
"_localDefCfg",
";",
"var",
"doUpdate",
"=",
"(",
"changedProperties",
"==",
"null",
")",
";",
"// always do an update... | Listener for the changingEnvironment event from the aria.core.AppEnvironment. It checks if the changes in the
environment are managed by this class and calls _normAndApplyEnv if it is the case.
@param {Object} evt event object | [
"Listener",
"for",
"the",
"changingEnvironment",
"event",
"from",
"the",
"aria",
".",
"core",
".",
"AppEnvironment",
".",
"It",
"checks",
"if",
"the",
"changes",
"in",
"the",
"environment",
"are",
"managed",
"by",
"this",
"class",
"and",
"calls",
"_normAndAppl... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/environment/EnvironmentBase.js#L71-L89 | train | |
ariatemplates/ariatemplates | src/aria/core/environment/EnvironmentBase.js | function (callback) {
var validConfig = ariaCoreJsonValidator.normalize({
json : ariaCoreAppEnvironment.applicationSettings,
beanName : this._cfgPackage
});
if (validConfig) {
this._applyEnvironment(callback);
this.$rais... | javascript | function (callback) {
var validConfig = ariaCoreJsonValidator.normalize({
json : ariaCoreAppEnvironment.applicationSettings,
beanName : this._cfgPackage
});
if (validConfig) {
this._applyEnvironment(callback);
this.$rais... | [
"function",
"(",
"callback",
")",
"{",
"var",
"validConfig",
"=",
"ariaCoreJsonValidator",
".",
"normalize",
"(",
"{",
"json",
":",
"ariaCoreAppEnvironment",
".",
"applicationSettings",
",",
"beanName",
":",
"this",
".",
"_cfgPackage",
"}",
")",
";",
"if",
"("... | Normalize the part of the environment managed by this class, then calls _applyEnvironment to apply it if the
environment is valid. Normalization is immediate. Applying the environment can be asynchronous. The callback
is called either synchronously or asynchronously.
@param {aria.core.CfgBeans:Callback} callback Will b... | [
"Normalize",
"the",
"part",
"of",
"the",
"environment",
"managed",
"by",
"this",
"class",
"then",
"calls",
"_applyEnvironment",
"to",
"apply",
"it",
"if",
"the",
"environment",
"is",
"valid",
".",
"Normalization",
"is",
"immediate",
".",
"Applying",
"the",
"en... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/environment/EnvironmentBase.js#L97-L108 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/InputWithFrame.js | function () {
this.$Input._init.call(this);
var label = this.getLabel();
if (label) {
ariaUtilsEvent.addListener(label, "click", {
fn : this._onLabelClick,
scope : this
});
}
} | javascript | function () {
this.$Input._init.call(this);
var label = this.getLabel();
if (label) {
ariaUtilsEvent.addListener(label, "click", {
fn : this._onLabelClick,
scope : this
});
}
} | [
"function",
"(",
")",
"{",
"this",
".",
"$Input",
".",
"_init",
".",
"call",
"(",
"this",
")",
";",
"var",
"label",
"=",
"this",
".",
"getLabel",
"(",
")",
";",
"if",
"(",
"label",
")",
"{",
"ariaUtilsEvent",
".",
"addListener",
"(",
"label",
",",
... | Override the Input _init method
@protected | [
"Override",
"the",
"Input",
"_init",
"method"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/InputWithFrame.js#L99-L108 | train | |
ariatemplates/ariatemplates | src/aria/widgets/form/InputWithFrame.js | function (out) {
var cfg = this._cfg;
this._frame = ariaWidgetsFramesFrameWithIcons.createFrame({
sclass : cfg.sclass,
id : this._domId,
skinnableClass : this._skinnableClass,
width : this._inputMarkupWidth,
state : ... | javascript | function (out) {
var cfg = this._cfg;
this._frame = ariaWidgetsFramesFrameWithIcons.createFrame({
sclass : cfg.sclass,
id : this._domId,
skinnableClass : this._skinnableClass,
width : this._inputMarkupWidth,
state : ... | [
"function",
"(",
"out",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"this",
".",
"_frame",
"=",
"ariaWidgetsFramesFrameWithIcons",
".",
"createFrame",
"(",
"{",
"sclass",
":",
"cfg",
".",
"sclass",
",",
"id",
":",
"this",
".",
"_domId",
",",... | Internal method to override to process the input block markup
@param {aria.templates.MarkupWriter} out the writer Object to use to output markup
@protected | [
"Internal",
"method",
"to",
"override",
"to",
"process",
"the",
"input",
"block",
"markup"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/form/InputWithFrame.js#L123-L149 | train | |
ariatemplates/ariatemplates | src/aria/core/transport/BaseXHR.js | function (reqId, connection, callback) {
// Interval for processing the response from the server
var scope = this;
connection.onreadystatechange = function () {
if (connection && connection.readyState === 4) {
connection.onreadystatechange = Aria.e... | javascript | function (reqId, connection, callback) {
// Interval for processing the response from the server
var scope = this;
connection.onreadystatechange = function () {
if (connection && connection.readyState === 4) {
connection.onreadystatechange = Aria.e... | [
"function",
"(",
"reqId",
",",
"connection",
",",
"callback",
")",
"{",
"// Interval for processing the response from the server",
"var",
"scope",
"=",
"this",
";",
"connection",
".",
"onreadystatechange",
"=",
"function",
"(",
")",
"{",
"if",
"(",
"connection",
"... | A timer that binds a callback to the onreadystatechange event.
Upon readyState 4, handleTransactionResponse will process the response.
@param {Number} reqId Requst identifier
@param {Object} connection The connection object (XHR or ActiveX)
@param {aria.core.CfgBeans:Callback} callback Callback from aria.core.IO
@priva... | [
"A",
"timer",
"that",
"binds",
"a",
"callback",
"to",
"the",
"onreadystatechange",
"event",
".",
"Upon",
"readyState",
"4",
"handleTransactionResponse",
"will",
"process",
"the",
"response",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/BaseXHR.js#L114-L129 | train | |
ariatemplates/ariatemplates | src/aria/core/transport/BaseXHR.js | function (reqId, connection, callback) {
var httpStatus, responseObject;
try {
var connectionStatus = connection.status;
if (connectionStatus) {
httpStatus = connectionStatus || 200;
} else if (!connectionStatus && connection.r... | javascript | function (reqId, connection, callback) {
var httpStatus, responseObject;
try {
var connectionStatus = connection.status;
if (connectionStatus) {
httpStatus = connectionStatus || 200;
} else if (!connectionStatus && connection.r... | [
"function",
"(",
"reqId",
",",
"connection",
",",
"callback",
")",
"{",
"var",
"httpStatus",
",",
"responseObject",
";",
"try",
"{",
"var",
"connectionStatus",
"=",
"connection",
".",
"status",
";",
"if",
"(",
"connectionStatus",
")",
"{",
"httpStatus",
"=",... | Attempts to interpret the server response and determine whether the transaction was successful, or if an
error or exception was encountered.
@private
@param {Number} reqId Requst identifier
@param {Object} connection The connection object (XHR or ActiveX)
@param {aria.core.CfgBeans:Callback} callback Callback from aria... | [
"Attempts",
"to",
"interpret",
"the",
"server",
"response",
"and",
"determine",
"whether",
"the",
"transaction",
"was",
"successful",
"or",
"if",
"an",
"error",
"or",
"exception",
"was",
"encountered",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/BaseXHR.js#L139-L182 | train | |
ariatemplates/ariatemplates | src/aria/core/transport/BaseXHR.js | function (connection) {
var headerStr = connection.getAllResponseHeaders(), headers = {};
if (headerStr) {
var headerLines = headerStr.split("\n");
for (var i = 0; i < headerLines.length; i++) {
var delimitPos = headerLines[i].indexOf(":");
... | javascript | function (connection) {
var headerStr = connection.getAllResponseHeaders(), headers = {};
if (headerStr) {
var headerLines = headerStr.split("\n");
for (var i = 0; i < headerLines.length; i++) {
var delimitPos = headerLines[i].indexOf(":");
... | [
"function",
"(",
"connection",
")",
"{",
"var",
"headerStr",
"=",
"connection",
".",
"getAllResponseHeaders",
"(",
")",
",",
"headers",
"=",
"{",
"}",
";",
"if",
"(",
"headerStr",
")",
"{",
"var",
"headerLines",
"=",
"headerStr",
".",
"split",
"(",
"\"\\... | Generate a valid server response.
@protected
@param {Object} connection Connection status
@return {aria.core.CfgBeans:IOAsyncRequestResponseCfg} | [
"Generate",
"a",
"valid",
"server",
"response",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/BaseXHR.js#L190-L213 | train | |
ariatemplates/ariatemplates | src/aria/core/transport/BaseXHR.js | function (reqId, connection) {
connection.onreadystatechange = Aria.empty;
ariaCoreIO.clearTimeout(reqId);
if (this._inProgress(connection)) {
connection.abort();
return true;
} // else the request completed but after the abort timeout (it... | javascript | function (reqId, connection) {
connection.onreadystatechange = Aria.empty;
ariaCoreIO.clearTimeout(reqId);
if (this._inProgress(connection)) {
connection.abort();
return true;
} // else the request completed but after the abort timeout (it... | [
"function",
"(",
"reqId",
",",
"connection",
")",
"{",
"connection",
".",
"onreadystatechange",
"=",
"Aria",
".",
"empty",
";",
"ariaCoreIO",
".",
"clearTimeout",
"(",
"reqId",
")",
";",
"if",
"(",
"this",
".",
"_inProgress",
"(",
"connection",
")",
")",
... | Abort method. Called after the request timeout
@param {Number} reqId Request identifier
@param {Object} connection
@return {Boolean} Whether the connection was aborted or not | [
"Abort",
"method",
".",
"Called",
"after",
"the",
"request",
"timeout"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/BaseXHR.js#L221-L231 | train | |
ariatemplates/ariatemplates | src/aria/templates/Modifiers.js | function (modifierName, params) {
// IMPORTANT: neither this method, nor any modifier, should assume
// that `this === aria.templates.Modifiers` holds,
// as they're copied in aria.core.Template (so 'this' is most of the time
// an object extending aria.co... | javascript | function (modifierName, params) {
// IMPORTANT: neither this method, nor any modifier, should assume
// that `this === aria.templates.Modifiers` holds,
// as they're copied in aria.core.Template (so 'this' is most of the time
// an object extending aria.co... | [
"function",
"(",
"modifierName",
",",
"params",
")",
"{",
"// IMPORTANT: neither this method, nor any modifier, should assume",
"// that `this === aria.templates.Modifiers` holds,",
"// as they're copied in aria.core.Template (so 'this' is most of the time",
"// an object extending aria.core.Tem... | Call the modifier function of a modifier object
@param {String} modifierName
@param {Array} params | [
"Call",
"the",
"modifier",
"function",
"of",
"a",
"modifier",
"object"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Modifiers.js#L375-L388 | train | |
ariatemplates/ariatemplates | src/aria/templates/Modifiers.js | function (modifierName, out) {
var modifier = __modifiers[modifierName];
if (modifier && modifier.init) {
modifier.init(out);
}
} | javascript | function (modifierName, out) {
var modifier = __modifiers[modifierName];
if (modifier && modifier.init) {
modifier.init(out);
}
} | [
"function",
"(",
"modifierName",
",",
"out",
")",
"{",
"var",
"modifier",
"=",
"__modifiers",
"[",
"modifierName",
"]",
";",
"if",
"(",
"modifier",
"&&",
"modifier",
".",
"init",
")",
"{",
"modifier",
".",
"init",
"(",
"out",
")",
";",
"}",
"}"
] | call the init function of a modifier object if it exists. This is done when the template is processed.
@param {String} modifierName
@param {aria.templates.ClassWriter} out | [
"call",
"the",
"init",
"function",
"of",
"a",
"modifier",
"object",
"if",
"it",
"exists",
".",
"This",
"is",
"done",
"when",
"the",
"template",
"is",
"processed",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Modifiers.js#L395-L400 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinNormalization.js | function (widgetName, skinClassName, skin, std) {
// must return the normalizer for the frame state
// get the frame type
if (skin.frame == null) {
skin.frame = {};
}
var skinFrame = skin.frame;
std = std || {};
var stdF... | javascript | function (widgetName, skinClassName, skin, std) {
// must return the normalizer for the frame state
// get the frame type
if (skin.frame == null) {
skin.frame = {};
}
var skinFrame = skin.frame;
std = std || {};
var stdF... | [
"function",
"(",
"widgetName",
",",
"skinClassName",
",",
"skin",
",",
"std",
")",
"{",
"// must return the normalizer for the frame state",
"// get the frame type",
"if",
"(",
"skin",
".",
"frame",
"==",
"null",
")",
"{",
"skin",
".",
"frame",
"=",
"{",
"}",
... | Normalizes the frame properties for a skin class and returns the function which normalizes each frame state.
This method is called for skin classes of widgets which use a frame.
@param {String} widgetName name of the widget (in fact, the skinnable class, which may not correspond exactly
to widgets)
@param {String} skin... | [
"Normalizes",
"the",
"frame",
"properties",
"for",
"a",
"skin",
"class",
"and",
"returns",
"the",
"function",
"which",
"normalizes",
"each",
"frame",
"state",
".",
"This",
"method",
"is",
"called",
"for",
"skin",
"classes",
"of",
"widgets",
"which",
"use",
"... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinNormalization.js#L117-L155 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinNormalization.js | function (widgetName, skinClassName, stateName, stateFrame, beanName) {
var res = this._check(stateFrame, beanName);
if (!res.result) {
this.$logWarn(this.FRAME_STATE_NORMALIZATION_ERROR, [widgetName, skinClassName, stateName,
res.message.replace(/\n/g, "\... | javascript | function (widgetName, skinClassName, stateName, stateFrame, beanName) {
var res = this._check(stateFrame, beanName);
if (!res.result) {
this.$logWarn(this.FRAME_STATE_NORMALIZATION_ERROR, [widgetName, skinClassName, stateName,
res.message.replace(/\n/g, "\... | [
"function",
"(",
"widgetName",
",",
"skinClassName",
",",
"stateName",
",",
"stateFrame",
",",
"beanName",
")",
"{",
"var",
"res",
"=",
"this",
".",
"_check",
"(",
"stateFrame",
",",
"beanName",
")",
";",
"if",
"(",
"!",
"res",
".",
"result",
")",
"{",... | Checks a frame state according to its bean, and logs an error message in case there is an issue.
@param {String} widgetName name of the widget (in fact, the skinnable class, which may not correspond exactly
to widgets)
@param {String} skinClassName
@param {String} stateName
@param {Object} stateFrame
@param {Object} be... | [
"Checks",
"a",
"frame",
"state",
"according",
"to",
"its",
"bean",
"and",
"logs",
"an",
"error",
"message",
"in",
"case",
"there",
"is",
"an",
"issue",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinNormalization.js#L166-L172 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinNormalization.js | function (widgetName, skinClassName, frameType) {
var res = this._frameNormalizers[frameType];
if (res == null) {
var frameBeanDef = ariaCoreJsonValidator.getBean('aria.widgets.AriaSkinBeans.' + frameType
+ 'FrameCfg');
if (frameBeanDef == ... | javascript | function (widgetName, skinClassName, frameType) {
var res = this._frameNormalizers[frameType];
if (res == null) {
var frameBeanDef = ariaCoreJsonValidator.getBean('aria.widgets.AriaSkinBeans.' + frameType
+ 'FrameCfg');
if (frameBeanDef == ... | [
"function",
"(",
"widgetName",
",",
"skinClassName",
",",
"frameType",
")",
"{",
"var",
"res",
"=",
"this",
".",
"_frameNormalizers",
"[",
"frameType",
"]",
";",
"if",
"(",
"res",
"==",
"null",
")",
"{",
"var",
"frameBeanDef",
"=",
"ariaCoreJsonValidator",
... | Get the normalizer object for the given frame type. It is created if it does not exist already.
@param {String} widgetName name of the widget (in fact, the skinnable class, which may not correspond exactly
to widgets)
@param {String} skinClassName skin class name
@param {String} frameType frame type | [
"Get",
"the",
"normalizer",
"object",
"for",
"the",
"given",
"frame",
"type",
".",
"It",
"is",
"created",
"if",
"it",
"does",
"not",
"exist",
"already",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinNormalization.js#L181-L198 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinNormalization.js | function (skinObject) {
if (skinObject['aria:skinNormalized']) {
return;
}
for (var widget in skinObject) {
if (skinObject.hasOwnProperty(widget) && widget != "general" && widget != "widgets") {
skinObject[widget] = this.normalizeWi... | javascript | function (skinObject) {
if (skinObject['aria:skinNormalized']) {
return;
}
for (var widget in skinObject) {
if (skinObject.hasOwnProperty(widget) && widget != "general" && widget != "widgets") {
skinObject[widget] = this.normalizeWi... | [
"function",
"(",
"skinObject",
")",
"{",
"if",
"(",
"skinObject",
"[",
"'aria:skinNormalized'",
"]",
")",
"{",
"return",
";",
"}",
"for",
"(",
"var",
"widget",
"in",
"skinObject",
")",
"{",
"if",
"(",
"skinObject",
".",
"hasOwnProperty",
"(",
"widget",
"... | Normalizes the skin, if not already done.
@param {Object} Skin object | [
"Normalizes",
"the",
"skin",
"if",
"not",
"already",
"done",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinNormalization.js#L204-L219 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinNormalization.js | function (widgetName, beanDef) {
if (widgetName == "Icon") {
// no inheritance, use usual normalization
return function (skinClassName, skin, std) {
beanDef.$fastNorm(skin);
};
}
var hasFrame = (beanDef.$properties.f... | javascript | function (widgetName, beanDef) {
if (widgetName == "Icon") {
// no inheritance, use usual normalization
return function (skinClassName, skin, std) {
beanDef.$fastNorm(skin);
};
}
var hasFrame = (beanDef.$properties.f... | [
"function",
"(",
"widgetName",
",",
"beanDef",
")",
"{",
"if",
"(",
"widgetName",
"==",
"\"Icon\"",
")",
"{",
"// no inheritance, use usual normalization",
"return",
"function",
"(",
"skinClassName",
",",
"skin",
",",
"std",
")",
"{",
"beanDef",
".",
"$fastNorm"... | Create a normalizer function for a widget.
@param {String} widgetName name of the widget (in fact, the skinnable class, which may not correspond exactly
to widgets)
@param {Object} beanDef bean definition of the widget
@return {Function} | [
"Create",
"a",
"normalizer",
"function",
"for",
"a",
"widget",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinNormalization.js#L228-L280 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinNormalization.js | function (widgetName, beanDef) {
var states = beanDef.$properties.states;
if (states == null) {
return null;
}
var writer = new ariaUtilsFunctionWriter(["state", "stdState", "normal", "stdNormal"]);
ariaUtilsInheritanceNormalization.writeInheri... | javascript | function (widgetName, beanDef) {
var states = beanDef.$properties.states;
if (states == null) {
return null;
}
var writer = new ariaUtilsFunctionWriter(["state", "stdState", "normal", "stdNormal"]);
ariaUtilsInheritanceNormalization.writeInheri... | [
"function",
"(",
"widgetName",
",",
"beanDef",
")",
"{",
"var",
"states",
"=",
"beanDef",
".",
"$properties",
".",
"states",
";",
"if",
"(",
"states",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"var",
"writer",
"=",
"new",
"ariaUtilsFunctionWrit... | Create a state normalizer function for a widget.
@param {String} widgetName
@param {Object} beanDef
@return {Function} | [
"Create",
"a",
"state",
"normalizer",
"function",
"for",
"a",
"widget",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinNormalization.js#L288-L306 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinNormalization.js | function (frameType, beanName) {
var beanDef = ariaCoreJsonValidator.getBean(beanName);
var writer = new ariaUtilsFunctionWriter(["skinClassName", "stateName", "state", "stdState", "normal",
"stdNormal"]);
writer.writeEnsureObjectExists("state.frame");
... | javascript | function (frameType, beanName) {
var beanDef = ariaCoreJsonValidator.getBean(beanName);
var writer = new ariaUtilsFunctionWriter(["skinClassName", "stateName", "state", "stdState", "normal",
"stdNormal"]);
writer.writeEnsureObjectExists("state.frame");
... | [
"function",
"(",
"frameType",
",",
"beanName",
")",
"{",
"var",
"beanDef",
"=",
"ariaCoreJsonValidator",
".",
"getBean",
"(",
"beanName",
")",
";",
"var",
"writer",
"=",
"new",
"ariaUtilsFunctionWriter",
"(",
"[",
"\"skinClassName\"",
",",
"\"stateName\"",
",",
... | Create the state normalizer function for a frame type.
@param {String} frameType
@param {String} beanName
@return {Function} | [
"Create",
"the",
"state",
"normalizer",
"function",
"for",
"a",
"frame",
"type",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinNormalization.js#L314-L343 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinNormalization.js | function (frameType, beanDef) {
var writer = new ariaUtilsFunctionWriter(["skin", "std"]);
var out = writer.out;
// writer.writeEnsureObjectExists("skin.frame"); // not necessary, already done by normFrame
// writer.writeEnsureObjectExists("std"); // not necessary, alread... | javascript | function (frameType, beanDef) {
var writer = new ariaUtilsFunctionWriter(["skin", "std"]);
var out = writer.out;
// writer.writeEnsureObjectExists("skin.frame"); // not necessary, already done by normFrame
// writer.writeEnsureObjectExists("std"); // not necessary, alread... | [
"function",
"(",
"frameType",
",",
"beanDef",
")",
"{",
"var",
"writer",
"=",
"new",
"ariaUtilsFunctionWriter",
"(",
"[",
"\"skin\"",
",",
"\"std\"",
"]",
")",
";",
"var",
"out",
"=",
"writer",
".",
"out",
";",
"// writer.writeEnsureObjectExists(\"skin.frame\");... | Create the normalizer function for a frame type.
@param {String} frameType
@param {Object} beanDef
@return {Function} | [
"Create",
"the",
"normalizer",
"function",
"for",
"a",
"frame",
"type",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinNormalization.js#L351-L372 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinNormalization.js | function (widgetName, widgetSkinObj) {
if (!this.skinnableClasses.hasOwnProperty(widgetName)) {
this.$logError(this.INVALID_SKINNABLE_CLASS, [widgetName]);
return null;
}
if (widgetSkinObj == null) {
widgetSkinObj = {};
}
... | javascript | function (widgetName, widgetSkinObj) {
if (!this.skinnableClasses.hasOwnProperty(widgetName)) {
this.$logError(this.INVALID_SKINNABLE_CLASS, [widgetName]);
return null;
}
if (widgetSkinObj == null) {
widgetSkinObj = {};
}
... | [
"function",
"(",
"widgetName",
",",
"widgetSkinObj",
")",
"{",
"if",
"(",
"!",
"this",
".",
"skinnableClasses",
".",
"hasOwnProperty",
"(",
"widgetName",
")",
")",
"{",
"this",
".",
"$logError",
"(",
"this",
".",
"INVALID_SKINNABLE_CLASS",
",",
"[",
"widgetN... | Returns the normalized widget skin configuration.
@param {String} widgetName name of the widget (in fact, the skinnable class, which may not correspond exactly
to widgets)
@param {Object} widgetSkinObj object whose properties are all the skin classes for the widget. If it is not
null, and widgetName is correct, this me... | [
"Returns",
"the",
"normalized",
"widget",
"skin",
"configuration",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinNormalization.js#L402-L451 | train | |
ariatemplates/ariatemplates | src/aria/widgets/AriaSkinNormalization.js | function (general, beanType) {
if (!general) {
general = {};
}
var param = {
json : general,
beanName : "aria.widgets.AriaSkinBeans." + beanType
};
var normalizationResults = this._normalize(param);
i... | javascript | function (general, beanType) {
if (!general) {
general = {};
}
var param = {
json : general,
beanName : "aria.widgets.AriaSkinBeans." + beanType
};
var normalizationResults = this._normalize(param);
i... | [
"function",
"(",
"general",
",",
"beanType",
")",
"{",
"if",
"(",
"!",
"general",
")",
"{",
"general",
"=",
"{",
"}",
";",
"}",
"var",
"param",
"=",
"{",
"json",
":",
"general",
",",
"beanName",
":",
"\"aria.widgets.AriaSkinBeans.\"",
"+",
"beanType",
... | Normalizes the given general skin properties and returns it.
@param {aria.widgets.AriaSkinBeans.WidgetsGeneralCfg|PageGeneralCfg} general
@param {String} beanType | [
"Normalizes",
"the",
"given",
"general",
"skin",
"properties",
"and",
"returns",
"it",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/AriaSkinNormalization.js#L522-L536 | train | |
ariatemplates/ariatemplates | src/aria/widgets/action/Button.js | function (out) {
var cfg = this._cfg;
var tabIndexString = (cfg.tabIndex != null ? ' tabindex="' + this._calculateTabIndex() + '" ' : '');
var titleString = cfg.tooltip ? ' title="' + ariaUtilsString.escapeHTMLAttr(cfg.tooltip) + '" ' : '';
var isIE7 = ariaCoreBrowser.isI... | javascript | function (out) {
var cfg = this._cfg;
var tabIndexString = (cfg.tabIndex != null ? ' tabindex="' + this._calculateTabIndex() + '" ' : '');
var titleString = cfg.tooltip ? ' title="' + ariaUtilsString.escapeHTMLAttr(cfg.tooltip) + '" ' : '';
var isIE7 = ariaCoreBrowser.isI... | [
"function",
"(",
"out",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"var",
"tabIndexString",
"=",
"(",
"cfg",
".",
"tabIndex",
"!=",
"null",
"?",
"' tabindex=\"'",
"+",
"this",
".",
"_calculateTabIndex",
"(",
")",
"+",
"'\" '",
":",
"''",
... | Create the button markup from the Div class
@param {aria.templates.MarkupWriter} out Output markup writer
@protected | [
"Create",
"the",
"button",
"markup",
"from",
"the",
"Div",
"class"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/action/Button.js#L215-L280 | train | |
ariatemplates/ariatemplates | src/aria/widgets/action/Button.js | function (domEvt) {
if (domEvt.keyCode == ariaDomEvent.KC_SPACE || domEvt.keyCode == ariaDomEvent.KC_ENTER) {
this._keyPressed = true;
this._updateState();
domEvt.stopPropagation();
return false;
}
return true;
... | javascript | function (domEvt) {
if (domEvt.keyCode == ariaDomEvent.KC_SPACE || domEvt.keyCode == ariaDomEvent.KC_ENTER) {
this._keyPressed = true;
this._updateState();
domEvt.stopPropagation();
return false;
}
return true;
... | [
"function",
"(",
"domEvt",
")",
"{",
"if",
"(",
"domEvt",
".",
"keyCode",
"==",
"ariaDomEvent",
".",
"KC_SPACE",
"||",
"domEvt",
".",
"keyCode",
"==",
"ariaDomEvent",
".",
"KC_ENTER",
")",
"{",
"this",
".",
"_keyPressed",
"=",
"true",
";",
"this",
".",
... | React to delegated key down events
@protected
@param {aria.DomEvent} domEvt Event | [
"React",
"to",
"delegated",
"key",
"down",
"events"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/action/Button.js#L376-L385 | train | |
ariatemplates/ariatemplates | src/aria/utils/Device.js | function() {
var parts = [
this.vendor(),
this.model()
];
for (var index = parts.length - 1; index >= 0; index--) {
var part = parts[index];
if (part == null || part.length == null || part.length <= 0) {
... | javascript | function() {
var parts = [
this.vendor(),
this.model()
];
for (var index = parts.length - 1; index >= 0; index--) {
var part = parts[index];
if (part == null || part.length == null || part.length <= 0) {
... | [
"function",
"(",
")",
"{",
"var",
"parts",
"=",
"[",
"this",
".",
"vendor",
"(",
")",
",",
"this",
".",
"model",
"(",
")",
"]",
";",
"for",
"(",
"var",
"index",
"=",
"parts",
".",
"length",
"-",
"1",
";",
"index",
">=",
"0",
";",
"index",
"--... | Returns the device name, which is a mix of model and vendor properties when available.
<p>
The format is the following: <em>vendor - model</em>
</p>
@return {String} The device name or an empty string if no information at all is available | [
"Returns",
"the",
"device",
"name",
"which",
"is",
"a",
"mix",
"of",
"model",
"and",
"vendor",
"properties",
"when",
"available",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Device.js#L342-L358 | train | |
ariatemplates/ariatemplates | src/aria/utils/Device.js | function () {
// -------------------------------------------- result initial value
var result = false;
// -------------------------------------------------- standard check
var deviceType = this.__userAgentWrapper.results.device.type;
if (!result) {
... | javascript | function () {
// -------------------------------------------- result initial value
var result = false;
// -------------------------------------------------- standard check
var deviceType = this.__userAgentWrapper.results.device.type;
if (!result) {
... | [
"function",
"(",
")",
"{",
"// -------------------------------------------- result initial value",
"var",
"result",
"=",
"false",
";",
"// -------------------------------------------------- standard check",
"var",
"deviceType",
"=",
"this",
".",
"__userAgentWrapper",
".",
"result... | Checks whether it is a phone device rather than a tablet.
<p>
We consider that if a mobile operating system is detected but nothing tells that is is a tablet, by default the device is a mobile phone.
</p>
@return {Boolean} <em>true</em> if so, <em>false</em> otherwise | [
"Checks",
"whether",
"it",
"is",
"a",
"phone",
"device",
"rather",
"than",
"a",
"tablet",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Device.js#L369-L401 | train | |
ariatemplates/ariatemplates | src/aria/utils/Device.js | function () {
var isTouch = false;
if (ariaCoreBrowser.isBlackBerry) {
if (!ariaUtilsArray.contains([9670, 9100, 9105, 9360, 9350, 9330, 9320, 9310, 9300, 9220, 9780, 9700, 9650], +this.model())) {
isTouch = true;
}
} else {
... | javascript | function () {
var isTouch = false;
if (ariaCoreBrowser.isBlackBerry) {
if (!ariaUtilsArray.contains([9670, 9100, 9105, 9360, 9350, 9330, 9320, 9310, 9300, 9220, 9780, 9700, 9650], +this.model())) {
isTouch = true;
}
} else {
... | [
"function",
"(",
")",
"{",
"var",
"isTouch",
"=",
"false",
";",
"if",
"(",
"ariaCoreBrowser",
".",
"isBlackBerry",
")",
"{",
"if",
"(",
"!",
"ariaUtilsArray",
".",
"contains",
"(",
"[",
"9670",
",",
"9100",
",",
"9105",
",",
"9360",
",",
"9350",
",",... | Checks whether it is a touch device.
@return {Boolean} <em>true</em> if so, <em>false</em> otherwise | [
"Checks",
"whether",
"it",
"is",
"a",
"touch",
"device",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Device.js#L471-L487 | train | |
ariatemplates/ariatemplates | src/aria/utils/StackHashMap.js | function () {
__objCount++;
/**
* Counter to be used as an index in each map. Is incremented each time a new entry is added to the object.
* @protected
* @type Number
*/
this._nextIndex = 0;
/**
* Map to sto... | javascript | function () {
__objCount++;
/**
* Counter to be used as an index in each map. Is incremented each time a new entry is added to the object.
* @protected
* @type Number
*/
this._nextIndex = 0;
/**
* Map to sto... | [
"function",
"(",
")",
"{",
"__objCount",
"++",
";",
"/**\n * Counter to be used as an index in each map. Is incremented each time a new entry is added to the object.\n * @protected\n * @type Number\n */",
"this",
".",
"_nextIndex",
"=",
"0",
... | Create an empty StackHashMap object. | [
"Create",
"an",
"empty",
"StackHashMap",
"object",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/StackHashMap.js#L45-L88 | train | |
ariatemplates/ariatemplates | src/aria/utils/StackHashMap.js | function (key, value) {
var item = {
key : key,
value : value,
index : this._nextIndex
};
this._nextIndex++;
var map = this._getMap(key, true);
if (map == this._objectKeys) {
... | javascript | function (key, value) {
var item = {
key : key,
value : value,
index : this._nextIndex
};
this._nextIndex++;
var map = this._getMap(key, true);
if (map == this._objectKeys) {
... | [
"function",
"(",
"key",
",",
"value",
")",
"{",
"var",
"item",
"=",
"{",
"key",
":",
"key",
",",
"value",
":",
"value",
",",
"index",
":",
"this",
".",
"_nextIndex",
"}",
";",
"this",
".",
"_nextIndex",
"++",
";",
"var",
"map",
"=",
"this",
".",
... | Add an entry in the StackHashMap object.
@param {MultiTypes} key Key which can be used to retrieve the value later (through the pop method). If
the key is already present in the object, the value will be added anyway.
@param {MultiTypes} value Anything to store in the StackHashMap object | [
"Add",
"an",
"entry",
"in",
"the",
"StackHashMap",
"object",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/StackHashMap.js#L155-L192 | train | |
ariatemplates/ariatemplates | src/aria/utils/StackHashMap.js | function (key) {
var map = this._getMap(key, false);
if (map == null) {
return false;
}
var item;
if (map == this._objectKeys) {
item = key[this._metaDataName];
} else if (map != this.... | javascript | function (key) {
var map = this._getMap(key, false);
if (map == null) {
return false;
}
var item;
if (map == this._objectKeys) {
item = key[this._metaDataName];
} else if (map != this.... | [
"function",
"(",
"key",
")",
"{",
"var",
"map",
"=",
"this",
".",
"_getMap",
"(",
"key",
",",
"false",
")",
";",
"if",
"(",
"map",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"var",
"item",
";",
"if",
"(",
"map",
"==",
"this",
".",
"... | Checks if a key is in the StackHashMap object and returns true if it is found.
@param {MultiTypes} key key which was used to add the entry in the StackHashMap object.
@return {Boolean} True if there is an entry that was added with the same key. | [
"Checks",
"if",
"a",
"key",
"is",
"in",
"the",
"StackHashMap",
"object",
"and",
"returns",
"true",
"if",
"it",
"is",
"found",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/StackHashMap.js#L199-L225 | train | |
ariatemplates/ariatemplates | src/aria/utils/StackHashMap.js | function (key) {
var map = this._getMap(key, false);
if (map == null) {
return undefined;
}
var item;
if (map == this._objectKeys) {
item = key[this._metaDataName];
if (item) {
... | javascript | function (key) {
var map = this._getMap(key, false);
if (map == null) {
return undefined;
}
var item;
if (map == this._objectKeys) {
item = key[this._metaDataName];
if (item) {
... | [
"function",
"(",
"key",
")",
"{",
"var",
"map",
"=",
"this",
".",
"_getMap",
"(",
"key",
",",
"false",
")",
";",
"if",
"(",
"map",
"==",
"null",
")",
"{",
"return",
"undefined",
";",
"}",
"var",
"item",
";",
"if",
"(",
"map",
"==",
"this",
".",... | Remove an entry from the StackHashMap object and return the value.
@param {MultiTypes} key key which was used to add the entry in the StackHashMap object.
@return {MultiTypes} value associated to the given key. If several entries were added with the same key,
return the last one which has not yet been removed (it is a ... | [
"Remove",
"an",
"entry",
"from",
"the",
"StackHashMap",
"object",
"and",
"return",
"the",
"value",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/StackHashMap.js#L233-L272 | train | |
ariatemplates/ariatemplates | src/aria/utils/StackHashMap.js | function (map, array) {
if (map == null)
return;
for (var i in map) {
var item = map[i];
var key = item.key;
if (map == this._objectKeys) {
key[this._metaDataName] = null;
... | javascript | function (map, array) {
if (map == null)
return;
for (var i in map) {
var item = map[i];
var key = item.key;
if (map == this._objectKeys) {
key[this._metaDataName] = null;
... | [
"function",
"(",
"map",
",",
"array",
")",
"{",
"if",
"(",
"map",
"==",
"null",
")",
"return",
";",
"for",
"(",
"var",
"i",
"in",
"map",
")",
"{",
"var",
"item",
"=",
"map",
"[",
"i",
"]",
";",
"var",
"key",
"=",
"item",
".",
"key",
";",
"i... | Remove all the entries of the given map and put the corresponding values in the given array.
@private
@param {Object} map of entries to be emptied
@param {Array} array which will receive the values | [
"Remove",
"all",
"the",
"entries",
"of",
"the",
"given",
"map",
"and",
"put",
"the",
"corresponding",
"values",
"in",
"the",
"given",
"array",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/StackHashMap.js#L280-L301 | train | |
ariatemplates/ariatemplates | src/aria/utils/StackHashMap.js | function () {
var res = [];
this._removeAllToArray(this._objectKeys, res);
this._objectKeys = null;
this._removeAllToArray(this._stringKeys, res);
this._stringKeys = null;
this._removeAllToArray(this._numberKeys, res);
... | javascript | function () {
var res = [];
this._removeAllToArray(this._objectKeys, res);
this._objectKeys = null;
this._removeAllToArray(this._stringKeys, res);
this._stringKeys = null;
this._removeAllToArray(this._numberKeys, res);
... | [
"function",
"(",
")",
"{",
"var",
"res",
"=",
"[",
"]",
";",
"this",
".",
"_removeAllToArray",
"(",
"this",
".",
"_objectKeys",
",",
"res",
")",
";",
"this",
".",
"_objectKeys",
"=",
"null",
";",
"this",
".",
"_removeAllToArray",
"(",
"this",
".",
"_... | Remove all the entries of the StackHashMap object and return the corresponding values.
@return {Array} array of all the values present in the StackHashMap object | [
"Remove",
"all",
"the",
"entries",
"of",
"the",
"StackHashMap",
"object",
"and",
"return",
"the",
"corresponding",
"values",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/StackHashMap.js#L307-L318 | train | |
ariatemplates/ariatemplates | src/aria/core/transport/XDR.js | function (reqId, callback) {
// PROFILING // this.$stopMeasure(req.profilingId);
// Check if Flash plugin is available
var navigator = Aria.$global.navigator;
if (navigator.plugins && navigator.plugins.length > 0) {
var mime = navigator.mimeTypes, type = ... | javascript | function (reqId, callback) {
// PROFILING // this.$stopMeasure(req.profilingId);
// Check if Flash plugin is available
var navigator = Aria.$global.navigator;
if (navigator.plugins && navigator.plugins.length > 0) {
var mime = navigator.mimeTypes, type = ... | [
"function",
"(",
"reqId",
",",
"callback",
")",
"{",
"// PROFILING // this.$stopMeasure(req.profilingId);",
"// Check if Flash plugin is available",
"var",
"navigator",
"=",
"Aria",
".",
"$global",
".",
"navigator",
";",
"if",
"(",
"navigator",
".",
"plugins",
"&&",
"... | Inizialization function.
@param {String} reqId Request identifier
@param {aria.core.CfgBeans:Callback} callback This callback is generated by IO so it's already normalized | [
"Inizialization",
"function",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/XDR.js#L94-L151 | train | |
ariatemplates/ariatemplates | src/aria/core/transport/XDR.js | function () {
this.isReady = true;
for (var id in this._pending) {
if (this._pending.hasOwnProperty(id)) {
ariaCoreTimer.cancelCallback(this._pending[id]);
ariaCoreIO.reissue(id);
}
}
this._pending =... | javascript | function () {
this.isReady = true;
for (var id in this._pending) {
if (this._pending.hasOwnProperty(id)) {
ariaCoreTimer.cancelCallback(this._pending[id]);
ariaCoreIO.reissue(id);
}
}
this._pending =... | [
"function",
"(",
")",
"{",
"this",
".",
"isReady",
"=",
"true",
";",
"for",
"(",
"var",
"id",
"in",
"this",
".",
"_pending",
")",
"{",
"if",
"(",
"this",
".",
"_pending",
".",
"hasOwnProperty",
"(",
"id",
")",
")",
"{",
"ariaCoreTimer",
".",
"cance... | Callback called by flash transport once initialized, causes a reissue of the requests that were queued while
the transport was initializing | [
"Callback",
"called",
"by",
"flash",
"transport",
"once",
"initialized",
"causes",
"a",
"reissue",
"of",
"the",
"requests",
"that",
"were",
"queued",
"while",
"the",
"transport",
"was",
"initializing"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/XDR.js#L157-L167 | train | |
ariatemplates/ariatemplates | src/aria/core/transport/XDR.js | function (args) {
var reqId = args.reqId;
var callback = args.cb;
delete this._pending[reqId];
var response = {
error : this.LOAD_PLUGIN,
status : 0
};
callback.fn.call(callback.scope, true, callback.args, respons... | javascript | function (args) {
var reqId = args.reqId;
var callback = args.cb;
delete this._pending[reqId];
var response = {
error : this.LOAD_PLUGIN,
status : 0
};
callback.fn.call(callback.scope, true, callback.args, respons... | [
"function",
"(",
"args",
")",
"{",
"var",
"reqId",
"=",
"args",
".",
"reqId",
";",
"var",
"callback",
"=",
"args",
".",
"cb",
";",
"delete",
"this",
".",
"_pending",
"[",
"reqId",
"]",
";",
"var",
"response",
"=",
"{",
"error",
":",
"this",
".",
... | Timeout called when flash transport initialized fails, causes an abort of the request.
@protected
@param {Object} args Object containing request and callback objects | [
"Timeout",
"called",
"when",
"flash",
"transport",
"initialized",
"fails",
"causes",
"an",
"abort",
"of",
"the",
"request",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/XDR.js#L174-L186 | train | |
ariatemplates/ariatemplates | src/aria/core/transport/XDR.js | function (connection) {
if (connection) {
// raise global custom event -- startEvent
ariaCoreIO.$raiseEvent({
name : "startEvent",
o : connection
});
if (connection.startEvent) {
// r... | javascript | function (connection) {
if (connection) {
// raise global custom event -- startEvent
ariaCoreIO.$raiseEvent({
name : "startEvent",
o : connection
});
if (connection.startEvent) {
// r... | [
"function",
"(",
"connection",
")",
"{",
"if",
"(",
"connection",
")",
"{",
"// raise global custom event -- startEvent",
"ariaCoreIO",
".",
"$raiseEvent",
"(",
"{",
"name",
":",
"\"startEvent\"",
",",
"o",
":",
"connection",
"}",
")",
";",
"if",
"(",
"connect... | Raises the global and transaction start events.
@protected
@param {Object} connection The transaction object. | [
"Raises",
"the",
"global",
"and",
"transaction",
"start",
"events",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/XDR.js#L243-L259 | train | |
ariatemplates/ariatemplates | src/aria/core/transport/XDR.js | function (reqId, connection, callback) {
var success = connection && connection.statusText === "xdr:success";
if (success) {
connection.status = 200;
} else {
connection.status = 0;
}
callback.fn.call(callback.scope, !success,... | javascript | function (reqId, connection, callback) {
var success = connection && connection.statusText === "xdr:success";
if (success) {
connection.status = 200;
} else {
connection.status = 0;
}
callback.fn.call(callback.scope, !success,... | [
"function",
"(",
"reqId",
",",
"connection",
",",
"callback",
")",
"{",
"var",
"success",
"=",
"connection",
"&&",
"connection",
".",
"statusText",
"===",
"\"xdr:success\"",
";",
"if",
"(",
"success",
")",
"{",
"connection",
".",
"status",
"=",
"200",
";",... | Attempts to interpret the flash response and determine whether the transaction was successful, or if an error
or exception was encountered.
@private
@param {Number} reqId Requst identifier
@param {Object} connection The connection object (XHR or ActiveX)
@param {aria.core.CfgBeans:Callback} callback Callback from aria.... | [
"Attempts",
"to",
"interpret",
"the",
"flash",
"response",
"and",
"determine",
"whether",
"the",
"transaction",
"was",
"successful",
"or",
"if",
"an",
"error",
"or",
"exception",
"was",
"encountered",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/transport/XDR.js#L269-L279 | train | |
ariatemplates/ariatemplates | src/aria/core/IO.js | function (unused, req) {
this.$raiseEvent({
name : "request",
req : req
});
req.beginDownload = (new Date()).getTime();
// as postData can possibly be changed by filters, we compute the requestSize only after filters have been
... | javascript | function (unused, req) {
this.$raiseEvent({
name : "request",
req : req
});
req.beginDownload = (new Date()).getTime();
// as postData can possibly be changed by filters, we compute the requestSize only after filters have been
... | [
"function",
"(",
"unused",
",",
"req",
")",
"{",
"this",
".",
"$raiseEvent",
"(",
"{",
"name",
":",
"\"request\"",
",",
"req",
":",
"req",
"}",
")",
";",
"req",
".",
"beginDownload",
"=",
"(",
"new",
"Date",
"(",
")",
")",
".",
"getTime",
"(",
")... | Continue the request started in asyncRequest, after request filters have been called.
@param {Object} unused Unused parameter
@param {aria.core.CfgBeans:IOAsyncRequestCfg} req request (may have been modified by filters)
@private | [
"Continue",
"the",
"request",
"started",
"in",
"asyncRequest",
"after",
"request",
"filters",
"have",
"been",
"called",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/IO.js#L366-L398 | train | |
ariatemplates/ariatemplates | src/aria/core/IO.js | function (req) {
// increment before assigning to avoid setting request id 0 (which does not work well with abort)
this.nbRequests++;
req.id = this.nbRequests;
var reqMethods = ["GET", "POST", "PUT", "DELETE", "HEAD", "TRACE", "OPTIONS", "CONNECT", "PATCH", "COPY",
... | javascript | function (req) {
// increment before assigning to avoid setting request id 0 (which does not work well with abort)
this.nbRequests++;
req.id = this.nbRequests;
var reqMethods = ["GET", "POST", "PUT", "DELETE", "HEAD", "TRACE", "OPTIONS", "CONNECT", "PATCH", "COPY",
... | [
"function",
"(",
"req",
")",
"{",
"// increment before assigning to avoid setting request id 0 (which does not work well with abort)",
"this",
".",
"nbRequests",
"++",
";",
"req",
".",
"id",
"=",
"this",
".",
"nbRequests",
";",
"var",
"reqMethods",
"=",
"[",
"\"GET\"",
... | Normalize the Request object adding default values and additional parameters like a unique ID
@param {aria.core.CfgBeans:IOAsyncRequestCfg} req Request object as the input parameter of asyncRequest
@private | [
"Normalize",
"the",
"Request",
"object",
"adding",
"default",
"values",
"and",
"additional",
"parameters",
"like",
"a",
"unique",
"ID"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/IO.js#L405-L455 | train | |
ariatemplates/ariatemplates | src/aria/core/IO.js | function (error, request, response) {
if (!response) {
response = {};
}
if (!request && error) {
request = this.pendingRequests[error.reqId];
}
this.clearTimeout(request.id);
this._normalizeResponse(error, request,... | javascript | function (error, request, response) {
if (!response) {
response = {};
}
if (!request && error) {
request = this.pendingRequests[error.reqId];
}
this.clearTimeout(request.id);
this._normalizeResponse(error, request,... | [
"function",
"(",
"error",
",",
"request",
",",
"response",
")",
"{",
"if",
"(",
"!",
"response",
")",
"{",
"response",
"=",
"{",
"}",
";",
"}",
"if",
"(",
"!",
"request",
"&&",
"error",
")",
"{",
"request",
"=",
"this",
".",
"pendingRequests",
"[",... | Handle a transport response. This is the callback function passed to a transport request
@param {Boolean|Object} error Whether there was an error or not
@param {aria.core.CfgBeans:IOAsyncRequestCfg} request
@param {aria.core.CfgBeans:IOAsyncRequestResponseCfg} response | [
"Handle",
"a",
"transport",
"response",
".",
"This",
"is",
"the",
"callback",
"function",
"passed",
"to",
"a",
"transport",
"request"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/IO.js#L569-L605 | train | |
ariatemplates/ariatemplates | src/aria/core/IO.js | function (unused, req) {
var res = req.res, cb = req.callback;
if (!cb) {
this.$logError(this.MISSING_IO_CALLBACK, [res.url]);
} else if (res.error != null) {
// an error occured
// call the error callback
if (cb.onerror... | javascript | function (unused, req) {
var res = req.res, cb = req.callback;
if (!cb) {
this.$logError(this.MISSING_IO_CALLBACK, [res.url]);
} else if (res.error != null) {
// an error occured
// call the error callback
if (cb.onerror... | [
"function",
"(",
"unused",
",",
"req",
")",
"{",
"var",
"res",
"=",
"req",
".",
"res",
",",
"cb",
"=",
"req",
".",
"callback",
";",
"if",
"(",
"!",
"cb",
")",
"{",
"this",
".",
"$logError",
"(",
"this",
".",
"MISSING_IO_CALLBACK",
",",
"[",
"res"... | Continue to process a response, after response filters have been called.
@param {Object} unused Unused parameter
@param {aria.core.CfgBeans:IOAsyncRequestCfg} req request (may have been modified by filters)
@private | [
"Continue",
"to",
"process",
"a",
"response",
"after",
"response",
"filters",
"have",
"been",
"called",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/IO.js#L656-L688 | train | |
ariatemplates/ariatemplates | src/aria/core/IO.js | function (id, timeout, callback) {
if (timeout > 0) {
this._timeOut[id] = setTimeout(function () {
// You won't believe this, but sometimes IE forgets to remove the timeout even if
// we explicitely called a clearTimeout. Double check that the timeout ... | javascript | function (id, timeout, callback) {
if (timeout > 0) {
this._timeOut[id] = setTimeout(function () {
// You won't believe this, but sometimes IE forgets to remove the timeout even if
// we explicitely called a clearTimeout. Double check that the timeout ... | [
"function",
"(",
"id",
",",
"timeout",
",",
"callback",
")",
"{",
"if",
"(",
"timeout",
">",
"0",
")",
"{",
"this",
".",
"_timeOut",
"[",
"id",
"]",
"=",
"setTimeout",
"(",
"function",
"(",
")",
"{",
"// You won't believe this, but sometimes IE forgets to re... | Set a timeout for a given request. If not canceled this method calls the abort function and the callback
after 'timeout' milliseconds
@param {Number} id Request id
@param {Number} timeout Timer in milliseconds
@param {aria.core.CfgBeans:Callback} callback Should be already normalized | [
"Set",
"a",
"timeout",
"for",
"a",
"given",
"request",
".",
"If",
"not",
"canceled",
"this",
"method",
"calls",
"the",
"abort",
"function",
"and",
"the",
"callback",
"after",
"timeout",
"milliseconds"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/IO.js#L752-L765 | train | |
ariatemplates/ariatemplates | src/aria/core/IO.js | function (xhrObject, callback, isTimeout) {
if (!xhrObject) {
return false;
}
var transaction = xhrObject.redId || xhrObject;
var request = this.pendingRequests[transaction];
this.clearTimeout(transaction);
var abortStatus = fals... | javascript | function (xhrObject, callback, isTimeout) {
if (!xhrObject) {
return false;
}
var transaction = xhrObject.redId || xhrObject;
var request = this.pendingRequests[transaction];
this.clearTimeout(transaction);
var abortStatus = fals... | [
"function",
"(",
"xhrObject",
",",
"callback",
",",
"isTimeout",
")",
"{",
"if",
"(",
"!",
"xhrObject",
")",
"{",
"return",
"false",
";",
"}",
"var",
"transaction",
"=",
"xhrObject",
".",
"redId",
"||",
"xhrObject",
";",
"var",
"request",
"=",
"this",
... | Method to terminate a transaction, if it has not reached readyState 4.
@param {Object|String} xhrObject The connection object returned by asyncRequest or the Request identifier.
@param {Object} callback User-defined callback object.
@param {String} isTimeout boolean to indicate if abort resulted from a callback timeout... | [
"Method",
"to",
"terminate",
"a",
"transaction",
"if",
"it",
"has",
"not",
"reached",
"readyState",
"4",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/IO.js#L783-L830 | train | |
ariatemplates/ariatemplates | src/aria/core/IO.js | function (response, expectedResponseType) {
if (expectedResponseType == "text") {
if (!response.responseText && response.responseJSON != null) {
// convert JSON to text
if (ariaUtilsType.isString(response.responseJSON)) {
// thi... | javascript | function (response, expectedResponseType) {
if (expectedResponseType == "text") {
if (!response.responseText && response.responseJSON != null) {
// convert JSON to text
if (ariaUtilsType.isString(response.responseJSON)) {
// thi... | [
"function",
"(",
"response",
",",
"expectedResponseType",
")",
"{",
"if",
"(",
"expectedResponseType",
"==",
"\"text\"",
")",
"{",
"if",
"(",
"!",
"response",
".",
"responseText",
"&&",
"response",
".",
"responseJSON",
"!=",
"null",
")",
"{",
"// convert JSON ... | Convert the response text into Json or response Json into text
@param {aria.core.CfgBeans:IOAsyncRequestResponseCfg} response Response object
@param {String} expectedResponseType The expected response type
@protected | [
"Convert",
"the",
"response",
"text",
"into",
"Json",
"or",
"response",
"Json",
"into",
"text"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/core/IO.js#L883-L911 | train | |
ariatemplates/ariatemplates | src/aria/utils/Event.js | function (e) {
// call unload listeners
// Keep a local copy of the reference to unloadListeners because it is possible that a listener calls
// aria.utils.Event.reset (that's what AriaWindow is doing).
var list = unloadListeners.slice();
f... | javascript | function (e) {
// call unload listeners
// Keep a local copy of the reference to unloadListeners because it is possible that a listener calls
// aria.utils.Event.reset (that's what AriaWindow is doing).
var list = unloadListeners.slice();
f... | [
"function",
"(",
"e",
")",
"{",
"// call unload listeners",
"// Keep a local copy of the reference to unloadListeners because it is possible that a listener calls",
"// aria.utils.Event.reset (that's what AriaWindow is doing).",
"var",
"list",
"=",
"unloadListeners",
".",
"slice",
"(",
... | Handler for the unload event.
@param {Object} e DOM event | [
"Handler",
"for",
"the",
"unload",
"event",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Event.js#L88-L102 | train | |
ariatemplates/ariatemplates | src/aria/utils/Event.js | function (element, event, callback, useCapture, filterFunction) {
var added = false;
var parent = element.parentElement || element.parentNode; // Fx < 9 compat
while (parent != null) {
if (!filterFunction || filterFunction(parent)) {
... | javascript | function (element, event, callback, useCapture, filterFunction) {
var added = false;
var parent = element.parentElement || element.parentNode; // Fx < 9 compat
while (parent != null) {
if (!filterFunction || filterFunction(parent)) {
... | [
"function",
"(",
"element",
",",
"event",
",",
"callback",
",",
"useCapture",
",",
"filterFunction",
")",
"{",
"var",
"added",
"=",
"false",
";",
"var",
"parent",
"=",
"element",
".",
"parentElement",
"||",
"element",
".",
"parentNode",
";",
"// Fx < 9 compa... | Appends an event handler to the given element and its ancestors. Note that in general you should prefer
to use event delegation pattern for performance reasons. Use this method only for events that do not
bubble.
@param {HTMLElement} element an element reference to assign the listener to.
@param {String} event The type... | [
"Appends",
"an",
"event",
"handler",
"to",
"the",
"given",
"element",
"and",
"its",
"ancestors",
".",
"Note",
"that",
"in",
"general",
"you",
"should",
"prefer",
"to",
"use",
"event",
"delegation",
"pattern",
"for",
"performance",
"reasons",
".",
"Use",
"thi... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Event.js#L118-L128 | train | |
ariatemplates/ariatemplates | src/aria/utils/Event.js | function (element, event, callback, filterFunction) {
var removed = false;
var parent = element.parentElement || element.parentNode; // Fx < 9 compat
while (parent != null) {
if (!filterFunction || filterFunction(parent)) {
remo... | javascript | function (element, event, callback, filterFunction) {
var removed = false;
var parent = element.parentElement || element.parentNode; // Fx < 9 compat
while (parent != null) {
if (!filterFunction || filterFunction(parent)) {
remo... | [
"function",
"(",
"element",
",",
"event",
",",
"callback",
",",
"filterFunction",
")",
"{",
"var",
"removed",
"=",
"false",
";",
"var",
"parent",
"=",
"element",
".",
"parentElement",
"||",
"element",
".",
"parentNode",
";",
"// Fx < 9 compat",
"while",
"(",... | Removes an event handler to every ancestor of the given element. Note that in general you should prefer
to use event delegation pattern for performance reasons. Use this method only for events that do not
bubble.
@param {HTMLElement} element an element reference to remove the listener from.
@param {String} event The ty... | [
"Removes",
"an",
"event",
"handler",
"to",
"every",
"ancestor",
"of",
"the",
"given",
"element",
".",
"Note",
"that",
"in",
"general",
"you",
"should",
"prefer",
"to",
"use",
"event",
"delegation",
"pattern",
"for",
"performance",
"reasons",
".",
"Use",
"thi... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Event.js#L142-L152 | train | |
ariatemplates/ariatemplates | src/aria/utils/Event.js | function (element, event) {
var normalized = {
element: element,
event: event
};
if ('mousewheel' == event) {
if (this.UA.isIE) {
if (element == Aria.$window) {
... | javascript | function (element, event) {
var normalized = {
element: element,
event: event
};
if ('mousewheel' == event) {
if (this.UA.isIE) {
if (element == Aria.$window) {
... | [
"function",
"(",
"element",
",",
"event",
")",
"{",
"var",
"normalized",
"=",
"{",
"element",
":",
"element",
",",
"event",
":",
"event",
"}",
";",
"if",
"(",
"'mousewheel'",
"==",
"event",
")",
"{",
"if",
"(",
"this",
".",
"UA",
".",
"isIE",
")",
... | Normalize target and event for cross-browser compatibility
@param {EventTarget} target of the event
@param {String} event type
@protected | [
"Normalize",
"target",
"and",
"event",
"for",
"cross",
"-",
"browser",
"compatibility"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/Event.js#L429-L444 | train | |
ariatemplates/ariatemplates | src/aria/templates/TplParser.js | function (template, context, statements, throwErrors) {
this.context = context;
this._prepare(template, throwErrors);
this._computeLineNumbers();
return this._buildTree(throwErrors);
} | javascript | function (template, context, statements, throwErrors) {
this.context = context;
this._prepare(template, throwErrors);
this._computeLineNumbers();
return this._buildTree(throwErrors);
} | [
"function",
"(",
"template",
",",
"context",
",",
"statements",
",",
"throwErrors",
")",
"{",
"this",
".",
"context",
"=",
"context",
";",
"this",
".",
"_prepare",
"(",
"template",
",",
"throwErrors",
")",
";",
"this",
".",
"_computeLineNumbers",
"(",
")",... | Parse the given template and return a tree representing the template.
@param {String} template template to parse
@param {object} context template context data, passes additional information the to error log)
@param {Object} statements list of statements allowed by the class generator
@param {Boolean} throwErrors if tru... | [
"Parse",
"the",
"given",
"template",
"and",
"return",
"a",
"tree",
"representing",
"the",
"template",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/TplParser.js#L37-L42 | train | |
ariatemplates/ariatemplates | src/aria/widgets/action/SortIndicator.js | function () {
var cfg = this._cfg;
var anchorElement = ariaUtilsDom.getDomElementChild(this.getDom(), 0);
var ellipseElement = Aria.$window.document.createElement("span");
ellipseElement.innerHTML = ariaUtilsString.escapeHTML(cfg.label);
this.textContent = ... | javascript | function () {
var cfg = this._cfg;
var anchorElement = ariaUtilsDom.getDomElementChild(this.getDom(), 0);
var ellipseElement = Aria.$window.document.createElement("span");
ellipseElement.innerHTML = ariaUtilsString.escapeHTML(cfg.label);
this.textContent = ... | [
"function",
"(",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"var",
"anchorElement",
"=",
"ariaUtilsDom",
".",
"getDomElementChild",
"(",
"this",
".",
"getDom",
"(",
")",
",",
"0",
")",
";",
"var",
"ellipseElement",
"=",
"Aria",
".",
"$windo... | Called when a new instance is created if an ellipsis is needed on this SortIndicator instance
@protected | [
"Called",
"when",
"a",
"new",
"instance",
"is",
"created",
"if",
"an",
"ellipsis",
"is",
"needed",
"on",
"this",
"SortIndicator",
"instance"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/action/SortIndicator.js#L183-L205 | train | |
ariatemplates/ariatemplates | src/aria/widgets/action/SortIndicator.js | function (out) {
var cfg = this._cfg;
var tabString = (cfg.tabIndex != null ? ' tabindex="' + this._calculateTabIndex() + '" ' : ' ');
out.write(['<a', Aria.testMode ? ' id="' + this._domId + '_link"' : '',
' class="sortIndicatorLink" href="#"' + tabString + this.... | javascript | function (out) {
var cfg = this._cfg;
var tabString = (cfg.tabIndex != null ? ' tabindex="' + this._calculateTabIndex() + '" ' : ' ');
out.write(['<a', Aria.testMode ? ' id="' + this._domId + '_link"' : '',
' class="sortIndicatorLink" href="#"' + tabString + this.... | [
"function",
"(",
"out",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"var",
"tabString",
"=",
"(",
"cfg",
".",
"tabIndex",
"!=",
"null",
"?",
"' tabindex=\"'",
"+",
"this",
".",
"_calculateTabIndex",
"(",
")",
"+",
"'\" '",
":",
"' '",
")",... | Internal function to override to generate the internal widget markup
@param {aria.templates.MarkupWriter} out Markup writer
@protected | [
"Internal",
"function",
"to",
"override",
"to",
"generate",
"the",
"internal",
"widget",
"markup"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/action/SortIndicator.js#L220-L227 | train | |
ariatemplates/ariatemplates | src/aria/widgets/action/SortIndicator.js | function (cfg) {
if (cfg.view.sortName == cfg.sortName) {
if (cfg.view.sortOrder == 'A') {
return this.ASCENDING_STATE;
} else if (cfg.view.sortOrder == 'D') {
return this.DESCENDING_STATE;
}
} else {
... | javascript | function (cfg) {
if (cfg.view.sortName == cfg.sortName) {
if (cfg.view.sortOrder == 'A') {
return this.ASCENDING_STATE;
} else if (cfg.view.sortOrder == 'D') {
return this.DESCENDING_STATE;
}
} else {
... | [
"function",
"(",
"cfg",
")",
"{",
"if",
"(",
"cfg",
".",
"view",
".",
"sortName",
"==",
"cfg",
".",
"sortName",
")",
"{",
"if",
"(",
"cfg",
".",
"view",
".",
"sortOrder",
"==",
"'A'",
")",
"{",
"return",
"this",
".",
"ASCENDING_STATE",
";",
"}",
... | Internal method to set the initial _state property from the _cfg description based on the config properties
@protected
@param {Object} cfg Config properties
@return {String} new state | [
"Internal",
"method",
"to",
"set",
"the",
"initial",
"_state",
"property",
"from",
"the",
"_cfg",
"description",
"based",
"on",
"the",
"config",
"properties"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/action/SortIndicator.js#L235-L245 | train | |
ariatemplates/ariatemplates | src/aria/widgets/action/SortIndicator.js | function () {
var cfg = this._cfg, sortKeyGetter = cfg.sortKeyGetter;
if (sortKeyGetter) {
var view = cfg.view;
view.toggleSortOrder(cfg.sortName, sortKeyGetter);
view.refresh();
}
} | javascript | function () {
var cfg = this._cfg, sortKeyGetter = cfg.sortKeyGetter;
if (sortKeyGetter) {
var view = cfg.view;
view.toggleSortOrder(cfg.sortName, sortKeyGetter);
view.refresh();
}
} | [
"function",
"(",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
",",
"sortKeyGetter",
"=",
"cfg",
".",
"sortKeyGetter",
";",
"if",
"(",
"sortKeyGetter",
")",
"{",
"var",
"view",
"=",
"cfg",
".",
"view",
";",
"view",
".",
"toggleSortOrder",
"(",
"c... | Internal method to sort the list
@protected | [
"Internal",
"method",
"to",
"sort",
"the",
"list"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/action/SortIndicator.js#L251-L258 | train | |
ariatemplates/ariatemplates | src/aria/widgets/action/SortIndicator.js | function (domEvt) {
if (this._actingDom && this._hasMouseOver === false) {
this._hasFocus = true;
var offset;
if (ariaCoreBrowser.isFirefox) {
offset = {
left : 1,
top : 2
... | javascript | function (domEvt) {
if (this._actingDom && this._hasMouseOver === false) {
this._hasFocus = true;
var offset;
if (ariaCoreBrowser.isFirefox) {
offset = {
left : 1,
top : 2
... | [
"function",
"(",
"domEvt",
")",
"{",
"if",
"(",
"this",
".",
"_actingDom",
"&&",
"this",
".",
"_hasMouseOver",
"===",
"false",
")",
"{",
"this",
".",
"_hasFocus",
"=",
"true",
";",
"var",
"offset",
";",
"if",
"(",
"ariaCoreBrowser",
".",
"isFirefox",
"... | The method called when the widget gets focus
@param {aria.DomEvent} domEvt Focus event
@protected | [
"The",
"method",
"called",
"when",
"the",
"widget",
"gets",
"focus"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/action/SortIndicator.js#L385-L404 | train | |
ariatemplates/ariatemplates | src/aria/widgets/action/SortIndicator.js | function (domEvt) {
if (this._hasMouseOver === false && this._hasFocus === true) {
this._hasFocus = false;
if (this._ellipsis) {
this._ellipsis._hideFullText(domEvt.relatedTarget);
}
}
} | javascript | function (domEvt) {
if (this._hasMouseOver === false && this._hasFocus === true) {
this._hasFocus = false;
if (this._ellipsis) {
this._ellipsis._hideFullText(domEvt.relatedTarget);
}
}
} | [
"function",
"(",
"domEvt",
")",
"{",
"if",
"(",
"this",
".",
"_hasMouseOver",
"===",
"false",
"&&",
"this",
".",
"_hasFocus",
"===",
"true",
")",
"{",
"this",
".",
"_hasFocus",
"=",
"false",
";",
"if",
"(",
"this",
".",
"_ellipsis",
")",
"{",
"this",... | The method called when focus leaves the widget
@param {aria.DomEvent} domEvt Blur event
@protected | [
"The",
"method",
"called",
"when",
"focus",
"leaves",
"the",
"widget"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/action/SortIndicator.js#L411-L418 | train | |
ariatemplates/ariatemplates | src/aria/widgets/action/SortIndicator.js | function (domEvt) {
this._sortList();
// handle an onclick event
this.$ActionWidget._dom_onclick.apply(this, arguments);
if (this._cfg) {
this._updateDisplay();
if (this._cfg.refreshArgs) {
this._doPartialRefresh(this... | javascript | function (domEvt) {
this._sortList();
// handle an onclick event
this.$ActionWidget._dom_onclick.apply(this, arguments);
if (this._cfg) {
this._updateDisplay();
if (this._cfg.refreshArgs) {
this._doPartialRefresh(this... | [
"function",
"(",
"domEvt",
")",
"{",
"this",
".",
"_sortList",
"(",
")",
";",
"// handle an onclick event",
"this",
".",
"$ActionWidget",
".",
"_dom_onclick",
".",
"apply",
"(",
"this",
",",
"arguments",
")",
";",
"if",
"(",
"this",
".",
"_cfg",
")",
"{"... | The method called when the markup of the widget is clicked
@param {aria.DomEvent} domEvt Click event
@protected | [
"The",
"method",
"called",
"when",
"the",
"markup",
"of",
"the",
"widget",
"is",
"clicked"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/action/SortIndicator.js#L425-L443 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function () {
var differed = [];
// it is possible, with the dialog, that we insert an already initialized section inside a non
// initialized section
if (this._initWidgetsDone) {
return differed;
}
this.... | javascript | function () {
var differed = [];
// it is possible, with the dialog, that we insert an already initialized section inside a non
// initialized section
if (this._initWidgetsDone) {
return differed;
}
this.... | [
"function",
"(",
")",
"{",
"var",
"differed",
"=",
"[",
"]",
";",
"// it is possible, with the dialog, that we insert an already initialized section inside a non",
"// initialized section",
"if",
"(",
"this",
".",
"_initWidgetsDone",
")",
"{",
"return",
"differed",
";",
"... | Initialize the widgets contained in the section if not already done
@return {Array} List of element that will be rendered later on | [
"Initialize",
"the",
"widgets",
"contained",
"in",
"the",
"section",
"if",
"not",
"already",
"done"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L403-L437 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function () {
this.$raiseEvent("beforeRemoveContent");
// so that the children section can see that it is useless to remove themselves from
// their parent:
this._removingContent = true;
var content = this._content;
var con... | javascript | function () {
this.$raiseEvent("beforeRemoveContent");
// so that the children section can see that it is useless to remove themselves from
// their parent:
this._removingContent = true;
var content = this._content;
var con... | [
"function",
"(",
")",
"{",
"this",
".",
"$raiseEvent",
"(",
"\"beforeRemoveContent\"",
")",
";",
"// so that the children section can see that it is useless to remove themselves from",
"// their parent:",
"this",
".",
"_removingContent",
"=",
"true",
";",
"var",
"content",
... | Remove any content from the section. The dom is not modified by this call. | [
"Remove",
"any",
"content",
"from",
"the",
"section",
".",
"The",
"dom",
"is",
"not",
"modified",
"by",
"this",
"call",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L442-L467 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function () {
// remove delegation done with "on" statement
if (this.delegateIds) {
for (var i = 0, l = this.delegateIds.length; i < l; i++) {
ariaUtilsDelegate.remove(this.delegateIds[i]);
}
this.delegat... | javascript | function () {
// remove delegation done with "on" statement
if (this.delegateIds) {
for (var i = 0, l = this.delegateIds.length; i < l; i++) {
ariaUtilsDelegate.remove(this.delegateIds[i]);
}
this.delegat... | [
"function",
"(",
")",
"{",
"// remove delegation done with \"on\" statement",
"if",
"(",
"this",
".",
"delegateIds",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"l",
"=",
"this",
".",
"delegateIds",
".",
"length",
";",
"i",
"<",
"l",
";",
"i",
"++... | Remove the delegateIds from the aria.utils.Delegate maps and disposes the delegated callbacks | [
"Remove",
"the",
"delegateIds",
"from",
"the",
"aria",
".",
"utils",
".",
"Delegate",
"maps",
"and",
"disposes",
"the",
"delegated",
"callbacks"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L472-L485 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (bhv) {
var bhvId = (bhv.getId ? bhv.getId() : null);
var element = {
_type : TYPE_BEHAVIOR,
behavior : bhv,
section : this,
id : bhvId
};
if (bhvId && this.idMap) {... | javascript | function (bhv) {
var bhvId = (bhv.getId ? bhv.getId() : null);
var element = {
_type : TYPE_BEHAVIOR,
behavior : bhv,
section : this,
id : bhvId
};
if (bhvId && this.idMap) {... | [
"function",
"(",
"bhv",
")",
"{",
"var",
"bhvId",
"=",
"(",
"bhv",
".",
"getId",
"?",
"bhv",
".",
"getId",
"(",
")",
":",
"null",
")",
";",
"var",
"element",
"=",
"{",
"_type",
":",
"TYPE_BEHAVIOR",
",",
"behavior",
":",
"bhv",
",",
"section",
":... | Register a widget in this section
@param {Object} bhv the behaviour to add to this section | [
"Register",
"a",
"widget",
"in",
"this",
"section"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L490-L511 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (id) {
var res = this.idMap ? this.idMap[id] : null;
if (res && res._type == TYPE_BEHAVIOR) {
return res.behavior;
}
return null;
} | javascript | function (id) {
var res = this.idMap ? this.idMap[id] : null;
if (res && res._type == TYPE_BEHAVIOR) {
return res.behavior;
}
return null;
} | [
"function",
"(",
"id",
")",
"{",
"var",
"res",
"=",
"this",
".",
"idMap",
"?",
"this",
".",
"idMap",
"[",
"id",
"]",
":",
"null",
";",
"if",
"(",
"res",
"&&",
"res",
".",
"_type",
"==",
"TYPE_BEHAVIOR",
")",
"{",
"return",
"res",
".",
"behavior",... | Returns a behaviour with given id from this section
@param {String} id | [
"Returns",
"a",
"behaviour",
"with",
"given",
"id",
"from",
"this",
"section"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L517-L523 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (id) {
var res = this.idMap ? this.idMap[id] : null;
if (res && res._type == TYPE_SECTION) {
return res;
}
return null;
} | javascript | function (id) {
var res = this.idMap ? this.idMap[id] : null;
if (res && res._type == TYPE_SECTION) {
return res;
}
return null;
} | [
"function",
"(",
"id",
")",
"{",
"var",
"res",
"=",
"this",
".",
"idMap",
"?",
"this",
".",
"idMap",
"[",
"id",
"]",
":",
"null",
";",
"if",
"(",
"res",
"&&",
"res",
".",
"_type",
"==",
"TYPE_SECTION",
")",
"{",
"return",
"res",
";",
"}",
"retu... | Returns a section with given id from this section
@param {String} id | [
"Returns",
"a",
"section",
"with",
"given",
"id",
"from",
"this",
"section"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L529-L535 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (idMap) {
if (this.idMap == idMap) {
// already the same id map (especially useful if both are null)
return;
}
// set child idMap to its parent value
this.idMap = idMap;
var id = this.id;
... | javascript | function (idMap) {
if (this.idMap == idMap) {
// already the same id map (especially useful if both are null)
return;
}
// set child idMap to its parent value
this.idMap = idMap;
var id = this.id;
... | [
"function",
"(",
"idMap",
")",
"{",
"if",
"(",
"this",
".",
"idMap",
"==",
"idMap",
")",
"{",
"// already the same id map (especially useful if both are null)",
"return",
";",
"}",
"// set child idMap to its parent value",
"this",
".",
"idMap",
"=",
"idMap",
";",
"v... | Used to replace the sub-sections idMap with the one from the parent, and to add to the parent's map the
ids from sub-sections
@param {Object} idMap
@private | [
"Used",
"to",
"replace",
"the",
"sub",
"-",
"sections",
"idMap",
"with",
"the",
"one",
"from",
"the",
"parent",
"and",
"to",
"add",
"to",
"the",
"parent",
"s",
"map",
"the",
"ids",
"from",
"sub",
"-",
"sections"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L558-L593 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (bind, callback) {
var jsonChangeCallback = null;
// register as listener for the bindings defined for this control:
if (bind) {
jsonChangeCallback = {
fn : callback || this._notifyDataChange,
sc... | javascript | function (bind, callback) {
var jsonChangeCallback = null;
// register as listener for the bindings defined for this control:
if (bind) {
jsonChangeCallback = {
fn : callback || this._notifyDataChange,
sc... | [
"function",
"(",
"bind",
",",
"callback",
")",
"{",
"var",
"jsonChangeCallback",
"=",
"null",
";",
"// register as listener for the bindings defined for this control:",
"if",
"(",
"bind",
")",
"{",
"jsonChangeCallback",
"=",
"{",
"fn",
":",
"callback",
"||",
"this",... | RegisterBinding is used to add bindings to Templates and sections.
@param {aria.templates.CfgBeans:BindingConfiguration} bind
@param {Object} callback
@return {aria.core.CfgBeans:Callback} Listener that has been actually added | [
"RegisterBinding",
"is",
"used",
"to",
"add",
"bindings",
"to",
"Templates",
"and",
"sections",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L612-L644 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (visible, options) {
visible = !!visible;
var alreadyVisible = !!this._overlayId;
if (visible !== alreadyVisible) {
if (visible) {
this._overlayId = ariaUtilsDomOverlay.create(this.getDom(), options);
... | javascript | function (visible, options) {
visible = !!visible;
var alreadyVisible = !!this._overlayId;
if (visible !== alreadyVisible) {
if (visible) {
this._overlayId = ariaUtilsDomOverlay.create(this.getDom(), options);
... | [
"function",
"(",
"visible",
",",
"options",
")",
"{",
"visible",
"=",
"!",
"!",
"visible",
";",
"var",
"alreadyVisible",
"=",
"!",
"!",
"this",
".",
"_overlayId",
";",
"if",
"(",
"visible",
"!==",
"alreadyVisible",
")",
"{",
"if",
"(",
"visible",
")",
... | Set the state of the processing indicator. It updates the datamodel if the section has a processing
binding
@param {Boolean} visible True if the loading indicator should be visible
@param {Object|String} options The options (see aria.utils.DomOverlay.create / aria.utils.DomOverlay.detachFrom) | [
"Set",
"the",
"state",
"of",
"the",
"processing",
"indicator",
".",
"It",
"updates",
"the",
"datamodel",
"if",
"the",
"section",
"has",
"a",
"processing",
"binding"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L710-L732 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (recursive) {
if (recursive) {
var content = this._content;
for (var i = 0, len = content.length; i < len; i++) {
if (content[i].refreshProcessingIndicator) {
content[i].refreshProcessingIndicator(true);... | javascript | function (recursive) {
if (recursive) {
var content = this._content;
for (var i = 0, len = content.length; i < len; i++) {
if (content[i].refreshProcessingIndicator) {
content[i].refreshProcessingIndicator(true);... | [
"function",
"(",
"recursive",
")",
"{",
"if",
"(",
"recursive",
")",
"{",
"var",
"content",
"=",
"this",
".",
"_content",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"len",
"=",
"content",
".",
"length",
";",
"i",
"<",
"len",
";",
"i",
"++",
")... | Refresh the status of the processing indicator above this section. This is called after a template
refresh to display again the loading overlay above a section bound to the datamodel
@param {Boolean} recursive if true the refresh is done on all subsections and subtemplates | [
"Refresh",
"the",
"status",
"of",
"the",
"processing",
"indicator",
"above",
"this",
"section",
".",
"This",
"is",
"called",
"after",
"a",
"template",
"refresh",
"to",
"display",
"again",
"the",
"loading",
"overlay",
"above",
"a",
"section",
"bound",
"to",
"... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L748-L765 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (attributes) {
var attrBinding = this._attributesBinding;
if (attrBinding) {
this.__json.setValue(attrBinding.inside, attrBinding.to, attributes);
} else {
this._applyNewAttributes(attributes);
}
... | javascript | function (attributes) {
var attrBinding = this._attributesBinding;
if (attrBinding) {
this.__json.setValue(attrBinding.inside, attrBinding.to, attributes);
} else {
this._applyNewAttributes(attributes);
}
... | [
"function",
"(",
"attributes",
")",
"{",
"var",
"attrBinding",
"=",
"this",
".",
"_attributesBinding",
";",
"if",
"(",
"attrBinding",
")",
"{",
"this",
".",
"__json",
".",
"setValue",
"(",
"attrBinding",
".",
"inside",
",",
"attrBinding",
".",
"to",
",",
... | Apply the new attributes by removing the current ones. If attributes are bound, the data model is updated
@param {aria.templates.CfgBeans:HtmlAttribute} newValue
@protected | [
"Apply",
"the",
"new",
"attributes",
"by",
"removing",
"the",
"current",
"ones",
".",
"If",
"attributes",
"are",
"bound",
"the",
"data",
"model",
"is",
"updated"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L818-L825 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (newValue) {
var attribute, domElt = this.getDom(), whiteList = ariaTemplatesDomElementWrapper.attributesWhiteList, newAttributeValue;
var oldValue = this.attributes;
// remove old members
for (attribute in oldValue) {
if (old... | javascript | function (newValue) {
var attribute, domElt = this.getDom(), whiteList = ariaTemplatesDomElementWrapper.attributesWhiteList, newAttributeValue;
var oldValue = this.attributes;
// remove old members
for (attribute in oldValue) {
if (old... | [
"function",
"(",
"newValue",
")",
"{",
"var",
"attribute",
",",
"domElt",
"=",
"this",
".",
"getDom",
"(",
")",
",",
"whiteList",
"=",
"ariaTemplatesDomElementWrapper",
".",
"attributesWhiteList",
",",
"newAttributeValue",
";",
"var",
"oldValue",
"=",
"this",
... | Apply the new attributes by removing the current ones. Even if attributes are bound, the data model is
not updated
@param {aria.templates.CfgBeans:HtmlAttribute} newValue
@protected | [
"Apply",
"the",
"new",
"attributes",
"by",
"removing",
"the",
"current",
"ones",
".",
"Even",
"if",
"attributes",
"are",
"bound",
"the",
"data",
"model",
"is",
"not",
"updated"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L833-L868 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (className) {
if (this.attributes && this.attributes.classList) {
this.attributes.classList = className.split(" ");
var attrBinding = this._attributesBinding;
if (attrBinding) {
this.__json.setValue(attrBinding.... | javascript | function (className) {
if (this.attributes && this.attributes.classList) {
this.attributes.classList = className.split(" ");
var attrBinding = this._attributesBinding;
if (attrBinding) {
this.__json.setValue(attrBinding.... | [
"function",
"(",
"className",
")",
"{",
"if",
"(",
"this",
".",
"attributes",
"&&",
"this",
".",
"attributes",
".",
"classList",
")",
"{",
"this",
".",
"attributes",
".",
"classList",
"=",
"className",
".",
"split",
"(",
"\" \"",
")",
";",
"var",
"attr... | Update the section object variables that are linked to the className of the HTML element representing the
section in the DOM. It does not update the HTML class attribute, but should be called only after it has
been updated by another entity.
@param {String} className | [
"Update",
"the",
"section",
"object",
"variables",
"that",
"are",
"linked",
"to",
"the",
"className",
"of",
"the",
"HTML",
"element",
"representing",
"the",
"section",
"in",
"the",
"DOM",
".",
"It",
"does",
"not",
"update",
"the",
"HTML",
"class",
"attribute... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L876-L884 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (out) {
if (this.domType) {
// if domType is empty, we do not output anything for the section
// (used in the tooltip)
var attributeList = this.attributes ? ariaUtilsHtml.buildAttributeList(this.attributes) : '';
va... | javascript | function (out) {
if (this.domType) {
// if domType is empty, we do not output anything for the section
// (used in the tooltip)
var attributeList = this.attributes ? ariaUtilsHtml.buildAttributeList(this.attributes) : '';
va... | [
"function",
"(",
"out",
")",
"{",
"if",
"(",
"this",
".",
"domType",
")",
"{",
"// if domType is empty, we do not output anything for the section",
"// (used in the tooltip)",
"var",
"attributeList",
"=",
"this",
".",
"attributes",
"?",
"ariaUtilsHtml",
".",
"buildAttri... | Write the beginning of the DOM source for the section container
@param {aria.templates.MarkupWriter} out | [
"Write",
"the",
"beginning",
"of",
"the",
"DOM",
"source",
"for",
"the",
"section",
"container"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L928-L937 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (evt) {
// forward event and configuration to a dedicated handler
this.__navigationManager.handleNavigation(this.keyMap, this.tableNav, evt);
if (this._cfg && this._cfg.on) {
var callback = this._cfg.on[evt.type];
if (call... | javascript | function (evt) {
// forward event and configuration to a dedicated handler
this.__navigationManager.handleNavigation(this.keyMap, this.tableNav, evt);
if (this._cfg && this._cfg.on) {
var callback = this._cfg.on[evt.type];
if (call... | [
"function",
"(",
"evt",
")",
"{",
"// forward event and configuration to a dedicated handler",
"this",
".",
"__navigationManager",
".",
"handleNavigation",
"(",
"this",
".",
"keyMap",
",",
"this",
".",
"tableNav",
",",
"evt",
")",
";",
"if",
"(",
"this",
".",
"_... | Event handler for keyboard navigation
@param {aria.DomEvent} evt | [
"Event",
"handler",
"for",
"keyboard",
"navigation"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L954-L972 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function () {
var eventListeners = this._cfg ? this._cfg.on : null;
if (eventListeners) {
for (var listener in eventListeners) {
if (eventListeners.hasOwnProperty(listener)) {
eventListeners[listener] = this.$normCal... | javascript | function () {
var eventListeners = this._cfg ? this._cfg.on : null;
if (eventListeners) {
for (var listener in eventListeners) {
if (eventListeners.hasOwnProperty(listener)) {
eventListeners[listener] = this.$normCal... | [
"function",
"(",
")",
"{",
"var",
"eventListeners",
"=",
"this",
".",
"_cfg",
"?",
"this",
".",
"_cfg",
".",
"on",
":",
"null",
";",
"if",
"(",
"eventListeners",
")",
"{",
"for",
"(",
"var",
"listener",
"in",
"eventListeners",
")",
"{",
"if",
"(",
... | Since event's callback can have several signatures as specified in aria.widgetLibs.CommonBeans.Callback
this function normalizes the callbacks for later use. It will also ask Delegate to generate a delegateId
if needed.
@protected | [
"Since",
"event",
"s",
"callback",
"can",
"have",
"several",
"signatures",
"as",
"specified",
"in",
"aria",
".",
"widgetLibs",
".",
"CommonBeans",
".",
"Callback",
"this",
"function",
"normalizes",
"the",
"callbacks",
"for",
"later",
"use",
".",
"It",
"will",
... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L979-L988 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (targetSection) {
this.$assert(708, targetSection.idMap == null); // check that there is no id map so that it is not a
// problem to change the id
targetSection.id = this.id;
targetSection.domType = this.domType;
targetSection.tabl... | javascript | function (targetSection) {
this.$assert(708, targetSection.idMap == null); // check that there is no id map so that it is not a
// problem to change the id
targetSection.id = this.id;
targetSection.domType = this.domType;
targetSection.tabl... | [
"function",
"(",
"targetSection",
")",
"{",
"this",
".",
"$assert",
"(",
"708",
",",
"targetSection",
".",
"idMap",
"==",
"null",
")",
";",
"// check that there is no id map so that it is not a",
"// problem to change the id",
"targetSection",
".",
"id",
"=",
"this",
... | Copy this section configuration on another section. Note that this method should only be used with
targetSections that have no idMap.
@param {aria.templates.Section} targetSection | [
"Copy",
"this",
"section",
"configuration",
"on",
"another",
"section",
".",
"Note",
"that",
"this",
"method",
"should",
"only",
"be",
"used",
"with",
"targetSections",
"that",
"have",
"no",
"idMap",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L995-L1003 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (args) {
var sectionMacro = this.macro;
if (sectionMacro) {
// a macro is defined in the section, it is the default macro to use when refreshing
if (!args.macro) {
args.macro = sectionMacro;
} el... | javascript | function (args) {
var sectionMacro = this.macro;
if (sectionMacro) {
// a macro is defined in the section, it is the default macro to use when refreshing
if (!args.macro) {
args.macro = sectionMacro;
} el... | [
"function",
"(",
"args",
")",
"{",
"var",
"sectionMacro",
"=",
"this",
".",
"macro",
";",
"if",
"(",
"sectionMacro",
")",
"{",
"// a macro is defined in the section, it is the default macro to use when refreshing",
"if",
"(",
"!",
"args",
".",
"macro",
")",
"{",
"... | Method called when this section is about to be refreshed.
@param {aria.templates.CfgBeans:GetRefreshedSectionCfg} args arguments given to the getRefreshedSection
method. The arguments are modified to add default parameters (macro) if not specified. | [
"Method",
"called",
"when",
"this",
"section",
"is",
"about",
"to",
"be",
"refreshed",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L1061-L1081 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (targetSection) {
var content = this._content;
this.$assert(805, this.idMap == null);
this.$assert(806, content);
var targetContent = targetSection._content;
var targetLength = targetContent.length;
// first move al... | javascript | function (targetSection) {
var content = this._content;
this.$assert(805, this.idMap == null);
this.$assert(806, content);
var targetContent = targetSection._content;
var targetLength = targetContent.length;
// first move al... | [
"function",
"(",
"targetSection",
")",
"{",
"var",
"content",
"=",
"this",
".",
"_content",
";",
"this",
".",
"$assert",
"(",
"805",
",",
"this",
".",
"idMap",
"==",
"null",
")",
";",
"this",
".",
"$assert",
"(",
"806",
",",
"content",
")",
";",
"v... | Move the content of this section to another section, and initialize section widgets if widgets are
already initialized in the target section. Note that this method should only be used on sections with no
idMap.
@param {aria.templates.Section} targetSection
@return {Array} List of element that will be rendered later on | [
"Move",
"the",
"content",
"of",
"this",
"section",
"to",
"another",
"section",
"and",
"initialize",
"section",
"widgets",
"if",
"widgets",
"are",
"already",
"initialized",
"in",
"the",
"target",
"section",
".",
"Note",
"that",
"this",
"method",
"should",
"only... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L1142-L1177 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function () {
var splitted1 = this._cfg.animation.animateIn.split(" ");
var splitted2 = this._cfg.animation.animateOut.split(" ");
return {
animIn : {
type : splitted1[0],
reverse : (splitted1[1] == "righ... | javascript | function () {
var splitted1 = this._cfg.animation.animateIn.split(" ");
var splitted2 = this._cfg.animation.animateOut.split(" ");
return {
animIn : {
type : splitted1[0],
reverse : (splitted1[1] == "righ... | [
"function",
"(",
")",
"{",
"var",
"splitted1",
"=",
"this",
".",
"_cfg",
".",
"animation",
".",
"animateIn",
".",
"split",
"(",
"\" \"",
")",
";",
"var",
"splitted2",
"=",
"this",
".",
"_cfg",
".",
"animation",
".",
"animateOut",
".",
"split",
"(",
"... | Returns an object containing the animation type and direction. | [
"Returns",
"an",
"object",
"containing",
"the",
"animation",
"type",
"and",
"direction",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L1223-L1236 | train | |
ariatemplates/ariatemplates | src/aria/templates/Section.js | function (domElt, refreshArgs) {
// lazy processing of animation in/out string
var animation = this._getAnimation();
this._animating = true;
var newSection = this._domElt.cloneNode(false);
domElt.id = null;
newSection.classN... | javascript | function (domElt, refreshArgs) {
// lazy processing of animation in/out string
var animation = this._getAnimation();
this._animating = true;
var newSection = this._domElt.cloneNode(false);
domElt.id = null;
newSection.classN... | [
"function",
"(",
"domElt",
",",
"refreshArgs",
")",
"{",
"// lazy processing of animation in/out string",
"var",
"animation",
"=",
"this",
".",
"_getAnimation",
"(",
")",
";",
"this",
".",
"_animating",
"=",
"true",
";",
"var",
"newSection",
"=",
"this",
".",
... | Prepares and performs the transition animation from a section to another one.
@param {HTMLElement} domElt element to be animated
@param {Object} refreshArgs parameter provided to the template onRefreshAnimationEnd handler | [
"Prepares",
"and",
"performs",
"the",
"transition",
"animation",
"from",
"a",
"section",
"to",
"another",
"one",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/templates/Section.js#L1243-L1295 | train | |
ariatemplates/ariatemplates | src/aria/resources/handlers/LCResourcesHandler.js | function (suggestions) {
if (typesUtil.isArray(suggestions)) {
var newSuggestions = [], suggestionsLabel = this._options.labelKey, suggestionsCode = this._options.codeKey;
if (this._options.sortingMethod && typesUtil.isFunction(this._options.sortingMethod)) {
... | javascript | function (suggestions) {
if (typesUtil.isArray(suggestions)) {
var newSuggestions = [], suggestionsLabel = this._options.labelKey, suggestionsCode = this._options.codeKey;
if (this._options.sortingMethod && typesUtil.isFunction(this._options.sortingMethod)) {
... | [
"function",
"(",
"suggestions",
")",
"{",
"if",
"(",
"typesUtil",
".",
"isArray",
"(",
"suggestions",
")",
")",
"{",
"var",
"newSuggestions",
"=",
"[",
"]",
",",
"suggestionsLabel",
"=",
"this",
".",
"_options",
".",
"labelKey",
",",
"suggestionsCode",
"="... | Set the list of available suggestion
@param {Array} suggestions list of suggestion objects | [
"Set",
"the",
"list",
"of",
"available",
"suggestion"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/resources/handlers/LCResourcesHandler.js#L204-L244 | train | |
ariatemplates/ariatemplates | src/aria/resources/handlers/LCResourcesHandler.js | function (callback) {
var originalSuggestions = this._suggestions;
var nbSuggestions = originalSuggestions.length;
var returnedSuggestions = [];
var suggestion;
for (var index = 0; index < nbSuggestions; index++) {
sugge... | javascript | function (callback) {
var originalSuggestions = this._suggestions;
var nbSuggestions = originalSuggestions.length;
var returnedSuggestions = [];
var suggestion;
for (var index = 0; index < nbSuggestions; index++) {
sugge... | [
"function",
"(",
"callback",
")",
"{",
"var",
"originalSuggestions",
"=",
"this",
".",
"_suggestions",
";",
"var",
"nbSuggestions",
"=",
"originalSuggestions",
".",
"length",
";",
"var",
"returnedSuggestions",
"=",
"[",
"]",
";",
"var",
"suggestion",
";",
"for... | Call the callback with all possible suggestions.
@param {aria.core.CfgBeans:Callback} callback | [
"Call",
"the",
"callback",
"with",
"all",
"possible",
"suggestions",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/resources/handlers/LCResourcesHandler.js#L266-L276 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/utils/PageConfigHelper.js | function (lazy) {
var dependencies = {
templates : [],
classes : [],
modules : {
page : [],
common : []
},
css : []
};
var pageComposition = this._pageConfig.pageCo... | javascript | function (lazy) {
var dependencies = {
templates : [],
classes : [],
modules : {
page : [],
common : []
},
css : []
};
var pageComposition = this._pageConfig.pageCo... | [
"function",
"(",
"lazy",
")",
"{",
"var",
"dependencies",
"=",
"{",
"templates",
":",
"[",
"]",
",",
"classes",
":",
"[",
"]",
",",
"modules",
":",
"{",
"page",
":",
"[",
"]",
",",
"common",
":",
"[",
"]",
"}",
",",
"css",
":",
"[",
"]",
"}",... | Extract the dependencies of a page. It'll go through all submodule and placeholders and return the list of
classpaths to be loaded in the page
@return {Object} It contains the properties:<br/>
<ul>
<li>templates : Array containing the classpaths of the templates to load</li>
<li>classes : Array containing the classpath... | [
"Extract",
"the",
"dependencies",
"of",
"a",
"page",
".",
"It",
"ll",
"go",
"through",
"all",
"submodule",
"and",
"placeholders",
"and",
"return",
"the",
"list",
"of",
"classpaths",
"to",
"be",
"loaded",
"in",
"the",
"page"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/utils/PageConfigHelper.js#L73-L108 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/utils/PageConfigHelper.js | function (placeholder, dependencies, lazy) {
var modules = this._pageModules, refpath, moduleDesc, typeUtils = ariaUtilsType;
if (!typeUtils.isObject(placeholder)) {
return;
}
var isLazy = (placeholder.lazy);
if ((lazy && !isLazy) || (!lazy && ... | javascript | function (placeholder, dependencies, lazy) {
var modules = this._pageModules, refpath, moduleDesc, typeUtils = ariaUtilsType;
if (!typeUtils.isObject(placeholder)) {
return;
}
var isLazy = (placeholder.lazy);
if ((lazy && !isLazy) || (!lazy && ... | [
"function",
"(",
"placeholder",
",",
"dependencies",
",",
"lazy",
")",
"{",
"var",
"modules",
"=",
"this",
".",
"_pageModules",
",",
"refpath",
",",
"moduleDesc",
",",
"typeUtils",
"=",
"ariaUtilsType",
";",
"if",
"(",
"!",
"typeUtils",
".",
"isObject",
"(... | Extract the dependencies from a placeholder definition and add them to dependencies argument
@param {aria.pageEngine.CfgBeans:Placeholder} placeholder
@param {Object} dependencies
@private | [
"Extract",
"the",
"dependencies",
"from",
"a",
"placeholder",
"definition",
"and",
"add",
"them",
"to",
"dependencies",
"argument"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/utils/PageConfigHelper.js#L116-L143 | train | |
ariatemplates/ariatemplates | src/aria/pageEngine/utils/PageConfigHelper.js | function () {
var output = [], isLazy, typeUtils = ariaUtilsType;
var placeholders = this._pageConfig.pageComposition.placeholders || {};
for (var placeholderName in placeholders) {
if (placeholders.hasOwnProperty(placeholderName)) {
isLazy = false... | javascript | function () {
var output = [], isLazy, typeUtils = ariaUtilsType;
var placeholders = this._pageConfig.pageComposition.placeholders || {};
for (var placeholderName in placeholders) {
if (placeholders.hasOwnProperty(placeholderName)) {
isLazy = false... | [
"function",
"(",
")",
"{",
"var",
"output",
"=",
"[",
"]",
",",
"isLazy",
",",
"typeUtils",
"=",
"ariaUtilsType",
";",
"var",
"placeholders",
"=",
"this",
".",
"_pageConfig",
".",
"pageComposition",
".",
"placeholders",
"||",
"{",
"}",
";",
"for",
"(",
... | Compute the id of the placeholders who have at least on lazy content
@return {Array} ids of the lazy placeholders. | [
"Compute",
"the",
"id",
"of",
"the",
"placeholders",
"who",
"have",
"at",
"least",
"on",
"lazy",
"content"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/pageEngine/utils/PageConfigHelper.js#L168-L191 | train | |
ariatemplates/ariatemplates | build/grunt-tasks/task-removedirs.js | rmDirRecursive | function rmDirRecursive(dirPath) {
if(!fs.existsSync(dirPath)){
grunt.log.write('Directory ' + dirPath + ' does not exist. ');
return 0; // fine
}
var files;
try {
files = fs.readdirSync(dirPath);
} catch(e) {
grunt.fatal('Exceptio... | javascript | function rmDirRecursive(dirPath) {
if(!fs.existsSync(dirPath)){
grunt.log.write('Directory ' + dirPath + ' does not exist. ');
return 0; // fine
}
var files;
try {
files = fs.readdirSync(dirPath);
} catch(e) {
grunt.fatal('Exceptio... | [
"function",
"rmDirRecursive",
"(",
"dirPath",
")",
"{",
"if",
"(",
"!",
"fs",
".",
"existsSync",
"(",
"dirPath",
")",
")",
"{",
"grunt",
".",
"log",
".",
"write",
"(",
"'Directory '",
"+",
"dirPath",
"+",
"' does not exist. '",
")",
";",
"return",
"0",
... | Remove directory recursively, if it exists.
@param dirPath {String} directory to be removed.
@return {Number} no. of files/directories removed | [
"Remove",
"directory",
"recursively",
"if",
"it",
"exists",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/build/grunt-tasks/task-removedirs.js#L29-L57 | train |
ariatemplates/ariatemplates | src/aria/widgets/TemplateBasedWidget.js | function (tplCfg) {
if (this._cfgOk) {
var cfg = this._cfg;
for (var i = 0, len = this.__inherithCfg.length; i < len; i += 1) {
var property = this.__inherithCfg[i];
if (!tplCfg.hasOwnProperty(property)) {
tplCf... | javascript | function (tplCfg) {
if (this._cfgOk) {
var cfg = this._cfg;
for (var i = 0, len = this.__inherithCfg.length; i < len; i += 1) {
var property = this.__inherithCfg[i];
if (!tplCfg.hasOwnProperty(property)) {
tplCf... | [
"function",
"(",
"tplCfg",
")",
"{",
"if",
"(",
"this",
".",
"_cfgOk",
")",
"{",
"var",
"cfg",
"=",
"this",
".",
"_cfg",
";",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"len",
"=",
"this",
".",
"__inherithCfg",
".",
"length",
";",
"i",
"<",
"len",
... | Initialize the template associated to this template based widget. It will create a new instance of the
Template.
@param {aria.templates.CfgBeans:LoadTemplateCfg} tplCfg Template configuration object
@protected | [
"Initialize",
"the",
"template",
"associated",
"to",
"this",
"template",
"based",
"widget",
".",
"It",
"will",
"create",
"a",
"new",
"instance",
"of",
"the",
"Template",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/TemplateBasedWidget.js#L58-L87 | train | |
ariatemplates/ariatemplates | src/aria/widgets/TemplateBasedWidget.js | function (args) {
if (args.success) {
this._subTplCtxt = args.templateCtxt;
this._subTplModuleCtrl = args.templateCtxt.moduleCtrl;
this._subTplData = this._subTplCtxt.data;
if (this._subTplModuleCtrl) {
this._subTplModuleCtr... | javascript | function (args) {
if (args.success) {
this._subTplCtxt = args.templateCtxt;
this._subTplModuleCtrl = args.templateCtxt.moduleCtrl;
this._subTplData = this._subTplCtxt.data;
if (this._subTplModuleCtrl) {
this._subTplModuleCtr... | [
"function",
"(",
"args",
")",
"{",
"if",
"(",
"args",
".",
"success",
")",
"{",
"this",
".",
"_subTplCtxt",
"=",
"args",
".",
"templateCtxt",
";",
"this",
".",
"_subTplModuleCtrl",
"=",
"args",
".",
"templateCtxt",
".",
"moduleCtrl",
";",
"this",
".",
... | Callback executed after the template is loaded and initialized. As this widget has _directInit it gets
initialized soon after writing it to the DOM, however the callback can be executed after the first refresh if
the template context is not available
@param {Object} args Contains information about the load and instance... | [
"Callback",
"executed",
"after",
"the",
"template",
"is",
"loaded",
"and",
"initialized",
".",
"As",
"this",
"widget",
"has",
"_directInit",
"it",
"gets",
"initialized",
"soon",
"after",
"writing",
"it",
"to",
"the",
"DOM",
"however",
"the",
"callback",
"can",... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/TemplateBasedWidget.js#L105-L126 | train | |
ariatemplates/ariatemplates | src/aria/widgets/TemplateBasedWidget.js | function (out) {
if (!this._cfgOk) {
return aria.widgets.TemplateBasedWidget.superclass.writeMarkup.call(this, out);
}
// Prepare delegation id before to have it linked with this widget
this._tplWidget._delegateId = aria.utils.Delegate.add({
... | javascript | function (out) {
if (!this._cfgOk) {
return aria.widgets.TemplateBasedWidget.superclass.writeMarkup.call(this, out);
}
// Prepare delegation id before to have it linked with this widget
this._tplWidget._delegateId = aria.utils.Delegate.add({
... | [
"function",
"(",
"out",
")",
"{",
"if",
"(",
"!",
"this",
".",
"_cfgOk",
")",
"{",
"return",
"aria",
".",
"widgets",
".",
"TemplateBasedWidget",
".",
"superclass",
".",
"writeMarkup",
".",
"call",
"(",
"this",
",",
"out",
")",
";",
"}",
"// Prepare del... | Write the widget markup into the Markup Writer
@param {aria.templates.MarkupWriter} out Markup Writer | [
"Write",
"the",
"widget",
"markup",
"into",
"the",
"Markup",
"Writer"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/widgets/TemplateBasedWidget.js#L132-L146 | train | |
ariatemplates/ariatemplates | src/aria/storage/UserData.js | setMappedKey | function setMappedKey (generated, original) {
if (generated) {
allKeyMap[original] = generated;
} else {
delete allKeyMap[original];
}
storage.setAttribute("kMap", privateSerializer.serialize(allKeyMap));
storage.save("JSONPersist");
} | javascript | function setMappedKey (generated, original) {
if (generated) {
allKeyMap[original] = generated;
} else {
delete allKeyMap[original];
}
storage.setAttribute("kMap", privateSerializer.serialize(allKeyMap));
storage.save("JSONPersist");
} | [
"function",
"setMappedKey",
"(",
"generated",
",",
"original",
")",
"{",
"if",
"(",
"generated",
")",
"{",
"allKeyMap",
"[",
"original",
"]",
"=",
"generated",
";",
"}",
"else",
"{",
"delete",
"allKeyMap",
"[",
"original",
"]",
";",
"}",
"storage",
".",
... | Store the newly generated key in the map of keys
@type {String} generated Key generated by the framework, safe to be used with setAttribute. If null, removes the
original key from the map
@type {String} original User defined key, it might contain unsafe characters | [
"Store",
"the",
"newly",
"generated",
"key",
"in",
"the",
"map",
"of",
"keys"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/storage/UserData.js#L49-L58 | train |
ariatemplates/ariatemplates | src/aria/storage/UserData.js | getMappedKey | function getMappedKey (key, create) {
allKeyMap = getAllKeys();
if (create && !(key in allKeyMap)) {
var newKey = ("uD" + _UNIQUE_ID++);
setMappedKey(newKey, key);
return newKey;
} else {
return allKeyMap[key];
}
} | javascript | function getMappedKey (key, create) {
allKeyMap = getAllKeys();
if (create && !(key in allKeyMap)) {
var newKey = ("uD" + _UNIQUE_ID++);
setMappedKey(newKey, key);
return newKey;
} else {
return allKeyMap[key];
}
} | [
"function",
"getMappedKey",
"(",
"key",
",",
"create",
")",
"{",
"allKeyMap",
"=",
"getAllKeys",
"(",
")",
";",
"if",
"(",
"create",
"&&",
"!",
"(",
"key",
"in",
"allKeyMap",
")",
")",
"{",
"var",
"newKey",
"=",
"(",
"\"uD\"",
"+",
"_UNIQUE_ID",
"++"... | Return the generated key corresponding to the user defined key, and optionally creates one if missing.
@param {String} key User defined key
@param {Boolean} create create it if missing, default false
@return {String} framework generated key | [
"Return",
"the",
"generated",
"key",
"corresponding",
"to",
"the",
"user",
"defined",
"key",
"and",
"optionally",
"creates",
"one",
"if",
"missing",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/storage/UserData.js#L66-L77 | train |
ariatemplates/ariatemplates | src/aria/storage/UserData.js | function (key) {
storage.removeAttribute(getMappedKey(key));
setMappedKey(null, key);
storage.save("JSONPersist");
} | javascript | function (key) {
storage.removeAttribute(getMappedKey(key));
setMappedKey(null, key);
storage.save("JSONPersist");
} | [
"function",
"(",
"key",
")",
"{",
"storage",
".",
"removeAttribute",
"(",
"getMappedKey",
"(",
"key",
")",
")",
";",
"setMappedKey",
"(",
"null",
",",
"key",
")",
";",
"storage",
".",
"save",
"(",
"\"JSONPersist\"",
")",
";",
"}"
] | Internal method to remove the value associated to key from the list.
@param {String} key identifier of the value to be removed | [
"Internal",
"method",
"to",
"remove",
"the",
"value",
"associated",
"to",
"key",
"from",
"the",
"list",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/storage/UserData.js#L148-L152 | train | |
ariatemplates/ariatemplates | src/aria/utils/validators/MultipleValidator.js | function (value, groups, event) {
var validators = this.validators;
if (validators.length) {
var res;
var isMember = false;
for (var i = 0; i < validators.length; i++) {
isMember = this.dataUtils.checkGroup(validators[i].groups,... | javascript | function (value, groups, event) {
var validators = this.validators;
if (validators.length) {
var res;
var isMember = false;
for (var i = 0; i < validators.length; i++) {
isMember = this.dataUtils.checkGroup(validators[i].groups,... | [
"function",
"(",
"value",
",",
"groups",
",",
"event",
")",
"{",
"var",
"validators",
"=",
"this",
".",
"validators",
";",
"if",
"(",
"validators",
".",
"length",
")",
"{",
"var",
"res",
";",
"var",
"isMember",
"=",
"false",
";",
"for",
"(",
"var",
... | loops through each validator within the multiple validator and calls it's validate method.
@param {String} value to be validated.
@param {Array} groups to validate against.
@param {String} event that validation occurs on.
@return {Object} res containing any message objects if validation fails. | [
"loops",
"through",
"each",
"validator",
"within",
"the",
"multiple",
"validator",
"and",
"calls",
"it",
"s",
"validate",
"method",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/utils/validators/MultipleValidator.js#L51-L83 | train | |
ariatemplates/ariatemplates | src/aria/modules/RequestMgr.js | function (name, value) {
if (value == null) { // null or undefined
return this.removeParam(name);
}
if (this._params == null) {
this._params = [];
}
for (var i = 0, length = this._params.length; i < length; i++) {
... | javascript | function (name, value) {
if (value == null) { // null or undefined
return this.removeParam(name);
}
if (this._params == null) {
this._params = [];
}
for (var i = 0, length = this._params.length; i < length; i++) {
... | [
"function",
"(",
"name",
",",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"// null or undefined",
"return",
"this",
".",
"removeParam",
"(",
"name",
")",
";",
"}",
"if",
"(",
"this",
".",
"_params",
"==",
"null",
")",
"{",
"this",
... | Add a global request parameter that will be sent with each request, or update it if it already exists
@param {String} name the parameter name
@param {String} value the parameter value | [
"Add",
"a",
"global",
"request",
"parameter",
"that",
"will",
"be",
"sent",
"with",
"each",
"request",
"or",
"update",
"it",
"if",
"it",
"already",
"exists"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/modules/RequestMgr.js#L175-L193 | train | |
ariatemplates/ariatemplates | src/aria/modules/RequestMgr.js | function (name) {
if (name == null || this._params == null) {
return null;
}
for (var i = 0, length = this._params.length; i < length; i++) {
var elt = this._params[i];
if (elt.name === name) {
return elt.value;
... | javascript | function (name) {
if (name == null || this._params == null) {
return null;
}
for (var i = 0, length = this._params.length; i < length; i++) {
var elt = this._params[i];
if (elt.name === name) {
return elt.value;
... | [
"function",
"(",
"name",
")",
"{",
"if",
"(",
"name",
"==",
"null",
"||",
"this",
".",
"_params",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"_params",
".",
"length",
"... | Get global request parameters that match the given name.
@param {String} name the parameter name to get | [
"Get",
"global",
"request",
"parameters",
"that",
"match",
"the",
"given",
"name",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/modules/RequestMgr.js#L199-L210 | train | |
ariatemplates/ariatemplates | src/aria/modules/RequestMgr.js | function (name) {
if (name == null) {
this._params = null;
}
if (this._params == null) {
return;
}
for (var i = 0, length = this._params.length; i < length; i++) {
var elt = this._params[i];
if (e... | javascript | function (name) {
if (name == null) {
this._params = null;
}
if (this._params == null) {
return;
}
for (var i = 0, length = this._params.length; i < length; i++) {
var elt = this._params[i];
if (e... | [
"function",
"(",
"name",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"this",
".",
"_params",
"=",
"null",
";",
"}",
"if",
"(",
"this",
".",
"_params",
"==",
"null",
")",
"{",
"return",
";",
"}",
"for",
"(",
"var",
"i",
"=",
"0",
",",... | Remove global request parameters that match the given name.
@param {String} name the parameter name to remove. If omitted, remove all params. | [
"Remove",
"global",
"request",
"parameters",
"that",
"match",
"the",
"given",
"name",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/modules/RequestMgr.js#L216-L230 | train | |
ariatemplates/ariatemplates | src/aria/modules/RequestMgr.js | function (args) {
var req = args.req;
var handler = args.requestHandler;
if (handler == null) {
handler = this.__getRequestHandler();
}
req.data = (req.data == null && req.method == "POST")
? handler.prepareRequestBody(req.... | javascript | function (args) {
var req = args.req;
var handler = args.requestHandler;
if (handler == null) {
handler = this.__getRequestHandler();
}
req.data = (req.data == null && req.method == "POST")
? handler.prepareRequestBody(req.... | [
"function",
"(",
"args",
")",
"{",
"var",
"req",
"=",
"args",
".",
"req",
";",
"var",
"handler",
"=",
"args",
".",
"requestHandler",
";",
"if",
"(",
"handler",
"==",
"null",
")",
"{",
"handler",
"=",
"this",
".",
"__getRequestHandler",
"(",
")",
";",... | Continue request after request delay.
@param {Object} args contains req, cb, actionqueuing, session
@protected | [
"Continue",
"request",
"after",
"request",
"delay",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/modules/RequestMgr.js#L371-L426 | train | |
ariatemplates/ariatemplates | src/aria/modules/RequestMgr.js | function (args) {
// var cb = args.cb;
var res = args.res;
var handler = args.requestHandler;
// http error > use process failure
if (res.error) {
handler.processFailure({
error : res.error,
status : re... | javascript | function (args) {
// var cb = args.cb;
var res = args.res;
var handler = args.requestHandler;
// http error > use process failure
if (res.error) {
handler.processFailure({
error : res.error,
status : re... | [
"function",
"(",
"args",
")",
"{",
"// var cb = args.cb;",
"var",
"res",
"=",
"args",
".",
"res",
";",
"var",
"handler",
"=",
"args",
".",
"requestHandler",
";",
"// http error > use process failure",
"if",
"(",
"res",
".",
"error",
")",
"{",
"handler",
".",... | After delay, use handler to parse the message.
@param {Object} args contains path, cb, actionqueuing, session, filterRes, res and potential httpError
@protected | [
"After",
"delay",
"use",
"handler",
"to",
"parse",
"the",
"message",
"."
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/modules/RequestMgr.js#L471-L509 | train | |
ariatemplates/ariatemplates | src/aria/modules/RequestMgr.js | function (res, args) {
var resFromFilters = args.res;
// set final error flag
if (resFromFilters.errorData) {
res.error = true;
}
// resFromFilters as precedence over handler response
if (resFromFilters.data) {
re... | javascript | function (res, args) {
var resFromFilters = args.res;
// set final error flag
if (resFromFilters.errorData) {
res.error = true;
}
// resFromFilters as precedence over handler response
if (resFromFilters.data) {
re... | [
"function",
"(",
"res",
",",
"args",
")",
"{",
"var",
"resFromFilters",
"=",
"args",
".",
"res",
";",
"// set final error flag",
"if",
"(",
"resFromFilters",
".",
"errorData",
")",
"{",
"res",
".",
"error",
"=",
"true",
";",
"}",
"// resFromFilters as preced... | After handler processing, raise error event if needed and call the callback given when the request was issued
@protected
@param {aria.modules.RequestBeans:ProcessedResponse} res final resource for the user
@param {Object} args | [
"After",
"handler",
"processing",
"raise",
"error",
"event",
"if",
"needed",
"and",
"call",
"the",
"callback",
"given",
"when",
"the",
"request",
"was",
"issued"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/modules/RequestMgr.js#L517-L555 | train | |
ariatemplates/ariatemplates | src/aria/modules/RequestMgr.js | function (requestObject, session) {
var typeUtils = ariaUtilsType;
var urlService = requestObject.urlService;
if (!urlService) {
// If no service is set , it takes from app environment
urlService = this.__getUrlService();
}
this... | javascript | function (requestObject, session) {
var typeUtils = ariaUtilsType;
var urlService = requestObject.urlService;
if (!urlService) {
// If no service is set , it takes from app environment
urlService = this.__getUrlService();
}
this... | [
"function",
"(",
"requestObject",
",",
"session",
")",
"{",
"var",
"typeUtils",
"=",
"ariaUtilsType",
";",
"var",
"urlService",
"=",
"requestObject",
".",
"urlService",
";",
"if",
"(",
"!",
"urlService",
")",
"{",
"// If no service is set , it takes from app environ... | Internal function used to build the request URL
@param {Object} requestObject the request object - see. RequestObject bean
@param {Object} session session corresponding to the request (paramName and id)
@return {String} the url | [
"Internal",
"function",
"used",
"to",
"build",
"the",
"request",
"URL"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/modules/RequestMgr.js#L563-L626 | train | |
ariatemplates/ariatemplates | src/aria/modules/RequestMgr.js | function (moduleName, locale, callback) {
var urlServiceCfg = ariaModulesUrlServiceEnvironmentUrlService.getUrlServiceCfg();
Aria.load({
classes : [urlServiceCfg.implementation],
oncomplete : {
fn : this.__onI18nReady,
scop... | javascript | function (moduleName, locale, callback) {
var urlServiceCfg = ariaModulesUrlServiceEnvironmentUrlService.getUrlServiceCfg();
Aria.load({
classes : [urlServiceCfg.implementation],
oncomplete : {
fn : this.__onI18nReady,
scop... | [
"function",
"(",
"moduleName",
",",
"locale",
",",
"callback",
")",
"{",
"var",
"urlServiceCfg",
"=",
"ariaModulesUrlServiceEnvironmentUrlService",
".",
"getUrlServiceCfg",
"(",
")",
";",
"Aria",
".",
"load",
"(",
"{",
"classes",
":",
"[",
"urlServiceCfg",
".",
... | Internal function used to build the request I18N URL. This call is asynchronous as submitJsonRequest. The
reason is that it might have to download the urlService implementation class. The final url is added to the
arguments passed to the callback
<pre>
{
full : // I18n url built by the implementation
}
</pre>
@param ... | [
"Internal",
"function",
"used",
"to",
"build",
"the",
"request",
"I18N",
"URL",
".",
"This",
"call",
"is",
"asynchronous",
"as",
"submitJsonRequest",
".",
"The",
"reason",
"is",
"that",
"it",
"might",
"have",
"to",
"download",
"the",
"urlService",
"implementat... | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/modules/RequestMgr.js#L644-L659 | train | |
ariatemplates/ariatemplates | src/aria/modules/RequestMgr.js | function (args) {
var urlService = this.__getUrlService();
this.$assert(595, urlService != null);
var url = urlService.createI18nUrl(args.moduleName, this.session.id, args.locale);
// Add the global parameters
url = this.__appendGlobalParams(url, this._param... | javascript | function (args) {
var urlService = this.__getUrlService();
this.$assert(595, urlService != null);
var url = urlService.createI18nUrl(args.moduleName, this.session.id, args.locale);
// Add the global parameters
url = this.__appendGlobalParams(url, this._param... | [
"function",
"(",
"args",
")",
"{",
"var",
"urlService",
"=",
"this",
".",
"__getUrlService",
"(",
")",
";",
"this",
".",
"$assert",
"(",
"595",
",",
"urlService",
"!=",
"null",
")",
";",
"var",
"url",
"=",
"urlService",
".",
"createI18nUrl",
"(",
"args... | Callback for createI18nUrl. It is called when the urlService implementation classpath is downloaded
@param {Object} args Arguments passed to the Aria.load
@private | [
"Callback",
"for",
"createI18nUrl",
".",
"It",
"is",
"called",
"when",
"the",
"urlService",
"implementation",
"classpath",
"is",
"downloaded"
] | 7ed5d065818ae159bf361c9dfb209b1cf3883c90 | https://github.com/ariatemplates/ariatemplates/blob/7ed5d065818ae159bf361c9dfb209b1cf3883c90/src/aria/modules/RequestMgr.js#L666-L682 | 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.