fennec 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,8 +18,8 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
20
 
21
- s.add_dependency "railties", "~> 3.0"
21
+ s.add_dependency "railties", "~> 3.2"
22
22
  s.add_dependency "thor", "~> 0.14"
23
- s.add_development_dependency "bundler", "~> 1.0.0"
24
- s.add_development_dependency "rails", "~> 3.0"
23
+ s.add_development_dependency "bundler", "~> 1.1.4"
24
+ s.add_development_dependency "rails", "~> 3.2"
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module Fennec
2
- VERSION = "2.0.6"
2
+ VERSION = "2.0.7"
3
3
  end
@@ -0,0 +1,184 @@
1
+ // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
2
+ // IT'S ALL JUST JUNK FOR OUR DOCS!
3
+ // ++++++++++++++++++++++++++++++++++++++++++
4
+
5
+ !function ($) {
6
+
7
+ $(function(){
8
+
9
+ // Disable certain links in docs
10
+ $('section [href^=#]').click(function (e) {
11
+ e.preventDefault()
12
+ })
13
+
14
+ // make code pretty
15
+ window.prettyPrint && prettyPrint()
16
+
17
+ // add-ons
18
+ $('.add-on :checkbox').on('click', function () {
19
+ var $this = $(this)
20
+ , method = $this.attr('checked') ? 'addClass' : 'removeClass'
21
+ $(this).parents('.add-on')[method]('active')
22
+ })
23
+
24
+ // position static twipsies for components page
25
+ if ($(".twipsies a").length) {
26
+ $(window).on('load resize', function () {
27
+ $(".twipsies a").each(function () {
28
+ $(this)
29
+ .tooltip({
30
+ placement: $(this).attr('title')
31
+ , trigger: 'manual'
32
+ })
33
+ .tooltip('show')
34
+ })
35
+ })
36
+ }
37
+
38
+ // add tipsies to grid for scaffolding
39
+ if ($('#grid-system').length) {
40
+ $('#grid-system').tooltip({
41
+ selector: '.show-grid > div'
42
+ , title: function () { return $(this).width() + 'px' }
43
+ })
44
+ }
45
+
46
+ // fix sub nav on scroll
47
+ var $win = $(window)
48
+ , $nav = $('.subnav')
49
+ , navTop = $('.subnav').length && $('.subnav').offset().top - 40
50
+ , isFixed = 0
51
+
52
+ processScroll()
53
+
54
+ // hack sad times - holdover until rewrite for 2.1
55
+ $nav.on('click', function () {
56
+ if (!isFixed) setTimeout(function () { $win.scrollTop($win.scrollTop() - 47) }, 10)
57
+ })
58
+
59
+ $win.on('scroll', processScroll)
60
+
61
+ function processScroll() {
62
+ var i, scrollTop = $win.scrollTop()
63
+ if (scrollTop >= navTop && !isFixed) {
64
+ isFixed = 1
65
+ $nav.addClass('subnav-fixed')
66
+ } else if (scrollTop <= navTop && isFixed) {
67
+ isFixed = 0
68
+ $nav.removeClass('subnav-fixed')
69
+ }
70
+ }
71
+
72
+ // tooltip demo
73
+ $('.tooltip-demo.well').tooltip({
74
+ selector: "a[rel=tooltip]"
75
+ })
76
+
77
+ $('.tooltip-test').tooltip()
78
+ $('.popover-test').popover()
79
+
80
+ // popover demo
81
+ $("a[rel=popover]")
82
+ .popover()
83
+ .click(function(e) {
84
+ e.preventDefault()
85
+ })
86
+
87
+ // button state demo
88
+ $('#fat-btn')
89
+ .click(function () {
90
+ var btn = $(this)
91
+ btn.button('loading')
92
+ setTimeout(function () {
93
+ btn.button('reset')
94
+ }, 3000)
95
+ })
96
+
97
+ // carousel demo
98
+ $('#myCarousel').carousel()
99
+
100
+ // javascript build logic
101
+ var inputsComponent = $("#components.download input")
102
+ , inputsPlugin = $("#plugins.download input")
103
+ , inputsVariables = $("#variables.download input")
104
+
105
+ // toggle all plugin checkboxes
106
+ $('#components.download .toggle-all').on('click', function (e) {
107
+ e.preventDefault()
108
+ inputsComponent.attr('checked', !inputsComponent.is(':checked'))
109
+ })
110
+
111
+ $('#plugins.download .toggle-all').on('click', function (e) {
112
+ e.preventDefault()
113
+ inputsPlugin.attr('checked', !inputsPlugin.is(':checked'))
114
+ })
115
+
116
+ $('#variables.download .toggle-all').on('click', function (e) {
117
+ e.preventDefault()
118
+ inputsVariables.val('')
119
+ })
120
+
121
+ // request built javascript
122
+ $('.download-btn').on('click', function () {
123
+
124
+ var css = $("#components.download input:checked")
125
+ .map(function () { return this.value })
126
+ .toArray()
127
+ , js = $("#plugins.download input:checked")
128
+ .map(function () { return this.value })
129
+ .toArray()
130
+ , vars = {}
131
+ , img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png']
132
+
133
+ $("#variables.download input")
134
+ .each(function () {
135
+ $(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
136
+ })
137
+
138
+ $.ajax({
139
+ type: 'POST'
140
+ , url: /\?dev/.test(window.location) ? 'http://localhost:3000' : 'http://bootstrap.herokuapp.com'
141
+ , dataType: 'jsonpi'
142
+ , params: {
143
+ js: js
144
+ , css: css
145
+ , vars: vars
146
+ , img: img
147
+ }
148
+ })
149
+ })
150
+ })
151
+
152
+ // Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi
153
+ $.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) {
154
+ var url = opts.url;
155
+
156
+ return {
157
+ send: function(_, completeCallback) {
158
+ var name = 'jQuery_iframe_' + jQuery.now()
159
+ , iframe, form
160
+
161
+ iframe = $('<iframe>')
162
+ .attr('name', name)
163
+ .appendTo('head')
164
+
165
+ form = $('<form>')
166
+ .attr('method', opts.type) // GET or POST
167
+ .attr('action', url)
168
+ .attr('target', name)
169
+
170
+ $.each(opts.params, function(k, v) {
171
+
172
+ $('<input>')
173
+ .attr('type', 'hidden')
174
+ .attr('name', k)
175
+ .attr('value', typeof v == 'string' ? v : JSON.stringify(v))
176
+ .appendTo(form)
177
+ })
178
+
179
+ form.appendTo('body').submit()
180
+ }
181
+ }
182
+ })
183
+
184
+ }(window.jQuery)
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-alert.js v2.0.2
2
+ * bootstrap-alert.js v2.0.4
3
3
  * http://twitter.github.com/bootstrap/javascript.html#alerts
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -18,61 +18,57 @@
18
18
  * ========================================================== */
