groundworkcss-rails 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. data/lib/groundworkcss/rails/version.rb +1 -1
  2. data/lib/groundworkcss/rails/version.rb~ +1 -1
  3. data/vendor/assets/images/groundworkcss/orbit/bullets.jpg +0 -0
  4. data/vendor/assets/images/groundworkcss/orbit/left-arrow.png +0 -0
  5. data/vendor/assets/images/groundworkcss/orbit/mask-black.png +0 -0
  6. data/vendor/assets/images/groundworkcss/orbit/pause-black.png +0 -0
  7. data/vendor/assets/images/groundworkcss/orbit/right-arrow.png +0 -0
  8. data/vendor/assets/images/groundworkcss/orbit/rotator-black.png +0 -0
  9. data/vendor/assets/images/groundworkcss/orbit/timer-black.png +0 -0
  10. data/vendor/assets/images/groundworkcss/social-icons/500px-m.png +0 -0
  11. data/vendor/assets/images/groundworkcss/social-icons/500px-s.png +0 -0
  12. data/vendor/assets/images/groundworkcss/social-icons/500px.png +0 -0
  13. data/vendor/assets/images/groundworkcss/social-icons/aboutme-m.png +0 -0
  14. data/vendor/assets/images/groundworkcss/social-icons/aboutme-s.png +0 -0
  15. data/vendor/assets/images/groundworkcss/social-icons/aboutme.png +0 -0
  16. data/vendor/assets/images/groundworkcss/social-icons/adn-m.png +0 -0
  17. data/vendor/assets/images/groundworkcss/social-icons/adn-s.png +0 -0
  18. data/vendor/assets/images/groundworkcss/social-icons/adn.png +0 -0
  19. data/vendor/assets/images/groundworkcss/social-icons/android-m.png +0 -0
  20. data/vendor/assets/images/groundworkcss/social-icons/android-s.png +0 -0
  21. data/vendor/assets/images/groundworkcss/social-icons/android.png +0 -0
  22. data/vendor/assets/images/groundworkcss/social-icons/apple-m.png +0 -0
  23. data/vendor/assets/images/groundworkcss/social-icons/apple-s.png +0 -0
  24. data/vendor/assets/images/groundworkcss/social-icons/apple.png +0 -0
  25. data/vendor/assets/images/groundworkcss/social-icons/behance-m.png +0 -0
  26. data/vendor/assets/images/groundworkcss/social-icons/behance-s.png +0 -0
  27. data/vendor/assets/images/groundworkcss/social-icons/behance.png +0 -0
  28. data/vendor/assets/images/groundworkcss/social-icons/bitbucket-m.png +0 -0
  29. data/vendor/assets/images/groundworkcss/social-icons/bitbucket-s.png +0 -0
  30. data/vendor/assets/images/groundworkcss/social-icons/bitbucket.png +0 -0
  31. data/vendor/assets/images/groundworkcss/social-icons/blogger-m.png +0 -0
  32. data/vendor/assets/images/groundworkcss/social-icons/blogger-s.png +0 -0
  33. data/vendor/assets/images/groundworkcss/social-icons/blogger.png +0 -0
  34. data/vendor/assets/images/groundworkcss/social-icons/coderwall-m.png +0 -0
  35. data/vendor/assets/images/groundworkcss/social-icons/coderwall-s.png +0 -0
  36. data/vendor/assets/images/groundworkcss/social-icons/coderwall.png +0 -0
  37. data/vendor/assets/images/groundworkcss/social-icons/creativecloud-m.png +0 -0
  38. data/vendor/assets/images/groundworkcss/social-icons/creativecloud-s.png +0 -0
  39. data/vendor/assets/images/groundworkcss/social-icons/creativecloud.png +0 -0
  40. data/vendor/assets/images/groundworkcss/social-icons/dribbble-m.png +0 -0
  41. data/vendor/assets/images/groundworkcss/social-icons/dribbble-s.png +0 -0
  42. data/vendor/assets/images/groundworkcss/social-icons/dribbble.png +0 -0
  43. data/vendor/assets/images/groundworkcss/social-icons/dropbox-m.png +0 -0
  44. data/vendor/assets/images/groundworkcss/social-icons/dropbox-s.png +0 -0
  45. data/vendor/assets/images/groundworkcss/social-icons/dropbox.png +0 -0
  46. data/vendor/assets/images/groundworkcss/social-icons/evernote-m.png +0 -0
  47. data/vendor/assets/images/groundworkcss/social-icons/evernote-s.png +0 -0
  48. data/vendor/assets/images/groundworkcss/social-icons/evernote.png +0 -0
  49. data/vendor/assets/images/groundworkcss/social-icons/facebook-m.png +0 -0
  50. data/vendor/assets/images/groundworkcss/social-icons/facebook-s.png +0 -0
  51. data/vendor/assets/images/groundworkcss/social-icons/facebook.png +0 -0
  52. data/vendor/assets/images/groundworkcss/social-icons/fairheadcreative-m.png +0 -0
  53. data/vendor/assets/images/groundworkcss/social-icons/fairheadcreative-s.png +0 -0
  54. data/vendor/assets/images/groundworkcss/social-icons/fairheadcreative.png +0 -0
  55. data/vendor/assets/images/groundworkcss/social-icons/flickr-m.png +0 -0
  56. data/vendor/assets/images/groundworkcss/social-icons/flickr-s.png +0 -0
  57. data/vendor/assets/images/groundworkcss/social-icons/flickr.png +0 -0
  58. data/vendor/assets/images/groundworkcss/social-icons/foursquare-m.png +0 -0
  59. data/vendor/assets/images/groundworkcss/social-icons/foursquare-s.png +0 -0
  60. data/vendor/assets/images/groundworkcss/social-icons/foursquare.png +0 -0
  61. data/vendor/assets/images/groundworkcss/social-icons/git-m.png +0 -0
  62. data/vendor/assets/images/groundworkcss/social-icons/git-s.png +0 -0
  63. data/vendor/assets/images/groundworkcss/social-icons/git.png +0 -0
  64. data/vendor/assets/images/groundworkcss/social-icons/github-m.png +0 -0
  65. data/vendor/assets/images/groundworkcss/social-icons/github-s.png +0 -0
  66. data/vendor/assets/images/groundworkcss/social-icons/github.png +0 -0
  67. data/vendor/assets/images/groundworkcss/social-icons/goodreads-m.png +0 -0
  68. data/vendor/assets/images/groundworkcss/social-icons/goodreads-s.png +0 -0
  69. data/vendor/assets/images/groundworkcss/social-icons/goodreads.png +0 -0
  70. data/vendor/assets/images/groundworkcss/social-icons/googleplay-m.png +0 -0
  71. data/vendor/assets/images/groundworkcss/social-icons/googleplay-s.png +0 -0
  72. data/vendor/assets/images/groundworkcss/social-icons/googleplay.png +0 -0
  73. data/vendor/assets/images/groundworkcss/social-icons/googleplus-m.png +0 -0
  74. data/vendor/assets/images/groundworkcss/social-icons/googleplus-s.png +0 -0
  75. data/vendor/assets/images/groundworkcss/social-icons/googleplus.png +0 -0
  76. data/vendor/assets/images/groundworkcss/social-icons/html5-m.png +0 -0
  77. data/vendor/assets/images/groundworkcss/social-icons/html5-s.png +0 -0
  78. data/vendor/assets/images/groundworkcss/social-icons/html5.png +0 -0
  79. data/vendor/assets/images/groundworkcss/social-icons/icloud-m.png +0 -0
  80. data/vendor/assets/images/groundworkcss/social-icons/icloud-s.png +0 -0
  81. data/vendor/assets/images/groundworkcss/social-icons/icloud.png +0 -0
  82. data/vendor/assets/images/groundworkcss/social-icons/instagram-m.png +0 -0
  83. data/vendor/assets/images/groundworkcss/social-icons/instagram-s.png +0 -0
  84. data/vendor/assets/images/groundworkcss/social-icons/instagram.png +0 -0
  85. data/vendor/assets/images/groundworkcss/social-icons/lastfm-m.png +0 -0
  86. data/vendor/assets/images/groundworkcss/social-icons/lastfm-s.png +0 -0
  87. data/vendor/assets/images/groundworkcss/social-icons/lastfm.png +0 -0
  88. data/vendor/assets/images/groundworkcss/social-icons/linkedin-m.png +0 -0
  89. data/vendor/assets/images/groundworkcss/social-icons/linkedin-s.png +0 -0
  90. data/vendor/assets/images/groundworkcss/social-icons/linkedin.png +0 -0
  91. data/vendor/assets/images/groundworkcss/social-icons/mail-m.png +0 -0
  92. data/vendor/assets/images/groundworkcss/social-icons/mail-s.png +0 -0
  93. data/vendor/assets/images/groundworkcss/social-icons/mail.png +0 -0
  94. data/vendor/assets/images/groundworkcss/social-icons/mercurial-m.png +0 -0
  95. data/vendor/assets/images/groundworkcss/social-icons/mercurial-s.png +0 -0
  96. data/vendor/assets/images/groundworkcss/social-icons/mercurial.png +0 -0
  97. data/vendor/assets/images/groundworkcss/social-icons/mixi-m.png +0 -0
  98. data/vendor/assets/images/groundworkcss/social-icons/mixi-s.png +0 -0
  99. data/vendor/assets/images/groundworkcss/social-icons/mixi.png +0 -0
  100. data/vendor/assets/images/groundworkcss/social-icons/msn-m.png +0 -0
  101. data/vendor/assets/images/groundworkcss/social-icons/msn-s.png +0 -0
  102. data/vendor/assets/images/groundworkcss/social-icons/msn.png +0 -0
  103. data/vendor/assets/images/groundworkcss/social-icons/orkut-m.png +0 -0
  104. data/vendor/assets/images/groundworkcss/social-icons/orkut-s.png +0 -0
  105. data/vendor/assets/images/groundworkcss/social-icons/orkut.png +0 -0
  106. data/vendor/assets/images/groundworkcss/social-icons/picasa-m.png +0 -0
  107. data/vendor/assets/images/groundworkcss/social-icons/picasa-s.png +0 -0
  108. data/vendor/assets/images/groundworkcss/social-icons/picasa.png +0 -0
  109. data/vendor/assets/images/groundworkcss/social-icons/pinterest-m.png +0 -0
  110. data/vendor/assets/images/groundworkcss/social-icons/pinterest-s.png +0 -0
  111. data/vendor/assets/images/groundworkcss/social-icons/pinterest.png +0 -0
  112. data/vendor/assets/images/groundworkcss/social-icons/pocketapp-m.png +0 -0
  113. data/vendor/assets/images/groundworkcss/social-icons/pocketapp-s.png +0 -0
  114. data/vendor/assets/images/groundworkcss/social-icons/pocketapp.png +0 -0
  115. data/vendor/assets/images/groundworkcss/social-icons/quora-m.png +0 -0
  116. data/vendor/assets/images/groundworkcss/social-icons/quora-s.png +0 -0
  117. data/vendor/assets/images/groundworkcss/social-icons/quora.png +0 -0
  118. data/vendor/assets/images/groundworkcss/social-icons/rdio-m.png +0 -0
  119. data/vendor/assets/images/groundworkcss/social-icons/rdio-s.png +0 -0
  120. data/vendor/assets/images/groundworkcss/social-icons/rdio.png +0 -0
  121. data/vendor/assets/images/groundworkcss/social-icons/renren-m.png +0 -0
  122. data/vendor/assets/images/groundworkcss/social-icons/renren-s.png +0 -0
  123. data/vendor/assets/images/groundworkcss/social-icons/renren.png +0 -0
  124. data/vendor/assets/images/groundworkcss/social-icons/rss-m.png +0 -0
  125. data/vendor/assets/images/groundworkcss/social-icons/rss-s.png +0 -0
  126. data/vendor/assets/images/groundworkcss/social-icons/rss.png +0 -0
  127. data/vendor/assets/images/groundworkcss/social-icons/skitch-m.png +0 -0
  128. data/vendor/assets/images/groundworkcss/social-icons/skitch-s.png +0 -0
  129. data/vendor/assets/images/groundworkcss/social-icons/skitch.png +0 -0
  130. data/vendor/assets/images/groundworkcss/social-icons/skype-m.png +0 -0
  131. data/vendor/assets/images/groundworkcss/social-icons/skype-s.png +0 -0
  132. data/vendor/assets/images/groundworkcss/social-icons/skype.png +0 -0
  133. data/vendor/assets/images/groundworkcss/social-icons/soundcloud-m.png +0 -0
  134. data/vendor/assets/images/groundworkcss/social-icons/soundcloud-s.png +0 -0
  135. data/vendor/assets/images/groundworkcss/social-icons/soundcloud.png +0 -0
  136. data/vendor/assets/images/groundworkcss/social-icons/spotify-m.png +0 -0
  137. data/vendor/assets/images/groundworkcss/social-icons/spotify-s.png +0 -0
  138. data/vendor/assets/images/groundworkcss/social-icons/spotify.png +0 -0
  139. data/vendor/assets/images/groundworkcss/social-icons/stackoverflow-m.png +0 -0
  140. data/vendor/assets/images/groundworkcss/social-icons/stackoverflow-s.png +0 -0
  141. data/vendor/assets/images/groundworkcss/social-icons/stackoverflow.png +0 -0
  142. data/vendor/assets/images/groundworkcss/social-icons/stumbleupon-m.png +0 -0
  143. data/vendor/assets/images/groundworkcss/social-icons/stumbleupon-s.png +0 -0
  144. data/vendor/assets/images/groundworkcss/social-icons/stumbleupon.png +0 -0
  145. data/vendor/assets/images/groundworkcss/social-icons/svn-m.png +0 -0
  146. data/vendor/assets/images/groundworkcss/social-icons/svn-s.png +0 -0
  147. data/vendor/assets/images/groundworkcss/social-icons/svn.png +0 -0
  148. data/vendor/assets/images/groundworkcss/social-icons/tent-m.png +0 -0
  149. data/vendor/assets/images/groundworkcss/social-icons/tent-s.png +0 -0
  150. data/vendor/assets/images/groundworkcss/social-icons/tent.png +0 -0
  151. data/vendor/assets/images/groundworkcss/social-icons/tripadvisor-m.png +0 -0
  152. data/vendor/assets/images/groundworkcss/social-icons/tripadvisor-s.png +0 -0
  153. data/vendor/assets/images/groundworkcss/social-icons/tripadvisor.png +0 -0
  154. data/vendor/assets/images/groundworkcss/social-icons/tumblr-m.png +0 -0
  155. data/vendor/assets/images/groundworkcss/social-icons/tumblr-s.png +0 -0
  156. data/vendor/assets/images/groundworkcss/social-icons/tumblr.png +0 -0
  157. data/vendor/assets/images/groundworkcss/social-icons/twitter-m.png +0 -0
  158. data/vendor/assets/images/groundworkcss/social-icons/twitter-s.png +0 -0
  159. data/vendor/assets/images/groundworkcss/social-icons/twitter.png +0 -0
  160. data/vendor/assets/images/groundworkcss/social-icons/vimeo-m.png +0 -0
  161. data/vendor/assets/images/groundworkcss/social-icons/vimeo-s.png +0 -0
  162. data/vendor/assets/images/groundworkcss/social-icons/vimeo.png +0 -0
  163. data/vendor/assets/images/groundworkcss/social-icons/weibo-m.png +0 -0
  164. data/vendor/assets/images/groundworkcss/social-icons/weibo-s.png +0 -0
  165. data/vendor/assets/images/groundworkcss/social-icons/weibo.png +0 -0
  166. data/vendor/assets/images/groundworkcss/social-icons/windows-m.png +0 -0
  167. data/vendor/assets/images/groundworkcss/social-icons/windows-s.png +0 -0
  168. data/vendor/assets/images/groundworkcss/social-icons/windows.png +0 -0
  169. data/vendor/assets/images/groundworkcss/social-icons/wordpress-m.png +0 -0
  170. data/vendor/assets/images/groundworkcss/social-icons/wordpress-s.png +0 -0
  171. data/vendor/assets/images/groundworkcss/social-icons/wordpress.png +0 -0
  172. data/vendor/assets/images/groundworkcss/social-icons/xing-m.png +0 -0
  173. data/vendor/assets/images/groundworkcss/social-icons/xing-s.png +0 -0
  174. data/vendor/assets/images/groundworkcss/social-icons/xing.png +0 -0
  175. data/vendor/assets/images/groundworkcss/social-icons/yelp-m.png +0 -0
  176. data/vendor/assets/images/groundworkcss/social-icons/yelp-s.png +0 -0
  177. data/vendor/assets/images/groundworkcss/social-icons/yelp.png +0 -0
  178. data/vendor/assets/images/groundworkcss/social-icons/youtube-m.png +0 -0
  179. data/vendor/assets/images/groundworkcss/social-icons/youtube-s.png +0 -0
  180. data/vendor/assets/images/groundworkcss/social-icons/youtube.png +0 -0
  181. data/vendor/assets/images/groundworkcss/social-icons/youversion-m.png +0 -0
  182. data/vendor/assets/images/groundworkcss/social-icons/youversion-s.png +0 -0
  183. data/vendor/assets/images/groundworkcss/social-icons/youversion.png +0 -0
  184. data/vendor/assets/images/groundworkcss/social-icons/zerply-m.png +0 -0
  185. data/vendor/assets/images/groundworkcss/social-icons/zerply-s.png +0 -0
  186. data/vendor/assets/images/groundworkcss/social-icons/zerply.png +0 -0
  187. data/vendor/assets/javascripts/groundwork-hook.js +1 -0
  188. data/vendor/assets/javascripts/groundwork-hook.js~ +2 -0
  189. data/vendor/assets/javascripts/groundworkcss/components/disabled.js +13 -0
  190. data/vendor/assets/javascripts/groundworkcss/components/equalizeColumns.js +34 -0
  191. data/vendor/assets/javascripts/groundworkcss/components/forms.js +29 -0
  192. data/vendor/assets/javascripts/groundworkcss/components/menus.js +85 -0
  193. data/vendor/assets/javascripts/groundworkcss/components/modals.js +8 -0
  194. data/vendor/assets/javascripts/groundworkcss/components/pagination.js +98 -0
  195. data/vendor/assets/javascripts/groundworkcss/components/responsiveTables.js +24 -0
  196. data/vendor/assets/javascripts/groundworkcss/components/responsiveText.js +21 -0
  197. data/vendor/assets/javascripts/groundworkcss/components/tabs.js +20 -0
  198. data/vendor/assets/javascripts/groundworkcss/components/tiles.js +25 -0
  199. data/vendor/assets/javascripts/groundworkcss/components/tooltips.js +8 -0
  200. data/vendor/assets/javascripts/groundworkcss/groundwork.all.js +670 -525
  201. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.modals.js +11 -8
  202. data/vendor/assets/stylesheets/groundworkcss-scss/_animations.scss +25 -0
  203. data/vendor/assets/stylesheets/groundworkcss-scss/_buttons.scss +15 -13
  204. data/vendor/assets/stylesheets/groundworkcss-scss/_callouts.scss +3 -0
  205. data/vendor/assets/stylesheets/groundworkcss-scss/_font-awesome.scss +5 -5
  206. data/vendor/assets/stylesheets/groundworkcss-scss/_forms.scss +3 -0
  207. data/vendor/assets/stylesheets/groundworkcss-scss/_grid.scss +1 -1
  208. data/vendor/assets/stylesheets/groundworkcss-scss/_helpers.scss +171 -73
  209. data/vendor/assets/stylesheets/groundworkcss-scss/_mixins.scss +94 -32
  210. data/vendor/assets/stylesheets/groundworkcss-scss/_modals.scss +2 -2
  211. data/vendor/assets/stylesheets/groundworkcss-scss/_navigation.scss +173 -116
  212. data/vendor/assets/stylesheets/groundworkcss-scss/_reset.scss +1 -1
  213. data/vendor/assets/stylesheets/groundworkcss-scss/_responsive.scss +112 -88
  214. data/vendor/assets/stylesheets/groundworkcss-scss/_tabs.scss +57 -66
  215. data/vendor/assets/stylesheets/groundworkcss-scss/_tiles.scss +198 -0
  216. data/vendor/assets/stylesheets/groundworkcss-scss/_typography.scss +3 -3
  217. data/vendor/assets/stylesheets/groundworkcss-scss/_variables.scss +13 -3
  218. data/vendor/assets/stylesheets/groundworkcss-scss/groundwork-ie.scss +1 -0
  219. data/vendor/assets/stylesheets/groundworkcss-scss/groundwork.scss +6 -1
  220. metadata +27 -14
