Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. <aura:component implements="forceCommunity:availableForAllPageTypes,flexipage:availableForAllPageTypes">
  2.  
  3. <!-- Set by Parent Component -->
  4. <aura:attribute name="numerator" type="Decimal" />
  5. <aura:attribute name="numeratorLabel" type="String"/>
  6. <aura:attribute name="denominatorIsSet" type="Boolean" default="true"/>
  7. <aura:attribute name="denominatorPlaceholder" type="String" default="TBD"/>
  8. <aura:attribute name="denominator" type="Decimal" />
  9. <aura:attribute name="denominatorLabel" type="String"/>
  10. <aura:attribute name="alarm" type="boolean" default="false"/>
  11. <aura:attribute name="title" type="String" />
  12. <aura:attribute name="desc" type="String" />
  13.  
  14. <!-- set by Controller -->
  15. <aura:attribute name="denominatorInt" type="Decimal" />
  16. <aura:attribute name="percentageTotal" type="Decimal" />
  17.  
  18. <aura:method name="updateBar" action="{!c.doUpdateBar}" description="Call when all settable attributes have been set."/>
  19.  
  20. <!-- Body -->
  21. <div>
  22. <div class="msc-text" style="margin-bottom:1rem;">
  23. <div class="slds-text-heading_medium">{!v.title}</div>
  24.  
  25. <div class="slds-text-body_small">{!v.desc}</div>
  26. </div>
  27.  
  28. <div class="slds-progress-bar" aria-valuemin="0" aria-valuemax="{!v.denominator}" aria-valuenow="{!v.numerator}" role="progressbar">
  29. <span aura:id="coloredBar" class="slds-progress-bar__value" style="{! 'width: ' + v.percentageTotal + '%;' }">
  30. <span class="slds-assistive-text">Progress: {!v.numerator}</span>
  31. </span>
  32. </div>
  33.  
  34. <div class="msc-labeltown">
  35. <figure aura:id="alarmText" class="msc-lt-item msc-iefix">
  36. <div class="msc-iefix2">
  37. <label class="msc-iefix4">{!v.numeratorLabel}</label>
  38. </div>
  39.  
  40. <span class="msc-iefix3">{!v.numerator}</span>
  41. </figure>
  42.  
  43. <figure class="msc-lt-item msc-iefix" style="display:flex;align-items:center;">
  44. <div class="msc-iefix2">
  45. <label class="msc-iefix4" >{!v.denominatorLabel}</label>
  46. </div>
  47.  
  48. <aura:if isTrue="{!v.denominatorIsSet}">
  49. <span class="msc-iefix3">{!v.denominatorInt}</span>
  50. <aura:set attribute="else">
  51. <span class="msc-iefix3">{!v.denominatorPlaceholder}</span>
  52. </aura:set>
  53. </aura:if>
  54. </figure>
  55. </div>
  56. </div>
  57.  
  58. </aura:component>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement