squeezer 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. data/VERSION +1 -1
  2. data/{lib/app → app}/controllers/application_controller.rb +0 -0
  3. data/{lib/app → app}/controllers/blogs_controller.rb +0 -0
  4. data/{lib/app → app}/controllers/comments_controller.rb +0 -0
  5. data/{lib/app → app}/controllers/pages_controller.rb +0 -0
  6. data/{lib/app → app}/controllers/posts_controller.rb +0 -0
  7. data/{lib/app → app}/controllers/roles_controller.rb +0 -0
  8. data/{lib/app → app}/controllers/sites_controller.rb +0 -0
  9. data/{lib/app → app}/controllers/users_controller.rb +0 -0
  10. data/{lib/app → app}/helpers/squeezer_helper.rb +0 -0
  11. data/{lib/app → app}/models/ability.rb +0 -0
  12. data/{lib/app → app}/models/blog.rb +0 -0
  13. data/{lib/app → app}/models/comment.rb +0 -0
  14. data/{lib/app → app}/models/page.rb +0 -0
  15. data/{lib/app → app}/models/post.rb +0 -0
  16. data/{lib/app → app}/models/role.rb +0 -0
  17. data/{lib/app → app}/models/site.rb +0 -0
  18. data/{lib/app → app}/models/user.rb +0 -0
  19. data/{lib/app → app}/views/blogs/_entry.haml +0 -0
  20. data/{lib/app → app}/views/blogs/_form.html.haml +0 -0
  21. data/{lib/app → app}/views/blogs/edit.html.haml +0 -0
  22. data/{lib/app → app}/views/blogs/index.html.haml +0 -0
  23. data/{lib/app → app}/views/blogs/new.html.haml +0 -0
  24. data/{lib/app → app}/views/blogs/show.html.haml +0 -0
  25. data/{lib/app → app}/views/comments/_form.html.haml +0 -0
  26. data/{lib/app → app}/views/comments/_index.html.haml +0 -0
  27. data/{lib/app → app}/views/comments/_post.html.haml +0 -0
  28. data/{lib/app → app}/views/comments/show.js.erb +0 -0
  29. data/{lib/app → app}/views/layouts/_footer.html.haml +0 -0
  30. data/{lib/app → app}/views/layouts/_login.haml +0 -0
  31. data/{lib/app → app}/views/layouts/_menu.html.haml +0 -0
  32. data/{lib/app → app}/views/layouts/_msn.haml +0 -0
  33. data/{lib/app → app}/views/layouts/_sidebar.html.haml +0 -0
  34. data/{lib/app → app}/views/layouts/application.html.erb +0 -0
  35. data/{lib/app → app}/views/layouts/ice/squeezer/_ice.haml +0 -0
  36. data/{lib/app → app}/views/layouts/ice/squeezer/ice/_ice.haml +0 -0
  37. data/{lib/app → app}/views/layouts/ice/squeezer/ice/squeezer/_ice.haml +0 -0
  38. data/{lib/app → app}/views/layouts/ice/squeezer/ice/squeezer/ice/_ice.haml +0 -0
  39. data/{lib/app → app}/views/layouts/ice/squeezer/ice/squeezer/ice/squeezer/_ice.haml +0 -0
  40. data/{lib/app → app}/views/layouts/squeezer/ice/_ice.haml +0 -0
  41. data/{lib/app → app}/views/layouts/squeezer/ice/squeezer/_ice.haml +0 -0
  42. data/{lib/app → app}/views/layouts/squeezer/ice/squeezer/ice/_ice.haml +0 -0
  43. data/{lib/app → app}/views/layouts/squeezer/ice/squeezer/ice/squeezer/_ice.haml +0 -0
  44. data/{lib/app → app}/views/layouts/squeezer/squeezer.css +0 -0
  45. data/{lib/app → app}/views/pages/_form.html.haml +0 -0
  46. data/{lib/app → app}/views/pages/edit.html.haml +0 -0
  47. data/{lib/app → app}/views/pages/index.html.haml +0 -0
  48. data/{lib/app → app}/views/pages/new.html.haml +0 -0
  49. data/{lib/app → app}/views/pages/show.html.haml +0 -0
  50. data/{lib/app → app}/views/roles/_form.html.haml +0 -0
  51. data/{lib/app → app}/views/roles/edit.html.haml +0 -0
  52. data/{lib/app → app}/views/roles/index.html.haml +0 -0
  53. data/{lib/app → app}/views/roles/new.html.haml +0 -0
  54. data/{lib/app → app}/views/roles/show.html.haml +0 -0
  55. data/{lib/app → app}/views/sites/_form.html.haml +0 -0
  56. data/{lib/app → app}/views/sites/edit.html.haml +0 -0
  57. data/{lib/app → app}/views/sites/index.html.haml +0 -0
  58. data/{lib/app → app}/views/sites/new.html.haml +0 -0
  59. data/{lib/app → app}/views/sites/show.html.haml +0 -0
  60. data/{lib/app → app}/views/users/index.haml +0 -0
  61. data/{lib/app → app}/views/users/roles.haml +0 -0
  62. data/{lib/app → app}/views/users/show.haml +0 -0
  63. data/lib/generators/squeezer/Gemfile +37 -0
  64. data/lib/generators/squeezer/README +2 -0
  65. data/lib/generators/squeezer/USAGE +7 -0
  66. data/lib/generators/squeezer/squeezer_generator.rb +114 -0
  67. data/lib/generators/squeezer/templates/Gemfile +37 -0
  68. data/lib/generators/squeezer/templates/app/controllers/application_controller.rb +25 -0
  69. data/lib/{blogs_controller.rb → generators/squeezer/templates/app/controllers/blogs_controller.rb} +0 -0
  70. data/lib/generators/squeezer/templates/app/controllers/comments_controller.rb +37 -0
  71. data/lib/generators/squeezer/templates/app/controllers/forums_controller.rb +42 -0
  72. data/lib/generators/squeezer/templates/app/controllers/pages_controller.rb +3 -0
  73. data/lib/generators/squeezer/templates/app/controllers/posts_controller.rb +23 -0
  74. data/lib/generators/squeezer/templates/app/controllers/roles_controller.rb +3 -0
  75. data/lib/generators/squeezer/templates/app/controllers/sites_controller.rb +70 -0
  76. data/lib/generators/squeezer/templates/app/controllers/topics_controller.rb +46 -0
  77. data/lib/generators/squeezer/templates/app/controllers/users_controller.rb +22 -0
  78. data/lib/generators/squeezer/templates/app/helpers/application_helper.rb +66 -0
  79. data/lib/generators/squeezer/templates/app/helpers/blogs_helper.rb +2 -0
  80. data/lib/generators/squeezer/templates/app/helpers/layout_helper.rb +71 -0
  81. data/lib/generators/squeezer/templates/app/helpers/pages_helper.rb +2 -0
  82. data/lib/generators/squeezer/templates/app/models/ability.rb +17 -0
  83. data/lib/generators/squeezer/templates/app/models/blog.rb +6 -0
  84. data/lib/generators/squeezer/templates/app/models/comment.rb +4 -0
  85. data/lib/generators/squeezer/templates/app/models/forum.rb +5 -0
  86. data/lib/generators/squeezer/templates/app/models/isntall.rb +9 -0
  87. data/lib/generators/squeezer/templates/app/models/page.rb +3 -0
  88. data/lib/generators/squeezer/templates/app/models/post.rb +12 -0
  89. data/lib/generators/squeezer/templates/app/models/role.rb +3 -0
  90. data/lib/generators/squeezer/templates/app/models/site.rb +17 -0
  91. data/lib/generators/squeezer/templates/app/models/topic.rb +6 -0
  92. data/lib/generators/squeezer/templates/app/models/user.rb +35 -0
  93. data/lib/generators/squeezer/templates/app/views/blogs/_entry.haml +26 -0
  94. data/lib/generators/squeezer/templates/app/views/blogs/_form.html.haml +15 -0
  95. data/lib/generators/squeezer/templates/app/views/blogs/edit.html.haml +8 -0
  96. data/lib/generators/squeezer/templates/app/views/blogs/index.html.haml +8 -0
  97. data/lib/generators/squeezer/templates/app/views/blogs/new.html.haml +5 -0
  98. data/lib/generators/squeezer/templates/app/views/blogs/show.html.haml +4 -0
  99. data/lib/generators/squeezer/templates/app/views/comments/_form.html.erb +5 -0
  100. data/lib/generators/squeezer/templates/app/views/comments/_form.html.haml +19 -0
  101. data/lib/generators/squeezer/templates/app/views/comments/_index.html.haml +26 -0
  102. data/lib/generators/squeezer/templates/app/views/comments/_post.html.haml +19 -0
  103. data/lib/generators/squeezer/templates/app/views/comments/_post2.haml +14 -0
  104. data/lib/generators/squeezer/templates/app/views/comments/edit.haml +7 -0
  105. data/lib/generators/squeezer/templates/app/views/comments/show.js.erb +1 -0
  106. data/lib/generators/squeezer/templates/app/views/confirmations/new.html.erb +12 -0
  107. data/lib/generators/squeezer/templates/app/views/devise/confirmations/new.html.erb +12 -0
  108. data/lib/generators/squeezer/templates/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  109. data/lib/generators/squeezer/templates/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  110. data/lib/generators/squeezer/templates/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  111. data/lib/generators/squeezer/templates/app/views/devise/passwords/edit.html.erb +16 -0
  112. data/lib/generators/squeezer/templates/app/views/devise/passwords/new.html.erb +12 -0
  113. data/lib/generators/squeezer/templates/app/views/devise/registrations/edit.html.erb +28 -0
  114. data/lib/generators/squeezer/templates/app/views/devise/registrations/new.html.erb +21 -0
  115. data/lib/generators/squeezer/templates/app/views/devise/sessions/new.html.erb +17 -0
  116. data/lib/generators/squeezer/templates/app/views/devise/shared/_links.erb +19 -0
  117. data/lib/generators/squeezer/templates/app/views/devise/unlocks/new.html.erb +12 -0
  118. data/lib/generators/squeezer/templates/app/views/devise_mailer/confirmation_instructions.html.erb +5 -0
  119. data/lib/generators/squeezer/templates/app/views/devise_mailer/reset_password_instructions.html.erb +8 -0
  120. data/lib/generators/squeezer/templates/app/views/devise_mailer/unlock_instructions.html.erb +7 -0
  121. data/lib/generators/squeezer/templates/app/views/forums/_form.html.haml +14 -0
  122. data/lib/generators/squeezer/templates/app/views/forums/edit.html.haml +8 -0
  123. data/lib/generators/squeezer/templates/app/views/forums/index.html.haml +37 -0
  124. data/lib/generators/squeezer/templates/app/views/forums/new.html.haml +5 -0
  125. data/lib/generators/squeezer/templates/app/views/forums/show.html.haml +43 -0
  126. data/lib/generators/squeezer/templates/app/views/layouts/_footer.html.haml +5 -0
  127. data/lib/generators/squeezer/templates/app/views/layouts/_header.html.haml +10 -0
  128. data/lib/generators/squeezer/templates/app/views/layouts/_ice.haml +27 -0
  129. data/lib/generators/squeezer/templates/app/views/layouts/_latest.haml +15 -0
  130. data/lib/generators/squeezer/templates/app/views/layouts/_login.html.erb +9 -0
  131. data/lib/generators/squeezer/templates/app/views/layouts/_login.html.haml +12 -0
  132. data/lib/generators/squeezer/templates/app/views/layouts/_menu.html.haml +6 -0
  133. data/lib/generators/squeezer/templates/app/views/layouts/_msn.haml +12 -0
  134. data/lib/generators/squeezer/templates/app/views/layouts/_sidebar.html.haml +1 -0
  135. data/lib/generators/squeezer/templates/app/views/layouts/application.html.erb +14 -0
  136. data/lib/generators/squeezer/templates/app/views/layouts/application.html.haml +14 -0
  137. data/lib/generators/squeezer/templates/app/views/layouts/ice/squeezer/_ice.haml +27 -0
  138. data/lib/generators/squeezer/templates/app/views/pages/_form.html.haml +17 -0
  139. data/lib/generators/squeezer/templates/app/views/pages/edit.html.haml +8 -0
  140. data/lib/generators/squeezer/templates/app/views/pages/index.html.haml +22 -0
  141. data/lib/generators/squeezer/templates/app/views/pages/new.html.haml +5 -0
  142. data/lib/generators/squeezer/templates/app/views/pages/show.html.haml +12 -0
  143. data/lib/generators/squeezer/templates/app/views/passwords/edit.html.erb +16 -0
  144. data/lib/generators/squeezer/templates/app/views/passwords/new.html.erb +12 -0
  145. data/lib/generators/squeezer/templates/app/views/registrations/edit.html.erb +25 -0
  146. data/lib/generators/squeezer/templates/app/views/registrations/new.html.erb +17 -0
  147. data/lib/generators/squeezer/templates/app/views/roles/_form.html.haml +9 -0
  148. data/lib/generators/squeezer/templates/app/views/roles/edit.html.haml +7 -0
  149. data/lib/generators/squeezer/templates/app/views/roles/index.html.haml +19 -0
  150. data/lib/generators/squeezer/templates/app/views/roles/new.html.haml +5 -0
  151. data/lib/generators/squeezer/templates/app/views/roles/show.html.haml +13 -0
  152. data/lib/generators/squeezer/templates/app/views/roles/user.html.erb +14 -0
  153. data/lib/generators/squeezer/templates/app/views/sessions/new.html.erb +17 -0
  154. data/lib/generators/squeezer/templates/app/views/shared/_devise_links.erb +19 -0
  155. data/lib/generators/squeezer/templates/app/views/sites/_form.html.haml +42 -0
  156. data/lib/generators/squeezer/templates/app/views/sites/edit.html.haml +1 -0
  157. data/lib/generators/squeezer/templates/app/views/sites/index.html.haml +165 -0
  158. data/lib/generators/squeezer/templates/app/views/sites/new.html.haml +1 -0
  159. data/lib/generators/squeezer/templates/app/views/sites/show.html.haml +18 -0
  160. data/lib/generators/squeezer/templates/app/views/topics/_form.html.haml +16 -0
  161. data/lib/generators/squeezer/templates/app/views/topics/edit.html.erb +8 -0
  162. data/lib/generators/squeezer/templates/app/views/topics/index.html.haml +23 -0
  163. data/lib/generators/squeezer/templates/app/views/topics/new.html.erb +5 -0
  164. data/lib/generators/squeezer/templates/app/views/topics/show.html.haml +16 -0
  165. data/lib/generators/squeezer/templates/app/views/unlocks/new.html.erb +12 -0
  166. data/lib/generators/squeezer/templates/app/views/users/index.haml +5 -0
  167. data/lib/generators/squeezer/templates/app/views/users/roles.haml +14 -0
  168. data/lib/generators/squeezer/templates/config/devise.rb +142 -0
  169. data/lib/generators/squeezer/templates/db/migrate/add_username_user.rb +11 -0
  170. data/lib/generators/squeezer/templates/db/migrate/blogs.rb +15 -0
  171. data/lib/generators/squeezer/templates/db/migrate/comments.rb +15 -0
  172. data/lib/generators/squeezer/templates/db/migrate/create_blogs.rb +15 -0
  173. data/lib/generators/squeezer/templates/db/migrate/create_comments.rb +15 -0
  174. data/lib/generators/squeezer/templates/db/migrate/create_pages.rb +16 -0
  175. data/lib/generators/squeezer/templates/db/migrate/create_posts.rb +16 -0
  176. data/lib/generators/squeezer/templates/db/migrate/create_roles.rb +13 -0
  177. data/lib/generators/squeezer/templates/db/migrate/create_roles_users.rb +15 -0
  178. data/lib/generators/squeezer/templates/db/migrate/create_sites.rb +26 -0
  179. data/lib/generators/squeezer/templates/db/migrate/data.rb +7 -0
  180. data/lib/generators/squeezer/templates/db/migrate/page_data.rb +10 -0
  181. data/lib/generators/squeezer/templates/db/migrate/pages.rb +16 -0
  182. data/lib/generators/squeezer/templates/db/migrate/posts.rb +16 -0
  183. data/lib/generators/squeezer/templates/db/migrate/roles.rb +13 -0
  184. data/lib/generators/squeezer/templates/db/migrate/roles_users.rb +15 -0
  185. data/lib/generators/squeezer/templates/db/migrate/sites.rb +26 -0
  186. data/lib/generators/squeezer/templates/db/migrate/squeez_data.rb +7 -0
  187. data/lib/generators/squeezer/templates/doc/clases.png +0 -0
  188. data/lib/generators/squeezer/templates/ice/squeezer/ice/_ice.haml +6 -0
  189. data/lib/generators/squeezer/templates/ice/squeezer/ice/squeezer/_ice.haml +28 -0
  190. data/lib/generators/squeezer/templates/ice/squeezer/ice/squeezer/ice/_ice.haml +6 -0
  191. data/lib/generators/squeezer/templates/ice/squeezer/ice/squeezer/ice/squeezer/_ice.haml +7 -0
  192. data/lib/generators/squeezer/templates/ice/squeezer/squeezer.css +252 -0
  193. data/lib/generators/squeezer/templates/public/javascripts/application.js +53 -0
  194. data/lib/generators/squeezer/templates/public/javascripts/jquery-ui.js +11437 -0
  195. data/lib/generators/squeezer/templates/public/javascripts/jquery-ui.min.js +401 -0
  196. data/lib/generators/squeezer/templates/public/javascripts/jquery.cleditor.min.js +31 -0
  197. data/lib/generators/squeezer/templates/public/javascripts/jquery.js +6883 -0
  198. data/lib/generators/squeezer/templates/public/javascripts/jquery.layout.min-1.2.0.js +80 -0
  199. data/lib/generators/squeezer/templates/public/javascripts/jquery.min.js +166 -0
  200. data/lib/generators/squeezer/templates/public/javascripts/rails.js +146 -0
  201. data/lib/generators/squeezer/templates/public/stylesheets/CLEditor1_3_0/images/buttons.gif +0 -0
  202. data/lib/generators/squeezer/templates/public/stylesheets/CLEditor1_3_0/images/toolbar.gif +0 -0
  203. data/lib/generators/squeezer/templates/public/stylesheets/CLEditor1_3_0/jquery.cleditor.css +24 -0
  204. data/lib/generators/squeezer/templates/public/stylesheets/ice/lagota/ice/_ice.haml +6 -0
  205. data/lib/generators/squeezer/templates/public/stylesheets/ice/lagota/lagota.css +284 -0
  206. data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/_ice.haml +6 -0
  207. data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/squeezer/_ice.haml +27 -0
  208. data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/squeezer/ice/_ice.haml +6 -0
  209. data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/ice/squeezer/ice/squeezer/_ice.haml +7 -0
  210. data/lib/generators/squeezer/templates/public/stylesheets/ice/squeezer/squeezer.css +249 -0
  211. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  212. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  213. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  214. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  215. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  216. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  217. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  218. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  219. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  220. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  221. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  222. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  223. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  224. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  225. data/lib/generators/squeezer/templates/public/stylesheets/ui-lightness/jquery-ui-1.8.5.custom.css +572 -0
  226. data/lib/squeezer.rb +1 -1
  227. data/pkg/squeezer-0.1.3.gem +0 -0
  228. data/pkg/squeezer-0.1.4.gem +0 -0
  229. data/squeezer.gemspec +227 -65
  230. metadata +229 -67
  231. data/lib/squeezer/engine.rb +0 -0
