Sha256: 4957593298ac807a83d062941fd3499692e73332f394335d1d884c08d06c62ab

Contents?: true

Size: 1013 Bytes

Versions: 3

Compression:

Stored size: 1013 Bytes

Contents

/*!
 * UI development toolkit for HTML5 (OpenUI5)
 * (c) Copyright 2009-2018 SAP SE or an SAP affiliate company.
 * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
 */

sap.ui.define([
	"sap/m/CustomListItemRenderer",
	"sap/ui/core/Renderer",
	"sap/ui/Device"
], function (CustomListItemRenderer, Renderer, Device) {
	"use strict";

	var BoxRenderer = Renderer.extend(CustomListItemRenderer);

	BoxRenderer.renderLIAttributes = function (rm, oLI) {
		CustomListItemRenderer.renderLIAttributes(rm, oLI);
		rm.addClass("sapTntBox");
		this.renderWidthStyle(rm, oLI);
	};

	BoxRenderer.renderWidthStyle = function (rm, oLI) {
		var oBoxContainerList = oLI.getList(),
			sWidth;

		if (!Device.browser.msie) {
			return;
		}

		if (oBoxContainerList && oBoxContainerList.getMetadata().getName() === "sap.tnt.BoxContainerList") {
			sWidth = oBoxContainerList.getBoxWidth() || oBoxContainerList.getBoxMinWidth();
		}

		if (sWidth) {
			rm.addStyle("width", sWidth);
		}
	};

	return BoxRenderer;
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fiveapples-0.0.7 lib/openui5-runtime-1.60.23/resources/sap/tnt/BoxRenderer-dbg.js
fiveapples-0.0.6 lib/openui5-runtime-1.60.23/resources/sap/tnt/BoxRenderer-dbg.js
fiveapples-0.0.5 lib/openui5-runtime-1.60.23/resources/sap/tnt/BoxRenderer-dbg.js