@@ -1,4 +1,5 @@
1
1
  //= require_tree ./groundworkcss/libs
2
+ //= require_tree ./groundworkcss/components
2
3
  //= require ./groundworkcss/plugins/jquery.cycle2.js
3
4
  //= require_tree ./groundworkcss/plugins/cycle
4
5
  //= require_tree ./groundworkcss/plugins
@@ -1,3 +1,5 @@
1
1
  //= require_tree ./groundworkcss/libs
2
+ //= require ./groundworkcss/plugins/jquery.cycle2.js
3
+ //= require_tree ./groundworkcss/plugins/cycle
2
4
  //= require_tree ./groundworkcss/plugins
3
5
  //= require ./groundworkcss/groundwork.all.js
@@ -0,0 +1,13 @@
1
+ // Generated by CoffeeScript 1.6.1
2
+
3
+ $(function() {
4
+ $('.disabled').each(function() {
5
+ $(this).attr('tabindex', '-1');
6
+ $(this).find('a').attr('tabindex', '-1');
7
+ return $(this).find('input, select, textarea').addClass('disabled').attr('tabindex', '-1').attr('readonly', 'readyonly');
8
+ });
9
+ $('body').on('click', '.disabled, .disabled *', function(e) {
10
+ e.preventDefault();
11
+ return false;
12
+ });
13
+ });
@@ -0,0 +1,34 @@
1
+ // Generated by CoffeeScript 1.6.1
2
+ var equalizeColumns;
3
+
4
+ $(function() {
5
+ return equalizeColumns();
6
+ });
7
+
8
+ $(window).resize(function() {
9
+ return equalizeColumns();
10
+ });
11
+
12
+ equalizeColumns = function() {
13
+ return $('.row.equalize').each(function() {
14
+ var $row, collapsed, tallest;
15
+ $row = $(this);
16
+ tallest = 0;
17
+ collapsed = false;
18
+ $(this).children('*').each(function(i) {
19
+ $(this).css('min-height', '1px');
20
+ collapsed = $(this).outerWidth() === $row.outerWidth();
21
+ if (!collapsed) {
22
+ if (!$(this).hasClass('equal')) {
23
+ $(this).addClass('equal');
24
+ }
25
+ if ($(this).outerHeight() > tallest) {
26
+ return tallest = $(this).outerHeight();
27
+ }
28
+ }
29
+ });
30
+ if (!collapsed) {
31
+ return $(this).children('*').css('min-height', tallest);
32
+ }
33
+ });
34
+ };
@@ -0,0 +1,29 @@
1
+ // Generated by CoffeeScript 1.6.1
2
+
3
+ $(function() {
4
+ $('body').on('click', '\
5
+ .error input, \
6
+ .error textarea, \
7
+ .invalid input, \
8
+ .invalid textarea, \
9
+ input.error, \
10
+ textarea.error, \
11
+ input.invalid, \
12
+ textarea.invalid', function(e) {
13
+ return $(this).focus().select();
14
+ });
15
+ $('span.select select').each(function() {
16
+ if ($(this).children('option').first().val() === '' && $(this).children('option').first().attr('selected')) {
17
+ return $(this).addClass('unselected');
18
+ } else {
19
+ return $(this).removeClass('unselected');
20
+ }
21
+ });
22
+ $('body').on('change', 'span.select select', function(e) {
23
+ if ($(this).children('option').first().val() === '' && $(this).children('option').first().attr('selected')) {
24
+ return $(this).addClass('unselected');
25
+ } else {
26
+ return $(this).removeClass('unselected');
27
+ }
28
+ });
29
+ });
@@ -0,0 +1,85 @@
1
+ // Generated by CoffeeScript 1.6.1
2
+
3
+ $(function() {
4
+ var delay, openMenu,
5
+ _this = this;
6
+ delay = '';
7
+ openMenu = function(target) {
8
+ return $(target).parent('li.menu').toggleClass('on');
9
+ };
10
+ $('body').on('mouseenter', '.nav > ul > li.menu:not(.disabled)', function(e) {
11
+ if ($(window).width() >= 768) {
12
+ clearTimeout(delay);
13
+ $('.nav > ul > li.menu.on').removeClass('on');
14
+ return $(this).addClass('on');
15
+ }
16
+ });
17
+ $('body').on('mouseleave', '.nav > ul > li.menu:not(.disabled)', function(e) {
18
+ if ($(window).width() >= 768) {
19
+ return delay = setTimeout((function() {
20
+ return $('.nav > ul > li.menu.on').removeClass('on');
21
+ }), 350);
22
+ }
23
+ });
24
+ $('body').on('click', '.nav > ul > li.menu:not(.disabled) > a', function(e) {
25
+ if (Modernizr.touch || $(window).width() < 768) {
26
+ openMenu(e.target);
27
+ } else {
28
+ $('.nav > ul > li.menu.on').removeClass('on');
29
+ $(e.target).parents('li.menu').addClass('on');
30
+ }
31
+ e.preventDefault();
32
+ return false;
33
+ });
34
+ $('body').on('focus', '.nav > ul > li:not(.on) > a', function() {
35
+ return $('.nav > ul > li.menu.on').removeClass('on');
36
+ });
37
+ $('body').on('focus', '.nav > ul > li.menu > a', function(e) {
38
+ openMenu(e.target);
39
+ e.preventDefault();
40
+ return false;
41
+ });
42
+ $('body').on('click', function(e) {
43
+ if ($(e.target).hasClass('dropdown')) {
44
+ $(e.target).toggleClass('on');
45
+ } else {
46
+ if ($('.dropdown').filter('.on').length) {
47
+ $('.dropdown').filter('.on').removeClass('on');
48
+ }
49
+ }
50
+ if ($('.nav > ul > li').filter('.menu.on').length) {
51
+ return $('.nav > ul > li').filter('.menu.on').removeClass('on');
52
+ }
53
+ });
54
+ $('body').on('focus', '.dropdown', function(e) {
55
+ return $(this).addClass('on');
56
+ });
57
+ $('body').on('blur', '.dropdown li:last-child a', function(e) {
58
+ return $('.dropdown').filter('.on').removeClass('on');
59
+ });
60
+ $('.nav.menu').each(function() {
61
+ if (!$(this).attr('data-label')) {
62
+ $(this).attr('data-label', 'Menu');
63
+ }
64
+ if (!($(this).find('.menu-toggle').length > 0)) {
65
+ return $(this).prepend('<a href="#" class="menu-toggle"><i class="icon-reorder"></i></a>');
66
+ }
67
+ });
68
+ $('body').on('click', '.nav.menu .menu-toggle', function(e) {
69
+ $(this).parent('.nav.menu').toggleClass('on');
70
+ e.preventDefault();
71
+ return false;
72
+ });
73
+ $('body').on('focus', '.menu-toggle', function(e) {
74
+ return $(e.target).parent('.nav.menu').addClass('on');
75
+ });
76
+ $('body').on('blur', '.nav.menu > ul > li:last-child a', function(e) {
77
+ return $('.nav.menu').filter('.on').removeClass('on');
78
+ });
79
+ });
80
+
81
+ $(window).on('resize', function() {
82
+ if ($('.nav > ul > li.menu.on').length > 1) {
83
+ return $('.nav > ul > li.menu.on').removeClass('on').first().addClass('on');
84
+ }
85
+ });
@@ -0,0 +1,8 @@
1
+ // Generated by CoffeeScript 1.6.1
2
+ /*
3
+ * Requires jquery.modals.js
4
+ */
5
+
6
+ $(function() {
7
+ return $('div.modal, div[role=dialog]').modal();
8
+ });
@@ -0,0 +1,98 @@
1
+ // Generated by CoffeeScript 1.6.1
2
+ var limitPaginationItems;
3
+
4
+ $(function() {
5
+ limitPaginationItems();
6
+ $('body').on('click', '.pagination ul > li:not(.next, .prev) a', function(e) {
7
+ $('.pagination ul > li:not(.next, .prev)').removeClass('active');
8
+ $(this).parent('li').addClass('active');
9
+ if ($(this).parent('li').hasClass('first')) {
10
+ $('.pagination ul > li.prev').addClass('disabled');
11
+ } else {
12
+ $('.pagination ul > li.prev').removeClass('disabled');
13
+ }
14
+ if ($(this).parent('li').hasClass('last')) {
15
+ $('.pagination ul > li.next').addClass('disabled');
16
+ } else {
17
+ $('.pagination ul > li.next').removeClass('disabled');
18
+ }
19
+ limitPaginationItems();
20
+ e.preventDefault();
21
+ return false;
22
+ });
23
+ $('body').on('click', '.pagination ul > li.prev:not(.disabled)', function(e) {
24
+ var el;
25
+ $('.pagination ul > li.next').removeClass('disabled');
26
+ el = $('.pagination ul > li.active');
27
+ if (!el.hasClass('first')) {
28
+ el.removeClass('active');
29
+ el.prev().addClass('active');
30
+ limitPaginationItems();
31
+ }
32
+ if ($('.pagination ul > li.active').hasClass('first')) {
33
+ $(this).addClass('disabled');
34
+ }
35
+ e.preventDefault();
36
+ return false;
37
+ });
38
+ $('body').on('click', '.pagination ul > li.next:not(.disabled)', function(e) {
39
+ var el;
40
+ $('.pagination ul > li.prev').removeClass('disabled');
41
+ el = $('.pagination ul > li.active');
42
+ if (!el.hasClass('last')) {
43
+ el.removeClass('active');
44
+ el.next().addClass('active');
45
+ limitPaginationItems();
46
+ }
47
+ if ($('.pagination ul > li.active').hasClass('last')) {
48
+ $(this).addClass('disabled');
49
+ }
50
+ e.preventDefault();
51
+ return false;
52
+ });
53
+ $('body').on('click', '.pagination ul > li.disabled a', function(e) {
54
+ e.preventDefault();
55
+ return false;
56
+ });
57
+ });
58
+
59
+ $(window).resize(function() {
60
+ return limitPaginationItems();
61
+ });
62
+
63
+ limitPaginationItems = function() {
64
+ return $('.pagination ul').each(function() {
65
+ var pagination, totalItemsWidth, visibleItemsWidth, visibleSpace, _results;
66
+ pagination = $(this);
67
+ visibleSpace = pagination.outerWidth() - pagination.children('li.prev').outerWidth() - pagination.children('li.next').outerWidth();
68
+ totalItemsWidth = 0;
69
+ pagination.children('li').each(function() {
70
+ return totalItemsWidth += $(this).outerWidth();
71
+ });
72
+ pagination.children('li').not('.prev, .next, .active').hide();
73
+ visibleItemsWidth = 0;
74
+ pagination.children('li:visible').each(function() {
75
+ return visibleItemsWidth += $(this).outerWidth();
76
+ });
77
+ _results = [];
78
+ while ((visibleItemsWidth + 29) < visibleSpace && (visibleItemsWidth + 29) < totalItemsWidth) {
79
+ pagination.children('li:visible').not('.next').last().next().show();
80
+ visibleItemsWidth = 0;
81
+ pagination.children('li:visible').each(function() {
82
+ return visibleItemsWidth += $(this).outerWidth();
83
+ });
84
+ if ((visibleItemsWidth + 29) <= visibleSpace) {
85
+ pagination.children('li:visible').not('.prev').first().prev().show();
86
+ visibleItemsWidth = 0;
87
+ pagination.children('li:visible').each(function() {
88
+ return visibleItemsWidth += $(this).outerWidth();
89
+ });
90
+ }
91
+ visibleItemsWidth = 0;
92
+ _results.push(pagination.children('li:visible').each(function() {
93
+ return visibleItemsWidth += $(this).outerWidth();
94
+ }));
95
+ }
96
+ return _results;
97
+ });
98
+ };
@@ -0,0 +1,24 @@
1
+ // Generated by CoffeeScript 1.6.1
2
+ /*
3
+ * Requires jquery.responsiveText.js
4
+ */
5
+
6
+ $(function() {
7
+ return $('table.responsive').each(function(index, object) {
8
+ var compression, max, min, padding;
9
+ compression = 30;
10
+ min = 8;
11
+ max = 13;
12
+ padding = 0;
13
+ compression = parseFloat($(this).attr('data-compression') || compression);
14
+ min = parseFloat($(this).attr('data-min') || min);
15
+ max = parseFloat($(this).attr('data-max') || max);
16
+ padding = parseFloat($(this).attr('data-padding') || padding);
17
+ return $(object).responsiveTable({
18
+ compressor: compression,
19
+ minSize: min,
20
+ maxSize: max,
21
+ padding: padding
22
+ });
23
+ });
24
+ });
@@ -0,0 +1,21 @@
1
+ // Generated by CoffeeScript 1.6.1
2
+ /*
3
+ * Requires jquery.responsiveText.js
4
+ */
5
+
6
+ $(function() {
7
+ return $('.responsive').not('table').each(function(index, object) {
8
+ var compression, max, min;
9
+ compression = 10;
10
+ min = 10;
11
+ max = 200;
12
+ compression = parseFloat($(this).attr('data-compression') || compression);
13
+ min = parseFloat($(this).attr('data-min') || min);
14
+ max = parseFloat($(this).attr('data-max') || max);
15
+ return $(object).responsiveText({
16
+ compressor: compression,
17
+ minSize: min,
18
+ maxSize: max
19
+ });
20
+ });
21
+ });
@@ -0,0 +1,20 @@
1
+ // Generated by CoffeeScript 1.6.1
2
+
3
+ $(function() {
4
+ return $('body').on('click', '.tabs > ul li a[href^=#], [role=tab] a', function(e) {
5
+ var tabs;
6
+ if (!$(this).hasClass('disabled')) {
7
+ if ($(this).parents('[role=tabpanel]').length > 0) {
8
+ tabs = $(this).parents('[role=tabpanel]');
9
+ } else {
10
+ tabs = $(this).parents('.tabs');
11
+ }
12
+ tabs.find('> ul li a, [role=tab] a').removeClass('active');
13
+ $(this).addClass('active');
14
+ tabs.children('div, [role=tabpanel]').removeClass('active');
15
+ tabs.children($(this).attr('href')).addClass('active');
16
+ }
17
+ e.preventDefault();
18
+ return false;
19
+ });
20
+ });
@@ -0,0 +1,25 @@
1
+ // Generated by CoffeeScript 1.6.1
2
+
3
+ $(function() {
4
+ $('.tiles').each(function() {
5
+ $(this).find('.tile').attr('role', 'button');
6
+ return $(this).find('.tile[data-value=' + $(this).find('input.value, select.value').val() + ']').addClass('active');
7
+ });
8
+ $('body').on('click', '.tiles .tile', function(e) {
9
+ var tiles;
10
+ if (!$(this).hasClass('disabled')) {
11
+ tiles = $(this).parents('.tiles');
12
+ tiles.find('.tile').removeClass('active');
13
+ tiles.find('input.value, select.value').val($(this).data('value')).change();
14
+ $(this).addClass('active');
15
+ }
16
+ e.preventDefault();
17
+ return false;
18
+ });
19
+ return $('body').on('change', '.tiles input.value, .tiles select.value', function(e) {
20
+ var tiles;
21
+ tiles = $(this).parents('.tiles');
22
+ tiles.find('.tile').removeClass('active');
23
+ return tiles.find('.tile[data-value=' + $(this).val() + ']').addClass('active');
24
+ });
25
+ });
@@ -0,0 +1,8 @@
1
+ // Generated by CoffeeScript 1.6.1
2
+ /*
3
+ * Requires jquery.tooltips.js
4
+ */
5
+
6
+ $(function() {
7
+ return $('.tooltip[title]').tooltip();
8
+ });
@@ -1,11 +1,5 @@
1
1
  // Generated by CoffeeScript 1.6.1
