sb-styleguide 0.0.9 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. data/.codoopts +10 -0
  2. data/.env +1 -0
  3. data/.gitignore +1 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +10 -3
  6. data/Gemfile.lock +134 -94
  7. data/Procfile +1 -0
  8. data/README.md +3 -5
  9. data/Rakefile +3 -0
  10. data/app/assets/images/layouts/basic-marketing-site.png +0 -0
  11. data/app/assets/images/layouts/jumbotron-site.png +0 -0
  12. data/app/assets/javascripts/base.js.coffee +3 -0
  13. data/app/assets/javascripts/grids.js.coffee +3 -0
  14. data/app/assets/javascripts/javascript.js.coffee +3 -0
  15. data/app/assets/javascripts/modules.js.coffee +3 -0
  16. data/app/assets/stylesheets/application-old-ie.css.scss +11 -0
  17. data/app/assets/stylesheets/application.css.scss +33 -30
  18. data/app/assets/stylesheets/base/_all.scss +6 -0
  19. data/app/assets/stylesheets/base/_reset.css.scss +16 -0
  20. data/app/assets/stylesheets/base/_type.scss +16 -0
  21. data/app/assets/stylesheets/{coderay_githubish.css.scss → modules/_coderay.css.scss} +40 -0
  22. data/app/assets/stylesheets/modules/_layout_examples.css.scss +13 -0
  23. data/app/assets/stylesheets/modules/_webfont_table.css.scss +47 -0
  24. data/app/assets/stylesheets/vanilla-normal-old-ie.css.scss +11 -0
  25. data/app/assets/stylesheets/vanilla-normal.css.scss +33 -0
  26. data/app/controllers/application_controller.rb +2 -0
  27. data/app/controllers/base_controller.rb +52 -0
  28. data/app/controllers/grids_controller.rb +48 -0
  29. data/app/controllers/javascript_controller.rb +20 -0
  30. data/app/controllers/modules_controller.rb +43 -0
  31. data/app/helpers/styleguide_helper.rb +33 -0
  32. data/app/views/base/_webfonts_social_standard.html +429 -0
  33. data/app/views/base/_webfonts_ss_standard.html +2413 -0
  34. data/app/views/base/buttons.html.haml +20 -0
  35. data/app/views/base/forms.html.haml +40 -0
  36. data/app/views/base/images.html.haml +1 -0
  37. data/app/views/base/index.html.haml +68 -0
  38. data/app/views/base/labels.html.haml +22 -0
  39. data/app/views/base/lists.html.haml +20 -0
  40. data/app/views/base/webfonts.html.haml +17 -0
  41. data/app/views/grids/index.html.haml +73 -0
  42. data/app/views/grids/layouts.html.haml +9 -0
  43. data/app/views/grids/layouts/basic-marketing-site.haml +69 -0
  44. data/app/views/grids/layouts/jumbotron-site.haml +92 -0
  45. data/app/views/layouts/_main_nav.html.haml +6 -6
  46. data/app/views/layouts/application.html.haml +6 -32
  47. data/app/views/modules/alerts.html.haml +12 -0
  48. data/app/views/modules/footer.html.haml +2 -0
  49. data/app/views/modules/index.html.haml +5 -0
  50. data/app/views/modules/nav.html.haml +12 -0
  51. data/app/views/modules/panels.html.haml +3 -0
  52. data/app/views/modules/tabs.html.haml +58 -0
  53. data/app/views/old_javascript/close.html.haml +2 -0
  54. data/app/views/old_javascript/forms.html.haml +2 -0
  55. data/app/views/old_javascript/ga_events.html.haml +2 -0
  56. data/app/views/old_javascript/index.html.haml +2 -0
  57. data/app/views/old_javascript/responsive_resize.html.haml +2 -0
  58. data/app/views/old_javascript/switch.html.haml +2 -0
  59. data/app/views/parts/base/_button.haml +3 -0
  60. data/app/views/parts/base/_button_colours.haml +4 -0
  61. data/app/views/parts/base/_button_group.haml +4 -0
  62. data/app/views/parts/base/_button_sizing.haml +3 -0
  63. data/app/views/parts/base/_button_states.haml +3 -0
  64. data/app/views/parts/base/_form_example.haml +26 -0
  65. data/app/views/parts/base/_form_example_horizontal.haml +26 -0
  66. data/app/views/parts/base/_form_group.haml +10 -0
  67. data/app/views/parts/base/_form_location.haml +3 -0
  68. data/app/views/parts/base/_labels.haml +5 -0
  69. data/app/views/parts/base/_labels_sizing.haml +3 -0
  70. data/app/views/parts/base/_list.haml +10 -0
  71. data/app/views/parts/base/_list_action.haml +5 -0
  72. data/app/views/parts/base/_list_nav.haml +12 -0
  73. data/app/views/parts/base/_list_unset.haml +10 -0
  74. data/app/views/parts/base/_type_body.haml +2 -0
  75. data/app/views/parts/base/_type_headings.haml +5 -0
  76. data/app/views/parts/base/_type_helpers.haml +3 -0
  77. data/app/views/parts/base/_type_links.haml +9 -0
  78. data/app/views/parts/base/_type_shouts.haml +4 -0
  79. data/app/views/parts/grids/_example_layout_1.haml +10 -0
  80. data/app/views/parts/grids/_live_grid.haml +29 -0
  81. data/app/views/parts/modules/_alerts.haml +11 -0
  82. data/app/views/parts/modules/_nav_footer.haml +34 -0
  83. data/app/views/parts/modules/_nav_header.haml +18 -0
  84. data/app/views/parts/modules/_panels.haml +9 -0
  85. data/app/views/parts/modules/_tabs_minimal.haml +11 -0
  86. data/app/views/parts/modules/_tabs_simple_group.haml +11 -0
  87. data/app/views/parts/modules/_tabs_simple_group_toggle.haml +11 -0
  88. data/app/views/parts/modules/_tabs_toggle.haml +5 -0
  89. data/app/views/parts/modules/_tabs_traditional.haml +11 -0
  90. data/app/views/shared/_title.html.haml +8 -0
  91. data/app/views/shared/_ui_nav.html.haml +5 -0
  92. data/app/views/ui/typography.html.haml +86 -96
  93. data/lib/sb-styleguide.rb +1 -1
  94. data/lib/sb-styleguide/version.rb +1 -1
  95. data/lib/templates/haml/scaffold/_form.html.haml +8 -0
  96. data/public/javascripts/LICENSE.html +158 -0
  97. data/public/javascripts/README.md.html +164 -0
  98. data/public/javascripts/assets/codo.css +1 -0
  99. data/public/javascripts/assets/codo.js +21 -0
  100. data/public/javascripts/assets/search_data.js +1 -0
  101. data/public/javascripts/class_index.html +215 -0
  102. data/public/javascripts/class_list.html +58 -0
  103. data/public/javascripts/classes/Close.html +259 -0
  104. data/public/javascripts/classes/GAEvent.html +231 -0
  105. data/public/javascripts/classes/ResizeHandler.html +225 -0
  106. data/public/javascripts/classes/Switch.html +318 -0
  107. data/public/javascripts/classes/TBGForm.html +373 -0
  108. data/public/javascripts/extra_list.html +36 -0
  109. data/public/javascripts/file_list.html +74 -0
  110. data/public/javascripts/files/styleguide/plugins/tbg-close.js.coffee.html +160 -0
  111. data/public/javascripts/files/styleguide/plugins/tbg-forms.js.coffee.html +160 -0
  112. data/public/javascripts/files/styleguide/plugins/tbg-ga-events.js.coffee.html +160 -0
  113. data/public/javascripts/files/styleguide/plugins/tbg-respinsiveresize.js.coffee.html +160 -0
  114. data/public/javascripts/files/styleguide/plugins/tbg-switch.js.coffee.html +160 -0
  115. data/public/javascripts/index.html +14 -0
  116. data/public/javascripts/method_list.html +187 -0
  117. data/public/javascripts/mixin_list.html +28 -0
  118. data/vendor/assets/javascripts/styleguide/plugins/doc/assets/codo.css +1 -0
  119. data/vendor/assets/javascripts/styleguide/plugins/doc/assets/codo.js +21 -0
  120. data/vendor/assets/javascripts/styleguide/plugins/doc/assets/search_data.js +1 -0
  121. data/vendor/assets/javascripts/styleguide/plugins/doc/class_index.html +194 -0
  122. data/vendor/assets/javascripts/styleguide/plugins/doc/class_list.html +58 -0
  123. data/vendor/assets/javascripts/styleguide/plugins/doc/classes/Close.html +215 -0
  124. data/vendor/assets/javascripts/styleguide/plugins/doc/classes/GAEvent.html +235 -0
  125. data/vendor/assets/javascripts/styleguide/plugins/doc/classes/ResizeHandler.html +192 -0
  126. data/vendor/assets/javascripts/styleguide/plugins/doc/classes/Switch.html +233 -0
  127. data/vendor/assets/javascripts/styleguide/plugins/doc/classes/TBGForm.html +318 -0
  128. data/vendor/assets/javascripts/styleguide/plugins/doc/extra_list.html +30 -0
  129. data/vendor/assets/javascripts/styleguide/plugins/doc/file_list.html +58 -0
  130. data/vendor/assets/javascripts/styleguide/plugins/doc/files/tbg-close.js.coffee.html +154 -0
  131. data/vendor/assets/javascripts/styleguide/plugins/doc/files/tbg-forms.js.coffee.html +154 -0
  132. data/vendor/assets/javascripts/styleguide/plugins/doc/files/tbg-ga-events.js.coffee.html +154 -0
  133. data/vendor/assets/javascripts/styleguide/plugins/doc/files/tbg-respinsiveresize.js.coffee.html +154 -0
  134. data/vendor/assets/javascripts/styleguide/plugins/doc/files/tbg-switch.js.coffee.html +154 -0
  135. data/vendor/assets/javascripts/styleguide/plugins/doc/index.html +14 -0
  136. data/vendor/assets/javascripts/styleguide/plugins/doc/method_list.html +163 -0
  137. data/vendor/assets/javascripts/styleguide/plugins/doc/mixin_list.html +28 -0
  138. data/vendor/assets/javascripts/styleguide/plugins/tbg-close.js.coffee +28 -4
  139. data/vendor/assets/javascripts/styleguide/plugins/tbg-forms.js.coffee +52 -5
  140. data/vendor/assets/javascripts/styleguide/plugins/tbg-ga-events.js.coffee +28 -8
  141. data/vendor/assets/javascripts/styleguide/plugins/tbg-respinsiveresize.js.coffee +21 -2
  142. data/vendor/assets/javascripts/styleguide/plugins/tbg-switch.js.coffee +37 -2
  143. data/vendor/assets/stylesheets/_mixins.css.scss +128 -35
  144. data/vendor/assets/stylesheets/_settings.css.scss +7 -4
  145. data/vendor/assets/stylesheets/styleguide/base/_labels.css.scss +22 -6
  146. data/vendor/assets/stylesheets/styleguide/base/_lists.css.scss +23 -18
  147. data/vendor/assets/stylesheets/styleguide/base/_type.css.scss +11 -5
  148. data/vendor/assets/stylesheets/styleguide/grid/_grid.css.scss +9 -9
  149. data/vendor/assets/stylesheets/styleguide/modules/_switch.css.scss +32 -16
  150. metadata +134 -18
  151. data/.rvmrc +0 -1
  152. data/app/helpers/application_helper.rb +0 -13
  153. data/app/helpers/javascripts_helper.rb +0 -2
  154. data/app/helpers/ui_helper.rb +0 -2
  155. data/app/mailers/.gitkeep +0 -0
  156. data/app/models/.gitkeep +0 -0
  157. data/app/views/javascripts/_js_nav.html.haml +0 -5
  158. data/app/views/javascripts/index.html.haml +0 -45
  159. data/app/views/type/_headings.haml +0 -6
  160. data/app/views/type/_paragraphs.haml +0 -4
  161. data/app/views/ui/_ui_nav.html.haml +0 -13
  162. data/vendor/assets/stylesheets/styleguide/layout/_all.css.scss +0 -5
  163. data/vendor/plugins/.gitkeep +0 -0
