flashoff 0.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.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +74 -0
  6. data/Rakefile +1 -0
  7. data/app/assets/fonts/gotham/gotham-bold.eot +0 -0
  8. data/app/assets/fonts/gotham/gotham-bold.svg +2066 -0
  9. data/app/assets/fonts/gotham/gotham-bold.ttf +0 -0
  10. data/app/assets/fonts/gotham/gotham-bold.woff +0 -0
  11. data/app/assets/fonts/gotham/gotham-book.eot +0 -0
  12. data/app/assets/fonts/gotham/gotham-book.svg +631 -0
  13. data/app/assets/fonts/gotham/gotham-book.ttf +0 -0
  14. data/app/assets/fonts/gotham/gotham-book.woff +0 -0
  15. data/app/assets/fonts/gotham/gotham-light.eot +0 -0
  16. data/app/assets/fonts/gotham/gotham-light.svg +635 -0
  17. data/app/assets/fonts/gotham/gotham-light.ttf +0 -0
  18. data/app/assets/fonts/gotham/gotham-light.woff +0 -0
  19. data/app/assets/fonts/gotham/gotham-medium.eot +0 -0
  20. data/app/assets/fonts/gotham/gotham-medium.svg +629 -0
  21. data/app/assets/fonts/gotham/gotham-medium.ttf +0 -0
  22. data/app/assets/fonts/gotham/gotham-medium.woff +0 -0
  23. data/app/assets/fonts/ionicons/ionicons.eot +0 -0
  24. data/app/assets/fonts/ionicons/ionicons.svg +1390 -0
  25. data/app/assets/fonts/ionicons/ionicons.ttf +0 -0
  26. data/app/assets/fonts/ionicons/ionicons.woff +0 -0
  27. data/flashoff.gemspec +23 -0
  28. data/lib/flashoff/version.rb +3 -0
  29. data/lib/flashoff.rb +5 -0
  30. data/vendor/assets/javascripts/alert.js +78 -0
  31. data/vendor/assets/javascripts/collapse.js +159 -0
  32. data/vendor/assets/javascripts/date_picker.js +1385 -0
  33. data/vendor/assets/javascripts/dropdown.js +134 -0
  34. data/vendor/assets/javascripts/file_input.js +88 -0
  35. data/vendor/assets/javascripts/map.js +2036 -0
  36. data/vendor/assets/javascripts/modal.js +226 -0
  37. data/vendor/assets/javascripts/popover.js +97 -0
  38. data/vendor/assets/javascripts/tab.js +115 -0
  39. data/vendor/assets/javascripts/time_picker.js +878 -0
  40. data/vendor/assets/javascripts/tooltip.js +365 -0
  41. data/vendor/assets/javascripts/transition.js +36 -0
  42. data/vendor/assets/stylesheets/ad.css.scss +72 -0
  43. data/vendor/assets/stylesheets/alert.css.scss +57 -0
  44. data/vendor/assets/stylesheets/breadcrumb.css.scss +26 -0
  45. data/vendor/assets/stylesheets/button.css.scss +183 -0
  46. data/vendor/assets/stylesheets/code.css.scss +49 -0
  47. data/vendor/assets/stylesheets/collapse.css.scss +15 -0
  48. data/vendor/assets/stylesheets/datepicker.css.scss +104 -0
  49. data/vendor/assets/stylesheets/dropdown.css.scss +84 -0
  50. data/vendor/assets/stylesheets/footer.css.scss +33 -0
  51. data/vendor/assets/stylesheets/form.css.scss +213 -0
  52. data/vendor/assets/stylesheets/grid.css.scss +291 -0
  53. data/vendor/assets/stylesheets/header.css.scss +134 -0
  54. data/vendor/assets/stylesheets/icon.css.scss +972 -0
  55. data/vendor/assets/stylesheets/image.css.scss +39 -0
  56. data/vendor/assets/stylesheets/label_and_badge.css.scss +53 -0
  57. data/vendor/assets/stylesheets/link.css.scss +19 -0
  58. data/vendor/assets/stylesheets/list.css.scss +38 -0
  59. data/vendor/assets/stylesheets/map.css.scss +13 -0
  60. data/vendor/assets/stylesheets/modal.css.scss +117 -0
  61. data/vendor/assets/stylesheets/pagination.css.scss +37 -0
  62. data/vendor/assets/stylesheets/placeholder.css.scss +11 -0
  63. data/vendor/assets/stylesheets/popover.css.scss +107 -0
  64. data/vendor/assets/stylesheets/progress.css.scss +25 -0
  65. data/vendor/assets/stylesheets/reset.css.scss +57 -0
  66. data/vendor/assets/stylesheets/tab.css.scss +165 -0
  67. data/vendor/assets/stylesheets/table.css.scss +70 -0
  68. data/vendor/assets/stylesheets/timepicker.css.scss +69 -0
  69. data/vendor/assets/stylesheets/tooltip.css.scss +81 -0
  70. data/vendor/assets/stylesheets/transition.css.scss +12 -0
  71. data/vendor/assets/stylesheets/trunk.css.scss +69 -0
  72. data/vendor/assets/stylesheets/typography.css.scss +147 -0
  73. metadata +144 -0
