sunrise-locales 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. data/Gemfile +36 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +15 -0
  4. data/Rakefile +27 -0
  5. data/app/controllers/manage/locales_controller.rb +43 -0
  6. data/app/views/manage/locales/_locale.html.erb +21 -0
  7. data/app/views/manage/locales/edit.html.erb +101 -0
  8. data/app/views/manage/locales/index.html.erb +24 -0
  9. data/config/locales/ru.yml +20 -0
  10. data/config/locales/uk.yml +20 -0
  11. data/config/routes.rb +5 -0
  12. data/lib/generators/sunrise/locales/USAGE +6 -0
  13. data/lib/generators/sunrise/locales/install_generator.rb +20 -0
  14. data/lib/generators/sunrise/locales/templates/codemirror.css +107 -0
  15. data/lib/generators/sunrise/locales/templates/codemirror.js +2157 -0
  16. data/lib/generators/sunrise/locales/templates/yaml.js +95 -0
  17. data/lib/sunrise-locales.rb +1 -0
  18. data/lib/sunrise/locales.rb +13 -0
  19. data/lib/sunrise/locales/engine.rb +19 -0
  20. data/lib/sunrise/locales/version.rb +5 -0
  21. data/lib/sunrise/locales/yml_locale.rb +43 -0
  22. data/spec/controllers/manage/locales_controller_spec.rb +59 -0
  23. data/spec/dummy/Rakefile +7 -0
  24. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  25. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  26. data/spec/dummy/app/helpers/manage/assets_helper.rb +2 -0
  27. data/spec/dummy/app/helpers/manage/base_helper.rb +81 -0
  28. data/spec/dummy/app/helpers/manage/pages_helper.rb +2 -0
  29. data/spec/dummy/app/helpers/manage/settings_helper.rb +2 -0
  30. data/spec/dummy/app/helpers/manage/structures_helper.rb +12 -0
  31. data/spec/dummy/app/helpers/manage/users_helper.rb +6 -0
  32. data/spec/dummy/app/models/defaults/ability.rb +39 -0
  33. data/spec/dummy/app/models/defaults/asset.rb +9 -0
  34. data/spec/dummy/app/models/defaults/attachment_file.rb +31 -0
  35. data/spec/dummy/app/models/defaults/avatar.rb +33 -0
  36. data/spec/dummy/app/models/defaults/header.rb +5 -0
  37. data/spec/dummy/app/models/defaults/page.rb +5 -0
  38. data/spec/dummy/app/models/defaults/picture.rb +31 -0
  39. data/spec/dummy/app/models/defaults/position_type.rb +7 -0
  40. data/spec/dummy/app/models/defaults/role.rb +20 -0
  41. data/spec/dummy/app/models/defaults/role_type.rb +8 -0
  42. data/spec/dummy/app/models/defaults/structure.rb +16 -0
  43. data/spec/dummy/app/models/defaults/structure_type.rb +9 -0
  44. data/spec/dummy/app/models/defaults/user.rb +47 -0
  45. data/spec/dummy/app/uploaders/attachment_file_uploader.rb +5 -0
  46. data/spec/dummy/app/uploaders/avatar_uploader.rb +17 -0
  47. data/spec/dummy/app/uploaders/picture_uploader.rb +17 -0
  48. data/spec/dummy/app/views/layouts/application.html.erb +37 -0
  49. data/spec/dummy/app/views/pages/show.html.erb +2 -0
  50. data/spec/dummy/app/views/shared/_notice.html.erb +17 -0
  51. data/spec/dummy/config.ru +4 -0
  52. data/spec/dummy/config/application.rb +46 -0
  53. data/spec/dummy/config/application.yml.sample +4 -0
  54. data/spec/dummy/config/boot.rb +10 -0
  55. data/spec/dummy/config/database.yml +22 -0
  56. data/spec/dummy/config/database.yml.sample +34 -0
  57. data/spec/dummy/config/environment.rb +5 -0
  58. data/spec/dummy/config/environments/development.rb +26 -0
  59. data/spec/dummy/config/environments/production.rb +49 -0
  60. data/spec/dummy/config/environments/test.rb +35 -0
  61. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  62. data/spec/dummy/config/initializers/devise.rb +204 -0
  63. data/spec/dummy/config/initializers/inflections.rb +10 -0
  64. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  65. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  66. data/spec/dummy/config/initializers/session_store.rb +8 -0
  67. data/spec/dummy/config/initializers/simple_form.rb +93 -0
  68. data/spec/dummy/config/initializers/sunrise.rb +9 -0
  69. data/spec/dummy/config/locales/devise.en.yml +53 -0
  70. data/spec/dummy/config/locales/en.yml +3 -0
  71. data/spec/dummy/config/locales/ru.yml +3 -0
  72. data/spec/dummy/config/locales/simple_form.en.yml +24 -0
  73. data/spec/dummy/config/locales/uk.yml +2 -0
  74. data/spec/dummy/config/logrotate-config.sample +9 -0
  75. data/spec/dummy/config/nginx-config-passenger.sample +51 -0
  76. data/spec/dummy/config/routes.rb +64 -0
  77. data/spec/dummy/db/migrate/20110801124809_sunrise_create_users.rb +29 -0
  78. data/spec/dummy/db/migrate/20110801124909_sunrise_create_roles.rb +16 -0
  79. data/spec/dummy/db/migrate/20110801125009_sunrise_create_structures.rb +27 -0
  80. data/spec/dummy/db/migrate/20110801125109_sunrise_create_pages.rb +17 -0
  81. data/spec/dummy/db/migrate/20110801125209_sunrise_create_assets.rb +28 -0
  82. data/spec/dummy/db/migrate/20110801125309_sunrise_create_headers.rb +20 -0
  83. data/spec/dummy/db/seeds.rb +25 -0
  84. data/spec/dummy/db/test.sqlite3 +0 -0
  85. data/spec/dummy/lib/templates/erb/scaffold/_form.html.erb +13 -0
  86. data/spec/dummy/log/test.log +1678 -0
  87. data/spec/dummy/public/404.html +26 -0
  88. data/spec/dummy/public/422.html +26 -0
  89. data/spec/dummy/public/500.html +26 -0
  90. data/spec/dummy/public/favicon.ico +0 -0
  91. data/spec/dummy/public/images/manage/add_post_bot.gif +0 -0
  92. data/spec/dummy/public/images/manage/add_post_top.gif +0 -0
  93. data/spec/dummy/public/images/manage/add_white_bot.gif +0 -0
  94. data/spec/dummy/public/images/manage/add_white_top.gif +0 -0
  95. data/spec/dummy/public/images/manage/arrow.png +0 -0
  96. data/spec/dummy/public/images/manage/back_but_lc.gif +0 -0
  97. data/spec/dummy/public/images/manage/back_but_rc.gif +0 -0
  98. data/spec/dummy/public/images/manage/bot_corn.gif +0 -0
  99. data/spec/dummy/public/images/manage/bot_duo_corn.gif +0 -0
  100. data/spec/dummy/public/images/manage/but_bg.png +0 -0
  101. data/spec/dummy/public/images/manage/but_block_lc.gif +0 -0
  102. data/spec/dummy/public/images/manage/but_block_rc.gif +0 -0
  103. data/spec/dummy/public/images/manage/but_freze_lc.gif +0 -0
  104. data/spec/dummy/public/images/manage/but_freze_rc.gif +0 -0
  105. data/spec/dummy/public/images/manage/but_gr.gif +0 -0
  106. data/spec/dummy/public/images/manage/but_gr_l.gif +0 -0
  107. data/spec/dummy/public/images/manage/but_gr_r.gif +0 -0
  108. data/spec/dummy/public/images/manage/but_search.gif +0 -0
  109. data/spec/dummy/public/images/manage/but_unfreze_lc.gif +0 -0
  110. data/spec/dummy/public/images/manage/but_unfreze_rc.gif +0 -0
  111. data/spec/dummy/public/images/manage/button_add_foto.gif +0 -0
  112. data/spec/dummy/public/images/manage/button_add_foto_ru.gif +0 -0
  113. data/spec/dummy/public/images/manage/button_add_foto_ua.gif +0 -0
  114. data/spec/dummy/public/images/manage/button_add_foto_uk.gif +0 -0
  115. data/spec/dummy/public/images/manage/cancelbutton.gif +0 -0
  116. data/spec/dummy/public/images/manage/dark_arr.gif +0 -0
  117. data/spec/dummy/public/images/manage/dark_arr_left.gif +0 -0
  118. data/spec/dummy/public/images/manage/dark_cross_ico.gif +0 -0
  119. data/spec/dummy/public/images/manage/dot.gif +0 -0
  120. data/spec/dummy/public/images/manage/duo_bg.gif +0 -0
  121. data/spec/dummy/public/images/manage/duo_bg_small.gif +0 -0
  122. data/spec/dummy/public/images/manage/duo_bg_small_blocked.gif +0 -0
  123. data/spec/dummy/public/images/manage/duo_bg_small_frozed.gif +0 -0
  124. data/spec/dummy/public/images/manage/duo_bg_small_notact.gif +0 -0
  125. data/spec/dummy/public/images/manage/duo_bot_small.gif +0 -0
  126. data/spec/dummy/public/images/manage/duo_bot_small_blocked.gif +0 -0
  127. data/spec/dummy/public/images/manage/duo_bot_small_frozed.gif +0 -0
  128. data/spec/dummy/public/images/manage/duo_bot_small_notact.gif +0 -0
  129. data/spec/dummy/public/images/manage/duo_top_small.gif +0 -0
  130. data/spec/dummy/public/images/manage/duo_top_small_blocked.gif +0 -0
  131. data/spec/dummy/public/images/manage/duo_top_small_frozed.gif +0 -0
  132. data/spec/dummy/public/images/manage/duo_top_small_notact.gif +0 -0
  133. data/spec/dummy/public/images/manage/edit_white_top.gif +0 -0
  134. data/spec/dummy/public/images/manage/empty.gif +0 -0
  135. data/spec/dummy/public/images/manage/filter_bot_bg.gif +0 -0
  136. data/spec/dummy/public/images/manage/filter_top_bg.gif +0 -0
  137. data/spec/dummy/public/images/manage/flag_en.gif +0 -0
  138. data/spec/dummy/public/images/manage/flag_en_nonact.gif +0 -0
  139. data/spec/dummy/public/images/manage/flag_ru.gif +0 -0
  140. data/spec/dummy/public/images/manage/flag_ru_nonact.gif +0 -0
  141. data/spec/dummy/public/images/manage/flag_ua.gif +0 -0
  142. data/spec/dummy/public/images/manage/flag_ua_nonact.gif +0 -0
  143. data/spec/dummy/public/images/manage/foto.jpg +0 -0
  144. data/spec/dummy/public/images/manage/ico_add.gif +0 -0
  145. data/spec/dummy/public/images/manage/ico_del.gif +0 -0
  146. data/spec/dummy/public/images/manage/ico_down.gif +0 -0
  147. data/spec/dummy/public/images/manage/ico_edit.gif +0 -0
  148. data/spec/dummy/public/images/manage/ico_settings.gif +0 -0
  149. data/spec/dummy/public/images/manage/ico_up.gif +0 -0
  150. data/spec/dummy/public/images/manage/input_bg.gif +0 -0
  151. data/spec/dummy/public/images/manage/l_but_corn.gif +0 -0
  152. data/spec/dummy/public/images/manage/minimise_but.gif +0 -0
  153. data/spec/dummy/public/images/manage/mp3.png +0 -0
  154. data/spec/dummy/public/images/manage/page_arr_hover.png +0 -0
  155. data/spec/dummy/public/images/manage/page_next_arr.gif +0 -0
  156. data/spec/dummy/public/images/manage/page_num_hover.gif +0 -0
  157. data/spec/dummy/public/images/manage/page_prev_arr.gif +0 -0
  158. data/spec/dummy/public/images/manage/panel/l_but_corn.gif +0 -0
  159. data/spec/dummy/public/images/manage/panel/maximise_but.gif +0 -0
  160. data/spec/dummy/public/images/manage/panel/r_but_corn.gif +0 -0
  161. data/spec/dummy/public/images/manage/panel/top_menu_arr.gif +0 -0
  162. data/spec/dummy/public/images/manage/panel/user_pic.gif +0 -0
  163. data/spec/dummy/public/images/manage/preloader.gif +0 -0
  164. data/spec/dummy/public/images/manage/r_but_corn.gif +0 -0
  165. data/spec/dummy/public/images/manage/select_bg.gif +0 -0
  166. data/spec/dummy/public/images/manage/select_corn.gif +0 -0
  167. data/spec/dummy/public/images/manage/struct_corn_lg.gif +0 -0
  168. data/spec/dummy/public/images/manage/struct_corn_llg.gif +0 -0
  169. data/spec/dummy/public/images/manage/struct_corn_lw.gif +0 -0
  170. data/spec/dummy/public/images/manage/struct_corn_rg.gif +0 -0
  171. data/spec/dummy/public/images/manage/struct_corn_rlg.gif +0 -0
  172. data/spec/dummy/public/images/manage/struct_corn_rw.gif +0 -0
  173. data/spec/dummy/public/images/manage/tab_gl.gif +0 -0
  174. data/spec/dummy/public/images/manage/tab_gr.gif +0 -0
  175. data/spec/dummy/public/images/manage/tab_wl.gif +0 -0
  176. data/spec/dummy/public/images/manage/tab_wr.gif +0 -0
  177. data/spec/dummy/public/images/manage/top_corn.gif +0 -0
  178. data/spec/dummy/public/images/manage/top_duo_corn.gif +0 -0
  179. data/spec/dummy/public/images/manage/top_menu_arr.gif +0 -0
  180. data/spec/dummy/public/images/manage/transp_cross.png +0 -0
  181. data/spec/dummy/public/images/manage/upload_progress.gif +0 -0
  182. data/spec/dummy/public/images/manage/user_act_lc.gif +0 -0
  183. data/spec/dummy/public/images/manage/user_act_rc.gif +0 -0
  184. data/spec/dummy/public/images/manage/user_ico.gif +0 -0
  185. data/spec/dummy/public/images/manage/user_pic.gif +0 -0
  186. data/spec/dummy/public/images/manage/user_pic_small.gif +0 -0
  187. data/spec/dummy/public/images/manage/user_pic_thumb.gif +0 -0
  188. data/spec/dummy/public/javascripts/application.js +2 -0
  189. data/spec/dummy/public/javascripts/controls.js +965 -0
  190. data/spec/dummy/public/javascripts/datepicker/jquery-ui-i18n.js +1176 -0
  191. data/spec/dummy/public/javascripts/datepicker/jquery.ui.datepicker-ru.js +37 -0
  192. data/spec/dummy/public/javascripts/datepicker/jquery.ui.datepicker-uk.js +37 -0
  193. data/spec/dummy/public/javascripts/dragdrop.js +974 -0
  194. data/spec/dummy/public/javascripts/effects.js +1123 -0
  195. data/spec/dummy/public/javascripts/fileupload/fileuploader-input.js +217 -0
  196. data/spec/dummy/public/javascripts/fileupload/fileuploader.css +31 -0
  197. data/spec/dummy/public/javascripts/fileupload/fileuploader.js +1288 -0
  198. data/spec/dummy/public/javascripts/jquery-ui-timepicker-addon.js +911 -0
  199. data/spec/dummy/public/javascripts/jquery.cookie.js +97 -0
  200. data/spec/dummy/public/javascripts/jquery.fancybox-1.3.4.pack.js +46 -0
  201. data/spec/dummy/public/javascripts/jquery.tmpl.min.js +10 -0
  202. data/spec/dummy/public/javascripts/manage-fileuploader.js +182 -0
  203. data/spec/dummy/public/javascripts/manage.js +294 -0
  204. data/spec/dummy/public/javascripts/preloader.js +47 -0
  205. data/spec/dummy/public/javascripts/prototype.js +6001 -0
  206. data/spec/dummy/public/javascripts/rails.js +331 -0
  207. data/spec/dummy/public/stylesheets/application.css +1 -0
  208. data/spec/dummy/public/stylesheets/fancybox/images/blank.gif +0 -0
  209. data/spec/dummy/public/stylesheets/fancybox/images/fancy_close.png +0 -0
  210. data/spec/dummy/public/stylesheets/fancybox/images/fancy_loading.png +0 -0
  211. data/spec/dummy/public/stylesheets/fancybox/images/fancy_nav_left.png +0 -0
  212. data/spec/dummy/public/stylesheets/fancybox/images/fancy_nav_right.png +0 -0
  213. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_e.png +0 -0
  214. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_n.png +0 -0
  215. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_ne.png +0 -0
  216. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_nw.png +0 -0
  217. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_s.png +0 -0
  218. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_se.png +0 -0
  219. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_sw.png +0 -0
  220. data/spec/dummy/public/stylesheets/fancybox/images/fancy_shadow_w.png +0 -0
  221. data/spec/dummy/public/stylesheets/fancybox/images/fancy_title_left.png +0 -0
  222. data/spec/dummy/public/stylesheets/fancybox/images/fancy_title_main.png +0 -0
  223. data/spec/dummy/public/stylesheets/fancybox/images/fancy_title_over.png +0 -0
  224. data/spec/dummy/public/stylesheets/fancybox/images/fancy_title_right.png +0 -0
  225. data/spec/dummy/public/stylesheets/fancybox/images/fancybox-x.png +0 -0
  226. data/spec/dummy/public/stylesheets/fancybox/images/fancybox-y.png +0 -0
  227. data/spec/dummy/public/stylesheets/fancybox/images/fancybox.png +0 -0
  228. data/spec/dummy/public/stylesheets/fancybox/jquery.fancybox-1.3.4.css +359 -0
  229. data/spec/dummy/public/stylesheets/manage/buttons.css +42 -0
  230. data/spec/dummy/public/stylesheets/manage/ie.css +16 -0
  231. data/spec/dummy/public/stylesheets/manage/main.css +1108 -0
  232. data/spec/dummy/public/stylesheets/manage/panel.css +126 -0
  233. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  234. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  235. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  236. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  237. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  238. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  239. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  240. data/spec/dummy/public/stylesheets/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  241. data/spec/dummy/public/stylesheets/smoothness/images/ui-icons_222222_256x240.png +0 -0
  242. data/spec/dummy/public/stylesheets/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  243. data/spec/dummy/public/stylesheets/smoothness/images/ui-icons_454545_256x240.png +0 -0
  244. data/spec/dummy/public/stylesheets/smoothness/images/ui-icons_888888_256x240.png +0 -0
  245. data/spec/dummy/public/stylesheets/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  246. data/spec/dummy/public/stylesheets/smoothness/jquery-ui-1.8.13.custom.css +578 -0
  247. data/spec/dummy/script/rails +6 -0
  248. data/spec/factories/structure_factory.rb +22 -0
  249. data/spec/factories/user_factory.rb +48 -0
  250. data/spec/generators/install_generator_spec.rb +18 -0
  251. data/spec/integration/navigation_spec.rb +9 -0
  252. data/spec/spec.opts +2 -0
  253. data/spec/spec_helper.rb +57 -0
  254. data/spec/sunrise_locales_spec.rb +7 -0
  255. data/spec/support/helpers/controller_macros.rb +40 -0
  256. data/spec/tmp/public/javascripts/codemirror.js +2157 -0
  257. data/spec/tmp/public/javascripts/yaml.js +95 -0
  258. data/spec/tmp/public/stylesheets/codemirror.css +107 -0
  259. metadata +575 -0