@@ -0,0 +1,225 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset='UTF-8'>
5
+ <title>Codo Documentation</title>
6
+ <link rel='stylesheet' href='../assets/codo.css' type='text/css'>
7
+ <script src='../assets/codo.js'></script>
8
+ <script src='../assets/search_data.js'></script>
9
+ </head>
10
+ <body>
11
+ <div id='base' data-path='../'></div>
12
+ <div id='header'>
13
+ <div id='menu'>
14
+ <a href='../README.md.html' title='Codo'>Codo</a>
15
+ &raquo;
16
+ <a href='../class_index.html' title='Index'>Index</a>
17
+ &raquo;
18
+ <span class='title'>ResizeHandler</span>
19
+ <nav>
20
+ <ul>
21
+ <li class='noframes'>
22
+ (<a class='noframes' href='#'>no frames</a>)
23
+ </li>
24
+ </ul>
25
+ </nav>
26
+ <div id='search'>
27
+ <a id='class_list_link' href='../class_list.html'>Classes</a>
28
+ <a id='file_list_link' href='../file_list.html'>Files</a>
29
+ <a id='method_list_link' href='../method_list.html'>Methods</a>
30
+ <a id='extra_list_link' href='../extra_list.html'>Extras</a>
31
+ </div>
32
+ </div>
33
+ <iframe id='search_frame'></iframe>
34
+ <div id='fuzzySearch'>
35
+ <input type='text'>
36
+ <ol></ol>
37
+ </div>
38
+ <div id='help'>
39
+ <p>
40
+ Quickly fuzzy find classes, mixins, methods, file:
41
+ </p>
42
+ <ul>
43
+ <li>
44
+ <span>Ctrl-T</span>
45
+ Open fuzzy finder dialog
46
+ </li>
47
+ </ul>
48
+ <p>
49
+ In frame mode you can toggle the list naviation frame on the left side:
50
+ </p>
51
+ <ul>
52
+ <li>
53
+ <span>Ctrl-L</span>
54
+ Toggle list view
55
+ </li>
56
+ </ul>
57
+ <p>
58
+ You can focus a list in frame mode or toggle a tab in frameless mode:
59
+ </p>
60
+ <ul>
61
+ <li>
62
+ <span>Ctrl-C</span>
63
+ Class list
64
+ </li>
65
+ <li>
66
+ <span>Ctrl-I</span>
67
+ Mixin list
68
+ </li>
69
+ <li>
70
+ <span>Ctrl-F</span>
71
+ File list
72
+ </li>
73
+ <li>
74
+ <span>Ctrl-M</span>
75
+ Method list
76
+ </li>
77
+ <li>
78
+ <span>Ctrl-E</span>
79
+ Extras list
80
+ </li>
81
+ </ul>
82
+ <p>
83
+ You can focus and blur the search input:
84
+ </p>
85
+ <ul>
86
+ <li>
87
+ <span>Ctrl-S</span>
88
+ Focus search input
89
+ </li>
90
+ <li>
91
+ <span>Esc</span>
92
+ Blur search input
93
+ </li>
94
+ </ul>
95
+ <p>
96
+ In frameless mode you can close the list tab:
97
+ </p>
98
+ <ul>
99
+ <li>
100
+ <span>Esc</span>
101
+ Close list tab
102
+ </li>
103
+ </ul>
104
+ </div>
105
+ </div>
106
+ <div id='content'>
107
+ <h1>
108
+ Class:
109
+ ResizeHandler
110
+ </h1>
111
+ <table class='box'>
112
+ <tr>
113
+ <td>Defined in:</td>
114
+ <td>vendor&#47;assets&#47;javascripts&#47;styleguide&#47;plugins&#47;tbg-respinsiveresize.js.coffee</td>
115
+ </tr>
116
+ </table>
117
+ <h2>Overview</h2>
118
+ <div class='docstring'>
119
+ <p>RESIZEHANDLER CLASS DEFINITION</p>
120
+ <div class='examples'>
121
+ <h3>Examples:</h3>
122
+ <h4>
123
+ How to use the class
124
+ </h4>
125
+ <pre><code class='coffee'>resizeHandlerInstance = new ResizeHandler()</code></pre>
126
+ </div>
127
+ </div>
128
+ <div class='tags'>
129
+ </div>
130
+ <h2>Instance Method Summary</h2>
131
+ <ul class='summary'>
132
+ <li>
133
+ <span class='signature'>
134
+ <a href='#constructor-instance'>
135
+ - (void) <strong>constructor</strong>()
136
+ </a>
137
+ </span>
138
+ <span class='constructor note title'>Constructor</span>
139
+ <span class='desc'>
140
+ Construct a new ResizeHandler instance Create resizeEvent method to trigger &#39;responsiveResize&#39; event with current size
141
+ </span>
142
+ </li>
143
+ <li>
144
+ <span class='signature'>
145
+ <a href='#resize-instance'>
146
+ - (void) <strong>resize</strong>()
147
+ </a>
148
+ </span>
149
+ <span class='desc'>
150
+ Set a timeout to call resizeEvent after 100ms, clearing existing timeout if one set
151
+ </span>
152
+ </li>
153
+ <li>
154
+ <span class='signature'>
155
+ <a href='#size-instance'>
156
+ - (String) <strong>size</strong>()
157
+ </a>
158
+ </span>
159
+ <span class='desc'>
160
+ Get a string representation of grid name Grid name set in CSS content on body::after pseudo-element
161
+ </span>
162
+ </li>
163
+ </ul>
164
+ <h2>Constructor Details</h2>
165
+ <div class='methods'>
166
+ <div class='method_details'>
167
+ <p class='signature' id='constructor-instance'>
168
+ - (void) <strong>constructor</strong>()
169
+ </p>
170
+ <div class='docstring'>
171
+ <p>Construct a new ResizeHandler instance</p><p>Create resizeEvent method to trigger &#39;responsiveResize&#39; event with current size</p>
172
+ </div>
173
+ <div class='tags'>
174
+ </div>
175
+ </div>
176
+ </div>
177
+ <h2>Instance Method Details</h2>
178
+ <div class='methods'>
179
+ <div class='method_details'>
180
+ <p class='signature' id='resize-instance'>
181
+ - (void) <strong>resize</strong>()
182
+ </p>
183
+ <div class='docstring'>
184
+ <p>Set a timeout to call resizeEvent after 100ms, clearing existing timeout if one set</p>
185
+ </div>
186
+ <div class='tags'>
187
+ </div>
188
+ </div>
189
+ <div class='method_details'>
190
+ <p class='signature' id='size-instance'>
191
+ - (String) <strong>size</strong>()
192
+ </p>
193
+ <div class='docstring'>
194
+ <p>Get a string representation of grid name</p><p>Grid name set in CSS content on body::after pseudo-element</p>
195
+ </div>
196
+ <div class='tags'>
197
+ <h3>Returns:</h3>
198
+ <ul class='return'>
199
+ <li>
200
+ <span class='type'></span>
201
+ (<tt>String</tt>)
202
+ &mdash;
203
+ <span class='desc'>Grid name if available or empty string</span>
204
+ </li>
205
+ </ul>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ </div>
210
+ <div id='footer'>
211
+ Generated on
212
+ Thu Mar 14 2013 13:49:05 GMT+0000 (GMT)
213
+ by
214
+ <a href='https://github.com/netzpirat/codo' title='CoffeeScript API documentation generator'>Codo</a>
215
+ v1.5.6
216
+ (Node.js v0.8.8).
217
+ &#10034;
218
+ Press Ctrl-h to see the keyboard shortcuts
219
+ &#10034;
220
+ <a href='http://twitter.com/#!/netzpirat'>@netzpirat</a>
221
+ &#10034;
222
+ <a href='https://mksoft.ch'>mksoft.ch</a>
223
+ </div>
224
+ </body>
225
+ </html>
@@ -0,0 +1,318 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset='UTF-8'>
5
+ <title>Codo Documentation</title>
6
+ <link rel='stylesheet' href='../assets/codo.css' type='text/css'>
7
+ <script src='../assets/codo.js'></script>
8
+ <script src='../assets/search_data.js'></script>
9
+ </head>
10
+ <body>
11
+ <div id='base' data-path='../'></div>
12
+ <div id='header'>
13
+ <div id='menu'>
14
+ <a href='../README.md.html' title='Codo'>Codo</a>
15
+ &raquo;
16
+ <a href='../class_index.html' title='Index'>Index</a>
17
+ &raquo;
18
+ <span class='title'>Switch</span>
19
+ <nav>
20
+ <ul>
21
+ <li class='noframes'>
22
+ (<a class='noframes' href='#'>no frames</a>)
23
+ </li>
24
+ </ul>
25
+ </nav>
26
+ <div id='search'>
27
+ <a id='class_list_link' href='../class_list.html'>Classes</a>
28
+ <a id='file_list_link' href='../file_list.html'>Files</a>
29
+ <a id='method_list_link' href='../method_list.html'>Methods</a>
30
+ <a id='extra_list_link' href='../extra_list.html'>Extras</a>
31
+ </div>
32
+ </div>
33
+ <iframe id='search_frame'></iframe>
34
+ <div id='fuzzySearch'>
35
+ <input type='text'>
36
+ <ol></ol>
37
+ </div>
38
+ <div id='help'>
39
+ <p>
40
+ Quickly fuzzy find classes, mixins, methods, file:
41
+ </p>
42
+ <ul>
43
+ <li>
44
+ <span>Ctrl-T</span>
45
+ Open fuzzy finder dialog
46
+ </li>
47
+ </ul>
48
+ <p>
49
+ In frame mode you can toggle the list naviation frame on the left side:
50
+ </p>
51
+ <ul>
52
+ <li>
53
+ <span>Ctrl-L</span>
54
+ Toggle list view
55
+ </li>
56
+ </ul>
57
+ <p>
58
+ You can focus a list in frame mode or toggle a tab in frameless mode:
59
+ </p>
60
+ <ul>
61
+ <li>
62
+ <span>Ctrl-C</span>
63
+ Class list
64
+ </li>
65
+ <li>
66
+ <span>Ctrl-I</span>
67
+ Mixin list
68
+ </li>
69
+ <li>
70
+ <span>Ctrl-F</span>
71
+ File list
72
+ </li>
73
+ <li>
74
+ <span>Ctrl-M</span>
75
+ Method list
76
+ </li>
77
+ <li>
78
+ <span>Ctrl-E</span>
79
+ Extras list
80
+ </li>
81
+ </ul>
82
+ <p>
83
+ You can focus and blur the search input:
84
+ </p>
85
+ <ul>
86
+ <li>
87
+ <span>Ctrl-S</span>
88
+ Focus search input
89
+ </li>
90
+ <li>
91
+ <span>Esc</span>
92
+ Blur search input
93
+ </li>
94
+ </ul>
95
+ <p>
96
+ In frameless mode you can close the list tab:
97
+ </p>
98
+ <ul>
99
+ <li>
100
+ <span>Esc</span>
101
+ Close list tab
102
+ </li>
103
+ </ul>
104
+ </div>
105
+ </div>
106
+ <div id='content'>
107
+ <h1>
108
+ Class:
109
+ Switch
110
+ </h1>
111
+ <table class='box'>
112
+ <tr>
113
+ <td>Defined in:</td>
114
+ <td>vendor&#47;assets&#47;javascripts&#47;styleguide&#47;plugins&#47;tbg-switch.js.coffee</td>
115
+ </tr>
116
+ </table>
117
+ <h2>Overview</h2>
118
+ <div class='docstring'>
119
+ <p>SWITCH CLASS DEFINITION</p>
120
+ <div class='examples'>
121
+ <h3>Examples:</h3>
122
+ <h4>
123
+ How to ensure plugin self initialises on element
124
+ </h4>
125
+ <pre><code class='coffee'>&lt;div data-switch=&quot;true&quot;&gt; ... &lt;&#47;div&gt;</code></pre>
126
+ <h4>
127
+ How to group switches and allow them to change state of other switches in that group
128
+ </h4>
129
+ <pre><code class='coffee'>&lt;div data-switch-group=&quot;[group name]&quot;&gt; ... &lt;&#47;div&gt;</code></pre>
130
+ <h4>
131
+ How to toggle switch state
132
+ </h4>
133
+ <pre><code class='coffee'>&lt;div data-switch-toggle=&quot;true&quot;&gt; ... &lt;&#47;div&gt;</code></pre>
134
+ </div>
135
+ </div>
136
+ <div class='tags'>
137
+ </div>
138
+ <h2>Instance Method Summary</h2>
139
+ <ul class='summary'>
140
+ <li>
141
+ <span class='signature'>
142
+ <a href='#constructor-instance'>
143
+ - (void) <strong>constructor</strong>(el)
144
+ </a>
145
+ </span>
146
+ <span class='constructor note title'>Constructor</span>
147
+ <span class='desc'>
148
+ Construct a new Switch instance Set this.parent, this.target, this.group and this.container elements for this.el; set this.toggle if attribute present
149
+ </span>
150
+ </li>
151
+ <li>
152
+ <span class='signature'>
153
+ <a href='#click-instance'>
154
+ - (void) <strong>click</strong>()
155
+ </a>
156
+ </span>
157
+ <span class='desc'>
158
+ Click handler - If this.parent isn&#39;t active, close group if this.group defined and change state to true; if this.parent is active and this.toggle set then change state to false otherwise return undefined
159
+ </span>
160
+ </li>
161
+ <li>
162
+ <span class='signature'>
163
+ <a href='#changeStateTo-instance'>
164
+ - (void) <strong>changeStateTo</strong>(action, elements)
165
+ </a>
166
+ </span>
167
+ <span class='desc'>
168
+ Change active state of target content - add or remove activeClass from content and parent elements
169
+ </span>
170
+ </li>
171
+ <li>
172
+ <span class='signature'>
173
+ <a href='#_closeGroup-instance'>
174
+ - (void) <strong>_closeGroup</strong>()
175
+ </a>
176
+ </span>
177
+ <span class='note private title'>Private</span>
178
+ <span class='desc'>
179
+ Close group - if any content is active, get the target for that element&#39;s descendant link element and pass false and elements array [activeContent, activeEl] to switch group
180
+ </span>
181
+ </li>
182
+ <li>
183
+ <span class='signature'>
184
+ <a href='#_getContent-instance'>
185
+ - (Object) <strong>_getContent</strong>(el)
186
+ </a>
187
+ </span>
188
+ <span class='note private title'>Private</span>
189
+ <span class='desc'>
190
+ Get target element to do switch on
191
+ </span>
192
+ </li>
193
+ </ul>
194
+ <h2>Constructor Details</h2>
195
+ <div class='methods'>
196
+ <div class='method_details'>
197
+ <p class='signature' id='constructor-instance'>
198
+ - (void) <strong>constructor</strong>(el)
199
+ </p>
200
+ <div class='docstring'>
201
+ <p>Construct a new Switch instance</p><p>Set this.parent, this.target, this.group and this.container elements for this.el; set this.toggle if attribute present</p>
202
+ </div>
203
+ <div class='tags'>
204
+ <h3>Parameters:</h3>
205
+ <ul class='param'>
206
+ <li>
207
+ <span class='name'>el</span>
208
+ <span class='type'>
209
+ (<tt>Object</tt>)
210
+ </span>
211
+ &mdash;
212
+ <span class='desc'>HTMLElement, this.el, that acts as the switch</span>
213
+ </li>
214
+ </ul>
215
+ </div>
216
+ </div>
217
+ </div>
218
+ <h2>Instance Method Details</h2>
219
+ <div class='methods'>
220
+ <div class='method_details'>
221
+ <p class='signature' id='click-instance'>
222
+ - (void) <strong>click</strong>()
223
+ </p>
224
+ <div class='docstring'>
225
+ <p>Click handler - If this.parent isn&#39;t active, close group if this.group defined and change state to true; if this.parent is active and this.toggle set then change state to false otherwise return undefined</p>
226
+ </div>
227
+ <div class='tags'>
228
+ </div>
229
+ </div>
230
+ <div class='method_details'>
231
+ <p class='signature' id='changeStateTo-instance'>
232
+ - (void) <strong>changeStateTo</strong>(action, elements)
233
+ </p>
234
+ <div class='docstring'>
235
+ <p>Change active state of target content - add or remove activeClass from content and parent elements</p>
236
+ </div>
237
+ <div class='tags'>
238
+ <h3>Parameters:</h3>
239
+ <ul class='param'>
240
+ <li>
241
+ <span class='name'>action</span>
242
+ <span class='type'>
243
+ (<tt>Boolean</tt>)
244
+ </span>
245
+ &mdash;
246
+ <span class='desc'>true to addClass to elements, false to removeClass from elements</span>
247
+ </li>
248
+ <li>
249
+ <span class='name'>elements</span>
250
+ <span class='type'>
251
+ (<tt>Array</tt>)
252
+ </span>
253
+ &mdash;
254
+ <span class='desc'>array of jQuery wrapped HTMLElements - target content element and parent element</span>
255
+ </li>
256
+ </ul>
257
+ </div>
258
+ </div>
259
+ <div class='method_details'>
260
+ <p class='signature' id='_closeGroup-instance'>
261
+ - (void) <strong>_closeGroup</strong>()
262
+ (private)
263
+ </p>
264
+ <div class='docstring'>
265
+ <p>Close group - if any content is active, get the target for that element&#39;s descendant link element and pass false and elements array [activeContent, activeEl] to switch group</p>
266
+ </div>
267
+ <div class='tags'>
268
+ </div>
269
+ </div>
270
+ <div class='method_details'>
271
+ <p class='signature' id='_getContent-instance'>
272
+ - (Object) <strong>_getContent</strong>(el)
273
+ (private)
274
+ </p>
275
+ <div class='docstring'>
276
+ <p>Get target element to do switch on</p>
277
+ </div>
278
+ <div class='tags'>
279
+ <h3>Parameters:</h3>
280
+ <ul class='param'>
281
+ <li>
282
+ <span class='name'>el</span>
283
+ <span class='type'>
284
+ (<tt>Object</tt>)
285
+ </span>
286
+ &mdash;
287
+ <span class='desc'>jQuery wrapped HTMLElement to get target element from</span>
288
+ </li>
289
+ </ul>
290
+ <h3>Returns:</h3>
291
+ <ul class='return'>
292
+ <li>
293
+ <span class='type'></span>
294
+ (<tt>Object</tt>)
295
+ &mdash;
296
+ <span class='desc'>jQuery wrapped HTMLElement for el&#39;s target element</span>
297
+ </li>
298
+ </ul>
299
+ </div>
300
+ </div>
301
+ </div>
302
+ </div>
303
+ <div id='footer'>
304
+ Generated on
305
+ Thu Mar 14 2013 13:49:05 GMT+0000 (GMT)
306
+ by
307
+ <a href='https://github.com/netzpirat/codo' title='CoffeeScript API documentation generator'>Codo</a>
308
+ v1.5.6
309
+ (Node.js v0.8.8).
310
+ &#10034;
311
+ Press Ctrl-h to see the keyboard shortcuts
312
+ &#10034;
313
+ <a href='http://twitter.com/#!/netzpirat'>@netzpirat</a>
314
+ &#10034;
315
+ <a href='https://mksoft.ch'>mksoft.ch</a>
316
+ </div>
317
+ </body>
318
+ </html>