@@ -0,0 +1,226 @@
1
+ +function ($) { "use strict";
2
+
3
+ // MODAL CLASS DEFINITION
4
+ // ======================
5
+
6
+ var Modal = function (element, options) {
7
+ this.options = options
8
+ this.$element = $(element)
9
+ this.$backdrop =
10
+ this.isShown = null
11
+
12
+ if (this.options.remote) this.$element.load(this.options.remote)
13
+ }
14
+
15
+ Modal.DEFAULTS = {
16
+ backdrop: true
17
+ , keyboard: true
18
+ , show: true
19
+ }
20
+
21
+ Modal.prototype.toggle = function (_relatedTarget) {
22
+ return this[!this.isShown ? 'show' : 'hide'](_relatedTarget)
23
+ }
24
+
25
+ Modal.prototype.show = function (_relatedTarget) {
26
+ var that = this
27
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
28
+
29
+ this.$element.trigger(e)
30
+
31
+ if (this.isShown || e.isDefaultPrevented()) return
32
+
33
+ this.isShown = true
34
+
35
+ this.escape()
36
+
37
+ this.$element.on('click.dismiss.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
38
+
39
+ this.backdrop(function () {
40
+ var transition = $.support.transition && that.$element.hasClass('fade')
41
+
42
+ if (!that.$element.parent().length) {
43
+ that.$element.appendTo(document.body) // don't move modals dom position
44
+ }
45
+
46
+ that.$element.show()
47
+
48
+ if (transition) {
49
+ that.$element[0].offsetWidth // force reflow
50
+ }
51
+
52
+ that.$element
53
+ .addClass('in')
54
+ .attr('aria-hidden', false)
55
+
56
+ that.enforceFocus()
57
+
58
+ var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
59
+
60
+ transition ?
61
+ that.$element.find('.modal-dialog') // wait for modal to slide in
62
+ .one($.support.transition.end, function () {
63
+ that.$element.focus().trigger(e)
64
+ })
65
+ .emulateTransitionEnd(300) :
66
+ that.$element.focus().trigger(e)
67
+ })
68
+ }
69
+
70
+ Modal.prototype.hide = function (e) {
71
+ if (e) e.preventDefault()
72
+
73
+ e = $.Event('hide.bs.modal')
74
+
75
+ this.$element.trigger(e)
76
+
77
+ if (!this.isShown || e.isDefaultPrevented()) return
78
+
79
+ this.isShown = false
80
+
81
+ this.escape()
82
+
83
+ $(document).off('focusin.bs.modal')
84
+
85
+ this.$element
86
+ .removeClass('in')
87
+ .attr('aria-hidden', true)
88
+ .off('click.dismiss.modal')
89
+
90
+ $.support.transition && this.$element.hasClass('fade') ?
91
+ this.$element
92
+ .one($.support.transition.end, $.proxy(this.hideModal, this))
93
+ .emulateTransitionEnd(300) :
94
+ this.hideModal()
95
+ }
96
+
97
+ Modal.prototype.enforceFocus = function () {
98
+ $(document)
99
+ .off('focusin.bs.modal') // guard against infinite focus loop
100
+ .on('focusin.bs.modal', $.proxy(function (e) {
101
+ if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
102
+ this.$element.focus()
103
+ }
104
+ }, this))
105
+ }
106
+
107
+ Modal.prototype.escape = function () {
108
+ if (this.isShown && this.options.keyboard) {
109
+ this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
110
+ e.which == 27 && this.hide()
111
+ }, this))
112
+ } else if (!this.isShown) {
113
+ this.$element.off('keyup.dismiss.bs.modal')
114
+ }
115
+ }
116
+
117
+ Modal.prototype.hideModal = function () {
118
+ var that = this
119
+ this.$element.hide()
120
+ this.backdrop(function () {
121
+ that.removeBackdrop()
122
+ that.$element.trigger('hidden.bs.modal')
123
+ })
124
+ }
125
+
126
+ Modal.prototype.removeBackdrop = function () {
127
+ this.$backdrop && this.$backdrop.remove()
128
+ this.$backdrop = null
129
+ }
130
+
131
+ Modal.prototype.backdrop = function (callback) {
132
+ var that = this
133
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
134
+
135
+ if (this.isShown && this.options.backdrop) {
136
+ var doAnimate = $.support.transition && animate
137
+
138
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
139
+ .appendTo(document.body)
140
+
141
+ this.$element.on('click.dismiss.modal', $.proxy(function (e) {
142
+ if (e.target !== e.currentTarget) return
143
+ this.options.backdrop == 'static'
144
+ ? this.$element[0].focus.call(this.$element[0])
145
+ : this.hide.call(this)
146
+ }, this))
147
+
148
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
149
+
150
+ this.$backdrop.addClass('in')
151
+
152
+ if (!callback) return
153
+
154
+ doAnimate ?
155
+ this.$backdrop
156
+ .one($.support.transition.end, callback)
157
+ .emulateTransitionEnd(150) :
158
+ callback()
159
+
160
+ } else if (!this.isShown && this.$backdrop) {
161
+ this.$backdrop.removeClass('in')
162
+
163
+ $.support.transition && this.$element.hasClass('fade')?
164
+ this.$backdrop
165
+ .one($.support.transition.end, callback)
166
+ .emulateTransitionEnd(150) :
167
+ callback()
168
+
169
+ } else if (callback) {
170
+ callback()
171
+ }
172
+ }
173
+
174
+
175
+ // MODAL PLUGIN DEFINITION
176
+ // =======================
177
+
178
+ var old = $.fn.modal
179
+
180
+ $.fn.modal = function (option, _relatedTarget) {
181
+ return this.each(function () {
182
+ var $this = $(this)
183
+ var data = $this.data('bs.modal')
184
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
185
+
186
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
187
+ if (typeof option == 'string') data[option](_relatedTarget)
188
+ else if (options.show) data.show(_relatedTarget)
189
+ })
190
+ }
191
+
192
+ $.fn.modal.Constructor = Modal
193
+
194
+
195
+ // MODAL NO CONFLICT
196
+ // =================
197
+
198
+ $.fn.modal.noConflict = function () {
199
+ $.fn.modal = old
200
+ return this
201
+ }
202
+
203
+
204
+ // MODAL DATA-API
205
+ // ==============
206
+
207
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
208
+ var $this = $(this)
209
+ var href = $this.attr('href')
210
+ 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())
212
+
213
+ e.preventDefault()
214
+
215
+ $target
216
+ .modal(option, this)
217
+ .one('hide', function () {
218
+ $this.is(':visible') && $this.focus()
219
+ })
220
+ })
221
+
222
+ $(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') })
225
+
226
+ }(jQuery);
@@ -0,0 +1,97 @@
1
+ +function ($) { "use strict";
2
+
3
+ // POPOVER PUBLIC CLASS DEFINITION
4
+ // ===============================
5
+
6
+ var Popover = function (element, options) {
7
+ this.init('popover', element, options)
8
+ }
9
+
10
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
11
+
12
+ Popover.DEFAULTS = $.extend({} , $.fn.tooltip.Constructor.DEFAULTS, {
13
+ placement: 'right'
14
+ , trigger: 'click'
15
+ , content: ''
16
+ , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
17
+ })
18
+
19
+
20
+ // NOTE: POPOVER EXTENDS tooltip.js
21
+ // ================================
22
+
23
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
24
+
25
+ Popover.prototype.constructor = Popover
26
+
27
+ Popover.prototype.getDefaults = function () {
28
+ return Popover.DEFAULTS
29
+ }
30
+
31
+ Popover.prototype.setContent = function () {
32
+ var $tip = this.tip()
33
+ var title = this.getTitle()
34
+ var content = this.getContent()
35
+
36
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
37
+ $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
38
+
39
+ $tip.removeClass('fade top bottom left right in')
40
+
41
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
42
+ // this manually by checking the contents.
43
+ if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
44
+ }
45
+
46
+ Popover.prototype.hasContent = function () {
47
+ return this.getTitle() || this.getContent()
48
+ }
49
+
50
+ Popover.prototype.getContent = function () {
51
+ var $e = this.$element
52
+ var o = this.options
53
+
54
+ return $e.attr('data-content')
55
+ || (typeof o.content == 'function' ?
56
+ o.content.call($e[0]) :
57
+ o.content)
58
+ }
59
+
60
+ Popover.prototype.arrow = function () {
61
+ return this.$arrow = this.$arrow || this.tip().find('.arrow')
62
+ }
63
+
64
+ Popover.prototype.tip = function () {
65
+ if (!this.$tip) this.$tip = $(this.options.template)
66
+ return this.$tip
67
+ }
68
+
69
+
70
+ // POPOVER PLUGIN DEFINITION
71
+ // =========================
72
+
73
+ var old = $.fn.popover
74
+
75
+ $.fn.popover = function (option) {
76
+ return this.each(function () {
77
+ var $this = $(this)
78
+ var data = $this.data('bs.popover')
79
+ var options = typeof option == 'object' && option
80
+
81
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
82
+ if (typeof option == 'string') data[option]()
83
+ })
84
+ }
85
+
86
+ $.fn.popover.Constructor = Popover
87
+
88
+
89
+ // POPOVER NO CONFLICT
90
+ // ===================
91
+
92
+ $.fn.popover.noConflict = function () {
93
+ $.fn.popover = old
94
+ return this
95
+ }
96
+
97
+ }(jQuery);
@@ -0,0 +1,115 @@
1
+ +function ($) { "use strict";
2
+
3
+ // TAB CLASS DEFINITION
4
+ // ====================
5
+
6
+ var Tab = function (element) {
7
+ this.element = $(element)
8
+ }
9
+
10
+ Tab.prototype.show = function () {
11
+ var $this = this.element
12
+ var $ul = $this.closest('ul:not(.dropdown-menu)')
13
+ var selector = $this.data('target')
14
+
15
+ if (!selector) {
16
+ selector = $this.attr('href')
17
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
18
+ }
19
+
20
+ if ($this.parent('li').hasClass('active')) return
21
+
22
+ var previous = $ul.find('.active:last a')[0]
23
+ var e = $.Event('show.bs.tab', {
24
+ relatedTarget: previous
25
+ })
26
+
27
+ $this.trigger(e)
28
+
29
+ if (e.isDefaultPrevented()) return
30
+
31
+ var $target = $(selector)
32
+
33
+ this.activate($this.parent('li'), $ul)
34
+ this.activate($target, $target.parent(), function () {
35
+ $this.trigger({
36
+ type: 'shown.bs.tab'
37
+ , relatedTarget: previous
38
+ })
39
+ })
40
+ }
41
+
42
+ Tab.prototype.activate = function (element, container, callback) {
43
+ var $active = container.find('> .active')
44
+ var transition = callback
45
+ && $.support.transition
46
+ && $active.hasClass('fade')
47
+
48
+ function next() {
49
+ $active
50
+ .removeClass('active')
51
+ .find('> .dropdown-menu > .active')
52
+ .removeClass('active')
53
+
54
+ element.addClass('active')
55
+
56
+ if (transition) {
57
+ element[0].offsetWidth // reflow for transition
58
+ element.addClass('in')
59
+ } else {
60
+ element.removeClass('fade')
61
+ }
62
+
63
+ if (element.parent('.dropdown-menu')) {
64
+ element.closest('li.dropdown').addClass('active')
65
+ }
66
+
67
+ callback && callback()
68
+ }
69
+
70
+ transition ?
71
+ $active
72
+ .one($.support.transition.end, next)
73
+ .emulateTransitionEnd(150) :
74
+ next()
75
+
76
+ $active.removeClass('in')
77
+ }
78
+
79
+
80
+ // TAB PLUGIN DEFINITION
81
+ // =====================
82
+
83
+ var old = $.fn.tab
84
+
85
+ $.fn.tab = function ( option ) {
86
+ return this.each(function () {
87
+ var $this = $(this)
88
+ var data = $this.data('bs.tab')
89
+
90
+ if (!data) $this.data('bs.tab', (data = new Tab(this)))
91
+ if (typeof option == 'string') data[option]()
92
+ })
93
+ }
94
+
95
+ $.fn.tab.Constructor = Tab
96
+
97
+
98
+ // TAB NO CONFLICT
99
+ // ===============
100
+
101
+ $.fn.tab.noConflict = function () {
102
+ $.fn.tab = old
103
+ return this
104
+ }
105
+
106
+
107
+ // TAB DATA-API
108
+ // ============
109
+
110
+ $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
111
+ e.preventDefault()
112
+ $(this).tab('show')
113
+ })
114
+
115
+ }(jQuery);