_id
stringlengths
2
6
title
stringlengths
0
58
partition
stringclasses
3 values
text
stringlengths
52
373k
language
stringclasses
1 value
meta_information
dict
q18700
train
function(sName) { if (this._oDimensionSet[sName]) { // the easy case return this._oDimensionSet[sName]; } for ( var sDimensionName in this._oDimensionSet) { var oDimension = this._oDimensionSet[sDimensionName]; var oTextProperty = oDimension.getTextProperty(); if (oTextProperty && oTextPropert...
javascript
{ "resource": "" }
q18701
train
function(sName) { if (this._oMeasureSet[sName]) { // the easy case return this._oMeasureSet[sName]; } for ( var sMeasureName in this._oMeasureSet) { var oMeasure = this._oMeasureSet[sMeasureName]; var oFormattedValueProperty = oMeasure.getFormattedValueProperty(); if (oFormattedValueProperty &...
javascript
{ "resource": "" }
q18702
train
function(oQueryResult, oAssociation) { this._oQueryResult = oQueryResult; var sQAssocName = this._oEntityType.getSchema().namespace + "." + oAssociation.name; var aNavProp = this._oEntityType.getTypeDescription().navigationProperty; if (!aNavProp) { throw "Invalid consumption model: Parameters entity ty...
javascript
{ "resource": "" }
q18703
train
function() { if (this._aParameterNames) { return this._aParameterNames; } this._aParameterNames = []; for ( var sName in this._oParameterSet) { this._aParameterNames.push(this._oParameterSet[sName].getName()); } return this._aParameterNames; }
javascript
{ "resource": "" }
q18704
train
function() { var sPeerParamPropName = null; if (this._oLowerIntervalBoundaryParameterProperty) { sPeerParamPropName = this._oLowerIntervalBoundaryParameterProperty.name; } else { sPeerParamPropName = this._oUpperIntervalBoundaryParameterProperty.name; } if (!sPeerParamPropName) { throw "Param...
javascript
{ "resource": "" }
q18705
train
function() { if (!this._sSuperOrdinateDimension) { var oSuperOrdProperty = this._oQueryResult.getEntityType().getSuperOrdinatePropertyOfProperty(this.getName()); if (oSuperOrdProperty) { this._sSuperOrdinateDimension = this._oQueryResult.findDimensionByName(oSuperOrdProperty.name); } } return ...
javascript
{ "resource": "" }
q18706
train
function() { if (this._aAttributeNames) { return this._aAttributeNames; } this._aAttributeNames = []; for ( var sName in this._oAttributeSet) { this._aAttributeNames.push(this._oAttributeSet[sName].getName()); } return this._aAttributeNames; }
javascript
{ "resource": "" }
q18707
train
function() { if (this._bIsUpdatable != null) { return this._bIsUpdatable; } var oUpdatablePropertyNameSet = this._oQueryResult.getEntitySet().getUpdatablePropertyNameSet(); return (oUpdatablePropertyNameSet[this.getName()] != undefined); }
javascript
{ "resource": "" }
q18708
train
function() { if (this._oUpdatablePropertyNames) { return this._oUpdatablePropertyNames; } this._oUpdatablePropertyNames = {}; var bSetIsUpdatable = true; if (this._oEntitySet.extensions != undefined) { for (var j = -1, oExtension; (oExtension = this._oEntitySet.extensions[++j]) !== undefined;) {...
javascript
{ "resource": "" }
q18709
getOrCreateHierarchy
train
function getOrCreateHierarchy(sKey) { var oResult = oRecursiveHierarchies[sKey]; if (!oResult) { oResult = oRecursiveHierarchies[sKey] = {}; } return oResult; }
javascript
{ "resource": "" }
q18710
train
function() { if (this._aHierarchyPropertyNames) { return this._aHierarchyPropertyNames; } this._aHierarchyPropertyNames = []; for ( var sName in this._oRecursiveHierarchySet) { this._aHierarchyPropertyNames.push(this._oRecursiveHierarchySet[sName].getNodeValueProperty().name); } return this...
javascript
{ "resource": "" }
q18711
train
function(sPropertyName, sOperator, oValue, oValue2) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot add filter condition for unknown property name " + sPropertyName; // TODO } var aFilterablePropertyNames = this._oEntityType.getFilterableProp...
javascript
{ "resource": "" }
q18712
train
function(sPropertyName) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot remove filter conditions for unknown property name " + sPropertyName; // TODO } for (var i = 0; i < this._aConditionUI5Filter.length; i++) { var oUI5Filter = this._aC...
javascript
{ "resource": "" }
q18713
train
function(sPropertyName, aValues) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot add filter condition for unknown property name " + sPropertyName; // TODO } var aFilterablePropertyNames = this._oEntityType.getFilterablePropertyNames(); if ...
javascript
{ "resource": "" }
q18714
train
function(aUI5Filter) { if (!Array.isArray(aUI5Filter)) { throw "Argument is not an array"; } if (aUI5Filter.length == 0) { return this; } // check if a multi filter is included; otherwise every element simply represents a single condition var bHasMultiFilter = false; for (var i = 0; i < aU...
javascript
{ "resource": "" }
q18715
train
function() { var aFilterObjects = this._aConditionUI5Filter.concat([]); for ( var i = -1, aFilter; (aFilter = this._aUI5FilterArray[++i]) !== undefined;) { for ( var j = -1, oFilter; (oFilter = aFilter[++j]) !== undefined;) { aFilterObjects.push(oFilter); } } return aFilterObjects; }
javascript
{ "resource": "" }
q18716
train
function() { var oReferencedProperties = {}; for ( var i = -1, oUI5Filter; (oUI5Filter = this._aConditionUI5Filter[++i]) !== undefined;) { if (oReferencedProperties[oUI5Filter.sPath] == undefined) { oReferencedProperties[oUI5Filter.sPath] = []; } oReferencedProperties[oUI5Filter.sPath].push(oUI5...
javascript
{ "resource": "" }
q18717
train
function(oUI5Filter) { var sFilterExpression = null, oProperty = this._oEntityType.findPropertyByName(oUI5Filter.sPath); if (oProperty == null) { throw "Cannot add filter condition for unknown property name " + oUI5Filter.sPath; // TODO } switch (oUI5Filter.sOperator) { case FilterOperator.BT: ...
javascript
{ "resource": "" }
q18718
train
function(sPropertyName) { var oResult = null; for (var i = -1, oCurrentSorter; (oCurrentSorter = this._aSortCondition[++i]) !== undefined;) { if (oCurrentSorter.property.name === sPropertyName) { oResult = { sorter : oCurrentSorter, index : i }; break; } } return oResult; ...
javascript
{ "resource": "" }
q18719
train
function(sPropertyName, sSortOrder) { var oProperty = this._oEntityType.findPropertyByName(sPropertyName); if (oProperty == null) { throw "Cannot add sort condition for unknown property name " + sPropertyName; // TODO } var oExistingSorterEntry = this._containsSorter(sPropertyName); if (oExistingSort...
javascript
{ "resource": "" }
q18720
train
function(sPropertyName) { if (!sPropertyName) { return; } var oSorter = this._containsSorter(sPropertyName); if (oSorter) { this._removeFromArray(this._aSortCondition, oSorter.index); } }
javascript
{ "resource": "" }
q18721
train
function() { var aSorterObjects = []; for (var i = -1, oCondition; (oCondition = this._aSortCondition[++i]) !== undefined;) { aSorterObjects.push(new Sorter(oCondition.property.name, oCondition.order == odata4analytics.SortOrder.Descending)); } return aSorterObjects; }
javascript
{ "resource": "" }
q18722
train
function(sParameterName, sValue, sToValue) { var oParameter = this._oParameterization.findParameterByName(sParameterName); if (!oParameter) { throw "Invalid parameter name " + sParameterName; // TODO improve } // error handling if (sToValue != null) { if (!oParameter.isIntervalBoundary()) { ...
javascript
{ "resource": "" }
q18723
train
function(sServiceRootURI) { var oDefinedParameters = this._oParameterization.getAllParameters(); for ( var sDefinedParameterName in oDefinedParameters) { // check that all parameters have a value assigned. This is also // true for those marked as optional, because the // omitted value is conveyed by s...
javascript
{ "resource": "" }
q18724
train
function (sHierarchyDimensionName, bIncludeExternalKey, bIncludeText) { var oDimension; if (!sHierarchyDimensionName) { return; } // sHierarchyDimensionName is the name of a dimension property (and not e.g. of a // dimension's text property), findDimensionByName can be used instead of // find...
javascript
{ "resource": "" }
q18725
train
function(sResourcePath) { this._sResourcePath = sResourcePath; if (this._sResourcePath.indexOf("/") != 0) { throw "Missing leading / (slash) for resource path"; } if (this._oQueryResult.getParameterization()) { var iLastPathSep = sResourcePath.lastIndexOf("/"); if (iLastPathSep == -1) { thr...
javascript
{ "resource": "" }
q18726
train
function(aDimensionName) { this._oAggregationLevel = {}; if (!aDimensionName) { aDimensionName = this._oQueryResult.getAllDimensionNames(); } this.addToAggregationLevel(aDimensionName); this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties }
javascript
{ "resource": "" }
q18727
train
function(aDimensionName) { if (!aDimensionName) { return; } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties for (var i = -1, sDimName; (sDimName = aDimensionName[++i]) !== undefined;) { if (!this._oQueryResult.findDimensionByName(sDimName)) { thro...
javascript
{ "resource": "" }
q18728
train
function(aDimensionName) { if (!aDimensionName) { return; } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties for (var i = -1, sDimName; (sDimName = aDimensionName[++i]) !== undefined;) { if (!this._oQueryResult.findDimensionByName(sDimName)) { throw...
javascript
{ "resource": "" }
q18729
train
function(aMeasureName) { if (!aMeasureName) { aMeasureName = this._oQueryResult.getAllMeasureNames(); } this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties this._oMeasures = {}; for (var i = -1, sMeasName; (sMeasName = aMeasureName[++i]) !== undefined;) { ...
javascript
{ "resource": "" }
q18730
train
function(sDimensionName, bIncludeKey, bIncludeText, aAttributeName) { this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties var aDimName = []; if (sDimensionName) { if (this._oAggregationLevel[sDimensionName] == undefined) { throw sDimensionName + " is not incl...
javascript
{ "resource": "" }
q18731
train
function(sMeasureName, bIncludeRawValue, bIncludeFormattedValue, bIncludeUnit) { this._oSelectedPropertyNames = null; // reset previously compiled list of selected properties var aMeasName = []; if (sMeasureName) { if (this._oMeasures[sMeasureName] == undefined) { throw sMeasureName + " is not part o...
javascript
{ "resource": "" }
q18732
train
function(bIncludeEntityKey, bIncludeCount, bReturnNoEntities) { if (bIncludeEntityKey != null) { this._bIncludeEntityKey = bIncludeEntityKey; } if (bIncludeCount != null) { this._bIncludeCount = bIncludeCount; } if (bReturnNoEntities != null) { this._bReturnNoEntities = bReturnNoEntities; ...
javascript
{ "resource": "" }
q18733
train
function(start, end) { if (start != null && typeof start !== "number") { throw "Start value must be null or numeric"; // TODO } if (end !== null && typeof end !== "number") { throw "End value must be null or numeric"; // TODO } if (start == null) { start = 1; } if (start < 1 || start ...
javascript
{ "resource": "" }
q18734
train
function(sServiceRootURI) { var sURI = null; if (this._sResourcePath != null) { sURI = (sServiceRootURI ? sServiceRootURI : "") + this._sResourcePath; } else if (this._oQueryResult.getParameterization()) { if (!this._oParameterizationRequest) { throw "Missing parameterization request"; } else ...
javascript
{ "resource": "" }
q18735
train
function(sServiceRootURI) { // construct resource path var sResourcePath = null; sResourcePath = (sServiceRootURI ? sServiceRootURI : "") + "/" + this._oParameter.getContainingParameterization().getEntitySet().getQName(); // check if request is compliant with filter constraints expressed in // me...
javascript
{ "resource": "" }
q18736
train
function(bIncludeText, bIncludeAttributes) { this._oValueSetResult.text = { text : false, attributes : false }; if (bIncludeText == true) { this._oValueSetResult.text = true; } if (bIncludeAttributes == true) { this._oValueSetResult.attributes = true; } }
javascript
{ "resource": "" }
q18737
train
function(sServiceRootURI) { var sResourcePath = null; if (!this._bUseMasterData && this._oParameterizationRequest) { sResourcePath = this._oParameterizationRequest.getURIToParameterizationEntry(sServiceRootURI) + "/" + this._oDimension.getContainingQueryResult().getParameterization().getNavigationProper...
javascript
{ "resource": "" }
q18738
train
function(sServiceRootURI) { // construct resource path var sResourcePath = this.getURIToDimensionMemberEntitySet(sServiceRootURI); // check if request is compliant with filter constraints expressed in // metadata this.getFilterExpression().checkValidity(); // construct query options var sSelectO...
javascript
{ "resource": "" }
q18739
flattenBindings
train
function flattenBindings(oBinding, oParentDefaultModel) { var aBindings = []; var sModelName = oBinding.getMetadata().getName(); if (sModelName === "sap.ui.model.CompositeBinding") { oBinding.getBindings().forEach(function (oBinding) { aBindings = aBindings.concat(flattenBindings(oBinding, oParentDefaultM...
javascript
{ "resource": "" }
q18740
flattenBindingsFromTemplate
train
function flattenBindingsFromTemplate(mBinding) { var aBindings = []; var aParts = mBinding.parts; // TODO: check if we need to filter bindings by modelName, relative indicator ("/") aParts.forEach(function (mPart) { aBindings.push({ parts: [mPart] }); }); return aBindings; }
javascript
{ "resource": "" }
q18741
getBindingsFromProperties
train
function getBindingsFromProperties(oElement, oParentDefaultModel) { var aPropertiesKeys = Object.keys(oElement.getMetadata().getAllProperties()); return aPropertiesKeys // filter properties which are not bound .filter(oElement.getBinding.bind(oElement)) .reduce(function (aBindings, sPropertyName) { re...
javascript
{ "resource": "" }
q18742
getBindingsFromTemplateProperties
train
function getBindingsFromTemplateProperties(oElement) { var aPropertiesKeys = Object.keys(oElement.getMetadata().getAllProperties()); return aPropertiesKeys .filter(function (sPropertyName) { return sPropertyName in oElement.mBindingInfos; }) .reduce(function (aBindings, sPropertyName) { return aBi...
javascript
{ "resource": "" }
q18743
getBindingContextPath
train
function getBindingContextPath(oElement) { if (oElement.getBindingContext() && oElement.getBindingContext().getPath) { return oElement.getBindingContext().getPath(); } return undefined; }
javascript
{ "resource": "" }
q18744
train
function (sVersionA, sVersionB) { var oVA = Version(sVersionA), oVB = Version(sVersionB); return (oVA.getMajor() + "." + oVA.getMinor()) === (oVB.getMajor() + "." + oVB.getMinor()); }
javascript
{ "resource": "" }
q18745
addStyleClass
train
function addStyleClass(oElement, sStyleClass) { if (!oElement) { return; } if (oElement.addStyleClass) { oElement.addStyleClass(sStyleClass); } else { oElement.$().addClass(sStyleClass); } }
javascript
{ "resource": "" }
q18746
train
function(sFilter) { var oModel = this._getTable().getModel(); if (oModel) { if (sFilter.length > 0) { // As UI5 does not support filtering on first level, we have to do it on our own var aData = this.getData(); var aFilteredData = aData.children.filter(function(oEntry) { if (sFilter.inde...
javascript
{ "resource": "" }
q18747
train
function(isRule) { var elements, e, index = i, option, extendList, extend; if (!(isRule ? $re(/^&:extend\(/) : $re(/^:extend\(/))) { return; } do { option = null; elements = null; while (! (option = $re(/^(all)...
javascript
{ "resource": "" }
q18748
train
function () { var entities = [], e, delim; do { e = this.addition() || this.entity(); if (e) { entities.push(e); // operations do not allow keyword "/" dimension (e.g. small/20px) so we support that ...
javascript
{ "resource": "" }
q18749
train
function (env, op, other) { /*jshint noempty:false */ var value = tree.operate(env, op, this.value, other.value), unit = this.unit.clone(); if (op === '+' || op === '-') { if (unit.numerator.length === 0 && unit.denominator.length === 0) { unit.numerator ...
javascript
{ "resource": "" }
q18750
train
function (args, env) { var lastSelector = this.selectors[this.selectors.length-1]; if (!lastSelector.evaldCondition) { return false; } if (lastSelector.condition && !lastSelector.condition.eval( new(tree.evalEnv)(env, env.frames...
javascript
{ "resource": "" }
q18751
getErrorMessage
train
function getErrorMessage(oType) { return sap.ui.getCore().getLibraryResourceBundle().getText("EnterTime", [oType.formatValue(oDemoTime, "string")]); }
javascript
{ "resource": "" }
q18752
toDate
train
function toDate(oTime) { if (!isTime(oTime)) { throw new FormatException("Illegal sap.ui.model.odata.type.Time value: " + toString(oTime)); } return new Date(oTime.ms); }
javascript
{ "resource": "" }
q18753
toModel
train
function toModel(oDate) { return { __edmType : "Edm.Time", ms : ((oDate.getUTCHours() * 60 + oDate.getUTCMinutes()) * 60 + oDate.getUTCSeconds()) * 1000 + oDate.getUTCMilliseconds() }; }
javascript
{ "resource": "" }
q18754
train
function() { this._oDialog.close(); this._oDialog.destroy(); this._oDialog = null; if (this._oAssistantPopover) { this._oAssistantPopover.destroy(); this._oAssistantPopover = null; } if (this._oDebugPopover) { this._oDebugPopover.destroy(); this._oDebugPopover = null; } }
javascript
{ "resource": "" }
q18755
train
function () { var oModel = this._oDialog.getModel("view"), oTree = oModel.getProperty("/DebugModules")[0], sString = "sap-ui-debug=" + this._treeHelper.toDebugInfo(oTree); this._copyToClipboard(sString, "TechInfo.DebugModulesCopyToClipboard"); }
javascript
{ "resource": "" }
q18756
train
function () { var oModel = this._oDialog.getModel("view"), oTreeResults; // early out if already open if (this._oDebugPopover && this._oDebugPopover.isOpen()) { return; } // fill and bind the tree structure from the currently loaded modules oTreeResults = this._treeHelper.toTreeModel(this._o...
javascript
{ "resource": "" }
q18757
train
function () { var oModel = this._oDialog.getModel("view"), oControl = this._getControl("customDebugValue", this._DEBUG_MODULES_ID), oTreeResults; try { this._validateCustomDebugValue(oControl.getValue()); } catch (oException) { this._showError(oControl, oException.message); return; } ...
javascript
{ "resource": "" }
q18758
train
function () { var oModel = this._oDialog.getModel("view"), oTreeData = oModel.getProperty("/DebugModules")[0]; this._treeHelper.recursiveSelect(oTreeData, false); this._updateTreeInfos(); }
javascript
{ "resource": "" }
q18759
train
function () { var oSupport = Support.getStub(); if (oSupport.getType() != Support.StubType.APPLICATION) { return; } oSupport.openSupportTool(); this.close(); }
javascript
{ "resource": "" }
q18760
train
function () { var oModel = this._oDialog.getModel("view"), sSelectedLocation = oModel.getProperty("/SelectedLocation"), sStandardUrl = oModel.getProperty("/StandardBootstrapURL"), sCustomUrl = oModel.getProperty("/CustomBootstrapURL"), aSupportedUrls = [], sBootstrapURL; oModel.getProperty("/...
javascript
{ "resource": "" }
q18761
train
function (oEvent) { var sValue = oEvent.getParameter("selectedItem").getKey(), oControl = oEvent.getSource(); this._storage.put(this._LOCAL_STORAGE_KEYS.STANDARD_URL, sValue); this._resetValueState(oControl); this._pingUrl(sValue, oControl) .then(function success() { oControl.setValueState("Suc...
javascript
{ "resource": "" }
q18762
train
function (oEvent) { var sValue = oEvent.getParameter("value"), oControl = oEvent.getSource(); this._storage.put(this._LOCAL_STORAGE_KEYS.CUSTOM_URL, sValue); try { this._validateValue(oControl.getValue()); this._resetValueState(oControl); } catch (oException) { this._showError(oControl, oExc...
javascript
{ "resource": "" }
q18763
train
function (oEvent) { // early out if already open if (this._oAssistantPopover && this._oAssistantPopover.isOpen()) { return; } // create dialog lazily if (!this._oAssistantPopover) { this._oAssistantPopover = sap.ui.xmlfragment(this._SUPPORT_ASSISTANT_POPOVER_ID, "sap.ui.core.support.techinfo.Tech...
javascript
{ "resource": "" }
q18764
train
function (sBootstrapURL) { var oModel = this._oDialog.getModel("view"), oSettings = { // start the application in support mode support: "true", // open in new window window: oModel.getProperty("/OpenSupportAssistantInNewWindow") }; this._loadAssistant(sBootstrapURL, oSettings); }
javascript
{ "resource": "" }
q18765
train
function (sUrl, oSettings) { this._pingUrl(sUrl) .then(function success() { this.close(); var aSettings = [oSettings.support]; sap.ui.getCore().loadLibrary("sap.ui.support", { async: true, url: sUrl }) .then(function () { if (oSettings.window) { aSettings.push("window"); ...
javascript
{ "resource": "" }
q18766
train
function () { // create i18n model var oI18nModel = new ResourceModel({ bundleName: "sap.ui.core.messagebundle" }); this._oDialog.setModel(oI18nModel, "i18n"); this._oDialog.setModel(this._createViewModel(), "view"); // set compact/cozy style class this._oDialog.addStyleClass(this._getContentD...
javascript
{ "resource": "" }
q18767
train
function () { var oVersion = sap.ui.getCore().getConfiguration().getVersion(); if (oVersion && oVersion.compareTo(this._MIN_UI5VERSION_SUPPORT_ASSISTANT) >= 0) { return true; } return false; }
javascript
{ "resource": "" }
q18768
train
function (sBuildTimestamp) { var oDateFormat = sap.ui.core.format.DateFormat.getDateInstance({pattern: "dd.MM.yyyy HH:mm:ss"}), sBuildDate = oDateFormat.format(this._convertBuildDate(sBuildTimestamp)); return this._getText("TechInfo.VersionBuildTime.Text", sBuildDate); }
javascript
{ "resource": "" }
q18769
train
function (sValue) { var oModel = this._oDialog.getModel("view"), oRadioBtnStandart = this._getControl("standard", this._SUPPORT_ASSISTANT_POPOVER_ID), oRadioBtnCustom = this._getControl("custom", this._SUPPORT_ASSISTANT_POPOVER_ID), oCustom = this._getControl("customBootstrapURL", this._SUPPORT_ASSISTANT...
javascript
{ "resource": "" }
q18770
train
function (fnConfirm, fnCancel) { MessageBox.confirm( this._getText("TechInfo.DebugSources.ConfirmMessage"), { title: this._getText("TechInfo.DebugSources.ConfirmTitle"), onClose: function (oAction) { if (oAction === MessageBox.Action.OK) { fnConfirm(); } else if (fnCancel) { f...
javascript
{ "resource": "" }
q18771
train
function () { var oModel = this._oDialog.getModel("view"), sSelectedLocation = oModel.getProperty("/SelectedLocation"), oControl; if (sSelectedLocation === "custom") { oControl = this._getControl("customBootstrapURL",this._SUPPORT_ASSISTANT_POPOVER_ID); var sValue = oControl.getValue(); try {...
javascript
{ "resource": "" }
q18772
train
function (sControlId, sFragmentId) { if (sFragmentId) { return sap.ui.getCore().byId(sFragmentId + "--" + sControlId); } return sap.ui.getCore().byId(sControlId); }
javascript
{ "resource": "" }
q18773
train
function(sParameter, vValue) { // fetch current parameters from URL var sSearch = window.location.search, sURLParameter = sParameter + "=" + vValue; /// replace or append the new URL parameter if (sSearch && sSearch !== "?") { var oRegExp = new RegExp("(?:^|\\?|&)" + sParameter + "=[^&]+"); if ...
javascript
{ "resource": "" }
q18774
train
function () { var oModel = this._oDialog.getModel("view"), oTreeData = oModel.getProperty("/DebugModules")[0], sDisplayCount; oModel.setProperty("/CustomDebugMode", this._treeHelper.toDebugInfo(oTreeData)); oModel.setProperty("/DebugModuleSelectionCount", this._treeHelper.getSelectionCount(oTreeData));...
javascript
{ "resource": "" }
q18775
_preventTextSelection
train
function _preventTextSelection(bTouch) { var fnPreventSelection = function(oEvent) { oEvent.preventDefault(); }; var fnAllowSelection = null; fnAllowSelection = function() { document.removeEventListener("touchend", fnAllowSelection); document.removeEventListener("touchmove", fnPreventSelection); do...
javascript
{ "resource": "" }
q18776
_ensureLayoutData
train
function _ensureLayoutData(oContent) { var oLd = oContent.getLayoutData(); // Make sure LayoutData is set on the content // But this approach has the advantage that "compatible" LayoutData can be used. if (oLd && (!oLd.getResizable || !oLd.getSize || !oLd.getMinSize)) { Log.warning( "Content \"" + oConte...
javascript
{ "resource": "" }
q18777
train
function (vValue1, vValue2, vEdmType) { if (vEdmType === true || vEdmType === "Decimal") { return BaseODataUtils.compare(vValue1, vValue2, true); } if (vEdmType === "DateTime") { return BaseODataUtils.compare( ODataUtils.parseDateTimeOffset(vValue1), ODataUtils.parseDateTimeOffset(vV...
javascript
{ "resource": "" }
q18778
train
function (context, sDropPosition, oDraggedControl, oDroppedControl, bIgnoreRTL) { var iBeginDragIndex = context.indexOfItem(oDraggedControl), iDropIndex = context.indexOfItem(oDroppedControl), $DraggedControl = oDraggedControl.$(), $DroppedControl = oDroppedControl.$(), iAggregationDropIndex = 0...
javascript
{ "resource": "" }
q18779
train
function () { var oIconTabHeaderItems = this.getItems(), iAriaPointSet = 1, oItemDom; oIconTabHeaderItems.forEach(function (oItem) { oItemDom = oItem.getDomRef(); if (oItemDom && oItemDom.getAttribute("aria-posinset") !== null) { oItemDom.setAttribute("aria-posinset", iAriaPointSet++)...
javascript
{ "resource": "" }
q18780
train
function (oDraggedControl, iDropIndex) { this.removeAggregation('items', oDraggedControl, true); this.insertAggregation('items', oDraggedControl, iDropIndex, true); IconTabBarDragAndDropUtil._updateAccessibilityInfo.call(this); }
javascript
{ "resource": "" }
q18781
train
function (iBeginDragIndex, iControlCount) { if (iBeginDragIndex === iControlCount - 1) { sInsertAfterBeforePosition = INSERT_BEFORE; return iBeginDragIndex; } sInsertAfterBeforePosition = INSERT_AFTER; return iBeginDragIndex + 1; }
javascript
{ "resource": "" }
q18782
train
function (oDraggedControl, iKeyCode) { var $DraggedControl = oDraggedControl.$(), aItems = this.getItems(), iBeginDragIndex = this.indexOfItem(oDraggedControl), bRtl = sap.ui.getCore().getConfiguration().getRTL(), iNewDropIndex, $DroppedControl, oKeyCodes = KeyCodes; switch (iKeyC...
javascript
{ "resource": "" }
q18783
train
function (aItems, oDraggedControl, oDroppedControl) { var oDroppedListControl, oDraggedListControl, sItemId, sDroppedControlId, sDraggedControlId; sDraggedControlId = oDraggedControl._tabFilter ? oDraggedControl._tabFilter.getId() : oDraggedControl.getId(); sDroppedControlId = oDroppedC...
javascript
{ "resource": "" }
q18784
train
function (context, sDropLayout) { var oIconTabHeader = context._iconTabHeader ? context._iconTabHeader : context; var sIconTabHeaderId = oIconTabHeader.getId(); //Adding Drag&Drop configuration to the dragDropConfig aggregation if needed context.addDragDropConfig(new DragInfo({ sourceAggregation: "...
javascript
{ "resource": "" }
q18785
train
function (oControl) { return oControl instanceof this._oWindow.sap.ui.core.mvc.View && oControl !== that._oView; }
javascript
{ "resource": "" }
q18786
train
function (oInterface, oPathValue, iIndex, sEdmType) { var oParameter = Basics.descend(oPathValue, iIndex), oResult; oParameter.asExpression = true; oResult = Expression.expression(oInterface, oParameter); if (sEdmType && sEdmType !== oResult.type) { Basics.error(oParameter, "Expected " + sEdm...
javascript
{ "resource": "" }
q18787
train
function (sValue) { return DateFormat.getDateInstance({ pattern : "yyyy-MM-dd", strictParsing : true, UTC : true }).parse(sValue); }
javascript
{ "resource": "" }
q18788
train
function (sValue) { var aMatches = mEdmType2RegExp.DateTimeOffset.exec(sValue); if (aMatches && aMatches[1] && aMatches[1].length > 4) { // "round" to millis, BEWARE of the dot! sValue = sValue.replace(aMatches[1], aMatches[1].slice(0, 4)); } return DateFormat.getDateTimeInstance({ pattern : "y...
javascript
{ "resource": "" }
q18789
train
function (sValue) { if (sValue.length > 12) { // "round" to millis: "HH:mm:ss.SSS" sValue = sValue.slice(0, 12); } return DateFormat.getTimeInstance({ pattern : "HH:mm:ss.SSS", strictParsing : true, UTC : true }).parse(sValue); }
javascript
{ "resource": "" }
q18790
train
function(sClassName, oClassInfo) { assert(typeof sClassName === "string" && sClassName, "Metadata: sClassName must be a non-empty string"); assert(typeof oClassInfo === "object", "Metadata: oClassInfo must be empty or an object"); // support for old usage of Metadata if ( !oClassInfo || typeof oClassInfo.meta...
javascript
{ "resource": "" }
q18791
train
function (oEvent) { oEvent.getParameters().itemsBinding.filter([ new Filter("name", FilterOperator.Contains, oEvent.getParameters().value) ]); }
javascript
{ "resource": "" }
q18792
train
function (oData, sFileType) { // code extension and properties files do not need formation if ((sFileType === "js") || (sFileType === "properties")) { return oData; } // other files should be formatted to JSON try { oData = JSON.parse(oData); return JSON.stringify(oData, null, '\t'); ...
javascript
{ "resource": "" }
q18793
train
function (oGroup) { var sTitle = "{i18n>systemData}"; if (oGroup.key === "custom") { sTitle = "{i18n>externalReferences}"; } return new GroupHeaderListItem({ title: sTitle, upperCase: false }); }
javascript
{ "resource": "" }
q18794
train
function (oContentItem) { var bNotBlacklisted = true; jQuery.each(this.aBlacklist, function (index, mBlacklistedElement) { var bAllPropertiesMatched = true; jQuery.each(mBlacklistedElement, function (sProperty, sValue) { bAllPropertiesMatched = bAllPropertiesMatched && oContentItem[sProperty] =...
javascript
{ "resource": "" }
q18795
train
function (sNamespace) { if (!sNamespace) { return ""; } if (sNamespace[0] === "/") { var sNamespaceWithoutLeadingSlash = sNamespace.substring(1, sNamespace.length); return this.cleanLeadingAndTrailingSlashes(sNamespaceWithoutLeadingSlash); } if (sNamespace[sNamespace.length - 1] === "...
javascript
{ "resource": "" }
q18796
train
function(key, type, callback) { return function(value) { try { if ( value != null || type === 'string' ) { if (value) { localStorage.setItem(key, type === 'boolean' ? 'X' : value); } else { localStorage.removeItem(key); } callback(value); } value = localStorage.getItem(k...
javascript
{ "resource": "" }
q18797
train
function(sCodeRef, sViewId) { var oFlexSettings = oRta.getFlexSettings(); if (!oFlexSettings.developerMode) { throw DtUtil.createError("service.ControllerExtension#add", "code extensions can only be created in developer mode", "sap.ui.rta"); } if (!sCodeRef) { throw DtUtil.createError("...
javascript
{ "resource": "" }
q18798
train
function(sViewId) { var oViewOverlay = OverlayRegistry.getOverlay(sViewId); if (!oViewOverlay) { throw DtUtil.createError("service.ControllerExtension#getTemplate", "no overlay found for the given view ID", "sap.ui.rta"); } var sControllerExtensionTemplatePath = oViewOverlay.getDesignTimeMeta...
javascript
{ "resource": "" }
q18799
findFocusableDomRef
train
function findFocusableDomRef(oContainer, bForward) { var oChild = bForward ? oContainer.firstChild : oContainer.lastChild, oFocusableDescendant; while (oChild) { if ( oChild.nodeType == 1 && !isHidden(oChild) ) { if ( jQuery(oChild).hasTabIndex() ) { return oChild; } oFocusableDescendant...
javascript
{ "resource": "" }