ppc_logic 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (665) hide show
  1. data/Gemfile +1 -4
  2. data/VERSION +1 -1
  3. data/app/models/landing_page.rb +13 -50
  4. data/app/views/admin/landing_pages/_form.html.erb +1 -1
  5. data/app/views/layouts/application.html.erb +2 -8
  6. data/config/environments/development.rb +1 -0
  7. data/config/environments/production.rb +2 -0
  8. data/config/environments/test.rb +2 -3
  9. data/features/manage_landing_pages.feature +1 -1
  10. data/features/manage_local_offers.feature +1 -1
  11. data/features/support/env.rb +38 -20
  12. data/lib/tasks/cucumber.rake +12 -0
  13. data/ppc_logic.gemspec +5 -659
  14. metadata +22 -686
  15. data/public/404.html +0 -26
  16. data/public/422.html +0 -26
  17. data/public/500.html +0 -26
  18. data/public/favicon.ico +0 -0
  19. data/public/javascripts/application.js +0 -2
  20. data/public/javascripts/ckeditor/.htaccess +0 -24
  21. data/public/javascripts/ckeditor/CHANGES.html +0 -993
  22. data/public/javascripts/ckeditor/INSTALL.html +0 -92
  23. data/public/javascripts/ckeditor/LICENSE.html +0 -1334
  24. data/public/javascripts/ckeditor/_samples/ajax.html +0 -87
  25. data/public/javascripts/ckeditor/_samples/api.html +0 -152
  26. data/public/javascripts/ckeditor/_samples/api_dialog.html +0 -188
  27. data/public/javascripts/ckeditor/_samples/api_dialog/my_dialog.js +0 -28
  28. data/public/javascripts/ckeditor/_samples/asp/advanced.asp +0 -105
  29. data/public/javascripts/ckeditor/_samples/asp/events.asp +0 -136
  30. data/public/javascripts/ckeditor/_samples/asp/index.html +0 -103
  31. data/public/javascripts/ckeditor/_samples/asp/replace.asp +0 -72
  32. data/public/javascripts/ckeditor/_samples/asp/replaceall.asp +0 -77
  33. data/public/javascripts/ckeditor/_samples/asp/sample_posteddata.asp +0 -46
  34. data/public/javascripts/ckeditor/_samples/asp/standalone.asp +0 -72
  35. data/public/javascripts/ckeditor/_samples/assets/output_for_flash.fla +0 -0
  36. data/public/javascripts/ckeditor/_samples/assets/output_for_flash.swf +0 -0
  37. data/public/javascripts/ckeditor/_samples/assets/output_xhtml.css +0 -204
  38. data/public/javascripts/ckeditor/_samples/assets/swfobject.js +0 -18
  39. data/public/javascripts/ckeditor/_samples/autogrow.html +0 -75
  40. data/public/javascripts/ckeditor/_samples/divreplace.html +0 -137
  41. data/public/javascripts/ckeditor/_samples/enterkey.html +0 -88
  42. data/public/javascripts/ckeditor/_samples/fullpage.html +0 -62
  43. data/public/javascripts/ckeditor/_samples/index.html +0 -57
  44. data/public/javascripts/ckeditor/_samples/jqueryadapter.html +0 -73
  45. data/public/javascripts/ckeditor/_samples/output_for_flash.html +0 -257
  46. data/public/javascripts/ckeditor/_samples/output_html.html +0 -259
  47. data/public/javascripts/ckeditor/_samples/output_xhtml.html +0 -159
  48. data/public/javascripts/ckeditor/_samples/php/advanced.php +0 -93
  49. data/public/javascripts/ckeditor/_samples/php/events.php +0 -130
  50. data/public/javascripts/ckeditor/_samples/php/replace.php +0 -63
  51. data/public/javascripts/ckeditor/_samples/php/replaceall.php +0 -68
  52. data/public/javascripts/ckeditor/_samples/php/standalone.php +0 -64
  53. data/public/javascripts/ckeditor/_samples/replacebyclass.html +0 -49
  54. data/public/javascripts/ckeditor/_samples/replacebycode.html +0 -80
  55. data/public/javascripts/ckeditor/_samples/sample.css +0 -81
  56. data/public/javascripts/ckeditor/_samples/sample.js +0 -65
  57. data/public/javascripts/ckeditor/_samples/sample_posteddata.php +0 -59
  58. data/public/javascripts/ckeditor/_samples/sharedspaces.html +0 -131
  59. data/public/javascripts/ckeditor/_samples/skins.html +0 -83
  60. data/public/javascripts/ckeditor/_samples/ui_color.html +0 -87
  61. data/public/javascripts/ckeditor/_samples/ui_languages.html +0 -103
  62. data/public/javascripts/ckeditor/_source/adapters/jquery.js +0 -297
  63. data/public/javascripts/ckeditor/_source/core/_bootstrap.js +0 -96
  64. data/public/javascripts/ckeditor/_source/core/ajax.js +0 -142
  65. data/public/javascripts/ckeditor/_source/core/ckeditor.js +0 -133
  66. data/public/javascripts/ckeditor/_source/core/ckeditor_base.js +0 -196
  67. data/public/javascripts/ckeditor/_source/core/ckeditor_basic.js +0 -239
  68. data/public/javascripts/ckeditor/_source/core/command.js +0 -209
  69. data/public/javascripts/ckeditor/_source/core/commanddefinition.js +0 -129
  70. data/public/javascripts/ckeditor/_source/core/config.js +0 -430
  71. data/public/javascripts/ckeditor/_source/core/dataprocessor.js +0 -65
  72. data/public/javascripts/ckeditor/_source/core/dom.js +0 -20
  73. data/public/javascripts/ckeditor/_source/core/dom/comment.js +0 -32
  74. data/public/javascripts/ckeditor/_source/core/dom/document.js +0 -224
  75. data/public/javascripts/ckeditor/_source/core/dom/documentfragment.js +0 -49
  76. data/public/javascripts/ckeditor/_source/core/dom/domobject.js +0 -255
  77. data/public/javascripts/ckeditor/_source/core/dom/element.js +0 -1564
  78. data/public/javascripts/ckeditor/_source/core/dom/elementpath.js +0 -119
  79. data/public/javascripts/ckeditor/_source/core/dom/event.js +0 -142
  80. data/public/javascripts/ckeditor/_source/core/dom/node.js +0 -683
  81. data/public/javascripts/ckeditor/_source/core/dom/nodelist.js +0 -26
  82. data/public/javascripts/ckeditor/_source/core/dom/range.js +0 -1883
  83. data/public/javascripts/ckeditor/_source/core/dom/rangelist.js +0 -214
  84. data/public/javascripts/ckeditor/_source/core/dom/text.js +0 -123
  85. data/public/javascripts/ckeditor/_source/core/dom/walker.js +0 -445
  86. data/public/javascripts/ckeditor/_source/core/dom/window.js +0 -96
  87. data/public/javascripts/ckeditor/_source/core/dtd.js +0 -238
  88. data/public/javascripts/ckeditor/_source/core/editor.js +0 -924
  89. data/public/javascripts/ckeditor/_source/core/editor_basic.js +0 -182
  90. data/public/javascripts/ckeditor/_source/core/env.js +0 -270
  91. data/public/javascripts/ckeditor/_source/core/event.js +0 -342
  92. data/public/javascripts/ckeditor/_source/core/eventInfo.js +0 -120
  93. data/public/javascripts/ckeditor/_source/core/focusmanager.js +0 -152
  94. data/public/javascripts/ckeditor/_source/core/htmlparser.js +0 -224
  95. data/public/javascripts/ckeditor/_source/core/htmlparser/basicwriter.js +0 -145
  96. data/public/javascripts/ckeditor/_source/core/htmlparser/cdata.js +0 -43
  97. data/public/javascripts/ckeditor/_source/core/htmlparser/comment.js +0 -60
  98. data/public/javascripts/ckeditor/_source/core/htmlparser/element.js +0 -240
  99. data/public/javascripts/ckeditor/_source/core/htmlparser/filter.js +0 -288
  100. data/public/javascripts/ckeditor/_source/core/htmlparser/fragment.js +0 -504
  101. data/public/javascripts/ckeditor/_source/core/htmlparser/text.js +0 -55
  102. data/public/javascripts/ckeditor/_source/core/imagecacher.js +0 -80
  103. data/public/javascripts/ckeditor/_source/core/lang.js +0 -156
  104. data/public/javascripts/ckeditor/_source/core/loader.js +0 -243
  105. data/public/javascripts/ckeditor/_source/core/plugindefinition.js +0 -66
  106. data/public/javascripts/ckeditor/_source/core/plugins.js +0 -85
  107. data/public/javascripts/ckeditor/_source/core/resourcemanager.js +0 -238
  108. data/public/javascripts/ckeditor/_source/core/scriptloader.js +0 -200
  109. data/public/javascripts/ckeditor/_source/core/skins.js +0 -212
  110. data/public/javascripts/ckeditor/_source/core/themes.js +0 -19
  111. data/public/javascripts/ckeditor/_source/core/tools.js +0 -734
  112. data/public/javascripts/ckeditor/_source/core/ui.js +0 -116
  113. data/public/javascripts/ckeditor/_source/core/xml.js +0 -165
  114. data/public/javascripts/ckeditor/_source/lang/_languages.js +0 -83
  115. data/public/javascripts/ckeditor/_source/lang/_translationstatus.txt +0 -60
  116. data/public/javascripts/ckeditor/_source/lang/af.js +0 -758
  117. data/public/javascripts/ckeditor/_source/lang/ar.js +0 -758
  118. data/public/javascripts/ckeditor/_source/lang/bg.js +0 -758
  119. data/public/javascripts/ckeditor/_source/lang/bn.js +0 -758
  120. data/public/javascripts/ckeditor/_source/lang/bs.js +0 -758
  121. data/public/javascripts/ckeditor/_source/lang/ca.js +0 -758
  122. data/public/javascripts/ckeditor/_source/lang/cs.js +0 -758
  123. data/public/javascripts/ckeditor/_source/lang/cy.js +0 -758
  124. data/public/javascripts/ckeditor/_source/lang/da.js +0 -758
  125. data/public/javascripts/ckeditor/_source/lang/de.js +0 -758
  126. data/public/javascripts/ckeditor/_source/lang/el.js +0 -758
  127. data/public/javascripts/ckeditor/_source/lang/en-au.js +0 -758
  128. data/public/javascripts/ckeditor/_source/lang/en-ca.js +0 -758
  129. data/public/javascripts/ckeditor/_source/lang/en-gb.js +0 -758
  130. data/public/javascripts/ckeditor/_source/lang/en.js +0 -758
  131. data/public/javascripts/ckeditor/_source/lang/eo.js +0 -758
  132. data/public/javascripts/ckeditor/_source/lang/es.js +0 -758
  133. data/public/javascripts/ckeditor/_source/lang/et.js +0 -758
  134. data/public/javascripts/ckeditor/_source/lang/eu.js +0 -758
  135. data/public/javascripts/ckeditor/_source/lang/fa.js +0 -758
  136. data/public/javascripts/ckeditor/_source/lang/fi.js +0 -758
  137. data/public/javascripts/ckeditor/_source/lang/fo.js +0 -758
  138. data/public/javascripts/ckeditor/_source/lang/fr-ca.js +0 -758
  139. data/public/javascripts/ckeditor/_source/lang/fr.js +0 -758
  140. data/public/javascripts/ckeditor/_source/lang/gl.js +0 -758
  141. data/public/javascripts/ckeditor/_source/lang/gu.js +0 -758
  142. data/public/javascripts/ckeditor/_source/lang/he.js +0 -758
  143. data/public/javascripts/ckeditor/_source/lang/hi.js +0 -758
  144. data/public/javascripts/ckeditor/_source/lang/hr.js +0 -758
  145. data/public/javascripts/ckeditor/_source/lang/hu.js +0 -758
  146. data/public/javascripts/ckeditor/_source/lang/is.js +0 -758
  147. data/public/javascripts/ckeditor/_source/lang/it.js +0 -758
  148. data/public/javascripts/ckeditor/_source/lang/ja.js +0 -758
  149. data/public/javascripts/ckeditor/_source/lang/km.js +0 -758
  150. data/public/javascripts/ckeditor/_source/lang/ko.js +0 -758
  151. data/public/javascripts/ckeditor/_source/lang/lt.js +0 -758
  152. data/public/javascripts/ckeditor/_source/lang/lv.js +0 -758
  153. data/public/javascripts/ckeditor/_source/lang/mn.js +0 -758
  154. data/public/javascripts/ckeditor/_source/lang/ms.js +0 -758
  155. data/public/javascripts/ckeditor/_source/lang/nb.js +0 -758
  156. data/public/javascripts/ckeditor/_source/lang/nl.js +0 -758
  157. data/public/javascripts/ckeditor/_source/lang/no.js +0 -758
  158. data/public/javascripts/ckeditor/_source/lang/pl.js +0 -758
  159. data/public/javascripts/ckeditor/_source/lang/pt-br.js +0 -757
  160. data/public/javascripts/ckeditor/_source/lang/pt.js +0 -758
  161. data/public/javascripts/ckeditor/_source/lang/ro.js +0 -758
  162. data/public/javascripts/ckeditor/_source/lang/ru.js +0 -758
  163. data/public/javascripts/ckeditor/_source/lang/sk.js +0 -758
  164. data/public/javascripts/ckeditor/_source/lang/sl.js +0 -758
  165. data/public/javascripts/ckeditor/_source/lang/sr-latn.js +0 -758
  166. data/public/javascripts/ckeditor/_source/lang/sr.js +0 -758
  167. data/public/javascripts/ckeditor/_source/lang/sv.js +0 -758
  168. data/public/javascripts/ckeditor/_source/lang/th.js +0 -758
  169. data/public/javascripts/ckeditor/_source/lang/tr.js +0 -757
  170. data/public/javascripts/ckeditor/_source/lang/uk.js +0 -758
  171. data/public/javascripts/ckeditor/_source/lang/vi.js +0 -758
  172. data/public/javascripts/ckeditor/_source/lang/zh-cn.js +0 -758
  173. data/public/javascripts/ckeditor/_source/lang/zh.js +0 -758
  174. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +0 -211
  175. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/lang/en.js +0 -108
  176. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/lang/he.js +0 -216
  177. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/plugin.js +0 -46
  178. data/public/javascripts/ckeditor/_source/plugins/about/dialogs/about.js +0 -73
  179. data/public/javascripts/ckeditor/_source/plugins/about/dialogs/logo_ckeditor.png +0 -0
  180. data/public/javascripts/ckeditor/_source/plugins/about/plugin.js +0 -23
  181. data/public/javascripts/ckeditor/_source/plugins/ajax_save/plugin.js +0 -44
  182. data/public/javascripts/ckeditor/_source/plugins/attachment/dialogs/attachment.js +0 -384
  183. data/public/javascripts/ckeditor/_source/plugins/attachment/images/attachment.png +0 -0
  184. data/public/javascripts/ckeditor/_source/plugins/attachment/lang/en.js +0 -10
  185. data/public/javascripts/ckeditor/_source/plugins/attachment/lang/ru.js +0 -10
  186. data/public/javascripts/ckeditor/_source/plugins/attachment/lang/uk.js +0 -10
  187. data/public/javascripts/ckeditor/_source/plugins/attachment/plugin.js +0 -44
  188. data/public/javascripts/ckeditor/_source/plugins/autogrow/plugin.js +0 -86
  189. data/public/javascripts/ckeditor/_source/plugins/basicstyles/plugin.js +0 -101
  190. data/public/javascripts/ckeditor/_source/plugins/bidi/plugin.js +0 -259
  191. data/public/javascripts/ckeditor/_source/plugins/blockquote/plugin.js +0 -301
  192. data/public/javascripts/ckeditor/_source/plugins/button/plugin.js +0 -277
  193. data/public/javascripts/ckeditor/_source/plugins/clipboard/dialogs/paste.js +0 -205
  194. data/public/javascripts/ckeditor/_source/plugins/clipboard/plugin.js +0 -412
  195. data/public/javascripts/ckeditor/_source/plugins/colorbutton/plugin.js +0 -250
  196. data/public/javascripts/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +0 -336
  197. data/public/javascripts/ckeditor/_source/plugins/colordialog/plugin.js +0 -13
  198. data/public/javascripts/ckeditor/_source/plugins/contextmenu/plugin.js +0 -290
  199. data/public/javascripts/ckeditor/_source/plugins/dialog/dialogDefinition.js +0 -315
  200. data/public/javascripts/ckeditor/_source/plugins/dialog/plugin.js +0 -3015
  201. data/public/javascripts/ckeditor/_source/plugins/dialogadvtab/plugin.js +0 -213
  202. data/public/javascripts/ckeditor/_source/plugins/dialogui/plugin.js +0 -1523
  203. data/public/javascripts/ckeditor/_source/plugins/div/dialogs/div.js +0 -535
  204. data/public/javascripts/ckeditor/_source/plugins/div/plugin.js +0 -121
  205. data/public/javascripts/ckeditor/_source/plugins/domiterator/plugin.js +0 -356
  206. data/public/javascripts/ckeditor/_source/plugins/editingblock/plugin.js +0 -229
  207. data/public/javascripts/ckeditor/_source/plugins/elementspath/plugin.js +0 -206
  208. data/public/javascripts/ckeditor/_source/plugins/embed/dialogs/embed.js +0 -65
  209. data/public/javascripts/ckeditor/_source/plugins/embed/images/embed.png +0 -0
  210. data/public/javascripts/ckeditor/_source/plugins/embed/lang/en.js +0 -9
  211. data/public/javascripts/ckeditor/_source/plugins/embed/lang/ru.js +0 -9
  212. data/public/javascripts/ckeditor/_source/plugins/embed/lang/uk.js +0 -9
  213. data/public/javascripts/ckeditor/_source/plugins/embed/plugin.js +0 -44
  214. data/public/javascripts/ckeditor/_source/plugins/enterkey/plugin.js +0 -363
  215. data/public/javascripts/ckeditor/_source/plugins/entities/plugin.js +0 -226
  216. data/public/javascripts/ckeditor/_source/plugins/fakeobjects/plugin.js +0 -122
  217. data/public/javascripts/ckeditor/_source/plugins/filebrowser/plugin.js +0 -501
  218. data/public/javascripts/ckeditor/_source/plugins/find/dialogs/find.js +0 -890
  219. data/public/javascripts/ckeditor/_source/plugins/find/plugin.js +0 -46
  220. data/public/javascripts/ckeditor/_source/plugins/flash/dialogs/flash.js +0 -698
  221. data/public/javascripts/ckeditor/_source/plugins/flash/images/placeholder.png +0 -0
  222. data/public/javascripts/ckeditor/_source/plugins/flash/plugin.js +0 -168
  223. data/public/javascripts/ckeditor/_source/plugins/floatpanel/plugin.js +0 -402
  224. data/public/javascripts/ckeditor/_source/plugins/font/plugin.js +0 -234
  225. data/public/javascripts/ckeditor/_source/plugins/format/plugin.js +0 -194
  226. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/button.js +0 -135
  227. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/checkbox.js +0 -153
  228. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/form.js +0 -177
  229. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +0 -98
  230. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/radio.js +0 -135
  231. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/select.js +0 -556
  232. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/textarea.js +0 -114
  233. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/textfield.js +0 -199
  234. data/public/javascripts/ckeditor/_source/plugins/forms/images/hiddenfield.gif +0 -0
  235. data/public/javascripts/ckeditor/_source/plugins/forms/plugin.js +0 -284
  236. data/public/javascripts/ckeditor/_source/plugins/horizontalrule/plugin.js +0 -36
  237. data/public/javascripts/ckeditor/_source/plugins/htmldataprocessor/plugin.js +0 -502
  238. data/public/javascripts/ckeditor/_source/plugins/htmlwriter/plugin.js +0 -319
  239. data/public/javascripts/ckeditor/_source/plugins/iframedialog/plugin.js +0 -136
  240. data/public/javascripts/ckeditor/_source/plugins/image/dialogs/image.js +0 -1396
  241. data/public/javascripts/ckeditor/_source/plugins/image/plugin.js +0 -81
  242. data/public/javascripts/ckeditor/_source/plugins/indent/plugin.js +0 -455
  243. data/public/javascripts/ckeditor/_source/plugins/justify/plugin.js +0 -221
  244. data/public/javascripts/ckeditor/_source/plugins/keystrokes/plugin.js +0 -225
  245. data/public/javascripts/ckeditor/_source/plugins/link/dialogs/anchor.js +0 -99
  246. data/public/javascripts/ckeditor/_source/plugins/link/dialogs/link.js +0 -1424
  247. data/public/javascripts/ckeditor/_source/plugins/link/images/anchor.gif +0 -0
  248. data/public/javascripts/ckeditor/_source/plugins/link/plugin.js +0 -238
  249. data/public/javascripts/ckeditor/_source/plugins/list/plugin.js +0 -710
  250. data/public/javascripts/ckeditor/_source/plugins/listblock/plugin.js +0 -257
  251. data/public/javascripts/ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +0 -204
  252. data/public/javascripts/ckeditor/_source/plugins/liststyle/plugin.js +0 -66
  253. data/public/javascripts/ckeditor/_source/plugins/maximize/plugin.js +0 -350
  254. data/public/javascripts/ckeditor/_source/plugins/menu/plugin.js +0 -408
  255. data/public/javascripts/ckeditor/_source/plugins/menubutton/plugin.js +0 -94
  256. data/public/javascripts/ckeditor/_source/plugins/newpage/plugin.js +0 -53
  257. data/public/javascripts/ckeditor/_source/plugins/pagebreak/images/pagebreak.gif +0 -0
  258. data/public/javascripts/ckeditor/_source/plugins/pagebreak/plugin.js +0 -121
  259. data/public/javascripts/ckeditor/_source/plugins/panel/plugin.js +0 -399
  260. data/public/javascripts/ckeditor/_source/plugins/panelbutton/plugin.js +0 -147
  261. data/public/javascripts/ckeditor/_source/plugins/pastefromword/filter/default.js +0 -1170
  262. data/public/javascripts/ckeditor/_source/plugins/pastefromword/plugin.js +0 -122
  263. data/public/javascripts/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +0 -70
  264. data/public/javascripts/ckeditor/_source/plugins/pastetext/plugin.js +0 -145
  265. data/public/javascripts/ckeditor/_source/plugins/popup/plugin.js +0 -64
  266. data/public/javascripts/ckeditor/_source/plugins/preview/plugin.js +0 -108
  267. data/public/javascripts/ckeditor/_source/plugins/print/plugin.js +0 -41
  268. data/public/javascripts/ckeditor/_source/plugins/removeformat/plugin.js +0 -184
  269. data/public/javascripts/ckeditor/_source/plugins/resize/plugin.js +0 -157
  270. data/public/javascripts/ckeditor/_source/plugins/richcombo/plugin.js +0 -370
  271. data/public/javascripts/ckeditor/_source/plugins/save/plugin.js +0 -55
  272. data/public/javascripts/ckeditor/_source/plugins/scayt/dialogs/options.js +0 -534
  273. data/public/javascripts/ckeditor/_source/plugins/scayt/dialogs/toolbar.css +0 -71
  274. data/public/javascripts/ckeditor/_source/plugins/scayt/plugin.js +0 -945
  275. data/public/javascripts/ckeditor/_source/plugins/selection/plugin.js +0 -1375
  276. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_address.png +0 -0
  277. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_blockquote.png +0 -0
  278. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_div.png +0 -0
  279. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h1.png +0 -0
  280. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h2.png +0 -0
  281. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h3.png +0 -0
  282. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h4.png +0 -0
  283. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h5.png +0 -0
  284. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h6.png +0 -0
  285. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_p.png +0 -0
  286. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_pre.png +0 -0
  287. data/public/javascripts/ckeditor/_source/plugins/showblocks/plugin.js +0 -155
  288. data/public/javascripts/ckeditor/_source/plugins/showborders/plugin.js +0 -201
  289. data/public/javascripts/ckeditor/_source/plugins/smiley/dialogs/smiley.js +0 -218
  290. data/public/javascripts/ckeditor/_source/plugins/smiley/images/angel_smile.gif +0 -0
  291. data/public/javascripts/ckeditor/_source/plugins/smiley/images/angry_smile.gif +0 -0
  292. data/public/javascripts/ckeditor/_source/plugins/smiley/images/broken_heart.gif +0 -0
  293. data/public/javascripts/ckeditor/_source/plugins/smiley/images/confused_smile.gif +0 -0
  294. data/public/javascripts/ckeditor/_source/plugins/smiley/images/cry_smile.gif +0 -0
  295. data/public/javascripts/ckeditor/_source/plugins/smiley/images/devil_smile.gif +0 -0
  296. data/public/javascripts/ckeditor/_source/plugins/smiley/images/embaressed_smile.gif +0 -0
  297. data/public/javascripts/ckeditor/_source/plugins/smiley/images/envelope.gif +0 -0
  298. data/public/javascripts/ckeditor/_source/plugins/smiley/images/heart.gif +0 -0
  299. data/public/javascripts/ckeditor/_source/plugins/smiley/images/kiss.gif +0 -0
  300. data/public/javascripts/ckeditor/_source/plugins/smiley/images/lightbulb.gif +0 -0
  301. data/public/javascripts/ckeditor/_source/plugins/smiley/images/omg_smile.gif +0 -0
  302. data/public/javascripts/ckeditor/_source/plugins/smiley/images/regular_smile.gif +0 -0
  303. data/public/javascripts/ckeditor/_source/plugins/smiley/images/sad_smile.gif +0 -0
  304. data/public/javascripts/ckeditor/_source/plugins/smiley/images/shades_smile.gif +0 -0
  305. data/public/javascripts/ckeditor/_source/plugins/smiley/images/teeth_smile.gif +0 -0
  306. data/public/javascripts/ckeditor/_source/plugins/smiley/images/thumbs_down.gif +0 -0
  307. data/public/javascripts/ckeditor/_source/plugins/smiley/images/thumbs_up.gif +0 -0
  308. data/public/javascripts/ckeditor/_source/plugins/smiley/images/tounge_smile.gif +0 -0
  309. data/public/javascripts/ckeditor/_source/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  310. data/public/javascripts/ckeditor/_source/plugins/smiley/images/wink_smile.gif +0 -0
  311. data/public/javascripts/ckeditor/_source/plugins/smiley/plugin.js +0 -94
  312. data/public/javascripts/ckeditor/_source/plugins/sourcearea/plugin.js +0 -207
  313. data/public/javascripts/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +0 -409
  314. data/public/javascripts/ckeditor/_source/plugins/specialchar/plugin.js +0 -29
  315. data/public/javascripts/ckeditor/_source/plugins/styles/plugin.js +0 -1479
  316. data/public/javascripts/ckeditor/_source/plugins/styles/styles/default.js +0 -88
  317. data/public/javascripts/ckeditor/_source/plugins/stylescombo/plugin.js +0 -206
  318. data/public/javascripts/ckeditor/_source/plugins/tab/plugin.js +0 -367
  319. data/public/javascripts/ckeditor/_source/plugins/table/dialogs/table.js +0 -672
  320. data/public/javascripts/ckeditor/_source/plugins/table/plugin.js +0 -78
  321. data/public/javascripts/ckeditor/_source/plugins/tableresize/plugin.js +0 -450
  322. data/public/javascripts/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +0 -533
  323. data/public/javascripts/ckeditor/_source/plugins/tabletools/plugin.js +0 -1120
  324. data/public/javascripts/ckeditor/_source/plugins/templates/dialogs/templates.js +0 -233
  325. data/public/javascripts/ckeditor/_source/plugins/templates/plugin.js +0 -99
  326. data/public/javascripts/ckeditor/_source/plugins/templates/templates/default.js +0 -94
  327. data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template1.gif +0 -0
  328. data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template2.gif +0 -0
  329. data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template3.gif +0 -0
  330. data/public/javascripts/ckeditor/_source/plugins/toolbar/plugin.js +0 -481
  331. data/public/javascripts/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +0 -205
  332. data/public/javascripts/ckeditor/_source/plugins/uicolor/lang/en.js +0 -15
  333. data/public/javascripts/ckeditor/_source/plugins/uicolor/lang/he.js +0 -15
  334. data/public/javascripts/ckeditor/_source/plugins/uicolor/plugin.js +0 -37
  335. data/public/javascripts/ckeditor/_source/plugins/uicolor/uicolor.gif +0 -0
  336. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  337. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  338. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  339. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  340. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +0 -15
  341. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/yui.js +0 -71
  342. data/public/javascripts/ckeditor/_source/plugins/undo/plugin.js +0 -554
  343. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/ciframe.html +0 -49
  344. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html +0 -52
  345. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/wsc.css +0 -82
  346. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/wsc.js +0 -176
  347. data/public/javascripts/ckeditor/_source/plugins/wsc/plugin.js +0 -33
  348. data/public/javascripts/ckeditor/_source/plugins/wysiwygarea/plugin.js +0 -1146
  349. data/public/javascripts/ckeditor/_source/skins/kama/dialog.css +0 -882
  350. data/public/javascripts/ckeditor/_source/skins/kama/editor.css +0 -25
  351. data/public/javascripts/ckeditor/_source/skins/kama/elementspath.css +0 -73
  352. data/public/javascripts/ckeditor/_source/skins/kama/icons.css +0 -357
  353. data/public/javascripts/ckeditor/_source/skins/kama/icons.png +0 -0
  354. data/public/javascripts/ckeditor/_source/skins/kama/icons_rtl.png +0 -0
  355. data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
  356. data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
  357. data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
  358. data/public/javascripts/ckeditor/_source/skins/kama/images/mini.gif +0 -0
  359. data/public/javascripts/ckeditor/_source/skins/kama/images/noimage.png +0 -0
  360. data/public/javascripts/ckeditor/_source/skins/kama/images/sprites.png +0 -0
  361. data/public/javascripts/ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
  362. data/public/javascripts/ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
  363. data/public/javascripts/ckeditor/_source/skins/kama/mainui.css +0 -195
  364. data/public/javascripts/ckeditor/_source/skins/kama/menu.css +0 -216
  365. data/public/javascripts/ckeditor/_source/skins/kama/panel.css +0 -217
  366. data/public/javascripts/ckeditor/_source/skins/kama/presets.css +0 -49
  367. data/public/javascripts/ckeditor/_source/skins/kama/reset.css +0 -84
  368. data/public/javascripts/ckeditor/_source/skins/kama/richcombo.css +0 -277
  369. data/public/javascripts/ckeditor/_source/skins/kama/skin.js +0 -268
  370. data/public/javascripts/ckeditor/_source/skins/kama/templates.css +0 -88
  371. data/public/javascripts/ckeditor/_source/skins/kama/toolbar.css +0 -409
  372. data/public/javascripts/ckeditor/_source/skins/office2003/dialog.css +0 -785
  373. data/public/javascripts/ckeditor/_source/skins/office2003/editor.css +0 -25
  374. data/public/javascripts/ckeditor/_source/skins/office2003/elementspath.css +0 -74
  375. data/public/javascripts/ckeditor/_source/skins/office2003/icons.css +0 -354
  376. data/public/javascripts/ckeditor/_source/skins/office2003/icons.png +0 -0
  377. data/public/javascripts/ckeditor/_source/skins/office2003/icons_rtl.png +0 -0
  378. data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides.gif +0 -0
  379. data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides.png +0 -0
  380. data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides_rtl.png +0 -0
  381. data/public/javascripts/ckeditor/_source/skins/office2003/images/mini.gif +0 -0
  382. data/public/javascripts/ckeditor/_source/skins/office2003/images/noimage.png +0 -0
  383. data/public/javascripts/ckeditor/_source/skins/office2003/images/sprites.png +0 -0
  384. data/public/javascripts/ckeditor/_source/skins/office2003/images/sprites_ie6.png +0 -0
  385. data/public/javascripts/ckeditor/_source/skins/office2003/mainui.css +0 -145
  386. data/public/javascripts/ckeditor/_source/skins/office2003/menu.css +0 -213
  387. data/public/javascripts/ckeditor/_source/skins/office2003/panel.css +0 -212
  388. data/public/javascripts/ckeditor/_source/skins/office2003/presets.css +0 -49
  389. data/public/javascripts/ckeditor/_source/skins/office2003/reset.css +0 -84
  390. data/public/javascripts/ckeditor/_source/skins/office2003/richcombo.css +0 -297
  391. data/public/javascripts/ckeditor/_source/skins/office2003/skin.js +0 -81
  392. data/public/javascripts/ckeditor/_source/skins/office2003/templates.css +0 -87
  393. data/public/javascripts/ckeditor/_source/skins/office2003/toolbar.css +0 -470
  394. data/public/javascripts/ckeditor/_source/skins/v2/dialog.css +0 -800
  395. data/public/javascripts/ckeditor/_source/skins/v2/editor.css +0 -25
  396. data/public/javascripts/ckeditor/_source/skins/v2/elementspath.css +0 -74
  397. data/public/javascripts/ckeditor/_source/skins/v2/icons.css +0 -354
  398. data/public/javascripts/ckeditor/_source/skins/v2/icons.png +0 -0
  399. data/public/javascripts/ckeditor/_source/skins/v2/icons_rtl.png +0 -0
  400. data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides.gif +0 -0
  401. data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides.png +0 -0
  402. data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides_rtl.png +0 -0
  403. data/public/javascripts/ckeditor/_source/skins/v2/images/mini.gif +0 -0
  404. data/public/javascripts/ckeditor/_source/skins/v2/images/noimage.png +0 -0
  405. data/public/javascripts/ckeditor/_source/skins/v2/images/sprites.png +0 -0
  406. data/public/javascripts/ckeditor/_source/skins/v2/images/sprites_ie6.png +0 -0
  407. data/public/javascripts/ckeditor/_source/skins/v2/images/toolbar_start.gif +0 -0
  408. data/public/javascripts/ckeditor/_source/skins/v2/mainui.css +0 -154
  409. data/public/javascripts/ckeditor/_source/skins/v2/menu.css +0 -215
  410. data/public/javascripts/ckeditor/_source/skins/v2/panel.css +0 -212
  411. data/public/javascripts/ckeditor/_source/skins/v2/presets.css +0 -50
  412. data/public/javascripts/ckeditor/_source/skins/v2/reset.css +0 -84
  413. data/public/javascripts/ckeditor/_source/skins/v2/richcombo.css +0 -297
  414. data/public/javascripts/ckeditor/_source/skins/v2/skin.js +0 -77
  415. data/public/javascripts/ckeditor/_source/skins/v2/templates.css +0 -87
  416. data/public/javascripts/ckeditor/_source/skins/v2/toolbar.css +0 -423
  417. data/public/javascripts/ckeditor/_source/themes/default/theme.js +0 -361
  418. data/public/javascripts/ckeditor/adapters/jquery.js +0 -6
  419. data/public/javascripts/ckeditor/ckeditor.js +0 -137
  420. data/public/javascripts/ckeditor/ckeditor.pack +0 -211
  421. data/public/javascripts/ckeditor/ckeditor_basic.js +0 -8
  422. data/public/javascripts/ckeditor/ckeditor_basic_source.js +0 -20
  423. data/public/javascripts/ckeditor/ckeditor_source.js +0 -25
  424. data/public/javascripts/ckeditor/config.js +0 -43
  425. data/public/javascripts/ckeditor/contents.css +0 -39
  426. data/public/javascripts/ckeditor/css/ckfinder.css +0 -299
  427. data/public/javascripts/ckeditor/css/fck_dialog.css +0 -119
  428. data/public/javascripts/ckeditor/css/fck_editor.css +0 -448
  429. data/public/javascripts/ckeditor/css/swfupload.css +0 -94
  430. data/public/javascripts/ckeditor/images/add.gif +0 -0
  431. data/public/javascripts/ckeditor/images/cancelbutton.gif +0 -0
  432. data/public/javascripts/ckeditor/images/ckfnothumb.gif +0 -0
  433. data/public/javascripts/ckeditor/images/doc.gif +0 -0
  434. data/public/javascripts/ckeditor/images/mp3.gif +0 -0
  435. data/public/javascripts/ckeditor/images/pdf.gif +0 -0
  436. data/public/javascripts/ckeditor/images/rar.gif +0 -0
  437. data/public/javascripts/ckeditor/images/refresh.gif +0 -0
  438. data/public/javascripts/ckeditor/images/select_files.png +0 -0
  439. data/public/javascripts/ckeditor/images/spacer.gif +0 -0
  440. data/public/javascripts/ckeditor/images/swf.gif +0 -0
  441. data/public/javascripts/ckeditor/images/toolbar.start.gif +0 -0
  442. data/public/javascripts/ckeditor/images/xls.gif +0 -0
  443. data/public/javascripts/ckeditor/lang/_languages.js +0 -6
  444. data/public/javascripts/ckeditor/lang/_translationstatus.txt +0 -60
  445. data/public/javascripts/ckeditor/lang/af.js +0 -6
  446. data/public/javascripts/ckeditor/lang/ar.js +0 -6
  447. data/public/javascripts/ckeditor/lang/bg.js +0 -6
  448. data/public/javascripts/ckeditor/lang/bn.js +0 -6
  449. data/public/javascripts/ckeditor/lang/bs.js +0 -6
  450. data/public/javascripts/ckeditor/lang/ca.js +0 -6
  451. data/public/javascripts/ckeditor/lang/cs.js +0 -6
  452. data/public/javascripts/ckeditor/lang/cy.js +0 -6
  453. data/public/javascripts/ckeditor/lang/da.js +0 -6
  454. data/public/javascripts/ckeditor/lang/de.js +0 -6
  455. data/public/javascripts/ckeditor/lang/el.js +0 -6
  456. data/public/javascripts/ckeditor/lang/en-au.js +0 -6
  457. data/public/javascripts/ckeditor/lang/en-ca.js +0 -6
  458. data/public/javascripts/ckeditor/lang/en-gb.js +0 -6
  459. data/public/javascripts/ckeditor/lang/en.js +0 -6
  460. data/public/javascripts/ckeditor/lang/eo.js +0 -6
  461. data/public/javascripts/ckeditor/lang/es.js +0 -6
  462. data/public/javascripts/ckeditor/lang/et.js +0 -6
  463. data/public/javascripts/ckeditor/lang/eu.js +0 -6
  464. data/public/javascripts/ckeditor/lang/fa.js +0 -6
  465. data/public/javascripts/ckeditor/lang/fi.js +0 -6
  466. data/public/javascripts/ckeditor/lang/fo.js +0 -6
  467. data/public/javascripts/ckeditor/lang/fr-ca.js +0 -6
  468. data/public/javascripts/ckeditor/lang/fr.js +0 -6
  469. data/public/javascripts/ckeditor/lang/gl.js +0 -6
  470. data/public/javascripts/ckeditor/lang/gu.js +0 -6
  471. data/public/javascripts/ckeditor/lang/he.js +0 -6
  472. data/public/javascripts/ckeditor/lang/hi.js +0 -6
  473. data/public/javascripts/ckeditor/lang/hr.js +0 -6
  474. data/public/javascripts/ckeditor/lang/hu.js +0 -6
  475. data/public/javascripts/ckeditor/lang/is.js +0 -6
  476. data/public/javascripts/ckeditor/lang/it.js +0 -6
  477. data/public/javascripts/ckeditor/lang/ja.js +0 -6
  478. data/public/javascripts/ckeditor/lang/km.js +0 -6
  479. data/public/javascripts/ckeditor/lang/ko.js +0 -6
  480. data/public/javascripts/ckeditor/lang/lt.js +0 -6
  481. data/public/javascripts/ckeditor/lang/lv.js +0 -6
  482. data/public/javascripts/ckeditor/lang/mn.js +0 -6
  483. data/public/javascripts/ckeditor/lang/ms.js +0 -6
  484. data/public/javascripts/ckeditor/lang/nb.js +0 -6
  485. data/public/javascripts/ckeditor/lang/nl.js +0 -6
  486. data/public/javascripts/ckeditor/lang/no.js +0 -6
  487. data/public/javascripts/ckeditor/lang/pl.js +0 -6
  488. data/public/javascripts/ckeditor/lang/pt-br.js +0 -6
  489. data/public/javascripts/ckeditor/lang/pt.js +0 -6
  490. data/public/javascripts/ckeditor/lang/ro.js +0 -6
  491. data/public/javascripts/ckeditor/lang/ru.js +0 -6
  492. data/public/javascripts/ckeditor/lang/sk.js +0 -6
  493. data/public/javascripts/ckeditor/lang/sl.js +0 -6
  494. data/public/javascripts/ckeditor/lang/sr-latn.js +0 -6
  495. data/public/javascripts/ckeditor/lang/sr.js +0 -6
  496. data/public/javascripts/ckeditor/lang/sv.js +0 -6
  497. data/public/javascripts/ckeditor/lang/th.js +0 -6
  498. data/public/javascripts/ckeditor/lang/tr.js +0 -6
  499. data/public/javascripts/ckeditor/lang/uk.js +0 -6
  500. data/public/javascripts/ckeditor/lang/vi.js +0 -6
  501. data/public/javascripts/ckeditor/lang/zh-cn.js +0 -6
  502. data/public/javascripts/ckeditor/lang/zh.js +0 -6
  503. data/public/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -7
  504. data/public/javascripts/ckeditor/plugins/a11yhelp/lang/en.js +0 -6
  505. data/public/javascripts/ckeditor/plugins/a11yhelp/lang/he.js +0 -6
  506. data/public/javascripts/ckeditor/plugins/about/dialogs/about.js +0 -6
  507. data/public/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  508. data/public/javascripts/ckeditor/plugins/ajax_save/plugin.js +0 -1
  509. data/public/javascripts/ckeditor/plugins/attachment/dialogs/attachment.js +0 -1
  510. data/public/javascripts/ckeditor/plugins/attachment/images/attachment.png +0 -0
  511. data/public/javascripts/ckeditor/plugins/attachment/lang/en.js +0 -10
  512. data/public/javascripts/ckeditor/plugins/attachment/lang/ru.js +0 -10
  513. data/public/javascripts/ckeditor/plugins/attachment/lang/uk.js +0 -10
  514. data/public/javascripts/ckeditor/plugins/attachment/plugin.js +0 -1
  515. data/public/javascripts/ckeditor/plugins/autogrow/plugin.js +0 -6
  516. data/public/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +0 -7
  517. data/public/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +0 -7
  518. data/public/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +0 -4
  519. data/public/javascripts/ckeditor/plugins/div/dialogs/div.js +0 -8
  520. data/public/javascripts/ckeditor/plugins/embed/dialogs/embed.js +0 -1
  521. data/public/javascripts/ckeditor/plugins/embed/images/embed.png +0 -0
  522. data/public/javascripts/ckeditor/plugins/embed/lang/en.js +0 -9
  523. data/public/javascripts/ckeditor/plugins/embed/lang/ru.js +0 -9
  524. data/public/javascripts/ckeditor/plugins/embed/lang/uk.js +0 -9
  525. data/public/javascripts/ckeditor/plugins/embed/plugin.js +0 -1
  526. data/public/javascripts/ckeditor/plugins/find/dialogs/find.js +0 -9
  527. data/public/javascripts/ckeditor/plugins/flash/dialogs/flash.js +0 -9
  528. data/public/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
  529. data/public/javascripts/ckeditor/plugins/forms/dialogs/button.js +0 -6
  530. data/public/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +0 -6
  531. data/public/javascripts/ckeditor/plugins/forms/dialogs/form.js +0 -6
  532. data/public/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +0 -6
  533. data/public/javascripts/ckeditor/plugins/forms/dialogs/radio.js +0 -6
  534. data/public/javascripts/ckeditor/plugins/forms/dialogs/select.js +0 -9
  535. data/public/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +0 -6
  536. data/public/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +0 -7
  537. data/public/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  538. data/public/javascripts/ckeditor/plugins/iframedialog/plugin.js +0 -6
  539. data/public/javascripts/ckeditor/plugins/image/dialogs/image.js +0 -13
  540. data/public/javascripts/ckeditor/plugins/link/dialogs/anchor.js +0 -6
  541. data/public/javascripts/ckeditor/plugins/link/dialogs/link.js +0 -11
  542. data/public/javascripts/ckeditor/plugins/link/images/anchor.gif +0 -0
  543. data/public/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +0 -6
  544. data/public/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  545. data/public/javascripts/ckeditor/plugins/pastefromword/filter/default.js +0 -10
  546. data/public/javascripts/ckeditor/plugins/pastetext/dialogs/pastetext.js +0 -6
  547. data/public/javascripts/ckeditor/plugins/scayt/dialogs/options.js +0 -8
  548. data/public/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -6
  549. data/public/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  550. data/public/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  551. data/public/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  552. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  553. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  554. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  555. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  556. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  557. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  558. data/public/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  559. data/public/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  560. data/public/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +0 -7
  561. data/public/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  562. data/public/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  563. data/public/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  564. data/public/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  565. data/public/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  566. data/public/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  567. data/public/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  568. data/public/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  569. data/public/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
  570. data/public/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  571. data/public/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  572. data/public/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  573. data/public/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  574. data/public/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  575. data/public/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  576. data/public/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  577. data/public/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  578. data/public/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  579. data/public/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  580. data/public/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  581. data/public/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  582. data/public/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +0 -7
  583. data/public/javascripts/ckeditor/plugins/styles/styles/default.js +0 -6
  584. data/public/javascripts/ckeditor/plugins/table/dialogs/table.js +0 -9
  585. data/public/javascripts/ckeditor/plugins/tableresize/plugin.js +0 -7
  586. data/public/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +0 -8
  587. data/public/javascripts/ckeditor/plugins/templates/dialogs/templates.js +0 -7
  588. data/public/javascripts/ckeditor/plugins/templates/templates/default.js +0 -6
  589. data/public/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  590. data/public/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  591. data/public/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  592. data/public/javascripts/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -7
  593. data/public/javascripts/ckeditor/plugins/uicolor/lang/en.js +0 -6
  594. data/public/javascripts/ckeditor/plugins/uicolor/lang/he.js +0 -6
  595. data/public/javascripts/ckeditor/plugins/uicolor/plugin.js +0 -6
  596. data/public/javascripts/ckeditor/plugins/uicolor/uicolor.gif +0 -0
  597. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  598. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  599. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  600. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  601. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -6
  602. data/public/javascripts/ckeditor/plugins/uicolor/yui/yui.js +0 -76
  603. data/public/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -49
  604. data/public/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -52
  605. data/public/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -6
  606. data/public/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +0 -7
  607. data/public/javascripts/ckeditor/skins/kama/dialog.css +0 -9
  608. data/public/javascripts/ckeditor/skins/kama/editor.css +0 -12
  609. data/public/javascripts/ckeditor/skins/kama/icons.png +0 -0
  610. data/public/javascripts/ckeditor/skins/kama/icons_rtl.png +0 -0
  611. data/public/javascripts/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
  612. data/public/javascripts/ckeditor/skins/kama/images/dialog_sides.png +0 -0
  613. data/public/javascripts/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
  614. data/public/javascripts/ckeditor/skins/kama/images/mini.gif +0 -0
  615. data/public/javascripts/ckeditor/skins/kama/images/noimage.png +0 -0
  616. data/public/javascripts/ckeditor/skins/kama/images/sprites.png +0 -0
  617. data/public/javascripts/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
  618. data/public/javascripts/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
  619. data/public/javascripts/ckeditor/skins/kama/skin.js +0 -7
  620. data/public/javascripts/ckeditor/skins/kama/templates.css +0 -6
  621. data/public/javascripts/ckeditor/skins/office2003/dialog.css +0 -9
  622. data/public/javascripts/ckeditor/skins/office2003/editor.css +0 -13
  623. data/public/javascripts/ckeditor/skins/office2003/icons.png +0 -0
  624. data/public/javascripts/ckeditor/skins/office2003/icons_rtl.png +0 -0
  625. data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
  626. data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
  627. data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
  628. data/public/javascripts/ckeditor/skins/office2003/images/mini.gif +0 -0
  629. data/public/javascripts/ckeditor/skins/office2003/images/noimage.png +0 -0
  630. data/public/javascripts/ckeditor/skins/office2003/images/sprites.png +0 -0
  631. data/public/javascripts/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
  632. data/public/javascripts/ckeditor/skins/office2003/skin.js +0 -6
  633. data/public/javascripts/ckeditor/skins/office2003/templates.css +0 -6
  634. data/public/javascripts/ckeditor/skins/v2/dialog.css +0 -9
  635. data/public/javascripts/ckeditor/skins/v2/editor.css +0 -12
  636. data/public/javascripts/ckeditor/skins/v2/icons.png +0 -0
  637. data/public/javascripts/ckeditor/skins/v2/icons_rtl.png +0 -0
  638. data/public/javascripts/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
  639. data/public/javascripts/ckeditor/skins/v2/images/dialog_sides.png +0 -0
  640. data/public/javascripts/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
  641. data/public/javascripts/ckeditor/skins/v2/images/mini.gif +0 -0
  642. data/public/javascripts/ckeditor/skins/v2/images/noimage.png +0 -0
  643. data/public/javascripts/ckeditor/skins/v2/images/sprites.png +0 -0
  644. data/public/javascripts/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
  645. data/public/javascripts/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
  646. data/public/javascripts/ckeditor/skins/v2/skin.js +0 -6
  647. data/public/javascripts/ckeditor/skins/v2/templates.css +0 -6
  648. data/public/javascripts/ckeditor/swfupload/fileprogress.js +0 -275
  649. data/public/javascripts/ckeditor/swfupload/handlers.js +0 -170
  650. data/public/javascripts/ckeditor/swfupload/mootools-1.2.3-core-yc.js +0 -356
  651. data/public/javascripts/ckeditor/swfupload/querystring.js +0 -40
  652. data/public/javascripts/ckeditor/swfupload/swfupload.js +0 -1
  653. data/public/javascripts/ckeditor/swfupload/swfupload.queue.js +0 -1
  654. data/public/javascripts/ckeditor/swfupload/swfupload.swf +0 -0
  655. data/public/javascripts/ckeditor/swfupload/swfupload.swfobject.js +0 -111
  656. data/public/javascripts/ckeditor/themes/default/theme.js +0 -8
  657. data/public/javascripts/controls.js +0 -965
  658. data/public/javascripts/dragdrop.js +0 -974
  659. data/public/javascripts/effects.js +0 -1123
  660. data/public/javascripts/link_obfuscator.js +0 -31
  661. data/public/javascripts/prototype.js +0 -6001
  662. data/public/javascripts/rails.js +0 -175
  663. data/public/robots.txt +0 -5
  664. data/public/stylesheets/core_ie.css +0 -52
  665. data/public/stylesheets/csshover3.htc +0 -14
