yamlcss 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +12 -0
  3. data/Gemfile +10 -0
  4. data/Gemfile.lock +56 -0
  5. data/LICENSE.txt +59 -0
  6. data/Rakefile +23 -0
  7. data/Readme.md +120 -0
  8. data/VERSIONS.md +5 -0
  9. data/bin/yamlcss +6 -0
  10. data/lib/yamlcss.rb +22 -0
  11. data/lib/yamlcss/engine.rb +7 -0
  12. data/lib/yamlcss/generator.rb +84 -0
  13. data/lib/yamlcss/version.rb +4 -0
  14. data/vendor/assets/stylesheets/_iehacks.scss +3 -0
  15. data/vendor/assets/stylesheets/_yaml.scss +3 -0
  16. data/yaml/Gruntfile.js +199 -0
  17. data/yaml/License.txt +36 -0
  18. data/yaml/Readme.md +64 -0
  19. data/yaml/changelog.md +307 -0
  20. data/yaml/config.rb +25 -0
  21. data/yaml/demos/css/custom-grids.css +27 -0
  22. data/yaml/demos/css/flexible-columns.css +26 -0
  23. data/yaml/demos/css/flexible-grids.css +26 -0
  24. data/yaml/demos/css/rtl-support.css +31 -0
  25. data/yaml/demos/css/screen/screen-custom-grids.css +41 -0
  26. data/yaml/demos/css/screen/screen-rtl-support.css +182 -0
  27. data/yaml/demos/custom-grid.html +129 -0
  28. data/yaml/demos/flexible-columns.html +124 -0
  29. data/yaml/demos/flexible-grid.html +142 -0
  30. data/yaml/demos/rtl-support.html +127 -0
  31. data/yaml/docs/assets/css/icons/external_link.png +0 -0
  32. data/yaml/docs/assets/css/icons/hcalendar.png +0 -0
  33. data/yaml/docs/assets/css/icons/hcard.png +0 -0
  34. data/yaml/docs/assets/css/icons/icon-geo.png +0 -0
  35. data/yaml/docs/assets/css/icons/icon-hatom.png +0 -0
  36. data/yaml/docs/assets/css/icons/icon-haudio.png +0 -0
  37. data/yaml/docs/assets/css/icons/icon-hcalendar-add.png +0 -0
  38. data/yaml/docs/assets/css/icons/icon-hcalendar-download.png +0 -0
  39. data/yaml/docs/assets/css/icons/icon-hcalendar.png +0 -0
  40. data/yaml/docs/assets/css/icons/icon-hcard-add.png +0 -0
  41. data/yaml/docs/assets/css/icons/icon-hcard-download.png +0 -0
  42. data/yaml/docs/assets/css/icons/icon-hcard.png +0 -0
  43. data/yaml/docs/assets/css/icons/icon-hresume.png +0 -0
  44. data/yaml/docs/assets/css/icons/icon-rel-tag.png +0 -0
  45. data/yaml/docs/assets/css/icons/icon-xfn.png +0 -0
  46. data/yaml/docs/assets/css/icons/xfn/xfn-child.png +0 -0
  47. data/yaml/docs/assets/css/icons/xfn/xfn-colleague-met.png +0 -0
  48. data/yaml/docs/assets/css/icons/xfn/xfn-colleague.png +0 -0
  49. data/yaml/docs/assets/css/icons/xfn/xfn-friend-met.png +0 -0
  50. data/yaml/docs/assets/css/icons/xfn/xfn-friend.png +0 -0
  51. data/yaml/docs/assets/css/icons/xfn/xfn-me.png +0 -0
  52. data/yaml/docs/assets/css/icons/xfn/xfn-parent.png +0 -0
  53. data/yaml/docs/assets/css/icons/xfn/xfn-small.png +0 -0
  54. data/yaml/docs/assets/css/icons/xfn/xfn-spouse.png +0 -0
  55. data/yaml/docs/assets/css/icons/xfn/xfn-sweetheart-met.png +0 -0
  56. data/yaml/docs/assets/css/icons/xfn/xfn-sweetheart.png +0 -0
  57. data/yaml/docs/assets/css/layout-min.css +3 -0
  58. data/yaml/docs/assets/css/layout.css +3262 -0
  59. data/yaml/docs/assets/images/demo-custom-grid.png +0 -0
  60. data/yaml/docs/assets/images/demo-flex-column.png +0 -0
  61. data/yaml/docs/assets/images/demo-flex-grid.png +0 -0
  62. data/yaml/docs/assets/images/demo-rtl.png +0 -0
  63. data/yaml/docs/assets/images/yaml-solo-transparent-small.png +0 -0
  64. data/yaml/docs/assets/images/yaml-solo-transparent.png +0 -0
  65. data/yaml/docs/assets/js/domscript.js +209 -0
  66. data/yaml/docs/assets/js/jquery.gridbuilder.js +131 -0
  67. data/yaml/docs/assets/js/snippet/ZeroClipboard.swf +0 -0
  68. data/yaml/docs/assets/js/snippet/jquery.snippet.css +116 -0
  69. data/yaml/docs/assets/js/snippet/jquery.snippet.js +782 -0
  70. data/yaml/docs/assets/js/snippet/jquery.snippet.min.css +40 -0
  71. data/yaml/docs/assets/js/snippet/jquery.snippet.min.js +12 -0
  72. data/yaml/docs/assets/js/snippet/snippet.css +296 -0
  73. data/yaml/docs/index.html +3845 -0
  74. data/yaml/lib/html5shiv/html5shiv-printshiv.js +11 -0
  75. data/yaml/lib/html5shiv/html5shiv.js +8 -0
  76. data/yaml/lib/jquery-1.10.1.min.js +6 -0
  77. data/yaml/lib/jquery-migrate-1.2.1.min.js +2 -0
  78. data/yaml/package.json +20 -0
  79. data/yaml/sass/docs/assets/css/_screen.scss +786 -0
  80. data/yaml/sass/docs/assets/css/layout.scss +28 -0
  81. data/yaml/sass/static-build/add-ons/accessible-tabs/tabs.scss +15 -0
  82. data/yaml/sass/static-build/add-ons/microformats/microformats.scss +18 -0
  83. data/yaml/sass/static-build/add-ons/rtl-support/core/base-rtl.scss +20 -0
  84. data/yaml/sass/static-build/add-ons/rtl-support/forms/gray-theme-rtl.scss +16 -0
  85. data/yaml/sass/static-build/add-ons/rtl-support/navigation/hlist-rtl.scss +18 -0
  86. data/yaml/sass/static-build/add-ons/rtl-support/navigation/vlist-rtl.scss +18 -0
  87. data/yaml/sass/static-build/add-ons/rtl-support/screen/typography-rtl.scss +16 -0
  88. data/yaml/sass/static-build/core/base.scss +19 -0
  89. data/yaml/sass/static-build/core/iehacks.scss +19 -0
  90. data/yaml/sass/static-build/forms/gray-theme.scss +14 -0
  91. data/yaml/sass/static-build/navigation/hlist.scss +16 -0
  92. data/yaml/sass/static-build/navigation/vlist.scss +16 -0
  93. data/yaml/sass/static-build/print/print.scss +15 -0
  94. data/yaml/sass/static-build/screen/grid-960gs-12.scss +15 -0
  95. data/yaml/sass/static-build/screen/grid-960gs-16.scss +15 -0
  96. data/yaml/sass/static-build/screen/grid-blueprint.scss +15 -0
  97. data/yaml/sass/static-build/screen/grid-fluid-12col.scss +15 -0
  98. data/yaml/sass/static-build/screen/screen-FULLPAGE-layout.scss +15 -0
  99. data/yaml/sass/static-build/screen/screen-PAGE-layout.scss +15 -0
  100. data/yaml/sass/static-build/screen/typography.scss +16 -0
  101. data/yaml/sass/yaml-sass/_yaml-var-globals.scss +39 -0
  102. data/yaml/sass/yaml-sass/_yaml-var-typography.scss +80 -0
  103. data/yaml/sass/yaml-sass/add-ons/accessible-tabs/_tabs.scss +139 -0
  104. data/yaml/sass/yaml-sass/add-ons/accessible-tabs/jquery.tabs.js +266 -0
  105. data/yaml/sass/yaml-sass/add-ons/microformats/_microformats.scss +179 -0
  106. data/yaml/sass/yaml-sass/add-ons/microformats/icons/external_link.png +0 -0
  107. data/yaml/sass/yaml-sass/add-ons/microformats/icons/hcalendar.png +0 -0
  108. data/yaml/sass/yaml-sass/add-ons/microformats/icons/hcard.png +0 -0
  109. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-geo.png +0 -0
  110. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hatom.png +0 -0
  111. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-haudio.png +0 -0
  112. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcalendar-add.png +0 -0
  113. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcalendar-download.png +0 -0
  114. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcalendar.png +0 -0
  115. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcard-add.png +0 -0
  116. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcard-download.png +0 -0
  117. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcard.png +0 -0
  118. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hresume.png +0 -0
  119. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-rel-tag.png +0 -0
  120. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-xfn.png +0 -0
  121. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-child.png +0 -0
  122. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-colleague-met.png +0 -0
  123. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-colleague.png +0 -0
  124. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-friend-met.png +0 -0
  125. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-friend.png +0 -0
  126. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-me.png +0 -0
  127. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-parent.png +0 -0
  128. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-small.png +0 -0
  129. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-spouse.png +0 -0
  130. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-sweetheart-met.png +0 -0
  131. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-sweetheart.png +0 -0
  132. data/yaml/sass/yaml-sass/add-ons/rtl-support/core/_base-rtl.scss +177 -0
  133. data/yaml/sass/yaml-sass/add-ons/rtl-support/forms/_gray-theme-rtl.scss +34 -0
  134. data/yaml/sass/yaml-sass/add-ons/rtl-support/navigation/_hlist-rtl.scss +42 -0
  135. data/yaml/sass/yaml-sass/add-ons/rtl-support/navigation/_vlist-rtl.scss +45 -0
  136. data/yaml/sass/yaml-sass/add-ons/rtl-support/screen/_typography-rtl.scss +30 -0
  137. data/yaml/sass/yaml-sass/add-ons/syncheight/jquery.syncheight.js +112 -0
  138. data/yaml/sass/yaml-sass/core/_base.scss +15 -0
  139. data/yaml/sass/yaml-sass/core/_iehacks.scss +426 -0
  140. data/yaml/sass/yaml-sass/core/base-modules/_accessibility.scss +48 -0
  141. data/yaml/sass/yaml-sass/core/base-modules/_columns.scss +27 -0
  142. data/yaml/sass/yaml-sass/core/base-modules/_float-handling.scss +32 -0
  143. data/yaml/sass/yaml-sass/core/base-modules/_forms-core.scss +296 -0
  144. data/yaml/sass/yaml-sass/core/base-modules/_grids-core.scss +55 -0
  145. data/yaml/sass/yaml-sass/core/base-modules/_normalization.scss +165 -0
  146. data/yaml/sass/yaml-sass/core/base-modules/_print-core.scss +36 -0
  147. data/yaml/sass/yaml-sass/core/js/yaml-focusfix.js +70 -0
  148. data/yaml/sass/yaml-sass/forms/_gray-theme.scss +475 -0
  149. data/yaml/sass/yaml-sass/mixins/_yaml-mixins-core.scss +248 -0
  150. data/yaml/sass/yaml-sass/navigation/_hlist.scss +106 -0
  151. data/yaml/sass/yaml-sass/navigation/_vlist.scss +129 -0
  152. data/yaml/sass/yaml-sass/print/_print.scss +61 -0
  153. data/yaml/sass/yaml-sass/screen/_grid-960gs-12.scss +4 -0
  154. data/yaml/sass/yaml-sass/screen/_grid-960gs-16.scss +4 -0
  155. data/yaml/sass/yaml-sass/screen/_grid-blueprint.scss +4 -0
  156. data/yaml/sass/yaml-sass/screen/_grid-fluid-12col.scss +4 -0
  157. data/yaml/sass/yaml-sass/screen/_screen-FULLPAGE-layout.scss +171 -0
  158. data/yaml/sass/yaml-sass/screen/_screen-PAGE-layout.scss +165 -0
  159. data/yaml/sass/yaml-sass/screen/_typography.scss +485 -0
  160. data/yaml/yaml/add-ons/accessible-tabs/jquery.tabs.js +266 -0
  161. data/yaml/yaml/add-ons/accessible-tabs/tabs.css +136 -0
  162. data/yaml/yaml/add-ons/microformats/icons/external_link.png +0 -0
  163. data/yaml/yaml/add-ons/microformats/icons/hcalendar.png +0 -0
  164. data/yaml/yaml/add-ons/microformats/icons/hcard.png +0 -0
  165. data/yaml/yaml/add-ons/microformats/icons/icon-geo.png +0 -0
  166. data/yaml/yaml/add-ons/microformats/icons/icon-hatom.png +0 -0
  167. data/yaml/yaml/add-ons/microformats/icons/icon-haudio.png +0 -0
  168. data/yaml/yaml/add-ons/microformats/icons/icon-hcalendar-add.png +0 -0
  169. data/yaml/yaml/add-ons/microformats/icons/icon-hcalendar-download.png +0 -0
  170. data/yaml/yaml/add-ons/microformats/icons/icon-hcalendar.png +0 -0
  171. data/yaml/yaml/add-ons/microformats/icons/icon-hcard-add.png +0 -0
  172. data/yaml/yaml/add-ons/microformats/icons/icon-hcard-download.png +0 -0
  173. data/yaml/yaml/add-ons/microformats/icons/icon-hcard.png +0 -0
  174. data/yaml/yaml/add-ons/microformats/icons/icon-hresume.png +0 -0
  175. data/yaml/yaml/add-ons/microformats/icons/icon-rel-tag.png +0 -0
  176. data/yaml/yaml/add-ons/microformats/icons/icon-xfn.png +0 -0
  177. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-child.png +0 -0
  178. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-colleague-met.png +0 -0
  179. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-colleague.png +0 -0
  180. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-friend-met.png +0 -0
  181. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-friend.png +0 -0
  182. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-me.png +0 -0
  183. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-parent.png +0 -0
  184. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-small.png +0 -0
  185. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-spouse.png +0 -0
  186. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-sweetheart-met.png +0 -0
  187. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-sweetheart.png +0 -0
  188. data/yaml/yaml/add-ons/microformats/microformats.css +167 -0
  189. data/yaml/yaml/add-ons/rtl-support/core/base-rtl.css +167 -0
  190. data/yaml/yaml/add-ons/rtl-support/core/base-rtl.min.css +3 -0
  191. data/yaml/yaml/add-ons/rtl-support/forms/gray-theme-rtl.css +44 -0
  192. data/yaml/yaml/add-ons/rtl-support/navigation/hlist-rtl.css +48 -0
  193. data/yaml/yaml/add-ons/rtl-support/navigation/vlist-rtl.css +54 -0
  194. data/yaml/yaml/add-ons/rtl-support/screen/typography-rtl.css +38 -0
  195. data/yaml/yaml/add-ons/syncheight/jquery.syncheight.js +112 -0
  196. data/yaml/yaml/core/base.css +705 -0
  197. data/yaml/yaml/core/base.min.css +3 -0
  198. data/yaml/yaml/core/iehacks.css +468 -0
  199. data/yaml/yaml/core/iehacks.min.css +3 -0
  200. data/yaml/yaml/core/js/yaml-focusfix.js +70 -0
  201. data/yaml/yaml/forms/gray-theme.css +676 -0
  202. data/yaml/yaml/navigation/hlist.css +109 -0
  203. data/yaml/yaml/navigation/vlist.css +144 -0
  204. data/yaml/yaml/print/print.css +42 -0
  205. data/yaml/yaml/screen/grid-960gs-12.css +164 -0
  206. data/yaml/yaml/screen/grid-960gs-16.css +212 -0
  207. data/yaml/yaml/screen/grid-blueprint.css +308 -0
  208. data/yaml/yaml/screen/grid-fluid-12col.css +164 -0
  209. data/yaml/yaml/screen/screen-FULLPAGE-layout.css +184 -0
  210. data/yaml/yaml/screen/screen-PAGE-layout.css +196 -0
  211. data/yaml/yaml/screen/typography.css +486 -0
  212. data/yamlcss.gemspec +30 -0
  213. metadata +314 -0
@@ -0,0 +1,266 @@
1
+ /**
2
+ * Accessible Tabs - jQuery plugin for accessible, unobtrusive tabs
3
+ * Build to seemlessly work with the CCS-Framework YAML (yaml.de) not depending on YAML though
4
+ * @requires jQuery - tested with 1.9.1, 1.7 and 1.4.2 but might as well work with older versions
5
+ *
6
+ * english article: http://blog.ginader.de/archives/2009/02/07/jQuery-Accessible-Tabs-How-to-make-tabs-REALLY-accessible.php
7
+ * german article: http://blog.ginader.de/archives/2009/02/07/jQuery-Accessible-Tabs-Wie-man-Tabs-WIRKLICH-zugaenglich-macht.php
8
+ *
9
+ * code: http://github.com/ginader/Accessible-Tabs
10
+ * please report issues at: http://github.com/ginader/Accessible-Tabs/issues
11
+ *
12
+ * Copyright (c) 2007 Dirk Ginader (ginader.de)
13
+ * Dual licensed under the MIT and GPL licenses:
14
+ * http://www.opensource.org/licenses/mit-license.php
15
+ * http://www.gnu.org/licenses/gpl.html
16
+ *
17
+ */
18
+
19
+ (function($) {
20
+ var debugMode = true;
21
+ $.fn.extend({
22
+ // We assume there could be multiple sets of tabs on a page, so,
23
+ // the unique id for each invididual tab's heading is identified with params q and r (e.g., id="accessibletabscontent0-2")
24
+ getUniqueId: function(p, q, r){
25
+ if (r===undefined) {r='';} else {r='-'+r;}
26
+ return p + q + r;
27
+ },
28
+ accessibleTabs: function(config) {
29
+ var defaults = {
30
+ wrapperClass: 'content', // Classname to apply to the div that is wrapped around the original Markup
31
+ currentClass: 'current', // Classname to apply to the LI of the selected Tab
32
+ tabhead: 'h4', // Tag or valid Query Selector of the Elements to Transform the Tabs-Navigation from (originals are removed)
33
+ tabheadClass: 'tabhead', // Classname to apply to the target heading element for each tab div
34
+ tabbody: '.tabbody', // Tag or valid Query Selector of the Elements to be treated as the Tab Body
35
+ fx:'show', // can be "fadeIn", "slideDown", "show"
36
+ fxspeed: 'normal', // speed (String|Number): "slow", "normal", or "fast") or the number of milliseconds to run the animation
37
+ currentInfoText: 'current tab: ', // text to indicate for screenreaders which tab is the current one
38
+ currentInfoPosition: 'prepend', // Definition where to insert the Info Text. Can be either "prepend" or "append"
39
+ currentInfoClass: 'current-info', // Class to apply to the span wrapping the CurrentInfoText
40
+ tabsListClass:'tabs-list', // Class to apply to the generated list of tabs above the content
41
+ syncheights:false, // syncs the heights of the tab contents when the SyncHeight plugin is available http://blog.ginader.de/dev/jquery/syncheight/index.php
42
+ syncHeightMethodName:'syncHeight', // set the Method name of the plugin you want to use to sync the tab contents. Defaults to the SyncHeight plugin: http://github.com/ginader/syncHeight
43
+ cssClassAvailable:false, // Enable individual css classes for tabs. Gets the appropriate class name of a tabhead element and apply it to the tab list element. Boolean value
44
+ saveState:false, // save the selected tab into a cookie so it stays selected after a reload. This requires that the wrapping div needs to have an ID (so we know which tab we're saving)
45
+ autoAnchor:false, // will move over any existing id of a headline in tabs markup so it can be linked to it
46
+ pagination:false, // adds buttons to each tab to switch to the next/previous tab
47
+ position:'top', // can be 'top' or 'bottom'. Defines where the tabs list is inserted.
48
+ wrapInnerNavLinks: '', // inner wrap for a-tags in tab navigation. See http://api.jquery.com/wrapInner/ for further informations
49
+ firstNavItemClass: 'first', // Classname of the first list item in the tab navigation
50
+ lastNavItemClass: 'last', // Classname of the last list item in the tab navigation
51
+ clearfixClass: 'clearfix' // Name of the Class that is used to clear/contain floats
52
+ };
53
+ var keyCodes = {
54
+ 37 : -1, //LEFT
55
+ 38 : -1, //UP
56
+ 39 : +1, //RIGHT
57
+ 40 : +1 //DOWN
58
+ };
59
+ var positions = {
60
+ top : 'prepend',
61
+ bottom : 'append'
62
+ };
63
+ this.options = $.extend(defaults, config);
64
+
65
+ var tabsCount = 0;
66
+ if($("body").data('accessibleTabsCount') !== undefined){
67
+ tabsCount = $("body").data('accessibleTabsCount');
68
+ }
69
+ $("body").data('accessibleTabsCount',this.size()+tabsCount);
70
+
71
+ var o = this;
72
+ return this.each(function(t) {
73
+ var el = $(this);
74
+ var list = '';
75
+ var tabCount = 0;
76
+ var ids = [];
77
+
78
+ $(el).wrapInner('<div class="'+o.options.wrapperClass+'"></div>');
79
+
80
+ $(el).find(o.options.tabhead).each(function(i){
81
+ var id = '';
82
+ var elId = $(this).attr('id');
83
+ if(elId){
84
+ // Skip this item if it already exists.
85
+ if(elId.indexOf('accessibletabscontent') === 0) {
86
+ return;
87
+ }
88
+ id =' id="'+elId+'"';
89
+ }
90
+ var tabId = o.getUniqueId('accessibletabscontent', tabsCount+t, i);//get a unique id to assign to this tab's heading
91
+ var navItemId = o.getUniqueId('accessibletabsnavigation', tabsCount+t, i);//get a unique id for this navigation item
92
+ ids.push(tabId);
93
+ if(o.options.cssClassAvailable === true) {
94
+ var cssClass = '';
95
+ if($(this).attr('class')) {
96
+ cssClass = $(this).attr('class');
97
+ cssClass = ' class="'+cssClass+'"';
98
+ }
99
+ list += '<li id="'+navItemId+'"><a'+id+''+cssClass+' href="#'+tabId+'">'+$(this).html()+'</a></li>';
100
+ } else {
101
+ list += '<li id="'+navItemId+'"><a'+id+' href="#'+tabId+'">'+$(this).html()+'</a></li>';
102
+ }
103
+ $(this).attr({"id": tabId, "class": o.options.tabheadClass, "tabindex": "-1"});//assign the unique id and the tabheadClass class name to this tab's heading
104
+ tabCount++;
105
+ });
106
+
107
+ if (o.options.syncheights && $.fn[o.options.syncHeightMethodName]) {
108
+ $(el).find(o.options.tabbody)[o.options.syncHeightMethodName]();
109
+ $(window).resize(function(){
110
+ $(el).find(o.options.tabbody)[o.options.syncHeightMethodName]();
111
+ });
112
+ }
113
+
114
+ // Ensure that the call to setup tabs is re-runnable
115
+ var tabs_selector = '.' + o.options.tabsListClass;
116
+ if(!$(el).find(tabs_selector).length) {
117
+ $(el)[positions[o.options.position]]('<ul class="'+o.options.clearfixClass+' '+o.options.tabsListClass+' tabamount'+tabCount+'"></ul>');
118
+ }
119
+
120
+ $(el).find(tabs_selector).append(list);
121
+
122
+ // initial show first content block and hide the others
123
+ var content = $(el).find(o.options.tabbody);
124
+ if (content.length > 0) {
125
+ $(content).hide();
126
+ $(content[0]).show();
127
+ }
128
+ $(el).find("ul."+o.options.tabsListClass+">li:first").addClass(o.options.currentClass).addClass(o.options.firstNavItemClass)
129
+ .find('a')[o.options.currentInfoPosition]('<span class="'+o.options.currentInfoClass+'">'+o.options.currentInfoText+'</span>')
130
+ .parents("ul."+o.options.tabsListClass).children('li:last').addClass(o.options.lastNavItemClass);
131
+
132
+ if (o.options.wrapInnerNavLinks) {
133
+ $(el).find('ul.'+o.options.tabsListClass+'>li>a').wrapInner(o.options.wrapInnerNavLinks);
134
+ }
135
+
136
+ $(el).find('ul.'+o.options.tabsListClass+'>li>a').each(function(i){
137
+ $(this).click(function(event){
138
+ event.preventDefault();
139
+ el.trigger("showTab.accessibleTabs", [$(event.target)]);
140
+ if(o.options.saveState && $.cookie){
141
+ $.cookie('accessibletab_'+el.attr('id')+'_active',i);
142
+ }
143
+ $(el).find('ul.'+o.options.tabsListClass+'>li.'+o.options.currentClass).removeClass(o.options.currentClass)
144
+ .find("span."+o.options.currentInfoClass).remove();
145
+ $(this).blur();
146
+ $(el).find(o.options.tabbody+':visible').hide();
147
+ $(el).find(o.options.tabbody).eq(i)[o.options.fx](o.options.fxspeed);
148
+ $(this)[o.options.currentInfoPosition]('<span class="'+o.options.currentInfoClass+'">'+o.options.currentInfoText+'</span>')
149
+ .parent().addClass(o.options.currentClass);
150
+ //now, only after writing the currentInfoText span to the tab list link, set focus to the tab's heading
151
+
152
+ $($(this).attr("href")).focus().keyup(function(event){
153
+ if(keyCodes[event.keyCode]){
154
+ o.showAccessibleTab(i+keyCodes[event.keyCode]);
155
+ $(this).unbind( "keyup" );
156
+ }
157
+ });
158
+
159
+ // $(el).find('.accessibletabsanchor').keyup(function(event){
160
+ // if(keyCodes[event.keyCode]){
161
+ // o.showAccessibleTab(i+keyCodes[event.keyCode]);
162
+ // }
163
+ // });
164
+ });
165
+
166
+ $(this).focus(function(){
167
+ $(document).keyup(function(event){
168
+ if(keyCodes[event.keyCode]){
169
+ o.showAccessibleTab(i+keyCodes[event.keyCode]);
170
+ }
171
+ });
172
+ });
173
+ $(this).blur(function(){
174
+ $(document).unbind( "keyup" );
175
+ });
176
+
177
+ });
178
+
179
+ if(o.options.saveState && $.cookie){
180
+ var savedState = $.cookie('accessibletab_'+el.attr('id')+'_active');
181
+ debug($.cookie('accessibletab_'+el.attr('id')+'_active'));
182
+ if(savedState !== null){
183
+ o.showAccessibleTab(savedState,el.attr('id'));
184
+ }
185
+ }
186
+
187
+ if(o.options.autoAnchor && window.location.hash){
188
+ var anchorTab = $('.'+o.options.tabsListClass).find(window.location.hash);
189
+ if(anchorTab.size()){
190
+ anchorTab.click();
191
+ }
192
+ }
193
+
194
+ if(o.options.pagination){
195
+ var m = '<ul class="pagination">';
196
+ m +=' <li class="previous"><a href="#{previousAnchor}"><span>{previousHeadline}</span></a></li>';
197
+ m +=' <li class="next"><a href="#{nextAnchor}"><span>{nextHeadline}</span></a></li>';
198
+ m +='</ul>';
199
+ var tabs = $(el).find('.tabbody');
200
+ var tabcount = tabs.size();
201
+ tabs.each(function(idx){
202
+ $(this).append(m);
203
+ var next = idx+1;
204
+ if(next>=tabcount){next = 0;}
205
+ var previous = idx-1;
206
+ if(previous<0){previous = tabcount-1;}
207
+ var p = $(this).find('.pagination');
208
+ var previousEl = p.find('.previous');
209
+ previousEl.find('span').text($('#'+ids[previous]).text());
210
+ previousEl.find('a').attr('href','#'+ids[previous])
211
+ .click(function(event){
212
+ event.preventDefault();
213
+ $(el).find('.tabs-list a').eq(previous).click();
214
+ });
215
+ var nextEl = p.find('.next');
216
+ nextEl.find('span').text($('#'+ids[next]).text());
217
+ nextEl.find('a').attr('href','#'+ids[next])
218
+ .click(function(event){
219
+ event.preventDefault();
220
+ $(el).find('.tabs-list a').eq(next).click();
221
+ });
222
+ });
223
+ }
224
+ });
225
+ },
226
+ showAccessibleTab: function(index,id){
227
+ debug('showAccessibleTab');
228
+ var o = this;
229
+ if(id) {
230
+ var el = $('#'+id);
231
+ var links = el.find('ul.'+o.options.tabsListClass+'>li>a');
232
+ el.trigger("showTab.accessibleTabs", [links.eq(index)]);
233
+ links.eq(index).click();
234
+ } else {
235
+ return this.each(function() {
236
+ var el = $(this);
237
+ el.trigger("showTab.accessibleTabs");
238
+ var links = el.find('ul.'+o.options.tabsListClass+'>li>a');
239
+ el.trigger("showTab.accessibleTabs", [links.eq(index)]);
240
+ links.eq(index).click();
241
+ });
242
+ }
243
+ },
244
+ showAccessibleTabSelector: function(selector){
245
+ debug('showAccessibleTabSelector');
246
+ var el = $(selector);
247
+ if(el){
248
+ if(el.get(0).nodeName.toLowerCase() === 'a'){
249
+ el.click();
250
+ }else{
251
+ debug('the selector of a showAccessibleTabSelector() call needs to point to a tabs headline!');
252
+ }
253
+ }
254
+ }
255
+ });
256
+ // private Methods
257
+ function debug(msg,info){
258
+ if(debugMode && window.console && window.console.log){
259
+ if(info){
260
+ window.console.log(info+': ',msg);
261
+ }else{
262
+ window.console.log(msg);
263
+ }
264
+ }
265
+ }
266
+ })(jQuery);
@@ -0,0 +1,136 @@
1
+ /**
2
+ * "Yet Another Multicolumn Layout" - YAML CSS Framework
3
+ * (en) Styles for Accessible-Tabs plugin for jQuery
4
+ * (de) Gestaltung des Acessible-Tabs Plugins für jQuery
5
+ *
6
+ * @copyright © 2005-2013, Dirk Jesse
7
+ * @license CC-BY 2.0 (http://creativecommons.org/licenses/by/2.0/),
8
+ * YAML-CDL (http://www.yaml.de/license.html)
9
+ * @link http://www.yaml.de
10
+ * @package yaml
11
+ * @version 4.1.2
12
+ */
13
+ @media screen, projection {
14
+ .jquery_tabs {
15
+ margin: 0 0 1.5em 0;
16
+ }
17
+ .jquery_tabs ul.tabs-list {
18
+ font-size: 1em;
19
+ display: table;
20
+ table-layout: fixed;
21
+ list-style-type: none;
22
+ margin: 0;
23
+ position: relative;
24
+ z-index: 1;
25
+ }
26
+ .jquery_tabs ul.tabs-list li {
27
+ margin: 0 4px 0 0;
28
+ border: 0 none;
29
+ display: inline;
30
+ float: left;
31
+ padding: 0;
32
+ }
33
+ .jquery_tabs ul.tabs-list li a {
34
+ font-size: 1em;
35
+ line-height: 1.5;
36
+ padding: 0.75em;
37
+ background: transparent;
38
+ display: block;
39
+ float: left;
40
+ font-weight: normal;
41
+ margin: 0;
42
+ }
43
+ .jquery_tabs ul.tabs-list li a:focus, .jquery_tabs ul.tabs-list li a:hover, .jquery_tabs ul.tabs-list li a:active {
44
+ background: #eee;
45
+ border-radius: 0.2em 0.2em 0 0;
46
+ color: #000;
47
+ font-weight: normal;
48
+ outline: 0 none;
49
+ text-decoration: none;
50
+ }
51
+ .jquery_tabs ul.tabs-list li.current a,
52
+ .jquery_tabs ul.tabs-list li.current a:focus,
53
+ .jquery_tabs ul.tabs-list li.current a:hover,
54
+ .jquery_tabs ul.tabs-list li.current a:active {
55
+ background: #fff;
56
+ border: 1px #ccc solid;
57
+ border-radius: 0.2em 0.2em 0 0;
58
+ color: #000;
59
+ border-bottom: 0 none;
60
+ font-weight: bold;
61
+ text-decoration: none;
62
+ }
63
+ .jquery_tabs .content {
64
+ border-top: 1px #ccc solid;
65
+ clear: both;
66
+ padding: 0;
67
+ position: relative;
68
+ top: -1px;
69
+ margin-bottom: -1px;
70
+ }
71
+
72
+ /* hiding texts visually */
73
+ .jquery_tabs .tabhead {
74
+ position: absolute;
75
+ left: -32768px;
76
+ }
77
+
78
+ .jquery_tabs .current-info,
79
+ .jquery_tabs .accessibletabsanchor {
80
+ left: -999em;
81
+ position: absolute;
82
+ }
83
+
84
+ /** Avoid margin collapsing to enable correct sync of all tabs
85
+ *
86
+ * @workaround
87
+ * @affected all browsers
88
+ * @css-for all browsers
89
+ * @valid yes
90
+ */
91
+ .jquery_tabs .tab-content {
92
+ border-bottom: 1px transparent solid;
93
+ border-top: 1px transparent solid;
94
+ padding-top: 1.5em;
95
+ *overflow: hidden;
96
+ }
97
+
98
+ /** Containing floats adjustment and stability fixes for Internet Explorer
99
+ *
100
+ * @workaround
101
+ * @affected IE 5.x/Win, IE6, IE7
102
+ * @css-for IE 5.x/Win, IE6, IE7
103
+ * @valid no
104
+ */
105
+ * html .jquery_tabs {
106
+ zoom: 1;
107
+ width: auto;
108
+ position: relative;
109
+ }
110
+ * html .jquery_tabs .tab-content {
111
+ border-bottom: 1px #fff solid;
112
+ border-top: 1px #fff solid;
113
+ }
114
+ * html .jquery_tabs .content {
115
+ z-index: -1;
116
+ }
117
+
118
+ * + html .jquery_tabs {
119
+ zoom: 1;
120
+ width: auto;
121
+ }
122
+
123
+ .jquery_tabs * {
124
+ zoom: 1;
125
+ }
126
+ }
127
+ /* Make tabs printable */
128
+ @media print {
129
+ .jquery_tabs .tabs-list {
130
+ display: none !important;
131
+ }
132
+ .jquery_tabs .tabbody,
133
+ .jquery_tabs .tabhead {
134
+ display: block !important;
135
+ }
136
+ }