Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git://github.com/wlodars/jobberrails

  • Loading branch information...
commit 4cd1f6a3f350a1bd40daf0a4528b5cb6d86a6bde 2 parents 8fe6ea9 + e29f63c
@jcnetdev jcnetdev authored
Showing with 22,034 additions and 81 deletions.
  1. +18 −12 app/controllers/admin/categories_controller.rb
  2. +2 −2 app/controllers/admin/jobs_controller.rb
  3. +88 −0 app/controllers/admin/pages_controller.rb
  4. +0 −5 app/controllers/application.rb
  5. +12 −1 app/controllers/companies_controller.rb
  6. +7 −0 app/controllers/pages_controller.rb
  7. +1 −1  app/controllers/sessions_controller.rb
  8. +20 −15 app/helpers/admin/categories_helper.rb
  9. +9 −9 app/helpers/admin/jobs_helper.rb
  10. +11 −0 app/helpers/admin/pages_helper.rb
  11. +15 −1 app/helpers/application_helper.rb
  12. +14 −0 app/helpers/companies_helper.rb
  13. +2 −0  app/helpers/pages_helper.rb
  14. +3 −1 app/models/category.rb
  15. +17 −0 app/models/job.rb
  16. +10 −0 app/models/page.rb
  17. +7 −7 app/views/admin/categories/_category.html.haml
  18. +1 −2  app/views/admin/categories/create.js.rjs
  19. +2 −2 app/views/admin/categories/destroy.js.rjs
  20. +2 −2 app/views/admin/categories/index.html.haml
  21. +2 −2 app/views/admin/categories/update.js.rjs
  22. +3 −3 app/views/admin/jobs/_jobs_table.html.haml
  23. +1 −1  app/views/admin/jobs/destroy.js.rjs
  24. +1 −1  app/views/admin/jobs/update.js.rjs
  25. +51 −0 app/views/admin/pages/_form.html.haml
  26. +6 −0 app/views/admin/pages/_page.html.haml
  27. +2 −0  app/views/admin/pages/destroy.js.rjs
  28. +3 −0  app/views/admin/pages/edit.html.haml
  29. +8 −0 app/views/admin/pages/index.html.haml
  30. +3 −0  app/views/admin/pages/new.html.haml
  31. +10 −0 app/views/companies/index.html.haml
  32. +6 −0 app/views/companies/jobs_at.html.haml
  33. +1 −8 app/views/layouts/_admin_header.html.haml
  34. +19 −0 app/views/layouts/_admin_pages_sidebar.html.haml
  35. +1 −1  app/views/layouts/_footer.html.haml
  36. +9 −2 app/views/layouts/admin.html.haml
  37. +14 −0 app/views/pages/show.html.haml
  38. +10 −3 config/routes.rb
  39. +56 −0 db/fixtures/pages.rb
  40. +13 −0 db/schema.rb
  41. +29 −0 public/javascripts/components/categories.js
  42. +154 −0 public/javascripts/tiny_mce/langs/en.js
  43. +504 −0 public/javascripts/tiny_mce/license.txt
  44. +5 −0 public/javascripts/tiny_mce/plugins/advhr/css/advhr.css
  45. +1 −0  public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js
  46. +54 −0 public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js
  47. +43 −0 public/javascripts/tiny_mce/plugins/advhr/js/rule.js
  48. +5 −0 public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js
  49. +63 −0 public/javascripts/tiny_mce/plugins/advhr/rule.htm
  50. +13 −0 public/javascripts/tiny_mce/plugins/advimage/css/advimage.css
  51. +1 −0  public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js
  52. +47 −0 public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js
  53. +238 −0 public/javascripts/tiny_mce/plugins/advimage/image.htm
  54. BIN  public/javascripts/tiny_mce/plugins/advimage/img/sample.gif
  55. +441 −0 public/javascripts/tiny_mce/plugins/advimage/js/image.js
  56. +43 −0 public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js
  57. +8 −0 public/javascripts/tiny_mce/plugins/advlink/css/advlink.css
  58. +1 −0  public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js
  59. +58 −0 public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js
  60. +528 −0 public/javascripts/tiny_mce/plugins/advlink/js/advlink.js
  61. +52 −0 public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js
  62. +339 −0 public/javascripts/tiny_mce/plugins/advlink/link.htm
  63. +1 −0  public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js
  64. +51 −0 public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js
  65. +1 −0  public/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js
  66. +117 −0 public/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
  67. +1 −0  public/javascripts/tiny_mce/plugins/compat2x/editor_plugin.js
  68. +616 −0 public/javascripts/tiny_mce/plugins/compat2x/editor_plugin_src.js
  69. +1 −0  public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js
  70. +95 −0 public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js
  71. +1 −0  public/javascripts/tiny_mce/plugins/directionality/editor_plugin.js
  72. +79 −0 public/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js
  73. +1 −0  public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js
  74. +40 −0 public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js
  75. +41 −0 public/javascripts/tiny_mce/plugins/emotions/emotions.htm
  76. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif
  77. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif
  78. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif
  79. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif
  80. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif
  81. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif
  82. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif
  83. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif
  84. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif
  85. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif
  86. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif
  87. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif
  88. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif
  89. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif
  90. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif
  91. BIN  public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif
  92. +22 −0 public/javascripts/tiny_mce/plugins/emotions/js/emotions.js
  93. +20 −0 public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js
  94. +27 −0 public/javascripts/tiny_mce/plugins/example/dialog.htm
  95. +1 −0  public/javascripts/tiny_mce/plugins/example/editor_plugin.js
  96. +81 −0 public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js
  97. BIN  public/javascripts/tiny_mce/plugins/example/img/example.gif
  98. +19 −0 public/javascripts/tiny_mce/plugins/example/js/dialog.js
  99. +3 −0  public/javascripts/tiny_mce/plugins/example/langs/en.js
  100. +3 −0  public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js
  101. +182 −0 public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css
  102. +1 −0  public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js
  103. +140 −0 public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js
  104. +577 −0 public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm
  105. +462 −0 public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js
  106. +85 −0 public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js
  107. +1 −0  public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js
  108. +141 −0 public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js
  109. +111 −0 public/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm
  110. +1 −0  public/javascripts/tiny_mce/plugins/iespell/editor_plugin.js
  111. +51 −0 public/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js
  112. +1 −0  public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js
  113. +623 −0 public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js
  114. BIN  public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
  115. BIN  public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
  116. BIN  public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
  117. BIN  public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
  118. BIN  public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
  119. BIN  public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
  120. BIN  public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
  121. +90 −0 public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css
  122. +387 −0 public/javascripts/tiny_mce/plugins/inlinepopups/template.htm
  123. +1 −0  public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js
  124. +80 −0 public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js
  125. +1 −0  public/javascripts/tiny_mce/plugins/layer/editor_plugin.js
  126. +209 −0 public/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js
  127. +6 −0 public/javascripts/tiny_mce/plugins/media/css/content.css
  128. +16 −0 public/javascripts/tiny_mce/plugins/media/css/media.css
  129. +1 −0  public/javascripts/tiny_mce/plugins/media/editor_plugin.js
  130. +365 −0 public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js
  131. BIN  public/javascripts/tiny_mce/plugins/media/img/flash.gif
  132. BIN  public/javascripts/tiny_mce/plugins/media/img/flv_player.swf
  133. BIN  public/javascripts/tiny_mce/plugins/media/img/quicktime.gif
  134. BIN  public/javascripts/tiny_mce/plugins/media/img/realmedia.gif
  135. BIN  public/javascripts/tiny_mce/plugins/media/img/shockwave.gif
  136. BIN  public/javascripts/tiny_mce/plugins/media/img/trans.gif
  137. BIN  public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif
  138. +73 −0 public/javascripts/tiny_mce/plugins/media/js/embed.js
  139. +628 −0 public/javascripts/tiny_mce/plugins/media/js/media.js
  140. +103 −0 public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js
  141. +824 −0 public/javascripts/tiny_mce/plugins/media/media.htm
  142. +1 −0  public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js
  143. +50 −0 public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js
  144. +1 −0  public/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js
  145. +87 −0 public/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js
  146. +1 −0  public/javascripts/tiny_mce/plugins/pagebreak/css/content.css
  147. +1 −0  public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js
  148. +74 −0 public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js
  149. BIN  public/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif
  150. BIN  public/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif
  151. +22 −0 public/javascripts/tiny_mce/plugins/paste/blank.htm
  152. +14 −0 public/javascripts/tiny_mce/plugins/paste/css/blank.css
  153. +3 −0  public/javascripts/tiny_mce/plugins/paste/css/pasteword.css
  154. +1 −0  public/javascripts/tiny_mce/plugins/paste/editor_plugin.js
  155. +389 −0 public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js
  156. +42 −0 public/javascripts/tiny_mce/plugins/paste/js/pastetext.js
  157. +56 −0 public/javascripts/tiny_mce/plugins/paste/js/pasteword.js
  158. +5 −0 public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js
  159. +34 −0 public/javascripts/tiny_mce/plugins/paste/pastetext.htm
  160. +29 −0 public/javascripts/tiny_mce/plugins/paste/pasteword.htm
  161. +1 −0  public/javascripts/tiny_mce/plugins/preview/editor_plugin.js
  162. +187 −0 public/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js
  163. +28 −0 public/javascripts/tiny_mce/plugins/preview/example.html
  164. +73 −0 public/javascripts/tiny_mce/plugins/preview/jscripts/embed.js
  165. +1 −0  public/javascripts/tiny_mce/plugins/print/editor_plugin.js
  166. +31 −0 public/javascripts/tiny_mce/plugins/print/editor_plugin_src.js
  167. +1 −0  public/javascripts/tiny_mce/plugins/safari/blank.htm
  168. +1 −0  public/javascripts/tiny_mce/plugins/safari/editor_plugin.js
  169. +460 −0 public/javascripts/tiny_mce/plugins/safari/editor_plugin_src.js
  170. +1 −0  public/javascripts/tiny_mce/plugins/save/editor_plugin.js
  171. +98 −0 public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js
  172. +6 −0 public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css
  173. +1 −0  public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js
  174. +54 −0 public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js
  175. +117 −0 public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js
  176. +16 −0 public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js
  177. +105 −0 public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm
  178. +1 −0  public/javascripts/tiny_mce/plugins/spellchecker/css/content.css
  179. +1 −0  public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js
  180. +338 −0 public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js
  181. BIN  public/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif
  182. +13 −0 public/javascripts/tiny_mce/plugins/style/css/props.css
  183. +1 −0  public/javascripts/tiny_mce/plugins/style/editor_plugin.js
  184. +52 −0 public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js
  185. +641 −0 public/javascripts/tiny_mce/plugins/style/js/props.js
  186. +63 −0 public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js
  187. +731 −0 public/javascripts/tiny_mce/plugins/style/props.htm
  188. +184 −0 public/javascripts/tiny_mce/plugins/table/cell.htm
  189. +17 −0 public/javascripts/tiny_mce/plugins/table/css/cell.css
  190. +25 −0 public/javascripts/tiny_mce/plugins/table/css/row.css
  191. +13 −0 public/javascripts/tiny_mce/plugins/table/css/table.css
  192. +1 −0  public/javascripts/tiny_mce/plugins/table/editor_plugin.js
  193. +1,115 −0 public/javascripts/tiny_mce/plugins/table/editor_plugin_src.js
  194. +259 −0 public/javascripts/tiny_mce/plugins/table/js/cell.js
  195. +29 −0 public/javascripts/tiny_mce/plugins/table/js/merge_cells.js
  196. +212 −0 public/javascripts/tiny_mce/plugins/table/js/row.js
  197. +410 −0 public/javascripts/tiny_mce/plugins/table/js/table.js
  198. +74 −0 public/javascripts/tiny_mce/plugins/table/langs/en_dlg.js
  199. +38 −0 public/javascripts/tiny_mce/plugins/table/merge_cells.htm
  200. +161 −0 public/javascripts/tiny_mce/plugins/table/row.htm
  201. +193 −0 public/javascripts/tiny_mce/plugins/table/table.htm
  202. +12 −0 public/javascripts/tiny_mce/plugins/template/blank.htm
  203. +23 −0 public/javascripts/tiny_mce/plugins/template/css/template.css
  204. +1 −0  public/javascripts/tiny_mce/plugins/template/editor_plugin.js
  205. +156 −0 public/javascripts/tiny_mce/plugins/template/editor_plugin_src.js
  206. +106 −0 public/javascripts/tiny_mce/plugins/template/js/template.js
  207. +15 −0 public/javascripts/tiny_mce/plugins/template/langs/en_dlg.js
  208. +39 −0 public/javascripts/tiny_mce/plugins/template/template.htm
  209. +1 −0  public/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js
  210. +73 −0 public/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js
  211. +149 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm
  212. +149 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm
  213. +154 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm
  214. +149 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm
  215. +11 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css
  216. +9 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css
  217. +170 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm
  218. +1 −0  public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js
  219. +134 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js
  220. +170 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm
  221. +25 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js
  222. +25 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js
  223. +123 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js
  224. +25 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js
  225. +50 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js
  226. +221 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js
  227. +49 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js
  228. +32 −0 public/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js
  229. +56 −0 public/javascripts/tiny_mce/themes/advanced/about.htm
  230. +32 −0 public/javascripts/tiny_mce/themes/advanced/anchor.htm
  231. +54 −0 public/javascripts/tiny_mce/themes/advanced/charmap.htm
  232. +76 −0 public/javascripts/tiny_mce/themes/advanced/color_picker.htm
  233. +1 −0  public/javascripts/tiny_mce/themes/advanced/editor_template.js
  234. +1,052 −0 public/javascripts/tiny_mce/themes/advanced/editor_template_src.js
  235. +86 −0 public/javascripts/tiny_mce/themes/advanced/image.htm
  236. BIN  public/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg
  237. BIN  public/javascripts/tiny_mce/themes/advanced/img/icons.gif
  238. +72 −0 public/javascripts/tiny_mce/themes/advanced/js/about.js
  239. +37 −0 public/javascripts/tiny_mce/themes/advanced/js/anchor.js
  240. +325 −0 public/javascripts/tiny_mce/themes/advanced/js/charmap.js
  241. +253 −0 public/javascripts/tiny_mce/themes/advanced/js/color_picker.js
  242. +245 −0 public/javascripts/tiny_mce/themes/advanced/js/image.js
  243. +155 −0 public/javascripts/tiny_mce/themes/advanced/js/link.js
  244. +62 −0 public/javascripts/tiny_mce/themes/advanced/js/source_editor.js
  245. +62 −0 public/javascripts/tiny_mce/themes/advanced/langs/en.js
  246. +51 −0 public/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js
  247. +64 −0 public/javascripts/tiny_mce/themes/advanced/link.htm
  248. +32 −0 public/javascripts/tiny_mce/themes/advanced/skins/default/content.css
  249. +114 −0 public/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css
  250. BIN  public/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png
  251. BIN  public/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif
  252. BIN  public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif
  253. BIN  public/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif
  254. BIN  public/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif
  255. BIN  public/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif
  256. +215 −0 public/javascripts/tiny_mce/themes/advanced/skins/default/ui.css
  257. +32 −0 public/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css
  258. +113 −0 public/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css
  259. BIN  public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png
  260. BIN  public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png
  261. BIN  public/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png
  262. +215 −0 public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css
  263. +8 −0 public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css
  264. +5 −0 public/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css
  265. +32 −0 public/javascripts/tiny_mce/themes/advanced/source_editor.htm
  266. +1 −0  public/javascripts/tiny_mce/themes/simple/editor_template.js
  267. +85 −0 public/javascripts/tiny_mce/themes/simple/editor_template_src.js
  268. BIN  public/javascripts/tiny_mce/themes/simple/img/icons.gif
  269. +11 −0 public/javascripts/tiny_mce/themes/simple/langs/en.js
  270. +25 −0 public/javascripts/tiny_mce/themes/simple/skins/default/content.css
  271. +32 −0 public/javascripts/tiny_mce/themes/simple/skins/default/ui.css
  272. +17 −0 public/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css
  273. BIN  public/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png
  274. +35 −0 public/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css
  275. +1 −0  public/javascripts/tiny_mce/tiny_mce.js
  276. +275 −0 public/javascripts/tiny_mce/tiny_mce_popup.js
Sorry, we could not display the entire diff because too many files (561) changed.
View
30 app/controllers/admin/categories_controller.rb
@@ -15,12 +15,15 @@ def show
# POST /admin/categories
def create
- max_position = Category.find_by_sql "SELECT MAX(position) as position FROM categories"
- max_id = Category.find_by_sql "SELECT MAX(id) as id FROM categories"
- @category = Category.new(:name => 'New category', :value => "newcategory#{max_id[0].id + 1}", :position => max_position[0].position + 1)
- @category.save
- flash_notice("Category has been added")
+ begin
+ @category = Category.new(:name => 'New category',
+ :value => "newcategory#{rand(Time.now)}")
+ @category.save!
+ rescue ActiveRecord::RecordInvalid
+ retry
+ end
+ flash.now[:notice] = "Category has been added"
respond_to do |format|
format.html { redirect_to admin_categories_url }
format.js # admin/categories/create.js.rjs
@@ -30,10 +33,10 @@ def create
# PUT /admin/categories/1
def update
@category = Category.find(params[:id])
- flash_notice("Category has been updated")
respond_to do |format|
if @category.update_attributes(:name => params[:name], :value => params[:url])
+ flash.now[:notice] = "Category has been updated"
format.html { redirect_to admin_categories_url }
format.js # admin/categories/update.js.rjs
else
@@ -42,8 +45,8 @@ def update
render :update do |page|
@category.reload
page.alert @category.errors.full_messages.join("\n")
- page.replace("category_#{@category.id}", :partial => 'admin/categories/category', :category => @category)
- page.sortable 'categoriesContainer', :tag => 'div', :url => saveorder_admin_categories_path
+ page.replace(@category.dom_id, :partial => 'admin/categories/category', :category => @category)
+ page.sortable "categoriesContainer", sortable_categories_container_options
end
}
end
@@ -54,9 +57,9 @@ def update
def saveorder
params[:categoriesContainer].each_with_index do |id, position|
category = Category.find(id)
- category.update_attribute('position', position)
+ category.update_attribute('position', position + 1)
end
- flash_notice("Categories order changed. Saving ...")
+ flash.now[:notice] = "Categories order changed. Saving ..."
respond_to do |format|
format.html { redirect_to admin_categories_url }
@@ -67,8 +70,11 @@ def saveorder
# DELETE /admin/categories/1
def destroy
@category = Category.find(params[:id])
- @category.destroy if @category.jobs.empty?
- flash_notice("Category has been deleted")
+
+ if @category.jobs.empty?
+ @category.destroy
+ flash.now[:notice] = "Category has been deleted"
+ end
respond_to do |format|
format.html { redirect_to admin_categories_url }
View
4 app/controllers/admin/jobs_controller.rb
@@ -15,10 +15,10 @@ def show
# PUT /admin/jobs/1
def update
@job = Job.find(params[:id])
- flash_notice("Job has been activated/deactivated")
respond_to do |format|
if @job.update_attributes(:is_active => @job.is_active ? false : true)
+ flash.now[:notice] = @job.is_active ? "Job has been activated" : "Job has been deactivated"
format.html { redirect_to admin_jobs_url }
format.js # admin/jobs/update.js.rjs
end
@@ -29,7 +29,7 @@ def update
def destroy
@job = Job.find(params[:id])
@job.destroy
- flash_notice("Job has been deleted")
+ flash.now[:notice] = "Job has been deleted"
respond_to do |format|
format.html { redirect_to admin_jobs_url }
View
88 app/controllers/admin/pages_controller.rb
@@ -0,0 +1,88 @@
+class Admin::PagesController < ApplicationController
+ before_filter :login_required
+ before_filter :form_message_style, :only => [:new, :edit]
+ layout 'admin'
+
+ uses_tiny_mce(:options => { :theme => 'advanced',
+ :mode => "textareas",
+ :theme_advanced_toolbar_location => "top",
+ :theme_advanced_toolbar_align => "left",
+ :theme_advanced_statusbar_location => "bottom",
+ :theme_advanced_buttons1 => %w{ bold italic underline strikethrough | justifyleft
+ justifycenter justifyright justifyfull | styleselect formatselect fontselect fontsizeselect },
+ :theme_advanced_buttons2 => %w{ cut copy paste pastetext pasteword | search
+ replace | bullist numlist | outdent indent blockquote | undo redo | link
+ unlink anchor image cleanup help code | forecolor backcolor },
+ :theme_advanced_buttons3 => %w{ tablecontrols | hr removeformat visualaid |
+ sub sup | charmap media advhr | ltr rtl },
+ :theme_advanced_buttons4 => %w{ insertlayer moveforward movebackward absolute |
+ styleprops | cite abbr acronym del ins attribs },
+ :editor_selector => 'mceEditor',
+ :plugins => %w{ style layer table save advhr advimage advlink media searchreplace
+ contextmenu paste directionality nonbreaking xhtmlxtras } },
+ :only => [:new, :create, :edit, :update])
+
+ # GET /admin/pages
+ def index
+ @pages = Page.all(:order => 'title')
+ end
+
+ # GET /admin/pages/new
+ def new
+ @page = Page.new
+ end
+
+ # POST /admin/pages
+ def create
+ @page = Page.new(params[:page])
+
+ respond_to do |format|
+ if @page.save
+ flash[:notice] = 'Page was successfully created.'
+ format.html { redirect_to admin_pages_url }
+ else
+ format.html { render :action => "new" }
+ end
+ end
+ end
+
+ # GET /admin/pages/1/edit
+ def edit
+ @page = Page.find_by_url(params[:id])
+
+ @form_style = '' if @page.has_form
+ end
+
+ # PUT /admin/pages/1
+ def update
+ @page = Page.find_by_url(params[:id])
+ url = @page.url
+
+ respond_to do |format|
+ if @page.update_attributes(params[:page])
+ flash[:notice] = 'Page was successfully updated.'
+ format.html { redirect_to admin_pages_url }
+ else
+ @page.url = url
+ format.html { render :action => "edit" }
+ end
+ end
+ end
+
+ # DELETE /admin/pages/1
+ def destroy
+ @page = Page.find_by_url(params[:id])
+ @page.destroy
+ flash.now[:notice] = "Page has been deleted"
+
+ respond_to do |format|
+ format.html { redirect_to(admin_pages_url) }
+ format.js # admin/pages/destroy.js.rjs
+ end
+ end
+
+ private
+ def form_message_style
+ @form_style = 'display:none'
+ end
+end
View
5 app/controllers/application.rb
@@ -20,11 +20,6 @@ def login_required
redirect_to login_url
end
end
-
- def flash_notice(string)
- flash[:notice] = string
- flash.discard(:notice)
- end
protected
def production?
View
13 app/controllers/companies_controller.rb
@@ -1,2 +1,13 @@
-class CompaniesController < ApplicationController
+class CompaniesController < ApplicationController
+
+ # GET /companies
+ def index
+ @companies = Job.companies_count
+ end
+
+ # GET /jobs_at/1
+ def jobs_at
+ @company = Job.find_company(params[:company])
+ @jobs = @company ? Job.find_all_by_company(@company) : nil
+ end
end
View
7 app/controllers/pages_controller.rb
@@ -0,0 +1,7 @@
+class PagesController < ApplicationController
+
+ # GET /pages/1
+ def show
+ @page = Page.find_by_url params[:id]
+ end
+end
View
2  app/controllers/sessions_controller.rb
@@ -16,7 +16,7 @@ def create
else
session[:admin] = admin
flash[:error] = "Invalid login or password!"
- redirect_to login_url
+ render :action => "new"
end
end
View
35 app/helpers/admin/categories_helper.rb
@@ -3,39 +3,44 @@ def admin_category_nav_item(category)
category_nav_item(category, true)
end
- def show_save_category(category_id)
- "Element.show('saveCategory#{category_id}')"
+ def show_save_category(category)
+ "Element.show('#{category.dom_id("save")}')"
end
- def link_to_delete_category(category_id)
+ def link_to_delete_category(category)
link_to_remote(image_tag("icon-delete.png", :alt => 'Delete') + " Delete", {
- :url => admin_category_url(category_id),
+ :url => admin_category_url(category.id),
:confirm => 'Are you sure you want to delete this category?',
- :method => :delete },
+ :method => :delete,
+ :loading => "showOverlay('#{category.dom_id}');",
+ :complete => "Element.hide('overlay');" },
{ :class => 'deleteCategory'})
end
- def link_to_save_category(category_id)
+ def link_to_save_category(category)
link_to_remote(image_tag("disk.png", :alt => 'Save') + " Save", {
- :url => admin_category_url(category_id),
+ :url => admin_category_url(category.id),
:method => :put,
- :with => "'name='+$F('name[#{category_id}]')+'&url='+$F('url[#{category_id}]')" },
- { :id => "saveCategory#{category_id}",
+ :with => "'name='+$F('#{category.dom_id("name")}')+'&url='+$F('#{category.dom_id("url")}')",
+ :loading => "showOverlay('#{category.dom_id}');",
+ :complete => "Element.hide('overlay');" },
+ { :id => "#{category.dom_id("save")}",
:class => 'saveCategory', :style => 'display:none;' })
end
- def sortable_element_categories_container
- sortable_element "categoriesContainer",
- :url => saveorder_admin_categories_path,
+ def sortable_categories_container_options
+ {:url => saveorder_admin_categories_path,
:tag => "div",
- :complete => visual_effect(:highlight, 'categoriesContainer')
+ :handle => "categoryHandle",
+ :loading => "showOverlay('categoriesContainer');",
+ :complete => "Element.hide('overlay');"}
end
def link_to_add_category
link_to_remote image_tag("add.png", :alt => 'Add') + " Add new category",
:url => admin_categories_path,
:method => :post,
- :loading => "Element.show('overlay')",
- :complete => "Element.hide('overlay');"
+ :loading => "Element.show('add-category-overlay')",
+ :complete => "Element.hide('add-category-overlay');"
end
end
View
18 app/helpers/admin/jobs_helper.rb
@@ -6,28 +6,28 @@ def activation_image_tag(job)
end
image_tag("icon_#{activate}.gif",
:alt => activate.capitalize,
- :id => "activate_#{job.id}")
+ :id => job.dom_id("activate"))
end
def link_to_activate_deactivate_job(job)
link_to_remote(activation_image_tag(job), {
- :url => admin_job_url(job.id),
+ :url => admin_job_url(job),
:method => :put,
- :loading => "Element.hide('activ_butt_#{job.id}');Element.show('loading_#{job.id}')",
- :complete => "Element.hide('loading_#{job.id}');Element.show('activ_butt_#{job.id}')"},
- { :id => "activ_butt_#{job.id}"} )
+ :loading => "Element.hide('#{job.dom_id("activ_butt")}');Element.show('#{job.dom_id("loading")}')",
+ :complete => "Element.hide('#{job.dom_id("loading")}');Element.show('#{job.dom_id("activ_butt")}')"},
+ { :id => "#{job.dom_id("activ_butt")}"} )
end
- def link_to_delete_job(job_id)
+ def link_to_delete_job(job)
link_to_remote(image_tag("icon-delete.png", :alt => 'Delete'),
- :url => admin_job_url(job_id),
+ :url => admin_job_url(job),
:confirm => 'Are you sure you want to delete this post?',
:method => :delete)
end
- def saving_job_image_tag(job_id)
+ def saving_job_image_tag(job)
image_tag("ajax-loader.gif", :alt => "Saving...",
:style => 'display:none',
- :id => "loading_#{job_id}")
+ :id => job.dom_id("loading"))
end
end
View
11 app/helpers/admin/pages_helper.rb
@@ -0,0 +1,11 @@
+module Admin::PagesHelper
+ def observe_has_form
+ observe_field "page_has_form", :frequency => 0.5,
+ :function => "if(element.checked) {
+ Element.show('has_form_label');
+ Element.show('has_form_textarea');
+ } else {
+ Element.hide('has_form_label');Element.hide('has_form_textarea');
+ }"
+ end
+end
View
16 app/helpers/application_helper.rb
@@ -36,7 +36,7 @@ def flash_box(text, options = {})
end
def display_notice
- page.insert_html :after, 'footer', :partial => 'layouts/admin_flash_boxes'
+ page.replace_html "messagesContainer", :partial => 'layouts/admin_flash_boxes'
end
# Additional View Helpers
@@ -62,4 +62,18 @@ def link_to_image(image_path, label, url, options={})
nbsp +
link_to(label, url, options)
end
+
+ def navigation_list(links)
+ link_html = ''
+ links.each do |link|
+ link_html << content_tag('li', link_to(link[:text], link[:url]),
+ add_class_if(current_section(link[:url]), 'selected'))
+ end
+ content_tag('ul', link_html, :id => "nav-admin")
+ end
+
+ private
+ def current_section(link)
+ @controller.controller_path == link.sub(/\//, "")
+ end
end
View
14 app/helpers/companies_helper.rb
@@ -1,2 +1,16 @@
module CompaniesHelper
+ def companies_tag_cloud(companies, classes)
+ max, min = 0, 0
+ companies.each { |t|
+ max = t.count.to_i if t.count.to_i > max
+ min = t.count.to_i if t.count.to_i < min
+ }
+
+ divisor = ((max - min) / classes.size) + 1
+
+ companies.each { |t|
+ yield t.name, t.count, url_encode(t.name), classes[(t.count.to_i - min) / divisor]
+ }
+
+ end
end
View
2  app/helpers/pages_helper.rb
@@ -0,0 +1,2 @@
+module PagesHelper
+end
View
4 app/models/category.rb
@@ -1,8 +1,11 @@
class Category < ActiveRecord::Base
+ acts_as_list
has_many :jobs
validates_presence_of :name, :value
validates_uniqueness_of :value
+ validates_length_of :value, :within => 4..30
+ validates_format_of :value, :with => /^[-a-z0-9_]{4,30}$/
def to_param
self.value
@@ -17,5 +20,4 @@ def self.to_select
[category.name, category.id]
end
end
-
end
View
17 app/models/job.rb
@@ -87,6 +87,23 @@ def feed_html
end
+ def self.companies_count
+ all :select => 'company as name, COUNT(*) as count',
+ :conditions => 'is_active = true',
+ :order => 'company',
+ :group => 'company'
+ end
+
+ def self.find_company(company)
+ companies = all :select => 'DISTINCT company'
+
+ companies.each do |comp|
+ return comp.company if ERB::Util.url_encode(comp.company) == company
+ end
+
+ nil
+ end
+
protected
def format_fields
self.description_html = format_html(self.description)
View
10 app/models/page.rb
@@ -0,0 +1,10 @@
+class Page < ActiveRecord::Base
+ validates_presence_of :url, :message => 'Please fill in the URL.'
+ validates_uniqueness_of :url, :message => 'The URL is already in use. Please select another URL.'
+ validates_presence_of :title, :message => 'Please fill in the Title.'
+ validates_format_of :url, :with => /^[-a-z0-9_]{4,50}$/, :message => 'The URL must contain only alphanumerical characters, dashed and underscores.'
+
+ def to_param
+ self.url
+ end
+end
View
14 app/views/admin/categories/_category.html.haml
@@ -1,14 +1,14 @@
-.categoryItem{:id => "category_#{category.id}"}
+.categoryItem{:id => category.dom_id}
.categoryHandle
.categoryWrapper
.categoryManagement{:style => 'float:right;width:10%;'}
- = link_to_delete_category(category.id)
- = link_to_save_category(category.id)
+ = link_to_delete_category(category)
+ = link_to_save_category(category)
%label
%span Name:
- = text_field_tag "name[#{category.id}]", category.name, :size => 60
- = observe_field "name[#{category.id}]", :frequency => 1, :function => show_save_category(category.id)
+ = text_field_tag category.dom_id("name"), category.name, :size => 60
+ = observe_field category.dom_id("name"), :frequency => 1, :function => show_save_category(category)
%label
%span URL:
- = text_field_tag "url[#{category.id}]", category.value, :size => 60
- = observe_field "url[#{category.id}]", :frequency => 1, :function => show_save_category(category.id)
+ = text_field_tag category.dom_id("url"), category.value, :size => 60
+ = observe_field category.dom_id("url"), :frequency => 1, :function => show_save_category(category)
View
3  app/views/admin/categories/create.js.rjs
@@ -1,6 +1,5 @@
page.insert_html :bottom, 'categoriesContainer', :partial => 'admin/categories/category'
-page.sortable 'categoriesContainer', :tag => 'div', :url => saveorder_admin_categories_path,
- :complete => visual_effect(:highlight, 'categoriesContainer')
+page.sortable "categoriesContainer", sortable_categories_container_options
@category = nil
page.replace_html "categories", :partial => 'admin/categories/list'
page.display_notice
View
4 app/views/admin/categories/destroy.js.rjs
@@ -1,7 +1,7 @@
if @category.jobs.empty?
- page["category_#{@category.id}"].visual_effect :fade, "category_#{@category.id}"
+ page[@category.dom_id].visual_effect :fade, @category.dom_id
page.delay(1) do
- page.remove "category_#{@category.id}"
+ page.remove @category.dom_id
end
page.replace_html "categories", :partial => 'admin/categories/list'
page.display_notice
View
4 app/views/admin/categories/index.html.haml
@@ -3,9 +3,9 @@
#categoriesContainer
= partial @categories
-= sortable_element_categories_container
+= sortable_element "categoriesContainer", sortable_categories_container_options
-#overlay{:style => "display: none; top: 145px; left: 157px;height: 72px;"}
+#add-category-overlay{:style => "display: none; top: 145px; left: 157px;height: 72px;"}
= image_tag("ajax-loader.gif", :alt => "Loading...")
%p
= link_to_add_category
View
4 app/views/admin/categories/update.js.rjs
@@ -1,5 +1,5 @@
-page["category_#{@category.id}"].visual_effect :pulsate, "category_#{@category.id}"
-page.hide "saveCategory#{@category.id}"
+page[@category.dom_id].visual_effect :pulsate, @category.dom_id
+page.hide @category.dom_id("save")
@category = nil
page.replace_html "categories", :partial => 'admin/categories/list'
page.display_notice
View
6 app/views/admin/jobs/_jobs_table.html.haml
@@ -2,7 +2,7 @@
-# Display Job Posts
%table.job-posts{:cellspacing => 0}
- jobs.each do |job|
- %tr.job_item{:id => "job_" + job.id.to_s}
+ %tr.job-item{:id => job.dom_id}
%td
= job_type_image(job.job_type)
= link_to job.title, admin_job_url(job), :title => job.title
@@ -17,9 +17,9 @@
%td{:style => 'text-align:left;width:15%'}
-# activate/deactivate link
= link_to_activate_deactivate_job(job)
- = saving_job_image_tag(job.id)
+ = saving_job_image_tag(job)
-# delete link
- = link_to_delete_job(job.id)
+ = link_to_delete_job(job)
- else
#no-ads No jobs, yet.
View
2  app/views/admin/jobs/destroy.js.rjs
@@ -1,2 +1,2 @@
-page["job_#{@job.id}"].visual_effect :fade, "job_#{@job.id}"
+page[@job.dom_id].visual_effect :fade, @job.dom_id
page.display_notice
View
2  app/views/admin/jobs/update.js.rjs
@@ -1,2 +1,2 @@
-page.replace "activate_#{@job.id}", activation_image_tag(@job)
+page.replace @job.dom_id("activate"), activation_image_tag(@job)
page.display_notice
View
51 app/views/admin/pages/_form.html.haml
@@ -0,0 +1,51 @@
+- form_for [:admin, @page], :html => {:id => 'publish_form'} do |f|
+ %p= submit_tag @page.new_record? ? "Add page" : "Modify page", :class => 'submit_button'
+ %fieldset
+ %legend SEO
+ %table{:cellspacing => 0, :cellpadding => 0, :border => 0}
+ %tr
+ %td{:colspan => 2}
+ = f.label(:url, "URL")
+ = error_message_on(:page, :url)
+ %tr
+ %td{:colspan => 2}= f.text_field :url, :class => 'text_field'
+
+ %tr
+ %td{:colspan => 2}= f.label :page_title
+ %tr
+ %td{:colspan => 2}= f.text_field :page_title, :class => 'text_field'
+
+ %tr
+ %td{:width => '50%'}= f.label :keywords
+ %td{:width => '50%'}= f.label :description
+
+ %tr
+ %td{:width => '50%'}= f.text_area :keywords, :class => 'textarea_field_small', :rows => 6
+ %td{:width => '50%'}= f.text_area :description, :class => 'textarea_field_small', :rows => 6
+
+ %p= submit_tag @page.new_record? ? "Add page" : "Modify page", :class => 'submit_button'
+
+ %fieldset
+ %legend Content
+ %table{:cellspacing => 0, :cellpadding => 0, :border => 0}
+ %tr
+ %td{:colspan => 2}
+ = f.label :title
+ = error_message_on(:page, :title)
+ %tr
+ %td{:colspan => 2}= f.text_field :title, :class => 'text_field'
+
+ %tr
+ %td{:colspan => 2}= f.label :content
+ %tr
+ %td{:colspan => 2}= f.text_area :content, :class => "textarea_field mceEditor", :rows => 40
+
+ %tr
+ %td{:colspan => 2}= f.check_box(:has_form) + ' Has contact form?'
+ = observe_has_form
+ %tr#has_form_label{:style => @form_style}
+ %td{:colspan => 2}= f.label :form_message
+ %tr#has_form_textarea{:style => @form_style}
+ %td{:colspan => 2}= f.text_area :form_message, :class => "textarea_field mceEditor", :rows => 20
+
+ %p= submit_tag @page.new_record? ? "Add page" : "Modify page", :class => 'submit_button'
View
6 app/views/admin/pages/_page.html.haml
@@ -0,0 +1,6 @@
+%tr.page-item{:id => page.dom_id}
+ %td
+ = link_to(page.title, page_path(page), :target => '_blank') + ' - ' + page.page_title
+ %td{:width => 200}
+ = link_to image_tag("page_white_edit.png", :alt => 'Edit') + ' Edit', edit_admin_page_path(page), :title => 'Edit'
+ = link_to_remote(image_tag("icon-delete.png", :alt => 'Delete') + ' Delete', :url => admin_page_path(page), :confirm => 'Are you sure you want to delete this page?', :method => :delete, :title => 'Delete')
View
2  app/views/admin/pages/destroy.js.rjs
@@ -0,0 +1,2 @@
+page[@page.dom_id].visual_effect :fade, @page.dom_id
+page.display_notice
View
3  app/views/admin/pages/edit.html.haml
@@ -0,0 +1,3 @@
+%h3= "Editing page \"#{@page.title}\""
+
+= partial 'admin/pages/form'
View
8 app/views/admin/pages/index.html.haml
@@ -0,0 +1,8 @@
+%h2 Pages
+
+%table.pages-container{:cellspacing => 0}
+ = partial @pages
+
+%p
+%p
+ = link_to image_tag("page_white_add.png", :alt => 'Add new page') + ' Add new page', new_admin_page_path, :title => 'Add new page'
View
3  app/views/admin/pages/new.html.haml
@@ -0,0 +1,3 @@
+%h3 Add new page
+
+= partial 'admin/pages/form'
View
10 app/views/companies/index.html.haml
@@ -0,0 +1,10 @@
+%h3.page-heading Companies that published here
+
+- companies_tag_cloud @companies, %w(company-tag-1 company-tag-2 company-tag-3 company-tag-4 company-tag-5 company-tag-6) do |name, count, url, css_class|
+ %span{:class => css_class}
+ = link_to h(name) + " (" + count + ")", jobs_at_path(:company => url)
+
+%p{:style => "margin-top:20px"}
+ Total
+ %strong= @companies.size
+ companies
View
6 app/views/companies/jobs_at.html.haml
@@ -0,0 +1,6 @@
+#job-listings
+ - unless @jobs.nil?
+ %h2= "Jobs at #{@company}"
+ = partial 'jobs/parts/post_table', :jobs => @jobs
+ - else
+ %h2= "There aren't any company called \"#{params[:company]}\""
View
9 app/views/layouts/_admin_header.html.haml
@@ -1,14 +1,7 @@
#header
%h1#logo= link_to AppConfig.site_name, root_path
- if logged_in?
- %ul#top{:style => 'padding-top:40px'}
- %li= link_to "Pages", "#"
- = bull
- %li= link_to "Categories", admin_categories_path
- = bull
- %li= link_to "Change your password", "#"
- = bull
- %li= link_to "Logout", logout_path
+ = navigation_list [{:text => 'Pages', :url => admin_pages_path}, {:text => 'Categories', :url => admin_categories_path}, {:text => "Change your password", :url => "#"}, {:text => "Logout »", :url => logout_path}]
- unless logged_in?
#categs-nav
View
19 app/views/layouts/_admin_pages_sidebar.html.haml
@@ -0,0 +1,19 @@
+#sidebar
+ .sidebar_page_edit
+ %h3 Links
+ %p Make a selection in the editor or select an existing link and click on one of the links bellow.
+ %dl#links_list
+ %dt
+ %strong Internal
+ %dd= link_to "Post a job", new_job_url, :target => '_blank'
+ %dd= link_to "Ideal job", new_job_request_url, :target => '_blank'
+ %dd= link_to "RSS Feed", jobs_url(:format => "atom"), :target => '_blank'
+ %dd= link_to "Companies", "#", :target => '_blank'
+ %dt
+ %strong Categories
+ - Category.list.each do |category|
+ %dd= link_to category.name, category_url(category), :target => '_blank'
+ %dt
+ %strong Pages
+ - Page.all.each do |page|
+ %dd= link_to page.title, page_url(page), :target => '_blank'
View
2  app/views/layouts/_footer.html.haml
@@ -32,7 +32,7 @@
Misc:
= br
- = link_to "Companies", "#companies"
+ = link_to "Companies", companies_url
= br
= link_to "Sitemap", "#sitemap"
View
11 app/views/layouts/admin.html.haml
@@ -6,6 +6,8 @@
= title :site => AppConfig.site_name
= stylesheets
= javascripts
+ = javascript_include_tiny_mce_if_used
+ = tiny_mce if using_tiny_mce?
= feed_links
@@ -15,9 +17,14 @@
- if logged_in?
#categories
= partial "admin/categories/list"
+ - if @page
+ = partial "layouts/admin_pages_sidebar"
#content
= yield
-
+
+ #overlay{:style => 'display:none'}
+ = image_tag("ajax-loader.gif", :alt => "Loading...")
+ #messagesContainer= render :partial => 'layouts/admin_flash_boxes'
#footer
- = render :partial => 'layouts/admin_flash_boxes'
+
View
14 app/views/pages/show.html.haml
@@ -0,0 +1,14 @@
+%h3.page-heading= @page.title
+= @page.content
+- if @page.has_form
+ #contact-form
+ #contact-form-contents
+ =# TODO sending emails
+ - form_tag "", :id => 'apply-online' do
+ = label_tag 'apply_name', 'Your name:', :style => 'display:block'
+ = text_field_tag :contact_name, params[:contact_name], :size => 30, :style => 'display:block;margin-bottom:15px'
+ = label_tag 'apply_email', 'Your e-mail:', :style => 'display:block'
+ = text_field_tag :contact_email, params[:contact_email], :size => 30, :style => 'display:block;margin-bottom:15px'
+ = label_tag 'apply_msg', 'Message:', :style => 'display:block'
+ = text_area_tag :contact_msg, params[:contact_msg], :rows => 8, :cols => 50, :style => 'display:block;margin-bottom:15px'
+ = submit_tag 'Send message', :id => 'submit'
View
13 config/routes.rb
@@ -1,7 +1,7 @@
ActionController::Routing::Routes.draw do |map|
- map.login '/login', :controller => 'sessions', :action => 'new'
- map.logout '/logout', :controller => 'sessions', :action => 'destroy'
+ map.login 'login', :controller => 'sessions', :action => 'new'
+ map.logout 'logout', :controller => 'sessions', :action => 'destroy'
map.resource :session
map.resources :jobs, :member => {
@@ -11,16 +11,23 @@
:report_spam => :post
}
+ map.resources :companies
+ map.jobs_at 'jobs_at/:company', :controller => 'companies', :action => 'jobs_at'
+
map.resources :job_requests, :collection => {:success => :get}
map.resources :categories
map.resource :search, :controller => "Search"
+
+ map.resources :pages
- map.admin '/admin', :controller => 'admin/jobs', :action => 'index'
+ map.admin 'admin', :controller => 'admin/jobs', :action => 'index'
map.namespace :admin do |admin|
# Directs /admin/jobs/* to Admin::JobsController (app/controllers/admin/jobs_controller.rb)
admin.resources :jobs
# Directs /admin/categories/* to Admin::CategoriesController (app/controllers/admin/categories_controller.rb)
admin.resources :categories, :collection => {:saveorder => :put}
+ # Directs /admin/pages/* to Admin::PagesController (app/controllers/admin/pages_controller.rb)
+ admin.resources :pages
end
map.root :controller => "jobs"
View
56 db/fixtures/pages.rb
@@ -0,0 +1,56 @@
+Page.seed(:url) do |s|
+ s.url = 'about'
+ s.page_title = 'About Us'
+ s.keywords = ''
+ s.description = ''
+ s.title = 'About Us'
+ s.content = '<h4>Hello!</h4><p>This job board is an open source implementation of <a href="http://www.jobber.ro/">www.jobber.ro</a>.</p><p>Don\'t hesitate to <a href="http://localhost/jobber/contact/">contact us</a>!</p>'
+ s.has_form = false
+ s.form_message = ''
+end
+
+Page.seed(:url) do |s|
+ s.url = 'contact'
+ s.page_title = 'Contact Us'
+ s.keywords = ''
+ s.description = ''
+ s.title = 'We really appreciate feedback!'
+ s.content = '<p>E-mail us at <strong>hello [at] domain [dot] com</strong> or use the form below:</p>'
+ s.has_form = true
+ s.form_message = '<p>Thank you for your message! :)</p>'
+end
+
+Page.seed(:url) do |s|
+ s.url = 'widgets'
+ s.page_title = 'Widgets'
+ s.keywords = ''
+ s.description = ''
+ s.title = 'Site widget'
+ s.content = '<h4>Would you like to display our latest jobs on your site?</h4>
+ <p>Insert one of the following snippets in your page\'s HTML code, in the position where the ads should appear:</p>
+ <ol>
+ <li>Get latest 5 jobs from all categories and all types, posted in the past 7 days, in random order:
+ <pre>&lt;script src="http://localhost/jobber/api/api.php?action=getJobs<br />&amp;type=0&amp;category=0&amp;count=5&amp;random=1&amp;days_behind=7&amp;response=js" type="text/javascript"&gt;&lt;/script&gt;<br /><br />&lt;script type="text/javascript"&gt;<strong>showJobs(\'jobber-container\', \'jobber-list\');</strong>&lt;/script&gt;</pre>
+ </li>
+ <li>Get last 10 full-time jobs for programmers, posted in the past 15 days, ordered by publish date (newest on top):
+ <pre>&lt;script src="http://localhost/jobber/api/api.php?action=getJobs<br />&amp;type=fulltime&amp;category=programmers&amp;count=10&amp;random=0&amp;days_behind=15&amp;response=js" <br />type="text/javascript"&gt;&lt;/script&gt;<br /><br />&lt;script type="text/javascript"&gt;<strong>showJobs(\'jobber-container\', \'jobber-list\');</strong>&lt;/script&gt;</pre>
+ </li>
+ <li>Get latest jobs published by a company (e.g. Google):
+ <pre>&lt;script src="http://localhost/jobber/api/api.php?action=getJobsByCompany<br />&amp;company=google&amp;count=10&amp;response=js" type="text/javascript"&gt;&lt;/script&gt;<br /><br />&lt;script type="text/javascript"&gt;<strong>showJobs(\'jobber-container\',\'jobber-list\');</strong>&lt;/script&gt;</pre>
+ </li>
+ </ol>
+ <h2>The parameters you can use when calling the API, are:</h2>
+ <ul>
+ <li><strong>action</strong>: "getJobs" - all jobs / "getJobsByCompany" - a single company\'s jobs</li>
+ <li><strong>type</strong>: "0" - toate / "fulltime" / "parttime" / "freelance";</li>
+ <li><strong>category</strong>: "0" - all / "programmers" / "designers" / "administrators" / "managers" / "testers" / "editors";</li>
+ <li><strong>count</strong>: number of job ads to display;</li>
+ <li><strong>random</strong>: "1" - display randomly / "0" - display ordered by publish date (newest on top);</li>
+ <li><strong>days_behind</strong>: get only jobs posted in the past X days (type "0" if you don\'t want to limit this);</li>
+ <li><strong>response</strong>: "js" - returns jobs as JavaScript code / "json" - returns only a JSON string / "xml" - returns an XML.</li>
+ </ul>
+ <h2>Use CSS to style the list:</h2>
+ <pre>ul.jobber-list {<br /> list-style-type: none;<br /> margin: 0;<br /> padding: 0;<br />}<br />ul.jobber-list li {<br /> margin-bottom: 5px;<br />}</pre>'
+ s.has_form = false
+ s.form_message = ''
+end
View
13 db/schema.rb
@@ -109,4 +109,17 @@
t.datetime "updated_at"
end
+ create_table "pages", :force => true do |t|
+ t.string "url"
+ t.string "page_title"
+ t.text "keywords"
+ t.text "description"
+ t.string "title"
+ t.text "content"
+ t.boolean "has_form"
+ t.text "form_message"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
end
View
29 public/javascripts/components/categories.js
@@ -0,0 +1,29 @@
+$j(document).ready(function() {
+ $j("div.categoryHandle").mousedown(function() {
+ $j(this).fadeTo(500, 0.4).addClass('draggingItem').get(0);
+ });
+ $j("div.categoryHandle").mouseup(function() {
+ $j(this).fadeTo(500,1).removeClass('draggingItem');
+ });
+});
+
+function showOverlay(element) {
+ var el = document.getElementById('overlay');
+ var elTo = document.getElementById(element);
+ if (!elTo) {
+ return;
+ }
+ var sz = elTo.positionedOffset(elTo);
+
+ if (element != "categoriesContainer") {
+ var tt = document.getElementById("categoriesContainer").positionedOffset(elTo);
+ el.style.top = tt.top + sz.top + 'px';
+ el.style.left = tt.left + sz.left + 'px';
+ } else {
+ el.style.top = sz.top + 'px';
+ el.style.left = sz.left + 'px';
+ }
+ el.style.width = elTo.offsetWidth + 'px';
+ el.style.height = elTo.offsetHeight + 'px';
+ el.style.display = 'block';
+}
View
154 public/javascripts/tiny_mce/langs/en.js
@@ -0,0 +1,154 @@
+tinyMCE.addI18n({en:{
+common:{
+edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
+apply:"Apply",
+insert:"Insert",
+update:"Update",
+cancel:"Cancel",
+close:"Close",
+browse:"Browse",
+class_name:"Class",
+not_set:"-- Not set --",
+clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
+clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
+popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
+invalid_data:"Error: Invalid values entered, these are marked in red.",
+more_colors:"More colors"
+},
+contextmenu:{
+align:"Alignment",
+left:"Left",
+center:"Center",
+right:"Right",
+full:"Full"
+},
+insertdatetime:{
+date_fmt:"%Y-%m-%d",
+time_fmt:"%H:%M:%S",
+insertdate_desc:"Insert date",
+inserttime_desc:"Insert time",
+months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
+months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
+day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
+day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"
+},
+print:{
+print_desc:"Print"
+},
+preview:{
+preview_desc:"Preview"
+},
+directionality:{
+ltr_desc:"Direction left to right",
+rtl_desc:"Direction right to left"
+},
+layer:{
+insertlayer_desc:"Insert new layer",
+forward_desc:"Move forward",
+backward_desc:"Move backward",
+absolute_desc:"Toggle absolute positioning",
+content:"New layer..."
+},
+save:{
+save_desc:"Save",
+cancel_desc:"Cancel all changes"
+},
+nonbreaking:{
+nonbreaking_desc:"Insert non-breaking space character"
+},
+iespell:{
+iespell_desc:"Run spell checking",
+download:"ieSpell not detected. Do you want to install it now?"
+},
+advhr:{
+advhr_desc:"Horizontal rule"
+},
+emotions:{
+emotions_desc:"Emotions"
+},
+searchreplace:{
+search_desc:"Find",
+replace_desc:"Find/Replace"
+},
+advimage:{
+image_desc:"Insert/edit image"
+},
+advlink:{
+link_desc:"Insert/edit link"
+},
+xhtmlxtras:{
+cite_desc:"Citation",
+abbr_desc:"Abbreviation",
+acronym_desc:"Acronym",
+del_desc:"Deletion",
+ins_desc:"Insertion",
+attribs_desc:"Insert/Edit Attributes"
+},
+style:{
+desc:"Edit CSS Style"
+},
+paste:{
+paste_text_desc:"Paste as Plain Text",
+paste_word_desc:"Paste from Word",
+selectall_desc:"Select All"
+},
+paste_dlg:{
+text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
+text_linebreaks:"Keep linebreaks",
+word_title:"Use CTRL+V on your keyboard to paste the text into the window."
+},
+table:{
+desc:"Inserts a new table",
+row_before_desc:"Insert row before",
+row_after_desc:"Insert row after",
+delete_row_desc:"Delete row",
+col_before_desc:"Insert column before",
+col_after_desc:"Insert column after",
+delete_col_desc:"Remove column",
+split_cells_desc:"Split merged table cells",
+merge_cells_desc:"Merge table cells",
+row_desc:"Table row properties",
+cell_desc:"Table cell properties",
+props_desc:"Table properties",
+paste_row_before_desc:"Paste table row before",
+paste_row_after_desc:"Paste table row after",
+cut_row_desc:"Cut table row",
+copy_row_desc:"Copy table row",
+del:"Delete table",
+row:"Row",
+col:"Column",
+cell:"Cell"
+},
+autosave:{
+unload_msg:"The changes you made will be lost if you navigate away from this page."
+},
+fullscreen:{
+desc:"Toggle fullscreen mode"
+},
+media:{
+desc:"Insert / edit embedded media",
+edit:"Edit embedded media"
+},
+fullpage:{
+desc:"Document properties"
+},
+template:{
+desc:"Insert predefined template content"
+},
+visualchars:{
+desc:"Visual control characters on/off."
+},
+spellchecker:{
+desc:"Toggle spellchecker",
+menu:"Spellchecker settings",
+ignore_word:"Ignore word",
+ignore_words:"Ignore all",
+langs:"Languages",
+wait:"Please wait...",
+sug:"Suggestions",
+no_sug:"No suggestions",
+no_mpell:"No misspellings found."
+},
+pagebreak:{
+desc:"Insert page break."
+}}});
View
504 public/javascripts/tiny_mce/license.txt
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
View
5 public/javascripts/tiny_mce/plugins/advhr/css/advhr.css
@@ -0,0 +1,5 @@
+input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
+.panel_wrapper div.current {height:80px;}
+#width {width:50px; vertical-align:middle;}
+#width2 {width:50px; vertical-align:middle;}
+#size {width:100px;}
View
1  public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create('tinymce.plugins.AdvancedHRPlugin',{init:function(ed,url){ed.addCommand('mceAdvancedHr',function(){ed.windowManager.open({file:url+'/rule.htm',width:250+parseInt(ed.getLang('advhr.delta_width',0)),height:160+parseInt(ed.getLang('advhr.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('advhr',{title:'advhr.advhr_desc',cmd:'mceAdvancedHr'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('advhr',n.nodeName=='HR');});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='HR')ed.selection.select(e);});},getInfo:function(){return{longname:'Advanced HR',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advhr',tinymce.plugins.AdvancedHRPlugin);})();
View
54 public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js
@@ -0,0 +1,54 @@
+/**
+ * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.AdvancedHRPlugin', {
+ init : function(ed, url) {
+ // Register commands
+ ed.addCommand('mceAdvancedHr', function() {
+ ed.windowManager.open({
+ file : url + '/rule.htm',
+ width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)),
+ height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ // Register buttons
+ ed.addButton('advhr', {
+ title : 'advhr.advhr_desc',
+ cmd : 'mceAdvancedHr'
+ });
+
+ ed.onNodeChange.add(function(ed, cm, n) {
+ cm.setActive('advhr', n.nodeName == 'HR');
+ });
+
+ ed.onClick.add(function(ed, e) {
+ e = e.target;
+
+ if (e.nodeName === 'HR')
+ ed.selection.select(e);
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Advanced HR',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin);
+})();
View
43 public/javascripts/tiny_mce/plugins/advhr/js/rule.js
@@ -0,0 +1,43 @@
+var AdvHRDialog = {
+ init : function(ed) {
+ var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w;
+
+ w = dom.getAttrib(n, 'width');
+ f.width.value = w ? parseInt(w) : (dom.getStyle('width') || '');
+ f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || '';
+ f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width');
+ selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px');
+ },
+
+ update : function() {
+ var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = '';
+
+ h = '<hr';
+
+ if (f.size.value) {
+ h += ' size="' + f.size.value + '"';
+ st += ' height:' + f.size.value + 'px;';
+ }
+
+ if (f.width.value) {
+ h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
+ st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';';
+ }
+
+ if (f.noshade.checked) {
+ h += ' noshade="noshade"';
+ st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;';
+ }
+
+ if (ed.settings.inline_styles)
+ h += ' style="' + tinymce.trim(st) + '"';
+
+ h += ' />';
+
+ ed.execCommand("mceInsertContent", false, h);
+ tinyMCEPopup.close();
+ }
+};
+
+tinyMCEPopup.requireLangPack();
+tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);
View
5 public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js
@@ -0,0 +1,5 @@
+tinyMCE.addI18n('en.advhr_dlg',{
+width:"Width",
+size:"Height",
+noshade:"No shadow"
+});
View
63 public/javascripts/tiny_mce/plugins/advhr/rule.htm
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advhr.advhr_desc}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/rule.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <link href="css/advhr.css" rel="stylesheet" type="text/css" />
+ <base target="_self" />
+</head>
+<body>
+<form onsubmit="AdvHRDialog.update();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="width">{#advhr_dlg.width}</label></td>
+ <td nowrap="nowrap">
+ <input id="width" name="width" type="text" value="" class="mceFocus" />
+ <select name="width2" id="width2">
+ <option value="">px</option>
+ <option value="%">%</option>
<