flashgrid 2.0.0 → 2.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 383e3f0560bb9164b92e6a772ef9db039b4a8c59
4
- data.tar.gz: a6f7ad0da921dd17243e62619837131f15391a15
3
+ metadata.gz: c77079c64bf4c3a9d9bf8273475358b3ee7200c1
4
+ data.tar.gz: 0b58005620255adc3593e49d4de85a0d34fc8359
5
5
  SHA512:
6
- metadata.gz: 8bebe56ddc186155f2044d832e0ccfef91376049d341a6ee81b9a0acff35a02c18f978b59e439a809552e9d493fc5c4b03d79ed5a30ed808c8ac3ee122e97efd
7
- data.tar.gz: 91a445e7e47ef0694495825764557cc4dd11d135bccc7fa4d8eac1f9f52006801cf7423058cef29b8dc52aa259eb3c5c13f9419888862c812738067f850ef7b3
6
+ metadata.gz: ed4785be2bf620396498562de74a081dcd2c3e3dd501bcb57776156cd332ae3027eaed3ba25764452fba628103010dc3e96ed97cfef764cb63624f9d1981dadb
7
+ data.tar.gz: c2dfe1b04f6793523dac4e4a33945c037d89bd1650ba745c60fdd704903cfa8714d044d421b1454cfc164b565cbe0c84631f479f63e3bec9059f5e840eed94b5
@@ -1,3 +1,3 @@
1
1
  module Flashgrid
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -6,7 +6,8 @@
6
6
 
7
7
  var Affix = function (element, options) {
8
8
  this.options = $.extend({}, Affix.DEFAULTS, options)
9
- this.$window = $(window)
9
+
10
+ this.$target = $(this.options.target)
10
11
  .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
11
12
  .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
12
13
 
@@ -18,16 +19,19 @@
18
19
  this.checkPosition()
19
20
  }
20
21
 
21
- Affix.RESET = 'affix affix-top affix-bottom'
22
+ Affix.VERSION = '3.1.1'
23
+
24
+ Affix.RESET = 'affix affix-top affix-bottom'
22
25
 
23
26
  Affix.DEFAULTS = {
24
- offset: 0
27
+ offset: 0,
28
+ target: window
25
29
  }
26
30
 
27
31
  Affix.prototype.getPinnedOffset = function () {
28
32
  if (this.pinnedOffset) return this.pinnedOffset
29
33
  this.$element.removeClass(Affix.RESET).addClass('affix')
30
- var scrollTop = this.$window.scrollTop()
34
+ var scrollTop = this.$target.scrollTop()
31
35
  var position = this.$element.offset()
32
36
  return (this.pinnedOffset = position.top - scrollTop)
33
37
  }
@@ -40,7 +44,7 @@
40
44
  if (!this.$element.is(':visible')) return
41
45
 
42
46
  var scrollHeight = $(document).height()
43
- var scrollTop = this.$window.scrollTop()
47
+ var scrollTop = this.$target.scrollTop()
44
48
  var position = this.$element.offset()
45
49
  var offset = this.options.offset
46
50
  var offsetTop = offset.top
@@ -73,7 +77,7 @@
73
77
  .trigger($.Event(affixType.replace('affix', 'affixed')))
74
78
 
75
79
  if (affix == 'bottom') {
76
- this.$element.offset({ top: position.top })
80
+ this.$element.offset({ top: scrollHeight - this.$element.height() - offsetBottom })
77
81
  }
78
82
  }
79
83
 
@@ -9,6 +9,8 @@
9
9
  $(el).on('click', dismiss, this.close)
10
10
  }
11
11
 
12
+ Alert.VERSION = '3.1.1'
13
+
12
14
  Alert.prototype.close = function (e) {
13
15
  var $this = $(this)
14
16
  var selector = $this.attr('data-target')
@@ -10,6 +10,8 @@
10
10
  this.isLoading = false
11
11
  }
12
12
 
13
+ Button.VERSION = '3.1.1'
14
+
13
15
  Button.DEFAULTS = {
14
16
  loadingText: 'loading...'
15
17
  }
@@ -19,6 +19,8 @@
19
19
  .on('mouseleave', $.proxy(this.cycle, this))
