pluginsCtrl.js
1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
'use strict';
angular.module('newApp')
.controller('pluginsCtrl', ['$scope', 'pluginsService', function ($scope, pluginsService) {
$scope.$on('$viewContentLoaded', function () {
/**** DATE AND TIME PLUGINS ****/
/* Inline Date & Time picker */
$('#inline_datetimepicker').datetimepicker({
altField: "#inline_datetimepicker_alt",
altFieldTimeOnly: false,
isRTL: $('body').hasClass('rtl') ? true : false
});
/**** COLOR PICKER PLUGINS ****/
/* Color Picker */
/* You can initialize all options directly in input except for palette */
$("#colorpicker1").spectrum({
palette: [
['black', 'white', 'blanchedalmond'],
['rgb(255, 128, 0);', 'hsv 100 70 50', 'lightyellow']
]
});
$("#colorpicker2").spectrum({
palette: [
['black', 'white', 'blanchedalmond',
'rgb(255, 128, 0);', 'hsv 100 70 50'],
['red', 'yellow', 'green', 'blue', 'violet']
]
});
$("#colorpicker1, #colorpicker2").show();
pluginsService.init();
});
}]);