_id
stringlengths
2
6
title
stringlengths
0
58
partition
stringclasses
3 values
text
stringlengths
52
373k
language
stringclasses
1 value
meta_information
dict
q19500
train
function(oList, bSkipNotify, fCallback){ var fFinalize = function(jRef) { if (!bSkipNotify) { var oAttr = oList._getAtt(); var iSelectedIndex = oAttr.getParent().indexOfAttribute(oAttr); clearAttribute(oList.getParent(), oAttr, iSelectedIndex, true); setHeaderText(oList.getParent()); getTopList...
javascript
{ "resource": "" }
q19501
train
function(oList, oAttribute) { if (oAttribute.getSelected()) { var aAttributes = oAttribute.getAttributesInternal(true); if (aAttributes.length > 0) { var oSubList; if (oAttribute.getChangeListener()) { oSubList = sap.ui.getCore().byId(oAttribute.getChangeListener().id); } else { oSubList =...
javascript
{ "resource": "" }
q19502
train
function(oList, oAttribute, iSelectedIndex, bSkipNotify){ oList._lb.removeSelectedIndex(iSelectedIndex); oAttribute._clearSelection(); if (!bSkipNotify) { var aSubLists = oList.getSubLists(); for (var i = 0; i < aSubLists.length; i++) { if (aSubLists[i].getData() === oAttribute.getId()) { close(aSu...
javascript
{ "resource": "" }
q19503
train
function(oList) { var oAttr = oList._getAtt(); if (oAttr && oAttr.getChangeListener() && oAttr.getChangeListener().id === oList.getId()) { oAttr.setChangeListener(null); } }
javascript
{ "resource": "" }
q19504
train
function(oList) { if (oList._isTop()) { return oList; } if (!oList._oTopList) { oList._oTopList = getTopList(oList.getParent()); } return oList._oTopList; }
javascript
{ "resource": "" }
q19505
parseWithStatement
train
function parseWithStatement() { var object, body; if (strict) { // TODO(ikarienator): Should we update the test cases instead? skipComment(); throwErrorTolerant({}, Messages.StrictModeWith); } expectKeyword('with'); expect('('); obj...
javascript
{ "resource": "" }
q19506
train
function(numSt, numCov, numBranch, numCovBr, moduleName) { var totalPercent = percentage(numCov, numSt); var statusClass = totalPercent < successRate ? "bl-error" : "bl-success"; var rowTitle = ( moduleName ? "Total for module: " + moduleName : "Global total" ); var totalsOutput = grand...
javascript
{ "resource": "" }
q19507
train
function(sChangeType,mParameters,mTexts) { //parameter correspond to inline change format //exception: appdescr_app_setTitle, and similar Utils.checkTexts(mTexts); this._mParameters = {}; this._mParameters.changeType = sChangeType; this._mParameters.content = mParameters; this._mParameters.texts = mText...
javascript
{ "resource": "" }
q19508
train
function () { this._initAndBindSelectedContentModel(); var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.getRoute("ContentDetails").attachMatched(this._onRouteMatched, this); oRouter.getRoute("ContentDetailsFlip").attachMatched(this._onRouteMatched, this); }
javascript
{ "resource": "" }
q19509
train
function (oModelData, oPage, oMetadata) { oModelData.metadata = oMetadata; this.oSelectedContentModel.setData(oModelData); var oCore = sap.ui.getCore(); var sIconTabBarId = this.getView().createId("contentDetailsIconTabBar"); var oIconTabBar = oCore.getElementById(sIconTabBarId); if (oIconTabBar){ ...
javascript
{ "resource": "" }
q19510
train
function () { var oSelectedContentModel = this.getView().getModel("selectedContent"); var oContentData = oSelectedContentModel.getData(); var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.navTo("ContentDetailsEdit", { "layer": oContentData.layer, "namespace": encodeURIComponent(oCon...
javascript
{ "resource": "" }
q19511
train
function () { var that = this; var oDialog = new Dialog({ title: "{i18n>confirmDeletionTitle}", type: "Message", content: new Text({text: "{i18n>questionFileDeletion}"}), beginButton: new Button({ text: "{i18n>confirm}", type: ButtonType.Reject, press: function () { oDialog.c...
javascript
{ "resource": "" }
q19512
train
function (sLayer, sNamespace, sFileName, sFileType, sTransportId, sSelectedLayer) { return LRepConnector.deleteFile(sLayer, sNamespace, sFileName, sFileType, sTransportId, sSelectedLayer).then(function () { var oRouter = sap.ui.core.UIComponent.getRouterFor(this); oRouter.navTo("LayerContentMaster", { "...
javascript
{ "resource": "" }
q19513
filterStaticAreaContent
train
function filterStaticAreaContent($Refs, aScopes) { var oStaticArea = window.document.getElementById("sap-ui-static"); if (!oStaticArea) { return $Refs; } var aScopesInStaticArea = []; for (var i = 0; i < aScopes.length; i++) { if (jQuery.contains(oStaticArea, aScopes[i])) { aScopesInStaticA...
javascript
{ "resource": "" }
q19514
train
function (oModules, oResult) { var modules = oModules.modules, vDebugInfo = window["sap-ui-debug"]; // create tree with all modules and empty selection jQuery.each(modules, function (sName) { this.set(oResult, sName, false, true); }.bind(this)); // apply current debug info as tree selection ...
javascript
{ "resource": "" }
q19515
train
function (oModules) { var oHierarchy = {}, oTree = { text: "All" }, iSelectionDepth; this.modulesToHierarchy(oModules, oHierarchy); iSelectionDepth = this.setTreeNode(oHierarchy, oTree, 0, window["sap-ui-debug"] === true); if (!iSelectionDepth) { iSelectionDepth = 0; } return {...
javascript
{ "resource": "" }
q19516
train
function (oHierarchy, oTree, iDepth, bSelected) { var iSelectionDepth, iInnerSelectionDepth; bSelected = oHierarchy === true || oHierarchy[""] || bSelected; oTree.nodes = []; oTree.selected = bSelected; if (bSelected) { iSelectionDepth = iDepth; } for (var sProperty in oHierarchy) { ...
javascript
{ "resource": "" }
q19517
train
function (oTree) { var oResult = {}; oTree.selected = this.isNodeSelected(oTree); this.setHierarchyNode(oResult, oTree); return oResult; }
javascript
{ "resource": "" }
q19518
train
function (oNode) { var iSelectedNodesCount = 0, oChildNode; for (var i = 0; i < oNode.nodes.length; i++) { oChildNode = oNode.nodes[i]; if (oChildNode.nodes.length) { oChildNode.selected = this.isNodeSelected(oChildNode); } if (oChildNode.selected) { iSelectedNodesCount++; } ...
javascript
{ "resource": "" }
q19519
train
function (oHierarchy, oTree) { if (oTree.selected) { oHierarchy[""] = true; } for (var i = 0; i < oTree.nodes.length; i++) { oHierarchy[oTree.nodes[i].text] = {}; if (oTree.nodes[i].nodes.length) { this.setHierarchyNode(oHierarchy[oTree.nodes[i].text], oTree.nodes[i]); } else { oHie...
javascript
{ "resource": "" }
q19520
train
function (oTree, sSeparator) { var oObject = this.toHierarchy(oTree), aFilters = []; function collect(sName, oObject) { var aChildren, bChildren; if (typeof oObject === 'object') { if (oObject['']) { aFilters.push(sName + '/'); return; } aChildren = Object.keys(oObject); ...
javascript
{ "resource": "" }
q19521
train
function (oTree) { var sDebugString = this.toDebugInfo(oTree); if (sDebugString === true) { return 1; } else if (sDebugString) { return sDebugString.split(",").length; } return 0; }
javascript
{ "resource": "" }
q19522
train
function (oTree, bSelected) { oTree.selected = bSelected; for (var i = 0; i < oTree.nodes.length; i++) { this.recursiveSelect(oTree.nodes[i], bSelected); } }
javascript
{ "resource": "" }
q19523
train
function(oThis, sChangeType) { var oLayout = oThis.getParent(); if (oLayout) { oLayout.contentChanged(oThis, sChangeType); } }
javascript
{ "resource": "" }
q19524
train
function(oControl, sPropertyName) { var oPropertyInfo = oControl.getMetadata().getProperty(sPropertyName); if (oPropertyInfo && oPropertyInfo.type === 'sap.ui.core.CSSSize') { return oPropertyInfo; } return null; }
javascript
{ "resource": "" }
q19525
train
function(oEvent){ var sProp = oEvent.getParameter("name"); var parent = this.getParent(); if ((sProp === "width" || sProp === "height") && parent && parent.getDomRef()) { notifyLayoutOnChange(this, "CTRL_POS"); } }
javascript
{ "resource": "" }
q19526
train
function () { EventProvider.prototype.destroy.apply(this); this._aPattern = null; this._aRoutes = null; this._oParent = null; this._oConfig = null; this.bIsDestroyed = true; return this; }
javascript
{ "resource": "" }
q19527
getInfo
train
function getInfo() { var collection = mRegistry[collectionName]; var info = collection && collection[iconName]; // convert raw data lazily to the icon info if (typeof info === 'number') { mRegistry[collectionName][iconName] = undefined; // avoid duplicate icon warning info = IconPool.addIcon(...
javascript
{ "resource": "" }
q19528
loadFont
train
function loadFont(oFontMetadata) { for (var sKey in oFontMetadata) { oFontMetadata[sKey] = parseInt(oFontMetadata[sKey], 16); } mRegistry[collectionName] = oFontMetadata; IconPool.insertFontFaceStyle(oConfig.fontFamily, oConfig.fontURI, collectionName); mFontRegistry[collectionName].metadataLoa...
javascript
{ "resource": "" }
q19529
train
function (aNavigableItems) { // Initialize the ItemNavigation if required if (!this.oItemNavigation) { this.oItemNavigation = new ItemNavigation(); this.addDelegate(this.oItemNavigation); } this.oItemNavigation.setRootDomRef(ToolbarRenderer.getPopupArea(this.oToolbar)); this.oItemNavigati...
javascript
{ "resource": "" }
q19530
train
function (oModel) { var bHasPendingRequest = jQueryDOM.isEmptyObject(oModel.getData()); //ensure a 1 way binding otherwise it cause any block property change to update the entire subSections oModel.setDefaultBindingMode(BindingMode.OneWay); var fnHeaderFactory = jQueryDOM.proxy(function () { if (bHa...
javascript
{ "resource": "" }
q19531
train
function (sStaticHandlerName) { var fnNameSpace = window, aNameSpaceParts = sStaticHandlerName.split('.'); try { jQueryDOM.each(aNameSpaceParts, function (iIndex, sNameSpacePart) { fnNameSpace = fnNameSpace[sNameSpacePart]; }); } catch (sError) { Log.error("ObjectPageLayoutFactory :: undefin...
javascript
{ "resource": "" }
q19532
addSelects
train
function addSelects(vSelects, sExpandPath) { if (!Array.isArray(vSelects)) { vSelects = vSelects.split(","); } vSelects.forEach(function (sSelect) { var iIndex = sSelect.indexOf("/"); if (iIndex >= 0 && sSelect.indexOf(".") < 0) { // only strip if there is no type cast and no bound action (av...
javascript
{ "resource": "" }
q19533
parseAndCheck
train
function parseAndCheck(oDateFormat, sValue) { var oDate = oDateFormat.parse(sValue); if (!oDate) { throw new Error("Not a valid " + oPropertyMetadata.$Type + " value: " + sValue); } return oDate; }
javascript
{ "resource": "" }
q19534
removeFromAttributeList
train
function removeFromAttributeList(sAttribute, sValue) { var sAttributes = this.attr(sAttribute) || "", aAttributes = sAttributes.split(" "), iIndex = aAttributes.indexOf(sValue); if (iIndex == -1) { return this; } aAttributes.splice(iIndex, 1); if (aAttributes.length) { this.attr(sAttribute, aAtt...
javascript
{ "resource": "" }
q19535
train
function() { // ensure only TreeBindings are enhanced which have not been enhanced yet if (!(this instanceof TreeBinding) || this._bIsAdapted) { return; } TreeBindingAdapter.apply(this); // apply the methods of the adapters prototype to the TreeBinding instance for (var fn in ODataTreeBindingAdapter.p...
javascript
{ "resource": "" }
q19536
cleanUp
train
function cleanUp() { _Helper.removeByPath(that.mPostRequests, sPath, oEntityData); aCollection.splice(aCollection.indexOf(oEntityData), 1); aCollection.$created -= 1; addToCount(that.mChangeListeners, sPath, aCollection, -1); delete aCollection.$byPredicate[sTransientPredicate]; if (!sPath) { // N...
javascript
{ "resource": "" }
q19537
missingValue
train
function missingValue(oValue, sSegment, iPathLength) { var sPropertyPath = "", sReadLink, sServiceUrl; if (sPath[0] !== '(') { sPropertyPath += "/"; } sPropertyPath += sPath.split("/").slice(0, iPathLength).join("/"); return that.oRequestor.getModelInterface() .fetchMetadata(that.sMetaPa...
javascript
{ "resource": "" }
q19538
addFilter
train
function addFilter(oFilterElement) { var sFilter = _Helper.getKeyFilter(oFilterElement, that.sMetaPath, mTypeForMetaPath); aFilters.push(sFilter); return sFilter; }
javascript
{ "resource": "" }
q19539
train
function(oEvent) { var oCallout = oEvent.getParameter("callout"); switch (oEvent.getParameter("type")) { case "added": case "removed": var oNotifier = oEvent.getParameter("notifier"); if (this.getMessageNotifier() && this.getMessageNotifier().getId() === oNotifier.getId()) { // clone the mess...
javascript
{ "resource": "" }
q19540
train
function(oThis, oMN) { if (oMN && oMN.hasItems()) { var $messageCount = oMN.$("counter"); // remove all possible classes $messageCount.removeClass("sapUiMessageInformation"); $messageCount.removeClass("sapUiMessageSuccess"); $messageCount.removeClass("sapUiMessageWarning"); $messageCount.rem...
javascript
{ "resource": "" }
q19541
train
function(oThis) { var aNotifiers = oThis.getNotifiers(); for (var i = 0; i < aNotifiers.length; i++) { var iCount = aNotifiers[i].getMessages().length; var sKey = "NOTIBAR_NOTIFIER_COUNT_TEXT_" + (iCount === 1 ? "SING" : "PL"); fnSetNotifierDescription(oThis, aNotifiers[i], sKey, iCount); } }
javascript
{ "resource": "" }
q19542
train
function(that) { var mNotifiers = that.getNotifiers(); for (var i = 0; i < mNotifiers.length; i++) { var oNotifier = mNotifiers[i]; oNotifier._oCallout.close(); } if (that.getMessageNotifier()) { that.getMessageNotifier()._oCallout.close(); } }
javascript
{ "resource": "" }
q19543
train
function(sWidth, sCalendarType) { assert(sWidth == "narrow" || sWidth == "abbreviated" || sWidth == "wide", "sWidth must be narrow, abbreviated or wide"); return this._get(getCLDRCalendarName(sCalendarType), "dayPeriods", "stand-alone", sWidth); }
javascript
{ "resource": "" }
q19544
train
function(sStyle, sCalendarType) { assert(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full"); return this._get(getCLDRCalendarName(sCalendarType), "dateFormats", sStyle); }
javascript
{ "resource": "" }
q19545
train
function(sDateStyle, sTimeStyle, sCalendarType) { assert(sDateStyle == "short" || sDateStyle == "medium" || sDateStyle == "long" || sDateStyle == "full", "sStyle must be short, medium, long or full"); assert(sTimeStyle == "short" || sTimeStyle == "medium" || sTimeStyle == "long" || sTimeStyle == "full", "sStyle m...
javascript
{ "resource": "" }
q19546
train
function(sPattern, sCalendarType) { var oIntervalFormats = this._get(getCLDRCalendarName(sCalendarType), "dateTimeFormats", "intervalFormats"), sFallbackPattern = oIntervalFormats.intervalFormatFallback; return sFallbackPattern.replace(/\{(0|1)\}/g, sPattern); }
javascript
{ "resource": "" }
q19547
train
function(sSkeleton, vGreatestDiff, sCalendarType) { var oAvailableFormats = this._get(getCLDRCalendarName(sCalendarType), "dateTimeFormats", "intervalFormats"); return this._getFormatPattern(sSkeleton, oAvailableFormats, sCalendarType, vGreatestDiff); }
javascript
{ "resource": "" }
q19548
train
function () { var mCustomCurrencies = this._get("currency") || {}, mCustomCurrencyCodes = {}; Object.keys(mCustomCurrencies).forEach(function (sCurrencyKey) { mCustomCurrencyCodes[sCurrencyKey] = sCurrencyKey; }); return mCustomCurrencyCodes; }
javascript
{ "resource": "" }
q19549
train
function(sCurrency) { // try to lookup currency digits from custom currencies var mCustomCurrencies = this._get("currency"); if (mCustomCurrencies) { if (mCustomCurrencies[sCurrency] && mCustomCurrencies[sCurrency].hasOwnProperty("digits")) { return mCustomCurrencies[sCurrency].digits; } else if ...
javascript
{ "resource": "" }
q19550
train
function(sCurrencySymbol) { var oCurrencySymbols = this._get("currencySymbols"), sCurrencyCode; for (sCurrencyCode in oCurrencySymbols) { if (oCurrencySymbols[sCurrencyCode] === sCurrencySymbol) { return sCurrencyCode; } } return sCurrencySymbol; }
javascript
{ "resource": "" }
q19551
train
function() { // Lookup into global Config var mCustomCurrencies = this._get("currency"), mCustomCurrencySymbols = {}, sIsoCode; for (var sCurrencyKey in mCustomCurrencies) { sIsoCode = mCustomCurrencies[sCurrencyKey].isoCode; if (mCustomCurrencies[sCurrencyKey].symbol) { mCustomCurrencyS...
javascript
{ "resource": "" }
q19552
train
function(aScales, sStyle) { if (sStyle === undefined) { sStyle = "wide"; } assert(sStyle === "wide" || sStyle === "short" || sStyle === "narrow", "sStyle is only allowed to be set with 'wide', 'short' or 'narrow'"); var aPatterns = [], aPluralCategories = this.getPluralCategories(), oScale, ...
javascript
{ "resource": "" }
q19553
train
function(sWidth, sCalendarType) { assert(sWidth == "wide" || sWidth == "abbreviated" || sWidth == "narrow" , "sWidth must be wide, abbreviate or narrow"); //TODO Adapt generation so that eras are an array instead of object var oEras = this._get(getCLDRCalendarName(sCalendarType), "era-" + sWidth), aEras =...
javascript
{ "resource": "" }
q19554
train
function(sCalendarType) { //TODO Adapt generation so that eradates are an array instead of object var oEraDates = this._get("eras-" + sCalendarType.toLowerCase()), aEraDates = []; for (var i in oEraDates) { aEraDates[parseInt(i)] = oEraDates[i]; } return aEraDates; }
javascript
{ "resource": "" }
q19555
train
function(sStyle, iWeekNumber) { assert(sStyle == "wide" || sStyle == "narrow" , "sStyle must be wide or narrow"); var oMessageBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.core", this.oLocale.toString()), sKey = "date.week.calendarweek." + sStyle; return oMessageBundle.getText(sKey, iWeekNum...
javascript
{ "resource": "" }
q19556
getCLDRCalendarName
train
function getCLDRCalendarName(sCalendarType) { if (!sCalendarType) { sCalendarType = sap.ui.getCore().getConfiguration().getCalendarType(); } return "ca-" + sCalendarType.toLowerCase(); }
javascript
{ "resource": "" }
q19557
getData
train
function getData(oLocale) { var sLanguage = oLocale.getLanguage() || "", sScript = oLocale.getScript() || "", sRegion = oLocale.getRegion() || "", mData; /* * Merge a CLDR delta file and a CLDR fallback file. * * Note: the contract of this method reg. null values differs from both, * jQuery.e...
javascript
{ "resource": "" }
q19558
isModifierKey
train
function isModifierKey(oEvent) { var sKey = oEvent.key; // based on KeyBoardEvent.key (https://www.w3.org/TR/uievents/) and (https://www.w3.org/TR/uievents-key/) return (sKey === 'Shift') || (sKey === 'Control') || (sKey === 'Alt') || // Chrome uses 'Alt' and 'AltGraph, IE only use 'Alt' (sKey === 'Al...
javascript
{ "resource": "" }
q19559
hasDOMElementSize
train
function hasDOMElementSize(oElement) { var oClientRect; if (!oElement) { return false; } oClientRect = oElement.getBoundingClientRect(); return !!(oClientRect.width && oClientRect.height); }
javascript
{ "resource": "" }
q19560
train
function (oEvent) { var aPopoverContent = this._aSubClasses.map(function (oElement) { return new Link({ text: oElement, href: "#/api/" + oElement }).addStyleClass("sapUiTinyMarginBottom sapUiTinyMarginEnd"); }), oPopover = this._getSubClassesAndImplementationsPopover(aPopoverContent); ...
javascript
{ "resource": "" }
q19561
train
function(aUndoStack) { while (aUndoStack.length) { var oOperation = aUndoStack.pop(); this[oOperation.name].apply(this, oOperation.properties); } }
javascript
{ "resource": "" }
q19562
train
function (oControl, bVisible) { var bOldVisible = this.getVisible(oControl); var vReturnValue = JsControlTreeModifier.setVisible.apply(this, arguments); /* If the visibility changed, record the reversal as undo operation */ if (bOldVisible !== this.getVisible(oControl)){ this._saveUndoOperation("setVi...
javascript
{ "resource": "" }
q19563
train
function (oControl, sPropertyName, mBindingInfos) { var mOldBindingInfos = oControl.getBindingInfo(sPropertyName); var vOldValue; var oMetadata = oControl.getMetadata().getPropertyLikeSetting(sPropertyName); if (oMetadata) { var sPropertyGetter = oMetadata._sGetter; vOldValue = oControl[sPropertyGe...
javascript
{ "resource": "" }
q19564
train
function (oControl, sPropertyName) { var mOldBindingInfos = oControl.getBindingInfo(sPropertyName); JsControlTreeModifier.unbindProperty.apply(this, arguments); if (mOldBindingInfos){ this._saveUndoOperation("bindProperty", [oControl, sPropertyName, mOldBindingInfos]); } }
javascript
{ "resource": "" }
q19565
train
function (oControl, sPropertyName, oPropertyValue) { var vOldValue; var oMetadata = oControl.getMetadata().getPropertyLikeSetting(sPropertyName); if (oMetadata) { var sPropertyGetter = oMetadata._sGetter; vOldValue = oControl[sPropertyGetter](); } var vReturnValue = JsControlTreeModifier.setPro...
javascript
{ "resource": "" }
q19566
train
function (oControl, sPropertyName, oPropertyBinding) { var oOldValue; var oMetadata = oControl.getMetadata().getPropertyLikeSetting(sPropertyName); if (oMetadata) { var sPropertyGetter = oMetadata._sGetter; oOldValue = oControl[sPropertyGetter](); } JsControlTreeModifier.setPropertyBinding.appl...
javascript
{ "resource": "" }
q19567
train
function (sClassName, oAppComponent, oView, oSelector, mSettings, bAsync) { var oExistingControl = this.bySelector(oSelector, oAppComponent); var fnCreateUndoOperation = function() { if (!oExistingControl) { var oCreatedControl = this.bySelector(oSelector, oAppComponent); RtaControlTreeModifier._sav...
javascript
{ "resource": "" }
q19568
train
function(sFragment, sChangeId, oView, oController) { var aControls = JsControlTreeModifier.instantiateFragment.apply(this, arguments); aControls.forEach(function(oControl) { this._saveUndoOperation("destroy", [oControl]); }.bind(this)); return aControls; }
javascript
{ "resource": "" }
q19569
train
function (oParent, sName, oObject, iIndex) { var oOldAggregationValue = JsControlTreeModifier.getAggregation.call(this, oParent, sName); JsControlTreeModifier.insertAggregation.apply(this, arguments); if (oParent) { if (oParent.getMetadata) { var oMetadata = oParent.getMetadata(); var oAggregat...
javascript
{ "resource": "" }
q19570
train
function (oParent, sName) { var aOldAggregationElements = []; var vAggregationElements; if (oParent) { vAggregationElements = JsControlTreeModifier.getAggregation.call(this, oParent, sName); } if (vAggregationElements && vAggregationElements instanceof Array) { aOldAggregationElements = vAggrega...
javascript
{ "resource": "" }
q19571
train
function () { // calculate text var sFilterText = ""; jQuery.each(this._oViewSettings.filter, function (sProperty, aValues) { jQuery.each(aValues, function (i, aValue) { sFilterText += aValue + ", "; }); }); if (sFilterText.length > 0) { var iIndex = sFilterText.lastIndexOf(", "); s...
javascript
{ "resource": "" }
q19572
train
function () { var aFilters = [], aSorters = [], bFilterChanged = false, bGroupChanged = false, oSearchField = this.byId("searchField"), oList = this.byId("list"), oBinding = oList.getBinding("items"); // add filter for search var sQuery = oSearchField.getValue().trim(); bFilterCha...
javascript
{ "resource": "" }
q19573
getModelFormatter
train
function getModelFormatter() { if (!oModelFormatter) { oModelFormatter = DateFormat.getDateInstance({ pattern : 'yyyy-MM-dd', strictParsing : true, UTC : true }); } return oModelFormatter; }
javascript
{ "resource": "" }
q19574
train
function (sTopicId) { this._bIncludeDeprecated = true; // Switch internal flag this.byId("includeDeprecated").setSelected(true); // Update checkbox UI this.buildAndApplyFilters(); // Apply filters this._expandTreeToNode(sTopicId, this.getModel("treeData")); // Select the searched entity }
javascript
{ "resource": "" }
q19575
wrapTimerHandler
train
function wrapTimerHandler(vHandler) { var fnWrappedHandler = function() { var aArgs, fnHandler; if (bPromisesQueued) { aArgs = [fnWrappedHandler, 0].concat(arguments); _timeout.apply(window, aArgs); } else { fnHandler = typeof vHandler !== "function" ? new Function(vHandler) : vHand...
javascript
{ "resource": "" }
q19576
wrapHandler
train
function wrapHandler(fnHandler) { var fnWrappedHandler = function(oEvent) { // The ready state at the time the event is occurring needs to // be preserved, to restore it when the handler is called delayed var iCurrentState = oXHR.readyState; function callHandler() { iReadyState...
javascript
{ "resource": "" }
q19577
train
function(oBody, sDensityMode){ switch (sDensityMode) { case COMPACT: oBody.toggleClass("sapUiSizeCompact", true).toggleClass("sapUiSizeCozy", false).toggleClass("sapUiSizeCondensed", false); break; case CONDENSED: oBody.toggleClass("sapUiSizeCondensed", true).toggleClass("sapUiSizeCozy",...
javascript
{ "resource": "" }
q19578
train
function(sThemeActive, sDensityMode, bRTL){ var oSampleFrameContent, oSampleFrameCore, $SampleFrame, bRTLChanged, bThemeChanged, bContentDensityChanged; // Handle content density change if (this._oViewSettings.densityMode !== sDensityMode) { this._toggleContentDensityClasses(j...
javascript
{ "resource": "" }
q19579
train
function () { if (!this._oSettingsDialog) { this._oSettingsDialog = new sap.ui.xmlfragment("sap.ui.documentation.sdk.view.appSettingsDialog", this); this._oView.addDependent(this._oSettingsDialog); } setTimeout(function () { var oAppSettings = this._oCore.getConfiguration(), oThemeSele...
javascript
{ "resource": "" }
q19580
train
function () { var BusyDialog, sDensityMode = this._oCore.byId('DensityModeSwitch').getSelectedKey(), sTheme = this._oCore.byId('ThemeSelect').getSelectedKey(), bRTL = this._oCore.byId('RTLSwitch').getState(); this._oSettingsDialog.close(); // Lazy loading of busy dialog if (!this._oBusy...
javascript
{ "resource": "" }
q19581
render
train
function render(issues, enableFiltering) { var content = ''; if (enableFiltering) { content += '<div class="filters">' + getSeverityFilters(issues) + '<div>\n'; } content += '<div>' + getIssues(issues) + '</div>'; return '<div>' + content + '</div>'; }
javascript
{ "resource": "" }
q19582
train
function() { clearTimeout(this._delayedCallId); // if interval is active and there are registered listeners var bHasListeners = this._oEventBus._defaultChannel.hasListeners(_EVENT_ID); if (this._iInterval > 0 && bHasListeners) { this._oEventBus.publish(_EVENT_ID); this._delayedCallId = setTimeout(...
javascript
{ "resource": "" }
q19583
openSuggestions
train
function openSuggestions(oSF) { if (oSF.getEnableSuggestions()) { if (!oSF._oSuggest) { oSF._oSuggest = new Suggest(oSF); } oSF._oSuggest.open(); } }
javascript
{ "resource": "" }
q19584
train
function(oRm, oTable) { if (!oTable._getAccExtension().getAccMode()) { return; } var sTableId = oTable.getId(); oRm.write("<div class='sapUiTableHiddenTexts' style='display:none;' aria-hidden='true'>"); // aria description for the row and column count _writeAccText(oRm, sTableId, "ariacount"); ...
javascript
{ "resource": "" }
q19585
train
function(oRm, oTable, sType, mParams) { var oExtension = oTable._getAccExtension(); if (!oExtension.getAccMode()) { return; } var mAttributes = oExtension.getAriaAttributesFor(sType, mParams); var oValue, sKey; for (sKey in mAttributes) { oValue = mAttributes[sKey]; if (Array.isArray(oV...
javascript
{ "resource": "" }
q19586
train
function(oRm, oTable, oRow, iRowIndex) { if (!oTable._getAccExtension().getAccMode()) { return; } var bIsSelected = oTable.isIndexSelected(iRowIndex); var mTooltipTexts = oTable._getAccExtension().getAriaTextsForSelectionMode(true); var sText = mTooltipTexts.keyboard[bIsSelected ? "rowDeselect" : "r...
javascript
{ "resource": "" }
q19587
train
function(oRm, oTable, oRow, iRowIndex) { if (!oTable._getAccExtension().getAccMode()) { return; } var oRowSettings = oRow.getAggregation("_settings"); var sHighlightText = oRowSettings._getHighlightText(); _writeAccText(oRm, oRow.getId(), "highlighttext", sHighlightText); }
javascript
{ "resource": "" }
q19588
train
function(oRm, oTable, oCreationRow) { if (!oTable._getAccExtension().getAccMode()) { return; } _writeAccText(oRm, oCreationRow.getId(), "label", TableUtils.getResourceText("TBL_CREATEROW_LABEL")); }
javascript
{ "resource": "" }
q19589
_applyChange
train
function _applyChange(oChange, oRelevantContainer, mPropertyBag, fnIterator) { var oModifier = mPropertyBag.modifier, oView = mPropertyBag.view, oAppComponent = mPropertyBag.appComponent, oChangeContent = oChange.getContent(), oTargetSource = oChange.getDependentControl(SOURCE_ALIAS, mPropertyBag), oTa...
javascript
{ "resource": "" }
q19590
train
function(oScript, rRegex) { if (oScript && oScript.getAttribute("src") && rRegex.exec(oScript.getAttribute("src"))) { return oScript; } }
javascript
{ "resource": "" }
q19591
findConfig
train
function findConfig(sType, vObject, fnCheck) { var sComponentId = vObject && typeof vObject === "string" ? vObject : (vObject && Component.getOwnerIdFor(vObject)); if (sComponentId) { // if a component name is given only the component customizing // configuration is checked - the customizing configuration...
javascript
{ "resource": "" }
q19592
train
function(sComponentName) { Log.info("CustomizingConfiguration: activateForComponent('" + sComponentName + "')"); var sFullComponentName = sComponentName + ".Component"; sap.ui.requireSync(sFullComponentName.replace(/\./g, "/")); var oCustomizingConfig = ObjectPath.get(sFullComponentName).getMetadata().g...
javascript
{ "resource": "" }
q19593
train
function(oComponent) { Log.info("CustomizingConfiguration: activateForComponentInstance('" + oComponent.getId() + "')"); var sComponentName = oComponent.getMetadata().getComponentName(), sKey = sComponentName + "::" + oComponent.getId(), oCustomizingConfig = oComponent.getManifest()["sap.ui5"] && oCom...
javascript
{ "resource": "" }
q19594
train
function(oComponent) { var sComponentName = oComponent.getMetadata().getComponentName(), sKey = sComponentName + "::" + oComponent.getId(); if (mComponentConfigs[sKey]) { Log.info("CustomizingConfiguration: deactivateForComponent('" + sKey + "')"); delete mComponentConfigs[sKey]; } }
javascript
{ "resource": "" }
q19595
train
function(sViewName, vObject) { var oResultConfig; // TODO: checking order of components? findConfig(CONFIG_VIEW_REPLACEMENTS, vObject, function(oConfig) { oResultConfig = oConfig[sViewName]; return !!oResultConfig; }); return oResultConfig; }
javascript
{ "resource": "" }
q19596
train
function(sViewName, sExtensionPointName, vObject) { // FIXME: currently ONE extension wins, but they should be somehow merged - but how to define the order? var oResultConfig; // TODO: checking order of components? findConfig(CONFIG_VIEW_EXTENSIONS, vObject, function(oConfig) { oResultConfig = oConfig[...
javascript
{ "resource": "" }
q19597
train
function(sControllerName, vObject) { var oResultConfig; findConfig(CONFIG_CONTROLLER_EXTENSIONS, vObject, function(oConfig) { oResultConfig = oConfig[sControllerName]; return !!oResultConfig; }); return oResultConfig; }
javascript
{ "resource": "" }
q19598
train
function(sControllerName, vObject) { var oResultConfig; findConfig(CONFIG_CONTROLLER_REPLACEMENTS, vObject, function(oConfig) { oResultConfig = oConfig[sControllerName]; return !!oResultConfig; }); return oResultConfig; }
javascript
{ "resource": "" }
q19599
train
function(aIssues) { aIssues.forEach(function(element){ switch (element.severity) { case constants.SUPPORT_ASSISTANT_ISSUE_SEVERITY_LOW: element.severityIcon = mIssueSettings.severityIcons.Low; element.severityColor = constants.SUPPORT_ASSISTANT_SEVERITY_LOW_COLOR; break; case constant...
javascript
{ "resource": "" }