2
2
 
3
- /* --------------------------------------------
4
- Begin groundwork.coffee
5
- --------------------------------------------
6
- */
7
-
8
-
9
3
  /*
10
4
  *
11
5
  * GroundworkCSS JS by Gary Hepting - https://github.com/groundworkcss/groundwork
@@ -17,281 +11,307 @@
17
11
  */
18
12
 
19
13
 
14
+ /* --------------------------------------------
15
+ Begin jquery.modals.coffee
16
+ --------------------------------------------
17
+ */
18
+
19
+
20
+ /*
21
+ *
22
+ * jQuery Modals by Gary Hepting
23
+ * https://github.com/ghepting/modal
24
+ *
25
+ */
26
+
27
+
20
28
  (function() {
21
29
  var equalizeColumns, limitPaginationItems;
22
30
 
23
- $(document).ready(function() {
24
- var delay, dropdown, menu, navitem;
25
- equalizeColumns();
26
- delay = '';
27
- navitem = $('nav > ul > li');
28
- navitem.find('>a').on({
29
- focus: function(e) {
30
- $('nav > ul > li').removeClass('on');
31
- return $('nav > ul > li > ul').hide();
32
- }
33
- });
34
- menu = $('nav > ul > li.menu');
35
- menu.on({
36
- mouseenter: function(e) {
37
- if ($(window).width() > 768) {
38
- clearTimeout(delay);
39
- $('nav > ul > li').removeClass('on');
40
- $('nav > ul > li > ul').hide();
41
- return $(this).addClass('on');
42
- }
43
- },
44
- mouseleave: function(e) {
45
- if ($(window).width() > 768) {
46
- return delay = setTimeout((function() {
47
- $('nav > ul > li').removeClass('on');
48
- return $('nav > ul > li > ul').hide();
49
- }), 350);
50
- }
51
- },
52
- click: function(e) {
53
- var $this;
54
- if ($(window).width() < 768) {
55
- if ($(e.target).parent('li.menu').size() > 0) {
56
- $this = $(this);
57
- $(this).children('ul').slideToggle(300, function() {
58
- return $this.toggleClass('on');
59
- });
60
- e.preventDefault();
61
- return false;
62
- }
63
- }
64
- },
65
- tap: function(e) {
66
- var $this;
67
- if ($(e.target).parent('li.menu').size() > 0) {
68
- $this = $(this);
69
- $(this).children('ul').slideToggle(300, function() {
70
- return $this.toggleClass('on');
71
- });
72
- e.preventDefault();
73
- return false;
74
- }
75
- }
76
- });
77
- menu.find('>a').on({
78
- focus: function() {
79
- return $(this).parent('li.menu').trigger('mouseenter');
80
- }
81
- });
82
- menu.find('li:last-child > a').on({
83
- blur: function() {
84
- return $(this).closest('li.menu').trigger('mouseleave');
85
- }
86
- });
87
- dropdown = $('.dropdown');
88
- dropdown.on({
89
- focus: function() {
90
- return $(this).addClass('on');
91
- }
92
- });
93
- dropdown.find('li:last-child a').on({
94
- blur: function() {
95
- return dropdown.filter('.on').removeClass('on');
96
- }
97
- });
98
- $('body').on('click', function(e) {
99
- if ($(e.target).hasClass('dropdown')) {
100
- $(e.target).toggleClass('on');
101
- } else {
102
- if (dropdown.filter('.on').length) {
103
- dropdown.filter('.on').removeClass('on');
104
- }
105
- }
106
- if (navitem.filter('.menu.on').length) {
107
- return navitem.filter('.menu.on').removeClass('on');
108
- }
109
- });
110
- limitPaginationItems();
111
- $('.pagination ul > li:not(.next, .prev) a').on('click', (function(e) {
112
- $('.pagination ul > li:not(.next, .prev)').removeClass('active');
113
- $(this).parent('li').addClass('active');
114
- if ($(this).parent('li').hasClass('first')) {
115
- $('.pagination ul > li.prev').addClass('disabled');
116
- } else {
117
- $('.pagination ul > li.prev').removeClass('disabled');
118
- }
119
- if ($(this).parent('li').hasClass('last')) {
120
- $('.pagination ul > li.next').addClass('disabled');
121
- } else {
122
- $('.pagination ul > li.next').removeClass('disabled');
123
- }
124
- limitPaginationItems();
125
- e.preventDefault();
126
- return false;
127
- }));
128
- $('.pagination ul > li.prev:not(.disabled)').on('click', (function(e) {
129
- var el;
130
- $('.pagination ul > li.next').removeClass('disabled');
131
- el = $('.pagination ul > li.active');
132
- if (!el.hasClass('first')) {
133
- el.removeClass('active');
134
- el.prev().addClass('active');
135
- limitPaginationItems();
136
- }
137
- if ($('.pagination ul > li.active').hasClass('first')) {
138
- $(this).addClass('disabled');
139
- }
140
- e.preventDefault();
141
- return false;
142
- }));
143
- $('.pagination ul > li.next:not(.disabled)').on('click', (function(e) {
144
- var el;
145
- $('.pagination ul > li.prev').removeClass('disabled');
146
- el = $('.pagination ul > li.active');
147
- if (!el.hasClass('last')) {
148
- el.removeClass('active');
149
- el.next().addClass('active');
150
- limitPaginationItems();
151
- }
152
- if ($('.pagination ul > li.active').hasClass('last')) {
153
- $(this).addClass('disabled');
154
- }
155
- e.preventDefault();
156
- return false;
157
- }));
158
- $('.pagination ul > li.disabled a').on('click', (function(e) {
159
- e.preventDefault();
160
- return false;
161
- }));
162
- $('.error input, .error textarea, \
163
- .invalid input, .invalid textarea, \
164
- input.error, textarea.error, \
165
- input.invalid, textarea.invalid').on({
166
- click: function() {
167
- $(this).focus();
168
- return $(this).select();
169
- }
170
- });
171
- $('span.select select').each(function() {
172
- if ($(this).children('option').first().val() === '' && $(this).children('option').first().attr('selected')) {
173
- return $(this).addClass('unselected');
174
- } else {
175
- return $(this).removeClass('unselected');
176
- }
177
- });
178
- $('span.select select').on({
179
- change: function() {
180
- if ($(this).children('option').first().val() === '' && $(this).children('option').first().attr('selected')) {
181
- return $(this).addClass('unselected');
182
- } else {
183
- return $(this).removeClass('unselected');
184
- }
185
- }
31
+ (function($) {
32
+ var elems, modals;
33
+ if ($('div#iframeModal').length < 1) {
34
+ $('body').append('<div class="iframe modal" id="iframeModal"><iframe marginheight="0" marginwidth="0" frameborder="0"></iframe></div>');
35
+ $('div#iframeModal').prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>');
36
+ }
37
+ $('a.modal').each(function() {
38
+ $(this).attr('data-url', $(this).attr('href'));
39
+ return $(this).attr('href', '#iframeModal');
186
40
  });
187
- $('.tabs > ul > li > a[href^=#]').on('click', function(e) {
188
- var tabs;
189
- if (!$(this).hasClass('disabled')) {
190
- tabs = $(this).parents('.tabs');
191
- tabs.find('> ul li a').removeClass('active');
192
- $(this).addClass('active');
193
- tabs.children('div').removeClass('active');
194
- tabs.children($(this).attr('href')).addClass('active');
195
- }
41
+ $('a.modal').on("click", function(e) {
42
+ $('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0" width="100%" height="100%" src="' + $(this).attr('data-url') + '"></iframe>');
196
43
  e.preventDefault();
197
44
  return false;
198
45
  });
199
- $('.responsive').not('table').each(function(index, object) {
200
- var compression, max, min;
201
- compression = 10;
202
- min = 10;
203
- max = 200;
204
- compression = parseFloat($(this).attr('data-compression') || compression);
205
- min = parseFloat($(this).attr('data-min') || min);
206
- max = parseFloat($(this).attr('data-max') || max);
207
- return $(object).responsiveText({
208
- compressor: compression,
209
- minSize: min,
210
- maxSize: max
46
+ elems = [];
47
+ $.fn.modal = function() {
48
+ this.each(function() {
49
+ var $this;
50
+ $(this).not('#iframeModal').wrapInner('<div class="modal-content"></div>');
51
+ $(this).prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>').appendTo('body');
52
+ $this = $(this);
53
+ return $('[href=#' + $(this).attr('id') + ']').on("click", function(e) {
54
+ modals.open($(this).attr('href'), $(this).hasClass('fullscreen'));
55
+ e.preventDefault();
56
+ return false;
57
+ });
211
58
  });
212
- });
213
- $('table.responsive').each(function(index, object) {
214
- var compression, max, min, padding;
215
- compression = 30;
216
- min = 8;
217
- max = 13;
218
- padding = 0;
219
- compression = parseFloat($(this).attr('data-compression') || compression);
220
- min = parseFloat($(this).attr('data-min') || min);
221
- max = parseFloat($(this).attr('data-max') || max);
222
- padding = parseFloat($(this).attr('data-padding') || padding);
223
- return $(object).responsiveTable({
224
- compressor: compression,
225
- minSize: min,
226
- maxSize: max,
227
- padding: padding
59
+ $('div.modal .close').on("click", function() {
60
+ return modals.close();
228
61
  });
229
- });
230
- $('.tooltip[title]').tooltip();
231
- return $('div.modal').modal();
232
- });
233
-
234
- $(window).resize(function() {
235
- limitPaginationItems();
236
- return equalizeColumns();
237
- });
238
-
239
- limitPaginationItems = function() {
240
- return $('.pagination ul').each(function() {
241
- var pagination, visibleItemsWidth, visibleSpace, _results;
242
- pagination = $(this);
243
- visibleSpace = pagination.outerWidth() - pagination.children('li.prev').outerWidth() - pagination.children('li.next').outerWidth();
244
- pagination.children('li').not('.prev, .next, .active').hide();
245
- visibleItemsWidth = 0;
246
- pagination.children('li:visible').each(function() {
247
- return visibleItemsWidth += $(this).outerWidth();
62
+ return $('div.modal .fullscreen').on("click", function() {
63
+ return modals.fullscreen($(this).parent('div.modal'));
248
64
  });
249
- _results = [];
250
- while ((visibleItemsWidth + 29) < visibleSpace) {
251
- pagination.children('li:visible').not('.next').last().next().show();
252
- visibleItemsWidth = 0;
253
- pagination.children('li:visible').each(function() {
254
- return visibleItemsWidth += $(this).outerWidth();
65
+ };
66
+ modals = (function() {
67
+ var close, fullscreen, open;
68
+ $('body').addClass('modal-ready');
69
+ if ($("#overlay").length < 1) {
70
+ $('body').append('<div id="overlay"></div>');
71
+ }
72
+ $('#overlay, div.modal .close').bind("click", function(e) {
73
+ return close();
74
+ });
75
+ open = function(elem, fullscreen) {
76
+ $(window).bind("keydown", function(e) {
77
+ var keyCode;
78
+ keyCode = (e.which ? e.which : e.keyCode);
79
+ if (keyCode === 27) {
80
+ return close();
81
+ }
255
82
  });
256
- if ((visibleItemsWidth + 29) <= visibleSpace) {
257
- pagination.children('li:visible').not('.prev').first().prev().show();
258
- visibleItemsWidth = 0;
259
- pagination.children('li:visible').each(function() {
260
- return visibleItemsWidth += $(this).outerWidth();
83
+ $(elem).addClass("active");
84
+ if (!$(elem).hasClass('iframe')) {
85
+ $(elem).css({
86
+ width: 'auto',
87
+ height: 'auto'
88
+ });
89
+ $(elem).css({
90
+ height: $(elem).outerHeight()
261
91
  });
262
92
  }
263
- visibleItemsWidth = 0;
264
- _results.push(pagination.children('li:visible').each(function() {
265
- return visibleItemsWidth += $(this).outerWidth();
266
- }));
267
- }
268
- return _results;
269
- });
270
- };
271
-
272
- equalizeColumns = function() {
273
- return $('.row.equalize').each(function() {
274
- var $row, collapsed, tallest;
275
- $row = $(this);
276
- tallest = 0;
277
- collapsed = false;
278
- $(this).children('*').each(function(i) {
279
- $(this).css('min-height', '0');
280
- collapsed = $(this).outerWidth() === $row.outerWidth();
281
- if (!collapsed) {
282
- if (!$(this).hasClass('equal')) {
283
- $(this).addClass('equal');
284
- }
285
- if ($(this).outerHeight() > tallest) {
286
- return tallest = $(this).outerHeight();
287
- }
93
+ $(elem).css({
94
+ top: '50%',
95
+ left: '50%',
96
+ 'margin-top': ($(elem).outerHeight() / -2) + 'px',
97
+ 'margin-left': ($(elem).outerWidth() / -2) + 'px'
98
+ });
99
+ setTimeout(function() {
100
+ return $('body').addClass("modal-active");
101
+ }, 0);
102
+ setTimeout(function() {
103
+ return $('body').removeClass('modal-ready');
104
+ }, 400);
105
+ if (fullscreen) {
106
+ modals.fullscreen(elem);
288
107
  }
289
- });
290
- if (!collapsed) {
291
- return $(this).children('*').css('min-height', tallest);
292
- }
108
+ };
109
+ close = function() {
110
+ var modal;
111
+ modal = $('div.modal.active');
112
+ $(window).unbind("keydown");
113
+ $('body').removeClass("modal-active").addClass('modal-ready');
114
+ if (modal.hasClass('iframe')) {
115
+ $('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0"></iframe>');
116
+ modal.css({
117
+ width: '80%',
118
+ height: '80%'
119
+ });
120
+ } else {
121
+ modal.css({
122
+ width: 'auto',
123
+ height: 'auto'
124
+ });
125
+ }
126
+ modal.css({
127
+ top: '10%',
128
+ left: '10%',
129
+ 'max-width': '80%',
130
+ 'max-height': '80%',
131
+ 'margin-top': 0,
132
+ 'margin-left': 0
133
+ });
134
+ modal.removeClass("active").removeClass("fullscreen");
135
+ $('i.fullscreen', modal).removeClass('icon-resize-small').addClass('icon-resize-full');
136
+ };
137
+ fullscreen = function(elem) {
138
+ if ($('div.modal.active').hasClass('fullscreen')) {
139
+ $('div.modal i.fullscreen').removeClass('icon-resize-small').addClass('icon-resize-full');
140
+ if ($('div.modal.active').hasClass('iframe')) {
141
+ $('div.modal.active').css({
142
+ width: '80%',
143
+ height: '80%'
144
+ });
145
+ } else {
146
+ $('div.modal.active').css({
147
+ width: 'auto',
148
+ height: 'auto'
149
+ });
150
+ $('div.modal.active').css({
151
+ height: $('div.modal.active').outerHeight()
152
+ });
153
+ }
154
+ $('div.modal.active').removeClass('fullscreen').css({
155
+ 'max-width': '80%',
156
+ 'max-height': '80%'
157
+ });
158
+ $('div.modal.active').delay(100).css({
159
+ top: '50%',
160
+ left: '50%',
161
+ 'margin-top': ($('div.modal.active').outerHeight() / -2) + 'px',
162
+ 'margin-left': ($('div.modal.active').outerWidth() / -2) + 'px'
163
+ });
164
+ } else {
165
+ $('div.modal i.fullscreen').addClass('icon-resize-small').removeClass('icon-resize-full');
166
+ $('div.modal.active').addClass('fullscreen').css({
167
+ top: 0,
168
+ left: 0,
169
+ 'margin-top': 0,
170
+ 'margin-left': 0,
171
+ width: '100%',
172
+ height: '100%',
173
+ 'max-width': '100%',
174
+ 'max-height': '100%'
175
+ });
176
+ }
177
+ };
178
+ return {
179
+ open: open,
180
+ close: close,
181
+ fullscreen: fullscreen
182
+ };
183
+ })();
184
+ return $(window).resize(function() {
185
+ return $('div.modal.active').each(function() {
186
+ if (!$(this).hasClass('fullscreen')) {
187
+ $(this).removeClass('active').css({
188
+ top: '50%',
189
+ left: '50%',
190
+ 'margin-top': ($(this).outerHeight() / -2) + 'px',
191
+ 'margin-left': ($(this).outerWidth() / -2) + 'px'
192
+ }).addClass('active');
193
+ if (!$(this).hasClass('iframe')) {
194
+ $(this).css({
195
+ height: 'auto'
196
+ });
197
+ return $(this).css({
198
+ height: $(this).outerHeight()
199
+ });
200
+ }
201
+ }
202
+ });
293
203
  });
294
- };
204
+ })(jQuery);
205
+
206
+ /* --------------------------------------------
207
+ Begin jquery.responsiveTables.coffee
208
+ --------------------------------------------
209
+ */
210
+
211
+
212
+ /*
213
+ *
214
+ * jQuery ResponsiveTables by Gary Hepting - https://github.com/ghepting/responsiveTables
215
+ *
216
+ * Open source under the BSD License.
217
+ *
218
+ * Copyright © 2013 Gary Hepting. All rights reserved.
219
+ *
220
+ */
221
+
222
+
223
+ (function($) {
224
+ var elems;
225
+ elems = [];
226
+ $.fn.responsiveTable = function(options) {
227
+ var settings;
228
+ settings = {
229
+ compressor: options.compressor || 10,
230
+ minSize: options.minSize || Number.NEGATIVE_INFINITY,
231
+ maxSize: options.maxSize || Number.POSITIVE_INFINITY,
232
+ padding: 2,
233
+ height: "auto",
234
+ adjust_parents: true
235
+ };
236
+ return this.each(function() {
237
+ var columns, elem, fontSize, rows;
238
+ elem = $(this);
239
+ elem.attr('data-compression', settings.compressor);
240
+ elem.attr('data-min', settings.minSize);
241
+ elem.attr('data-max', settings.maxSize);
242
+ elem.attr('data-padding', settings.padding);
243
+ columns = $("tr", elem).first().children("th, td").length;
244
+ rows = $("tr", elem).length;
245
+ if (settings.height !== "auto") {
246
+ $this.css("height", settings.height);
247
+ if (settings.adjust_parents) {
248
+ $this.parents().each(function() {
249
+ return $(this).css("height", "100%");
250
+ });
251
+ }
252
+ }
253
+ $("tr th, tr td", elem).css("width", Math.floor(100 / columns) + "%");
254
+ $("tr th, tr td", elem).css("height", Math.floor(100 / rows) + "%");
255
+ fontSize = Math.floor(Math.max(Math.min(elem.width() / settings.compressor, parseFloat(settings.maxSize)), parseFloat(settings.minSize)));
256
+ $("tr th, tr td", elem).css("font-size", fontSize + "px");
257
+ return elems.push(elem);
258
+ });
259
+ };
260
+ return $(window).on("resize", function() {
261
+ return $(elems).each(function() {
262
+ var elem, fontSize;
263
+ elem = $(this);
264
+ fontSize = Math.floor(Math.max(Math.min(elem.width() / (elem.attr('data-compression')), parseFloat(elem.attr('data-max'))), parseFloat(elem.attr('data-min'))));
265
+ return $("tr th, tr td", elem).css("font-size", fontSize + "px");
266
+ });
267
+ });
268
+ })(jQuery);
269
+
270
+ /* --------------------------------------------
271
+ Begin jquery.responsiveText.coffee
272
+ --------------------------------------------
273
+ */
274
+
275
+
276
+ /*
277
+ *
278
+ * jQuery ResponsiveText by Gary Hepting - https://github.com/ghepting/responsiveText
279
+ *
280
+ * Open source under the BSD License.
281
+ *
282
+ * Copyright © 2013 Gary Hepting. All rights reserved.
283
+ *
284
+ */
285
+
286
+
287
+ (function($) {
288
+ var elems;
289
+ elems = [];
290
+ $.fn.responsiveText = function(options) {
291
+ var settings;
292
+ settings = {
293
+ compressor: options.compressor || 10,
294
+ minSize: options.minSize || Number.NEGATIVE_INFINITY,
295
+ maxSize: options.maxSize || Number.POSITIVE_INFINITY
296
+ };
297
+ return this.each(function() {
298
+ var elem;
299
+ elem = $(this);
300
+ elem.attr('data-compression', settings.compressor);
301
+ elem.attr('data-min', settings.minSize);
302
+ elem.attr('data-max', settings.maxSize);
303
+ elem.css("font-size", Math.floor(Math.max(Math.min(elem.width() / settings.compressor, parseFloat(settings.maxSize)), parseFloat(settings.minSize))));
304
+ return elems.push(elem);
305
+ });
306
+ };
307
+ return $(window).on("resize", function() {
308
+ return $(elems).each(function() {
309
+ var elem;
310
+ elem = $(this);
311
+ return elem.css("font-size", Math.floor(Math.max(Math.min(elem.width() / (elem.attr('data-compression')), parseFloat(elem.attr('data-max'))), parseFloat(elem.attr('data-min')))));
312
+ });
313
+ });
314
+ })(jQuery);
295
315
 
296
316
  /* --------------------------------------------
297
317
  Begin jquery.tooltip.coffee
@@ -427,304 +447,429 @@
427
447
  })(jQuery);
428
448
 
429
449
  /* --------------------------------------------
430
- Begin jquery.responsiveText.coffee
450
+ Begin disabled.coffee
431
451
  --------------------------------------------
432
452
  */
433
453
 
434
454
 
435
- /*
436
- *
437
- * jQuery ResponsiveText by Gary Hepting - https://github.com/ghepting/responsiveText
438
- *
439
- * Open source under the BSD License.
440
- *
441
- * Copyright © 2013 Gary Hepting. All rights reserved.
442
- *
443
- */
444
-
445
-
446
- (function($) {
447
- var elems;
448
- elems = [];
449
- $.fn.responsiveText = function(options) {
450
- var settings;
451
- settings = {
452
- compressor: options.compressor || 10,
453
- minSize: options.minSize || Number.NEGATIVE_INFINITY,
454
- maxSize: options.maxSize || Number.POSITIVE_INFINITY
455
- };
456
- return this.each(function() {
457
- var elem;
458
- elem = $(this);
459
- elem.attr('data-compression', settings.compressor);
460
- elem.attr('data-min', settings.minSize);
461
- elem.attr('data-max', settings.maxSize);
462
- elem.css("font-size", Math.floor(Math.max(Math.min(elem.width() / settings.compressor, parseFloat(settings.maxSize)), parseFloat(settings.minSize))));
463
- return elems.push(elem);
464
- });
465
- };
466
- return $(window).on("resize", function() {
467
- return $(elems).each(function() {
468
- var elem;
469
- elem = $(this);
470
- return elem.css("font-size", Math.floor(Math.max(Math.min(elem.width() / (elem.attr('data-compression')), parseFloat(elem.attr('data-max'))), parseFloat(elem.attr('data-min')))));
471
- });
455
+ $(function() {
456
+ $('.disabled').each(function() {
457
+ $(this).attr('tabindex', '-1');
458
+ $(this).find('a').attr('tabindex', '-1');
459
+ return $(this).find('input, select, textarea').addClass('disabled').attr('tabindex', '-1').attr('readonly', 'readyonly');
472
460
  });
473
- })(jQuery);
461
+ $('body').on('click', '.disabled, .disabled *', function(e) {
462
+ e.preventDefault();
463
+ return false;
464
+ });
465
+ });
474
466
 
475
467
  /* --------------------------------------------
476
- Begin jquery.responsiveTables.coffee
468
+ Begin equalizeColumns.coffee
477
469
  --------------------------------------------
478
470
  */
479
471
 
480
472
 
481
- /*
482
- *
483
- * jQuery ResponsiveTables by Gary Hepting - https://github.com/ghepting/responsiveTables
484
- *
485
- * Open source under the BSD License.
486
- *
487
- * Copyright © 2013 Gary Hepting. All rights reserved.
488
- *
489
- */
473
+ $(function() {
474
+ return equalizeColumns();
475
+ });
490
476
 
477
+ $(window).resize(function() {
478
+ return equalizeColumns();
479
+ });
491
480
 
492
- (function($) {
493
- var elems;
494
- elems = [];
495
- $.fn.responsiveTable = function(options) {
496
- var settings;
497
- settings = {
498
- compressor: options.compressor || 10,
499
- minSize: options.minSize || Number.NEGATIVE_INFINITY,
500
- maxSize: options.maxSize || Number.POSITIVE_INFINITY,
501
- padding: 2,
502
- height: "auto",
503
- adjust_parents: true
504
- };
505
- return this.each(function() {
506
- var columns, elem, fontSize, rows;
507
- elem = $(this);
508
- elem.attr('data-compression', settings.compressor);
509
- elem.attr('data-min', settings.minSize);
510
- elem.attr('data-max', settings.maxSize);
511
- elem.attr('data-padding', settings.padding);
512
- columns = $("tr", elem).first().children("th, td").length;
513
- rows = $("tr", elem).length;
514
- if (settings.height !== "auto") {
515
- $this.css("height", settings.height);
516
- if (settings.adjust_parents) {
517
- $this.parents().each(function() {
518
- return $(this).css("height", "100%");
519
- });
481
+ equalizeColumns = function() {
482
+ return $('.row.equalize').each(function() {
483
+ var $row, collapsed, tallest;
484
+ $row = $(this);
485
+ tallest = 0;
486
+ collapsed = false;
487
+ $(this).children('*').each(function(i) {
488
+ $(this).css('min-height', '1px');
489
+ collapsed = $(this).outerWidth() === $row.outerWidth();
490
+ if (!collapsed) {
491
+ if (!$(this).hasClass('equal')) {
492
+ $(this).addClass('equal');
493
+ }
494
+ if ($(this).outerHeight() > tallest) {
495
+ return tallest = $(this).outerHeight();
520
496
  }
521
497
  }
522
- $("tr th, tr td", elem).css("width", Math.floor(100 / columns) + "%");
523
- $("tr th, tr td", elem).css("height", Math.floor(100 / rows) + "%");
524
- fontSize = Math.floor(Math.max(Math.min(elem.width() / settings.compressor, parseFloat(settings.maxSize)), parseFloat(settings.minSize)));
525
- $("tr th, tr td", elem).css("font-size", fontSize + "px");
526
- return elems.push(elem);
527
498
  });
499
+ if (!collapsed) {
500
+ return $(this).children('*').css('min-height', tallest);
501
+ }
502
+ });
503
+ };
504
+
505
+ /* --------------------------------------------
506
+ Begin forms.coffee
507
+ --------------------------------------------
508
+ */
509
+
510
+
511
+ $(function() {
512
+ $('body').on('click', '\
513
+ .error input, \
514
+ .error textarea, \
515
+ .invalid input, \
516
+ .invalid textarea, \
517
+ input.error, \
518
+ textarea.error, \
519
+ input.invalid, \
520
+ textarea.invalid', function(e) {
521
+ return $(this).focus().select();
522
+ });
523
+ $('span.select select').each(function() {
524
+ if ($(this).children('option').first().val() === '' && $(this).children('option').first().attr('selected')) {
525
+ return $(this).addClass('unselected');
526
+ } else {
527
+ return $(this).removeClass('unselected');
528
+ }
529
+ });
530
+ $('body').on('change', 'span.select select', function(e) {
531
+ if ($(this).children('option').first().val() === '' && $(this).children('option').first().attr('selected')) {
532
+ return $(this).addClass('unselected');
533
+ } else {
534
+ return $(this).removeClass('unselected');
535
+ }
536
+ });
537
+ });
538
+
539
+ /* --------------------------------------------
540
+ Begin menus.coffee
541
+ --------------------------------------------
542
+ */
543
+
544
+
545
+ $(function() {
546
+ var delay, openMenu,
547
+ _this = this;
548
+ delay = '';
549
+ openMenu = function(target) {
550
+ return $(target).parent('li.menu').toggleClass('on');
528
551
  };
529
- return $(window).on("resize", function() {
530
- return $(elems).each(function() {
531
- var elem, fontSize;
532
- elem = $(this);
533
- fontSize = Math.floor(Math.max(Math.min(elem.width() / (elem.attr('data-compression')), parseFloat(elem.attr('data-max'))), parseFloat(elem.attr('data-min'))));
534
- return $("tr th, tr td", elem).css("font-size", fontSize + "px");
535
- });
552
+ $('body').on('mouseenter', '.nav > ul > li.menu:not(.disabled)', function(e) {
553
+ if ($(window).width() >= 768) {
554
+ clearTimeout(delay);
555
+ $('.nav > ul > li.menu.on').removeClass('on');
556
+ return $(this).addClass('on');
557
+ }
536
558
  });
537
- })(jQuery);
559
+ $('body').on('mouseleave', '.nav > ul > li.menu:not(.disabled)', function(e) {
560
+ if ($(window).width() >= 768) {
561
+ return delay = setTimeout((function() {
562
+ return $('.nav > ul > li.menu.on').removeClass('on');
563
+ }), 350);
564
+ }
565
+ });
566
+ $('body').on('click', '.nav > ul > li.menu:not(.disabled) > a', function(e) {
567
+ if (Modernizr.touch || $(window).width() < 768) {
568
+ openMenu(e.target);
569
+ } else {
570
+ $('.nav > ul > li.menu.on').removeClass('on');
571
+ $(e.target).parents('li.menu').addClass('on');
572
+ }
573
+ e.preventDefault();
574
+ return false;
575
+ });
576
+ $('body').on('focus', '.nav > ul > li:not(.on) > a', function() {
577
+ return $('.nav > ul > li.menu.on').removeClass('on');
578
+ });
579
+ $('body').on('focus', '.nav > ul > li.menu > a', function(e) {
580
+ openMenu(e.target);
581
+ e.preventDefault();
582
+ return false;
583
+ });
584
+ $('body').on('click', function(e) {
585
+ if ($(e.target).hasClass('dropdown')) {
586
+ $(e.target).toggleClass('on');
587
+ } else {
588
+ if ($('.dropdown').filter('.on').length) {
589
+ $('.dropdown').filter('.on').removeClass('on');
590
+ }
591
+ }
592
+ if ($('.nav > ul > li').filter('.menu.on').length) {
593
+ return $('.nav > ul > li').filter('.menu.on').removeClass('on');
594
+ }
595
+ });
596
+ $('body').on('focus', '.dropdown', function(e) {
597
+ return $(this).addClass('on');
598
+ });
599
+ $('body').on('blur', '.dropdown li:last-child a', function(e) {
600
+ return $('.dropdown').filter('.on').removeClass('on');
601
+ });
602
+ $('.nav.menu').each(function() {
603
+ if (!$(this).attr('data-label')) {
604
+ $(this).attr('data-label', 'Menu');
605
+ }
606
+ if (!($(this).find('.menu-toggle').length > 0)) {
607
+ return $(this).prepend('<a href="#" class="menu-toggle"><i class="icon-reorder"></i></a>');
608
+ }
609
+ });
610
+ $('body').on('click', '.nav.menu .menu-toggle', function(e) {
611
+ $(this).parent('.nav.menu').toggleClass('on');
612
+ e.preventDefault();
613
+ return false;
614
+ });
615
+ $('body').on('focus', '.menu-toggle', function(e) {
616
+ return $(e.target).parent('.nav.menu').addClass('on');
617
+ });
618
+ $('body').on('blur', '.nav.menu > ul > li:last-child a', function(e) {
619
+ return $('.nav.menu').filter('.on').removeClass('on');
620
+ });
621
+ });
622
+
623
+ $(window).on('resize', function() {
624
+ if ($('.nav > ul > li.menu.on').length > 1) {
625
+ return $('.nav > ul > li.menu.on').removeClass('on').first().addClass('on');
626
+ }
627
+ });
538
628
 
539
629
  /* --------------------------------------------
540
- Begin jquery.modals.coffee
630
+ Begin modals.coffee
541
631
  --------------------------------------------
542
632
  */
543
633
 
544
634
 
545
635
  /*
546
- *
547
- * jQuery Modals by Gary Hepting
548
- * https://github.com/ghepting/modal
549
- *
550
- * Based on Avgrund by Hakim El Hattab <3
551
- *
636
+ * Requires jquery.modals.js
552
637
  */
553
638
 
554
639
 
555
- (function($) {
556
- var elems, modals;
557
- if ($('div#iframeModal').length < 1) {
558
- $('body').append('<div class="iframe modal" id="iframeModal"><iframe marginheight="0" marginwidth="0" frameborder="0"></iframe></div>');
559
- $('div#iframeModal').prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>');
560
- }
561
- $('a.modal').each(function() {
562
- $(this).attr('data-url', $(this).attr('href'));
563
- return $(this).attr('href', '#iframeModal');
640
+ $(function() {
641
+ return $('div.modal, div[role=dialog]').modal();
642
+ });
643
+
644
+ /* --------------------------------------------
645
+ Begin pagination.coffee
646
+ --------------------------------------------
647
+ */
648
+
649
+
650
+ $(function() {
651
+ limitPaginationItems();
652
+ $('body').on('click', '.pagination ul > li:not(.next, .prev) a', function(e) {
653
+ $('.pagination ul > li:not(.next, .prev)').removeClass('active');
654
+ $(this).parent('li').addClass('active');
655
+ if ($(this).parent('li').hasClass('first')) {
656
+ $('.pagination ul > li.prev').addClass('disabled');
657
+ } else {
658
+ $('.pagination ul > li.prev').removeClass('disabled');
659
+ }
660
+ if ($(this).parent('li').hasClass('last')) {
661
+ $('.pagination ul > li.next').addClass('disabled');
662
+ } else {
663
+ $('.pagination ul > li.next').removeClass('disabled');
664
+ }
665
+ limitPaginationItems();
666
+ e.preventDefault();
667
+ return false;
564
668
  });
565
- $('a.modal').on("click", function(e) {
566
- $('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0" width="100%" height="100%" src="' + $(this).attr('data-url') + '"></iframe>');
669
+ $('body').on('click', '.pagination ul > li.prev:not(.disabled)', function(e) {
670
+ var el;
671
+ $('.pagination ul > li.next').removeClass('disabled');
672
+ el = $('.pagination ul > li.active');
673
+ if (!el.hasClass('first')) {
674
+ el.removeClass('active');
675
+ el.prev().addClass('active');
676
+ limitPaginationItems();
677
+ }
678
+ if ($('.pagination ul > li.active').hasClass('first')) {
679
+ $(this).addClass('disabled');
680
+ }
567
681
  e.preventDefault();
568
682
  return false;
569
683
  });
570
- elems = [];
571
- $.fn.modal = function() {
572
- this.each(function() {
573
- var $this;
574
- $(this).not('#iframeModal').wrapInner('<div class="modal-content"></div>');
575
- $(this).prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>').appendTo('body');
576
- $this = $(this);
577
- return $('[href=#' + $(this).attr('id') + ']').on("click", function(e) {
578
- modals.open($(this).attr('href'), $(this).hasClass('fullscreen'));
579
- e.preventDefault();
580
- return false;
581
- });
582
- });
583
- $('div.modal .close').on("click", function() {
584
- return modals.close();
585
- });
586
- return $('div.modal .fullscreen').on("click", function() {
587
- return modals.fullscreen($(this).parent('div.modal'));
588
- });
589
- };
590
- modals = (function() {
591
- var close, fullscreen, open;
592
- $('body').addClass('modal-ready');
593
- if ($("#overlay").length < 1) {
594
- $('body').append('<div id="overlay"></div>');
684
+ $('body').on('click', '.pagination ul > li.next:not(.disabled)', function(e) {
685
+ var el;
686
+ $('.pagination ul > li.prev').removeClass('disabled');
687
+ el = $('.pagination ul > li.active');
688
+ if (!el.hasClass('last')) {
689
+ el.removeClass('active');
690
+ el.next().addClass('active');
691
+ limitPaginationItems();
595
692
  }
596
- $('#overlay, div.modal .close').bind("click", function(e) {
597
- return close();
693
+ if ($('.pagination ul > li.active').hasClass('last')) {
694
+ $(this).addClass('disabled');
695
+ }
696
+ e.preventDefault();
697
+ return false;
698
+ });
699
+ $('body').on('click', '.pagination ul > li.disabled a', function(e) {
700
+ e.preventDefault();
701
+ return false;
702
+ });
703
+ });
704
+
705
+ $(window).resize(function() {
706
+ return limitPaginationItems();
707
+ });
708
+
709
+ limitPaginationItems = function() {
710
+ return $('.pagination ul').each(function() {
711
+ var pagination, totalItemsWidth, visibleItemsWidth, visibleSpace, _results;
712
+ pagination = $(this);
713
+ visibleSpace = pagination.outerWidth() - pagination.children('li.prev').outerWidth() - pagination.children('li.next').outerWidth();
714
+ totalItemsWidth = 0;
715
+ pagination.children('li').each(function() {
716
+ return totalItemsWidth += $(this).outerWidth();
598
717
  });
599
- open = function(elem, fullscreen) {
600
- $(window).bind("keydown", function(e) {
601
- var keyCode;
602
- keyCode = (e.which ? e.which : e.keyCode);
603
- if (keyCode === 27) {
604
- return close();
605
- }
606
- });
607
- $(elem).addClass("active");
608
- if (!$(elem).hasClass('iframe')) {
609
- $(elem).css({
610
- width: 'auto',
611
- height: 'auto'
612
- });
613
- $(elem).css({
614
- height: $(elem).outerHeight()
615
- });
616
- }
617
- $(elem).css({
618
- top: '50%',
619
- left: '50%',
620
- 'margin-top': ($(elem).outerHeight() / -2) + 'px',
621
- 'margin-left': ($(elem).outerWidth() / -2) + 'px'
718
+ pagination.children('li').not('.prev, .next, .active').hide();
719
+ visibleItemsWidth = 0;
720
+ pagination.children('li:visible').each(function() {
721
+ return visibleItemsWidth += $(this).outerWidth();
722
+ });
723
+ _results = [];
724
+ while ((visibleItemsWidth + 29) < visibleSpace && (visibleItemsWidth + 29) < totalItemsWidth) {
725
+ pagination.children('li:visible').not('.next').last().next().show();
726
+ visibleItemsWidth = 0;
727
+ pagination.children('li:visible').each(function() {
728
+ return visibleItemsWidth += $(this).outerWidth();
622
729
  });
623
- setTimeout(function() {
624
- return $('body').addClass("modal-active");
625
- }, 0);
626
- setTimeout(function() {
627
- return $('body').removeClass('modal-ready');
628
- }, 400);
629
- if (fullscreen) {
630
- modals.fullscreen(elem);
631
- }
632
- };
633
- close = function() {
634
- var modal;
635
- modal = $('div.modal.active');
636
- $(window).unbind("keydown");
637
- $('body').removeClass("modal-active").addClass('modal-ready');
638
- if (modal.hasClass('iframe')) {
639
- $('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0"></iframe>');
640
- modal.css({
641
- width: '80%',
642
- height: '80%'
643
- });
644
- } else {
645
- modal.css({
646
- width: 'auto',
647
- height: 'auto'
730
+ if ((visibleItemsWidth + 29) <= visibleSpace) {
731
+ pagination.children('li:visible').not('.prev').first().prev().show();
732
+ visibleItemsWidth = 0;
733
+ pagination.children('li:visible').each(function() {
734
+ return visibleItemsWidth += $(this).outerWidth();
648
735
  });
649
736
  }
650
- modal.css({
651
- top: '10%',
652
- left: '10%',
653
- 'max-width': '80%',
654
- 'max-height': '80%',
655
- 'margin-top': 0,
656
- 'margin-left': 0
657
- });
658
- modal.removeClass("active").removeClass("fullscreen");
659
- $('i.fullscreen', modal).removeClass('icon-resize-small').addClass('icon-resize-full');
660
- };
661
- fullscreen = function(elem) {
662
- if ($('div.modal.active').hasClass('fullscreen')) {
663
- $('div.modal i.fullscreen').removeClass('icon-resize-small').addClass('icon-resize-full');
664
- if ($('div.modal.active').hasClass('iframe')) {
665
- $('div.modal.active').css({
666
- width: '80%',
667
- height: '80%'
668
- });
669
- } else {
670
- $('div.modal.active').css({
671
- width: 'auto',
672
- height: 'auto'
673
- });
674
- $('div.modal.active').css({
675
- height: $('div.modal.active').outerHeight()
676
- });
677
- }
678
- $('div.modal.active').removeClass('fullscreen').css({
679
- 'max-width': '80%',
680
- 'max-height': '80%'
681
- });
682
- $('div.modal.active').delay(100).css({
683
- top: '50%',
684
- left: '50%',
685
- 'margin-top': ($('div.modal.active').outerHeight() / -2) + 'px',
686
- 'margin-left': ($('div.modal.active').outerWidth() / -2) + 'px'
687
- });
737
+ visibleItemsWidth = 0;
738
+ _results.push(pagination.children('li:visible').each(function() {
739
+ return visibleItemsWidth += $(this).outerWidth();
740
+ }));
741
+ }
742
+ return _results;
743
+ });
744
+ };
745
+
746
+ /* --------------------------------------------
747
+ Begin responsiveTables.coffee
748
+ --------------------------------------------
749
+ */
750
+
751
+
752
+ /*
753
+ * Requires jquery.responsiveText.js
754
+ */
755
+
756
+
757
+ $(function() {
758
+ return $('table.responsive').each(function(index, object) {
759
+ var compression, max, min, padding;
760
+ compression = 30;
761
+ min = 8;
762
+ max = 13;
763
+ padding = 0;
764
+ compression = parseFloat($(this).attr('data-compression') || compression);
765
+ min = parseFloat($(this).attr('data-min') || min);
766
+ max = parseFloat($(this).attr('data-max') || max);
767
+ padding = parseFloat($(this).attr('data-padding') || padding);
768
+ return $(object).responsiveTable({
769
+ compressor: compression,
770
+ minSize: min,
771
+ maxSize: max,
772
+ padding: padding
773
+ });
774
+ });
775
+ });
776
+
777
+ /* --------------------------------------------
778
+ Begin responsiveText.coffee
779
+ --------------------------------------------
780
+ */
781
+
782
+
783
+ /*
784
+ * Requires jquery.responsiveText.js
785
+ */
786
+
787
+
788
+ $(function() {
789
+ return $('.responsive').not('table').each(function(index, object) {
790
+ var compression, max, min;
791
+ compression = 10;
792
+ min = 10;
793
+ max = 200;
794
+ compression = parseFloat($(this).attr('data-compression') || compression);
795
+ min = parseFloat($(this).attr('data-min') || min);
796
+ max = parseFloat($(this).attr('data-max') || max);
797
+ return $(object).responsiveText({
798
+ compressor: compression,
799
+ minSize: min,
800
+ maxSize: max
801
+ });
802
+ });
803
+ });
804
+
805
+ /* --------------------------------------------
806
+ Begin tabs.coffee
807
+ --------------------------------------------
808
+ */
809
+
810
+
811
+ $(function() {
812
+ return $('body').on('click', '.tabs > ul li a[href^=#], [role=tab] a', function(e) {
813
+ var tabs;
814
+ if (!$(this).hasClass('disabled')) {
815
+ if ($(this).parents('[role=tabpanel]').length > 0) {
816
+ tabs = $(this).parents('[role=tabpanel]');
688
817
  } else {
689
- $('div.modal i.fullscreen').addClass('icon-resize-small').removeClass('icon-resize-full');
690
- $('div.modal.active').addClass('fullscreen').css({
691
- top: 0,
692
- left: 0,
693
- 'margin-top': 0,
694
- 'margin-left': 0,
695
- width: '100%',
696
- height: '100%',
697
- 'max-width': '100%',
698
- 'max-height': '100%'
699
- });
818
+ tabs = $(this).parents('.tabs');
700
819
  }
701
- };
702
- return {
703
- open: open,
704
- close: close,
705
- fullscreen: fullscreen
706
- };
707
- })();
708
- return $(window).resize(function() {
709
- return $('div.modal.active').each(function() {
710
- if (!$(this).hasClass('fullscreen')) {
711
- $(this).removeClass('active').css({
712
- top: '50%',
713
- left: '50%',
714
- 'margin-top': ($(this).outerHeight() / -2) + 'px',
715
- 'margin-left': ($(this).outerWidth() / -2) + 'px'
716
- }).addClass('active');
717
- if (!$(this).hasClass('iframe')) {
718
- $(this).css({
719
- height: 'auto'
720
- });
721
- return $(this).css({
722
- height: $(this).outerHeight()
723
- });
724
- }
725
- }
726
- });
820
+ tabs.find('> ul li a, [role=tab] a').removeClass('active');
821
+ $(this).addClass('active');
822
+ tabs.children('div, [role=tabpanel]').removeClass('active');
823
+ tabs.children($(this).attr('href')).addClass('active');
824
+ }
825
+ e.preventDefault();
826
+ return false;
727
827
  });
728
- })(jQuery);
828
+ });
829
+
830
+ /* --------------------------------------------
831
+ Begin tiles.coffee
832
+ --------------------------------------------
833
+ */
834
+
835
+
836
+ $(function() {
837
+ $('.tiles').each(function() {
838
+ $(this).find('.tile').attr('role', 'button');
839
+ return $(this).find('.tile[data-value=' + $(this).find('input.value, select.value').val() + ']').addClass('active');
840
+ });
841
+ $('body').on('click', '.tiles .tile', function(e) {
842
+ var tiles;
843
+ if (!$(this).hasClass('disabled')) {
844
+ tiles = $(this).parents('.tiles');
845
+ tiles.find('.tile').removeClass('active');
846
+ tiles.find('input.value, select.value').val($(this).data('value')).change();
847
+ $(this).addClass('active');
848
+ }
849
+ e.preventDefault();
850
+ return false;
851
+ });
852
+ return $('body').on('change', '.tiles input.value, .tiles select.value', function(e) {
853
+ var tiles;
854
+ tiles = $(this).parents('.tiles');
855
+ tiles.find('.tile').removeClass('active');
856
+ return tiles.find('.tile[data-value=' + $(this).val() + ']').addClass('active');
857
+ });
858
+ });
859
+
860
+ /* --------------------------------------------
861
+ Begin tooltips.coffee
862
+ --------------------------------------------
863
+ */
864
+
865
+
866
+ /*
867
+ * Requires jquery.tooltips.js
868
+ */
869
+
870
+
871
+ $(function() {
872
+ return $('.tooltip[title]').tooltip();
873
+ });
729
874
 
730
875
  }).call(this);