spectrum-rails 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  module Spectrum
2
2
  module Rails
3
- VERSION = "1.1.3"
3
+ VERSION = "1.1.4"
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- // Spectrum Colorpicker v1.1.1
1
+ // Spectrum Colorpicker v1.1.2+
2
2
  // https://github.com/bgrins/spectrum
3
3
  // Author: Brian Grinstead
4
4
  // License: MIT
@@ -6,110 +6,119 @@
6
6
  (function (window, $, undefined) {
7
7
  var defaultOpts = {
8
8
 
9
- // Callbacks
10
- beforeShow: noop,
11
- move: noop,
12
- change: noop,
13
- show: noop,
14
- hide: noop,
15
-
16
- // Options
17
- color: false,
18
- flat: false,
19
- showInput: false,
20
- showButtons: true,
21
- clickoutFiresChange: false,
22
- showInitial: false,
23
- showPalette: false,
24
- showPaletteOnly: false,
25
- showSelectionPalette: true,
26
- localStorageKey: false,
27
- appendTo: "body",
28
- maxSelectionSize: 7,
29
- cancelText: "cancel",
30
- chooseText: "choose",
31
- preferredFormat: false,
32
- className: "",
33
- showAlpha: false,
34
- theme: "sp-light",
35
- palette: ['fff', '000'],
36
- selectionPalette: [],
37
- disabled: false
38
- },
39
- spectrums = [],
40
- IE = !!/msie/i.exec( window.navigator.userAgent ),
41
- rgbaSupport = (function() {
42
- function contains( str, substr ) {
43
- return !!~('' + str).indexOf(substr);
44
- }
45
-
46
- var elem = document.createElement('div');
47
- var style = elem.style;
48
- style.cssText = 'background-color:rgba(0,0,0,.5)';
49
- return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');
50
- })(),
51
- replaceInput = [
52
- "<div class='sp-replacer'>",
9
+ // Callbacks
10
+ beforeShow: noop,
11
+ move: noop,
12
+ change: noop,
13
+ show: noop,
14
+ hide: noop,
15
+
16
+ // Options
17
+ color: false,
18
+ flat: false,
19
+ showInput: false,
20
+ allowEmpty: false,
21
+ showButtons: true,
22
+ clickoutFiresChange: false,
23
+ showInitial: false,
24
+ showPalette: false,
25
+ showPaletteOnly: false,
26
+ showSelectionPalette: true,
27
+ localStorageKey: false,
28
+ appendTo: "body",
29
+ maxSelectionSize: 7,
30
+ cancelText: "cancel",
31
+ chooseText: "choose",
32
+ preferredFormat: false,
33
+ className: "",
34
+ showAlpha: false,
35
+ theme: "sp-light",
36
+ palette: ['fff', '000'],
37
+ selectionPalette: [],
38
+ disabled: false
39
+ },
40
+ spectrums = [],
41
+ IE = !!/msie/i.exec( window.navigator.userAgent ),
42
+ rgbaSupport = (function() {
43
+ function contains( str, substr ) {
44
+ return !!~('' + str).indexOf(substr);
45
+ }
46
+
47
+ var elem = document.createElement('div');
48
+ var style = elem.style;
49
+ style.cssText = 'background-color:rgba(0,0,0,.5)';
50
+ return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');
51
+ })(),
52
+ replaceInput = [
53
+ "<div class='sp-replacer'>",
53
54
  "<div class='sp-preview'><div class='sp-preview-inner'></div></div>",
54
55
  "<div class='sp-dd'>&#9660;</div>",
55
- "</div>"
56
- ].join(''),
57
- markup = (function () {
56
+ "</div>"
57
+ ].join(''),
58
+ markup = (function () {
58
59
 
59
- // IE does not support gradients with multiple stops, so we need to simulate
60
- // that for the rainbow slider with 8 divs that each have a single gradient
61
- var gradientFix = "";
62
- if (IE) {
63
- for (var i = 1; i <= 6; i++) {
64
- gradientFix += "<div class='sp-" + i + "'></div>";
60
+ // IE does not support gradients with multiple stops, so we need to simulate
61
+ // that for the rainbow slider with 8 divs that each have a single gradient
62
+ var gradientFix = "";
63
+ if (IE) {
64
+ for (var i = 1; i <= 6; i++) {
65
+ gradientFix += "<div class='sp-" + i + "'></div>";
66
+ }
65
67
  }
66
- }
67
68
 
68
- return [
69
- "<div class='sp-container sp-hidden'>",
69
+ return [
70
+ "<div class='sp-container sp-hidden'>",
70
71
  "<div class='sp-palette-container'>",
71
- "<div class='sp-palette sp-thumb sp-cf'></div>",
72
+ "<div class='sp-palette sp-thumb sp-cf'></div>",
72
73
  "</div>",
73
74
  "<div class='sp-picker-container'>",
74
- "<div class='sp-top sp-cf'>",
75
- "<div class='sp-fill'></div>",
76
- "<div class='sp-top-inner'>",
77
- "<div class='sp-color'>",
78
- "<div class='sp-sat'>",
79
- "<div class='sp-val'>",
80
- "<div class='sp-dragger'></div>",
81
- "</div>",
82
- "</div>",
83
- "</div>",
84
- "<div class='sp-hue'>",
85
- "<div class='sp-slider'></div>",
86
- gradientFix,
87
- "</div>",
88
- "</div>",
89
- "<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>",
90
- "</div>",
91
- "<div class='sp-input-container sp-cf'>",
92
- "<input class='sp-input' type='text' spellcheck='false' />",
93
- "</div>",
94
- "<div class='sp-initial sp-thumb sp-cf'></div>",
95
- "<div class='sp-button-container sp-cf'>",
96
- "<a class='sp-cancel' href='#'></a>",
97
- "<button class='sp-choose'></button>",
98
- "</div>",
75
+ "<div class='sp-top sp-cf'>",
76
+ "<div class='sp-fill'></div>",
77
+ "<div class='sp-top-inner'>",
78
+ "<div class='sp-color'>",
79
+ "<div class='sp-sat'>",
80
+ "<div class='sp-val'>",
81
+ "<div class='sp-dragger'></div>",
99
82
  "</div>",
100
- "</div>"
101
- ].join("");
102
- })();
83
+ "</div>",
84
+ "</div>",
85
+ "<div class='sp-clear sp-clear-display' title='Clear Color Selection'>",
86
+ "</div>",
87
+ "<div class='sp-hue'>",
88
+ "<div class='sp-slider'></div>",
89
+ gradientFix,
90
+ "</div>",
91
+ "</div>",
92
+ "<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>",
93
+ "</div>",
94
+ "<div class='sp-input-container sp-cf'>",
95
+ "<input class='sp-input' type='text' spellcheck='false' />",
96
+ "</div>",
97
+ "<div class='sp-initial sp-thumb sp-cf'></div>",
98
+ "<div class='sp-button-container sp-cf'>",
99
+ "<a class='sp-cancel' href='#'></a>",
100
+ "<button class='sp-choose'></button>",
101
+ "</div>",
102
+ "</div>",
103
+ "</div>"
104
+ ].join("");
105
+ })();
103
106
 
104
107
  function paletteTemplate (p, color, className) {
105
108
  var html = [];
106
109
  for (var i = 0; i < p.length; i++) {
107
- var tiny = tinycolor(p[i]);
108
- var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light";
109
- c += (tinycolor.equals(color, p[i])) ? " sp-thumb-active" : "";
110
-
111
- var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter();
112
- html.push('<span title="' + tiny.toRgbString() + '" data-color="' + tiny.toRgbString() + '" class="' + c + '"><span class="sp-thumb-inner" style="' + swatchStyle + ';" /></span>');
110
+ var current = p[i];
111
+ if(current) {
112
+ var tiny = tinycolor(current);
113
+ var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light";
114
+ c += (tinycolor.equals(color, current)) ? " sp-thumb-active" : "";
115
+
116
+ var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter();
117
+ html.push('<span title="' + tiny.toRgbString() + '" data-color="' + tiny.toRgbString() + '" class="' + c + '"><span class="sp-thumb-inner" style="' + swatchStyle + ';" /></span>');
118
+ } else {
119
+ var cls = 'sp-clear-display';
120
+ html.push('<span title="No Color Selected" data-color="" style="background-color:transparent;" class="' + cls + '"></span>');
121
+ }
113
122
  }
114
123
  return "<div class='sp-cf " + className + "'>" + html.join('') + "</div>";
115
124
  }
@@ -180,6 +189,7 @@
180
189
  paletteContainer = container.find(".sp-palette"),
181
190
  initialColorContainer = container.find(".sp-initial"),
182
191
  cancelButton = container.find(".sp-cancel"),
192
+ clearButton = container.find(".sp-clear"),
183
193
  chooseButton = container.find(".sp-choose"),
184
194
  isInput = boundElement.is("input"),
185
195
  shouldReplace = isInput && !flat,
@@ -190,14 +200,21 @@
190
200
  colorOnShow = false,
191
201
  preferredFormat = opts.preferredFormat,
192
202
  currentPreferredFormat = preferredFormat,
193
- clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange;
203
+ clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange,
204
+ isEmpty = !initialColor,
205
+ allowEmpty = opts.allowEmpty;
194
206
 
195
207
 
196
208
  function applyOptions() {
197
209
 
210
+ if (opts.showPaletteOnly) {
211
+ opts.showPalette = true;
212
+ }
213
+
198
214
  container.toggleClass("sp-flat", flat);
199
215
  container.toggleClass("sp-input-disabled", !opts.showInput);
200
216
  container.toggleClass("sp-alpha-enabled", opts.showAlpha);
217
+ container.toggleClass("sp-clear-enabled", opts.allowEmpty);
201
218
  container.toggleClass("sp-buttons-disabled", !opts.showButtons);
202
219
  container.toggleClass("sp-palette-disabled", !opts.showPalette);
203
220
  container.toggleClass("sp-palette-only", opts.showPaletteOnly);
@@ -219,6 +236,10 @@
219
236
  boundElement.after(replacer).hide();
220
237
  }
221
238
 
239
+ if (!allowEmpty) {
240
+ clearButton.hide();
241
+ }
242
+
222
243
  if (flat) {
223
244
  boundElement.after(container).hide();
224
245
  }
@@ -240,7 +261,7 @@
240
261
  if (oldPalette.length > 1) {
241
262
  delete window.localStorage[localStorageKey];
242
263
  $.each(oldPalette, function(i, c) {
243
- addColorToSelectionPalette(c);
264
+ addColorToSelectionPalette(c);
244
265
  });
245
266
  }
246
267
  }
@@ -285,6 +306,21 @@
285
306
  hide("cancel");
286
307
  });
287
308
 
309
+
310
+ clearButton.bind("click.spectrum", function (e) {
311
+ e.stopPropagation();
312
+ e.preventDefault();
313
+
314
+ isEmpty = true;
315
+
316
+ move();
317
+ if(flat) {
318
+ //for the flat style, this is a change event
319
+ updateOriginalInput(true);
320
+ }
321
+ });
322
+
323
+
288
324
  chooseButton.text(opts.chooseText);
289
325
  chooseButton.bind("click.spectrum", function (e) {
290
326
  e.stopPropagation();
@@ -298,6 +334,7 @@
298
334
 
299
335
  draggable(alphaSlider, function (dragX, dragY, e) {
300
336
  currentAlpha = (dragX / alphaWidth);
337
+ isEmpty = false;
301
338
  if (e.shiftKey) {
302
339
  currentAlpha = Math.round(currentAlpha * 10) / 10;
303
340
  }
@@ -307,6 +344,7 @@
307
344
 
308
345
  draggable(slider, function (dragX, dragY) {
309
346
  currentHue = parseFloat(dragY / slideHeight);
347
+ isEmpty = false;
310
348
  move();
311
349
  }, dragStart, dragStop);
312
350
 
@@ -334,6 +372,8 @@
334
372
  currentValue = parseFloat((dragHeight - dragY) / dragHeight);
335
373
  }
336
374
 
375
+ isEmpty = false;
376
+
337
377
  move();
338
378
 
339
379
  }, dragStart, dragStop);
@@ -459,12 +499,20 @@
459
499
  }
460
500
 
461
501
  function setFromTextInput() {
462
- var tiny = tinycolor(textInput.val());
463
- if (tiny.ok) {
464
- set(tiny);
502
+
503
+ var value = textInput.val();
504
+
505
+ if ((value === null || value === "") && allowEmpty) {
506
+ set(null);
465
507
  }
466
508
  else {
467
- textInput.addClass("sp-validation-error");
509
+ var tiny = tinycolor(value);
510
+ if (tiny.ok) {
511
+ set(tiny);
512
+ }
513
+ else {
514
+ textInput.addClass("sp-validation-error");
515
+ }
468
516
  }
469
517
  }
470
518
 
@@ -551,23 +599,33 @@
551
599
  return;
552
600
  }
553
601
 
554
- var newColor = tinycolor(color);
555
- var newHsv = newColor.toHsv();
556
-
557
- currentHue = (newHsv.h % 360) / 360;
558
- currentSaturation = newHsv.s;
559
- currentValue = newHsv.v;
560
- currentAlpha = newHsv.a;
602
+ var newColor;
603
+ if (!color && allowEmpty) {
604
+ isEmpty = true;
605
+ } else {
606
+ isEmpty = false;
607
+ newColor = tinycolor(color);
608
+ var newHsv = newColor.toHsv();
561
609
 
610
+ currentHue = (newHsv.h % 360) / 360;
611
+ currentSaturation = newHsv.s;
612
+ currentValue = newHsv.v;
613
+ currentAlpha = newHsv.a;
614
+ }
562
615
  updateUI();
563
616
 
564
- if (newColor.ok && !ignoreFormatChange) {
617
+ if (newColor && newColor.ok && !ignoreFormatChange) {
565
618
  currentPreferredFormat = preferredFormat || newColor.format;
566
619
  }
567
620
  }
568
621
 
569
622
  function get(opts) {
570
623
  opts = opts || { };
624
+
625
+ if (allowEmpty && isEmpty) {
626
+ return null;
627
+ }
628
+
571
629
  return tinycolor.fromRatio({
572
630
  h: currentHue,
573
631
  s: currentSaturation,
@@ -606,39 +664,51 @@
606
664
  }
607
665
 
608
666
  var realColor = get({ format: format }),
609
- realHex = realColor.toHexString(),
610
- realRgb = realColor.toRgbString();
667
+ displayColor = '';
668
+
669
+ //reset background info for preview element
670
+ previewElement.removeClass("sp-clear-display");
671
+ previewElement.css('background-color', 'transparent');
611
672
 
612
- // Update the replaced elements background color (with actual selected color)
613
- if (rgbaSupport || realColor.alpha === 1) {
614
- previewElement.css("background-color", realRgb);
673
+ if (!realColor && allowEmpty) {
674
+ // Update the replaced elements background with icon indicating no color selection
675
+ previewElement.addClass("sp-clear-display");
615
676
  }
616
677
  else {
617
- previewElement.css("background-color", "transparent");
618
- previewElement.css("filter", realColor.toFilter());
619
- }
620
-
621
- if (opts.showAlpha) {
622
- var rgb = realColor.toRgb();
623
- rgb.a = 0;
624
- var realAlpha = tinycolor(rgb).toRgbString();
625
- var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")";
678
+ var realHex = realColor.toHexString(),
679
+ realRgb = realColor.toRgbString();
626
680
 
627
- if (IE) {
628
- alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex));
681
+ // Update the replaced elements background color (with actual selected color)
682
+ if (rgbaSupport || realColor.alpha === 1) {
683
+ previewElement.css("background-color", realRgb);
629
684
  }
630
685
  else {
631
- alphaSliderInner.css("background", "-webkit-" + gradient);
632
- alphaSliderInner.css("background", "-moz-" + gradient);
633
- alphaSliderInner.css("background", "-ms-" + gradient);
634
- alphaSliderInner.css("background", gradient);
686
+ previewElement.css("background-color", "transparent");
687
+ previewElement.css("filter", realColor.toFilter());
635
688
  }
636
- }
637
689
 
690
+ if (opts.showAlpha) {
691
+ var rgb = realColor.toRgb();
692
+ rgb.a = 0;
693
+ var realAlpha = tinycolor(rgb).toRgbString();
694
+ var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")";
695
+
696
+ if (IE) {
697
+ alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex));
698
+ }
699
+ else {
700
+ alphaSliderInner.css("background", "-webkit-" + gradient);
701
+ alphaSliderInner.css("background", "-moz-" + gradient);
702
+ alphaSliderInner.css("background", "-ms-" + gradient);
703
+ alphaSliderInner.css("background", gradient);
704
+ }
705
+ }
638
706
 
707
+ displayColor = realColor.toString(format);
708
+ }
639
709
  // Update the text entry input as it changes happen
640
710
  if (opts.showInput) {
641
- textInput.val(realColor.toString(format));
711
+ textInput.val(displayColor);
642
712
  }
643
713
 
644
714
  if (opts.showPalette) {
@@ -652,49 +722,67 @@
652
722
  var s = currentSaturation;
653
723
  var v = currentValue;
654
724
 
655
- // Where to show the little circle in that displays your current selected color
656
- var dragX = s * dragWidth;
657
- var dragY = dragHeight - (v * dragHeight);
658
- dragX = Math.max(
659
- -dragHelperHeight,
660
- Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight)
661
- );
662
- dragY = Math.max(
663
- -dragHelperHeight,
664
- Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight)
665
- );
666
- dragHelper.css({
667
- "top": dragY,
668
- "left": dragX
669
- });
670
-
671
- var alphaX = currentAlpha * alphaWidth;
672
- alphaSlideHelper.css({
673
- "left": alphaX - (alphaSlideHelperWidth / 2)
674
- });
675
-
676
- // Where to show the bar that displays your current selected hue
677
- var slideY = (currentHue) * slideHeight;
678
- slideHelper.css({
679
- "top": slideY - slideHelperHeight
680
- });
725
+ if(allowEmpty && isEmpty) {
726
+ //if selected color is empty, hide the helpers
727
+ alphaSlideHelper.hide();
728
+ slideHelper.hide();
729
+ dragHelper.hide();
730
+ }
731
+ else {
732
+ //make sure helpers are visible
733
+ alphaSlideHelper.show();
734
+ slideHelper.show();
735
+ dragHelper.show();
736
+
737
+ // Where to show the little circle in that displays your current selected color
738
+ var dragX = s * dragWidth;
739
+ var dragY = dragHeight - (v * dragHeight);
740
+ dragX = Math.max(
741
+ -dragHelperHeight,
742
+ Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight)
743
+ );
744
+ dragY = Math.max(
745
+ -dragHelperHeight,
746
+ Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight)
747
+ );
748
+ dragHelper.css({
749
+ "top": dragY,
750
+ "left": dragX
751
+ });
752
+
753
+ var alphaX = currentAlpha * alphaWidth;
754
+ alphaSlideHelper.css({
755
+ "left": alphaX - (alphaSlideHelperWidth / 2)
756
+ });
757
+
758
+ // Where to show the bar that displays your current selected hue
759
+ var slideY = (currentHue) * slideHeight;
760
+ slideHelper.css({
761
+ "top": slideY - slideHelperHeight
762
+ });
763
+ }
681
764
  }
682
765
 
683
766
  function updateOriginalInput(fireCallback) {
684
- var color = get();
767
+ var color = get(),
768
+ displayColor = '',
769
+ hasChanged = !tinycolor.equals(color, colorOnShow);
770
+
771
+ if(color) {
772
+ displayColor = color.toString(currentPreferredFormat);
773
+ // Update the selection palette with the current color
774
+ addColorToSelectionPalette(color);
775
+ }
685
776
 
686
777
  if (isInput) {
687
- boundElement.val(color.toString(currentPreferredFormat)).change();
778
+ boundElement.val(displayColor);
688
779
  }
689
780
 
690
- var hasChanged = !tinycolor.equals(color, colorOnShow);
691
781
  colorOnShow = color;
692
782
 
693
- // Update the selection palette with the current color
694
- addColorToSelectionPalette(color);
695
783
  if (fireCallback && hasChanged) {
696
784
  callbacks.change(color);
697
- boundElement.trigger('change.spectrum', [ color ]);
785
+ boundElement.trigger('change', [ color ]);
698
786
  }
699
787
  }
700
788
 
@@ -774,9 +862,9 @@
774
862
  }
775
863
 
776
864
  /**
777
- * checkOffset - get the offset below/above and left/right element depending on screen position
778
- * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js
779
- */
865
+ * checkOffset - get the offset below/above and left/right element depending on screen position
866
+ * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js
867
+ */
780
868
  function getOffset(picker, input) {
781
869
  var extraY = 0;
782
870
  var dpWidth = picker.outerWidth();
@@ -791,33 +879,33 @@
791
879
 
792
880
  offset.left -=
793
881
  Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
794
- Math.abs(offset.left + dpWidth - viewWidth) : 0);
882
+ Math.abs(offset.left + dpWidth - viewWidth) : 0);
795
883
 
796
884
  offset.top -=
797
885
  Math.min(offset.top, ((offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
798
- Math.abs(dpHeight + inputHeight - extraY) : extraY));
886
+ Math.abs(dpHeight + inputHeight - extraY) : extraY));
799
887
 
800
888
  return offset;
801
889
  }
802
890
 
803
891
  /**
804
- * noop - do nothing
805
- */
892
+ * noop - do nothing
893
+ */
806
894
  function noop() {
807
895
 
808
896
  }
809
897
 
810
898
  /**
811
- * stopPropagation - makes the code only doing this a little easier to read in line
812
- */
899
+ * stopPropagation - makes the code only doing this a little easier to read in line
900
+ */
813
901
  function stopPropagation(e) {
814
902
  e.stopPropagation();
815
903
  }
816
904
 
817
905
  /**
818
- * Create a function bound to a given object
819
- * Thanks to underscore.js
820
- */
906
+ * Create a function bound to a given object
907
+ * Thanks to underscore.js
908
+ */
821
909
  function bind(func, obj) {
822
910
  var slice = Array.prototype.slice;
823
911
  var args = slice.call(arguments, 2);
@@ -827,9 +915,9 @@
827
915
  }
828
916
 
829
917
  /**
830
- * Lightweight drag helper. Handles containment within the element, so that
831
- * when dragging, the x is within [0,element.width] and y is within [0,element.height]
832
- */
918
+ * Lightweight drag helper. Handles containment within the element, so that
919
+ * when dragging, the x is within [0,element.width] and y is within [0,element.height]
920
+ */
833
921
  function draggable(element, onmove, onstart, onstop) {
834
922
  onmove = onmove || function () { };
835
923
  onstart = onstart || function () { };
@@ -930,8 +1018,8 @@
930
1018
  function log(){/* jshint -W021 */if(window.console){if(Function.prototype.bind)log=Function.prototype.bind.call(console.log,console);else log=function(){Function.prototype.apply.call(console.log,console,arguments);};log.apply(this,arguments);}}
931
1019
 
932
1020
  /**
933
- * Define a jQuery plugin
934
- */
1021
+ * Define a jQuery plugin
1022
+ */
935
1023
  var dataID = "spectrum.id";
936
1024
  $.fn.spectrum = function (opts, extra) {
937
1025
 
@@ -997,11 +1085,12 @@
997
1085
  });
998
1086
  }
999
1087
  };
1000
- // TinyColor v0.9.14
1088
+
1089
+ // TinyColor v0.9.16
1001
1090
  // https://github.com/bgrins/TinyColor
1002
- // 2013-02-24, Brian Grinstead, MIT License
1091
+ // 2013-08-10, Brian Grinstead, MIT License
1003
1092
 
1004
- (function(root) {
1093
+ (function() {
1005
1094
 
1006
1095
  var trimLeft = /^[\s,#]+/,
1007
1096
  trimRight = /\s+$/,
@@ -1019,8 +1108,9 @@
1019
1108
 
1020
1109
  // If input is already a tinycolor, return itself
1021
1110
  if (typeof color == "object" && color.hasOwnProperty("_tc_id")) {
1022
- return color;
1111
+ return color;
1023
1112
  }
1113
+
1024
1114
  var rgb = inputToRGB(color);
1025
1115
  var r = rgb.r,
1026
1116
  g = rgb.g,
@@ -1042,6 +1132,13 @@
1042
1132
  format: format,
1043
1133
  _tc_id: tinyCounter++,
1044
1134
  alpha: a,
1135
+ getAlpha: function() {
1136
+ return a;
1137
+ },
1138
+ setAlpha: function(value) {
1139
+ a = boundAlpha(value);
1140
+ roundA = mathRound(100*a) / 100;
1141
+ },
1045
1142
  toHsv: function() {
1046
1143
  var hsv = rgbToHsv(r, g, b);
1047
1144
  return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: a };
@@ -1050,8 +1147,8 @@
1050
1147
  var hsv = rgbToHsv(r, g, b);
1051
1148
  var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
1052
1149
  return (a == 1) ?
1053
- "hsv(" + h + ", " + s + "%, " + v + "%)" :
1054
- "hsva(" + h + ", " + s + "%, " + v + "%, "+ roundA + ")";
1150
+ "hsv(" + h + ", " + s + "%, " + v + "%)" :
1151
+ "hsva(" + h + ", " + s + "%, " + v + "%, "+ roundA + ")";
1055
1152
  },
1056
1153
  toHsl: function() {
1057
1154
  var hsl = rgbToHsl(r, g, b);
@@ -1061,8 +1158,8 @@
1061
1158
  var hsl = rgbToHsl(r, g, b);
1062
1159
  var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
1063
1160
  return (a == 1) ?
1064
- "hsl(" + h + ", " + s + "%, " + l + "%)" :
1065
- "hsla(" + h + ", " + s + "%, " + l + "%, "+ roundA + ")";
1161
+ "hsl(" + h + ", " + s + "%, " + l + "%)" :
1162
+ "hsla(" + h + ", " + s + "%, " + l + "%, "+ roundA + ")";
1066
1163
  },
1067
1164
  toHex: function(allow3Char) {
1068
1165
  return rgbToHex(r, g, b, allow3Char);
@@ -1075,18 +1172,22 @@
1075
1172
  },
1076
1173
  toRgbString: function() {
1077
1174
  return (a == 1) ?
1078
- "rgb(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ")" :
1079
- "rgba(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ", " + roundA + ")";
1175
+ "rgb(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ")" :
1176
+ "rgba(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ", " + roundA + ")";
1080
1177
  },
