Sha256: c3b190223d8667854a1533fe2b7523f56d3d299ce692f6e6136dced433a67a55
Contents?: true
Size: 1.83 KB
Versions: 3
Compression:
Stored size: 1.83 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(['sap/ui/core/Renderer','sap/ui/core/LabelEnablement','sap/ui/core/library'],function(R,L,c){"use strict";var T=c.TextDirection;var a={};a.render=function(r,C){var t=C.getTextDirection(),s=R.getTextAlign(C.getTextAlign(),t),S=C.getAriaLabelledBy().indexOf(C.getId())===-1&&(C.getAriaLabelledBy().length>0||L.getReferencingLabels(C).length>0||(C.getParent()&&C.getParent().enhanceAccessibilityState)),A={role:'link',labelledby:S?{value:C.getId(),append:true}:undefined},h=C.getHref(),i=h&&C._isHrefValid(h),e=C.getEnabled();r.write("<a");r.writeControlData(C);r.addClass("sapMLnk");if(C.getSubtle()){r.addClass("sapMLnkSubtle");if(A.describedby){A.describedby+=" "+C._sAriaLinkSubtleId;}else{A.describedby=C._sAriaLinkSubtleId;}}if(C.getEmphasized()){r.addClass("sapMLnkEmphasized");if(A.describedby){A.describedby+=" "+C._sAriaLinkEmphasizedId;}else{A.describedby=C._sAriaLinkEmphasizedId;}}if(!e){r.addClass("sapMLnkDsbl");r.writeAttribute("disabled","true");}else{r.writeAttribute("tabIndex",C._getTabindex());}if(C.getWrapping()){r.addClass("sapMLnkWrapping");}if(C.getTooltip_AsString()){r.writeAttributeEscaped("title",C.getTooltip_AsString());}if(i&&e){r.writeAttributeEscaped("href",h);}if(C.getTarget()){r.writeAttributeEscaped("target",C.getTarget());}if(C.getWidth()){r.addStyle("width",C.getWidth());}else{r.addClass("sapMLnkMaxWidth");}if(s){r.addStyle("text-align",s);}if(t!==T.Inherit){r.writeAttribute("dir",t.toLowerCase());}r.writeAccessibilityState(C,A);r.writeClasses();r.writeStyles();r.write(">");if(this.writeText){this.writeText(r,C);}else{this.renderText(r,C);}r.write("</a>");};a.renderText=function(r,C){r.writeEscaped(C.getText());};return a;},true);
Version data entries
3 entries across 3 versions & 1 rubygems