@@ -1,40 +0,0 @@
1
- /* Client-side access to querystring name=value pairs
2
- Version 1.3
3
- 28 May 2008
4
-
5
- License (Simplified BSD):
6
- http://adamv.com/dev/javascript/qslicense.txt
7
- */
8
- function Querystring(qs) { // optionally pass a querystring to parse
9
- this.params = {};
10
-
11
- if (qs == null) qs = location.search.substring(1, location.search.length);
12
- if (qs.length == 0) return;
13
-
14
- // Turn <plus> back to <space>
15
- // See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1
16
- qs = qs.replace(/\+/g, ' ');
17
- var args = qs.split('&'); // parse out name/value pairs separated via &
18
-
19
- // split out each name=value pair
20
- for (var i = 0; i < args.length; i++) {
21
- var pair = args[i].split('=');
22
- var name = decodeURIComponent(pair[0]);
23
-
24
- var value = (pair.length==2)
25
- ? decodeURIComponent(pair[1])
26
- : name;
27
-
28
- this.params[name] = value;
29
- }
30
- }
31
-
32
- Querystring.prototype.get = function(key, default_) {
33
- var value = this.params[key];
34
- return (value != null) ? value : default_;
35
- }
36
-
37
- Querystring.prototype.contains = function(key) {
38
- var value = this.params[key];
39
- return (value != null);
40
- }
@@ -1 +0,0 @@
1
- var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(settings){this.initSWFUpload(settings)}}SWFUpload.prototype.initSWFUpload=function(settings){try{this.customSettings={};this.settings=settings;this.eventQueue=[];this.movieName="SWFUpload_"+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(ex){delete SWFUpload.instances[this.movieName];throw ex;}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version="2.2.0 2009-03-25";SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:"window",TRANSPARENT:"transparent",OPAQUE:"opaque"};SWFUpload.completeURL=function(url){if(typeof(url)!=="string"||url.match(/^https?:\/\//i)||url.match(/^\//)){return url}var currentURL=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"");var indexSlash=window.location.pathname.lastIndexOf("/");if(indexSlash<=0){path="/"}else{path=window.location.pathname.substr(0,indexSlash)+"/"}return path+url};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(settingName,defaultValue){this.settings[settingName]=(this.settings[settingName]==undefined)?defaultValue:this.settings[settingName]};this.ensureDefault("upload_url","");this.ensureDefault("preserve_relative_urls",false);this.ensureDefault("file_post_name","Filedata");this.ensureDefault("post_params",{});this.ensureDefault("use_query_string",false);this.ensureDefault("requeue_on_error",false);this.ensureDefault("http_success",[]);this.ensureDefault("assume_success_timeout",0);this.ensureDefault("file_types","*.*");this.ensureDefault("file_types_description","All Files");this.ensureDefault("file_size_limit",0);this.ensureDefault("file_upload_limit",0);this.ensureDefault("file_queue_limit",0);this.ensureDefault("flash_url","swfupload.swf");this.ensureDefault("prevent_swf_caching",true);this.ensureDefault("button_image_url","");this.ensureDefault("button_width",1);this.ensureDefault("button_height",1);this.ensureDefault("button_text","");this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;");this.ensureDefault("button_text_top_padding",0);this.ensureDefault("button_text_left_padding",0);this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault("button_disabled",false);this.ensureDefault("button_placeholder_id","");this.ensureDefault("button_placeholder",null);this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW);this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault("debug",false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault("swfupload_loaded_handler",null);this.ensureDefault("file_dialog_start_handler",null);this.ensureDefault("file_queued_handler",null);this.ensureDefault("file_queue_error_handler",null);this.ensureDefault("file_dialog_complete_handler",null);this.ensureDefault("upload_start_handler",null);this.ensureDefault("upload_progress_handler",null);this.ensureDefault("upload_error_handler",null);this.ensureDefault("upload_success_handler",null);this.ensureDefault("upload_complete_handler",null);this.ensureDefault("debug_handler",this.debugMessage);this.ensureDefault("custom_settings",{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var targetElement,tempParent;if(document.getElementById(this.movieName)!==null){throw"ID "+this.movieName+" is already in use. The Flash Object could not be added";}targetElement=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(targetElement==undefined){throw"Could not find the placeholder element: "+this.settings.button_placeholder_id;}tempParent=document.createElement("div");tempParent.innerHTML=this.getFlashHTML();targetElement.parentNode.replaceChild(tempParent.firstChild,targetElement);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.settings.flash_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.settings.flash_url,'" />','<param name="quality" value="high" />','<param name="menu" value="false" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />','</object>'].join("")};SWFUpload.prototype.getFlashVars=function(){var paramString=this.buildParamString();var httpSuccessString=this.settings.http_success.join(",");return["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(httpSuccessString),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(paramString),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw"Could not find Flash element";}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var postParams=this.settings.post_params;var paramStringPairs=[];if(typeof(postParams)==="object"){for(var name in postParams){if(postParams.hasOwnProperty(name)){paramStringPairs.push(encodeURIComponent(name.toString())+"="+encodeURIComponent(postParams[name].toString()))}}}return paramStringPairs.join("&amp;")};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var movieElement=null;movieElement=this.getMovieElement();if(movieElement&&typeof(movieElement.CallFunction)==="unknown"){for(var i in movieElement){try{if(typeof(movieElement[i])==="function"){movieElement[i]=null}}catch(ex1){}}try{movieElement.parentNode.removeChild(movieElement)}catch(ex){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(ex2){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","\t","upload_url: ",this.settings.upload_url,"\n","\t","flash_url: ",this.settings.flash_url,"\n","\t","use_query_string: ",this.settings.use_query_string.toString(),"\n","\t","requeue_on_error: ",this.settings.requeue_on_error.toString(),"\n","\t","http_success: ",this.settings.http_success.join(", "),"\n","\t","assume_success_timeout: ",this.settings.assume_success_timeout,"\n","\t","file_post_name: ",this.settings.file_post_name,"\n","\t","post_params: ",this.settings.post_params.toString(),"\n","\t","file_types: ",this.settings.file_types,"\n","\t","file_types_description: ",this.settings.file_types_description,"\n","\t","file_size_limit: ",this.settings.file_size_limit,"\n","\t","file_upload_limit: ",this.settings.file_upload_limit,"\n","\t","file_queue_limit: ",this.settings.file_queue_limit,"\n","\t","debug: ",this.settings.debug.toString(),"\n","\t","prevent_swf_caching: ",this.settings.prevent_swf_caching.toString(),"\n","\t","button_placeholder_id: ",this.settings.button_placeholder_id.toString(),"\n","\t","button_placeholder: ",(this.settings.button_placeholder?"Set":"Not Set"),"\n","\t","button_image_url: ",this.settings.button_image_url.toString(),"\n","\t","button_width: ",this.settings.button_width.toString(),"\n","\t","button_height: ",this.settings.button_height.toString(),"\n","\t","button_text: ",this.settings.button_text.toString(),"\n","\t","button_text_style: ",this.settings.button_text_style.toString(),"\n","\t","button_text_top_padding: ",this.settings.button_text_top_padding.toString(),"\n","\t","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","\t","button_action: ",this.settings.button_action.toString(),"\n","\t","button_disabled: ",this.settings.button_disabled.toString(),"\n","\t","custom_settings: ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","\t","swfupload_loaded_handler assigned: ",(typeof this.settings.swfupload_loaded_handler==="function").toString(),"\n","\t","file_dialog_start_handler assigned: ",(typeof this.settings.file_dialog_start_handler==="function").toString(),"\n","\t","file_queued_handler assigned: ",(typeof this.settings.file_queued_handler==="function").toString(),"\n","\t","file_queue_error_handler assigned: ",(typeof this.settings.file_queue_error_handler==="function").toString(),"\n","\t","upload_start_handler assigned: ",(typeof this.settings.upload_start_handler==="function").toString(),"\n","\t","upload_progress_handler assigned: ",(typeof this.settings.upload_progress_handler==="function").toString(),"\n","\t","upload_error_handler assigned: ",(typeof this.settings.upload_error_handler==="function").toString(),"\n","\t","upload_success_handler assigned: ",(typeof this.settings.upload_success_handler==="function").toString(),"\n","\t","upload_complete_handler assigned: ",(typeof this.settings.upload_complete_handler==="function").toString(),"\n","\t","debug_handler assigned: ",(typeof this.settings.debug_handler==="function").toString(),"\n"].join(""))};SWFUpload.prototype.addSetting=function(name,value,default_value){if(value==undefined){return(this.settings[name]=default_value)}else{return(this.settings[name]=value)}};SWFUpload.prototype.getSetting=function(name){if(this.settings[name]!=undefined){return this.settings[name]}return""};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+'</invoke>');returnValue=eval(returnString)}catch(ex){throw"Call to "+functionName+" failed";}if(returnValue!=undefined&&typeof returnValue.post==="object"){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")};SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")};SWFUpload.prototype.startUpload=function(fileID){this.callFlash("StartUpload",[fileID])};SWFUpload.prototype.cancelUpload=function(fileID,triggerErrorEvent){if(triggerErrorEvent!==false){triggerErrorEvent=true}this.callFlash("CancelUpload",[fileID,triggerErrorEvent])};SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")};SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")};SWFUpload.prototype.setStats=function(statsObject){this.callFlash("SetStats",[statsObject])};SWFUpload.prototype.getFile=function(fileID){if(typeof(fileID)==="number"){return this.callFlash("GetFileByIndex",[fileID])}else{return this.callFlash("GetFile",[fileID])}};SWFUpload.prototype.addFileParam=function(fileID,name,value){return this.callFlash("AddFileParam",[fileID,name,value])};SWFUpload.prototype.removeFileParam=function(fileID,name){this.callFlash("RemoveFileParam",[fileID,name])};SWFUpload.prototype.setUploadURL=function(url){this.settings.upload_url=url.toString();this.callFlash("SetUploadURL",[url])};SWFUpload.prototype.setPostParams=function(paramsObject){this.settings.post_params=paramsObject;this.callFlash("SetPostParams",[paramsObject])};SWFUpload.prototype.addPostParam=function(name,value){this.settings.post_params[name]=value;this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(name){delete this.settings.post_params[name];this.callFlash("SetPostParams",[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(types,description){this.settings.file_types=types;this.settings.file_types_description=description;this.callFlash("SetFileTypes",[types,description])};SWFUpload.prototype.setFileSizeLimit=function(fileSizeLimit){this.settings.file_size_limit=fileSizeLimit;this.callFlash("SetFileSizeLimit",[fileSizeLimit])};SWFUpload.prototype.setFileUploadLimit=function(fileUploadLimit){this.settings.file_upload_limit=fileUploadLimit;this.callFlash("SetFileUploadLimit",[fileUploadLimit])};SWFUpload.prototype.setFileQueueLimit=function(fileQueueLimit){this.settings.file_queue_limit=fileQueueLimit;this.callFlash("SetFileQueueLimit",[fileQueueLimit])};SWFUpload.prototype.setFilePostName=function(filePostName){this.settings.file_post_name=filePostName;this.callFlash("SetFilePostName",[filePostName])};SWFUpload.prototype.setUseQueryString=function(useQueryString){this.settings.use_query_string=useQueryString;this.callFlash("SetUseQueryString",[useQueryString])};SWFUpload.prototype.setRequeueOnError=function(requeueOnError){this.settings.requeue_on_error=requeueOnError;this.callFlash("SetRequeueOnError",[requeueOnError])};SWFUpload.prototype.setHTTPSuccess=function(http_status_codes){if(typeof http_status_codes==="string"){http_status_codes=http_status_codes.replace(" ","").split(",")}this.settings.http_success=http_status_codes;this.callFlash("SetHTTPSuccess",[http_status_codes])};SWFUpload.prototype.setAssumeSuccessTimeout=function(timeout_seconds){this.settings.assume_success_timeout=timeout_seconds;this.callFlash("SetAssumeSuccessTimeout",[timeout_seconds])};SWFUpload.prototype.setDebugEnabled=function(debugEnabled){this.settings.debug_enabled=debugEnabled;this.callFlash("SetDebugEnabled",[debugEnabled])};SWFUpload.prototype.setButtonImageURL=function(buttonImageURL){if(buttonImageURL==undefined){buttonImageURL=""}this.settings.button_image_url=buttonImageURL;this.callFlash("SetButtonImageURL",[buttonImageURL])};SWFUpload.prototype.setButtonDimensions=function(width,height){this.settings.button_width=width;this.settings.button_height=height;var movie=this.getMovieElement();if(movie!=undefined){movie.style.width=width+"px";movie.style.height=height+"px"}this.callFlash("SetButtonDimensions",[width,height])};SWFUpload.prototype.setButtonText=function(html){this.settings.button_text=html;this.callFlash("SetButtonText",[html])};SWFUpload.prototype.setButtonTextPadding=function(left,top){this.settings.button_text_top_padding=top;this.settings.button_text_left_padding=left;this.callFlash("SetButtonTextPadding",[left,top])};SWFUpload.prototype.setButtonTextStyle=function(css){this.settings.button_text_style=css;this.callFlash("SetButtonTextStyle",[css])};SWFUpload.prototype.setButtonDisabled=function(isDisabled){this.settings.button_disabled=isDisabled;this.callFlash("SetButtonDisabled",[isDisabled])};SWFUpload.prototype.setButtonAction=function(buttonAction){this.settings.button_action=buttonAction;this.callFlash("SetButtonAction",[buttonAction])};SWFUpload.prototype.setButtonCursor=function(cursor){this.settings.button_cursor=cursor;this.callFlash("SetButtonCursor",[cursor])};SWFUpload.prototype.queueEvent=function(handlerName,argumentArray){if(argumentArray==undefined){argumentArray=[]}else if(!(argumentArray instanceof Array)){argumentArray=[argumentArray]}var self=this;if(typeof this.settings[handlerName]==="function"){this.eventQueue.push(function(){this.settings[handlerName].apply(this,argumentArray)});setTimeout(function(){self.executeNextEvent()},0)}else if(this.settings[handlerName]!==null){throw"Event handler "+handlerName+" is unknown or is not a function";}};SWFUpload.prototype.executeNextEvent=function(){var f=this.eventQueue?this.eventQueue.shift():null;if(typeof(f)==="function"){f.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(file){var reg=/[$]([0-9a-f]{4})/i;var unescapedPost={};var uk;if(file!=undefined){for(var k in file.post){if(file.post.hasOwnProperty(k)){uk=k;var match;while((match=reg.exec(uk))!==null){uk=uk.replace(match[0],String.fromCharCode(parseInt("0x"+match[1],16)))}unescapedPost[uk]=file.post[k]}}file.post=unescapedPost}return file};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash("TestExternalInterface")}catch(ex){return false}};SWFUpload.prototype.flashReady=function(){var movieElement=this.getMovieElement();if(!movieElement){this.debug("Flash called back ready but the flash movie can't be found.");return}this.cleanUp(movieElement);this.queueEvent("swfupload_loaded_handler")};SWFUpload.prototype.cleanUp=function(movieElement){try{if(this.movieElement&&typeof(movieElement.CallFunction)==="unknown"){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(var key in movieElement){try{if(typeof(movieElement[key])==="function"){movieElement[key]=null}}catch(ex){}}}}catch(ex1){}window["__flash__removeCallback"]=function(instance,name){try{if(instance){instance[name]=null}}catch(flashEx){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")};SWFUpload.prototype.fileQueued=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("file_queued_handler",file)};SWFUpload.prototype.fileQueueError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("file_queue_error_handler",[file,errorCode,message])};SWFUpload.prototype.fileDialogComplete=function(numFilesSelected,numFilesQueued,numFilesInQueue){this.queueEvent("file_dialog_complete_handler",[numFilesSelected,numFilesQueued,numFilesInQueue])};SWFUpload.prototype.uploadStart=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("return_upload_start_handler",file)};SWFUpload.prototype.returnUploadStart=function(file){var returnValue;if(typeof this.settings.upload_start_handler==="function"){file=this.unescapeFilePostParams(file);returnValue=this.settings.upload_start_handler.call(this,file)}else if(this.settings.upload_start_handler!=undefined){throw"upload_start_handler must be a function";}if(returnValue===undefined){returnValue=true}returnValue=!!returnValue;this.callFlash("ReturnUploadStart",[returnValue])};SWFUpload.prototype.uploadProgress=function(file,bytesComplete,bytesTotal){file=this.unescapeFilePostParams(file);this.queueEvent("upload_progress_handler",[file,bytesComplete,bytesTotal])};SWFUpload.prototype.uploadError=function(file,errorCode,message){file=this.unescapeFilePostParams(file);this.queueEvent("upload_error_handler",[file,errorCode,message])};SWFUpload.prototype.uploadSuccess=function(file,serverData,responseReceived){file=this.unescapeFilePostParams(file);this.queueEvent("upload_success_handler",[file,serverData,responseReceived])};SWFUpload.prototype.uploadComplete=function(file){file=this.unescapeFilePostParams(file);this.queueEvent("upload_complete_handler",file)};SWFUpload.prototype.debug=function(message){this.queueEvent("debug_handler",message)};SWFUpload.prototype.debugMessage=function(message){if(this.settings.debug){var exceptionMessage,exceptionValues=[];if(typeof message==="object"&&typeof message.name==="string"&&typeof message.message==="string"){for(var key in message){if(message.hasOwnProperty(key)){exceptionValues.push(key+": "+message[key])}}exceptionMessage=exceptionValues.join("\n")||"";exceptionValues=exceptionMessage.split("\n");exceptionMessage="EXCEPTION: "+exceptionValues.join("\nEXCEPTION: ");SWFUpload.Console.writeLine(exceptionMessage)}else{SWFUpload.Console.writeLine(message)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(message){var console,documentForm;try{console=document.getElementById("SWFUpload_Console");if(!console){documentForm=document.createElement("form");document.getElementsByTagName("body")[0].appendChild(documentForm);console=document.createElement("textarea");console.id="SWFUpload_Console";console.style.fontFamily="monospace";console.setAttribute("wrap","off");console.wrap="off";console.style.overflow="auto";console.style.width="700px";console.style.height="350px";console.style.margin="5px";documentForm.appendChild(console)}console.value+=message+"\n";console.scrollTop=console.scrollHeight-console.clientHeight}catch(ex){alert("Exception: "+ex.name+" Message: "+ex.message)}};
@@ -1 +0,0 @@
1
- var SWFUpload;if(typeof(SWFUpload)==="function"){SWFUpload.queue={};SWFUpload.prototype.initSettings=(function(oldInitSettings){return function(){if(typeof(oldInitSettings)==="function"){oldInitSettings.call(this)}this.queueSettings={};this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0;this.queueSettings.user_upload_complete_handler=this.settings.upload_complete_handler;this.queueSettings.user_upload_start_handler=this.settings.upload_start_handler;this.settings.upload_complete_handler=SWFUpload.queue.uploadCompleteHandler;this.settings.upload_start_handler=SWFUpload.queue.uploadStartHandler;this.settings.queue_complete_handler=this.settings.queue_complete_handler||null}})(SWFUpload.prototype.initSettings);SWFUpload.prototype.startUpload=function(fileID){this.queueSettings.queue_cancelled_flag=false;this.callFlash("StartUpload",[fileID])};SWFUpload.prototype.cancelQueue=function(){this.queueSettings.queue_cancelled_flag=true;this.stopUpload();var stats=this.getStats();while(stats.files_queued>0){this.cancelUpload();stats=this.getStats()}};SWFUpload.queue.uploadStartHandler=function(file){var returnValue;if(typeof(this.queueSettings.user_upload_start_handler)==="function"){returnValue=this.queueSettings.user_upload_start_handler.call(this,file)}returnValue=(returnValue===false)?false:true;this.queueSettings.queue_cancelled_flag=!returnValue;return returnValue};SWFUpload.queue.uploadCompleteHandler=function(file){var user_upload_complete_handler=this.queueSettings.user_upload_complete_handler;var continueUpload;if(file.filestatus===SWFUpload.FILE_STATUS.COMPLETE){this.queueSettings.queue_upload_count++}if(typeof(user_upload_complete_handler)==="function"){continueUpload=(user_upload_complete_handler.call(this,file)===false)?false:true}else if(file.filestatus===SWFUpload.FILE_STATUS.QUEUED){continueUpload=false}else{continueUpload=true}if(continueUpload){var stats=this.getStats();if(stats.files_queued>0&&this.queueSettings.queue_cancelled_flag===false){this.startUpload()}else if(this.queueSettings.queue_cancelled_flag===false){this.queueEvent("queue_complete_handler",[this.queueSettings.queue_upload_count]);this.queueSettings.queue_upload_count=0}else{this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0}}}}
@@ -1,111 +0,0 @@
1
- /*
2
- SWFUpload.SWFObject Plugin
3
-
4
- Summary:
5
- This plugin uses SWFObject to embed SWFUpload dynamically in the page. SWFObject provides accurate Flash Player detection and DOM Ready loading.
6
- This plugin replaces the Graceful Degradation plugin.
7
-
8
- Features:
9
- * swfupload_load_failed_hander event
10
- * swfupload_pre_load_handler event
11
- * minimum_flash_version setting (default: "9.0.28")
12
- * SWFUpload.onload event for early loading
13
-
14
- Usage:
15
- Provide handlers and settings as needed. When using the SWFUpload.SWFObject plugin you should initialize SWFUploading
16
- in SWFUpload.onload rather than in window.onload. When initialized this way SWFUpload can load earlier preventing the UI flicker
17
- that was seen using the Graceful Degradation plugin.
18
-
19
- <script type="text/javascript">
20
- var swfu;
21
- SWFUpload.onload = function () {
22
- swfu = new SWFUpload({
23
- minimum_flash_version: "9.0.28",
24
- swfupload_pre_load_handler: swfuploadPreLoad,
25
- swfupload_load_failed_handler: swfuploadLoadFailed
26
- });
27
- };
28
- </script>
29
-
30
- Notes:
31
- You must provide set minimum_flash_version setting to "8" if you are using SWFUpload for Flash Player 8.
32
- The swfuploadLoadFailed event is only fired if the minimum version of Flash Player is not met. Other issues such as missing SWF files, browser bugs
33
- or corrupt Flash Player installations will not trigger this event.
34
- The swfuploadPreLoad event is fired as soon as the minimum version of Flash Player is found. It does not wait for SWFUpload to load and can
35
- be used to prepare the SWFUploadUI and hide alternate content.
36
- swfobject's onDomReady event is cross-browser safe but will default to the window.onload event when DOMReady is not supported by the browser.
37
- Early DOM Loading is supported in major modern browsers but cannot be guaranteed for every browser ever made.
38
- */
39
-
40
-
41
- /* SWFObject v2.1 <http://code.google.com/p/swfobject/>
42
- Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
43
- This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
44
- */
45
- var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
46
-
47
-
48
-
49
- var SWFUpload;
50
- if (typeof(SWFUpload) === "function") {
51
- SWFUpload.onload = function () {};
52
-
53
- swfobject.addDomLoadEvent(function () {
54
- if (typeof(SWFUpload.onload) === "function") {
55
- SWFUpload.onload.call(window);
56
- }
57
- });
58
-
59
- SWFUpload.prototype.initSettings = (function (oldInitSettings) {
60
- return function () {
61
- if (typeof(oldInitSettings) === "function") {
62
- oldInitSettings.call(this);
63
- }
64
-
65
- this.ensureDefault = function (settingName, defaultValue) {
66
- this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName];
67
- };
68
-
69
- this.ensureDefault("minimum_flash_version", "9.0.28");
70
- this.ensureDefault("swfupload_pre_load_handler", null);
71
- this.ensureDefault("swfupload_load_failed_handler", null);
72
-
73
- delete this.ensureDefault;
74
-
75
- };
76
- })(SWFUpload.prototype.initSettings);
77
-
78
-
79
- SWFUpload.prototype.loadFlash = function (oldLoadFlash) {
80
- return function () {
81
- var hasFlash = swfobject.hasFlashPlayerVersion(this.settings.minimum_flash_version);
82
-
83
- if (hasFlash) {
84
- this.queueEvent("swfupload_pre_load_handler");
85
- if (typeof(oldLoadFlash) === "function") {
86
- oldLoadFlash.call(this);
87
- }
88
- } else {
89
- this.queueEvent("swfupload_load_failed_handler");
90
- }
91
- };
92
-
93
- }(SWFUpload.prototype.loadFlash);
94
-
95
- SWFUpload.prototype.displayDebugInfo = function (oldDisplayDebugInfo) {
96
- return function () {
97
- if (typeof(oldDisplayDebugInfo) === "function") {
98
- oldDisplayDebugInfo.call(this);
99
- }
100
-
101
- this.debug(
102
- [
103
- "SWFUpload.SWFObject Plugin settings:", "\n",
104
- "\t", "minimum_flash_version: ", this.settings.minimum_flash_version, "\n",
105
- "\t", "swfupload_pre_load_handler assigned: ", (typeof(this.settings.swfupload_pre_load_handler) === "function").toString(), "\n",
106
- "\t", "swfupload_load_failed_handler assigned: ", (typeof(this.settings.swfupload_load_failed_handler) === "function").toString(), "\n",
107
- ].join("")
108
- );
109
- };
110
- }(SWFUpload.prototype.displayDebugInfo);
111
- }
@@ -1,8 +0,0 @@
1
- /*
2
- Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
3
- For licensing, see LICENSE.html or http://ckeditor.com/license
4
- */
5
-
6
- CKEDITOR.themes.add('default',(function(){function a(b,c){var d,e;e=b.config.sharedSpaces;e=e&&e[c];e=e&&CKEDITOR.document.getById(e);if(e){var f='<span class="cke_shared"><span class="'+b.skinClass+' '+b.id+' cke_editor_'+b.name+'">'+'<span class="'+CKEDITOR.env.cssClass+'">'+'<span class="cke_wrapper cke_'+b.lang.dir+'">'+'<span class="cke_editor">'+'<div class="cke_'+c+'">'+'</div></span></span></span></span></span>',g=e.append(CKEDITOR.dom.element.createFromHtml(f,e.getDocument()));if(e.getCustomData('cke_hasshared'))g.hide();else e.setCustomData('cke_hasshared',1);d=g.getChild([0,0,0,0]);b.on('focus',function(){for(var h=0,i,j=e.getChildren();i=j.getItem(h);h++){if(i.type==CKEDITOR.NODE_ELEMENT&&!i.equals(g)&&i.hasClass('cke_shared'))i.hide();}g.show();});b.on('destroy',function(){g.remove();});}return d;};return{build:function(b,c){var d=b.name,e=b.element,f=b.elementMode;if(!e||f==CKEDITOR.ELEMENT_MODE_NONE)return;if(f==CKEDITOR.ELEMENT_MODE_REPLACE)e.hide();var g=b.fire('themeSpace',{space:'top',html:''}).html,h=b.fire('themeSpace',{space:'contents',html:''}).html,i=b.fireOnce('themeSpace',{space:'bottom',html:''}).html,j=h&&b.config.height,k=b.config.tabIndex||b.element.getAttribute('tabindex')||0;if(!h)j='auto';else if(!isNaN(j))j+='px';var l='',m=b.config.width;if(m){if(!isNaN(m))m+='px';l+='width: '+m+';';}var n=g&&a(b,'top'),o=a(b,'bottom');n&&(n.setHtml(g),g='');o&&(o.setHtml(i),i='');var p=CKEDITOR.dom.element.createFromHtml(['<span id="cke_',d,'" onmousedown="return false;" class="',b.skinClass,' ',b.id,' cke_editor_',d,'" dir="',b.lang.dir,'" title="',CKEDITOR.env.gecko?' ':'','" lang="',b.langCode,'"'+(CKEDITOR.env.webkit?' tabindex="'+k+'"':'')+' role="application"'+' aria-labelledby="cke_',d,'_arialbl"'+(l?' style="'+l+'"':'')+'>'+'<span id="cke_',d,'_arialbl" class="cke_voice_label">'+b.lang.editor+'</span>'+'<span class="',CKEDITOR.env.cssClass,'" role="presentation"><span class="cke_wrapper cke_',b.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',g?'':' style="display:none"',' role="presentation"><td id="cke_top_',d,'" class="cke_top" role="presentation">',g,'</td></tr><tr',h?'':' style="display:none"',' role="presentation"><td id="cke_contents_',d,'" class="cke_contents" style="height:',j,'" role="presentation">',h,'</td></tr><tr',i?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',d,'" class="cke_bottom" role="presentation">',i,'</td></tr></tbody></table><style>.',b.skinClass,'{visibility:hidden;}</style></span></span></span>'].join(''));
7
- p.getChild([1,0,0,0,0]).unselectable();p.getChild([1,0,0,0,2]).unselectable();if(f==CKEDITOR.ELEMENT_MODE_REPLACE)p.insertAfter(e);else e.append(p);b.container=p;p.disableContextMenu();b.fireOnce('themeLoaded');b.fireOnce('uiReady');},buildDialog:function(b){var c=CKEDITOR.tools.getNextNumber(),d=CKEDITOR.dom.element.createFromHtml(['<div class="',b.id,'_dialog cke_editor_',b.name.replace('.','\\.'),'_dialog cke_skin_',b.skinName,'" dir="',b.lang.dir,'" lang="',b.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+CKEDITOR.env.cssClass,' cke_',b.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+b.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation"><tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr></table>'+'<div id="%footer#" class="%footer" role="presentation"></div>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',CKEDITOR.env.ie?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+c).replace(/%/g,'cke_dialog_')),e=d.getChild([0,0,0,0,0]),f=e.getChild(0),g=e.getChild(1);f.unselectable();g.unselectable();return{element:d,parts:{dialog:d.getChild(0),title:f,close:g,tabs:e.getChild(2),contents:e.getChild([3,0,0,0]),footer:e.getChild(4)}};},destroy:function(b){var c=b.container;c.clearCustomData();b.element.clearCustomData();if(c)c.remove();if(b.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE)b.element.show();delete b.element;}};})());CKEDITOR.editor.prototype.getThemeSpace=function(a){var b='cke_'+a,c=this._[b]||(this._[b]=CKEDITOR.document.getById(b+'_'+this.name));return c;};CKEDITOR.editor.prototype.resize=function(a,b,c,d){var e=this.container,f=CKEDITOR.document.getById('cke_contents_'+this.name),g=d?e.getChild(1):e;CKEDITOR.env.webkit&&g.setStyle('display','none');g.setSize('width',a,true);if(CKEDITOR.env.webkit){g.$.offsetWidth;g.setStyle('display','');}var h=c?0:(g.$.offsetHeight||0)-(f.$.clientHeight||0);
8
- f.setStyle('height',Math.max(b-h,0)+'px');this.fire('resize');};CKEDITOR.editor.prototype.getResizable=function(){return this.container.getChild(1);};
@@ -1,965 +0,0 @@
1
- // script.aculo.us controls.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
2
-
3
- // Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4
- // (c) 2005-2009 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
5
- // (c) 2005-2009 Jon Tirsen (http://www.tirsen.com)
6
- // Contributors:
7
- // Richard Livsey
8
- // Rahul Bhargava
9
- // Rob Wills
10
- //
11
- // script.aculo.us is freely distributable under the terms of an MIT-style license.
12
- // For details, see the script.aculo.us web site: http://script.aculo.us/
13
-
14
- // Autocompleter.Base handles all the autocompletion functionality
15
- // that's independent of the data source for autocompletion. This
16
- // includes drawing the autocompletion menu, observing keyboard
17
- // and mouse events, and similar.
18
- //
19
- // Specific autocompleters need to provide, at the very least,
20
- // a getUpdatedChoices function that will be invoked every time
21
- // the text inside the monitored textbox changes. This method
22
- // should get the text for which to provide autocompletion by
23
- // invoking this.getToken(), NOT by directly accessing
24
- // this.element.value. This is to allow incremental tokenized
25
- // autocompletion. Specific auto-completion logic (AJAX, etc)
26
- // belongs in getUpdatedChoices.
27
- //
28
- // Tokenized incremental autocompletion is enabled automatically
29
- // when an autocompleter is instantiated with the 'tokens' option
30
- // in the options parameter, e.g.:
31
- // new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' });
32
- // will incrementally autocomplete with a comma as the token.
33
- // Additionally, ',' in the above example can be replaced with
34
- // a token array, e.g. { tokens: [',', '\n'] } which
35
- // enables autocompletion on multiple tokens. This is most
36
- // useful when one of the tokens is \n (a newline), as it
37
- // allows smart autocompletion after linebreaks.
38
-
39
- if(typeof Effect == 'undefined')
40
- throw("controls.js requires including script.aculo.us' effects.js library");
41
-
42
- var Autocompleter = { };
43
- Autocompleter.Base = Class.create({
44
- baseInitialize: function(element, update, options) {
45
- element = $(element);
46
- this.element = element;
47
- this.update = $(update);
48
- this.hasFocus = false;
49
- this.changed = false;
50
- this.active = false;
51
- this.index = 0;
52
- this.entryCount = 0;
53
- this.oldElementValue = this.element.value;
54
-
55
- if(this.setOptions)
56
- this.setOptions(options);
57
- else
58
- this.options = options || { };
59
-
60
- this.options.paramName = this.options.paramName || this.element.name;
61
- this.options.tokens = this.options.tokens || [];
62
- this.options.frequency = this.options.frequency || 0.4;
63
- this.options.minChars = this.options.minChars || 1;
64
- this.options.onShow = this.options.onShow ||
65
- function(element, update){
66
- if(!update.style.position || update.style.position=='absolute') {
67
- update.style.position = 'absolute';
68
- Position.clone(element, update, {
69
- setHeight: false,
70
- offsetTop: element.offsetHeight
71
- });
72
- }
73
- Effect.Appear(update,{duration:0.15});
74
- };
75
- this.options.onHide = this.options.onHide ||
76
- function(element, update){ new Effect.Fade(update,{duration:0.15}) };
77
-
78
- if(typeof(this.options.tokens) == 'string')
79
- this.options.tokens = new Array(this.options.tokens);
80
- // Force carriage returns as token delimiters anyway
81
- if (!this.options.tokens.include('\n'))
82
- this.options.tokens.push('\n');
83
-
84
- this.observer = null;
85
-
86
- this.element.setAttribute('autocomplete','off');
87
-
88
- Element.hide(this.update);
89
-
90
- Event.observe(this.element, 'blur', this.onBlur.bindAsEventListener(this));
91
- Event.observe(this.element, 'keydown', this.onKeyPress.bindAsEventListener(this));
92
- },
93
-
94
- show: function() {
95
- if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
96
- if(!this.iefix &&
97
- (Prototype.Browser.IE) &&
98
- (Element.getStyle(this.update, 'position')=='absolute')) {
99
- new Insertion.After(this.update,
100
- '<iframe id="' + this.update.id + '_iefix" '+
101
- 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' +
102
- 'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
103
- this.iefix = $(this.update.id+'_iefix');
104
- }
105
- if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
106
- },
107
-
108
- fixIEOverlapping: function() {
109
- Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
110
- this.iefix.style.zIndex = 1;
111
- this.update.style.zIndex = 2;
112
- Element.show(this.iefix);
113
- },
114
-
115
- hide: function() {
116
- this.stopIndicator();
117
- if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
118
- if(this.iefix) Element.hide(this.iefix);
119
- },
120
-
121
- startIndicator: function() {
122
- if(this.options.indicator) Element.show(this.options.indicator);
123
- },
124
-
125
- stopIndicator: function() {
126
- if(this.options.indicator) Element.hide(this.options.indicator);
127
- },
128
-
129
- onKeyPress: function(event) {
130
- if(this.active)
131
- switch(event.keyCode) {
132
- case Event.KEY_TAB:
133
- case Event.KEY_RETURN:
134
- this.selectEntry();
135
- Event.stop(event);
136
- case Event.KEY_ESC:
137
- this.hide();
138
- this.active = false;
139
- Event.stop(event);
140
- return;
141
- case Event.KEY_LEFT:
142
- case Event.KEY_RIGHT:
143
- return;
144
- case Event.KEY_UP:
145
- this.markPrevious();
146
- this.render();
147
- Event.stop(event);
148
- return;
149
- case Event.KEY_DOWN:
150
- this.markNext();
151
- this.render();
152
- Event.stop(event);
153
- return;
154
- }
155
- else
156
- if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN ||
157
- (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return;
158
-
159
- this.changed = true;
160
- this.hasFocus = true;
161
-
162
- if(this.observer) clearTimeout(this.observer);
163
- this.observer =
164
- setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
165
- },
166
-
167
- activate: function() {
168
- this.changed = false;
169
- this.hasFocus = true;
170
- this.getUpdatedChoices();
171
- },
172
-
173
- onHover: function(event) {
174
- var element = Event.findElement(event, 'LI');
175
- if(this.index != element.autocompleteIndex)
176
- {
177
- this.index = element.autocompleteIndex;
178
- this.render();
179
- }
180
- Event.stop(event);
181
- },
182
-
183
- onClick: function(event) {
184
- var element = Event.findElement(event, 'LI');
185
- this.index = element.autocompleteIndex;
186
- this.selectEntry();
187
- this.hide();
188
- },
189
-
190
- onBlur: function(event) {
191
- // needed to make click events working
192
- setTimeout(this.hide.bind(this), 250);
193
- this.hasFocus = false;
194
- this.active = false;
195
- },
196
-
197
- render: function() {
198
- if(this.entryCount > 0) {
199
- for (var i = 0; i < this.entryCount; i++)
200
- this.index==i ?
201
- Element.addClassName(this.getEntry(i),"selected") :
202
- Element.removeClassName(this.getEntry(i),"selected");
203
- if(this.hasFocus) {
204
- this.show();
205
- this.active = true;
206
- }
207
- } else {
208
- this.active = false;
209
- this.hide();
210
- }
211
- },
212
-
213
- markPrevious: function() {
214
- if(this.index > 0) this.index--;
215
- else this.index = this.entryCount-1;
216
- this.getEntry(this.index).scrollIntoView(true);
217
- },
218
-
219
- markNext: function() {
220
- if(this.index < this.entryCount-1) this.index++;
221
- else this.index = 0;
222
- this.getEntry(this.index).scrollIntoView(false);
223
- },
224
-
225
- getEntry: function(index) {
226
- return this.update.firstChild.childNodes[index];
227
- },
228
-
229
- getCurrentEntry: function() {
230
- return this.getEntry(this.index);
231
- },
232
-
233
- selectEntry: function() {
234
- this.active = false;
235
- this.updateElement(this.getCurrentEntry());
236
- },
237
-
238
- updateElement: function(selectedElement) {
239
- if (this.options.updateElement) {
240
- this.options.updateElement(selectedElement);
241
- return;
242
- }
243
- var value = '';
244
- if (this.options.select) {
245
- var nodes = $(selectedElement).select('.' + this.options.select) || [];
246
- if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
247
- } else
248
- value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
249
-
250
- var bounds = this.getTokenBounds();
251
- if (bounds[0] != -1) {
252
- var newValue = this.element.value.substr(0, bounds[0]);
253
- var whitespace = this.element.value.substr(bounds[0]).match(/^\s+/);
254
- if (whitespace)
255
- newValue += whitespace[0];
256
- this.element.value = newValue + value + this.element.value.substr(bounds[1]);
257
- } else {
258
- this.element.value = value;
259
- }
260
- this.oldElementValue = this.element.value;
261
- this.element.focus();
262
-
263
- if (this.options.afterUpdateElement)
264
- this.options.afterUpdateElement(this.element, selectedElement);
265
- },
266
-
267
- updateChoices: function(choices) {
268
- if(!this.changed && this.hasFocus) {
269
- this.update.innerHTML = choices;
270
- Element.cleanWhitespace(this.update);
271
- Element.cleanWhitespace(this.update.down());
272
-
273
- if(this.update.firstChild && this.update.down().childNodes) {
274
- this.entryCount =
275
- this.update.down().childNodes.length;
276
- for (var i = 0; i < this.entryCount; i++) {
277
- var entry = this.getEntry(i);
278
- entry.autocompleteIndex = i;
279
- this.addObservers(entry);
280
- }
281
- } else {
282
- this.entryCount = 0;
283
- }
284
-
285
- this.stopIndicator();
286
- this.index = 0;
287
-
288
- if(this.entryCount==1 && this.options.autoSelect) {
289
- this.selectEntry();
290
- this.hide();
291
- } else {
292
- this.render();
293
- }
294
- }
295
- },
296
-
297
- addObservers: function(element) {
298
- Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));
299
- Event.observe(element, "click", this.onClick.bindAsEventListener(this));
300
- },
301
-
302
- onObserverEvent: function() {
303
- this.changed = false;
304
- this.tokenBounds = null;
305
- if(this.getToken().length>=this.options.minChars) {
306
- this.getUpdatedChoices();
307
- } else {
308
- this.active = false;
309
- this.hide();
310
- }
311
- this.oldElementValue = this.element.value;
312
- },
313
-
314
- getToken: function() {
315
- var bounds = this.getTokenBounds();
316
- return this.element.value.substring(bounds[0], bounds[1]).strip();
317
- },
318
-
319
- getTokenBounds: function() {
320
- if (null != this.tokenBounds) return this.tokenBounds;
321
- var value = this.element.value;
322
- if (value.strip().empty()) return [-1, 0];
323
- var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue);
324
- var offset = (diff == this.oldElementValue.length ? 1 : 0);
325
- var prevTokenPos = -1, nextTokenPos = value.length;
326
- var tp;
327
- for (var index = 0, l = this.options.tokens.length; index < l; ++index) {
328
- tp = value.lastIndexOf(this.options.tokens[index], diff + offset - 1);
329
- if (tp > prevTokenPos) prevTokenPos = tp;
330
- tp = value.indexOf(this.options.tokens[index], diff + offset);
331
- if (-1 != tp && tp < nextTokenPos) nextTokenPos = tp;
332
- }
333
- return (this.tokenBounds = [prevTokenPos + 1, nextTokenPos]);
334
- }
335
- });
336
-
337
- Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos = function(newS, oldS) {
338
- var boundary = Math.min(newS.length, oldS.length);
339
- for (var index = 0; index < boundary; ++index)
340
- if (newS[index] != oldS[index])
341
- return index;
342
- return boundary;
343
- };
344
-
345
- Ajax.Autocompleter = Class.create(Autocompleter.Base, {
346
- initialize: function(element, update, url, options) {
347
- this.baseInitialize(element, update, options);
348
- this.options.asynchronous = true;
349
- this.options.onComplete = this.onComplete.bind(this);
350
- this.options.defaultParams = this.options.parameters || null;
351
- this.url = url;
352
- },
353
-
354
- getUpdatedChoices: function() {
355
- this.startIndicator();
356
-
357
- var entry = encodeURIComponent(this.options.paramName) + '=' +
358
- encodeURIComponent(this.getToken());
359
-
360
- this.options.parameters = this.options.callback ?
361
- this.options.callback(this.element, entry) : entry;
362
-
363
- if(this.options.defaultParams)
364
- this.options.parameters += '&' + this.options.defaultParams;
365
-
366
- new Ajax.Request(this.url, this.options);
367
- },
368
-
369
- onComplete: function(request) {
370
- this.updateChoices(request.responseText);
371
- }
372
- });
373
-
374
- // The local array autocompleter. Used when you'd prefer to
375
- // inject an array of autocompletion options into the page, rather
376
- // than sending out Ajax queries, which can be quite slow sometimes.
377
- //
378
- // The constructor takes four parameters. The first two are, as usual,
379
- // the id of the monitored textbox, and id of the autocompletion menu.
380
- // The third is the array you want to autocomplete from, and the fourth
381
- // is the options block.
382
- //
383
- // Extra local autocompletion options:
384
- // - choices - How many autocompletion choices to offer
385
- //
386
- // - partialSearch - If false, the autocompleter will match entered
387
- // text only at the beginning of strings in the
388
- // autocomplete array. Defaults to true, which will
389
- // match text at the beginning of any *word* in the
390
- // strings in the autocomplete array. If you want to
391
- // search anywhere in the string, additionally set
392
- // the option fullSearch to true (default: off).
393
- //
394
- // - fullSsearch - Search anywhere in autocomplete array strings.
395
- //
396
- // - partialChars - How many characters to enter before triggering
397
- // a partial match (unlike minChars, which defines
398
- // how many characters are required to do any match
399
- // at all). Defaults to 2.
400
- //
401
- // - ignoreCase - Whether to ignore case when autocompleting.
402
- // Defaults to true.
403
- //
404
- // It's possible to pass in a custom function as the 'selector'
405
- // option, if you prefer to write your own autocompletion logic.
406
- // In that case, the other options above will not apply unless
407
- // you support them.
408
-
409
- Autocompleter.Local = Class.create(Autocompleter.Base, {
410
- initialize: function(element, update, array, options) {
411
- this.baseInitialize(element, update, options);
412
- this.options.array = array;
413
- },
414
-
415
- getUpdatedChoices: function() {
416
- this.updateChoices(this.options.selector(this));
417
- },
418
-
419
- setOptions: function(options) {
420
- this.options = Object.extend({
421
- choices: 10,
422
- partialSearch: true,
423
- partialChars: 2,
424
- ignoreCase: true,
425
- fullSearch: false,
426
- selector: function(instance) {
427
- var ret = []; // Beginning matches
428
- var partial = []; // Inside matches
429
- var entry = instance.getToken();
430
- var count = 0;
431
-
432
- for (var i = 0; i < instance.options.array.length &&
433
- ret.length < instance.options.choices ; i++) {
434
-
435
- var elem = instance.options.array[i];
436
- var foundPos = instance.options.ignoreCase ?
437
- elem.toLowerCase().indexOf(entry.toLowerCase()) :
438
- elem.indexOf(entry);
439
-
440
- while (foundPos != -1) {
441
- if (foundPos == 0 && elem.length != entry.length) {
442
- ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" +
443
- elem.substr(entry.length) + "</li>");
444
- break;
445
- } else if (entry.length >= instance.options.partialChars &&
446
- instance.options.partialSearch && foundPos != -1) {
447
- if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) {
448
- partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" +
449
- elem.substr(foundPos, entry.length) + "</strong>" + elem.substr(
450
- foundPos + entry.length) + "</li>");
451
- break;
452
- }
453
- }
454
-
455
- foundPos = instance.options.ignoreCase ?
456
- elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) :
457
- elem.indexOf(entry, foundPos + 1);
458
-
459
- }
460
- }
461
- if (partial.length)
462
- ret = ret.concat(partial.slice(0, instance.options.choices - ret.length));
463
- return "<ul>" + ret.join('') + "</ul>";
464
- }
465
- }, options || { });
466
- }
467
- });
468
-
469
- // AJAX in-place editor and collection editor
470
- // Full rewrite by Christophe Porteneuve <tdd@tddsworld.com> (April 2007).
471
-
472
- // Use this if you notice weird scrolling problems on some browsers,
473
- // the DOM might be a bit confused when this gets called so do this
474
- // waits 1 ms (with setTimeout) until it does the activation
475
- Field.scrollFreeActivate = function(field) {
476
- setTimeout(function() {
477
- Field.activate(field);
478
- }, 1);
479
- };
480
-
481
- Ajax.InPlaceEditor = Class.create({
482
- initialize: function(element, url, options) {
483
- this.url = url;
484
- this.element = element = $(element);
485
- this.prepareOptions();
486
- this._controls = { };
487
- arguments.callee.dealWithDeprecatedOptions(options); // DEPRECATION LAYER!!!
488
- Object.extend(this.options, options || { });
489
- if (!this.options.formId && this.element.id) {
490
- this.options.formId = this.element.id + '-inplaceeditor';
491
- if ($(this.options.formId))
492
- this.options.formId = '';
493
- }
494
- if (this.options.externalControl)
495
- this.options.externalControl = $(this.options.externalControl);
496
- if (!this.options.externalControl)
497
- this.options.externalControlOnly = false;
498
- this._originalBackground = this.element.getStyle('background-color') || 'transparent';
499
- this.element.title = this.options.clickToEditText;
500
- this._boundCancelHandler = this.handleFormCancellation.bind(this);
501
- this._boundComplete = (this.options.onComplete || Prototype.emptyFunction).bind(this);
502
- this._boundFailureHandler = this.handleAJAXFailure.bind(this);
503
- this._boundSubmitHandler = this.handleFormSubmission.bind(this);
504
- this._boundWrapperHandler = this.wrapUp.bind(this);
505
- this.registerListeners();
506
- },
507
- checkForEscapeOrReturn: function(e) {
508
- if (!this._editing || e.ctrlKey || e.altKey || e.shiftKey) return;
509
- if (Event.KEY_ESC == e.keyCode)
510
- this.handleFormCancellation(e);
511
- else if (Event.KEY_RETURN == e.keyCode)
512
- this.handleFormSubmission(e);
513
- },
514
- createControl: function(mode, handler, extraClasses) {
515
- var control = this.options[mode + 'Control'];
516
- var text = this.options[mode + 'Text'];
517
- if ('button' == control) {
518
- var btn = document.createElement('input');
519
- btn.type = 'submit';
520
- btn.value = text;
521
- btn.className = 'editor_' + mode + '_button';
522
- if ('cancel' == mode)
523
- btn.onclick = this._boundCancelHandler;
524
- this._form.appendChild(btn);
525
- this._controls[mode] = btn;
526
- } else if ('link' == control) {
527
- var link = document.createElement('a');
528
- link.href = '#';
529
- link.appendChild(document.createTextNode(text));
530
- link.onclick = 'cancel' == mode ? this._boundCancelHandler : this._boundSubmitHandler;
531
- link.className = 'editor_' + mode + '_link';
532
- if (extraClasses)
533
- link.className += ' ' + extraClasses;
534
- this._form.appendChild(link);
535
- this._controls[mode] = link;
536
- }
537
- },
538
- createEditField: function() {
539
- var text = (this.options.loadTextURL ? this.options.loadingText : this.getText());
540
- var fld;
541
- if (1 >= this.options.rows && !/\r|\n/.test(this.getText())) {
542
- fld = document.createElement('input');
543
- fld.type = 'text';
544
- var size = this.options.size || this.options.cols || 0;
545
- if (0 < size) fld.size = size;
546
- } else {
547
- fld = document.createElement('textarea');
548
- fld.rows = (1 >= this.options.rows ? this.options.autoRows : this.options.rows);
549
- fld.cols = this.options.cols || 40;
550
- }
551
- fld.name = this.options.paramName;
552
- fld.value = text; // No HTML breaks conversion anymore
553
- fld.className = 'editor_field';
554
- if (this.options.submitOnBlur)
555
- fld.onblur = this._boundSubmitHandler;
556
- this._controls.editor = fld;
557
- if (this.options.loadTextURL)
558
- this.loadExternalText();
559
- this._form.appendChild(this._controls.editor);
560
- },
561
- createForm: function() {
562
- var ipe = this;
563
- function addText(mode, condition) {
564
- var text = ipe.options['text' + mode + 'Controls'];
565
- if (!text || condition === false) return;
566
- ipe._form.appendChild(document.createTextNode(text));
567
- };
568
- this._form = $(document.createElement('form'));
569
- this._form.id = this.options.formId;
570
- this._form.addClassName(this.options.formClassName);
571
- this._form.onsubmit = this._boundSubmitHandler;
572
- this.createEditField();
573
- if ('textarea' == this._controls.editor.tagName.toLowerCase())
574
- this._form.appendChild(document.createElement('br'));
575
- if (this.options.onFormCustomization)
576
- this.options.onFormCustomization(this, this._form);
577
- addText('Before', this.options.okControl || this.options.cancelControl);
578
- this.createControl('ok', this._boundSubmitHandler);
579
- addText('Between', this.options.okControl && this.options.cancelControl);
580
- this.createControl('cancel', this._boundCancelHandler, 'editor_cancel');
581
- addText('After', this.options.okControl || this.options.cancelControl);
582
- },
583
- destroy: function() {
584
- if (this._oldInnerHTML)
585
- this.element.innerHTML = this._oldInnerHTML;
586
- this.leaveEditMode();
587
- this.unregisterListeners();
588
- },
589
- enterEditMode: function(e) {
590
- if (this._saving || this._editing) return;
591
- this._editing = true;
592
- this.triggerCallback('onEnterEditMode');
593
- if (this.options.externalControl)
594
- this.options.externalControl.hide();
595
- this.element.hide();
596
- this.createForm();
597
- this.element.parentNode.insertBefore(this._form, this.element);
598
- if (!this.options.loadTextURL)
599
- this.postProcessEditField();
600
- if (e) Event.stop(e);
601
- },
602
- enterHover: function(e) {
603
- if (this.options.hoverClassName)
604
- this.element.addClassName(this.options.hoverClassName);
605
- if (this._saving) return;
606
- this.triggerCallback('onEnterHover');
607
- },
608
- getText: function() {
609
- return this.element.innerHTML.unescapeHTML();
610
- },
611
- handleAJAXFailure: function(transport) {
612
- this.triggerCallback('onFailure', transport);
613
- if (this._oldInnerHTML) {
614
- this.element.innerHTML = this._oldInnerHTML;
615
- this._oldInnerHTML = null;
616
- }
617
- },
618
- handleFormCancellation: function(e) {
619
- this.wrapUp();
620
- if (e) Event.stop(e);
621
- },
622
- handleFormSubmission: function(e) {
623
- var form = this._form;
624
- var value = $F(this._controls.editor);
625
- this.prepareSubmission();
626
- var params = this.options.callback(form, value) || '';
627
- if (Object.isString(params))
628
- params = params.toQueryParams();
629
- params.editorId = this.element.id;
630
- if (this.options.htmlResponse) {
631
- var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions);
632
- Object.extend(options, {
633
- parameters: params,
634
- onComplete: this._boundWrapperHandler,
635
- onFailure: this._boundFailureHandler
636
- });
637
- new Ajax.Updater({ success: this.element }, this.url, options);
638
- } else {
639
- var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
640
- Object.extend(options, {
641
- parameters: params,
642
- onComplete: this._boundWrapperHandler,
643
- onFailure: this._boundFailureHandler
644
- });
645
- new Ajax.Request(this.url, options);
646
- }
647
- if (e) Event.stop(e);
648
- },
649
- leaveEditMode: function() {
650
- this.element.removeClassName(this.options.savingClassName);
651
- this.removeForm();
652
- this.leaveHover();
653
- this.element.style.backgroundColor = this._originalBackground;
654
- this.element.show();
655
- if (this.options.externalControl)
656
- this.options.externalControl.show();
657
- this._saving = false;
658
- this._editing = false;
659
- this._oldInnerHTML = null;
660
- this.triggerCallback('onLeaveEditMode');
661
- },
662
- leaveHover: function(e) {
663
- if (this.options.hoverClassName)
664
- this.element.removeClassName(this.options.hoverClassName);
665
- if (this._saving) return;
666
- this.triggerCallback('onLeaveHover');
667
- },
668
- loadExternalText: function() {
669
- this._form.addClassName(this.options.loadingClassName);
670
- this._controls.editor.disabled = true;
671
- var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
672
- Object.extend(options, {
673
- parameters: 'editorId=' + encodeURIComponent(this.element.id),
674
- onComplete: Prototype.emptyFunction,
675
- onSuccess: function(transport) {
676
- this._form.removeClassName(this.options.loadingClassName);
677
- var text = transport.responseText;
678
- if (this.options.stripLoadedTextTags)
679
- text = text.stripTags();
680
- this._controls.editor.value = text;
681
- this._controls.editor.disabled = false;
682
- this.postProcessEditField();
683
- }.bind(this),
684
- onFailure: this._boundFailureHandler
685
- });
686
- new Ajax.Request(this.options.loadTextURL, options);
687
- },
688
- postProcessEditField: function() {
689
- var fpc = this.options.fieldPostCreation;
690
- if (fpc)
691
- $(this._controls.editor)['focus' == fpc ? 'focus' : 'activate']();
692
- },
693
- prepareOptions: function() {
694
- this.options = Object.clone(Ajax.InPlaceEditor.DefaultOptions);
695
- Object.extend(this.options, Ajax.InPlaceEditor.DefaultCallbacks);
696
- [this._extraDefaultOptions].flatten().compact().each(function(defs) {
697
- Object.extend(this.options, defs);
698
- }.bind(this));
699
- },
700
- prepareSubmission: function() {
701
- this._saving = true;
702
- this.removeForm();
703
- this.leaveHover();
704
- this.showSaving();
705
- },
706
- registerListeners: function() {
707
- this._listeners = { };
708
- var listener;
709
- $H(Ajax.InPlaceEditor.Listeners).each(function(pair) {
710
- listener = this[pair.value].bind(this);
711
- this._listeners[pair.key] = listener;
712
- if (!this.options.externalControlOnly)
713
- this.element.observe(pair.key, listener);
714
- if (this.options.externalControl)
715
- this.options.externalControl.observe(pair.key, listener);
716
- }.bind(this));
717
- },
718
- removeForm: function() {
719
- if (!this._form) return;
720
- this._form.remove();
721
- this._form = null;
722
- this._controls = { };
723
- },
724
- showSaving: function() {
725
- this._oldInnerHTML = this.element.innerHTML;
726
- this.element.innerHTML = this.options.savingText;
727
- this.element.addClassName(this.options.savingClassName);
728
- this.element.style.backgroundColor = this._originalBackground;
729
- this.element.show();
730
- },
731
- triggerCallback: function(cbName, arg) {
732
- if ('function' == typeof this.options[cbName]) {
733
- this.options[cbName](this, arg);
734
- }
735
- },
736
- unregisterListeners: function() {
737
- $H(this._listeners).each(function(pair) {
738
- if (!this.options.externalControlOnly)
739
- this.element.stopObserving(pair.key, pair.value);
740
- if (this.options.externalControl)
741
- this.options.externalControl.stopObserving(pair.key, pair.value);
742
- }.bind(this));
743
- },
744
- wrapUp: function(transport) {
745
- this.leaveEditMode();
746
- // Can't use triggerCallback due to backward compatibility: requires
747
- // binding + direct element
748
- this._boundComplete(transport, this.element);
749
- }
750
- });
751
-
752
- Object.extend(Ajax.InPlaceEditor.prototype, {
753
- dispose: Ajax.InPlaceEditor.prototype.destroy
754
- });
755
-
756
- Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, {
757
- initialize: function($super, element, url, options) {
758
- this._extraDefaultOptions = Ajax.InPlaceCollectionEditor.DefaultOptions;
759
- $super(element, url, options);
760
- },
761
-
762
- createEditField: function() {
763
- var list = document.createElement('select');
764
- list.name = this.options.paramName;
765
- list.size = 1;
766
- this._controls.editor = list;
767
- this._collection = this.options.collection || [];
768
- if (this.options.loadCollectionURL)
769
- this.loadCollection();
770
- else
771
- this.checkForExternalText();
772
- this._form.appendChild(this._controls.editor);
773
- },
774
-
775
- loadCollection: function() {
776
- this._form.addClassName(this.options.loadingClassName);
777
- this.showLoadingText(this.options.loadingCollectionText);
778
- var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
779
- Object.extend(options, {
780
- parameters: 'editorId=' + encodeURIComponent(this.element.id),
781
- onComplete: Prototype.emptyFunction,
782
- onSuccess: function(transport) {
783
- var js = transport.responseText.strip();
784
- if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check
785
- throw('Server returned an invalid collection representation.');
786
- this._collection = eval(js);
787
- this.checkForExternalText();
788
- }.bind(this),
789
- onFailure: this.onFailure
790
- });
791
- new Ajax.Request(this.options.loadCollectionURL, options);
792
- },
793
-
794
- showLoadingText: function(text) {
795
- this._controls.editor.disabled = true;
796
- var tempOption = this._controls.editor.firstChild;
797
- if (!tempOption) {
798
- tempOption = document.createElement('option');
799
- tempOption.value = '';
800
- this._controls.editor.appendChild(tempOption);
801
- tempOption.selected = true;
802
- }
803
- tempOption.update((text || '').stripScripts().stripTags());
804
- },
805
-
806
- checkForExternalText: function() {
807
- this._text = this.getText();
808
- if (this.options.loadTextURL)
809
- this.loadExternalText();
810
- else
811
- this.buildOptionList();
812
- },
813
-
814
- loadExternalText: function() {
815
- this.showLoadingText(this.options.loadingText);
816
- var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
817
- Object.extend(options, {
818
- parameters: 'editorId=' + encodeURIComponent(this.element.id),
819
- onComplete: Prototype.emptyFunction,
820
- onSuccess: function(transport) {
821
- this._text = transport.responseText.strip();
822
- this.buildOptionList();
823
- }.bind(this),
824
- onFailure: this.onFailure
825
- });
826
- new Ajax.Request(this.options.loadTextURL, options);
827
- },
828
-
829
- buildOptionList: function() {
830
- this._form.removeClassName(this.options.loadingClassName);
831
- this._collection = this._collection.map(function(entry) {
832
- return 2 === entry.length ? entry : [entry, entry].flatten();
833
- });
834
- var marker = ('value' in this.options) ? this.options.value : this._text;
835
- var textFound = this._collection.any(function(entry) {
836
- return entry[0] == marker;
837
- }.bind(this));
838
- this._controls.editor.update('');
839
- var option;
840
- this._collection.each(function(entry, index) {
841
- option = document.createElement('option');
842
- option.value = entry[0];
843
- option.selected = textFound ? entry[0] == marker : 0 == index;
844
- option.appendChild(document.createTextNode(entry[1]));
845
- this._controls.editor.appendChild(option);
846
- }.bind(this));
847
- this._controls.editor.disabled = false;
848
- Field.scrollFreeActivate(this._controls.editor);
849
- }
850
- });
851
-
852
- //**** DEPRECATION LAYER FOR InPlace[Collection]Editor! ****
853
- //**** This only exists for a while, in order to let ****
854
- //**** users adapt to the new API. Read up on the new ****
855
- //**** API and convert your code to it ASAP! ****
856
-
857
- Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions = function(options) {
858
- if (!options) return;
859
- function fallback(name, expr) {
860
- if (name in options || expr === undefined) return;
861
- options[name] = expr;
862
- };
863
- fallback('cancelControl', (options.cancelLink ? 'link' : (options.cancelButton ? 'button' :
864
- options.cancelLink == options.cancelButton == false ? false : undefined)));
865
- fallback('okControl', (options.okLink ? 'link' : (options.okButton ? 'button' :
866
- options.okLink == options.okButton == false ? false : undefined)));
867
- fallback('highlightColor', options.highlightcolor);
868
- fallback('highlightEndColor', options.highlightendcolor);
869
- };
870
-
871
- Object.extend(Ajax.InPlaceEditor, {
872
- DefaultOptions: {
873
- ajaxOptions: { },
874
- autoRows: 3, // Use when multi-line w/ rows == 1
875
- cancelControl: 'link', // 'link'|'button'|false
876
- cancelText: 'cancel',
877
- clickToEditText: 'Click to edit',
878
- externalControl: null, // id|elt
879
- externalControlOnly: false,
880
- fieldPostCreation: 'activate', // 'activate'|'focus'|false
881
- formClassName: 'inplaceeditor-form',
882
- formId: null, // id|elt
883
- highlightColor: '#ffff99',
884
- highlightEndColor: '#ffffff',
885
- hoverClassName: '',
886
- htmlResponse: true,
887
- loadingClassName: 'inplaceeditor-loading',
888
- loadingText: 'Loading...',
889
- okControl: 'button', // 'link'|'button'|false
890
- okText: 'ok',
891
- paramName: 'value',
892
- rows: 1, // If 1 and multi-line, uses autoRows
893
- savingClassName: 'inplaceeditor-saving',
894
- savingText: 'Saving...',
895
- size: 0,
896
- stripLoadedTextTags: false,
897
- submitOnBlur: false,
898
- textAfterControls: '',
899
- textBeforeControls: '',
900
- textBetweenControls: ''
901
- },
902
- DefaultCallbacks: {
903
- callback: function(form) {
904
- return Form.serialize(form);
905
- },
906
- onComplete: function(transport, element) {
907
- // For backward compatibility, this one is bound to the IPE, and passes
908
- // the element directly. It was too often customized, so we don't break it.
909
- new Effect.Highlight(element, {
910
- startcolor: this.options.highlightColor, keepBackgroundImage: true });
911
- },
912
- onEnterEditMode: null,
913
- onEnterHover: function(ipe) {
914
- ipe.element.style.backgroundColor = ipe.options.highlightColor;
915
- if (ipe._effect)
916
- ipe._effect.cancel();
917
- },
918
- onFailure: function(transport, ipe) {
919
- alert('Error communication with the server: ' + transport.responseText.stripTags());
920
- },
921
- onFormCustomization: null, // Takes the IPE and its generated form, after editor, before controls.
922
- onLeaveEditMode: null,
923
- onLeaveHover: function(ipe) {
924
- ipe._effect = new Effect.Highlight(ipe.element, {
925
- startcolor: ipe.options.highlightColor, endcolor: ipe.options.highlightEndColor,
926
- restorecolor: ipe._originalBackground, keepBackgroundImage: true
927
- });
928
- }
929
- },
930
- Listeners: {
931
- click: 'enterEditMode',
932
- keydown: 'checkForEscapeOrReturn',
933
- mouseover: 'enterHover',
934
- mouseout: 'leaveHover'
935
- }
936
- });
937
-
938
- Ajax.InPlaceCollectionEditor.DefaultOptions = {
939
- loadingCollectionText: 'Loading options...'
940
- };
941
-
942
- // Delayed observer, like Form.Element.Observer,
943
- // but waits for delay after last key input
944
- // Ideal for live-search fields
945
-
946
- Form.Element.DelayedObserver = Class.create({
947
- initialize: function(element, delay, callback) {
948
- this.delay = delay || 0.5;
949
- this.element = $(element);
950
- this.callback = callback;
951
- this.timer = null;
952
- this.lastValue = $F(this.element);
953
- Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this));
954
- },
955
- delayedListener: function(event) {
956
- if(this.lastValue == $F(this.element)) return;
957
- if(this.timer) clearTimeout(this.timer);
958
- this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000);
959
- this.lastValue = $F(this.element);
960
- },
961
- onTimerEvent: function() {
962
- this.timer = null;
963
- this.callback(this.element, $F(this.element));
964
- }
965
- });