1081
1178
  toPercentageRgb: function() {
1082
1179
  return { r: mathRound(bound01(r, 255) * 100) + "%", g: mathRound(bound01(g, 255) * 100) + "%", b: mathRound(bound01(b, 255) * 100) + "%", a: a };
1083
1180
  },
1084
1181
  toPercentageRgbString: function() {
1085
1182
  return (a == 1) ?
1086
- "rgb(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%)" :
1087
- "rgba(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%, " + roundA + ")";
1183
+ "rgb(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%)" :
1184
+ "rgba(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%, " + roundA + ")";
1088
1185
  },
1089
1186
  toName: function() {
1187
+ if (a === 0) {
1188
+ return "transparent";
1189
+ }
1190
+
1090
1191
  return hexNames[rgbToHex(r, g, b, true)] || false;
1091
1192
  },
1092
1193
  toFilter: function(secondColor) {
@@ -1105,8 +1206,13 @@
1105
1206
  return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr=#" + pad2(alphaHex) + hex + ",endColorstr=#" + pad2(secondAlphaHex) + secondHex + ")";
1106
1207
  },
1107
1208
  toString: function(format) {
1209
+ var formatSet = !!format;
1108
1210
  format = format || this.format;
1211
+
1109
1212
  var formattedString = false;
1213
+ var hasAlphaAndFormatNotSet = !formatSet && a < 1 && a > 0;
1214
+ var formatWithAlpha = hasAlphaAndFormatNotSet && (format === "hex" || format === "hex6" || format === "hex3" || format === "name");
1215
+
1110
1216
  if (format === "rgb") {
1111
1217
  formattedString = this.toRgbString();
1112
1218
  }
@@ -1129,6 +1235,10 @@
1129
1235
  formattedString = this.toHsvString();
1130
1236
  }
1131
1237
 
1238
+ if (formatWithAlpha) {
1239
+ return this.toRgbString();
1240
+ }
1241
+
1132
1242
  return formattedString || this.toHexString();
1133
1243
  }
1134
1244
  };
@@ -1206,12 +1316,7 @@
1206
1316
  }
1207
1317
  }
1208
1318
 
1209
- a = parseFloat(a);
1210
-
1211
- // Handle invalid alpha characters by setting to 1
1212
- if (isNaN(a) || a < 0 || a > 1) {
1213
- a = 1;
1214
- }
1319
+ a = boundAlpha(a);
1215
1320
 
1216
1321
  return {
1217
1322
  ok: ok,
@@ -1224,7 +1329,6 @@
1224
1329
  }
1225
1330
 
1226
1331
 
1227
-
1228
1332
  // Conversion Functions
1229
1333
  // --------------------
1230
1334
 
@@ -1343,7 +1447,7 @@
1343
1447
  // Converts an HSV color value to RGB.
1344
1448
  // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
1345
1449
  // *Returns:* { r, g, b } in the set [0, 255]
1346
- function hsvToRgb(h, s, v) {
1450
+ function hsvToRgb(h, s, v) {
1347
1451
 
1348
1452
  h = bound01(h, 360) * 6;
1349
1453
  s = bound01(s, 100);
@@ -1402,16 +1506,17 @@
1402
1506
  // Thanks to less.js for some of the basics here
1403
1507
  // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
1404
1508
 
1405
-
1406
1509
  tinycolor.desaturate = function (color, amount) {
1510
+ amount = (amount === 0) ? 0 : (amount || 10);
1407
1511
  var hsl = tinycolor(color).toHsl();
1408
- hsl.s -= ((amount || 10) / 100);
1512
+ hsl.s -= amount / 100;
1409
1513
  hsl.s = clamp01(hsl.s);
1410
1514
  return tinycolor(hsl);
1411
1515
  };
1412
1516
  tinycolor.saturate = function (color, amount) {
1517
+ amount = (amount === 0) ? 0 : (amount || 10);
1413
1518
  var hsl = tinycolor(color).toHsl();
1414
- hsl.s += ((amount || 10) / 100);
1519
+ hsl.s += amount / 100;
1415
1520
  hsl.s = clamp01(hsl.s);
1416
1521
  return tinycolor(hsl);
1417
1522
  };
@@ -1419,14 +1524,16 @@
1419
1524
  return tinycolor.desaturate(color, 100);
1420
1525
  };
1421
1526
  tinycolor.lighten = function(color, amount) {
1527
+ amount = (amount === 0) ? 0 : (amount || 10);
1422
1528
  var hsl = tinycolor(color).toHsl();
1423
- hsl.l += ((amount || 10) / 100);
1529
+ hsl.l += amount / 100;
1424
1530
  hsl.l = clamp01(hsl.l);
1425
1531
  return tinycolor(hsl);
1426
1532
  };
1427
1533
  tinycolor.darken = function (color, amount) {
1534
+ amount = (amount === 0) ? 0 : (amount || 10);
1428
1535
  var hsl = tinycolor(color).toHsl();
1429
- hsl.l -= ((amount || 10) / 100);
1536
+ hsl.l -= amount / 100;
1430
1537
  hsl.l = clamp01(hsl.l);
1431
1538
  return tinycolor(hsl);
1432
1539
  };
@@ -1499,6 +1606,7 @@
1499
1606
  return ret;
1500
1607
  };
1501
1608
 
1609
+
1502
1610
  // Readability Functions
1503
1611
  // ---------------------
1504
1612
  // <http://www.w3.org/TR/AERT#color-contrast>
@@ -1514,9 +1622,9 @@
1514
1622
  var brightnessB = (b.r * 299 + b.g * 587 + b.b * 114) / 1000;
