Sha256: 9d35f44e0e475c4119f8febff8069d8b58e065a1d5d2a76171f2715b79c179c2

Contents?: true

Size: 1.97 KB

Versions: 3

Compression:

Stored size: 1.97 KB

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([],
	function() {
	"use strict";


	/**
	 * BusyIndicator renderer.
	 * @namespace
	 */
	var BusyIndicatorRenderer = {
	};


	/**
	 * Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
	 *
	 * @param {sap.ui.core.RenderManager} oRenderManager the RenderManager that can be used for writing to the Render-Output-Buffer
	 * @param {sap.ui.core.Control} oBusyInd an object representation of the control that should be rendered
	 */
	BusyIndicatorRenderer.render = function (oRm, oBusyInd) {
		this.startBusyIndicator(oRm, oBusyInd);

		this.renderBusyIndication(oRm, oBusyInd);

		this.renderLabel(oRm, oBusyInd);

		this.endBusyIndicator(oRm);
	};

	BusyIndicatorRenderer.startBusyIndicator = function (oRm, oBusyInd) {
		oRm.write("<div ");
		oRm.writeControlData(oBusyInd);

		oRm.addClass("sapMBusyIndicator");
		oRm.writeClasses();

		oRm.addStyle("font-size", oBusyInd.getSize());
		oRm.writeStyles();

		oRm.writeAccessibilityState(oBusyInd);
		this.renderTooltip(oRm, oBusyInd.getTooltip_AsString());

		oRm.write(">");
	};

	BusyIndicatorRenderer.renderTooltip = function (oRm, sTooltip) {
		if (sTooltip) {
			oRm.writeAttributeEscaped("title", sTooltip);
		}
	};

	BusyIndicatorRenderer.renderBusyIndication = function (oRm, oBusyInd) {
		if (oBusyInd.getCustomIcon()) {
			oRm.renderControl(oBusyInd._iconImage);
		} else {
			oRm.write("<div class='sapMBusyIndicatorBusyArea'");
			oRm.writeAttribute("id", oBusyInd.getId() + "-busy-area");
			oRm.write("></div>");
		}
	};

	BusyIndicatorRenderer.renderLabel = function (oRm, oBusyInd) {
		if (oBusyInd.getText()) {
			oRm.renderControl(oBusyInd._busyLabel);
		}
	};

	BusyIndicatorRenderer.endBusyIndicator = function (oRm) {
		oRm.write("</div>");
	};

	return BusyIndicatorRenderer;

}, /* bExport= */ true);

Version data entries

3 entries across 3 versions & 1 rubygems

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