_id
stringlengths
2
6
title
stringlengths
0
58
partition
stringclasses
3 values
text
stringlengths
52
373k
language
stringclasses
1 value
meta_information
dict
q19400
train
function (key) { var pDel, oMsr = startMeasurements("del", key); Log.debug("Cache Manager: del called."); pDel = this._callInstanceMethod("del", arguments).then(function callInstanceHandler() { Log.debug("Cache Manager: del completed successfully."); oMsr.endAsync(); //nothing to return, jus...
javascript
{ "resource": "" }
q19401
train
function () { var pReset, oMsr = startMeasurements("reset"); Log.debug("Cache Manager: Reset called."); pReset = this._callInstanceMethod("reset", arguments).then(function callInstanceHandler() { Log.debug("Cache Manager: Reset completed successfully."); oMsr.endAsync(); //nothing to return,...
javascript
{ "resource": "" }
q19402
train
function (sMethodName, aArgs) { var pCallInstance, sMsrCallInstance = "[sync ] _callInstanceMethod"; Measurement.start(sMsrCallInstance, "CM", S_MSR_CAT_CACHE_MANAGER); if (this._instance) { Log.debug("Cache Manager: calling instance..."); return this._instance[sMethodName].apply(this._instance, ...
javascript
{ "resource": "" }
q19403
train
function () { var aSupportedEnv = []; if (this._bSupportedEnvironment == undefined) { aSupportedEnv.push({ system: Device.system.SYSTEMTYPE.DESKTOP, browserName: Device.browser.BROWSER.CHROME, browserVersion: 49 }); aSupportedEnv.push({ system: Device.system.SYSTEMTYPE.DE...
javascript
{ "resource": "" }
q19404
train
function (sContext) { var oOptions = this._getContextOptions(sContext); if (!oOptions) { return this; } if (!this.isContextSensitive) { Log.error("The bar control you are using does not implement all the members of the IBar interface", this); return this; } //If this class does not gets...
javascript
{ "resource": "" }
q19405
train
function (sContext) { var oOptions = this._getContextOptions(sContext); if (!oOptions) { return this; } if (!this.setHTMLTag) { Log.error("The bar control you are using does not implement all the members of the IBar interface", this); return this; } this.setHTMLTag(oOptions.tag); re...
javascript
{ "resource": "" }
q19406
train
function (sContext) { var oContext; if (this.getContext) { oContext = this.getContext(); } else { oContext = mContexts; } var oOptions = oContext[sContext]; if (!oOptions) { Log.error("The context " + sContext + " is not known", this); return null; } return oOptions; }
javascript
{ "resource": "" }
q19407
train
function(oEvent) { // in our use-case each tab contains a single subSection => only this subSection needs to be processed var oSubSection = oEvent.getParameter("subSection"), sId = oSubSection.getId(), aBlocks; //attach listeners that prettify the tab content upon its rendering if (this._aVis...
javascript
{ "resource": "" }
q19408
train
function (oEvent) { var aItems = oEvent.getSource().getItems(), iLen = aItems.length, oItem; while (iLen--) { oItem = aItems[iLen]; // Access control lazy loading method if available if (oItem._getLinkSender) { var oCustomData = oItem.getCustomData(), sClassName = oCustomD...
javascript
{ "resource": "" }
q19409
train
function () { jQuery0.ajax(this.getConfig().docuPath + "disclaimer.json", {dataType: "json"}).then(function (oData) { var oView = this.getView(); if (oData.showDisclaimer && oData.message) { oView.byId("disclaimerBlock").setVisible(true); oView.byId("disclaimerMessage").setText(oData.message);...
javascript
{ "resource": "" }
q19410
train
function () { var oVersionModel = this.getModel("versionData"), bIsDevVersion = oVersionModel.getProperty('/isDevVersion'), bIsOpenUI5 = oVersionModel.getProperty('/isOpenUI5'); if (bIsOpenUI5) { return 'https://help.sap.com/OpenUI5_PDF/OpenUI5.pdf'; } return bIsDevVersion ? 'https://he...
javascript
{ "resource": "" }
q19411
train
function () { var tempRules = [], rawLSData; try { rawLSData = localStorage.getItem(constants.LOCAL_STORAGE_TEMP_RULES_KEY); if (!rawLSData) { return null; } tempRules = JSON.parse(decode(rawLSData)); tempRules = tempRules.map(function (tempRule) { return RuleSerializer.deser...
javascript
{ "resource": "" }
q19412
train
function (rules) { var stringifyRules = encode(JSON.stringify(rules)); localStorage.setItem(constants.LOCAL_STORAGE_TEMP_RULES_KEY, stringifyRules); }
javascript
{ "resource": "" }
q19413
train
function () { var rawLSData = localStorage.getItem(constants.LOCAL_STORAGE_SELECTED_RULES_KEY); if (!rawLSData) { return null; } return JSON.parse(rawLSData); }
javascript
{ "resource": "" }
q19414
train
function() { localStorage.removeItem(constants.LOCAL_STORAGE_TEMP_RULES_KEY); localStorage.removeItem(constants.LOCAL_STORAGE_SELECTED_RULES_KEY); localStorage.removeItem(constants.LOCAL_STORAGE_SELECTED_CONTEXT_KEY); localStorage.removeItem(constants.LOCAL_STORAGE_SELECTED_CONTEXT_COMPONENT_KEY); localS...
javascript
{ "resource": "" }
q19415
train
function(sCookieName) { var name = sCookieName + "=", decodedCookie = decodeURIComponent(document.cookie), ca = decodedCookie.split(';'), sOutput = ""; for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0...
javascript
{ "resource": "" }
q19416
train
function (sComponentName, sAppVersion, oChangeFileContent) { this._sComponentName = sComponentName || ""; this._sAppVersion = sAppVersion || Utils.DEFAULT_APP_VERSION; this._mVariantManagement = {}; this.setChangeFileContent(oChangeFileContent, {}); this.sVariantTechnicalParameterName = "sap-ui-fl-control-var...
javascript
{ "resource": "" }
q19417
CONDITIONAL
train
function CONDITIONAL(fnCondition, fnThen, fnElse, aParts) { return fnCondition(aParts) ? fnThen(aParts) : fnElse(aParts); }
javascript
{ "resource": "" }
q19418
DOT
train
function DOT(fnLeft, sIdentifier, aParts, oReference) { var oParent = fnLeft(aParts), vChild = oParent[sIdentifier]; if (oReference) { oReference.base = oParent; } return vChild; }
javascript
{ "resource": "" }
q19419
FUNCTION_CALL
train
function FUNCTION_CALL(fnLeft, aArguments, aParts) { var oReference = {}; // evaluate function expression and call it return fnLeft(aParts, oReference).apply(oReference.base, aArguments.map(function (fnArgument) { return fnArgument(aParts); // evaluate argument })); }
javascript
{ "resource": "" }
q19420
INFIX
train
function INFIX(fnLeft, fnRight, fnOperator, bLazy, aParts) { return fnOperator(fnLeft(aParts), bLazy ? fnRight.bind(null, aParts) : fnRight(aParts)); }
javascript
{ "resource": "" }
q19421
MAP
train
function MAP(mMap, aParts) { var sKey, mResult = {}; for (sKey in mMap) { mResult[sKey] = mMap[sKey](aParts); // evaluate value } return mResult; }
javascript
{ "resource": "" }
q19422
PROPERTY_ACCESS
train
function PROPERTY_ACCESS(fnLeft, fnName, aParts, oReference) { var oParent = fnLeft(aParts), sIdentifier = fnName(aParts), // BEWARE: evaluate propertyNameValue AFTER baseValue! vChild = oParent[sIdentifier]; if (oReference) { oReference.base = oParent; } return vChild; }
javascript
{ "resource": "" }
q19423
addInfix
train
function addInfix(sId, iBindingPower, fnOperator, bLazy) { // Note: this function is executed at load time only! mSymbols[sId] = { lbp: iBindingPower, led: function (oToken, oParser, fnLeft) { //lazy evaluation is right associative: performance optimization for guard and //default operator, e.g. true ...
javascript
{ "resource": "" }
q19424
saveBindingAsPart
train
function saveBindingAsPart(oBinding, iStart, bTargetTypeAny) { var bHasNonPrimitiveValue = false, sKey, oPrimitiveValueBinding, i; /* * Sets the target type of the given binding to the default "any", if applicable. * * @param {object} oBinding * A binding */ function setTarge...
javascript
{ "resource": "" }
q19425
consumeToken
train
function consumeToken() { var ch, oBinding, iIndex, aMatches, oToken; oTokenizer.white(); ch = oTokenizer.getCh(); iIndex = oTokenizer.getIndex(); if ((ch === "$" || ch === "%") && sInput[iIndex + 1] === "{") { //binding oBinding = fnResolveBinding(sInput, iIndex + 1); oToken = { id: "BIND...
javascript
{ "resource": "" }
q19426
expression
train
function expression(rbp) { var fnLeft; oToken = advance(); if (!oToken) { error("Expected expression but instead saw end of input", sInput); } fnLeft = mSymbols[oToken.id].nud(oToken, oParser); while (iNextToken < aTokens.length) { oToken = current(); if (rbp >= (mSymbols[oToken.id].lbp ...
javascript
{ "resource": "" }
q19427
train
function(oEvent) { var sFilter = oEvent.oSource.getFilter(), oSearchField = this.getOwnerComponent().byId("controlsMaster").byId("searchField"); // Apply the value and fire a live change event so the list will be filtered oSearchField.setValue(sFilter).fireLiveChange({ newValue: sFilter }); ...
javascript
{ "resource": "" }
q19428
_setItemTypeFormatter
train
function _setItemTypeFormatter(oAction) { var that = this; var oBindingInfo = ManagedObject.bindingParser("{path:''}"); // Async formatter to set ListItem type depending if the list item context is a correct navigation target (decided by the navigation service). oBindingInfo.formatter = function (vValue) {...
javascript
{ "resource": "" }
q19429
_setActionEnabledState
train
function _setActionEnabledState(oAction) { var oBindingInfo; if (typeof oAction.enabled === "string") { oBindingInfo = ManagedObject.bindingParser(oAction.enabled); oBindingInfo.formatter = function (vValue) { if (vValue && (typeof vValue === "string")) { return "Navigation"; } else { ...
javascript
{ "resource": "" }
q19430
train
function(oEvent) { var sEntityType, sEntityId, aSplit, sId = oEvent.getParameter("arguments").id; if (sId) { aSplit = sId.split("#"); if (aSplit.length === 2) { sId = aSplit[0]; sEntityType = aSplit[1]; aSplit = sEntityType.split(":"); if (aSplit.length === 2) { sEn...
javascript
{ "resource": "" }
q19431
getReturnValueContextPath
train
function getReturnValueContextPath(sPath, sResponsePredicate) { var sBoundParameterPath = sPath.slice(0, sPath.lastIndexOf("/")), i = sBoundParameterPath.indexOf("("); return (i < 0 ? sBoundParameterPath : sPath.slice(0, i)) + sResponsePredicate; }
javascript
{ "resource": "" }
q19432
buildPickerByType
train
function buildPickerByType(type){ var oPicker; switch (type) { case DateTimeInputType.DateTime: oPicker = new DateTimePicker(this.getId() + "-Picker"); break; case DateTimeInputType.Time: oPicker = new TimePicker(this.getId() + "-Picker", {localeId: sap.ui.getCore().getConfiguration().getFo...
javascript
{ "resource": "" }
q19433
train
function(oController, viewId, aInvalidContent, fnProcessInvalidFunction) { var _aInvalidControllerFunctions = []; Object.keys(oController).forEach(function(sProtoKey) { var sFnContent = oController[sProtoKey].toString().replace(/(\r\n|\n|\r)/gm, ""); aInvalidContent.forEach(function(sInvalidContent) ...
javascript
{ "resource": "" }
q19434
getStashedControls
train
function getStashedControls(sId) { if (!StashedControlSupport) { StashedControlSupport = sap.ui.require("sap/ui/core/StashedControlSupport"); } if (StashedControlSupport) { return StashedControlSupport.getStashedControls(sId); } return []; }
javascript
{ "resource": "" }
q19435
updateGroup
train
function updateGroup(oContext) { var oNewGroup = oBinding.getGroup(oContext); if (oNewGroup.key !== sGroup) { var oGroupHeader; //If factory is defined use it if (oBindingInfo.groupHeaderFactory) { oGroupHeader = oBindingInfo.groupHeaderFactory(oNewGroup); } that[sGroupFunction](oNewGroup...
javascript
{ "resource": "" }
q19436
updateRecursive
train
function updateRecursive(oControl, oContexts) { update(oControl, oContexts, null, function(oContext, oClone) { updateRecursive(oClone, oBinding.getNodeContexts(oContext)); }); }
javascript
{ "resource": "" }
q19437
train
function(oTable) { return (oTable.getSelectionMode() !== SelectionMode.None && oTable.getSelectionBehavior() !== SelectionBehavior.RowOnly) || TableGrouping.isGroupMode(oTable); }
javascript
{ "resource": "" }
q19438
train
function(oTable) { var sSelectionMode = oTable ? oTable.getSelectionMode() : SelectionMode.None; return sSelectionMode === SelectionMode.MultiToggle && oTable.getEnableSelectAll(); }
javascript
{ "resource": "" }
q19439
train
function(oTable) { if (!oTable) { return false; } var oRowSettingsTemplate = oTable.getRowSettingsTemplate(); if (!oRowSettingsTemplate) { return false; } var sHighlight = oRowSettingsTemplate.getHighlight(); return oRowSettingsTemplate.isBound("highlight") || (sHighlight != null...
javascript
{ "resource": "" }
q19440
train
function(oTable) { var oRowActionTemplate = oTable ? oTable.getRowActionTemplate() : null; return oRowActionTemplate != null && (oRowActionTemplate.isBound("visible") || oRowActionTemplate.getVisible()) && TableUtils.getRowActionCount(oTable) > 0; }
javascript
{ "resource": "" }
q19441
train
function(oTable) { if (!oTable) { return false; } var iSelectableRowCount = oTable._getSelectableRowCount(); return iSelectableRowCount > 0 && iSelectableRowCount === oTable._getSelectedIndicesCount(); }
javascript
{ "resource": "" }
q19442
train
function(oTable) { var oBinding = oTable.getBinding("rows"); var iTotalRowCount = oTable._getTotalRowCount(); var bHasData = iTotalRowCount > 0; if (oBinding && oBinding.providesGrandTotal) { // Analytical Binding var bHasTotal = oBinding.providesGrandTotal() && oBinding.hasTotaledMeasures(); bHasD...
javascript
{ "resource": "" }
q19443
train
function(oTable) { if (!oTable || !oTable.getDomRef()) { return false; } return oTable.getDomRef().querySelector("#" + oTable.getId() + "-sapUiTableGridCnt > .sapUiLocalBusyIndicator") != null; }
javascript
{ "resource": "" }
q19444
train
function(oTable) { if (!oTable) { return false; } if (TableUtils.canUsePendingRequestsCounter(oTable)) { return oTable._iPendingRequests > 0; } else { return oTable._bPendingRequest; } }
javascript
{ "resource": "" }
q19445
train
function(oTable) { var oBinding = oTable ? oTable.getBinding("rows") : null; if (TableUtils.isA(oBinding, "sap.ui.model.analytics.AnalyticalBinding")) { return oBinding.bUseBatchRequests; } else if (TableUtils.isA(oBinding, "sap.ui.model.TreeBinding")) { return false; } return true; }
javascript
{ "resource": "" }
q19446
train
function(oTable, vRowIndicator, bSelect, fnDoSelect) { if (!oTable || !oTable.getBinding("rows") || oTable.getSelectionMode() === SelectionMode.None || vRowIndicator == null) { return false; } function setSelectionState(iAbsoluteRowIndex) { if (!oTable._isRowSelectable(iAbsoluteRowIndex))...
javascript
{ "resource": "" }
q19447
train
function(oTable) { var oNoData = oTable.getNoData(); if (oNoData instanceof Control) { return null; } else if (typeof oNoData === "string" || oTable.getNoData() instanceof String) { return oNoData; } else { return TableUtils.getResourceText("TBL_NO_DATA"); } }
javascript
{ "resource": "" }
q19448
train
function(oTable) { if (oTable._iHeaderRowCount === undefined) { if (!oTable.getColumnHeaderVisible()) { oTable._iHeaderRowCount = 0; } else { var iHeaderRows = 1; var aColumns = oTable.getColumns(); for (var i = 0; i < aColumns.length; i++) { if (aColumns[i].shouldRender()) { ...
javascript
{ "resource": "" }
q19449
train
function(oTable, iIndex, oEvent) { var oIN = oTable._getItemNavigation(); if (oIN) { oIN.focusItem(iIndex, oEvent); } }
javascript
{ "resource": "" }
q19450
train
function(oTable, oElement, bIncludePseudoCells) { bIncludePseudoCells = bIncludePseudoCells === true; if (!oTable || !oElement) { return null; } var $Element = jQuery(oElement); var oTableElement = oTable.getDomRef(); var sSelector = ".sapUiTableCell"; if (!bIncludePseudoCells) { sSelect...
javascript
{ "resource": "" }
q19451
train
function(oTable, oElement, bIncludePseudoCells) { bIncludePseudoCells = bIncludePseudoCells === true; var $Element = jQuery(oElement); var $Cell = TableUtils.getCell(oTable, oElement, bIncludePseudoCells); if (!$Cell || $Cell[0] === $Element[0]) { return null; // The element is not inside a table cell...
javascript
{ "resource": "" }
q19452
train
function(oTable, sIdSuffix, fnHandler, bRegisterParent) { var oDomRef; if (typeof sIdSuffix == "string") { oDomRef = oTable.getDomRef(sIdSuffix); } else { Log.error("sIdSuffix must be a string", oTable); return undefined; } if (typeof fnHandler !== "function") { Log.error("fnHandler must...
javascript
{ "resource": "" }
q19453
train
function(oTable, vIdSuffix) { var aIdSuffix; if (!oTable._mResizeHandlerIds) { // no resize handler registered so far return; } if (typeof vIdSuffix == "string") { aIdSuffix = [vIdSuffix]; } else if (vIdSuffix === undefined) { aIdSuffix = []; // de-register all resize handlers if no ...
javascript
{ "resource": "" }
q19454
train
function(vObject, vCall, oThis) { var oObject = typeof vObject === "function" ? vObject() : vObject; if (!oObject || !vCall) { return undefined; } oThis = oThis || oObject; if (typeof vCall === "function") { vCall.call(oThis, oObject); return undefined; } else { var aParameters; ...
javascript
{ "resource": "" }
q19455
train
function(fn, mOptions) { // Functionality taken from lodash open source library and adapted as needed mOptions = Object.assign({ wait: 0, leading: true }, mOptions); mOptions.maxWait = mOptions.wait; mOptions.trailing = true; mOptions.requestAnimationFrame = false; return TableUtils.debou...
javascript
{ "resource": "" }
q19456
invoke
train
function invoke(vContext, vArguments, bAsync, bFinal) { iLastInvocationTime = bFinal === true ? null : Date.now(); if (vArguments == null) { return; } if (bAsync === true) { var oPromise = Promise.resolve().then(function() { if (!oPromise.canceled) { fn.apply(vContext, vArgument...
javascript
{ "resource": "" }
q19457
invokeDebounced
train
function invokeDebounced(vContext, vArguments) { cancelTimer(); /** * Executes a trailing invocation if it is enabled in the options. * * @param {boolean} [bFinal=true] Whether this is the final invocation. */ function _invoke(bFinal) { bFinal = bFinal !== false; if (bFinal) {...
javascript
{ "resource": "" }
q19458
_invoke
train
function _invoke(bFinal) { bFinal = bFinal !== false; if (bFinal) { cancel(); } if (mOptions.trailing) { invoke(vContext, vArguments, null, bFinal); } }
javascript
{ "resource": "" }
q19459
train
function(oCell) { if (!oCell) { return null; } var $Cell = jQuery(oCell); var oCellInfo = TableUtils.getCellInfo($Cell); if (oCellInfo.isOfType(CELLTYPE.ANY | CELLTYPE.PSEUDO)) { var $InteractiveElements = $Cell.find(INTERACTIVE_ELEMENT_SELECTORS); if ($InteractiveElements.length > 0) { ...
javascript
{ "resource": "" }
q19460
train
function(sCSSSize, bWithUnit) { var iPixelValue; if (typeof sCSSSize !== "string") { return null; } if (sCSSSize.endsWith("px")) { iPixelValue = parseInt(sCSSSize); } else if (sCSSSize.endsWith("em") || sCSSSize.endsWith("rem")) { iPixelValue = Math.ceil(parseFloat(sCSSSize) * TableUtils.ge...
javascript
{ "resource": "" }
q19461
isValidRoundtrip
train
function isValidRoundtrip(oRequestTiming) { var bComplete, bEmpty, bCached; // if the request has been completed it has complete timing figures) bComplete = oRequestTiming.startTime > 0 && oRequestTiming.startTime <= oRequestTiming.requestStart && oRequestTiming.requestStart <= oRequestTiming.responseEnd; ...
javascript
{ "resource": "" }
q19462
createOwnerComponentInfo
train
function createOwnerComponentInfo(oSrcElement) { var sId, sVersion; if (oSrcElement) { var Component, oComponent; Component = sap.ui.require("sap/ui/core/Component"); while (Component && oSrcElement && oSrcElement.getParent) { oComponent = Component.getOwnerComponentFor(oSrcElement); if (oComponent...
javascript
{ "resource": "" }
q19463
handleResponse
train
function handleResponse() { if (this.readyState === 4 && this.pendingInteraction && !this.pendingInteraction.completed) { // enrich interaction with information var sContentLength = this.getResponseHeader("content-length"), bCompressed = this.getResponseHeader("content-encoding") === "gzip", sFesrec = t...
javascript
{ "resource": "" }
q19464
train
function(fnFilter) { var aFilteredInteractions = []; if (fnFilter) { for (var i = 0, l = aInteractions.length; i < l; i++) { if (fnFilter(aInteractions[i])) { aFilteredInteractions.push(aInteractions[i]); } } } return aFilteredInteractions; }
javascript
{ "resource": "" }
q19465
train
function(sType, oSrcElement) { var iTime = now(); if (oPendingInteraction) { finalizeInteraction(iTime); } // clear request timings for new interaction if (window.performance.clearResourceTimings) { window.performance.clearResourceTimings(); } var oComponentInfo = createOwnerComponentInf...
javascript
{ "resource": "" }
q19466
train
function(bForce) { if (oPendingInteraction) { // set provisionary processing time from start to end and calculate later if (!bForce) { oPendingInteraction.processing = now() - oPendingInteraction.start; } else { finalizeInteraction(now()); } } }
javascript
{ "resource": "" }
q19467
train
function(oEvent) { if (bInteractionActive) { // notify for a newly started interaction, but not more often than every 250ms. if (!iScrollEventDelayId) { Interaction.notifyEventStart(oEvent); } else { clearTimeout(iScrollEventDelayId); } iScrollEventDelayId = setTimeout(function(){ ...
javascript
{ "resource": "" }
q19468
train
function(data, select, currentPath) { var result = {}; // traversed path to get to data: currentPath = currentPath || ''; if (typeof data !== 'object') { return data; } if (typeof data.slice === 'function') { return data.map(function(el, index) { return fnMultiS...
javascript
{ "resource": "" }
q19469
train
function(sRole, aAssociation, aAssociationSet, bFrom) { var sEntitySet = jQuery(aAssociationSet).find("End[Role='" + sRole + "']").attr("EntitySet"); var sMultiplicity = jQuery(aAssociation).find("End[Role='" + sRole + "']").attr("Multiplicity"); var aPropRef = []; var aConstraint = jQuery(aAssocia...
javascript
{ "resource": "" }
q19470
train
function(sEntitySetName, sKeys) { sKeys = decodeURIComponent(sKeys); var oFoundEntry; var oEntitySet = that._mEntitySets[sEntitySetName]; var aKeys = oEntitySet.keys; // split keys var aRequestedKeys = sKeys.split(','); // check number of keys to be equal to the entity keys and valid...
javascript
{ "resource": "" }
q19471
train
function(aUrlParams) { var aUrlParamsNormalized = []; var fnStartsWith = function(sValue) { var apostLocation = sValue.indexOf("'"); var doubleQuotesLocation = sValue.indexOf("\""); if (apostLocation === -1 && doubleQuotesLocation === -1) { return null; } else { if (apo...
javascript
{ "resource": "" }
q19472
_showDayPicker
train
function _showDayPicker(){ if (this._iMode == 3) { _hideYearPicker.call(this, true); }else if (this._iMode == 2) { _hideMonthPicker.call(this, true); } var oDate = this._getFocusedDate(); var iItems = this._getItems(); var oDatesRow = this.getAggregation("datesRow"); var oDateRange = oDatesRow.get...
javascript
{ "resource": "" }
q19473
_hideDayPicker
train
function _hideDayPicker(bSkipFocus){ this._iMode = 0; var oDatesRow = this.getAggregation("datesRow"); oDatesRow.$().css("display", "none"); this._hideOverlay(); if (!bSkipFocus) { _renderTimesRow.call(this); // to focus date // restore tabindex because if date not changed in _renderTimesRow only t...
javascript
{ "resource": "" }
q19474
_showMonthPicker
train
function _showMonthPicker(){ if (this._iMode == 1) { _hideDayPicker.call(this, true); }else if (this._iMode == 3) { _hideYearPicker.call(this, true); } var oDate = this._getFocusedDate(); var oMonthPicker = this.getAggregation("monthPicker"); if (oMonthPicker.getDomRef()) { // already rendered ...
javascript
{ "resource": "" }
q19475
_hideMonthPicker
train
function _hideMonthPicker(bSkipFocus){ this._iMode = 0; var oMonthPicker = this.getAggregation("monthPicker"); oMonthPicker.$().css("display", "none"); this._hideOverlay(); if (!bSkipFocus) { _renderTimesRow.call(this); // to focus date // restore tabindex because if date not changed in _renderTime...
javascript
{ "resource": "" }
q19476
_hideYearPicker
train
function _hideYearPicker(bSkipFocus){ this._iMode = 0; var oYearPicker = this.getAggregation("yearPicker"); oYearPicker.$().css("display", "none"); this._hideOverlay(); if (!bSkipFocus) { _renderTimesRow.call(this); // to focus date // restore tabindex because if date not changed in _renderTimesRow...
javascript
{ "resource": "" }
q19477
_handleDateFocus
train
function _handleDateFocus(oEvent){ var oFocusedDate = new UniversalDate(this._getFocusedDate().getTime()); var oDate = CalendarUtils._createUniversalUTCDate(oEvent.getParameter("date"), undefined, true); var bNotVisible = oEvent.getParameter("otherMonth"); if (bNotVisible && oDate.getUTCMonth() == oFocuse...
javascript
{ "resource": "" }
q19478
_handleSelectMonth
train
function _handleSelectMonth(oEvent){ var oFocusedDate = new UniversalDate(this._getFocusedDate().getTime()); var oMonthPicker = this.getAggregation("monthPicker"); var iMonth = oMonthPicker.getMonth(); oFocusedDate.setUTCMonth(iMonth); if (iMonth != oFocusedDate.getUTCMonth() ) { // day did not exist in...
javascript
{ "resource": "" }
q19479
_handleSelectYear
train
function _handleSelectYear(oEvent){ var oFocusedDate = new UniversalDate(this._getFocusedDate().getTime()); var oYearPicker = this.getAggregation("yearPicker"); var oDate = CalendarUtils._createUniversalUTCDate(oYearPicker.getDate()); var iMonth = oFocusedDate.getUTCMonth(); oDate.setUTCMonth(oFocusedDate.g...
javascript
{ "resource": "" }
q19480
_setDateInDatesRow
train
function _setDateInDatesRow(oDate) { var oDatesRow = this.getAggregation("datesRow"); var oHeader = this.getAggregation("header"); if (!this.getPickerPopup()) { // set number of days - but max number of days of this month var oLastDayOfMonth = new UniversalDate(oDate.getTime()); oLastDayOfMonth.setUTCD...
javascript
{ "resource": "" }
q19481
train
function(oField, oDate, bUTC, oFormat) { var iDay = bUTC ? oDate.getUTCDay() : oDate.getDay(); if (oField.digits < 4) { return oFormat.aDaysAbbrev[iDay]; } else if (oField.digits == 4) { return oFormat.aDaysWide[iDay]; } else if (oField.digits == 5) { return oFormat.aDaysNarrow[iDay]; ...
javascript
{ "resource": "" }
q19482
mergeWithoutOverwrite
train
function mergeWithoutOverwrite(object1, object2) { if (object1 === object2) { return object1; } var oMergedObject = {}; // Clone object1 Object.keys(object1).forEach(function(sKey) { oMergedObject[sKey] = object1[sKey]; }); // merge Object.keys(object2).forEach(function(sKey) { if (!oMergedO...
javascript
{ "resource": "" }
q19483
train
function(oControl) { var oAppComponent = Utils.getAppComponentForControl(oControl); var oFlexController = FlexControllerFactory.createForControl(oAppComponent); var oRootControl = oAppComponent.getRootControl(); var oView = Utils.getViewForControl(oControl); var oVariantModel = oAppComponent.getModel("$F...
javascript
{ "resource": "" }
q19484
train
function(oControl, mParams) { mParams = mParams || this._determineParameters(oControl); var fnCheckForControl = function (oControl) { if (!mParams.variantManagement[oControl.getId()] && oControl.getParent() && oControl.getId() !== mParams.rootControl.getId()) { return fnCheckForControl(oControl.getParent...
javascript
{ "resource": "" }
q19485
train
function(aControls, aChangeTypes) { if (!aControls || aControls.length === 0) { return this._reject("At least one control ID has to be provided as a parameter"); } var oAppComponent = aControls[0].appComponent || Utils.getAppComponentForControl(aControls[0]); if (!oAppComponent) { return this._rej...
javascript
{ "resource": "" }
q19486
train
function(oControl) { try { return !!this._getVariantManagement(oControl); } catch (oError) { Utils.log.error(oError.message); return false; } }
javascript
{ "resource": "" }
q19487
validateRegex
train
function validateRegex(sRegex) { if (/.+/i.test(sRegex)) { return true; } Log.error("The regex value '" + sRegex + "' is not valid"); return false; }
javascript
{ "resource": "" }
q19488
train
function(oAtt, aResult){ if (!oAtt.getSelected()) { return; } aResult.push(oAtt); var aValues = oAtt.getAttributesInternal(); for (var idx = 0; idx < aValues.length; idx++) { _computeSelectedAttributes(aValues[idx], aResult); } }
javascript
{ "resource": "" }
q19489
train
function(oList, bArrow){ function getNextOnSameLevel(oLst){ var oParent = oLst.getParent(); var aParentSubLists = oParent.getSubLists(); var idx = oParent.indexOfSubList(oLst) + 1; if (idx < aParentSubLists.length) { return aParentSubLists[idx]; } return null; } function getFirstChild(oLst)...
javascript
{ "resource": "" }
q19490
train
function(oList, oAttr){ if (oList._getAtt().getListOrder() != ExactOrder.Fixed /*Select*/) { return -1; } var aAttributes = oList._getAtt().getAttributes(); var idx = 0; for (var i = 0; i < aAttributes.length; i++) { if (aAttributes[i] === oAttr) { break; } if (aAttributes[i].getChangeListene...
javascript
{ "resource": "" }
q19491
train
function(jRef, bWidth, iValue, fDoBefore, fDoAfter){ if (fDoBefore) { var iVal = fDoBefore(jRef); if (iVal != undefined) { iValue = iVal; } } var _fDoAfter = fDoAfter ? function(){fDoAfter(jRef);} : function(){}; if (jQuery.fx.off) { if (bWidth) { jRef.width(iValue); } else { jRef.hei...
javascript
{ "resource": "" }
q19492
train
function(oEvent){ var iCurrentX = oEvent.pageX; var iDiff = this._bRTL ? (this._iStartDragX - iCurrentX) : (iCurrentX - this._iStartDragX); setWidth(this, this._iStartWidth + iDiff); }
javascript
{ "resource": "" }
q19493
train
function(oEvent){ jQuery(document.body).unbind("selectstart." + this.getId()).unbind("mouseup." + this.getId()).unbind("mousemove." + this.getId()); this.$("ghost").remove(); this.$("rsz").removeClass("sapUiUx3ExactLstRSzDrag"); this._iStartWidth = undefined; this._iStartDragX = undefined; this.focus(); }
javascript
{ "resource": "" }
q19494
train
function(oList, iWidth){ iWidth = ExactAttribute._checkWidth(iWidth); var sPos = oList._bRTL ? "right" : "left"; oList._iCurrentWidth = iWidth; oList._getAtt()._setWidth(oList._iCurrentWidth); oList.$("lst").css("width", iWidth + "px"); oList.$("rsz").css(sPos, (iWidth - 4) + "px"); if (oList._isTop()) { ...
javascript
{ "resource": "" }
q19495
train
function(oList){ var oAtt = oList._getAtt(); if (oAtt && !oList._isTop()) { oList.$("head-txt").html(encodeXML(oAtt.getText()) + "<span class=\"sapUiUx3ExactLstHeadInfo\">&nbsp;(" + oList._lb.getSelectedIndices().length + "/" + oList._lb.getItems().length + ")</span>"); } }
javascript
{ "resource": "" }
q19496
train
function(oList, iLevel){ oList._iLevel = iLevel; var aLists = oList.getSubLists(); for (var i = 0; i < aLists.length; i++) { setLevel(aLists[i], iLevel + 1); } }
javascript
{ "resource": "" }
q19497
train
function(oList){ if (oList._lb) { var jListRef = jQuery(oList._lb.getDomRef()); oList.$("lst").removeClass("sapUiUx3ExactLstScroll"); if (jListRef.length > 0 && jListRef.outerHeight() < jListRef[0].scrollHeight) { oList.$("lst").addClass("sapUiUx3ExactLstScroll"); return true; } } return false...
javascript
{ "resource": "" }
q19498
train
function(oList) { if (oList._bCollapsed) { var iWidth = oList.$("cntnt").height() - 50/*Space for Header Action Buttons - Maybe provide theme parameter in future*/; var $txt = oList.$("head-txt"); $txt.css("width", iWidth + "px"); } var aSubLists = oList.getSubLists(); for (var i = 0; i < aSubLists.len...
javascript
{ "resource": "" }
q19499
train
function(oList){ var jListContRef = oList.$("lst"); if (jListContRef.hasClass("sapUiUx3ExactLstExpanded")) { //collapse oList._oPopup.close(); } else { //expand oList._oPopup.open(); } }
javascript
{ "resource": "" }