dvl-core 0.0.9 → 0.0.10

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: 07e54afe4615b869174072aac9aab099f8630013
4
- data.tar.gz: 259991f207106b97bfb54b281e6af45255596402
3
+ metadata.gz: 69cc414680d46fe057a1cb61d4352a180d3b5fe6
4
+ data.tar.gz: d152e60d2aaa27d56e67feef4e9c569a39946879
5
5
  SHA512:
6
- metadata.gz: 90f5bc10c21c8ee44fe452f886702d906e68dea4db35f6606e5e76cabf1e681f53669dfcaeb324b7939648dacebd81030c839261218904efb4efeb0a419d3e3f
7
- data.tar.gz: 976e55d72e7e841f928629ff6a7e8ce31a31b219e8ecfa6f6ae61c3b91dff6e04e273d7b15843c954e79db3e497466d84daf673353b033557e8e5d6a18ebcb86
6
+ metadata.gz: b03cc1e663a2e4849d00d9fa9a0660e69d9e4673020429a651ba7bdc4ba3cfa16c62d38e37eb8fbbf6052ff8ccd2d438dfe6e87e536fb1f8feaf1024fe67fa0f
7
+ data.tar.gz: 0f311398a26ab224a5709d5732ba93f23ae1267024a189d7efb792510ad415ea6e066ddb79560ac7ba145baf857f8c9498fb5c443d2dabafb048e8ff3d9ff325
@@ -1,5 +1,5 @@
1
1
  module Dvl
2
2
  module Core
3
- VERSION = '0.0.9'
3
+ VERSION = '0.0.10'
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: button.js v3.3.0
2
+ * Bootstrap: button.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#buttons
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -19,7 +19,7 @@
19
19
  this.isLoading = false
20
20
  }
21
21
 
22
- Button.VERSION = '3.3.0'
22
+ Button.VERSION = '3.3.1'
23
23
 
24
24
  Button.DEFAULTS = {
25
25
  loadingText: 'loading...'
@@ -110,7 +110,7 @@
110
110
  e.preventDefault()
111
111
  })
112
112
  .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
113
- $(e.target).closest('.btn').toggleClass('focus', e.type == 'focus')
113
+ $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
114
114
  })
115
115
 
116
116
  }(jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: dropdown.js v3.3.0
2
+ * Bootstrap: dropdown.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#dropdowns
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -19,7 +19,7 @@
19
19
  $(element).on('click.bs.dropdown', this.toggle)
20
20
  }
21
21
 
22
- Dropdown.VERSION = '3.3.0'
22
+ Dropdown.VERSION = '3.3.1'
23
23
 
24
24
  Dropdown.prototype.toggle = function (e) {
25
25
  var $this = $(this)
@@ -55,7 +55,7 @@
55
55
  }
56
56
 
57
57
  Dropdown.prototype.keydown = function (e) {
58
- if (!/(38|40|27|32)/.test(e.which)) return
58
+ if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
59
59
 
60
60
  var $this = $(this)
61
61
 
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: modal.js v3.3.0
2
+ * Bootstrap: modal.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#modals
4
4
  * ========================================================================
5
5
  * Copyright 2011-2014 Twitter, Inc.
@@ -30,7 +30,7 @@
30
30
  }
31
31
  }
32
32
 
33
- Modal.VERSION = '3.3.0'
33
+ Modal.VERSION = '3.3.1'
34
34
 
35
35
  Modal.TRANSITION_DURATION = 300
36
36
  Modal.BACKDROP_TRANSITION_DURATION = 150
@@ -56,10 +56,11 @@
56
56
  this.isShown = true
57
57
 
58
58
  this.checkScrollbar()
59
+ this.setScrollbar()
59
60
  this.$body.addClass('modal-open')
60
61
 
61
- this.setScrollbar()
62
62
  this.escape()
63
+ this.resize()
63
64
 
64
65
  this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
65
66
 
@@ -74,6 +75,9 @@
74
75
  .show()
75
76
  .scrollTop(0)
76
77
 
78
+ if (that.options.backdrop) that.adjustBackdrop()
79
+ that.adjustDialog()
80
+
77
81
  if (transition) {
78
82
  that.$element[0].offsetWidth // force reflow
79
83
  }
@@ -108,6 +112,7 @@
108
112
  this.isShown = false
109
113
 
110
114
  this.escape()
115
+ this.resize()
111
116
 
112
117
  $(document).off('focusin.bs.modal')
113
118
 
@@ -143,11 +148,20 @@
143
148
  }
144
149
  }
145
150
 
