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 | src/sap.ui.core/src/sap/ui/core/Configuration.js | function(sFormatId) {
check(!sFormatId || M_ABAP_TIME_FORMAT_PATTERN.hasOwnProperty(sFormatId), "sFormatId must be one of ['0','1','2','3','4'] or empty");
var mChanges = this.oConfiguration._collect();
this.sLegacyTimeFormat = mChanges.legacyTimeFormat = sFormatId = sFormatId || "";
this.setTimePattern("sh... | javascript | function(sFormatId) {
check(!sFormatId || M_ABAP_TIME_FORMAT_PATTERN.hasOwnProperty(sFormatId), "sFormatId must be one of ['0','1','2','3','4'] or empty");
var mChanges = this.oConfiguration._collect();
this.sLegacyTimeFormat = mChanges.legacyTimeFormat = sFormatId = sFormatId || "";
this.setTimePattern("sh... | [
"function",
"(",
"sFormatId",
")",
"{",
"check",
"(",
"!",
"sFormatId",
"||",
"M_ABAP_TIME_FORMAT_PATTERN",
".",
"hasOwnProperty",
"(",
"sFormatId",
")",
",",
"\"sFormatId must be one of ['0','1','2','3','4'] or empty\"",
")",
";",
"var",
"mChanges",
"=",
"this",
".",... | Allows to specify one of the legacy ABAP time formats.
This method sets the time patterns for 'short' and 'medium' style to the corresponding ABAP
formats and sets the day period texts to "AM"/"PM" or "am"/"pm" respectively. When called
with a null or undefined format id, any previously applied format will be removed.... | [
"Allows",
"to",
"specify",
"one",
"of",
"the",
"legacy",
"ABAP",
"time",
"formats",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Configuration.js#L2092-L2101 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/Configuration.js | function(sFormatId) {
sFormatId = sFormatId ? sFormatId.toUpperCase() : "";
check(!sFormatId || M_ABAP_NUMBER_FORMAT_SYMBOLS.hasOwnProperty(sFormatId), "sFormatId must be one of [' ','X','Y'] or empty");
var mChanges = this.oConfiguration._collect();
this.sLegacyNumberFormat = mChanges.legacyNumberFormat = ... | javascript | function(sFormatId) {
sFormatId = sFormatId ? sFormatId.toUpperCase() : "";
check(!sFormatId || M_ABAP_NUMBER_FORMAT_SYMBOLS.hasOwnProperty(sFormatId), "sFormatId must be one of [' ','X','Y'] or empty");
var mChanges = this.oConfiguration._collect();
this.sLegacyNumberFormat = mChanges.legacyNumberFormat = ... | [
"function",
"(",
"sFormatId",
")",
"{",
"sFormatId",
"=",
"sFormatId",
"?",
"sFormatId",
".",
"toUpperCase",
"(",
")",
":",
"\"\"",
";",
"check",
"(",
"!",
"sFormatId",
"||",
"M_ABAP_NUMBER_FORMAT_SYMBOLS",
".",
"hasOwnProperty",
"(",
"sFormatId",
")",
",",
... | Allows to specify one of the legacy ABAP number format.
This method will modify the 'group' and 'decimal' symbols. When called with a null
or undefined format id, any previously applied format will be removed.
After changing the legacy number format, the framework tries to update localization
specific parts of the UI... | [
"Allows",
"to",
"specify",
"one",
"of",
"the",
"legacy",
"ABAP",
"number",
"format",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Configuration.js#L2126-L2135 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/Configuration.js | function(aMappings) {
check(Array.isArray(aMappings), "aMappings must be an Array");
var mChanges = this.oConfiguration._collect();
this.aLegacyDateCalendarCustomizing = mChanges.legacyDateCalendarCustomizing = aMappings;
this.oConfiguration._endCollect();
return this;
} | javascript | function(aMappings) {
check(Array.isArray(aMappings), "aMappings must be an Array");
var mChanges = this.oConfiguration._collect();
this.aLegacyDateCalendarCustomizing = mChanges.legacyDateCalendarCustomizing = aMappings;
this.oConfiguration._endCollect();
return this;
} | [
"function",
"(",
"aMappings",
")",
"{",
"check",
"(",
"Array",
".",
"isArray",
"(",
"aMappings",
")",
",",
"\"aMappings must be an Array\"",
")",
";",
"var",
"mChanges",
"=",
"this",
".",
"oConfiguration",
".",
"_collect",
"(",
")",
";",
"this",
".",
"aLeg... | Allows to specify the customizing data for Islamic calendar support
@param {object[]} aMappings contains the customizing data for the support of Islamic calendar.
@param {string} aMappings[].dateFormat The date format
@param {string} aMappings[].islamicMonthStart The Islamic date
@param {string} aMappings[].gregDate T... | [
"Allows",
"to",
"specify",
"the",
"customizing",
"data",
"for",
"Islamic",
"calendar",
"support"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Configuration.js#L2147-L2154 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableAccExtension.js | function(oEvent) {
var oTable = this.getTable();
if (!oTable || TableUtils.getCellInfo(oEvent.target).cell == null) {
return;
}
if (oTable._mTimeouts._cleanupACCExtension) {
clearTimeout(oTable._mTimeouts._cleanupACCExtension);
oTable._mTimeouts._cleanupACCExtension = null;
}
this.updateAc... | javascript | function(oEvent) {
var oTable = this.getTable();
if (!oTable || TableUtils.getCellInfo(oEvent.target).cell == null) {
return;
}
if (oTable._mTimeouts._cleanupACCExtension) {
clearTimeout(oTable._mTimeouts._cleanupACCExtension);
oTable._mTimeouts._cleanupACCExtension = null;
}
this.updateAc... | [
"function",
"(",
"oEvent",
")",
"{",
"var",
"oTable",
"=",
"this",
".",
"getTable",
"(",
")",
";",
"if",
"(",
"!",
"oTable",
"||",
"TableUtils",
".",
"getCellInfo",
"(",
"oEvent",
".",
"target",
")",
".",
"cell",
"==",
"null",
")",
"{",
"return",
"... | Delegate for the focusin event.
@private
@param {jQuery.Event} oEvent The event object. | [
"Delegate",
"for",
"the",
"focusin",
"event",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableAccExtension.js#L958-L968 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableAccExtension.js | function(oEvent) {
var oTable = this.getTable();
if (!oTable) {
return;
}
oTable.$("sapUiTableGridCnt").attr("role", ExtensionHelper.getAriaAttributesFor(this, "CONTENT", {}).role);
oTable._mTimeouts._cleanupACCExtension = setTimeout(function() {
var oTable = this.getTable();
if (!oTable) {
... | javascript | function(oEvent) {
var oTable = this.getTable();
if (!oTable) {
return;
}
oTable.$("sapUiTableGridCnt").attr("role", ExtensionHelper.getAriaAttributesFor(this, "CONTENT", {}).role);
oTable._mTimeouts._cleanupACCExtension = setTimeout(function() {
var oTable = this.getTable();
if (!oTable) {
... | [
"function",
"(",
"oEvent",
")",
"{",
"var",
"oTable",
"=",
"this",
".",
"getTable",
"(",
")",
";",
"if",
"(",
"!",
"oTable",
")",
"{",
"return",
";",
"}",
"oTable",
".",
"$",
"(",
"\"sapUiTableGridCnt\"",
")",
".",
"attr",
"(",
"\"role\"",
",",
"Ex... | Delegate for the focusout event.
@private
@param {jQuery.Event} oEvent The event object. | [
"Delegate",
"for",
"the",
"focusout",
"event",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableAccExtension.js#L976-L992 | train | |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayout.js | function(aPositions) {
for (var index = 0; index < aPositions.length; index++) {
var oPosition = aPositions[index];
var oChildControl = oPosition.getControl();
if (oChildControl) {
AbsoluteLayout.cleanUpControl(oChildControl);
}
}
} | javascript | function(aPositions) {
for (var index = 0; index < aPositions.length; index++) {
var oPosition = aPositions[index];
var oChildControl = oPosition.getControl();
if (oChildControl) {
AbsoluteLayout.cleanUpControl(oChildControl);
}
}
} | [
"function",
"(",
"aPositions",
")",
"{",
"for",
"(",
"var",
"index",
"=",
"0",
";",
"index",
"<",
"aPositions",
".",
"length",
";",
"index",
"++",
")",
"{",
"var",
"oPosition",
"=",
"aPositions",
"[",
"index",
"]",
";",
"var",
"oChildControl",
"=",
"... | Cleanup modifications of all child controls of the given positions.
@private | [
"Cleanup",
"modifications",
"of",
"all",
"child",
"controls",
"of",
"the",
"given",
"positions",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayout.js#L520-L528 | train | |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayout.js | function(oControl){
var bAdapted = false;
if (oControl.getParent() && oControl.getParent().getComputedPosition) {
var oPos = oControl.getParent().getComputedPosition();
if (oPos.top && oPos.bottom || oPos.height) {
jQuery(oControl.getDomRef()).css("height", "100%");
bAdapted = true;
}
if (oPos.l... | javascript | function(oControl){
var bAdapted = false;
if (oControl.getParent() && oControl.getParent().getComputedPosition) {
var oPos = oControl.getParent().getComputedPosition();
if (oPos.top && oPos.bottom || oPos.height) {
jQuery(oControl.getDomRef()).css("height", "100%");
bAdapted = true;
}
if (oPos.l... | [
"function",
"(",
"oControl",
")",
"{",
"var",
"bAdapted",
"=",
"false",
";",
"if",
"(",
"oControl",
".",
"getParent",
"(",
")",
"&&",
"oControl",
".",
"getParent",
"(",
")",
".",
"getComputedPosition",
")",
"{",
"var",
"oPos",
"=",
"oControl",
".",
"ge... | Adapt the sizes of controls if necessary.
@private | [
"Adapt",
"the",
"sizes",
"of",
"controls",
"if",
"necessary",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayout.js#L564-L581 | train | |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayout.js | function(oThis, sProp, oValue, sChangeType) {
var bHasDomRef = !!oThis.getDomRef();
oThis.setProperty(sProp, oValue, bHasDomRef);
if (bHasDomRef) {
oThis.contentChanged(null, sChangeType);
}
return oThis;
} | javascript | function(oThis, sProp, oValue, sChangeType) {
var bHasDomRef = !!oThis.getDomRef();
oThis.setProperty(sProp, oValue, bHasDomRef);
if (bHasDomRef) {
oThis.contentChanged(null, sChangeType);
}
return oThis;
} | [
"function",
"(",
"oThis",
",",
"sProp",
",",
"oValue",
",",
"sChangeType",
")",
"{",
"var",
"bHasDomRef",
"=",
"!",
"!",
"oThis",
".",
"getDomRef",
"(",
")",
";",
"oThis",
".",
"setProperty",
"(",
"sProp",
",",
"oValue",
",",
"bHasDomRef",
")",
";",
... | Sets the value of the given property and triggers Dom change if
possible.
@private | [
"Sets",
"the",
"value",
"of",
"the",
"given",
"property",
"and",
"triggers",
"Dom",
"change",
"if",
"possible",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/layout/AbsoluteLayout.js#L590-L597 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/type/DateTime.js | adjustConstraints | function adjustConstraints(oType, oConstraints) {
var oAdjustedConstraints = {};
if (oConstraints) {
switch (oConstraints.displayFormat) {
case "Date":
oAdjustedConstraints.isDateOnly = true;
break;
case undefined:
break;
default:
Log.warning("Illegal displayFormat: " + oConstraints.dis... | javascript | function adjustConstraints(oType, oConstraints) {
var oAdjustedConstraints = {};
if (oConstraints) {
switch (oConstraints.displayFormat) {
case "Date":
oAdjustedConstraints.isDateOnly = true;
break;
case undefined:
break;
default:
Log.warning("Illegal displayFormat: " + oConstraints.dis... | [
"function",
"adjustConstraints",
"(",
"oType",
",",
"oConstraints",
")",
"{",
"var",
"oAdjustedConstraints",
"=",
"{",
"}",
";",
"if",
"(",
"oConstraints",
")",
"{",
"switch",
"(",
"oConstraints",
".",
"displayFormat",
")",
"{",
"case",
"\"Date\"",
":",
"oAd... | Adjusts the constraints for DateTimeBase.
@param {sap.ui.model.odata.type.DateTime} oType
the type
@param {object} [oConstraints]
constraints, see {@link #constructor}
@returns {object}
the constraints adjusted for DateTimeBase | [
"Adjusts",
"the",
"constraints",
"for",
"DateTimeBase",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/type/DateTime.js#L21-L38 | train |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableMenuUtils.js | function(oTable, iColumnIndex, bHoverFirstMenuItem, oCell) {
if (!oTable ||
iColumnIndex == null || iColumnIndex < 0) {
return;
}
if (bHoverFirstMenuItem == null) {
bHoverFirstMenuItem = false;
}
var oColumns = oTable.getColumns();
if (iColumnIndex >= oColumns.length) {
return;
}
... | javascript | function(oTable, iColumnIndex, bHoverFirstMenuItem, oCell) {
if (!oTable ||
iColumnIndex == null || iColumnIndex < 0) {
return;
}
if (bHoverFirstMenuItem == null) {
bHoverFirstMenuItem = false;
}
var oColumns = oTable.getColumns();
if (iColumnIndex >= oColumns.length) {
return;
}
... | [
"function",
"(",
"oTable",
",",
"iColumnIndex",
",",
"bHoverFirstMenuItem",
",",
"oCell",
")",
"{",
"if",
"(",
"!",
"oTable",
"||",
"iColumnIndex",
"==",
"null",
"||",
"iColumnIndex",
"<",
"0",
")",
"{",
"return",
";",
"}",
"if",
"(",
"bHoverFirstMenuItem"... | Opens the context menu of a column.
If context menus of other columns are open, they will be closed.
@param {sap.ui.table.Table} oTable Instance of the table.
@param {int} iColumnIndex The index of the column to open the context menu on.
@param {boolean} [bHoverFirstMenuItem] If <code>true</code>, the first item in th... | [
"Opens",
"the",
"context",
"menu",
"of",
"a",
"column",
".",
"If",
"context",
"menus",
"of",
"other",
"columns",
"are",
"open",
"they",
"will",
"be",
"closed",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableMenuUtils.js#L149-L183 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableMenuUtils.js | function(oTable, iColumnIndex) {
if (!oTable ||
iColumnIndex == null || iColumnIndex < 0) {
return;
}
var oColumns = oTable.getColumns();
if (iColumnIndex >= oColumns.length) {
return;
}
var oColumn = oColumns[iColumnIndex];
oColumn._closeMenu();
} | javascript | function(oTable, iColumnIndex) {
if (!oTable ||
iColumnIndex == null || iColumnIndex < 0) {
return;
}
var oColumns = oTable.getColumns();
if (iColumnIndex >= oColumns.length) {
return;
}
var oColumn = oColumns[iColumnIndex];
oColumn._closeMenu();
} | [
"function",
"(",
"oTable",
",",
"iColumnIndex",
")",
"{",
"if",
"(",
"!",
"oTable",
"||",
"iColumnIndex",
"==",
"null",
"||",
"iColumnIndex",
"<",
"0",
")",
"{",
"return",
";",
"}",
"var",
"oColumns",
"=",
"oTable",
".",
"getColumns",
"(",
")",
";",
... | Closes the context menu of a column.
@param {sap.ui.table.Table} oTable Instance of the table.
@param {int} iColumnIndex The index of the column to close the context menu on.
@see openContextMenu
@see openColumnContextMenu
@private | [
"Closes",
"the",
"context",
"menu",
"of",
"a",
"column",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableMenuUtils.js#L194-L207 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableMenuUtils.js | function(oTable) {
if (!oTable) {
return;
}
var oMenu = oTable._oCellContextMenu;
var bMenuOpen = oMenu != null && oMenu.bOpen;
if (bMenuOpen) {
oMenu.close();
}
} | javascript | function(oTable) {
if (!oTable) {
return;
}
var oMenu = oTable._oCellContextMenu;
var bMenuOpen = oMenu != null && oMenu.bOpen;
if (bMenuOpen) {
oMenu.close();
}
} | [
"function",
"(",
"oTable",
")",
"{",
"if",
"(",
"!",
"oTable",
")",
"{",
"return",
";",
"}",
"var",
"oMenu",
"=",
"oTable",
".",
"_oCellContextMenu",
";",
"var",
"bMenuOpen",
"=",
"oMenu",
"!=",
"null",
"&&",
"oMenu",
".",
"bOpen",
";",
"if",
"(",
... | Closes the currently open data cell context menu.
Index information are not required as there is only one data cell context menu object and therefore only this one can be open.
@param {sap.ui.table.Table} oTable Instance of the table.
@see openContextMenu
@see openDataCellContextMenu
@private | [
"Closes",
"the",
"currently",
"open",
"data",
"cell",
"context",
"menu",
".",
"Index",
"information",
"are",
"not",
"required",
"as",
"there",
"is",
"only",
"one",
"data",
"cell",
"context",
"menu",
"object",
"and",
"therefore",
"only",
"this",
"one",
"can",... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableMenuUtils.js#L313-L324 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableMenuUtils.js | function(oTable) {
if (!oTable || !oTable._oCellContextMenu) {
return;
}
oTable._oCellContextMenu.destroy();
oTable._oCellContextMenu = null;
} | javascript | function(oTable) {
if (!oTable || !oTable._oCellContextMenu) {
return;
}
oTable._oCellContextMenu.destroy();
oTable._oCellContextMenu = null;
} | [
"function",
"(",
"oTable",
")",
"{",
"if",
"(",
"!",
"oTable",
"||",
"!",
"oTable",
".",
"_oCellContextMenu",
")",
"{",
"return",
";",
"}",
"oTable",
".",
"_oCellContextMenu",
".",
"destroy",
"(",
")",
";",
"oTable",
".",
"_oCellContextMenu",
"=",
"null"... | Destroys the cell context menu.
@param {sap.ui.table.Table} oTable Instance of the table. | [
"Destroys",
"the",
"cell",
"context",
"menu",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableMenuUtils.js#L331-L338 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/qunit/utils/MemoryLeakCheck.js | function(assert, mActual, mExpected, sMessage) {
var aUnexpectedElements = [];
for (var sId in mActual) {
if (!mExpected[sId]) {
aUnexpectedElements.push(mActual[sId]);
}
}
// enrich with helpful info to more easily identify the leaked control
for (var i = 0; i < aUnexpectedElements.length; i++) {... | javascript | function(assert, mActual, mExpected, sMessage) {
var aUnexpectedElements = [];
for (var sId in mActual) {
if (!mExpected[sId]) {
aUnexpectedElements.push(mActual[sId]);
}
}
// enrich with helpful info to more easily identify the leaked control
for (var i = 0; i < aUnexpectedElements.length; i++) {... | [
"function",
"(",
"assert",
",",
"mActual",
",",
"mExpected",
",",
"sMessage",
")",
"{",
"var",
"aUnexpectedElements",
"=",
"[",
"]",
";",
"for",
"(",
"var",
"sId",
"in",
"mActual",
")",
"{",
"if",
"(",
"!",
"mExpected",
"[",
"sId",
"]",
")",
"{",
"... | asserts that both given maps have the same entries | [
"asserts",
"that",
"both",
"given",
"maps",
"have",
"the",
"same",
"entries"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/qunit/utils/MemoryLeakCheck.js#L156-L174 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v2/ODataListBinding.js | getSortComparator | function getSortComparator(fnCompare) {
return function(vValue1, vValue2) {
if (vValue1 === vValue2) {
return 0;
}
if (vValue1 === null) {
return -1;
}
if (vValue2 === null) {
return 1;
}
return fnCompare(vValue1, vValue2);
};
} | javascript | function getSortComparator(fnCompare) {
return function(vValue1, vValue2) {
if (vValue1 === vValue2) {
return 0;
}
if (vValue1 === null) {
return -1;
}
if (vValue2 === null) {
return 1;
}
return fnCompare(vValue1, vValue2);
};
} | [
"function",
"getSortComparator",
"(",
"fnCompare",
")",
"{",
"return",
"function",
"(",
"vValue1",
",",
"vValue2",
")",
"{",
"if",
"(",
"vValue1",
"===",
"vValue2",
")",
"{",
"return",
"0",
";",
"}",
"if",
"(",
"vValue1",
"===",
"null",
")",
"{",
"retu... | Creates a comparator usable for sorting.
The OData comparators return "NaN" for comparisons containing null values. While this is a valid result when used for filtering,
for sorting the null values need to be put in order, so the comparator must return either -1 or 1 instead, to have null sorted
at the top in ascendin... | [
"Creates",
"a",
"comparator",
"usable",
"for",
"sorting",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v2/ODataListBinding.js#L1269-L1282 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/RenderManager.js | reset | function reset() {
aBuffer = that.aBuffer = [];
aRenderedControls = that.aRenderedControls = [];
aStyleStack = that.aStyleStack = [{}];
} | javascript | function reset() {
aBuffer = that.aBuffer = [];
aRenderedControls = that.aRenderedControls = [];
aStyleStack = that.aStyleStack = [{}];
} | [
"function",
"reset",
"(",
")",
"{",
"aBuffer",
"=",
"that",
".",
"aBuffer",
"=",
"[",
"]",
";",
"aRenderedControls",
"=",
"that",
".",
"aRenderedControls",
"=",
"[",
"]",
";",
"aStyleStack",
"=",
"that",
".",
"aStyleStack",
"=",
"[",
"{",
"}",
"]",
"... | Reset all rendering related buffers. | [
"Reset",
"all",
"rendering",
"related",
"buffers",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/RenderManager.js#L114-L118 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/RenderManager.js | triggerBeforeRendering | function triggerBeforeRendering(oControl){
bLocked = true;
try {
var oEvent = jQuery.Event("BeforeRendering");
// store the element on the event (aligned with jQuery syntax)
oEvent.srcControl = oControl;
oControl._handleEvent(oEvent);
} finally {
bLocked = false;
}
} | javascript | function triggerBeforeRendering(oControl){
bLocked = true;
try {
var oEvent = jQuery.Event("BeforeRendering");
// store the element on the event (aligned with jQuery syntax)
oEvent.srcControl = oControl;
oControl._handleEvent(oEvent);
} finally {
bLocked = false;
}
} | [
"function",
"triggerBeforeRendering",
"(",
"oControl",
")",
"{",
"bLocked",
"=",
"true",
";",
"try",
"{",
"var",
"oEvent",
"=",
"jQuery",
".",
"Event",
"(",
"\"BeforeRendering\"",
")",
";",
"// store the element on the event (aligned with jQuery syntax)",
"oEvent",
".... | Triggers the BeforeRendering event on the given Control | [
"Triggers",
"the",
"BeforeRendering",
"event",
"on",
"the",
"given",
"Control"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/RenderManager.js#L577-L587 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/RenderManager.js | isDomPatchingEnabled | function isDomPatchingEnabled() {
if (bDomPatching === undefined) {
bDomPatching = sap.ui.getCore().getConfiguration().getDomPatching();
if (bDomPatching) {
Log.warning("DOM Patching is enabled: This feature should be used only for testing purposes!");
}
}
return bDomPatching;
} | javascript | function isDomPatchingEnabled() {
if (bDomPatching === undefined) {
bDomPatching = sap.ui.getCore().getConfiguration().getDomPatching();
if (bDomPatching) {
Log.warning("DOM Patching is enabled: This feature should be used only for testing purposes!");
}
}
return bDomPatching;
} | [
"function",
"isDomPatchingEnabled",
"(",
")",
"{",
"if",
"(",
"bDomPatching",
"===",
"undefined",
")",
"{",
"bDomPatching",
"=",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
".",
"getConfiguration",
"(",
")",
".",
"getDomPatching",
"(",
")",
";",
"if",
"(... | Determines whether Dom Patching is enabled or not
@returns {boolean} whether or not dom patching is enabled
@private | [
"Determines",
"whether",
"Dom",
"Patching",
"is",
"enabled",
"or",
"not"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/RenderManager.js#L1831-L1840 | train |
SAP/openui5 | src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js | function(oRm, oControl) {
if (oControl.getResizeEnabled()) {
fnRenderToggler(oRm, oControl);
}
if (oControl.hasItems()) {
if (oControl.getVisibleStatus() == NotificationBarStatus.Max) {
fnWriteItemsMaximized(oRm, oControl);
} else {
fnWriteItemsDefault(oRm, oControl);
}
}
} | javascript | function(oRm, oControl) {
if (oControl.getResizeEnabled()) {
fnRenderToggler(oRm, oControl);
}
if (oControl.hasItems()) {
if (oControl.getVisibleStatus() == NotificationBarStatus.Max) {
fnWriteItemsMaximized(oRm, oControl);
} else {
fnWriteItemsDefault(oRm, oControl);
}
}
} | [
"function",
"(",
"oRm",
",",
"oControl",
")",
"{",
"if",
"(",
"oControl",
".",
"getResizeEnabled",
"(",
")",
")",
"{",
"fnRenderToggler",
"(",
"oRm",
",",
"oControl",
")",
";",
"}",
"if",
"(",
"oControl",
".",
"hasItems",
"(",
")",
")",
"{",
"if",
... | Renders all notifiers | [
"Renders",
"all",
"notifiers"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js#L232-L244 | train | |
SAP/openui5 | src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js | function(oRm, oNotifier, bMessageNotifier) {
var sId = oNotifier.getId();
oRm.write("<li");
oRm.writeElementData(oNotifier);
oRm.addClass("sapUiNotifier");
oRm.writeClasses();
// ItemNavigation can only handle focusable items
oRm.writeAttribute("tabindex", "-1");
oRm.writeAttribute("aria-descr... | javascript | function(oRm, oNotifier, bMessageNotifier) {
var sId = oNotifier.getId();
oRm.write("<li");
oRm.writeElementData(oNotifier);
oRm.addClass("sapUiNotifier");
oRm.writeClasses();
// ItemNavigation can only handle focusable items
oRm.writeAttribute("tabindex", "-1");
oRm.writeAttribute("aria-descr... | [
"function",
"(",
"oRm",
",",
"oNotifier",
",",
"bMessageNotifier",
")",
"{",
"var",
"sId",
"=",
"oNotifier",
".",
"getId",
"(",
")",
";",
"oRm",
".",
"write",
"(",
"\"<li\"",
")",
";",
"oRm",
".",
"writeElementData",
"(",
"oNotifier",
")",
";",
"oRm",
... | Renders a single notifier | [
"Renders",
"a",
"single",
"notifier"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js#L344-L389 | train | |
SAP/openui5 | src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js | function(oRm, aNotifiers) {
for ( var i = 0; i < aNotifiers.length; i++) {
fnRenderNotifier(oRm, aNotifiers[i], false);
}
} | javascript | function(oRm, aNotifiers) {
for ( var i = 0; i < aNotifiers.length; i++) {
fnRenderNotifier(oRm, aNotifiers[i], false);
}
} | [
"function",
"(",
"oRm",
",",
"aNotifiers",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"aNotifiers",
".",
"length",
";",
"i",
"++",
")",
"{",
"fnRenderNotifier",
"(",
"oRm",
",",
"aNotifiers",
"[",
"i",
"]",
",",
"false",
")",
";",... | Renders given map of notifiers | [
"Renders",
"given",
"map",
"of",
"notifiers"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js#L420-L424 | train | |
SAP/openui5 | src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js | function (oRm, sUri, bMessageNotifier) {
if (sUri == null || sUri == "") {
var icon = new Icon({
useIconTooltip: false
});
icon.addStyleClass("sapUiNotifierIcon");
if (bMessageNotifier) {
icon.setSrc("sap-icon://alert");
} else {
icon.setSrc("sap-icon://notification-2");
}
... | javascript | function (oRm, sUri, bMessageNotifier) {
if (sUri == null || sUri == "") {
var icon = new Icon({
useIconTooltip: false
});
icon.addStyleClass("sapUiNotifierIcon");
if (bMessageNotifier) {
icon.setSrc("sap-icon://alert");
} else {
icon.setSrc("sap-icon://notification-2");
}
... | [
"function",
"(",
"oRm",
",",
"sUri",
",",
"bMessageNotifier",
")",
"{",
"if",
"(",
"sUri",
"==",
"null",
"||",
"sUri",
"==",
"\"\"",
")",
"{",
"var",
"icon",
"=",
"new",
"Icon",
"(",
"{",
"useIconTooltip",
":",
"false",
"}",
")",
";",
"icon",
".",
... | Renders the notifier's icon. If there is no icon set a default icon is
used | [
"Renders",
"the",
"notifier",
"s",
"icon",
".",
"If",
"there",
"is",
"no",
"icon",
"set",
"a",
"default",
"icon",
"is",
"used"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js#L430-L452 | train | |
SAP/openui5 | src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js | function(oRm, oNotifier, oNotiBar) {
fnRenderNotifier(oRm, oNotifier, true);
fnRenderMessageNotifierMessageArea(oRm, oNotifier, oNotiBar);
} | javascript | function(oRm, oNotifier, oNotiBar) {
fnRenderNotifier(oRm, oNotifier, true);
fnRenderMessageNotifierMessageArea(oRm, oNotifier, oNotiBar);
} | [
"function",
"(",
"oRm",
",",
"oNotifier",
",",
"oNotiBar",
")",
"{",
"fnRenderNotifier",
"(",
"oRm",
",",
"oNotifier",
",",
"true",
")",
";",
"fnRenderMessageNotifierMessageArea",
"(",
"oRm",
",",
"oNotifier",
",",
"oNotiBar",
")",
";",
"}"
] | This renders a given message notifier and its message area next to the
notifier icon | [
"This",
"renders",
"a",
"given",
"message",
"notifier",
"and",
"its",
"message",
"area",
"next",
"to",
"the",
"notifier",
"icon"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js#L458-L461 | train | |
SAP/openui5 | src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js | function(oRm, oMessageNotifier, oNotiBar) {
if (oMessageNotifier.hasItems()) {
var aMessages = oMessageNotifier.getMessages();
var lastItem = aMessages[aMessages.length - 1];
var oMA = oMessageNotifier._oMessageArea;
// this ensures that this message is selectable from the bar
oMA._message = las... | javascript | function(oRm, oMessageNotifier, oNotiBar) {
if (oMessageNotifier.hasItems()) {
var aMessages = oMessageNotifier.getMessages();
var lastItem = aMessages[aMessages.length - 1];
var oMA = oMessageNotifier._oMessageArea;
// this ensures that this message is selectable from the bar
oMA._message = las... | [
"function",
"(",
"oRm",
",",
"oMessageNotifier",
",",
"oNotiBar",
")",
"{",
"if",
"(",
"oMessageNotifier",
".",
"hasItems",
"(",
")",
")",
"{",
"var",
"aMessages",
"=",
"oMessageNotifier",
".",
"getMessages",
"(",
")",
";",
"var",
"lastItem",
"=",
"aMessag... | Renders the message area next to a message notifier | [
"Renders",
"the",
"message",
"area",
"next",
"to",
"a",
"message",
"notifier"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.ux3/src/sap/ui/ux3/NotificationBarRenderer.js#L466-L520 | train | |
SAP/openui5 | src/sap.m/src/sap/m/ViewSettingsDialog.js | getViewSettingsItemByKey | function getViewSettingsItemByKey(aViewSettingsItems, sKey) {
var i, oItem;
// convenience, also allow strings
// find item with this key
for (i = 0; i < aViewSettingsItems.length; i++) {
if (aViewSettingsItems[i].getKey() === sKey) {
oItem = aViewSettingsItems[i];
break;
}
}
return oItem;
... | javascript | function getViewSettingsItemByKey(aViewSettingsItems, sKey) {
var i, oItem;
// convenience, also allow strings
// find item with this key
for (i = 0; i < aViewSettingsItems.length; i++) {
if (aViewSettingsItems[i].getKey() === sKey) {
oItem = aViewSettingsItems[i];
break;
}
}
return oItem;
... | [
"function",
"getViewSettingsItemByKey",
"(",
"aViewSettingsItems",
",",
"sKey",
")",
"{",
"var",
"i",
",",
"oItem",
";",
"// convenience, also allow strings",
"// find item with this key",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"aViewSettingsItems",
".",
"length"... | Gets an sap.m.ViewSettingsItem from a list of items by a given key.
@param {array} aViewSettingsItems The list of sap.m.ViewSettingsItem objects to be searched
@param {string} sKey The key of the searched item
@returns {*} The sap.m.ViewSettingsItem found in the list of items
@private | [
"Gets",
"an",
"sap",
".",
"m",
".",
"ViewSettingsItem",
"from",
"a",
"list",
"of",
"items",
"by",
"a",
"given",
"key",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/ViewSettingsDialog.js#L2942-L2955 | train |
SAP/openui5 | src/sap.m/src/sap/m/ViewSettingsDialog.js | findViewSettingsItemByKey | function findViewSettingsItemByKey(vItemOrKey, aViewSettingsItems, sErrorMessage) {
var oItem;
// convenience, also allow strings
if (typeof vItemOrKey === "string") {
// find item with this key
oItem = getViewSettingsItemByKey(aViewSettingsItems, vItemOrKey);
if (!oItem) {
Log.error(sErrorMessage)... | javascript | function findViewSettingsItemByKey(vItemOrKey, aViewSettingsItems, sErrorMessage) {
var oItem;
// convenience, also allow strings
if (typeof vItemOrKey === "string") {
// find item with this key
oItem = getViewSettingsItemByKey(aViewSettingsItems, vItemOrKey);
if (!oItem) {
Log.error(sErrorMessage)... | [
"function",
"findViewSettingsItemByKey",
"(",
"vItemOrKey",
",",
"aViewSettingsItems",
",",
"sErrorMessage",
")",
"{",
"var",
"oItem",
";",
"// convenience, also allow strings",
"if",
"(",
"typeof",
"vItemOrKey",
"===",
"\"string\"",
")",
"{",
"// find item with this key"... | Finds an sap.m.ViewSettingsItem from a list of items by a given key.
If it does not succeed logs an error.
@param {sap.m.ViewSettingsItem|string} vItemOrKey The searched item or its key
@param {array} aViewSettingsItems The list of sap.m.ViewSettingsItem objects to be searched
@param {string} sErrorMessage The error m... | [
"Finds",
"an",
"sap",
".",
"m",
".",
"ViewSettingsItem",
"from",
"a",
"list",
"of",
"items",
"by",
"a",
"given",
"key",
".",
"If",
"it",
"does",
"not",
"succeed",
"logs",
"an",
"error",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/ViewSettingsDialog.js#L2967-L2983 | train |
SAP/openui5 | src/sap.m/src/sap/m/ViewSettingsDialog.js | restoreCustomTabContentAggregation | function restoreCustomTabContentAggregation(sAggregationName, oCustomTab) {
// Make sure page1 exists, as this method may be called on destroy(), after the page was destroyed
// Suppress creation of new page as the following logic is needed only when a page already exists
if (!this._getPage1(true)) {
return;
... | javascript | function restoreCustomTabContentAggregation(sAggregationName, oCustomTab) {
// Make sure page1 exists, as this method may be called on destroy(), after the page was destroyed
// Suppress creation of new page as the following logic is needed only when a page already exists
if (!this._getPage1(true)) {
return;
... | [
"function",
"restoreCustomTabContentAggregation",
"(",
"sAggregationName",
",",
"oCustomTab",
")",
"{",
"// Make sure page1 exists, as this method may be called on destroy(), after the page was destroyed",
"// Suppress creation of new page as the following logic is needed only when a page already ... | Handle the "content" aggregation of a custom tab, as the items in it might be transferred to the dialog page
instance.
@param {string} sAggregationName The string identifying the aggregation that the given object should be removed from
@param {object} oCustomTab Custom tab instance
@private | [
"Handle",
"the",
"content",
"aggregation",
"of",
"a",
"custom",
"tab",
"as",
"the",
"items",
"in",
"it",
"might",
"be",
"transferred",
"to",
"the",
"dialog",
"page",
"instance",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/ViewSettingsDialog.js#L3158-L3191 | train |
SAP/openui5 | src/sap.m/src/sap/m/ViewSettingsDialog.js | function(sOperator) {
this.sOperator = sOperator || StringFilterOperator.StartsWith;
switch (this.sOperator) {
case StringFilterOperator.Equals:
this.fnOperator = fnEquals;
break;
case StringFilterOperator.Contains:
this.fnOperator = fnContains;
break;
case StringFilterOperator.StartsWith:... | javascript | function(sOperator) {
this.sOperator = sOperator || StringFilterOperator.StartsWith;
switch (this.sOperator) {
case StringFilterOperator.Equals:
this.fnOperator = fnEquals;
break;
case StringFilterOperator.Contains:
this.fnOperator = fnContains;
break;
case StringFilterOperator.StartsWith:... | [
"function",
"(",
"sOperator",
")",
"{",
"this",
".",
"sOperator",
"=",
"sOperator",
"||",
"StringFilterOperator",
".",
"StartsWith",
";",
"switch",
"(",
"this",
".",
"sOperator",
")",
"{",
"case",
"StringFilterOperator",
".",
"Equals",
":",
"this",
".",
"fnO... | String filter helper class.
@param {string} sOperator sap.m.StringFilterOperator value. Default is sap.m.StringFilterOperator.StartsWith.
@constructor
@private | [
"String",
"filter",
"helper",
"class",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/ViewSettingsDialog.js#L3228-L3250 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/type/Decimal.js | getText | function getText(sKey, aParams) {
return sap.ui.getCore().getLibraryResourceBundle().getText(sKey, aParams);
} | javascript | function getText(sKey, aParams) {
return sap.ui.getCore().getLibraryResourceBundle().getText(sKey, aParams);
} | [
"function",
"getText",
"(",
"sKey",
",",
"aParams",
")",
"{",
"return",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
".",
"getLibraryResourceBundle",
"(",
")",
".",
"getText",
"(",
"sKey",
",",
"aParams",
")",
";",
"}"
] | Fetches a text from the message bundle and formats it using the parameters.
@param {string} sKey
the message key
@param {any[]} aParams
the message parameters
@returns {string}
the message | [
"Fetches",
"a",
"text",
"from",
"the",
"message",
"bundle",
"and",
"formats",
"it",
"using",
"the",
"parameters",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/type/Decimal.js#L68-L70 | train |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js | function (oIssue) {
var element = sap.ui.getCore().byId(oIssue.context.id),
className = "";
if (oIssue.context.id === "WEBPAGE") {
className = "sap.ui.core";
} else if (element) {
className = element.getMetadata().getName();
}
return {
severity: oIssue.severity,
name: oIssue.rule.ti... | javascript | function (oIssue) {
var element = sap.ui.getCore().byId(oIssue.context.id),
className = "";
if (oIssue.context.id === "WEBPAGE") {
className = "sap.ui.core";
} else if (element) {
className = element.getMetadata().getName();
}
return {
severity: oIssue.severity,
name: oIssue.rule.ti... | [
"function",
"(",
"oIssue",
")",
"{",
"var",
"element",
"=",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
".",
"byId",
"(",
"oIssue",
".",
"context",
".",
"id",
")",
",",
"className",
"=",
"\"\"",
";",
"if",
"(",
"oIssue",
".",
"context",
".",
"id"... | Converts Issue Object to a ViewModel that can be used by the IssueManager.
@param {object} oIssue Issue Object that is to be converted
@returns {object} Converted Issue Object | [
"Converts",
"Issue",
"Object",
"to",
"a",
"ViewModel",
"that",
"can",
"be",
"used",
"by",
"the",
"IssueManager",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js#L23-L51 | train | |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js | function (rules, selectedRulesIDs, issues) {
var rulesViewModel = {},
issueCount = 0,
group = {},
library = {},
rule = {},
rulesCopy = jQuery.extend(true, {}, rules),
issuesCopy = jQuery.extend(true, {}, issues);
for (group in rulesCopy) {
rulesViewModel[group] = jQuery.exten... | javascript | function (rules, selectedRulesIDs, issues) {
var rulesViewModel = {},
issueCount = 0,
group = {},
library = {},
rule = {},
rulesCopy = jQuery.extend(true, {}, rules),
issuesCopy = jQuery.extend(true, {}, issues);
for (group in rulesCopy) {
rulesViewModel[group] = jQuery.exten... | [
"function",
"(",
"rules",
",",
"selectedRulesIDs",
",",
"issues",
")",
"{",
"var",
"rulesViewModel",
"=",
"{",
"}",
",",
"issueCount",
"=",
"0",
",",
"group",
"=",
"{",
"}",
",",
"library",
"=",
"{",
"}",
",",
"rule",
"=",
"{",
"}",
",",
"rulesCopy... | Gets rules and issues, and converts each rule to a ruleViewModel - parameters should be converted as specified beforehand.
@public
@method
@name sap.ui.support.IssueManager.getRulesViewModel
@param {object} rules All the rules from _mRulesets
@param {array} selectedRulesIDs The rule ID's of the selected rules.
@param {... | [
"Gets",
"rules",
"and",
"issues",
"and",
"converts",
"each",
"rule",
"to",
"a",
"ruleViewModel",
"-",
"parameters",
"should",
"be",
"converted",
"as",
"specified",
"beforehand",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js#L133-L195 | train | |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js | function(oRules) {
var index = 0,
innerIndex = 0,
treeTableModel = {},
rulesViewModel,
rule,
rules = [];
rulesViewModel = this.getRulesViewModel(oRules, [], []);
for (var libraryName in rulesViewModel) {
treeTableModel[index] = {
name: libraryName,
id: libraryName ... | javascript | function(oRules) {
var index = 0,
innerIndex = 0,
treeTableModel = {},
rulesViewModel,
rule,
rules = [];
rulesViewModel = this.getRulesViewModel(oRules, [], []);
for (var libraryName in rulesViewModel) {
treeTableModel[index] = {
name: libraryName,
id: libraryName ... | [
"function",
"(",
"oRules",
")",
"{",
"var",
"index",
"=",
"0",
",",
"innerIndex",
"=",
"0",
",",
"treeTableModel",
"=",
"{",
"}",
",",
"rulesViewModel",
",",
"rule",
",",
"rules",
"=",
"[",
"]",
";",
"rulesViewModel",
"=",
"this",
".",
"getRulesViewMod... | Gets rules and converts them into treeTable format.
@public
@method
@name sap.ui.support.IssueManager.getTreeTableViewModel
@param {object} oRules Deserialized rules found within the current state
@returns {object} TreeTableModel Rules in treeTable usable format
The rules are in a TreeTable format. | [
"Gets",
"rules",
"and",
"converts",
"them",
"into",
"treeTable",
"format",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js#L206-L244 | train | |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js | function(issuesModel) {
var treeTableModel = {},
index = 0,
innerIndex = 0,
issueCount = 0,
oSortedSeverityCount,
iHighSeverityCount = 0,
iMediumSeverityCount = 0,
iLowSeverityCount = 0;
for (var libName in issuesModel) {
treeTableModel[index] = {
name: libName,
... | javascript | function(issuesModel) {
var treeTableModel = {},
index = 0,
innerIndex = 0,
issueCount = 0,
oSortedSeverityCount,
iHighSeverityCount = 0,
iMediumSeverityCount = 0,
iLowSeverityCount = 0;
for (var libName in issuesModel) {
treeTableModel[index] = {
name: libName,
... | [
"function",
"(",
"issuesModel",
")",
"{",
"var",
"treeTableModel",
"=",
"{",
"}",
",",
"index",
"=",
"0",
",",
"innerIndex",
"=",
"0",
",",
"issueCount",
"=",
"0",
",",
"oSortedSeverityCount",
",",
"iHighSeverityCount",
"=",
"0",
",",
"iMediumSeverityCount",... | Gets issues in TreeTable format.
@public
@method
@name sap.ui.support.IssueManager.getIssuesViewModel
@param {object} issuesModel All the issues after they have been grouped with <code>groupIssues</code>
@returns {object} All the issues in TreeTable usable model | [
"Gets",
"issues",
"in",
"TreeTable",
"format",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js#L254-L330 | train | |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js | function (oIssues) {
var viewModel = [];
for (var i = 0; i < oIssues.length; i++) {
viewModel.push(_convertIssueToViewModel(oIssues[i]));
}
return viewModel;
} | javascript | function (oIssues) {
var viewModel = [];
for (var i = 0; i < oIssues.length; i++) {
viewModel.push(_convertIssueToViewModel(oIssues[i]));
}
return viewModel;
} | [
"function",
"(",
"oIssues",
")",
"{",
"var",
"viewModel",
"=",
"[",
"]",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"oIssues",
".",
"length",
";",
"i",
"++",
")",
"{",
"viewModel",
".",
"push",
"(",
"_convertIssueToViewModel",
"(",
"oIss... | Converts issues to view model format.
@public
@method
@name sap.ui.support.IssueManager.convertToViewModel
@param {array} oIssues The issues to convert
@returns {array} viewModel Issues in ViewModel format | [
"Converts",
"issues",
"to",
"view",
"model",
"format",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js#L398-L404 | train | |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js | function (oIssues) {
var groupedIssues = {},
issue = {};
for (var i = 0; i < oIssues.length; i++) {
issue = oIssues[i];
if (!groupedIssues[issue.ruleLibName]) {
groupedIssues[issue.ruleLibName] = {};
}
if (!groupedIssues[issue.ruleLibName][issue.ruleId]) {
groupedIssues[i... | javascript | function (oIssues) {
var groupedIssues = {},
issue = {};
for (var i = 0; i < oIssues.length; i++) {
issue = oIssues[i];
if (!groupedIssues[issue.ruleLibName]) {
groupedIssues[issue.ruleLibName] = {};
}
if (!groupedIssues[issue.ruleLibName][issue.ruleId]) {
groupedIssues[i... | [
"function",
"(",
"oIssues",
")",
"{",
"var",
"groupedIssues",
"=",
"{",
"}",
",",
"issue",
"=",
"{",
"}",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"oIssues",
".",
"length",
";",
"i",
"++",
")",
"{",
"issue",
"=",
"oIssues",
"[",
... | Groups all issues by library and rule ID.
@public
@method
@name sap.ui.support.IssueManager.groupIssues
@param {array} oIssues The issues to group. Must be in a ViewModel format
@returns {array} groupedIssues Grouped issues by library and rule id | [
"Groups",
"all",
"issues",
"by",
"library",
"and",
"rule",
"ID",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/IssueManager.js#L414-L433 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableRendererUtils.js | function(rm, sClassName, bShouldAdd) {
if (sClassName && (!!bShouldAdd || arguments.length == 2)) {
rm.addClass(sClassName);
if (TAGCONTEXT) {
TAGCONTEXT.writeClasses = true;
}
}
return TableRendererUtils;
} | javascript | function(rm, sClassName, bShouldAdd) {
if (sClassName && (!!bShouldAdd || arguments.length == 2)) {
rm.addClass(sClassName);
if (TAGCONTEXT) {
TAGCONTEXT.writeClasses = true;
}
}
return TableRendererUtils;
} | [
"function",
"(",
"rm",
",",
"sClassName",
",",
"bShouldAdd",
")",
"{",
"if",
"(",
"sClassName",
"&&",
"(",
"!",
"!",
"bShouldAdd",
"||",
"arguments",
".",
"length",
"==",
"2",
")",
")",
"{",
"rm",
".",
"addClass",
"(",
"sClassName",
")",
";",
"if",
... | Adds the given CSS class if no condition is given or the condition is truthy.
@param {sap.ui.core.RenderManager} rm Instance of the rendermanager
@param {string} sClassName The CSS class which should be written
@param {boolean} [bShouldAdd] optional condition
@returns TableRendererUtils to allow method chaining
@priv... | [
"Adds",
"the",
"given",
"CSS",
"class",
"if",
"no",
"condition",
"is",
"given",
"or",
"the",
"condition",
"is",
"truthy",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableRendererUtils.js#L33-L41 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableRendererUtils.js | function(rm, sName, oValue, bShouldAdd) {
if (sName && oValue && (!!bShouldAdd || arguments.length == 3)) {
rm.addStyle(sName, oValue);
if (TAGCONTEXT) {
TAGCONTEXT.writeStyles = true;
}
}
return TableRendererUtils;
} | javascript | function(rm, sName, oValue, bShouldAdd) {
if (sName && oValue && (!!bShouldAdd || arguments.length == 3)) {
rm.addStyle(sName, oValue);
if (TAGCONTEXT) {
TAGCONTEXT.writeStyles = true;
}
}
return TableRendererUtils;
} | [
"function",
"(",
"rm",
",",
"sName",
",",
"oValue",
",",
"bShouldAdd",
")",
"{",
"if",
"(",
"sName",
"&&",
"oValue",
"&&",
"(",
"!",
"!",
"bShouldAdd",
"||",
"arguments",
".",
"length",
"==",
"3",
")",
")",
"{",
"rm",
".",
"addStyle",
"(",
"sName",... | Adds the given style if no condition is given or the condition is truthy.
@param {sap.ui.core.RenderManager} rm Instance of the rendermanager
@param {string} sName The style name which should be written
@param {string} oValue The style value which should be written
@param {boolean} [bShouldAdd] optional condition
@re... | [
"Adds",
"the",
"given",
"style",
"if",
"no",
"condition",
"is",
"given",
"or",
"the",
"condition",
"is",
"truthy",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableRendererUtils.js#L54-L62 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableRendererUtils.js | function(rm, oTable, oConfig) {
oConfig = oConfig || {};
rm.write("<", oConfig.tag || "div");
TAGCONTEXT = oConfig;
if (oConfig.furtherSettings) {
oConfig.furtherSettings(rm, oTable);
}
if (Array.isArray(oConfig.classname) && oConfig.classname.length) {
for (var i = 0; i < oConfig.classname... | javascript | function(rm, oTable, oConfig) {
oConfig = oConfig || {};
rm.write("<", oConfig.tag || "div");
TAGCONTEXT = oConfig;
if (oConfig.furtherSettings) {
oConfig.furtherSettings(rm, oTable);
}
if (Array.isArray(oConfig.classname) && oConfig.classname.length) {
for (var i = 0; i < oConfig.classname... | [
"function",
"(",
"rm",
",",
"oTable",
",",
"oConfig",
")",
"{",
"oConfig",
"=",
"oConfig",
"||",
"{",
"}",
";",
"rm",
".",
"write",
"(",
"\"<\"",
",",
"oConfig",
".",
"tag",
"||",
"\"div\"",
")",
";",
"TAGCONTEXT",
"=",
"oConfig",
";",
"if",
"(",
... | Writes the starting tag of an element with the given settings.
@param {sap.ui.core.RenderManager} rm Instance of the rendermanager
@param {sap.ui.table.Table} oTable Instance of the table
@param {object} oConfig the configuration of the start tag
@param {string} [oConfig.tag] The tag type which should be used. I... | [
"Writes",
"the",
"starting",
"tag",
"of",
"an",
"element",
"with",
"the",
"given",
"settings",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableRendererUtils.js#L92-L146 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableRendererUtils.js | function(rm, oTable, oConfig) {
TableRendererUtils.startElement(rm, oTable, oConfig);
TableRendererUtils.endElement(rm, oConfig ? oConfig.tag : null);
return TableRendererUtils;
} | javascript | function(rm, oTable, oConfig) {
TableRendererUtils.startElement(rm, oTable, oConfig);
TableRendererUtils.endElement(rm, oConfig ? oConfig.tag : null);
return TableRendererUtils;
} | [
"function",
"(",
"rm",
",",
"oTable",
",",
"oConfig",
")",
"{",
"TableRendererUtils",
".",
"startElement",
"(",
"rm",
",",
"oTable",
",",
"oConfig",
")",
";",
"TableRendererUtils",
".",
"endElement",
"(",
"rm",
",",
"oConfig",
"?",
"oConfig",
".",
"tag",
... | Writes the starting and end tag of an element with the given settings.
@param {sap.ui.core.RenderManager} rm Instance of the rendermanager
@param {sap.ui.table.Table} oTable Instance of the table
@param {object} oConfig the configuration of the start tag
@returns TableRendererUtils to allow method chaining
@see TableR... | [
"Writes",
"the",
"starting",
"and",
"end",
"tag",
"of",
"an",
"element",
"with",
"the",
"given",
"settings",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableRendererUtils.js#L173-L177 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/signals.js | function (listener, listenerContext, priority) {
validateListener(listener, 'add');
return this._registerListener(listener, false, listenerContext, priority);
} | javascript | function (listener, listenerContext, priority) {
validateListener(listener, 'add');
return this._registerListener(listener, false, listenerContext, priority);
} | [
"function",
"(",
"listener",
",",
"listenerContext",
",",
"priority",
")",
"{",
"validateListener",
"(",
"listener",
",",
"'add'",
")",
";",
"return",
"this",
".",
"_registerListener",
"(",
"listener",
",",
"false",
",",
"listenerContext",
",",
"priority",
")"... | Add a listener to the signal.
@param {Function} listener Signal handler function.
@param {Object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function).
@param {Number} [priority] The priority level of the event listener. Listeners with ... | [
"Add",
"a",
"listener",
"to",
"the",
"signal",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/signals.js#L296-L299 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/signals.js | function (listener, context) {
validateListener(listener, 'remove');
var i = this._indexOfListener(listener, context);
if (i !== -1) {
this._bindings[i]._destroy(); //no reason to a SignalBinding exist if it isn't attached to a signal
this._bindings.s... | javascript | function (listener, context) {
validateListener(listener, 'remove');
var i = this._indexOfListener(listener, context);
if (i !== -1) {
this._bindings[i]._destroy(); //no reason to a SignalBinding exist if it isn't attached to a signal
this._bindings.s... | [
"function",
"(",
"listener",
",",
"context",
")",
"{",
"validateListener",
"(",
"listener",
",",
"'remove'",
")",
";",
"var",
"i",
"=",
"this",
".",
"_indexOfListener",
"(",
"listener",
",",
"context",
")",
";",
"if",
"(",
"i",
"!==",
"-",
"1",
")",
... | Remove a single listener from the dispatch queue.
@param {Function} listener Handler function that should be removed.
@param {Object} [context] Execution context (since you can add the same handler multiple times if executing in a different context).
@return {Function} Listener handler function. | [
"Remove",
"a",
"single",
"listener",
"from",
"the",
"dispatch",
"queue",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/signals.js#L319-L328 | train | |
SAP/openui5 | src/sap.ui.demokit/src/sap/ui/demokit/explored/util/MyRouter.js | function (sRoute, oData) {
var oHistory = History.getInstance();
var oPrevHash = oHistory.getPreviousHash();
if (oPrevHash !== undefined) {
window.history.go(-1);
} else {
var bReplace = true; // otherwise we go backwards with a forward history
this.navTo(sRoute, oData, bReplace);
}
} | javascript | function (sRoute, oData) {
var oHistory = History.getInstance();
var oPrevHash = oHistory.getPreviousHash();
if (oPrevHash !== undefined) {
window.history.go(-1);
} else {
var bReplace = true; // otherwise we go backwards with a forward history
this.navTo(sRoute, oData, bReplace);
}
} | [
"function",
"(",
"sRoute",
",",
"oData",
")",
"{",
"var",
"oHistory",
"=",
"History",
".",
"getInstance",
"(",
")",
";",
"var",
"oPrevHash",
"=",
"oHistory",
".",
"getPreviousHash",
"(",
")",
";",
"if",
"(",
"oPrevHash",
"!==",
"undefined",
")",
"{",
"... | mobile nav back handling | [
"mobile",
"nav",
"back",
"handling"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.demokit/src/sap/ui/demokit/explored/util/MyRouter.js#L17-L26 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (o, oExtension, sTypeClass, sNonDefaultValue, bDeepCopy) {
if (sTypeClass === "EntitySet" && oExtension.value === sNonDefaultValue) {
// potentially nested structure so do deep copy
if (bDeepCopy) {
jQuery.extend(true, o, mV2ToV4[oExtension.name]);
} else {
// Warning: Passing false fo... | javascript | function (o, oExtension, sTypeClass, sNonDefaultValue, bDeepCopy) {
if (sTypeClass === "EntitySet" && oExtension.value === sNonDefaultValue) {
// potentially nested structure so do deep copy
if (bDeepCopy) {
jQuery.extend(true, o, mV2ToV4[oExtension.name]);
} else {
// Warning: Passing false fo... | [
"function",
"(",
"o",
",",
"oExtension",
",",
"sTypeClass",
",",
"sNonDefaultValue",
",",
"bDeepCopy",
")",
"{",
"if",
"(",
"sTypeClass",
"===",
"\"EntitySet\"",
"&&",
"oExtension",
".",
"value",
"===",
"sNonDefaultValue",
")",
"{",
"// potentially nested structur... | Adds EntitySet V4 annotation for current extension if extension value is equal to
the given non-default value. Depending on bDeepCopy the annotation will be merged
with deep copy.
@param {object} o
any object
@param {object} oExtension
the SAP Annotation (OData Version 2.0) for which a V4 annotation needs to be added
@... | [
"Adds",
"EntitySet",
"V4",
"annotation",
"for",
"current",
"extension",
"if",
"extension",
"value",
"is",
"equal",
"to",
"the",
"given",
"non",
"-",
"default",
"value",
".",
"Depending",
"on",
"bDeepCopy",
"the",
"annotation",
"will",
"be",
"merged",
"with",
... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L181-L191 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (sV2AnnotationName, oEntitySet, oProperty) {
var aNames = mV2ToV4PropertyCollection[sV2AnnotationName],
sTerm = aNames[0],
sCollection = aNames[1],
oAnnotation = oEntitySet[sTerm] || {},
aCollection = oAnnotation[sCollection] || [];
aCollection.push({ "PropertyPath" : oProperty.name });
... | javascript | function (sV2AnnotationName, oEntitySet, oProperty) {
var aNames = mV2ToV4PropertyCollection[sV2AnnotationName],
sTerm = aNames[0],
sCollection = aNames[1],
oAnnotation = oEntitySet[sTerm] || {},
aCollection = oAnnotation[sCollection] || [];
aCollection.push({ "PropertyPath" : oProperty.name });
... | [
"function",
"(",
"sV2AnnotationName",
",",
"oEntitySet",
",",
"oProperty",
")",
"{",
"var",
"aNames",
"=",
"mV2ToV4PropertyCollection",
"[",
"sV2AnnotationName",
"]",
",",
"sTerm",
"=",
"aNames",
"[",
"0",
"]",
",",
"sCollection",
"=",
"aNames",
"[",
"1",
"]... | Adds current property to the property collection for given V2 annotation.
@param {string} sV2AnnotationName
V2 annotation name (key in map mV2ToV4PropertyCollection)
@param {object} oEntitySet
the entity set
@param {object} oProperty
the property of the entity | [
"Adds",
"current",
"property",
"to",
"the",
"property",
"collection",
"for",
"given",
"V2",
"annotation",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L270-L280 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (o, oExtension, sTypeClass) {
switch (oExtension.name) {
case "aggregation-role":
if (oExtension.value === "dimension") {
o["com.sap.vocabularies.Analytics.v1.Dimension"] = oBoolTrue;
} else if (oExtension.value === "measure") {
o["com.sap.vocabularies.Analytics.v1.Measure"] = oBoo... | javascript | function (o, oExtension, sTypeClass) {
switch (oExtension.name) {
case "aggregation-role":
if (oExtension.value === "dimension") {
o["com.sap.vocabularies.Analytics.v1.Dimension"] = oBoolTrue;
} else if (oExtension.value === "measure") {
o["com.sap.vocabularies.Analytics.v1.Measure"] = oBoo... | [
"function",
"(",
"o",
",",
"oExtension",
",",
"sTypeClass",
")",
"{",
"switch",
"(",
"oExtension",
".",
"name",
")",
"{",
"case",
"\"aggregation-role\"",
":",
"if",
"(",
"oExtension",
".",
"value",
"===",
"\"dimension\"",
")",
"{",
"o",
"[",
"\"com.sap.voc... | Adds the corresponding V4 annotation to the given object based on the given SAP
extension.
@param {object} o
any object
@param {object} oExtension
the SAP Annotation (OData Version 2.0) for which a V4 annotation needs to be added
@param {string} sTypeClass
the type class of the given object; supported type classes are... | [
"Adds",
"the",
"corresponding",
"V4",
"annotation",
"to",
"the",
"given",
"object",
"based",
"on",
"the",
"given",
"SAP",
"extension",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L461-L528 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (aArray, vExpectedPropertyValue, sPropertyName) {
var i, n;
sPropertyName = sPropertyName || "name";
if (aArray) {
for (i = 0, n = aArray.length; i < n; i += 1) {
if (aArray[i][sPropertyName] === vExpectedPropertyValue) {
return i;
}
}
}
return -1;
} | javascript | function (aArray, vExpectedPropertyValue, sPropertyName) {
var i, n;
sPropertyName = sPropertyName || "name";
if (aArray) {
for (i = 0, n = aArray.length; i < n; i += 1) {
if (aArray[i][sPropertyName] === vExpectedPropertyValue) {
return i;
}
}
}
return -1;
} | [
"function",
"(",
"aArray",
",",
"vExpectedPropertyValue",
",",
"sPropertyName",
")",
"{",
"var",
"i",
",",
"n",
";",
"sPropertyName",
"=",
"sPropertyName",
"||",
"\"name\"",
";",
"if",
"(",
"aArray",
")",
"{",
"for",
"(",
"i",
"=",
"0",
",",
"n",
"=",
... | Returns the index of the first object inside the given array, where the property with the
given name has the given expected value.
@param {object[]} [aArray]
some array
@param {any} vExpectedPropertyValue
expected value of the property with given name
@param {string} [sPropertyName="name"]
some property name
@returns ... | [
"Returns",
"the",
"index",
"of",
"the",
"first",
"object",
"inside",
"the",
"given",
"array",
"where",
"the",
"property",
"with",
"the",
"given",
"name",
"has",
"the",
"given",
"expected",
"value",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L586-L598 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (aArray, vExpectedPropertyValue, sPropertyName) {
var iIndex = Utils.findIndex(aArray, vExpectedPropertyValue, sPropertyName);
return iIndex < 0 ? null : aArray[iIndex];
} | javascript | function (aArray, vExpectedPropertyValue, sPropertyName) {
var iIndex = Utils.findIndex(aArray, vExpectedPropertyValue, sPropertyName);
return iIndex < 0 ? null : aArray[iIndex];
} | [
"function",
"(",
"aArray",
",",
"vExpectedPropertyValue",
",",
"sPropertyName",
")",
"{",
"var",
"iIndex",
"=",
"Utils",
".",
"findIndex",
"(",
"aArray",
",",
"vExpectedPropertyValue",
",",
"sPropertyName",
")",
";",
"return",
"iIndex",
"<",
"0",
"?",
"null",
... | Returns the object inside the given array, where the property with the given name has
the given expected value.
@param {object[]} aArray
some array
@param {any} vExpectedPropertyValue
expected value of the property with given name
@param {string} [sPropertyName="name"]
some property name
@returns {object}
the object f... | [
"Returns",
"the",
"object",
"inside",
"the",
"given",
"array",
"where",
"the",
"property",
"with",
"the",
"given",
"name",
"has",
"the",
"given",
"expected",
"value",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L613-L617 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (oAnnotations, sQualifiedName, bInContainer) {
var o = bInContainer
? oAnnotations.EntityContainer
: oAnnotations.propertyAnnotations;
return o && o[sQualifiedName] || {};
} | javascript | function (oAnnotations, sQualifiedName, bInContainer) {
var o = bInContainer
? oAnnotations.EntityContainer
: oAnnotations.propertyAnnotations;
return o && o[sQualifiedName] || {};
} | [
"function",
"(",
"oAnnotations",
",",
"sQualifiedName",
",",
"bInContainer",
")",
"{",
"var",
"o",
"=",
"bInContainer",
"?",
"oAnnotations",
".",
"EntityContainer",
":",
"oAnnotations",
".",
"propertyAnnotations",
";",
"return",
"o",
"&&",
"o",
"[",
"sQualifiedN... | Gets the map from child name to annotations for a parent with the given qualified
name which lives inside the entity container as indicated.
@param {sap.ui.model.odata.ODataAnnotations} oAnnotations
the OData annotations
@param {string} sQualifiedName
the parent's qualified name
@param {boolean} bInContainer
whether t... | [
"Gets",
"the",
"map",
"from",
"child",
"name",
"to",
"annotations",
"for",
"a",
"parent",
"with",
"the",
"given",
"qualified",
"name",
"which",
"lives",
"inside",
"the",
"entity",
"container",
"as",
"indicated",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L632-L637 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (oEntityContainer, sArrayName, sName, bAsPath) {
var k,
vResult = bAsPath ? undefined : null;
if (oEntityContainer) {
k = Utils.findIndex(oEntityContainer[sArrayName], sName);
if (k >= 0) {
vResult = bAsPath
? oEntityContainer.$path + "/" + sArrayName + "/" + k
: oEntityCont... | javascript | function (oEntityContainer, sArrayName, sName, bAsPath) {
var k,
vResult = bAsPath ? undefined : null;
if (oEntityContainer) {
k = Utils.findIndex(oEntityContainer[sArrayName], sName);
if (k >= 0) {
vResult = bAsPath
? oEntityContainer.$path + "/" + sArrayName + "/" + k
: oEntityCont... | [
"function",
"(",
"oEntityContainer",
",",
"sArrayName",
",",
"sName",
",",
"bAsPath",
")",
"{",
"var",
"k",
",",
"vResult",
"=",
"bAsPath",
"?",
"undefined",
":",
"null",
";",
"if",
"(",
"oEntityContainer",
")",
"{",
"k",
"=",
"Utils",
".",
"findIndex",
... | Returns the thing with the given simple name from the given entity container.
@param {object} oEntityContainer
the entity container
@param {string} sArrayName
name of array within entity container which will be searched
@param {string} sName
a simple name, e.g. "Foo"
@param {boolean} [bAsPath=false]
determines whether... | [
"Returns",
"the",
"thing",
"with",
"the",
"given",
"simple",
"name",
"from",
"the",
"given",
"entity",
"container",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L654-L668 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (vModel, sNamespace) {
var oSchema = null,
aSchemas = Array.isArray(vModel)
? vModel
: vModel.getObject("/dataServices/schema");
if (aSchemas) {
aSchemas.forEach(function (o) {
if (o.namespace === sNamespace) {
oSchema = o;
return false; // break
}
});
}
... | javascript | function (vModel, sNamespace) {
var oSchema = null,
aSchemas = Array.isArray(vModel)
? vModel
: vModel.getObject("/dataServices/schema");
if (aSchemas) {
aSchemas.forEach(function (o) {
if (o.namespace === sNamespace) {
oSchema = o;
return false; // break
}
});
}
... | [
"function",
"(",
"vModel",
",",
"sNamespace",
")",
"{",
"var",
"oSchema",
"=",
"null",
",",
"aSchemas",
"=",
"Array",
".",
"isArray",
"(",
"vModel",
")",
"?",
"vModel",
":",
"vModel",
".",
"getObject",
"(",
"\"/dataServices/schema\"",
")",
";",
"if",
"("... | Returns the schema with the given namespace.
@param {sap.ui.model.Model|object[]} vModel
either a model or an array of schemas
@param {string} sNamespace
a namespace, e.g. "ACME"
@returns {object}
the schema with the given namespace; <code>null</code> if no such schema is found | [
"Returns",
"the",
"schema",
"with",
"the",
"given",
"namespace",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L724-L740 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (oAnnotations, oData, oMetaModel) {
var aSchemas = oData.dataServices.schema;
if (!aSchemas) {
return;
}
aSchemas.forEach(function (oSchema, i) {
var sSchemaVersion;
// remove datajs artefact for inline annotations in $metadata
delete oSchema.annotations;
Utils.liftSAPData(oS... | javascript | function (oAnnotations, oData, oMetaModel) {
var aSchemas = oData.dataServices.schema;
if (!aSchemas) {
return;
}
aSchemas.forEach(function (oSchema, i) {
var sSchemaVersion;
// remove datajs artefact for inline annotations in $metadata
delete oSchema.annotations;
Utils.liftSAPData(oS... | [
"function",
"(",
"oAnnotations",
",",
"oData",
",",
"oMetaModel",
")",
"{",
"var",
"aSchemas",
"=",
"oData",
".",
"dataServices",
".",
"schema",
";",
"if",
"(",
"!",
"aSchemas",
")",
"{",
"return",
";",
"}",
"aSchemas",
".",
"forEach",
"(",
"function",
... | Merges the given annotation data into the given metadata and lifts SAPData extensions.
@param {object} oAnnotations
annotations "JSON"
@param {object} oData
metadata "JSON"
@param {sap.ui.model.odata.ODataMetaModel} oMetaModel
the metamodel | [
"Merges",
"the",
"given",
"annotation",
"data",
"into",
"the",
"given",
"metadata",
"and",
"lifts",
"SAPData",
"extensions",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L954-L1003 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (aChildren, mChildAnnotations, sTypeClass, aSchemas, fnCallback,
iStartIndex) {
if (!aChildren) {
return;
}
if (iStartIndex) {
aChildren = aChildren.slice(iStartIndex);
}
aChildren.forEach(function (oChild) {
// lift SAP data for easy access to SAP Annotations for OData V 2.0
... | javascript | function (aChildren, mChildAnnotations, sTypeClass, aSchemas, fnCallback,
iStartIndex) {
if (!aChildren) {
return;
}
if (iStartIndex) {
aChildren = aChildren.slice(iStartIndex);
}
aChildren.forEach(function (oChild) {
// lift SAP data for easy access to SAP Annotations for OData V 2.0
... | [
"function",
"(",
"aChildren",
",",
"mChildAnnotations",
",",
"sTypeClass",
",",
"aSchemas",
",",
"fnCallback",
",",
"iStartIndex",
")",
"{",
"if",
"(",
"!",
"aChildren",
")",
"{",
"return",
";",
"}",
"if",
"(",
"iStartIndex",
")",
"{",
"aChildren",
"=",
... | Visits all children inside the given array, lifts "SAPData" extensions and
inlines OData V4 annotations for each child.
@param {object[]} aChildren
any array of children
@param {object} mChildAnnotations
map from child name (or role) to annotations
@param {string} [sTypeClass]
the type class of the given children; sup... | [
"Visits",
"all",
"children",
"inside",
"the",
"given",
"array",
"lifts",
"SAPData",
"extensions",
"and",
"inlines",
"OData",
"V4",
"annotations",
"for",
"each",
"child",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L1023-L1051 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js | function (oAnnotations, oSchema, oEntityContainer, oFunctionImport) {
var mAnnotations;
if (!oFunctionImport.parameter) {
return;
}
mAnnotations = Utils.getChildAnnotations(oAnnotations,
oSchema.namespace + "." + oEntityContainer.name, true);
oFunctionImport.parameter.forEach(
function (oPar... | javascript | function (oAnnotations, oSchema, oEntityContainer, oFunctionImport) {
var mAnnotations;
if (!oFunctionImport.parameter) {
return;
}
mAnnotations = Utils.getChildAnnotations(oAnnotations,
oSchema.namespace + "." + oEntityContainer.name, true);
oFunctionImport.parameter.forEach(
function (oPar... | [
"function",
"(",
"oAnnotations",
",",
"oSchema",
",",
"oEntityContainer",
",",
"oFunctionImport",
")",
"{",
"var",
"mAnnotations",
";",
"if",
"(",
"!",
"oFunctionImport",
".",
"parameter",
")",
"{",
"return",
";",
"}",
"mAnnotations",
"=",
"Utils",
".",
"get... | Visits all parameters of the given function import.
@param {object} oAnnotations
annotations "JSON"
@param {object} oSchema
OData data service schema
@param {object} oEntityContainer
the entity container
@param {object} oFunctionImport
a function import's V2 metadata object | [
"Visits",
"all",
"parameters",
"of",
"the",
"given",
"function",
"import",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/_ODataMetaModelUtils.js#L1079-L1094 | train | |
SAP/openui5 | src/sap.m/src/sap/m/TimePickerSlider.js | findIndexInArray | function findIndexInArray(aArray, fnPredicate) {
if (aArray == null) {
throw new TypeError('findIndex called with null or undefined array');
}
if (typeof fnPredicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var iLength = aArray.length;
var fnThisArg = arguments... | javascript | function findIndexInArray(aArray, fnPredicate) {
if (aArray == null) {
throw new TypeError('findIndex called with null or undefined array');
}
if (typeof fnPredicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var iLength = aArray.length;
var fnThisArg = arguments... | [
"function",
"findIndexInArray",
"(",
"aArray",
",",
"fnPredicate",
")",
"{",
"if",
"(",
"aArray",
"==",
"null",
")",
"{",
"throw",
"new",
"TypeError",
"(",
"'findIndex called with null or undefined array'",
")",
";",
"}",
"if",
"(",
"typeof",
"fnPredicate",
"!==... | Finds the index of an element, satisfying provided predicate.
@param {array} aArray The array to be predicted
@param {function} fnPredicate Testing function
@returns {number} The index in the array, if an element in the array satisfies the provided testing function
@private | [
"Finds",
"the",
"index",
"of",
"an",
"element",
"satisfying",
"provided",
"predicate",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/TimePickerSlider.js#L1210-L1229 | train |
SAP/openui5 | src/sap.m/src/sap/m/TimePickerSlider.js | function (oEvent) {
var iPageY = oEvent.touches && oEvent.touches.length ? oEvent.touches[0].pageY : oEvent.pageY;
this._bIsDrag = false;
if (!this.getIsExpanded()) {
return;
}
this._stopAnimation();
this._startDrag(iPageY);
oEvent.preventDefault();
this._mousedown = true;
} | javascript | function (oEvent) {
var iPageY = oEvent.touches && oEvent.touches.length ? oEvent.touches[0].pageY : oEvent.pageY;
this._bIsDrag = false;
if (!this.getIsExpanded()) {
return;
}
this._stopAnimation();
this._startDrag(iPageY);
oEvent.preventDefault();
this._mousedown = true;
} | [
"function",
"(",
"oEvent",
")",
"{",
"var",
"iPageY",
"=",
"oEvent",
".",
"touches",
"&&",
"oEvent",
".",
"touches",
".",
"length",
"?",
"oEvent",
".",
"touches",
"[",
"0",
"]",
".",
"pageY",
":",
"oEvent",
".",
"pageY",
";",
"this",
".",
"_bIsDrag",... | Default onTouchStart handler.
@param {jQuery.Event} oEvent Event object | [
"Default",
"onTouchStart",
"handler",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/TimePickerSlider.js#L1235-L1248 | train | |
SAP/openui5 | src/sap.m/src/sap/m/TimePickerSlider.js | function (oEvent) {
var iPageY = oEvent.touches && oEvent.touches.length ? oEvent.touches[0].pageY : oEvent.pageY;
if (!this._mousedown || !this.getIsExpanded()) {
return;
}
//galaxy s5 android 5.0 fires touchmove every time - so see if it's far enough to call it a drag
if (!this._bIsDrag && this._... | javascript | function (oEvent) {
var iPageY = oEvent.touches && oEvent.touches.length ? oEvent.touches[0].pageY : oEvent.pageY;
if (!this._mousedown || !this.getIsExpanded()) {
return;
}
//galaxy s5 android 5.0 fires touchmove every time - so see if it's far enough to call it a drag
if (!this._bIsDrag && this._... | [
"function",
"(",
"oEvent",
")",
"{",
"var",
"iPageY",
"=",
"oEvent",
".",
"touches",
"&&",
"oEvent",
".",
"touches",
".",
"length",
"?",
"oEvent",
".",
"touches",
"[",
"0",
"]",
".",
"pageY",
":",
"oEvent",
".",
"pageY",
";",
"if",
"(",
"!",
"this"... | Default onTouchMove handler.
@param {jQuery.Event} oEvent Event object | [
"Default",
"onTouchMove",
"handler",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/TimePickerSlider.js#L1254-L1276 | train | |
SAP/openui5 | src/sap.m/src/sap/m/TimePickerSlider.js | function (oEvent) {
var iPageY = oEvent.changedTouches && oEvent.changedTouches.length ? oEvent.changedTouches[0].pageY : oEvent.pageY;
if (this._bIsDrag === false) {
this.fireTap(oEvent);
this._dragSession = null;
}
this._bIsDrag = true;
if (!this.getIsExpanded()) {
this._dragSession = nu... | javascript | function (oEvent) {
var iPageY = oEvent.changedTouches && oEvent.changedTouches.length ? oEvent.changedTouches[0].pageY : oEvent.pageY;
if (this._bIsDrag === false) {
this.fireTap(oEvent);
this._dragSession = null;
}
this._bIsDrag = true;
if (!this.getIsExpanded()) {
this._dragSession = nu... | [
"function",
"(",
"oEvent",
")",
"{",
"var",
"iPageY",
"=",
"oEvent",
".",
"changedTouches",
"&&",
"oEvent",
".",
"changedTouches",
".",
"length",
"?",
"oEvent",
".",
"changedTouches",
"[",
"0",
"]",
".",
"pageY",
":",
"oEvent",
".",
"pageY",
";",
"if",
... | Default onTouchEnd handler.
@param {jQuery.Event} oEvent Event object | [
"Default",
"onTouchEnd",
"handler",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/TimePickerSlider.js#L1282-L1300 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/events/PseudoEvents.js | checkModifierKeys | function checkModifierKeys(oEvent, bCtrlKey, bAltKey, bShiftKey) {
return oEvent.shiftKey == bShiftKey && oEvent.altKey == bAltKey && getCtrlKey(oEvent) == bCtrlKey;
} | javascript | function checkModifierKeys(oEvent, bCtrlKey, bAltKey, bShiftKey) {
return oEvent.shiftKey == bShiftKey && oEvent.altKey == bAltKey && getCtrlKey(oEvent) == bCtrlKey;
} | [
"function",
"checkModifierKeys",
"(",
"oEvent",
",",
"bCtrlKey",
",",
"bAltKey",
",",
"bShiftKey",
")",
"{",
"return",
"oEvent",
".",
"shiftKey",
"==",
"bShiftKey",
"&&",
"oEvent",
".",
"altKey",
"==",
"bAltKey",
"&&",
"getCtrlKey",
"(",
"oEvent",
")",
"==",... | Convenience method to check an event for a certain combination of modifier keys
@private | [
"Convenience",
"method",
"to",
"check",
"an",
"event",
"for",
"a",
"certain",
"combination",
"of",
"modifier",
"keys"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/events/PseudoEvents.js#L20-L22 | train |
SAP/openui5 | src/sap.ui.demokit/src/sap/ui/demokit/explored/view/entity.controller.js | function (sType) {
if (!sType) {
return null;
} else {
// remove core prefix
sType = sType.replace("sap.ui.core.", "");
// only take text after last dot
var index = sType.lastIndexOf(".");
return (index !== -1) ? sType.substr(index + 1) : sType;
}
} | javascript | function (sType) {
if (!sType) {
return null;
} else {
// remove core prefix
sType = sType.replace("sap.ui.core.", "");
// only take text after last dot
var index = sType.lastIndexOf(".");
return (index !== -1) ? sType.substr(index + 1) : sType;
}
} | [
"function",
"(",
"sType",
")",
"{",
"if",
"(",
"!",
"sType",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"// remove core prefix",
"sType",
"=",
"sType",
".",
"replace",
"(",
"\"sap.ui.core.\"",
",",
"\"\"",
")",
";",
"// only take text after last dot"... | Converts the type to a friendly readable text | [
"Converts",
"the",
"type",
"to",
"a",
"friendly",
"readable",
"text"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.demokit/src/sap/ui/demokit/explored/view/entity.controller.js#L476-L486 | train | |
SAP/openui5 | src/sap.ui.demokit/src/sap/ui/demokit/explored/view/entity.controller.js | function (controlName) {
var oLibComponentModel = data.libComponentInfos;
jQuery.sap.require("sap.ui.core.util.LibraryInfo");
var LibraryInfo = sap.ui.require("sap/ui/core/util/LibraryInfo");
var oLibInfo = new LibraryInfo();
var sActualControlComponent = oLibInfo._getActualComponent(oLibComponentModel, ... | javascript | function (controlName) {
var oLibComponentModel = data.libComponentInfos;
jQuery.sap.require("sap.ui.core.util.LibraryInfo");
var LibraryInfo = sap.ui.require("sap/ui/core/util/LibraryInfo");
var oLibInfo = new LibraryInfo();
var sActualControlComponent = oLibInfo._getActualComponent(oLibComponentModel, ... | [
"function",
"(",
"controlName",
")",
"{",
"var",
"oLibComponentModel",
"=",
"data",
".",
"libComponentInfos",
";",
"jQuery",
".",
"sap",
".",
"require",
"(",
"\"sap.ui.core.util.LibraryInfo\"",
")",
";",
"var",
"LibraryInfo",
"=",
"sap",
".",
"ui",
".",
"requi... | the actual component for the control
@param {string} controlName
@return {string} sActualControlComponent | [
"the",
"actual",
"component",
"for",
"the",
"control"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.demokit/src/sap/ui/demokit/explored/view/entity.controller.js#L542-L549 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/base/ManagedObjectMetadata.js | loadOwnDesignTime | function loadOwnDesignTime(oMetadata) {
if (isPlainObject(oMetadata._oDesignTime) || !oMetadata._oDesignTime) {
return Promise.resolve(oMetadata._oDesignTime || {});
}
return new Promise(function(fnResolve) {
var sModule;
if (typeof oMetadata._oDesignTime === "string") {
//oMetadata._oDesignTime poi... | javascript | function loadOwnDesignTime(oMetadata) {
if (isPlainObject(oMetadata._oDesignTime) || !oMetadata._oDesignTime) {
return Promise.resolve(oMetadata._oDesignTime || {});
}
return new Promise(function(fnResolve) {
var sModule;
if (typeof oMetadata._oDesignTime === "string") {
//oMetadata._oDesignTime poi... | [
"function",
"loadOwnDesignTime",
"(",
"oMetadata",
")",
"{",
"if",
"(",
"isPlainObject",
"(",
"oMetadata",
".",
"_oDesignTime",
")",
"||",
"!",
"oMetadata",
".",
"_oDesignTime",
")",
"{",
"return",
"Promise",
".",
"resolve",
"(",
"oMetadata",
".",
"_oDesignTim... | Returns a promise that resolves with the own, unmerged designtime data.
If the class is marked as having no designtime data, the promise will resolve with null.
@private | [
"Returns",
"a",
"promise",
"that",
"resolves",
"with",
"the",
"own",
"unmerged",
"designtime",
"data",
".",
"If",
"the",
"class",
"is",
"marked",
"as",
"having",
"no",
"designtime",
"data",
"the",
"promise",
"will",
"resolve",
"with",
"null",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/ManagedObjectMetadata.js#L1804-L1826 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/base/ManagedObjectMetadata.js | getScopeBasedDesignTime | function getScopeBasedDesignTime(mMetadata, sScopeKey) {
var mResult = mMetadata;
if ("default" in mMetadata) {
mResult = merge(
{},
mMetadata.default,
sScopeKey !== "default" && mMetadata[sScopeKey] || null
);
}
return mResult;
} | javascript | function getScopeBasedDesignTime(mMetadata, sScopeKey) {
var mResult = mMetadata;
if ("default" in mMetadata) {
mResult = merge(
{},
mMetadata.default,
sScopeKey !== "default" && mMetadata[sScopeKey] || null
);
}
return mResult;
} | [
"function",
"getScopeBasedDesignTime",
"(",
"mMetadata",
",",
"sScopeKey",
")",
"{",
"var",
"mResult",
"=",
"mMetadata",
";",
"if",
"(",
"\"default\"",
"in",
"mMetadata",
")",
"{",
"mResult",
"=",
"merge",
"(",
"{",
"}",
",",
"mMetadata",
".",
"default",
"... | Extracts metadata from metadata map by scope key
@param {object} mMetadata metadata map received from loader
@param {string} sScopeKey scope name to be extracted
@private | [
"Extracts",
"metadata",
"from",
"metadata",
"map",
"by",
"scope",
"key"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/ManagedObjectMetadata.js#L1873-L1885 | train |
SAP/openui5 | src/sap.m/src/sap/m/FormattedText.js | openExternalLink | function openExternalLink (oEvent) {
var newWindow = window.open();
newWindow.opener = null;
newWindow.location = oEvent.currentTarget.href;
oEvent.preventDefault();
} | javascript | function openExternalLink (oEvent) {
var newWindow = window.open();
newWindow.opener = null;
newWindow.location = oEvent.currentTarget.href;
oEvent.preventDefault();
} | [
"function",
"openExternalLink",
"(",
"oEvent",
")",
"{",
"var",
"newWindow",
"=",
"window",
".",
"open",
"(",
")",
";",
"newWindow",
".",
"opener",
"=",
"null",
";",
"newWindow",
".",
"location",
"=",
"oEvent",
".",
"currentTarget",
".",
"href",
";",
"oE... | prohibit a new window from accessing window.opener.location | [
"prohibit",
"a",
"new",
"window",
"from",
"accessing",
"window",
".",
"opener",
".",
"location"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/FormattedText.js#L282-L287 | train |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/Table.js | setMinColWidths | function setMinColWidths(oTable) {
var oTableRef = oTable.getDomRef();
var iAbsoluteMinWidth = TableUtils.Column.getMinColumnWidth();
var aNotFixedVariableColumns = [];
var bColumnHeaderVisible = oTable.getColumnHeaderVisible();
function calcNewWidth(iDomWidth, iMinWidth) {
if (iDomWidth <= iMinWidt... | javascript | function setMinColWidths(oTable) {
var oTableRef = oTable.getDomRef();
var iAbsoluteMinWidth = TableUtils.Column.getMinColumnWidth();
var aNotFixedVariableColumns = [];
var bColumnHeaderVisible = oTable.getColumnHeaderVisible();
function calcNewWidth(iDomWidth, iMinWidth) {
if (iDomWidth <= iMinWidt... | [
"function",
"setMinColWidths",
"(",
"oTable",
")",
"{",
"var",
"oTableRef",
"=",
"oTable",
".",
"getDomRef",
"(",
")",
";",
"var",
"iAbsoluteMinWidth",
"=",
"TableUtils",
".",
"Column",
".",
"getMinColumnWidth",
"(",
")",
";",
"var",
"aNotFixedVariableColumns",
... | the only place to fix the minimum column width | [
"the",
"only",
"place",
"to",
"fix",
"the",
"minimum",
"column",
"width"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/Table.js#L1564-L1628 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/routing/Target.js | function(mArguments) {
var sTitle = this._oTitleProvider && this._oTitleProvider.getTitle();
if (sTitle) {
this.fireTitleChanged({
name: this._oOptions._name,
title: sTitle
});
}
this._bIsDisplayed = true;
return this.fireEvent(this.M_EVENTS.DISPLAY, mArguments);
} | javascript | function(mArguments) {
var sTitle = this._oTitleProvider && this._oTitleProvider.getTitle();
if (sTitle) {
this.fireTitleChanged({
name: this._oOptions._name,
title: sTitle
});
}
this._bIsDisplayed = true;
return this.fireEvent(this.M_EVENTS.DISPLAY, mArguments);
} | [
"function",
"(",
"mArguments",
")",
"{",
"var",
"sTitle",
"=",
"this",
".",
"_oTitleProvider",
"&&",
"this",
".",
"_oTitleProvider",
".",
"getTitle",
"(",
")",
";",
"if",
"(",
"sTitle",
")",
"{",
"this",
".",
"fireTitleChanged",
"(",
"{",
"name",
":",
... | Fire event created to attached listeners.
@param {object} [mArguments] the arguments to pass along with the event.
@return {sap.ui.core.routing.Target} <code>this</code> to allow method chaining
@protected | [
"Fire",
"event",
"created",
"to",
"attached",
"listeners",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/routing/Target.js#L167-L179 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/routing/Target.js | function(oData, fnFunction, oListener) {
var bHasListener = this.hasListeners("titleChanged"),
sTitle = this._oTitleProvider && this._oTitleProvider.getTitle();
this.attachEvent(this.M_EVENTS.TITLE_CHANGED, oData, fnFunction, oListener);
// in case the title is changed before the first event listener ... | javascript | function(oData, fnFunction, oListener) {
var bHasListener = this.hasListeners("titleChanged"),
sTitle = this._oTitleProvider && this._oTitleProvider.getTitle();
this.attachEvent(this.M_EVENTS.TITLE_CHANGED, oData, fnFunction, oListener);
// in case the title is changed before the first event listener ... | [
"function",
"(",
"oData",
",",
"fnFunction",
",",
"oListener",
")",
"{",
"var",
"bHasListener",
"=",
"this",
".",
"hasListeners",
"(",
"\"titleChanged\"",
")",
",",
"sTitle",
"=",
"this",
".",
"_oTitleProvider",
"&&",
"this",
".",
"_oTitleProvider",
".",
"ge... | Will be fired when the title of this Target has been changed.
@name sap.ui.core.routing.Target#titleChanged
@event
@param {object} oEvent
@param {sap.ui.base.EventProvider} oEvent.getSource
@param {object} oEvent.getParameters
@param {string} oEvent.getParameters.title The name of this target
@param {string} oEvent.ge... | [
"Will",
"be",
"fired",
"when",
"the",
"title",
"of",
"this",
"Target",
"has",
"been",
"changed",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/routing/Target.js#L209-L222 | train | |
SAP/openui5 | src/sap.ui.integration/src/sap/ui/integration/util/CustomElements.js | callback | function callback(mutationsList, observer) {
mutationsList.forEach(function (mutation) {
if (mutation.type == 'childList') {
var addedNodes = mutation.addedNodes,
removedNodes = mutation.removedNodes,
node,
xnode,
count,
aTags,
i;
for (count = 0; count < addedNodes.l... | javascript | function callback(mutationsList, observer) {
mutationsList.forEach(function (mutation) {
if (mutation.type == 'childList') {
var addedNodes = mutation.addedNodes,
removedNodes = mutation.removedNodes,
node,
xnode,
count,
aTags,
i;
for (count = 0; count < addedNodes.l... | [
"function",
"callback",
"(",
"mutationsList",
",",
"observer",
")",
"{",
"mutationsList",
".",
"forEach",
"(",
"function",
"(",
"mutation",
")",
"{",
"if",
"(",
"mutation",
".",
"type",
"==",
"'childList'",
")",
"{",
"var",
"addedNodes",
"=",
"mutation",
"... | Callback function to execute when mutations are observed | [
"Callback",
"function",
"to",
"execute",
"when",
"mutations",
"are",
"observed"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.integration/src/sap/ui/integration/util/CustomElements.js#L73-L129 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | createContextInterface | function createContextInterface(oWithControl, mSettings, i, vBindingOrContext) {
/*
* Returns the single binding or model context related to the current formatter call.
*
* @param {number} [iPart]
* index of part in case of the root formatter of a composite binding
* @returns {sap.ui.model.Binding|sa... | javascript | function createContextInterface(oWithControl, mSettings, i, vBindingOrContext) {
/*
* Returns the single binding or model context related to the current formatter call.
*
* @param {number} [iPart]
* index of part in case of the root formatter of a composite binding
* @returns {sap.ui.model.Binding|sa... | [
"function",
"createContextInterface",
"(",
"oWithControl",
",",
"mSettings",
",",
"i",
",",
"vBindingOrContext",
")",
"{",
"/*\n\t\t * Returns the single binding or model context related to the current formatter call.\n\t\t *\n\t\t * @param {number} [iPart]\n\t\t * index of part in case of... | Creates the context interface for a call to the given control's formatter of the binding part
with given index.
@param {sap.ui.core.util._with} oWithControl
the "with" control
@param {object} mSettings
map/JSON-object with initial property values, etc.
@param {number} [i]
index of part inside a composite binding
@para... | [
"Creates",
"the",
"context",
"interface",
"for",
"a",
"call",
"to",
"the",
"given",
"control",
"s",
"formatter",
"of",
"the",
"binding",
"part",
"with",
"given",
"index",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L86-L326 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | getPath | function getPath(oBindingOrContext) {
return oBindingOrContext instanceof Context
? oBindingOrContext.getPath()
: oBindingOrContext.getModel().resolve(
oBindingOrContext.getPath(), oBindingOrContext.getContext());
} | javascript | function getPath(oBindingOrContext) {
return oBindingOrContext instanceof Context
? oBindingOrContext.getPath()
: oBindingOrContext.getModel().resolve(
oBindingOrContext.getPath(), oBindingOrContext.getContext());
} | [
"function",
"getPath",
"(",
"oBindingOrContext",
")",
"{",
"return",
"oBindingOrContext",
"instanceof",
"Context",
"?",
"oBindingOrContext",
".",
"getPath",
"(",
")",
":",
"oBindingOrContext",
".",
"getModel",
"(",
")",
".",
"resolve",
"(",
"oBindingOrContext",
".... | Returns the resolved path for the given single binding or model context.
@param {sap.ui.model.Binding|sap.ui.model.Context} oBindingOrContext
single binding or model context
@returns {string}
the resolved path | [
"Returns",
"the",
"resolved",
"path",
"for",
"the",
"given",
"single",
"binding",
"or",
"model",
"context",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L123-L128 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | getAny | function getAny(oWithControl, oBindingInfo, mSettings, oScope, bAsync) {
var bValueAsPromise = false;
/*
* Prepares the given binding info or part of it; makes it "one time" and binds its
* formatter function (if opted in) to an interface object.
*
* @param {object} oInfo
* a binding info or a par... | javascript | function getAny(oWithControl, oBindingInfo, mSettings, oScope, bAsync) {
var bValueAsPromise = false;
/*
* Prepares the given binding info or part of it; makes it "one time" and binds its
* formatter function (if opted in) to an interface object.
*
* @param {object} oInfo
* a binding info or a par... | [
"function",
"getAny",
"(",
"oWithControl",
",",
"oBindingInfo",
",",
"mSettings",
",",
"oScope",
",",
"bAsync",
")",
"{",
"var",
"bValueAsPromise",
"=",
"false",
";",
"/*\n\t\t * Prepares the given binding info or part of it; makes it \"one time\" and binds its\n\t\t * formatte... | Gets the value of the control's "any" property via the given binding info.
@param {sap.ui.core.util._with} oWithControl
the "with" control
@param {object} oBindingInfo
the binding info
@param {object} mSettings
map/JSON-object with initial property values, etc.
@param {object} oScope
map of currently known aliases
@pa... | [
"Gets",
"the",
"value",
"of",
"the",
"control",
"s",
"any",
"property",
"via",
"the",
"given",
"binding",
"info",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L346-L408 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | stopAndGo | function stopAndGo(aElements, fnCallback) {
var i = -1;
/*
* Visits the next element, taking the result of the previous callback into account.
*
* @param {boolean} bFound
* Whether an element was approved by the corresponding callback
* @returns {sap.ui.base.SyncPromise|any}
* First call retu... | javascript | function stopAndGo(aElements, fnCallback) {
var i = -1;
/*
* Visits the next element, taking the result of the previous callback into account.
*
* @param {boolean} bFound
* Whether an element was approved by the corresponding callback
* @returns {sap.ui.base.SyncPromise|any}
* First call retu... | [
"function",
"stopAndGo",
"(",
"aElements",
",",
"fnCallback",
")",
"{",
"var",
"i",
"=",
"-",
"1",
";",
"/*\n\t\t * Visits the next element, taking the result of the previous callback into account.\n\t\t *\n\t\t * @param {boolean} bFound\n\t\t * Whether an element was approved by the c... | Visits the given elements one-by-one, calls the given callback for each of them and stops
and waits for each sync promise returned by the callback before going on to the next element.
If a sync promise resolves with a truthy value, iteration stops and the corresponding element
becomes the result of the returned sync pr... | [
"Visits",
"the",
"given",
"elements",
"one",
"-",
"by",
"-",
"one",
"calls",
"the",
"given",
"callback",
"for",
"each",
"of",
"them",
"and",
"stops",
"and",
"waits",
"for",
"each",
"sync",
"promise",
"returned",
"by",
"the",
"callback",
"before",
"going",
... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L429-L454 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | function (fnVisitor, sNamespace, sLocalName) {
var fnOldVisitor = mVisitors[sNamespace];
if (fnVisitor !== null && typeof fnVisitor !== "function"
|| fnVisitor === visitNodeWrapper) {
throw new Error("Invalid visitor: " + fnVisitor);
}
if (!sNamespace || sNamespace === sNAMESPACE || sNamespace ===... | javascript | function (fnVisitor, sNamespace, sLocalName) {
var fnOldVisitor = mVisitors[sNamespace];
if (fnVisitor !== null && typeof fnVisitor !== "function"
|| fnVisitor === visitNodeWrapper) {
throw new Error("Invalid visitor: " + fnVisitor);
}
if (!sNamespace || sNamespace === sNAMESPACE || sNamespace ===... | [
"function",
"(",
"fnVisitor",
",",
"sNamespace",
",",
"sLocalName",
")",
"{",
"var",
"fnOldVisitor",
"=",
"mVisitors",
"[",
"sNamespace",
"]",
";",
"if",
"(",
"fnVisitor",
"!==",
"null",
"&&",
"typeof",
"fnVisitor",
"!==",
"\"function\"",
"||",
"fnVisitor",
... | Plug-in the given visitor which is called for each matching XML element.
@param {function} [fnVisitor]
Visitor function, will be called with the matching XML DOM element and a
{@link sap.ui.core.util.XMLPreprocessor.ICallback callback interface} which uses a map
of currently known variables; must return <code>undefine... | [
"Plug",
"-",
"in",
"the",
"given",
"visitor",
"which",
"is",
"called",
"for",
"each",
"matching",
"XML",
"element",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L531-L550 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | function (aElements, fnCallback) {
try {
return SyncPromise.resolve(stopAndGo(aElements, fnCallback));
} catch (e) {
return SyncPromise.reject(e);
}
} | javascript | function (aElements, fnCallback) {
try {
return SyncPromise.resolve(stopAndGo(aElements, fnCallback));
} catch (e) {
return SyncPromise.reject(e);
}
} | [
"function",
"(",
"aElements",
",",
"fnCallback",
")",
"{",
"try",
"{",
"return",
"SyncPromise",
".",
"resolve",
"(",
"stopAndGo",
"(",
"aElements",
",",
"fnCallback",
")",
")",
";",
"}",
"catch",
"(",
"e",
")",
"{",
"return",
"SyncPromise",
".",
"reject"... | Visits the given elements one-by-one, calls the given callback for each of
them and stops and waits for each thenable returned by the callback before
going on to the next element. If a thenable resolves with a truthy value,
iteration stops and the corresponding element becomes the result of the
returned thenable.
<b>N... | [
"Visits",
"the",
"given",
"elements",
"one",
"-",
"by",
"-",
"one",
"calls",
"the",
"given",
"callback",
"for",
"each",
"of",
"them",
"and",
"stops",
"and",
"waits",
"for",
"each",
"thenable",
"returned",
"by",
"the",
"callback",
"before",
"going",
"on",
... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L644-L650 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | function (sPath) {
var oBindingInfo,
oModel,
sResolvedPath;
sPath = sPath || "";
if (sPath[0] === "{") {
throw new Error("Must be a simple path, not a binding: " + sPath);
}
oBindingInfo = BindingParser.simpleParser("{" + sPath + "}");
oModel = oWithControl.getM... | javascript | function (sPath) {
var oBindingInfo,
oModel,
sResolvedPath;
sPath = sPath || "";
if (sPath[0] === "{") {
throw new Error("Must be a simple path, not a binding: " + sPath);
}
oBindingInfo = BindingParser.simpleParser("{" + sPath + "}");
oModel = oWithControl.getM... | [
"function",
"(",
"sPath",
")",
"{",
"var",
"oBindingInfo",
",",
"oModel",
",",
"sResolvedPath",
";",
"sPath",
"=",
"sPath",
"||",
"\"\"",
";",
"if",
"(",
"sPath",
"[",
"0",
"]",
"===",
"\"{\"",
")",
"{",
"throw",
"new",
"Error",
"(",
"\"Must be a simpl... | Returns the model's context which corresponds to the given simple binding
path. Uses the map of currently known variables.
@param {string} [sPath=""]
A simple binding path which may include a model name ("a variable"), for
example "var>some/relative/path", but not a binding ("{...}")
@returns {sap.ui.model.Context}
Th... | [
"Returns",
"the",
"model",
"s",
"context",
"which",
"corresponds",
"to",
"the",
"given",
"simple",
"binding",
"path",
".",
"Uses",
"the",
"map",
"of",
"currently",
"known",
"variables",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L667-L687 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | getResolvedBinding | function getResolvedBinding(sValue, oElement, oWithControl, bMandatory,
fnCallIfConstant) {
var vBindingInfo,
oPromise;
Measurement.average(sPerformanceGetResolvedBinding, "", aPerformanceCategories);
try {
vBindingInfo
= BindingParser.complexParser(sValue, oScope, bMandatory, true, tr... | javascript | function getResolvedBinding(sValue, oElement, oWithControl, bMandatory,
fnCallIfConstant) {
var vBindingInfo,
oPromise;
Measurement.average(sPerformanceGetResolvedBinding, "", aPerformanceCategories);
try {
vBindingInfo
= BindingParser.complexParser(sValue, oScope, bMandatory, true, tr... | [
"function",
"getResolvedBinding",
"(",
"sValue",
",",
"oElement",
",",
"oWithControl",
",",
"bMandatory",
",",
"fnCallIfConstant",
")",
"{",
"var",
"vBindingInfo",
",",
"oPromise",
";",
"Measurement",
".",
"average",
"(",
"sPerformanceGetResolvedBinding",
",",
"\"\"... | Interprets the given value as a binding and returns the resulting value; takes care
of unescaping and thus also of constant expressions.
@param {string} sValue
an XML DOM attribute value
@param {Element} oElement
the XML DOM element
@param {sap.ui.core.util._with} oWithControl
the "with" control
@param {boolean} bMand... | [
"Interprets",
"the",
"given",
"value",
"as",
"a",
"binding",
"and",
"returns",
"the",
"resulting",
"value",
";",
"takes",
"care",
"of",
"unescaping",
"and",
"thus",
"also",
"of",
"constant",
"expressions",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1086-L1125 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | liftChildNodes | function liftChildNodes(oParent, oWithControl, oTarget) {
return visitChildNodes(oParent, oWithControl).then(function () {
var oChild;
oTarget = oTarget || oParent;
while ((oChild = oParent.firstChild)) {
oTarget.parentNode.insertBefore(oChild, oTarget);
}
});
} | javascript | function liftChildNodes(oParent, oWithControl, oTarget) {
return visitChildNodes(oParent, oWithControl).then(function () {
var oChild;
oTarget = oTarget || oParent;
while ((oChild = oParent.firstChild)) {
oTarget.parentNode.insertBefore(oChild, oTarget);
}
});
} | [
"function",
"liftChildNodes",
"(",
"oParent",
",",
"oWithControl",
",",
"oTarget",
")",
"{",
"return",
"visitChildNodes",
"(",
"oParent",
",",
"oWithControl",
")",
".",
"then",
"(",
"function",
"(",
")",
"{",
"var",
"oChild",
";",
"oTarget",
"=",
"oTarget",
... | Visits the child nodes of the given parent element. Lifts them up by inserting them
before the target element.
@param {Element} oParent the XML DOM DOM element
@param {sap.ui.core.util._with} oWithControl the "with" control
@param {Element} [oTarget=oParent] the target DOM element
@returns {sap.ui.base.SyncPromise}
A ... | [
"Visits",
"the",
"child",
"nodes",
"of",
"the",
"given",
"parent",
"element",
".",
"Lifts",
"them",
"up",
"by",
"inserting",
"them",
"before",
"the",
"target",
"element",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1207-L1216 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | visitAttribute | function visitAttribute(oElement, oAttribute, oWithControl) {
if (fnSupportInfo) {
fnSupportInfo({context:undefined /*context from node clone*/, env:{caller:"visitAttribute", before: {name: oAttribute.name, value: oAttribute.value}}});
}
return resolveAttributeBinding(oElement, oAttribute, oWithControl... | javascript | function visitAttribute(oElement, oAttribute, oWithControl) {
if (fnSupportInfo) {
fnSupportInfo({context:undefined /*context from node clone*/, env:{caller:"visitAttribute", before: {name: oAttribute.name, value: oAttribute.value}}});
}
return resolveAttributeBinding(oElement, oAttribute, oWithControl... | [
"function",
"visitAttribute",
"(",
"oElement",
",",
"oAttribute",
",",
"oWithControl",
")",
"{",
"if",
"(",
"fnSupportInfo",
")",
"{",
"fnSupportInfo",
"(",
"{",
"context",
":",
"undefined",
"/*context from node clone*/",
",",
"env",
":",
"{",
"caller",
":",
"... | Visits the given attribute of the given element. If the attribute value represents a
binding expression that can be resolved, it is replaced with the resulting value.
@param {Element} oElement the XML DOM element
@param {Attr} oAttribute one of the element's attribute nodes
@param {sap.ui.core.template._with} oWithCon... | [
"Visits",
"the",
"given",
"attribute",
"of",
"the",
"given",
"element",
".",
"If",
"the",
"attribute",
"value",
"represents",
"a",
"binding",
"expression",
"that",
"can",
"be",
"resolved",
"it",
"is",
"replaced",
"with",
"the",
"resulting",
"value",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1726-L1736 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | visitAttributes | function visitAttributes(oElement, oWithControl) {
/*
* Comparator for DOM attributes by name.
*
* @param {Attr} oAttributeA
* @param {Attr} oAttributeB
* @returns {number} <0, 0, >0
*/
function comparator(oAttributeA, oAttributeB) {
return oAttributeA.name.localeCompare(oAttr... | javascript | function visitAttributes(oElement, oWithControl) {
/*
* Comparator for DOM attributes by name.
*
* @param {Attr} oAttributeA
* @param {Attr} oAttributeB
* @returns {number} <0, 0, >0
*/
function comparator(oAttributeA, oAttributeB) {
return oAttributeA.name.localeCompare(oAttr... | [
"function",
"visitAttributes",
"(",
"oElement",
",",
"oWithControl",
")",
"{",
"/*\n\t\t\t\t * Comparator for DOM attributes by name.\n\t\t\t\t *\n\t\t\t\t * @param {Attr} oAttributeA\n\t\t\t\t * @param {Attr} oAttributeB\n\t\t\t\t * @returns {number} <0, 0, >0\n\t\t\t\t */",
"function",
"compar... | Visits all attributes of the given element. If an attribute value represents a
binding expression that can be resolved, it is replaced with the resulting value.
@param {Element} oElement the XML DOM element
@param {sap.ui.core.template._with} oWithControl the "with" control
@returns {sap.ui.base.SyncPromise}
A sync pr... | [
"Visits",
"all",
"attributes",
"of",
"the",
"given",
"element",
".",
"If",
"an",
"attribute",
"value",
"represents",
"a",
"binding",
"expression",
"that",
"can",
"be",
"resolved",
"it",
"is",
"replaced",
"with",
"the",
"resulting",
"value",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1749-L1768 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | visitChildNodes | function visitChildNodes(oNode, oWithControl) {
return stopAndGo(
// cache live collection so that removing a template node does not hurt
Array.prototype.slice.apply(oNode.childNodes),
function (oChild) {
return visitNode(oChild, oWithControl);
});
} | javascript | function visitChildNodes(oNode, oWithControl) {
return stopAndGo(
// cache live collection so that removing a template node does not hurt
Array.prototype.slice.apply(oNode.childNodes),
function (oChild) {
return visitNode(oChild, oWithControl);
});
} | [
"function",
"visitChildNodes",
"(",
"oNode",
",",
"oWithControl",
")",
"{",
"return",
"stopAndGo",
"(",
"// cache live collection so that removing a template node does not hurt",
"Array",
".",
"prototype",
".",
"slice",
".",
"apply",
"(",
"oNode",
".",
"childNodes",
")"... | Visits all child nodes of the given node.
@param {Node} oNode the XML DOM node
@param {sap.ui.core.util._with} oWithControl the "with" control
@returns {sap.ui.base.SyncPromise}
A sync promise which resolves with <code>undefined</code> as soon as visiting is
done, or is rejected with a corresponding error if visiting ... | [
"Visits",
"all",
"child",
"nodes",
"of",
"the",
"given",
"node",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1779-L1786 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js | visitNode | function visitNode(oNode, oWithControl) {
var fnVisitor;
function visitAttributesAndChildren() {
return visitAttributes(oNode, oWithControl).then(function () {
return visitChildNodes(oNode, oWithControl);
}).then(function () {
if (fnSupportInfo) {
fnSupportInfo({context:oNode, env:... | javascript | function visitNode(oNode, oWithControl) {
var fnVisitor;
function visitAttributesAndChildren() {
return visitAttributes(oNode, oWithControl).then(function () {
return visitChildNodes(oNode, oWithControl);
}).then(function () {
if (fnSupportInfo) {
fnSupportInfo({context:oNode, env:... | [
"function",
"visitNode",
"(",
"oNode",
",",
"oWithControl",
")",
"{",
"var",
"fnVisitor",
";",
"function",
"visitAttributesAndChildren",
"(",
")",
"{",
"return",
"visitAttributes",
"(",
"oNode",
",",
"oWithControl",
")",
".",
"then",
"(",
"function",
"(",
")",... | Visits the given node.
@param {Node} oNode the XML DOM node
@param {sap.ui.core.template._with} oWithControl the "with" control
@returns {sap.ui.base.SyncPromise}
A sync promise which resolves with <code>undefined</code> as soon as visiting is
done, or is rejected with a corresponding error if visiting fails.
@throws ... | [
"Visits",
"the",
"given",
"node",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/XMLPreprocessor.js#L1799-L1873 | train |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/Tree.js | restoreSelectedChildren | function restoreSelectedChildren(oNode, aExpandingParents, oFirstCollapsedParent) {
var bIsExpanded = oNode.getExpanded(),
bNodeReferredInParents = false,
bIncludeInExpandingParents = bIsExpanded && !!oNode.getSelectedForNodes().length,
oFirstCollapsedParentNode = (oFirstCollapsedParent || bIsExpanded) ? oFi... | javascript | function restoreSelectedChildren(oNode, aExpandingParents, oFirstCollapsedParent) {
var bIsExpanded = oNode.getExpanded(),
bNodeReferredInParents = false,
bIncludeInExpandingParents = bIsExpanded && !!oNode.getSelectedForNodes().length,
oFirstCollapsedParentNode = (oFirstCollapsedParent || bIsExpanded) ? oFi... | [
"function",
"restoreSelectedChildren",
"(",
"oNode",
",",
"aExpandingParents",
",",
"oFirstCollapsedParent",
")",
"{",
"var",
"bIsExpanded",
"=",
"oNode",
".",
"getExpanded",
"(",
")",
",",
"bNodeReferredInParents",
"=",
"false",
",",
"bIncludeInExpandingParents",
"="... | Removes the references inside the expanded node of its selected children, because
they are no longer needed.
@param {sap.ui.commons.TreeNode} oNode The current node to look at
@param {object} aExpandingParents Array of parents of the current node that have selectedForNodes references
@param {sap.ui.commons.TreeNode} oF... | [
"Removes",
"the",
"references",
"inside",
"the",
"expanded",
"node",
"of",
"its",
"selected",
"children",
"because",
"they",
"are",
"no",
"longer",
"needed",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/Tree.js#L518-L557 | train |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/Tree.js | rememberSelectedChildren | function rememberSelectedChildren(oNode, oRootNode) {
var aNodes = oNode._getNodes(),
oCurrentNode;
for (var i = 0; i < aNodes.length; i++) {
oCurrentNode = aNodes[i];
if (oCurrentNode.getIsSelected()) {
oRootNode.addAssociation("selectedForNodes", oCurrentNode, true);
}
rememberSelectedChildr... | javascript | function rememberSelectedChildren(oNode, oRootNode) {
var aNodes = oNode._getNodes(),
oCurrentNode;
for (var i = 0; i < aNodes.length; i++) {
oCurrentNode = aNodes[i];
if (oCurrentNode.getIsSelected()) {
oRootNode.addAssociation("selectedForNodes", oCurrentNode, true);
}
rememberSelectedChildr... | [
"function",
"rememberSelectedChildren",
"(",
"oNode",
",",
"oRootNode",
")",
"{",
"var",
"aNodes",
"=",
"oNode",
".",
"_getNodes",
"(",
")",
",",
"oCurrentNode",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"aNodes",
".",
"length",
";",
"i",
... | Adds references inside the collapsed node of all its selected children recursively.
@param {sap.ui.commons.TreeNode} oNode The current node to look at
@param {sap.ui.commons.TreeNode} oRootNode The root node that was collapsed | [
"Adds",
"references",
"inside",
"the",
"collapsed",
"node",
"of",
"all",
"its",
"selected",
"children",
"recursively",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/Tree.js#L564-L577 | train |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/MenuBar.js | function(oThis){
var iVisibleItems = 0;
var jAreaRef = oThis.$("area");
var jItems = jAreaRef.children();
var bRtl = sap.ui.getCore().getConfiguration().getRTL();
var lastOffsetLeft = (bRtl ? 100000 : 0);
jItems.each(function(iIdx) {
if (iIdx == 0) {
return true;
}
var currentOffsetLeft = t... | javascript | function(oThis){
var iVisibleItems = 0;
var jAreaRef = oThis.$("area");
var jItems = jAreaRef.children();
var bRtl = sap.ui.getCore().getConfiguration().getRTL();
var lastOffsetLeft = (bRtl ? 100000 : 0);
jItems.each(function(iIdx) {
if (iIdx == 0) {
return true;
}
var currentOffsetLeft = t... | [
"function",
"(",
"oThis",
")",
"{",
"var",
"iVisibleItems",
"=",
"0",
";",
"var",
"jAreaRef",
"=",
"oThis",
".",
"$",
"(",
"\"area\"",
")",
";",
"var",
"jItems",
"=",
"jAreaRef",
".",
"children",
"(",
")",
";",
"var",
"bRtl",
"=",
"sap",
".",
"ui",... | Compute actual number of items currently hidden due to overflow | [
"Compute",
"actual",
"number",
"of",
"items",
"currently",
"hidden",
"due",
"to",
"overflow"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/MenuBar.js#L446-L478 | train | |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/MenuBar.js | function(oThis){
var iVisibleItems = getVisibleItemCount(oThis);
var _iVisibleItems = iVisibleItems;
var jAreaRef = oThis.$("area");
var jItems = jAreaRef.children();
var jOvrFlwRef = oThis.$("ovrflw");
var bUpdateFocus = false;
if (iVisibleItems < jItems.length - 1) {
jOvrFlwRef.attr("style", "disp... | javascript | function(oThis){
var iVisibleItems = getVisibleItemCount(oThis);
var _iVisibleItems = iVisibleItems;
var jAreaRef = oThis.$("area");
var jItems = jAreaRef.children();
var jOvrFlwRef = oThis.$("ovrflw");
var bUpdateFocus = false;
if (iVisibleItems < jItems.length - 1) {
jOvrFlwRef.attr("style", "disp... | [
"function",
"(",
"oThis",
")",
"{",
"var",
"iVisibleItems",
"=",
"getVisibleItemCount",
"(",
"oThis",
")",
";",
"var",
"_iVisibleItems",
"=",
"iVisibleItems",
";",
"var",
"jAreaRef",
"=",
"oThis",
".",
"$",
"(",
"\"area\"",
")",
";",
"var",
"jItems",
"=",
... | Handle the resize of the menubar | [
"Handle",
"the",
"resize",
"of",
"the",
"menubar"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/MenuBar.js#L482-L547 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v4/ODataModel.js | parseAndValidateSystemQueryOption | function parseAndValidateSystemQueryOption (mOptions, sOptionName, aAllowed) {
var sExpandOptionName,
mExpandOptions,
sExpandPath,
vValue = mOptions[sOptionName];
if (!bSystemQueryOptionsAllowed || aAllowed.indexOf(sOptionName) < 0) {
throw new Error("System query option " + sOptionName + " is n... | javascript | function parseAndValidateSystemQueryOption (mOptions, sOptionName, aAllowed) {
var sExpandOptionName,
mExpandOptions,
sExpandPath,
vValue = mOptions[sOptionName];
if (!bSystemQueryOptionsAllowed || aAllowed.indexOf(sOptionName) < 0) {
throw new Error("System query option " + sOptionName + " is n... | [
"function",
"parseAndValidateSystemQueryOption",
"(",
"mOptions",
",",
"sOptionName",
",",
"aAllowed",
")",
"{",
"var",
"sExpandOptionName",
",",
"mExpandOptions",
",",
"sExpandPath",
",",
"vValue",
"=",
"mOptions",
"[",
"sOptionName",
"]",
";",
"if",
"(",
"!",
... | Parses the query options for the given option name "sOptionName" in the given map of
query options "mOptions" to an object if necessary.
Validates if the given query option name is allowed.
@param {object} mOptions Map of query options by name
@param {string} sOptionName Name of the query option
@param {string[]} aAll... | [
"Parses",
"the",
"query",
"options",
"for",
"the",
"given",
"option",
"name",
"sOptionName",
"in",
"the",
"given",
"map",
"of",
"query",
"options",
"mOptions",
"to",
"an",
"object",
"if",
"necessary",
".",
"Validates",
"if",
"the",
"given",
"query",
"option"... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataModel.js#L724-L768 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v4/ODataModel.js | startsWithQualifiedName | function startsWithQualifiedName(sMetaPath) {
var iDotPos = sMetaPath.indexOf("."),
iSlashPos = sMetaPath.indexOf("/");
return iDotPos > 0 && (iSlashPos < 0 || iDotPos < iSlashPos);
} | javascript | function startsWithQualifiedName(sMetaPath) {
var iDotPos = sMetaPath.indexOf("."),
iSlashPos = sMetaPath.indexOf("/");
return iDotPos > 0 && (iSlashPos < 0 || iDotPos < iSlashPos);
} | [
"function",
"startsWithQualifiedName",
"(",
"sMetaPath",
")",
"{",
"var",
"iDotPos",
"=",
"sMetaPath",
".",
"indexOf",
"(",
"\".\"",
")",
",",
"iSlashPos",
"=",
"sMetaPath",
".",
"indexOf",
"(",
"\"/\"",
")",
";",
"return",
"iDotPos",
">",
"0",
"&&",
"(",
... | Checks if the given meta path contains a dot in its first segment.
@param {string} sMetaPath The meta path
@returns {boolean} Whether the given meta path contains a dot in its first segment | [
"Checks",
"if",
"the",
"given",
"meta",
"path",
"contains",
"a",
"dot",
"in",
"its",
"first",
"segment",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataModel.js#L896-L901 | train |
SAP/openui5 | src/sap.ui.rta/src/sap/ui/rta/plugin/Plugin.js | _checkAggregationBindingTemplateID | function _checkAggregationBindingTemplateID(oOverlay, vStableElement){
var mAggregationInfo = OverlayUtil.getAggregationInformation(oOverlay, oOverlay.getElement().sParentAggregationName);
if (!mAggregationInfo.templateId) {
return true;
} else {
return !FlexUtils.checkControlId(mAggregationInfo.templateId,... | javascript | function _checkAggregationBindingTemplateID(oOverlay, vStableElement){
var mAggregationInfo = OverlayUtil.getAggregationInformation(oOverlay, oOverlay.getElement().sParentAggregationName);
if (!mAggregationInfo.templateId) {
return true;
} else {
return !FlexUtils.checkControlId(mAggregationInfo.templateId,... | [
"function",
"_checkAggregationBindingTemplateID",
"(",
"oOverlay",
",",
"vStableElement",
")",
"{",
"var",
"mAggregationInfo",
"=",
"OverlayUtil",
".",
"getAggregationInformation",
"(",
"oOverlay",
",",
"oOverlay",
".",
"getElement",
"(",
")",
".",
"sParentAggregationNa... | Check if related binding template has stable id | [
"Check",
"if",
"related",
"binding",
"template",
"has",
"stable",
"id"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.rta/src/sap/ui/rta/plugin/Plugin.js#L271-L278 | train |
SAP/openui5 | src/sap.f/src/sap/f/FlexibleColumnLayoutSemanticHelper.js | function (oFlexibleColumnLayout, oSettings) {
var oModeToMaxColumnsCountMapping = {
Normal: 3,
MasterDetail: 2,
SingleColumn: 1
},
iInitial,
iMax;
oSettings || (oSettings = {});
this._oFCL = oFlexibleColumnLayout;
// Layout types
this._defaultLayoutType = LT.OneColumn;
this._defaultTwo... | javascript | function (oFlexibleColumnLayout, oSettings) {
var oModeToMaxColumnsCountMapping = {
Normal: 3,
MasterDetail: 2,
SingleColumn: 1
},
iInitial,
iMax;
oSettings || (oSettings = {});
this._oFCL = oFlexibleColumnLayout;
// Layout types
this._defaultLayoutType = LT.OneColumn;
this._defaultTwo... | [
"function",
"(",
"oFlexibleColumnLayout",
",",
"oSettings",
")",
"{",
"var",
"oModeToMaxColumnsCountMapping",
"=",
"{",
"Normal",
":",
"3",
",",
"MasterDetail",
":",
"2",
",",
"SingleColumn",
":",
"1",
"}",
",",
"iInitial",
",",
"iMax",
";",
"oSettings",
"||... | Constructor for an sap.f.FlexibleColumnLayoutSemanticHelper.
@class
Helper class, facilitating the implementation of the recommended UX design of a <code>sap.f.FlexibleColumnLayout</code>-based app.
<b>Note:</b> Using this class is not mandatory in order to build an app with <code>sap.f.FlexibleColumnLayout</code>, b... | [
"Constructor",
"for",
"an",
"sap",
".",
"f",
".",
"FlexibleColumnLayoutSemanticHelper",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.f/src/sap/f/FlexibleColumnLayoutSemanticHelper.js#L99-L134 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/debug/Highlighter.js | function(sId, bFilled, sColor, iBorderWidth) {
this.sId = sId || uid();
this.bFilled = (bFilled == true);
this.sColor = sColor || 'blue';
if ( isNaN(iBorderWidth ) ) {
this.iBorderWidth = 2;
} else if ( iBorderWidth <= 0 ) {
this.iBorderWidth = 0;
} else {
this.iBorderWidth = iBorderWidth;
}
} | javascript | function(sId, bFilled, sColor, iBorderWidth) {
this.sId = sId || uid();
this.bFilled = (bFilled == true);
this.sColor = sColor || 'blue';
if ( isNaN(iBorderWidth ) ) {
this.iBorderWidth = 2;
} else if ( iBorderWidth <= 0 ) {
this.iBorderWidth = 0;
} else {
this.iBorderWidth = iBorderWidth;
}
} | [
"function",
"(",
"sId",
",",
"bFilled",
",",
"sColor",
",",
"iBorderWidth",
")",
"{",
"this",
".",
"sId",
"=",
"sId",
"||",
"uid",
"(",
")",
";",
"this",
".",
"bFilled",
"=",
"(",
"bFilled",
"==",
"true",
")",
";",
"this",
".",
"sColor",
"=",
"sC... | Creates a new highlighter object without displaying it.
The DOM node is not created until the first call to method {@link #highlight}.
@param {string} [sId] id that is used by the new highlighter
@param {boolean} [bFilled] whether the box of the highlighter is partially opaque (20%), defaults to false
@param {string}... | [
"Creates",
"a",
"new",
"highlighter",
"object",
"without",
"displaying",
"it",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/debug/Highlighter.js#L31-L42 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/CreationRow.js | createDefaultToolbar | function createDefaultToolbar(oCreationRow) {
return new OverflowToolbar({
content: [
new ToolbarSpacer(),
new Button({
text: TableUtils.getResourceText("TBL_CREATIONROW_APPLY"),
type: MLibrary.ButtonType.Emphasized,
enabled: oCreationRow.getApplyEnabled(),
press: function() {
oCr... | javascript | function createDefaultToolbar(oCreationRow) {
return new OverflowToolbar({
content: [
new ToolbarSpacer(),
new Button({
text: TableUtils.getResourceText("TBL_CREATIONROW_APPLY"),
type: MLibrary.ButtonType.Emphasized,
enabled: oCreationRow.getApplyEnabled(),
press: function() {
oCr... | [
"function",
"createDefaultToolbar",
"(",
"oCreationRow",
")",
"{",
"return",
"new",
"OverflowToolbar",
"(",
"{",
"content",
":",
"[",
"new",
"ToolbarSpacer",
"(",
")",
",",
"new",
"Button",
"(",
"{",
"text",
":",
"TableUtils",
".",
"getResourceText",
"(",
"\... | Creates a default toolbar providing basic buttons and functionality.
@param {sap.ui.table.CreationRow} oCreationRow The creation row to get the settings for the toolbar creation from.
@returns {sap.m.OverflowToolbar} The default toolbar. | [
"Creates",
"a",
"default",
"toolbar",
"providing",
"basic",
"buttons",
"and",
"functionality",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/CreationRow.js#L165-L181 | train |
SAP/openui5 | src/sap.ui.commons/src/sap/ui/commons/FormattedTextView.js | function (aControls) {
if (this.hasControls()) {
this.removeAllAggregation("controls");
}
var bIsArray = Array.isArray(aControls);
if (bIsArray && aControls.length > 0) {
// iterate through the given array but suppress invalidate
for (var i = 0; i < aControls.length; i++) {
this.addAggrega... | javascript | function (aControls) {
if (this.hasControls()) {
this.removeAllAggregation("controls");
}
var bIsArray = Array.isArray(aControls);
if (bIsArray && aControls.length > 0) {
// iterate through the given array but suppress invalidate
for (var i = 0; i < aControls.length; i++) {
this.addAggrega... | [
"function",
"(",
"aControls",
")",
"{",
"if",
"(",
"this",
".",
"hasControls",
"(",
")",
")",
"{",
"this",
".",
"removeAllAggregation",
"(",
"\"controls\"",
")",
";",
"}",
"var",
"bIsArray",
"=",
"Array",
".",
"isArray",
"(",
"aControls",
")",
";",
"if... | Sets the controls to be rendered.
@param {array} aControls Controls should be rendered
@private | [
"Sets",
"the",
"controls",
"to",
"be",
"rendered",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.commons/src/sap/ui/commons/FormattedTextView.js#L227-L240 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/Element.js | function(element, key) {
var aData = element.getAggregation("customData");
if (aData) {
for (var i = 0; i < aData.length; i++) {
if (aData[i].getKey() == key) {
return aData[i];
}
}
}
return null;
} | javascript | function(element, key) {
var aData = element.getAggregation("customData");
if (aData) {
for (var i = 0; i < aData.length; i++) {
if (aData[i].getKey() == key) {
return aData[i];
}
}
}
return null;
} | [
"function",
"(",
"element",
",",
"key",
")",
"{",
"var",
"aData",
"=",
"element",
".",
"getAggregation",
"(",
"\"customData\"",
")",
";",
"if",
"(",
"aData",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"aData",
".",
"length",
";",
... | Returns the data object with the given key | [
"Returns",
"the",
"data",
"object",
"with",
"the",
"given",
"key"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Element.js#L908-L918 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/Element.js | function(element, key, value, writeToDom) {
// DELETE
if (value === null) { // delete this property
var dataObject = getDataObject(element, key);
if (!dataObject) {
return;
}
var dataCount = element.getAggregation("customData").length;
if (dataCount == 1) {
element.destroyAggregati... | javascript | function(element, key, value, writeToDom) {
// DELETE
if (value === null) { // delete this property
var dataObject = getDataObject(element, key);
if (!dataObject) {
return;
}
var dataCount = element.getAggregation("customData").length;
if (dataCount == 1) {
element.destroyAggregati... | [
"function",
"(",
"element",
",",
"key",
",",
"value",
",",
"writeToDom",
")",
"{",
"// DELETE",
"if",
"(",
"value",
"===",
"null",
")",
"{",
"// delete this property",
"var",
"dataObject",
"=",
"getDataObject",
"(",
"element",
",",
"key",
")",
";",
"if",
... | Contains the data modification logic | [
"Contains",
"the",
"data",
"modification",
"logic"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Element.js#L923-L952 | train | |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/ui/models/PresetsUtils.js | function (aSelectedRulesPlain) {
// if we persist settings - load any selection presets, else use the default ones
if (this.model.getProperty("/persistingSettings")) {
var aPersistedPresets = Storage.getSelectionPresets();
if (aPersistedPresets) {
this.model.setProperty("/selectionPresets", aPersiste... | javascript | function (aSelectedRulesPlain) {
// if we persist settings - load any selection presets, else use the default ones
if (this.model.getProperty("/persistingSettings")) {
var aPersistedPresets = Storage.getSelectionPresets();
if (aPersistedPresets) {
this.model.setProperty("/selectionPresets", aPersiste... | [
"function",
"(",
"aSelectedRulesPlain",
")",
"{",
"// if we persist settings - load any selection presets, else use the default ones",
"if",
"(",
"this",
".",
"model",
".",
"getProperty",
"(",
"\"/persistingSettings\"",
")",
")",
"{",
"var",
"aPersistedPresets",
"=",
"Stora... | Initializes the current selection preset
@param {Array} aSelectedRulesPlain The plain list of selected rules (same format as in the presets json file) | [
"Initializes",
"the",
"current",
"selection",
"preset"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/models/PresetsUtils.js#L34-L89 | train | |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/ui/models/PresetsUtils.js | function (aSelectedRulesPlain) {
var oPreset = this.model.getProperty("/selectionPresetsCurrent");
oPreset.selections = aSelectedRulesPlain;
if (!(oPreset.isModified || oPreset.isMySelection)) {
oPreset.isModified = true;
oPreset.title = oPreset.title + " *";
}
this.model.setProperty("/selecti... | javascript | function (aSelectedRulesPlain) {
var oPreset = this.model.getProperty("/selectionPresetsCurrent");
oPreset.selections = aSelectedRulesPlain;
if (!(oPreset.isModified || oPreset.isMySelection)) {
oPreset.isModified = true;
oPreset.title = oPreset.title + " *";
}
this.model.setProperty("/selecti... | [
"function",
"(",
"aSelectedRulesPlain",
")",
"{",
"var",
"oPreset",
"=",
"this",
".",
"model",
".",
"getProperty",
"(",
"\"/selectionPresetsCurrent\"",
")",
";",
"oPreset",
".",
"selections",
"=",
"aSelectedRulesPlain",
";",
"if",
"(",
"!",
"(",
"oPreset",
"."... | Synchronizes the current rules selection with the current selection preset
@param {Array} aSelectedRulesPlain The plain list of selected rules (same format as in the presets json file) | [
"Synchronizes",
"the",
"current",
"rules",
"selection",
"with",
"the",
"current",
"selection",
"preset"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/models/PresetsUtils.js#L95-L110 | train | |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/ui/models/PresetsUtils.js | function (sId, sTitle, sDescription, aSelections) {
var oRulesToExport = {
id: sId,
title: sTitle,
description: sDescription,
dateExported: (new Date()).toISOString(),
version: "1.0",
selections: aSelections
};
var oExportObject = JSON.stringify(oRulesToExport);
File.save(oExportOb... | javascript | function (sId, sTitle, sDescription, aSelections) {
var oRulesToExport = {
id: sId,
title: sTitle,
description: sDescription,
dateExported: (new Date()).toISOString(),
version: "1.0",
selections: aSelections
};
var oExportObject = JSON.stringify(oRulesToExport);
File.save(oExportOb... | [
"function",
"(",
"sId",
",",
"sTitle",
",",
"sDescription",
",",
"aSelections",
")",
"{",
"var",
"oRulesToExport",
"=",
"{",
"id",
":",
"sId",
",",
"title",
":",
"sTitle",
",",
"description",
":",
"sDescription",
",",
"dateExported",
":",
"(",
"new",
"Da... | Exports the given selections to a file
@param {string} sId The id of the export
@param {string} sTitle The title of the export
@param {string} sDescription Some description of what is exported
@param {array} aSelections An array of rules IDs which are selected | [
"Exports",
"the",
"given",
"selections",
"to",
"a",
"file"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/models/PresetsUtils.js#L119-L132 | train | |
SAP/openui5 | src/sap.ui.support/src/sap/ui/support/supportRules/ui/models/PresetsUtils.js | function (oImport) {
var bIsFileValid = true;
if (!oImport.hasOwnProperty("title")) {
bIsFileValid = false;
}
if (!oImport.hasOwnProperty("selections")) {
bIsFileValid = false;
} else if (!Array.isArray(oImport.selections)) {
bIsFileValid = false;
} else {
for (var i = 0; i < oImport... | javascript | function (oImport) {
var bIsFileValid = true;
if (!oImport.hasOwnProperty("title")) {
bIsFileValid = false;
}
if (!oImport.hasOwnProperty("selections")) {
bIsFileValid = false;
} else if (!Array.isArray(oImport.selections)) {
bIsFileValid = false;
} else {
for (var i = 0; i < oImport... | [
"function",
"(",
"oImport",
")",
"{",
"var",
"bIsFileValid",
"=",
"true",
";",
"if",
"(",
"!",
"oImport",
".",
"hasOwnProperty",
"(",
"\"title\"",
")",
")",
"{",
"bIsFileValid",
"=",
"false",
";",
"}",
"if",
"(",
"!",
"oImport",
".",
"hasOwnProperty",
... | Validates if the given import is in the correct format.
@param {Object} oImport The preset object to import
@return {boolean} Is the import data a valid rule preset file | [
"Validates",
"if",
"the",
"given",
"import",
"is",
"in",
"the",
"correct",
"format",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.support/src/sap/ui/support/supportRules/ui/models/PresetsUtils.js#L139-L161 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/Core.js | preloadLibraryAsync | function preloadLibraryAsync(libConfig) {
var that = this;
libConfig = evalLibConfig(libConfig);
var lib = libConfig.name,
fileType = libConfig.fileType,
libPackage = lib.replace(/\./g, '/'),
http2 = this.oConfiguration.getDepCache();
if ( fileType === 'none' || !!sap.ui.loader._.getModuleState(lib... | javascript | function preloadLibraryAsync(libConfig) {
var that = this;
libConfig = evalLibConfig(libConfig);
var lib = libConfig.name,
fileType = libConfig.fileType,
libPackage = lib.replace(/\./g, '/'),
http2 = this.oConfiguration.getDepCache();
if ( fileType === 'none' || !!sap.ui.loader._.getModuleState(lib... | [
"function",
"preloadLibraryAsync",
"(",
"libConfig",
")",
"{",
"var",
"that",
"=",
"this",
";",
"libConfig",
"=",
"evalLibConfig",
"(",
"libConfig",
")",
";",
"var",
"lib",
"=",
"libConfig",
".",
"name",
",",
"fileType",
"=",
"libConfig",
".",
"fileType",
... | Preloads a library asynchronously.
@param {string|object} libConfig Name of the library to preload or settings object describing library
@param {string} [libConfig.name] Name of the library to preload
@param {boolean|undefined} [libConfig.json] Whether library supports only JSON (<code>true</code>) or only JS (<code>f... | [
"Preloads",
"a",
"library",
"asynchronously",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Core.js#L1599-L1669 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/Core.js | registerPreloadedModules | function registerPreloadedModules(oData, sURL) {
var modules = oData.modules,
fnUI5ToRJS = function(sName) {
return /^jquery\.sap\./.test(sName) ? sName : sName.replace(/\./g, "/");
};
if ( Version(oData.version || "1.0").compareTo("2.0") < 0 ) {
modules = {};
for ( var sName in oData.modules ... | javascript | function registerPreloadedModules(oData, sURL) {
var modules = oData.modules,
fnUI5ToRJS = function(sName) {
return /^jquery\.sap\./.test(sName) ? sName : sName.replace(/\./g, "/");
};
if ( Version(oData.version || "1.0").compareTo("2.0") < 0 ) {
modules = {};
for ( var sName in oData.modules ... | [
"function",
"registerPreloadedModules",
"(",
"oData",
",",
"sURL",
")",
"{",
"var",
"modules",
"=",
"oData",
".",
"modules",
",",
"fnUI5ToRJS",
"=",
"function",
"(",
"sName",
")",
"{",
"return",
"/",
"^jquery\\.sap\\.",
"/",
".",
"test",
"(",
"sName",
")",... | Adds all resources from a preload bundle to the preload cache.
When a resource exists already in the cache, the new content is ignored.
@param {object} oData Preload bundle
@param {string} [oData.url] URL from which the bundle has been loaded
@param {string} [oData.name] Unique name of the bundle
@param {string} [oDa... | [
"Adds",
"all",
"resources",
"from",
"a",
"preload",
"bundle",
"to",
"the",
"preload",
"cache",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Core.js#L1716-L1728 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/Core.js | preprocessDependencies | function preprocessDependencies(dependencies) {
if (Array.isArray(dependencies)) {
// remove .library-preload suffix from dependencies
return dependencies.map(function (dep) {
return dep.replace(/\.library-preload$/, '');
});
}
return dependencies;
} | javascript | function preprocessDependencies(dependencies) {
if (Array.isArray(dependencies)) {
// remove .library-preload suffix from dependencies
return dependencies.map(function (dep) {
return dep.replace(/\.library-preload$/, '');
});
}
return dependencies;
} | [
"function",
"preprocessDependencies",
"(",
"dependencies",
")",
"{",
"if",
"(",
"Array",
".",
"isArray",
"(",
"dependencies",
")",
")",
"{",
"// remove .library-preload suffix from dependencies",
"return",
"dependencies",
".",
"map",
"(",
"function",
"(",
"dep",
")"... | Preprocessed given dependencies
@param {object} oDependencies - Dependencies to preprocess
@returns {object} oDependencies - Proprocessed dependencies | [
"Preprocessed",
"given",
"dependencies"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Core.js#L1736-L1744 | 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.