underoos 1.0.0 → 1.1.0

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 (140) hide show
  1. data/Gemfile +5 -0
  2. data/Gemfile.lock +21 -7
  3. data/README.md +85 -10
  4. data/Rakefile +36 -1
  5. data/app/assets/javascripts/docs.js +6 -0
  6. data/app/assets/javascripts/styleguide.coffee +162 -0
  7. data/app/assets/javascripts/underoos.js +0 -1
  8. data/app/assets/stylesheets/base/_base.sass +14 -0
  9. data/app/assets/stylesheets/base/_buttons.sass +68 -0
  10. data/app/assets/stylesheets/base/_forms.sass +313 -24
  11. data/app/assets/stylesheets/base/_helpers.sass +27 -13
  12. data/app/assets/stylesheets/base/_normalize.sass +17 -9
  13. data/app/assets/stylesheets/base/_scaffold.sass +85 -0
  14. data/app/assets/stylesheets/base/_tables.sass +77 -0
  15. data/app/assets/stylesheets/base/_transitions.sass +10 -2
  16. data/app/assets/stylesheets/base/_typography.sass +183 -21
  17. data/app/assets/stylesheets/components/_accordions.sass +38 -0
  18. data/app/assets/stylesheets/components/_breadcrumbs.sass +19 -5
  19. data/app/assets/stylesheets/components/_button-groups.sass +43 -0
  20. data/app/assets/stylesheets/components/_carets.sass +13 -2
  21. data/app/assets/stylesheets/components/_carousels.sass +32 -0
  22. data/app/assets/stylesheets/components/_close.sass +15 -2
  23. data/app/assets/stylesheets/components/_components.sass +28 -0
  24. data/app/assets/stylesheets/components/_decals.sass +14 -0
  25. data/app/assets/stylesheets/components/_dropdowns.sass +88 -4
  26. data/app/assets/stylesheets/components/_media.sass +36 -0
  27. data/app/assets/stylesheets/components/_modals.sass +29 -0
  28. data/app/assets/stylesheets/components/_nav-lists.sass +20 -0
  29. data/app/assets/stylesheets/components/_navbars.sass +64 -3
  30. data/app/assets/stylesheets/components/_notifications.sass +112 -16
  31. data/app/assets/stylesheets/components/_paddles.sass +26 -0
  32. data/app/assets/stylesheets/components/_pagination.sass +23 -3
  33. data/app/assets/stylesheets/components/_pills.sass +80 -0
  34. data/app/assets/stylesheets/components/_popovers.sass +28 -0
  35. data/app/assets/stylesheets/components/_progress-bars.sass +33 -1
  36. data/app/assets/stylesheets/components/_tabs.sass +79 -0
  37. data/app/assets/stylesheets/components/_tooltips.sass +26 -0
  38. data/app/assets/stylesheets/components/_wells.sass +9 -0
  39. data/app/assets/stylesheets/layouts/_containers.sass +12 -0
  40. data/app/assets/stylesheets/layouts/_layouts.sass +5 -0
  41. data/app/assets/stylesheets/layouts/_print.sass +5 -1
  42. data/app/assets/stylesheets/layouts/_queries.sass +18 -15
  43. data/app/assets/stylesheets/layouts/_upgrades.sass +51 -40
  44. data/app/assets/stylesheets/mixins/_arrows.sass +13 -1
  45. data/app/assets/stylesheets/mixins/_clearfixins.sass +18 -4
  46. data/app/assets/stylesheets/mixins/_coloring.sass +10 -1
  47. data/app/assets/stylesheets/mixins/_columns.sass +16 -3
  48. data/app/assets/stylesheets/mixins/_conversions.sass +18 -6
  49. data/app/assets/stylesheets/mixins/_font-size.sass +16 -1
  50. data/app/assets/stylesheets/mixins/_image-tools.sass +12 -1
  51. data/app/assets/stylesheets/mixins/_inline-block.sass +21 -0
  52. data/app/assets/stylesheets/mixins/_ir.sass +14 -1
  53. data/app/assets/stylesheets/mixins/_mixins.sass +6 -0
  54. data/app/assets/stylesheets/mixins/_responsive.sass +16 -0
  55. data/app/assets/stylesheets/mixins/_sticky-footer.sass +52 -0
  56. data/app/assets/stylesheets/mixins/_tab-focus.sass +8 -1
  57. data/app/assets/stylesheets/mixins/_timing-equations.sass +34 -1
  58. data/app/assets/stylesheets/mixins/_visibility.sass +18 -5
  59. data/app/assets/stylesheets/polyfills/_box-shadow.sass +10 -0
  60. data/app/assets/stylesheets/polyfills/_box-sizing.sass +10 -1
  61. data/app/assets/stylesheets/polyfills/_functions.sass +14 -1
  62. data/app/assets/stylesheets/polyfills/_opacity.sass +10 -1
  63. data/app/assets/stylesheets/polyfills/_polyfills.sass +9 -2
  64. data/app/assets/stylesheets/polyfills/_transition.sass +10 -0
  65. data/app/assets/stylesheets/polyfills/_user-select.sass +10 -0
  66. data/app/assets/stylesheets/settings/_config.sass +26 -0
  67. data/app/assets/stylesheets/settings/_settings.sass +7 -0
  68. data/app/assets/stylesheets/settings/_theme.sass +189 -0
  69. data/app/assets/stylesheets/{styleguide.sass → underoos-docs.sass} +20 -116
  70. data/app/assets/stylesheets/underoos.sass +5 -16
  71. data/config.ru +1 -3
  72. data/features/generator.feature +13 -4
  73. data/lib/generators/underoos/assets_generator.rb +4 -2
  74. data/lib/underoos/version.rb +1 -1
  75. data/public/images.html +157 -0
  76. data/public/index.html +149 -0
  77. data/public/sherpa.css +306 -0
  78. data/public/styles.html +5374 -0
  79. data/script/javascripts +0 -1
  80. data/sherpa/config.yml +96 -0
  81. data/sherpa/layouts/images.mustache +17 -0
  82. data/sherpa/layouts/layout.mustache +77 -0
  83. data/sherpa/layouts/overview.mustache +19 -0
  84. data/sherpa/layouts/raw.mustache +25 -0
  85. data/sherpa/layouts/section.mustache +67 -0
  86. data/underoos.gemspec +0 -2
  87. data/vendor/assets/javascripts/bootstrap-alert.js +28 -32
  88. data/vendor/assets/javascripts/bootstrap-button.js +29 -33
  89. data/vendor/assets/javascripts/bootstrap-collapse.js +45 -26
  90. data/vendor/assets/javascripts/bootstrap-dropdown.js +18 -10
  91. data/vendor/assets/javascripts/bootstrap-modal.js +25 -17
  92. data/vendor/assets/javascripts/bootstrap-popover.js +13 -10
  93. data/vendor/assets/javascripts/bootstrap-tab.js +12 -7
  94. data/vendor/assets/javascripts/bootstrap-tooltip.js +40 -35
  95. data/vendor/assets/javascripts/bootstrap-transition.js +30 -20
  96. data/vendor/assets/javascripts/bootstrap-typeahead.js +24 -10
  97. data/vendor/assets/javascripts/sherpa.coffee +78 -0
  98. metadata +34 -75
  99. data/app/assets/javascripts/styleguide.js +0 -132
  100. data/app/assets/stylesheets/base/_elements.sass +0 -61
  101. data/app/assets/stylesheets/polyfills/_inline-block.sass +0 -8
  102. data/app/assets/stylesheets/themes/_default.sass +0 -119
  103. data/app/controllers/underoos/styleguides_controller.rb +0 -79
  104. data/app/views/shared/_upgrades.html.haml +0 -12
  105. data/app/views/underoos/styleguides/_assets.haml +0 -42
  106. data/app/views/underoos/styleguides/_components.haml +0 -42
  107. data/app/views/underoos/styleguides/_elements.haml +0 -242
  108. data/app/views/underoos/styleguides/_forms.haml +0 -305
  109. data/app/views/underoos/styleguides/_layouts.haml +0 -76
  110. data/app/views/underoos/styleguides/_palettes.haml +0 -18
  111. data/app/views/underoos/styleguides/_resources.haml +0 -27
  112. data/app/views/underoos/styleguides/_tables.haml +0 -124
  113. data/app/views/underoos/styleguides/_typography.haml +0 -284
  114. data/app/views/underoos/styleguides/_utilities.haml +0 -270
  115. data/app/views/underoos/styleguides/components/_accordions.haml +0 -83
  116. data/app/views/underoos/styleguides/components/_breadcrumbs.haml +0 -42
  117. data/app/views/underoos/styleguides/components/_button-groups.haml +0 -162
  118. data/app/views/underoos/styleguides/components/_carets.haml +0 -28
  119. data/app/views/underoos/styleguides/components/_close.haml +0 -20
  120. data/app/views/underoos/styleguides/components/_decals.haml +0 -40
  121. data/app/views/underoos/styleguides/components/_dropdowns.haml +0 -189
  122. data/app/views/underoos/styleguides/components/_media.haml +0 -78
  123. data/app/views/underoos/styleguides/components/_modals.haml +0 -42
  124. data/app/views/underoos/styleguides/components/_nav-lists.haml +0 -52
  125. data/app/views/underoos/styleguides/components/_navbars.haml +0 -144
  126. data/app/views/underoos/styleguides/components/_navs-showcase.haml +0 -27
  127. data/app/views/underoos/styleguides/components/_notifications.haml +0 -169
  128. data/app/views/underoos/styleguides/components/_paddles.haml +0 -68
  129. data/app/views/underoos/styleguides/components/_pagination.haml +0 -64
  130. data/app/views/underoos/styleguides/components/_popovers.haml +0 -33
  131. data/app/views/underoos/styleguides/components/_progress-bars.haml +0 -72
  132. data/app/views/underoos/styleguides/components/_tabs-pills.haml +0 -241
  133. data/app/views/underoos/styleguides/components/_tooltips.haml +0 -37
  134. data/app/views/underoos/styleguides/components/_wells.haml +0 -29
  135. data/app/views/underoos/styleguides/index.html.haml +0 -259
  136. data/app/views/underoos/styleguides/partials/_form-template.haml +0 -171
  137. data/app/views/underoos/styleguides/partials/_table-data.haml +0 -33
  138. data/app/views/underoos/styleguides/partials/_transitions.haml +0 -136
  139. data/config/routes.rb +0 -3
  140. data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -125
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
  curl -L -o ./vendor/assets/javascripts/bootstrap-transition.js http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js