19
19
 
20
20
 
21
- !function( $ ){
21
+ !function ($) {
22
+
23
+ "use strict"; // jshint ;_;
22
24
 
23
- "use strict"
24
25
 
25
26
  /* ALERT CLASS DEFINITION
26
27
  * ====================== */
27
28
 
28
29
  var dismiss = '[data-dismiss="alert"]'
29
- , Alert = function ( el ) {
30
+ , Alert = function (el) {
30
31
  $(el).on('click', dismiss, this.close)
31
32
  }
32
33
 
33
- Alert.prototype = {
34
-
35
- constructor: Alert
34
+ Alert.prototype.close = function (e) {
35
+ var $this = $(this)
36
+ , selector = $this.attr('data-target')
37
+ , $parent
36
38
 
37
- , close: function ( e ) {
38
- var $this = $(this)
39
- , selector = $this.attr('data-target')
40
- , $parent
39
+ if (!selector) {
40
+ selector = $this.attr('href')
41
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
42
+ }
41
43
 
42
- if (!selector) {
43
- selector = $this.attr('href')
44
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
45
- }
44
+ $parent = $(selector)
46
45
 
47
- $parent = $(selector)
48
- $parent.trigger('close')
46
+ e && e.preventDefault()
49
47
 
50
- e && e.preventDefault()
48
+ $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
51
49
 
52
- $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
50
+ $parent.trigger(e = $.Event('close'))
53
51
 
54
- $parent
55
- .trigger('close')
56
- .removeClass('in')
52
+ if (e.isDefaultPrevented()) return
57
53
 
58
- function removeElement() {
59
- $parent
60
- .trigger('closed')
61
- .remove()
62
- }
54
+ $parent.removeClass('in')
63
55
 
64
- $.support.transition && $parent.hasClass('fade') ?
65
- $parent.on($.support.transition.end, removeElement) :
66
- removeElement()
56
+ function removeElement() {
57
+ $parent
58
+ .trigger('closed')
59
+ .remove()
67
60
  }
68
61
 
62
+ $.support.transition && $parent.hasClass('fade') ?
63
+ $parent.on($.support.transition.end, removeElement) :
64
+ removeElement()
69
65
  }
70
66
 
71
67
 
72
68
  /* ALERT PLUGIN DEFINITION
73
69
  * ======================= */
74
70
 
75
- $.fn.alert = function ( option ) {
71
+ $.fn.alert = function (option) {
76
72
  return this.each(function () {
77
73
  var $this = $(this)
78
74
  , data = $this.data('alert')
@@ -91,4 +87,4 @@
91
87
  $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
92
88
  })
93
89
 
94
- }( window.jQuery );
90
+ }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-button.js v2.0.2
2
+ * bootstrap-button.js v2.0.4
3
3
  * http://twitter.github.com/bootstrap/javascript.html#buttons
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -17,58 +17,54 @@
17
17
  * limitations under the License.
18
18
  * ============================================================ */
19
19
 
20
- !function( $ ){
21
20
 
22
- "use strict"
21
+ !function ($) {
22
+
23
+ "use strict"; // jshint ;_;
24
+
23
25
 
24
26
  /* BUTTON PUBLIC CLASS DEFINITION
25
27
  * ============================== */
26
28
 
27
- var Button = function ( element, options ) {
29
+ var Button = function (element, options) {
28
30
  this.$element = $(element)
29
31
  this.options = $.extend({}, $.fn.button.defaults, options)
30
32
  }
31
33
 
32
- Button.prototype = {
33
-
34
- constructor: Button
34
+ Button.prototype.setState = function (state) {
35
+ var d = 'disabled'
36
+ , $el = this.$element
37
+ , data = $el.data()
38
+ , val = $el.is('input') ? 'val' : 'html'
35
39
 
36
- , setState: function ( state ) {
37
- var d = 'disabled'
38
- , $el = this.$element
39
- , data = $el.data()
40
- , val = $el.is('input') ? 'val' : 'html'
40
+ state = state + 'Text'
41
+ data.resetText || $el.data('resetText', $el[val]())
41
42
 
42
- state = state + 'Text'
43
- data.resetText || $el.data('resetText', $el[val]())
43
+ $el[val](data[state] || this.options[state])
44
44
 
45
- $el[val](data[state] || this.options[state])
46
-
47
- // push to event loop to allow forms to submit
48
- setTimeout(function () {
49
- state == 'loadingText' ?
50
- $el.addClass(d).attr(d, d) :
51
- $el.removeClass(d).removeAttr(d)
52
- }, 0)
53
- }
54
-
55
- , toggle: function () {
56
- var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
45
+ // push to event loop to allow forms to submit
46
+ setTimeout(function () {
47
+ state == 'loadingText' ?
48
+ $el.addClass(d).attr(d, d) :
49
+ $el.removeClass(d).removeAttr(d)
50
+ }, 0)
51
+ }
57
52
 
58
- $parent && $parent
59
- .find('.active')
60
- .removeClass('active')
53
+ Button.prototype.toggle = function () {
54
+ var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
61
55
 
62
- this.$element.toggleClass('active')
63
- }
56
+ $parent && $parent
57
+ .find('.active')
58
+ .removeClass('active')
64
59
 
60
+ this.$element.toggleClass('active')
65
61
  }
66
62
 
67
63
 
68
64
  /* BUTTON PLUGIN DEFINITION
69
65
  * ======================== */
70
66
 
71
- $.fn.button = function ( option ) {
67
+ $.fn.button = function (option) {
72
68
  return this.each(function () {
73
69
  var $this = $(this)
74
70
  , data = $this.data('button')
@@ -97,4 +93,4 @@
97
93
  })
98
94
  })
99
95
 
100
- }( window.jQuery );
96
+ }(window.jQuery);
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-carousel.js v2.0.2
2
+ * bootstrap-carousel.js v2.0.4
3
3
  * http://twitter.github.com/bootstrap/javascript.html#carousel
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -18,16 +18,17 @@
18
18
  * ========================================================== */
19
19
 
20
20
 
21
- !function( $ ){
21
+ !function ($) {
22
+
23
+ "use strict"; // jshint ;_;
22
24
 
23
- "use strict"
24
25
 
25
26
  /* CAROUSEL CLASS DEFINITION
26
27
  * ========================= */
27
28
 
28
29
  var Carousel = function (element, options) {
29
30
  this.$element = $(element)
30
- this.options = $.extend({}, $.fn.carousel.defaults, options)
31
+ this.options = options
31
32
  this.options.slide && this.slide(this.options.slide)
32
33
  this.options.pause == 'hover' && this.$element
33
34
  .on('mouseenter', $.proxy(this.pause, this))
@@ -36,8 +37,11 @@
36
37
 
37
38
  Carousel.prototype = {
38
39
 
39
- cycle: function () {
40
- this.interval = setInterval($.proxy(this.next, this), this.options.interval)
40
+ cycle: function (e) {
41
+ if (!e) this.paused = false
42
+ this.options.interval
43
+ && !this.paused
44
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
41
45
  return this
42
46
  }
43
47
 
@@ -62,7 +66,8 @@
62
66
  return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
63
67
  }
64
68
 
65
- , pause: function () {
69
+ , pause: function (e) {
70
+ if (!e) this.paused = true
66
71
  clearInterval(this.interval)
67
72
  this.interval = null
68
73
  return this
@@ -85,6 +90,7 @@
85
90
  , direction = type == 'next' ? 'left' : 'right'
86
91
  , fallback = type == 'next' ? 'first' : 'last'
87
92
  , that = this
93
+ , e = $.Event('slide')
88
94
 
89
95
  this.sliding = true
90
96
 
@@ -94,24 +100,26 @@
94
100
 
95
101
  if ($next.hasClass('active')) return
96
102
 
97
- if (!$.support.transition && this.$element.hasClass('slide')) {
98
- this.$element.trigger('slide')
99
- $active.removeClass('active')
100
- $next.addClass('active')
101
- this.sliding = false
102
- this.$element.trigger('slid')
103
- } else {
103
+ if ($.support.transition && this.$element.hasClass('slide')) {
104
+ this.$element.trigger(e)
105
+ if (e.isDefaultPrevented()) return
104
106
  $next.addClass(type)
105
107
  $next[0].offsetWidth // force reflow
106
108
  $active.addClass(direction)
107
109
  $next.addClass(direction)
108
- this.$element.trigger('slide')
109
110
  this.$element.one($.support.transition.end, function () {
110
111
  $next.removeClass([type, direction].join(' ')).addClass('active')
111
112
  $active.removeClass(['active', direction].join(' '))
112
113
  that.sliding = false
113
114
  setTimeout(function () { that.$element.trigger('slid') }, 0)
114
115
  })
116
+ } else {
117
+ this.$element.trigger(e)
118
+ if (e.isDefaultPrevented()) return
119
+ $active.removeClass('active')
120
+ $next.addClass('active')
121
+ this.sliding = false
122
+ this.$element.trigger('slid')
115
123
  }
116
124
 
117
125
  isCycling && this.cycle()
@@ -125,15 +133,15 @@
125
133
  /* CAROUSEL PLUGIN DEFINITION
126
134
  * ========================== */
127
135
 
128
- $.fn.carousel = function ( option ) {
136
+ $.fn.carousel = function (option) {
129
137
  return this.each(function () {
130
138
  var $this = $(this)
131
139
  , data = $this.data('carousel')
132
- , options = typeof option == 'object' && option
140
+ , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
133
141
  if (!data) $this.data('carousel', (data = new Carousel(this, options)))
134
142
  if (typeof option == 'number') data.to(option)
135
143
  else if (typeof option == 'string' || (option = options.slide)) data[option]()
136
- else data.cycle()
144
+ else if (options.interval) data.cycle()
137
145
  })
138
146
  }
139
147
 
@@ -158,4 +166,4 @@
158
166
  })
159
167
  })
160
168
 
161
- }( window.jQuery );
169
+ }(window.jQuery);