flashgrid 1.0.13 → 1.0.14

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: 8edb9d7a0c4ec272c6f6fddd8e9dee505163e0af
4
- data.tar.gz: 680344b3b8e8279fb29a25784a2055adab41936c
3
+ metadata.gz: 9d1eb66bd54922126d35b13975b3db8407f89333
4
+ data.tar.gz: bd1c613aef7f5412e796a73e3bb58cb6176feb7a
5
5
  SHA512:
6
- metadata.gz: 05837623693353ac1410e5ff6ff74b724b00c84be3a7ae2513c2df8c35a92555406b3b46382f45726d15f092a6d3bb1de6e7204cea46461803c0bc4097bdd17c
7
- data.tar.gz: 85abe70cd10c2aa89079651b4375963538c3bfd72a1ee0ebc5b5c27dfc5e28f3f71da6f945a6bbfd1a88b58d39e923cdbc8e46f940a03361e69b22d3cac15f73
6
+ metadata.gz: 7477ae8888579008181d4647869527ac99b6260fdbb42f591990a81438b2024b2007a0d3411cf20715ada6e723b931c914857fcd84e9f00147e7b69e68b5d92e
7
+ data.tar.gz: b6387e2511cb658d3cdf30bdeb895c07458c06c4d5b13d514be1a20f69c1f4588cae2ebf9d7518451a05c034d1973e0a28f496e4ec8387e94e8103fae25b2a54
data/README.md CHANGED
@@ -23,7 +23,6 @@ Or install it yourself as:
23
23
  Add the CSS files you want to include:
24
24
 
25
25
  ```ruby
26
- *= require reset.css
27
26
  *= require ad.css
28
27
  *= require affix.css
29
28
  *= require alert.css
@@ -47,8 +46,9 @@ Add the CSS files you want to include:
47
46
  *= require pagination.css
48
47
  *= require panel.css
49
48
  *= require placeholder.css
50
- *= require popover.css
49
+ *= require popover.css (place after tooltip)
51
50
  *= require progress.css
51
+ *= require reset.css (place before any files)
52
52
  *= require switch.css
53
53
  *= require tab.css
54
54
  *= require table.css
@@ -1,3 +1,3 @@
1
1
  module Flashgrid
2
- VERSION = "1.0.13"
2
+ VERSION = "1.0.14"
3
3
  end
@@ -1,4 +1,5 @@
1
- +function ($) { "use strict";
1
+ +function ($) {
2
+ 'use strict';
2
3
 
3
4
  // AFFIX CLASS DEFINITION
4
5
  // ======================
@@ -1,4 +1,5 @@
1
- +function ($) { "use strict";
1
+ +function ($) {
2
+ 'use strict';
2
3
 
3
4
  // ALERT CLASS DEFINITION
4
5
  // ======================
@@ -1,4 +1,5 @@
1
- +function ($) { "use strict";
1
+ +function ($) {
2
+ 'use strict';
2
3
 
3
4
  // COLLAPSE PUBLIC CLASS DEFINITION
4
5
  // ================================
@@ -49,7 +50,7 @@
49
50
  var complete = function () {
50
51
  this.$element
51
52
  .removeClass('collapsing')
52
- .addClass('in')
53
+ .addClass('collapse in')
53
54
  [dimension]('auto')
54
55
  this.transitioning = 0
55
56
  this.$element.trigger('shown.bs.collapse')
@@ -117,6 +118,7 @@
117
118
  var data = $this.data('bs.collapse')
118
119
  var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
119
120
 
121
+ if (!data && options.toggle && option == 'show') option = !option
120
122
  if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
121
123
  if (typeof option == 'string') data[option]()
122
124
  })
@@ -41,7 +41,7 @@
41
41
  this.push.apply(this, new_array);
42
42
  },
43
43
  clear: function(){
44
- this.splice(0);
44
+ this.length = 0;
45
45
  },
46
46
  copy: function(){
47
47
  var a = new DateArray();
@@ -459,13 +459,15 @@
459
459
  },
460
460
 
461
461
  setDates: function(){
462
- this.update.apply(this, arguments);
462
+ var args = $.isArray(arguments[0]) ? arguments[0] : arguments;
463
+ this.update.apply(this, args);
463
464
  this._trigger('changeDate');
464
465
  this.setValue();
465
466
  },
466
467
 
467
468
  setUTCDates: function(){
468
- this.update.apply(this, $.map(arguments, this._utc_to_local));
469
+ var args = $.isArray(arguments[0]) ? arguments[0] : arguments;
470
+ this.update.apply(this, $.map(args, this._utc_to_local));
469
471
  this._trigger('changeDate');
470
472
  this.setValue();
471
473
  },
@@ -718,14 +720,16 @@
718
720
  startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity,
719
721
  endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity,
720
722
  endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity,
723
+ todaytxt = dates[this.o.language].today || dates['en'].today || '',
724
+ cleartxt = dates[this.o.language].clear || dates['en'].clear || '',
721
725
  tooltip;
722
726
  this.picker.find('.datepicker-days thead th.datepicker-switch')
723
727
  .text(dates[this.o.language].months[month]+' '+year);
724
728
  this.picker.find('tfoot th.today')
725
- .text(dates[this.o.language].today)
729
+ .text(todaytxt)
726
730
  .toggle(this.o.todayBtn !== false);
727
731
  this.picker.find('tfoot th.clear')
728
- .text(dates[this.o.language].clear)
732
+ .text(cleartxt)
729
733
  .toggle(this.o.clearBtn !== false);
730
734
  this.updateNavArrows();
731
735
  this.fillMonths();
@@ -1,4 +1,5 @@
1
- +function ($) { "use strict";
1
+ +function ($) {
2
+ 'use strict';
2
3
 
3
4
  // DROPDOWN CLASS DEFINITION
4
5
  // =========================
@@ -6,7 +7,7 @@
6
7
  var backdrop = '.dropdown-backdrop'
7
8
  var toggle = '[data-toggle=dropdown]'
8
9
  var Dropdown = function (element) {
9
- var $el = $(element).on('click.bs.dropdown', this.toggle)
10
+ $(element).on('click.bs.dropdown', this.toggle)
10
11
  }
11
12
 
12
13
  Dropdown.prototype.toggle = function (e) {
@@ -25,13 +26,14 @@
25
26
  $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
26
27
  }
27
28
 
28
- $parent.trigger(e = $.Event('show.bs.dropdown'))
29
+ var relatedTarget = { relatedTarget: this }
30
+ $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
29
31
 
30
32
  if (e.isDefaultPrevented()) return
31
33
 
32
34
  $parent
33
35
  .toggleClass('open')
34
- .trigger('shown.bs.dropdown')
36
+ .trigger('shown.bs.dropdown', relatedTarget)
35
37
 
36
38
  $this.focus()
37
39
  }
@@ -57,7 +59,8 @@
57
59
  return $this.click()
58
60
  }
59
61
 
60
- var $items = $('[role=menu] li:not(.divider):visible a', $parent)
62
+ var desc = ' li:not(.divider):visible a'
63
+ var $items = $parent.find('[role=menu]' + desc + ', [role=listbox]' + desc)
61
64
 
62
65
  if (!$items.length) return
63
66
 
@@ -65,19 +68,20 @@
65
68
 
66
69
  if (e.keyCode == 38 && index > 0) index-- // up
67
70
  if (e.keyCode == 40 && index < $items.length - 1) index++ // down
68
- if (!~index) index=0
71
+ if (!~index) index = 0
69
72
 
70
73
  $items.eq(index).focus()
71
74
  }
72
75
 
73
- function clearMenus() {
76
+ function clearMenus(e) {
74
77
  $(backdrop).remove()
75
- $(toggle).each(function (e) {
78
+ $(toggle).each(function () {
76
79
  var $parent = getParent($(this))
80
+ var relatedTarget = { relatedTarget: this }
77
81
  if (!$parent.hasClass('open')) return
78
- $parent.trigger(e = $.Event('hide.bs.dropdown'))
82
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
79
83
  if (e.isDefaultPrevented()) return
80
- $parent.removeClass('open').trigger('hidden.bs.dropdown')
84
+ $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
81
85
  })
82
86
  }
83
87
 
@@ -86,7 +90,7 @@
86
90
 
87
91
  if (!selector) {
88
92
  selector = $this.attr('href')
89
- selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
93
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
90
94
  }
91
95
 
92
96
  var $parent = selector && $(selector)
@@ -103,9 +107,9 @@
103
107
  $.fn.dropdown = function (option) {
104
108
  return this.each(function () {
105
109
  var $this = $(this)
106
- var data = $this.data('dropdown')
110
+ var data = $this.data('bs.dropdown')
107
111
 
108
- if (!data) $this.data('dropdown', (data = new Dropdown(this)))
112
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
109
113
  if (typeof option == 'string') data[option].call($this)
110
114
  })
111
115
  }
@@ -128,7 +132,7 @@
128
132
  $(document)
129
133
  .on('click.bs.dropdown.data-api', clearMenus)
130
134
  .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
131
- .on('click.bs.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
132
- .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
135
+ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
136
+ .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu], [role=listbox]', Dropdown.prototype.keydown)
133
137
 
134
138
  }(jQuery);
@@ -10,14 +10,6 @@
10
10
 
11
11
  }(this, function() {
12
12
 
13
- /*!
14
- * GMaps.js v0.4.9
15
- * http://hpneo.github.com/gmaps/
16
- *
17
- * Copyright 2013, Gustavo Leon
18
- * Released under the MIT License.
19
- */
20
-
21
13
  if (!(typeof window.google === 'object' && window.google.maps)) {
22
14
  throw 'Google Maps API is required. Please register the following JavaScript library http://maps.google.com/maps/api/js?sensor=true.'
23
15
  }
@@ -263,7 +255,7 @@ var GMaps = (function(global) {
263
255
  if (!getElementById('gmaps_context_menu')) return;
264
256
 
265
257
  var context_menu_element = getElementById('gmaps_context_menu');
266
-
258
+
267
259
  context_menu_element.innerHTML = html;
268
260
 
269
261
  var context_menu_items = context_menu_element.getElementsByTagName('a'),
@@ -300,11 +292,11 @@ var GMaps = (function(global) {
300
292
 
301
293
  var overlay = new google.maps.OverlayView();
302
294
  overlay.setMap(self.map);
303
-
295
+
304
296
  overlay.draw = function() {
305
297
  var projection = overlay.getProjection(),
306
298
  position = e.marker.getPosition();
307
-
299
+
308
300
  e.pixel = projection.fromLatLngToContainerPixel(position);
309
301
 
310
302
  buildContextMenuHTML(control, e);
@@ -520,7 +512,7 @@ GMaps.prototype.addControl = function(options) {
520
512
 
521
513
  var control = this.createControl(options);
522
514
  this.controls.push(control);
523
-
515
+
524
516
  this.map.controls[position].push(control);
525
517
 
526
518
  return control;
@@ -587,7 +579,7 @@ GMaps.prototype.createMarker = function(options) {
587
579
  if(!me.pixel){
588
580
  me.pixel = map.getProjection().fromLatLngToPoint(me.latLng)
589
581
  }
590
-
582
+
591
583
  options[name].apply(this, [me]);
592
584
  });
593
585
  }
@@ -737,7 +729,7 @@ GMaps.prototype.drawOverlay = function(options) {
737
729
  if (!options.layer) {
738
730
  options.layer = 'overlayLayer';
739
731
  }
740
-
732
+
741
733
  var panes = this.getPanes(),
742
734
  overlayLayer = panes[options.layer],
743
735
  stop_overlay_events = ['contextmenu', 'DOMMouseScroll', 'dblclick', 'mousedown'];
@@ -1333,7 +1325,7 @@ GMaps.prototype.drawRoute = function(options) {
1333
1325
  strokeOpacity: options.strokeOpacity,
1334
1326
  strokeWeight: options.strokeWeight
1335
1327
  });
1336
-
1328
+
1337
1329
  if (options.callback) {
1338
1330
  options.callback(e[e.length - 1]);
1339
1331
  }
@@ -1388,7 +1380,7 @@ GMaps.prototype.travelRoute = function(options) {
1388
1380
 
1389
1381
  GMaps.prototype.drawSteppedRoute = function(options) {
1390
1382
  var self = this;
1391
-
1383
+
1392
1384
  if (options.origin && options.destination) {
1393
1385
  this.getRoutes({
1394
1386
  origin: options.origin,
@@ -1533,7 +1525,7 @@ GMaps.prototype.toImage = function(options) {
1533
1525
 
1534
1526
  if (this.markers.length > 0) {
1535
1527
  static_map_options['markers'] = [];
1536
-
1528
+
1537
1529
  for (var i = 0; i < this.markers.length; i++) {
1538
1530
  static_map_options['markers'].push({
1539
1531
  lat: this.markers[i].getPosition().lat(),
@@ -1544,7 +1536,7 @@ GMaps.prototype.toImage = function(options) {
1544
1536
 
1545
1537
  if (this.polylines.length > 0) {
1546
1538
  var polyline = this.polylines[0];
1547
-
1539
+
1548
1540
  static_map_options['polyline'] = {};
1549
1541
  static_map_options['polyline']['path'] = google.maps.geometry.encoding.encodePath(polyline.getPath());
1550
1542
  static_map_options['polyline']['strokeColor'] = polyline.strokeColor
@@ -1568,7 +1560,7 @@ GMaps.staticMapURL = function(options){
1568
1560
  static_root += '?';
1569
1561
 
1570
1562
  var markers = options.markers;
1571
-
1563
+
1572
1564
  delete options.markers;
1573
1565
 
1574
1566
  if (!markers && options.marker) {
@@ -1944,7 +1936,7 @@ GMaps.geocode = function(options) {
1944
1936
  delete options.lat;
1945
1937
  delete options.lng;
1946
1938
  delete options.callback;
1947
-
1939
+
1948
1940
  this.geocoder.geocode(options, function(results, status) {
1949
1941
  callback(results, status);
1950
1942
  });
@@ -2060,6 +2052,6 @@ if (!Array.prototype.indexOf) {
2060
2052
  return -1;
2061
2053
  }
2062
2054
  }
2063
-
2055
+
2064
2056
  return GMaps;
2065
2057
  }));
@@ -1,4 +1,5 @@
1
- +function ($) { "use strict";
1
+ +function ($) {
2
+ 'use strict';
2
3
 
3
4
  // MODAL CLASS DEFINITION
4
5
  // ======================
@@ -9,13 +10,19 @@
9
10
  this.$backdrop =
10
11
  this.isShown = null
11
12
 
12
- if (this.options.remote) this.$element.load(this.options.remote)
13
+ if (this.options.remote) {
14
+ this.$element
15
+ .find('.modal')
16
+ .load(this.options.remote, $.proxy(function () {
17
+ this.$element.trigger('loaded.bs.modal')
18
+ }, this))
19
+ }
13
20
  }
14
21
 
15
22
  Modal.DEFAULTS = {
16
- backdrop: true
17
- , keyboard: true
18
- , show: true
23
+ backdrop: true,
24
+ keyboard: true,
25
+ show: true
19
26
  }
20
27
 
21
28
  Modal.prototype.toggle = function (_relatedTarget) {
@@ -34,7 +41,7 @@
34
41
 
35
42
  this.escape()
36
43
 
37
- this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
44
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
38
45
 
39
46
  this.backdrop(function () {
40
47
  var transition = $.support.transition && that.$element.hasClass('fade')
@@ -43,7 +50,9 @@
43
50
  that.$element.appendTo(document.body) // don't move modals dom position
44
51
  }
45
52
 
46
- that.$element.show()
53
+ that.$element
54
+ .show()
55
+ .scrollTop(0)
47
56
 
48
57
  if (transition) {
49
58
  that.$element[0].offsetWidth // force reflow
@@ -85,7 +94,7 @@
85
94
  this.$element
86
95
  .removeClass('in')
87
96
  .attr('aria-hidden', true)
88
- .off('click.dismiss.modal')
97
+ .off('click.dismiss.bs.modal')
89
98
 
90
99
  $.support.transition && this.$element.hasClass('fade') ?
91
100
  this.$element
@@ -129,7 +138,6 @@
129
138
  }
130
139
 
131
140
  Modal.prototype.backdrop = function (callback) {
132
- var that = this
133
141
  var animate = this.$element.hasClass('fade') ? 'fade' : ''
134
142
 
135
143
  if (this.isShown && this.options.backdrop) {
@@ -138,7 +146,7 @@
138
146
  this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
139
147
  .appendTo(document.body)
140
148
 
141
- this.$element.on('click.dismiss.modal', $.proxy(function (e) {
149
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
142
150
  if (e.target !== e.currentTarget) return
143
151
  this.options.backdrop == 'static'
144
152
  ? this.$element[0].focus.call(this.$element[0])
@@ -160,7 +168,7 @@
160
168
  } else if (!this.isShown && this.$backdrop) {
161
169
  this.$backdrop.removeClass('in')
162
170
 
163
- $.support.transition && this.$element.hasClass('fade')?
171
+ $.support.transition && this.$element.hasClass('fade') ?
164
172
  this.$backdrop
165
173
  .one($.support.transition.end, callback)
166
174
  .emulateTransitionEnd(150) :
@@ -208,9 +216,9 @@
208
216
  var $this = $(this)
209
217
  var href = $this.attr('href')
210
218
  var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
211
- var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
219
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
212
220
 
213
- e.preventDefault()
221
+ if ($this.is('a')) e.preventDefault()
214
222
 
215
223
  $target
216
224
  .modal(option, this)
@@ -220,7 +228,7 @@
220
228
  })
221
229
 
222
230
  $(document)
223
- .on('show.bs.modal', '.modal', function () { $(document.body).addClass('modal-open') })
224
- .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('modal-open') })
231
+ .on('show.bs.modal', '.modal', function () { $(document.body).addClass('in') })
232
+ .on('hidden.bs.modal', '.modal', function () { $(document.body).removeClass('in') })
225
233
 
226
234
  }(jQuery);