##// END OF EJS Templates
grunt: do not use crisper...
grunt: do not use crisper - fixed some polymer specific package problems

File last commit:

r3149:a1e63a84 default
r3156:6bd054a4 default
Show More
rhodecode-toggle.html
37 lines | 1.5 KiB | text/html | HtmlLexer
rhodecode-toggle: stub for new UI element
r715 <link rel="import" href="../../../../../../bower_components/paper-toggle-button/paper-toggle-button.html">
components: completed rhodecode-toggle for notification settings
r727 <link rel="import" href="../../../../../../bower_components/paper-spinner/paper-spinner.html">
<link rel="import" href="../../../../../../bower_components/paper-tooltip/paper-tooltip.html">
rhodecode-toggle: stub for new UI element
r715
<dom-module id="rhodecode-toggle">
components: completed rhodecode-toggle for notification settings
r727
<style include="shared-styles"></style>
<link rel="stylesheet" href="rhodecode-toggle.css">
rhodecode-toggle: stub for new UI element
r715 <template>
components: completed rhodecode-toggle for notification settings
r727 <div class="rc-toggle">
<paper-toggle-button checked={{checked}}>[[labelStatus(checked)]]</paper-toggle-button>
<paper-tooltip>[[tooltipText]]</paper-tooltip>
<template is="dom-if" if="[[shouldShow(noSpinner)]]">
<paper-spinner active=[[active]]></paper-spinner>
</template>
</div>
rhodecode-toggle: stub for new UI element
r715 </template>
polymer: prepare for 3.x migration
r3149 <script>
Polymer({
is: 'rhodecode-toggle',
properties: {
noSpinner: { type: Boolean, value: false, reflectToAttribute:true},
tooltipText: { type: String, value: "Click to toggle", reflectToAttribute:true},
checked: { type: Boolean, value: false, reflectToAttribute:true},
active: { type: Boolean, value: false, reflectToAttribute:true, notify:true}
},
shouldShow: function(){
return !this.noSpinner
},
labelStatus: function(isActive){
return this.checked? 'Enabled' : "Disabled"
}
});
</script>
</dom-module>