3
- curl -L -o ./vendor/assets/javascripts/bootstrap-scrollspy.js http://twitter.github.com/bootstrap/assets/js/bootstrap-scrollspy.js
4
3
  curl -L -o ./vendor/assets/javascripts/bootstrap-tooltip.js http://twitter.github.com/bootstrap/assets/js/bootstrap-tooltip.js
5
4
  curl -L -o ./vendor/assets/javascripts/bootstrap-popover.js http://twitter.github.com/bootstrap/assets/js/bootstrap-popover.js
6
5
  curl -L -o ./vendor/assets/javascripts/bootstrap-dropdown.js http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js
@@ -0,0 +1,96 @@
1
+ settings:
2
+ title: underoos
3
+ repo: https://github.com/modeset/underoos/
4
+ output_dir: ./public/
5
+ layout_dir: ./sherpa/layouts/
6
+ layout_template: layout.mustache
7
+ default_section_template: section.mustache
8
+
9
+ overview:
10
+ base_dir: ./
11
+ section_template: raw.mustache
12
+ manifest:
13
+ - require: README.md
14
+
15
+ styles:
16
+ base_dir: ./app/assets/stylesheets/
17
+ manifest:
18
+ - require: settings/_settings.sass
19
+ template: overview.mustache
20
+ - require: settings/_config.sass
21
+ - require: settings/_theme.sass
22
+
23
+ - require: base/_base.sass
24
+ template: overview.mustache
25
+ - require: base/_normalize.sass
26
+ - require: base/_scaffold.sass
27
+ - require: base/_typography.sass
28
+ - require: base/_buttons.sass
29
+ - require: base/_tables.sass
30
+ - require: base/_forms.sass
31
+ - require: base/_helpers.sass
32
+ - require: base/_transitions.sass
33
+
34
+ - require: components/_components.sass
35
+ template: overview.mustache
36
+ - require: components/_button-groups.sass
37
+ - require: components/_dropdowns.sass
38
+ - require: components/_tabs.sass
39
+ - require: components/_pills.sass
40
+ - require: components/_nav-lists.sass
41
+ - require: components/_breadcrumbs.sass
42
+ - require: components/_pagination.sass
43
+ - require: components/_accordions.sass
44
+ - require: components/_paddles.sass
45
+ - require: components/_navbars.sass
46
+ - require: components/_modals.sass
47
+ - require: components/_notifications.sass
48
+ - require: components/_progress-bars.sass
49
+ - require: components/_media.sass
50
+ - require: components/_carousels.sass
51
+ - require: components/_wells.sass
52
+ - require: components/_decals.sass
53
+ - require: components/_tooltips.sass
54
+ - require: components/_popovers.sass
55
+ - require: components/_carets.sass
56
+ - require: components/_close.sass
57
+
58
+ - require: layouts/_layouts.sass
59
+ template: overview.mustache
60
+ - require: layouts/_containers.sass
61
+ - require: layouts/_queries.sass
62
+ - require: layouts/_upgrades.sass
63
+ - require: layouts/_print.sass
64
+
65
+ - require: mixins/_mixins.sass
66
+ template: overview.mustache
67
+ - require: mixins/_arrows.sass
68
+ - require: mixins/_clearfixins.sass
69
+ - require: mixins/_coloring.sass
70
+ - require: mixins/_columns.sass
71
+ - require: mixins/_conversions.sass
72
+ - require: mixins/_font-size.sass
73
+ - require: mixins/_image-tools.sass
74
+ - require: mixins/_inline-block.sass
75
+ - require: mixins/_ir.sass
76
+ - require: mixins/_responsive.sass
77
+ - require: mixins/_sticky-footer.sass
78
+ - require: mixins/_tab-focus.sass
79
+ - require: mixins/_timing-equations.sass
80
+ - require: mixins/_visibility.sass
81
+
82
+ - require: polyfills/_polyfills.sass
83
+ template: overview.mustache
84
+ - require: polyfills/_functions.sass
85
+ - require: polyfills/_box-shadow.sass
86
+ - require: polyfills/_box-sizing.sass
87
+ - require: polyfills/_opacity.sass
88
+ - require: polyfills/_transition.sass
89
+ - require: polyfills/_user-select.sass
90
+
91
+ images:
92
+ section_template: images.mustache
93
+ base_dir: ./
94
+ manifest:
95
+ - require: "public/**/*.{png,jpeg,jpg,gif,ico}"
96
+
@@ -0,0 +1,17 @@
1
+
2
+ <section class="sherpa-section sherpa-clearfix" id="{{{id}}}">
3
+
4
+ {{#filepath}}
5
+ <div class="sherpa-filepath sherpa-imagepath sherpa-clearfix">
6
+ <a href="{{{repo_url}}}" target="_blank">{{{filepath}}}</a>
7
+ </div>
8
+ {{/filepath}}
9
+
10
+ {{#file.markup}}
11
+ <div class="sherpa-imageview sherpa-clearfix">
12
+ {{{file.markup}}}
13
+ </div>
14
+ {{/file.markup}}
15
+
16
+ </section>
17
+
@@ -0,0 +1,77 @@
1
+
2
+ <!doctype html>
3
+ <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
4
+ <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
5
+ <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
6
+ <!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
7
+ <head>
8
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
9
+ <title>{{{title}}} {{{page}}}</title>
10
+ <meta name="imagetoolbar" content="no" />
11
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
12
+ <meta name="apple-touch-fullscreen" content="YES" />
13
+ <meta name="apple-mobile-web-app-capable" content="YES" />
14
+ <meta name="apple-mobile-web-app-status-bar-style" content="black" />
15
+ <!--[if lt IE 9]>
16
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
17
+ <![endif]-->
18
+ <link rel="stylesheet" href="/assets/underoos.css" type="text/css">
19
+ <link rel="stylesheet" href="sherpa.css" type="text/css">
20
+ <link rel="stylesheet" href="/assets/underoos-docs.css" type="text/css">
21
+ </head>
22
+
23
+ <body id="{{{page}}}">
24
+ <aside class="sherpa-sidebar">
25
+ <nav>
26
+ <a class="sherpa-brand" href="/">{{{title}}}</a>
27
+ {{#nav}}
28
+ <ul class="sherpa-dox-nav sherpa-nav-list">
29
+ <li class="sherpa-nav-header">Documentation</li>
30
+ {{{nav}}}
31
+ </ul>
32
+ {{/nav}}
33
+
34
+ {{#aside}}
35
+ <ul class="sherpa-anchor-nav sherpa-nav-list">
36
+ {{{aside}}}
37
+ </ul>
38
+ {{/aside}}
39
+ </nav>
40
+ </aside>
41
+
42
+ <section class="sherpa-wrapper sherpa-container sherpa-clearfix">
43
+
44
+ <section class="sherpa-section sherpa-clearfix">
45
+ <h1 class="sherpa-page-heading">{{{page}}}</h1>
46
+ </section>
47
+
48
+ {{{layout}}}
49
+ </section>
50
+
51
+ <footer class="sherpa-footer sherpa-container sherpa-clearfix">
52
+ <p>&raquo; Hand crafted by <a href="http://www.modeset.com/">Mode Set</a> and <a href="https://raw.github.com/modeset/underoos/master/LICENSE">licensed MIT</a> style for your pleasure</p>
53
+ <p>&raquo; Fork and fix me at <a href="{{{repo}}}">Github</a></p>
54
+ <p>&raquo; See where it's headed on <a href="https://www.pivotaltracker.com/projects/485221">Pivotal Tracker</a></p>
55
+ <p>&raquo; Documentation generated by <a href="https://github.com/modeset/sherpa">sherpa</a></p>
56
+ </footer>
57
+
58
+ <section class="upgrade-notifications">
59
+ <a class="upgrade-close" data-dismiss="alert" href="#">×</a>
60
+ <section class="upgrade-notification">
61
+ <article class="lt-ie8-msg upgrade-container">
62
+ <p>
63
+ Please upgrade to the <a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie-9/worldwide-languages">latest version of Internet Explorer</a> or use one of the following browsers:
64
+ <a href="http://www.google.com/chrome/">Google Chrome</a>, <a href="http://www.apple.com/safari/download/">Apple Safari</a>, or <a href="http://www.mozilla.org/en-US/firefox/new/">Mozilla Firefox</a>
65
+ </p>
66
+ </article>
67
+ <article class="no-js-msg upgrade-container">
68
+ <p>For full functionality of this site it is necessary to enable <a href="http://www.enable-javascript.com/" target="_blank">JavaScript</a>.</p>
69
+ </article>
70
+ </section>
71
+ </section>
72
+
73
+ <script src="/assets/underoos.js"></script>
74
+ <script src="/assets/docs.js"></script>
75
+ </body>
76
+ </html>
77
+
@@ -0,0 +1,19 @@
1
+
2
+ <section class="sherpa-section sherpa-clearfix" id="{{{id}}}">
3
+
4
+ {{#file.markup}}
5
+ <div class="sherpa-overview sherpa-clearfix">
6
+ {{{file.markup}}}
7
+ </div>
8
+ {{/file.markup}}
9
+
10
+ {{#file.blocks}}
11
+ {{#usage_showcase}}
12
+ <div class="sherpa-showcase sherpa-clearfix">
13
+ {{{usage_showcase}}}
14
+ </div>
15
+ {{/usage_showcase}}
16
+ {{/file.blocks}}
17
+
18
+ </section>
19
+
@@ -0,0 +1,25 @@
1
+
2
+ <section class="sherpa-section sherpa-clearfix" id="{{{id}}}">
3
+
4
+ {{#filepath}}
5
+ <div class="sherpa-filepath sherpa-clearfix">
6
+ <a href="{{{repo_url}}}" target="_blank">{{{filepath}}}</a>
7
+ </div>
8
+ {{/filepath}}
9
+
10
+ {{#file.markup}}
11
+ <div class="sherpa-description sherpa-clearfix">
12
+ {{{file.markup}}}
13
+ </div>
14
+ {{/file.markup}}
15
+
16
+ {{#file.blocks}}
17
+ {{#usage_showcase}}
18
+ <div class="sherpa-showcase sherpa-clearfix">
19
+ {{{usage_showcase}}}
20
+ </div>
21
+ {{/usage_showcase}}
22
+ {{/file.blocks}}
23
+
24
+ </section>
25
+
@@ -0,0 +1,67 @@
1
+
2
+ <section class="sherpa-section sherpa-clearfix">
3
+
4
+ {{#filepath}}
5
+ <div class="sherpa-filepath sherpa-clearfix">
6
+ <a href="{{{repo_url}}}" target="_blank">{{{filepath}}}</a>
7
+ </div>
8
+ {{/filepath}}
9
+
10
+ {{#file.blocks}}
11
+ {{#summary}}
12
+ <div class="sherpa-summary sherpa-clearfix" id="{{{id}}}">
13
+ {{{summary}}}
14
+ </div>
15
+ {{/summary}}
16
+
17
+ {{#arguments}}
18
+ <div class="sherpa-description sherpa-clearfix">
19
+ {{{arguments}}}
20
+ </div>
21
+ {{/arguments}}
22
+
23
+ {{#states}}
24
+ <div class="sherpa-description sherpa-clearfix">
25
+ {{{states}}}
26
+ </div>
27
+ {{/states}}
28
+
29
+ {{#usage_showcase}}
30
+ <div class="sherpa-showcase sherpa-clearfix">
31
+ {{{usage_showcase}}}
32
+ </div>
33
+ {{/usage_showcase}}
34
+
35
+ {{#usage}}
36
+ <div class="sherpa-description sherpa-usage sherpa-clearfix">
37
+ {{{usage}}}
38
+ </div>
39
+ {{/usage}}
40
+
41
+ {{#examples}}
42
+ <div class="sherpa-description sherpa-clearfix">
43
+ {{{examples}}}
44
+ </div>
45
+ {{/examples}}
46
+
47
+ {{#notes}}
48
+ <div class="sherpa-description sherpa-notes sherpa-clearfix">
49
+ {{{notes}}}
50
+ </div>
51
+ {{/notes}}
52
+
53
+ {{#warnings}}
54
+ <div class="sherpa-description sherpa-notes sherpa-warnings sherpa-clearfix">
55
+ {{{warnings}}}
56
+ </div>
57
+ {{/warnings}}
58
+
59
+ {{#alerts}}
60
+ <div class="sherpa-description sherpa-notes sherpa-alerts sherpa-clearfix">
61
+ {{{alerts}}}
62
+ </div>
63
+ {{/alerts}}
64
+ {{/file.blocks}}
65
+
66
+ </section>
67
+
@@ -20,10 +20,8 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.add_runtime_dependency 'rails', '>= 3.1.0'
22
22
  s.add_runtime_dependency 'sass-rails'
23
- s.add_runtime_dependency 'haml-rails'
24
23
 
25
24
  s.add_development_dependency 'cucumber'
26
25
  s.add_development_dependency 'aruba'
27
- s.add_development_dependency 'jquery-rails'
28
26
 
29
27
  end
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================
2
- * bootstrap-alert.js v2.0.2
2
+ * bootstrap-alert.js v2.0.3
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.3
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);