_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 52 373k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q19300 | train | function ({name, type, className, text=name, local=false, hrefAppend=""}) {
let sLink;
// handling module's
if (className !== undefined && (/^module:/.test(name) || /^module:/.test(className))) {
name = name.replace(/^module:/, "");
}
name = encodeURIComponent(name);
className = encodeURIComponent(clas... | javascript | {
"resource": ""
} | |
q19301 | train | function (sDescription, aReferences) {
var iLen,
i;
// format references
if (aReferences && aReferences.length > 0) {
sDescription += "<br><br><span>Documentation links:</span><ul>";
iLen = aReferences.length;
for (i = 0; i < iLen; i++) {
// We treat references as links but as they may n... | javascript | {
"resource": ""
} | |
q19302 | train | function (description, deprecatedText, deprecatedSince) {
if (!description && !deprecatedText && !deprecatedSince) {
return "";
}
var result = description || "";
if (deprecatedSince || deprecatedText) {
// Note: sapUiDocumentationDeprecated - transformed to sapUiDeprecated to keep json file size l... | javascript | {
"resource": ""
} | |
q19303 | train | function (sSince, sDescription, sEntityType) {
var aResult;
// Build deprecation message
// Note: there may be no since or no description text available
aResult = ["Deprecated"];
if (sSince) {
aResult.push(" as of version " + sSince);
}
if (sDescription) {
// Evaluate code blocks - Handle ... | javascript | {
"resource": ""
} | |
q19304 | train | function (oSymbol, bCalledOnConstructor) {
var bHeaderDocuLinkFound = false,
bUXGuidelinesLinkFound = false,
aReferences = [],
entity = bCalledOnConstructor? oSymbol.constructor.references : oSymbol.references;
const UX_GUIDELINES_BASE_URL = "https://experience.sap.com/fiori-design-web/";
if (ent... | javascript | {
"resource": ""
} | |
q19305 | train | function(oEntity) {
if (oEntity.references && Array.isArray(oEntity.references)) {
oEntity.references = oEntity.references.map(sReference => {
return `<li>${sReference}</li>`;
});
if (!oEntity.description) {
// If there is no method description - references should be the first line of it
o... | javascript | {
"resource": ""
} | |
q19306 | train | function (aMethods) {
var fnCreateTypesArr = function (sTypes) {
return sTypes.split("|").map(function (sType) {
return {value: sType}
});
};
var fnExtractParameterProperties = function (oParameter, aParameters, iDepth, aPhoneName) {
if (oParameter.parameterProperties) {
Object.keys(oPara... | javascript | {
"resource": ""
} | |
q19307 | train | function (aEvents) {
var fnExtractParameterProperties = function (oParameter, aParameters, iDepth, aPhoneName) {
if (oParameter.parameterProperties) {
Object.keys(oParameter.parameterProperties).forEach(function (sProperty) {
var oProperty = oParameter.parameterProperties[sProperty],
sPhoneType... | javascript | {
"resource": ""
} | |
q19308 | train | function (aParameters) {
// New array to hold modified parameters
var aNodes = [],
processNode = function (oNode, sPhoneName, iDepth, aNodes) {
// Handle phone name
oNode.phoneName = sPhoneName ? [sPhoneName, oNode.name].join(".") : oNode.name;
// Depth
oNode.depth = iDepth;
// Add ... | javascript | {
"resource": ""
} | |
q19309 | train | function (oNode) {
// if there are subnodes added to the current node -> traverse them first (added nodes are at the top, before any children)
if (oNode.addedSubtrees.length > 0 && !oNode.nodeState.collapsed) {
// an added subtree can be either a deep or a flat tree (depending on the addContexts) call
for... | javascript | {
"resource": ""
} | |
q19310 | train | function (oNode, oSubtreeHandle) {
var oSubtree = oSubtreeHandle._getSubtree();
if (oSubtreeHandle) {
// subtree is flat
if (Array.isArray(oSubtree)) {
if (oSubtreeHandle._oSubtreeRoot) {
// jump to a certain position in the flat structure and map the nodes
fnTraverseFlatSubtree(oSubtree... | javascript | {
"resource": ""
} | |
q19311 | train | function (oNode, bIgnore, oParent, iPositionInParent, oIgnoreRemoveForNode) {
// ignore node if it was already mapped or is removed (except if it was reinserted, denoted by oIgnoreRemoveForNode)
if (!bIgnore) {
if (!oNode.nodeState.removed || oIgnoreRemoveForNode == oNode) {
fnMap(oNode, oRecursionBreake... | javascript | {
"resource": ""
} | |
q19312 | train | function (oNode) {
if (oNode) {
if (oNode.nodeState.selected && !oNode.isArtificial) {
aResultContexts.push(oNode.context);
}
}
} | javascript | {
"resource": ""
} | |
q19313 | train | function(mode) {
if (!mode || (mode !== 'src' && mode !== 'target')) {
mode = 'src';
}
grunt.option('port', 0); // use random port
// listen to the connect server startup
grunt.event.on('connect.*.listening', function(hostname, port) {
// 0.0.0.0 does not work in windows
if (hostname === ... | javascript | {
"resource": ""
} | |
q19314 | train | function(id) {
var cleared = running[id] != null;
if (cleared) {
running[id] = null;
}
return cleared;
} | javascript | {
"resource": ""
} | |
q19315 | train | function(left, top, animate) {
var self = this;
var startLeft = self.__isAnimating ? self.__scheduledLeft : self.__scrollLeft;
var startTop = self.__isAnimating ? self.__scheduledTop : self.__scrollTop;
self.scrollTo(startLeft + (left || 0), startTop + (top || 0), animate);
} | javascript | {
"resource": ""
} | |
q19316 | train | function (vTargets, vData, sTitleTarget) {
var oSequencePromise = Promise.resolve();
return this._display(vTargets, vData, sTitleTarget, oSequencePromise);
} | javascript | {
"resource": ""
} | |
q19317 | train | function (oTargetInfo, vData, oSequencePromise, oTargetCreateInfo) {
var sName = oTargetInfo.name,
oTarget = this.getTarget(sName);
if (oTarget !== undefined) {
return oTarget._display(vData, oSequencePromise, oTargetCreateInfo);
} else {
var sErrorMessage = "The target with the name \"" + sName +... | javascript | {
"resource": ""
} | |
q19318 | initializeLanguage | train | function initializeLanguage(sLanguage, oConfig, resolve) {
Log.info(
"[UI5 Hyphenation] Initializing third-party module for language " + getLanguageDisplayName(sLanguage),
"sap.ui.core.hyphenation.Hyphenation.initialize()"
);
window.hyphenopoly.initializeLanguage(oConfig)
.then(onLanguageInitialized.bin... | javascript | {
"resource": ""
} |
q19319 | onLanguageInitialized | train | function onLanguageInitialized(sLanguage, resolve, hyphenateMethod) {
oHyphenateMethods[sLanguage] = hyphenateMethod;
oHyphenationInstance.bIsInitialized = true;
if (aLanguagesQueue.length > 0) {
aLanguagesQueue.forEach(function (oElement) {
initializeLanguage(oElement.sLanguage, oElement.oConfig, oElement... | javascript | {
"resource": ""
} |
q19320 | prepareConfig | train | function prepareConfig(sLanguage, oConfig) {
//Creating default configuration
var oConfigurationForLanguage = {
"require": [sLanguage],
"hyphen": "\u00AD",
"leftmin": 3, // The minimum of chars to remain on the old line.
"rightmin": 3,// The minimum of chars to go on the new line
"compound": "all", /... | javascript | {
"resource": ""
} |
q19321 | getLanguage | train | function getLanguage(sLang) {
var oLocale;
if (sLang) {
oLocale = new Locale(sLang);
} else {
oLocale = sap.ui.getCore().getConfiguration().getLocale();
}
var sLanguage = oLocale.getLanguage().toLowerCase();
// adjustment of the language to corresponds to Hyphenopoly pattern files (.hpb files)
swi... | javascript | {
"resource": ""
} |
q19322 | getLanguageDisplayName | train | function getLanguageDisplayName(sPatternName) {
var sLang = getLanguageFromPattern(sPatternName);
if (mLanguageNamesInEnglish.hasOwnProperty(sLang)) {
return "'" + mLanguageNamesInEnglish[sLang] + "' (code:'" + sLang + "')";
} else {
return "'" + sLang + "'";
}
} | javascript | {
"resource": ""
} |
q19323 | line | train | function line(buffer, right, border, label, content) {
buffer.push("<tr class='sapUiSelectable'><td class='sapUiSupportTechInfoBorder sapUiSelectable'><label class='sapUiSupportLabel sapUiSelectable'>", encodeXML(label), "</label><br>");
var ctnt = content;
if (jQuery.isFunction(content)) {
ctnt = cont... | javascript | {
"resource": ""
} |
q19324 | setupDialog | train | function setupDialog() {
// setup e2e values as log level and content
if (dialog.traceXml) {
dialog.$(e2eTraceConst.taContent).text(dialog.traceXml);
}
if (dialog.e2eLogLevel) {
dialog.$(e2eTraceConst.selLevel).val(dialog.e2eLogLevel);
}
fillPanelContent(controlIDs.dvLoadedModules, oD... | javascript | {
"resource": ""
} |
q19325 | getDialog | train | function getDialog() {
if (dialog) {
return dialog;
}
var Dialog = sap.ui.requireSync("sap/m/Dialog");
var Button = sap.ui.requireSync("sap/m/Button");
sap.ui.requireSync("sap/ui/core/HTML");
sap.ui.requireSync("sap/m/MessageToast");
sap.ui.requireSync("sap/ui/core/support/trace/E2eTra... | javascript | {
"resource": ""
} |
q19326 | onTouchStart | train | function onTouchStart(oEvent) {
if (oEvent.touches) {
var currentTouches = oEvent.touches.length;
if (Device.browser.mobile &&
(Device.browser.name === Device.browser.BROWSER.INTERNET_EXPLORER ||// TODO remove after 1.62 version
Device.browser.name === Device.browser.BROWSER.EDGE)) {
wi... | javascript | {
"resource": ""
} |
q19327 | createExtendedRenderer | train | function createExtendedRenderer(sName, oRendererInfo) {
assert(this != null, 'BaseRenderer must be a non-null object');
assert(typeof sName === 'string' && sName, 'Renderer.extend must be called with a non-empty name for the new renderer');
assert(oRendererInfo == null ||
(isPlainObject(oRendererInfo)
&& ... | javascript | {
"resource": ""
} |
q19328 | nextFallbackLocale | train | function nextFallbackLocale(sLocale) {
// there is no fallback for the 'raw' locale or for null/undefined
if ( !sLocale ) {
return null;
}
// special (legacy) handling for zh_HK: try zh_TW (for Traditional Chinese) first before falling back to 'zh'
if ( sLocale === "zh_HK" ) {
return "zh_TW";
}
/... | javascript | {
"resource": ""
} |
q19329 | splitUrl | train | function splitUrl(sUrl) {
var m = rUrl.exec(sUrl);
if ( !m || A_VALID_FILE_TYPES.indexOf( m[2] ) < 0 ) {
throw new Error("resource URL '" + sUrl + "' has unknown type (should be one of " + A_VALID_FILE_TYPES.join(",") + ")");
}
return { url : sUrl, prefix : m[1], ext : m[2], query: m[4], hash: (m[5] || ""), ... | javascript | {
"resource": ""
} |
q19330 | _isComplexType | train | function _isComplexType (mProperty) {
if (mProperty && mProperty.type) {
if (mProperty.type.toLowerCase().indexOf("edm") !== 0) {
return true;
}
}
return false;
} | javascript | {
"resource": ""
} |
q19331 | _getODataPropertiesOfModel | train | function _getODataPropertiesOfModel(oElement, sAggregationName) {
var oModel = oElement.getModel();
var mData = {
property: [],
navigationProperty: [],
navigationEntityNames: []
};
if (oModel) {
var sModelName = oModel.getMetadata().getName();
if (sModelName === "sap.ui.model.odata.ODataModel" |... | javascript | {
"resource": ""
} |
q19332 | _checkForDuplicateLabels | train | function _checkForDuplicateLabels(oInvisibleElement, aODataProperties) {
return aODataProperties.some(function(oDataProperty) {
return oDataProperty.fieldLabel === oInvisibleElement.fieldLabel;
});
} | javascript | {
"resource": ""
} |
q19333 | _hasNavigationBindings | train | function _hasNavigationBindings(aBindingPaths, aNavigationProperties, aNavigationEntityNames, aBindingContextPaths) {
var bNavigationInBindingPath = _hasBindings(aBindingPaths)
&& aBindingPaths.some(function (sPath) {
var aParts = sPath.trim().replace(/^\//gi, '').split('/');
if (aParts.length > 1) {
... | javascript | {
"resource": ""
} |
q19334 | _findODataProperty | train | function _findODataProperty(aBindingPaths, aODataProperties) {
return aODataProperties.filter(function (oDataProperty) {
return aBindingPaths.indexOf(oDataProperty.bindingPath) !== -1;
}).pop();
} | javascript | {
"resource": ""
} |
q19335 | _enhanceInvisibleElement | train | function _enhanceInvisibleElement(oInvisibleElement, mODataOrCustomItem) {
// mODataOrCustomItem.fieldLabel - oData, mODataOrCustomItem.label - custom
oInvisibleElement.originalLabel = mODataOrCustomItem.fieldLabel || mODataOrCustomItem.label;
// mODataOrCustomItem.quickInfo - oData, mODataOrCustomItem.tooltip -... | javascript | {
"resource": ""
} |
q19336 | _checkAndEnhanceODataProperty | train | function _checkAndEnhanceODataProperty(oInvisibleElement, aODataProperties, aNavigationProperties, aNavigationEntityNames, mBindingPaths) {
var aBindingPaths = mBindingPaths.bindingPaths,
aBindingContextPaths = mBindingPaths.bindingContextPaths,
mODataProperty;
return (
// include it if the field has no b... | javascript | {
"resource": ""
} |
q19337 | train | function(oElement, mActions){
var oModel = oElement.getModel();
var mRevealData = mActions.reveal;
var mAddODataProperty = mActions.addODataProperty;
var mCustom = mActions.custom;
var oDefaultAggregation = oElement.getMetadata().getAggregation();
var sAggregationName = oDefaultAggregation ? oDefaultA... | javascript | {
"resource": ""
} | |
q19338 | train | function (oElement, mAction) {
var oDefaultAggregation = oElement.getMetadata().getAggregation();
var sAggregationName = oDefaultAggregation ? oDefaultAggregation.name : mAction.action.aggregation;
var oModel = oElement.getModel();
return Promise.resolve()
.then(function () {
return _getODataPrope... | javascript | {
"resource": ""
} | |
q19339 | train | function( prop ) {
if ( !prop ) {
return;
}
return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) );
} | javascript | {
"resource": ""
} | |
q19340 | validStyle | train | function validStyle( prop, value, check_vend ) {
var div = document.createElement( 'div' ),
uc = function( txt ) {
return txt.charAt( 0 ).toUpperCase() + txt.substr( 1 );
},
vend_pref = function( vend ) {
if( vend === "" ) {
return "";
} else {
return "-" + vend.charAt( 0 ).toLowerCase() + vend... | javascript | {
"resource": ""
} |
q19341 | handler | train | function handler() {
// Get the current orientation.
var orientation = get_orientation();
if ( orientation !== last_orientation ) {
// The orientation has changed, so trigger the orientationchange event.
last_orientation = orientation;
win.trigger( event_name );
}
} | javascript | {
"resource": ""
} |
q19342 | train | function( event ) {
// SAP MODIFICATION: if jQuery event is created programatically there's no originalEvent property. Therefore the existence of event.originalEvent needs to be checked.
var data = event.originalEvent && event.originalEvent.touches ?
event.originalEvent.touches[ 0 ] : event;
return {
... | javascript | {
"resource": ""
} | |
q19343 | stopHandler | train | function stopHandler( event ) {
$this.unbind( touchMoveEvent, moveHandler )
.unbind( touchStopEvent, stopHandler );
if ( start && stop ) {
$.event.special.swipe.handleSwipe( start, stop );
}
start = stop = undefined;
} | javascript | {
"resource": ""
} |
q19344 | parseDecimal | train | function parseDecimal(sValue) {
var aMatches;
if (typeof sValue !== "string") {
return undefined;
}
aMatches = rDecimal.exec(sValue);
if (!aMatches) {
return undefined;
}
return {
sign: aMatches[1] === "-" ? -1 : 1,
integerLength: aMatches[2].length,
// remove trailing decimal zeroes and p... | javascript | {
"resource": ""
} |
q19345 | decimalCompare | train | function decimalCompare(sValue1, sValue2) {
var oDecimal1, oDecimal2, iResult;
if (sValue1 === sValue2) {
return 0;
}
oDecimal1 = parseDecimal(sValue1);
oDecimal2 = parseDecimal(sValue2);
if (!oDecimal1 || !oDecimal2) {
return NaN;
}
if (oDecimal1.sign !== oDecimal2.sign) {
return oDecimal1.si... | javascript | {
"resource": ""
} |
q19346 | train | function(sId) {
var sNamespace = this.getMetadata().getNamespace();
sId = sNamespace + "." + sId;
return this.base ? this.base.byId(sId) : undefined;
} | javascript | {
"resource": ""
} | |
q19347 | train | function() {
var mMethods = {};
var oMetadata = this.getMetadata();
var aPublicMethods = oMetadata.getAllPublicMethods();
aPublicMethods.forEach(function(sMethod) {
var fnFunction = this[sMethod];
if (typeof fnFunction === 'function') {
mMethods[sMethod] = function() {
var tmp = ... | javascript | {
"resource": ""
} | |
q19348 | Version | train | function Version(versionStr) {
var match = rVersion.exec(versionStr) || [];
function norm(v) {
v = parseInt(v);
return isNaN(v) ? 0 : v;
}
Object.defineProperty(this, "major", {
enumerable: true,
value: norm(match[0])
});
Object.defineProperty(this, "minor", {
enumerable: true,
value: n... | javascript | {
"resource": ""
} |
q19349 | getConstructorDescription | train | function getConstructorDescription(symbol) {
var description = symbol.description;
var tags = symbol.tags;
if ( tags ) {
for (var i = 0; i < tags.length; i++) {
if ( tags[i].title === "ui5-settings" && tags[i].text) {
description += "\n</p><p>\n" + tags[i].text;
break;
}
}
}
return description;
} | javascript | {
"resource": ""
} |
q19350 | toPersian | train | function toPersian(oGregorian) {
var iJulianDayNumber = g2d(oGregorian.year, oGregorian.month + 1, oGregorian.day);
return d2j(iJulianDayNumber);
} | javascript | {
"resource": ""
} |
q19351 | toGregorian | train | function toGregorian(oPersian) {
var iJulianDayNumber = j2d(oPersian.year, oPersian.month + 1, oPersian.day);
return d2g(iJulianDayNumber);
} | javascript | {
"resource": ""
} |
q19352 | createDemoAppData | train | function createDemoAppData(oDemoAppMetadata, sLibUrl, sLibNamespace) {
// transform simple demo app link to a configuration object
var aLinks = [];
// transform link object to a bindable array of objects
if (jQuery.isPlainObject(oDemoAppMetadata.links)) {
aLinks = Object.keys(oDemoAppMetadata.links).map(func... | javascript | {
"resource": ""
} |
q19353 | train | function(oPosition) {
var oPos = oPosition.getComputedPosition();
var addStyle = function(oPosition, aBuffer, sPos, sVal){
if (sVal) {
aBuffer.push(sPos + ":" + sVal + ";");
}
};
var aBuffer = [];
addStyle(oPosition, aBuffer, "top", oPos.top);
addStyle(oPosition, aBuffer, "bottom", oPos.bottom);... | javascript | {
"resource": ""
} | |
q19354 | logUnsupportedPropertyInSelect | train | function logUnsupportedPropertyInSelect(sPath, sSelectedProperty, oDimensionOrMeasure) {
var sDimensionOrMeasure = oDimensionOrMeasure
instanceof sap.ui.model.analytics.odata4analytics.Dimension
? "dimension" : "measure";
if (oDimensionOrMeasure.getName() === sSelectedProperty) {
oLogger.warning("Ignor... | javascript | {
"resource": ""
} |
q19355 | trimAndCheckForDuplicates | train | function trimAndCheckForDuplicates(aSelect, sPath) {
var sCurrentProperty,
bError = false,
i,
n;
// replace all white-spaces before and after the value
for (i = 0, n = aSelect.length; i < n; i++) {
aSelect[i] = aSelect[i].trim();
}
// check for duplicate entries and remove from list
for (i = aS... | javascript | {
"resource": ""
} |
q19356 | train | function(sGroupId, iAutoExpandGroupsToLevel, iStartIndex, iLength) {
var iLevel = that._getGroupIdLevel(sGroupId);
if (iLevel == iAutoExpandGroupsToLevel) {
var aContext = that._getLoadedContextsForGroup(sGroupId, iStartIndex, iLength);
var iLastLoadedIndex = iStartIndex + aContext.length - 1;
if (aC... | javascript | {
"resource": ""
} | |
q19357 | train | function(sType, oEvent) {
if (!bHandleEvent) {
return;
}
// we need mapping of the different event types to get the correct target
var oMappedEvent = oEvent.type == "touchend" ? oEvent.changedTouches[0] : oEvent.touches[0];
// create the synthetic event
var newEvent = oDocument.createEvent('Mou... | javascript | {
"resource": ""
} | |
q19358 | train | function(oEvent) {
var oTouches = oEvent.touches,
oTouch;
bHandleEvent = (oTouches.length == 1 && !isInputField(oEvent));
bIsMoved = false;
if (bHandleEvent) {
oTouch = oTouches[0];
// As we are only interested in the first touch target, we remember it
oTarget = oTouch.target;
if (oTa... | javascript | {
"resource": ""
} | |
q19359 | train | function(oEvent) {
var oTouch;
if (bHandleEvent) {
oTouch = oEvent.touches[0];
// Check if the finger is moved. When the finger was moved, no "click" event is fired.
if (Math.abs(oTouch.clientX - iStartX) > 10 || Math.abs(oTouch.clientY - iStartY) > 10) {
bIsMoved = true;
}
if (bIsMove... | javascript | {
"resource": ""
} | |
q19360 | train | function() {
var aVariantManagementReferences = Object.keys(this.oData);
aVariantManagementReferences.forEach(function(sVariantManagementReference) {
var mPropertyBag = {
variantManagementReference: sVariantManagementReference,
currentVariantReference: this.oData[sVariantManagementReference].currentVaria... | javascript | {
"resource": ""
} | |
q19361 | getReportHtml | train | function getReportHtml(oData) {
return getResources().then(function () {
var styles = [],
scripts = [],
html = '',
i,
template = {},
reportContext = {};
for (i = 0; i < arguments.length; i++) {
switch (arguments[i].type) {
case 'template': html = arguments[i].content; break;
c... | javascript | {
"resource": ""
} |
q19362 | downloadReportZip | train | function downloadReportZip(oData) {
this.getReportHtml(oData).done(function (html) {
var report = '<!DOCTYPE HTML><html><head><title>Report</title></head><body><div id="sap-report-content">' + html + '</div></body></html>';
var issues = { 'issues': oData.issues };
var appInfos = { 'appInfos': oData.applicati... | javascript | {
"resource": ""
} |
q19363 | openReport | train | function openReport(oData) {
// Create a hidden anchor. Open window outside of the promise otherwise browsers blocks the window.open.
var content = '';
var a = jQuery('<a style="display: none;"/>');
a.on('click', function () {
var reportWindow = window.open('', '_blank');
jQuery(reportWindow.document).rea... | javascript | {
"resource": ""
} |
q19364 | train | function(oHandle) {
var that = this,
$this = jQuery(this),
oAdditionalConfig = {
domRef: that,
eventName: sSimEventName,
sapEventName: sSapSimEventName,
eventHandle: oHandle
};
var fnHandlerWrapper = function(oEvent) {
fnHandler(oEvent, oAdditionalConfig);
};
... | javascript | {
"resource": ""
} | |
q19365 | train | function(oHandle) {
var $this = jQuery(this);
var fnHandler = oHandle.__sapSimulatedEventHandler;
$this.removeData(sHandlerKey + oHandle.guid);
for (var i = 0; i < aOrigEvents.length; i++) {
jQuery.event.remove(this, aOrigEvents[i], fnHandler);
}
} | javascript | {
"resource": ""
} | |
q19366 | train | function () {
var oCore = sap.ui.getCore();
var oAlreadyLoadedLibraries = oCore.getLoadedLibraries();
var aPromises = [];
jQuery.each(oAlreadyLoadedLibraries, function (sLibraryName, oLibrary) {
if (oLibrary.extensions && oLibrary.extensions.flChangeHandlers) {
aPromises.push(this._registerFlexCha... | javascript | {
"resource": ""
} | |
q19367 | URLWhitelistEntry | train | function URLWhitelistEntry(protocol, host, port, path){
if (protocol) {
this.protocol = protocol.toUpperCase();
}
if (host) {
this.host = host.toUpperCase();
}
this.port = port;
this.path = path;
} | javascript | {
"resource": ""
} |
q19368 | train | function (aButtons) {
var iButtonsEnabled = this._getNumberOfEnabledButtons(aButtons);
if (iButtonsEnabled !== 0) {
this._hideDisabledButtons(aButtons);
}
this._iButtonsVisible = this._hideButtonsInOverflow(aButtons);
if (this._iButtonsVisible === this.getMaxButtonsDisplayed() && this._iButtonsVisib... | javascript | {
"resource": ""
} | |
q19369 | train | function (aButtons) {
this._iFirstVisibleButtonIndex = 0;
aButtons.forEach(function (oButton) {
oButton.setVisible(true);
oButton._bInOverflow = true;
});
} | javascript | {
"resource": ""
} | |
q19370 | train | function (aButtons) {
var iButtonsEnabled = 0;
for (var i = 0; i < aButtons.length; i++) {
if (aButtons[i].getEnabled()) {
iButtonsEnabled++;
if (!this._iFirstVisibleButtonIndex) {
this._iFirstVisibleButtonIndex = i;
}
}
}
return iButtonsEnabled;
} | javascript | {
"resource": ""
} | |
q19371 | train | function (aButtons) {
var iVisibleButtons = 0;
aButtons.forEach(function (oButton) {
oButton.setVisible(oButton.getEnabled());
if (oButton.getEnabled()) {
iVisibleButtons++;
}
});
return iVisibleButtons;
} | javascript | {
"resource": ""
} | |
q19372 | train | function (aButtons) {
var iVisibleButtons = 0;
for (var i = 0; i < aButtons.length; i++) {
if (iVisibleButtons < this.getMaxButtonsDisplayed() && aButtons[i].getVisible()) {
iVisibleButtons++;
} else {
aButtons[i].setVisible(false);
}
}
return iVisibleButtons;
} | javascript | {
"resource": ""
} | |
q19373 | train | function (aButtons) {
for (var i = aButtons.length - 1; i >= 0; i--) {
if (aButtons[i].getVisible()) {
aButtons[i].setVisible(false);
this.addOverflowButton();
return;
}
}
} | javascript | {
"resource": ""
} | |
q19374 | train | function (oSource, bContextMenu) {
this.getPopover().setShowArrow(true);
var sOverlayId = (oSource.getId && oSource.getId()) || oSource.getAttribute("overlay");
var sFakeDivId = "contextMenuFakeDiv";
// get Dimensions of Overlay and Viewport
var oOverlayDimensions = this._getOverlayDimensions(sOverlayId... | javascript | {
"resource": ""
} | |
q19375 | train | function (bWithArrow) {
var oPopover = {};
var bCompact = this._bCompactMode;
var fArrowHeight = this._getArrowHeight(bCompact);
var iBaseFontsize = this._getBaseFontSize();
this._iFirstVisibleButtonIndex = null;
oPopover.height = parseInt(jQuery("#" + this.getPopover().getId()).css("height")) || 40;... | javascript | {
"resource": ""
} | |
q19376 | train | function (bCompact) {
if (sap.ui.Device.browser.internet_explorer || sap.ui.Device.browser.edge) {
return bCompact ? 0.5 : 0.5;
} else {
return bCompact ? 0.5625 : 0.5625;
}
} | javascript | {
"resource": ""
} | |
q19377 | train | function (sOverlayId) {
var oOverlayDimensions = jQuery("#" + sOverlayId).rect();
oOverlayDimensions.right = oOverlayDimensions.left + oOverlayDimensions.width;
oOverlayDimensions.bottom = oOverlayDimensions.top + oOverlayDimensions.height;
return oOverlayDimensions;
} | javascript | {
"resource": ""
} | |
q19378 | train | function () {
var oViewport = {};
oViewport.width = window.innerWidth;
oViewport.height = window.innerHeight;
oViewport.top = parseInt(jQuery(".type_standalone").css("height")) || 0;
oViewport.bottom = oViewport.top + oViewport.height;
return oViewport;
} | javascript | {
"resource": ""
} | |
q19379 | train | function() {
var sOverflowButtonId = "OVERFLOW_BUTTON",
oButtonOptions = {
icon: "sap-icon://overflow",
type: "Transparent",
enabled: true,
press: this._onOverflowPress.bind(this),
layoutData: new FlexItemData({})
};
return this._addButton(sOverflowButtonId, oButtonOptions);
} | javascript | {
"resource": ""
} | |
q19380 | train | function(oButtonItem, fnContextMenuHandler, aElementOverlays) {
var fnHandler = function(oEvent) {
this.bOpen = false;
this.bOpenNew = false;
fnContextMenuHandler(this);
};
var sText = typeof oButtonItem.text === "function" ? oButtonItem.text(aElementOverlays[0]) : oButtonItem.text;
var bEnable... | javascript | {
"resource": ""
} | |
q19381 | train | function (bExplicitClose) {
if (this.getPopover()) {
if (bExplicitClose) {
this.getPopover(true).close();
this.getPopover(false).close();
}
// deletes the overflow button if there is one
if (this.getProperty("buttons").length > this.getProperty("maxButtonsDisplayed")) {
this.setProper... | javascript | {
"resource": ""
} | |
q19382 | train | function (iIndex) {
this.setProperty("buttons", this.getProperty("buttons").splice(iIndex, 1));
this.getFlexbox(true).removeItem(iIndex);
return this.getFlexbox(false).removeItem(iIndex);
} | javascript | {
"resource": ""
} | |
q19383 | train | function (_aButtons, fnContextMenuHandler, aElementOverlays) {
this.removeAllButtons();
_aButtons.forEach(function (oButton) {
this.addMenuButton(oButton, fnContextMenuHandler, aElementOverlays);
}.bind(this));
} | javascript | {
"resource": ""
} | |
q19384 | train | function (oEvent) {
if (document.activeElement) {
var sId = document.activeElement.id;
switch (oEvent.key) {
case "ArrowRight":
this._changeFocusOnButtons(sId);
break;
case "ArrowLeft":
this._changeFocusOnButtons(sId, true);
break;
case "ArrowUp":
this._changeFocu... | javascript | {
"resource": ""
} | |
q19385 | train | function (sId, bPrevious) {
this.getButtons().some(function (oButton, iIndex, aArray) {
if (sId === oButton.getId()) {
if (bPrevious) {
this._setFocusOnPreviousButton(aArray, iIndex);
} else {
this._setFocusOnNextButton(aArray, iIndex);
}
return true;
}
}.bind(this));
} | javascript | {
"resource": ""
} | |
q19386 | train | function (aButtons, iIndex) {
for (var i0 = iIndex - 1; i0 >= 0; i0--) {
if (this._setFocusOnButton(aButtons[i0])) {
return;
}
}
for (var i1 = aButtons.length - 1; i1 >= iIndex; i1--) {
if (this._setFocusOnButton(aButtons[i1])) {
return;
}
}
} | javascript | {
"resource": ""
} | |
q19387 | fnIsValidForMove | train | function fnIsValidForMove(oOverlay, bOnRegistration) {
var bValid = false,
oDesignTimeMetadata = oOverlay.getDesignTimeMetadata(),
oParentElementOverlay = oOverlay.getParentElementOverlay();
if (!oDesignTimeMetadata || !oParentElementOverlay) {
return false;
}
var oRelevantContainer = oOverlay.getRel... | javascript | {
"resource": ""
} |
q19388 | train | function(iStartIndex) {
// check in the sections which where loaded
for (var i = 0; i < that._mLoadedSections[sNodeId].length; i++) {
var oSection = that._mLoadedSections[sNodeId][i];
// try to find i in the loaded sections. If i is within one of the sections it needs not to be loaded again
if (iStart... | javascript | {
"resource": ""
} | |
q19389 | train | function (sKey) {
var aFiltered = FilterProcessor.apply([sKey], oCombinedFilter, function(vRef, sPath) {
var oContext = that.oModel.getContext('/' + vRef);
return that.oModel.getProperty(sPath, oContext);
});
return aFiltered.length > 0;
} | javascript | {
"resource": ""
} | |
q19390 | train | function(sKey, sPath) {
oContext = that.oModel.getContext('/' + sKey);
return that.oModel.getProperty(sPath, oContext);
} | javascript | {
"resource": ""
} | |
q19391 | train | function(oRuleDef, oRuleset) {
oRuleDef = TableSupportHelper.normalizeRule(oRuleDef);
var sResult = oRuleset.addRule(oRuleDef);
if (sResult != "success") {
Log.warning("Support Rule '" + oRuleDef.id + "' for library sap.ui.table not applied: " + sResult);
}
} | javascript | {
"resource": ""
} | |
q19392 | train | function(oIssueManager, sText, sSeverity, sControlId) {
oIssueManager.addIssue({
severity: sSeverity || Severity.Medium,
details: sText,
context: {id: sControlId || "WEBPAGE"}
});
} | javascript | {
"resource": ""
} | |
q19393 | train | function(oScope, bVisibleOnly, sType) {
var mElements = oScope.getElements();
var aResult = [];
for (var n in mElements) {
var oElement = mElements[n];
if (oElement.isA(sType)) {
if (bVisibleOnly && oElement.getDomRef() || !bVisibleOnly) {
aResult.push(oElement);
}
}
}
return ... | javascript | {
"resource": ""
} | |
q19394 | train | function(fnFilter, fnCheck) {
var aLog = Log.getLogEntries(); //oScope.getLoggedObjects(); /*getLoggedObjects returns only log entries with supportinfo*/
var oLogEntry;
for (var i = 0; i < aLog.length; i++) {
oLogEntry = aLog[i];
if (fnFilter(oLogEntry)) {
if (fnCheck(oLogEntry)) {
return;
... | javascript | {
"resource": ""
} | |
q19395 | train | function(oThis, oEvent){
oThis.fireRefineSearch({
query: oThis._sSearchQuery,
changedAttribute: oEvent.getParameter("attribute"),
allSelectedAttributes: oEvent.getParameter("allAttributes")
});
} | javascript | {
"resource": ""
} | |
q19396 | train | function () {
var pInstanceCreation, oMsr = startMeasurements("_getInstance"),
that = this;
pInstanceCreation = new Promise(function (resolve, reject) {
var oInstance;
Log.debug("Cache Manager: Initialization...");
if (!CacheManager._instance) {
oInstance = that._findImplementation()... | javascript | {
"resource": ""
} | |
q19397 | train | function (key, value) {
var pSet, oMsr = startMeasurements("set", key);
Log.debug("Cache Manager: Setting value of type[" + typeof value + "] with key [" + key + "]");
pSet = this._callInstanceMethod("set", arguments).then(function callInstanceHandler() {
Log.debug("Cache Manager: Setting key [" + key... | javascript | {
"resource": ""
} | |
q19398 | train | function (key) {
var pGet,
oMsr = startMeasurements("get", key);
Log.debug("Cache Manager: Getting key [" + key + "]");
pGet = this._callInstanceMethod("get", arguments).then(function callInstanceHandler(v) {
Log.debug("Cache Manager: Getting key [" + key + "] done");
oMsr.endAsync();
... | javascript | {
"resource": ""
} | |
q19399 | train | function (key) {
var pHas, oMsr = startMeasurements("has", key);
Log.debug("Cache Manager: has key [" + key + "] called");
pHas = this._callInstanceMethod("has", arguments).then(function callInstanceHandler(result) {
oMsr.endAsync();
Log.debug("Cache Manager: has key [" + key + "] returned " + re... | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.