bootstrapped-rails 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2012 Twitter, Inc.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/lib/.DS_Store CHANGED
Binary file
@@ -1,5 +1,5 @@
1
1
  module Bootstrapped
2
2
  module Rails
3
- VERSION = "2.0.4"
3
+ VERSION = "2.0.5"
4
4
  end
5
5
  end
data/readme.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # This is a hacked-together version of the gem 'bootstrap-rails', with the generators from 'twitter-bootstrap-rails', has also replaced the Glyphicons icons with [Font Awesome](http://fortawesome.github.com/Font-Awesome/), since svg icons are resizable and colorable and such. There are also some custom scss helpers in a folder called 'custom_partials', which are just a byproduct of trying not to hate css. Feel free to muck around with this as you please.
2
2
 
3
+ ---------
4
+ I have no idea why the font above looks so big..
5
+ ---------
6
+
3
7
  As specified below, the license is being included.
4
8
  Feel free to fork and mess around with this.
5
9
  (uses bootstrap v2)
@@ -20,6 +24,16 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
20
24
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
21
25
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
26
 
27
+ ## Font Awesome Attribution
28
+ Contact
29
+
30
+ Email: dave@davegandy.com
31
+ Twitter: http://twitter.com/fortaweso_me
32
+ Work: http://lemonwi.se co-founder
33
+ License
34
+
35
+ The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0: http://creativecommons.org/licenses/by/3.0/ A mention of 'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable source code is considered acceptable attribution.
36
+
23
37
  ## Installing Gem
24
38
 
25
39
  Include Bootstrap in Gemfile;
Binary file
@@ -9,6 +9,4 @@
9
9
  //= require bootstrapped/bootstrap-tooltip
10
10
  //= require bootstrapped/bootstrap-popover
11
11
  //= require bootstrapped/bootstrap-typeahead
12
-
13
-
14
-
12
+ //= require bootstrapped/jquery-cookie
@@ -0,0 +1,106 @@
1
+ ## 2.0 BOOTSTRAP JS PHILOSOPHY
2
+ These are the high-level design rules which guide the development of Bootstrap's plugin apis.
3
+
4
+ ---
5
+
6
+ ### DATA-ATTRIBUTE API
7
+
8
+ We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
9
+
10
+ We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
11
+
12
+ $('body').off('.data-api')
13
+
14
+ To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
15
+
16
+ $('body').off('.alert.data-api')
17
+
18
+ ---
19
+
20
+ ### PROGRAMATIC API
21
+
22
+ We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
23
+
24
+ All public APIs should be single, chainable methods, and return the collection acted upon.
25
+
26
+ $(".btn.danger").button("toggle").addClass("fat")
27
+
28
+ All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
29
+
30
+ $("#myModal").modal() // initialized with defaults
31
+ $("#myModal").modal({ keyboard: false }) // initialized with now keyboard
32
+ $("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
33
+
34
+ ---
35
+
36
+ ### OPTIONS
37
+
38
+ Options should be sparse and add universal value. We should pick the right defaults.
39
+
40
+ All plugins should have a default object which can be modified to affect all instances' default options. The defaults object should be available via `$.fn.plugin.defaults`.
41
+
42
+ $.fn.modal.defaults = { … }
43
+
44
+ An options definition should take the following form:
45
+
46
+ *noun*: *adjective* - describes or modifies a quality of an instance
47
+
48
+ examples:
49
+
50
+ backdrop: true
51
+ keyboard: false
52
+ placement: 'top'
53
+
54
+ ---
55
+
56
+ ### EVENTS
57
+
58
+ All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
59
+
60
+ show | shown
61
+ hide | hidden
62
+
63
+ ---
64
+
65
+ ### CONSTRUCTORS
66
+
67
+ Each plugin should expose its raw constructor on a `Constructor` property -- accessed in the following way:
68
+
69
+
70
+ $.fn.popover.Constructor
71
+
72
+ ---
73
+
74
+ ### DATA ACCESSOR
75
+
76
+ Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
77
+
78
+ $('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
79
+
80
+ ---
81
+
82
+ ### DATA ATTRIBUTES
83
+
84
+ Data attributes should take the following form:
85
+
86
+ - data-{{verb}}={{plugin}} - defines main interaction
87
+ - data-target || href^=# - defined on "control" element (if element controls an element other than self)
88
+ - data-{{noun}} - defines class instance options
89
+
90
+ examples:
91
+
92
+ // control other targets
93
+ data-toggle="modal" data-target="#foo"
94
+ data-toggle="collapse" data-target="#foo" data-parent="#bar"
95
+
96
+ // defined on element they control
97
+ data-spy="scroll"
98
+
99
+ data-dismiss="modal"
100
+ data-dismiss="alert"
101
+
102
+ data-toggle="dropdown"
103
+
104
+ data-toggle="button"
105
+ data-toggle="buttons-checkbox"
106
+ data-toggle="buttons-radio"
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-alert.js v2.0.0
2
+ * bootstrap-alert.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#alerts
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -51,11 +51,14 @@
51
51
 
52
52
  $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
53
53
 
54
- $parent.removeClass('in')
54
+ $parent
55
+ .trigger('close')
56
+ .removeClass('in')
55
57
 
56
58
  function removeElement() {
57
- $parent.remove()
58
- $parent.trigger('closed')
59
+ $parent
60
+ .trigger('closed')
61
+ .remove()
59
62
  }
60
63
 
61
64
  $.support.transition && $parent.hasClass('fade') ?
@@ -88,4 +91,4 @@
88
91
  $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
89
92
  })
90
93
 
91
- }( window.jQuery )
94
+ }( window.jQuery );
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-button.js v2.0.0
2
+ * bootstrap-button.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#buttons
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -91,8 +91,8 @@
91
91
 
92
92
  $(function () {
93
93
  $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
94
- $(e.target).button('toggle')
94
+ $(e.currentTarget).button('toggle')
95
95
  })
96
96
  })
97
97
 
98
- }( window.jQuery )
98
+ }( window.jQuery );
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-carousel.js v2.0.0
2
+ * bootstrap-carousel.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#carousel
4
4
  * ==========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -61,6 +61,7 @@
61
61
 
62
62
  , pause: function () {
63
63
  clearInterval(this.interval)
64
+ this.interval = null
64
65
  return this
65
66
  }
66
67
 
@@ -82,6 +83,8 @@
82
83
  , fallback = type == 'next' ? 'first' : 'last'
83
84
  , that = this
84
85
 
86
+ if (!$next.length) return
87
+
85
88
  this.sliding = true
86
89
 
87
90
  isCycling && this.pause()
@@ -151,4 +154,4 @@
151
154
  })
152
155
  })
153
156
 
154
- }( window.jQuery )
157
+ }( window.jQuery );
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-collapse.js v2.0.0
2
+ * bootstrap-collapse.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#collapse
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -133,4 +133,4 @@
133
133
  })
134
134
  })
135
135
 
136
- }( window.jQuery )
136
+ }( window.jQuery );
@@ -1,5 +1,5 @@
1
1
  /* ============================================================
2
- * bootstrap-dropdown.js v2.0.0
2
+ * bootstrap-dropdown.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#dropdowns
4
4
  * ============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -89,4 +89,4 @@
89
89
  $('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
90
90
  })
91
91
 
92
- }( window.jQuery )
92
+ }( window.jQuery );
@@ -1,5 +1,5 @@
1
1
  /* =========================================================
2
- * bootstrap-modal.js v2.0.0
2
+ * bootstrap-modal.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#modals
4
4
  * =========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -26,7 +26,7 @@
26
26
  * ====================== */
27
27
 
28
28
  var Modal = function ( content, options ) {
29
- this.options = $.extend({}, $.fn.modal.defaults, options)
29
+ this.options = options
30
30
  this.$element = $(content)
31
31
  .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
32
32
  }
@@ -177,16 +177,17 @@
177
177
  return this.each(function () {
178
178
  var $this = $(this)
179
179
  , data = $this.data('modal')
180
- , options = typeof option == 'object' && option
180
+ , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
181
181
  if (!data) $this.data('modal', (data = new Modal(this, options)))
182
182
  if (typeof option == 'string') data[option]()
183
- else data.show()
183
+ else if (options.show) data.show()
184
184
  })
185
185
  }
186
186
 
187
187
  $.fn.modal.defaults = {
188
188
  backdrop: true
189
189
  , keyboard: true
190
+ , show: true
190
191
  }
191
192
 
192
193
  $.fn.modal.Constructor = Modal
@@ -206,4 +207,4 @@
206
207
  })
207
208
  })
208
209
 
209
- }( window.jQuery )
210
+ }( window.jQuery );
@@ -1,5 +1,5 @@
1
1
  /* ===========================================================
2
- * bootstrap-popover.js v2.0.0
2
+ * bootstrap-popover.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#popovers
4
4
  * ===========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -92,4 +92,4 @@
92
92
  , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
93
93
  })
94
94
 
95
- }( window.jQuery )
95
+ }( window.jQuery );
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-scrollspy.js v2.0.0
2
+ * bootstrap-scrollspy.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#scrollspy
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -122,4 +122,4 @@
122
122
  })
123
123
  })
124
124
 
125
- }( window.jQuery )
125
+ }( window.jQuery );
@@ -1,5 +1,5 @@
1
1
  /* ========================================================
2
- * bootstrap-tab.js v2.0.0
2
+ * bootstrap-tab.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#tabs
4
4
  * ========================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -127,4 +127,4 @@
127
127
  })
128
128
  })
129
129
 
130
- }( window.jQuery )
130
+ }( window.jQuery );
@@ -1,5 +1,5 @@
1
1
  /* ===========================================================
2
- * bootstrap-tooltip.js v2.0.0
2
+ * bootstrap-tooltip.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#tooltips
4
4
  * Inspired by the original jQuery.tipsy by Jason Frame
5
5
  * ===========================================================
@@ -267,4 +267,4 @@
267
267
  , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
268
268
  }
269
269
 
270
- }( window.jQuery )
270
+ }( window.jQuery );
@@ -1,5 +1,5 @@
1
1
  /* ===================================================
2
- * bootstrap-transition.js v2.0.0
2
+ * bootstrap-transition.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#transitions
4
4
  * ===================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -47,5 +47,5 @@
47
47
  })()
48
48
 
49
49
  })
50
-
51
- }( window.jQuery )
50
+
51
+ }( window.jQuery );
@@ -1,5 +1,5 @@
1
1
  /* =============================================================
2
- * bootstrap-typeahead.js v2.0.0
2
+ * bootstrap-typeahead.js v2.0.1
3
3
  * http://twitter.github.com/bootstrap/javascript.html#typeahead
4
4
  * =============================================================
5
5
  * Copyright 2012 Twitter, Inc.
@@ -268,4 +268,4 @@
268
268
  })
269
269
  })
270
270
 
271
- }( window.jQuery )
271
+ }( window.jQuery );
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrapped-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-07 00:00:00.000000000Z
12
+ date: 2012-03-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
16
- requirement: &70236412489760 !ruby/object:Gem::Requirement
16
+ requirement: &70135828243780 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70236412489760
24
+ version_requirements: *70135828243780
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &70236412489260 !ruby/object:Gem::Requirement
27
+ requirement: &70135828243140 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70236412489260
35
+ version_requirements: *70135828243140
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rails
38
- requirement: &70236412488740 !ruby/object:Gem::Requirement
38
+ requirement: &70135828242500 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '3.1'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70236412488740
46
+ version_requirements: *70135828242500
47
47
  description: ! ' please see summary '
48
48
  email:
49
49
  - han@logicalprep.com
@@ -53,6 +53,7 @@ extra_rdoc_files: []
53
53
  files:
54
54
  - .gitignore
55
55
  - Gemfile
56
+ - LICENSE
56
57
  - Rakefile
57
58
  - bootstrapped-rails.gemspec
58
59
  - lib/.DS_Store
@@ -99,6 +100,7 @@ files:
99
100
  - vendor/assets/javascripts/.DS_Store
100
101
  - vendor/assets/javascripts/bootstrapped.js
101
102
  - vendor/assets/javascripts/bootstrapped/.DS_Store
103
+ - vendor/assets/javascripts/bootstrapped/README.md
102
104
  - vendor/assets/javascripts/bootstrapped/bootstrap-alert.js
103
105
  - vendor/assets/javascripts/bootstrapped/bootstrap-button.js
104
106
  - vendor/assets/javascripts/bootstrapped/bootstrap-carousel.js
@@ -111,7 +113,7 @@ files:
111
113
  - vendor/assets/javascripts/bootstrapped/bootstrap-tooltip.js
112
114
  - vendor/assets/javascripts/bootstrapped/bootstrap-transition.js
113
115
  - vendor/assets/javascripts/bootstrapped/bootstrap-typeahead.js
114
- - vendor/assets/javascripts/jquery-cookie.js
116
+ - vendor/assets/javascripts/bootstrapped/jquery-cookie.js
115
117
  - vendor/assets/stylesheets/bootstrap-xtra/mixins.scss
116
118
  - vendor/assets/stylesheets/bootstrap-xtra/patterns_xtra.scss
117
119
  - vendor/assets/stylesheets/bootstrap-xtra/type_xtra.css