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.table/src/sap/ui/table/TableScrollExtension.js | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var iVerticalScrollRange = oScrollExtension.getVerticalScrollHeight() - oScrollExtension.getVerticalScrollbarHeight();
return Math.max(0, iVerticalScrollRange);
} | javascript | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var iVerticalScrollRange = oScrollExtension.getVerticalScrollHeight() - oScrollExtension.getVerticalScrollbarHeight();
return Math.max(0, iVerticalScrollRange);
} | [
"function",
"(",
"oTable",
")",
"{",
"var",
"oScrollExtension",
"=",
"oTable",
".",
"_getScrollExtension",
"(",
")",
";",
"var",
"iVerticalScrollRange",
"=",
"oScrollExtension",
".",
"getVerticalScrollHeight",
"(",
")",
"-",
"oScrollExtension",
".",
"getVerticalScro... | Gets the vertical scroll range.
@param {sap.ui.table.Table} oTable Instance of the table.
@returns {int} The vertical scroll range. | [
"Gets",
"the",
"vertical",
"scroll",
"range",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L569-L573 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var iVirtualRowCount = oTable._getTotalRowCount() - oTable.getVisibleRowCount();
var iScrollRangeWithoutBuffer;
if (TableUtils.isVariableRowHeightEnabled(oTable)) {
iScrollRangeWithoutBuffer = VerticalScrollingHelper.getScrollRange... | javascript | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var iVirtualRowCount = oTable._getTotalRowCount() - oTable.getVisibleRowCount();
var iScrollRangeWithoutBuffer;
if (TableUtils.isVariableRowHeightEnabled(oTable)) {
iScrollRangeWithoutBuffer = VerticalScrollingHelper.getScrollRange... | [
"function",
"(",
"oTable",
")",
"{",
"var",
"oScrollExtension",
"=",
"oTable",
".",
"_getScrollExtension",
"(",
")",
";",
"var",
"iVirtualRowCount",
"=",
"oTable",
".",
"_getTotalRowCount",
"(",
")",
"-",
"oTable",
".",
"getVisibleRowCount",
"(",
")",
";",
"... | Gets the fraction of the vertical scroll range which corresponds to a row. This value specifies how many pixels must be scrolled to
scroll one row.
@param {sap.ui.table.Table} oTable Instance of the table.
@returns {number} The fraction of the vertical scroll range which corresponds to a row. | [
"Gets",
"the",
"fraction",
"of",
"the",
"vertical",
"scroll",
"range",
"which",
"corresponds",
"to",
"a",
"row",
".",
"This",
"value",
"specifies",
"how",
"many",
"pixels",
"must",
"be",
"scrolled",
"to",
"scroll",
"one",
"row",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L614-L634 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(oTable) {
if (!TableUtils.isVariableRowHeightEnabled(oTable)) {
return false;
}
var iScrollRange = VerticalScrollingHelper.getScrollRange(oTable);
var nScrollPosition = VerticalScrollingHelper.getScrollPosition(oTable);
var iScrollRangeBugger = VerticalScrollingHelper.getScrollRangeBuffer(o... | javascript | function(oTable) {
if (!TableUtils.isVariableRowHeightEnabled(oTable)) {
return false;
}
var iScrollRange = VerticalScrollingHelper.getScrollRange(oTable);
var nScrollPosition = VerticalScrollingHelper.getScrollPosition(oTable);
var iScrollRangeBugger = VerticalScrollingHelper.getScrollRangeBuffer(o... | [
"function",
"(",
"oTable",
")",
"{",
"if",
"(",
"!",
"TableUtils",
".",
"isVariableRowHeightEnabled",
"(",
"oTable",
")",
")",
"{",
"return",
"false",
";",
"}",
"var",
"iScrollRange",
"=",
"VerticalScrollingHelper",
".",
"getScrollRange",
"(",
"oTable",
")",
... | Checks whether the vertical scroll position is in the buffer reserved to scroll the final overflow.
@param {sap.ui.table.Table} oTable Instance of the table.
@returns {boolean} Returns <code>true</code>, if the vertical scroll position is in the buffer. | [
"Checks",
"whether",
"the",
"vertical",
"scroll",
"position",
"is",
"in",
"the",
"buffer",
"reserved",
"to",
"scroll",
"the",
"final",
"overflow",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L642-L652 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(oTable) {
if (!oTable || !oTable._aRowHeights) {
return 0;
}
var aRowHeights = oTable._aRowHeights;
var iEstimatedViewportHeight = oTable._getDefaultRowHeight() * oTable.getVisibleRowCount();
// Only sum rows filled with data, ignore empty rows.
if (oTable.getVisibleRowCount() >= oTable... | javascript | function(oTable) {
if (!oTable || !oTable._aRowHeights) {
return 0;
}
var aRowHeights = oTable._aRowHeights;
var iEstimatedViewportHeight = oTable._getDefaultRowHeight() * oTable.getVisibleRowCount();
// Only sum rows filled with data, ignore empty rows.
if (oTable.getVisibleRowCount() >= oTable... | [
"function",
"(",
"oTable",
")",
"{",
"if",
"(",
"!",
"oTable",
"||",
"!",
"oTable",
".",
"_aRowHeights",
")",
"{",
"return",
"0",
";",
"}",
"var",
"aRowHeights",
"=",
"oTable",
".",
"_aRowHeights",
";",
"var",
"iEstimatedViewportHeight",
"=",
"oTable",
"... | Gets the inner vertical scroll range. This is the amount of pixels that the rows overflow their container.
@param {sap.ui.table.Table} oTable Instance of the table.
@returns {int} The inner vertical scroll range. | [
"Gets",
"the",
"inner",
"vertical",
"scroll",
"range",
".",
"This",
"is",
"the",
"amount",
"of",
"pixels",
"that",
"the",
"rows",
"overflow",
"their",
"container",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L660-L679 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(oTable, oEvent) {
var bExecuteDefault = true;
if (internal(oTable).fnOnRowsUpdatedPreprocessor != null) {
bExecuteDefault = internal(oTable).fnOnRowsUpdatedPreprocessor.call(oTable, oEvent) !== false;
}
internal(oTable).fnOnRowsUpdatedPreprocessor = null;
return bExecuteDefault;
} | javascript | function(oTable, oEvent) {
var bExecuteDefault = true;
if (internal(oTable).fnOnRowsUpdatedPreprocessor != null) {
bExecuteDefault = internal(oTable).fnOnRowsUpdatedPreprocessor.call(oTable, oEvent) !== false;
}
internal(oTable).fnOnRowsUpdatedPreprocessor = null;
return bExecuteDefault;
} | [
"function",
"(",
"oTable",
",",
"oEvent",
")",
"{",
"var",
"bExecuteDefault",
"=",
"true",
";",
"if",
"(",
"internal",
"(",
"oTable",
")",
".",
"fnOnRowsUpdatedPreprocessor",
"!=",
"null",
")",
"{",
"bExecuteDefault",
"=",
"internal",
"(",
"oTable",
")",
"... | If a preprocessor was set, it is called and afterwards removed.
@param {sap.ui.table.Table} oTable Instance of the table.
@param {Object} oEvent The event object.
@returns {boolean} Whether the default action should be executed. | [
"If",
"a",
"preprocessor",
"was",
"set",
"it",
"is",
"called",
"and",
"afterwards",
"removed",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L712-L719 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var aScrollAreas = VerticalScrollingHelper.getScrollAreas(oTable);
var oVSb = oScrollExtension.getVerticalScrollbar();
if (!oScrollExtension._onVerticalScrollEventHandler) {
oScrollExtension._onVerticalScrollEventHandler = Vertical... | javascript | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var aScrollAreas = VerticalScrollingHelper.getScrollAreas(oTable);
var oVSb = oScrollExtension.getVerticalScrollbar();
if (!oScrollExtension._onVerticalScrollEventHandler) {
oScrollExtension._onVerticalScrollEventHandler = Vertical... | [
"function",
"(",
"oTable",
")",
"{",
"var",
"oScrollExtension",
"=",
"oTable",
".",
"_getScrollExtension",
"(",
")",
";",
"var",
"aScrollAreas",
"=",
"VerticalScrollingHelper",
".",
"getScrollAreas",
"(",
"oTable",
")",
";",
"var",
"oVSb",
"=",
"oScrollExtension... | Adds the event listeners which are required for the vertical scrolling.
@param {sap.ui.table.Table} oTable Instance of the table. | [
"Adds",
"the",
"event",
"listeners",
"which",
"are",
"required",
"for",
"the",
"vertical",
"scrolling",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L764-L785 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var aScrollAreas = VerticalScrollingHelper.getScrollAreas(oTable);
var oVSb = oScrollExtension.getVerticalScrollbar();
if (oScrollExtension._onVerticalScrollEventHandler) {
for (var i = 0; i < aScrollAreas.length; i++) {
aScro... | javascript | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var aScrollAreas = VerticalScrollingHelper.getScrollAreas(oTable);
var oVSb = oScrollExtension.getVerticalScrollbar();
if (oScrollExtension._onVerticalScrollEventHandler) {
for (var i = 0; i < aScrollAreas.length; i++) {
aScro... | [
"function",
"(",
"oTable",
")",
"{",
"var",
"oScrollExtension",
"=",
"oTable",
".",
"_getScrollExtension",
"(",
")",
";",
"var",
"aScrollAreas",
"=",
"VerticalScrollingHelper",
".",
"getScrollAreas",
"(",
"oTable",
")",
";",
"var",
"oVSb",
"=",
"oScrollExtension... | Removes event listeners which are required for the vertical scrolling.
@param {sap.ui.table.Table} oTable Instance of the table. | [
"Removes",
"event",
"listeners",
"which",
"are",
"required",
"for",
"the",
"vertical",
"scrolling",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L792-L810 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(oTable) {
var aScrollAreas = [
oTable._getScrollExtension().getVerticalScrollbar()
];
return aScrollAreas.filter(function(oScrollArea) {
return oScrollArea != null;
});
} | javascript | function(oTable) {
var aScrollAreas = [
oTable._getScrollExtension().getVerticalScrollbar()
];
return aScrollAreas.filter(function(oScrollArea) {
return oScrollArea != null;
});
} | [
"function",
"(",
"oTable",
")",
"{",
"var",
"aScrollAreas",
"=",
"[",
"oTable",
".",
"_getScrollExtension",
"(",
")",
".",
"getVerticalScrollbar",
"(",
")",
"]",
";",
"return",
"aScrollAreas",
".",
"filter",
"(",
"function",
"(",
"oScrollArea",
")",
"{",
"... | Gets the areas of the table which can be scrolled vertically.
@param {sap.ui.table.Table} oTable Instance of the table.
@returns {HTMLElement[]} Returns only elements which exist in the DOM.
@private | [
"Gets",
"the",
"areas",
"of",
"the",
"table",
"which",
"can",
"be",
"scrolled",
"vertically",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L829-L837 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(mOptions, oEvent) {
if (oEvent.type === "touchstart" || oEvent.pointerType === "touch") {
var oScrollExtension = this._getScrollExtension();
var oHSb = oScrollExtension.getHorizontalScrollbar();
var oVSb = oScrollExtension.getVerticalScrollbar();
var oTouchObject = oEvent.touches ? oEvent.to... | javascript | function(mOptions, oEvent) {
if (oEvent.type === "touchstart" || oEvent.pointerType === "touch") {
var oScrollExtension = this._getScrollExtension();
var oHSb = oScrollExtension.getHorizontalScrollbar();
var oVSb = oScrollExtension.getVerticalScrollbar();
var oTouchObject = oEvent.touches ? oEvent.to... | [
"function",
"(",
"mOptions",
",",
"oEvent",
")",
"{",
"if",
"(",
"oEvent",
".",
"type",
"===",
"\"touchstart\"",
"||",
"oEvent",
".",
"pointerType",
"===",
"\"touch\"",
")",
"{",
"var",
"oScrollExtension",
"=",
"this",
".",
"_getScrollExtension",
"(",
")",
... | Handles touch start events.
@param {TableScrollExtension.EventListenerOptions} mOptions The options.
@param {jQuery.Event} oEvent The touch or pointer event object. | [
"Handles",
"touch",
"start",
"events",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L953-L969 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(mOptions, oEvent) {
if (oEvent.type !== "touchmove" && oEvent.pointerType !== "touch") {
return;
}
var oScrollExtension = this._getScrollExtension();
var mTouchSessionData = internal(this).mTouchSessionData;
if (!mTouchSessionData) {
return;
}
var oTouchObject = oEvent.touches ?... | javascript | function(mOptions, oEvent) {
if (oEvent.type !== "touchmove" && oEvent.pointerType !== "touch") {
return;
}
var oScrollExtension = this._getScrollExtension();
var mTouchSessionData = internal(this).mTouchSessionData;
if (!mTouchSessionData) {
return;
}
var oTouchObject = oEvent.touches ?... | [
"function",
"(",
"mOptions",
",",
"oEvent",
")",
"{",
"if",
"(",
"oEvent",
".",
"type",
"!==",
"\"touchmove\"",
"&&",
"oEvent",
".",
"pointerType",
"!==",
"\"touch\"",
")",
"{",
"return",
";",
"}",
"var",
"oScrollExtension",
"=",
"this",
".",
"_getScrollEx... | Handles touch move events.
@param {TableScrollExtension.EventListenerOptions} mOptions The options.
@param {jQuery.Event} oEvent The touch or pointer event object. | [
"Handles",
"touch",
"move",
"events",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L977-L1052 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var aEventListenerTargets = ScrollingHelper.getEventListenerTargets(oTable);
oScrollExtension._mMouseWheelEventListener = this.addMouseWheelEventListener(aEventListenerTargets, oTable, {
scrollDirection: ScrollDirection.BOTH
});
... | javascript | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var aEventListenerTargets = ScrollingHelper.getEventListenerTargets(oTable);
oScrollExtension._mMouseWheelEventListener = this.addMouseWheelEventListener(aEventListenerTargets, oTable, {
scrollDirection: ScrollDirection.BOTH
});
... | [
"function",
"(",
"oTable",
")",
"{",
"var",
"oScrollExtension",
"=",
"oTable",
".",
"_getScrollExtension",
"(",
")",
";",
"var",
"aEventListenerTargets",
"=",
"ScrollingHelper",
".",
"getEventListenerTargets",
"(",
"oTable",
")",
";",
"oScrollExtension",
".",
"_mM... | Adds mouse wheel and touch event listeners.
@param {sap.ui.table.Table} oTable Instance of the table. | [
"Adds",
"mouse",
"wheel",
"and",
"touch",
"event",
"listeners",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L1059-L1069 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(aEventListenerTargets, oTable, mOptions) {
var fnOnMouseWheelEventHandler = ScrollingHelper.onMouseWheelScrolling.bind(oTable, mOptions);
for (var i = 0; i < aEventListenerTargets.length; i++) {
aEventListenerTargets[i].addEventListener("wheel", fnOnMouseWheelEventHandler);
}
return {wheel: f... | javascript | function(aEventListenerTargets, oTable, mOptions) {
var fnOnMouseWheelEventHandler = ScrollingHelper.onMouseWheelScrolling.bind(oTable, mOptions);
for (var i = 0; i < aEventListenerTargets.length; i++) {
aEventListenerTargets[i].addEventListener("wheel", fnOnMouseWheelEventHandler);
}
return {wheel: f... | [
"function",
"(",
"aEventListenerTargets",
",",
"oTable",
",",
"mOptions",
")",
"{",
"var",
"fnOnMouseWheelEventHandler",
"=",
"ScrollingHelper",
".",
"onMouseWheelScrolling",
".",
"bind",
"(",
"oTable",
",",
"mOptions",
")",
";",
"for",
"(",
"var",
"i",
"=",
"... | Adds mouse wheel event listeners to HTMLElements.
@param {HTMLElement[]} aEventListenerTargets The elements to add listeners to.
@param {sap.ui.table.Table} oTable The table instance to be set as the context of the listeners.
@param {TableScrollExtension.EventListenerOptions} mOptions The options.
@returns {{wheel: Fu... | [
"Adds",
"mouse",
"wheel",
"event",
"listeners",
"to",
"HTMLElements",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L1079-L1087 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(aEventListenerTargets, oTable, mOptions) {
var fnOnTouchStartEventHandler = ScrollingHelper.onTouchStart.bind(oTable, mOptions);
var fnOnTouchMoveEventHandler = ScrollingHelper.onTouchMoveScrolling.bind(oTable, mOptions);
var mListeners = {};
for (var i = 0; i < aEventListenerTargets.length; i++) ... | javascript | function(aEventListenerTargets, oTable, mOptions) {
var fnOnTouchStartEventHandler = ScrollingHelper.onTouchStart.bind(oTable, mOptions);
var fnOnTouchMoveEventHandler = ScrollingHelper.onTouchMoveScrolling.bind(oTable, mOptions);
var mListeners = {};
for (var i = 0; i < aEventListenerTargets.length; i++) ... | [
"function",
"(",
"aEventListenerTargets",
",",
"oTable",
",",
"mOptions",
")",
"{",
"var",
"fnOnTouchStartEventHandler",
"=",
"ScrollingHelper",
".",
"onTouchStart",
".",
"bind",
"(",
"oTable",
",",
"mOptions",
")",
";",
"var",
"fnOnTouchMoveEventHandler",
"=",
"S... | Adds touch event listeners to HTMLElements.
@param {HTMLElement[]} aEventListenerTargets The elements to add listeners to.
@param {sap.ui.table.Table} oTable The table instance to be set as the context of the listeners.
@param {TableScrollExtension.EventListenerOptions} mOptions The options.
@returns {{pointerdown: Fu... | [
"Adds",
"touch",
"event",
"listeners",
"to",
"HTMLElements",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L1100-L1126 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var aEventTargets = ScrollingHelper.getEventListenerTargets(oTable);
function removeEventListener(oTarget, mEventListenerMap) {
for (var sEventName in mEventListenerMap) {
var fnListener = mEventListenerMap[sEventName];
if (... | javascript | function(oTable) {
var oScrollExtension = oTable._getScrollExtension();
var aEventTargets = ScrollingHelper.getEventListenerTargets(oTable);
function removeEventListener(oTarget, mEventListenerMap) {
for (var sEventName in mEventListenerMap) {
var fnListener = mEventListenerMap[sEventName];
if (... | [
"function",
"(",
"oTable",
")",
"{",
"var",
"oScrollExtension",
"=",
"oTable",
".",
"_getScrollExtension",
"(",
")",
";",
"var",
"aEventTargets",
"=",
"ScrollingHelper",
".",
"getEventListenerTargets",
"(",
"oTable",
")",
";",
"function",
"removeEventListener",
"(... | Removes mouse wheel and touch event listeners.
@param {sap.ui.table.Table} oTable Instance of the table. | [
"Removes",
"mouse",
"wheel",
"and",
"touch",
"event",
"listeners",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableScrollExtension.js#L1133-L1153 | train | |
SAP/openui5 | src/sap.ui.core/src/jquery.sap.history.js | calculateStepsToHash | function calculateStepsToHash(sCurrentHash, sToHash, bPrefix){
var iCurrentIndex = jQuery.inArray(sCurrentHash, hashHistory),
iToIndex,
i,
tempHash;
if (iCurrentIndex > 0) {
if (bPrefix) {
for (i = iCurrentIndex - 1; i >= 0 ; i--) {
tempHash = hashHistory[i];
if (tempHash.indexOf(... | javascript | function calculateStepsToHash(sCurrentHash, sToHash, bPrefix){
var iCurrentIndex = jQuery.inArray(sCurrentHash, hashHistory),
iToIndex,
i,
tempHash;
if (iCurrentIndex > 0) {
if (bPrefix) {
for (i = iCurrentIndex - 1; i >= 0 ; i--) {
tempHash = hashHistory[i];
if (tempHash.indexOf(... | [
"function",
"calculateStepsToHash",
"(",
"sCurrentHash",
",",
"sToHash",
",",
"bPrefix",
")",
"{",
"var",
"iCurrentIndex",
"=",
"jQuery",
".",
"inArray",
"(",
"sCurrentHash",
",",
"hashHistory",
")",
",",
"iToIndex",
",",
"i",
",",
"tempHash",
";",
"if",
"("... | This function calculates the number of steps from the sCurrentHash to sToHash. If the sCurrentHash or the sToHash is not in the history stack, it returns 0.
@private | [
"This",
"function",
"calculates",
"the",
"number",
"of",
"steps",
"from",
"the",
"sCurrentHash",
"to",
"sToHash",
".",
"If",
"the",
"sCurrentHash",
"or",
"the",
"sToHash",
"is",
"not",
"in",
"the",
"history",
"stack",
"it",
"returns",
"0",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/jquery.sap.history.js#L385-L413 | train |
SAP/openui5 | src/sap.ui.core/src/jquery.sap.history.js | detectHashChange | function detectHashChange(oEvent, bManual){
//Firefox will decode the hash when it's set to the window.location.hash,
//so we need to parse the href instead of reading the window.location.hash
var sHash = (window.location.href.split("#")[1] || "");
sHash = formatHash(sHash);
if (bManual || !mSkipHandler... | javascript | function detectHashChange(oEvent, bManual){
//Firefox will decode the hash when it's set to the window.location.hash,
//so we need to parse the href instead of reading the window.location.hash
var sHash = (window.location.href.split("#")[1] || "");
sHash = formatHash(sHash);
if (bManual || !mSkipHandler... | [
"function",
"detectHashChange",
"(",
"oEvent",
",",
"bManual",
")",
"{",
"//Firefox will decode the hash when it's set to the window.location.hash,",
"//so we need to parse the href instead of reading the window.location.hash",
"var",
"sHash",
"=",
"(",
"window",
".",
"location",
"... | This function is bound to the window's hashchange event, and it detects the change of the hash.
When history is added by calling the addHistory or addVirtualHistory function, it will not call the real onHashChange function
because changes are already done. Only when a hash is navigated by clicking the back or forward b... | [
"This",
"function",
"is",
"bound",
"to",
"the",
"window",
"s",
"hashchange",
"event",
"and",
"it",
"detects",
"the",
"change",
"of",
"the",
"hash",
".",
"When",
"history",
"is",
"added",
"by",
"calling",
"the",
"addHistory",
"or",
"addVirtualHistory",
"funct... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/jquery.sap.history.js#L425-L450 | train |
SAP/openui5 | src/sap.ui.core/src/jquery.sap.history.js | getNextSuffix | function getNextSuffix(sHash){
var sPath = sHash ? sHash : "";
if (isVirtualHash(sPath)) {
var iIndex = sPath.lastIndexOf(skipSuffix);
sPath = sPath.slice(0, iIndex);
}
return sPath + skipSuffix + skipIndex++;
} | javascript | function getNextSuffix(sHash){
var sPath = sHash ? sHash : "";
if (isVirtualHash(sPath)) {
var iIndex = sPath.lastIndexOf(skipSuffix);
sPath = sPath.slice(0, iIndex);
}
return sPath + skipSuffix + skipIndex++;
} | [
"function",
"getNextSuffix",
"(",
"sHash",
")",
"{",
"var",
"sPath",
"=",
"sHash",
"?",
"sHash",
":",
"\"\"",
";",
"if",
"(",
"isVirtualHash",
"(",
"sPath",
")",
")",
"{",
"var",
"iIndex",
"=",
"sPath",
".",
"lastIndexOf",
"(",
"skipSuffix",
")",
";",
... | This function returns a hash with suffix added to the end based on the sHash parameter. It handles as well when the current
hash is already with suffix. It returns a new suffix with a unique number in the end.
@private | [
"This",
"function",
"returns",
"a",
"hash",
"with",
"suffix",
"added",
"to",
"the",
"end",
"based",
"on",
"the",
"sHash",
"parameter",
".",
"It",
"handles",
"as",
"well",
"when",
"the",
"current",
"hash",
"is",
"already",
"with",
"suffix",
".",
"It",
"re... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/jquery.sap.history.js#L478-L487 | train |
SAP/openui5 | src/sap.ui.core/src/jquery.sap.history.js | preGenHash | function preGenHash(sIdf, oStateData){
var sEncodedIdf = window.encodeURIComponent(sIdf);
var sEncodedData = window.encodeURIComponent(window.JSON.stringify(oStateData));
return sEncodedIdf + sIdSeperator + sEncodedData;
} | javascript | function preGenHash(sIdf, oStateData){
var sEncodedIdf = window.encodeURIComponent(sIdf);
var sEncodedData = window.encodeURIComponent(window.JSON.stringify(oStateData));
return sEncodedIdf + sIdSeperator + sEncodedData;
} | [
"function",
"preGenHash",
"(",
"sIdf",
",",
"oStateData",
")",
"{",
"var",
"sEncodedIdf",
"=",
"window",
".",
"encodeURIComponent",
"(",
"sIdf",
")",
";",
"var",
"sEncodedData",
"=",
"window",
".",
"encodeURIComponent",
"(",
"window",
".",
"JSON",
".",
"stri... | This function encode the identifier and data into a string.
@private | [
"This",
"function",
"encode",
"the",
"identifier",
"and",
"data",
"into",
"a",
"string",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/jquery.sap.history.js#L494-L498 | train |
SAP/openui5 | src/sap.ui.core/src/jquery.sap.history.js | getAppendId | function getAppendId(sHash){
var iIndex = jQuery.inArray(currentHash, hashHistory),
i, sHistory;
if (iIndex > -1) {
for (i = 0 ; i < iIndex + 1 ; i++) {
sHistory = hashHistory[i];
if (sHistory.slice(0, sHistory.length - 2) === sHash) {
return uid();
}
}
}
return "";
} | javascript | function getAppendId(sHash){
var iIndex = jQuery.inArray(currentHash, hashHistory),
i, sHistory;
if (iIndex > -1) {
for (i = 0 ; i < iIndex + 1 ; i++) {
sHistory = hashHistory[i];
if (sHistory.slice(0, sHistory.length - 2) === sHash) {
return uid();
}
}
}
return "";
} | [
"function",
"getAppendId",
"(",
"sHash",
")",
"{",
"var",
"iIndex",
"=",
"jQuery",
".",
"inArray",
"(",
"currentHash",
",",
"hashHistory",
")",
",",
"i",
",",
"sHistory",
";",
"if",
"(",
"iIndex",
">",
"-",
"1",
")",
"{",
"for",
"(",
"i",
"=",
"0",... | This function checks if the combination of the identifier and data is unique in the current history stack.
If yes, it returns an empty string. Otherwise it returns a unique id.
@private | [
"This",
"function",
"checks",
"if",
"the",
"combination",
"of",
"the",
"identifier",
"and",
"data",
"is",
"unique",
"in",
"the",
"current",
"history",
"stack",
".",
"If",
"yes",
"it",
"returns",
"an",
"empty",
"string",
".",
"Otherwise",
"it",
"returns",
"... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/jquery.sap.history.js#L506-L519 | train |
SAP/openui5 | src/sap.ui.core/src/jquery.sap.history.js | reorganizeHistoryArray | function reorganizeHistoryArray(sHash){
var iIndex = jQuery.inArray(currentHash, hashHistory);
if ( !(iIndex === -1 || iIndex === hashHistory.length - 1) ) {
hashHistory.splice(iIndex + 1, hashHistory.length - 1 - iIndex);
}
hashHistory.push(sHash);
} | javascript | function reorganizeHistoryArray(sHash){
var iIndex = jQuery.inArray(currentHash, hashHistory);
if ( !(iIndex === -1 || iIndex === hashHistory.length - 1) ) {
hashHistory.splice(iIndex + 1, hashHistory.length - 1 - iIndex);
}
hashHistory.push(sHash);
} | [
"function",
"reorganizeHistoryArray",
"(",
"sHash",
")",
"{",
"var",
"iIndex",
"=",
"jQuery",
".",
"inArray",
"(",
"currentHash",
",",
"hashHistory",
")",
";",
"if",
"(",
"!",
"(",
"iIndex",
"===",
"-",
"1",
"||",
"iIndex",
"===",
"hashHistory",
".",
"le... | This function manages the internal array of history records.
@private | [
"This",
"function",
"manages",
"the",
"internal",
"array",
"of",
"history",
"records",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/jquery.sap.history.js#L526-L533 | train |
SAP/openui5 | src/sap.ui.core/src/jquery.sap.history.js | calcStepsToRealHistory | function calcStepsToRealHistory(sCurrentHash, bForward){
var iIndex = jQuery.inArray(sCurrentHash, hashHistory),
i;
if (iIndex !== -1) {
if (bForward) {
for (i = iIndex ; i < hashHistory.length ; i++) {
if (!isVirtualHash(hashHistory[i])) {
return i - iIndex;
}
}
} else {... | javascript | function calcStepsToRealHistory(sCurrentHash, bForward){
var iIndex = jQuery.inArray(sCurrentHash, hashHistory),
i;
if (iIndex !== -1) {
if (bForward) {
for (i = iIndex ; i < hashHistory.length ; i++) {
if (!isVirtualHash(hashHistory[i])) {
return i - iIndex;
}
}
} else {... | [
"function",
"calcStepsToRealHistory",
"(",
"sCurrentHash",
",",
"bForward",
")",
"{",
"var",
"iIndex",
"=",
"jQuery",
".",
"inArray",
"(",
"sCurrentHash",
",",
"hashHistory",
")",
",",
"i",
";",
"if",
"(",
"iIndex",
"!==",
"-",
"1",
")",
"{",
"if",
"(",
... | This function calculates the steps forward or backward that need to skip the virtual history states.
@private | [
"This",
"function",
"calculates",
"the",
"steps",
"forward",
"or",
"backward",
"that",
"need",
"to",
"skip",
"the",
"virtual",
"history",
"states",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/jquery.sap.history.js#L549-L569 | train |
SAP/openui5 | src/sap.ui.core/src/jquery.sap.history.js | onHashChange | function onHashChange(sHash){
var oRoute, iStep, oParsedHash, iNewHashIndex, sNavType;
//handle the nonbookmarkable hash
if (currentHash === undefined) {
//url with hash opened from bookmark
oParsedHash = parseHashToObject(sHash);
if (!oParsedHash || !oParsedHash.bBookmarkable) {
if (jQuery.... | javascript | function onHashChange(sHash){
var oRoute, iStep, oParsedHash, iNewHashIndex, sNavType;
//handle the nonbookmarkable hash
if (currentHash === undefined) {
//url with hash opened from bookmark
oParsedHash = parseHashToObject(sHash);
if (!oParsedHash || !oParsedHash.bBookmarkable) {
if (jQuery.... | [
"function",
"onHashChange",
"(",
"sHash",
")",
"{",
"var",
"oRoute",
",",
"iStep",
",",
"oParsedHash",
",",
"iNewHashIndex",
",",
"sNavType",
";",
"//handle the nonbookmarkable hash",
"if",
"(",
"currentHash",
"===",
"undefined",
")",
"{",
"//url with hash opened fr... | This is the main function that handles the hash change event.
@private | [
"This",
"is",
"the",
"main",
"function",
"that",
"handles",
"the",
"hash",
"change",
"event",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/jquery.sap.history.js#L577-L669 | train |
SAP/openui5 | src/sap.ui.core/src/jquery.sap.history.js | findRouteByIdentifier | function findRouteByIdentifier(sIdf){
var i;
for (i = 0 ; i < routes.length ; i++) {
if (routes[i].sIdentifier === sIdf) {
return routes[i];
}
}
} | javascript | function findRouteByIdentifier(sIdf){
var i;
for (i = 0 ; i < routes.length ; i++) {
if (routes[i].sIdentifier === sIdf) {
return routes[i];
}
}
} | [
"function",
"findRouteByIdentifier",
"(",
"sIdf",
")",
"{",
"var",
"i",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"routes",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"routes",
"[",
"i",
"]",
".",
"sIdentifier",
"===",
"sIdf",
")",
... | This function returns the route object matched by the identifier passed as parameter.
@private | [
"This",
"function",
"returns",
"the",
"route",
"object",
"matched",
"by",
"the",
"identifier",
"passed",
"as",
"parameter",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/jquery.sap.history.js#L675-L682 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/Locale.js | function() {
var sLanguage = this.sLanguage || "",
m;
// cut off any ext. language sub tags
if ( sLanguage.indexOf("-") >= 0 ) {
sLanguage = sLanguage.slice(0, sLanguage.indexOf("-"));
}
// convert to new ISO codes
sLanguage = M_ISO639_OLD_TO_NEW[sLanguage] || sLanguage;
// han... | javascript | function() {
var sLanguage = this.sLanguage || "",
m;
// cut off any ext. language sub tags
if ( sLanguage.indexOf("-") >= 0 ) {
sLanguage = sLanguage.slice(0, sLanguage.indexOf("-"));
}
// convert to new ISO codes
sLanguage = M_ISO639_OLD_TO_NEW[sLanguage] || sLanguage;
// han... | [
"function",
"(",
")",
"{",
"var",
"sLanguage",
"=",
"this",
".",
"sLanguage",
"||",
"\"\"",
",",
"m",
";",
"// cut off any ext. language sub tags",
"if",
"(",
"sLanguage",
".",
"indexOf",
"(",
"\"-\"",
")",
">=",
"0",
")",
"{",
"sLanguage",
"=",
"sLanguage... | Best guess to get a proper SAP Logon Language for this locale.
Conversions taken into account:
<ul>
<li>use the language part only</li>
<li>convert old ISO639 codes to newer ones (e.g. 'iw' to 'he')</li>
<li>for Chinese, map 'Traditional Chinese' to SAP proprietary code 'zf'</li>
<li>map private extensions x-sap1q and... | [
"Best",
"guess",
"to",
"get",
"a",
"proper",
"SAP",
"Logon",
"Language",
"for",
"this",
"locale",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Locale.js#L241-L268 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/Locale.js | getDesigntimePropertyAsArray | function getDesigntimePropertyAsArray(sValue) {
var m = /\$([-a-z0-9A-Z._]+)(?::([^$]*))?\$/.exec(sValue);
return (m && m[2]) ? m[2].split(/,/) : null;
} | javascript | function getDesigntimePropertyAsArray(sValue) {
var m = /\$([-a-z0-9A-Z._]+)(?::([^$]*))?\$/.exec(sValue);
return (m && m[2]) ? m[2].split(/,/) : null;
} | [
"function",
"getDesigntimePropertyAsArray",
"(",
"sValue",
")",
"{",
"var",
"m",
"=",
"/",
"\\$([-a-z0-9A-Z._]+)(?::([^$]*))?\\$",
"/",
".",
"exec",
"(",
"sValue",
")",
";",
"return",
"(",
"m",
"&&",
"m",
"[",
"2",
"]",
")",
"?",
"m",
"[",
"2",
"]",
".... | Helper to analyze and parse designtime variables
@private | [
"Helper",
"to",
"analyze",
"and",
"parse",
"designtime",
"variables"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/Locale.js#L284-L287 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js | getHandleChildrenStrategy | function getHandleChildrenStrategy(bAsync, fnCallback) {
// sync strategy ensures processing order by just being sync
function syncStrategy(node, oAggregation, mAggregations) {
var childNode,
vChild,
aChildren = [];
for (childNode = node.firstChild; childNode; childNode = childNode.nextSibling) {
... | javascript | function getHandleChildrenStrategy(bAsync, fnCallback) {
// sync strategy ensures processing order by just being sync
function syncStrategy(node, oAggregation, mAggregations) {
var childNode,
vChild,
aChildren = [];
for (childNode = node.firstChild; childNode; childNode = childNode.nextSibling) {
... | [
"function",
"getHandleChildrenStrategy",
"(",
"bAsync",
",",
"fnCallback",
")",
"{",
"// sync strategy ensures processing order by just being sync",
"function",
"syncStrategy",
"(",
"node",
",",
"oAggregation",
",",
"mAggregations",
")",
"{",
"var",
"childNode",
",",
"vCh... | Creates a function based on the passed mode and callback which applies a callback to each child of a node.
@param {boolean} bAsync The strategy to choose
@param {function} fnCallback The callback to apply
@returns {function} The created function
@private | [
"Creates",
"a",
"function",
"based",
"on",
"the",
"passed",
"mode",
"and",
"callback",
"which",
"applies",
"a",
"callback",
"to",
"each",
"child",
"of",
"a",
"node",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L98-L129 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js | syncStrategy | function syncStrategy(node, oAggregation, mAggregations) {
var childNode,
vChild,
aChildren = [];
for (childNode = node.firstChild; childNode; childNode = childNode.nextSibling) {
vChild = fnCallback(node, oAggregation, mAggregations, childNode);
if (vChild) {
aChildren.push(unwrapSyncPromis... | javascript | function syncStrategy(node, oAggregation, mAggregations) {
var childNode,
vChild,
aChildren = [];
for (childNode = node.firstChild; childNode; childNode = childNode.nextSibling) {
vChild = fnCallback(node, oAggregation, mAggregations, childNode);
if (vChild) {
aChildren.push(unwrapSyncPromis... | [
"function",
"syncStrategy",
"(",
"node",
",",
"oAggregation",
",",
"mAggregations",
")",
"{",
"var",
"childNode",
",",
"vChild",
",",
"aChildren",
"=",
"[",
"]",
";",
"for",
"(",
"childNode",
"=",
"node",
".",
"firstChild",
";",
"childNode",
";",
"childNod... | sync strategy ensures processing order by just being sync | [
"sync",
"strategy",
"ensures",
"processing",
"order",
"by",
"just",
"being",
"sync"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L101-L113 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js | asyncStrategy | function asyncStrategy(node, oAggregation, mAggregations) {
var childNode,
pChain = Promise.resolve(),
aChildPromises = [];
for (childNode = node.firstChild; childNode; childNode = childNode.nextSibling) {
pChain = pChain.then(fnCallback.bind(null, node, oAggregation, mAggregations, childNode));
... | javascript | function asyncStrategy(node, oAggregation, mAggregations) {
var childNode,
pChain = Promise.resolve(),
aChildPromises = [];
for (childNode = node.firstChild; childNode; childNode = childNode.nextSibling) {
pChain = pChain.then(fnCallback.bind(null, node, oAggregation, mAggregations, childNode));
... | [
"function",
"asyncStrategy",
"(",
"node",
",",
"oAggregation",
",",
"mAggregations",
")",
"{",
"var",
"childNode",
",",
"pChain",
"=",
"Promise",
".",
"resolve",
"(",
")",
",",
"aChildPromises",
"=",
"[",
"]",
";",
"for",
"(",
"childNode",
"=",
"node",
"... | async strategy ensures processing order by chaining the callbacks | [
"async",
"strategy",
"ensures",
"processing",
"order",
"by",
"chaining",
"the",
"callbacks"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L116-L126 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js | spliceContentIntoResult | function spliceContentIntoResult(vContent) {
// equivalent to aResult.apply(start, deleteCount, content1, content2...)
var args = [i, 1].concat(vContent);
Array.prototype.splice.apply(aResult, args);
} | javascript | function spliceContentIntoResult(vContent) {
// equivalent to aResult.apply(start, deleteCount, content1, content2...)
var args = [i, 1].concat(vContent);
Array.prototype.splice.apply(aResult, args);
} | [
"function",
"spliceContentIntoResult",
"(",
"vContent",
")",
"{",
"// equivalent to aResult.apply(start, deleteCount, content1, content2...)",
"var",
"args",
"=",
"[",
"i",
",",
"1",
"]",
".",
"concat",
"(",
"vContent",
")",
";",
"Array",
".",
"prototype",
".",
"spl... | replace the Promise with a variable number of contents in aResult | [
"replace",
"the",
"Promise",
"with",
"a",
"variable",
"number",
"of",
"contents",
"in",
"aResult"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L336-L340 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js | parseNode | function parseNode(xmlNode, bRoot, bIgnoreTopLevelTextNodes) {
if ( xmlNode.nodeType === 1 /* ELEMENT_NODE */ ) {
var sLocalName = localName(xmlNode);
if (xmlNode.namespaceURI === "http://www.w3.org/1999/xhtml" || xmlNode.namespaceURI === "http://www.w3.org/2000/svg") {
// write opening tag
aResu... | javascript | function parseNode(xmlNode, bRoot, bIgnoreTopLevelTextNodes) {
if ( xmlNode.nodeType === 1 /* ELEMENT_NODE */ ) {
var sLocalName = localName(xmlNode);
if (xmlNode.namespaceURI === "http://www.w3.org/1999/xhtml" || xmlNode.namespaceURI === "http://www.w3.org/2000/svg") {
// write opening tag
aResu... | [
"function",
"parseNode",
"(",
"xmlNode",
",",
"bRoot",
",",
"bIgnoreTopLevelTextNodes",
")",
"{",
"if",
"(",
"xmlNode",
".",
"nodeType",
"===",
"1",
"/* ELEMENT_NODE */",
")",
"{",
"var",
"sLocalName",
"=",
"localName",
"(",
"xmlNode",
")",
";",
"if",
"(",
... | Parses an XML node that might represent a UI5 control or simple XHTML.
XHTML will be added to the aResult array as a sequence of strings,
UI5 controls will be instantiated and added as controls
@param {Element} xmlNode the XML node to parse
@param {boolean} bRoot whether this node is the root node
@param {boolean} bIg... | [
"Parses",
"an",
"XML",
"node",
"that",
"might",
"represent",
"a",
"UI5",
"control",
"or",
"simple",
"XHTML",
".",
"XHTML",
"will",
"be",
"added",
"to",
"the",
"aResult",
"array",
"as",
"a",
"sequence",
"of",
"strings",
"UI5",
"controls",
"will",
"be",
"i... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L366-L444 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js | parseChildren | function parseChildren(xmlNode, bRoot, bIgnoreToplevelTextNodes) {
var children = xmlNode.childNodes;
for (var i = 0; i < children.length; i++) {
parseNode(children[i], bRoot, bIgnoreToplevelTextNodes);
}
} | javascript | function parseChildren(xmlNode, bRoot, bIgnoreToplevelTextNodes) {
var children = xmlNode.childNodes;
for (var i = 0; i < children.length; i++) {
parseNode(children[i], bRoot, bIgnoreToplevelTextNodes);
}
} | [
"function",
"parseChildren",
"(",
"xmlNode",
",",
"bRoot",
",",
"bIgnoreToplevelTextNodes",
")",
"{",
"var",
"children",
"=",
"xmlNode",
".",
"childNodes",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"children",
".",
"length",
";",
"i",
"++",
... | Parses the children of an XML node.
@param {Element} xmlNode the xml node which will be parsed
@param {boolean} bRoot
@param {boolean} bIgnoreToplevelTextNodes
@returns {Promise[]} each resolving to the according child nodes content | [
"Parses",
"the",
"children",
"of",
"an",
"XML",
"node",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L454-L459 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js | findControlClass | function findControlClass(sNamespaceURI, sLocalName) {
var sClassName;
var mLibraries = sap.ui.getCore().getLoadedLibraries();
jQuery.each(mLibraries, function(sLibName, oLibrary) {
if ( sNamespaceURI === oLibrary.namespace || sNamespaceURI === oLibrary.name ) {
sClassName = oLibrary.name + "." + ((oL... | javascript | function findControlClass(sNamespaceURI, sLocalName) {
var sClassName;
var mLibraries = sap.ui.getCore().getLoadedLibraries();
jQuery.each(mLibraries, function(sLibName, oLibrary) {
if ( sNamespaceURI === oLibrary.namespace || sNamespaceURI === oLibrary.name ) {
sClassName = oLibrary.name + "." + ((oL... | [
"function",
"findControlClass",
"(",
"sNamespaceURI",
",",
"sLocalName",
")",
"{",
"var",
"sClassName",
";",
"var",
"mLibraries",
"=",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
".",
"getLoadedLibraries",
"(",
")",
";",
"jQuery",
".",
"each",
"(",
"mLibra... | Requests the control class if not loaded yet.
If the View is set to async=true, an async XHR is sent, otherwise a sync XHR.
@param {string} sNamespaceURI
@param {string} sLocalName
@returns {function|Promise|undefined} the loaded ControlClass plain or resolved from a Promise | [
"Requests",
"the",
"control",
"class",
"if",
"not",
"loaded",
"yet",
".",
"If",
"the",
"View",
"is",
"set",
"to",
"async",
"=",
"true",
"an",
"async",
"XHR",
"is",
"sent",
"otherwise",
"a",
"sync",
"XHR",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L469-L510 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js | getObjectFallback | function getObjectFallback(oClassObject) {
// some modules might not return a class definition, so we fallback to the global
// this is against the AMD definition, but is required for backward compatibility
if (!oClassObject) {
Log.error("Control '" + sClassName + "' did not return a class definition f... | javascript | function getObjectFallback(oClassObject) {
// some modules might not return a class definition, so we fallback to the global
// this is against the AMD definition, but is required for backward compatibility
if (!oClassObject) {
Log.error("Control '" + sClassName + "' did not return a class definition f... | [
"function",
"getObjectFallback",
"(",
"oClassObject",
")",
"{",
"// some modules might not return a class definition, so we fallback to the global",
"// this is against the AMD definition, but is required for backward compatibility",
"if",
"(",
"!",
"oClassObject",
")",
"{",
"Log",
"."... | ensure that control and library are loaded | [
"ensure",
"that",
"control",
"and",
"library",
"are",
"loaded"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L481-L492 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js | function (oViewClass) {
var mViewParameters = {
id: id ? getId(oView, node, id) : undefined,
xmlNode: node,
containingView: oView._oContainingView,
processingMode: oView._sProcessingMode // add processing mode, so it can be propagated to subviews inside the HTML block
};
//... | javascript | function (oViewClass) {
var mViewParameters = {
id: id ? getId(oView, node, id) : undefined,
xmlNode: node,
containingView: oView._oContainingView,
processingMode: oView._sProcessingMode // add processing mode, so it can be propagated to subviews inside the HTML block
};
//... | [
"function",
"(",
"oViewClass",
")",
"{",
"var",
"mViewParameters",
"=",
"{",
"id",
":",
"id",
"?",
"getId",
"(",
"oView",
",",
"node",
",",
"id",
")",
":",
"undefined",
",",
"xmlNode",
":",
"node",
",",
"containingView",
":",
"oView",
".",
"_oContainin... | plain HTML node - create a new View control creates a view instance, but makes sure the new view receives the correct owner component | [
"plain",
"HTML",
"node",
"-",
"create",
"a",
"new",
"View",
"control",
"creates",
"a",
"view",
"instance",
"but",
"makes",
"sure",
"the",
"new",
"view",
"receives",
"the",
"correct",
"owner",
"component"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L532-L548 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js | function() {
// Pass processingMode to Fragments only
if (oClass.getMetadata().isA("sap.ui.core.Fragment") && node.getAttribute("type") !== "JS" && oView._sProcessingMode === "sequential") {
mSettings.processingMode = "sequential";
}
if (oView.fnScopedRunWithOwner) {
return o... | javascript | function() {
// Pass processingMode to Fragments only
if (oClass.getMetadata().isA("sap.ui.core.Fragment") && node.getAttribute("type") !== "JS" && oView._sProcessingMode === "sequential") {
mSettings.processingMode = "sequential";
}
if (oView.fnScopedRunWithOwner) {
return o... | [
"function",
"(",
")",
"{",
"// Pass processingMode to Fragments only",
"if",
"(",
"oClass",
".",
"getMetadata",
"(",
")",
".",
"isA",
"(",
"\"sap.ui.core.Fragment\"",
")",
"&&",
"node",
".",
"getAttribute",
"(",
"\"type\"",
")",
"!==",
"\"JS\"",
"&&",
"oView",
... | call the control constructor with the according owner in scope | [
"call",
"the",
"control",
"constructor",
"with",
"the",
"according",
"owner",
"in",
"scope"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/XMLTemplateProcessor.js#L927-L939 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/base/BindingParser.js | makeFormatter | function makeFormatter(aFragments) {
var fnFormatter = function() {
var aResult = [],
l = aFragments.length,
i;
for (i = 0; i < l; i++) {
if ( typeof aFragments[i] === "number" ) {
// a numerical fragment references the part with the same number
aResult.push(arguments[aFragments[i]... | javascript | function makeFormatter(aFragments) {
var fnFormatter = function() {
var aResult = [],
l = aFragments.length,
i;
for (i = 0; i < l; i++) {
if ( typeof aFragments[i] === "number" ) {
// a numerical fragment references the part with the same number
aResult.push(arguments[aFragments[i]... | [
"function",
"makeFormatter",
"(",
"aFragments",
")",
"{",
"var",
"fnFormatter",
"=",
"function",
"(",
")",
"{",
"var",
"aResult",
"=",
"[",
"]",
",",
"l",
"=",
"aFragments",
".",
"length",
",",
"i",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
... | Helper to create a formatter function. Only used to reduce the closure size of the formatter
@param {number[]|string[]} aFragments
array of fragments, either a literal text or the index of the binding's part
@returns {function}
a formatter function | [
"Helper",
"to",
"create",
"a",
"formatter",
"function",
".",
"Only",
"used",
"to",
"reduce",
"the",
"closure",
"size",
"of",
"the",
"formatter"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/BindingParser.js#L94-L113 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/base/BindingParser.js | makeSimpleBindingInfo | function makeSimpleBindingInfo(sPath) {
var iPos = sPath.indexOf(">"),
oBindingInfo = { path : sPath };
if ( iPos > 0 ) {
oBindingInfo.model = sPath.slice(0,iPos);
oBindingInfo.path = sPath.slice(iPos + 1);
}
return oBindingInfo;
} | javascript | function makeSimpleBindingInfo(sPath) {
var iPos = sPath.indexOf(">"),
oBindingInfo = { path : sPath };
if ( iPos > 0 ) {
oBindingInfo.model = sPath.slice(0,iPos);
oBindingInfo.path = sPath.slice(iPos + 1);
}
return oBindingInfo;
} | [
"function",
"makeSimpleBindingInfo",
"(",
"sPath",
")",
"{",
"var",
"iPos",
"=",
"sPath",
".",
"indexOf",
"(",
"\">\"",
")",
",",
"oBindingInfo",
"=",
"{",
"path",
":",
"sPath",
"}",
";",
"if",
"(",
"iPos",
">",
"0",
")",
"{",
"oBindingInfo",
".",
"m... | Creates a binding info object with the given path.
If the path contains a model specifier (prefix separated with a '>'),
the <code>model</code> property is set as well and the prefix is
removed from the path.
@param {string} sPath
the given path
@returns {object}
a binding info object | [
"Creates",
"a",
"binding",
"info",
"object",
"with",
"the",
"given",
"path",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/BindingParser.js#L127-L137 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/base/BindingParser.js | expression | function expression(sInput, iStart, oBindingMode) {
var oBinding = ExpressionParser.parse(resolveEmbeddedBinding.bind(null, oEnv), sString,
iStart, null, bStaticContext ? oContext : null);
/**
* Recursively sets the mode <code>oBindingMode</code> on the given binding (or its
* parts).
*
* @p... | javascript | function expression(sInput, iStart, oBindingMode) {
var oBinding = ExpressionParser.parse(resolveEmbeddedBinding.bind(null, oEnv), sString,
iStart, null, bStaticContext ? oContext : null);
/**
* Recursively sets the mode <code>oBindingMode</code> on the given binding (or its
* parts).
*
* @p... | [
"function",
"expression",
"(",
"sInput",
",",
"iStart",
",",
"oBindingMode",
")",
"{",
"var",
"oBinding",
"=",
"ExpressionParser",
".",
"parse",
"(",
"resolveEmbeddedBinding",
".",
"bind",
"(",
"null",
",",
"oEnv",
")",
",",
"sString",
",",
"iStart",
",",
... | Parses an expression. Sets the flags accordingly.
@param {string} sInput The input string to parse from
@param {int} iStart The start index
@param {sap.ui.model.BindingMode} oBindingMode the binding mode
@returns {object} a result object with the binding in <code>result</code> and the index
after the last character be... | [
"Parses",
"an",
"expression",
".",
"Sets",
"the",
"flags",
"accordingly",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/base/BindingParser.js#L415-L458 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/type/UnitMixin.js | formatValue | function formatValue(aValues, sTargetType) {
var oFormatOptions,
that = this;
if (this.mCustomUnits === undefined && aValues && aValues[2] !== undefined) {
if (aValues[2] === null) { // no unit customizing available
this.mCustomUnits = null;
} else {
this.mCustomUnits = mCodeList2CustomUnit... | javascript | function formatValue(aValues, sTargetType) {
var oFormatOptions,
that = this;
if (this.mCustomUnits === undefined && aValues && aValues[2] !== undefined) {
if (aValues[2] === null) { // no unit customizing available
this.mCustomUnits = null;
} else {
this.mCustomUnits = mCodeList2CustomUnit... | [
"function",
"formatValue",
"(",
"aValues",
",",
"sTargetType",
")",
"{",
"var",
"oFormatOptions",
",",
"that",
"=",
"this",
";",
"if",
"(",
"this",
".",
"mCustomUnits",
"===",
"undefined",
"&&",
"aValues",
"&&",
"aValues",
"[",
"2",
"]",
"!==",
"undefined"... | Formats the given values of the parts of the composite type to the given target type.
@param {any[]} aValues
Array of part values to be formatted; contains in the following order: Measure or
amount, unit or currency, and the corresponding customizing. The first call to this
method where all parts are set determines th... | [
"Formats",
"the",
"given",
"values",
"of",
"the",
"parts",
"of",
"the",
"composite",
"type",
"to",
"the",
"given",
"target",
"type",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/type/UnitMixin.js#L120-L151 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/type/UnitMixin.js | parseValue | function parseValue(vValue, sSourceType, aCurrentValues) {
var iDecimals, iFractionDigits, aMatches, sUnit, aValues;
if (this.mCustomUnits === undefined) {
throw new ParseException("Cannot parse value without customizing");
}
aValues = fnBaseType.prototype.parseValue.apply(this, arguments);
sUnit =... | javascript | function parseValue(vValue, sSourceType, aCurrentValues) {
var iDecimals, iFractionDigits, aMatches, sUnit, aValues;
if (this.mCustomUnits === undefined) {
throw new ParseException("Cannot parse value without customizing");
}
aValues = fnBaseType.prototype.parseValue.apply(this, arguments);
sUnit =... | [
"function",
"parseValue",
"(",
"vValue",
",",
"sSourceType",
",",
"aCurrentValues",
")",
"{",
"var",
"iDecimals",
",",
"iFractionDigits",
",",
"aMatches",
",",
"sUnit",
",",
"aValues",
";",
"if",
"(",
"this",
".",
"mCustomUnits",
"===",
"undefined",
")",
"{"... | Parses the given string value to an array containing measure or amount, and unit or
currency.
@param {string} vValue
The value to be parsed
@param {string} sSourceType
The source type (the expected type of <code>vValue</code>); must be "string", or a type
with "string" as its
{@link sap.ui.base.DataType#getPrimitiveTy... | [
"Parses",
"the",
"given",
"string",
"value",
"to",
"an",
"array",
"containing",
"measure",
"or",
"amount",
"and",
"unit",
"or",
"currency",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/type/UnitMixin.js#L181-L210 | train |
SAP/openui5 | src/sap.ui.fl/src/sap/ui/fl/changeHandler/BaseRename.js | function(oChange, oControl, mPropertyBag) {
var oModifier = mPropertyBag.modifier;
var sPropertyName = mRenameSettings.propertyName;
var oChangeDefinition = oChange.getDefinition();
var sText = oChangeDefinition.texts[mRenameSettings.changePropertyName];
var sValue = sText.value;
if (oCha... | javascript | function(oChange, oControl, mPropertyBag) {
var oModifier = mPropertyBag.modifier;
var sPropertyName = mRenameSettings.propertyName;
var oChangeDefinition = oChange.getDefinition();
var sText = oChangeDefinition.texts[mRenameSettings.changePropertyName];
var sValue = sText.value;
if (oCha... | [
"function",
"(",
"oChange",
",",
"oControl",
",",
"mPropertyBag",
")",
"{",
"var",
"oModifier",
"=",
"mPropertyBag",
".",
"modifier",
";",
"var",
"sPropertyName",
"=",
"mRenameSettings",
".",
"propertyName",
";",
"var",
"oChangeDefinition",
"=",
"oChange",
".",
... | Renames a control.
@param {sap.ui.fl.Change} oChange change wrapper object with instructions to be applied on the control map
@param {sap.ui.core.Control} oControl Control that matches the change selector for applying the change
@param {object} mPropertyBag property bag
@param {object} mPropertyBag.modifier modifier f... | [
"Renames",
"a",
"control",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/changeHandler/BaseRename.js#L46-L61 | train | |
SAP/openui5 | src/sap.ui.fl/src/sap/ui/fl/changeHandler/BaseRename.js | function(oChange, oControl, mPropertyBag) {
var oModifier = mPropertyBag.modifier;
var sPropertyName = mRenameSettings.propertyName;
var vOldValue = oChange.getRevertData();
if (vOldValue || vOldValue === "") {
oModifier.setPropertyBindingOrProperty(oControl, sPropertyName, vOldValue);
... | javascript | function(oChange, oControl, mPropertyBag) {
var oModifier = mPropertyBag.modifier;
var sPropertyName = mRenameSettings.propertyName;
var vOldValue = oChange.getRevertData();
if (vOldValue || vOldValue === "") {
oModifier.setPropertyBindingOrProperty(oControl, sPropertyName, vOldValue);
... | [
"function",
"(",
"oChange",
",",
"oControl",
",",
"mPropertyBag",
")",
"{",
"var",
"oModifier",
"=",
"mPropertyBag",
".",
"modifier",
";",
"var",
"sPropertyName",
"=",
"mRenameSettings",
".",
"propertyName",
";",
"var",
"vOldValue",
"=",
"oChange",
".",
"getRe... | Reverts a Rename Change
@param {sap.ui.fl.Change} oChange change wrapper object with instructions to be applied on the control map
@param {sap.ui.core.Control} oControl Control that matches the change selector for applying the change
@param {object} mPropertyBag property bag
@param {object} mPropertyBag.modifier modif... | [
"Reverts",
"a",
"Rename",
"Change"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/changeHandler/BaseRename.js#L73-L85 | train | |
SAP/openui5 | src/sap.ui.fl/src/sap/ui/fl/changeHandler/BaseRename.js | function(oChange, mSpecificChangeInfo, mPropertyBag) {
var oChangeDefinition = oChange.getDefinition();
var sChangePropertyName = mRenameSettings.changePropertyName;
var sTranslationTextType = mRenameSettings.translationTextType;
var oControlToBeRenamed = mPropertyBag.modifier.bySelector(oChange.ge... | javascript | function(oChange, mSpecificChangeInfo, mPropertyBag) {
var oChangeDefinition = oChange.getDefinition();
var sChangePropertyName = mRenameSettings.changePropertyName;
var sTranslationTextType = mRenameSettings.translationTextType;
var oControlToBeRenamed = mPropertyBag.modifier.bySelector(oChange.ge... | [
"function",
"(",
"oChange",
",",
"mSpecificChangeInfo",
",",
"mPropertyBag",
")",
"{",
"var",
"oChangeDefinition",
"=",
"oChange",
".",
"getDefinition",
"(",
")",
";",
"var",
"sChangePropertyName",
"=",
"mRenameSettings",
".",
"changePropertyName",
";",
"var",
"sT... | Completes the change by adding change handler specific content
@param {sap.ui.fl.Change} oChange change wrapper object to be completed
@param {object} mSpecificChangeInfo with attribute (e.g. textLabel) to be included in the change
@public | [
"Completes",
"the",
"change",
"by",
"adding",
"change",
"handler",
"specific",
"content"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/changeHandler/BaseRename.js#L94-L107 | train | |
SAP/openui5 | src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js | function (oRouteMatch) {
var that = this;
var mRouteArguments = oRouteMatch.getParameter("arguments");
var oModelData = {};
oModelData.layer = mRouteArguments.layer;
oModelData.namespace = decodeURIComponent(mRouteArguments.namespace);
oModelData.fileName = mRouteArguments.fileName;
oModelData.fil... | javascript | function (oRouteMatch) {
var that = this;
var mRouteArguments = oRouteMatch.getParameter("arguments");
var oModelData = {};
oModelData.layer = mRouteArguments.layer;
oModelData.namespace = decodeURIComponent(mRouteArguments.namespace);
oModelData.fileName = mRouteArguments.fileName;
oModelData.fil... | [
"function",
"(",
"oRouteMatch",
")",
"{",
"var",
"that",
"=",
"this",
";",
"var",
"mRouteArguments",
"=",
"oRouteMatch",
".",
"getParameter",
"(",
"\"arguments\"",
")",
";",
"var",
"oModelData",
"=",
"{",
"}",
";",
"oModelData",
".",
"layer",
"=",
"mRouteA... | Handler if a route was matched;
Obtains information about layer, namespace, filename, and file type from the route's arguments, and then requests content from Layered Repository.
@param {Object} oRouteMatch - route object which is specified in the router and matched via regexp
@returns {Promise} - <code>LRepConnector</... | [
"Handler",
"if",
"a",
"route",
"was",
"matched",
";",
"Obtains",
"information",
"about",
"layer",
"namespace",
"filename",
"and",
"file",
"type",
"from",
"the",
"route",
"s",
"arguments",
"and",
"then",
"requests",
"content",
"from",
"Layered",
"Repository",
"... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js#L62-L87 | train | |
SAP/openui5 | src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js | function (sLayer, sNameSpace, sFileName, sFileType, sData, sTransportId, sPackageName) {
return LRepConnector.saveFile(sLayer, sNameSpace, sFileName, sFileType, sData, sTransportId, sPackageName).then(this._navToDisplayMode.bind(this));
} | javascript | function (sLayer, sNameSpace, sFileName, sFileType, sData, sTransportId, sPackageName) {
return LRepConnector.saveFile(sLayer, sNameSpace, sFileName, sFileType, sData, sTransportId, sPackageName).then(this._navToDisplayMode.bind(this));
} | [
"function",
"(",
"sLayer",
",",
"sNameSpace",
",",
"sFileName",
",",
"sFileType",
",",
"sData",
",",
"sTransportId",
",",
"sPackageName",
")",
"{",
"return",
"LRepConnector",
".",
"saveFile",
"(",
"sLayer",
",",
"sNameSpace",
",",
"sFileName",
",",
"sFileType"... | Send request to back end to saved file.
After the file has been successfully saved, navigates to "Display" mode of the content.
@returns {Promise} - <code>LRepConnector</code> "saveFiles" promise
@private | [
"Send",
"request",
"to",
"back",
"end",
"to",
"saved",
"file",
".",
"After",
"the",
"file",
"has",
"been",
"successfully",
"saved",
"navigates",
"to",
"Display",
"mode",
"of",
"the",
"content",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.fl/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js#L193-L195 | train | |
SAP/openui5 | src/sap.ui.documentation/src/sap/ui/documentation/sdk/Component.js | function () {
this._oErrorHandler = new ErrorHandler(this);
// set the device model
this.setModel(models.createDeviceModel(), "device");
// set the global libs data
this.setModel(new JSONModel(), "libsData");
// set the global version data
this.setModel(new JSONModel(), "versionData");
... | javascript | function () {
this._oErrorHandler = new ErrorHandler(this);
// set the device model
this.setModel(models.createDeviceModel(), "device");
// set the global libs data
this.setModel(new JSONModel(), "libsData");
// set the global version data
this.setModel(new JSONModel(), "versionData");
... | [
"function",
"(",
")",
"{",
"this",
".",
"_oErrorHandler",
"=",
"new",
"ErrorHandler",
"(",
"this",
")",
";",
"// set the device model",
"this",
".",
"setModel",
"(",
"models",
".",
"createDeviceModel",
"(",
")",
",",
"\"device\"",
")",
";",
"// set the global ... | The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
In this method, the device models are set and the router is initialized.
@public
@override | [
"The",
"component",
"is",
"initialized",
"by",
"UI5",
"automatically",
"during",
"the",
"startup",
"of",
"the",
"app",
"and",
"calls",
"the",
"init",
"method",
"once",
".",
"In",
"this",
"method",
"the",
"device",
"models",
"are",
"set",
"and",
"the",
"rou... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/Component.js#L47-L68 | train | |
SAP/openui5 | src/sap.ui.documentation/src/sap/ui/documentation/sdk/Component.js | function () {
this._oErrorHandler.destroy();
this._oConfigUtil.destroy();
this._oConfigUtil = null;
// call the base component's destroy function
UIComponent.prototype.destroy.apply(this, arguments);
} | javascript | function () {
this._oErrorHandler.destroy();
this._oConfigUtil.destroy();
this._oConfigUtil = null;
// call the base component's destroy function
UIComponent.prototype.destroy.apply(this, arguments);
} | [
"function",
"(",
")",
"{",
"this",
".",
"_oErrorHandler",
".",
"destroy",
"(",
")",
";",
"this",
".",
"_oConfigUtil",
".",
"destroy",
"(",
")",
";",
"this",
".",
"_oConfigUtil",
"=",
"null",
";",
"// call the base component's destroy function",
"UIComponent",
... | The component is destroyed by UI5 automatically.
In this method, the ListSelector and ErrorHandler are destroyed.
@public
@override | [
"The",
"component",
"is",
"destroyed",
"by",
"UI5",
"automatically",
".",
"In",
"this",
"method",
"the",
"ListSelector",
"and",
"ErrorHandler",
"are",
"destroyed",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/Component.js#L76-L82 | train | |
SAP/openui5 | src/sap.ui.documentation/src/sap/ui/documentation/sdk/Component.js | function() {
if (this._sContentDensityClass === undefined) {
// check whether FLP has already set the content density class; do nothing in this case
if (jQuery(document.body).hasClass("sapUiSizeCozy") || jQuery(document.body).hasClass("sapUiSizeCompact")) {
this._sContentDensityClass = "";
}
... | javascript | function() {
if (this._sContentDensityClass === undefined) {
// check whether FLP has already set the content density class; do nothing in this case
if (jQuery(document.body).hasClass("sapUiSizeCozy") || jQuery(document.body).hasClass("sapUiSizeCompact")) {
this._sContentDensityClass = "";
}
... | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"_sContentDensityClass",
"===",
"undefined",
")",
"{",
"// check whether FLP has already set the content density class; do nothing in this case",
"if",
"(",
"jQuery",
"(",
"document",
".",
"body",
")",
".",
"hasClass",
... | This method can be called to determine whether the sapUiSizeCompact or sapUiSizeCozy
design mode class should be set, which influences the size appearance of some controls.
@public
@return {string} css class, either 'sapUiSizeCompact' or 'sapUiSizeCozy' - or an empty string if no css class should be set | [
"This",
"method",
"can",
"be",
"called",
"to",
"determine",
"whether",
"the",
"sapUiSizeCompact",
"or",
"sapUiSizeCozy",
"design",
"mode",
"class",
"should",
"be",
"set",
"which",
"influences",
"the",
"size",
"appearance",
"of",
"some",
"controls",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/Component.js#L90-L100 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js | function (bDeserialize) {
var self = this, oItem,
sMsrDeserialize = "[sync ] _getAll: deserialize";
return new Promise(function (resolve, reject) {
var entries = [],
transaction = self._db.transaction([self.defaultOptions._contentStoreName], "readonly"),
objectStore = transaction.objectSt... | javascript | function (bDeserialize) {
var self = this, oItem,
sMsrDeserialize = "[sync ] _getAll: deserialize";
return new Promise(function (resolve, reject) {
var entries = [],
transaction = self._db.transaction([self.defaultOptions._contentStoreName], "readonly"),
objectStore = transaction.objectSt... | [
"function",
"(",
"bDeserialize",
")",
"{",
"var",
"self",
"=",
"this",
",",
"oItem",
",",
"sMsrDeserialize",
"=",
"\"[sync ] _getAll: deserialize\"",
";",
"return",
"new",
"Promise",
"(",
"function",
"(",
"resolve",
",",
"reject",
")",
"{",
"var",
"entries",
... | Retrieves all items.
@param {boolean} bDeserialize whether to deserialize the content or not
@returns {Promise} a promise that would be resolved in case of successful operation or rejected with
value of the error message if the operation fails. When resolved the Promise will return the array of all
entries in the foll... | [
"Retrieves",
"all",
"items",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js#L194-L223 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js | cloneMetadata | function cloneMetadata(source) {
var backupMetadata = initMetadata(source.__ui5version);
for (var index in source.__byIndex__) {
backupMetadata.__byIndex__[index] = source.__byIndex__[index];
}
for (var key in source.__byKey__) {
backupMetadata.__byKey__[key] = source.__byKey__[key];
}
return ... | javascript | function cloneMetadata(source) {
var backupMetadata = initMetadata(source.__ui5version);
for (var index in source.__byIndex__) {
backupMetadata.__byIndex__[index] = source.__byIndex__[index];
}
for (var key in source.__byKey__) {
backupMetadata.__byKey__[key] = source.__byKey__[key];
}
return ... | [
"function",
"cloneMetadata",
"(",
"source",
")",
"{",
"var",
"backupMetadata",
"=",
"initMetadata",
"(",
"source",
".",
"__ui5version",
")",
";",
"for",
"(",
"var",
"index",
"in",
"source",
".",
"__byIndex__",
")",
"{",
"backupMetadata",
".",
"__byIndex__",
... | Clones a given metadata instance
@param source the instance to clone
@returns {*} cloned metadata | [
"Clones",
"a",
"given",
"metadata",
"instance"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js#L722-L731 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js | cleanAndStore | function cleanAndStore(self, key, value) {
return new Promise(function (resolve, reject) {
var attempt = 0;
_cleanAndStore(self, key, value);
function _cleanAndStore(self, key, value) {
attempt++;
Log.debug("Cache Manager LRUPersistentCache: cleanAndStore: freeing space attempt [" + (attempt)... | javascript | function cleanAndStore(self, key, value) {
return new Promise(function (resolve, reject) {
var attempt = 0;
_cleanAndStore(self, key, value);
function _cleanAndStore(self, key, value) {
attempt++;
Log.debug("Cache Manager LRUPersistentCache: cleanAndStore: freeing space attempt [" + (attempt)... | [
"function",
"cleanAndStore",
"(",
"self",
",",
"key",
",",
"value",
")",
"{",
"return",
"new",
"Promise",
"(",
"function",
"(",
"resolve",
",",
"reject",
")",
"{",
"var",
"attempt",
"=",
"0",
";",
"_cleanAndStore",
"(",
"self",
",",
"key",
",",
"value"... | Tries to free space until the given new item is successfully added.
@param {sap.ui.core.cache.LRUPersistentCache} self the instance of the Cache Manager
@param {ItemData} oItem the item to free space for
@returns {Promise} a promise that will resolve if the given item is added, or reject - if not. | [
"Tries",
"to",
"free",
"space",
"until",
"the",
"given",
"new",
"item",
"is",
"successfully",
"added",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js#L782-L809 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js | deleteMetadataForEntry | function deleteMetadataForEntry(self, key) {
var iIndex = self._metadata.__byKey__[key];
delete self._metadata.__byKey__[key];
delete self._metadata.__byIndex__[iIndex];
seekMetadataLRU(self);
} | javascript | function deleteMetadataForEntry(self, key) {
var iIndex = self._metadata.__byKey__[key];
delete self._metadata.__byKey__[key];
delete self._metadata.__byIndex__[iIndex];
seekMetadataLRU(self);
} | [
"function",
"deleteMetadataForEntry",
"(",
"self",
",",
"key",
")",
"{",
"var",
"iIndex",
"=",
"self",
".",
"_metadata",
".",
"__byKey__",
"[",
"key",
"]",
";",
"delete",
"self",
".",
"_metadata",
".",
"__byKey__",
"[",
"key",
"]",
";",
"delete",
"self",... | Deletes all metadata for given key
@param self the instance
@param key the key for the entry | [
"Deletes",
"all",
"metadata",
"for",
"given",
"key"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js#L820-L825 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js | debugMsr | function debugMsr(sMsg, sKey, sMsrId) {
//avoid redundant string concatenation & getMeasurement call
if (Log.getLevel() >= Log.Level.DEBUG) {
Log.debug(sMsg + " for key [" + sKey + "] took: " + Measurement.getMeasurement(sMsrId).duration);
}
} | javascript | function debugMsr(sMsg, sKey, sMsrId) {
//avoid redundant string concatenation & getMeasurement call
if (Log.getLevel() >= Log.Level.DEBUG) {
Log.debug(sMsg + " for key [" + sKey + "] took: " + Measurement.getMeasurement(sMsrId).duration);
}
} | [
"function",
"debugMsr",
"(",
"sMsg",
",",
"sKey",
",",
"sMsrId",
")",
"{",
"//avoid redundant string concatenation & getMeasurement call",
"if",
"(",
"Log",
".",
"getLevel",
"(",
")",
">=",
"Log",
".",
"Level",
".",
"DEBUG",
")",
"{",
"Log",
".",
"debug",
"(... | Logs a debug message related to certain measurement if log level is debug or higher
@param {string} sMsg the message
@param {string} sKey the key to log message for
@param {string} sMsrId the measurementId to use for obtaining the jquery.sap.measure measurement | [
"Logs",
"a",
"debug",
"message",
"related",
"to",
"certain",
"measurement",
"if",
"log",
"level",
"is",
"debug",
"or",
"higher"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/cache/LRUPersistentCache.js#L898-L903 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/v4/ODataParentBinding.js | ODataParentBinding | function ODataParentBinding() {
// initialize members introduced by ODataBinding
asODataBinding.call(this);
// the aggregated query options
this.mAggregatedQueryOptions = {};
// whether the aggregated query options are processed the first time
this.bAggregatedQueryOptionsInitial = true;
// auto-$expand/$... | javascript | function ODataParentBinding() {
// initialize members introduced by ODataBinding
asODataBinding.call(this);
// the aggregated query options
this.mAggregatedQueryOptions = {};
// whether the aggregated query options are processed the first time
this.bAggregatedQueryOptionsInitial = true;
// auto-$expand/$... | [
"function",
"ODataParentBinding",
"(",
")",
"{",
"// initialize members introduced by ODataBinding",
"asODataBinding",
".",
"call",
"(",
"this",
")",
";",
"// the aggregated query options",
"this",
".",
"mAggregatedQueryOptions",
"=",
"{",
"}",
";",
"// whether the aggregat... | A mixin for all OData V4 bindings with dependent bindings.
@alias sap.ui.model.odata.v4.ODataParentBinding
@extends sap.ui.model.odata.v4.ODataBinding
@mixin | [
"A",
"mixin",
"for",
"all",
"OData",
"V4",
"bindings",
"with",
"dependent",
"bindings",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/v4/ODataParentBinding.js#L24-L41 | train |
SAP/openui5 | src/sap.ui.demokit/src/sap/ui/demokit/util/jsanalyzer/ModuleAnalyzer.js | getParamInfo | function getParamInfo(sParamName, aDocTags) {
//set default parameter type if there are no @ definitions for the type
var sParamType = '',
sParamDescription = '',
iParamNameIndex,
iDocStartIndex,
rEgexMatchType = /{(.*)}/,
aMatch;
for (var i = 0; i < aDocTags.length; i++) {
if ( aDoc... | javascript | function getParamInfo(sParamName, aDocTags) {
//set default parameter type if there are no @ definitions for the type
var sParamType = '',
sParamDescription = '',
iParamNameIndex,
iDocStartIndex,
rEgexMatchType = /{(.*)}/,
aMatch;
for (var i = 0; i < aDocTags.length; i++) {
if ( aDoc... | [
"function",
"getParamInfo",
"(",
"sParamName",
",",
"aDocTags",
")",
"{",
"//set default parameter type if there are no @ definitions for the type",
"var",
"sParamType",
"=",
"''",
",",
"sParamDescription",
"=",
"''",
",",
"iParamNameIndex",
",",
"iDocStartIndex",
",",
"r... | Get the documentation information needed for a given parameter
@param {string} sParamName Name of the parameter to be fetched
@param {array} aDocTags With documentation tags
@return {Object} Parameter information | [
"Get",
"the",
"documentation",
"information",
"needed",
"for",
"a",
"given",
"parameter"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.demokit/src/sap/ui/demokit/util/jsanalyzer/ModuleAnalyzer.js#L497-L536 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/mvc/HTMLViewRenderer.js | function(oControl) {
var sTemp = HTMLViewRenderer._getHTML(rm, oControl, sHTML);
if (sTemp) {
sHTML = sTemp;
} else {
aDeferred.push(oControl);
}
} | javascript | function(oControl) {
var sTemp = HTMLViewRenderer._getHTML(rm, oControl, sHTML);
if (sTemp) {
sHTML = sTemp;
} else {
aDeferred.push(oControl);
}
} | [
"function",
"(",
"oControl",
")",
"{",
"var",
"sTemp",
"=",
"HTMLViewRenderer",
".",
"_getHTML",
"(",
"rm",
",",
"oControl",
",",
"sHTML",
")",
";",
"if",
"(",
"sTemp",
")",
"{",
"sHTML",
"=",
"sTemp",
";",
"}",
"else",
"{",
"aDeferred",
".",
"push",... | helper method to render the controls | [
"helper",
"method",
"to",
"render",
"the",
"controls"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/mvc/HTMLViewRenderer.js#L54-L61 | train | |
SAP/openui5 | src/sap.m/src/sap/m/TextArea.js | scrollIntoView | function scrollIntoView() {
jQuery(window).scrollTop(0);
scrollContainer.scrollTop($this.offset().top - scrollContainer.offset().top + scrollContainer.scrollTop());
} | javascript | function scrollIntoView() {
jQuery(window).scrollTop(0);
scrollContainer.scrollTop($this.offset().top - scrollContainer.offset().top + scrollContainer.scrollTop());
} | [
"function",
"scrollIntoView",
"(",
")",
"{",
"jQuery",
"(",
"window",
")",
".",
"scrollTop",
"(",
"0",
")",
";",
"scrollContainer",
".",
"scrollTop",
"(",
"$this",
".",
"offset",
"(",
")",
".",
"top",
"-",
"scrollContainer",
".",
"offset",
"(",
")",
".... | Workaround for the scroll-into-view bug in the WebView Windows Phone 8.1 As the browser does not scroll the window as it should, scroll the parent scroll container to make the hidden text visible | [
"Workaround",
"for",
"the",
"scroll",
"-",
"into",
"-",
"view",
"bug",
"in",
"the",
"WebView",
"Windows",
"Phone",
"8",
".",
"1",
"As",
"the",
"browser",
"does",
"not",
"scroll",
"the",
"window",
"as",
"it",
"should",
"scroll",
"the",
"parent",
"scroll",... | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/TextArea.js#L746-L749 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/odata/type/Boolean.js | getMessage | function getMessage(sKey, aParameters) {
return sap.ui.getCore().getLibraryResourceBundle().getText(sKey, aParameters);
} | javascript | function getMessage(sKey, aParameters) {
return sap.ui.getCore().getLibraryResourceBundle().getText(sKey, aParameters);
} | [
"function",
"getMessage",
"(",
"sKey",
",",
"aParameters",
")",
"{",
"return",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
".",
"getLibraryResourceBundle",
"(",
")",
".",
"getText",
"(",
"sKey",
",",
"aParameters",
")",
";",
"}"
] | Returns the locale-dependent text for the given key. Fetches the resource bundle
and stores it in the type if necessary.
@param {string} sKey
the key
@param {any[]} aParameters
the parameters
@returns {string}
the locale-dependent text for the key | [
"Returns",
"the",
"locale",
"-",
"dependent",
"text",
"for",
"the",
"given",
"key",
".",
"Fetches",
"the",
"resource",
"bundle",
"and",
"stores",
"it",
"in",
"the",
"type",
"if",
"necessary",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/odata/type/Boolean.js#L36-L38 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js | function(oEvent) {
var oNewEntity = oEvent.getParameter("oEntity");
oNewEntity.IsActiveEntity = false;
oNewEntity.HasActiveEntity = false;
oNewEntity.HasDraftEntity = false;
} | javascript | function(oEvent) {
var oNewEntity = oEvent.getParameter("oEntity");
oNewEntity.IsActiveEntity = false;
oNewEntity.HasActiveEntity = false;
oNewEntity.HasDraftEntity = false;
} | [
"function",
"(",
"oEvent",
")",
"{",
"var",
"oNewEntity",
"=",
"oEvent",
".",
"getParameter",
"(",
"\"oEntity\"",
")",
";",
"oNewEntity",
".",
"IsActiveEntity",
"=",
"false",
";",
"oNewEntity",
".",
"HasActiveEntity",
"=",
"false",
";",
"oNewEntity",
".",
"H... | callback function to update draft specific properties post creation | [
"callback",
"function",
"to",
"update",
"draft",
"specific",
"properties",
"post",
"creation"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js#L30-L35 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js | function(oEvent) {
var oXhr = oEvent.getParameter("oXhr");
var oEntry = jQuery.sap.sjax({
url: oXhr.url,
dataType: "json"
}).data.d;
// navigate to draft nodes and delete nodes
for (var i = 0; i < this._oDraftMetadata.draftNodes.length; i++) {
for (var navprop in this._mEntitySets[thi... | javascript | function(oEvent) {
var oXhr = oEvent.getParameter("oXhr");
var oEntry = jQuery.sap.sjax({
url: oXhr.url,
dataType: "json"
}).data.d;
// navigate to draft nodes and delete nodes
for (var i = 0; i < this._oDraftMetadata.draftNodes.length; i++) {
for (var navprop in this._mEntitySets[thi... | [
"function",
"(",
"oEvent",
")",
"{",
"var",
"oXhr",
"=",
"oEvent",
".",
"getParameter",
"(",
"\"oXhr\"",
")",
";",
"var",
"oEntry",
"=",
"jQuery",
".",
"sap",
".",
"sjax",
"(",
"{",
"url",
":",
"oXhr",
".",
"url",
",",
"dataType",
":",
"\"json\"",
... | callback function to update draft specific properties pre deletion | [
"callback",
"function",
"to",
"update",
"draft",
"specific",
"properties",
"pre",
"deletion"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js#L37-L64 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js | function(sEntityset, mEntitySets) {
var aSemanticKey = [];
for (var annotationsProperty in this._oDraftMetadata.annotations) {
if (annotationsProperty.lastIndexOf(mEntitySets[sEntityset].type) > -1) {
aSemanticKey = this._oDraftMetadata.annotations[annotationsProperty][this._oConstants.COM_SAP_VOCABULARI... | javascript | function(sEntityset, mEntitySets) {
var aSemanticKey = [];
for (var annotationsProperty in this._oDraftMetadata.annotations) {
if (annotationsProperty.lastIndexOf(mEntitySets[sEntityset].type) > -1) {
aSemanticKey = this._oDraftMetadata.annotations[annotationsProperty][this._oConstants.COM_SAP_VOCABULARI... | [
"function",
"(",
"sEntityset",
",",
"mEntitySets",
")",
"{",
"var",
"aSemanticKey",
"=",
"[",
"]",
";",
"for",
"(",
"var",
"annotationsProperty",
"in",
"this",
".",
"_oDraftMetadata",
".",
"annotations",
")",
"{",
"if",
"(",
"annotationsProperty",
".",
"last... | Returns an array with key of the corresponding "draft-less" entity type
@param {string} sEntityset name of the entityset
@param {object} mEntitySets
@return {object} array with key of the corresponding "draft-less" entity type | [
"Returns",
"an",
"array",
"with",
"key",
"of",
"the",
"corresponding",
"draft",
"-",
"less",
"entity",
"type"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js#L132-L149 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js | function(mEntitySets) {
var that = this;
this._oDraftMetadata.draftNodes = [];
this._oDraftMetadata.draftRootKey = mEntitySets[this._oDraftMetadata.draftRootName].keys.filter(function(x) {
return that._calcSemanticKeys(that._oDraftMetadata.draftRootName, mEntitySets).indexOf(x) < 0;
})[0];
var oAnnot... | javascript | function(mEntitySets) {
var that = this;
this._oDraftMetadata.draftNodes = [];
this._oDraftMetadata.draftRootKey = mEntitySets[this._oDraftMetadata.draftRootName].keys.filter(function(x) {
return that._calcSemanticKeys(that._oDraftMetadata.draftRootName, mEntitySets).indexOf(x) < 0;
})[0];
var oAnnot... | [
"function",
"(",
"mEntitySets",
")",
"{",
"var",
"that",
"=",
"this",
";",
"this",
".",
"_oDraftMetadata",
".",
"draftNodes",
"=",
"[",
"]",
";",
"this",
".",
"_oDraftMetadata",
".",
"draftRootKey",
"=",
"mEntitySets",
"[",
"this",
".",
"_oDraftMetadata",
... | Calculates the draft key of the draft root entityset and a list of all draft nodes
@param {object} mEntitySets | [
"Calculates",
"the",
"draft",
"key",
"of",
"the",
"draft",
"root",
"entityset",
"and",
"a",
"list",
"of",
"all",
"draft",
"nodes"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js#L155-L175 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js | function(oEntry) {
var oResponse;
var fnGrep = function(aContains, aContained) {
return aContains.filter(function(x) {
return aContained.indexOf(x) < 0;
})[0];
};
// navigate to draft nodes and activate nodes
for (var i = 0; i < this._oDraftMetadata.draftNodes.length; i++) {
for (var nav... | javascript | function(oEntry) {
var oResponse;
var fnGrep = function(aContains, aContained) {
return aContains.filter(function(x) {
return aContained.indexOf(x) < 0;
})[0];
};
// navigate to draft nodes and activate nodes
for (var i = 0; i < this._oDraftMetadata.draftNodes.length; i++) {
for (var nav... | [
"function",
"(",
"oEntry",
")",
"{",
"var",
"oResponse",
";",
"var",
"fnGrep",
"=",
"function",
"(",
"aContains",
",",
"aContained",
")",
"{",
"return",
"aContains",
".",
"filter",
"(",
"function",
"(",
"x",
")",
"{",
"return",
"aContained",
".",
"indexO... | Activates a draft document
@param {object} oEntry the draft document | [
"Activates",
"a",
"draft",
"document"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/util/DraftEnabledMockServer.js#L343-L389 | train | |
SAP/openui5 | src/sap.m/src/sap/m/NotificationListGroup.js | comparePriority | function comparePriority(firstPriority, secondPriority) {
if (firstPriority == secondPriority) {
return firstPriority;
}
if ((firstPriority == 'None')) {
return secondPriority;
}
if ((firstPriority == 'Low') && (secondPriority != 'None')) {
return secondPriority;
}
if ((firstPriority == 'Mediu... | javascript | function comparePriority(firstPriority, secondPriority) {
if (firstPriority == secondPriority) {
return firstPriority;
}
if ((firstPriority == 'None')) {
return secondPriority;
}
if ((firstPriority == 'Low') && (secondPriority != 'None')) {
return secondPriority;
}
if ((firstPriority == 'Mediu... | [
"function",
"comparePriority",
"(",
"firstPriority",
",",
"secondPriority",
")",
"{",
"if",
"(",
"firstPriority",
"==",
"secondPriority",
")",
"{",
"return",
"firstPriority",
";",
"}",
"if",
"(",
"(",
"firstPriority",
"==",
"'None'",
")",
")",
"{",
"return",
... | Compares two priorities and returns the higher one.
@private
@param {sap.ui.core.Priority} firstPriority First priority string to be compared.
@param {sap.ui.core.Priority} secondPriority Second priority string to be compared.
@returns {sap.ui.core.Priority} The highest priority. | [
"Compares",
"two",
"priorities",
"and",
"returns",
"the",
"higher",
"one",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/NotificationListGroup.js#L468-L486 | train |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableSyncExtension.js | function(iIndex, bSelected) {
var oTable = this.getTable();
var oRow = oTable.getRows()[iIndex];
if (oRow && bSelected != null) {
TableUtils.toggleRowSelection(oTable, oRow.getIndex(), bSelected);
}
} | javascript | function(iIndex, bSelected) {
var oTable = this.getTable();
var oRow = oTable.getRows()[iIndex];
if (oRow && bSelected != null) {
TableUtils.toggleRowSelection(oTable, oRow.getIndex(), bSelected);
}
} | [
"function",
"(",
"iIndex",
",",
"bSelected",
")",
"{",
"var",
"oTable",
"=",
"this",
".",
"getTable",
"(",
")",
";",
"var",
"oRow",
"=",
"oTable",
".",
"getRows",
"(",
")",
"[",
"iIndex",
"]",
";",
"if",
"(",
"oRow",
"&&",
"bSelected",
"!=",
"null"... | Sets the selection state of a row.
@param {int} iIndex The index of the row in the aggregation.
@param {boolean} bSelected Whether the row should be selected. | [
"Sets",
"the",
"selection",
"state",
"of",
"a",
"row",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableSyncExtension.js#L20-L27 | train | |
SAP/openui5 | src/sap.ui.table/src/sap/ui/table/TableSyncExtension.js | function(iIndex, bHovered) {
var oTable = this.getTable();
var oRow = oTable.getRows()[iIndex];
if (oRow && bHovered != null) {
oRow._setHovered(bHovered);
}
} | javascript | function(iIndex, bHovered) {
var oTable = this.getTable();
var oRow = oTable.getRows()[iIndex];
if (oRow && bHovered != null) {
oRow._setHovered(bHovered);
}
} | [
"function",
"(",
"iIndex",
",",
"bHovered",
")",
"{",
"var",
"oTable",
"=",
"this",
".",
"getTable",
"(",
")",
";",
"var",
"oRow",
"=",
"oTable",
".",
"getRows",
"(",
")",
"[",
"iIndex",
"]",
";",
"if",
"(",
"oRow",
"&&",
"bHovered",
"!=",
"null",
... | Sets the hover state of a row.
@param {int} iIndex The index of the row in the aggregation.
@param {boolean} bHovered Whether the row should be hovered. | [
"Sets",
"the",
"hover",
"state",
"of",
"a",
"row",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.table/src/sap/ui/table/TableSyncExtension.js#L35-L42 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/qunit.js | function( handler ) {
var hooks = [];
// Hooks are ignored on skipped tests
if ( this.skip ) {
return hooks;
}
if ( this.module.testEnvironment &&
QUnit.objectType( this.module.testEnvironment[ handler ] ) === "function" ) {
hooks.push( this.queueHook( this.module.testEnvironment[ handler ], handl... | javascript | function( handler ) {
var hooks = [];
// Hooks are ignored on skipped tests
if ( this.skip ) {
return hooks;
}
if ( this.module.testEnvironment &&
QUnit.objectType( this.module.testEnvironment[ handler ] ) === "function" ) {
hooks.push( this.queueHook( this.module.testEnvironment[ handler ], handl... | [
"function",
"(",
"handler",
")",
"{",
"var",
"hooks",
"=",
"[",
"]",
";",
"// Hooks are ignored on skipped tests",
"if",
"(",
"this",
".",
"skip",
")",
"{",
"return",
"hooks",
";",
"}",
"if",
"(",
"this",
".",
"module",
".",
"testEnvironment",
"&&",
"QUn... | Currently only used for module level hooks, can be used to add global level ones | [
"Currently",
"only",
"used",
"for",
"module",
"level",
"hooks",
"can",
"be",
"used",
"to",
"add",
"global",
"level",
"ones"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/qunit.js#L947-L961 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/qunit.js | generateHash | function generateHash( module, testName ) {
var hex,
i = 0,
hash = 0,
str = module + "\x1C" + testName,
len = str.length;
for ( ; i < len; i++ ) {
hash = ( ( hash << 5 ) - hash ) + str.charCodeAt( i );
hash |= 0;
}
// Convert the possibly negative integer hash code into an 8 character hex string, whi... | javascript | function generateHash( module, testName ) {
var hex,
i = 0,
hash = 0,
str = module + "\x1C" + testName,
len = str.length;
for ( ; i < len; i++ ) {
hash = ( ( hash << 5 ) - hash ) + str.charCodeAt( i );
hash |= 0;
}
// Convert the possibly negative integer hash code into an 8 character hex string, whi... | [
"function",
"generateHash",
"(",
"module",
",",
"testName",
")",
"{",
"var",
"hex",
",",
"i",
"=",
"0",
",",
"hash",
"=",
"0",
",",
"str",
"=",
"module",
"+",
"\"\\x1C\"",
"+",
"testName",
",",
"len",
"=",
"str",
".",
"length",
";",
"for",
"(",
"... | Based on Java's String.hashCode, a simple but not rigorously collision resistant hashing function | [
"Based",
"on",
"Java",
"s",
"String",
".",
"hashCode",
"a",
"simple",
"but",
"not",
"rigorously",
"collision",
"resistant",
"hashing",
"function"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/qunit.js#L1220-L1240 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/qunit.js | bindCallbacks | function bindCallbacks( o, callbacks, args ) {
var prop = QUnit.objectType( o );
if ( prop ) {
if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) {
return callbacks[ prop ].apply( callbacks, args );
} else {
return callbacks[ prop ]; // or undefined
}
}
} | javascript | function bindCallbacks( o, callbacks, args ) {
var prop = QUnit.objectType( o );
if ( prop ) {
if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) {
return callbacks[ prop ].apply( callbacks, args );
} else {
return callbacks[ prop ]; // or undefined
}
}
} | [
"function",
"bindCallbacks",
"(",
"o",
",",
"callbacks",
",",
"args",
")",
"{",
"var",
"prop",
"=",
"QUnit",
".",
"objectType",
"(",
"o",
")",
";",
"if",
"(",
"prop",
")",
"{",
"if",
"(",
"QUnit",
".",
"objectType",
"(",
"callbacks",
"[",
"prop",
"... | Call the o related callback with the given arguments. | [
"Call",
"the",
"o",
"related",
"callback",
"with",
"the",
"given",
"arguments",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/qunit.js#L1427-L1436 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/qunit.js | function( fn ) {
var args,
l = fn.length;
if ( !l ) {
return "";
}
args = new Array( l );
while ( l-- ) {
// 97 is 'a'
args[ l ] = String.fromCharCode( 97 + l );
}
return " " + args.join( ", " ) + " ";
} | javascript | function( fn ) {
var args,
l = fn.length;
if ( !l ) {
return "";
}
args = new Array( l );
while ( l-- ) {
// 97 is 'a'
args[ l ] = String.fromCharCode( 97 + l );
}
return " " + args.join( ", " ) + " ";
} | [
"function",
"(",
"fn",
")",
"{",
"var",
"args",
",",
"l",
"=",
"fn",
".",
"length",
";",
"if",
"(",
"!",
"l",
")",
"{",
"return",
"\"\"",
";",
"}",
"args",
"=",
"new",
"Array",
"(",
"l",
")",
";",
"while",
"(",
"l",
"--",
")",
"{",
"// 97 i... | function calls it internally, it's the arguments part of the function | [
"function",
"calls",
"it",
"internally",
"it",
"s",
"the",
"arguments",
"part",
"of",
"the",
"function"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/qunit.js#L1864-L1879 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/thirdparty/qunit.js | escapeText | function escapeText( s ) {
if ( !s ) {
return "";
}
s = s + "";
// Both single quotes and double quotes (for attributes)
return s.replace( /['"<>&]/g, function( s ) {
switch ( s ) {
case "'":
return "'";
case "\"":
return """;
case "<":
return "<";
case ">":
return ">";
c... | javascript | function escapeText( s ) {
if ( !s ) {
return "";
}
s = s + "";
// Both single quotes and double quotes (for attributes)
return s.replace( /['"<>&]/g, function( s ) {
switch ( s ) {
case "'":
return "'";
case "\"":
return """;
case "<":
return "<";
case ">":
return ">";
c... | [
"function",
"escapeText",
"(",
"s",
")",
"{",
"if",
"(",
"!",
"s",
")",
"{",
"return",
"\"\"",
";",
"}",
"s",
"=",
"s",
"+",
"\"\"",
";",
"// Both single quotes and double quotes (for attributes)",
"return",
"s",
".",
"replace",
"(",
"/",
"['\"<>&]",
"/",
... | Escape text for attribute or text content. | [
"Escape",
"text",
"for",
"attribute",
"or",
"text",
"content",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/thirdparty/qunit.js#L3162-L3183 | train |
SAP/openui5 | src/sap.uxap/src/sap/uxap/component/Component.js | function () {
//step1: create model from configuration
this._oModel = null; //internal component model
this._oViewConfig = { //internal view configuration
viewData: {
component: this
}
};
//step2: load model from the component configuration
switch (this.oCompo... | javascript | function () {
//step1: create model from configuration
this._oModel = null; //internal component model
this._oViewConfig = { //internal view configuration
viewData: {
component: this
}
};
//step2: load model from the component configuration
switch (this.oCompo... | [
"function",
"(",
")",
"{",
"//step1: create model from configuration",
"this",
".",
"_oModel",
"=",
"null",
";",
"//internal component model",
"this",
".",
"_oViewConfig",
"=",
"{",
"//internal view configuration",
"viewData",
":",
"{",
"component",
":",
"this",
"}",
... | initialize the view containing the objectPageLayout | [
"initialize",
"the",
"view",
"containing",
"the",
"objectPageLayout"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.uxap/src/sap/uxap/component/Component.js#L28-L57 | train | |
SAP/openui5 | src/sap.uxap/src/sap/uxap/component/Component.js | function () {
var oController;
//step3: create view
this._oView = sap.ui.view(this._oViewConfig);
//step4: bind the view with the model
if (this._oModel) {
oController = this._oView.getController();
//some factory requires pre-processing once the view and model are created
if (oController ... | javascript | function () {
var oController;
//step3: create view
this._oView = sap.ui.view(this._oViewConfig);
//step4: bind the view with the model
if (this._oModel) {
oController = this._oView.getController();
//some factory requires pre-processing once the view and model are created
if (oController ... | [
"function",
"(",
")",
"{",
"var",
"oController",
";",
"//step3: create view",
"this",
".",
"_oView",
"=",
"sap",
".",
"ui",
".",
"view",
"(",
"this",
".",
"_oViewConfig",
")",
";",
"//step4: bind the view with the model",
"if",
"(",
"this",
".",
"_oModel",
"... | Create view corresponding to the chosen config
@returns {sap.ui.view} Created view | [
"Create",
"view",
"corresponding",
"to",
"the",
"chosen",
"config"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.uxap/src/sap/uxap/component/Component.js#L63-L83 | train | |
SAP/openui5 | src/sap.uxap/src/sap/uxap/component/Component.js | function (vName) {
if (this.oComponentData.mode === ObjectPageConfigurationMode.JsonModel) {
var oController = this._oView.getController();
//some factory requires post-processing once the view and model are created
if (oController && oController.connectToComponent) {
oController.connectToComponen... | javascript | function (vName) {
if (this.oComponentData.mode === ObjectPageConfigurationMode.JsonModel) {
var oController = this._oView.getController();
//some factory requires post-processing once the view and model are created
if (oController && oController.connectToComponent) {
oController.connectToComponen... | [
"function",
"(",
"vName",
")",
"{",
"if",
"(",
"this",
".",
"oComponentData",
".",
"mode",
"===",
"ObjectPageConfigurationMode",
".",
"JsonModel",
")",
"{",
"var",
"oController",
"=",
"this",
".",
"_oView",
".",
"getController",
"(",
")",
";",
"//some factor... | traps propagated properties for postprocessing on useExternalModel cases
@param {*} vName the name of the property
@returns {*} result of the function | [
"traps",
"propagated",
"properties",
"for",
"postprocessing",
"on",
"useExternalModel",
"cases"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.uxap/src/sap/uxap/component/Component.js#L90-L101 | train | |
SAP/openui5 | src/sap.uxap/src/sap/uxap/component/Component.js | function () {
if (this._oView) {
this._oView.destroy();
this._oView = null;
}
if (this._oModel) {
this._oModel.destroy();
this._oModel = null;
}
if (UIComponent.prototype.destroy) {
UIComponent.prototype.destroy.call(this);
}
} | javascript | function () {
if (this._oView) {
this._oView.destroy();
this._oView = null;
}
if (this._oModel) {
this._oModel.destroy();
this._oModel = null;
}
if (UIComponent.prototype.destroy) {
UIComponent.prototype.destroy.call(this);
}
} | [
"function",
"(",
")",
"{",
"if",
"(",
"this",
".",
"_oView",
")",
"{",
"this",
".",
"_oView",
".",
"destroy",
"(",
")",
";",
"this",
".",
"_oView",
"=",
"null",
";",
"}",
"if",
"(",
"this",
".",
"_oModel",
")",
"{",
"this",
".",
"_oModel",
".",... | destroy the view and model before exiting | [
"destroy",
"the",
"view",
"and",
"model",
"before",
"exiting"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.uxap/src/sap/uxap/component/Component.js#L106-L120 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/FocusHandler.js | function(sControlId, sRelatedControlId, oCore){
var oControl = sControlId ? oCore && oCore.byId(sControlId) : null;
if (oControl) {
var oRelatedControl = sRelatedControlId ? oCore.byId(sRelatedControlId) : null;
var oEvent = jQuery.Event("sapfocusleave");
oEvent.target = oControl.getDomRef();
oEve... | javascript | function(sControlId, sRelatedControlId, oCore){
var oControl = sControlId ? oCore && oCore.byId(sControlId) : null;
if (oControl) {
var oRelatedControl = sRelatedControlId ? oCore.byId(sRelatedControlId) : null;
var oEvent = jQuery.Event("sapfocusleave");
oEvent.target = oControl.getDomRef();
oEve... | [
"function",
"(",
"sControlId",
",",
"sRelatedControlId",
",",
"oCore",
")",
"{",
"var",
"oControl",
"=",
"sControlId",
"?",
"oCore",
"&&",
"oCore",
".",
"byId",
"(",
"sControlId",
")",
":",
"null",
";",
"if",
"(",
"oControl",
")",
"{",
"var",
"oRelatedCo... | Calls the onsapfocusleave function on the control with id sControlId
with the information about the given related control.
@param {string} sControlId
@param {string} sRelatedControlId
@private | [
"Calls",
"the",
"onsapfocusleave",
"function",
"on",
"the",
"control",
"with",
"id",
"sControlId",
"with",
"the",
"information",
"about",
"the",
"given",
"related",
"control",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/FocusHandler.js#L302-L325 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/date/Japanese.js | toJapanese | function toJapanese(oGregorian) {
var iEra = UniversalDate.getEraByDate(CalendarType.Japanese, oGregorian.year, oGregorian.month, oGregorian.day),
iEraStartYear = UniversalDate.getEraStartDate(CalendarType.Japanese, iEra).year;
return {
era: iEra,
year: oGregorian.year - iEraStartYear + 1,
month: oGrego... | javascript | function toJapanese(oGregorian) {
var iEra = UniversalDate.getEraByDate(CalendarType.Japanese, oGregorian.year, oGregorian.month, oGregorian.day),
iEraStartYear = UniversalDate.getEraStartDate(CalendarType.Japanese, iEra).year;
return {
era: iEra,
year: oGregorian.year - iEraStartYear + 1,
month: oGrego... | [
"function",
"toJapanese",
"(",
"oGregorian",
")",
"{",
"var",
"iEra",
"=",
"UniversalDate",
".",
"getEraByDate",
"(",
"CalendarType",
".",
"Japanese",
",",
"oGregorian",
".",
"year",
",",
"oGregorian",
".",
"month",
",",
"oGregorian",
".",
"day",
")",
",",
... | Find the matching japanese date for the given gregorian date
@param {object} oGregorian
@return {object} | [
"Find",
"the",
"matching",
"japanese",
"date",
"for",
"the",
"given",
"gregorian",
"date"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/date/Japanese.js#L53-L62 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/date/Japanese.js | toGregorian | function toGregorian(oJapanese) {
var iEraStartYear = UniversalDate.getEraStartDate(CalendarType.Japanese, oJapanese.era).year;
return {
year: iEraStartYear + oJapanese.year - 1,
month: oJapanese.month,
day: oJapanese.day
};
} | javascript | function toGregorian(oJapanese) {
var iEraStartYear = UniversalDate.getEraStartDate(CalendarType.Japanese, oJapanese.era).year;
return {
year: iEraStartYear + oJapanese.year - 1,
month: oJapanese.month,
day: oJapanese.day
};
} | [
"function",
"toGregorian",
"(",
"oJapanese",
")",
"{",
"var",
"iEraStartYear",
"=",
"UniversalDate",
".",
"getEraStartDate",
"(",
"CalendarType",
".",
"Japanese",
",",
"oJapanese",
".",
"era",
")",
".",
"year",
";",
"return",
"{",
"year",
":",
"iEraStartYear",... | Calculate gregorian year from japanes era and year
@param {object} oJapanese
@return {int} | [
"Calculate",
"gregorian",
"year",
"from",
"japanes",
"era",
"and",
"year"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/date/Japanese.js#L70-L77 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/date/Japanese.js | toGregorianArguments | function toGregorianArguments(aArgs) {
var oJapanese, oGregorian,
iEra,
vYear = aArgs[0];
if (typeof vYear == "number") {
if (vYear >= 100) {
// Year greater than 100 will be treated as gregorian year
return aArgs;
} else {
// Year less than 100 is emperor year in the current era
iEra = ... | javascript | function toGregorianArguments(aArgs) {
var oJapanese, oGregorian,
iEra,
vYear = aArgs[0];
if (typeof vYear == "number") {
if (vYear >= 100) {
// Year greater than 100 will be treated as gregorian year
return aArgs;
} else {
// Year less than 100 is emperor year in the current era
iEra = ... | [
"function",
"toGregorianArguments",
"(",
"aArgs",
")",
"{",
"var",
"oJapanese",
",",
"oGregorian",
",",
"iEra",
",",
"vYear",
"=",
"aArgs",
"[",
"0",
"]",
";",
"if",
"(",
"typeof",
"vYear",
"==",
"\"number\"",
")",
"{",
"if",
"(",
"vYear",
">=",
"100",... | Convert arguments array from japanese date to gregorian data
@param {object} oJapanese
@return {int} | [
"Convert",
"arguments",
"array",
"from",
"japanese",
"date",
"to",
"gregorian",
"data"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/date/Japanese.js#L85-L112 | train |
SAP/openui5 | src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/BaseController.js | function (oEvent) {
var oSource = oEvent.getSource ? oEvent.getSource() : oEvent.target;
if (!this.oDisclaimerPopover) {
sap.ui.core.Fragment.load({
name: "sap.ui.documentation.sdk.view.LegalDisclaimerPopover"
}).then(function (oPopover) {
this.oDisclaimerPopover = oPopover;
oPopov... | javascript | function (oEvent) {
var oSource = oEvent.getSource ? oEvent.getSource() : oEvent.target;
if (!this.oDisclaimerPopover) {
sap.ui.core.Fragment.load({
name: "sap.ui.documentation.sdk.view.LegalDisclaimerPopover"
}).then(function (oPopover) {
this.oDisclaimerPopover = oPopover;
oPopov... | [
"function",
"(",
"oEvent",
")",
"{",
"var",
"oSource",
"=",
"oEvent",
".",
"getSource",
"?",
"oEvent",
".",
"getSource",
"(",
")",
":",
"oEvent",
".",
"target",
";",
"if",
"(",
"!",
"this",
".",
"oDisclaimerPopover",
")",
"{",
"sap",
".",
"ui",
".",
... | Opens a legal disclaimer for Links Popover.
@param {sap.ui.base.Event} oEvent: the <code>Image</code> press event
@public | [
"Opens",
"a",
"legal",
"disclaimer",
"for",
"Links",
"Popover",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/BaseController.js#L134-L152 | train | |
SAP/openui5 | src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/BaseController.js | function (sControlName, oControlsData) {
var oLibComponentModel = oControlsData.libComponentInfos,
oLibInfo = library._getLibraryInfoSingleton();
return oLibInfo._getActualComponent(oLibComponentModel, sControlName);
} | javascript | function (sControlName, oControlsData) {
var oLibComponentModel = oControlsData.libComponentInfos,
oLibInfo = library._getLibraryInfoSingleton();
return oLibInfo._getActualComponent(oLibComponentModel, sControlName);
} | [
"function",
"(",
"sControlName",
",",
"oControlsData",
")",
"{",
"var",
"oLibComponentModel",
"=",
"oControlsData",
".",
"libComponentInfos",
",",
"oLibInfo",
"=",
"library",
".",
"_getLibraryInfoSingleton",
"(",
")",
";",
"return",
"oLibInfo",
".",
"_getActualCompo... | Retrieves the actual component for the control.
@param {string} sControlName
@return {string} the actual component | [
"Retrieves",
"the",
"actual",
"component",
"for",
"the",
"control",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/BaseController.js#L159-L163 | train | |
SAP/openui5 | src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/BaseController.js | function(oEvent) {
var oImage = this.byId("phoneImage");
if (Device.system.phone && oImage) {
oImage.toggleStyleClass("phoneHeaderImageLandscape", oEvent.landscape);
}
} | javascript | function(oEvent) {
var oImage = this.byId("phoneImage");
if (Device.system.phone && oImage) {
oImage.toggleStyleClass("phoneHeaderImageLandscape", oEvent.landscape);
}
} | [
"function",
"(",
"oEvent",
")",
"{",
"var",
"oImage",
"=",
"this",
".",
"byId",
"(",
"\"phoneImage\"",
")",
";",
"if",
"(",
"Device",
".",
"system",
".",
"phone",
"&&",
"oImage",
")",
"{",
"oImage",
".",
"toggleStyleClass",
"(",
"\"phoneHeaderImageLandscap... | Switches the maximum height of the phone image for optimal display in landscape mode
@param {sap.ui.base.Event} oEvent Device orientation change event
@private | [
"Switches",
"the",
"maximum",
"height",
"of",
"the",
"phone",
"image",
"for",
"optimal",
"display",
"in",
"landscape",
"mode"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/BaseController.js#L170-L176 | train | |
SAP/openui5 | src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/BaseController.js | function (sControlName) {
return APIInfo.getIndexJsonPromise().then(function (aData) {
function findSymbol (a) {
return a.some(function (o) {
var bFound = o.name === sControlName;
if (!bFound && o.nodes) {
return findSymbol(o.nodes);
}
return bFound;
});
}
... | javascript | function (sControlName) {
return APIInfo.getIndexJsonPromise().then(function (aData) {
function findSymbol (a) {
return a.some(function (o) {
var bFound = o.name === sControlName;
if (!bFound && o.nodes) {
return findSymbol(o.nodes);
}
return bFound;
});
}
... | [
"function",
"(",
"sControlName",
")",
"{",
"return",
"APIInfo",
".",
"getIndexJsonPromise",
"(",
")",
".",
"then",
"(",
"function",
"(",
"aData",
")",
"{",
"function",
"findSymbol",
"(",
"a",
")",
"{",
"return",
"a",
".",
"some",
"(",
"function",
"(",
... | Checks if a control has API Reference
@param {string} sControlName
@return {Promise} A promise that resolves to {boolean} | [
"Checks",
"if",
"a",
"control",
"has",
"API",
"Reference"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/BaseController.js#L206-L219 | train | |
SAP/openui5 | src/sap.f/src/sap/f/GridContainerSettings.js | cssSizeToPx | function cssSizeToPx(sCssSize) {
if (sCssSize === 0 || sCssSize === "0") {
return 0;
}
var aMatch = sCssSize.match(/^(\d+(\.\d+)?)(px|rem)$/),
iValue;
if (aMatch) {
if (aMatch[3] === "px") {
iValue = parseFloat(aMatch[1]);
} else {
iValue = Rem.toPx(parseFloat(aMatch[1]));
}
} else {
... | javascript | function cssSizeToPx(sCssSize) {
if (sCssSize === 0 || sCssSize === "0") {
return 0;
}
var aMatch = sCssSize.match(/^(\d+(\.\d+)?)(px|rem)$/),
iValue;
if (aMatch) {
if (aMatch[3] === "px") {
iValue = parseFloat(aMatch[1]);
} else {
iValue = Rem.toPx(parseFloat(aMatch[1]));
}
} else {
... | [
"function",
"cssSizeToPx",
"(",
"sCssSize",
")",
"{",
"if",
"(",
"sCssSize",
"===",
"0",
"||",
"sCssSize",
"===",
"\"0\"",
")",
"{",
"return",
"0",
";",
"}",
"var",
"aMatch",
"=",
"sCssSize",
".",
"match",
"(",
"/",
"^(\\d+(\\.\\d+)?)(px|rem)$",
"/",
")"... | Converts the given css size to its corresponding 'px' value.
@private
@param {string} sCssSize The css size to parse. For example '5rem'.
@returns {int} The size in 'px'. The result is rounded up with Math.ceil(). Returns NaN if the size can not be parsed. | [
"Converts",
"the",
"given",
"css",
"size",
"to",
"its",
"corresponding",
"px",
"value",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.f/src/sap/f/GridContainerSettings.js#L22-L41 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/model/TreeBindingAdapter.js | function (oNode) {
// do not count the artifical root node
if (!oNode || !oNode.isArtificial) {
iNodeCounter++;
}
if (oNode) {
// Always reset selectAllMode
oNode.nodeState.selectAllMode = false;
if (this._mTreeState.selected[oNode.groupID]) {
// remember changed index, push... | javascript | function (oNode) {
// do not count the artifical root node
if (!oNode || !oNode.isArtificial) {
iNodeCounter++;
}
if (oNode) {
// Always reset selectAllMode
oNode.nodeState.selectAllMode = false;
if (this._mTreeState.selected[oNode.groupID]) {
// remember changed index, push... | [
"function",
"(",
"oNode",
")",
"{",
"// do not count the artifical root node",
"if",
"(",
"!",
"oNode",
"||",
"!",
"oNode",
".",
"isArtificial",
")",
"{",
"iNodeCounter",
"++",
";",
"}",
"if",
"(",
"oNode",
")",
"{",
"// Always reset selectAllMode",
"oNode",
"... | matches all selected nodes and retrieves their absolute row index | [
"matches",
"all",
"selected",
"nodes",
"and",
"retrieves",
"their",
"absolute",
"row",
"index"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/model/TreeBindingAdapter.js#L1547-L1574 | train | |
SAP/openui5 | src/sap.m/src/sap/m/HyphenationSupport.js | isValidTextKey | function isValidTextKey(oControl, sKey) {
var mTexts = oControl.getTextsToBeHyphenated();
if (typeof mTexts !== "object") {
Log.error("[UI5 Hyphenation] The result of getTextsToBeHyphenated method is not a map object.", oControl.getId());
return false;
}
if (Object.keys(mTexts).indexOf(sKey) < 0) ... | javascript | function isValidTextKey(oControl, sKey) {
var mTexts = oControl.getTextsToBeHyphenated();
if (typeof mTexts !== "object") {
Log.error("[UI5 Hyphenation] The result of getTextsToBeHyphenated method is not a map object.", oControl.getId());
return false;
}
if (Object.keys(mTexts).indexOf(sKey) < 0) ... | [
"function",
"isValidTextKey",
"(",
"oControl",
",",
"sKey",
")",
"{",
"var",
"mTexts",
"=",
"oControl",
".",
"getTextsToBeHyphenated",
"(",
")",
";",
"if",
"(",
"typeof",
"mTexts",
"!==",
"\"object\"",
")",
"{",
"Log",
".",
"error",
"(",
"\"[UI5 Hyphenation]... | Checks if the required text key is present in the texts map.
@param {sap.m.IHyphenation} oControl The control to be checked
@param {string} sKey The key to look for
@returns {boolean} True if the key is correct
@private | [
"Checks",
"if",
"the",
"required",
"text",
"key",
"is",
"present",
"in",
"the",
"texts",
"map",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/HyphenationSupport.js#L47-L61 | train |
SAP/openui5 | src/sap.m/src/sap/m/HyphenationSupport.js | diffTexts | function diffTexts(mTextsMain, mTextsToDiff) {
var aDiffs = [];
Object.keys(mTextsMain).forEach(function(sKey) {
if (!(sKey in mTextsToDiff && mTextsMain[sKey] === mTextsToDiff[sKey])) {
aDiffs.push(sKey);
}
});
return aDiffs;
} | javascript | function diffTexts(mTextsMain, mTextsToDiff) {
var aDiffs = [];
Object.keys(mTextsMain).forEach(function(sKey) {
if (!(sKey in mTextsToDiff && mTextsMain[sKey] === mTextsToDiff[sKey])) {
aDiffs.push(sKey);
}
});
return aDiffs;
} | [
"function",
"diffTexts",
"(",
"mTextsMain",
",",
"mTextsToDiff",
")",
"{",
"var",
"aDiffs",
"=",
"[",
"]",
";",
"Object",
".",
"keys",
"(",
"mTextsMain",
")",
".",
"forEach",
"(",
"function",
"(",
"sKey",
")",
"{",
"if",
"(",
"!",
"(",
"sKey",
"in",
... | Checks which keys are not present in mTextsToDiff or their values are different
@param {map} mTextsMain The map of texts to compare
@param {map} mTextsToDiff The map of texts to compare against
@returns {Array} An array containing all keys for which there is difference
@private | [
"Checks",
"which",
"keys",
"are",
"not",
"present",
"in",
"mTextsToDiff",
"or",
"their",
"values",
"are",
"different"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/HyphenationSupport.js#L89-L97 | train |
SAP/openui5 | src/sap.m/src/sap/m/HyphenationSupport.js | shouldUseThirdParty | function shouldUseThirdParty() {
var sHyphenationConfig = Core.getConfiguration().getHyphenation(),
oHyphenationInstance = Hyphenation.getInstance();
if (sHyphenationConfig === "native" || sHyphenationConfig === "disable") {
return false;
}
if (sHyphenationConfig === "thirdparty") {
return tru... | javascript | function shouldUseThirdParty() {
var sHyphenationConfig = Core.getConfiguration().getHyphenation(),
oHyphenationInstance = Hyphenation.getInstance();
if (sHyphenationConfig === "native" || sHyphenationConfig === "disable") {
return false;
}
if (sHyphenationConfig === "thirdparty") {
return tru... | [
"function",
"shouldUseThirdParty",
"(",
")",
"{",
"var",
"sHyphenationConfig",
"=",
"Core",
".",
"getConfiguration",
"(",
")",
".",
"getHyphenation",
"(",
")",
",",
"oHyphenationInstance",
"=",
"Hyphenation",
".",
"getInstance",
"(",
")",
";",
"if",
"(",
"sHyp... | Checks if the third-party hyphenation is required.
@returns {boolean} True if third-party hyphenation is required. False if native hyphenation is available or required
@private | [
"Checks",
"if",
"the",
"third",
"-",
"party",
"hyphenation",
"is",
"required",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/HyphenationSupport.js#L105-L120 | train |
SAP/openui5 | src/sap.m/src/sap/m/HyphenationSupport.js | shouldControlHyphenate | function shouldControlHyphenate(oControl) {
var sHyphenationConfig = Core.getConfiguration().getHyphenation();
if (sHyphenationConfig === 'disable') {
return false;
}
if (oControl.getWrappingType() === WrappingType.Hyphenated && !oControl.getWrapping()) {
Log.warning("[UI5 Hyphenation] The property... | javascript | function shouldControlHyphenate(oControl) {
var sHyphenationConfig = Core.getConfiguration().getHyphenation();
if (sHyphenationConfig === 'disable') {
return false;
}
if (oControl.getWrappingType() === WrappingType.Hyphenated && !oControl.getWrapping()) {
Log.warning("[UI5 Hyphenation] The property... | [
"function",
"shouldControlHyphenate",
"(",
"oControl",
")",
"{",
"var",
"sHyphenationConfig",
"=",
"Core",
".",
"getConfiguration",
"(",
")",
".",
"getHyphenation",
"(",
")",
";",
"if",
"(",
"sHyphenationConfig",
"===",
"'disable'",
")",
"{",
"return",
"false",
... | Checks whether the control's text should be hyphenated.
@param {sap.m.IHyphenation} oControl The control to be checked
@returns {boolean} True if the control should hyphenate
@private | [
"Checks",
"whether",
"the",
"control",
"s",
"text",
"should",
"be",
"hyphenated",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/HyphenationSupport.js#L129-L140 | train |
SAP/openui5 | src/sap.m/src/sap/m/HyphenationSupport.js | hyphenateTexts | function hyphenateTexts(oControl) {
if (!shouldControlHyphenate(oControl) || !shouldUseThirdParty()) {
// no hyphenation needed
oControl._mHyphenatedTexts = {};
oControl._mUnhyphenatedTexts = {};
return;
}
var mTexts = oControl.getTextsToBeHyphenated(),
aChangedTextKeys = diffTexts(mTexts,... | javascript | function hyphenateTexts(oControl) {
if (!shouldControlHyphenate(oControl) || !shouldUseThirdParty()) {
// no hyphenation needed
oControl._mHyphenatedTexts = {};
oControl._mUnhyphenatedTexts = {};
return;
}
var mTexts = oControl.getTextsToBeHyphenated(),
aChangedTextKeys = diffTexts(mTexts,... | [
"function",
"hyphenateTexts",
"(",
"oControl",
")",
"{",
"if",
"(",
"!",
"shouldControlHyphenate",
"(",
"oControl",
")",
"||",
"!",
"shouldUseThirdParty",
"(",
")",
")",
"{",
"// no hyphenation needed",
"oControl",
".",
"_mHyphenatedTexts",
"=",
"{",
"}",
";",
... | Hyphenates all texts needed for the given control.
@param {sap.m.IHyphenation} oControl The control whose texts need hyphenation
@private | [
"Hyphenates",
"all",
"texts",
"needed",
"for",
"the",
"given",
"control",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.m/src/sap/m/HyphenationSupport.js#L148-L192 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/format/NumberFormat.js | parseNumberAndUnit | function parseNumberAndUnit(mUnitPatterns, sValue) {
var oBestMatch = {
numberValue: undefined,
cldrCode: []
};
if (typeof sValue !== "string") {
return oBestMatch;
}
var iBestLength = Number.POSITIVE_INFINITY;
var sUnitCode, sKey;
for (sUnitCode in mUnitPatterns) {
for (sKey in mUnitPatterns[... | javascript | function parseNumberAndUnit(mUnitPatterns, sValue) {
var oBestMatch = {
numberValue: undefined,
cldrCode: []
};
if (typeof sValue !== "string") {
return oBestMatch;
}
var iBestLength = Number.POSITIVE_INFINITY;
var sUnitCode, sKey;
for (sUnitCode in mUnitPatterns) {
for (sKey in mUnitPatterns[... | [
"function",
"parseNumberAndUnit",
"(",
"mUnitPatterns",
",",
"sValue",
")",
"{",
"var",
"oBestMatch",
"=",
"{",
"numberValue",
":",
"undefined",
",",
"cldrCode",
":",
"[",
"]",
"}",
";",
"if",
"(",
"typeof",
"sValue",
"!==",
"\"string\"",
")",
"{",
"return... | Returns the cldr code and the number value by checking each pattern and finding the best match.
1. iterate over each unit pattern, e.g. "{0}m", "{0}km"
1a. convert it to a reg exp pattern, e.g. "^(.+)m$"
1b. match it with the input "12km" and store the value "12k" and the unit value "m"
1c. do this for each pattern an... | [
"Returns",
"the",
"cldr",
"code",
"and",
"the",
"number",
"value",
"by",
"checking",
"each",
"pattern",
"and",
"finding",
"the",
"best",
"match",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/format/NumberFormat.js#L1884-L1955 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/format/NumberFormat.js | parseNumberAndCurrency | function parseNumberAndCurrency(oConfig) {
var sValue = oConfig.value;
// Search for known symbols (longest match)
// no distinction between default and custom currencies
var oMatch = findLongestMatch(sValue, oConfig.currencySymbols);
// Search for currency code
if (!oMatch.code) {
// before falling ba... | javascript | function parseNumberAndCurrency(oConfig) {
var sValue = oConfig.value;
// Search for known symbols (longest match)
// no distinction between default and custom currencies
var oMatch = findLongestMatch(sValue, oConfig.currencySymbols);
// Search for currency code
if (!oMatch.code) {
// before falling ba... | [
"function",
"parseNumberAndCurrency",
"(",
"oConfig",
")",
"{",
"var",
"sValue",
"=",
"oConfig",
".",
"value",
";",
"// Search for known symbols (longest match)",
"// no distinction between default and custom currencies",
"var",
"oMatch",
"=",
"findLongestMatch",
"(",
"sValue... | Parses number and currency
Search for the currency symbol first, looking for the longest match. In case no currency
symbol is found, search for a three letter currency code.
@param {object} oConfig
@param {string} oConfig.value the string value to be parse
@param {object} oConfig.currencySymbols the list of currency ... | [
"Parses",
"number",
"and",
"currency"
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/format/NumberFormat.js#L2001-L2064 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js | _getLibraries | function _getLibraries() {
var libraries = Global.versioninfo ? Global.versioninfo.libraries : undefined;
var formattedLibraries = Object.create(null);
if (libraries !== undefined) {
libraries.forEach(function (element, index, array) {
formattedLibraries[element.name] = element.version;
});
}
... | javascript | function _getLibraries() {
var libraries = Global.versioninfo ? Global.versioninfo.libraries : undefined;
var formattedLibraries = Object.create(null);
if (libraries !== undefined) {
libraries.forEach(function (element, index, array) {
formattedLibraries[element.name] = element.version;
});
}
... | [
"function",
"_getLibraries",
"(",
")",
"{",
"var",
"libraries",
"=",
"Global",
".",
"versioninfo",
"?",
"Global",
".",
"versioninfo",
".",
"libraries",
":",
"undefined",
";",
"var",
"formattedLibraries",
"=",
"Object",
".",
"create",
"(",
"null",
")",
";",
... | Creates an object with the libraries and their version from the version info file.
@returns {Object}
@private | [
"Creates",
"an",
"object",
"with",
"the",
"libraries",
"and",
"their",
"version",
"from",
"the",
"version",
"info",
"file",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js#L59-L70 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js | _getLoadedLibraries | function _getLoadedLibraries() {
var libraries = sap.ui.getCore().getLoadedLibraries();
var formattedLibraries = Object.create(null);
Object.keys(sap.ui.getCore().getLoadedLibraries()).forEach(function (element, index, array) {
formattedLibraries[element] = libraries[element].version;
});
return fo... | javascript | function _getLoadedLibraries() {
var libraries = sap.ui.getCore().getLoadedLibraries();
var formattedLibraries = Object.create(null);
Object.keys(sap.ui.getCore().getLoadedLibraries()).forEach(function (element, index, array) {
formattedLibraries[element] = libraries[element].version;
});
return fo... | [
"function",
"_getLoadedLibraries",
"(",
")",
"{",
"var",
"libraries",
"=",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
".",
"getLoadedLibraries",
"(",
")",
";",
"var",
"formattedLibraries",
"=",
"Object",
".",
"create",
"(",
"null",
")",
";",
"Object",
"... | Creates an object with the loaded libraries and their version.
@returns {Object}
@private | [
"Creates",
"an",
"object",
"with",
"the",
"loaded",
"libraries",
"and",
"their",
"version",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js#L77-L86 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js | _getFrameworkInformation | function _getFrameworkInformation() {
return {
commonInformation: {
frameworkName: _getFrameworkName(),
version: Global.version,
buildTime: Global.buildinfo.buildtime,
lastChange: Global.buildinfo.lastchange,
jquery: jQuery.fn.jquery,
userAgent: navigator.userAgent,
application... | javascript | function _getFrameworkInformation() {
return {
commonInformation: {
frameworkName: _getFrameworkName(),
version: Global.version,
buildTime: Global.buildinfo.buildtime,
lastChange: Global.buildinfo.lastchange,
jquery: jQuery.fn.jquery,
userAgent: navigator.userAgent,
application... | [
"function",
"_getFrameworkInformation",
"(",
")",
"{",
"return",
"{",
"commonInformation",
":",
"{",
"frameworkName",
":",
"_getFrameworkName",
"(",
")",
",",
"version",
":",
"Global",
".",
"version",
",",
"buildTime",
":",
"Global",
".",
"buildinfo",
".",
"bu... | Gets all the relevant information for the framework.
@returns {Object}
@private | [
"Gets",
"all",
"the",
"relevant",
"information",
"for",
"the",
"framework",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js#L93-L132 | train |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js | function (nodeElement, resultArray) {
var node = nodeElement;
var childNode = node.firstElementChild;
var results = resultArray;
var subResult = results;
var control = sap.ui.getCore().byId(node.id);
if (node.getAttribute('data-sap-ui') && control) {
results.push({
id: control.getId(... | javascript | function (nodeElement, resultArray) {
var node = nodeElement;
var childNode = node.firstElementChild;
var results = resultArray;
var subResult = results;
var control = sap.ui.getCore().byId(node.id);
if (node.getAttribute('data-sap-ui') && control) {
results.push({
id: control.getId(... | [
"function",
"(",
"nodeElement",
",",
"resultArray",
")",
"{",
"var",
"node",
"=",
"nodeElement",
";",
"var",
"childNode",
"=",
"node",
".",
"firstElementChild",
";",
"var",
"results",
"=",
"resultArray",
";",
"var",
"subResult",
"=",
"results",
";",
"var",
... | Creates data model of the rendered controls as a tree.
@param {Element} nodeElement - HTML DOM element from which the function will star searching.
@param {Array} resultArray - Array that will contains all the information.
@private | [
"Creates",
"data",
"model",
"of",
"the",
"rendered",
"controls",
"as",
"a",
"tree",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js#L148-L179 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js | function (control, inheritedMetadata) {
var inheritedMetadataProperties = inheritedMetadata.getProperties();
var result = Object.create(null);
result.meta = Object.create(null);
result.meta.controlName = inheritedMetadata.getName();
result.properties = Object.create(null);
Object.keys(inherite... | javascript | function (control, inheritedMetadata) {
var inheritedMetadataProperties = inheritedMetadata.getProperties();
var result = Object.create(null);
result.meta = Object.create(null);
result.meta.controlName = inheritedMetadata.getName();
result.properties = Object.create(null);
Object.keys(inherite... | [
"function",
"(",
"control",
",",
"inheritedMetadata",
")",
"{",
"var",
"inheritedMetadataProperties",
"=",
"inheritedMetadata",
".",
"getProperties",
"(",
")",
";",
"var",
"result",
"=",
"Object",
".",
"create",
"(",
"null",
")",
";",
"result",
".",
"meta",
... | Copies the inherited properties of a UI5 control from the metadata.
@param {Object} control - UI5 Control.
@param {Object} inheritedMetadata - UI5 control metadata.
@returns {Object}
@private | [
"Copies",
"the",
"inherited",
"properties",
"of",
"a",
"UI5",
"control",
"from",
"the",
"metadata",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js#L224-L239 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js | function (control) {
var result = [];
var inheritedMetadata = control.getMetadata().getParent();
while (inheritedMetadata instanceof ElementMetadata) {
result.push(this._copyInheritedProperties(control, inheritedMetadata));
inheritedMetadata = inheritedMetadata.getParent();
}
return resu... | javascript | function (control) {
var result = [];
var inheritedMetadata = control.getMetadata().getParent();
while (inheritedMetadata instanceof ElementMetadata) {
result.push(this._copyInheritedProperties(control, inheritedMetadata));
inheritedMetadata = inheritedMetadata.getParent();
}
return resu... | [
"function",
"(",
"control",
")",
"{",
"var",
"result",
"=",
"[",
"]",
";",
"var",
"inheritedMetadata",
"=",
"control",
".",
"getMetadata",
"(",
")",
".",
"getParent",
"(",
")",
";",
"while",
"(",
"inheritedMetadata",
"instanceof",
"ElementMetadata",
")",
"... | Creates an array with the control properties that are inherited.
@param {Object} control - UI5 control.
@returns {Array}
@private | [
"Creates",
"an",
"array",
"with",
"the",
"control",
"properties",
"that",
"are",
"inherited",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js#L247-L257 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js | function (controlId) {
var control = sap.ui.getCore().byId(controlId);
var properties = Object.create(null);
if (control) {
properties.own = this._getOwnProperties(control);
properties.inherited = this._getInheritedProperties(control);
}
return properties;
} | javascript | function (controlId) {
var control = sap.ui.getCore().byId(controlId);
var properties = Object.create(null);
if (control) {
properties.own = this._getOwnProperties(control);
properties.inherited = this._getInheritedProperties(control);
}
return properties;
} | [
"function",
"(",
"controlId",
")",
"{",
"var",
"control",
"=",
"sap",
".",
"ui",
".",
"getCore",
"(",
")",
".",
"byId",
"(",
"controlId",
")",
";",
"var",
"properties",
"=",
"Object",
".",
"create",
"(",
"null",
")",
";",
"if",
"(",
"control",
")",... | Creates an object with all control properties.
@param {string} controlId
@returns {Object}
@private | [
"Creates",
"an",
"object",
"with",
"all",
"control",
"properties",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js#L265-L275 | train | |
SAP/openui5 | src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js | function (control) {
var properties = control.getMetadata().getAllProperties();
var propertiesBindingData = Object.create(null);
for (var key in properties) {
if (properties.hasOwnProperty(key) && control.getBinding(key)) {
propertiesBindingData[key] = Object.create(null);
propertiesBindin... | javascript | function (control) {
var properties = control.getMetadata().getAllProperties();
var propertiesBindingData = Object.create(null);
for (var key in properties) {
if (properties.hasOwnProperty(key) && control.getBinding(key)) {
propertiesBindingData[key] = Object.create(null);
propertiesBindin... | [
"function",
"(",
"control",
")",
"{",
"var",
"properties",
"=",
"control",
".",
"getMetadata",
"(",
")",
".",
"getAllProperties",
"(",
")",
";",
"var",
"propertiesBindingData",
"=",
"Object",
".",
"create",
"(",
"null",
")",
";",
"for",
"(",
"var",
"key"... | Creates an object with the properties bindings of a UI5 control.
@param {Object} control
@returns {Object}
@private | [
"Creates",
"an",
"object",
"with",
"the",
"properties",
"bindings",
"of",
"a",
"UI5",
"control",
"."
] | 8a832fca01cb1cdf8df589788e0c5723e2a33c70 | https://github.com/SAP/openui5/blob/8a832fca01cb1cdf8df589788e0c5723e2a33c70/src/sap.ui.core/src/sap/ui/core/support/ToolsAPI.js#L317-L333 | 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.