groundworkcss-rails 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/lib/groundworkcss/rails/version.rb +1 -1
  2. data/lib/groundworkcss/rails/version.rb~ +1 -1
  3. data/vendor/assets/javascripts/groundworkcss/components/disabled.js +13 -12
  4. data/vendor/assets/javascripts/groundworkcss/components/equalizeColumns.js +31 -28
  5. data/vendor/assets/javascripts/groundworkcss/components/forms.js +21 -20
  6. data/vendor/assets/javascripts/groundworkcss/components/menus.js +88 -78
  7. data/vendor/assets/javascripts/groundworkcss/components/modals.js +7 -4
  8. data/vendor/assets/javascripts/groundworkcss/components/pagination.js +87 -82
  9. data/vendor/assets/javascripts/groundworkcss/components/responsiveTables.js +22 -18
  10. data/vendor/assets/javascripts/groundworkcss/components/responsiveText.js +38 -31
  11. data/vendor/assets/javascripts/groundworkcss/components/tabs.js +19 -17
  12. data/vendor/assets/javascripts/groundworkcss/components/tiles.js +24 -21
  13. data/vendor/assets/javascripts/groundworkcss/components/tooltips.js +7 -4
  14. data/vendor/assets/javascripts/groundworkcss/groundwork.all.js +974 -821
  15. data/vendor/assets/javascripts/groundworkcss/plugins/jquery-modals.js +193 -0
  16. data/vendor/assets/javascripts/groundworkcss/plugins/jquery-popover.js +208 -0
  17. data/vendor/assets/javascripts/groundworkcss/plugins/jquery-responsiveTables.js +64 -0
  18. data/vendor/assets/javascripts/groundworkcss/plugins/jquery-responsiveText.js +46 -0
  19. data/vendor/assets/javascripts/groundworkcss/plugins/jquery-tooltip.js +137 -0
  20. data/vendor/assets/stylesheets/groundworkcss-scss/_settings.scss +149 -0
  21. data/vendor/assets/stylesheets/groundworkcss-scss/base/_all.scss +11 -0
  22. data/vendor/assets/stylesheets/groundworkcss-scss/{_animations.scss → base/_animations.scss} +7 -3
  23. data/vendor/assets/stylesheets/groundworkcss-scss/{_global.scss → base/_global.scss} +27 -10
  24. data/vendor/assets/stylesheets/groundworkcss-scss/{_grid.scss → base/_grid.scss} +5 -3
  25. data/vendor/assets/stylesheets/groundworkcss-scss/{_helpers.scss → base/_helpers.scss} +61 -18
  26. data/vendor/assets/stylesheets/groundworkcss-scss/{_reset.scss → base/_reset.scss} +36 -31
  27. data/vendor/assets/stylesheets/groundworkcss-scss/core/_all.scss +11 -0
  28. data/vendor/assets/stylesheets/groundworkcss-scss/{_variables.scss → core/_constants.scss} +7 -58
  29. data/vendor/assets/stylesheets/groundworkcss-scss/core/_defaults.scss +150 -0
  30. data/vendor/assets/stylesheets/groundworkcss-scss/{_mixins.scss → core/_mixins.scss} +6 -97
  31. data/vendor/assets/stylesheets/groundworkcss-scss/form/_all.scss +10 -0
  32. data/vendor/assets/stylesheets/groundworkcss-scss/{_forms.scss → form/_forms.scss} +96 -80
  33. data/vendor/assets/stylesheets/groundworkcss-scss/form/_tiles.scss +100 -0
  34. data/vendor/assets/stylesheets/groundworkcss-scss/groundwork-ie.scss +10 -8
  35. data/vendor/assets/stylesheets/groundworkcss-scss/groundwork.scss +12 -32
  36. data/vendor/assets/stylesheets/groundworkcss-scss/{_popovers.scss → misc/_all.scss} +3 -4
  37. data/vendor/assets/stylesheets/groundworkcss-scss/{_social-icons.scss → misc/_social-icons.scss} +4 -0
  38. data/vendor/assets/stylesheets/groundworkcss-scss/nav/_all.scss +11 -0
  39. data/vendor/assets/stylesheets/groundworkcss-scss/nav/_buttons.scss +328 -0
  40. data/vendor/assets/stylesheets/groundworkcss-scss/{_navigation.scss → nav/_navigation.scss} +8 -5
  41. data/vendor/assets/stylesheets/groundworkcss-scss/nav/_tabs.scss +230 -0
  42. data/vendor/assets/stylesheets/groundworkcss-scss/no-svg.scss +9 -7
  43. data/vendor/assets/stylesheets/groundworkcss-scss/responsive/_all.scss +13 -0
  44. data/vendor/assets/stylesheets/groundworkcss-scss/responsive/_desktop.scss +26 -0
  45. data/vendor/assets/stylesheets/groundworkcss-scss/responsive/_helpers.scss +16 -0
  46. data/vendor/assets/stylesheets/groundworkcss-scss/responsive/_ipad.scss +28 -0
  47. data/vendor/assets/stylesheets/groundworkcss-scss/responsive/_mobile.scss +44 -0
  48. data/vendor/assets/stylesheets/groundworkcss-scss/responsive/_small-tablet.scss +196 -0
  49. data/vendor/assets/stylesheets/groundworkcss-scss/type/_all.scss +9 -0
  50. data/vendor/assets/stylesheets/groundworkcss-scss/{_font-awesome.scss → type/_font-awesome.scss} +10 -2
  51. data/vendor/assets/stylesheets/groundworkcss-scss/{_typography.scss → type/_typography.scss} +172 -60
  52. data/vendor/assets/stylesheets/groundworkcss-scss/type/_webfonts.scss +28 -0
  53. data/vendor/assets/stylesheets/groundworkcss-scss/{_ui-elements.scss → ui/_all.scss} +4 -0
  54. data/vendor/assets/stylesheets/groundworkcss-scss/ui/_callouts.scss +117 -0
  55. data/vendor/assets/stylesheets/groundworkcss-scss/ui/_messages.scss +111 -0
  56. data/vendor/assets/stylesheets/groundworkcss-scss/{_modals.scss → ui/_modals.scss} +2 -0
  57. data/vendor/assets/stylesheets/groundworkcss-scss/ui/_popovers.scss +81 -0
  58. data/vendor/assets/stylesheets/groundworkcss-scss/ui/_tables.scss +142 -0
  59. data/vendor/assets/stylesheets/groundworkcss-scss/{_tooltips.scss → ui/_tooltips.scss} +35 -0
  60. metadata +56 -40
  61. data/vendor/assets/stylesheets/groundworkcss-scss/_buttons.scss +0 -231
  62. data/vendor/assets/stylesheets/groundworkcss-scss/_callouts.scss +0 -74
  63. data/vendor/assets/stylesheets/groundworkcss-scss/_cycle.scss +0 -20
  64. data/vendor/assets/stylesheets/groundworkcss-scss/_messages.scss +0 -69
  65. data/vendor/assets/stylesheets/groundworkcss-scss/_mobile-reset.scss +0 -11
  66. data/vendor/assets/stylesheets/groundworkcss-scss/_responsive.scss +0 -246
  67. data/vendor/assets/stylesheets/groundworkcss-scss/_tables.scss +0 -85
  68. data/vendor/assets/stylesheets/groundworkcss-scss/_tabs.scss +0 -172
  69. data/vendor/assets/stylesheets/groundworkcss-scss/_tiles.scss +0 -198
  70. data/vendor/assets/stylesheets/groundworkcss-scss/_webfonts.scss +0 -19
@@ -0,0 +1,193 @@
1
+ /*
2
+ *
3
+ * jQuery Modals by Gary Hepting
4
+ *
5
+ * Open source under the MIT License.
6
+ *
7
+ * Copyright © 2013 Gary Hepting. All rights reserved.
8
+ *
9
+ */
10
+
11
+
12
+ (function() {
13
+ (function($) {
14
+ var elems, modals;
15
+
16
+ if ($('div#iframeModal').length < 1) {
17
+ $('body').append('<div class="iframe modal" id="iframeModal"><iframe marginheight="0" marginwidth="0" frameborder="0"></iframe></div>');
18
+ $('div#iframeModal').prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>');
19
+ }
20
+ $('a.modal').each(function() {
21
+ $(this).attr('data-url', $(this).attr('href'));
22
+ return $(this).attr('href', '#iframeModal');
23
+ });
24
+ $('a.modal').on("click", function(e) {
25
+ $('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0" width="100%" height="100%" src="' + $(this).attr('data-url') + '"></iframe>');
26
+ e.preventDefault();
27
+ return false;
28
+ });
29
+ elems = [];
30
+ $.fn.modal = function() {
31
+ this.each(function() {
32
+ var $this;
33
+
34
+ $(this).not('#iframeModal').wrapInner('<div class="modal-content"></div>');
35
+ $(this).prepend('<i class="close icon-remove"></i>').prepend('<i class="fullscreen icon-resize-full"></i>').appendTo('body');
36
+ $this = $(this);
37
+ return $('[href=#' + $(this).attr('id') + ']').on("click", function(e) {
38
+ modals.open($(this).attr('href'), $(this).hasClass('fullscreen'));
39
+ e.preventDefault();
40
+ return false;
41
+ });
42
+ });
43
+ $('div.modal .close').on("click", function() {
44
+ return modals.close();
45
+ });
46
+ return $('div.modal .fullscreen').on("click", function() {
47
+ return modals.fullscreen($(this).parent('div.modal'));
48
+ });
49
+ };
50
+ modals = (function() {
51
+ var close, fullscreen, open;
52
+
53
+ $('body').addClass('modal-ready');
54
+ if ($("#overlay").length < 1) {
55
+ $('body').append('<div id="overlay"></div>');
56
+ }
57
+ $('#overlay, div.modal .close').bind("click", function(e) {
58
+ return close();
59
+ });
60
+ open = function(elem, fullscreen) {
61
+ $(window).bind("keydown", function(e) {
62
+ var keyCode;
63
+
64
+ keyCode = (e.which ? e.which : e.keyCode);
65
+ if (keyCode === 27) {
66
+ return close();
67
+ }
68
+ });
69
+ $(elem).addClass("active");
70
+ if (!$(elem).hasClass('iframe')) {
71
+ $(elem).css({
72
+ width: 'auto',
73
+ height: 'auto'
74
+ });
75
+ $(elem).css({
76
+ height: $(elem).outerHeight()
77
+ });
78
+ }
79
+ $(elem).css({
80
+ top: '50%',
81
+ left: '50%',
82
+ 'margin-top': ($(elem).outerHeight() / -2) + 'px',
83
+ 'margin-left': ($(elem).outerWidth() / -2) + 'px'
84
+ });
85
+ setTimeout(function() {
86
+ return $('body').addClass("modal-active");
87
+ }, 0);
88
+ setTimeout(function() {
89
+ return $('body').removeClass('modal-ready');
90
+ }, 400);
91
+ if (fullscreen) {
92
+ modals.fullscreen(elem);
93
+ }
94
+ };
95
+ close = function() {
96
+ var modal;
97
+
98
+ modal = $('div.modal.active');
99
+ $(window).unbind("keydown");
100
+ $('body').removeClass("modal-active").addClass('modal-ready');
101
+ if (modal.hasClass('iframe')) {
102
+ $('div#iframeModal iframe').replaceWith('<iframe marginheight="0" marginwidth="0" frameborder="0"></iframe>');
103
+ modal.css({
104
+ width: '80%',
105
+ height: '80%'
106
+ });
107
+ } else {
108
+ modal.css({
109
+ width: 'auto',
110
+ height: 'auto'
111
+ });
112
+ }
113
+ modal.css({
114
+ top: '10%',
115
+ left: '10%',
116
+ 'max-width': '80%',
117
+ 'max-height': '80%',
118
+ 'margin-top': 0,
119
+ 'margin-left': 0
120
+ });
121
+ modal.removeClass("active").removeClass("fullscreen");
122
+ $('i.fullscreen', modal).removeClass('icon-resize-small').addClass('icon-resize-full');
123
+ };
124
+ fullscreen = function(elem) {
125
+ if ($('div.modal.active').hasClass('fullscreen')) {
126
+ $('div.modal i.fullscreen').removeClass('icon-resize-small').addClass('icon-resize-full');
127
+ if ($('div.modal.active').hasClass('iframe')) {
128
+ $('div.modal.active').css({
129
+ width: '80%',
130
+ height: '80%'
131
+ });
132
+ } else {
133
+ $('div.modal.active').css({
134
+ width: 'auto',
135
+ height: 'auto'
136
+ });
137
+ $('div.modal.active').css({
138
+ height: $('div.modal.active').outerHeight()
139
+ });
140
+ }
141
+ $('div.modal.active').removeClass('fullscreen').css({
142
+ 'max-width': '80%',
143
+ 'max-height': '80%'
144
+ });
145
+ $('div.modal.active').delay(100).css({
146
+ top: '50%',
147
+ left: '50%',
148
+ 'margin-top': ($('div.modal.active').outerHeight() / -2) + 'px',
149
+ 'margin-left': ($('div.modal.active').outerWidth() / -2) + 'px'
150
+ });
151
+ } else {
152
+ $('div.modal i.fullscreen').addClass('icon-resize-small').removeClass('icon-resize-full');
153
+ $('div.modal.active').addClass('fullscreen').css({
154
+ top: 0,
155
+ left: 0,
156
+ 'margin-top': 0,
157
+ 'margin-left': 0,
158
+ width: '100%',
159
+ height: '100%',
160
+ 'max-width': '100%',
161
+ 'max-height': '100%'
162
+ });
163
+ }
164
+ };
165
+ return {
166
+ open: open,
167
+ close: close,
168
+ fullscreen: fullscreen
169
+ };
170
+ })();
171
+ return $(window).resize(function() {
172
+ return $('div.modal.active').each(function() {
173
+ if (!$(this).hasClass('fullscreen')) {
174
+ $(this).removeClass('active').css({
175
+ top: '50%',
176
+ left: '50%',
177
+ 'margin-top': ($(this).outerHeight() / -2) + 'px',
178
+ 'margin-left': ($(this).outerWidth() / -2) + 'px'
179
+ }).addClass('active');
180
+ if (!$(this).hasClass('iframe')) {
181
+ $(this).css({
182
+ height: 'auto'
183
+ });
184
+ return $(this).css({
185
+ height: $(this).outerHeight()
186
+ });
187
+ }
188
+ }
189
+ });
190
+ });
191
+ })(jQuery);
192
+
193
+ }).call(this);
@@ -0,0 +1,208 @@
1
+ /*
2
+ *
3
+ * jQuery Popovers by Gary Hepting - https://github.com/ghepting/jquery-popovers
4
+ *
5
+ * Open source under the MIT License.
6
+ *
7
+ * Copyright © 2013 Gary Hepting. All rights reserved.
8
+ *
9
+ */
10
+
11
+
12
+ (function() {
13
+ (function($) {
14
+ return $.fn.popover = function(options) {
15
+ var closePopover, defaults, delayAdjust, delayHide, getElementPosition, popover, resetPopover, setPosition, showPopover, trigger;
16
+
17
+ defaults = {
18
+ hover: false,
19
+ click: true,
20
+ resize: true,
21
+ scroll: true,
22
+ topOffset: 0,
23
+ delay: 500,
24
+ speed: 100
25
+ };
26
+ options = $.extend(defaults, options);
27
+ popover = $('#popover');
28
+ delayHide = '';
29
+ delayAdjust = '';
30
+ trigger = '';
31
+ getElementPosition = function(el) {
32
+ var bottom, left, offset, right, top, win;
33
+
34
+ offset = el.offset();
35
+ win = $(window);
36
+ return {
37
+ top: top = offset.top - win.scrollTop(),
38
+ left: left = offset.left - win.scrollLeft(),
39
+ bottom: bottom = win.height() - top - el.outerHeight(),
40
+ right: right = win.width() - left - el.outerWidth()
41
+ };
42
+ };
43
+ resetPopover = function(resize) {
44
+ popover.css({
45
+ top: 'auto',
46
+ right: 'auto',
47
+ bottom: 'auto',
48
+ left: 'auto'
49
+ });
50
+ if (resize) {
51
+ popover.css({
52
+ width: 'auto'
53
+ });
54
+ }
55
+ popover.removeClass('top');
56
+ popover.removeClass('right');
57
+ popover.removeClass('bottom');
58
+ return popover.removeClass('left');
59
+ };
60
+ setPosition = function(trigger, skipAnimation, resize) {
61
+ var attrs, coords, height, width;
62
+
63
+ if (trigger) {
64
+ if (resize) {
65
+ resetPopover(true);
66
+ } else {
67
+ resetPopover();
68
+ }
69
+ coords = getElementPosition(trigger);
70
+ if (popover.outerWidth() > ($(window).width() - 20)) {
71
+ popover.css('width', $(window).width() - 20);
72
+ }
73
+ popover.css('max-width', Math.min($(window).width() - parseInt($('body').css('padding-left')) - parseInt($('body').css('padding-right')), parseInt(popover.css('max-width'))));
74
+ width = popover.outerWidth();
75
+ height = popover.outerHeight();
76
+ attrs = {};
77
+ if (coords.left <= coords.right) {
78
+ popover.addClass('left');
79
+ attrs.left = coords.left;
80
+ } else {
81
+ popover.addClass('right');
82
+ attrs.right = coords.right;
83
+ }
84
+ if ((coords.top - options.topOffset) > (height + 20)) {
85
+ popover.addClass('top');
86
+ attrs.top = trigger.offset().top - height - 20;
87
+ } else {
88
+ popover.addClass('bottom');
89
+ attrs.top = trigger.offset().top + 15;
90
+ }
91
+ popover.css(attrs);
92
+ if (skipAnimation) {
93
+ return popover.css({
94
+ top: '+=10'
95
+ });
96
+ }
97
+ }
98
+ };
99
+ closePopover = function() {
100
+ $('.popover-trigger').removeClass('popover-trigger');
101
+ return popover.removeClass('sticky').remove();
102
+ };
103
+ showPopover = function(e) {
104
+ var tip;
105
+
106
+ trigger = $(e.target);
107
+ if (!trigger.hasClass('popover-trigger')) {
108
+ closePopover();
109
+ trigger.addClass('popover-trigger');
110
+ }
111
+ tip = $('#' + trigger.attr('data-content')).html();
112
+ popover = $("<div id=\"popover\"></div>");
113
+ if (!tip || tip === "") {
114
+ return false;
115
+ }
116
+ trigger.removeAttr("title");
117
+ popover.css("opacity", 0).html(tip).appendTo("body");
118
+ setPosition(trigger);
119
+ popover.animate({
120
+ top: "+=10",
121
+ opacity: 1
122
+ }, options.speed);
123
+ popover.bind("click", function(e) {
124
+ if (e.target.tagName !== 'a') {
125
+ popover.addClass('sticky');
126
+ e.stopPropagation();
127
+ e.preventDefault();
128
+ return false;
129
+ }
130
+ });
131
+ popover.find('.close').bind("click", function(e) {
132
+ $('.popover-trigger').removeClass('popover-trigger');
133
+ popover.removeClass('sticky').remove();
134
+ e.stopPropagation();
135
+ e.preventDefault();
136
+ return false;
137
+ });
138
+ return popover.bind({
139
+ mouseenter: function() {
140
+ return clearTimeout(delayHide);
141
+ },
142
+ mouseleave: function() {
143
+ if (!popover.hasClass('sticky')) {
144
+ return delayHide = setTimeout((function() {
145
+ $('.popover-trigger').removeClass('popover-trigger');
146
+ return popover.removeClass('sticky').remove();
147
+ }), 500);
148
+ }
149
+ }
150
+ });
151
+ };
152
+ return this.each(function() {
153
+ var $this;
154
+
155
+ $this = $(this);
156
+ if (options.hover) {
157
+ $this.bind({
158
+ mouseenter: function(e) {
159
+ trigger = $(e.target);
160
+ clearTimeout(delayHide);
161
+ if (!$this.hasClass('popover-trigger') && !popover.hasClass('sticky')) {
162
+ return showPopover(e);
163
+ }
164
+ },
165
+ mouseleave: function() {
166
+ if (!popover.hasClass('sticky')) {
167
+ return delayHide = setTimeout(function() {
168
+ return closePopover();
169
+ }, options.delay);
170
+ }
171
+ }
172
+ });
173
+ }
174
+ if (options.click) {
175
+ $this.bind("click", function(e) {
176
+ trigger = $(e.target);
177
+ if (!trigger.hasClass('popover-trigger')) {
178
+ closePopover();
179
+ showPopover(e);
180
+ }
181
+ popover.addClass('sticky');
182
+ e.preventDefault();
183
+ e.stopPropagation();
184
+ return false;
185
+ });
186
+ }
187
+ if (options.resize) {
188
+ $(window).resize(function() {
189
+ clearTimeout(delayAdjust);
190
+ return delayAdjust = setTimeout(function() {
191
+ return setPosition(trigger, true, true);
192
+ }, 100);
193
+ });
194
+ }
195
+ if (options.scroll) {
196
+ $(window).scroll(function() {
197
+ return setPosition(trigger, true);
198
+ });
199
+ }
200
+ return $('html, body').bind("click", function(e) {
201
+ $('.popover-trigger').removeClass('popover-trigger');
202
+ return popover.removeClass('sticky').remove();
203
+ });
204
+ });
205
+ };
206
+ })(jQuery);
207
+
208
+ }).call(this);
@@ -0,0 +1,64 @@
1
+ /*
2
+ *
3
+ * jQuery ResponsiveTables by Gary Hepting - https://github.com/ghepting/responsiveTables
4
+ *
5
+ * Open source under the MIT License.
6
+ *
7
+ * Copyright © 2013 Gary Hepting. All rights reserved.
8
+ *
9
+ */
10
+
11
+
12
+ (function() {
13
+ (function($) {
14
+ var elems;
15
+
16
+ elems = [];
17
+ $.fn.responsiveTable = function(options) {
18
+ var settings;
19
+
20
+ settings = {
21
+ compressor: options.compressor || 10,
22
+ minSize: options.minSize || Number.NEGATIVE_INFINITY,
23
+ maxSize: options.maxSize || Number.POSITIVE_INFINITY,
24
+ padding: 2,
25
+ height: "auto",
26
+ adjust_parents: true
27
+ };
28
+ return this.each(function() {
29
+ var columns, elem, fontSize, rows;
30
+
31
+ elem = $(this);
32
+ elem.attr('data-compression', settings.compressor);
33
+ elem.attr('data-min', settings.minSize);
34
+ elem.attr('data-max', settings.maxSize);
35
+ elem.attr('data-padding', settings.padding);
36
+ columns = $("tr", elem).first().children("th, td").length;
37
+ rows = $("tr", elem).length;
38
+ if (settings.height !== "auto") {
39
+ $this.css("height", settings.height);
40
+ if (settings.adjust_parents) {
41
+ $this.parents().each(function() {
42
+ return $(this).css("height", "100%");
43
+ });
44
+ }
45
+ }
46
+ $("tr th, tr td", elem).css("width", Math.floor(100 / columns) + "%");
47
+ $("tr th, tr td", elem).css("height", Math.floor(100 / rows) + "%");
48
+ fontSize = Math.floor(Math.max(Math.min(elem.width() / settings.compressor, parseFloat(settings.maxSize)), parseFloat(settings.minSize)));
49
+ $("tr th, tr td", elem).css("font-size", fontSize + "px");
50
+ return elems.push(elem);
51
+ });
52
+ };
53
+ return $(window).on("resize", function() {
54
+ return $(elems).each(function() {
55
+ var elem, fontSize;
56
+
57
+ elem = $(this);
58
+ fontSize = Math.floor(Math.max(Math.min(elem.width() / (elem.attr('data-compression')), parseFloat(elem.attr('data-max'))), parseFloat(elem.attr('data-min'))));
59
+ return $("tr th, tr td", elem).css("font-size", fontSize + "px");
60
+ });
61
+ });
62
+ })(jQuery);
63
+
64
+ }).call(this);