|
1 | 1 | angular.module('color.picker').run(['$templateCache', function($templateCache) { |
2 | | - $templateCache.put('template/color-picker/directive.html', |
3 | | - '<div class="color-picker-wrapper" ng-class="{\'color-picker-swatch-only\': config.swatchOnly}">\n' + |
4 | | - ' <input class="color-picker-input form-control" type="text" ng-model="ngModel" size="7" ng-focus="show()" ng-class="{\'color-picker-input-swatch\': config.swatch && !config.swatchOnly && config.swatchPos === \'left\'}">\n' + |
5 | | - ' <span class="color-picker-swatch" ng-click="focus()" ng-show="config.swatch" ng-class="{\'color-picker-swatch-left\': config.swatchPos !== \'right\', \'color-picker-swatch-right\': config.swatchPos === \'right\'}">\n' + |
6 | | - ' <span class="color-picker-swatch-color" style="background-color: {{swatchColor}};"></span>\n' + |
7 | | - ' </span>\n' + |
8 | | - ' <div class="color-picker-panel" ng-show="visible" ng-class="{\n' + |
9 | | - ' \'color-picker-panel-top color-picker-panel-right\': config.pos === \'top right\',\n' + |
10 | | - ' \'color-picker-panel-top color-picker-panel-left\': config.pos === \'top left\',\n' + |
11 | | - ' \'color-picker-panel-bottom color-picker-panel-right\': config.pos === \'bottom right\',\n' + |
12 | | - ' \'color-picker-panel-bottom color-picker-panel-left\': config.pos === \'bottom left\',\n' + |
13 | | - ' }">\n' + |
14 | | - ' <div class="color-picker-hue color-picker-sprite" ng-click="hueChange($event, true)" ng-mousemove="hueChange($event, false)" ng-mousedown="hueDown()" ng-mouseup="hueUp()">\n' + |
15 | | - ' <div class="color-picker-slider" style="top: {{huePos}}%;"></div>\n' + |
16 | | - ' </div>\n' + |
17 | | - ' <div class="color-picker-opacity color-picker-sprite" ng-show="config.alpha" ng-click="opacityChange($event, true)" ng-mousemove="opacityChange($event, false)" ng-mousedown="opacityDown()" ng-mouseup="opacityUp()">\n' + |
18 | | - ' <div class="color-picker-slider" style="top: {{opacityPos}}%;"></div>\n' + |
19 | | - ' </div>\n' + |
20 | | - ' <div class="color-picker-grid color-picker-sprite" style="background-color: {{grid}};" ng-click="colorChange($event, true)" ng-mousemove="colorChange($event, false)" ng-mousedown="colorDown()" ng-mouseup="colorUp()">\n' + |
21 | | - ' <div class="color-picker-grid-inner"></div>\n' + |
22 | | - ' <div class="color-picker-picker" style="top: {{lightnessPos}}%; left: {{saturationPos}}%;">\n' + |
23 | | - ' <div></div>\n' + |
24 | | - ' </div>\n' + |
25 | | - ' </div>\n' + |
26 | | - ' </div>\n' + |
27 | | - '</div>' + |
28 | | - ''); |
| 2 | + $templateCache.put('template/color-picker/directive.html', |
| 3 | + '<div class="color-picker-wrapper" ng-class="{\'color-picker-swatch-only\': config.swatchOnly}">\n' + |
| 4 | + ' <div ng-class="{\'input-group\': config.swatchBootstrap}">\n' + |
| 5 | + ' <span ng-if="config.swatchPos === \'left\'" class="color-picker-swatch" ng-click="focus()" ng-show="config.swatch" ng-class="{\'color-picker-swatch-left\': config.swatchPos !== \'right\', \'color-picker-swatch-right\': config.swatchPos === \'right\', \'input-group-addon\': config.swatchBootstrap}">\n' + |
| 6 | + ' <span class="color-picker-swatch-color" style="background-color: {{swatchColor}};"></span>\n' + |
| 7 | + ' </span>\n' + |
| 8 | + ' <input class="color-picker-input form-control" type="text" ng-model="ngModel" size="7" ng-focus="show()" ng-class="{\'color-picker-input-swatch\': config.swatch && !config.swatchOnly && config.swatchPos === \'left\'}">\n' + |
| 9 | + ' <span ng-if="config.swatchPos === \'right\'" class="color-picker-swatch" ng-click="focus()" ng-show="config.swatch" ng-class="{\'color-picker-swatch-left\': config.swatchPos !== \'right\', \'color-picker-swatch-right\': config.swatchPos === \'right\', \'input-group-addon\': config.swatchBootstrap}">\n' + |
| 10 | + ' <span class="color-picker-swatch-color" style="background-color: {{swatchColor}};"></span>\n' + |
| 11 | + ' </span>\n' + |
| 12 | + ' </div>\n' + |
| 13 | + ' <div class="color-picker-panel" ng-show="visible" ng-class="{\n' + |
| 14 | + ' \'color-picker-panel-top color-picker-panel-right\': config.pos === \'top right\',\n' + |
| 15 | + ' \'color-picker-panel-top color-picker-panel-left\': config.pos === \'top left\',\n' + |
| 16 | + ' \'color-picker-panel-bottom color-picker-panel-right\': config.pos === \'bottom right\',\n' + |
| 17 | + ' \'color-picker-panel-bottom color-picker-panel-left\': config.pos === \'bottom left\',\n' + |
| 18 | + ' }">\n' + |
| 19 | + ' <div class="color-picker-hue color-picker-sprite" ng-click="hueChange($event, true)" ng-mousemove="hueChange($event, false)" ng-mousedown="hueDown()" ng-mouseup="hueUp()">\n' + |
| 20 | + ' <div class="color-picker-slider" style="top: {{huePos}}%;"></div>\n' + |
| 21 | + ' </div>\n' + |
| 22 | + ' <div class="color-picker-opacity color-picker-sprite" ng-show="config.alpha" ng-click="opacityChange($event, true)" ng-mousemove="opacityChange($event, false)" ng-mousedown="opacityDown()" ng-mouseup="opacityUp()">\n' + |
| 23 | + ' <div class="color-picker-slider" style="top: {{opacityPos}}%;"></div>\n' + |
| 24 | + ' </div>\n' + |
| 25 | + ' <div class="color-picker-grid color-picker-sprite" style="background-color: {{grid}};" ng-click="colorChange($event, true)" ng-mousemove="colorChange($event, false)" ng-mousedown="colorDown()" ng-mouseup="colorUp()">\n' + |
| 26 | + ' <div class="color-picker-grid-inner"></div>\n' + |
| 27 | + ' <div class="color-picker-picker" style="top: {{lightnessPos}}%; left: {{saturationPos}}%;">\n' + |
| 28 | + ' <div></div>\n' + |
| 29 | + ' </div>\n' + |
| 30 | + ' </div>\n' + |
| 31 | + ' </div>\n' + |
| 32 | + '</div>' |
| 33 | + ); |
| 34 | + |
29 | 35 | }]); |
0 commit comments