tuktuk-rails 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -0
  3. data/app/assets/javascripts/tuktuk/index.js +1 -0
  4. data/app/assets/javascripts/tuktuk/tuktuk.js +196 -0
  5. data/{test/dummy/app/assets/stylesheets/application.css → app/assets/stylesheets/tuktuk/index.css} +4 -3
  6. data/app/assets/stylesheets/tuktuk/tuktuk.css +463 -0
  7. data/app/assets/stylesheets/tuktuk/tuktuk.icons.css +760 -0
  8. data/app/assets/stylesheets/tuktuk/tuktuk.theme.css +61 -0
  9. data/lib/tuktuk/version.rb +1 -1
  10. data/lib/tuktuk.rb +2 -1
  11. data/spec/spec_helper.rb +17 -0
  12. metadata +18 -99
  13. checksums.yaml.gz.sig +0 -0
  14. data/README.rdoc +0 -3
  15. data/lib/tuktuk/engine.rb +0 -4
  16. data/test/dummy/README.rdoc +0 -28
  17. data/test/dummy/Rakefile +0 -6
  18. data/test/dummy/app/assets/javascripts/application.js +0 -13
  19. data/test/dummy/app/controllers/application_controller.rb +0 -5
  20. data/test/dummy/app/helpers/application_helper.rb +0 -2
  21. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  22. data/test/dummy/bin/bundle +0 -3
  23. data/test/dummy/bin/rails +0 -4
  24. data/test/dummy/bin/rake +0 -4
  25. data/test/dummy/config/application.rb +0 -23
  26. data/test/dummy/config/boot.rb +0 -5
  27. data/test/dummy/config/database.yml +0 -25
  28. data/test/dummy/config/environment.rb +0 -5
  29. data/test/dummy/config/environments/development.rb +0 -29
  30. data/test/dummy/config/environments/production.rb +0 -80
  31. data/test/dummy/config/environments/test.rb +0 -36
  32. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  33. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  34. data/test/dummy/config/initializers/inflections.rb +0 -16
  35. data/test/dummy/config/initializers/mime_types.rb +0 -5
  36. data/test/dummy/config/initializers/secret_token.rb +0 -12
  37. data/test/dummy/config/initializers/session_store.rb +0 -3
  38. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  39. data/test/dummy/config/locales/en.yml +0 -23
  40. data/test/dummy/config/routes.rb +0 -56
  41. data/test/dummy/config.ru +0 -4
  42. data/test/dummy/public/404.html +0 -58
  43. data/test/dummy/public/422.html +0 -58
  44. data/test/dummy/public/500.html +0 -57
  45. data/test/dummy/public/favicon.ico +0 -0
  46. data/test/test_helper.rb +0 -15
  47. data/test/tuktuk_test.rb +0 -7
  48. data.tar.gz.sig +0 -2
  49. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a9fbed83ef144ba74a6c62a6d8e05f4413b6507
4
- data.tar.gz: 3a03aea39e25d65d7410b78f3947661000fa2803
3
+ metadata.gz: 348fa0fb87b154389d519dd5ceb80391bd39e946
4
+ data.tar.gz: 511e011ac84036e6f52d819138277aa12d232986
5
5
  SHA512:
6
- metadata.gz: b6fdd8ab97127d812d6a246ac33d205da8c92bb9175a38dd5215159ea2be4d6a48ed345ac5790605efb7ce895aaf0d34995a2cea302f6ea8c129f29fa759c565
7
- data.tar.gz: ea83add65a0e3a96d587d370685b4e9c33d61973a133da47ac8183131109e884a28520ba06fcd5756bb9f7832afd375499348e5f2798310c5e6ac5dc70c2ea22
6
+ metadata.gz: 266f08d20a2cea9c426e068613ed5014b595953b7d5a26eae2d2a8057529552024e168d628c5dff038aa8388816ea4f52d799f1dc46f31b98cb1fdcb49e6b35b
7
+ data.tar.gz: 2291bf3e349874eccdb3eb04e00450ee1efbf2f950c93245a8cf35629a467c160b6bebeb41ffd14ce45e63a69af7152605890c7dab96237962fe480fd93bc297
data/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # tuktuk-rails
2
+
3
+ This gem easily adds [tuktuk](http://tuktuk.tapquo.com) to the assets pipeline so you can create flexible layouts for your website easily.
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/tuktuk-rails.png)](http://badge.fury.io/rb/tuktuk-rails)
6
+ [![Build Status](https://secure.travis-ci.org/elreplicante/tuktuk-rails.png?branch=master)][travis]
7
+ [![Dependency Status](https://gemnasium.com/elreplicante/tuktuk-rails.png)](https://gemnasium.com/elreplicante/tuktuk-rails)
8
+
9
+ [gem]: https://rubygems.org/gems/tuktuk-rails
10
+ [travis]: http://travis-ci.org/elreplicante/tuktuk-rails
11
+ [gemnasium]: https://gemnasium.com/elreplicante/tuktuk-rails
12
+
13
+ ## Installation
14
+ Add the gem to your <code>Gemfile</code>:
15
+
16
+ <code>gem 'tuktuk-rails'</code>
17
+
@@ -0,0 +1 @@
1
+ //= require tuktuk
@@ -0,0 +1,196 @@
1
+ /*
2
+ TukTuk - Simple (but powerful) RWD Framework
3
+ http://tuktuk.tapquo.com
4
+ Copyright (c) 2011-2013 Tapquo S.L. - Licensed GPLv3, Commercial
5
+
6
+ @namespace Tuktuk
7
+ @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
8
+ */
9
+
10
+
11
+ (function() {
12
+ var TukTuk,
13
+ __slice = [].slice;
14
+
15
+ window.TukTuk = TukTuk = {};
16
+
17
+ TukTuk.VERSION = "0.7";
18
+
19
+ TukTuk.dom = function() {
20
+ var args;
21
+
22
+ args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
23
+ if (typeof $$ !== "undefined" && $$ !== null) {
24
+ return $$.apply(null, args);
25
+ } else {
26
+ return $.apply(null, args);
27
+ }
28
+ };
29
+
30
+ TukTuk.ready = TukTuk.dom().ready;
31
+
32
+ }).call(this);
33
+
34
+ (function() {
35
+ TukTuk.Box = (function(tk) {
36
+ var box, hide, lock, show;
37
+
38
+ lock = void 0;
39
+ box = void 0;
40
+ show = function(box_id) {
41
+ box = tk.dom("[data-tuktuk=boxes] #" + box_id).first();
42
+ box.addClass("active");
43
+ return this;
44
+ };
45
+ hide = function() {
46
+ box.removeClass("active");
47
+ return this;
48
+ };
49
+ return {
50
+ _Instance: (function() {
51
+ tk.dom("[data-tuktuk=boxes] aside.absolute").each(function(index, element) {
52
+ var modal;
53
+
54
+ modal = tk.dom(element);
55
+ return modal.html("<div>" + modal.html() + "</div>");
56
+ });
57
+ tk.dom("[data-tuktuk=boxes] [data-box=close]").on("click", function() {
58
+ return TukTuk.Box.hide();
59
+ });
60
+ return tk.dom("[data-tuktuk-box]").on("click", function() {
61
+ return TukTuk.Box.show(tk.dom(this).attr('data-tuktuk-box'));
62
+ });
63
+ })(),
64
+ show: show,
65
+ hide: hide
66
+ };
67
+ })(TukTuk);
68
+
69
+ }).call(this);
70
+
71
+ (function() {
72
+ TukTuk.Events = (function(tk) {
73
+ return {
74
+ init: (function() {
75
+ return TukTuk.dom("[data-control=checkbox]").on("change", function(event) {
76
+ var checked, el, input;
77
+
78
+ event.preventDefault();
79
+ el = TukTuk.dom(this);
80
+ input = el.find("input");
81
+ checked = input[0].checked;
82
+ input.val(checked.toString());
83
+ el.removeClass("checked");
84
+ if (checked) {
85
+ return el.addClass("checked");
86
+ }
87
+ });
88
+ })()
89
+ };
90
+ })(TukTuk);
91
+
92
+ }).call(this);
93
+
94
+ (function() {
95
+ var hidebar;
96
+
97
+ hidebar = function() {
98
+ var browser, browserRegex, hideURLbar, isMobile;
99
+
100
+ browser = navigator.userAgent;
101
+ browserRegex = /(Android|BlackBerry|IEMobile|Nokia|iP(ad|hone|od)|Opera M(obi|ini))/;
102
+ isMobile = false;
103
+ if (browser.match(browserRegex)) {
104
+ hideURLbar = function() {
105
+ return window.scrollTo(0, 1);
106
+ };
107
+ isMobile = true;
108
+ return addEventListener("load", (function() {
109
+ return setTimeout(hideURLbar, 0);
110
+ }), false);
111
+ }
112
+ };
113
+
114
+ }).call(this);
115
+
116
+ (function() {
117
+ var __slice = [].slice;
118
+
119
+ if (!window.TukTuk) {
120
+ window.TukTuk = {
121
+ dom: function() {
122
+ var args;
123
+
124
+ args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
125
+ if (typeof $$ !== "undefined" && $$ !== null) {
126
+ return $$.apply(null, args);
127
+ } else {
128
+ return $.apply(null, args);
129
+ }
130
+ }
131
+ };
132
+ }
133
+
134
+ window.TukTuk.Modal = (function(tk) {
135
+ var hide, loading, lock, modal, show;
136
+
137
+ lock = void 0;
138
+ modal = void 0;
139
+ /*
140
+ @todo: Describe method
141
+ */
142
+
143
+ show = function(modal_id) {
144
+ lock.addClass("active").show();
145
+ this._hideAnyModal();
146
+ modal = tk.dom("[data-tuktuk=modal]#" + modal_id).addClass("active");
147
+ return this;
148
+ };
149
+ /*
150
+ @todo: Describe method
151
+ */
152
+
153
+ hide = function() {
154
+ lock.removeClass("active");
155
+ if (modal != null) {
156
+ modal.removeClass("active");
157
+ }
158
+ setTimeout(function() {
159
+ return lock.attr("data-loading", "false").hide();
160
+ }, 250);
161
+ return this;
162
+ };
163
+ /*
164
+ @loading: Describe method
165
+ */
166
+
167
+ loading = function(text) {
168
+ this._hideAnyModal();
169
+ lock.attr("data-loading", "true").addClass("active").show();
170
+ return this;
171
+ };
172
+ return {
173
+ _hideAnyModal: function() {
174
+ return tk.dom("[data-tuktuk=modal]").removeClass("active");
175
+ },
176
+ _Instance: (function() {
177
+ tk.dom("[data-tuktuk=modal].side").each(function(index, element) {
178
+ modal = tk.dom(element);
179
+ return modal.html("<div>" + modal.html() + "</div>");
180
+ });
181
+ tk.dom("[data-tuktuk=modal] [data-modal=close]").on("click", function() {
182
+ return TukTuk.Modal.hide();
183
+ });
184
+ tk.dom("[data-tuktuk-modal]").on("click", function() {
185
+ return TukTuk.Modal.show(tk.dom(this).attr('data-tuktuk-modal'));
186
+ });
187
+ tk.dom(document.body).append("<div data-tuktuk=\"lock\" data-loading=\"false\">\n <div class=\"loading\">\n <div class=\"container\">\n <span class=\"top\"></span>\n <span class=\"right\"></span>\n <span class=\"bottom\"></span>\n <span class=\"left\"></span>\n </div>\n </div>\n</div>");
188
+ return lock = tk.dom("[data-tuktuk=lock]").first();
189
+ })(),
190
+ show: show,
191
+ hide: hide,
192
+ loading: loading
193
+ };
194
+ })(TukTuk);
195
+
196
+ }).call(this);
@@ -8,6 +8,7 @@
8
8
  * You're free to add application-wide styles to this file and they'll appear at the top of the
9
9
  * compiled file, but it's generally better to create a new file per style scope.
10
10
  *
11
- *= require_self
12
- *= require_tree .
13
- */
11
+ *= require tuktuk
12
+ *= require tuktuk.icons
13
+ *= require tuktuk.theme
14
+ */