1515
1623
  var colorDiff = (
1516
1624
  Math.max(a.r, b.r) - Math.min(a.r, b.r) +
1517
- Math.max(a.g, b.g) - Math.min(a.g, b.g) +
1518
- Math.max(a.b, b.b) - Math.min(a.b, b.b)
1519
- );
1625
+ Math.max(a.g, b.g) - Math.min(a.g, b.g) +
1626
+ Math.max(a.b, b.b) - Math.min(a.b, b.b)
1627
+ );
1520
1628
 
1521
1629
  return {
1522
1630
  brightness: Math.abs(brightnessA - brightnessB),
@@ -1736,6 +1844,17 @@
1736
1844
  return flipped;
1737
1845
  }
1738
1846
 
1847
+ // Return a valid alpha value [0,1] with all invalid values being set to 1
1848
+ function boundAlpha(a) {
1849
+ a = parseFloat(a);
1850
+
1851
+ if (isNaN(a) || a < 0 || a > 1) {
1852
+ a = 1;
1853
+ }
1854
+
1855
+ return a;
1856
+ }
1857
+
1739
1858
  // Take input from [0, n] and return it as [0, 1]
1740
1859
  function bound01(n, max) {
1741
1860
  if (isOnePointZero(n)) { n = "100%"; }
@@ -1832,7 +1951,7 @@
1832
1951
  named = true;
1833
1952
  }
1834
1953
  else if (color == 'transparent') {
1835
- return { r: 0, g: 0, b: 0, a: 0 };
1954
+ return { r: 0, g: 0, b: 0, a: 0, format: "name" };
1836
1955
  }
1837
1956
 
1838
1957
  // Try to match string input using regular expressions.
@@ -1875,9 +1994,11 @@
1875
1994
  return false;
1876
1995
  }
1877
1996
 
1878
- root.tinycolor = tinycolor;
1997
+ // Expose tinycolor to window, does not need to run in non-browser context.
1998
+ window.tinycolor = tinycolor;
1999
+
2000
+ })();
1879
2001
 
1880
- })(this);
1881
2002
 
1882
2003
  $(function () {
1883
2004
  if ($.fn.spectrum.load) {
@@ -1,5 +1,5 @@
1
1
  /***
2
- Spectrum Colorpicker v1.1.1
2
+ Spectrum Colorpicker v1.1.2+
3
3
  https://github.com/bgrins/spectrum
4
4
  Author: Brian Grinstead
5
5
  License: MIT
@@ -12,7 +12,8 @@ License: MIT
12
12
  display:inline-block;
13
13
  *display: inline;
14
14
  *zoom: 1;
15
- z-index: 2147483647;
15
+ /* https://github.com/bgrins/spectrum/issues/40 */
16
+ z-index: 9999994;
16
17
  overflow: hidden;
17
18
  }
18
19
  .sp-container.sp-flat {
@@ -21,16 +22,16 @@ License: MIT
21
22
 
22
23
  /* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */
23
24
  .sp-top {
24
- position:relative;
25
- width: 100%;
26
- display:inline-block;
25
+ position:relative;
26
+ width: 100%;
27
+ display:inline-block;
27
28
  }
28
29
  .sp-top-inner {
29
- position:absolute;
30
- top:0;
31
- left:0;
32
- bottom:0;
33
- right:0;
30
+ position:absolute;
31
+ top:0;
32
+ left:0;
33
+ bottom:0;
34
+ right:0;
34
35
  }
35
36
  .sp-color {
36
37
  position: absolute;
@@ -47,6 +48,12 @@ License: MIT
47
48
  left:84%;
48
49
  height: 100%;
49
50
  }
51
+
52
+ .sp-clear-enabled .sp-hue {
53
+ top:33px;
54
+ height: 77.5%;
55
+ }
56
+
50
57
  .sp-fill {
51
58
  padding-top: 80%;
52
59
  }
@@ -58,17 +65,13 @@ License: MIT
58
65
  bottom:0;
59
66
  }
60
67
 
61
- .sp-alpha-enabled .sp-top
62
- {
68
+ .sp-alpha-enabled .sp-top {
63
69
  margin-bottom: 18px;
64
70
  }
65
- .sp-alpha-enabled .sp-alpha
66
- {
71
+ .sp-alpha-enabled .sp-alpha {
67
72
  display: block;
68
73
  }
69
-
70
- .sp-alpha-handle
71
- {
74
+ .sp-alpha-handle {
72
75
  position:absolute;
73
76
  top:-4px;
74
77
  bottom: -4px;
@@ -79,9 +82,7 @@ License: MIT
79
82
  background: white;
80
83
  opacity: .8;
81
84
  }
82
-
83
- .sp-alpha
84
- {
85
+ .sp-alpha {
85
86
  display: none;
86
87
  position: absolute;
87
88
  bottom: -14px;
@@ -89,12 +90,30 @@ License: MIT
89
90
  left: 0;
90
91
  height: 8px;
91
92
  }
92
- .sp-alpha-inner{
93
+ .sp-alpha-inner {
93
94
  border: solid 1px #333;
94
95
  }
95
96
 
97
+ .sp-clear {
98
+ display: none;
99
+ }
100
+
101
+ .sp-clear.sp-clear-display {
102
+ background-position: center;
103
+ }
104
+
105
+ .sp-clear-enabled .sp-clear {
106
+ display: block;
107
+ position:absolute;
108
+ top:0px;
109
+ right:0;
110
+ bottom:0;
111
+ left:84%;
112
+ height: 28px;
113
+ }
114
+
96
115
  /* Don't allow text selection */
97
- .sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button {
116
+ .sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button {
98
117
  -webkit-user-select:none;
99
118
  -moz-user-select: -moz-none;
100
119
  -o-user-select:none;
@@ -153,7 +172,6 @@ License: MIT
153
172
  Generate 6 divs, line them up, and do two color gradients for each.
154
173
  Yes, really.
155
174
  */
156
-
157
175
  .sp-1 {
158
176
  height:17%;
159
177
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');
@@ -194,17 +212,16 @@ License: MIT
194
212
  .sp-hue { left: 63%; }
195
213
  .sp-fill { padding-top: 60%; }
196
214
  }
197
-
198
215
  .sp-dragger {
199
- border-radius: 5px;
200
- height: 5px;
201
- width: 5px;
202
- border: 1px solid #fff;
203
- background: #000;
204
- cursor: pointer;
205
- position:absolute;
206
- top:0;
207
- left: 0;
216
+ border-radius: 5px;
217
+ height: 5px;
218
+ width: 5px;
219
+ border: 1px solid #fff;
220
+ background: #000;
221
+ cursor: pointer;
222
+ position:absolute;
223
+ top:0;
224
+ left: 0;
208
225
  }
209
226
  .sp-slider {
210
227
  position: absolute;
@@ -218,14 +235,19 @@ License: MIT
218
235
  opacity: .8;
219
236
  }
220
237
 
221
- /* Basic display options (colors, fonts, global widths) */
238
+ /*
239
+ Theme authors:
240
+ Here are the basic themeable display options (colors, fonts, global widths).
241
+ See http://bgrins.github.io/spectrum/themes/ for instructions.
242
+ */
243
+
222
244
  .sp-container {
223
245
  border-radius: 0;
224
246
  background-color: #ECECEC;
225
247
  border: solid 1px #f0c49B;
226
248
  padding: 0;
227
249
  }
228
- .sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue
250
+ .sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear
229
251
  {
230
252
  font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
231
253
  -webkit-box-sizing: border-box;
@@ -237,7 +259,7 @@ License: MIT
237
259
  {
238
260
  margin-bottom: 3px;
239
261
  }
240
- .sp-color, .sp-hue
262
+ .sp-color, .sp-hue, .sp-clear
241
263
  {
242
264
  border: solid 1px #666;
243
265
  }
@@ -252,14 +274,14 @@ License: MIT
252
274
  width: 100%;
253
275
  }
254
276
  .sp-input {
255
- font-size: 12px !important;
256
- border: 1px inset;
257
- padding: 4px 5px;
258
- margin: 0;
259
- width: 100%;
260
- background:transparent;
261
- border-radius: 3px;
262
- color: #222;
277
+ font-size: 12px !important;
278
+ border: 1px inset;
279
+ padding: 4px 5px;
280
+ margin: 0;
281
+ width: 100%;
282
+ background:transparent;
283
+ border-radius: 3px;
284
+ color: #222;
263
285
  }
264
286
  .sp-input:focus {
265
287
  border: 1px solid orange;
@@ -322,6 +344,10 @@ License: MIT
322
344
  margin:0;
323
345
  }
324
346
 
347
+ .sp-initial .sp-clear-display {
348
+ background-position: center;
349
+ }
350
+
325
351
  /* Buttons */
326
352
  .sp-button-container {
327
353
  float: right;
@@ -389,23 +415,22 @@ License: MIT
389
415
 
390
416
  /* Buttons: http://hellohappy.org/css3-buttons/ */
391
417
  .sp-container button {
392
- background-color: #eeeeee;
393
- background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
394
- background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
395
- background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
396
- background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
397
- background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
398
- background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
399
- border: 1px solid #ccc;
400
- border-bottom: 1px solid #bbb;
401
- border-radius: 3px;
402
- color: #333;
403
- font-size: 14px;
404
- line-height: 1;
405
- padding: 5px 4px;
406
- text-align: center;
407
- text-shadow: 0 1px 0 #eee;
408
- vertical-align: middle;
418
+ background-color: #eeeeee;
419
+ background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
420
+ background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
421
+ background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
422
+ background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
423
+ background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
424
+ border: 1px solid #ccc;
425
+ border-bottom: 1px solid #bbb;
426
+ border-radius: 3px;
427
+ color: #333;
428
+ font-size: 14px;
429
+ line-height: 1;
430
+ padding: 5px 4px;
431
+ text-align: center;
432
+ text-shadow: 0 1px 0 #eee;
433
+ vertical-align: middle;
409
434
  }
410
435
  .sp-container button:hover {
411
436
  background-color: #dddddd;
@@ -413,7 +438,6 @@ License: MIT
413
438
  background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
414
439
  background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
415
440
  background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
416
- background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
417
441
  background-image: linear-gradient(to bottom, #dddddd, #bbbbbb);
418
442
  border: 1px solid #bbb;
419
443
  border-bottom: 1px solid #999;
@@ -478,4 +502,10 @@ License: MIT
478
502
  .sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner
479
503
  {
480
504
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=);
505
+ }
506
+
507
+ .sp-clear-display {
508
+ background-repeat:no-repeat;
509
+ background-position: center;
510
+ background-image: url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==);
481
511
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spectrum-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-07 00:00:00.000000000 Z
12
+ date: 2013-11-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties