(js,html) Use md-switch in Calendars list
This commit is contained in:
parent
badab13cec
commit
5211e339fb
1
NEWS
1
NEWS
|
@ -11,6 +11,7 @@ Enhancements
|
||||||
- [core] updated time zones to version 2016i
|
- [core] updated time zones to version 2016i
|
||||||
- [eas] now also search on senders when using EAS Search ops
|
- [eas] now also search on senders when using EAS Search ops
|
||||||
- [web] allow multiple messages to be marked as seen (#3873)
|
- [web] allow multiple messages to be marked as seen (#3873)
|
||||||
|
- [web] use switches instead of checkboxes in Calendars module
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- [core] fixed condition in weekly recurrence calculator
|
- [core] fixed condition in weekly recurrence calculator
|
||||||
|
|
|
@ -57,11 +57,11 @@
|
||||||
as-sortable="app.sortableCalendars" is-disabled="!app.sortableMode">
|
as-sortable="app.sortableCalendars" is-disabled="!app.sortableMode">
|
||||||
<md-list-item ng-repeat="calendar in app.service.$calendars | filter:app.filter"
|
<md-list-item ng-repeat="calendar in app.service.$calendars | filter:app.filter"
|
||||||
as-sortable-item="as-sortable-item">
|
as-sortable-item="as-sortable-item">
|
||||||
<md-checkbox ng-model="calendar.active"
|
<md-switch ng-model="calendar.active"
|
||||||
ng-class="calendar.getClassName('checkbox')"
|
ng-class="calendar.getClassName('md-switch')"
|
||||||
ng-true-value="1"
|
ng-true-value="1"
|
||||||
ng-false-value="0"
|
ng-false-value="0"
|
||||||
label:aria-label="Enable"><!-- enable --></md-checkbox>
|
label:aria-label="Enable"><!-- enable --></md-switch>
|
||||||
<p class="sg-item-name"
|
<p class="sg-item-name"
|
||||||
ng-dblclick="app.editFolder(calendar)"
|
ng-dblclick="app.editFolder(calendar)"
|
||||||
ng-show="app.editMode != calendar.id">
|
ng-show="app.editMode != calendar.id">
|
||||||
|
@ -162,12 +162,11 @@
|
||||||
as-sortable="app.sortableCalendars" is-disabled="!app.sortableMode">
|
as-sortable="app.sortableCalendars" is-disabled="!app.sortableMode">
|
||||||
<md-list-item ng-repeat="calendar in app.service.$subscriptions | filter:app.filter"
|
<md-list-item ng-repeat="calendar in app.service.$subscriptions | filter:app.filter"
|
||||||
as-sortable-item="as-sortable-item">
|
as-sortable-item="as-sortable-item">
|
||||||
<md-checkbox ng-model="calendar.active"
|
<md-switch ng-model="calendar.active"
|
||||||
ng-class="calendar.getClassName('checkbox')"
|
ng-class="calendar.getClassName('md-switch')"
|
||||||
ng-true-value="1"
|
ng-true-value="1"
|
||||||
ng-false-value="0"
|
ng-false-value="0"
|
||||||
label:aria-label="Enable"><!-- enable -->
|
label:aria-label="Enable"><!-- enable --></md-switch>
|
||||||
</md-checkbox>
|
|
||||||
<p class="sg-item-name"
|
<p class="sg-item-name"
|
||||||
ng-dblclick="app.editFolder(calendar)"
|
ng-dblclick="app.editFolder(calendar)"
|
||||||
ng-show="app.editMode != calendar.id">
|
ng-show="app.editMode != calendar.id">
|
||||||
|
@ -250,11 +249,11 @@
|
||||||
as-sortable="app.sortableCalendars" is-disabled="!app.sortableMode">
|
as-sortable="app.sortableCalendars" is-disabled="!app.sortableMode">
|
||||||
<md-list-item ng-repeat="calendar in app.service.$webcalendars | filter:app.filter"
|
<md-list-item ng-repeat="calendar in app.service.$webcalendars | filter:app.filter"
|
||||||
as-sortable-item="as-sortable-item">
|
as-sortable-item="as-sortable-item">
|
||||||
<md-checkbox ng-model="calendar.active"
|
<md-switch ng-model="calendar.active"
|
||||||
ng-class="calendar.getClassName('checkbox')"
|
ng-class="calendar.getClassName('md-switch')"
|
||||||
ng-true-value="1"
|
ng-true-value="1"
|
||||||
ng-false-value="0"
|
ng-false-value="0"
|
||||||
label:aria-label="Enable"><!-- enable --></md-checkbox>
|
label:aria-label="Enable"><!-- enable --></md-switch>
|
||||||
<p class="sg-item-name"
|
<p class="sg-item-name"
|
||||||
ng-dblclick="app.editFolder(calendar)"
|
ng-dblclick="app.editFolder(calendar)"
|
||||||
ng-show="app.editMode != calendar.id">
|
ng-show="app.editMode != calendar.id">
|
||||||
|
|
|
@ -65,6 +65,16 @@
|
||||||
' .checkbox-folder{{ cssCtrl.ngModel.id }}.md-checked .md-icon:after {',
|
' .checkbox-folder{{ cssCtrl.ngModel.id }}.md-checked .md-icon:after {',
|
||||||
' border-color: {{ cssCtrl.contrast(cssCtrl.ngModel.color) }} !important;',
|
' border-color: {{ cssCtrl.contrast(cssCtrl.ngModel.color) }} !important;',
|
||||||
' }',
|
' }',
|
||||||
|
/* Switch color */
|
||||||
|
' .md-switch-folder{{ cssCtrl.ngModel.id }}.md-checked .md-thumb {',
|
||||||
|
' background-color: {{ cssCtrl.ngModel.color }} !important;',
|
||||||
|
' }',
|
||||||
|
' .md-switch-folder{{ cssCtrl.ngModel.id }}.md-checked .md-bar {',
|
||||||
|
' background-color: {{ cssCtrl.transparent(cssCtrl.ngModel.color, "0.5") }} !important;',
|
||||||
|
' }',
|
||||||
|
' .md-switch-folder{{ cssCtrl.ngModel.id }} .md-bar {',
|
||||||
|
' background-color: {{ cssCtrl.transparent(cssCtrl.ngModel.color, "0.3") }} !important;',
|
||||||
|
' }',
|
||||||
'</style>'
|
'</style>'
|
||||||
].join('')
|
].join('')
|
||||||
};
|
};
|
||||||
|
@ -73,6 +83,11 @@
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
|
||||||
vm.contrast = contrast; // defined in Common/utils.js
|
vm.contrast = contrast; // defined in Common/utils.js
|
||||||
|
vm.transparent = function(hex, ratio) {
|
||||||
|
var color = hexToRgb(hex);
|
||||||
|
|
||||||
|
return ['rgba(' + color.r, color.g, color.b, ratio + ')'].join(',');
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue