This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module \app.services .factory \Colorpicker, [ | |
\$templateCache | |
\$rootScope | |
\$appScope | |
\$compile | |
\$timeout | |
\$log | |
($templateCache, $rootScope, $appScope, $compile, $timeout, $log)-> | |
-> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script(type='text/ng-template', id='colorpicker-template') | |
.color-container.animation(draggable, ng-show='shown', ng-style='elStyle', ng-keydown='keyDown($event)') | |
ul.color-palette(ng-show='palette') | |
li(class='color-preview') | |
.preview-box(ng-style='{backgroundColor: currentColor}', ng-click='select(currentColor)') | |
li.pal-pre(ng-repeat='color in palette') | |
.preview-box(ng-style='{backgroundColor: color}', ng-click='select(color)') | |
.color-sat-val(ng-style='{backgroundColor : baseColor}') | |
.color-sat | |
.color-val(drag='satValDrag($event,drag)', ng-mousedown='satValMousedown($event)') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module \app.directives .directive \myrange, [ | |
\$compile | |
\$timeout | |
\$parse | |
\$log | |
($compile, $timeout, $parse, $log)-> | |
restrict: \A | |
require: \ngModel | |
templateUrl: \myrange-template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script(type='text/ng-template', id='myrange-template') | |
.rangenum.myrange(ng-class="{ 'undefined' : item == null }") | |
.range(ng-click='rangeClick($event)') | |
.dragger(drag='draggerDrag( $event, drag )', dragstart='draggerDragStart( $event, drag )', dragend='draggerDragEnd( $event, drag )') | |
.fly-value(ng-bind='text') | |
input.i_bw2(ng-if="!noInput", ng-model = 'text', ng-keyup = 'keyup( $event )' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module \app.directives .directive \selector, [ | |
\$compile | |
\$parse | |
\$templateCache | |
\$appScope | |
\$timeout | |
($compile, $parse, $templateCache, $appScope, $timeout)-> | |
restrict: \A | |
templateUrl: \selector-template | |
replace: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module \app.directives .directive \groupPadma, [ | |
\$templateCache | |
\Lang | |
\$log | |
($templateCache, Lang,$log)-> | |
restrict: \EA | |
replace: yes | |
transclude: no | |
templateUrl: \group-padma-template | |
priority: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colorpickerContainerWidth = 192px | |
paletteColorSize = 24px | |
.color-container | |
position fixed | |
width colorpickerContainerWidth | |
z-index 10000 | |
padding 5px | |
background: #f9f9f9 | |
border 1px solid gray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: livescript -*- | |
# | |
# Log decorator | |
# author: Peter | |
# | |
do -> | |
module = angular.module \logDecorator, [] | |
module.config [ | |
\$provide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window <<<< | |
isGradient: -> (it |> /^\s*([a-z]+)\-gradient\(\s*(.*)\s*\)\s*$/gmi.exec)?[1] in <[ linear radial ]> | |
toFixedOrInt: (precision, value)--> | |
a={} | |
power = 10 `Math.pow` (precision or 0) | |
value = Math.round(value * power) / power | |
rounded = value |> Math.round | |
if rounded is value then value = rounded |
OlderNewer