151
+ Modal.prototype.resize = function () {
152
+ if (this.isShown) {
153
+ $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
154
+ } else {
155
+ $(window).off('resize.bs.modal')
156
+ }
157
+ }
158
+
146
159
  Modal.prototype.hideModal = function () {
147
160
  var that = this
148
161
  this.$element.hide()
149
162
  this.backdrop(function () {
150
163
  that.$body.removeClass('modal-open')
164
+ that.resetAdjustments()
151
165
  that.resetScrollbar()
152
166
  that.$element.trigger('hidden.bs.modal')
153
167
  })
@@ -204,13 +218,43 @@
204
218
  }
205
219
  }
206
220
 
221
+ // these following methods are used to handle overflowing modals
222
+
223
+ Modal.prototype.handleUpdate = function () {
224
+ if (this.options.backdrop) this.adjustBackdrop()
225
+ this.adjustDialog()
226
+ }
227
+
228
+ Modal.prototype.adjustBackdrop = function () {
229
+ this.$backdrop
230
+ .css('height', 0)
231
+ .css('height', this.$element[0].scrollHeight)
232
+ }
233
+
234
+ Modal.prototype.adjustDialog = function () {
235
+ var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
236
+
237
+ this.$element.css({
238
+ paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
239
+ paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
240
+ })
241
+ }
242
+
243
+ Modal.prototype.resetAdjustments = function () {
244
+ this.$element.css({
245
+ paddingLeft: '',
246
+ paddingRight: ''
247
+ })
248
+ }
249
+
207
250
  Modal.prototype.checkScrollbar = function () {
251
+ this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
208
252
  this.scrollbarWidth = this.measureScrollbar()
209
253
  }
210
254
 
211
255
  Modal.prototype.setScrollbar = function () {
212
256
  var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
213
- if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
257
+ if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
214
258
  }
215
259
 
216
260
  Modal.prototype.resetScrollbar = function () {
@@ -218,7 +262,6 @@
218
262
  }
219
263
 
220
264
  Modal.prototype.measureScrollbar = function () { // thx walsh
221
- if (document.body.clientWidth >= window.innerWidth) return 0
222
265
  var scrollDiv = document.createElement('div')
223
266
  scrollDiv.className = 'modal-scrollbar-measure'
224
267
  this.$body.append(scrollDiv)
@@ -1,5 +1,5 @@
1
1
  /* ========================================================================
2
- * Bootstrap: tooltip.js v3.3.0
2
+ * Bootstrap: tooltip.js v3.3.1
3
3
  * http://getbootstrap.com/javascript/#tooltip
4
4
  * Inspired by the original jQuery.tipsy by Jason Frame
5
5
  * ========================================================================
@@ -25,7 +25,7 @@
25
25
  this.init('tooltip', element, options)
26
26
  }
27
27
 
28
- Tooltip.VERSION = '3.3.0'
28
+ Tooltip.VERSION = '3.3.1'
29
29
 
30
30
  Tooltip.TRANSITION_DURATION = 150
31
31
 
@@ -1,8 +1,5 @@
1
1
  // #### VARIABLES ####
2
2
 
3
- // Colors
4
- $bodyBackgroundColor: #aab2bd;
5
-
6
3
  // Grayscale
7
4
  $black: #222;
8
5
  $darkestGray: #444;
@@ -33,25 +30,7 @@ $mintHighlight: #e7f9e7;
33
30
  $questionTextColor: #297cbb;
34
31
  $purpleBlue: #6188f5;
35
32
 
36
- // Nav
37
- $navBackground: #434a54;
38
- $navHoverBackground: #3c434c;
39
- $navDropdownBackground: $white;
40
- $navBorderColor: #363b43;
41
- $navHeight: 60px;
42
- $navBreakpoint: 800px;
43
- $navLinkColor: $white;
44
- $navDropdownHeaderColor: $darkerGray;
45
-
46
- // Bottom status bar
47
- $bottomStatusBarHeight: 60px;
48
-
49
- // Sidebar nav
50
- $sidebarNavHighlightColor: #267aac;
51
- $sidebarNavBadgeColor: $successColor;
52
-
53
33
  // Corner radius
54
-
55
34
  $radius: 3px;
56
35
 
57
36
  // Bold font weight
@@ -24,7 +24,7 @@
24
24
 
25
25
  .sidebar_data {
26
26
  padding: 0 1rem;
27
- li {
27
+ > li {
28
28
  border-bottom: 1px solid $lightGray;
29
29
  padding: 0.75rem 0;
30
30
  &:first-of-type {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dvl-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Becker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-29 00:00:00.000000000 Z
11
+ date: 2014-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport