/*! * 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/ui/core/IconPool'], function(IconPool) { "use strict"; // TODO: consider making this conditional IconPool.insertFontFaceStyle(); /** * PullToRefresh renderer. * @namespace */ var PullToRefreshRenderer = { }; /** * Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}. * * @param {sap.ui.core.RenderManager} oRm the RenderManager that can be used for writing to the render output buffer * @param {sap.ui.core.Control} oControl an object representation of the control that should be rendered */ PullToRefreshRenderer.render = function(oRm, oControl){ var bShowIcon = oControl.getShowIcon(); var sCustomIcon = oControl.getCustomIcon(); var sTooltip = oControl.getTooltip_AsString(); var oResourceBundle = oControl._getRB(); oRm.write(""); // aria attribute if (bShowIcon && sCustomIcon) { var oCustomImage = oControl.getCustomIconImage(); if (oCustomImage) { oRm.write("
"); oRm.renderControl(oCustomImage); oRm.write("
"); } } // Pull down arrow icon oRm.write(""); // Busy Indicator oRm.write(""); oRm.renderControl(oControl._oBusyIndicator); oRm.write(""); // Text - Pull down to refresh oRm.write(""); oRm.writeEscaped(oResourceBundle.getText(oControl._bTouchMode ? "PULL2REFRESH_PULLDOWN" : "PULL2REFRESH_REFRESH")); oRm.write(""); // Info - last updated at xx:xx:xx oRm.write(""); oRm.writeEscaped(oControl.getDescription()); oRm.write(""); oRm.write(""); }; return PullToRefreshRenderer; }, /* bExport= */ true);