@@ -0,0 +1,146 @@
1
+ jQuery(function ($) {
2
+ var csrf_token = $('meta[name=csrf-token]').attr('content'),
3
+ csrf_param = $('meta[name=csrf-param]').attr('content');
4
+
5
+ $.fn.extend({
6
+ /**
7
+ * Triggers a custom event on an element and returns the event result
8
+ * this is used to get around not being able to ensure callbacks are placed
9
+ * at the end of the chain.
10
+ *
11
+ * TODO: deprecate with jQuery 1.4.2 release, in favor of subscribing to our
12
+ * own events and placing ourselves at the end of the chain.
13
+ */
14
+ triggerAndReturn: function (name, data) {
15
+ var event = new $.Event(name);
16
+ this.trigger(event, data);
17
+
18
+ return event.result !== false;
19
+ },
20
+
21
+ /**
22
+ * Handles execution of remote calls firing overridable events along the way
23
+ */
24
+ callRemote: function () {
25
+ var el = this,
26
+ method = el.attr('method') || el.attr('data-method') || 'GET',
27
+ url = el.attr('action') || el.attr('href'),
28
+ dataType = el.attr('data-type') || 'script';
29
+
30
+ if (url === undefined) {
31
+ throw "No URL specified for remote call (action or href must be present).";
32
+ } else {
33
+ if (el.triggerAndReturn('ajax:before')) {
34
+ var data = el.is('form') ? el.serializeArray() : [];
35
+ $.ajax({
36
+ url: url,
37
+ data: data,
38
+ dataType: dataType,
39
+ type: method.toUpperCase(),
40
+ beforeSend: function (xhr) {
41
+ el.trigger('ajax:loading', xhr);
42
+ },
43
+ success: function (data, status, xhr) {
44
+ el.trigger('ajax:success', [data, status, xhr]);
45
+ },
46
+ complete: function (xhr) {
47
+ el.trigger('ajax:complete', xhr);
48
+ },
49
+ error: function (xhr, status, error) {
50
+ el.trigger('ajax:failure', [xhr, status, error]);
51
+ }
52
+ });
53
+ }
54
+
55
+ el.trigger('ajax:after');
56
+ }
57
+ }
58
+ });
59
+
60
+ /**
61
+ * confirmation handler
62
+ */
63
+ var jqueryVersion = $().jquery;
64
+
65
+ if ( (jqueryVersion === '1.4') || (jqueryVersion === '1.4.1') || (jqueryVersion === '1.4.2')){
66
+ $('a[data-confirm],input[data-confirm]').live('click', function () {
67
+ var el = $(this);
68
+ if (el.triggerAndReturn('confirm')) {
69
+ if (!confirm(el.attr('data-confirm'))) {
70
+ return false;
71
+ }
72
+ }
73
+ });
74
+ } else {
75
+ $('body').delegate('a[data-confirm],input[data-confirm]', 'click', function () {
76
+ var el = $(this);
77
+ if (el.triggerAndReturn('confirm')) {
78
+ if (!confirm(el.attr('data-confirm'))) {
79
+ return false;
80
+ }
81
+ }
82
+ });
83
+ }
84
+
85
+
86
+
87
+ /**
88
+ * remote handlers
89
+ */
90
+ $('form[data-remote]').live('submit', function (e) {
91
+ $(this).callRemote();
92
+ e.preventDefault();
93
+ });
94
+
95
+ $('a[data-remote],input[data-remote]').live('click', function (e) {
96
+ $(this).callRemote();
97
+ e.preventDefault();
98
+ });
99
+
100
+ $('a[data-method]:not([data-remote])').live('click', function (e){
101
+ var link = $(this),
102
+ href = link.attr('href'),
103
+ method = link.attr('data-method'),
104
+ form = $('<form method="post" action="'+href+'"></form>'),
105
+ metadata_input = '<input name="_method" value="'+method+'" type="hidden" />';
106
+
107
+ if (csrf_param != null && csrf_token != null) {
108
+ metadata_input += '<input name="'+csrf_param+'" value="'+csrf_token+'" type="hidden" />';
109
+ }
110
+
111
+ form.hide()
112
+ .append(metadata_input)
113
+ .appendTo('body');
114
+
115
+ e.preventDefault();
116
+ form.submit();
117
+ });
118
+
119
+ /**
120
+ * disable-with handlers
121
+ */
122
+ var disable_with_input_selector = 'input[data-disable-with]';
123
+ var disable_with_form_remote_selector = 'form[data-remote]:has(' + disable_with_input_selector + ')';
124
+ var disable_with_form_not_remote_selector = 'form:not([data-remote]):has(' + disable_with_input_selector + ')';
125
+
126
+ var disable_with_input_function = function () {
127
+ $(this).find(disable_with_input_selector).each(function () {
128
+ var input = $(this);
129
+ input.data('enable-with', input.val())
130
+ .attr('value', input.attr('data-disable-with'))
131
+ .attr('disabled', 'disabled');
132
+ });
133
+ };
134
+
135
+ $(disable_with_form_remote_selector).live('ajax:before', disable_with_input_function);
136
+ $(disable_with_form_not_remote_selector).live('submit', disable_with_input_function);
137
+
138
+ $(disable_with_form_remote_selector).live('ajax:complete', function () {
139
+ $(this).find(disable_with_input_selector).each(function () {
140
+ var input = $(this);
141
+ input.removeAttr('disabled')
142
+ .val(input.data('enable-with'));
143
+ });
144
+ });
145
+
146
+ });
@@ -0,0 +1,24 @@
1
+ .cleditorMain {border:1px solid #999; padding:0 1px 1px; background-color:white}
2
+ .cleditorMain iframe {border:none; margin:0; padding:0}
3
+ .cleditorMain textarea {border:none; margin:0; padding:0; overflow-y:scroll; font:10pt Arial,Verdana; resize:none; outline:none /* webkit grip focus */}
4
+ .cleditorToolbar {background: url('images/toolbar.gif') repeat}
5
+ .cleditorGroup {float:left; height:26px}
6
+ .cleditorButton {float:left; width:24px; height:24px; margin:1px 0 1px 0; background: url('images/buttons.gif')}
7
+ .cleditorDisabled {opacity:0.3; filter:alpha(opacity=30)}
8
+ .cleditorDivider {float:left; width:1px; height:23px; margin:1px 0 1px 0; background:#CCC}
9
+ .cleditorPopup {border:solid 1px #999; background-color:white; position:absolute; font:10pt Arial,Verdana; cursor:default; z-index:10000}
10
+ .cleditorList div {padding:2px 4px 2px 4px}
11
+ .cleditorList p,
12
+ .cleditorList h1,
13
+ .cleditorList h2,
14
+ .cleditorList h3,
15
+ .cleditorList h4,
16
+ .cleditorList h5,
17
+ .cleditorList h6,
18
+ .cleditorList font {padding:0; margin:0; background-color:Transparent}
19
+ .cleditorColor {width:150px; padding:1px 0 0 1px}
20
+ .cleditorColor div {float:left; width:14px; height:14px; margin:0 1px 1px 0}
21
+ .cleditorPrompt {background-color:#F6F7F9; padding:4px; font-size:8.5pt}
22
+ .cleditorPrompt input,
23
+ .cleditorPrompt textarea {font:8.5pt Arial,Verdana;}
24
+ .cleditorMsg {background-color:#FDFCEE; width:150px; padding:4px; font-size:8.5pt}
@@ -0,0 +1,6 @@
1
+ #page
2
+ #header
3
+ = render :partial => 'layouts/login'
4
+ = render :partial => 'layouts/msn'
5
+ #content
6
+ = yield
@@ -0,0 +1,284 @@
1
+ #header {
2
+ -moz-background-clip:border !important;
3
+ -moz-background-origin:padding !important;
4
+ -moz-background-size:auto auto !important;
5
+ background-attachment:scroll !important;
6
+ background-color:#000000 !important;
7
+ background-image:url("/images/background.png") !important;
8
+ background-position:0 365px;
9
+ background-repeat:repeat-y !important;
10
+ height:230px;
11
+ text-align:center;
12
+ }
13
+ #header div {
14
+ background:url("/images/overlay.png") no-repeat scroll left top transparent;
15
+ height:230px;
16
+ width:920px;
17
+ left: -4px;
18
+ top:-5px;
19
+ padding:0px;
20
+ }
21
+ /* código */
22
+ .border{
23
+ border:1px solid #DEDEDE !important;
24
+ }
25
+ .ui-layout-center{
26
+ padding:0px !important;
27
+ }
28
+ p.meta{
29
+ padding:5px;
30
+ }
31
+ #logo {
32
+ background-image:url("/images/logo.png") !important;
33
+ background-position:245px 44px !important;
34
+ background-repeat:no-repeat;
35
+ height:190px;
36
+ }
37
+ h2{
38
+ // border:3px solid black !important;
39
+ // padding:5px 15px;
40
+ // background-image:url("/images/h2.png") !important;
41
+ // background-repeat:no-repeat;
42
+ // -moz-border-radius: 25px;
43
+
44
+ }
45
+ h3{
46
+ border-top:4px solid #E0E0E0 !important;
47
+ }
48
+ .text{
49
+ background-color:#F8F8FF !important;
50
+ border:1px solid #DEDEDE !important;
51
+ color:#444444 !important;
52
+ font-size:90% !important;
53
+ line-height:1.5em !important;
54
+ margin:1em 0 !important;
55
+ overflow:auto !important;
56
+ padding:0.5em !important;
57
+
58
+ }
59
+ .codigo{
60
+ background-color:#E3E9ED !important;
61
+ border:1px solid #DEDEDE !important;
62
+ color:black !important;
63
+ font-size:90% !important;
64
+ line-height:1.5em !important;
65
+ margin:1em 0 !important;
66
+ overflow:auto !important;
67
+ padding:0.5em !important;
68
+ }
69
+ /* datos */
70
+ #datos{
71
+ padding:10px;
72
+ margin:3px;
73
+ color:#000;
74
+ border:2px solid #000;
75
+ }
76
+ /* action bar */
77
+ #action_bar a{
78
+ color:white;
79
+ padding:15px;
80
+ text-decoration:none;
81
+ }
82
+ #action_bar a:hover{
83
+ background-color:#CECAFF;
84
+ padding-left:15px;
85
+ padding-right:15px;
86
+ padding-top:20px;
87
+ padding-bottom:20px;
88
+ color:black;
89
+ text-decoration:none;
90
+ }
91
+ #action_bar{
92
+ color:#FFFFFF;
93
+ padding:15px;
94
+ background-color:#292936;
95
+ height:20px;
96
+ margin-top:10px;
97
+ margin-bottom:10px;
98
+ }
99
+ /* modify */
100
+ #modify{
101
+ border-top:2px solid #000;
102
+ padding:5px;
103
+ background-color:#CAC8FF;
104
+ }
105
+ /* forum */
106
+ strong{
107
+ font-weight: bold;
108
+ }
109
+ .posts{
110
+ width:100px;
111
+ font-size: 0.8em;
112
+ border-top:2px;
113
+ vertical-align: top;
114
+ }
115
+ .comment{
116
+ border-top:2px solid #ddd;
117
+ width:500px;
118
+ }
119
+ .greycolumn{
120
+ background:#E8E8E8;
121
+ padding: 5px;
122
+ }
123
+ .user{
124
+ width: 100px;
125
+ }
126
+ /* tables */
127
+ table.noborder td{ border:0;}
128
+ table.nopad td{ padding-left:0;}
129
+ table.wide { width:100%; }
130
+ table.mytable
131
+ {
132
+ border-collapse:collapse;
133
+ font-family: 'Lucida Grande', Tahoma, Arial, Helvetica, sans-serif;
134
+ }
135
+ table.mytable tr th
136
+ {
137
+ background:#323336;
138
+ color:white;
139
+ font-size:0.8em;
140
+ padding:3px 10px;
141
+ border:1px solid #222;
142
+ }
143
+ table.mytable tr td
144
+ {
145
+ vertical-align:top;
146
+ padding:7px;
147
+ border:1px solid #ddd;
148
+ }
149
+
150
+ /* topics */
151
+
152
+ #forum_description
153
+ {
154
+ width:99%;
155
+ }
156
+
157
+ table.forums
158
+ { font-size:0.8em; }
159
+ table.forums tr th { font-size:0.8em; }
160
+ table.forums tr td .title {
161
+ font-size:1.4em;
162
+ }
163
+
164
+ table.forums tr td .desc {
165
+ margin:0.5em 0;
166
+ }
167
+ table.forums tr td
168
+ {
169
+ padding:4px 15px;
170
+ }
171
+ table.forums a.tiny
172
+ {
173
+ font-size:0.8em;
174
+ color:#666;
175
+ }
176
+ table.forums .posts
177
+ {
178
+ font-family: 'Lucida Grande', Tahoma, Arial, Helvetica, sans-serif;
179
+ color:#666;
180
+ font-size:0.8em;
181
+ }
182
+
183
+ /* page in general*/
184
+ body {
185
+ margin: 0;
186
+ margin-bottom: 25px;
187
+ padding: 0;
188
+ background-color: #508698;
189
+ font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
190
+ font-size: 13px;
191
+ color: #333;
192
+ }
193
+
194
+ #photo {
195
+ background-repeat: no-repeat;
196
+ background-position: top left;
197
+ height: 100px;
198
+ }
199
+
200
+ body, p, ol, ul, td {
201
+ font-family: verdana, arial, helvetica, sans-serif;
202
+ font-size: 13px;
203
+ }
204
+
205
+ #page {
206
+ float:left;
207
+ width: 650px;
208
+ padding:10px;
209
+ margin: 0px;
210
+ margin-left: auto;
211
+ margin-right: auto;
212
+ }
213
+ #content {
214
+ padding: 25px;
215
+ }
216
+
217
+ #sidebar {
218
+ padding :10px;
219
+ float: right;
220
+ width: 250px;
221
+ }
222
+
223
+ #footer {
224
+ clear: both;
225
+ }
226
+ #flash_notice, #flash_error {
227
+ padding: 5px 8px;
228
+ margin: 10px 0;
229
+ }
230
+
231
+ #flash_notice {
232
+ background-color: #CFC;
233
+ border: solid 1px #6C6;
234
+ }
235
+
236
+ #flash_error {
237
+ background-color: #FCC;
238
+ border: solid 1px #C66;
239
+ }
240
+ pre {
241
+ background-color: #eee;
242
+ padding: 10px;
243
+ font-size: 11px;
244
+ }
245
+
246
+ a { color: #000; }
247
+ a:visited { color: #666; }
248
+ a:hover { color: #fff; background-color:#000; }
249
+
250
+ .fieldWithErrors {
251
+ padding: 2px;
252
+ background-color: red;
253
+ display: table;
254
+ }
255
+
256
+ #errorExplanation {
257
+ width: 400px;
258
+ border: 2px solid red;
259
+ padding: 7px;
260
+ padding-bottom: 12px;
261
+ margin-bottom: 20px;
262
+ background-color: #f0f0f0;
263
+ }
264
+
265
+ #errorExplanation h2 {
266
+ text-align: left;
267
+ font-weight: bold;
268
+ padding: 5px 5px 5px 15px;
269
+ font-size: 12px;
270
+ margin: -7px;
271
+ background-color: #c00;
272
+ color: #fff;
273
+ }
274
+
275
+ #errorExplanation p {
276
+ color: #333;
277
+ margin-bottom: 0;
278
+ padding: 5px;
279
+ }
280
+
281
+ #errorExplanation ul li {
282
+ font-size: 12px;
283
+ list-style: square;
284
+ }
@@ -0,0 +1,6 @@
1
+ #page
2
+ #header
3
+ = render :partial => 'layouts/login'
4
+ = render :partial => 'layouts/msn'
5
+ #content
6
+ = yield
@@ -0,0 +1,27 @@
1
+ = javascript_include_tag 'jquery.layout.min-1.2.0'
2
+ .ui-layout-center
3
+ #tabs
4
+ %ul
5
+ #content
6
+ = yield
7
+
8
+ .ui-layout-north
9
+ = render :partial => 'layouts/login'
10
+ = render :partial => 'layouts/msn'
11
+
12
+ #container
13
+ #flash_notice{:style=>"display:none"}
14
+ = content_tag :h1, yield(:title) if show_title?
15
+
16
+ = yield :north
17
+
18
+ .ui-layout-south
19
+ = yield :south
20
+
21
+ .ui-layout-east
22
+ = render :partial => 'layouts/sidebar'
23
+ = yield :east
24
+
25
+ .ui-layout-west
26
+ = yield :west
27
+
@@ -0,0 +1,6 @@
1
+ #page
2
+ #header
3
+ = render :partial => 'layouts/login'
4
+ = render :partial => 'layouts/msn'
5
+ #content
6
+ = yield
@@ -0,0 +1,7 @@
1
+ #page
2
+ #header
3
+ = render :partial => 'layouts/login'
4
+ = render :partial => 'layouts/msn'
5
+ #content
6
+ = yield
7
+ = render :partial => 'layouts/sidebar'