@@ -0,0 +1,331 @@
1
+ /**
2
+ * Unobtrusive scripting adapter for jQuery
3
+ *
4
+ * Requires jQuery 1.6.0 or later.
5
+ * https://github.com/rails/jquery-ujs
6
+
7
+ * Uploading file using rails.js
8
+ * =============================
9
+ *
10
+ * By default, browsers do not allow files to be uploaded via AJAX. As a result, if there are any non-blank file fields
11
+ * in the remote form, this adapter aborts the AJAX submission and allows the form to submit through standard means.
12
+ *
13
+ * The `ajax:aborted:file` event allows you to bind your own handler to process the form submission however you wish.
14
+ *
15
+ * Ex:
16
+ * $('form').live('ajax:aborted:file', function(event, elements){
17
+ * // Implement own remote file-transfer handler here for non-blank file inputs passed in `elements`.
18
+ * // Returning false in this handler tells rails.js to disallow standard form submission
19
+ * return false;
20
+ * });
21
+ *
22
+ * The `ajax:aborted:file` event is fired when a file-type input is detected with a non-blank value.
23
+ *
24
+ * Third-party tools can use this hook to detect when an AJAX file upload is attempted, and then use
25
+ * techniques like the iframe method to upload the file instead.
26
+ *
27
+ * Required fields in rails.js
28
+ * ===========================
29
+ *
30
+ * If any blank required inputs (required="required") are detected in the remote form, the whole form submission
31
+ * is canceled. Note that this is unlike file inputs, which still allow standard (non-AJAX) form submission.
32
+ *
33
+ * The `ajax:aborted:required` event allows you to bind your own handler to inform the user of blank required inputs.
34
+ *
35
+ * !! Note that Opera does not fire the form's submit event if there are blank required inputs, so this event may never
36
+ * get fired in Opera. This event is what causes other browsers to exhibit the same submit-aborting behavior.
37
+ *
38
+ * Ex:
39
+ * $('form').live('ajax:aborted:required', function(event, elements){
40
+ * // Returning false in this handler tells rails.js to submit the form anyway.
41
+ * // The blank required inputs are passed to this function in `elements`.
42
+ * return ! confirm("Would you like to submit the form with missing info?");
43
+ * });
44
+ */
45
+
46
+ (function($, undefined) {
47
+ // Shorthand to make it a little easier to call public rails functions from within rails.js
48
+ var rails;
49
+
50
+ $.rails = rails = {
51
+ // Link elements bound by jquery-ujs
52
+ linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]',
53
+
54
+ // Select elements bound by jquery-ujs
55
+ selectChangeSelector: 'select[data-remote]',
56
+
57
+ // Form elements bound by jquery-ujs
58
+ formSubmitSelector: 'form',
59
+
60
+ // Form input elements bound by jquery-ujs
61
+ formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])',
62
+
63
+ // Form input elements disabled during form submission
64
+ disableSelector: 'input[data-disable-with], button[data-disable-with], textarea[data-disable-with]',
65
+
66
+ // Form input elements re-enabled after form submission
67
+ enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled',
68
+
69
+ // Form required input elements
70
+ requiredInputSelector: 'input[name][required]:not([disabled]),textarea[name][required]:not([disabled])',
71
+
72
+ // Form file input elements
73
+ fileInputSelector: 'input:file',
74
+
75
+ // Make sure that every Ajax request sends the CSRF token
76
+ CSRFProtection: function(xhr) {
77
+ var token = $('meta[name="csrf-token"]').attr('content');
78
+ if (token) xhr.setRequestHeader('X-CSRF-Token', token);
79
+ },
80
+
81
+ // Triggers an event on an element and returns false if the event result is false
82
+ fire: function(obj, name, data) {
83
+ var event = $.Event(name);
84
+ obj.trigger(event, data);
85
+ return event.result !== false;
86
+ },
87
+
88
+ // Default confirm dialog, may be overridden with custom confirm dialog in $.rails.confirm
89
+ confirm: function(message) {
90
+ return confirm(message);
91
+ },
92
+
93
+ // Default ajax function, may be overridden with custom function in $.rails.ajax
94
+ ajax: function(options) {
95
+ return $.ajax(options);
96
+ },
97
+
98
+ // Submits "remote" forms and links with ajax
99
+ handleRemote: function(element) {
100
+ var method, url, data,
101
+ crossDomain = element.data('cross-domain') || null,
102
+ dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType);
103
+
104
+ if (rails.fire(element, 'ajax:before')) {
105
+
106
+ if (element.is('form')) {
107
+ method = element.attr('method');
108
+ url = element.attr('action');
109
+ data = element.serializeArray();
110
+ // memoized value from clicked submit button
111
+ var button = element.data('ujs:submit-button');
112
+ if (button) {
113
+ data.push(button);
114
+ element.data('ujs:submit-button', null);
115
+ }
116
+ } else if (element.is('select')) {
117
+ method = element.data('method');
118
+ url = element.data('url');
119
+ data = element.serialize();
120
+ if (element.data('params')) data = data + "&" + element.data('params');
121
+ } else {
122
+ method = element.data('method');
123
+ url = element.attr('href');
124
+ data = element.data('params') || null;
125
+ }
126
+
127
+ options = {
128
+ type: method || 'GET', data: data, dataType: dataType, crossDomain: crossDomain,
129
+ // stopping the "ajax:beforeSend" event will cancel the ajax request
130
+ beforeSend: function(xhr, settings) {
131
+ if (settings.dataType === undefined) {
132
+ xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
133
+ }
134
+ return rails.fire(element, 'ajax:beforeSend', [xhr, settings]);
135
+ },
136
+ success: function(data, status, xhr) {
137
+ element.trigger('ajax:success', [data, status, xhr]);
138
+ },
139
+ complete: function(xhr, status) {
140
+ element.trigger('ajax:complete', [xhr, status]);
141
+ },
142
+ error: function(xhr, status, error) {
143
+ element.trigger('ajax:error', [xhr, status, error]);
144
+ }
145
+ };
146
+ // Do not pass url to `ajax` options if blank
147
+ if (url) { $.extend(options, { url: url }); }
148
+
149
+ rails.ajax(options);
150
+ }
151
+ },
152
+
153
+ // Handles "data-method" on links such as:
154
+ // <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
155
+ handleMethod: function(link) {
156
+ var href = link.attr('href'),
157
+ method = link.data('method'),
158
+ csrf_token = $('meta[name=csrf-token]').attr('content'),
159
+ csrf_param = $('meta[name=csrf-param]').attr('content'),
160
+ form = $('<form method="post" action="' + href + '"></form>'),
161
+ metadata_input = '<input name="_method" value="' + method + '" type="hidden" />';
162
+
163
+ if (csrf_param !== undefined && csrf_token !== undefined) {
164
+ metadata_input += '<input name="' + csrf_param + '" value="' + csrf_token + '" type="hidden" />';
165
+ }
166
+
167
+ form.hide().append(metadata_input).appendTo('body');
168
+ form.submit();
169
+ },
170
+
171
+ /* Disables form elements:
172
+ - Caches element value in 'ujs:enable-with' data store
173
+ - Replaces element text with value of 'data-disable-with' attribute
174
+ - Adds disabled=disabled attribute
175
+ */
176
+ disableFormElements: function(form) {
177
+ form.find(rails.disableSelector).each(function() {
178
+ var element = $(this), method = element.is('button') ? 'html' : 'val';
179
+ element.data('ujs:enable-with', element[method]());
180
+ element[method](element.data('disable-with'));
181
+ element.attr('disabled', 'disabled');
182
+ });
183
+ },
184
+
185
+ /* Re-enables disabled form elements:
186
+ - Replaces element text with cached value from 'ujs:enable-with' data store (created in `disableFormElements`)
187
+ - Removes disabled attribute
188
+ */
189
+ enableFormElements: function(form) {
190
+ form.find(rails.enableSelector).each(function() {
191
+ var element = $(this), method = element.is('button') ? 'html' : 'val';
192
+ if (element.data('ujs:enable-with')) element[method](element.data('ujs:enable-with'));
193
+ element.removeAttr('disabled');
194
+ });
195
+ },
196
+
197
+ /* For 'data-confirm' attribute:
198
+ - Fires `confirm` event
199
+ - Shows the confirmation dialog
200
+ - Fires the `confirm:complete` event
201
+
202
+ Returns `true` if no function stops the chain and user chose yes; `false` otherwise.
203
+ Attaching a handler to the element's `confirm` event that returns a `falsy` value cancels the confirmation dialog.
204
+ Attaching a handler to the element's `confirm:complete` event that returns a `falsy` value makes this function
205
+ return false. The `confirm:complete` event is fired whether or not the user answered true or false to the dialog.
206
+ */
207
+ allowAction: function(element) {
208
+ var message = element.data('confirm'),
209
+ answer = false, callback;
210
+ if (!message) { return true; }
211
+
212
+ if (rails.fire(element, 'confirm')) {
213
+ answer = rails.confirm(message);
214
+ callback = rails.fire(element, 'confirm:complete', [answer]);
215
+ }
216
+ return answer && callback;
217
+ },
218
+
219
+ // Helper function which checks for blank inputs in a form that match the specified CSS selector
220
+ blankInputs: function(form, specifiedSelector, nonBlank) {
221
+ var inputs = $(), input,
222
+ selector = specifiedSelector || 'input,textarea';
223
+ form.find(selector).each(function() {
224
+ input = $(this);
225
+ // Collect non-blank inputs if nonBlank option is true, otherwise, collect blank inputs
226
+ if (nonBlank ? input.val() : !input.val()) {
227
+ inputs = inputs.add(input);
228
+ }
229
+ });
230
+ return inputs.length ? inputs : false;
231
+ },
232
+
233
+ // Helper function which checks for non-blank inputs in a form that match the specified CSS selector
234
+ nonBlankInputs: function(form, specifiedSelector) {
235
+ return rails.blankInputs(form, specifiedSelector, true); // true specifies nonBlank
236
+ },
237
+
238
+ // Helper function, needed to provide consistent behavior in IE
239
+ stopEverything: function(e) {
240
+ $(e.target).trigger('ujs:everythingStopped');
241
+ e.stopImmediatePropagation();
242
+ return false;
243
+ },
244
+
245
+ // find all the submit events directly bound to the form and
246
+ // manually invoke them. If anyone returns false then stop the loop
247
+ callFormSubmitBindings: function(form) {
248
+ var events = form.data('events'), continuePropagation = true;
249
+ if (events !== undefined && events['submit'] !== undefined) {
250
+ $.each(events['submit'], function(i, obj){
251
+ if (typeof obj.handler === 'function') return continuePropagation = obj.handler(obj.data);
252
+ });
253
+ }
254
+ return continuePropagation;
255
+ }
256
+ };
257
+
258
+ $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }});
259
+
260
+ $(rails.linkClickSelector).live('click.rails', function(e) {
261
+ var link = $(this);
262
+ if (!rails.allowAction(link)) return rails.stopEverything(e);
263
+
264
+ if (link.data('remote') !== undefined) {
265
+ rails.handleRemote(link);
266
+ return false;
267
+ } else if (link.data('method')) {
268
+ rails.handleMethod(link);
269
+ return false;
270
+ }
271
+ });
272
+
273
+ $(rails.selectChangeSelector).live('change.rails', function(e) {
274
+ var link = $(this);
275
+ if (!rails.allowAction(link)) return rails.stopEverything(e);
276
+
277
+ rails.handleRemote(link);
278
+ return false;
279
+ });
280
+
281
+ $(rails.formSubmitSelector).live('submit.rails', function(e) {
282
+ var form = $(this),
283
+ remote = form.data('remote') !== undefined,
284
+ blankRequiredInputs = rails.blankInputs(form, rails.requiredInputSelector),
285
+ nonBlankFileInputs = rails.nonBlankInputs(form, rails.fileInputSelector);
286
+
287
+ if (!rails.allowAction(form)) return rails.stopEverything(e);
288
+
289
+ // skip other logic when required values are missing or file upload is present
290
+ if (blankRequiredInputs && rails.fire(form, 'ajax:aborted:required', [blankRequiredInputs])) {
291
+ return rails.stopEverything(e);
292
+ }
293
+
294
+ if (remote) {
295
+ if (nonBlankFileInputs) {
296
+ return rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);
297
+ }
298
+
299
+ // If browser does not support submit bubbling, then this live-binding will be called before direct
300
+ // bindings. Therefore, we should directly call any direct bindings before remotely submitting form.
301
+ if (!$.support.submitBubbles && rails.callFormSubmitBindings(form) === false) return rails.stopEverything(e);
302
+
303
+ rails.handleRemote(form);
304
+ return false;
305
+ } else {
306
+ // slight timeout so that the submit button gets properly serialized
307
+ setTimeout(function(){ rails.disableFormElements(form); }, 13);
308
+ }
309
+ });
310
+
311
+ $(rails.formInputClickSelector).live('click.rails', function(event) {
312
+ var button = $(this);
313
+
314
+ if (!rails.allowAction(button)) return rails.stopEverything(event);
315
+
316
+ // register the pressed submit button
317
+ var name = button.attr('name'),
318
+ data = name ? {name:name, value:button.val()} : null;
319
+
320
+ button.closest('form').data('ujs:submit-button', data);
321
+ });
322
+
323
+ $(rails.formSubmitSelector).live('ajax:beforeSend.rails', function(event) {
324
+ if (this == event.target) rails.disableFormElements($(this));
325
+ });
326
+
327
+ $(rails.formSubmitSelector).live('ajax:complete.rails', function(event) {
328
+ if (this == event.target) rails.enableFormElements($(this));
329
+ });
330
+
331
+ })( jQuery );
@@ -0,0 +1 @@
1
+ /* Aimbulance */
@@ -0,0 +1,359 @@
1
+ /*
2
+ * FancyBox - jQuery Plugin
3
+ * Simple and fancy lightbox alternative
4
+ *
5
+ * Examples and documentation at: http://fancybox.net
6
+ *
7
+ * Copyright (c) 2008 - 2010 Janis Skarnelis
8
+ * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
9
+ *
10
+ * Version: 1.3.4 (11/11/2010)
11
+ * Requires: jQuery v1.3+
12
+ *
13
+ * Dual licensed under the MIT and GPL licenses:
14
+ * http://www.opensource.org/licenses/mit-license.php
15
+ * http://www.gnu.org/licenses/gpl.html
16
+ */
17
+
18
+ #fancybox-loading {
19
+ position: fixed;
20
+ top: 50%;
21
+ left: 50%;
22
+ width: 40px;
23
+ height: 40px;
24
+ margin-top: -20px;
25
+ margin-left: -20px;
26
+ cursor: pointer;
27
+ overflow: hidden;
28
+ z-index: 1104;
29
+ display: none;
30
+ }
31
+
32
+ #fancybox-loading div {
33
+ position: absolute;
34
+ top: 0;
35
+ left: 0;
36
+ width: 40px;
37
+ height: 480px;
38
+ background-image: url('/stylesheets/fancybox/images/fancybox.png');
39
+ }
40
+
41
+ #fancybox-overlay {
42
+ position: absolute;
43
+ top: 0;
44
+ left: 0;
45
+ width: 100%;
46
+ z-index: 1100;
47
+ display: none;
48
+ }
49
+
50
+ #fancybox-tmp {
51
+ padding: 0;
52
+ margin: 0;
53
+ border: 0;
54
+ overflow: auto;
55
+ display: none;
56
+ }
57
+
58
+ #fancybox-wrap {
59
+ position: absolute;
60
+ top: 0;
61
+ left: 0;
62
+ padding: 20px;
63
+ z-index: 1101;
64
+ outline: none;
65
+ display: none;
66
+ }
67
+
68
+ #fancybox-outer {
69
+ position: relative;
70
+ width: 100%;
71
+ height: 100%;
72
+ background: #fff;
73
+ }
74
+
75
+ #fancybox-content {
76
+ width: 0;
77
+ height: 0;
78
+ padding: 0;
79
+ outline: none;
80
+ position: relative;
81
+ overflow: hidden;
82
+ z-index: 1102;
83
+ border: 0px solid #fff;
84
+ }
85
+
86
+ #fancybox-hide-sel-frame {
87
+ position: absolute;
88
+ top: 0;
89
+ left: 0;
90
+ width: 100%;
91
+ height: 100%;
92
+ background: transparent;
93
+ z-index: 1101;
94
+ }
95
+
96
+ #fancybox-close {
97
+ position: absolute;
98
+ top: -15px;
99
+ right: -15px;
100
+ width: 30px;
101
+ height: 30px;
102
+ background: transparent url('/stylesheets/fancybox/images/fancybox.png') -40px 0px;
103
+ cursor: pointer;
104
+ z-index: 1103;
105
+ display: none;
106
+ }
107
+
108
+ #fancybox-error {
109
+ color: #444;
110
+ font: normal 12px/20px Arial;
111
+ padding: 14px;
112
+ margin: 0;
113
+ }
114
+
115
+ #fancybox-img {
116
+ width: 100%;
117
+ height: 100%;
118
+ padding: 0;
119
+ margin: 0;
120
+ border: none;
121
+ outline: none;
122
+ line-height: 0;
123
+ vertical-align: top;
124
+ }
125
+
126
+ #fancybox-frame {
127
+ width: 100%;
128
+ height: 100%;
129
+ border: none;
130
+ display: block;
131
+ }
132
+
133
+ #fancybox-left, #fancybox-right {
134
+ position: absolute;
135
+ bottom: 0px;
136
+ height: 100%;
137
+ width: 35%;
138
+ cursor: pointer;
139
+ outline: none;
140
+ background: transparent url('/stylesheets/fancybox/images/blank.gif');
141
+ z-index: 1102;
142
+ display: none;
143
+ }
144
+
145
+ #fancybox-left {
146
+ left: 0px;
147
+ }
148
+
149
+ #fancybox-right {
150
+ right: 0px;
151
+ }
152
+
153
+ #fancybox-left-ico, #fancybox-right-ico {
154
+ position: absolute;
155
+ top: 50%;
156
+ left: -9999px;
157
+ width: 30px;
158
+ height: 30px;
159
+ margin-top: -15px;
160
+ cursor: pointer;
161
+ z-index: 1102;
162
+ display: block;
163
+ }
164
+
165
+ #fancybox-left-ico {
166
+ background-image: url('/stylesheets/fancybox/images/fancybox.png');
167
+ background-position: -40px -30px;
168
+ }
169
+
170
+ #fancybox-right-ico {
171
+ background-image: url('/stylesheets/fancybox/images/fancybox.png');
172
+ background-position: -40px -60px;
173
+ }
174
+
175
+ #fancybox-left:hover, #fancybox-right:hover {
176
+ visibility: visible; /* IE6 */
177
+ }
178
+
179
+ #fancybox-left:hover span {
180
+ left: 20px;
181
+ }
182
+
183
+ #fancybox-right:hover span {
184
+ left: auto;
185
+ right: 20px;
186
+ }
187
+
188
+ .fancybox-bg {
189
+ position: absolute;
190
+ padding: 0;
191
+ margin: 0;
192
+ border: 0;
193
+ width: 20px;
194
+ height: 20px;
195
+ z-index: 1001;
196
+ }
197
+
198
+ #fancybox-bg-n {
199
+ top: -20px;
200
+ left: 0;
201
+ width: 100%;
202
+ background-image: url('/stylesheets/fancybox/images/fancybox-x.png');
203
+ }
204
+
205
+ #fancybox-bg-ne {
206
+ top: -20px;
207
+ right: -20px;
208
+ background-image: url('/stylesheets/fancybox/images/fancybox.png');
209
+ background-position: -40px -162px;
210
+ }
211
+
212
+ #fancybox-bg-e {
213
+ top: 0;
214
+ right: -20px;
215
+ height: 100%;
216
+ background-image: url('/stylesheets/fancybox/images/fancybox-y.png');
217
+ background-position: -20px 0px;
218
+ }
219
+
220
+ #fancybox-bg-se {
221
+ bottom: -20px;
222
+ right: -20px;
223
+ background-image: url('/stylesheets/fancybox/images/fancybox.png');
224
+ background-position: -40px -182px;
225
+ }
226
+
227
+ #fancybox-bg-s {
228
+ bottom: -20px;
229
+ left: 0;
230
+ width: 100%;
231
+ background-image: url('/stylesheets/fancybox/images/fancybox-x.png');
232
+ background-position: 0px -20px;
233
+ }
234
+
235
+ #fancybox-bg-sw {
236
+ bottom: -20px;
237
+ left: -20px;
238
+ background-image: url('/stylesheets/fancybox/images/fancybox.png');
239
+ background-position: -40px -142px;
240
+ }
241
+
242
+ #fancybox-bg-w {
243
+ top: 0;
244
+ left: -20px;
245
+ height: 100%;
246
+ background-image: url('/stylesheets/fancybox/images/fancybox-y.png');
247
+ }
248
+
249
+ #fancybox-bg-nw {
250
+ top: -20px;
251
+ left: -20px;
252
+ background-image: url('/stylesheets/fancybox/images/fancybox.png');
253
+ background-position: -40px -122px;
254
+ }
255
+
256
+ #fancybox-title {
257
+ font-family: Helvetica;
258
+ font-size: 12px;
259
+ z-index: 1102;
260
+ }
261
+
262
+ .fancybox-title-inside {
263
+ padding-bottom: 10px;
264
+ text-align: center;
265
+ color: #333;
266
+ background: #fff;
267
+ position: relative;
268
+ }
269
+
270
+ .fancybox-title-outside {
271
+ padding-top: 10px;
272
+ color: #fff;
273
+ }
274
+
275
+ .fancybox-title-over {
276
+ position: absolute;
277
+ bottom: 0;
278
+ left: 0;
279
+ color: #FFF;
280
+ text-align: left;
281
+ }
282
+
283
+ #fancybox-title-over {
284
+ padding: 10px;
285
+ background-image: url('/stylesheets/fancybox/images/fancy_title_over.png');
286
+ display: block;
287
+ }
288
+
289
+ .fancybox-title-float {
290
+ position: absolute;
291
+ left: 0;
292
+ bottom: -20px;
293
+ height: 32px;
294
+ }
295
+
296
+ #fancybox-title-float-wrap {
297
+ border: none;
298
+ border-collapse: collapse;
299
+ width: auto;
300
+ }
301
+
302
+ #fancybox-title-float-wrap td {
303
+ border: none;
304
+ white-space: nowrap;
305
+ }
306
+
307
+ #fancybox-title-float-left {
308
+ padding: 0 0 0 15px;
309
+ background: url('/stylesheets/fancybox/images/fancybox.png') -40px -90px no-repeat;
310
+ }
311
+
312
+ #fancybox-title-float-main {
313
+ color: #FFF;
314
+ line-height: 29px;
315
+ font-weight: bold;
316
+ padding: 0 0 3px 0;
317
+ background: url('/stylesheets/fancybox/images/fancybox-x.png') 0px -40px;
318
+ }
319
+
320
+ #fancybox-title-float-right {
321
+ padding: 0 0 0 15px;
322
+ background: url('/stylesheets/fancybox/images/fancybox.png') -55px -90px no-repeat;
323
+ }
324
+
325
+ /* IE6 */
326
+
327
+ .fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
328
+
329
+ .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
330
+ .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
331
+
332
+ .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
333
+ .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
334
+ .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
335
+ .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
336
+
337
+ .fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
338
+ height: expression(this.parentNode.clientHeight + "px");
339
+ }
340
+
341
+ #fancybox-loading.fancybox-ie6 {
342
+ position: absolute; margin-top: 0;
343
+ top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
344
+ }
345
+
346
+ #fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
347
+
348
+ /* IE6, IE7, IE8 */
349
+
350
+ .fancybox-ie .fancybox-bg { background: transparent !important; }
351
+
352
+ .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
353
+ .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
354
+ .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
355
+ .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
356
+ .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
357
+ .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
358
+ .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
359
+ .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }