mice 0.2.10 → 0.2.11

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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +44 -36
  3. data/lib/mice/version.rb +1 -1
  4. metadata +2 -67
  5. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  6. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  7. data/vendor/assets/fonts/fontawesome-webfont.svg +0 -414
  8. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  9. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  10. data/vendor/assets/images/ZeroClipboard.swf +0 -0
  11. data/vendor/assets/javascripts/mice/ZeroClipboard.js +0 -1031
  12. data/vendor/assets/javascripts/mice/ZeroClipboard.min.js +0 -9
  13. data/vendor/assets/javascripts/mice/alert.js +0 -92
  14. data/vendor/assets/javascripts/mice/carousel.js +0 -66
  15. data/vendor/assets/javascripts/mice/jquery.autocomplete.min.js +0 -29
  16. data/vendor/assets/javascripts/mice/jquery.autofix_anything.js +0 -83
  17. data/vendor/assets/javascripts/mice/jquery.email-autocomplete.js +0 -178
  18. data/vendor/assets/javascripts/mice/jquery.js +0 -9597
  19. data/vendor/assets/javascripts/mice/jquery.min.js +0 -5
  20. data/vendor/assets/javascripts/mice/jquery.min.map +0 -1
  21. data/vendor/assets/javascripts/mice/jquery.onepage-scroll.js +0 -411
  22. data/vendor/assets/javascripts/mice/message.coffee +0 -104
  23. data/vendor/assets/javascripts/mice/modal.coffee +0 -237
  24. data/vendor/assets/javascripts/mice/slider.coffee +0 -20
  25. data/vendor/assets/javascripts/mice/slider.js +0 -223
  26. data/vendor/assets/javascripts/mice/tooltip.coffee +0 -338
  27. data/vendor/assets/javascripts/mice/transition.coffee +0 -36
  28. data/vendor/assets/javascripts/mice.js +0 -6
  29. data/vendor/assets/stylesheets/mice/_alerts.scss +0 -70
  30. data/vendor/assets/stylesheets/mice/_autofix_anything.scss +0 -14
  31. data/vendor/assets/stylesheets/mice/_breadcrumbs.scss +0 -26
  32. data/vendor/assets/stylesheets/mice/_buttons.scss +0 -407
  33. data/vendor/assets/stylesheets/mice/_callouts.scss +0 -71
  34. data/vendor/assets/stylesheets/mice/_close.scss +0 -35
  35. data/vendor/assets/stylesheets/mice/_code.scss +0 -63
  36. data/vendor/assets/stylesheets/mice/_component-animations.scss +0 -11
  37. data/vendor/assets/stylesheets/mice/_forms.scss +0 -402
  38. data/vendor/assets/stylesheets/mice/_grid.scss +0 -95
  39. data/vendor/assets/stylesheets/mice/_icons.scss +0 -564
  40. data/vendor/assets/stylesheets/mice/_images.scss +0 -250
  41. data/vendor/assets/stylesheets/mice/_labels.scss +0 -82
  42. data/vendor/assets/stylesheets/mice/_lists.scss +0 -186
  43. data/vendor/assets/stylesheets/mice/_media.scss +0 -53
  44. data/vendor/assets/stylesheets/mice/_menu.scss +0 -42
  45. data/vendor/assets/stylesheets/mice/_message.scss +0 -78
  46. data/vendor/assets/stylesheets/mice/_mixins.scss +0 -176
  47. data/vendor/assets/stylesheets/mice/_modals.scss +0 -160
  48. data/vendor/assets/stylesheets/mice/_navbar.scss +0 -86
  49. data/vendor/assets/stylesheets/mice/_normalize.scss +0 -425
  50. data/vendor/assets/stylesheets/mice/_pagination.scss +0 -171
  51. data/vendor/assets/stylesheets/mice/_panels.scss +0 -236
  52. data/vendor/assets/stylesheets/mice/_progress.scss +0 -65
  53. data/vendor/assets/stylesheets/mice/_scaffolding.scss +0 -101
  54. data/vendor/assets/stylesheets/mice/_sidebar.scss +0 -37
  55. data/vendor/assets/stylesheets/mice/_slider.scss +0 -310
  56. data/vendor/assets/stylesheets/mice/_tables.scss +0 -144
  57. data/vendor/assets/stylesheets/mice/_tabs.scss +0 -70
  58. data/vendor/assets/stylesheets/mice/_timeline.scss +0 -157
  59. data/vendor/assets/stylesheets/mice/_tipsy.scss +0 -36
  60. data/vendor/assets/stylesheets/mice/_tooltips.scss +0 -124
  61. data/vendor/assets/stylesheets/mice/_typography.scss +0 -113
  62. data/vendor/assets/stylesheets/mice/_utilities.scss +0 -48
  63. data/vendor/assets/stylesheets/mice/_variables.scss +0 -577
  64. data/vendor/assets/stylesheets/mice-mobile.scss +0 -23
  65. data/vendor/assets/stylesheets/mice.scss +0 -46
  66. data/vendor/assets/stylesheets/mobile/bars.scss +0 -76
  67. data/vendor/assets/stylesheets/mobile/base.scss +0 -52
  68. data/vendor/assets/stylesheets/mobile/cards.scss +0 -29
  69. data/vendor/assets/stylesheets/mobile/variables.scss +0 -37
@@ -1,237 +0,0 @@
1
- 'use strict';
2
-
3
- (($) ->
4
-
5
- # MODAL CLASS DEFINITION
6
- # ======================
7
-
8
- class Modal
9
- constructor: (element, options) ->
10
- @options = options
11
- @$body = $(document.body)
12
- @$element = $(element)
13
- @$backdrop
14
- @isShown = null
15
- @scrollbarWidth = 0
16
-
17
- if @options.remote
18
- @$element.find('.modal-content').load(@options.remote, $.proxy( (-> @$element.trigger('loaded.modal')) , @))
19
-
20
- Modal.VERSION = '3.2.0'
21
-
22
- Modal.DEFAULTS =
23
- backdrop: true
24
- keyboard: true
25
- show: true
26
-
27
-
28
- Modal::toggle = (_relatedTarget) ->
29
- if @isShown then @hide() else @show(_relatedTarget)
30
-
31
-
32
- Modal::show = (_relatedTarget) ->
33
- e = $.Event('show.modal', relatedTarget: _relatedTarget)
34
-
35
- @$element.trigger(e)
36
-
37
- return if (@isShown || e.isDefaultPrevented())
38
-
39
- @isShown = true
40
-
41
- @checkScrollbar()
42
- @$body.addClass('modal-open')
43
-
44
- @setScrollbar()
45
- @escape()
46
-
47
- @$element.on 'click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(@hide, @)
48
-
49
- @backdrop =>
50
- transition = $.support.transition && @$element.hasClass('fade')
51
-
52
- @$element.appendTo(@$body) unless @$element.parent().length # don't move modals dom position
53
-
54
- @$element.show().scrollTop(0)
55
-
56
- @$element[0].offsetWidth if transition # force reflow
57
-
58
- @$element.addClass('in').attr('aria-hidden', false)
59
-
60
- @enforceFocus()
61
-
62
- e = $.Event('shown.modal', relatedTarget: _relatedTarget)
63
-
64
- if transition
65
- @$element.find('.modal-dialog') # wait for modal to slide in
66
- .one 'miceTransitionEnd', -> @$element.trigger('focus').trigger(e)
67
- .emulateTransitionEnd(300)
68
- else
69
- @$element.trigger('focus').trigger(e)
70
-
71
-
72
- Modal::hide = (e) ->
73
- if (e) then e.preventDefault()
74
-
75
- e = $.Event('hide.modal')
76
-
77
- @$element.trigger(e)
78
-
79
- return if (!@isShown || e.isDefaultPrevented())
80
-
81
- @isShown = false
82
-
83
- @$body.removeClass('modal-open')
84
-
85
- @resetScrollbar()
86
- @escape()
87
-
88
- $(document).off('focusin.modal')
89
-
90
- @$element.removeClass('in').attr('aria-hidden', true).off('click.dismiss.modal')
91
-
92
- if $.support.transition && @$element.hasClass('fade')
93
- @$element.one('miceTransitionEnd', $.proxy(@hideModal, @)).emulateTransitionEnd(300)
94
- else
95
- @hideModal()
96
-
97
-
98
- Modal::enforceFocus = ->
99
- $(document)
100
- .off 'focusin.modal' # guard against infinite focus loop
101
- .on 'focusin.modal',
102
- $.proxy (e) ->
103
- @$element.trigger('focus') if @$element[0] != e.target && !@$element.has(e.target).length
104
- , @
105
-
106
-
107
- Modal::escape = ->
108
- if @isShown && @options.keyboard
109
- @$element.on 'keyup.dismiss.modal', ($.proxy (e) -> e.which == 27 && @hide()), @
110
- else if !@isShown
111
- @$element.off('keyup.dismiss.modal')
112
-
113
-
114
- Modal::hideModal = ->
115
- @$element.hide()
116
- @backdrop => @$element.trigger('hidden.modal')
117
-
118
- Modal::removeBackdrop = ->
119
- @$backdrop && @$backdrop.remove()
120
- @$backdrop = null
121
-
122
-
123
- Modal::backdrop = (callback) ->
124
- animate = if @$element.hasClass('fade') then 'fade' else ''
125
-
126
- if @isShown && @options.backdrop
127
- doAnimate = $.support.transition && animate
128
-
129
- @$backdrop = $('<div class="modal-backdrop ' + animate + '" />').appendTo(@$body)
130
-
131
- @$element.on 'click.dismiss.modal',
132
- $.proxy (e) ->
133
- return if e.target != e.currentTarget
134
- if @options.backdrop == 'static' then @$element[0].focus.call(@$element[0]) else @hide.call(@)
135
- , @
136
-
137
- @$backdrop[0].offsetWidth if doAnimate # force reflow
138
-
139
- @$backdrop.addClass('in')
140
-
141
- return unless callback
142
-
143
- if doAnimate then @$backdrop.one('miceTransitionEnd', callback).emulateTransitionEnd(150) else callback()
144
-
145
- else if !@isShown && @$backdrop
146
- @$backdrop.removeClass('in')
147
-
148
- callbackRemove = =>
149
- @removeBackdrop()
150
- callback && callback()
151
-
152
- if $.support.transition && @$element.hasClass('fade')
153
- @$backdrop.one('miceTransitionEnd', callbackRemove).emulateTransitionEnd(150)
154
- else
155
- callbackRemove()
156
-
157
- else if callback
158
- callback()
159
-
160
-
161
- Modal::checkScrollbar = ->
162
- return if document.body.clientWidth >= window.innerWidth
163
- @scrollbarWidth = @scrollbarWidth || @measureScrollbar()
164
-
165
-
166
- Modal::setScrollbar = ->
167
- bodyPad = parseInt @$body.css('padding-right') || 0, 10
168
- @$body.css('padding-right', bodyPad + @scrollbarWidth) if @scrollbarWidth
169
-
170
-
171
- Modal::resetScrollbar = ->
172
- @$body.css 'padding-right', ''
173
-
174
-
175
- Modal::measureScrollbar = -> # thx walsh
176
- scrollDiv = document.createElement('div')
177
- scrollDiv.className = 'modal-scrollbar-measure'
178
- @$body.append(scrollDiv)
179
- scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
180
- @$body[0].removeChild(scrollDiv)
181
- scrollbarWidth
182
-
183
-
184
- # MODAL PLUGIN DEFINITION
185
- # =======================
186
-
187
- Plugin = (option, _relatedTarget) ->
188
- @each ->
189
- $element = $(@)
190
- data = $element.data('modal')
191
- options = $.extend({}, Modal.DEFAULTS, $element.data(), typeof option == 'object' && option)
192
-
193
- if (!data)
194
- $element.data 'modal', (data = new Modal(@, options))
195
-
196
- if typeof option == 'string'
197
- data[option](_relatedTarget)
198
-
199
- else if options.show
200
- data.show(_relatedTarget)
201
-
202
- old = $.fn.modal
203
-
204
- $.fn.modal = Plugin
205
- $.fn.modal.Constructor = Modal
206
-
207
-
208
- # MODAL NO CONFLICT
209
- # =================
210
-
211
- $.fn.modal.noConflict = ->
212
- $.fn.modal = old
213
- @
214
-
215
-
216
- # MODAL DATA-API
217
- # ==============
218
-
219
- $(document).on 'click.modal.data-api',
220
- '[data-toggle="modal"]',
221
- (e) ->
222
- $element = $(@)
223
- href = $element.attr('href')
224
- $target = $($element.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) # strip for ie7
225
- option = if $target.data('modal') then 'toggle' else $.extend({ remote: !/#/.test(href) && href }, $target.data(), $element.data())
226
-
227
- e.preventDefault() if $element.is('a')
228
-
229
- $target.one 'show.modal', (showEvent) ->
230
- return if (showEvent.isDefaultPrevented()) # only register focus restorer if modal will actually get shown
231
- $target.one 'hidden.modal', -> $element.is(':visible') && $element.trigger('focus')
232
-
233
- Plugin.call($target, option, @)
234
-
235
- return
236
-
237
- ) jQuery
@@ -1,20 +0,0 @@
1
- # Mice: Slider
2
-
3
- 'use strict';
4
-
5
- (($) ->
6
-
7
- # TOOLTIP PUBLIC CLASS DEFINITION
8
- # ===============================
9
- class Slider
10
- constructor: (element, options) ->
11
- @slider
12
- @options
13
-
14
- @init()
15
-
16
-
17
- init: ->
18
-
19
- return
20
- ) jQuery
@@ -1,223 +0,0 @@
1
- /* ========================================================================
2
- * Bootstrap: carousel.js v3.2.0
3
- * http://getbootstrap.com/javascript/#carousel
4
- * ========================================================================
5
- * Copyright 2011-2014 Twitter, Inc.
6
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
- * ======================================================================== */
8
-
9
-
10
- +function ($) {
11
- 'use strict';
12
-
13
- // CAROUSEL CLASS DEFINITION
14
- // =========================
15
-
16
- var Carousel = function (element, options) {
17
- this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this))
18
- this.$indicators = this.$element.find('.indicators')
19
- this.options = options
20
- this.paused =
21
- this.sliding =
22
- this.interval =
23
- this.$active =
24
- this.$items = null
25
-
26
- this.options.pause == 'hover' && this.$element
27
- .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
28
- .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
29
- }
30
-
31
- Carousel.VERSION = '3.2.0'
32
-
33
- Carousel.DEFAULTS = {
34
- interval: 5000,
35
- pause: 'hover',
36
- wrap: true
37
- }
38
-
39
- Carousel.prototype.keydown = function (e) {
40
- switch (e.which) {
41
- case 37: this.prev(); break
42
- case 39: this.next(); break
43
- default: return
44
- }
45
-
46
- e.preventDefault()
47
- }
48
-
49
- Carousel.prototype.cycle = function (e) {
50
- e || (this.paused = false)
51
-
52
- this.interval && clearInterval(this.interval)
53
-
54
- this.options.interval
55
- && !this.paused
56
- && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
57
-
58
- return this
59
- }
60
-
61
- Carousel.prototype.getItemIndex = function (item) {
62
- this.$items = item.parent().children('.item')
63
- return this.$items.index(item || this.$active)
64
- }
65
-
66
- Carousel.prototype.to = function (pos) {
67
- var that = this
68
- var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
69
-
70
- if (pos > (this.$items.length - 1) || pos < 0) return
71
-
72
- if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
73
- if (activeIndex == pos) return this.pause().cycle()
74
-
75
- return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
76
- }
77
-
78
- Carousel.prototype.pause = function (e) {
79
- e || (this.paused = true)
80
-
81
- if (this.$element.find('.next, .prev').length && $.support.transition) {
82
- this.$element.trigger($.support.transition.end)
83
- this.cycle(true)
84
- }
85
-
86
- this.interval = clearInterval(this.interval)
87
-
88
- return this
89
- }
90
-
91
- Carousel.prototype.next = function () {
92
- if (this.sliding) return
93
- return this.slide('next')
94
- }
95
-
96
- Carousel.prototype.prev = function () {
97
- if (this.sliding) return
98
- return this.slide('prev')
99
- }
100
-
101
- Carousel.prototype.slide = function (type, next) {
102
- var $active = this.$element.find('.item.active')
103
- var $next = next || $active[type]()
104
- var isCycling = this.interval
105
- var direction = type == 'next' ? 'left' : 'right'
106
- var fallback = type == 'next' ? 'first' : 'last'
107
- var that = this
108
-
109
- if (!$next.length) {
110
- if (!this.options.wrap) return
111
- $next = this.$element.find('.item')[fallback]()
112
- }
113
-
114
- if ($next.hasClass('active')) return (this.sliding = false)
115
-
116
- var relatedTarget = $next[0]
117
- var slideEvent = $.Event('slide.bs.carousel', {
118
- relatedTarget: relatedTarget,
119
- direction: direction
120
- })
121
- this.$element.trigger(slideEvent)
122
- if (slideEvent.isDefaultPrevented()) return
123
-
124
- this.sliding = true
125
-
126
- isCycling && this.pause()
127
-
128
- if (this.$indicators.length) {
129
- this.$indicators.find('.active').removeClass('active')
130
- var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
131
- $nextIndicator && $nextIndicator.addClass('active')
132
- }
133
-
134
- var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
135
- if ($.support.transition && this.$element.hasClass('slide')) {
136
- $next.addClass(type)
137
- $next[0].offsetWidth // force reflow
138
- $active.addClass(direction)
139
- $next.addClass(direction)
140
- $active
141
- .one('miceTransitionEnd', function () {
142
- $next.removeClass([type, direction].join(' ')).addClass('active')
143
- $active.removeClass(['active', direction].join(' '))
144
- that.sliding = false
145
- setTimeout(function () {
146
- that.$element.trigger(slidEvent)
147
- }, 0)
148
- })
149
- .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
150
- } else {
151
- $active.removeClass('active')
152
- $next.addClass('active')
153
- this.sliding = false
154
- this.$element.trigger(slidEvent)
155
- }
156
-
157
- isCycling && this.cycle()
158
-
159
- return this
160
- }
161
-
162
-
163
- // CAROUSEL PLUGIN DEFINITION
164
- // ==========================
165
-
166
- function Plugin(option) {
167
- return this.each(function () {
168
- var $this = $(this)
169
- var data = $this.data('bs.carousel')
170
- var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
171
- var action = typeof option == 'string' ? option : options.slide
172
-
173
- if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
174
- if (typeof option == 'number') data.to(option)
175
- else if (action) data[action]()
176
- else if (options.interval) data.pause().cycle()
177
- })
178
- }
179
-
180
- var old = $.fn.carousel
181
-
182
- $.fn.carousel = Plugin
183
- $.fn.carousel.Constructor = Carousel
184
-
185
-
186
- // CAROUSEL NO CONFLICT
187
- // ====================
188
-
189
- $.fn.carousel.noConflict = function () {
190
- $.fn.carousel = old
191
- return this
192
- }
193
-
194
-
195
- // CAROUSEL DATA-API
196
- // =================
197
-
198
- $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
199
- var href
200
- var $this = $(this)
201
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
202
- if (!$target.hasClass('carousel')) return
203
- var options = $.extend({}, $target.data(), $this.data())
204
- var slideIndex = $this.attr('data-slide-to')
205
- if (slideIndex) options.interval = false
206
-
207
- Plugin.call($target, options)
208
-
209
- if (slideIndex) {
210
- $target.data('bs.carousel').to(slideIndex)
211
- }
212
-
213
- e.preventDefault()
214
- })
215
-
216
- $(window).on('load', function () {
217
- $('[data-ride="carousel"]').each(function () {
218
- var $carousel = $(this)
219
- Plugin.call($carousel, $carousel.data())
220
- })
221
- })
222
-
223
- }(jQuery);