active_frontend 9.1.1 → 10.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7affb08bc0ee07375434c51ad3d80c086143e908
4
- data.tar.gz: 513abd565168d1ba7b43703f641703caa80bc8ca
3
+ metadata.gz: 027e24230d769eb1a38a760a606bbdc00831ea46
4
+ data.tar.gz: 27b83455f4efe1120026039df98dbaa072604276
5
5
  SHA512:
6
- metadata.gz: 5b76d2e29ef5ab8a035ecc8733d4fc79a2b9a9522ed5f0151b4bda0661a6bc698eb36277b1214a32b368e97229508b78b893110c3aba5f6059418e492984bf63
7
- data.tar.gz: a5b821c3543f94b55514e8a42e8ebb5e51b31d78f6394995753679e1f4b27b52d21d91f36dd4c1e267c098e2989c0f5d237ede0fe188026654fec13e04ce73e5
6
+ metadata.gz: c214e5abe6781ccfc55858d0c828eb77ba1669a5cbd6e6aa7add0cc99e4971dba5c5d82a0723bbd9c095199e16cb4a1880ee31116627df4e308eb7236bf5b34f
7
+ data.tar.gz: 3c0aa9212d4018350f29ab3d52bd9c50af8bb082bf181dc077f872e2ebf2ee8b38b91bdfc43123fca272b753dcf90ceef595e6ee98b25d6ae5e4103baa649161
@@ -1,3 +1,3 @@
1
1
  module ActiveFrontend
2
- VERSION = "9.1.1"
2
+ VERSION = "10.0.0"
3
3
  end
@@ -4,10 +4,12 @@
4
4
  module.exports = factory();
5
5
  }
6
6
  else if(typeof define === 'function' && define.amd) {
7
- define('GMaps', [], factory);
7
+ define(['jquery', 'googlemaps!'], factory);
8
+ }
9
+ else {
10
+ root.GMaps = factory();
8
11
  }
9
12
 
10
- root.GMaps = factory();
11
13
 
12
14
  }(this, function() {
13
15
 
@@ -163,6 +165,10 @@ var GMaps = (function(global) {
163
165
  options.zoom = options.zoom || 15;
164
166
  options.mapType = options.mapType || 'roadmap';
165
167
 
168
+ var valueOrDefault = function(value, defaultValue) {
169
+ return value === undefined ? defaultValue : value;
170
+ };
171
+
166
172
  var self = this,
167
173
  i,
168
174
  events_that_hide_context_menu = [
@@ -176,18 +182,18 @@ var GMaps = (function(global) {
176
182
  markerClustererFunction = options.markerClusterer,
177
183
  mapType = google.maps.MapTypeId[options.mapType.toUpperCase()],
178
184
  map_center = new google.maps.LatLng(options.lat, options.lng),
179
- zoomControl = options.zoomControl || true,
185
+ zoomControl = valueOrDefault(options.zoomControl, true),
180
186
  zoomControlOpt = options.zoomControlOpt || {
181
187
  style: 'DEFAULT',
182
188
  position: 'TOP_LEFT'
183
189
  },
184
190
  zoomControlStyle = zoomControlOpt.style || 'DEFAULT',
185
191
  zoomControlPosition = zoomControlOpt.position || 'TOP_LEFT',
186
- panControl = options.panControl || true,
187
- mapTypeControl = options.mapTypeControl || true,
188
- scaleControl = options.scaleControl || true,
189
- streetViewControl = options.streetViewControl || true,
190
- overviewMapControl = overviewMapControl || true,
192
+ panControl = valueOrDefault(options.panControl, true),
193
+ mapTypeControl = valueOrDefault(options.mapTypeControl, true),
194
+ scaleControl = valueOrDefault(options.scaleControl, true),
195
+ streetViewControl = valueOrDefault(options.streetViewControl, true),
196
+ overviewMapControl = valueOrDefault(overviewMapControl, true),
191
197
  map_options = {},
192
198
  map_base_options = {
193
199
  zoom: this.zoom,
@@ -311,7 +317,7 @@ var GMaps = (function(global) {
311
317
  context_menu_element.style.left = left + "px";
312
318
  context_menu_element.style.top = top + "px";
313
319
 
314
- context_menu_element.style.display = 'block';
320
+ // context_menu_element.style.display = 'block';
315
321
  };
316
322
 
317
323
  this.buildContextMenu = function(control, e) {
@@ -333,6 +339,12 @@ var GMaps = (function(global) {
333
339
  else {
334
340
  buildContextMenuHTML(control, e);
335
341
  }
342
+
343
+ var context_menu_element = getElementById('gmaps_context_menu');
344
+
345
+ setTimeout(function() {
346
+ context_menu_element.style.display = 'block';
347
+ }, 0);
336
348
  };
337
349
 
338
350
  this.setContextMenu = function(options) {
@@ -361,9 +373,11 @@ var GMaps = (function(global) {
361
373
  ul.style.padding = '8px';
362
374
  ul.style.boxShadow = '2px 2px 6px #ccc';
363
375
 
364
- doc.body.appendChild(ul);
376
+ if (!getElementById('gmaps_context_menu')) {
377
+ doc.body.appendChild(ul);
378
+ }
365
379
 
366
- var context_menu_element = getElementById('gmaps_context_menu')
380
+ var context_menu_element = getElementById('gmaps_context_menu');
367
381
 
368
382
  google.maps.event.addDomListener(context_menu_element, 'mouseout', function(ev) {
369
383
  if (!ev.relatedTarget || !this.contains(ev.relatedTarget)) {
@@ -519,6 +533,10 @@ GMaps.prototype.createControl = function(options) {
519
533
  control.id = options.id;
520
534
  }
521
535
 
536
+ if (options.title) {
537
+ control.title = options.title;
538
+ }
539
+
522
540
  if (options.classes) {
523
541
  control.className = options.classes;
524
542
  }
@@ -271,6 +271,22 @@
271
271
 
272
272
  function createNewSlider(element, options) {
273
273
 
274
+ /*
275
+ The internal state object is used to store data about the current 'state' of slider.
276
+
277
+ This includes values such as the `value`, `enabled`, etc...
278
+ */
279
+ this._state = {
280
+ value: null,
281
+ enabled: null,
282
+ offset: null,
283
+ size: null,
284
+ percentage: null,
285
+ inDrag: null,
286
+ over: null
287
+ };
288
+
289
+
274
290
  if(typeof element === "string") {
275
291
  this.element = document.querySelector(element);
276
292
  } else if(element instanceof HTMLElement) {
@@ -535,9 +551,14 @@
535
551
 
536
552
  if (Array.isArray(this.options.value)) {
537
553
  this.options.range = true;
538
- } else if (this.options.range) {
554
+ this._state.value = this.options.value;
555
+ }
556
+ else if (this.options.range) {
539
557
  // User wants a range, but value is not an array
540
- this.options.value = [this.options.value, this.options.max];
558
+ this._state.value = [this.options.value, this.options.max];
559
+ }
560
+ else {
561
+ this._state.value = this.options.value;
541
562
  }
542
563
 
543
564
  this.trackLow = sliderTrackLow || this.trackLow;
@@ -574,9 +595,9 @@
574
595
  }
575
596
  }
576
597
 
577
- this.offset = this._offset(this.sliderElem);
578
- this.size = this.sliderElem[this.sizePos];
579
- this.setValue(this.options.value);
598
+ this._state.offset = this._offset(this.sliderElem);
599
+ this._state.size = this.sliderElem[this.sizePos];
600
+ this.setValue(this._state.value);
580
601
 
581
602
  /******************************************
582
603
 
@@ -604,10 +625,12 @@
604
625
  this._addClass(this.tooltip, 'hide');
605
626
  this._addClass(this.tooltip_min, 'hide');
606
627
  this._addClass(this.tooltip_max, 'hide');
607
- } else if(this.options.tooltip === 'always') {
628
+ }
629
+ else if(this.options.tooltip === 'always') {
608
630
  this._showTooltip();
609
631
  this._alwaysShowTooltip = true;
610
- } else {
632
+ }
633
+ else {
611
634
  this.showTooltip = this._showTooltip.bind(this);
612
635
  this.hideTooltip = this._hideTooltip.bind(this);
613
636
 
@@ -675,19 +698,17 @@
675
698
  tooltip_position: null
676
699
  },
677
700
 
678
- over: false,
679
-
680
- inDrag: false,
681
-
682
701
  getElement: function() {
683
702
  return this.sliderElem;
684
703
  },
685
704
 
686
705
  getValue: function() {
687
706
  if (this.options.range) {
688
- return this.options.value;
707
+ return this._state.value;
708
+ }
709
+ else {
710
+ return this._state.value[0];
689
711
  }
690
- return this.options.value[0];
691
712
  },
692
713
 
693
714
  setValue: function(val, triggerSlideEvent, triggerChangeEvent) {
@@ -695,38 +716,39 @@
695
716
  val = 0;
696
717
  }
697
718
  var oldValue = this.getValue();
698
- this.options.value = this._validateInputValue(val);
719
+ this._state.value = this._validateInputValue(val);
699
720
  var applyPrecision = this._applyPrecision.bind(this);
700
721
 
701
722
  if (this.options.range) {
702
- this.options.value[0] = applyPrecision(this.options.value[0]);
703
- this.options.value[1] = applyPrecision(this.options.value[1]);
723
+ this._state.value[0] = applyPrecision(this._state.value[0]);
724
+ this._state.value[1] = applyPrecision(this._state.value[1]);
704
725
 
705
- this.options.value[0] = Math.max(this.options.min, Math.min(this.options.max, this.options.value[0]));
706
- this.options.value[1] = Math.max(this.options.min, Math.min(this.options.max, this.options.value[1]));
707
- } else {
708
- this.options.value = applyPrecision(this.options.value);
709
- this.options.value = [ Math.max(this.options.min, Math.min(this.options.max, this.options.value))];
726
+ this._state.value[0] = Math.max(this.options.min, Math.min(this.options.max, this._state.value[0]));
727
+ this._state.value[1] = Math.max(this.options.min, Math.min(this.options.max, this._state.value[1]));
728
+ }
729
+ else {
730
+ this._state.value = applyPrecision(this._state.value);
731
+ this._state.value = [ Math.max(this.options.min, Math.min(this.options.max, this._state.value))];
710
732
  this._addClass(this.handle2, 'hide');
711
733
  if (this.options.selection === 'after') {
712
- this.options.value[1] = this.options.max;
734
+ this._state.value[1] = this.options.max;
713
735
  } else {
714
- this.options.value[1] = this.options.min;
736
+ this._state.value[1] = this.options.min;
715
737
  }
716
738
  }
717
739
 
718
740
  if (this.options.max > this.options.min) {
719
- this.percentage = [
720
- this._toPercentage(this.options.value[0]),
721
- this._toPercentage(this.options.value[1]),
741
+ this._state.percentage = [
742
+ this._toPercentage(this._state.value[0]),
743
+ this._toPercentage(this._state.value[1]),
722
744
  this.options.step * 100 / (this.options.max - this.options.min)
723
745
  ];
724
746
  } else {
725
- this.percentage = [0, 0, 100];
747
+ this._state.percentage = [0, 0, 100];
726
748
  }
727
749
 
728
750
  this._layout();
729
- var newValue = this.options.range ? this.options.value : this.options.value[0];
751
+ var newValue = this.options.range ? this._state.value : this._state.value[0];
730
752
 
731
753
  if(triggerSlideEvent === true) {
732
754
  this._trigger('slide', newValue);
@@ -765,7 +787,7 @@
765
787
  },
766
788
 
767
789
  disable: function() {
768
- this.options.enabled = false;
790
+ this._state.enabled = false;
769
791
  this.handle1.removeAttribute("tabindex");
770
792
  this.handle2.removeAttribute("tabindex");
771
793
  this._addClass(this.sliderElem, 'slider-disabled');
@@ -775,7 +797,7 @@
775
797
  },
776
798
 
777
799
  enable: function() {
778
- this.options.enabled = true;
800
+ this._state.enabled = true;
779
801
  this.handle1.setAttribute("tabindex", 0);
780
802
  this.handle2.setAttribute("tabindex", 0);
781
803
  this._removeClass(this.sliderElem, 'slider-disabled');
@@ -785,7 +807,7 @@
785
807
  },
786
808
 
787
809
  toggle: function() {
788
- if(this.options.enabled) {
810
+ if(this._state.enabled) {
789
811
  this.disable();
790
812
  } else {
791
813
  this.enable();
@@ -794,7 +816,7 @@
794
816
  },
795
817
 
796
818
  isEnabled: function() {
797
- return this.options.enabled;
819
+ return this._state.enabled;
798
820
  },
799
821
 
800
822
  on: function(evt, callback) {
@@ -892,31 +914,32 @@
892
914
  },
893
915
  _showTooltip: function() {
894
916
  if (this.options.tooltip_split === false ){
895
- this._addClass(this.tooltip, 'in');
896
- this.tooltip_min.style.display = 'none';
897
- this.tooltip_max.style.display = 'none';
898
- } else {
899
- this._addClass(this.tooltip_min, 'in');
900
- this._addClass(this.tooltip_max, 'in');
901
- this.tooltip.style.display = 'none';
902
- }
903
- this.over = true;
917
+ this._addClass(this.tooltip, 'in');
918
+ this.tooltip_min.style.display = 'none';
919
+ this.tooltip_max.style.display = 'none';
920
+ } else {
921
+ this._addClass(this.tooltip_min, 'in');
922
+ this._addClass(this.tooltip_max, 'in');
923
+ this.tooltip.style.display = 'none';
924
+ }
925
+ this._state.over = true;
904
926
  },
905
927
  _hideTooltip: function() {
906
- if (this.inDrag === false && this.alwaysShowTooltip !== true) {
928
+ if (this._state.inDrag === false && this.alwaysShowTooltip !== true) {
907
929
  this._removeClass(this.tooltip, 'in');
908
930
  this._removeClass(this.tooltip_min, 'in');
909
931
  this._removeClass(this.tooltip_max, 'in');
910
932
  }
911
- this.over = false;
933
+ this._state.over = false;
912
934
  },
913
935
  _layout: function() {
914
936
  var positionPercentages;
915
937
 
916
938
  if(this.options.reversed) {
917
- positionPercentages = [ 100 - this.percentage[0], this.options.range ? 100 - this.percentage[1] : this.percentage[1]];
918
- } else {
919
- positionPercentages = [ this.percentage[0], this.percentage[1] ];
939
+ positionPercentages = [ 100 - this._state.percentage[0], this.options.range ? 100 - this._state.percentage[1] : this._state.percentage[1]];
940
+ }
941
+ else {
942
+ positionPercentages = [ this._state.percentage[0], this._state.percentage[1] ];
920
943
  }
921
944
 
922
945
  this.handle1.style[this.stylePos] = positionPercentages[0]+'%';
@@ -929,7 +952,7 @@
929
952
 
930
953
  var styleSize = this.options.orientation === 'vertical' ? 'height' : 'width';
931
954
  var styleMargin = this.options.orientation === 'vertical' ? 'marginTop' : 'marginLeft';
932
- var labelSize = this.size / (this.options.ticks.length - 1);
955
+ var labelSize = this._state.size / (this.options.ticks.length - 1);
933
956
 
934
957
  if (this.tickLabelContainer) {
935
958
  var extraMargin = 0;
@@ -988,7 +1011,8 @@
988
1011
 
989
1012
  this.trackHigh.style.bottom = '0';
990
1013
  this.trackHigh.style.height = (100 - Math.min(positionPercentages[0], positionPercentages[1]) - Math.abs(positionPercentages[0] - positionPercentages[1])) +'%';
991
- } else {
1014
+ }
1015
+ else {
992
1016
  this.trackLow.style.left = '0';
993
1017
  this.trackLow.style.width = Math.min(positionPercentages[0], positionPercentages[1]) +'%';
994
1018
 
@@ -1015,7 +1039,7 @@
1015
1039
  var formattedTooltipVal;
1016
1040
 
1017
1041
  if (this.options.range) {
1018
- formattedTooltipVal = this.options.formatter(this.options.value);
1042
+ formattedTooltipVal = this.options.formatter(this._state.value);
1019
1043
  this._setText(this.tooltipInner, formattedTooltipVal);
1020
1044
  this.tooltip.style[this.stylePos] = (positionPercentages[1] + positionPercentages[0])/2 + '%';
1021
1045
 
@@ -1031,10 +1055,10 @@
1031
1055
  this._css(this.tooltip, 'margin-left', -this.tooltip.offsetWidth / 2 + 'px');
1032
1056
  }
1033
1057
 
1034
- var innerTooltipMinText = this.options.formatter(this.options.value[0]);
1058
+ var innerTooltipMinText = this.options.formatter(this._state.value[0]);
1035
1059
  this._setText(this.tooltipInner_min, innerTooltipMinText);
1036
1060
 
1037
- var innerTooltipMaxText = this.options.formatter(this.options.value[1]);
1061
+ var innerTooltipMaxText = this.options.formatter(this._state.value[1]);
1038
1062
  this._setText(this.tooltipInner_max, innerTooltipMaxText);
1039
1063
 
1040
1064
  this.tooltip_min.style[this.stylePos] = positionPercentages[0] + '%';
@@ -1053,7 +1077,7 @@
1053
1077
  this._css(this.tooltip_max, 'margin-left', -this.tooltip_max.offsetWidth / 2 + 'px');
1054
1078
  }
1055
1079
  } else {
1056
- formattedTooltipVal = this.options.formatter(this.options.value[0]);
1080
+ formattedTooltipVal = this.options.formatter(this._state.value[0]);
1057
1081
  this._setText(this.tooltipInner, formattedTooltipVal);
1058
1082
 
1059
1083
  this.tooltip.style[this.stylePos] = positionPercentages[0] + '%';
@@ -1072,24 +1096,24 @@
1072
1096
  }
1073
1097
  },
1074
1098
  _mousedown: function(ev) {
1075
- if(!this.options.enabled) {
1099
+ if(!this._state.enabled) {
1076
1100
  return false;
1077
1101
  }
1078
1102
 
1079
- this.offset = this._offset(this.sliderElem);
1080
- this.size = this.sliderElem[this.sizePos];
1103
+ this._state.offset = this._offset(this.sliderElem);
1104
+ this._state.size = this.sliderElem[this.sizePos];
1081
1105
 
1082
1106
  var percentage = this._getPercentage(ev);
1083
1107
 
1084
1108
  if (this.options.range) {
1085
- var diff1 = Math.abs(this.percentage[0] - percentage);
1086
- var diff2 = Math.abs(this.percentage[1] - percentage);
1087
- this.dragged = (diff1 < diff2) ? 0 : 1;
1109
+ var diff1 = Math.abs(this._state.percentage[0] - percentage);
1110
+ var diff2 = Math.abs(this._state.percentage[1] - percentage);
1111
+ this._state.dragged = (diff1 < diff2) ? 0 : 1;
1088
1112
  } else {
1089
- this.dragged = 0;
1113
+ this._state.dragged = 0;
1090
1114
  }
1091
1115
 
1092
- this.percentage[this.dragged] = percentage;
1116
+ this._state.percentage[this._state.dragged] = percentage;
1093
1117
  this._layout();
1094
1118
 
1095
1119
  if (this.touchCapable) {
@@ -1116,7 +1140,7 @@
1116
1140
  document.addEventListener("mousemove", this.mousemove, false);
1117
1141
  document.addEventListener("mouseup", this.mouseup, false);
1118
1142
 
1119
- this.inDrag = true;
1143
+ this._state.inDrag = true;
1120
1144
  var newValue = this._calculateValue();
1121
1145
 
1122
1146
  this._trigger('slideStart', newValue);
@@ -1127,7 +1151,7 @@
1127
1151
  this._pauseEvent(ev);
1128
1152
 
1129
1153
  if (this.options.focus) {
1130
- this._triggerFocusOnHandle(this.dragged);
1154
+ this._triggerFocusOnHandle(this._state.dragged);
1131
1155
  }
1132
1156
 
1133
1157
  return true;
@@ -1141,7 +1165,7 @@
1141
1165
  }
1142
1166
  },
1143
1167
  _keydown: function(handleIdx, ev) {
1144
- if(!this.options.enabled) {
1168
+ if(!this._state.enabled) {
1145
1169
  return false;
1146
1170
  }
1147
1171
 
@@ -1170,10 +1194,10 @@
1170
1194
  }
1171
1195
  }
1172
1196
 
1173
- var val = this.options.value[handleIdx] + dir * this.options.step;
1197
+ var val = this._state.value[handleIdx] + dir * this.options.step;
1174
1198
  if (this.options.range) {
1175
- val = [ (!handleIdx) ? val : this.options.value[0],
1176
- ( handleIdx) ? val : this.options.value[1]];
1199
+ val = [ (!handleIdx) ? val : this._state.value[0],
1200
+ ( handleIdx) ? val : this._state.value[1]];
1177
1201
  }
1178
1202
 
1179
1203
  this._trigger('slideStart', val);
@@ -1199,13 +1223,13 @@
1199
1223
  ev.returnValue=false;
1200
1224
  },
1201
1225
  _mousemove: function(ev) {
1202
- if(!this.options.enabled) {
1226
+ if(!this._state.enabled) {
1203
1227
  return false;
1204
1228
  }
1205
1229
 
1206
1230
  var percentage = this._getPercentage(ev);
1207
1231
  this._adjustPercentageForRangeSliders(percentage);
1208
- this.percentage[this.dragged] = percentage;
1232
+ this._state.percentage[this._state.dragged] = percentage;
1209
1233
  this._layout();
1210
1234
 
1211
1235
  var val = this._calculateValue(true);
@@ -1218,17 +1242,17 @@
1218
1242
  var precision = this._getNumDigitsAfterDecimalPlace(percentage);
1219
1243
  precision = precision ? precision - 1 : 0;
1220
1244
  var percentageWithAdjustedPrecision = this._applyToFixedAndParseFloat(percentage, precision);
1221
- if (this.dragged === 0 && this._applyToFixedAndParseFloat(this.percentage[1], precision) < percentageWithAdjustedPrecision) {
1222
- this.percentage[0] = this.percentage[1];
1223
- this.dragged = 1;
1224
- } else if (this.dragged === 1 && this._applyToFixedAndParseFloat(this.percentage[0], precision) > percentageWithAdjustedPrecision) {
1225
- this.percentage[1] = this.percentage[0];
1226
- this.dragged = 0;
1245
+ if (this._state.dragged === 0 && this._applyToFixedAndParseFloat(this._state.percentage[1], precision) < percentageWithAdjustedPrecision) {
1246
+ this._state.percentage[0] = this._state.percentage[1];
1247
+ this._state.dragged = 1;
1248
+ } else if (this._state.dragged === 1 && this._applyToFixedAndParseFloat(this._state.percentage[0], precision) > percentageWithAdjustedPrecision) {
1249
+ this._state.percentage[1] = this._state.percentage[0];
1250
+ this._state.dragged = 0;
1227
1251
  }
1228
1252
  }
1229
1253
  },
1230
1254
  _mouseup: function() {
1231
- if(!this.options.enabled) {
1255
+ if(!this._state.enabled) {
1232
1256
  return false;
1233
1257
  }
1234
1258
  if (this.touchCapable) {
@@ -1240,8 +1264,8 @@
1240
1264
  document.removeEventListener("mousemove", this.mousemove, false);
1241
1265
  document.removeEventListener("mouseup", this.mouseup, false);
1242
1266
 
1243
- this.inDrag = false;
1244
- if (this.over === false) {
1267
+ this._state.inDrag = false;
1268
+ if (this._state.over === false) {
1245
1269
  this._hideTooltip();
1246
1270
  }
1247
1271
  var val = this._calculateValue(true);
@@ -1256,16 +1280,16 @@
1256
1280
  var val;
1257
1281
  if (this.options.range) {
1258
1282
  val = [this.options.min,this.options.max];
1259
- if (this.percentage[0] !== 0){
1260
- val[0] = this._toValue(this.percentage[0]);
1283
+ if (this._state.percentage[0] !== 0){
1284
+ val[0] = this._toValue(this._state.percentage[0]);
1261
1285
  val[0] = this._applyPrecision(val[0]);
1262
1286
  }
1263
- if (this.percentage[1] !== 100){
1264
- val[1] = this._toValue(this.percentage[1]);
1287
+ if (this._state.percentage[1] !== 100){
1288
+ val[1] = this._toValue(this._state.percentage[1]);
1265
1289
  val[1] = this._applyPrecision(val[1]);
1266
1290
  }
1267
1291
  } else {
1268
- val = this._toValue(this.percentage[0]);
1292
+ val = this._toValue(this._state.percentage[0]);
1269
1293
  val = parseFloat(val);
1270
1294
  val = this._applyPrecision(val);
1271
1295
  }
@@ -1308,11 +1332,11 @@
1308
1332
  }
1309
1333
 
1310
1334
  var eventPosition = ev[this.mousePos];
1311
- var sliderOffset = this.offset[this.stylePos];
1335
+ var sliderOffset = this._state.offset[this.stylePos];
1312
1336
  var distanceToSlide = eventPosition - sliderOffset;
1313
1337
  // Calculate what percent of the length the slider handle has slid
1314
- var percentage = (distanceToSlide / this.size) * 100;
1315
- percentage = Math.round(percentage / this.percentage[2]) * this.percentage[2];
1338
+ var percentage = (distanceToSlide / this._state.size) * 100;
1339
+ percentage = Math.round(percentage / this._state.percentage[2]) * this._state.percentage[2];
1316
1340
  if (this.options.reversed) {
1317
1341
  percentage = 100 - percentage;
1318
1342
  }
@@ -1339,10 +1363,9 @@
1339
1363
  }
1340
1364
  },
1341
1365
  _setDataVal: function(val) {
1342
- var value = "value: '" + val + "'";
1343
- this.element.setAttribute('data', value);
1366
+ this.element.setAttribute('data-value', val);
1344
1367
  this.element.setAttribute('value', val);
1345
- this.element.value = val;
1368
+ this.element.value = val;
1346
1369
  },
1347
1370
  _trigger: function(evt, val) {
1348
1371
  val = (val || val === 0) ? val : undefined;
@@ -1442,10 +1465,10 @@
1442
1465
  _setTooltipPosition: function(){
1443
1466
  var tooltips = [this.tooltip, this.tooltip_min, this.tooltip_max];
1444
1467
  if (this.options.orientation === 'vertical'){
1445
- this.options.tooltip_position = this.options.tooltip_position || 'right';
1446
- var oppositeSide = this.options.tooltip_position === 'left' ? 'right' : 'left';
1468
+ var tooltipPos = this.options.tooltip_position || 'right';
1469
+ var oppositeSide = (tooltipPos === 'left') ? 'right' : 'left';
1447
1470
  tooltips.forEach(function(tooltip){
1448
- this._addClass(tooltip, this.options.tooltip_position);
1471
+ this._addClass(tooltip, tooltipPos);
1449
1472
  tooltip.style[oppositeSide] = '100%';
1450
1473
  }.bind(this));
1451
1474
  } else if(this.options.tooltip_position === 'bottom') {
@@ -1,6 +1,7 @@
1
1
  /* Table of Contents
2
2
  ==================================================
3
- # Breadcrumb */
3
+ # Breadcrumb
4
+ # Breadcrumb Alternate */
4
5
 
5
6
  /* # Breadcrumb
6
7
  ================================================== */
@@ -17,9 +18,75 @@
17
18
  .breadcrumb > li > a { color: $color-black; }
18
19
  .breadcrumb > li > a:hover,
19
20
  .breadcrumb > li > a:active,
20
- .breadcrumb > li > a:focus { color: $color-primary; }
21
+ .breadcrumb > li > a:focus,
22
+ .breadcrumb > .active { color: $color-primary; }
21
23
  .breadcrumb > li > .divider {
22
24
  color: $color-black;
23
25
  padding: 0 5px;
24
26
  }
25
- .breadcrumb > .active { color: $color-primary; }
27
+
28
+ /* # Breadcrumb Alternate
29
+ ================================================== */
30
+ .breadcrumb-flow {
31
+ counter-reset: wizard;
32
+ list-style: none;
33
+ margin: 0;
34
+ overflow: hidden;
35
+ padding: 0;
36
+ position: relative;
37
+ }
38
+ .breadcrumb-flow > li {
39
+ float: left;
40
+ font-size: 12px;
41
+ font-weight: 500;
42
+ letter-spacing: 1px;
43
+ line-height: 16px;
44
+ position: relative;
45
+ text-align: center;
46
+ text-transform: uppercase;
47
+ width: 25%;
48
+ }
49
+ .breadcrumb-flow > li,
50
+ .breadcrumb-flow > li > a { color: $color-black; }
51
+ .breadcrumb-flow > li.active ~ li,
52
+ .breadcrumb-flow > li.active ~ li > a { color: $color-haze-dark; }
53
+ .breadcrumb-flow > li.active,
54
+ .breadcrumb-flow > li > a:hover,
55
+ .breadcrumb-flow > li > a:active,
56
+ .breadcrumb-flow > li > a:focus,
57
+ .breadcrumb-flow > li.active > a,
58
+ .breadcrumb-flow > li.active ~ li > a:hover,
59
+ .breadcrumb-flow > li.active ~ li > a:active,
60
+ .breadcrumb-flow > li.active ~ li > a:focus { color: $color-primary; }
61
+ .breadcrumb-flow > li:before {
62
+ background: $color-primary;
63
+ border: 5px solid $color-primary;
64
+ border-radius: 500px;
65
+ content: "";
66
+ counter-increment: wizard;
67
+ display: block;
68
+ height: 22px;
69
+ left: 50%;
70
+ margin: 0 0 10px -14px;
71
+ position: relative;
72
+ text-align: center;
73
+ width: 22px;
74
+ z-index: 1;
75
+ }
76
+ .breadcrumb-flow > li.active:before { background: $color-white; }
77
+ .breadcrumb-flow > li.active ~ li:before {
78
+ background: $color-white;
79
+ border-color: $color-haze-light;
80
+ }
81
+ .breadcrumb-flow > li + li:after {
82
+ background: $color-primary;
83
+ content: "";
84
+ display: block;
85
+ height: 5px;
86
+ left: -50%;
87
+ position: absolute;
88
+ top: 14px;
89
+ width: 100%;
90
+ z-index: 0;
91
+ }
92
+ .breadcrumb-flow > li.active ~ li:after { background: $color-haze-light; }
@@ -381,8 +381,8 @@ input.btn-block {
381
381
  /* # Links
382
382
  ================================================== */
383
383
  .btn-link {
384
- background: transparent;
385
- border-color: transparent;
384
+ background: $color-transparent;
385
+ border-color: $color-transparent;
386
386
  border-radius: 0;
387
387
  color: $color-gray;
388
388
  padding: 0;
@@ -395,8 +395,8 @@ input.btn-block {
395
395
  .btn-link[disabled]:hover,
396
396
  .btn-link[disabled]:active,
397
397
  .btn-link[disabled]:focus, {
398
- background: transparent;
399
- border-color: transparent;
398
+ background: $color-transparent;
399
+ border-color: $color-transparent;
400
400
  color: $color-black;
401
401
  }
402
402
 
@@ -440,7 +440,7 @@ input.btn-block {
440
440
  .btn-outline[disabled]:hover,
441
441
  .btn-outline[disabled]:active,
442
442
  .btn-outline[disabled]:focus {
443
- background: transparent;
443
+ background: $color-transparent;
444
444
  color: $color-gray-dark;
445
445
  }
446
446
  .btn-outline:hover,
@@ -115,7 +115,7 @@
115
115
  width: 4px;
116
116
  }
117
117
  .carousel-indicators > .active {
118
- background: rgba(0,0,0,0);
118
+ background: $color-transparent;
119
119
  height: 8px;
120
120
  margin: 0 4px;
121
121
  width: 8px;
@@ -146,7 +146,7 @@
146
146
  border-color: $color-black-light;
147
147
  }
148
148
  .carousel-dark .carousel-indicators > .active,
149
- .carousel-primary .carousel-indicators > .active { background: rgba(0,0,0,0); }
149
+ .carousel-primary .carousel-indicators > .active { background: $color-transparent; }
150
150
  .carousel-dark .carousel-indicators > .active { border-color: $color-primary; }
151
151
  .carousel-primary .carousel-indicators > .active { border-color: $color-primary; }
152
152
 
@@ -4,6 +4,7 @@
4
4
 
5
5
  /* # Colors
6
6
  ================================================== */
7
+ $color-transparent: rgba(0,0,0,0);
7
8
  $color-black: rgba(35,41,55,1);
8
9
  $color-black-dark: rgba(0,0,0,1);
9
10
  $color-black-light: rgba(55,61,75,1);
@@ -20,16 +20,16 @@
20
20
  }
21
21
  .datepicker:before {
22
22
  border-bottom: 7px solid $color-haze-dark;
23
- border-right: 7px solid transparent;
24
- border-left: 7px solid transparent;
23
+ border-right: 7px solid $color-transparent;
24
+ border-left: 7px solid $color-transparent;
25
25
  content: '';
26
26
  display: inline-block;
27
27
  position: absolute;
28
28
  }
29
29
  .datepicker:after {
30
30
  border-bottom: 6px solid $color-haze-dark;
31
- border-right: 6px solid transparent;
32
- border-left: 6px solid transparent;
31
+ border-right: 6px solid $color-transparent;
32
+ border-left: 6px solid $color-transparent;
33
33
  content: '';
34
34
  display: inline-block;
35
35
  position: absolute;
@@ -115,6 +115,6 @@
115
115
  .datepicker table td.day.disabled.active,
116
116
  .datepicker table td.day.disabled:active,
117
117
  .datepicker table td.day.disabled:focus {
118
- background: transparent;
118
+ background: $color-transparent;
119
119
  cursor: not-allowed;
120
120
  }
@@ -86,8 +86,8 @@
86
86
  .dropdown-menu.dropdown-caret { top: calc(100% + 5px); }
87
87
  .dropdown-menu.dropdown-caret:before {
88
88
  border-bottom: 7px solid $color-haze-dark;
89
- border-left: 7px solid transparent;
90
- border-right: 7px solid transparent;
89
+ border-left: 7px solid $color-transparent;
90
+ border-right: 7px solid $color-transparent;
91
91
  content: "";
92
92
  display: inline-block;
93
93
  left: 9px;
@@ -96,8 +96,8 @@
96
96
  }
97
97
  .dropdown-menu.dropdown-caret:after {
98
98
  border-bottom: 6px solid $color-haze-dark;
99
- border-left: 6px solid transparent;
100
- border-right: 6px solid transparent;
99
+ border-left: 6px solid $color-transparent;
100
+ border-right: 6px solid $color-transparent;
101
101
  content: "";
102
102
  display: inline-block;
103
103
  left: 10px;
@@ -319,7 +319,7 @@ select.form-input-initial-width {
319
319
  top: 50%;
320
320
  }
321
321
  .form-select::before {
322
- background: rgba(0,0,0,0);
322
+ background: $color-transparent;
323
323
  border: 1px solid $color-haze;
324
324
  border-left: 0;
325
325
  border-bottom-right-radius: 2px;
@@ -91,7 +91,7 @@
91
91
  }
92
92
  .header-nav > li.lined > a {
93
93
  border-radius: 0 !important;
94
- border-bottom: 3px solid transparent;
94
+ border-bottom: 3px solid $color-transparent;
95
95
  padding-bottom: 24px;
96
96
  }
97
97
  .header-nav > li.lined > a:hover,
@@ -125,7 +125,7 @@
125
125
  padding-right: 20px;
126
126
  }
127
127
  .header-nav-alt > li.inverse.outline > a {
128
- background: transparent;
128
+ background: $color-transparent;
129
129
  color: $color-primary;
130
130
  }
131
131
  .header-nav-alt > li.inverse > a:hover,
@@ -177,7 +177,7 @@
177
177
 
178
178
  /* # Styles
179
179
  ================================================== */
180
- .header-borderless { border-bottom-color: transparent !important; }
180
+ .header-borderless { border-bottom-color: $color-transparent !important; }
181
181
 
182
182
  /* # Sizes
183
183
  ================================================== */
@@ -190,8 +190,8 @@
190
190
  border-color: $color-black-dark;
191
191
  }
192
192
  .header-invisible {
193
- background: rgba(0,0,0,0);
194
- border-color: rgba(0,0,0,0);
193
+ background: $color-transparent;
194
+ border-color: $color-transparent;
195
195
  }
196
196
  .header-light {
197
197
  background: $color-haze-light;
@@ -235,7 +235,7 @@
235
235
  border-color: $color-white;
236
236
  color: $color-white;
237
237
  }
238
- .header-invisible .header-nav-alt > li.inverse.outline > a { background: transparent; }
238
+ .header-invisible .header-nav-alt > li.inverse.outline > a { background: $color-transparent; }
239
239
  .header-invisible .header-nav-alt > li.inverse > a:hover,
240
240
  .header-invisible .header-nav-alt > li.inverse > a.active,
241
241
  .header-invisible .header-nav-alt > li.inverse > a:active,
@@ -153,7 +153,7 @@
153
153
  }
154
154
  .badge.badge-outline,
155
155
  .label.label-outline {
156
- background: transparent;
156
+ background: $color-transparent;
157
157
  color: $color-haze;
158
158
  }
159
159
  .badge-black-light.badge-outline,
@@ -22,7 +22,7 @@
22
22
  width: 100%;
23
23
  z-index: 9999;
24
24
  }
25
- .loader-backdrop { background: transparent; }
25
+ .loader-backdrop { background: $color-transparent; }
26
26
  .loader-bar { background: $color-primary; }
27
27
  .loader-peg {
28
28
  box-shadow: 0 0 10px $color-primary, 0 0 5px $color-primary;
@@ -47,7 +47,7 @@
47
47
  .loader-spinner-icon {
48
48
  -webkit-animation: loader-spinner 400ms linear infinite;
49
49
  animation: loader-spinner 400ms linear infinite;
50
- border: solid 2px transparent;
50
+ border: solid 2px $color-transparent;
51
51
  border-left-color: $color-primary;
52
52
  border-top-color: $color-primary;
53
53
  border-radius: 500px;
@@ -84,7 +84,7 @@
84
84
  .nav-tabs > li,
85
85
  .nav-pills > li { float: left; }
86
86
  .nav-tabs > li > a {
87
- border-bottom: 3px solid transparent;
87
+ border-bottom: 3px solid $color-transparent;
88
88
  margin-right: 20px;
89
89
  padding-bottom: 10px;
90
90
  }
@@ -95,7 +95,7 @@
95
95
  border-bottom-color: $color-primary;
96
96
  color: $color-primary;
97
97
  }
98
- .nav-tabs .open a.dropdown-toggle { background: transparent; }
98
+ .nav-tabs .open a.dropdown-toggle { background: $color-transparent; }
99
99
  .nav-pills > li > a {
100
100
  background: $color-haze-light;
101
101
  border-radius: 2px;
@@ -31,7 +31,7 @@
31
31
  /* # Size
32
32
  ================================================== */
33
33
  .placeholder-large > i {
34
- background: transparent;
34
+ background: $color-transparent;
35
35
  color: $color-gray-dark;
36
36
  display: inline-block;
37
37
  font-size: 256px;
@@ -50,7 +50,7 @@
50
50
  }
51
51
  .popover .arrow,
52
52
  .popover .arrow:after {
53
- border-color: transparent;
53
+ border-color: $color-transparent;
54
54
  border-style: solid;
55
55
  display: block;
56
56
  height: 0;
@@ -31,8 +31,8 @@
31
31
  width: 0;
32
32
  }
33
33
  .progress > .bar-striped {
34
- background-image: -webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
35
- background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);
34
+ background-image: -webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, $color-transparent 25%, $color-transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, $color-transparent 75%, $color-transparent);
35
+ background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, $color-transparent 25%, $color-transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, $color-transparent 75%, $color-transparent);
36
36
  -webkit-background-size: 40px 40px;
37
37
  background-size: 40px 40px;
38
38
  }
@@ -83,8 +83,8 @@ body {
83
83
  height: 100%;
84
84
  -webkit-overflow-scrolling: touch;
85
85
  overflow-scrolling: touch;
86
- -webkit-tap-highlight-color: rgba(0,0,0,0);
87
- tap-highlight-color: rgba(0,0,0,0);
86
+ -webkit-tap-highlight-color: $color-transparent;
87
+ tap-highlight-color: $color-transparent;
88
88
  text-rendering: optimizeLegibility;
89
89
  -webkit-text-size-adjust: 100%;
90
90
  text-size-adjust: 100%;
@@ -119,7 +119,7 @@
119
119
  .slider-selection.tick-slider-selection,
120
120
  .slider.slider-disabled .slider-handle { background: $color-haze-dark; }
121
121
  .slider-track-low,
122
- .slider-track-high { background: transparent; }
122
+ .slider-track-high { background: $color-transparent; }
123
123
  .slider.slider-disabled .slider-track,
124
124
  .slider.slider-disabled .slider-handle { cursor: not-allowed; }
125
125
 
@@ -141,7 +141,7 @@
141
141
  .slider-handle.custom,
142
142
  .slider-handle.triangle,
143
143
  .slider-tick.custom,
144
- .slider-tick.triangle { background: transparent none; }
144
+ .slider-tick.triangle { background: $color-transparent none; }
145
145
  .slider-handle.custom::before,
146
146
  .slider-tick.custom::before {
147
147
  line-height: 16px;
@@ -453,7 +453,7 @@
453
453
  -webkit-animation: spinnerCrescent 1.2s infinite linear;
454
454
  animation: spinnerCrescent 1.2s infinite linear;
455
455
  border-width: 9px;
456
- border-right-color: transparent;
456
+ border-right-color: $color-transparent;
457
457
  }
458
458
  .spinner-cube-1,
459
459
  .spinner-cube-2,
@@ -6,7 +6,7 @@
6
6
  /* # Table
7
7
  ================================================== */
8
8
  table {
9
- background: transparent;
9
+ background: $color-transparent;
10
10
  border-collapse: collapse;
11
11
  border-spacing: 0;
12
12
  max-width: 100%;
@@ -18,16 +18,16 @@
18
18
  }
19
19
  .timepicker-widget.dropdown-menu:before {
20
20
  border-bottom: 7px solid $color-haze-dark;
21
- border-right: 7px solid transparent;
22
- border-left: 7px solid transparent;
21
+ border-right: 7px solid $color-transparent;
22
+ border-left: 7px solid $color-transparent;
23
23
  content: "";
24
24
  display: inline-block;
25
25
  position: absolute;
26
26
  }
27
27
  .timepicker-widget.dropdown-menu:after {
28
28
  border-bottom: 6px solid $color-haze-dark;
29
- border-right: 6px solid transparent;
30
- border-left: 6px solid transparent;
29
+ border-right: 6px solid $color-transparent;
30
+ border-left: 6px solid $color-transparent;
31
31
  content: "";
32
32
  display: inline-block;
33
33
  position: absolute;
@@ -24,7 +24,7 @@
24
24
  border-right: 0;
25
25
  }
26
26
  .toolbar > a {
27
- background: transparent;
27
+ background: $color-transparent;
28
28
  box-sizing: border-box;
29
29
  color: $color-black-light;
30
30
  display: block;
@@ -54,7 +54,7 @@
54
54
  text-transform: none;
55
55
  }
56
56
  .tooltip-arrow {
57
- border-color: transparent;
57
+ border-color: $color-transparent;
58
58
  border-style: solid;
59
59
  height: 0;
60
60
  position: absolute;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.1.1
4
+ version: 10.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-10 00:00:00.000000000 Z
11
+ date: 2015-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler