noodall-ui 0.4.11 → 0.5.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (503) hide show
  1. data/.gitignore +2 -1
  2. data/Gemfile +2 -1
  3. data/MIT-LICENSE +20 -0
  4. data/Rakefile +50 -10
  5. data/{public → app/assets}/images/admin/add-small.png +0 -0
  6. data/{public → app/assets}/images/admin/add.png +0 -0
  7. data/{public → app/assets}/images/admin/add_file.gif +0 -0
  8. data/{public → app/assets}/images/admin/advanced.gif +0 -0
  9. data/{public → app/assets}/images/admin/back.png +0 -0
  10. data/{public → app/assets}/images/admin/cancel-small.gif +0 -0
  11. data/{public → app/assets}/images/admin/cancel.gif +0 -0
  12. data/{public → app/assets}/images/admin/change-bg.gif +0 -0
  13. data/{public → app/assets}/images/admin/change.gif +0 -0
  14. data/{public → app/assets}/images/admin/check.png +0 -0
  15. data/{public → app/assets}/images/admin/clear.gif +0 -0
  16. data/{public → app/assets}/images/admin/close.png +0 -0
  17. data/{public → app/assets}/images/admin/create.gif +0 -0
  18. data/{public → app/assets}/images/admin/delete.gif +0 -0
  19. data/{public → app/assets}/images/admin/delete.png +0 -0
  20. data/{public → app/assets}/images/admin/doc-icon.png +0 -0
  21. data/{public → app/assets}/images/admin/document.png +0 -0
  22. data/{public → app/assets}/images/admin/down.png +0 -0
  23. data/{public → app/assets}/images/admin/download.png +0 -0
  24. data/{public → app/assets}/images/admin/draft.gif +0 -0
  25. data/{public → app/assets}/images/admin/edit.gif +0 -0
  26. data/{public → app/assets}/images/admin/edit.png +0 -0
  27. data/{public → app/assets}/images/admin/hidden.png +0 -0
  28. data/{public → app/assets}/images/admin/hide.gif +0 -0
  29. data/{public → app/assets}/images/admin/image.png +0 -0
  30. data/{public → app/assets}/images/admin/image_choices.png +0 -0
  31. data/{public → app/assets}/images/admin/image_small.png +0 -0
  32. data/{public → app/assets}/images/admin/info-white.png +0 -0
  33. data/{public → app/assets}/images/admin/info.png +0 -0
  34. data/{public → app/assets}/images/admin/media.gif +0 -0
  35. data/{public → app/assets}/images/admin/nav-2.gif +0 -0
  36. data/{public → app/assets}/images/admin/nav.gif +0 -0
  37. data/{public → app/assets}/images/admin/next.png +0 -0
  38. data/{public → app/assets}/images/admin/no-type-icon.png +0 -0
  39. data/{public → app/assets}/images/admin/pagination.gif +0 -0
  40. data/{public → app/assets}/images/admin/pdf-icon.png +0 -0
  41. data/{public → app/assets}/images/admin/prev.png +0 -0
  42. data/{public → app/assets}/images/admin/preview.gif +0 -0
  43. data/{public → app/assets}/images/admin/publish.gif +0 -0
  44. data/{public → app/assets}/images/admin/remove.gif +0 -0
  45. data/{public → app/assets}/images/admin/reset.gif +0 -0
  46. data/{public → app/assets}/images/admin/select_image.gif +0 -0
  47. data/{public → app/assets}/images/admin/select_images.gif +0 -0
  48. data/{public → app/assets}/images/admin/set.gif +0 -0
  49. data/{public → app/assets}/images/admin/sort.png +0 -0
  50. data/{public → app/assets}/images/admin/tag.png +0 -0
  51. data/{public → app/assets}/images/admin/templates/article-page.gif +0 -0
  52. data/{public → app/assets}/images/admin/templates/articles-list.gif +0 -0
  53. data/{public → app/assets}/images/admin/templates/course-page.gif +0 -0
  54. data/{public → app/assets}/images/admin/templates/event-page.gif +0 -0
  55. data/{public → app/assets}/images/admin/templates/events-list.gif +0 -0
  56. data/{public → app/assets}/images/admin/templates/home.gif +0 -0
  57. data/{public → app/assets}/images/admin/templates/landing-page.gif +0 -0
  58. data/{public → app/assets}/images/admin/templates/page-a.gif +0 -0
  59. data/{public → app/assets}/images/admin/templates/page-b.gif +0 -0
  60. data/{public → app/assets}/images/admin/templates/school-landing-page.gif +0 -0
  61. data/{public → app/assets}/images/admin/templates/study-landing-page.gif +0 -0
  62. data/{public → app/assets}/images/admin/top-level.png +0 -0
  63. data/{public → app/assets}/images/admin/top-level_small.png +0 -0
  64. data/{public → app/assets}/images/admin/txt-icon.png +0 -0
  65. data/{public → app/assets}/images/admin/uncheck.png +0 -0
  66. data/{public → app/assets}/images/admin/up.png +0 -0
  67. data/{public → app/assets}/images/admin/update.gif +0 -0
  68. data/{public → app/assets}/images/admin/upload.png +0 -0
  69. data/{public → app/assets}/images/admin/versions.gif +0 -0
  70. data/{public → app/assets}/images/admin/video.png +0 -0
  71. data/{public → app/assets}/images/admin/view.png +0 -0
  72. data/{public → app/assets}/images/admin/xls-icon.png +0 -0
  73. data/{public → app/assets}/images/admin/youtube.gif +0 -0
  74. data/{public → app/assets}/javascripts/admin/application.js +10 -4
  75. data/{public → app/assets}/javascripts/admin/asset_edit.js +0 -0
  76. data/{public → app/assets}/javascripts/admin/assets.js +7 -7
  77. data/{public → app/assets}/javascripts/admin/nodes.js +0 -0
  78. data/{public → app/assets}/javascripts/admin/tiny_mce_config.js +7 -7
  79. data/app/assets/javascripts/admin.js +4 -0
  80. data/{public → app/assets}/javascripts/ajaxify.js +0 -0
  81. data/{public → app/assets}/javascripts/rails.js +0 -0
  82. data/{public → app/assets}/stylesheets/admin/forms.css +20 -20
  83. data/{public → app/assets}/stylesheets/admin/handheld.css +0 -0
  84. data/{public → app/assets}/stylesheets/admin/ie.css +0 -0
  85. data/{public → app/assets}/stylesheets/admin/ie6.css +0 -0
  86. data/{public → app/assets}/stylesheets/admin/ie8.css +0 -0
  87. data/{public → app/assets}/stylesheets/admin/layout.css +1 -1
  88. data/{public → app/assets}/stylesheets/admin/print.css +0 -0
  89. data/{public → app/assets}/stylesheets/admin/reset.css +0 -0
  90. data/{public → app/assets}/stylesheets/admin/skin.css +27 -27
  91. data/{public → app/assets}/stylesheets/admin/tinymce.css +0 -0
  92. data/{public → app/assets}/stylesheets/admin/typography.css +0 -0
  93. data/app/assets/stylesheets/admin.css +8 -0
  94. data/{log/.gitignore → app/controllers/.gitkeep} +0 -0
  95. data/app/controllers/noodall/admin/assets_controller.rb +3 -3
  96. data/app/controllers/noodall/admin/nodes_controller.rb +8 -0
  97. data/app/controllers/noodall/nodes_controller.rb +2 -1
  98. data/{public/favicon.ico → app/helpers/.gitkeep} +0 -0
  99. data/app/helpers/noodall/admin/nodes_helper.rb +1 -1
  100. data/{tmp/.gitignore → app/mailers/.gitkeep} +0 -0
  101. data/app/models/.gitkeep +0 -0
  102. data/app/views/.gitkeep +0 -0
  103. data/app/views/layouts/noodall_admin.html.erb +5 -5
  104. data/app/views/noodall/admin/nodes/_branch.html.erb +5 -10
  105. data/app/views/noodall/admin/nodes/tree.html.erb +1 -1
  106. data/app/views/noodall/nodes/{sitemap.xml.rxml → sitemap.xml.builder} +2 -2
  107. data/config/routes.rb +2 -0
  108. data/features/sitemap.feature +1 -1
  109. data/features/step_definitions/asset_steps.rb +1 -1
  110. data/features/step_definitions/cms_node_steps.rb +1 -1
  111. data/features/step_definitions/component_steps.rb +4 -4
  112. data/features/support/env.rb +1 -1
  113. data/features/support/mm_factory_steps.rb +3 -0
  114. data/lib/noodall/engine.rb +6 -2
  115. data/lib/noodall/ui/version.rb +1 -1
  116. data/lib/tasks/noodall-ui_tasks.rake +4 -0
  117. data/noodall-ui.gemspec +1 -1
  118. data/public/javascripts/admin.js +0 -0
  119. data/public/stylesheets/admin.css +2822 -0
  120. data/script/rails +3 -3
  121. data/spec/dummy/Rakefile +7 -0
  122. data/spec/dummy/app/assets/javascripts/application.js +7 -0
  123. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  124. data/{demo → spec/dummy/app}/controllers/application_controller.rb +0 -0
  125. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  126. data/spec/dummy/app/mailers/.gitkeep +0 -0
  127. data/spec/dummy/app/models/.gitkeep +0 -0
  128. data/{demo → spec/dummy/app}/models/gallery.rb +0 -0
  129. data/{demo → spec/dummy/app}/models/page_a.rb +0 -0
  130. data/{demo → spec/dummy/app}/models/page_b.rb +0 -0
  131. data/{demo → spec/dummy/app}/models/page_c.rb +0 -0
  132. data/{demo → spec/dummy/app}/models/promo.rb +0 -0
  133. data/{demo → spec/dummy/app}/models/user.rb +0 -0
  134. data/{demo → spec/dummy/app}/views/admin/components/_gallery.html.erb +0 -0
  135. data/{demo → spec/dummy/app}/views/admin/components/_promo.html.erb +0 -0
  136. data/{demo → spec/dummy/app}/views/admin/nodes/_home.html.erb +0 -0
  137. data/{demo → spec/dummy/app}/views/admin/nodes/_page_a.html.erb +0 -0
  138. data/{demo → spec/dummy/app}/views/admin/nodes/_page_b.html.erb +0 -0
  139. data/{demo → spec/dummy/app}/views/admin/nodes/_page_c.html.erb +0 -0
  140. data/{demo → spec/dummy/app}/views/components/_gallery.html.erb +0 -0
  141. data/{demo → spec/dummy/app}/views/components/_promo.html.erb +0 -0
  142. data/{demo → spec/dummy/app}/views/layouts/application.html.erb +0 -0
  143. data/{demo → spec/dummy/app}/views/nodes/page_a.html.erb +0 -0
  144. data/{demo → spec/dummy/app}/views/nodes/page_a.rss.builder +0 -0
  145. data/{demo → spec/dummy/app}/views/nodes/page_b.html.erb +0 -0
  146. data/{demo → spec/dummy/app}/views/nodes/page_c.html.erb +0 -0
  147. data/spec/dummy/config/application.rb +50 -0
  148. data/spec/dummy/config/boot.rb +10 -0
  149. data/{config → spec/dummy/config}/database.yml +0 -0
  150. data/{config → spec/dummy/config}/environment.rb +1 -1
  151. data/{config → spec/dummy/config}/environments/development.rb +10 -7
  152. data/{config → spec/dummy/config}/environments/production.rb +25 -15
  153. data/{config → spec/dummy/config}/environments/test.rb +9 -31
  154. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  155. data/spec/dummy/config/initializers/inflections.rb +10 -0
  156. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  157. data/{demo → spec/dummy/config}/initializers/mongo_mapper.rb +0 -0
  158. data/{demo → spec/dummy/config}/initializers/noodall.rb +0 -0
  159. data/{demo → spec/dummy/config}/initializers/secret_token.rb +1 -1
  160. data/spec/dummy/config/initializers/session_store.rb +8 -0
  161. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  162. data/{demo → spec/dummy/config}/initializers/zdragonfly.rb +0 -0
  163. data/{config → spec/dummy/config}/locales/en.yml +1 -1
  164. data/spec/dummy/config/routes.rb +3 -0
  165. data/{config.ru → spec/dummy/config.ru} +1 -1
  166. data/{demo → spec/dummy/db}/seeds.rb +0 -0
  167. data/spec/{factories → dummy/factories}/asset.rb +4 -4
  168. data/spec/{factories → dummy/factories}/node.rb +0 -0
  169. data/spec/{factories → dummy/factories}/user.rb +0 -0
  170. data/spec/{files → dummy/files}/beef.png +0 -0
  171. data/spec/{files → dummy/files}/get_video.flv +0 -0
  172. data/spec/{files → dummy/files}/test.pdf +0 -0
  173. data/spec/dummy/lib/assets/.gitkeep +0 -0
  174. data/spec/dummy/log/.gitkeep +0 -0
  175. data/spec/dummy/public/404.html +26 -0
  176. data/spec/dummy/public/422.html +26 -0
  177. data/spec/dummy/public/500.html +26 -0
  178. data/spec/dummy/public/favicon.ico +0 -0
  179. data/spec/dummy/script/rails +6 -0
  180. data/{public → vendor/assets}/images/fancybox/blank.gif +0 -0
  181. data/{public → vendor/assets}/images/fancybox/fancy_close.png +0 -0
  182. data/{public → vendor/assets}/images/fancybox/fancy_loading.png +0 -0
  183. data/{public → vendor/assets}/images/fancybox/fancy_nav_left.png +0 -0
  184. data/{public → vendor/assets}/images/fancybox/fancy_nav_right.png +0 -0
  185. data/{public → vendor/assets}/images/fancybox/fancy_shadow_e.png +0 -0
  186. data/{public → vendor/assets}/images/fancybox/fancy_shadow_n.png +0 -0
  187. data/{public → vendor/assets}/images/fancybox/fancy_shadow_ne.png +0 -0
  188. data/{public → vendor/assets}/images/fancybox/fancy_shadow_nw.png +0 -0
  189. data/{public → vendor/assets}/images/fancybox/fancy_shadow_s.png +0 -0
  190. data/{public → vendor/assets}/images/fancybox/fancy_shadow_se.png +0 -0
  191. data/{public → vendor/assets}/images/fancybox/fancy_shadow_sw.png +0 -0
  192. data/{public → vendor/assets}/images/fancybox/fancy_shadow_w.png +0 -0
  193. data/{public → vendor/assets}/images/fancybox/fancy_title_left.png +0 -0
  194. data/{public → vendor/assets}/images/fancybox/fancy_title_main.png +0 -0
  195. data/{public → vendor/assets}/images/fancybox/fancy_title_over.png +0 -0
  196. data/{public → vendor/assets}/images/fancybox/fancy_title_right.png +0 -0
  197. data/{public → vendor/assets}/images/fancybox/fancybox-x.png +0 -0
  198. data/{public → vendor/assets}/images/fancybox/fancybox-y.png +0 -0
  199. data/{public → vendor/assets}/images/fancybox/fancybox.png +0 -0
  200. data/{public → vendor/assets}/images/plupload/backgrounds.gif +0 -0
  201. data/{public → vendor/assets}/images/plupload/buttons-disabled.png +0 -0
  202. data/{public → vendor/assets}/images/plupload/buttons.png +0 -0
  203. data/{public → vendor/assets}/images/plupload/delete.gif +0 -0
  204. data/{public → vendor/assets}/images/plupload/done.gif +0 -0
  205. data/{public → vendor/assets}/images/plupload/error.gif +0 -0
  206. data/{public → vendor/assets}/images/plupload/throbber.gif +0 -0
  207. data/{public → vendor/assets}/images/plupload/transp50.png +0 -0
  208. data/{public → vendor/assets}/javascripts/carousel.lite.js +0 -0
  209. data/vendor/assets/javascripts/fancybox.js +1156 -0
  210. data/{public → vendor/assets}/javascripts/plupload/gears_init.js +0 -0
  211. data/{public → vendor/assets}/javascripts/plupload/jquery.plupload.queue.min.js +0 -0
  212. data/{public → vendor/assets}/javascripts/plupload/plupload.flash.swf +0 -0
  213. data/{public → vendor/assets}/javascripts/plupload/plupload.full.min.js +0 -0
  214. data/{public → vendor/assets}/javascripts/plupload/plupload.silverlight.xap +0 -0
  215. data/{public → vendor/assets}/javascripts/tiny_mce/jquery.tinymce.js +0 -0
  216. data/{public → vendor/assets}/javascripts/tiny_mce/langs/en.js +0 -0
  217. data/{public → vendor/assets}/javascripts/tiny_mce/license.txt +0 -0
  218. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/addvideo/addvideo.htm +0 -0
  219. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/addvideo/editor_plugin.js +0 -0
  220. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/addvideo/editor_plugin_src.js +0 -0
  221. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/addvideo/img/youtube.gif +0 -0
  222. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/addvideo/js/addvideo.js +0 -0
  223. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/addvideo/langs/en.js +0 -0
  224. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/addvideo/langs/en_dlg.js +0 -0
  225. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advhr/css/advhr.css +0 -0
  226. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advhr/editor_plugin.js +0 -0
  227. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +0 -0
  228. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advhr/js/rule.js +0 -0
  229. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js +0 -0
  230. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advhr/rule.htm +0 -0
  231. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advimage/css/advimage.css +0 -0
  232. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +0 -0
  233. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +0 -0
  234. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advimage/image.htm +0 -0
  235. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
  236. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advimage/js/image.js +0 -0
  237. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +0 -0
  238. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advlink/css/advlink.css +0 -0
  239. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +0 -0
  240. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +0 -0
  241. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advlink/js/advlink.js +0 -0
  242. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +0 -0
  243. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advlink/link.htm +0 -0
  244. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advlist/editor_plugin.js +0 -0
  245. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/advlist/editor_plugin_src.js +0 -0
  246. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/autolink/editor_plugin.js +0 -0
  247. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/autolink/editor_plugin_src.js +0 -0
  248. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +0 -0
  249. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +0 -0
  250. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +0 -0
  251. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +0 -0
  252. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/autosave/langs/en.js +0 -0
  253. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +0 -0
  254. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +0 -0
  255. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +0 -0
  256. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +0 -0
  257. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +0 -0
  258. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +0 -0
  259. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +0 -0
  260. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +0 -0
  261. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/emotions.htm +0 -0
  262. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
  263. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
  264. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
  265. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  266. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
  267. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
  268. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
  269. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  270. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
  271. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  272. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  273. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  274. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
  275. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
  276. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  277. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
  278. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/js/emotions.js +0 -0
  279. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +0 -0
  280. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +0 -0
  281. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +0 -0
  282. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +0 -0
  283. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +0 -0
  284. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +0 -0
  285. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +0 -0
  286. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js +0 -0
  287. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +0 -0
  288. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +0 -0
  289. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +0 -0
  290. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +0 -0
  291. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +0 -0
  292. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +0 -0
  293. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  294. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  295. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
  296. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  297. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  298. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
  299. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  300. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -0
  301. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/inlinepopups/template.htm +0 -0
  302. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +0 -0
  303. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +0 -0
  304. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/layer/editor_plugin.js +0 -0
  305. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +0 -0
  306. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +0 -0
  307. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +0 -0
  308. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/lists/editor_plugin.js +0 -0
  309. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/lists/editor_plugin_src.js +0 -0
  310. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/css/content.css +0 -0
  311. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/css/media.css +0 -0
  312. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/editor_plugin.js +0 -0
  313. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +0 -0
  314. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/img/flash.gif +0 -0
  315. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/img/flv_player.swf +0 -0
  316. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/img/quicktime.gif +0 -0
  317. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/img/realmedia.gif +0 -0
  318. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/img/shockwave.gif +0 -0
  319. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/img/trans.gif +0 -0
  320. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
  321. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/js/embed.js +0 -0
  322. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/js/media.js +0 -0
  323. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +0 -0
  324. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/media.htm +0 -0
  325. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/media/moxieplayer.swf +0 -0
  326. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +0 -0
  327. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +0 -0
  328. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +0 -0
  329. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +0 -0
  330. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/pagebreak/css/content.css +0 -0
  331. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +0 -0
  332. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +0 -0
  333. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif +0 -0
  334. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif +0 -0
  335. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/paste/editor_plugin.js +0 -0
  336. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +0 -0
  337. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/paste/js/pastetext.js +0 -0
  338. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/paste/js/pasteword.js +0 -0
  339. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +0 -0
  340. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/paste/pastetext.htm +0 -0
  341. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/paste/pasteword.htm +0 -0
  342. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/preview/editor_plugin.js +0 -0
  343. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +0 -0
  344. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/preview/example.html +0 -0
  345. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/preview/jscripts/embed.js +0 -0
  346. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/preview/preview.html +0 -0
  347. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/print/editor_plugin.js +0 -0
  348. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +0 -0
  349. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/save/editor_plugin.js +0 -0
  350. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +0 -0
  351. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +0 -0
  352. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +0 -0
  353. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +0 -0
  354. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +0 -0
  355. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +0 -0
  356. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +0 -0
  357. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/spellchecker/css/content.css +0 -0
  358. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +0 -0
  359. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +0 -0
  360. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
  361. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/style/css/props.css +0 -0
  362. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/style/editor_plugin.js +0 -0
  363. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +0 -0
  364. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/style/js/props.js +0 -0
  365. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/style/langs/en_dlg.js +0 -0
  366. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/style/props.htm +0 -0
  367. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +0 -0
  368. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +0 -0
  369. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/cell.htm +0 -0
  370. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/css/cell.css +0 -0
  371. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/css/row.css +0 -0
  372. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/css/table.css +0 -0
  373. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/editor_plugin.js +0 -0
  374. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +0 -0
  375. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/js/cell.js +0 -0
  376. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/js/merge_cells.js +0 -0
  377. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/js/row.js +0 -0
  378. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/js/table.js +0 -0
  379. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/langs/en_dlg.js +0 -0
  380. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/merge_cells.htm +0 -0
  381. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/row.htm +0 -0
  382. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/table/table.htm +0 -0
  383. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/template/blank.htm +0 -0
  384. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/template/css/template.css +0 -0
  385. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/template/editor_plugin.js +0 -0
  386. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +0 -0
  387. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/template/js/template.js +0 -0
  388. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +0 -0
  389. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/template/template.htm +0 -0
  390. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +0 -0
  391. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +0 -0
  392. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js +0 -0
  393. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +0 -0
  394. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +0 -0
  395. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +0 -0
  396. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +0 -0
  397. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +0 -0
  398. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +0 -0
  399. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +0 -0
  400. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +0 -0
  401. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +0 -0
  402. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +0 -0
  403. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +0 -0
  404. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +0 -0
  405. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +0 -0
  406. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +0 -0
  407. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +0 -0
  408. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +0 -0
  409. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +0 -0
  410. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +0 -0
  411. data/{public → vendor/assets}/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +0 -0
  412. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/about.htm +0 -0
  413. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/anchor.htm +0 -0
  414. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/charmap.htm +0 -0
  415. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/color_picker.htm +0 -0
  416. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/editor_template.js +0 -0
  417. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/editor_template_src.js +0 -0
  418. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/image.htm +0 -0
  419. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  420. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/img/flash.gif +0 -0
  421. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
  422. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/img/iframe.gif +0 -0
  423. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/img/pagebreak.gif +0 -0
  424. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
  425. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/img/realmedia.gif +0 -0
  426. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
  427. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/img/trans.gif +0 -0
  428. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/img/video.gif +0 -0
  429. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/img/windowsmedia.gif +0 -0
  430. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/js/about.js +0 -0
  431. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/js/anchor.js +0 -0
  432. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/js/charmap.js +0 -0
  433. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/js/color_picker.js +0 -0
  434. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/js/image.js +0 -0
  435. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/js/link.js +0 -0
  436. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/js/source_editor.js +0 -0
  437. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/langs/en.js +0 -0
  438. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +0 -0
  439. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/link.htm +0 -0
  440. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/shortcuts.htm +0 -0
  441. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/default/content.css +0 -0
  442. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +0 -0
  443. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
  444. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
  445. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
  446. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
  447. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
  448. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
  449. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +0 -0
  450. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/highcontrast/content.css +0 -0
  451. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +0 -0
  452. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/highcontrast/ui.css +0 -0
  453. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +0 -0
  454. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +0 -0
  455. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  456. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  457. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  458. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +0 -0
  459. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +0 -0
  460. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +0 -0
  461. data/{public → vendor/assets}/javascripts/tiny_mce/themes/advanced/source_editor.htm +0 -0
  462. data/{public → vendor/assets}/javascripts/tiny_mce/themes/simple/editor_template.js +0 -0
  463. data/{public → vendor/assets}/javascripts/tiny_mce/themes/simple/editor_template_src.js +0 -0
  464. data/{public → vendor/assets}/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
  465. data/{public → vendor/assets}/javascripts/tiny_mce/themes/simple/langs/en.js +0 -0
  466. data/{public → vendor/assets}/javascripts/tiny_mce/themes/simple/skins/default/content.css +0 -0
  467. data/{public → vendor/assets}/javascripts/tiny_mce/themes/simple/skins/default/ui.css +0 -0
  468. data/{public → vendor/assets}/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +0 -0
  469. data/{public → vendor/assets}/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
  470. data/{public → vendor/assets}/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +0 -0
  471. data/{public → vendor/assets}/javascripts/tiny_mce/tiny_mce.js +0 -0
  472. data/{public → vendor/assets}/javascripts/tiny_mce/tiny_mce_popup.js +0 -0
  473. data/{public → vendor/assets}/javascripts/tiny_mce/tiny_mce_src.js +0 -0
  474. data/{public → vendor/assets}/javascripts/tiny_mce/utils/editable_selects.js +0 -0
  475. data/{public → vendor/assets}/javascripts/tiny_mce/utils/form_utils.js +0 -0
  476. data/{public → vendor/assets}/javascripts/tiny_mce/utils/mctabs.js +0 -0
  477. data/{public → vendor/assets}/javascripts/tiny_mce/utils/validate.js +0 -0
  478. data/{public → vendor/assets}/stylesheets/ellipsis.xml +0 -0
  479. data/vendor/assets/stylesheets/fancybox.css +359 -0
  480. data/{public → vendor/assets}/stylesheets/plupload.queue.css +0 -0
  481. metadata +475 -465
  482. data/config/application.rb +0 -31
  483. data/config/boot.rb +0 -13
  484. data/demo/initializers/session_store.rb +0 -8
  485. data/demo/routes.rb +0 -3
  486. data/public/404.html +0 -77
  487. data/public/422.html +0 -76
  488. data/public/500.html +0 -77
  489. data/public/features.html +0 -252
  490. data/public/images/404-search.png +0 -0
  491. data/public/javascripts/admin/jquery.jqtransform.js +0 -366
  492. data/public/javascripts/admin/tiny_mce_config.js.orig +0 -147
  493. data/public/javascripts/application.js +0 -32
  494. data/public/javascripts/fancybox.js +0 -1078
  495. data/public/stylesheets/admin/fancybox.css +0 -341
  496. data/public/stylesheets/fancybox.css +0 -313
  497. data/public/stylesheets/forms.css +0 -7
  498. data/public/stylesheets/ie.css +0 -12
  499. data/public/stylesheets/ie8.css +0 -8
  500. data/public/stylesheets/layout.css +0 -31
  501. data/public/stylesheets/reset.css +0 -84
  502. data/public/stylesheets/skin.css +0 -22
  503. data/public/stylesheets/typography.css +0 -162
@@ -0,0 +1,1156 @@
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
+ ;(function($) {
19
+ var tmp, loading, overlay, wrap, outer, content, close, title, nav_left, nav_right,
20
+
21
+ selectedIndex = 0, selectedOpts = {}, selectedArray = [], currentIndex = 0, currentOpts = {}, currentArray = [],
22
+
23
+ ajaxLoader = null, imgPreloader = new Image(), imgRegExp = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, swfRegExp = /[^\.]\.(swf)\s*$/i,
24
+
25
+ loadingTimer, loadingFrame = 1,
26
+
27
+ titleHeight = 0, titleStr = '', start_pos, final_pos, busy = false, fx = $.extend($('<div/>')[0], { prop: 0 }),
28
+
29
+ isIE6 = $.browser.msie && $.browser.version < 7 && !window.XMLHttpRequest,
30
+
31
+ /*
32
+ * Private methods
33
+ */
34
+
35
+ _abort = function() {
36
+ loading.hide();
37
+
38
+ imgPreloader.onerror = imgPreloader.onload = null;
39
+
40
+ if (ajaxLoader) {
41
+ ajaxLoader.abort();
42
+ }
43
+
44
+ tmp.empty();
45
+ },
46
+
47
+ _error = function() {
48
+ if (false === selectedOpts.onError(selectedArray, selectedIndex, selectedOpts)) {
49
+ loading.hide();
50
+ busy = false;
51
+ return;
52
+ }
53
+
54
+ selectedOpts.titleShow = false;
55
+
56
+ selectedOpts.width = 'auto';
57
+ selectedOpts.height = 'auto';
58
+
59
+ tmp.html( '<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>' );
60
+
61
+ _process_inline();
62
+ },
63
+
64
+ _start = function() {
65
+ var obj = selectedArray[ selectedIndex ],
66
+ href,
67
+ type,
68
+ title,
69
+ str,
70
+ emb,
71
+ ret;
72
+
73
+ _abort();
74
+
75
+ selectedOpts = $.extend({}, $.fn.fancybox.defaults, (typeof $(obj).data('fancybox') == 'undefined' ? selectedOpts : $(obj).data('fancybox')));
76
+
77
+ ret = selectedOpts.onStart(selectedArray, selectedIndex, selectedOpts);
78
+
79
+ if (ret === false) {
80
+ busy = false;
81
+ return;
82
+ } else if (typeof ret == 'object') {
83
+ selectedOpts = $.extend(selectedOpts, ret);
84
+ }
85
+
86
+ title = selectedOpts.title || (obj.nodeName ? $(obj).attr('title') : obj.title) || '';
87
+
88
+ if (obj.nodeName && !selectedOpts.orig) {
89
+ selectedOpts.orig = $(obj).children("img:first").length ? $(obj).children("img:first") : $(obj);
90
+ }
91
+
92
+ if (title === '' && selectedOpts.orig && selectedOpts.titleFromAlt) {
93
+ title = selectedOpts.orig.attr('alt');
94
+ }
95
+
96
+ href = selectedOpts.href || (obj.nodeName ? $(obj).attr('href') : obj.href) || null;
97
+
98
+ if ((/^(?:javascript)/i).test(href) || href == '#') {
99
+ href = null;
100
+ }
101
+
102
+ if (selectedOpts.type) {
103
+ type = selectedOpts.type;
104
+
105
+ if (!href) {
106
+ href = selectedOpts.content;
107
+ }
108
+
109
+ } else if (selectedOpts.content) {
110
+ type = 'html';
111
+
112
+ } else if (href) {
113
+ if (href.match(imgRegExp)) {
114
+ type = 'image';
115
+
116
+ } else if (href.match(swfRegExp)) {
117
+ type = 'swf';
118
+
119
+ } else if ($(obj).hasClass("iframe")) {
120
+ type = 'iframe';
121
+
122
+ } else if (href.indexOf("#") === 0) {
123
+ type = 'inline';
124
+
125
+ } else {
126
+ type = 'ajax';
127
+ }
128
+ }
129
+
130
+ if (!type) {
131
+ _error();
132
+ return;
133
+ }
134
+
135
+ if (type == 'inline') {
136
+ obj = href.substr(href.indexOf("#"));
137
+ type = $(obj).length > 0 ? 'inline' : 'ajax';
138
+ }
139
+
140
+ selectedOpts.type = type;
141
+ selectedOpts.href = href;
142
+ selectedOpts.title = title;
143
+
144
+ if (selectedOpts.autoDimensions) {
145
+ if (selectedOpts.type == 'html' || selectedOpts.type == 'inline' || selectedOpts.type == 'ajax') {
146
+ selectedOpts.width = 'auto';
147
+ selectedOpts.height = 'auto';
148
+ } else {
149
+ selectedOpts.autoDimensions = false;
150
+ }
151
+ }
152
+
153
+ if (selectedOpts.modal) {
154
+ selectedOpts.overlayShow = true;
155
+ selectedOpts.hideOnOverlayClick = false;
156
+ selectedOpts.hideOnContentClick = false;
157
+ selectedOpts.enableEscapeButton = false;
158
+ selectedOpts.showCloseButton = false;
159
+ }
160
+
161
+ selectedOpts.padding = parseInt(selectedOpts.padding, 10);
162
+ selectedOpts.margin = parseInt(selectedOpts.margin, 10);
163
+
164
+ tmp.css('padding', (selectedOpts.padding + selectedOpts.margin));
165
+
166
+ $('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change', function() {
167
+ $(this).replaceWith(content.children());
168
+ });
169
+
170
+ switch (type) {
171
+ case 'html' :
172
+ tmp.html( selectedOpts.content );
173
+ _process_inline();
174
+ break;
175
+
176
+ case 'inline' :
177
+ if ( $(obj).parent().is('#fancybox-content') === true) {
178
+ busy = false;
179
+ return;
180
+ }
181
+
182
+ $('<div class="fancybox-inline-tmp" />')
183
+ .hide()
184
+ .insertBefore( $(obj) )
185
+ .bind('fancybox-cleanup', function() {
186
+ $(this).replaceWith(content.children());
187
+ }).bind('fancybox-cancel', function() {
188
+ $(this).replaceWith(tmp.children());
189
+ });
190
+
191
+ $(obj).appendTo(tmp);
192
+
193
+ _process_inline();
194
+ break;
195
+
196
+ case 'image':
197
+ busy = false;
198
+
199
+ $.fancybox.showActivity();
200
+
201
+ imgPreloader = new Image();
202
+
203
+ imgPreloader.onerror = function() {
204
+ _error();
205
+ };
206
+
207
+ imgPreloader.onload = function() {
208
+ busy = true;
209
+
210
+ imgPreloader.onerror = imgPreloader.onload = null;
211
+
212
+ _process_image();
213
+ };
214
+
215
+ imgPreloader.src = href;
216
+ break;
217
+
218
+ case 'swf':
219
+ selectedOpts.scrolling = 'no';
220
+
221
+ str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"><param name="movie" value="' + href + '"></param>';
222
+ emb = '';
223
+
224
+ $.each(selectedOpts.swf, function(name, val) {
225
+ str += '<param name="' + name + '" value="' + val + '"></param>';
226
+ emb += ' ' + name + '="' + val + '"';
227
+ });
228
+
229
+ str += '<embed src="' + href + '" type="application/x-shockwave-flash" width="' + selectedOpts.width + '" height="' + selectedOpts.height + '"' + emb + '></embed></object>';
230
+
231
+ tmp.html(str);
232
+
233
+ _process_inline();
234
+ break;
235
+
236
+ case 'ajax':
237
+ busy = false;
238
+
239
+ $.fancybox.showActivity();
240
+
241
+ selectedOpts.ajax.win = selectedOpts.ajax.success;
242
+
243
+ ajaxLoader = $.ajax($.extend({}, selectedOpts.ajax, {
244
+ url : href,
245
+ data : selectedOpts.ajax.data || {},
246
+ error : function(XMLHttpRequest, textStatus, errorThrown) {
247
+ if ( XMLHttpRequest.status > 0 ) {
248
+ _error();
249
+ }
250
+ },
251
+ success : function(data, textStatus, XMLHttpRequest) {
252
+ var o = typeof XMLHttpRequest == 'object' ? XMLHttpRequest : ajaxLoader;
253
+ if (o.status == 200) {
254
+ if ( typeof selectedOpts.ajax.win == 'function' ) {
255
+ ret = selectedOpts.ajax.win(href, data, textStatus, XMLHttpRequest);
256
+
257
+ if (ret === false) {
258
+ loading.hide();
259
+ return;
260
+ } else if (typeof ret == 'string' || typeof ret == 'object') {
261
+ data = ret;
262
+ }
263
+ }
264
+
265
+ tmp.html( data );
266
+ _process_inline();
267
+ }
268
+ }
269
+ }));
270
+
271
+ break;
272
+
273
+ case 'iframe':
274
+ _show();
275
+ break;
276
+ }
277
+ },
278
+
279
+ _process_inline = function() {
280
+ var
281
+ w = selectedOpts.width,
282
+ h = selectedOpts.height;
283
+
284
+ if (w.toString().indexOf('%') > -1) {
285
+ w = parseInt( ($(window).width() - (selectedOpts.margin * 2)) * parseFloat(w) / 100, 10) + 'px';
286
+
287
+ } else {
288
+ w = w == 'auto' ? 'auto' : w + 'px';
289
+ }
290
+
291
+ if (h.toString().indexOf('%') > -1) {
292
+ h = parseInt( ($(window).height() - (selectedOpts.margin * 2)) * parseFloat(h) / 100, 10) + 'px';
293
+
294
+ } else {
295
+ h = h == 'auto' ? 'auto' : h + 'px';
296
+ }
297
+
298
+ tmp.wrapInner('<div style="width:' + w + ';height:' + h + ';overflow: ' + (selectedOpts.scrolling == 'auto' ? 'auto' : (selectedOpts.scrolling == 'yes' ? 'scroll' : 'hidden')) + ';position:relative;"></div>');
299
+
300
+ selectedOpts.width = tmp.width();
301
+ selectedOpts.height = tmp.height();
302
+
303
+ _show();
304
+ },
305
+
306
+ _process_image = function() {
307
+ selectedOpts.width = imgPreloader.width;
308
+ selectedOpts.height = imgPreloader.height;
309
+
310
+ $("<img />").attr({
311
+ 'id' : 'fancybox-img',
312
+ 'src' : imgPreloader.src,
313
+ 'alt' : selectedOpts.title
314
+ }).appendTo( tmp );
315
+
316
+ _show();
317
+ },
318
+
319
+ _show = function() {
320
+ var pos, equal;
321
+
322
+ loading.hide();
323
+
324
+ if (wrap.is(":visible") && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
325
+ $.event.trigger('fancybox-cancel');
326
+
327
+ busy = false;
328
+ return;
329
+ }
330
+
331
+ busy = true;
332
+
333
+ $(content.add( overlay )).unbind();
334
+
335
+ $(window).unbind("resize.fb scroll.fb");
336
+ $(document).unbind('keydown.fb');
337
+
338
+ if (wrap.is(":visible") && currentOpts.titlePosition !== 'outside') {
339
+ wrap.css('height', wrap.height());
340
+ }
341
+
342
+ currentArray = selectedArray;
343
+ currentIndex = selectedIndex;
344
+ currentOpts = selectedOpts;
345
+
346
+ if (currentOpts.overlayShow) {
347
+ overlay.css({
348
+ 'background-color' : currentOpts.overlayColor,
349
+ 'opacity' : currentOpts.overlayOpacity,
350
+ 'cursor' : currentOpts.hideOnOverlayClick ? 'pointer' : 'auto',
351
+ 'height' : $(document).height()
352
+ });
353
+
354
+ if (!overlay.is(':visible')) {
355
+ if (isIE6) {
356
+ $('select:not(#fancybox-tmp select)').filter(function() {
357
+ return this.style.visibility !== 'hidden';
358
+ }).css({'visibility' : 'hidden'}).one('fancybox-cleanup', function() {
359
+ this.style.visibility = 'inherit';
360
+ });
361
+ }
362
+
363
+ overlay.show();
364
+ }
365
+ } else {
366
+ overlay.hide();
367
+ }
368
+
369
+ final_pos = _get_zoom_to();
370
+
371
+ _process_title();
372
+
373
+ if (wrap.is(":visible")) {
374
+ $( close.add( nav_left ).add( nav_right ) ).hide();
375
+
376
+ pos = wrap.position(),
377
+
378
+ start_pos = {
379
+ top : pos.top,
380
+ left : pos.left,
381
+ width : wrap.width(),
382
+ height : wrap.height()
383
+ };
384
+
385
+ equal = (start_pos.width == final_pos.width && start_pos.height == final_pos.height);
386
+
387
+ content.fadeTo(currentOpts.changeFade, 0.3, function() {
388
+ var finish_resizing = function() {
389
+ content.html( tmp.contents() ).fadeTo(currentOpts.changeFade, 1, _finish);
390
+ };
391
+
392
+ $.event.trigger('fancybox-change');
393
+
394
+ content
395
+ .empty()
396
+ .removeAttr('filter')
397
+ .css({
398
+ 'border-width' : currentOpts.padding,
399
+ 'width' : final_pos.width - currentOpts.padding * 2,
400
+ 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
401
+ });
402
+
403
+ if (equal) {
404
+ finish_resizing();
405
+
406
+ } else {
407
+ fx.prop = 0;
408
+
409
+ $(fx).animate({prop: 1}, {
410
+ duration : currentOpts.changeSpeed,
411
+ easing : currentOpts.easingChange,
412
+ step : _draw,
413
+ complete : finish_resizing
414
+ });
415
+ }
416
+ });
417
+
418
+ return;
419
+ }
420
+
421
+ wrap.removeAttr("style");
422
+
423
+ content.css('border-width', currentOpts.padding);
424
+
425
+ if (currentOpts.transitionIn == 'elastic') {
426
+ start_pos = _get_zoom_from();
427
+
428
+ content.html( tmp.contents() );
429
+
430
+ wrap.show();
431
+
432
+ if (currentOpts.opacity) {
433
+ final_pos.opacity = 0;
434
+ }
435
+
436
+ fx.prop = 0;
437
+
438
+ $(fx).animate({prop: 1}, {
439
+ duration : currentOpts.speedIn,
440
+ easing : currentOpts.easingIn,
441
+ step : _draw,
442
+ complete : _finish
443
+ });
444
+
445
+ return;
446
+ }
447
+
448
+ if (currentOpts.titlePosition == 'inside' && titleHeight > 0) {
449
+ title.show();
450
+ }
451
+
452
+ content
453
+ .css({
454
+ 'width' : final_pos.width - currentOpts.padding * 2,
455
+ 'height' : selectedOpts.autoDimensions ? 'auto' : final_pos.height - titleHeight - currentOpts.padding * 2
456
+ })
457
+ .html( tmp.contents() );
458
+
459
+ wrap
460
+ .css(final_pos)
461
+ .fadeIn( currentOpts.transitionIn == 'none' ? 0 : currentOpts.speedIn, _finish );
462
+ },
463
+
464
+ _format_title = function(title) {
465
+ if (title && title.length) {
466
+ if (currentOpts.titlePosition == 'float') {
467
+ return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + title + '</td><td id="fancybox-title-float-right"></td></tr></table>';
468
+ }
469
+
470
+ return '<div id="fancybox-title-' + currentOpts.titlePosition + '">' + title + '</div>';
471
+ }
472
+
473
+ return false;
474
+ },
475
+
476
+ _process_title = function() {
477
+ titleStr = currentOpts.title || '';
478
+ titleHeight = 0;
479
+
480
+ title
481
+ .empty()
482
+ .removeAttr('style')
483
+ .removeClass();
484
+
485
+ if (currentOpts.titleShow === false) {
486
+ title.hide();
487
+ return;
488
+ }
489
+
490
+ titleStr = $.isFunction(currentOpts.titleFormat) ? currentOpts.titleFormat(titleStr, currentArray, currentIndex, currentOpts) : _format_title(titleStr);
491
+
492
+ if (!titleStr || titleStr === '') {
493
+ title.hide();
494
+ return;
495
+ }
496
+
497
+ title
498
+ .addClass('fancybox-title-' + currentOpts.titlePosition)
499
+ .html( titleStr )
500
+ .appendTo( 'body' )
501
+ .show();
502
+
503
+ switch (currentOpts.titlePosition) {
504
+ case 'inside':
505
+ title
506
+ .css({
507
+ 'width' : final_pos.width - (currentOpts.padding * 2),
508
+ 'marginLeft' : currentOpts.padding,
509
+ 'marginRight' : currentOpts.padding
510
+ });
511
+
512
+ titleHeight = title.outerHeight(true);
513
+
514
+ title.appendTo( outer );
515
+
516
+ final_pos.height += titleHeight;
517
+ break;
518
+
519
+ case 'over':
520
+ title
521
+ .css({
522
+ 'marginLeft' : currentOpts.padding,
523
+ 'width' : final_pos.width - (currentOpts.padding * 2),
524
+ 'bottom' : currentOpts.padding
525
+ })
526
+ .appendTo( outer );
527
+ break;
528
+
529
+ case 'float':
530
+ title
531
+ .css('left', parseInt((title.width() - final_pos.width - 40)/ 2, 10) * -1)
532
+ .appendTo( wrap );
533
+ break;
534
+
535
+ default:
536
+ title
537
+ .css({
538
+ 'width' : final_pos.width - (currentOpts.padding * 2),
539
+ 'paddingLeft' : currentOpts.padding,
540
+ 'paddingRight' : currentOpts.padding
541
+ })
542
+ .appendTo( wrap );
543
+ break;
544
+ }
545
+
546
+ title.hide();
547
+ },
548
+
549
+ _set_navigation = function() {
550
+ if (currentOpts.enableEscapeButton || currentOpts.enableKeyboardNav) {
551
+ $(document).bind('keydown.fb', function(e) {
552
+ if (e.keyCode == 27 && currentOpts.enableEscapeButton) {
553
+ e.preventDefault();
554
+ $.fancybox.close();
555
+
556
+ } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
557
+ e.preventDefault();
558
+ $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
559
+ }
560
+ });
561
+ }
562
+
563
+ if (!currentOpts.showNavArrows) {
564
+ nav_left.hide();
565
+ nav_right.hide();
566
+ return;
567
+ }
568
+
569
+ if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex !== 0) {
570
+ nav_left.show();
571
+ }
572
+
573
+ if ((currentOpts.cyclic && currentArray.length > 1) || currentIndex != (currentArray.length -1)) {
574
+ nav_right.show();
575
+ }
576
+ },
577
+
578
+ _finish = function () {
579
+ if (!$.support.opacity) {
580
+ content.get(0).style.removeAttribute('filter');
581
+ wrap.get(0).style.removeAttribute('filter');
582
+ }
583
+
584
+ if (selectedOpts.autoDimensions) {
585
+ content.css('height', 'auto');
586
+ }
587
+
588
+ wrap.css('height', 'auto');
589
+
590
+ if (titleStr && titleStr.length) {
591
+ title.show();
592
+ }
593
+
594
+ if (currentOpts.showCloseButton) {
595
+ close.show();
596
+ }
597
+
598
+ _set_navigation();
599
+
600
+ if (currentOpts.hideOnContentClick) {
601
+ content.bind('click', $.fancybox.close);
602
+ }
603
+
604
+ if (currentOpts.hideOnOverlayClick) {
605
+ overlay.bind('click', $.fancybox.close);
606
+ }
607
+
608
+ $(window).bind("resize.fb", $.fancybox.resize);
609
+
610
+ if (currentOpts.centerOnScroll) {
611
+ $(window).bind("scroll.fb", $.fancybox.center);
612
+ }
613
+
614
+ if (currentOpts.type == 'iframe') {
615
+ $('<iframe id="fancybox-frame" name="fancybox-frame' + new Date().getTime() + '" frameborder="0" hspace="0" ' + ($.browser.msie ? 'allowtransparency="true""' : '') + ' scrolling="' + selectedOpts.scrolling + '" src="' + currentOpts.href + '"></iframe>').appendTo(content);
616
+ }
617
+
618
+ wrap.show();
619
+
620
+ busy = false;
621
+
622
+ $.fancybox.center();
623
+
624
+ currentOpts.onComplete(currentArray, currentIndex, currentOpts);
625
+
626
+ _preload_images();
627
+ },
628
+
629
+ _preload_images = function() {
630
+ var href,
631
+ objNext;
632
+
633
+ if ((currentArray.length -1) > currentIndex) {
634
+ href = currentArray[ currentIndex + 1 ].href;
635
+
636
+ if (typeof href !== 'undefined' && href.match(imgRegExp)) {
637
+ objNext = new Image();
638
+ objNext.src = href;
639
+ }
640
+ }
641
+
642
+ if (currentIndex > 0) {
643
+ href = currentArray[ currentIndex - 1 ].href;
644
+
645
+ if (typeof href !== 'undefined' && href.match(imgRegExp)) {
646
+ objNext = new Image();
647
+ objNext.src = href;
648
+ }
649
+ }
650
+ },
651
+
652
+ _draw = function(pos) {
653
+ var dim = {
654
+ width : parseInt(start_pos.width + (final_pos.width - start_pos.width) * pos, 10),
655
+ height : parseInt(start_pos.height + (final_pos.height - start_pos.height) * pos, 10),
656
+
657
+ top : parseInt(start_pos.top + (final_pos.top - start_pos.top) * pos, 10),
658
+ left : parseInt(start_pos.left + (final_pos.left - start_pos.left) * pos, 10)
659
+ };
660
+
661
+ if (typeof final_pos.opacity !== 'undefined') {
662
+ dim.opacity = pos < 0.5 ? 0.5 : pos;
663
+ }
664
+
665
+ wrap.css(dim);
666
+
667
+ content.css({
668
+ 'width' : dim.width - currentOpts.padding * 2,
669
+ 'height' : dim.height - (titleHeight * pos) - currentOpts.padding * 2
670
+ });
671
+ },
672
+
673
+ _get_viewport = function() {
674
+ return [
675
+ $(window).width() - (currentOpts.margin * 2),
676
+ $(window).height() - (currentOpts.margin * 2),
677
+ $(document).scrollLeft() + currentOpts.margin,
678
+ $(document).scrollTop() + currentOpts.margin
679
+ ];
680
+ },
681
+
682
+ _get_zoom_to = function () {
683
+ var view = _get_viewport(),
684
+ to = {},
685
+ resize = currentOpts.autoScale,
686
+ double_padding = currentOpts.padding * 2,
687
+ ratio;
688
+
689
+ if (currentOpts.width.toString().indexOf('%') > -1) {
690
+ to.width = parseInt((view[0] * parseFloat(currentOpts.width)) / 100, 10);
691
+ } else {
692
+ to.width = currentOpts.width + double_padding;
693
+ }
694
+
695
+ if (currentOpts.height.toString().indexOf('%') > -1) {
696
+ to.height = parseInt((view[1] * parseFloat(currentOpts.height)) / 100, 10);
697
+ } else {
698
+ to.height = currentOpts.height + double_padding;
699
+ }
700
+
701
+ if (resize && (to.width > view[0] || to.height > view[1])) {
702
+ if (selectedOpts.type == 'image' || selectedOpts.type == 'swf') {
703
+ ratio = (currentOpts.width ) / (currentOpts.height );
704
+
705
+ if ((to.width ) > view[0]) {
706
+ to.width = view[0];
707
+ to.height = parseInt(((to.width - double_padding) / ratio) + double_padding, 10);
708
+ }
709
+
710
+ if ((to.height) > view[1]) {
711
+ to.height = view[1];
712
+ to.width = parseInt(((to.height - double_padding) * ratio) + double_padding, 10);
713
+ }
714
+
715
+ } else {
716
+ to.width = Math.min(to.width, view[0]);
717
+ to.height = Math.min(to.height, view[1]);
718
+ }
719
+ }
720
+
721
+ to.top = parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - to.height - 40) * 0.5)), 10);
722
+ to.left = parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - to.width - 40) * 0.5)), 10);
723
+
724
+ return to;
725
+ },
726
+
727
+ _get_obj_pos = function(obj) {
728
+ var pos = obj.offset();
729
+
730
+ pos.top += parseInt( obj.css('paddingTop'), 10 ) || 0;
731
+ pos.left += parseInt( obj.css('paddingLeft'), 10 ) || 0;
732
+
733
+ pos.top += parseInt( obj.css('border-top-width'), 10 ) || 0;
734
+ pos.left += parseInt( obj.css('border-left-width'), 10 ) || 0;
735
+
736
+ pos.width = obj.width();
737
+ pos.height = obj.height();
738
+
739
+ return pos;
740
+ },
741
+
742
+ _get_zoom_from = function() {
743
+ var orig = selectedOpts.orig ? $(selectedOpts.orig) : false,
744
+ from = {},
745
+ pos,
746
+ view;
747
+
748
+ if (orig && orig.length) {
749
+ pos = _get_obj_pos(orig);
750
+
751
+ from = {
752
+ width : pos.width + (currentOpts.padding * 2),
753
+ height : pos.height + (currentOpts.padding * 2),
754
+ top : pos.top - currentOpts.padding - 20,
755
+ left : pos.left - currentOpts.padding - 20
756
+ };
757
+
758
+ } else {
759
+ view = _get_viewport();
760
+
761
+ from = {
762
+ width : currentOpts.padding * 2,
763
+ height : currentOpts.padding * 2,
764
+ top : parseInt(view[3] + view[1] * 0.5, 10),
765
+ left : parseInt(view[2] + view[0] * 0.5, 10)
766
+ };
767
+ }
768
+
769
+ return from;
770
+ },
771
+
772
+ _animate_loading = function() {
773
+ if (!loading.is(':visible')){
774
+ clearInterval(loadingTimer);
775
+ return;
776
+ }
777
+
778
+ $('div', loading).css('top', (loadingFrame * -40) + 'px');
779
+
780
+ loadingFrame = (loadingFrame + 1) % 12;
781
+ };
782
+
783
+ /*
784
+ * Public methods
785
+ */
786
+
787
+ $.fn.fancybox = function(options) {
788
+ if (!$(this).length) {
789
+ return this;
790
+ }
791
+
792
+ $(this)
793
+ .data('fancybox', $.extend({}, options, ($.metadata ? $(this).metadata() : {})))
794
+ .unbind('click.fb')
795
+ .bind('click.fb', function(e) {
796
+ e.preventDefault();
797
+
798
+ if (busy) {
799
+ return;
800
+ }
801
+
802
+ busy = true;
803
+
804
+ $(this).blur();
805
+
806
+ selectedArray = [];
807
+ selectedIndex = 0;
808
+
809
+ var rel = $(this).attr('rel') || '';
810
+
811
+ if (!rel || rel == '' || rel === 'nofollow') {
812
+ selectedArray.push(this);
813
+
814
+ } else {
815
+ selectedArray = $("a[rel=" + rel + "], area[rel=" + rel + "]");
816
+ selectedIndex = selectedArray.index( this );
817
+ }
818
+
819
+ _start();
820
+
821
+ return;
822
+ });
823
+
824
+ return this;
825
+ };
826
+
827
+ $.fancybox = function(obj) {
828
+ var opts;
829
+
830
+ if (busy) {
831
+ return;
832
+ }
833
+
834
+ busy = true;
835
+ opts = typeof arguments[1] !== 'undefined' ? arguments[1] : {};
836
+
837
+ selectedArray = [];
838
+ selectedIndex = parseInt(opts.index, 10) || 0;
839
+
840
+ if ($.isArray(obj)) {
841
+ for (var i = 0, j = obj.length; i < j; i++) {
842
+ if (typeof obj[i] == 'object') {
843
+ $(obj[i]).data('fancybox', $.extend({}, opts, obj[i]));
844
+ } else {
845
+ obj[i] = $({}).data('fancybox', $.extend({content : obj[i]}, opts));
846
+ }
847
+ }
848
+
849
+ selectedArray = jQuery.merge(selectedArray, obj);
850
+
851
+ } else {
852
+ if (typeof obj == 'object') {
853
+ $(obj).data('fancybox', $.extend({}, opts, obj));
854
+ } else {
855
+ obj = $({}).data('fancybox', $.extend({content : obj}, opts));
856
+ }
857
+
858
+ selectedArray.push(obj);
859
+ }
860
+
861
+ if (selectedIndex > selectedArray.length || selectedIndex < 0) {
862
+ selectedIndex = 0;
863
+ }
864
+
865
+ _start();
866
+ };
867
+
868
+ $.fancybox.showActivity = function() {
869
+ clearInterval(loadingTimer);
870
+
871
+ loading.show();
872
+ loadingTimer = setInterval(_animate_loading, 66);
873
+ };
874
+
875
+ $.fancybox.hideActivity = function() {
876
+ loading.hide();
877
+ };
878
+
879
+ $.fancybox.next = function() {
880
+ return $.fancybox.pos( currentIndex + 1);
881
+ };
882
+
883
+ $.fancybox.prev = function() {
884
+ return $.fancybox.pos( currentIndex - 1);
885
+ };
886
+
887
+ $.fancybox.pos = function(pos) {
888
+ if (busy) {
889
+ return;
890
+ }
891
+
892
+ pos = parseInt(pos);
893
+
894
+ selectedArray = currentArray;
895
+
896
+ if (pos > -1 && pos < currentArray.length) {
897
+ selectedIndex = pos;
898
+ _start();
899
+
900
+ } else if (currentOpts.cyclic && currentArray.length > 1) {
901
+ selectedIndex = pos >= currentArray.length ? 0 : currentArray.length - 1;
902
+ _start();
903
+ }
904
+
905
+ return;
906
+ };
907
+
908
+ $.fancybox.cancel = function() {
909
+ if (busy) {
910
+ return;
911
+ }
912
+
913
+ busy = true;
914
+
915
+ $.event.trigger('fancybox-cancel');
916
+
917
+ _abort();
918
+
919
+ selectedOpts.onCancel(selectedArray, selectedIndex, selectedOpts);
920
+
921
+ busy = false;
922
+ };
923
+
924
+ // Note: within an iframe use - parent.$.fancybox.close();
925
+ $.fancybox.close = function() {
926
+ if (busy || wrap.is(':hidden')) {
927
+ return;
928
+ }
929
+
930
+ busy = true;
931
+
932
+ if (currentOpts && false === currentOpts.onCleanup(currentArray, currentIndex, currentOpts)) {
933
+ busy = false;
934
+ return;
935
+ }
936
+
937
+ _abort();
938
+
939
+ $(close.add( nav_left ).add( nav_right )).hide();
940
+
941
+ $(content.add( overlay )).unbind();
942
+
943
+ $(window).unbind("resize.fb scroll.fb");
944
+ $(document).unbind('keydown.fb');
945
+
946
+ content.find('iframe').attr('src', isIE6 && /^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank');
947
+
948
+ if (currentOpts.titlePosition !== 'inside') {
949
+ title.empty();
950
+ }
951
+
952
+ wrap.stop();
953
+
954
+ function _cleanup() {
955
+ overlay.fadeOut('fast');
956
+
957
+ title.empty().hide();
958
+ wrap.hide();
959
+
960
+ $.event.trigger('fancybox-cleanup');
961
+
962
+ content.empty();
963
+
964
+ currentOpts.onClosed(currentArray, currentIndex, currentOpts);
965
+
966
+ currentArray = selectedOpts = [];
967
+ currentIndex = selectedIndex = 0;
968
+ currentOpts = selectedOpts = {};
969
+
970
+ busy = false;
971
+ }
972
+
973
+ if (currentOpts.transitionOut == 'elastic') {
974
+ start_pos = _get_zoom_from();
975
+
976
+ var pos = wrap.position();
977
+
978
+ final_pos = {
979
+ top : pos.top ,
980
+ left : pos.left,
981
+ width : wrap.width(),
982
+ height : wrap.height()
983
+ };
984
+
985
+ if (currentOpts.opacity) {
986
+ final_pos.opacity = 1;
987
+ }
988
+
989
+ title.empty().hide();
990
+
991
+ fx.prop = 1;
992
+
993
+ $(fx).animate({ prop: 0 }, {
994
+ duration : currentOpts.speedOut,
995
+ easing : currentOpts.easingOut,
996
+ step : _draw,
997
+ complete : _cleanup
998
+ });
999
+
1000
+ } else {
1001
+ wrap.fadeOut( currentOpts.transitionOut == 'none' ? 0 : currentOpts.speedOut, _cleanup);
1002
+ }
1003
+ };
1004
+
1005
+ $.fancybox.resize = function() {
1006
+ if (overlay.is(':visible')) {
1007
+ overlay.css('height', $(document).height());
1008
+ }
1009
+
1010
+ $.fancybox.center(true);
1011
+ };
1012
+
1013
+ $.fancybox.center = function() {
1014
+ var view, align;
1015
+
1016
+ if (busy) {
1017
+ return;
1018
+ }
1019
+
1020
+ align = arguments[0] === true ? 1 : 0;
1021
+ view = _get_viewport();
1022
+
1023
+ if (!align && (wrap.width() > view[0] || wrap.height() > view[1])) {
1024
+ return;
1025
+ }
1026
+
1027
+ wrap
1028
+ .stop()
1029
+ .animate({
1030
+ 'top' : parseInt(Math.max(view[3] - 20, view[3] + ((view[1] - content.height() - 40) * 0.5) - currentOpts.padding)),
1031
+ 'left' : parseInt(Math.max(view[2] - 20, view[2] + ((view[0] - content.width() - 40) * 0.5) - currentOpts.padding))
1032
+ }, typeof arguments[0] == 'number' ? arguments[0] : 200);
1033
+ };
1034
+
1035
+ $.fancybox.init = function() {
1036
+ if ($("#fancybox-wrap").length) {
1037
+ return;
1038
+ }
1039
+
1040
+ $('body').append(
1041
+ tmp = $('<div id="fancybox-tmp"></div>'),
1042
+ loading = $('<div id="fancybox-loading"><div></div></div>'),
1043
+ overlay = $('<div id="fancybox-overlay"></div>'),
1044
+ wrap = $('<div id="fancybox-wrap"></div>')
1045
+ );
1046
+
1047
+ outer = $('<div id="fancybox-outer"></div>')
1048
+ .append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>')
1049
+ .appendTo( wrap );
1050
+
1051
+ outer.append(
1052
+ content = $('<div id="fancybox-content"></div>'),
1053
+ close = $('<a id="fancybox-close"></a>'),
1054
+ title = $('<div id="fancybox-title"></div>'),
1055
+
1056
+ nav_left = $('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),
1057
+ nav_right = $('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')
1058
+ );
1059
+
1060
+ close.click($.fancybox.close);
1061
+ loading.click($.fancybox.cancel);
1062
+
1063
+ nav_left.click(function(e) {
1064
+ e.preventDefault();
1065
+ $.fancybox.prev();
1066
+ });
1067
+
1068
+ nav_right.click(function(e) {
1069
+ e.preventDefault();
1070
+ $.fancybox.next();
1071
+ });
1072
+
1073
+ if ($.fn.mousewheel) {
1074
+ wrap.bind('mousewheel.fb', function(e, delta) {
1075
+ if (busy) {
1076
+ e.preventDefault();
1077
+
1078
+ } else if ($(e.target).get(0).clientHeight == 0 || $(e.target).get(0).scrollHeight === $(e.target).get(0).clientHeight) {
1079
+ e.preventDefault();
1080
+ $.fancybox[ delta > 0 ? 'prev' : 'next']();
1081
+ }
1082
+ });
1083
+ }
1084
+
1085
+ if (!$.support.opacity) {
1086
+ wrap.addClass('fancybox-ie');
1087
+ }
1088
+
1089
+ if (isIE6) {
1090
+ loading.addClass('fancybox-ie6');
1091
+ wrap.addClass('fancybox-ie6');
1092
+
1093
+ $('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || '') ? 'javascript:void(false)' : 'about:blank' ) + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(outer);
1094
+ }
1095
+ };
1096
+
1097
+ $.fn.fancybox.defaults = {
1098
+ padding : 10,
1099
+ margin : 40,
1100
+ opacity : false,
1101
+ modal : false,
1102
+ cyclic : false,
1103
+ scrolling : 'auto', // 'auto', 'yes' or 'no'
1104
+
1105
+ width : 560,
1106
+ height : 340,
1107
+
1108
+ autoScale : true,
1109
+ autoDimensions : true,
1110
+ centerOnScroll : false,
1111
+
1112
+ ajax : {},
1113
+ swf : { wmode: 'transparent' },
1114
+
1115
+ hideOnOverlayClick : true,
1116
+ hideOnContentClick : false,
1117
+
1118
+ overlayShow : true,
1119
+ overlayOpacity : 0.7,
1120
+ overlayColor : '#777',
1121
+
1122
+ titleShow : true,
1123
+ titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
1124
+ titleFormat : null,
1125
+ titleFromAlt : false,
1126
+
1127
+ transitionIn : 'fade', // 'elastic', 'fade' or 'none'
1128
+ transitionOut : 'fade', // 'elastic', 'fade' or 'none'
1129
+
1130
+ speedIn : 300,
1131
+ speedOut : 300,
1132
+
1133
+ changeSpeed : 300,
1134
+ changeFade : 'fast',
1135
+
1136
+ easingIn : 'swing',
1137
+ easingOut : 'swing',
1138
+
1139
+ showCloseButton : true,
1140
+ showNavArrows : true,
1141
+ enableEscapeButton : true,
1142
+ enableKeyboardNav : true,
1143
+
1144
+ onStart : function(){},
1145
+ onCancel : function(){},
1146
+ onComplete : function(){},
1147
+ onCleanup : function(){},
1148
+ onClosed : function(){},
1149
+ onError : function(){}
1150
+ };
1151
+
1152
+ $(document).ready(function() {
1153
+ $.fancybox.init();
1154
+ });
1155
+
1156
+ })(jQuery);