mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-23 11:18:54 +00:00
(js) Improve sgColorPicker directive
- replaced sg-on-select by ng-model; - set button background (no more wrapping necessary).
This commit is contained in:
1 parent
b02a4f82a0
commit
ddf97ebb13
4 files changed
+31
-33
No files matched your search
@@ -144,19 +144,17 @@
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
PropertiesDialogController.$inject = ['$timeout', '$mdDialog', 'srcCalendar'];
|
||||
function PropertiesDialogController($timeout, $mdDialog, srcCalendar) {
|
||||
PropertiesDialogController.$inject = ['$scope', '$mdDialog', 'srcCalendar'];
|
||||
function PropertiesDialogController($scope, $mdDialog, srcCalendar) {
|
||||
var vm = this;
|
||||
|
||||
vm.calendar = new Calendar(srcCalendar.$omit());
|
||||
vm.setColor = setColor;
|
||||
vm.saveProperties = saveProperties;
|
||||
vm.close = close;
|
||||
|
||||
function setColor(color) {
|
||||
vm.calendar.color = color;
|
||||
srcCalendar.color = color;
|
||||
}
|
||||
$scope.$watch('properties.calendar.color', function() {
|
||||
srcCalendar.color = vm.calendar.color;
|
||||
});
|
||||
|
||||
function saveProperties() {
|
||||
vm.calendar.$save();
|
||||
|
||||
Reference in new issue
Block a user