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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
SAP/openui5 | lib/jsdoc/transform-apijson-for-sdk.js | function ({name, type, className, text=name, local=false, hrefAppend=""}) {
let sLink;
// handling module's
if (className !== undefined && (/^module:/.test(name) || /^module:/.test(className))) {
name = name.replace(/^module:/, "");
}
name = encodeURIComponent(name);
className = encodeURIComponent(clas... | javascript | function ({name, type, className, text=name, local=false, hrefAppend=""}) {
let sLink;
// handling module's
if (className !== undefined && (/^module:/.test(name) || /^module:/.test(className))) {
name = name.replace(/^module:/, "");
}
name = encodeURIComponent(name);
className = encodeURIComponent(clas... | [
"function",
"(",
"{",
"name",
",",
"type",
",",
"className",
",",
"text",
"=",
"name",
",",
"local",
"=",
"false",
",",
"hrefAppend",
"=",
"\"\"",
"}",
")",
"{",
"let",
"sLink",
";",
"// handling module's",
"if",
"(",
"className",
"!==",
"undefined",
"... | Creates a html link
@param {string} name
@param {string} type
@param {string} className
@param {string} [text=name] by default if no text is provided the name will be used
@param {boolean} [local=false]
@param {string} [hrefAppend=""]
@returns {string} link | [
"Creates",
"a",
"html",
"link"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/transform-apijson-for-sdk.js#L1394-L1417 | train | |
SAP/openui5 | lib/jsdoc/transform-apijson-for-sdk.js | function (sDescription, aReferences) {
var iLen,
i;
// format references
if (aReferences && aReferences.length > 0) {
sDescription += "<br><br><span>Documentation links:</span><ul>";
iLen = aReferences.length;
for (i = 0; i < iLen; i++) {
// We treat references as links but as they may n... | javascript | function (sDescription, aReferences) {
var iLen,
i;
// format references
if (aReferences && aReferences.length > 0) {
sDescription += "<br><br><span>Documentation links:</span><ul>";
iLen = aReferences.length;
for (i = 0; i < iLen; i++) {
// We treat references as links but as they may n... | [
"function",
"(",
"sDescription",
",",
"aReferences",
")",
"{",
"var",
"iLen",
",",
"i",
";",
"// format references",
"if",
"(",
"aReferences",
"&&",
"aReferences",
".",
"length",
">",
"0",
")",
"{",
"sDescription",
"+=",
"\"<br><br><span>Documentation links:</span... | Formatter for Overview section
@param {string} sDescription - Class about description
@param {array} aReferences - References
@returns {string} - formatted text block | [
"Formatter",
"for",
"Overview",
"section"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/transform-apijson-for-sdk.js#L1610-L1634 | train | |
SAP/openui5 | lib/jsdoc/transform-apijson-for-sdk.js | function (description, deprecatedText, deprecatedSince) {
if (!description && !deprecatedText && !deprecatedSince) {
return "";
}
var result = description || "";
if (deprecatedSince || deprecatedText) {
// Note: sapUiDocumentationDeprecated - transformed to sapUiDeprecated to keep json file size l... | javascript | function (description, deprecatedText, deprecatedSince) {
if (!description && !deprecatedText && !deprecatedSince) {
return "";
}
var result = description || "";
if (deprecatedSince || deprecatedText) {
// Note: sapUiDocumentationDeprecated - transformed to sapUiDeprecated to keep json file size l... | [
"function",
"(",
"description",
",",
"deprecatedText",
",",
"deprecatedSince",
")",
"{",
"if",
"(",
"!",
"description",
"&&",
"!",
"deprecatedText",
"&&",
"!",
"deprecatedSince",
")",
"{",
"return",
"\"\"",
";",
"}",
"var",
"result",
"=",
"description",
"||"... | Formats the description of the property
@param description - the description of the property
@param deprecatedText - the text explaining this property is deprecated
@param deprecatedSince - the version when this property was deprecated
@returns string - the formatted description | [
"Formats",
"the",
"description",
"of",
"the",
"property"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/transform-apijson-for-sdk.js#L1643-L1661 | train | |
SAP/openui5 | lib/jsdoc/transform-apijson-for-sdk.js | function (sSince, sDescription, sEntityType) {
var aResult;
// Build deprecation message
// Note: there may be no since or no description text available
aResult = ["Deprecated"];
if (sSince) {
aResult.push(" as of version " + sSince);
}
if (sDescription) {
// Evaluate code blocks - Handle ... | javascript | function (sSince, sDescription, sEntityType) {
var aResult;
// Build deprecation message
// Note: there may be no since or no description text available
aResult = ["Deprecated"];
if (sSince) {
aResult.push(" as of version " + sSince);
}
if (sDescription) {
// Evaluate code blocks - Handle ... | [
"function",
"(",
"sSince",
",",
"sDescription",
",",
"sEntityType",
")",
"{",
"var",
"aResult",
";",
"// Build deprecation message",
"// Note: there may be no since or no description text available",
"aResult",
"=",
"[",
"\"Deprecated\"",
"]",
";",
"if",
"(",
"sSince",
... | Formats the entity deprecation message and pre-process jsDoc link and code blocks
@param {string} sSince since text
@param {string} sDescription deprecation description text
@param {string} sEntityType string representation of entity type
@returns {string} formatted deprecation message | [
"Formats",
"the",
"entity",
"deprecation",
"message",
"and",
"pre",
"-",
"process",
"jsDoc",
"link",
"and",
"code",
"blocks"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/transform-apijson-for-sdk.js#L1670-L1691 | train | |
SAP/openui5 | lib/jsdoc/transform-apijson-for-sdk.js | function (oSymbol, bCalledOnConstructor) {
var bHeaderDocuLinkFound = false,
bUXGuidelinesLinkFound = false,
aReferences = [],
entity = bCalledOnConstructor? oSymbol.constructor.references : oSymbol.references;
const UX_GUIDELINES_BASE_URL = "https://experience.sap.com/fiori-design-web/";
if (ent... | javascript | function (oSymbol, bCalledOnConstructor) {
var bHeaderDocuLinkFound = false,
bUXGuidelinesLinkFound = false,
aReferences = [],
entity = bCalledOnConstructor? oSymbol.constructor.references : oSymbol.references;
const UX_GUIDELINES_BASE_URL = "https://experience.sap.com/fiori-design-web/";
if (ent... | [
"function",
"(",
"oSymbol",
",",
"bCalledOnConstructor",
")",
"{",
"var",
"bHeaderDocuLinkFound",
"=",
"false",
",",
"bUXGuidelinesLinkFound",
"=",
"false",
",",
"aReferences",
"=",
"[",
"]",
",",
"entity",
"=",
"bCalledOnConstructor",
"?",
"oSymbol",
".",
"cons... | Pre-process and modify references
@param {object} oSymbol control data object which will be modified
@private | [
"Pre",
"-",
"process",
"and",
"modify",
"references"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/transform-apijson-for-sdk.js#L1698-L1766 | train | |
SAP/openui5 | lib/jsdoc/transform-apijson-for-sdk.js | function(oEntity) {
if (oEntity.references && Array.isArray(oEntity.references)) {
oEntity.references = oEntity.references.map(sReference => {
return `<li>${sReference}</li>`;
});
if (!oEntity.description) {
// If there is no method description - references should be the first line of it
o... | javascript | function(oEntity) {
if (oEntity.references && Array.isArray(oEntity.references)) {
oEntity.references = oEntity.references.map(sReference => {
return `<li>${sReference}</li>`;
});
if (!oEntity.description) {
// If there is no method description - references should be the first line of it
o... | [
"function",
"(",
"oEntity",
")",
"{",
"if",
"(",
"oEntity",
".",
"references",
"&&",
"Array",
".",
"isArray",
"(",
"oEntity",
".",
"references",
")",
")",
"{",
"oEntity",
".",
"references",
"=",
"oEntity",
".",
"references",
".",
"map",
"(",
"sReference"... | Manage References, to apply as an unordered list in the description
@param {object} oEntity control data object which will be modified
@private | [
"Manage",
"References",
"to",
"apply",
"as",
"an",
"unordered",
"list",
"in",
"the",
"description"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/transform-apijson-for-sdk.js#L1773-L1786 | train | |
SAP/openui5 | lib/jsdoc/transform-apijson-for-sdk.js | function (aMethods) {
var fnCreateTypesArr = function (sTypes) {
return sTypes.split("|").map(function (sType) {
return {value: sType}
});
};
var fnExtractParameterProperties = function (oParameter, aParameters, iDepth, aPhoneName) {
if (oParameter.parameterProperties) {
Object.keys(oPara... | javascript | function (aMethods) {
var fnCreateTypesArr = function (sTypes) {
return sTypes.split("|").map(function (sType) {
return {value: sType}
});
};
var fnExtractParameterProperties = function (oParameter, aParameters, iDepth, aPhoneName) {
if (oParameter.parameterProperties) {
Object.keys(oPara... | [
"function",
"(",
"aMethods",
")",
"{",
"var",
"fnCreateTypesArr",
"=",
"function",
"(",
"sTypes",
")",
"{",
"return",
"sTypes",
".",
"split",
"(",
"\"|\"",
")",
".",
"map",
"(",
"function",
"(",
"sType",
")",
"{",
"return",
"{",
"value",
":",
"sType",
... | Adjusts methods info so that it can be easily displayed in a table
@param aMethods - the methods array initially coming from the server | [
"Adjusts",
"methods",
"info",
"so",
"that",
"it",
"can",
"be",
"easily",
"displayed",
"in",
"a",
"table"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/transform-apijson-for-sdk.js#L1796-L1865 | train | |
SAP/openui5 | lib/jsdoc/transform-apijson-for-sdk.js | function (aEvents) {
var fnExtractParameterProperties = function (oParameter, aParameters, iDepth, aPhoneName) {
if (oParameter.parameterProperties) {
Object.keys(oParameter.parameterProperties).forEach(function (sProperty) {
var oProperty = oParameter.parameterProperties[sProperty],
sPhoneType... | javascript | function (aEvents) {
var fnExtractParameterProperties = function (oParameter, aParameters, iDepth, aPhoneName) {
if (oParameter.parameterProperties) {
Object.keys(oParameter.parameterProperties).forEach(function (sProperty) {
var oProperty = oParameter.parameterProperties[sProperty],
sPhoneType... | [
"function",
"(",
"aEvents",
")",
"{",
"var",
"fnExtractParameterProperties",
"=",
"function",
"(",
"oParameter",
",",
"aParameters",
",",
"iDepth",
",",
"aPhoneName",
")",
"{",
"if",
"(",
"oParameter",
".",
"parameterProperties",
")",
"{",
"Object",
".",
"keys... | Adjusts events info so that it can be easily displayed in a table
@param {Array} aEvents - the events array initially coming from the server | [
"Adjusts",
"events",
"info",
"so",
"that",
"it",
"can",
"be",
"easily",
"displayed",
"in",
"a",
"table"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/transform-apijson-for-sdk.js#L1871-L1915 | train | |
SAP/openui5 | lib/jsdoc/transform-apijson-for-sdk.js | function (aParameters) {
// New array to hold modified parameters
var aNodes = [],
processNode = function (oNode, sPhoneName, iDepth, aNodes) {
// Handle phone name
oNode.phoneName = sPhoneName ? [sPhoneName, oNode.name].join(".") : oNode.name;
// Depth
oNode.depth = iDepth;
// Add ... | javascript | function (aParameters) {
// New array to hold modified parameters
var aNodes = [],
processNode = function (oNode, sPhoneName, iDepth, aNodes) {
// Handle phone name
oNode.phoneName = sPhoneName ? [sPhoneName, oNode.name].join(".") : oNode.name;
// Depth
oNode.depth = iDepth;
// Add ... | [
"function",
"(",
"aParameters",
")",
"{",
"// New array to hold modified parameters",
"var",
"aNodes",
"=",
"[",
"]",
",",
"processNode",
"=",
"function",
"(",
"oNode",
",",
"sPhoneName",
",",
"iDepth",
",",
"aNodes",
")",
"{",
"// Handle phone name",
"oNode",
"... | Adjusts constructor parameters info so that it can be easily displayed in a table
@param {Array} aParameters - the events array initially coming from the server | [
"Adjusts",
"constructor",
"parameters",
"info",
"so",
"that",
"it",
"can",
"be",
"easily",
"displayed",
"in",
"a",
"table"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/transform-apijson-for-sdk.js#L1921-L1951 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/ODataTreeBindingFlat.js | function (oNode) {
// if there are subnodes added to the current node -> traverse them first (added nodes are at the top, before any children)
if (oNode.addedSubtrees.length > 0 && !oNode.nodeState.collapsed) {
// an added subtree can be either a deep or a flat tree (depending on the addContexts) call
for... | javascript | function (oNode) {
// if there are subnodes added to the current node -> traverse them first (added nodes are at the top, before any children)
if (oNode.addedSubtrees.length > 0 && !oNode.nodeState.collapsed) {
// an added subtree can be either a deep or a flat tree (depending on the addContexts) call
for... | [
"function",
"(",
"oNode",
")",
"{",
"// if there are subnodes added to the current node -> traverse them first (added nodes are at the top, before any children)",
"if",
"(",
"oNode",
".",
"addedSubtrees",
".",
"length",
">",
"0",
"&&",
"!",
"oNode",
".",
"nodeState",
".",
"... | Helper function to iterate all added subtrees of a node. | [
"Helper",
"function",
"to",
"iterate",
"all",
"added",
"subtrees",
"of",
"a",
"node",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/ODataTreeBindingFlat.js#L302-L314 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/ODataTreeBindingFlat.js | function (oNode, oSubtreeHandle) {
var oSubtree = oSubtreeHandle._getSubtree();
if (oSubtreeHandle) {
// subtree is flat
if (Array.isArray(oSubtree)) {
if (oSubtreeHandle._oSubtreeRoot) {
// jump to a certain position in the flat structure and map the nodes
fnTraverseFlatSubtree(oSubtree... | javascript | function (oNode, oSubtreeHandle) {
var oSubtree = oSubtreeHandle._getSubtree();
if (oSubtreeHandle) {
// subtree is flat
if (Array.isArray(oSubtree)) {
if (oSubtreeHandle._oSubtreeRoot) {
// jump to a certain position in the flat structure and map the nodes
fnTraverseFlatSubtree(oSubtree... | [
"function",
"(",
"oNode",
",",
"oSubtreeHandle",
")",
"{",
"var",
"oSubtree",
"=",
"oSubtreeHandle",
".",
"_getSubtree",
"(",
")",
";",
"if",
"(",
"oSubtreeHandle",
")",
"{",
"// subtree is flat",
"if",
"(",
"Array",
".",
"isArray",
"(",
"oSubtree",
")",
"... | Traverses a re-inserted or newly added subtree.
This can be a combination of flat and deep trees.
Decides if the traversal has to branche over to a flat or a deep part of the tree.
@param {object} oNode the parent node
@param {object} the subtree handle, inside there is either a deep or a flat tree stored | [
"Traverses",
"a",
"re",
"-",
"inserted",
"or",
"newly",
"added",
"subtree",
".",
"This",
"can",
"be",
"a",
"combination",
"of",
"flat",
"and",
"deep",
"trees",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/ODataTreeBindingFlat.js#L325-L345 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/ODataTreeBindingFlat.js | function (oNode, bIgnore, oParent, iPositionInParent, oIgnoreRemoveForNode) {
// ignore node if it was already mapped or is removed (except if it was reinserted, denoted by oIgnoreRemoveForNode)
if (!bIgnore) {
if (!oNode.nodeState.removed || oIgnoreRemoveForNode == oNode) {
fnMap(oNode, oRecursionBreake... | javascript | function (oNode, bIgnore, oParent, iPositionInParent, oIgnoreRemoveForNode) {
// ignore node if it was already mapped or is removed (except if it was reinserted, denoted by oIgnoreRemoveForNode)
if (!bIgnore) {
if (!oNode.nodeState.removed || oIgnoreRemoveForNode == oNode) {
fnMap(oNode, oRecursionBreake... | [
"function",
"(",
"oNode",
",",
"bIgnore",
",",
"oParent",
",",
"iPositionInParent",
",",
"oIgnoreRemoveForNode",
")",
"{",
"// ignore node if it was already mapped or is removed (except if it was reinserted, denoted by oIgnoreRemoveForNode)",
"if",
"(",
"!",
"bIgnore",
")",
"{"... | Recursive Tree Traversal
@param {object} oNode the current node
@param {boolean} bIgnore a flag to indicate if the node should be mapped
@param {object} oParent the parent node of oNode
@param {int} iPositionInParent the position of oNode in the children-array of oParent | [
"Recursive",
"Tree",
"Traversal"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/ODataTreeBindingFlat.js#L354-L391 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/ODataTreeBindingFlat.js | function (oNode) {
if (oNode) {
if (oNode.nodeState.selected && !oNode.isArtificial) {
aResultContexts.push(oNode.context);
}
}
} | javascript | function (oNode) {
if (oNode) {
if (oNode.nodeState.selected && !oNode.isArtificial) {
aResultContexts.push(oNode.context);
}
}
} | [
"function",
"(",
"oNode",
")",
"{",
"if",
"(",
"oNode",
")",
"{",
"if",
"(",
"oNode",
".",
"nodeState",
".",
"selected",
"&&",
"!",
"oNode",
".",
"isArtificial",
")",
"{",
"aResultContexts",
".",
"push",
"(",
"oNode",
".",
"context",
")",
";",
"}",
... | collect the indices of all selected nodes | [
"collect",
"the",
"indices",
"of",
"all",
"selected",
"nodes"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/ODataTreeBindingFlat.js#L2217-L2223 | train | |
SAP/openui5 | grunt/config/aliases.js | function(mode) {
if (!mode || (mode !== 'src' && mode !== 'target')) {
mode = 'src';
}
grunt.option('port', 0); // use random port
// listen to the connect server startup
grunt.event.on('connect.*.listening', function(hostname, port) {
// 0.0.0.0 does not work in windows
if (hostname === ... | javascript | function(mode) {
if (!mode || (mode !== 'src' && mode !== 'target')) {
mode = 'src';
}
grunt.option('port', 0); // use random port
// listen to the connect server startup
grunt.event.on('connect.*.listening', function(hostname, port) {
// 0.0.0.0 does not work in windows
if (hostname === ... | [
"function",
"(",
"mode",
")",
"{",
"if",
"(",
"!",
"mode",
"||",
"(",
"mode",
"!==",
"'src'",
"&&",
"mode",
"!==",
"'target'",
")",
")",
"{",
"mode",
"=",
"'src'",
";",
"}",
"grunt",
".",
"option",
"(",
"'port'",
",",
"0",
")",
";",
"// use rando... | QUnit test task | [
"QUnit",
"test",
"task"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/grunt/config/aliases.js#L41-L69 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/zyngascroll.js | function(id) {
var cleared = running[id] != null;
if (cleared) {
running[id] = null;
}
return cleared;
} | javascript | function(id) {
var cleared = running[id] != null;
if (cleared) {
running[id] = null;
}
return cleared;
} | [
"function",
"(",
"id",
")",
"{",
"var",
"cleared",
"=",
"running",
"[",
"id",
"]",
"!=",
"null",
";",
"if",
"(",
"cleared",
")",
"{",
"running",
"[",
"id",
"]",
"=",
"null",
";",
"}",
"return",
"cleared",
";",
"}"
] | Stops the given animation.
@param {Integer} id Unique animation ID
@return {Boolean} Whether the animation was stopped (aka, was running before) | [
"Stops",
"the",
"given",
"animation",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/zyngascroll.js#L182-L189 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/zyngascroll.js | function(left, top, animate) {
var self = this;
var startLeft = self.__isAnimating ? self.__scheduledLeft : self.__scrollLeft;
var startTop = self.__isAnimating ? self.__scheduledTop : self.__scrollTop;
self.scrollTo(startLeft + (left || 0), startTop + (top || 0), animate);
} | javascript | function(left, top, animate) {
var self = this;
var startLeft = self.__isAnimating ? self.__scheduledLeft : self.__scrollLeft;
var startTop = self.__isAnimating ? self.__scheduledTop : self.__scrollTop;
self.scrollTo(startLeft + (left || 0), startTop + (top || 0), animate);
} | [
"function",
"(",
"left",
",",
"top",
",",
"animate",
")",
"{",
"var",
"self",
"=",
"this",
";",
"var",
"startLeft",
"=",
"self",
".",
"__isAnimating",
"?",
"self",
".",
"__scheduledLeft",
":",
"self",
".",
"__scrollLeft",
";",
"var",
"startTop",
"=",
"... | Scroll by the given offset
@param {Number ? 0} left Scroll x-axis by given offset
@param {Number ? 0} top Scroll x-axis by given offset
@param {Boolean ? false} animate Whether to animate the given change | [
"Scroll",
"by",
"the",
"given",
"offset"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/zyngascroll.js#L872-L881 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/routing/async/Targets.js | function (vTargets, vData, sTitleTarget) {
var oSequencePromise = Promise.resolve();
return this._display(vTargets, vData, sTitleTarget, oSequencePromise);
} | javascript | function (vTargets, vData, sTitleTarget) {
var oSequencePromise = Promise.resolve();
return this._display(vTargets, vData, sTitleTarget, oSequencePromise);
} | [
"function",
"(",
"vTargets",
",",
"vData",
",",
"sTitleTarget",
")",
"{",
"var",
"oSequencePromise",
"=",
"Promise",
".",
"resolve",
"(",
")",
";",
"return",
"this",
".",
"_display",
"(",
"vTargets",
",",
"vData",
",",
"sTitleTarget",
",",
"oSequencePromise"... | Creates a view and puts it in an aggregation of the specified control.
@param {string|string[]} vTargets the key of the target as specified in the {@link #constructor}. To display multiple targets you may also pass an array of keys.
@param {object} [vData] an object that will be passed to the display event in the data... | [
"Creates",
"a",
"view",
"and",
"puts",
"it",
"in",
"an",
"aggregation",
"of",
"the",
"specified",
"control",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/routing/async/Targets.js#L23-L26 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/routing/async/Targets.js | function (oTargetInfo, vData, oSequencePromise, oTargetCreateInfo) {
var sName = oTargetInfo.name,
oTarget = this.getTarget(sName);
if (oTarget !== undefined) {
return oTarget._display(vData, oSequencePromise, oTargetCreateInfo);
} else {
var sErrorMessage = "The target with the name \"" + sName +... | javascript | function (oTargetInfo, vData, oSequencePromise, oTargetCreateInfo) {
var sName = oTargetInfo.name,
oTarget = this.getTarget(sName);
if (oTarget !== undefined) {
return oTarget._display(vData, oSequencePromise, oTargetCreateInfo);
} else {
var sErrorMessage = "The target with the name \"" + sName +... | [
"function",
"(",
"oTargetInfo",
",",
"vData",
",",
"oSequencePromise",
",",
"oTargetCreateInfo",
")",
"{",
"var",
"sName",
"=",
"oTargetInfo",
".",
"name",
",",
"oTarget",
"=",
"this",
".",
"getTarget",
"(",
"sName",
")",
";",
"if",
"(",
"oTarget",
"!==",
... | Displays a single target
@param {string} sName name of the single target
@param {any} vData an object that will be passed to the display event in the data property.
@param {Promise} oSequencePromise the promise which for chaining
@param {object} [oTargetCreateInfo] the object which contains extra information for the c... | [
"Displays",
"a",
"single",
"target"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/routing/async/Targets.js#L86-L100 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/hyphenation/Hyphenation.js | initializeLanguage | function initializeLanguage(sLanguage, oConfig, resolve) {
Log.info(
"[UI5 Hyphenation] Initializing third-party module for language " + getLanguageDisplayName(sLanguage),
"sap.ui.core.hyphenation.Hyphenation.initialize()"
);
window.hyphenopoly.initializeLanguage(oConfig)
.then(onLanguageInitialized.bin... | javascript | function initializeLanguage(sLanguage, oConfig, resolve) {
Log.info(
"[UI5 Hyphenation] Initializing third-party module for language " + getLanguageDisplayName(sLanguage),
"sap.ui.core.hyphenation.Hyphenation.initialize()"
);
window.hyphenopoly.initializeLanguage(oConfig)
.then(onLanguageInitialized.bin... | [
"function",
"initializeLanguage",
"(",
"sLanguage",
",",
"oConfig",
",",
"resolve",
")",
"{",
"Log",
".",
"info",
"(",
"\"[UI5 Hyphenation] Initializing third-party module for language \"",
"+",
"getLanguageDisplayName",
"(",
"sLanguage",
")",
",",
"\"sap.ui.core.hyphenatio... | Calls Hyphenopoly to initialize a language.
Loads language-specific resources.
@param {string} sLanguage What language to initialize
@param {map} oConfig What config to sent to Hyphenopoly
@param {function} resolve Callback to resolve the promise created on initialize
@private | [
"Calls",
"Hyphenopoly",
"to",
"initialize",
"a",
"language",
".",
"Loads",
"language",
"-",
"specific",
"resources",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/hyphenation/Hyphenation.js#L133-L141 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/hyphenation/Hyphenation.js | onLanguageInitialized | function onLanguageInitialized(sLanguage, resolve, hyphenateMethod) {
oHyphenateMethods[sLanguage] = hyphenateMethod;
oHyphenationInstance.bIsInitialized = true;
if (aLanguagesQueue.length > 0) {
aLanguagesQueue.forEach(function (oElement) {
initializeLanguage(oElement.sLanguage, oElement.oConfig, oElement... | javascript | function onLanguageInitialized(sLanguage, resolve, hyphenateMethod) {
oHyphenateMethods[sLanguage] = hyphenateMethod;
oHyphenationInstance.bIsInitialized = true;
if (aLanguagesQueue.length > 0) {
aLanguagesQueue.forEach(function (oElement) {
initializeLanguage(oElement.sLanguage, oElement.oConfig, oElement... | [
"function",
"onLanguageInitialized",
"(",
"sLanguage",
",",
"resolve",
",",
"hyphenateMethod",
")",
"{",
"oHyphenateMethods",
"[",
"sLanguage",
"]",
"=",
"hyphenateMethod",
";",
"oHyphenationInstance",
".",
"bIsInitialized",
"=",
"true",
";",
"if",
"(",
"aLanguagesQ... | A callback for when language initialization is ready.
@param {string} sLanguage What language was initialized
@param {function} resolve Callback to resolve the promise created on initialize
@param {string} hyphenateMethod Is it asm or wasm
@private | [
"A",
"callback",
"for",
"when",
"language",
"initialization",
"is",
"ready",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/hyphenation/Hyphenation.js#L169-L182 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/hyphenation/Hyphenation.js | prepareConfig | function prepareConfig(sLanguage, oConfig) {
//Creating default configuration
var oConfigurationForLanguage = {
"require": [sLanguage],
"hyphen": "\u00AD",
"leftmin": 3, // The minimum of chars to remain on the old line.
"rightmin": 3,// The minimum of chars to go on the new line
"compound": "all", /... | javascript | function prepareConfig(sLanguage, oConfig) {
//Creating default configuration
var oConfigurationForLanguage = {
"require": [sLanguage],
"hyphen": "\u00AD",
"leftmin": 3, // The minimum of chars to remain on the old line.
"rightmin": 3,// The minimum of chars to go on the new line
"compound": "all", /... | [
"function",
"prepareConfig",
"(",
"sLanguage",
",",
"oConfig",
")",
"{",
"//Creating default configuration",
"var",
"oConfigurationForLanguage",
"=",
"{",
"\"require\"",
":",
"[",
"sLanguage",
"]",
",",
"\"hyphen\"",
":",
"\"\\u00AD\"",
",",
"\"leftmin\"",
":",
"3",... | Transforms the given config so it can be sent to Hyphenopoly.
@param {string} sLanguage The language for which a config is prepared.
@param {map} oConfig Object map with configuration
@returns {Object} {{require: [*], hyphen: string, path: (string|*)}}
@private | [
"Transforms",
"the",
"given",
"config",
"so",
"it",
"can",
"be",
"sent",
"to",
"Hyphenopoly",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/hyphenation/Hyphenation.js#L192-L233 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/hyphenation/Hyphenation.js | getLanguage | function getLanguage(sLang) {
var oLocale;
if (sLang) {
oLocale = new Locale(sLang);
} else {
oLocale = sap.ui.getCore().getConfiguration().getLocale();
}
var sLanguage = oLocale.getLanguage().toLowerCase();
// adjustment of the language to corresponds to Hyphenopoly pattern files (.hpb files)
swi... | javascript | function getLanguage(sLang) {
var oLocale;
if (sLang) {
oLocale = new Locale(sLang);
} else {
oLocale = sap.ui.getCore().getConfiguration().getLocale();
}
var sLanguage = oLocale.getLanguage().toLowerCase();
// adjustment of the language to corresponds to Hyphenopoly pattern files (.hpb files)
swi... | [
"function",
"getLanguage",
"(",
"sLang",
")",
"{",
"var",
"oLocale",
";",
"if",
"(",
"sLang",
")",
"{",
"oLocale",
"=",
"new",
"Locale",
"(",
"sLang",
")",
";",
"}",
"else",
"{",
"oLocale",
"=",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
".",
"g... | Gets global language code or the given language code.
@param {string} [sLang] The language to get. If left empty - the global application language will be returned
@returns {string} The language code
@private | [
"Gets",
"global",
"language",
"code",
"or",
"the",
"given",
"language",
"code",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/hyphenation/Hyphenation.js#L348-L375 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/hyphenation/Hyphenation.js | getLanguageDisplayName | function getLanguageDisplayName(sPatternName) {
var sLang = getLanguageFromPattern(sPatternName);
if (mLanguageNamesInEnglish.hasOwnProperty(sLang)) {
return "'" + mLanguageNamesInEnglish[sLang] + "' (code:'" + sLang + "')";
} else {
return "'" + sLang + "'";
}
} | javascript | function getLanguageDisplayName(sPatternName) {
var sLang = getLanguageFromPattern(sPatternName);
if (mLanguageNamesInEnglish.hasOwnProperty(sLang)) {
return "'" + mLanguageNamesInEnglish[sLang] + "' (code:'" + sLang + "')";
} else {
return "'" + sLang + "'";
}
} | [
"function",
"getLanguageDisplayName",
"(",
"sPatternName",
")",
"{",
"var",
"sLang",
"=",
"getLanguageFromPattern",
"(",
"sPatternName",
")",
";",
"if",
"(",
"mLanguageNamesInEnglish",
".",
"hasOwnProperty",
"(",
"sLang",
")",
")",
"{",
"return",
"\"'\"",
"+",
"... | Gets a human readable english name for the language.
If not found - returns a string with the language code.
@param {string} sPatternName The pattern name (hpb file name)
@return {string} Returns a human readable english name for the language | [
"Gets",
"a",
"human",
"readable",
"english",
"name",
"for",
"the",
"language",
".",
"If",
"not",
"found",
"-",
"returns",
"a",
"string",
"with",
"the",
"language",
"code",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/hyphenation/Hyphenation.js#L398-L406 | train |
SAP/openui5 | src/sap.m/src/sap/m/Support.js | line | function line(buffer, right, border, label, content) {
buffer.push("<tr class='sapUiSelectable'><td class='sapUiSupportTechInfoBorder sapUiSelectable'><label class='sapUiSupportLabel sapUiSelectable'>", encodeXML(label), "</label><br>");
var ctnt = content;
if (jQuery.isFunction(content)) {
ctnt = cont... | javascript | function line(buffer, right, border, label, content) {
buffer.push("<tr class='sapUiSelectable'><td class='sapUiSupportTechInfoBorder sapUiSelectable'><label class='sapUiSupportLabel sapUiSelectable'>", encodeXML(label), "</label><br>");
var ctnt = content;
if (jQuery.isFunction(content)) {
ctnt = cont... | [
"function",
"line",
"(",
"buffer",
",",
"right",
",",
"border",
",",
"label",
",",
"content",
")",
"{",
"buffer",
".",
"push",
"(",
"\"<tr class='sapUiSelectable'><td class='sapUiSupportTechInfoBorder sapUiSelectable'><label class='sapUiSupportLabel sapUiSelectable'>\"",
",",
... | variable used to open the support dialog on windows phone copied from core | [
"variable",
"used",
"to",
"open",
"the",
"support",
"dialog",
"on",
"windows",
"phone",
"copied",
"from",
"core"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/Support.js#L79-L87 | train |
SAP/openui5 | src/sap.m/src/sap/m/Support.js | setupDialog | function setupDialog() {
// setup e2e values as log level and content
if (dialog.traceXml) {
dialog.$(e2eTraceConst.taContent).text(dialog.traceXml);
}
if (dialog.e2eLogLevel) {
dialog.$(e2eTraceConst.selLevel).val(dialog.e2eLogLevel);
}
fillPanelContent(controlIDs.dvLoadedModules, oD... | javascript | function setupDialog() {
// setup e2e values as log level and content
if (dialog.traceXml) {
dialog.$(e2eTraceConst.taContent).text(dialog.traceXml);
}
if (dialog.e2eLogLevel) {
dialog.$(e2eTraceConst.selLevel).val(dialog.e2eLogLevel);
}
fillPanelContent(controlIDs.dvLoadedModules, oD... | [
"function",
"setupDialog",
"(",
")",
"{",
"// setup e2e values as log level and content",
"if",
"(",
"dialog",
".",
"traceXml",
")",
"{",
"dialog",
".",
"$",
"(",
"e2eTraceConst",
".",
"taContent",
")",
".",
"text",
"(",
"dialog",
".",
"traceXml",
")",
";",
... | setup dialog elements and bind some events | [
"setup",
"dialog",
"elements",
"and",
"bind",
"some",
"events"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/Support.js#L208-L238 | train |
SAP/openui5 | src/sap.m/src/sap/m/Support.js | getDialog | function getDialog() {
if (dialog) {
return dialog;
}
var Dialog = sap.ui.requireSync("sap/m/Dialog");
var Button = sap.ui.requireSync("sap/m/Button");
sap.ui.requireSync("sap/ui/core/HTML");
sap.ui.requireSync("sap/m/MessageToast");
sap.ui.requireSync("sap/ui/core/support/trace/E2eTra... | javascript | function getDialog() {
if (dialog) {
return dialog;
}
var Dialog = sap.ui.requireSync("sap/m/Dialog");
var Button = sap.ui.requireSync("sap/m/Button");
sap.ui.requireSync("sap/ui/core/HTML");
sap.ui.requireSync("sap/m/MessageToast");
sap.ui.requireSync("sap/ui/core/support/trace/E2eTra... | [
"function",
"getDialog",
"(",
")",
"{",
"if",
"(",
"dialog",
")",
"{",
"return",
"dialog",
";",
"}",
"var",
"Dialog",
"=",
"sap",
".",
"ui",
".",
"requireSync",
"(",
"\"sap/m/Dialog\"",
")",
";",
"var",
"Button",
"=",
"sap",
".",
"ui",
".",
"requireS... | get or create dialog instance and return | [
"get",
"or",
"create",
"dialog",
"instance",
"and",
"return"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/Support.js#L241-L274 | train |
SAP/openui5 | src/sap.m/src/sap/m/Support.js | onTouchStart | function onTouchStart(oEvent) {
if (oEvent.touches) {
var currentTouches = oEvent.touches.length;
if (Device.browser.mobile &&
(Device.browser.name === Device.browser.BROWSER.INTERNET_EXPLORER ||// TODO remove after 1.62 version
Device.browser.name === Device.browser.BROWSER.EDGE)) {
wi... | javascript | function onTouchStart(oEvent) {
if (oEvent.touches) {
var currentTouches = oEvent.touches.length;
if (Device.browser.mobile &&
(Device.browser.name === Device.browser.BROWSER.INTERNET_EXPLORER ||// TODO remove after 1.62 version
Device.browser.name === Device.browser.BROWSER.EDGE)) {
wi... | [
"function",
"onTouchStart",
"(",
"oEvent",
")",
"{",
"if",
"(",
"oEvent",
".",
"touches",
")",
"{",
"var",
"currentTouches",
"=",
"oEvent",
".",
"touches",
".",
"length",
";",
"if",
"(",
"Device",
".",
"browser",
".",
"mobile",
"&&",
"(",
"Device",
"."... | function is triggered when a touch is detected | [
"function",
"is",
"triggered",
"when",
"a",
"touch",
"is",
"detected"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/Support.js#L277-L308 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/Renderer.js | createExtendedRenderer | function createExtendedRenderer(sName, oRendererInfo) {
assert(this != null, 'BaseRenderer must be a non-null object');
assert(typeof sName === 'string' && sName, 'Renderer.extend must be called with a non-empty name for the new renderer');
assert(oRendererInfo == null ||
(isPlainObject(oRendererInfo)
&& ... | javascript | function createExtendedRenderer(sName, oRendererInfo) {
assert(this != null, 'BaseRenderer must be a non-null object');
assert(typeof sName === 'string' && sName, 'Renderer.extend must be called with a non-empty name for the new renderer');
assert(oRendererInfo == null ||
(isPlainObject(oRendererInfo)
&& ... | [
"function",
"createExtendedRenderer",
"(",
"sName",
",",
"oRendererInfo",
")",
"{",
"assert",
"(",
"this",
"!=",
"null",
",",
"'BaseRenderer must be a non-null object'",
")",
";",
"assert",
"(",
"typeof",
"sName",
"===",
"'string'",
"&&",
"sName",
",",
"'Renderer.... | Helper to create a new renderer by extending an existing one.
@this {sap.ui.core.Renderer} The base renderer to extend
@param {string} sName Global name of the new renderer
@param {object} oRendererInfo Methods and static properties of the new renderer
@returns {object} New static renderer class
@private | [
"Helper",
"to",
"create",
"a",
"new",
"renderer",
"by",
"extending",
"an",
"existing",
"one",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Renderer.js#L38-L56 | train |
SAP/openui5 | src/sap.ui.core/src/sap/base/i18n/ResourceBundle.js | nextFallbackLocale | function nextFallbackLocale(sLocale) {
// there is no fallback for the 'raw' locale or for null/undefined
if ( !sLocale ) {
return null;
}
// special (legacy) handling for zh_HK: try zh_TW (for Traditional Chinese) first before falling back to 'zh'
if ( sLocale === "zh_HK" ) {
return "zh_TW";
}
/... | javascript | function nextFallbackLocale(sLocale) {
// there is no fallback for the 'raw' locale or for null/undefined
if ( !sLocale ) {
return null;
}
// special (legacy) handling for zh_HK: try zh_TW (for Traditional Chinese) first before falling back to 'zh'
if ( sLocale === "zh_HK" ) {
return "zh_TW";
}
/... | [
"function",
"nextFallbackLocale",
"(",
"sLocale",
")",
"{",
"// there is no fallback for the 'raw' locale or for null/undefined",
"if",
"(",
"!",
"sLocale",
")",
"{",
"return",
"null",
";",
"}",
"// special (legacy) handling for zh_HK: try zh_TW (for Traditional Chinese) first befo... | Calculate the next fallback locale for the given locale.
Note: always keep this in sync with the fallback mechanism in Java, ABAP (MIME & BSP)
resource handler (Java: Peter M., MIME: Sebastian A., BSP: Silke A.)
@param {string} sLocale Locale string in Java format (underscores) or null
@returns {string|null} Next fall... | [
"Calculate",
"the",
"next",
"fallback",
"locale",
"for",
"the",
"given",
"locale",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/base/i18n/ResourceBundle.js#L129-L150 | train |
SAP/openui5 | src/sap.ui.core/src/sap/base/i18n/ResourceBundle.js | splitUrl | function splitUrl(sUrl) {
var m = rUrl.exec(sUrl);
if ( !m || A_VALID_FILE_TYPES.indexOf( m[2] ) < 0 ) {
throw new Error("resource URL '" + sUrl + "' has unknown type (should be one of " + A_VALID_FILE_TYPES.join(",") + ")");
}
return { url : sUrl, prefix : m[1], ext : m[2], query: m[4], hash: (m[5] || ""), ... | javascript | function splitUrl(sUrl) {
var m = rUrl.exec(sUrl);
if ( !m || A_VALID_FILE_TYPES.indexOf( m[2] ) < 0 ) {
throw new Error("resource URL '" + sUrl + "' has unknown type (should be one of " + A_VALID_FILE_TYPES.join(",") + ")");
}
return { url : sUrl, prefix : m[1], ext : m[2], query: m[4], hash: (m[5] || ""), ... | [
"function",
"splitUrl",
"(",
"sUrl",
")",
"{",
"var",
"m",
"=",
"rUrl",
".",
"exec",
"(",
"sUrl",
")",
";",
"if",
"(",
"!",
"m",
"||",
"A_VALID_FILE_TYPES",
".",
"indexOf",
"(",
"m",
"[",
"2",
"]",
")",
"<",
"0",
")",
"{",
"throw",
"new",
"Erro... | Helper to split a URL with the above regex.
Either returns an object with the parts or undefined.
@param {string} sUrl URL to analyze / split into pieces.
@returns {object} an object with properties for the individual URL parts | [
"Helper",
"to",
"split",
"a",
"URL",
"with",
"the",
"above",
"regex",
".",
"Either",
"returns",
"an",
"object",
"with",
"the",
"parts",
"or",
"undefined",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/base/i18n/ResourceBundle.js#L197-L203 | train |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js | _isComplexType | function _isComplexType (mProperty) {
if (mProperty && mProperty.type) {
if (mProperty.type.toLowerCase().indexOf("edm") !== 0) {
return true;
}
}
return false;
} | javascript | function _isComplexType (mProperty) {
if (mProperty && mProperty.type) {
if (mProperty.type.toLowerCase().indexOf("edm") !== 0) {
return true;
}
}
return false;
} | [
"function",
"_isComplexType",
"(",
"mProperty",
")",
"{",
"if",
"(",
"mProperty",
"&&",
"mProperty",
".",
"type",
")",
"{",
"if",
"(",
"mProperty",
".",
"type",
".",
"toLowerCase",
"(",
")",
".",
"indexOf",
"(",
"\"edm\"",
")",
"!==",
"0",
")",
"{",
... | Is field using a complex type
@param {Object} mProperty - property from entityType
@returns {Boolean} - Returns true if property is using a complex type | [
"Is",
"field",
"using",
"a",
"complex",
"type"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L52-L59 | train |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js | _getODataPropertiesOfModel | function _getODataPropertiesOfModel(oElement, sAggregationName) {
var oModel = oElement.getModel();
var mData = {
property: [],
navigationProperty: [],
navigationEntityNames: []
};
if (oModel) {
var sModelName = oModel.getMetadata().getName();
if (sModelName === "sap.ui.model.odata.ODataModel" |... | javascript | function _getODataPropertiesOfModel(oElement, sAggregationName) {
var oModel = oElement.getModel();
var mData = {
property: [],
navigationProperty: [],
navigationEntityNames: []
};
if (oModel) {
var sModelName = oModel.getMetadata().getName();
if (sModelName === "sap.ui.model.odata.ODataModel" |... | [
"function",
"_getODataPropertiesOfModel",
"(",
"oElement",
",",
"sAggregationName",
")",
"{",
"var",
"oModel",
"=",
"oElement",
".",
"getModel",
"(",
")",
";",
"var",
"mData",
"=",
"{",
"property",
":",
"[",
"]",
",",
"navigationProperty",
":",
"[",
"]",
"... | Fetching all available properties of the Element's Model
@param {sap.ui.core.Control} oElement - Control instance
@param {string} sAggregationName - aggregation name of the action
@return {Promise} - Returns Promise with results
@private | [
"Fetching",
"all",
"available",
"properties",
"of",
"the",
"Element",
"s",
"Model"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L157-L217 | train |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js | _checkForDuplicateLabels | function _checkForDuplicateLabels(oInvisibleElement, aODataProperties) {
return aODataProperties.some(function(oDataProperty) {
return oDataProperty.fieldLabel === oInvisibleElement.fieldLabel;
});
} | javascript | function _checkForDuplicateLabels(oInvisibleElement, aODataProperties) {
return aODataProperties.some(function(oDataProperty) {
return oDataProperty.fieldLabel === oInvisibleElement.fieldLabel;
});
} | [
"function",
"_checkForDuplicateLabels",
"(",
"oInvisibleElement",
",",
"aODataProperties",
")",
"{",
"return",
"aODataProperties",
".",
"some",
"(",
"function",
"(",
"oDataProperty",
")",
"{",
"return",
"oDataProperty",
".",
"fieldLabel",
"===",
"oInvisibleElement",
"... | check for duplicate labels to later add the referenced complexTypeName if available | [
"check",
"for",
"duplicate",
"labels",
"to",
"later",
"add",
"the",
"referenced",
"complexTypeName",
"if",
"available"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L301-L305 | train |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js | _hasNavigationBindings | function _hasNavigationBindings(aBindingPaths, aNavigationProperties, aNavigationEntityNames, aBindingContextPaths) {
var bNavigationInBindingPath = _hasBindings(aBindingPaths)
&& aBindingPaths.some(function (sPath) {
var aParts = sPath.trim().replace(/^\//gi, '').split('/');
if (aParts.length > 1) {
... | javascript | function _hasNavigationBindings(aBindingPaths, aNavigationProperties, aNavigationEntityNames, aBindingContextPaths) {
var bNavigationInBindingPath = _hasBindings(aBindingPaths)
&& aBindingPaths.some(function (sPath) {
var aParts = sPath.trim().replace(/^\//gi, '').split('/');
if (aParts.length > 1) {
... | [
"function",
"_hasNavigationBindings",
"(",
"aBindingPaths",
",",
"aNavigationProperties",
",",
"aNavigationEntityNames",
",",
"aBindingContextPaths",
")",
"{",
"var",
"bNavigationInBindingPath",
"=",
"_hasBindings",
"(",
"aBindingPaths",
")",
"&&",
"aBindingPaths",
".",
"... | Checks if array of paths contains bindings through navigation
@param {Array.<String>} aBindingPaths - Array of collected binding paths
@param {Array.<Object>} aNavigationProperties - Array of Navigation Properties
@param {Array.<String>} aNavigationEntityNames - Array of Navigation Entity Names
@param {Array.<String>}... | [
"Checks",
"if",
"array",
"of",
"paths",
"contains",
"bindings",
"through",
"navigation"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L327-L344 | train |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js | _findODataProperty | function _findODataProperty(aBindingPaths, aODataProperties) {
return aODataProperties.filter(function (oDataProperty) {
return aBindingPaths.indexOf(oDataProperty.bindingPath) !== -1;
}).pop();
} | javascript | function _findODataProperty(aBindingPaths, aODataProperties) {
return aODataProperties.filter(function (oDataProperty) {
return aBindingPaths.indexOf(oDataProperty.bindingPath) !== -1;
}).pop();
} | [
"function",
"_findODataProperty",
"(",
"aBindingPaths",
",",
"aODataProperties",
")",
"{",
"return",
"aODataProperties",
".",
"filter",
"(",
"function",
"(",
"oDataProperty",
")",
"{",
"return",
"aBindingPaths",
".",
"indexOf",
"(",
"oDataProperty",
".",
"bindingPat... | Looks for a ODataProperty for a set of bindings paths
@param {Array.<String>} aBindingPaths - Array of collected binding paths
@param {Array.<Object>} aODataProperties - Array of Fields
@return {Object|undefined} - returns first found Object with Field (Property) description, undefined if not found
@private | [
"Looks",
"for",
"a",
"ODataProperty",
"for",
"a",
"set",
"of",
"bindings",
"paths"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L356-L360 | train |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js | _enhanceInvisibleElement | function _enhanceInvisibleElement(oInvisibleElement, mODataOrCustomItem) {
// mODataOrCustomItem.fieldLabel - oData, mODataOrCustomItem.label - custom
oInvisibleElement.originalLabel = mODataOrCustomItem.fieldLabel || mODataOrCustomItem.label;
// mODataOrCustomItem.quickInfo - oData, mODataOrCustomItem.tooltip -... | javascript | function _enhanceInvisibleElement(oInvisibleElement, mODataOrCustomItem) {
// mODataOrCustomItem.fieldLabel - oData, mODataOrCustomItem.label - custom
oInvisibleElement.originalLabel = mODataOrCustomItem.fieldLabel || mODataOrCustomItem.label;
// mODataOrCustomItem.quickInfo - oData, mODataOrCustomItem.tooltip -... | [
"function",
"_enhanceInvisibleElement",
"(",
"oInvisibleElement",
",",
"mODataOrCustomItem",
")",
"{",
"// mODataOrCustomItem.fieldLabel - oData, mODataOrCustomItem.label - custom",
"oInvisibleElement",
".",
"originalLabel",
"=",
"mODataOrCustomItem",
".",
"fieldLabel",
"||",
"mODa... | Enhance Invisible Element with extra data from OData property
@param {sap.ui.core.Control} oInvisibleElement - Invisible Element
@param {Object} mODataProperty - ODataProperty as a source of data enhancement process
@private | [
"Enhance",
"Invisible",
"Element",
"with",
"extra",
"data",
"from",
"OData",
"property"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L370-L387 | train |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js | _checkAndEnhanceODataProperty | function _checkAndEnhanceODataProperty(oInvisibleElement, aODataProperties, aNavigationProperties, aNavigationEntityNames, mBindingPaths) {
var aBindingPaths = mBindingPaths.bindingPaths,
aBindingContextPaths = mBindingPaths.bindingContextPaths,
mODataProperty;
return (
// include it if the field has no b... | javascript | function _checkAndEnhanceODataProperty(oInvisibleElement, aODataProperties, aNavigationProperties, aNavigationEntityNames, mBindingPaths) {
var aBindingPaths = mBindingPaths.bindingPaths,
aBindingContextPaths = mBindingPaths.bindingContextPaths,
mODataProperty;
return (
// include it if the field has no b... | [
"function",
"_checkAndEnhanceODataProperty",
"(",
"oInvisibleElement",
",",
"aODataProperties",
",",
"aNavigationProperties",
",",
"aNavigationEntityNames",
",",
"mBindingPaths",
")",
"{",
"var",
"aBindingPaths",
"=",
"mBindingPaths",
".",
"bindingPaths",
",",
"aBindingCont... | Checks if this InvisibleProperty should be included in resulting list and adds information
from oDataProperty to the InvisibleProperty if available
@param {sap.ui.core.Control} oInvisibleElement - Invisible Element
@param {Array.<Object>} aODataProperties - Array of Fields
@param {Array.<Object>} aNavigationProperties... | [
"Checks",
"if",
"this",
"InvisibleProperty",
"should",
"be",
"included",
"in",
"resulting",
"list",
"and",
"adds",
"information",
"from",
"oDataProperty",
"to",
"the",
"InvisibleProperty",
"if",
"available"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L403-L420 | train |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js | function(oElement, mActions){
var oModel = oElement.getModel();
var mRevealData = mActions.reveal;
var mAddODataProperty = mActions.addODataProperty;
var mCustom = mActions.custom;
var oDefaultAggregation = oElement.getMetadata().getAggregation();
var sAggregationName = oDefaultAggregation ? oDefaultA... | javascript | function(oElement, mActions){
var oModel = oElement.getModel();
var mRevealData = mActions.reveal;
var mAddODataProperty = mActions.addODataProperty;
var mCustom = mActions.custom;
var oDefaultAggregation = oElement.getMetadata().getAggregation();
var sAggregationName = oDefaultAggregation ? oDefaultA... | [
"function",
"(",
"oElement",
",",
"mActions",
")",
"{",
"var",
"oModel",
"=",
"oElement",
".",
"getModel",
"(",
")",
";",
"var",
"mRevealData",
"=",
"mActions",
".",
"reveal",
";",
"var",
"mAddODataProperty",
"=",
"mActions",
".",
"addODataProperty",
";",
... | Filters available invisible elements whether they could be shown or not
@param {sap.ui.core.Control} oElement - Container Element where to start search for a invisible
@param {Object} mActions - Container with actions
@return {Promise} - returns a Promise which resolves with a list of hidden controls are available to... | [
"Filters",
"available",
"invisible",
"elements",
"whether",
"they",
"could",
"be",
"shown",
"or",
"not"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L432-L509 | train | |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js | function (oElement, mAction) {
var oDefaultAggregation = oElement.getMetadata().getAggregation();
var sAggregationName = oDefaultAggregation ? oDefaultAggregation.name : mAction.action.aggregation;
var oModel = oElement.getModel();
return Promise.resolve()
.then(function () {
return _getODataPrope... | javascript | function (oElement, mAction) {
var oDefaultAggregation = oElement.getMetadata().getAggregation();
var sAggregationName = oDefaultAggregation ? oDefaultAggregation.name : mAction.action.aggregation;
var oModel = oElement.getModel();
return Promise.resolve()
.then(function () {
return _getODataPrope... | [
"function",
"(",
"oElement",
",",
"mAction",
")",
"{",
"var",
"oDefaultAggregation",
"=",
"oElement",
".",
"getMetadata",
"(",
")",
".",
"getAggregation",
"(",
")",
";",
"var",
"sAggregationName",
"=",
"oDefaultAggregation",
"?",
"oDefaultAggregation",
".",
"nam... | Retrieves available OData properties from the metadata
@param {sap.ui.core.Control} oElement - Source element of which Model we're looking for additional properties
@param {Object} mAction - Action descriptor
@return {Promise} - returns a Promise which resolves with a list of available to display OData properties | [
"Retrieves",
"available",
"OData",
"properties",
"from",
"the",
"metadata"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js#L519-L560 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js | function( prop ) {
if ( !prop ) {
return;
}
return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) );
} | javascript | function( prop ) {
if ( !prop ) {
return;
}
return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) );
} | [
"function",
"(",
"prop",
")",
"{",
"if",
"(",
"!",
"prop",
")",
"{",
"return",
";",
"}",
"return",
"nsNormalizeDict",
"[",
"prop",
"]",
"||",
"(",
"nsNormalizeDict",
"[",
"prop",
"]",
"=",
"$",
".",
"camelCase",
"(",
"$",
".",
"mobile",
".",
"ns",
... | Take a data attribute property, prepend the namespace and then camel case the attribute string. Add the result to our nsNormalizeDict so we don't have to do this again. | [
"Take",
"a",
"data",
"attribute",
"property",
"prepend",
"the",
"namespace",
"and",
"then",
"camel",
"case",
"the",
"attribute",
"string",
".",
"Add",
"the",
"result",
"to",
"our",
"nsNormalizeDict",
"so",
"we",
"don",
"t",
"have",
"to",
"do",
"this",
"aga... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js#L462-L468 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js | validStyle | function validStyle( prop, value, check_vend ) {
var div = document.createElement( 'div' ),
uc = function( txt ) {
return txt.charAt( 0 ).toUpperCase() + txt.substr( 1 );
},
vend_pref = function( vend ) {
if( vend === "" ) {
return "";
} else {
return "-" + vend.charAt( 0 ).toLowerCase() + vend... | javascript | function validStyle( prop, value, check_vend ) {
var div = document.createElement( 'div' ),
uc = function( txt ) {
return txt.charAt( 0 ).toUpperCase() + txt.substr( 1 );
},
vend_pref = function( vend ) {
if( vend === "" ) {
return "";
} else {
return "-" + vend.charAt( 0 ).toLowerCase() + vend... | [
"function",
"validStyle",
"(",
"prop",
",",
"value",
",",
"check_vend",
")",
"{",
"var",
"div",
"=",
"document",
".",
"createElement",
"(",
"'div'",
")",
",",
"uc",
"=",
"function",
"(",
"txt",
")",
"{",
"return",
"txt",
".",
"charAt",
"(",
"0",
")",... | only used to rule out box shadow, as it's filled opaque on BB 5 and lower | [
"only",
"used",
"to",
"rule",
"out",
"box",
"shadow",
"as",
"it",
"s",
"filled",
"opaque",
"on",
"BB",
"5",
"and",
"lower"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js#L746-L776 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js | handler | function handler() {
// Get the current orientation.
var orientation = get_orientation();
if ( orientation !== last_orientation ) {
// The orientation has changed, so trigger the orientationchange event.
last_orientation = orientation;
win.trigger( event_name );
}
} | javascript | function handler() {
// Get the current orientation.
var orientation = get_orientation();
if ( orientation !== last_orientation ) {
// The orientation has changed, so trigger the orientationchange event.
last_orientation = orientation;
win.trigger( event_name );
}
} | [
"function",
"handler",
"(",
")",
"{",
"// Get the current orientation.",
"var",
"orientation",
"=",
"get_orientation",
"(",
")",
";",
"if",
"(",
"orientation",
"!==",
"last_orientation",
")",
"{",
"// The orientation has changed, so trigger the orientationchange event.",
"l... | If the event is not supported natively, this handler will be bound to the window resize event to simulate the orientationchange event. | [
"If",
"the",
"event",
"is",
"not",
"supported",
"natively",
"this",
"handler",
"will",
"be",
"bound",
"to",
"the",
"window",
"resize",
"event",
"to",
"simulate",
"the",
"orientationchange",
"event",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js#L1228-L1237 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js | function( event ) {
// SAP MODIFICATION: if jQuery event is created programatically there's no originalEvent property. Therefore the existence of event.originalEvent needs to be checked.
var data = event.originalEvent && event.originalEvent.touches ?
event.originalEvent.touches[ 0 ] : event;
return {
... | javascript | function( event ) {
// SAP MODIFICATION: if jQuery event is created programatically there's no originalEvent property. Therefore the existence of event.originalEvent needs to be checked.
var data = event.originalEvent && event.originalEvent.touches ?
event.originalEvent.touches[ 0 ] : event;
return {
... | [
"function",
"(",
"event",
")",
"{",
"// SAP MODIFICATION: if jQuery event is created programatically there's no originalEvent property. Therefore the existence of event.originalEvent needs to be checked.",
"var",
"data",
"=",
"event",
".",
"originalEvent",
"&&",
"event",
".",
"original... | Swipe vertical displacement must be less than this. | [
"Swipe",
"vertical",
"displacement",
"must",
"be",
"less",
"than",
"this",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js#L2031-L2040 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js | stopHandler | function stopHandler( event ) {
$this.unbind( touchMoveEvent, moveHandler )
.unbind( touchStopEvent, stopHandler );
if ( start && stop ) {
$.event.special.swipe.handleSwipe( start, stop );
}
start = stop = undefined;
} | javascript | function stopHandler( event ) {
$this.unbind( touchMoveEvent, moveHandler )
.unbind( touchStopEvent, stopHandler );
if ( start && stop ) {
$.event.special.swipe.handleSwipe( start, stop );
}
start = stop = undefined;
} | [
"function",
"stopHandler",
"(",
"event",
")",
"{",
"$this",
".",
"unbind",
"(",
"touchMoveEvent",
",",
"moveHandler",
")",
".",
"unbind",
"(",
"touchStopEvent",
",",
"stopHandler",
")",
";",
"if",
"(",
"start",
"&&",
"stop",
")",
"{",
"$",
".",
"event",
... | SAP MODIFICATION Because touchcancel is used together with touchend, jQuery.fn.bind is used to replace jQuery.fn.one due to the fact that jQuery.fn.one doesn't work for multiple events. | [
"SAP",
"MODIFICATION",
"Because",
"touchcancel",
"is",
"used",
"together",
"with",
"touchend",
"jQuery",
".",
"fn",
".",
"bind",
"is",
"used",
"to",
"replace",
"jQuery",
".",
"fn",
".",
"one",
"due",
"to",
"the",
"fact",
"that",
"jQuery",
".",
"fn",
".",... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/jquery-mobile-custom.js#L2096-L2104 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/ODataUtils.js | parseDecimal | function parseDecimal(sValue) {
var aMatches;
if (typeof sValue !== "string") {
return undefined;
}
aMatches = rDecimal.exec(sValue);
if (!aMatches) {
return undefined;
}
return {
sign: aMatches[1] === "-" ? -1 : 1,
integerLength: aMatches[2].length,
// remove trailing decimal zeroes and p... | javascript | function parseDecimal(sValue) {
var aMatches;
if (typeof sValue !== "string") {
return undefined;
}
aMatches = rDecimal.exec(sValue);
if (!aMatches) {
return undefined;
}
return {
sign: aMatches[1] === "-" ? -1 : 1,
integerLength: aMatches[2].length,
// remove trailing decimal zeroes and p... | [
"function",
"parseDecimal",
"(",
"sValue",
")",
"{",
"var",
"aMatches",
";",
"if",
"(",
"typeof",
"sValue",
"!==",
"\"string\"",
")",
"{",
"return",
"undefined",
";",
"}",
"aMatches",
"=",
"rDecimal",
".",
"exec",
"(",
"sValue",
")",
";",
"if",
"(",
"!... | Parses a decimal given in a string.
@param {string} sValue
the value
@returns {object}
the result with the sign in <code>sign</code>, the number of integer digits in
<code>integerLength</code> and the trimmed absolute value in <code>abs</code> | [
"Parses",
"a",
"decimal",
"given",
"in",
"a",
"string",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/ODataUtils.js#L571-L588 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/ODataUtils.js | decimalCompare | function decimalCompare(sValue1, sValue2) {
var oDecimal1, oDecimal2, iResult;
if (sValue1 === sValue2) {
return 0;
}
oDecimal1 = parseDecimal(sValue1);
oDecimal2 = parseDecimal(sValue2);
if (!oDecimal1 || !oDecimal2) {
return NaN;
}
if (oDecimal1.sign !== oDecimal2.sign) {
return oDecimal1.si... | javascript | function decimalCompare(sValue1, sValue2) {
var oDecimal1, oDecimal2, iResult;
if (sValue1 === sValue2) {
return 0;
}
oDecimal1 = parseDecimal(sValue1);
oDecimal2 = parseDecimal(sValue2);
if (!oDecimal1 || !oDecimal2) {
return NaN;
}
if (oDecimal1.sign !== oDecimal2.sign) {
return oDecimal1.si... | [
"function",
"decimalCompare",
"(",
"sValue1",
",",
"sValue2",
")",
"{",
"var",
"oDecimal1",
",",
"oDecimal2",
",",
"iResult",
";",
"if",
"(",
"sValue1",
"===",
"sValue2",
")",
"{",
"return",
"0",
";",
"}",
"oDecimal1",
"=",
"parseDecimal",
"(",
"sValue1",
... | Compares two decimal values given as strings.
@param {string} sValue1
the first value to compare
@param {string} sValue2
the second value to compare
@return {int}
the result of the compare: <code>0</code> if the values are equal, <code>-1</code> if the
first value is smaller, <code>1</code> if the first value is large... | [
"Compares",
"two",
"decimal",
"values",
"given",
"as",
"strings",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/ODataUtils.js#L602-L621 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/mvc/ControllerExtension.js | function(sId) {
var sNamespace = this.getMetadata().getNamespace();
sId = sNamespace + "." + sId;
return this.base ? this.base.byId(sId) : undefined;
} | javascript | function(sId) {
var sNamespace = this.getMetadata().getNamespace();
sId = sNamespace + "." + sId;
return this.base ? this.base.byId(sId) : undefined;
} | [
"function",
"(",
"sId",
")",
"{",
"var",
"sNamespace",
"=",
"this",
".",
"getMetadata",
"(",
")",
".",
"getNamespace",
"(",
")",
";",
"sId",
"=",
"sNamespace",
"+",
"\".\"",
"+",
"sId",
";",
"return",
"this",
".",
"base",
"?",
"this",
".",
"base",
... | Returns an Element of the connected view with the given local ID.
Views automatically prepend their own ID as a prefix to created Elements
to make the IDs unique even in the case of multiple view instances.
For Controller extension the namespace of the control id gets also
prefixed with the namespace of the extension.... | [
"Returns",
"an",
"Element",
"of",
"the",
"connected",
"view",
"with",
"the",
"given",
"local",
"ID",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/mvc/ControllerExtension.js#L52-L56 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/mvc/ControllerExtension.js | function() {
var mMethods = {};
var oMetadata = this.getMetadata();
var aPublicMethods = oMetadata.getAllPublicMethods();
aPublicMethods.forEach(function(sMethod) {
var fnFunction = this[sMethod];
if (typeof fnFunction === 'function') {
mMethods[sMethod] = function() {
var tmp = ... | javascript | function() {
var mMethods = {};
var oMetadata = this.getMetadata();
var aPublicMethods = oMetadata.getAllPublicMethods();
aPublicMethods.forEach(function(sMethod) {
var fnFunction = this[sMethod];
if (typeof fnFunction === 'function') {
mMethods[sMethod] = function() {
var tmp = ... | [
"function",
"(",
")",
"{",
"var",
"mMethods",
"=",
"{",
"}",
";",
"var",
"oMetadata",
"=",
"this",
".",
"getMetadata",
"(",
")",
";",
"var",
"aPublicMethods",
"=",
"oMetadata",
".",
"getAllPublicMethods",
"(",
")",
";",
"aPublicMethods",
".",
"forEach",
... | Returns the public interface for this exetension
@returns {object} oInterface The public interface for this extension
@private | [
"Returns",
"the",
"public",
"interface",
"for",
"this",
"exetension"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/mvc/ControllerExtension.js#L73-L92 | train | |
SAP/openui5 | lib/jsdoc/ui5/template/publish.js | Version | function Version(versionStr) {
var match = rVersion.exec(versionStr) || [];
function norm(v) {
v = parseInt(v);
return isNaN(v) ? 0 : v;
}
Object.defineProperty(this, "major", {
enumerable: true,
value: norm(match[0])
});
Object.defineProperty(this, "minor", {
enumerable: true,
value: n... | javascript | function Version(versionStr) {
var match = rVersion.exec(versionStr) || [];
function norm(v) {
v = parseInt(v);
return isNaN(v) ? 0 : v;
}
Object.defineProperty(this, "major", {
enumerable: true,
value: norm(match[0])
});
Object.defineProperty(this, "minor", {
enumerable: true,
value: n... | [
"function",
"Version",
"(",
"versionStr",
")",
"{",
"var",
"match",
"=",
"rVersion",
".",
"exec",
"(",
"versionStr",
")",
"||",
"[",
"]",
";",
"function",
"norm",
"(",
"v",
")",
"{",
"v",
"=",
"parseInt",
"(",
"v",
")",
";",
"return",
"isNaN",
"(",... | Creates a Version object from the given version string.
@param {string} versionStr A dot-separated version string
@classdesc Represents a version consisting of major, minor, patch version and suffix,
e.g. '1.2.7-SNAPSHOT'. All parts after the major version are optional.
@class | [
"Creates",
"a",
"Version",
"object",
"from",
"the",
"given",
"version",
"string",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/ui5/template/publish.js#L211-L237 | train |
SAP/openui5 | lib/jsdoc/ui5/template/publish.js | getConstructorDescription | function getConstructorDescription(symbol) {
var description = symbol.description;
var tags = symbol.tags;
if ( tags ) {
for (var i = 0; i < tags.length; i++) {
if ( tags[i].title === "ui5-settings" && tags[i].text) {
description += "\n</p><p>\n" + tags[i].text;
break;
}
}
}
return description;
} | javascript | function getConstructorDescription(symbol) {
var description = symbol.description;
var tags = symbol.tags;
if ( tags ) {
for (var i = 0; i < tags.length; i++) {
if ( tags[i].title === "ui5-settings" && tags[i].text) {
description += "\n</p><p>\n" + tags[i].text;
break;
}
}
}
return description;
} | [
"function",
"getConstructorDescription",
"(",
"symbol",
")",
"{",
"var",
"description",
"=",
"symbol",
".",
"description",
";",
"var",
"tags",
"=",
"symbol",
".",
"tags",
";",
"if",
"(",
"tags",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"... | Description + Settings | [
"Description",
"+",
"Settings"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/lib/jsdoc/ui5/template/publish.js#L4094-L4106 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/date/Persian.js | toPersian | function toPersian(oGregorian) {
var iJulianDayNumber = g2d(oGregorian.year, oGregorian.month + 1, oGregorian.day);
return d2j(iJulianDayNumber);
} | javascript | function toPersian(oGregorian) {
var iJulianDayNumber = g2d(oGregorian.year, oGregorian.month + 1, oGregorian.day);
return d2j(iJulianDayNumber);
} | [
"function",
"toPersian",
"(",
"oGregorian",
")",
"{",
"var",
"iJulianDayNumber",
"=",
"g2d",
"(",
"oGregorian",
".",
"year",
",",
"oGregorian",
".",
"month",
"+",
"1",
",",
"oGregorian",
".",
"day",
")",
";",
"return",
"d2j",
"(",
"iJulianDayNumber",
")",
... | Calculate Persian date from gregorian
@param {object} oGregorian a JS object containing day, month and year in the gregorian calendar
@private | [
"Calculate",
"Persian",
"date",
"from",
"gregorian"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/date/Persian.js#L50-L53 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/date/Persian.js | toGregorian | function toGregorian(oPersian) {
var iJulianDayNumber = j2d(oPersian.year, oPersian.month + 1, oPersian.day);
return d2g(iJulianDayNumber);
} | javascript | function toGregorian(oPersian) {
var iJulianDayNumber = j2d(oPersian.year, oPersian.month + 1, oPersian.day);
return d2g(iJulianDayNumber);
} | [
"function",
"toGregorian",
"(",
"oPersian",
")",
"{",
"var",
"iJulianDayNumber",
"=",
"j2d",
"(",
"oPersian",
".",
"year",
",",
"oPersian",
".",
"month",
"+",
"1",
",",
"oPersian",
".",
"day",
")",
";",
"return",
"d2g",
"(",
"iJulianDayNumber",
")",
";",... | Calculate gregorian date from Persian
@param {object} oPersian a JS object containing day, month and year in the Persian calendar
@private | [
"Calculate",
"gregorian",
"date",
"from",
"Persian"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/date/Persian.js#L61-L64 | train |
SAP/openui5 | src/sap.ui.demokit/src/sap/ui/demokit/demoapps/model/libraryData.js | createDemoAppData | function createDemoAppData(oDemoAppMetadata, sLibUrl, sLibNamespace) {
// transform simple demo app link to a configuration object
var aLinks = [];
// transform link object to a bindable array of objects
if (jQuery.isPlainObject(oDemoAppMetadata.links)) {
aLinks = Object.keys(oDemoAppMetadata.links).map(func... | javascript | function createDemoAppData(oDemoAppMetadata, sLibUrl, sLibNamespace) {
// transform simple demo app link to a configuration object
var aLinks = [];
// transform link object to a bindable array of objects
if (jQuery.isPlainObject(oDemoAppMetadata.links)) {
aLinks = Object.keys(oDemoAppMetadata.links).map(func... | [
"function",
"createDemoAppData",
"(",
"oDemoAppMetadata",
",",
"sLibUrl",
",",
"sLibNamespace",
")",
"{",
"// transform simple demo app link to a configuration object",
"var",
"aLinks",
"=",
"[",
"]",
";",
"// transform link object to a bindable array of objects",
"if",
"(",
... | function to compute the app objects for a demo object | [
"function",
"to",
"compute",
"the",
"app",
"objects",
"for",
"a",
"demo",
"object"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.demokit/src/sap/ui/demokit/demoapps/model/libraryData.js#L12-L38 | train |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayoutRenderer.js | function(oPosition) {
var oPos = oPosition.getComputedPosition();
var addStyle = function(oPosition, aBuffer, sPos, sVal){
if (sVal) {
aBuffer.push(sPos + ":" + sVal + ";");
}
};
var aBuffer = [];
addStyle(oPosition, aBuffer, "top", oPos.top);
addStyle(oPosition, aBuffer, "bottom", oPos.bottom);... | javascript | function(oPosition) {
var oPos = oPosition.getComputedPosition();
var addStyle = function(oPosition, aBuffer, sPos, sVal){
if (sVal) {
aBuffer.push(sPos + ":" + sVal + ";");
}
};
var aBuffer = [];
addStyle(oPosition, aBuffer, "top", oPos.top);
addStyle(oPosition, aBuffer, "bottom", oPos.bottom);... | [
"function",
"(",
"oPosition",
")",
"{",
"var",
"oPos",
"=",
"oPosition",
".",
"getComputedPosition",
"(",
")",
";",
"var",
"addStyle",
"=",
"function",
"(",
"oPosition",
",",
"aBuffer",
",",
"sPos",
",",
"sVal",
")",
"{",
"if",
"(",
"sVal",
")",
"{",
... | Computes and returns the CSS styles for the given position.
@private | [
"Computes",
"and",
"returns",
"the",
"CSS",
"styles",
"for",
"the",
"given",
"position",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayoutRenderer.js#L173-L191 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js | logUnsupportedPropertyInSelect | function logUnsupportedPropertyInSelect(sPath, sSelectedProperty, oDimensionOrMeasure) {
var sDimensionOrMeasure = oDimensionOrMeasure
instanceof sap.ui.model.analytics.odata4analytics.Dimension
? "dimension" : "measure";
if (oDimensionOrMeasure.getName() === sSelectedProperty) {
oLogger.warning("Ignor... | javascript | function logUnsupportedPropertyInSelect(sPath, sSelectedProperty, oDimensionOrMeasure) {
var sDimensionOrMeasure = oDimensionOrMeasure
instanceof sap.ui.model.analytics.odata4analytics.Dimension
? "dimension" : "measure";
if (oDimensionOrMeasure.getName() === sSelectedProperty) {
oLogger.warning("Ignor... | [
"function",
"logUnsupportedPropertyInSelect",
"(",
"sPath",
",",
"sSelectedProperty",
",",
"oDimensionOrMeasure",
")",
"{",
"var",
"sDimensionOrMeasure",
"=",
"oDimensionOrMeasure",
"instanceof",
"sap",
".",
"ui",
".",
"model",
".",
"analytics",
".",
"odata4analytics",
... | Logs a warning that the given select property is not supported. Either it is a dimension or
a measure or it is associated with a dimension or a measure which is not part of the
analytical info.
@param {string} sPath The binding path
@param {string} sSelectedProperty The name of the selected property
@param {sap.ui.mod... | [
"Logs",
"a",
"warning",
"that",
"the",
"given",
"select",
"property",
"is",
"not",
"supported",
".",
"Either",
"it",
"is",
"a",
"dimension",
"or",
"a",
"measure",
"or",
"it",
"is",
"associated",
"with",
"a",
"dimension",
"or",
"a",
"measure",
"which",
"i... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js#L157-L177 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js | trimAndCheckForDuplicates | function trimAndCheckForDuplicates(aSelect, sPath) {
var sCurrentProperty,
bError = false,
i,
n;
// replace all white-spaces before and after the value
for (i = 0, n = aSelect.length; i < n; i++) {
aSelect[i] = aSelect[i].trim();
}
// check for duplicate entries and remove from list
for (i = aS... | javascript | function trimAndCheckForDuplicates(aSelect, sPath) {
var sCurrentProperty,
bError = false,
i,
n;
// replace all white-spaces before and after the value
for (i = 0, n = aSelect.length; i < n; i++) {
aSelect[i] = aSelect[i].trim();
}
// check for duplicate entries and remove from list
for (i = aS... | [
"function",
"trimAndCheckForDuplicates",
"(",
"aSelect",
",",
"sPath",
")",
"{",
"var",
"sCurrentProperty",
",",
"bError",
"=",
"false",
",",
"i",
",",
"n",
";",
"// replace all white-spaces before and after the value",
"for",
"(",
"i",
"=",
"0",
",",
"n",
"=",
... | Iterate over the given array, trim each value and check whether there are duplicate entries
in the array. If there are duplicate entries a warning is logged and the duplicate is removed
from the array.
@param {string[]} aSelect An array of strings
@param {string} sPath The binding path
@returns {boolean} <code>true</c... | [
"Iterate",
"over",
"the",
"given",
"array",
"trim",
"each",
"value",
"and",
"check",
"whether",
"there",
"are",
"duplicate",
"entries",
"in",
"the",
"array",
".",
"If",
"there",
"are",
"duplicate",
"entries",
"a",
"warning",
"is",
"logged",
"and",
"the",
"... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js#L188-L211 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js | function(sGroupId, iAutoExpandGroupsToLevel, iStartIndex, iLength) {
var iLevel = that._getGroupIdLevel(sGroupId);
if (iLevel == iAutoExpandGroupsToLevel) {
var aContext = that._getLoadedContextsForGroup(sGroupId, iStartIndex, iLength);
var iLastLoadedIndex = iStartIndex + aContext.length - 1;
if (aC... | javascript | function(sGroupId, iAutoExpandGroupsToLevel, iStartIndex, iLength) {
var iLevel = that._getGroupIdLevel(sGroupId);
if (iLevel == iAutoExpandGroupsToLevel) {
var aContext = that._getLoadedContextsForGroup(sGroupId, iStartIndex, iLength);
var iLastLoadedIndex = iStartIndex + aContext.length - 1;
if (aC... | [
"function",
"(",
"sGroupId",
",",
"iAutoExpandGroupsToLevel",
",",
"iStartIndex",
",",
"iLength",
")",
"{",
"var",
"iLevel",
"=",
"that",
".",
"_getGroupIdLevel",
"(",
"sGroupId",
")",
";",
"if",
"(",
"iLevel",
"==",
"iAutoExpandGroupsToLevel",
")",
"{",
"var"... | helper function
Searches for missing members in the sub groups of the given sGroupId
@returns {Object} Either { groupId_Missing, startIndex_Missing, length_Missing }
expressing the number (length_Missing) of missing contexts starting in group (groupId_Missing)
at position (startIndex_Missing) using depth-first traversa... | [
"helper",
"function",
"Searches",
"for",
"missing",
"members",
"in",
"the",
"sub",
"groups",
"of",
"the",
"given",
"sGroupId"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/analytics/AnalyticalBinding.js#L3635-L3678 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/events/TouchToMouseMapping.js | function(sType, oEvent) {
if (!bHandleEvent) {
return;
}
// we need mapping of the different event types to get the correct target
var oMappedEvent = oEvent.type == "touchend" ? oEvent.changedTouches[0] : oEvent.touches[0];
// create the synthetic event
var newEvent = oDocument.createEvent('Mou... | javascript | function(sType, oEvent) {
if (!bHandleEvent) {
return;
}
// we need mapping of the different event types to get the correct target
var oMappedEvent = oEvent.type == "touchend" ? oEvent.changedTouches[0] : oEvent.touches[0];
// create the synthetic event
var newEvent = oDocument.createEvent('Mou... | [
"function",
"(",
"sType",
",",
"oEvent",
")",
"{",
"if",
"(",
"!",
"bHandleEvent",
")",
"{",
"return",
";",
"}",
"// we need mapping of the different event types to get the correct target",
"var",
"oMappedEvent",
"=",
"oEvent",
".",
"type",
"==",
"\"touchend\"",
"?"... | Fires a synthetic mouse event for a given type and native touch event.
@param {string} sType the type of the synthetic event to fire, e.g. "mousedown"
@param {jQuery.Event} oEvent the event object
@private | [
"Fires",
"a",
"synthetic",
"mouse",
"event",
"for",
"a",
"given",
"type",
"and",
"native",
"touch",
"event",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/events/TouchToMouseMapping.js#L36-L58 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/events/TouchToMouseMapping.js | function(oEvent) {
var oTouches = oEvent.touches,
oTouch;
bHandleEvent = (oTouches.length == 1 && !isInputField(oEvent));
bIsMoved = false;
if (bHandleEvent) {
oTouch = oTouches[0];
// As we are only interested in the first touch target, we remember it
oTarget = oTouch.target;
if (oTa... | javascript | function(oEvent) {
var oTouches = oEvent.touches,
oTouch;
bHandleEvent = (oTouches.length == 1 && !isInputField(oEvent));
bIsMoved = false;
if (bHandleEvent) {
oTouch = oTouches[0];
// As we are only interested in the first touch target, we remember it
oTarget = oTouch.target;
if (oTa... | [
"function",
"(",
"oEvent",
")",
"{",
"var",
"oTouches",
"=",
"oEvent",
".",
"touches",
",",
"oTouch",
";",
"bHandleEvent",
"=",
"(",
"oTouches",
".",
"length",
"==",
"1",
"&&",
"!",
"isInputField",
"(",
"oEvent",
")",
")",
";",
"bIsMoved",
"=",
"false"... | Touch start event handler. Called whenever a finger is added to the surface. Fires mouse start event.
@param {jQuery.Event} oEvent the event object
@private | [
"Touch",
"start",
"event",
"handler",
".",
"Called",
"whenever",
"a",
"finger",
"is",
"added",
"to",
"the",
"surface",
".",
"Fires",
"mouse",
"start",
"event",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/events/TouchToMouseMapping.js#L86-L109 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/events/TouchToMouseMapping.js | function(oEvent) {
var oTouch;
if (bHandleEvent) {
oTouch = oEvent.touches[0];
// Check if the finger is moved. When the finger was moved, no "click" event is fired.
if (Math.abs(oTouch.clientX - iStartX) > 10 || Math.abs(oTouch.clientY - iStartY) > 10) {
bIsMoved = true;
}
if (bIsMove... | javascript | function(oEvent) {
var oTouch;
if (bHandleEvent) {
oTouch = oEvent.touches[0];
// Check if the finger is moved. When the finger was moved, no "click" event is fired.
if (Math.abs(oTouch.clientX - iStartX) > 10 || Math.abs(oTouch.clientY - iStartY) > 10) {
bIsMoved = true;
}
if (bIsMove... | [
"function",
"(",
"oEvent",
")",
"{",
"var",
"oTouch",
";",
"if",
"(",
"bHandleEvent",
")",
"{",
"oTouch",
"=",
"oEvent",
".",
"touches",
"[",
"0",
"]",
";",
"// Check if the finger is moved. When the finger was moved, no \"click\" event is fired.",
"if",
"(",
"Math"... | Touch move event handler. Fires mouse move event.
@param {jQuery.Event} oEvent the event object
@private | [
"Touch",
"move",
"event",
"handler",
".",
"Fires",
"mouse",
"move",
"event",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/events/TouchToMouseMapping.js#L116-L133 | train | |
SAP/openui5 | src/sap.ui.fl/src/sap/ui/fl/variants/VariantModel.js | function() {
var aVariantManagementReferences = Object.keys(this.oData);
aVariantManagementReferences.forEach(function(sVariantManagementReference) {
var mPropertyBag = {
variantManagementReference: sVariantManagementReference,
currentVariantReference: this.oData[sVariantManagementReference].currentVaria... | javascript | function() {
var aVariantManagementReferences = Object.keys(this.oData);
aVariantManagementReferences.forEach(function(sVariantManagementReference) {
var mPropertyBag = {
variantManagementReference: sVariantManagementReference,
currentVariantReference: this.oData[sVariantManagementReference].currentVaria... | [
"function",
"(",
")",
"{",
"var",
"aVariantManagementReferences",
"=",
"Object",
".",
"keys",
"(",
"this",
".",
"oData",
")",
";",
"aVariantManagementReferences",
".",
"forEach",
"(",
"function",
"(",
"sVariantManagementReference",
")",
"{",
"var",
"mPropertyBag",... | When VariantController map is reset at runtime, this listener is called.
It reverts all applied changes and resets all variant management controls to default state.
@returns {Promise} Promise which resolves when all applied changes have been reverted | [
"When",
"VariantController",
"map",
"is",
"reset",
"at",
"runtime",
"this",
"listener",
"is",
"called",
".",
"It",
"reverts",
"all",
"applied",
"changes",
"and",
"resets",
"all",
"variant",
"management",
"controls",
"to",
"default",
"state",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/variants/VariantModel.js#L38-L61 | train | |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/report/ReportProvider.js | getReportHtml | function getReportHtml(oData) {
return getResources().then(function () {
var styles = [],
scripts = [],
html = '',
i,
template = {},
reportContext = {};
for (i = 0; i < arguments.length; i++) {
switch (arguments[i].type) {
case 'template': html = arguments[i].content; break;
c... | javascript | function getReportHtml(oData) {
return getResources().then(function () {
var styles = [],
scripts = [],
html = '',
i,
template = {},
reportContext = {};
for (i = 0; i < arguments.length; i++) {
switch (arguments[i].type) {
case 'template': html = arguments[i].content; break;
c... | [
"function",
"getReportHtml",
"(",
"oData",
")",
"{",
"return",
"getResources",
"(",
")",
".",
"then",
"(",
"function",
"(",
")",
"{",
"var",
"styles",
"=",
"[",
"]",
",",
"scripts",
"=",
"[",
"]",
",",
"html",
"=",
"''",
",",
"i",
",",
"template",
... | Public functions
Creates an html string containing the whole report.
@param {Object} oData - the data required to create a report
@returns {String} | [
"Public",
"functions",
"Creates",
"an",
"html",
"string",
"containing",
"the",
"whole",
"report",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/report/ReportProvider.js#L352-L394 | train |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/report/ReportProvider.js | downloadReportZip | function downloadReportZip(oData) {
this.getReportHtml(oData).done(function (html) {
var report = '<!DOCTYPE HTML><html><head><title>Report</title></head><body><div id="sap-report-content">' + html + '</div></body></html>';
var issues = { 'issues': oData.issues };
var appInfos = { 'appInfos': oData.applicati... | javascript | function downloadReportZip(oData) {
this.getReportHtml(oData).done(function (html) {
var report = '<!DOCTYPE HTML><html><head><title>Report</title></head><body><div id="sap-report-content">' + html + '</div></body></html>';
var issues = { 'issues': oData.issues };
var appInfos = { 'appInfos': oData.applicati... | [
"function",
"downloadReportZip",
"(",
"oData",
")",
"{",
"this",
".",
"getReportHtml",
"(",
"oData",
")",
".",
"done",
"(",
"function",
"(",
"html",
")",
"{",
"var",
"report",
"=",
"'<!DOCTYPE HTML><html><head><title>Report</title></head><body><div id=\"sap-report-conte... | Creates a zip file containing the report.html, appInfo.json, technicalInfo.json, issues.json.
@param {Object} oData - the data required to create a report | [
"Creates",
"a",
"zip",
"file",
"containing",
"the",
"report",
".",
"html",
"appInfo",
".",
"json",
"technicalInfo",
".",
"json",
"issues",
".",
"json",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/report/ReportProvider.js#L400-L415 | train |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/report/ReportProvider.js | openReport | function openReport(oData) {
// Create a hidden anchor. Open window outside of the promise otherwise browsers blocks the window.open.
var content = '';
var a = jQuery('<a style="display: none;"/>');
a.on('click', function () {
var reportWindow = window.open('', '_blank');
jQuery(reportWindow.document).rea... | javascript | function openReport(oData) {
// Create a hidden anchor. Open window outside of the promise otherwise browsers blocks the window.open.
var content = '';
var a = jQuery('<a style="display: none;"/>');
a.on('click', function () {
var reportWindow = window.open('', '_blank');
jQuery(reportWindow.document).rea... | [
"function",
"openReport",
"(",
"oData",
")",
"{",
"// Create a hidden anchor. Open window outside of the promise otherwise browsers blocks the window.open.",
"var",
"content",
"=",
"''",
";",
"var",
"a",
"=",
"jQuery",
"(",
"'<a style=\"display: none;\"/>'",
")",
";",
"a",
... | Opens a report in a new window.
@param {Object} oData - the data required to create a report | [
"Opens",
"a",
"report",
"in",
"a",
"new",
"window",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/report/ReportProvider.js#L421-L444 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/events/jquery/EventSimulation.js | function(oHandle) {
var that = this,
$this = jQuery(this),
oAdditionalConfig = {
domRef: that,
eventName: sSimEventName,
sapEventName: sSapSimEventName,
eventHandle: oHandle
};
var fnHandlerWrapper = function(oEvent) {
fnHandler(oEvent, oAdditionalConfig);
};
... | javascript | function(oHandle) {
var that = this,
$this = jQuery(this),
oAdditionalConfig = {
domRef: that,
eventName: sSimEventName,
sapEventName: sSapSimEventName,
eventHandle: oHandle
};
var fnHandlerWrapper = function(oEvent) {
fnHandler(oEvent, oAdditionalConfig);
};
... | [
"function",
"(",
"oHandle",
")",
"{",
"var",
"that",
"=",
"this",
",",
"$this",
"=",
"jQuery",
"(",
"this",
")",
",",
"oAdditionalConfig",
"=",
"{",
"domRef",
":",
"that",
",",
"eventName",
":",
"sSimEventName",
",",
"sapEventName",
":",
"sSapSimEventName"... | When binding to the simulated event with prefix is done through jQuery, this function is called and redirect the registration to the original events. Doing in this way we can simulate the event from listening to the original events. | [
"When",
"binding",
"to",
"the",
"simulated",
"event",
"with",
"prefix",
"is",
"done",
"through",
"jQuery",
"this",
"function",
"is",
"called",
"and",
"redirect",
"the",
"registration",
"to",
"the",
"original",
"events",
".",
"Doing",
"in",
"this",
"way",
"we... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/events/jquery/EventSimulation.js#L60-L78 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/events/jquery/EventSimulation.js | function(oHandle) {
var $this = jQuery(this);
var fnHandler = oHandle.__sapSimulatedEventHandler;
$this.removeData(sHandlerKey + oHandle.guid);
for (var i = 0; i < aOrigEvents.length; i++) {
jQuery.event.remove(this, aOrigEvents[i], fnHandler);
}
} | javascript | function(oHandle) {
var $this = jQuery(this);
var fnHandler = oHandle.__sapSimulatedEventHandler;
$this.removeData(sHandlerKey + oHandle.guid);
for (var i = 0; i < aOrigEvents.length; i++) {
jQuery.event.remove(this, aOrigEvents[i], fnHandler);
}
} | [
"function",
"(",
"oHandle",
")",
"{",
"var",
"$this",
"=",
"jQuery",
"(",
"this",
")",
";",
"var",
"fnHandler",
"=",
"oHandle",
".",
"__sapSimulatedEventHandler",
";",
"$this",
".",
"removeData",
"(",
"sHandlerKey",
"+",
"oHandle",
".",
"guid",
")",
";",
... | When unbinding to the simulated event with prefix is done through jQuery, this function is called and redirect the deregistration to the original events. | [
"When",
"unbinding",
"to",
"the",
"simulated",
"event",
"with",
"prefix",
"is",
"done",
"through",
"jQuery",
"this",
"function",
"is",
"called",
"and",
"redirect",
"the",
"deregistration",
"to",
"the",
"original",
"events",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/events/jquery/EventSimulation.js#L82-L89 | train | |
SAP/openui5 | src/sap.ui.fl/src/sap/ui/fl/registry/ChangeHandlerRegistration.js | function () {
var oCore = sap.ui.getCore();
var oAlreadyLoadedLibraries = oCore.getLoadedLibraries();
var aPromises = [];
jQuery.each(oAlreadyLoadedLibraries, function (sLibraryName, oLibrary) {
if (oLibrary.extensions && oLibrary.extensions.flChangeHandlers) {
aPromises.push(this._registerFlexCha... | javascript | function () {
var oCore = sap.ui.getCore();
var oAlreadyLoadedLibraries = oCore.getLoadedLibraries();
var aPromises = [];
jQuery.each(oAlreadyLoadedLibraries, function (sLibraryName, oLibrary) {
if (oLibrary.extensions && oLibrary.extensions.flChangeHandlers) {
aPromises.push(this._registerFlexCha... | [
"function",
"(",
")",
"{",
"var",
"oCore",
"=",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
";",
"var",
"oAlreadyLoadedLibraries",
"=",
"oCore",
".",
"getLoadedLibraries",
"(",
")",
";",
"var",
"aPromises",
"=",
"[",
"]",
";",
"jQuery",
".",
"each",
... | Detects already loaded libraries and registers defined changeHandlers.
@returns {Promise} Returns an empty promise when all changeHandlers from all liblraries are registered. | [
"Detects",
"already",
"loaded",
"libraries",
"and",
"registers",
"defined",
"changeHandlers",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/registry/ChangeHandlerRegistration.js#L32-L46 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/base/security/URLWhitelist.js | URLWhitelistEntry | function URLWhitelistEntry(protocol, host, port, path){
if (protocol) {
this.protocol = protocol.toUpperCase();
}
if (host) {
this.host = host.toUpperCase();
}
this.port = port;
this.path = path;
} | javascript | function URLWhitelistEntry(protocol, host, port, path){
if (protocol) {
this.protocol = protocol.toUpperCase();
}
if (host) {
this.host = host.toUpperCase();
}
this.port = port;
this.path = path;
} | [
"function",
"URLWhitelistEntry",
"(",
"protocol",
",",
"host",
",",
"port",
",",
"path",
")",
"{",
"if",
"(",
"protocol",
")",
"{",
"this",
".",
"protocol",
"=",
"protocol",
".",
"toUpperCase",
"(",
")",
";",
"}",
"if",
"(",
"host",
")",
"{",
"this",... | Entry object of the URLWhitelist
@public
@typedef {object} module:sap/base/security/URLWhitelist.Entry
@property {string} protocol The protocol of the URL
@property {string} host The host of the URL
@property {string} port The port of the URL
@property {string} path the path of the URL | [
"Entry",
"object",
"of",
"the",
"URLWhitelist"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/base/security/URLWhitelist.js#L28-L37 | train |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (aButtons) {
var iButtonsEnabled = this._getNumberOfEnabledButtons(aButtons);
if (iButtonsEnabled !== 0) {
this._hideDisabledButtons(aButtons);
}
this._iButtonsVisible = this._hideButtonsInOverflow(aButtons);
if (this._iButtonsVisible === this.getMaxButtonsDisplayed() && this._iButtonsVisib... | javascript | function (aButtons) {
var iButtonsEnabled = this._getNumberOfEnabledButtons(aButtons);
if (iButtonsEnabled !== 0) {
this._hideDisabledButtons(aButtons);
}
this._iButtonsVisible = this._hideButtonsInOverflow(aButtons);
if (this._iButtonsVisible === this.getMaxButtonsDisplayed() && this._iButtonsVisib... | [
"function",
"(",
"aButtons",
")",
"{",
"var",
"iButtonsEnabled",
"=",
"this",
".",
"_getNumberOfEnabledButtons",
"(",
"aButtons",
")",
";",
"if",
"(",
"iButtonsEnabled",
"!==",
"0",
")",
"{",
"this",
".",
"_hideDisabledButtons",
"(",
"aButtons",
")",
";",
"}... | Sets all parameters of the buttons in the non-expanded ContextMenu
@param {array} aButtons some buttons | [
"Sets",
"all",
"parameters",
"of",
"the",
"buttons",
"in",
"the",
"non",
"-",
"expanded",
"ContextMenu"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L215-L229 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (aButtons) {
this._iFirstVisibleButtonIndex = 0;
aButtons.forEach(function (oButton) {
oButton.setVisible(true);
oButton._bInOverflow = true;
});
} | javascript | function (aButtons) {
this._iFirstVisibleButtonIndex = 0;
aButtons.forEach(function (oButton) {
oButton.setVisible(true);
oButton._bInOverflow = true;
});
} | [
"function",
"(",
"aButtons",
")",
"{",
"this",
".",
"_iFirstVisibleButtonIndex",
"=",
"0",
";",
"aButtons",
".",
"forEach",
"(",
"function",
"(",
"oButton",
")",
"{",
"oButton",
".",
"setVisible",
"(",
"true",
")",
";",
"oButton",
".",
"_bInOverflow",
"=",... | Makes all buttons and their text visible
@param {array} aButtons some buttons | [
"Makes",
"all",
"buttons",
"and",
"their",
"text",
"visible"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L235-L241 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (aButtons) {
var iButtonsEnabled = 0;
for (var i = 0; i < aButtons.length; i++) {
if (aButtons[i].getEnabled()) {
iButtonsEnabled++;
if (!this._iFirstVisibleButtonIndex) {
this._iFirstVisibleButtonIndex = i;
}
}
}
return iButtonsEnabled;
} | javascript | function (aButtons) {
var iButtonsEnabled = 0;
for (var i = 0; i < aButtons.length; i++) {
if (aButtons[i].getEnabled()) {
iButtonsEnabled++;
if (!this._iFirstVisibleButtonIndex) {
this._iFirstVisibleButtonIndex = i;
}
}
}
return iButtonsEnabled;
} | [
"function",
"(",
"aButtons",
")",
"{",
"var",
"iButtonsEnabled",
"=",
"0",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"aButtons",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"aButtons",
"[",
"i",
"]",
".",
"getEnabled",
"(",
... | Returns the number of enabled button
Sets firstVisibleButtonIndex
@param {array} aButtons some buttons
@return {int} number of enabled buttons | [
"Returns",
"the",
"number",
"of",
"enabled",
"button",
"Sets",
"firstVisibleButtonIndex"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L249-L261 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (aButtons) {
var iVisibleButtons = 0;
aButtons.forEach(function (oButton) {
oButton.setVisible(oButton.getEnabled());
if (oButton.getEnabled()) {
iVisibleButtons++;
}
});
return iVisibleButtons;
} | javascript | function (aButtons) {
var iVisibleButtons = 0;
aButtons.forEach(function (oButton) {
oButton.setVisible(oButton.getEnabled());
if (oButton.getEnabled()) {
iVisibleButtons++;
}
});
return iVisibleButtons;
} | [
"function",
"(",
"aButtons",
")",
"{",
"var",
"iVisibleButtons",
"=",
"0",
";",
"aButtons",
".",
"forEach",
"(",
"function",
"(",
"oButton",
")",
"{",
"oButton",
".",
"setVisible",
"(",
"oButton",
".",
"getEnabled",
"(",
")",
")",
";",
"if",
"(",
"oBut... | Hiddes all disabled buttons and returns the number if visible buttons
@param {array} aButtons some Buttons
@return {int} the number of visible buttons | [
"Hiddes",
"all",
"disabled",
"buttons",
"and",
"returns",
"the",
"number",
"if",
"visible",
"buttons"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L268-L278 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (aButtons) {
var iVisibleButtons = 0;
for (var i = 0; i < aButtons.length; i++) {
if (iVisibleButtons < this.getMaxButtonsDisplayed() && aButtons[i].getVisible()) {
iVisibleButtons++;
} else {
aButtons[i].setVisible(false);
}
}
return iVisibleButtons;
} | javascript | function (aButtons) {
var iVisibleButtons = 0;
for (var i = 0; i < aButtons.length; i++) {
if (iVisibleButtons < this.getMaxButtonsDisplayed() && aButtons[i].getVisible()) {
iVisibleButtons++;
} else {
aButtons[i].setVisible(false);
}
}
return iVisibleButtons;
} | [
"function",
"(",
"aButtons",
")",
"{",
"var",
"iVisibleButtons",
"=",
"0",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"aButtons",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"iVisibleButtons",
"<",
"this",
".",
"getMaxButtonsDispla... | Hides the buttons in overflow
@param {array} aButtons some Buttons
@return {int} the number of visible buttons | [
"Hides",
"the",
"buttons",
"in",
"overflow"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L285-L296 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (aButtons) {
for (var i = aButtons.length - 1; i >= 0; i--) {
if (aButtons[i].getVisible()) {
aButtons[i].setVisible(false);
this.addOverflowButton();
return;
}
}
} | javascript | function (aButtons) {
for (var i = aButtons.length - 1; i >= 0; i--) {
if (aButtons[i].getVisible()) {
aButtons[i].setVisible(false);
this.addOverflowButton();
return;
}
}
} | [
"function",
"(",
"aButtons",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"aButtons",
".",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"if",
"(",
"aButtons",
"[",
"i",
"]",
".",
"getVisible",
"(",
")",
")",
"{",
"aButtons",
"... | Hides the last visible button and adds an OverflowButton
@param {array} aButtons some buttons | [
"Hides",
"the",
"last",
"visible",
"button",
"and",
"adds",
"an",
"OverflowButton"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L302-L310 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (oSource, bContextMenu) {
this.getPopover().setShowArrow(true);
var sOverlayId = (oSource.getId && oSource.getId()) || oSource.getAttribute("overlay");
var sFakeDivId = "contextMenuFakeDiv";
// get Dimensions of Overlay and Viewport
var oOverlayDimensions = this._getOverlayDimensions(sOverlayId... | javascript | function (oSource, bContextMenu) {
this.getPopover().setShowArrow(true);
var sOverlayId = (oSource.getId && oSource.getId()) || oSource.getAttribute("overlay");
var sFakeDivId = "contextMenuFakeDiv";
// get Dimensions of Overlay and Viewport
var oOverlayDimensions = this._getOverlayDimensions(sOverlayId... | [
"function",
"(",
"oSource",
",",
"bContextMenu",
")",
"{",
"this",
".",
"getPopover",
"(",
")",
".",
"setShowArrow",
"(",
"true",
")",
";",
"var",
"sOverlayId",
"=",
"(",
"oSource",
".",
"getId",
"&&",
"oSource",
".",
"getId",
"(",
")",
")",
"||",
"o... | Works out how the ContextMenu shall be placed
Sets the placement property of the popover
Places a "fakeDiv" in the DOM which the popover can be opened by
@param {sap.m.Control} oSource the overlay
@param {boolean} bContextMenu whether the ContextMenu should be opened as a context menu
@return {div} the "fakeDiv"
@priva... | [
"Works",
"out",
"how",
"the",
"ContextMenu",
"shall",
"be",
"placed",
"Sets",
"the",
"placement",
"property",
"of",
"the",
"popover",
"Places",
"a",
"fakeDiv",
"in",
"the",
"DOM",
"which",
"the",
"popover",
"can",
"be",
"opened",
"by"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L321-L391 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (bWithArrow) {
var oPopover = {};
var bCompact = this._bCompactMode;
var fArrowHeight = this._getArrowHeight(bCompact);
var iBaseFontsize = this._getBaseFontSize();
this._iFirstVisibleButtonIndex = null;
oPopover.height = parseInt(jQuery("#" + this.getPopover().getId()).css("height")) || 40;... | javascript | function (bWithArrow) {
var oPopover = {};
var bCompact = this._bCompactMode;
var fArrowHeight = this._getArrowHeight(bCompact);
var iBaseFontsize = this._getBaseFontSize();
this._iFirstVisibleButtonIndex = null;
oPopover.height = parseInt(jQuery("#" + this.getPopover().getId()).css("height")) || 40;... | [
"function",
"(",
"bWithArrow",
")",
"{",
"var",
"oPopover",
"=",
"{",
"}",
";",
"var",
"bCompact",
"=",
"this",
".",
"_bCompactMode",
";",
"var",
"fArrowHeight",
"=",
"this",
".",
"_getArrowHeight",
"(",
"bCompact",
")",
";",
"var",
"iBaseFontsize",
"=",
... | Gets the dimensions of the ContextMenu's popover
@param {boolean} bWithArrow whether the arrow width should be added
@return {object} the dimensions of the ContextMenu's popover | [
"Gets",
"the",
"dimensions",
"of",
"the",
"ContextMenu",
"s",
"popover"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L471-L490 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (bCompact) {
if (sap.ui.Device.browser.internet_explorer || sap.ui.Device.browser.edge) {
return bCompact ? 0.5 : 0.5;
} else {
return bCompact ? 0.5625 : 0.5625;
}
} | javascript | function (bCompact) {
if (sap.ui.Device.browser.internet_explorer || sap.ui.Device.browser.edge) {
return bCompact ? 0.5 : 0.5;
} else {
return bCompact ? 0.5625 : 0.5625;
}
} | [
"function",
"(",
"bCompact",
")",
"{",
"if",
"(",
"sap",
".",
"ui",
".",
"Device",
".",
"browser",
".",
"internet_explorer",
"||",
"sap",
".",
"ui",
".",
"Device",
".",
"browser",
".",
"edge",
")",
"{",
"return",
"bCompact",
"?",
"0.5",
":",
"0.5",
... | Returns the height of a popover arrow
@param {boolean} bCompact wheter ContextMenu is compact
@return {float} the height of a popover arrow | [
"Returns",
"the",
"height",
"of",
"a",
"popover",
"arrow"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L497-L503 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (sOverlayId) {
var oOverlayDimensions = jQuery("#" + sOverlayId).rect();
oOverlayDimensions.right = oOverlayDimensions.left + oOverlayDimensions.width;
oOverlayDimensions.bottom = oOverlayDimensions.top + oOverlayDimensions.height;
return oOverlayDimensions;
} | javascript | function (sOverlayId) {
var oOverlayDimensions = jQuery("#" + sOverlayId).rect();
oOverlayDimensions.right = oOverlayDimensions.left + oOverlayDimensions.width;
oOverlayDimensions.bottom = oOverlayDimensions.top + oOverlayDimensions.height;
return oOverlayDimensions;
} | [
"function",
"(",
"sOverlayId",
")",
"{",
"var",
"oOverlayDimensions",
"=",
"jQuery",
"(",
"\"#\"",
"+",
"sOverlayId",
")",
".",
"rect",
"(",
")",
";",
"oOverlayDimensions",
".",
"right",
"=",
"oOverlayDimensions",
".",
"left",
"+",
"oOverlayDimensions",
".",
... | Gets the dimensions of an overlay
@param {String} sOverlayId the overlay
@return {object} the dimensions of the overlay | [
"Gets",
"the",
"dimensions",
"of",
"an",
"overlay"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L518-L524 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function () {
var oViewport = {};
oViewport.width = window.innerWidth;
oViewport.height = window.innerHeight;
oViewport.top = parseInt(jQuery(".type_standalone").css("height")) || 0;
oViewport.bottom = oViewport.top + oViewport.height;
return oViewport;
} | javascript | function () {
var oViewport = {};
oViewport.width = window.innerWidth;
oViewport.height = window.innerHeight;
oViewport.top = parseInt(jQuery(".type_standalone").css("height")) || 0;
oViewport.bottom = oViewport.top + oViewport.height;
return oViewport;
} | [
"function",
"(",
")",
"{",
"var",
"oViewport",
"=",
"{",
"}",
";",
"oViewport",
".",
"width",
"=",
"window",
".",
"innerWidth",
";",
"oViewport",
".",
"height",
"=",
"window",
".",
"innerHeight",
";",
"oViewport",
".",
"top",
"=",
"parseInt",
"(",
"jQu... | Gets the dimensions of the viewport
@return {object} the dimensions of the viewport | [
"Gets",
"the",
"dimensions",
"of",
"the",
"viewport"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L530-L538 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function() {
var sOverflowButtonId = "OVERFLOW_BUTTON",
oButtonOptions = {
icon: "sap-icon://overflow",
type: "Transparent",
enabled: true,
press: this._onOverflowPress.bind(this),
layoutData: new FlexItemData({})
};
return this._addButton(sOverflowButtonId, oButtonOptions);
} | javascript | function() {
var sOverflowButtonId = "OVERFLOW_BUTTON",
oButtonOptions = {
icon: "sap-icon://overflow",
type: "Transparent",
enabled: true,
press: this._onOverflowPress.bind(this),
layoutData: new FlexItemData({})
};
return this._addButton(sOverflowButtonId, oButtonOptions);
} | [
"function",
"(",
")",
"{",
"var",
"sOverflowButtonId",
"=",
"\"OVERFLOW_BUTTON\"",
",",
"oButtonOptions",
"=",
"{",
"icon",
":",
"\"sap-icon://overflow\"",
",",
"type",
":",
"\"Transparent\"",
",",
"enabled",
":",
"true",
",",
"press",
":",
"this",
".",
"_onOv... | Adds a overflowButton to the ContextMenu.
@return {sap.m.ContextMenu} Reference to this in order to allow method chaining
@public | [
"Adds",
"a",
"overflowButton",
"to",
"the",
"ContextMenu",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L555-L565 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function(oButtonItem, fnContextMenuHandler, aElementOverlays) {
var fnHandler = function(oEvent) {
this.bOpen = false;
this.bOpenNew = false;
fnContextMenuHandler(this);
};
var sText = typeof oButtonItem.text === "function" ? oButtonItem.text(aElementOverlays[0]) : oButtonItem.text;
var bEnable... | javascript | function(oButtonItem, fnContextMenuHandler, aElementOverlays) {
var fnHandler = function(oEvent) {
this.bOpen = false;
this.bOpenNew = false;
fnContextMenuHandler(this);
};
var sText = typeof oButtonItem.text === "function" ? oButtonItem.text(aElementOverlays[0]) : oButtonItem.text;
var bEnable... | [
"function",
"(",
"oButtonItem",
",",
"fnContextMenuHandler",
",",
"aElementOverlays",
")",
"{",
"var",
"fnHandler",
"=",
"function",
"(",
"oEvent",
")",
"{",
"this",
".",
"bOpen",
"=",
"false",
";",
"this",
".",
"bOpenNew",
"=",
"false",
";",
"fnContextMenuH... | Adds a menu action button to the contextMenu
@param {Object} oButtonItem the button configuration item
@param {function} fnContextMenuHandler the handler function for button press event
@param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
@return {sap.m.ContextMenu} Reference to this in order to allow... | [
"Adds",
"a",
"menu",
"action",
"button",
"to",
"the",
"contextMenu"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L575-L594 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (bExplicitClose) {
if (this.getPopover()) {
if (bExplicitClose) {
this.getPopover(true).close();
this.getPopover(false).close();
}
// deletes the overflow button if there is one
if (this.getProperty("buttons").length > this.getProperty("maxButtonsDisplayed")) {
this.setProper... | javascript | function (bExplicitClose) {
if (this.getPopover()) {
if (bExplicitClose) {
this.getPopover(true).close();
this.getPopover(false).close();
}
// deletes the overflow button if there is one
if (this.getProperty("buttons").length > this.getProperty("maxButtonsDisplayed")) {
this.setProper... | [
"function",
"(",
"bExplicitClose",
")",
"{",
"if",
"(",
"this",
".",
"getPopover",
"(",
")",
")",
"{",
"if",
"(",
"bExplicitClose",
")",
"{",
"this",
".",
"getPopover",
"(",
"true",
")",
".",
"close",
"(",
")",
";",
"this",
".",
"getPopover",
"(",
... | Closes the ContextMenu.
@param {boolean} bExplicitClose true if the popover has to be closed explicitly from the contextMenu. Otherwhise the closing is handled by the popover itself
@return {sap.m.ContextMenu} Reference to this in order to allow method chaining
@public | [
"Closes",
"the",
"ContextMenu",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L619-L634 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (iIndex) {
this.setProperty("buttons", this.getProperty("buttons").splice(iIndex, 1));
this.getFlexbox(true).removeItem(iIndex);
return this.getFlexbox(false).removeItem(iIndex);
} | javascript | function (iIndex) {
this.setProperty("buttons", this.getProperty("buttons").splice(iIndex, 1));
this.getFlexbox(true).removeItem(iIndex);
return this.getFlexbox(false).removeItem(iIndex);
} | [
"function",
"(",
"iIndex",
")",
"{",
"this",
".",
"setProperty",
"(",
"\"buttons\"",
",",
"this",
".",
"getProperty",
"(",
"\"buttons\"",
")",
".",
"splice",
"(",
"iIndex",
",",
"1",
")",
")",
";",
"this",
".",
"getFlexbox",
"(",
"true",
")",
".",
"r... | Removes a button from the ContextMenu.
@param {int} iIndex the button to remove or its index or id
@return {sap.m.OverflowToolbarButton} The removed button or null
@public | [
"Removes",
"a",
"button",
"from",
"the",
"ContextMenu",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L642-L646 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (_aButtons, fnContextMenuHandler, aElementOverlays) {
this.removeAllButtons();
_aButtons.forEach(function (oButton) {
this.addMenuButton(oButton, fnContextMenuHandler, aElementOverlays);
}.bind(this));
} | javascript | function (_aButtons, fnContextMenuHandler, aElementOverlays) {
this.removeAllButtons();
_aButtons.forEach(function (oButton) {
this.addMenuButton(oButton, fnContextMenuHandler, aElementOverlays);
}.bind(this));
} | [
"function",
"(",
"_aButtons",
",",
"fnContextMenuHandler",
",",
"aElementOverlays",
")",
"{",
"this",
".",
"removeAllButtons",
"(",
")",
";",
"_aButtons",
".",
"forEach",
"(",
"function",
"(",
"oButton",
")",
"{",
"this",
".",
"addMenuButton",
"(",
"oButton",
... | Sets the Buttons of the ContextMenu
@param {Array} _aButtons the Buttons to insert
@param {function} fnContextMenuHandler - the source
@param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
@public | [
"Sets",
"the",
"Buttons",
"of",
"the",
"ContextMenu"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L687-L693 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (oEvent) {
if (document.activeElement) {
var sId = document.activeElement.id;
switch (oEvent.key) {
case "ArrowRight":
this._changeFocusOnButtons(sId);
break;
case "ArrowLeft":
this._changeFocusOnButtons(sId, true);
break;
case "ArrowUp":
this._changeFocu... | javascript | function (oEvent) {
if (document.activeElement) {
var sId = document.activeElement.id;
switch (oEvent.key) {
case "ArrowRight":
this._changeFocusOnButtons(sId);
break;
case "ArrowLeft":
this._changeFocusOnButtons(sId, true);
break;
case "ArrowUp":
this._changeFocu... | [
"function",
"(",
"oEvent",
")",
"{",
"if",
"(",
"document",
".",
"activeElement",
")",
"{",
"var",
"sId",
"=",
"document",
".",
"activeElement",
".",
"id",
";",
"switch",
"(",
"oEvent",
".",
"key",
")",
"{",
"case",
"\"ArrowRight\"",
":",
"this",
".",
... | Changes the focus inside the ContextMenu if an Arrowkey is pressed
Allows Safari users to navigate through the ContextMenu using tab and tab+shift
@param {jQuery.Event} oEvent the keyboard event | [
"Changes",
"the",
"focus",
"inside",
"the",
"ContextMenu",
"if",
"an",
"Arrowkey",
"is",
"pressed",
"Allows",
"Safari",
"users",
"to",
"navigate",
"through",
"the",
"ContextMenu",
"using",
"tab",
"and",
"tab",
"+",
"shift"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L789-L809 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (sId, bPrevious) {
this.getButtons().some(function (oButton, iIndex, aArray) {
if (sId === oButton.getId()) {
if (bPrevious) {
this._setFocusOnPreviousButton(aArray, iIndex);
} else {
this._setFocusOnNextButton(aArray, iIndex);
}
return true;
}
}.bind(this));
} | javascript | function (sId, bPrevious) {
this.getButtons().some(function (oButton, iIndex, aArray) {
if (sId === oButton.getId()) {
if (bPrevious) {
this._setFocusOnPreviousButton(aArray, iIndex);
} else {
this._setFocusOnNextButton(aArray, iIndex);
}
return true;
}
}.bind(this));
} | [
"function",
"(",
"sId",
",",
"bPrevious",
")",
"{",
"this",
".",
"getButtons",
"(",
")",
".",
"some",
"(",
"function",
"(",
"oButton",
",",
"iIndex",
",",
"aArray",
")",
"{",
"if",
"(",
"sId",
"===",
"oButton",
".",
"getId",
"(",
")",
")",
"{",
"... | Changes the focus for the Buttons in ContextMenu
@param {string} sId the ID of the currently focused buttons
@param {boolean} bPrevious if true, the previous button is selected instead of the next | [
"Changes",
"the",
"focus",
"for",
"the",
"Buttons",
"in",
"ContextMenu"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L816-L827 | train | |
SAP/openui5 | src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js | function (aButtons, iIndex) {
for (var i0 = iIndex - 1; i0 >= 0; i0--) {
if (this._setFocusOnButton(aButtons[i0])) {
return;
}
}
for (var i1 = aButtons.length - 1; i1 >= iIndex; i1--) {
if (this._setFocusOnButton(aButtons[i1])) {
return;
}
}
} | javascript | function (aButtons, iIndex) {
for (var i0 = iIndex - 1; i0 >= 0; i0--) {
if (this._setFocusOnButton(aButtons[i0])) {
return;
}
}
for (var i1 = aButtons.length - 1; i1 >= iIndex; i1--) {
if (this._setFocusOnButton(aButtons[i1])) {
return;
}
}
} | [
"function",
"(",
"aButtons",
",",
"iIndex",
")",
"{",
"for",
"(",
"var",
"i0",
"=",
"iIndex",
"-",
"1",
";",
"i0",
">=",
"0",
";",
"i0",
"--",
")",
"{",
"if",
"(",
"this",
".",
"_setFocusOnButton",
"(",
"aButtons",
"[",
"i0",
"]",
")",
")",
"{"... | Sets focus on previous button
@param {Array} aButtons the array of Buttons
@param {int} iIndex the index of the currently focused buttons | [
"Sets",
"focus",
"on",
"previous",
"button"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js#L853-L865 | train | |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/RTAElementMover.js | fnIsValidForMove | function fnIsValidForMove(oOverlay, bOnRegistration) {
var bValid = false,
oDesignTimeMetadata = oOverlay.getDesignTimeMetadata(),
oParentElementOverlay = oOverlay.getParentElementOverlay();
if (!oDesignTimeMetadata || !oParentElementOverlay) {
return false;
}
var oRelevantContainer = oOverlay.getRel... | javascript | function fnIsValidForMove(oOverlay, bOnRegistration) {
var bValid = false,
oDesignTimeMetadata = oOverlay.getDesignTimeMetadata(),
oParentElementOverlay = oOverlay.getParentElementOverlay();
if (!oDesignTimeMetadata || !oParentElementOverlay) {
return false;
}
var oRelevantContainer = oOverlay.getRel... | [
"function",
"fnIsValidForMove",
"(",
"oOverlay",
",",
"bOnRegistration",
")",
"{",
"var",
"bValid",
"=",
"false",
",",
"oDesignTimeMetadata",
"=",
"oOverlay",
".",
"getDesignTimeMetadata",
"(",
")",
",",
"oParentElementOverlay",
"=",
"oOverlay",
".",
"getParentEleme... | Check if the element is editable for the move
@param {sap.ui.dt.Overlay} oOverlay The overlay being moved or the aggregation overlay
@param {boolean} bOnRegistration if embedded, false if not
@return {boolean} true if editable | [
"Check",
"if",
"the",
"element",
"is",
"editable",
"for",
"the",
"move"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/RTAElementMover.js#L108-L153 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v2/ODataTreeBinding.js | function(iStartIndex) {
// check in the sections which where loaded
for (var i = 0; i < that._mLoadedSections[sNodeId].length; i++) {
var oSection = that._mLoadedSections[sNodeId][i];
// try to find i in the loaded sections. If i is within one of the sections it needs not to be loaded again
if (iStart... | javascript | function(iStartIndex) {
// check in the sections which where loaded
for (var i = 0; i < that._mLoadedSections[sNodeId].length; i++) {
var oSection = that._mLoadedSections[sNodeId][i];
// try to find i in the loaded sections. If i is within one of the sections it needs not to be loaded again
if (iStart... | [
"function",
"(",
"iStartIndex",
")",
"{",
"// check in the sections which where loaded",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"that",
".",
"_mLoadedSections",
"[",
"sNodeId",
"]",
".",
"length",
";",
"i",
"++",
")",
"{",
"var",
"oSection",
"=",... | check whether a start index was already requested | [
"check",
"whether",
"a",
"start",
"index",
"was",
"already",
"requested"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v2/ODataTreeBinding.js#L609-L620 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v2/ODataTreeBinding.js | function (sKey) {
var aFiltered = FilterProcessor.apply([sKey], oCombinedFilter, function(vRef, sPath) {
var oContext = that.oModel.getContext('/' + vRef);
return that.oModel.getProperty(sPath, oContext);
});
return aFiltered.length > 0;
} | javascript | function (sKey) {
var aFiltered = FilterProcessor.apply([sKey], oCombinedFilter, function(vRef, sPath) {
var oContext = that.oModel.getContext('/' + vRef);
return that.oModel.getProperty(sPath, oContext);
});
return aFiltered.length > 0;
} | [
"function",
"(",
"sKey",
")",
"{",
"var",
"aFiltered",
"=",
"FilterProcessor",
".",
"apply",
"(",
"[",
"sKey",
"]",
",",
"oCombinedFilter",
",",
"function",
"(",
"vRef",
",",
"sPath",
")",
"{",
"var",
"oContext",
"=",
"that",
".",
"oModel",
".",
"getCo... | filter function for recursive filtering, checks if a single key matches the filters | [
"filter",
"function",
"for",
"recursive",
"filtering",
"checks",
"if",
"a",
"single",
"key",
"matches",
"the",
"filters"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v2/ODataTreeBinding.js#L1647-L1653 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v2/ODataTreeBinding.js | function(sKey, sPath) {
oContext = that.oModel.getContext('/' + sKey);
return that.oModel.getProperty(sPath, oContext);
} | javascript | function(sKey, sPath) {
oContext = that.oModel.getContext('/' + sKey);
return that.oModel.getProperty(sPath, oContext);
} | [
"function",
"(",
"sKey",
",",
"sPath",
")",
"{",
"oContext",
"=",
"that",
".",
"oModel",
".",
"getContext",
"(",
"'/'",
"+",
"sKey",
")",
";",
"return",
"that",
".",
"oModel",
".",
"getProperty",
"(",
"sPath",
",",
"oContext",
")",
";",
"}"
] | retrieves the sort value | [
"retrieves",
"the",
"sort",
"value"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v2/ODataTreeBinding.js#L1791-L1794 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/rules/TableHelper.support.js | function(oRuleDef, oRuleset) {
oRuleDef = TableSupportHelper.normalizeRule(oRuleDef);
var sResult = oRuleset.addRule(oRuleDef);
if (sResult != "success") {
Log.warning("Support Rule '" + oRuleDef.id + "' for library sap.ui.table not applied: " + sResult);
}
} | javascript | function(oRuleDef, oRuleset) {
oRuleDef = TableSupportHelper.normalizeRule(oRuleDef);
var sResult = oRuleset.addRule(oRuleDef);
if (sResult != "success") {
Log.warning("Support Rule '" + oRuleDef.id + "' for library sap.ui.table not applied: " + sResult);
}
} | [
"function",
"(",
"oRuleDef",
",",
"oRuleset",
")",
"{",
"oRuleDef",
"=",
"TableSupportHelper",
".",
"normalizeRule",
"(",
"oRuleDef",
")",
";",
"var",
"sResult",
"=",
"oRuleset",
".",
"addRule",
"(",
"oRuleDef",
")",
";",
"if",
"(",
"sResult",
"!=",
"\"suc... | Normalizes the given rule definition and adds it to the given Ruleset.
@see #normalizeRule
@param {object} oRuleDef The rule definition
@param {sap.ui.support.supportRules.RuleSet} oRuleset The ruleset | [
"Normalizes",
"the",
"given",
"rule",
"definition",
"and",
"adds",
"it",
"to",
"the",
"given",
"Ruleset",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/rules/TableHelper.support.js#L65-L71 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/rules/TableHelper.support.js | function(oIssueManager, sText, sSeverity, sControlId) {
oIssueManager.addIssue({
severity: sSeverity || Severity.Medium,
details: sText,
context: {id: sControlId || "WEBPAGE"}
});
} | javascript | function(oIssueManager, sText, sSeverity, sControlId) {
oIssueManager.addIssue({
severity: sSeverity || Severity.Medium,
details: sText,
context: {id: sControlId || "WEBPAGE"}
});
} | [
"function",
"(",
"oIssueManager",
",",
"sText",
",",
"sSeverity",
",",
"sControlId",
")",
"{",
"oIssueManager",
".",
"addIssue",
"(",
"{",
"severity",
":",
"sSeverity",
"||",
"Severity",
".",
"Medium",
",",
"details",
":",
"sText",
",",
"context",
":",
"{"... | Adds an issue with the given text, severity and context to the given issue manager.
@param {sap.ui.support.IssueManager} oIssueManager The issue manager
@param {string} sText The text of the issue.
@param {sap.ui.support.Severity} [sSeverity] The severity of the issue, if nothing is given Warning is used.
@param ... | [
"Adds",
"an",
"issue",
"with",
"the",
"given",
"text",
"severity",
"and",
"context",
"to",
"the",
"given",
"issue",
"manager",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/rules/TableHelper.support.js#L93-L99 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/rules/TableHelper.support.js | function(oScope, bVisibleOnly, sType) {
var mElements = oScope.getElements();
var aResult = [];
for (var n in mElements) {
var oElement = mElements[n];
if (oElement.isA(sType)) {
if (bVisibleOnly && oElement.getDomRef() || !bVisibleOnly) {
aResult.push(oElement);
}
}
}
return ... | javascript | function(oScope, bVisibleOnly, sType) {
var mElements = oScope.getElements();
var aResult = [];
for (var n in mElements) {
var oElement = mElements[n];
if (oElement.isA(sType)) {
if (bVisibleOnly && oElement.getDomRef() || !bVisibleOnly) {
aResult.push(oElement);
}
}
}
return ... | [
"function",
"(",
"oScope",
",",
"bVisibleOnly",
",",
"sType",
")",
"{",
"var",
"mElements",
"=",
"oScope",
".",
"getElements",
"(",
")",
";",
"var",
"aResult",
"=",
"[",
"]",
";",
"for",
"(",
"var",
"n",
"in",
"mElements",
")",
"{",
"var",
"oElement"... | Return all existing control instances of the given type.
@param {object} oScope The scope as given in the rule check function.
@param {boolean} bVisibleOnly Whether all existing controls or only the ones which currently have a DOM reference should be returned.
@param {string} sType The type
@returns {sap.ui.core.Elemen... | [
"Return",
"all",
"existing",
"control",
"instances",
"of",
"the",
"given",
"type",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/rules/TableHelper.support.js#L108-L120 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/rules/TableHelper.support.js | function(fnFilter, fnCheck) {
var aLog = Log.getLogEntries(); //oScope.getLoggedObjects(); /*getLoggedObjects returns only log entries with supportinfo*/
var oLogEntry;
for (var i = 0; i < aLog.length; i++) {
oLogEntry = aLog[i];
if (fnFilter(oLogEntry)) {
if (fnCheck(oLogEntry)) {
return;
... | javascript | function(fnFilter, fnCheck) {
var aLog = Log.getLogEntries(); //oScope.getLoggedObjects(); /*getLoggedObjects returns only log entries with supportinfo*/
var oLogEntry;
for (var i = 0; i < aLog.length; i++) {
oLogEntry = aLog[i];
if (fnFilter(oLogEntry)) {
if (fnCheck(oLogEntry)) {
return;
... | [
"function",
"(",
"fnFilter",
",",
"fnCheck",
")",
"{",
"var",
"aLog",
"=",
"Log",
".",
"getLogEntries",
"(",
")",
";",
"//oScope.getLoggedObjects(); /*getLoggedObjects returns only log entries with supportinfo*/",
"var",
"oLogEntry",
";",
"for",
"(",
"var",
"i",
"=",
... | Iterates over the available log entries.
Both parameter functions gets a log entry object passed in with the following properties:
<ul>
<li>{jQuery.sap.log.Level} oLogEntry.level One of the log levels FATAL, ERROR, WARNING, INFO, DEBUG, TRACE</li>
<li>{string} oLogEntry.message The logged message</li>
<li>{string}... | [
"Iterates",
"over",
"the",
"available",
"log",
"entries",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/rules/TableHelper.support.js#L141-L152 | train | |
SAP/openui5 | src/sap.ui.ux3/src/sap/ui/ux3/Exact.js | function(oThis, oEvent){
oThis.fireRefineSearch({
query: oThis._sSearchQuery,
changedAttribute: oEvent.getParameter("attribute"),
allSelectedAttributes: oEvent.getParameter("allAttributes")
});
} | javascript | function(oThis, oEvent){
oThis.fireRefineSearch({
query: oThis._sSearchQuery,
changedAttribute: oEvent.getParameter("attribute"),
allSelectedAttributes: oEvent.getParameter("allAttributes")
});
} | [
"function",
"(",
"oThis",
",",
"oEvent",
")",
"{",
"oThis",
".",
"fireRefineSearch",
"(",
"{",
"query",
":",
"oThis",
".",
"_sSearchQuery",
",",
"changedAttribute",
":",
"oEvent",
".",
"getParameter",
"(",
"\"attribute\"",
")",
",",
"allSelectedAttributes",
":... | Handles attribute selections | [
"Handles",
"attribute",
"selections"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/Exact.js#L229-L235 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/cache/CacheManager.js | function () {
var pInstanceCreation, oMsr = startMeasurements("_getInstance"),
that = this;
pInstanceCreation = new Promise(function (resolve, reject) {
var oInstance;
Log.debug("Cache Manager: Initialization...");
if (!CacheManager._instance) {
oInstance = that._findImplementation()... | javascript | function () {
var pInstanceCreation, oMsr = startMeasurements("_getInstance"),
that = this;
pInstanceCreation = new Promise(function (resolve, reject) {
var oInstance;
Log.debug("Cache Manager: Initialization...");
if (!CacheManager._instance) {
oInstance = that._findImplementation()... | [
"function",
"(",
")",
"{",
"var",
"pInstanceCreation",
",",
"oMsr",
"=",
"startMeasurements",
"(",
"\"_getInstance\"",
")",
",",
"that",
"=",
"this",
";",
"pInstanceCreation",
"=",
"new",
"Promise",
"(",
"function",
"(",
"resolve",
",",
"reject",
")",
"{",
... | Obtains a concreate implementation according to set of rules.
@returns {Promise}
@private | [
"Obtains",
"a",
"concreate",
"implementation",
"according",
"to",
"set",
"of",
"rules",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/cache/CacheManager.js#L72-L99 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/cache/CacheManager.js | function (key, value) {
var pSet, oMsr = startMeasurements("set", key);
Log.debug("Cache Manager: Setting value of type[" + typeof value + "] with key [" + key + "]");
pSet = this._callInstanceMethod("set", arguments).then(function callInstanceHandler() {
Log.debug("Cache Manager: Setting key [" + key... | javascript | function (key, value) {
var pSet, oMsr = startMeasurements("set", key);
Log.debug("Cache Manager: Setting value of type[" + typeof value + "] with key [" + key + "]");
pSet = this._callInstanceMethod("set", arguments).then(function callInstanceHandler() {
Log.debug("Cache Manager: Setting key [" + key... | [
"function",
"(",
"key",
",",
"value",
")",
"{",
"var",
"pSet",
",",
"oMsr",
"=",
"startMeasurements",
"(",
"\"set\"",
",",
"key",
")",
";",
"Log",
".",
"debug",
"(",
"\"Cache Manager: Setting value of type[\"",
"+",
"typeof",
"value",
"+",
"\"] with key [\"",
... | Stores or updates value for given key.
@param {string|number} key the key to associate the value with. Null is not accepted
@param {*} value any value that match the structured clone algorithm. Undefined is not accepted.
@see https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
@r... | [
"Stores",
"or",
"updates",
"value",
"for",
"given",
"key",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/cache/CacheManager.js#L124-L139 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/cache/CacheManager.js | function (key) {
var pGet,
oMsr = startMeasurements("get", key);
Log.debug("Cache Manager: Getting key [" + key + "]");
pGet = this._callInstanceMethod("get", arguments).then(function callInstanceHandler(v) {
Log.debug("Cache Manager: Getting key [" + key + "] done");
oMsr.endAsync();
... | javascript | function (key) {
var pGet,
oMsr = startMeasurements("get", key);
Log.debug("Cache Manager: Getting key [" + key + "]");
pGet = this._callInstanceMethod("get", arguments).then(function callInstanceHandler(v) {
Log.debug("Cache Manager: Getting key [" + key + "] done");
oMsr.endAsync();
... | [
"function",
"(",
"key",
")",
"{",
"var",
"pGet",
",",
"oMsr",
"=",
"startMeasurements",
"(",
"\"get\"",
",",
"key",
")",
";",
"Log",
".",
"debug",
"(",
"\"Cache Manager: Getting key [\"",
"+",
"key",
"+",
"\"]\"",
")",
";",
"pGet",
"=",
"this",
".",
"_... | Retrieves a value for given key.
@param key the key to retrieve a value for
@returns {Promise} a promise that would be resolved in case of successful operation or rejected with
value of the error message if the operation fails. It resolves with a value that is either:
<ul>
<li>undefined - the entry does not exist</li>
... | [
"Retrieves",
"a",
"value",
"for",
"given",
"key",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/cache/CacheManager.js#L152-L169 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/cache/CacheManager.js | function (key) {
var pHas, oMsr = startMeasurements("has", key);
Log.debug("Cache Manager: has key [" + key + "] called");
pHas = this._callInstanceMethod("has", arguments).then(function callInstanceHandler(result) {
oMsr.endAsync();
Log.debug("Cache Manager: has key [" + key + "] returned " + re... | javascript | function (key) {
var pHas, oMsr = startMeasurements("has", key);
Log.debug("Cache Manager: has key [" + key + "] called");
pHas = this._callInstanceMethod("has", arguments).then(function callInstanceHandler(result) {
oMsr.endAsync();
Log.debug("Cache Manager: has key [" + key + "] returned " + re... | [
"function",
"(",
"key",
")",
"{",
"var",
"pHas",
",",
"oMsr",
"=",
"startMeasurements",
"(",
"\"has\"",
",",
"key",
")",
";",
"Log",
".",
"debug",
"(",
"\"Cache Manager: has key [\"",
"+",
"key",
"+",
"\"] called\"",
")",
";",
"pHas",
"=",
"this",
".",
... | Checks whether certain entry exists.
@param {string|number} key the key to look for. Null is not accepted.
@returns {Promise} a promise that would be resolved in case of successful operation or rejected with
value of the error message if the operation fails. It resolves with a boolean value of true - if an entry
with t... | [
"Checks",
"whether",
"certain",
"entry",
"exists",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/cache/CacheManager.js#L179-L190 | 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.