jackpot 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. data/.gitignore +16 -0
  2. data/.rspec +1 -0
  3. data/.rvmrc.example +1 -0
  4. data/.travis.yml +12 -0
  5. data/Gemfile +9 -0
  6. data/Gemfile.lock +181 -0
  7. data/MIT-LICENSE +20 -0
  8. data/README.md +134 -0
  9. data/Rakefile +25 -0
  10. data/app/assets/images/jackpot/.gitkeep +0 -0
  11. data/app/assets/javascripts/jackpot/application.js +5 -0
  12. data/app/assets/javascripts/jackpot/bootstrap.js +32 -0
  13. data/app/assets/javascripts/jackpot/customers.js +2 -0
  14. data/app/assets/javascripts/jackpot/login.js +1 -0
  15. data/app/assets/javascripts/jackpot/payments.js +2 -0
  16. data/app/assets/javascripts/jackpot/subscriptions.js +2 -0
  17. data/app/assets/stylesheets/jackpot/application.css +9 -0
  18. data/app/assets/stylesheets/jackpot/customers.css +4 -0
  19. data/app/assets/stylesheets/jackpot/jackpot.css +10 -0
  20. data/app/controllers/jackpot/application_controller.rb +4 -0
  21. data/app/controllers/jackpot/customers_controller.rb +100 -0
  22. data/app/controllers/jackpot/payments_controller.rb +20 -0
  23. data/app/controllers/jackpot/subscriptions_controller.rb +86 -0
  24. data/app/helpers/jackpot/application_helper.rb +27 -0
  25. data/app/helpers/jackpot/customers_helper.rb +7 -0
  26. data/app/helpers/jackpot/subscriptions_helper.rb +4 -0
  27. data/app/models/jackpot/card.rb +29 -0
  28. data/app/models/jackpot/customer.rb +48 -0
  29. data/app/models/jackpot/gateway.rb +28 -0
  30. data/app/models/jackpot/payment.rb +33 -0
  31. data/app/models/jackpot/subscription.rb +13 -0
  32. data/app/models/jackpot/user.rb +25 -0
  33. data/app/views/jackpot/customers/_credit_card_form.html.erb +42 -0
  34. data/app/views/jackpot/customers/_form.html.erb +17 -0
  35. data/app/views/jackpot/customers/edit.html.erb +13 -0
  36. data/app/views/jackpot/customers/index.html.erb +30 -0
  37. data/app/views/jackpot/customers/new.html.erb +8 -0
  38. data/app/views/jackpot/customers/show.html.erb +32 -0
  39. data/app/views/jackpot/payments/create.html.erb +1 -0
  40. data/app/views/jackpot/payments/index.html.erb +25 -0
  41. data/app/views/jackpot/shared/_flash_messages.html.erb +6 -0
  42. data/app/views/jackpot/shared/_navigation.html.erb +5 -0
  43. data/app/views/jackpot/subscriptions/_form.html.erb +13 -0
  44. data/app/views/jackpot/subscriptions/edit.html.erb +6 -0
  45. data/app/views/jackpot/subscriptions/index.html.erb +29 -0
  46. data/app/views/jackpot/subscriptions/new.html.erb +4 -0
  47. data/app/views/jackpot/subscriptions/show.html.erb +23 -0
  48. data/app/views/layouts/devise.html.erb +22 -0
  49. data/app/views/layouts/jackpot/application.html.erb +39 -0
  50. data/config/initializers/jackpot_devise.rb +226 -0
  51. data/config/locales/devise.en.yml +57 -0
  52. data/config/routes.rb +17 -0
  53. data/db/migrate/20111221002616_create_jackpot_payments.rb +11 -0
  54. data/db/migrate/20111230014003_add_customer_information_to_jackpot_payments.rb +5 -0
  55. data/db/migrate/20120102223341_create_jackpot_subscriptions.rb +10 -0
  56. data/db/migrate/20120103211153_create_jackpot_customers.rb +11 -0
  57. data/db/migrate/20120104164830_add_credit_card_number_to_customer.rb +5 -0
  58. data/db/migrate/20120130173242_add_credit_card_information_to_customers.rb +7 -0
  59. data/db/migrate/20120208191815_add_billing_period_to_jackpot_subscriptions.rb +5 -0
  60. data/db/migrate/20120208191934_add_good_until_date_to_jackpot_customers.rb +6 -0
  61. data/db/migrate/20120209203542_add_subscription_and_customer_to_jackpot_payments.rb +8 -0
  62. data/db/migrate/20120209212043_rename_column_token_in_jackpot_payments.rb +5 -0
  63. data/db/migrate/20120210144038_devise_create_jackpot_users.rb +49 -0
  64. data/jackpot.gemspec +33 -0
  65. data/lib/jackpot.rb +23 -0
  66. data/lib/jackpot/configuration.rb +33 -0
  67. data/lib/jackpot/cron.rb +22 -0
  68. data/lib/jackpot/engine.rb +14 -0
  69. data/lib/jackpot/errors.rb +18 -0
  70. data/lib/jackpot/factory.rb +26 -0
  71. data/lib/jackpot/version.rb +3 -0
  72. data/lib/tasks/jackpot_tasks.rake +38 -0
  73. data/script/rails +6 -0
  74. data/spec/controllers/jackpot/customers_controller_spec.rb +170 -0
  75. data/spec/controllers/jackpot/payments_controller_spec.rb +47 -0
  76. data/spec/controllers/jackpot/subscriptions_controller_spec.rb +153 -0
  77. data/spec/dummy/.gitignore +1 -0
  78. data/spec/dummy/Rakefile +7 -0
  79. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  80. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  81. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  82. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  83. data/spec/dummy/app/mailers/.gitkeep +0 -0
  84. data/spec/dummy/app/models/.gitkeep +0 -0
  85. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  86. data/spec/dummy/config.ru +4 -0
  87. data/spec/dummy/config/application.rb +51 -0
  88. data/spec/dummy/config/boot.rb +10 -0
  89. data/spec/dummy/config/database.yml +17 -0
  90. data/spec/dummy/config/environment.rb +5 -0
  91. data/spec/dummy/config/environments/development.rb +32 -0
  92. data/spec/dummy/config/environments/production.rb +60 -0
  93. data/spec/dummy/config/environments/test.rb +41 -0
  94. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  95. data/spec/dummy/config/initializers/inflections.rb +10 -0
  96. data/spec/dummy/config/initializers/jackpot.rb +13 -0
  97. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  98. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  99. data/spec/dummy/config/initializers/session_store.rb +8 -0
  100. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  101. data/spec/dummy/config/locales/en.yml +5 -0
  102. data/spec/dummy/config/routes.rb +3 -0
  103. data/spec/dummy/db/schema.rb +68 -0
  104. data/spec/dummy/lib/assets/.gitkeep +0 -0
  105. data/spec/dummy/public/404.html +26 -0
  106. data/spec/dummy/public/422.html +26 -0
  107. data/spec/dummy/public/500.html +26 -0
  108. data/spec/dummy/public/favicon.ico +0 -0
  109. data/spec/dummy/public/index.html +5 -0
  110. data/spec/dummy/public/payment.html +36 -0
  111. data/spec/dummy/script/rails +6 -0
  112. data/spec/fixtures/vcr/Create_Customers_To_bill_monthly_my_customers_As_a_user_I_want_to_record_their_billing_information_/assigning_credit_card_information_to_customer.yml +34 -0
  113. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/.yml +34 -0
  114. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/when_persisting/should_NEVER_persist_in_the_database_the_actual_card_number.yml +34 -0
  115. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/when_persisting/should_NEVER_persist_in_the_database_the_verification_value.yml +34 -0
  116. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/when_persisting/should_persist_in_the_database_the_ONLY_last_four_digits.yml +34 -0
  117. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/when_persisting/should_persist_the_card_information.yml +34 -0
  118. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/when_persisting/should_store_this_card_at_the_gateway.yml +34 -0
  119. data/spec/fixtures/vcr/Jackpot_Payment/_create/with_valid_token_information/creates_a_new_payment.yml +96 -0
  120. data/spec/fixtures/vcr/Jackpot_Payment/_create/with_valid_token_information/does_not_persist_credit_card_token_information.yml +96 -0
  121. data/spec/fixtures/vcr/Jackpot_Payment/_create/with_valid_token_information/records_the_payment_transaction_id_for_future_reference.yml +96 -0
  122. data/spec/fixtures/vcr/Jackpot_Payment/_create/with_valid_token_information/records_this_payment_information.yml +96 -0
  123. data/spec/fixtures/vcr/Jackpot_Payment/_customer_name/returns_its_customer_email.yml +96 -0
  124. data/spec/fixtures/vcr/jackpot/customer/updatecard.yml +34 -0
  125. data/spec/fixtures/vcr/jackpot/customer_expiration_date.yml +34 -0
  126. data/spec/fixtures/vcr/jackpot/receiving_payments.yml +96 -0
  127. data/spec/helpers/jackpot/customers_helper_spec.rb +16 -0
  128. data/spec/helpers/jackpot/subscriptions_helper_spec.rb +4 -0
  129. data/spec/lib/cron_spec.rb +39 -0
  130. data/spec/lib/factory_spec.rb +40 -0
  131. data/spec/models/jackpot/card_spec.rb +23 -0
  132. data/spec/models/jackpot/customer_spec.rb +140 -0
  133. data/spec/models/jackpot/gateway_spec.rb +22 -0
  134. data/spec/models/jackpot/payment_spec.rb +74 -0
  135. data/spec/models/jackpot/subscription_spec.rb +19 -0
  136. data/spec/requests/jackpot/jackpot_assign_subscription_to_customer_spec.rb +39 -0
  137. data/spec/requests/jackpot/jackpot_create_customer_spec.rb +73 -0
  138. data/spec/requests/jackpot/jackpot_create_subscriptions_spec.rb +27 -0
  139. data/spec/requests/jackpot/jackpot_receive_payments_spec.rb +34 -0
  140. data/spec/spec_helper.rb +41 -0
  141. data/spec/support/active_merchant.rb +1 -0
  142. data/spec/support/capybara.rb +6 -0
  143. data/spec/support/devise.rb +21 -0
  144. data/spec/support/factories/jackpot_customers.rb +36 -0
  145. data/spec/support/factories/jackpot_payments.rb +7 -0
  146. data/spec/support/factories/jackpot_subscriptions.rb +9 -0
  147. data/spec/support/factories/jackpot_users.rb +9 -0
  148. data/spec/support/helpers.rb +16 -0
  149. data/spec/support/routes.rb +3 -0
  150. data/spec/support/vcr.rb +10 -0
  151. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  152. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  153. data/vendor/assets/javascripts/twitter/bootstrap.js +12 -0
  154. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +91 -0
  155. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +98 -0
  156. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +154 -0
  157. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +136 -0
  158. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +92 -0
  159. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +209 -0
  160. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +95 -0
  161. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +125 -0
  162. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +130 -0
  163. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +270 -0
  164. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +51 -0
  165. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +271 -0
  166. data/vendor/assets/stylesheets/twitter/bootstrap/bootstrap-responsive.css +567 -0
  167. data/vendor/assets/stylesheets/twitter/bootstrap/bootstrap.css.erb +3366 -0
  168. metadata +351 -0
@@ -0,0 +1,51 @@
1
+ /* ===================================================
2
+ * bootstrap-transition.js v2.0.0
3
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
4
+ * ===================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ========================================================== */
19
+
20
+ !function( $ ) {
21
+
22
+ $(function () {
23
+
24
+ "use strict"
25
+
26
+ /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
27
+ * ======================================================= */
28
+
29
+ $.support.transition = (function () {
30
+ var thisBody = document.body || document.documentElement
31
+ , thisStyle = thisBody.style
32
+ , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
33
+
34
+ return support && {
35
+ end: (function () {
36
+ var transitionEnd = "TransitionEnd"
37
+ if ( $.browser.webkit ) {
38
+ transitionEnd = "webkitTransitionEnd"
39
+ } else if ( $.browser.mozilla ) {
40
+ transitionEnd = "transitionend"
41
+ } else if ( $.browser.opera ) {
42
+ transitionEnd = "oTransitionEnd"
43
+ }
44
+ return transitionEnd
45
+ }())
46
+ }
47
+ })()
48
+
49
+ })
50
+
51
+ }( window.jQuery )
@@ -0,0 +1,271 @@
1
+ /* =============================================================
2
+ * bootstrap-typeahead.js v2.0.0
3
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
4
+ * =============================================================
5
+ * Copyright 2012 Twitter, Inc.
6
+ *
7
+ * Licensed under the Apache License, Version 2.0 (the "License");
8
+ * you may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ * ============================================================ */
19
+
20
+ !function( $ ){
21
+
22
+ "use strict"
23
+
24
+ var Typeahead = function ( element, options ) {
25
+ this.$element = $(element)
26
+ this.options = $.extend({}, $.fn.typeahead.defaults, options)
27
+ this.matcher = this.options.matcher || this.matcher
28
+ this.sorter = this.options.sorter || this.sorter
29
+ this.highlighter = this.options.highlighter || this.highlighter
30
+ this.$menu = $(this.options.menu).appendTo('body')
31
+ this.source = this.options.source
32
+ this.shown = false
33
+ this.listen()
34
+ }
35
+
36
+ Typeahead.prototype = {
37
+
38
+ constructor: Typeahead
39
+
40
+ , select: function () {
41
+ var val = this.$menu.find('.active').attr('data-value')
42
+ this.$element.val(val)
43
+ return this.hide()
44
+ }
45
+
46
+ , show: function () {
47
+ var pos = $.extend({}, this.$element.offset(), {
48
+ height: this.$element[0].offsetHeight
49
+ })
50
+
51
+ this.$menu.css({
52
+ top: pos.top + pos.height
53
+ , left: pos.left
54
+ })
55
+
56
+ this.$menu.show()
57
+ this.shown = true
58
+ return this
59
+ }
60
+
61
+ , hide: function () {
62
+ this.$menu.hide()
63
+ this.shown = false
64
+ return this
65
+ }
66
+
67
+ , lookup: function (event) {
68
+ var that = this
69
+ , items
70
+ , q
71
+
72
+ this.query = this.$element.val()
73
+
74
+ if (!this.query) {
75
+ return this.shown ? this.hide() : this
76
+ }
77
+
78
+ items = $.grep(this.source, function (item) {
79
+ if (that.matcher(item)) return item
80
+ })
81
+
82
+ items = this.sorter(items)
83
+
84
+ if (!items.length) {
85
+ return this.shown ? this.hide() : this
86
+ }
87
+
88
+ return this.render(items.slice(0, this.options.items)).show()
89
+ }
90
+
91
+ , matcher: function (item) {
92
+ return ~item.toLowerCase().indexOf(this.query.toLowerCase())
93
+ }
94
+
95
+ , sorter: function (items) {
96
+ var beginswith = []
97
+ , caseSensitive = []
98
+ , caseInsensitive = []
99
+ , item
100
+
101
+ while (item = items.shift()) {
102
+ if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
103
+ else if (~item.indexOf(this.query)) caseSensitive.push(item)
104
+ else caseInsensitive.push(item)
105
+ }
106
+
107
+ return beginswith.concat(caseSensitive, caseInsensitive)
108
+ }
109
+
110
+ , highlighter: function (item) {
111
+ return item.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) {
112
+ return '<strong>' + match + '</strong>'
113
+ })
114
+ }
115
+
116
+ , render: function (items) {
117
+ var that = this
118
+
119
+ items = $(items).map(function (i, item) {
120
+ i = $(that.options.item).attr('data-value', item)
121
+ i.find('a').html(that.highlighter(item))
122
+ return i[0]
123
+ })
124
+
125
+ items.first().addClass('active')
126
+ this.$menu.html(items)
127
+ return this
128
+ }
129
+
130
+ , next: function (event) {
131
+ var active = this.$menu.find('.active').removeClass('active')
132
+ , next = active.next()
133
+
134
+ if (!next.length) {
135
+ next = $(this.$menu.find('li')[0])
136
+ }
137
+
138
+ next.addClass('active')
139
+ }
140
+
141
+ , prev: function (event) {
142
+ var active = this.$menu.find('.active').removeClass('active')
143
+ , prev = active.prev()
144
+
145
+ if (!prev.length) {
146
+ prev = this.$menu.find('li').last()
147
+ }
148
+
149
+ prev.addClass('active')
150
+ }
151
+
152
+ , listen: function () {
153
+ this.$element
154
+ .on('blur', $.proxy(this.blur, this))
155
+ .on('keypress', $.proxy(this.keypress, this))
156
+ .on('keyup', $.proxy(this.keyup, this))
157
+
158
+ if ($.browser.webkit || $.browser.msie) {
159
+ this.$element.on('keydown', $.proxy(this.keypress, this))
160
+ }
161
+
162
+ this.$menu
163
+ .on('click', $.proxy(this.click, this))
164
+ .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
165
+ }
166
+
167
+ , keyup: function (e) {
168
+ e.stopPropagation()
169
+ e.preventDefault()
170
+
171
+ switch(e.keyCode) {
172
+ case 40: // down arrow
173
+ case 38: // up arrow
174
+ break
175
+
176
+ case 9: // tab
177
+ case 13: // enter
178
+ if (!this.shown) return
179
+ this.select()
180
+ break
181
+
182
+ case 27: // escape
183
+ this.hide()
184
+ break
185
+
186
+ default:
187
+ this.lookup()
188
+ }
189
+
190
+ }
191
+
192
+ , keypress: function (e) {
193
+ e.stopPropagation()
194
+ if (!this.shown) return
195
+
196
+ switch(e.keyCode) {
197
+ case 9: // tab
198
+ case 13: // enter
199
+ case 27: // escape
200
+ e.preventDefault()
201
+ break
202
+
203
+ case 38: // up arrow
204
+ e.preventDefault()
205
+ this.prev()
206
+ break
207
+
208
+ case 40: // down arrow
209
+ e.preventDefault()
210
+ this.next()
211
+ break
212
+ }
213
+ }
214
+
215
+ , blur: function (e) {
216
+ var that = this
217
+ e.stopPropagation()
218
+ e.preventDefault()
219
+ setTimeout(function () { that.hide() }, 150)
220
+ }
221
+
222
+ , click: function (e) {
223
+ e.stopPropagation()
224
+ e.preventDefault()
225
+ this.select()
226
+ }
227
+
228
+ , mouseenter: function (e) {
229
+ this.$menu.find('.active').removeClass('active')
230
+ $(e.currentTarget).addClass('active')
231
+ }
232
+
233
+ }
234
+
235
+
236
+ /* TYPEAHEAD PLUGIN DEFINITION
237
+ * =========================== */
238
+
239
+ $.fn.typeahead = function ( option ) {
240
+ return this.each(function () {
241
+ var $this = $(this)
242
+ , data = $this.data('typeahead')
243
+ , options = typeof option == 'object' && option
244
+ if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
245
+ if (typeof option == 'string') data[option]()
246
+ })
247
+ }
248
+
249
+ $.fn.typeahead.defaults = {
250
+ source: []
251
+ , items: 8
252
+ , menu: '<ul class="typeahead dropdown-menu"></ul>'
253
+ , item: '<li><a href="#"></a></li>'
254
+ }
255
+
256
+ $.fn.typeahead.Constructor = Typeahead
257
+
258
+
259
+ /* TYPEAHEAD DATA-API
260
+ * ================== */
261
+
262
+ $(function () {
263
+ $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
264
+ var $this = $(this)
265
+ if ($this.data('typeahead')) return
266
+ e.preventDefault()
267
+ $this.typeahead($this.data())
268
+ })
269
+ })
270
+
271
+ }( window.jQuery )
@@ -0,0 +1,567 @@
1
+ /*!
2
+ * Bootstrap Responsive v2.0.0
3
+ *
4
+ * Copyright 2012 Twitter, Inc
5
+ * Licensed under the Apache License v2.0
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ *
8
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
9
+ */
10
+ .hidden {
11
+ display: none;
12
+ visibility: hidden;
13
+ }
14
+ @media (max-width: 480px) {
15
+ .nav-collapse {
16
+ -webkit-transform: translate3d(0, 0, 0);
17
+ }
18
+ .page-header h1 small {
19
+ display: block;
20
+ line-height: 18px;
21
+ }
22
+ input[class*="span"],
23
+ select[class*="span"],
24
+ textarea[class*="span"],
25
+ .uneditable-input {
26
+ display: block;
27
+ width: 100%;
28
+ height: 28px;
29
+ /* Make inputs at least the height of their button counterpart */
30
+
31
+ /* Makes inputs behave like true block-level elements */
32
+
33
+ -webkit-box-sizing: border-box;
34
+ /* Older Webkit */
35
+
36
+ -moz-box-sizing: border-box;
37
+ /* Older FF */
38
+
39
+ -ms-box-sizing: border-box;
40
+ /* IE8 */
41
+
42
+ box-sizing: border-box;
43
+ /* CSS3 spec*/
44
+
45
+ }
46
+ .input-prepend input[class*="span"], .input-append input[class*="span"] {
47
+ width: auto;
48
+ }
49
+ input[type="checkbox"], input[type="radio"] {
50
+ border: 1px solid #ccc;
51
+ }
52
+ .form-horizontal .control-group > label {
53
+ float: none;
54
+ width: auto;
55
+ padding-top: 0;
56
+ text-align: left;
57
+ }
58
+ .form-horizontal .controls {
59
+ margin-left: 0;
60
+ }
61
+ .form-horizontal .control-list {
62
+ padding-top: 0;
63
+ }
64
+ .form-horizontal .form-actions {
65
+ padding-left: 10px;
66
+ padding-right: 10px;
67
+ }
68
+ .modal {
69
+ position: absolute;
70
+ top: 10px;
71
+ left: 10px;
72
+ right: 10px;
73
+ width: auto;
74
+ margin: 0;
75
+ }
76
+ .modal.fade.in {
77
+ top: auto;
78
+ }
79
+ .modal-header .close {
80
+ padding: 10px;
81
+ margin: -10px;
82
+ }
83
+ .carousel-caption {
84
+ position: static;
85
+ }
86
+ }
87
+ @media (max-width: 768px) {
88
+ .container {
89
+ width: auto;
90
+ padding: 0 20px;
91
+ }
92
+ .row-fluid {
93
+ width: 100%;
94
+ }
95
+ .row {
96
+ margin-left: 0;
97
+ }
98
+ .row > [class*="span"], .row-fluid > [class*="span"] {
99
+ float: none;
100
+ display: block;
101
+ width: auto;
102
+ margin: 0;
103
+ }
104
+ }
105
+ @media (min-width: 768px) and (max-width: 980px) {
106
+ .row {
107
+ margin-left: -20px;
108
+ *zoom: 1;
109
+ }
110
+ .row:before, .row:after {
111
+ display: table;
112
+ content: "";
113
+ }
114
+ .row:after {
115
+ clear: both;
116
+ }
117
+ [class*="span"] {
118
+ float: left;
119
+ margin-left: 20px;
120
+ }
121
+ .span1 {
122
+ width: 42px;
123
+ }
124
+ .span2 {
125
+ width: 104px;
126
+ }
127
+ .span3 {
128
+ width: 166px;
129
+ }
130
+ .span4 {
131
+ width: 228px;
132
+ }
133
+ .span5 {
134
+ width: 290px;
135
+ }
136
+ .span6 {
137
+ width: 352px;
138
+ }
139
+ .span7 {
140
+ width: 414px;
141
+ }
142
+ .span8 {
143
+ width: 476px;
144
+ }
145
+ .span9 {
146
+ width: 538px;
147
+ }
148
+ .span10 {
149
+ width: 600px;
150
+ }
151
+ .span11 {
152
+ width: 662px;
153
+ }
154
+ .span12, .container {
155
+ width: 724px;
156
+ }
157
+ .offset1 {
158
+ margin-left: 82px;
159
+ }
160
+ .offset2 {
161
+ margin-left: 144px;
162
+ }
163
+ .offset3 {
164
+ margin-left: 206px;
165
+ }
166
+ .offset4 {
167
+ margin-left: 268px;
168
+ }
169
+ .offset5 {
170
+ margin-left: 330px;
171
+ }
172
+ .offset6 {
173
+ margin-left: 392px;
174
+ }
175
+ .offset7 {
176
+ margin-left: 454px;
177
+ }
178
+ .offset8 {
179
+ margin-left: 516px;
180
+ }
181
+ .offset9 {
182
+ margin-left: 578px;
183
+ }
184
+ .offset10 {
185
+ margin-left: 640px;
186
+ }
187
+ .offset11 {
188
+ margin-left: 702px;
189
+ }
190
+ .row-fluid {
191
+ width: 100%;
192
+ *zoom: 1;
193
+ }
194
+ .row-fluid:before, .row-fluid:after {
195
+ display: table;
196
+ content: "";
197
+ }
198
+ .row-fluid:after {
199
+ clear: both;
200
+ }
201
+ .row-fluid > [class*="span"] {
202
+ float: left;
203
+ margin-left: 2.762430939%;
204
+ }
205
+ .row-fluid > [class*="span"]:first-child {
206
+ margin-left: 0;
207
+ }
208
+ .row-fluid .span1 {
209
+ width: 5.801104972%;
210
+ }
211
+ .row-fluid .span2 {
212
+ width: 14.364640883%;
213
+ }
214
+ .row-fluid .span3 {
215
+ width: 22.928176794%;
216
+ }
217
+ .row-fluid .span4 {
218
+ width: 31.491712705%;
219
+ }
220
+ .row-fluid .span5 {
221
+ width: 40.055248616%;
222
+ }
223
+ .row-fluid .span6 {
224
+ width: 48.618784527%;
225
+ }
226
+ .row-fluid .span7 {
227
+ width: 57.182320438000005%;
228
+ }
229
+ .row-fluid .span8 {
230
+ width: 65.74585634900001%;
231
+ }
232
+ .row-fluid .span9 {
233
+ width: 74.30939226%;
234
+ }
235
+ .row-fluid .span10 {
236
+ width: 82.87292817100001%;
237
+ }
238
+ .row-fluid .span11 {
239
+ width: 91.436464082%;
240
+ }
241
+ .row-fluid .span12 {
242
+ width: 99.999999993%;
243
+ }
244
+ input.span1, textarea.span1, .uneditable-input.span1 {
245
+ width: 32px;
246
+ }
247
+ input.span2, textarea.span2, .uneditable-input.span2 {
248
+ width: 94px;
249
+ }
250
+ input.span3, textarea.span3, .uneditable-input.span3 {
251
+ width: 156px;
252
+ }
253
+ input.span4, textarea.span4, .uneditable-input.span4 {
254
+ width: 218px;
255
+ }
256
+ input.span5, textarea.span5, .uneditable-input.span5 {
257
+ width: 280px;
258
+ }
259
+ input.span6, textarea.span6, .uneditable-input.span6 {
260
+ width: 342px;
261
+ }
262
+ input.span7, textarea.span7, .uneditable-input.span7 {
263
+ width: 404px;
264
+ }
265
+ input.span8, textarea.span8, .uneditable-input.span8 {
266
+ width: 466px;
267
+ }
268
+ input.span9, textarea.span9, .uneditable-input.span9 {
269
+ width: 528px;
270
+ }
271
+ input.span10, textarea.span10, .uneditable-input.span10 {
272
+ width: 590px;
273
+ }
274
+ input.span11, textarea.span11, .uneditable-input.span11 {
275
+ width: 652px;
276
+ }
277
+ input.span12, textarea.span12, .uneditable-input.span12 {
278
+ width: 714px;
279
+ }
280
+ }
281
+ @media (max-width: 980px) {
282
+ body {
283
+ padding-top: 0;
284
+ }
285
+ .navbar-fixed-top {
286
+ position: static;
287
+ margin-bottom: 18px;
288
+ }
289
+ .navbar-fixed-top .navbar-inner {
290
+ padding: 5px;
291
+ }
292
+ .navbar .container {
293
+ width: auto;
294
+ padding: 0;
295
+ }
296
+ .navbar .brand {
297
+ padding-left: 10px;
298
+ padding-right: 10px;
299
+ margin: 0 0 0 -5px;
300
+ }
301
+ .navbar .nav-collapse {
302
+ clear: left;
303
+ }
304
+ .navbar .nav {
305
+ float: none;
306
+ margin: 0 0 9px;
307
+ }
308
+ .navbar .nav > li {
309
+ float: none;
310
+ }
311
+ .navbar .nav > li > a {
312
+ margin-bottom: 2px;
313
+ }
314
+ .navbar .nav > .divider-vertical {
315
+ display: none;
316
+ }
317
+ .navbar .nav > li > a, .navbar .dropdown-menu a {
318
+ padding: 6px 15px;
319
+ font-weight: bold;
320
+ color: #999999;
321
+ -webkit-border-radius: 3px;
322
+ -moz-border-radius: 3px;
323
+ border-radius: 3px;
324
+ }
325
+ .navbar .dropdown-menu li + li a {
326
+ margin-bottom: 2px;
327
+ }
328
+ .navbar .nav > li > a:hover, .navbar .dropdown-menu a:hover {
329
+ background-color: #222222;
330
+ }
331
+ .navbar .dropdown-menu {
332
+ position: static;
333
+ top: auto;
334
+ left: auto;
335
+ float: none;
336
+ display: block;
337
+ max-width: none;
338
+ margin: 0 15px;
339
+ padding: 0;
340
+ background-color: transparent;
341
+ border: none;
342
+ -webkit-border-radius: 0;
343
+ -moz-border-radius: 0;
344
+ border-radius: 0;
345
+ -webkit-box-shadow: none;
346
+ -moz-box-shadow: none;
347
+ box-shadow: none;
348
+ }
349
+ .navbar .dropdown-menu:before, .navbar .dropdown-menu:after {
350
+ display: none;
351
+ }
352
+ .navbar .dropdown-menu .divider {
353
+ display: none;
354
+ }
355
+ .navbar-form, .navbar-search {
356
+ float: none;
357
+ padding: 9px 15px;
358
+ margin: 9px 0;
359
+ border-top: 1px solid #222222;
360
+ border-bottom: 1px solid #222222;
361
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
362
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
363
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
364
+ }
365
+ .navbar .nav.pull-right {
366
+ float: none;
367
+ margin-left: 0;
368
+ }
369
+ .navbar-static .navbar-inner {
370
+ padding-left: 10px;
371
+ padding-right: 10px;
372
+ }
373
+ .btn-navbar {
374
+ display: block;
375
+ }
376
+ .nav-collapse {
377
+ overflow: hidden;
378
+ height: 0;
379
+ }
380
+ }
381
+ @media (min-width: 980px) {
382
+ .nav-collapse.collapse {
383
+ height: auto !important;
384
+ }
385
+ }
386
+ @media (min-width: 1200px) {
387
+ .row {
388
+ margin-left: -30px;
389
+ *zoom: 1;
390
+ }
391
+ .row:before, .row:after {
392
+ display: table;
393
+ content: "";
394
+ }
395
+ .row:after {
396
+ clear: both;
397
+ }
398
+ [class*="span"] {
399
+ float: left;
400
+ margin-left: 30px;
401
+ }
402
+ .span1 {
403
+ width: 70px;
404
+ }
405
+ .span2 {
406
+ width: 170px;
407
+ }
408
+ .span3 {
409
+ width: 270px;
410
+ }
411
+ .span4 {
412
+ width: 370px;
413
+ }
414
+ .span5 {
415
+ width: 470px;
416
+ }
417
+ .span6 {
418
+ width: 570px;
419
+ }
420
+ .span7 {
421
+ width: 670px;
422
+ }
423
+ .span8 {
424
+ width: 770px;
425
+ }
426
+ .span9 {
427
+ width: 870px;
428
+ }
429
+ .span10 {
430
+ width: 970px;
431
+ }
432
+ .span11 {
433
+ width: 1070px;
434
+ }
435
+ .span12, .container {
436
+ width: 1170px;
437
+ }
438
+ .offset1 {
439
+ margin-left: 130px;
440
+ }
441
+ .offset2 {
442
+ margin-left: 230px;
443
+ }
444
+ .offset3 {
445
+ margin-left: 330px;
446
+ }
447
+ .offset4 {
448
+ margin-left: 430px;
449
+ }
450
+ .offset5 {
451
+ margin-left: 530px;
452
+ }
453
+ .offset6 {
454
+ margin-left: 630px;
455
+ }
456
+ .offset7 {
457
+ margin-left: 730px;
458
+ }
459
+ .offset8 {
460
+ margin-left: 830px;
461
+ }
462
+ .offset9 {
463
+ margin-left: 930px;
464
+ }
465
+ .offset10 {
466
+ margin-left: 1030px;
467
+ }
468
+ .offset11 {
469
+ margin-left: 1130px;
470
+ }
471
+ .row-fluid {
472
+ width: 100%;
473
+ *zoom: 1;
474
+ }
475
+ .row-fluid:before, .row-fluid:after {
476
+ display: table;
477
+ content: "";
478
+ }
479
+ .row-fluid:after {
480
+ clear: both;
481
+ }
482
+ .row-fluid > [class*="span"] {
483
+ float: left;
484
+ margin-left: 2.564102564%;
485
+ }
486
+ .row-fluid > [class*="span"]:first-child {
487
+ margin-left: 0;
488
+ }
489
+ .row-fluid .span1 {
490
+ width: 5.982905983%;
491
+ }
492
+ .row-fluid .span2 {
493
+ width: 14.529914530000001%;
494
+ }
495
+ .row-fluid .span3 {
496
+ width: 23.076923077%;
497
+ }
498
+ .row-fluid .span4 {
499
+ width: 31.623931624%;
500
+ }
501
+ .row-fluid .span5 {
502
+ width: 40.170940171000005%;
503
+ }
504
+ .row-fluid .span6 {
505
+ width: 48.717948718%;
506
+ }
507
+ .row-fluid .span7 {
508
+ width: 57.264957265%;
509
+ }
510
+ .row-fluid .span8 {
511
+ width: 65.81196581200001%;
512
+ }
513
+ .row-fluid .span9 {
514
+ width: 74.358974359%;
515
+ }
516
+ .row-fluid .span10 {
517
+ width: 82.905982906%;
518
+ }
519
+ .row-fluid .span11 {
520
+ width: 91.45299145300001%;
521
+ }
522
+ .row-fluid .span12 {
523
+ width: 100%;
524
+ }
525
+ input.span1, textarea.span1, .uneditable-input.span1 {
526
+ width: 60px;
527
+ }
528
+ input.span2, textarea.span2, .uneditable-input.span2 {
529
+ width: 160px;
530
+ }
531
+ input.span3, textarea.span3, .uneditable-input.span3 {
532
+ width: 260px;
533
+ }
534
+ input.span4, textarea.span4, .uneditable-input.span4 {
535
+ width: 360px;
536
+ }
537
+ input.span5, textarea.span5, .uneditable-input.span5 {
538
+ width: 460px;
539
+ }
540
+ input.span6, textarea.span6, .uneditable-input.span6 {
541
+ width: 560px;
542
+ }
543
+ input.span7, textarea.span7, .uneditable-input.span7 {
544
+ width: 660px;
545
+ }
546
+ input.span8, textarea.span8, .uneditable-input.span8 {
547
+ width: 760px;
548
+ }
549
+ input.span9, textarea.span9, .uneditable-input.span9 {
550
+ width: 860px;
551
+ }
552
+ input.span10, textarea.span10, .uneditable-input.span10 {
553
+ width: 960px;
554
+ }
555
+ input.span11, textarea.span11, .uneditable-input.span11 {
556
+ width: 1060px;
557
+ }
558
+ input.span12, textarea.span12, .uneditable-input.span12 {
559
+ width: 1160px;
560
+ }
561
+ .thumbnails {
562
+ margin-left: -30px;
563
+ }
564
+ .thumbnails > li {
565
+ margin-left: 30px;
566
+ }
567
+ }