20
20
  }
21
21
 
22
+ Carousel.VERSION = '3.1.1'
23
+
22
24
  Carousel.DEFAULTS = {
23
25
  interval: 5000,
24
26
  pause: 'hover',
@@ -13,6 +13,8 @@
13
13
  if (this.options.toggle) this.toggle()
14
14
  }
15
15
 
16
+ Collapse.VERSION = '3.1.1'
17
+
16
18
  Collapse.DEFAULTS = {
17
19
  toggle: true
18
20
  }
@@ -10,6 +10,8 @@
10
10
  $(element).on('click.bs.dropdown', this.toggle)
11
11
  }
12
12
 
13
+ Dropdown.VERSION = '3.1.1'
14
+
13
15
  Dropdown.prototype.toggle = function (e) {
14
16
  var $this = $(this)
15
17
 
@@ -40,14 +40,7 @@
40
40
  return true;
41
41
  }
42
42
 
43
- $allDropdowns.find(':focus').blur();
44
-
45
- if(settings.instantlyCloseOthers === true)
46
- $allDropdowns.removeClass('open');
47
-
48
- window.clearTimeout(timeout);
49
- $parent.addClass('open');
50
- $this.trigger(showEvent);
43
+ openDropdown(event);
51
44
  }, function () {
52
45
  timeout = window.setTimeout(function () {
53
46
  $parent.removeClass('open');
@@ -56,15 +49,16 @@
56
49
  });
57
50
 
58
51
  // this helps with button groups!
59
- $this.hover(function () {
60
- $allDropdowns.find(':focus').blur();
61
-
62
- if(settings.instantlyCloseOthers === true)
63
- $allDropdowns.removeClass('open');
52
+ $this.hover(function (event) {
53
+ // this helps prevent a double event from firing.
54
+ // see https://github.com/CWSpear/bootstrap-hover-dropdown/issues/55
55
+ if(!$parent.hasClass('open') && !$parent.is(event.target)) {
56
+ // stop this event, stop executing any code
57
+ // in this callback but continue to propagate
58
+ return true;
59
+ }
64
60
 
65
- window.clearTimeout(timeout);
66
- $parent.addClass('open');
67
- $this.trigger(showEvent);
61
+ openDropdown(event);
68
62
  });
69
63
 
70
64
  // handle submenus
@@ -83,6 +77,17 @@
83
77
  }, settings.delay);
84
78
  });
85
79
  });
80
+
81
+ function openDropdown(event) {
82
+ $allDropdowns.find(':focus').blur();
83
+
84
+ if(settings.instantlyCloseOthers === true)
85
+ $allDropdowns.removeClass('open');
86
+
87
+ window.clearTimeout(timeout);
88
+ $parent.addClass('open');
89
+ $this.trigger(showEvent);
90
+ }
86
91
  });
87
92
  };
88
93
 
@@ -21,6 +21,8 @@
21
21
  }
22
22
  }
23
23
 
24
+ Modal.VERSION = '3.1.1'
25
+
24
26
  Modal.DEFAULTS = {
25
27
  backdrop: true,
26
28
  keyboard: true,
@@ -258,7 +260,7 @@
258
260
  if ($this.is('a')) e.preventDefault()
259
261
 
260
262
  Plugin.call($target, option, this)
261
- $target.one('hide', function () {
263
+ $target.one('hide.bs.modal', function () {
262
264
  $this.is(':visible') && $this.trigger('focus')
263
265
  })
264
266
  })
@@ -10,6 +10,8 @@
10
10
 
11
11
  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
12
12
 
13
+ Popover.VERSION = '3.1.1'
14
+
13
15
  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
14
16
  placement: 'right',
15
17
  trigger: 'click',
@@ -23,6 +23,8 @@
23
23
  this.process()
24
24
  }
25
25
 
26
+ ScrollSpy.VERSION = '3.1.1'
27
+
26
28
  ScrollSpy.DEFAULTS = {
27
29
  offset: 10
28
30
  }
@@ -37,6 +39,7 @@
37
39
 
38
40
  this.$body
39
41
  .find(this.selector)
42
+ .filter(':visible')
40
43
  .map(function () {
41
44
  var $el = $(this)
42
45
  var href = $el.data('target') || $el.attr('href')
@@ -57,7 +60,7 @@
57
60
  ScrollSpy.prototype.process = function () {
58
61
  var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
59
62
  var scrollHeight = this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
60
- var maxScroll = scrollHeight - this.$scrollElement.height()
63
+ var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
61
64
  var offsets = this.offsets
62
65
  var targets = this.targets
63
66
  var activeTarget = this.activeTarget
@@ -8,6 +8,8 @@
8
8
  this.element = $(element)
9
9
  }
10
10
 
11
+ Tab.VERSION = '3.1.1'
12
+
11
13
  Tab.prototype.show = function () {
12
14
  var $this = this.element
13
15
  var $ul = $this.closest('ul:not(.dropdown-menu)')
@@ -31,7 +33,7 @@
31
33
 
32
34
  var $target = $(selector)
33
35
 
34
- this.activate($this.parent('li'), $ul)
36
+ this.activate($this.closest('li'), $ul)
35
37
  this.activate($target, $target.parent(), function () {
36
38
  $this.trigger({
37
39
  type: 'shown.bs.tab',
@@ -15,6 +15,8 @@
15
15
  this.init('tooltip', element, options)
16
16
  }
17
17
 
18
+ Tooltip.VERSION = '3.1.1'
19
+
18
20
  Tooltip.DEFAULTS = {
19
21
  animation: true,
20
22
  placement: 'top',
@@ -138,7 +140,11 @@
138
140
 
139
141
  var $tip = this.tip()
140
142
 
143
+ var tipId = this.getUID(this.type)
144
+
141
145
  this.setContent()
146
+ $tip.attr('id', tipId)
147
+ this.$element.attr('aria-describedby', tipId)
142
148
 
143
149
  if (this.options.animation) $tip.addClass('fade')
144
150
 
@@ -154,6 +160,7 @@
154
160
  .detach()
155
161
  .css({ top: 0, left: 0, display: 'block' })
156
162
  .addClass(placement)
163
+ .data('bs.' + this.type, this)
157
164
 
158
165
  this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
159
166
 
@@ -261,6 +268,8 @@
261
268
  var $tip = this.tip()
262
269
  var e = $.Event('hide.bs.' + this.type)
263
270
 
271
+ this.$element.removeAttr('aria-describedby')
272
+
264
273
  function complete() {
265
274
  if (that.hoverState != 'in') $tip.detach()
266
275
  that.$element.trigger('hidden.bs.' + that.type)
@@ -352,6 +361,12 @@
352
361
  return title
353
362
  }
354
363
 
364
+ Tooltip.prototype.getUID = function (prefix) {
365
+ do prefix += ~~(Math.random() * 1000000)
366
+ while (document.getElementById(prefix))
367
+ return prefix
368
+ }
369
+
355
370
  Tooltip.prototype.tip = function () {
356
371
  return this.$tip = this.$tip || $(this.options.template)
357
372
  }
@@ -81,7 +81,7 @@ button.btn-block,
81
81
  input.btn-block {
82
82
  -moz-box-sizing: border-box;
83
83
  box-sizing: border-box;
84
- display:block;
84
+ display: block;
85
85
  min-width: 100%;
86
86
  padding-right: 0;
87
87
  padding-left: 0;
@@ -162,7 +162,7 @@ input.btn-block {
162
162
  .btn-link:active,
163
163
  .btn-link.active,
164
164
  .btn-link:hover,
165
- .btn-link:focus, {
165
+ .btn-link:focus {
166
166
  background: transparent;
167
167
  color: rgba(71,74,84,1);
168
168
  }
@@ -299,7 +299,7 @@ input.btn-block {
299
299
  width: 1%;
300
300
  }
301
301
  .btn-group-justified > .btn-group .btn { width: 100%; }
302
- .btn-group-justified > .btn { border-right-width: 0; }
302
+ .btn-group-justified > .btn { border-right-width: 0; }
303
303
  .btn-group-justified > .btn:last-child { border-right-width: 1px; }
304
304
 
305
305
  /* #Button Toolbar
@@ -12,6 +12,7 @@ code {
12
12
  color: rgba(43,50,53,1);
13
13
  font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
14
14
  font-size: 12px;
15
+ font-weight: normal;
15
16
  line-height: 20px;
16
17
  margin: 0;
17
18
  padding: 3px 5px 4px 5px;
@@ -29,6 +30,7 @@ pre {
29
30
  display: block;
30
31
  font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
31
32
  font-size: 12px;
33
+ font-weight: normal;
32
34
  line-height: 20px;
33
35
  margin: 0;
34
36
  padding: 20px;
@@ -27,12 +27,12 @@
27
27
  display: inline-block;
28
28
  position: absolute;
29
29
  }
30
- .datepicker.datepicker-orient-left:before { left: 6px; }
31
- .datepicker.datepicker-orient-left:after { left: 7px; }
32
- .datepicker.datepicker-orient-right:before { right: 6px; }
33
- .datepicker.datepicker-orient-right:after { right: 7px; }
34
- .datepicker.datepicker-orient-top:before { top: -7px; }
35
- .datepicker.datepicker-orient-top:after { top: -6px; }
30
+ .datepicker.datepicker-orient-left:before { left: 6px; }
31
+ .datepicker.datepicker-orient-left:after { left: 7px; }
32
+ .datepicker.datepicker-orient-right:before { right: 6px; }
33
+ .datepicker.datepicker-orient-right:after { right: 7px; }
34
+ .datepicker.datepicker-orient-top:before { top: -7px; }
35
+ .datepicker.datepicker-orient-top:after { top: -6px; }
36
36
  .datepicker.datepicker-orient-bottom:before {
37
37
  bottom: -7px;
38
38
  border-bottom: 0;
@@ -32,7 +32,7 @@ ol { padding-left: 23px; }
32
32
  .list-inline,
33
33
  .list-lined,
34
34
  .list-striped,
35
- .list-unstyled, {
35
+ .list-unstyled {
36
36
  list-style-type: none;
37
37
  padding: 0;
38
38
  }
@@ -27,8 +27,8 @@
27
27
  }
28
28
  .nav-header {
29
29
  background: rgba(58,144,216,1);
30
- border-top-left-radius: 3px;
31
30
  border-top-right-radius: 3px;
31
+ border-top-left-radius: 3px;
32
32
  color: rgba(255,255,255,1);
33
33
  display: block;
34
34
  font-size: 14px;
@@ -86,8 +86,8 @@
86
86
  .nav-tabs > .active > a,
87
87
  .nav-tabs > .active > a:hover,
88
88
  .nav-tabs > .active > a:focus {
89
- color: rgba(58,144,216,1);
90
89
  border-bottom-color: rgba(236,238,241,1);
90
+ color: rgba(58,144,216,1);
91
91
  }
92
92
  .nav-tabs .open a.dropdown-toggle { background: transparent; }
93
93
  .nav-pills > li > a {
@@ -30,6 +30,7 @@
30
30
  margin: 20px auto;
31
31
  width: 50%;
32
32
  }
33
+
33
34
  /* #Media Queries
34
35
  ================================================== */
35
36
  @media only screen and (max-width: 767px) {
@@ -39,15 +39,14 @@ table {
39
39
  .table thead:first-child tr:first-child td { border-top: 0; }
40
40
  .table tbody + tbody { border-top: 2px solid rgba(217,222,225,1); }
41
41
  .table .table { background: rgba(255,255,255,1); }
42
- .table-condensed th,
43
- .table-condensed td {
44
- font-size: 14px;
45
- padding: 5px 5px 3px 5px;
46
- }
47
42
  .table-condensed th {
48
43
  font-size: 12px;
49
44
  padding: 5px;
50
45
  }
46
+ .table-condensed td {
47
+ font-size: 14px;
48
+ padding: 5px 5px 3px 5px;
49
+ }
51
50
  .table-bordered {
52
51
  border: 1px solid rgba(217,222,225,1);
53
52
  border-collapse: separate;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flashgrid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-11 00:00:00.000000000 Z
11
+ date: 2014-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler