Permalink
Browse files

Merge branch 'feature/staticfiles' of https://github.com/stephrdev/dj…

…ango-cms into stephrdev-feature/staticfiles

Conflicts:
	cms/plugins/video/templates/cms/plugins/video.html
	cms/toolbar/items.py
	tests/project/settings.py
  • Loading branch information...
2 parents 299006d + 4e05719 commit 956b772b4b229ffa8aaf471d13169da60513817f Jonas Obrist committed Aug 3, 2011
Showing with 85 additions and 8,739 deletions.
  1. +2 −2 cms/admin/pageadmin.py
  2. +2 −2 cms/admin/placeholderadmin.py
  3. +3 −3 cms/forms/widgets.py
  4. +0 −543 cms/media/cms/js/lib/effects.core.js
  5. +0 −48 cms/media/cms/js/lib/effects.highlight.js
  6. +0 −34 cms/media/cms/js/lib/functional.js
  7. +0 −52 cms/media/cms/js/lib/jquery.backgroundposition.js
  8. +0 −21 cms/media/cms/js/lib/jquery.bind.js
  9. +0 −96 cms/media/cms/js/lib/jquery.cookie.js
  10. +0 −643 cms/media/cms/js/lib/jquery.form.js
  11. +0 −4,376 cms/media/cms/js/lib/jquery.js
  12. +0 −250 cms/media/cms/js/lib/jquery.livequery.js
  13. +0 −11 cms/media/cms/js/lib/jquery.nyroModal-1.6.2.pack.js
  14. +0 −211 cms/media/cms/js/lib/jquery.query.js
  15. +0 −187 cms/media/cms/js/lib/ui.checkbox.js
  16. +0 −519 cms/media/cms/js/lib/ui.core.js
  17. +0 −650 cms/media/cms/js/lib/ui.dialog.js
  18. +0 −1,019 cms/media/cms/js/lib/ui.sortable.js
  19. +1 −1 cms/plugins/file/cms_plugins.py
  20. +2 −2 cms/plugins/file/models.py
  21. +4 −4 cms/plugins/flash/templates/cms/plugins/flash.html
  22. +1 −1 cms/plugins/link/cms_plugins.py
  23. +1 −1 cms/plugins/picture/cms_plugins.py
  24. +1 −1 cms/plugins/snippet/cms_plugins.py
  25. +1 −1 cms/plugins/text/settings.py
  26. +3 −3 cms/plugins/text/templates/cms/plugins/text_plugin_change_form.html
  27. +2 −2 cms/plugins/text/templates/cms/plugins/widgets/wymeditor.html
  28. +2 −2 cms/plugins/text/widgets/tinymce_widget.py
  29. +3 −3 cms/plugins/text/widgets/wymeditor_widget.py
  30. +2 −2 cms/plugins/twitter/templates/cms/plugins/twitter_recent_entries.html
  31. +5 −5 cms/plugins/video/templates/cms/plugins/video.html
  32. 0 cms/{media → static}/cms/css/change_form.css
  33. 0 cms/{media → static}/cms/css/jquery.dialog.css
  34. 0 cms/{media → static}/cms/css/jquery.tooltip.css
  35. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
  36. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png
  37. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png
  38. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-bg_glass_50_3baae3_1x400.png
  39. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png
  40. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
  41. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png
  42. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png
  43. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
  44. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-icons_2694e8_256x240.png
  45. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-icons_2e83ff_256x240.png
  46. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-icons_3d80b3_256x240.png
  47. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-icons_72a7cf_256x240.png
  48. 0 cms/{media → static}/cms/css/jquery/cupertino/images/ui-icons_ffffff_256x240.png
  49. 0 cms/{media → static}/cms/css/jquery/cupertino/jquery-ui.css
  50. 0 cms/{media → static}/cms/css/pages.css
  51. 0 cms/{media → static}/cms/css/plugin_editor.css
  52. 0 cms/{media → static}/cms/css/plugin_forms.css
  53. 0 cms/{media → static}/cms/css/plugins/cms.placeholders.css
  54. 0 cms/{media → static}/cms/css/plugins/cms.toolbar.css
  55. 0 cms/{media → static}/cms/css/rte.css
  56. 0 cms/{media → static}/cms/css/tinymce_toolbar.css
  57. 0 cms/{media → static}/cms/css/toolbar.css
  58. 0 cms/{media → static}/cms/css/wymeditor.css
  59. 0 cms/{media → static}/cms/images/bold.gif
  60. 0 cms/{media → static}/cms/images/changelist-filter-button-bg.jpg
  61. 0 cms/{media → static}/cms/images/close.gif
  62. 0 cms/{media → static}/cms/images/cms_toolbar.gif
  63. 0 cms/{media → static}/cms/images/cms_toolbar.png
  64. 0 cms/{media → static}/cms/images/copy.gif
  65. 0 cms/{media → static}/cms/images/cut.gif
  66. 0 cms/{media → static}/cms/images/file_icons/flv.gif
  67. 0 cms/{media → static}/cms/images/file_icons/gif.gif
  68. 0 cms/{media → static}/cms/images/file_icons/html.gif
  69. 0 cms/{media → static}/cms/images/file_icons/java.gif
  70. 0 cms/{media → static}/cms/images/file_icons/jpg.gif
  71. 0 cms/{media → static}/cms/images/file_icons/mp3.png
  72. 0 cms/{media → static}/cms/images/file_icons/ods.png
  73. 0 cms/{media → static}/cms/images/file_icons/odt.png
  74. 0 cms/{media → static}/cms/images/file_icons/pdf.gif
  75. 0 cms/{media → static}/cms/images/file_icons/php.gif
  76. 0 cms/{media → static}/cms/images/file_icons/png.gif
  77. 0 cms/{media → static}/cms/images/file_icons/swf.gif
  78. 0 cms/{media → static}/cms/images/file_icons/tgz.png
  79. 0 cms/{media → static}/cms/images/file_icons/ttf.gif
  80. 0 cms/{media → static}/cms/images/file_icons/txt.gif
  81. 0 cms/{media → static}/cms/images/file_icons/txt.png
  82. 0 cms/{media → static}/cms/images/file_icons/wav.gif
  83. 0 cms/{media → static}/cms/images/file_icons/zip.png
  84. 0 cms/{media → static}/cms/images/icon_addlink.gif
  85. 0 cms/{media → static}/cms/images/icon_deletelink.gif
  86. 0 cms/{media → static}/cms/images/icon_extension.gif
  87. 0 cms/{media → static}/cms/images/icon_pluginedit.gif
  88. 0 cms/{media → static}/cms/images/icons.png
  89. 0 cms/{media/cms/images/plugins → static/cms/images}/image.png
  90. 0 cms/{media → static}/cms/images/indicator.gif
  91. 0 cms/{media → static}/cms/images/italic.gif
  92. 0 cms/{media → static}/cms/images/jquery/accordion-left-act.png
  93. 0 cms/{media → static}/cms/images/jquery/accordion-left-over.png
  94. 0 cms/{media → static}/cms/images/jquery/accordion-left.png
  95. 0 cms/{media → static}/cms/images/jquery/accordion-middle-act.png
  96. 0 cms/{media → static}/cms/images/jquery/accordion-middle-over.png
  97. 0 cms/{media → static}/cms/images/jquery/accordion-middle.png
  98. 0 cms/{media → static}/cms/images/jquery/accordion-right-act.png
  99. 0 cms/{media → static}/cms/images/jquery/accordion-right-over.png
  100. 0 cms/{media → static}/cms/images/jquery/accordion-right.png
  101. 0 cms/{media → static}/cms/images/jquery/default-bg.gif
  102. 0 cms/{media → static}/cms/images/jquery/dialog-e.gif
  103. 0 cms/{media → static}/cms/images/jquery/dialog-n.gif
  104. 0 cms/{media → static}/cms/images/jquery/dialog-ne.gif
  105. 0 cms/{media → static}/cms/images/jquery/dialog-nw.gif
  106. 0 cms/{media → static}/cms/images/jquery/dialog-s.gif
  107. 0 cms/{media → static}/cms/images/jquery/dialog-se.gif
  108. 0 cms/{media → static}/cms/images/jquery/dialog-sw.gif
  109. 0 cms/{media → static}/cms/images/jquery/dialog-title.gif
  110. 0 cms/{media → static}/cms/images/jquery/dialog-titlebar-close-hover.png
  111. 0 cms/{media → static}/cms/images/jquery/dialog-titlebar-close.png
  112. 0 cms/{media → static}/cms/images/jquery/dialog-w.gif
  113. 0 cms/{media/cms/images → static/cms/images/jquery}/nav-bg.gif
  114. 0 cms/{media → static}/cms/images/jquery/resizable-e.gif
  115. 0 cms/{media → static}/cms/images/jquery/resizable-n.gif
  116. 0 cms/{media → static}/cms/images/jquery/resizable-ne.gif
  117. 0 cms/{media → static}/cms/images/jquery/resizable-nw.gif
  118. 0 cms/{media → static}/cms/images/jquery/resizable-s.gif
  119. 0 cms/{media → static}/cms/images/jquery/resizable-se.gif
  120. 0 cms/{media → static}/cms/images/jquery/resizable-sw.gif
  121. 0 cms/{media → static}/cms/images/jquery/resizable-w.gif
  122. 0 cms/{media → static}/cms/images/jquery/slider-bg-1.png
  123. 0 cms/{media → static}/cms/images/jquery/slider-bg-2.png
  124. 0 cms/{media → static}/cms/images/jquery/slider-handle.gif
  125. 0 cms/{media → static}/cms/images/jquery/tabs.png
  126. 0 cms/{media/cms/images/plugins → static/cms/images}/link.png
  127. 0 cms/{media → static}/cms/images/logo.jpg
  128. 0 cms/{media/cms/images/jquery → static/cms/images}/nav-bg.gif
  129. 0 cms/{media → static}/cms/images/page_find.gif
  130. 0 cms/{media → static}/cms/images/pluginlist-delete.png
  131. 0 cms/{media → static}/cms/images/pluginlist-holder-bg.gif
  132. 0 cms/{media → static}/cms/images/plugins/file.png
  133. 0 cms/{media → static}/cms/images/plugins/get_flash_player.gif
  134. 0 cms/{media/cms/images → static/cms/images/plugins}/image.png
  135. 0 cms/{media/cms/images → static/cms/images/plugins}/link.png
  136. 0 cms/{media → static}/cms/images/plugins/snippet.png
  137. 0 cms/{media → static}/cms/images/pony.jpg
  138. 0 cms/{media → static}/cms/images/sitemap-exim.gif
  139. 0 cms/{media → static}/cms/images/sitemap-exlm.gif
  140. 0 cms/{media → static}/cms/images/sitemap-extm.gif
  141. 0 cms/{media → static}/cms/images/sitemap-li-bg.jpg
  142. 0 cms/{media → static}/cms/images/sitemap-li-collapse.gif
  143. 0 cms/{media → static}/cms/images/sitemap-li-drag.gif
  144. 0 cms/{media → static}/cms/images/toolbar/frame_shadow.gif
  145. 0 cms/{media → static}/cms/images/toolbar/icons/icon_admin.png
  146. 0 cms/{media → static}/cms/images/toolbar/icons/icon_child.png
  147. 0 cms/{media → static}/cms/images/toolbar/icons/icon_delete.png
  148. 0 cms/{media → static}/cms/images/toolbar/icons/icon_edit.png
  149. 0 cms/{media → static}/cms/images/toolbar/icons/icon_history.png
  150. 0 cms/{media → static}/cms/images/toolbar/icons/icon_lock.png
  151. 0 cms/{media → static}/cms/images/toolbar/icons/icon_page.png
  152. 0 cms/{media → static}/cms/images/toolbar/icons/icon_sibling.png
  153. 0 cms/{media → static}/cms/images/toolbar/icons/icon_sitemap.png
  154. 0 cms/{media → static}/cms/images/toolbar/icons/icon_template.png
  155. 0 cms/{media → static}/cms/images/toolbar/loader.gif
  156. 0 cms/{media → static}/cms/images/toolbar/sprite_toolbar-ie.png
  157. 0 cms/{media → static}/cms/images/toolbar/sprite_toolbar.png
  158. 0 cms/{media → static}/cms/images/toolbar/toolbar_bg.gif
  159. 0 cms/{media → static}/cms/images/unordered.gif
  160. 0 cms/{media → static}/cms/js/change_form.js
  161. 0 cms/{media → static}/cms/js/change_list.js
  162. 0 cms/{media → static}/cms/js/csrf.js
  163. 0 cms/{media → static}/cms/js/libs/classy.min.js
  164. 0 cms/{media → static}/cms/js/libs/swfobject.min.js
  165. 0 cms/{media → static}/cms/js/placeholder_editor_registry.js
  166. 0 cms/{media → static}/cms/js/plugin_editor.js
  167. 0 cms/{media → static}/cms/js/plugins/cms.base.js
  168. 0 cms/{media → static}/cms/js/plugins/cms.placeholders.js
  169. 0 cms/{media → static}/cms/js/plugins/cms.toolbar.js
  170. 0 cms/{media → static}/cms/js/plugins/jquery.cookie.js
  171. 0 cms/{media → static}/cms/js/plugins/jquery.tweet.js
  172. 0 cms/{media → static}/cms/js/plugins/jquery.ui.core.js
  173. 0 cms/{media → static}/cms/js/plugins/jquery.ui.draggable.js
  174. 0 cms/{media → static}/cms/js/plugins/jquery.ui.droppable.js
  175. 0 cms/{media → static}/cms/js/tinymce.placeholdereditor.js
  176. 0 cms/{media → static}/cms/js/wymeditor.placeholdereditor.js
  177. 0 cms/{media → static}/cms/js/wymeditor/skins/django/icons.png
  178. 0 cms/{media → static}/cms/js/wymeditor/skins/django/skin.css
  179. 0 cms/{media → static}/cms/js/wymeditor/skins/django/skin.js
  180. 0 cms/{media → static}/cms/jstree/_lib/_all.js
  181. 0 cms/{media → static}/cms/jstree/_lib/css.js
  182. 0 cms/{media → static}/cms/jstree/_lib/jquery.cookie.js
  183. 0 cms/{media → static}/cms/jstree/_lib/jquery.hotkeys.js
  184. 0 cms/{media → static}/cms/jstree/_lib/jquery.js
  185. 0 cms/{media → static}/cms/jstree/_lib/jquery.listen.js
  186. 0 cms/{media → static}/cms/jstree/_lib/jquery.log.js
  187. 0 cms/{media → static}/cms/jstree/_lib/jquery.metadata.js
  188. 0 cms/{media → static}/cms/jstree/_lib/jquery.xslt.js
  189. 0 cms/{media → static}/cms/jstree/_lib/sarissa.js
  190. 0 cms/{media → static}/cms/jstree/_lib/sarissa_ieemu_xpath.js
  191. 0 cms/{media → static}/cms/jstree/flat.xsl
  192. 0 cms/{media → static}/cms/jstree/nested.xsl
  193. 0 cms/{media → static}/cms/jstree/themes/classic/folder.gif
  194. 0 cms/{media → static}/cms/jstree/themes/classic/folderopen.gif
  195. 0 cms/{media → static}/cms/jstree/themes/classic/minus.gif
  196. 0 cms/{media → static}/cms/jstree/themes/classic/plus.gif
  197. 0 cms/{media → static}/cms/jstree/themes/classic/style.css
  198. 0 cms/{media → static}/cms/jstree/themes/default/context.gif
  199. 0 cms/{media → static}/cms/jstree/themes/default/create.png
  200. 0 cms/{media → static}/cms/jstree/themes/default/dot.gif
  201. 0 cms/{media → static}/cms/jstree/themes/default/f.png
  202. 0 cms/{media → static}/cms/jstree/themes/default/fminus.gif
  203. 0 cms/{media → static}/cms/jstree/themes/default/fminus_rtl.gif
  204. 0 cms/{media → static}/cms/jstree/themes/default/fplus.gif
  205. 0 cms/{media → static}/cms/jstree/themes/default/fplus_rtl.gif
  206. 0 cms/{media → static}/cms/jstree/themes/default/lastli.gif
  207. 0 cms/{media → static}/cms/jstree/themes/default/lastli_rtl.gif
  208. 0 cms/{media → static}/cms/jstree/themes/default/li.gif
  209. 0 cms/{media → static}/cms/jstree/themes/default/marker.gif
  210. 0 cms/{media → static}/cms/jstree/themes/default/marker_rtl.gif
  211. 0 cms/{media → static}/cms/jstree/themes/default/plus.gif
  212. 0 cms/{media → static}/cms/jstree/themes/default/remove.gif
  213. 0 cms/{media → static}/cms/jstree/themes/default/remove.png
  214. 0 cms/{media → static}/cms/jstree/themes/default/rename.png
  215. 0 cms/{media → static}/cms/jstree/themes/default/style.css
  216. 0 cms/{media → static}/cms/jstree/themes/default/throbber.gif
  217. 0 cms/{media → static}/cms/jstree/tree_component.css
  218. 0 cms/{media → static}/cms/jstree/tree_component.js
  219. 0 cms/{media → static}/cms/swf/expressInstall.swf
  220. 0 cms/{media → static}/cms/swf/player.swf
  221. 0 cms/{media → static}/cms/wymeditor/iframe/default/lbl-blockquote.png
  222. 0 cms/{media → static}/cms/wymeditor/iframe/default/lbl-h1.png
  223. 0 cms/{media → static}/cms/wymeditor/iframe/default/lbl-h2.png
  224. 0 cms/{media → static}/cms/wymeditor/iframe/default/lbl-h3.png
  225. 0 cms/{media → static}/cms/wymeditor/iframe/default/lbl-h4.png
  226. 0 cms/{media → static}/cms/wymeditor/iframe/default/lbl-h5.png
  227. 0 cms/{media → static}/cms/wymeditor/iframe/default/lbl-h6.png
  228. 0 cms/{media → static}/cms/wymeditor/iframe/default/lbl-p.png
  229. 0 cms/{media → static}/cms/wymeditor/iframe/default/lbl-pre.png
  230. 0 cms/{media → static}/cms/wymeditor/iframe/default/wymiframe.css
  231. 0 cms/{media → static}/cms/wymeditor/iframe/default/wymiframe.html
  232. 0 cms/{media → static}/cms/wymeditor/jquery.wymeditor.js
  233. 0 cms/{media → static}/cms/wymeditor/jquery.wymeditor.min.js
  234. 0 cms/{media → static}/cms/wymeditor/jquery.wymeditor.pack.js
  235. 0 cms/{media → static}/cms/wymeditor/lang/bg.js
  236. 0 cms/{media → static}/cms/wymeditor/lang/ca.js
  237. 0 cms/{media → static}/cms/wymeditor/lang/cs.js
  238. 0 cms/{media → static}/cms/wymeditor/lang/de.js
  239. 0 cms/{media → static}/cms/wymeditor/lang/en.js
  240. 0 cms/{media → static}/cms/wymeditor/lang/es.js
  241. 0 cms/{media → static}/cms/wymeditor/lang/fa.js
  242. 0 cms/{media → static}/cms/wymeditor/lang/fi.js
  243. 0 cms/{media → static}/cms/wymeditor/lang/fr.js
  244. 0 cms/{media → static}/cms/wymeditor/lang/he.js
  245. 0 cms/{media → static}/cms/wymeditor/lang/hr.js
  246. 0 cms/{media → static}/cms/wymeditor/lang/hu.js
  247. 0 cms/{media → static}/cms/wymeditor/lang/it.js
  248. 0 cms/{media → static}/cms/wymeditor/lang/nb.js
  249. 0 cms/{media → static}/cms/wymeditor/lang/nl.js
  250. 0 cms/{media → static}/cms/wymeditor/lang/nn.js
  251. 0 cms/{media → static}/cms/wymeditor/lang/pl.js
  252. 0 cms/{media → static}/cms/wymeditor/lang/pt-br.js
  253. 0 cms/{media → static}/cms/wymeditor/lang/pt.js
  254. 0 cms/{media → static}/cms/wymeditor/lang/ru.js
  255. 0 cms/{media → static}/cms/wymeditor/lang/sv.js
  256. 0 cms/{media → static}/cms/wymeditor/lang/tr.js
  257. 0 cms/{media → static}/cms/wymeditor/lang/zh_cn.js
  258. 0 cms/{media → static}/cms/wymeditor/plugins/embed/jquery.wymeditor.embed.js
  259. 0 cms/{media → static}/cms/wymeditor/plugins/fullscreen/icon_fullscreen.gif
  260. 0 cms/{media → static}/cms/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js
  261. 0 cms/{media → static}/cms/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js
  262. 0 cms/{media → static}/cms/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js
  263. 0 cms/{media → static}/cms/wymeditor/plugins/resizable/readme.txt
  264. 0 cms/{media/cms/wymeditor/skins/twopanels → static/cms/wymeditor/skins/compact}/icons.png
  265. 0 cms/{media → static}/cms/wymeditor/skins/compact/skin.css
  266. 0 cms/{media → static}/cms/wymeditor/skins/compact/skin.js
  267. 0 cms/{media → static}/cms/wymeditor/skins/default/icons.png
  268. 0 cms/{media → static}/cms/wymeditor/skins/default/skin.css
  269. 0 cms/{media → static}/cms/wymeditor/skins/default/skin.js
  270. 0 cms/{media/cms/wymeditor/skins/silver → static/cms/wymeditor/skins/minimal}/images/bg.header.gif
  271. 0 ...ia/cms/wymeditor/skins/silver → static/cms/wymeditor/skins/minimal}/images/bg.selector.silver.gif
  272. 0 cms/{media/cms/wymeditor/skins/silver → static/cms/wymeditor/skins/minimal}/images/bg.wymeditor.png
  273. 0 cms/{media/cms/wymeditor/skins/silver → static/cms/wymeditor/skins/minimal}/images/icons.silver.gif
  274. 0 cms/{media → static}/cms/wymeditor/skins/minimal/skin.css
  275. 0 cms/{media → static}/cms/wymeditor/skins/minimal/skin.js
  276. 0 cms/{media → static}/cms/wymeditor/skins/silver/COPYING
  277. 0 cms/{media → static}/cms/wymeditor/skins/silver/README
  278. 0 cms/{media/cms/wymeditor/skins/minimal → static/cms/wymeditor/skins/silver}/images/bg.header.gif
  279. 0 ...ia/cms/wymeditor/skins/minimal → static/cms/wymeditor/skins/silver}/images/bg.selector.silver.gif
  280. 0 cms/{media/cms/wymeditor/skins/minimal → static/cms/wymeditor/skins/silver}/images/bg.wymeditor.png
  281. 0 cms/{media/cms/wymeditor/skins/minimal → static/cms/wymeditor/skins/silver}/images/icons.silver.gif
  282. 0 cms/{media → static}/cms/wymeditor/skins/silver/skin.css
  283. 0 cms/{media → static}/cms/wymeditor/skins/silver/skin.js
  284. 0 cms/{media/cms/wymeditor/skins/compact → static/cms/wymeditor/skins/twopanels}/icons.png
  285. 0 cms/{media → static}/cms/wymeditor/skins/twopanels/skin.css
  286. 0 cms/{media → static}/cms/wymeditor/skins/twopanels/skin.js
  287. 0 cms/{media → static}/cms/wymeditor/skins/wymeditor_icon.png
  288. +2 −2 cms/templates/admin/cms/page/change_form.html
  289. +21 −21 cms/templates/admin/cms/page/change_list.html
  290. +1 −1 cms/templates/admin/cms/page/plugin_change_form.html
  291. +2 −2 cms/templates/admin/cms/page/plugin_forms_history.html
  292. +3 −3 cms/templates/cms/new.html
  293. +8 −8 cms/templates/cms/toolbar/toolbar.html
  294. +1 −1 cms/tests/plugins.py
  295. +4 −4 cms/toolbar/items.py
  296. +2 −2 cms/utils/__init__.py
  297. +1 −0 tests/buildout.cfg
  298. +1 −0 tests/django-12.cfg
  299. +3 −0 tests/project/settings.py
  300. +1 −0 tests/project/urls.py
View
4 cms/admin/pageadmin.py
@@ -164,14 +164,14 @@ class PageAdmin(ModelAdmin):
class Media:
css = {
- 'all': [os.path.join(settings.CMS_MEDIA_URL, path) for path in (
+ 'all': [os.path.join(settings.STATIC_URL, 'cms', path) for path in (
'css/rte.css',
'css/pages.css',
'css/change_form.css',
'css/jquery.dialog.css',
)]
}
- js = [os.path.join(settings.CMS_MEDIA_URL, path) for path in (
+ js = [os.path.join(settings.STATIC_URL, 'cms', path) for path in (
'js/lib/jquery.js',
'js/lib/jquery.query.js',
'js/lib/ui.core.js',
View
4 cms/admin/placeholderadmin.py
@@ -21,15 +21,15 @@ class PlaceholderAdmin(ModelAdmin):
class Media:
css = {
- 'all': [os.path.join(settings.CMS_MEDIA_URL, path) for path in (
+ 'all': [os.path.join(settings.STATIC_URL, 'cms', path) for path in (
'css/rte.css',
'css/pages.css',
'css/change_form.css',
'css/jquery.dialog.css',
'css/plugin_editor.css',
)]
}
- js = [os.path.join(settings.CMS_MEDIA_URL, path) for path in (
+ js = [os.path.join(settings.STATIC_URL, 'cms', path) for path in (
'js/lib/jquery.js',
'js/csrf.js',
'js/lib/jquery.query.js',
View
6 cms/forms/widgets.py
@@ -130,13 +130,13 @@ def __init__(self, attrs=None):
self.attrs = {}
class Media:
- js = [join(settings.CMS_MEDIA_URL, path) for path in (
+ js = [join(settings.STATIC_URL, 'cms', path) for path in (
'js/lib/ui.core.js',
'js/lib/ui.sortable.js',
'js/plugin_editor.js',
)]
css = {
- 'all': [join(settings.CMS_MEDIA_URL, path) for path in (
+ 'all': [join(settings.STATIC_URL, 'cms', path) for path in (
'css/plugin_editor.css',
)]
}
@@ -217,4 +217,4 @@ def render(self, name, value, attrs=None):
#return mark_safe(render_to_string(
# 'admin/cms/page/widgets/plugin_editor.html', context))
return mark_safe(render_to_string(
- 'admin/cms/page/widgets/placeholder_editor.html', context, RequestContext(self.request)))
+ 'admin/cms/page/widgets/placeholder_editor.html', context, RequestContext(self.request)))
View
543 cms/media/cms/js/lib/effects.core.js
@@ -1,543 +0,0 @@
-/*
- * jQuery UI Effects 1.7.1
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/
- */
-;jQuery.effects || (function($) {
-
-$.effects = {
- version: "1.7.1",
-
- // Saves a set of properties in a data storage
- save: function(element, set) {
- for(var i=0; i < set.length; i++) {
- if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);
- }
- },
-
- // Restores a set of previously saved properties from a data storage
- restore: function(element, set) {
- for(var i=0; i < set.length; i++) {
- if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));
- }
- },
-
- setMode: function(el, mode) {
- if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
- return mode;
- },
-
- getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- var y, x;
- switch (origin[0]) {
- case 'top': y = 0; break;
- case 'middle': y = 0.5; break;
- case 'bottom': y = 1; break;
- default: y = origin[0] / original.height;
- };
- switch (origin[1]) {
- case 'left': x = 0; break;
- case 'center': x = 0.5; break;
- case 'right': x = 1; break;
- default: x = origin[1] / original.width;
- };
- return {x: x, y: y};
- },
-
- // Wraps the element around a wrapper that copies position properties
- createWrapper: function(element) {
-
- //if the element is already wrapped, return it
- if (element.parent().is('.ui-effects-wrapper'))
- return element.parent();
-
- //Cache width,height and float properties of the element, and create a wrapper around it
- var props = { width: element.outerWidth(true), height: element.outerHeight(true), 'float': element.css('float') };
- element.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');
- var wrapper = element.parent();
-
- //Transfer the positioning of the element to the wrapper
- if (element.css('position') == 'static') {
- wrapper.css({ position: 'relative' });
- element.css({ position: 'relative'} );
- } else {
- var top = element.css('top'); if(isNaN(parseInt(top,10))) top = 'auto';
- var left = element.css('left'); if(isNaN(parseInt(left,10))) left = 'auto';
- wrapper.css({ position: element.css('position'), top: top, left: left, zIndex: element.css('z-index') }).show();
- element.css({position: 'relative', top: 0, left: 0 });
- }
-
- wrapper.css(props);
- return wrapper;
- },
-
- removeWrapper: function(element) {
- if (element.parent().is('.ui-effects-wrapper'))
- return element.parent().replaceWith(element);
- return element;
- },
-
- setTransition: function(element, list, factor, value) {
- value = value || {};
- $.each(list, function(i, x){
- unit = element.cssUnit(x);
- if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];
- });
- return value;
- },
-
- //Base function to animate from one class to another in a seamless transition
- animateClass: function(value, duration, easing, callback) {
-
- var cb = (typeof easing == "function" ? easing : (callback ? callback : null));
- var ea = (typeof easing == "string" ? easing : null);
-
- return this.each(function() {
-
- var offset = {}; var that = $(this); var oldStyleAttr = that.attr("style") || '';
- if(typeof oldStyleAttr == 'object') oldStyleAttr = oldStyleAttr["cssText"]; /* Stupidly in IE, style is a object.. */
- if(value.toggle) { that.hasClass(value.toggle) ? value.remove = value.toggle : value.add = value.toggle; }
-
- //Let's get a style offset
- var oldStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
- if(value.add) that.addClass(value.add); if(value.remove) that.removeClass(value.remove);
- var newStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
- if(value.add) that.removeClass(value.add); if(value.remove) that.addClass(value.remove);
-
- // The main function to form the object for animation
- for(var n in newStyle) {
- if( typeof newStyle[n] != "function" && newStyle[n] /* No functions and null properties */
- && n.indexOf("Moz") == -1 && n.indexOf("length") == -1 /* No mozilla spezific render properties. */
- && newStyle[n] != oldStyle[n] /* Only values that have changed are used for the animation */
- && (n.match(/color/i) || (!n.match(/color/i) && !isNaN(parseInt(newStyle[n],10)))) /* Only things that can be parsed to integers or colors */
- && (oldStyle.position != "static" || (oldStyle.position == "static" && !n.match(/left|top|bottom|right/))) /* No need for positions when dealing with static positions */
- ) offset[n] = newStyle[n];
- }
-
- that.animate(offset, duration, ea, function() { // Animate the newly constructed offset object
- // Change style attribute back to original. For stupid IE, we need to clear the damn object.
- if(typeof $(this).attr("style") == 'object') { $(this).attr("style")["cssText"] = ""; $(this).attr("style")["cssText"] = oldStyleAttr; } else $(this).attr("style", oldStyleAttr);
- if(value.add) $(this).addClass(value.add); if(value.remove) $(this).removeClass(value.remove);
- if(cb) cb.apply(this, arguments);
- });
-
- });
- }
-};
-
-
-function _normalizeArguments(a, m) {
-
- var o = a[1] && a[1].constructor == Object ? a[1] : {}; if(m) o.mode = m;
- var speed = a[1] && a[1].constructor != Object ? a[1] : (o.duration ? o.duration : a[2]); //either comes from options.duration or the secon/third argument
- speed = $.fx.off ? 0 : typeof speed === "number" ? speed : $.fx.speeds[speed] || $.fx.speeds._default;
- var callback = o.callback || ( $.isFunction(a[1]) && a[1] ) || ( $.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] );
-
- return [a[0], o, speed, callback];
-
-}
-
-//Extend the methods of jQuery
-$.fn.extend({
-
- //Save old methods
- _show: $.fn.show,
- _hide: $.fn.hide,
- __toggle: $.fn.toggle,
- _addClass: $.fn.addClass,
- _removeClass: $.fn.removeClass,
- _toggleClass: $.fn.toggleClass,
-
- // New effect methods
- effect: function(fx, options, speed, callback) {
- return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: options || {}, duration: speed, callback: callback }) : null;
- },
-
- show: function() {
- if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
- return this._show.apply(this, arguments);
- else {
- return this.effect.apply(this, _normalizeArguments(arguments, 'show'));
- }
- },
-
- hide: function() {
- if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
- return this._hide.apply(this, arguments);
- else {
- return this.effect.apply(this, _normalizeArguments(arguments, 'hide'));
- }
- },
-
- toggle: function(){
- if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) || (arguments[0].constructor == Function))
- return this.__toggle.apply(this, arguments);
- else {
- return this.effect.apply(this, _normalizeArguments(arguments, 'toggle'));
- }
- },
-
- addClass: function(classNames, speed, easing, callback) {
- return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
- },
- removeClass: function(classNames,speed,easing,callback) {
- return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
- },
- toggleClass: function(classNames,speed,easing,callback) {
- return ( (typeof speed !== "boolean") && speed ) ? $.effects.animateClass.apply(this, [{ toggle: classNames },speed,easing,callback]) : this._toggleClass(classNames, speed);
- },
- morph: function(remove,add,speed,easing,callback) {
- return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
- },
- switchClass: function() {
- return this.morph.apply(this, arguments);
- },
-
- // helper functions
- cssUnit: function(key) {
- var style = this.css(key), val = [];
- $.each( ['em','px','%','pt'], function(i, unit){
- if(style.indexOf(unit) > 0)
- val = [parseFloat(style), unit];
- });
- return val;
- }
-});
-
-/*
- * jQuery Color Animations
- * Copyright 2007 John Resig
- * Released under the MIT and GPL licenses.
- */
-
-// We override the animation for all of these color styles
-$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
- $.fx.step[attr] = function(fx) {
- if ( fx.state == 0 ) {
- fx.start = getColor( fx.elem, attr );
- fx.end = getRGB( fx.end );
- }
-
- fx.elem.style[attr] = "rgb(" + [
- Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0],10), 255), 0),
- Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1],10), 255), 0),
- Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2],10), 255), 0)
- ].join(",") + ")";
- };
-});
-
-// Color Conversion functions from highlightFade
-// By Blair Mitchelmore
-// http://jquery.offput.ca/highlightFade/
-
-// Parse strings looking for color tuples [255,255,255]
-function getRGB(color) {
- var result;
-
- // Check if we're already dealing with an array of colors
- if ( color && color.constructor == Array && color.length == 3 )
- return color;
-
- // Look for rgb(num,num,num)
- if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
- return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];
-
- // Look for rgb(num%,num%,num%)
- if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
- return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
-
- // Look for #a0b1c2
- if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
- return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
-
- // Look for #fff
- if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
- return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
-
- // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
- if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
- return colors['transparent'];
-
- // Otherwise, we're most likely dealing with a named color
- return colors[$.trim(color).toLowerCase()];
-}
-
-function getColor(elem, attr) {
- var color;
-
- do {
- color = $.curCSS(elem, attr);
-
- // Keep going until we find an element that has color, or we hit the body
- if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )
- break;
-
- attr = "backgroundColor";
- } while ( elem = elem.parentNode );
-
- return getRGB(color);
-};
-
-// Some named colors to work with
-// From Interface by Stefan Petre
-// http://interface.eyecon.ro/
-
-var colors = {
- aqua:[0,255,255],
- azure:[240,255,255],
- beige:[245,245,220],
- black:[0,0,0],
- blue:[0,0,255],
- brown:[165,42,42],
- cyan:[0,255,255],
- darkblue:[0,0,139],
- darkcyan:[0,139,139],
- darkgrey:[169,169,169],
- darkgreen:[0,100,0],
- darkkhaki:[189,183,107],
- darkmagenta:[139,0,139],
- darkolivegreen:[85,107,47],
- darkorange:[255,140,0],
- darkorchid:[153,50,204],
- darkred:[139,0,0],
- darksalmon:[233,150,122],
- darkviolet:[148,0,211],
- fuchsia:[255,0,255],
- gold:[255,215,0],
- green:[0,128,0],
- indigo:[75,0,130],
- khaki:[240,230,140],
- lightblue:[173,216,230],
- lightcyan:[224,255,255],
- lightgreen:[144,238,144],
- lightgrey:[211,211,211],
- lightpink:[255,182,193],
- lightyellow:[255,255,224],
- lime:[0,255,0],
- magenta:[255,0,255],
- maroon:[128,0,0],
- navy:[0,0,128],
- olive:[128,128,0],
- orange:[255,165,0],
- pink:[255,192,203],
- purple:[128,0,128],
- violet:[128,0,128],
- red:[255,0,0],
- silver:[192,192,192],
- white:[255,255,255],
- yellow:[255,255,0],
- transparent: [255,255,255]
-};
-
-/*
- * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
- *
- * Uses the built in easing capabilities added In jQuery 1.1
- * to offer multiple easing options
- *
- * TERMS OF USE - jQuery Easing
- *
- * Open source under the BSD License.
- *
- * Copyright 2008 George McGinley Smith
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * Neither the name of the author nor the names of contributors may be used to endorse
- * or promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
-*/
-
-// t: current time, b: begInnIng value, c: change In value, d: duration
-$.easing.jswing = $.easing.swing;
-
-$.extend($.easing,
-{
- def: 'easeOutQuad',
- swing: function (x, t, b, c, d) {
- //alert($.easing.default);
- return $.easing[$.easing.def](x, t, b, c, d);
- },
- easeInQuad: function (x, t, b, c, d) {
- return c*(t/=d)*t + b;
- },
- easeOutQuad: function (x, t, b, c, d) {
- return -c *(t/=d)*(t-2) + b;
- },
- easeInOutQuad: function (x, t, b, c, d) {
- if ((t/=d/2) < 1) return c/2*t*t + b;
- return -c/2 * ((--t)*(t-2) - 1) + b;
- },
- easeInCubic: function (x, t, b, c, d) {
- return c*(t/=d)*t*t + b;
- },
- easeOutCubic: function (x, t, b, c, d) {
- return c*((t=t/d-1)*t*t + 1) + b;
- },
- easeInOutCubic: function (x, t, b, c, d) {
- if ((t/=d/2) < 1) return c/2*t*t*t + b;
- return c/2*((t-=2)*t*t + 2) + b;
- },
- easeInQuart: function (x, t, b, c, d) {
- return c*(t/=d)*t*t*t + b;
- },
- easeOutQuart: function (x, t, b, c, d) {
- return -c * ((t=t/d-1)*t*t*t - 1) + b;
- },
- easeInOutQuart: function (x, t, b, c, d) {
- if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
- return -c/2 * ((t-=2)*t*t*t - 2) + b;
- },
- easeInQuint: function (x, t, b, c, d) {
- return c*(t/=d)*t*t*t*t + b;
- },
- easeOutQuint: function (x, t, b, c, d) {
- return c*((t=t/d-1)*t*t*t*t + 1) + b;
- },
- easeInOutQuint: function (x, t, b, c, d) {
- if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
- return c/2*((t-=2)*t*t*t*t + 2) + b;
- },
- easeInSine: function (x, t, b, c, d) {
- return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
- },
- easeOutSine: function (x, t, b, c, d) {
- return c * Math.sin(t/d * (Math.PI/2)) + b;
- },
- easeInOutSine: function (x, t, b, c, d) {
- return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
- },
- easeInExpo: function (x, t, b, c, d) {
- return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
- },
- easeOutExpo: function (x, t, b, c, d) {
- return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
- },
- easeInOutExpo: function (x, t, b, c, d) {
- if (t==0) return b;
- if (t==d) return b+c;
- if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
- return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
- },
- easeInCirc: function (x, t, b, c, d) {
- return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
- },
- easeOutCirc: function (x, t, b, c, d) {
- return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
- },
- easeInOutCirc: function (x, t, b, c, d) {
- if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
- return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
- },
- easeInElastic: function (x, t, b, c, d) {
- var s=1.70158;var p=0;var a=c;
- if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
- if (a < Math.abs(c)) { a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin (c/a);
- return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
- },
- easeOutElastic: function (x, t, b, c, d) {
- var s=1.70158;var p=0;var a=c;
- if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
- if (a < Math.abs(c)) { a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin (c/a);
- return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
- },
- easeInOutElastic: function (x, t, b, c, d) {
- var s=1.70158;var p=0;var a=c;
- if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
- if (a < Math.abs(c)) { a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin (c/a);
- if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
- return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
- },
- easeInBack: function (x, t, b, c, d, s) {
- if (s == undefined) s = 1.70158;
- return c*(t/=d)*t*((s+1)*t - s) + b;
- },
- easeOutBack: function (x, t, b, c, d, s) {
- if (s == undefined) s = 1.70158;
- return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
- },
- easeInOutBack: function (x, t, b, c, d, s) {
- if (s == undefined) s = 1.70158;
- if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
- return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
- },
- easeInBounce: function (x, t, b, c, d) {
- return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;
- },
- easeOutBounce: function (x, t, b, c, d) {
- if ((t/=d) < (1/2.75)) {
- return c*(7.5625*t*t) + b;
- } else if (t < (2/2.75)) {
- return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
- } else if (t < (2.5/2.75)) {
- return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
- } else {
- return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
- }
- },
- easeInOutBounce: function (x, t, b, c, d) {
- if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
- return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
- }
-});
-
-/*
- *
- * TERMS OF USE - EASING EQUATIONS
- *
- * Open source under the BSD License.
- *
- * Copyright 2001 Robert Penner
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * Neither the name of the author nor the names of contributors may be used to endorse
- * or promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-})(jQuery);
View
48 cms/media/cms/js/lib/effects.highlight.js
@@ -1,48 +0,0 @@
-/*
- * jQuery UI Effects Highlight 1.7.1
- *
- * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * http://docs.jquery.com/UI/Effects/Highlight
- *
- * Depends:
- * effects.core.js
- */
-(function($) {
-
-$.effects.highlight = function(o) {
-
- return this.queue(function() {
-
- // Create element
- var el = $(this), props = ['backgroundImage','backgroundColor','opacity'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
- var color = o.options.color || "#ffff99"; // Default highlight color
- var oldColor = el.css("backgroundColor");
-
- // Adjust
- $.effects.save(el, props); el.show(); // Save & Show
- el.css({backgroundImage: 'none', backgroundColor: color}); // Shift
-
- // Animation
- var animation = {backgroundColor: oldColor };
- if (mode == "hide") animation['opacity'] = 0;
-
- // Animate
- el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
- if(mode == "hide") el.hide();
- $.effects.restore(el, props);
- if (mode == "show" && $.browser.msie) this.style.removeAttribute('filter');
- if(o.callback) o.callback.apply(this, arguments);
- el.dequeue();
- }});
-
- });
-
-};
-
-})(jQuery);
View
34 cms/media/cms/js/lib/functional.js
@@ -1,34 +0,0 @@
-(function($){
- $.curry = function(fn) {
- if (arguments.length < 2) return fn;
- args = $.makeArray(arguments).slice(1, arguments.length);
- return function() {
- return fn.apply(this, args.concat($.makeArray(arguments)));
- }
- }
-
- $.__callbackPool = {};
-
- $.callbackRegister = function(name, fn /*, arg0, arg1, ..*/){
- if (arguments.length > 2) {
- // create curried function
- fn = $.curry.apply(this, $.makeArray(arguments).slice(1, arguments.length));
- }
- $.__callbackPool[name] = fn;
- return name;
- }
-
- $.callbackCall = function(name/*, extra arg0, extra arg1, ..*/){
- if (!name || !name in $.__callbackPool) {
- throw "No callback registered with name: " + name;
- }
- $.__callbackPool[name].apply(this, $.makeArray(arguments).slice(1, arguments.length));
- $.callbackRemove(name);
- return name;
- }
-
- $.callbackRemove = function(name) {
- delete $.__callbackPool[name];
- }
-
-})(jQuery);
View
52 cms/media/cms/js/lib/jquery.backgroundposition.js
@@ -1,52 +0,0 @@
-(function($){
-
- if(!document.defaultView || !document.defaultView.getComputedStyle){
- var oldCurCSS = jQuery.curCSS;
- jQuery.curCSS = function(elem, name, force){
- if(name !== 'backgroundPosition' || !elem.currentStyle || elem.currentStyle[ name ]){
- return oldCurCSS.apply(this, arguments);
- }
- var style = elem.style;
- if ( !force && style && style[ name ] ){
- return style[ name ];
- }
- return oldCurCSS(elem, 'backgroundPositionX', force) +' '+ oldCurCSS(elem, 'backgroundPositionY', force);
- };
- }
-})(jQuery);
-
-(function($) {
-
- function toArray(strg){
- strg = strg.replace(/left|top/g,'0px');
- strg = strg.replace(/right|bottom/g,'100%');
- strg = strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");
- var res = strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);
- return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];
- }
-
- $.fx.step. backgroundPosition = function(fx) {
- if (!fx.bgPosReady) {
-
- var start = $.curCSS(fx.elem,'backgroundPosition');
- if(!start){//FF2 no inline-style fallback
- start = '0px 0px';
- }
-
- start = toArray(start);
- fx.start = [start[0],start[2]];
-
- var end = toArray(fx.options.curAnim.backgroundPosition);
- fx.end = [end[0],end[2]];
-
- fx.unit = [end[1],end[3]];
- fx.bgPosReady = true;
- }
-
- var nowPosX = [];
- nowPosX[0] = ((fx.end[0] - fx.start[0]) * fx.pos) + fx.start[0] + fx.unit[0];
- nowPosX[1] = ((fx.end[1] - fx.start[1]) * fx.pos) + fx.start[1] + fx.unit[1];
- fx.elem.style.backgroundPosition = nowPosX[0]+' '+nowPosX[1];
-
- };
-})(jQuery);
View
21 cms/media/cms/js/lib/jquery.bind.js
@@ -1,21 +0,0 @@
-/**
- * @author trixta
- */
-(function($){
-
-$.bind = function(object, method){
- var args = Array.prototype.slice.call(arguments, 2);
- if(args.length){
- return function() {
- var args2 = [this].concat(args, $.makeArray( arguments ));
- return method.apply(object, args2);
- };
- } else {
- return function() {
- var args2 = [this].concat($.makeArray( arguments ));
- return method.apply(object, args2);
- };
- }
-};
-
-})(jQuery);
View
96 cms/media/cms/js/lib/jquery.cookie.js
@@ -1,96 +0,0 @@
-/**
- * Cookie plugin
- *
- * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- */
-
-/**
- * Create a cookie with the given name and value and other optional parameters.
- *
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Set the value of a cookie.
- * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
- * @desc Create a cookie with all available options.
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Create a session cookie.
- * @example $.cookie('the_cookie', null);
- * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
- * used when the cookie was set.
- *
- * @param String name The name of the cookie.
- * @param String value The value of the cookie.
- * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
- * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
- * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
- * If set to null or omitted, the cookie will be a session cookie and will not be retained
- * when the the browser exits.
- * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
- * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
- * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
- * require a secure protocol (like HTTPS).
- * @type undefined
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-
-/**
- * Get the value of a cookie with the given name.
- *
- * @example $.cookie('the_cookie');
- * @desc Get the value of a cookie.
- *
- * @param String name The name of the cookie.
- * @return The value of the cookie.
- * @type String
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-jQuery.cookie = function(name, value, options) {
- if (typeof value != 'undefined') { // name and value given, set cookie
- options = options || {};
- if (value === null) {
- value = '';
- options.expires = -1;
- }
- var expires = '';
- if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
- var date;
- if (typeof options.expires == 'number') {
- date = new Date();
- date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
- } else {
- date = options.expires;
- }
- expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
- }
- // CAUTION: Needed to parenthesize options.path and options.domain
- // in the following expressions, otherwise they evaluate to undefined
- // in the packed version for some reason...
- var path = options.path ? '; path=' + (options.path) : '';
- var domain = options.domain ? '; domain=' + (options.domain) : '';
- var secure = options.secure ? '; secure' : '';
- document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
- } else { // only name given, get cookie
- var cookieValue = null;
- if (document.cookie && document.cookie != '') {
- var cookies = document.cookie.split(';');
- for (var i = 0; i < cookies.length; i++) {
- var cookie = jQuery.trim(cookies[i]);
- // Does this cookie string begin with the name we want?
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
- break;
- }
- }
- }
- return cookieValue;
- }
-};
View
643 cms/media/cms/js/lib/jquery.form.js
@@ -1,643 +0,0 @@
-/*
- * jQuery Form Plugin
- * version: 2.28 (10-MAY-2009)
- * @requires jQuery v1.2.2 or later
- *
- * Examples and documentation at: http://malsup.com/jquery/form/
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- */
-;(function($) {
-
-/*
- Usage Note:
- -----------
- Do not use both ajaxSubmit and ajaxForm on the same form. These
- functions are intended to be exclusive. Use ajaxSubmit if you want
- to bind your own submit handler to the form. For example,
-
- $(document).ready(function() {
- $('#myForm').bind('submit', function() {
- $(this).ajaxSubmit({
- target: '#output'
- });
- return false; // <-- important!
- });
- });
-
- Use ajaxForm when you want the plugin to manage all the event binding
- for you. For example,
-
- $(document).ready(function() {
- $('#myForm').ajaxForm({
- target: '#output'
- });
- });
-
- When using ajaxForm, the ajaxSubmit function will be invoked for you
- at the appropriate time.
-*/
-
-/**
- * ajaxSubmit() provides a mechanism for immediately submitting
- * an HTML form using AJAX.
- */
-$.fn.ajaxSubmit = function(options) {
- // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
- if (!this.length) {
- log('ajaxSubmit: skipping submit process - no element selected');
- return this;
- }
-
- if (typeof options == 'function')
- options = { success: options };
-
- var url = $.trim(this.attr('action'));
- if (url) {
- // clean url (don't include hash vaue)
- url = (url.match(/^([^#]+)/)||[])[1];
- }
- url = url || window.location.href || ''
-
- options = $.extend({
- url: url,
- type: this.attr('method') || 'GET'
- }, options || {});
-
- // hook for manipulating the form data before it is extracted;
- // convenient for use with rich editors like tinyMCE or FCKEditor
- var veto = {};
- this.trigger('form-pre-serialize', [this, options, veto]);
- if (veto.veto) {
- log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
- return this;
- }
-
- // provide opportunity to alter form data before it is serialized
- if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
- log('ajaxSubmit: submit aborted via beforeSerialize callback');
- return this;
- }
-
- var a = this.formToArray(options.semantic);
- if (options.data) {
- options.extraData = options.data;
- for (var n in options.data) {
- if(options.data[n] instanceof Array) {
- for (var k in options.data[n])
- a.push( { name: n, value: options.data[n][k] } );
- }
- else
- a.push( { name: n, value: options.data[n] } );
- }
- }
-
- // give pre-submit callback an opportunity to abort the submit
- if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
- log('ajaxSubmit: submit aborted via beforeSubmit callback');
- return this;
- }
-
- // fire vetoable 'validate' event
- this.trigger('form-submit-validate', [a, this, options, veto]);
- if (veto.veto) {
- log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
- return this;
- }
-
- var q = $.param(a);
-
- if (options.type.toUpperCase() == 'GET') {
- options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
- options.data = null; // data is null for 'get'
- }
- else
- options.data = q; // data is the query string for 'post'
-
- var $form = this, callbacks = [];
- if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
- if (options.clearForm) callbacks.push(function() { $form.clearForm(); });
-
- // perform a load on the target only if dataType is not provided
- if (!options.dataType && options.target) {
- var oldSuccess = options.success || function(){};
- callbacks.push(function(data) {
- $(options.target).html(data).each(oldSuccess, arguments);
- });
- }
- else if (options.success)
- callbacks.push(options.success);
-
- options.success = function(data, status) {
- for (var i=0, max=callbacks.length; i < max; i++)
- callbacks[i].apply(options, [data, status, $form]);
- };
-
- // are there files to upload?
- var files = $('input:file', this).fieldValue();
- var found = false;
- for (var j=0; j < files.length; j++)
- if (files[j])
- found = true;
-
- var multipart = false;
-// var mp = 'multipart/form-data';
-// multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
-
- // options.iframe allows user to force iframe mode
- if (options.iframe || found || multipart) {
- // hack to fix Safari hang (thanks to Tim Molendijk for this)
- // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
- if (options.closeKeepAlive)
- $.get(options.closeKeepAlive, fileUpload);
- else
- fileUpload();
- }
- else
- $.ajax(options);
-
- // fire 'notify' event
- this.trigger('form-submit-notify', [this, options]);
- return this;
-
-
- // private function for handling file uploads (hat tip to YAHOO!)
- function fileUpload() {
- var form = $form[0];
-
- if ($(':input[name=submit]', form).length) {
- alert('Error: Form elements must not be named "submit".');
- return;
- }
-
- var opts = $.extend({}, $.ajaxSettings, options);
- var s = $.extend(true, {}, $.extend(true, {}, $.ajaxSettings), opts);
-
- var id = 'jqFormIO' + (new Date().getTime());
- var $io = $('<iframe id="' + id + '" name="' + id + '" src="about:blank" />');
- var io = $io[0];
-
- $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
-
- var xhr = { // mock object
- aborted: 0,
- responseText: null,
- responseXML: null,
- status: 0,
- statusText: 'n/a',
- getAllResponseHeaders: function() {},
- getResponseHeader: function() {},
- setRequestHeader: function() {},
- abort: function() {
- this.aborted = 1;
- $io.attr('src','about:blank'); // abort op in progress
- }
- };
-
- var g = opts.global;
- // trigger ajax global events so that activity/block indicators work like normal
- if (g && ! $.active++) $.event.trigger("ajaxStart");
- if (g) $.event.trigger("ajaxSend", [xhr, opts]);
-
- if (s.beforeSend && s.beforeSend(xhr, s) === false) {
- s.global && $.active--;
- return;
- }
- if (xhr.aborted)
- return;
-
- var cbInvoked = 0;
- var timedOut = 0;
-
- // add submitting element to data if we know it
- var sub = form.clk;
- if (sub) {
- var n = sub.name;
- if (n && !sub.disabled) {
- options.extraData = options.extraData || {};
- options.extraData[n] = sub.value;
- if (sub.type == "image") {
- options.extraData[name+'.x'] = form.clk_x;
- options.extraData[name+'.y'] = form.clk_y;
- }
- }
- }
-
- // take a breath so that pending repaints get some cpu time before the upload starts
- setTimeout(function() {
- // make sure form attrs are set
- var t = $form.attr('target'), a = $form.attr('action');
-
- // update form attrs in IE friendly way
- form.setAttribute('target',id);
- if (form.getAttribute('method') != 'POST')
- form.setAttribute('method', 'POST');
- if (form.getAttribute('action') != opts.url)
- form.setAttribute('action', opts.url);
-
- // ie borks in some cases when setting encoding
- if (! options.skipEncodingOverride) {
- $form.attr({
- encoding: 'multipart/form-data',
- enctype: 'multipart/form-data'
- });
- }
-
- // support timout
- if (opts.timeout)
- setTimeout(function() { timedOut = true; cb(); }, opts.timeout);
-
- // add "extra" data to form if provided in options
- var extraInputs = [];
- try {
- if (options.extraData)
- for (var n in options.extraData)
- extraInputs.push(
- $('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />')
- .appendTo(form)[0]);
-
- // add iframe to doc and submit the form
- $io.appendTo('body');
- io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
- form.submit();
- }
- finally {
- // reset attrs and remove "extra" input elements
- form.setAttribute('action',a);
- t ? form.setAttribute('target', t) : $form.removeAttr('target');
- $(extraInputs).remove();
- }
- }, 10);
-
- var nullCheckFlag = 0;
-
- function cb() {
- if (cbInvoked++) return;
-
- io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
-
- var ok = true;
- try {
- if (timedOut) throw 'timeout';
- // extract the server response from the iframe
- var data, doc;
-
- doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
-
- if ((doc.body == null || doc.body.innerHTML == '') && !nullCheckFlag) {
- // in some browsers (cough, Opera 9.2.x) the iframe DOM is not always traversable when
- // the onload callback fires, so we give them a 2nd chance
- nullCheckFlag = 1;
- cbInvoked--;
- setTimeout(cb, 100);
- return;
- }
-
- xhr.responseText = doc.body ? doc.body.innerHTML : null;
- xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
- xhr.getResponseHeader = function(header){
- var headers = {'content-type': opts.dataType};
- return headers[header];
- };
-
- if (opts.dataType == 'json' || opts.dataType == 'script') {
- var ta = doc.getElementsByTagName('textarea')[0];
- xhr.responseText = ta ? ta.value : xhr.responseText;
- }
- else if (opts.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
- xhr.responseXML = toXml(xhr.responseText);
- }
- data = $.httpData(xhr, opts.dataType);
- }
- catch(e){
- ok = false;
- $.handleError(opts, xhr, 'error', e);
- }
-
- // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
- if (ok) {
- opts.success(data, 'success');
- if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
- }
- if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
- if (g && ! --$.active) $.event.trigger("ajaxStop");
- if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');
-
- // clean up
- setTimeout(function() {
- $io.remove();
- xhr.responseXML = null;
- }, 100);
- };
-
- function toXml(s, doc) {
- if (window.ActiveXObject) {
- doc = new ActiveXObject('Microsoft.XMLDOM');
- doc.async = 'false';
- doc.loadXML(s);
- }
- else
- doc = (new DOMParser()).parseFromString(s, 'text/xml');
- return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
- };
- };
-};
-
-/**
- * ajaxForm() provides a mechanism for fully automating form submission.
- *
- * The advantages of using this method instead of ajaxSubmit() are:
- *
- * 1: This method will include coordinates for <input type="image" /> elements (if the element
- * is used to submit the form).
- * 2. This method will include the submit element's name/value data (for the element that was
- * used to submit the form).
- * 3. This method binds the submit() method to the form for you.
- *
- * The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely
- * passes the options argument along after properly binding events for submit elements and
- * the form itself.
- */
-$.fn.ajaxForm = function(options) {
- return this.ajaxFormUnbind().bind('submit.form-plugin',function() {
- $(this).ajaxSubmit(options);
- return false;
- }).each(function() {
- // store options in hash
- $(":submit,input:image", this).bind('click.form-plugin',function(e) {
- var form = this.form;
- form.clk = this;
- if (this.type == 'image') {
- if (e.offsetX != undefined) {
- form.clk_x = e.offsetX;
- form.clk_y = e.offsetY;
- } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
- var offset = $(this).offset();
- form.clk_x = e.pageX - offset.left;
- form.clk_y = e.pageY - offset.top;
- } else {
- form.clk_x = e.pageX - this.offsetLeft;
- form.clk_y = e.pageY - this.offsetTop;
- }
- }
- // clear form vars
- setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 10);
- });
- });
-};
-
-// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
-$.fn.ajaxFormUnbind = function() {
- this.unbind('submit.form-plugin');
- return this.each(function() {
- $(":submit,input:image", this).unbind('click.form-plugin');
- });
-
-};
-
-/**
- * formToArray() gathers form element data into an array of objects that can
- * be passed to any of the following ajax functions: $.get, $.post, or load.
- * Each object in the array has both a 'name' and 'value' property. An example of
- * an array for a simple login form might be:
- *
- * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
- *
- * It is this array that is passed to pre-submit callback functions provided to the
- * ajaxSubmit() and ajaxForm() methods.
- */
-$.fn.formToArray = function(semantic) {
- var a = [];
- if (this.length == 0) return a;
-
- var form = this[0];
- var els = semantic ? form.getElementsByTagName('*') : form.elements;
- if (!els) return a;
- for(var i=0, max=els.length; i < max; i++) {
- var el = els[i];
- var n = el.name;
- if (!n) continue;
-
- if (semantic && form.clk && el.type == "image") {
- // handle image inputs on the fly when semantic == true
- if(!el.disabled && form.clk == el) {
- a.push({name: n, value: $(el).val()});
- a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
- }
- continue;
- }
-
- var v = $.fieldValue(el, true);
- if (v && v.constructor == Array) {
- for(var j=0, jmax=v.length; j < jmax; j++)
- a.push({name: n, value: v[j]});
- }
- else if (v !== null && typeof v != 'undefined')
- a.push({name: n, value: v});
- }
-
- if (!semantic && form.clk) {
- // input type=='image' are not found in elements array! handle it here
- var $input = $(form.clk), input = $input[0], n = input.name;
- if (n && !input.disabled && input.type == 'image') {
- a.push({name: n, value: $input.val()});
- a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
- }
- }
- return a;
-};
-
-/**
- * Serializes form data into a 'submittable' string. This method will return a string
- * in the format: name1=value1&amp;name2=value2
- */
-$.fn.formSerialize = function(semantic) {
- //hand off to jQuery.param for proper encoding
- return $.param(this.formToArray(semantic));
-};
-
-/**
- * Serializes all field elements in the jQuery object into a query string.
- * This method will return a string in the format: name1=value1&amp;name2=value2
- */
-$.fn.fieldSerialize = function(successful) {
- var a = [];
- this.each(function() {
- var n = this.name;
- if (!n) return;
- var v = $.fieldValue(this, successful);
- if (v && v.constructor == Array) {
- for (var i=0,max=v.length; i < max; i++)
- a.push({name: n, value: v[i]});
- }
- else if (v !== null && typeof v != 'undefined')
- a.push({name: this.name, value: v});
- });
- //hand off to jQuery.param for proper encoding
- return $.param(a);
-};
-
-/**
- * Returns the value(s) of the element in the matched set. For example, consider the following form:
- *
- * <form><fieldset>
- * <input name="A" type="text" />
- * <input name="A" type="text" />
- * <input name="B" type="checkbox" value="B1" />
- * <input name="B" type="checkbox" value="B2"/>
- * <input name="C" type="radio" value="C1" />
- * <input name="C" type="radio" value="C2" />
- * </fieldset></form>
- *
- * var v = $(':text').fieldValue();
- * // if no values are entered into the text inputs
- * v == ['','']
- * // if values entered into the text inputs are 'foo' and 'bar'
- * v == ['foo','bar']
- *
- * var v = $(':checkbox').fieldValue();
- * // if neither checkbox is checked
- * v === undefined
- * // if both checkboxes are checked
- * v == ['B1', 'B2']
- *
- * var v = $(':radio').fieldValue();
- * // if neither radio is checked
- * v === undefined
- * // if first radio is checked
- * v == ['C1']
- *
- * The successful argument controls whether or not the field element must be 'successful'
- * (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
- * The default value of the successful argument is true. If this value is false the value(s)
- * for each element is returned.
- *
- * Note: This method *always* returns an array. If no valid value can be determined the
- * array will be empty, otherwise it will contain one or more values.
- */
-$.fn.fieldValue = function(successful) {
- for (var val=[], i=0, max=this.length; i < max; i++) {
- var el = this[i];
- var v = $.fieldValue(el, successful);
- if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
- continue;
- v.constructor == Array ? $.merge(val, v) : val.push(v);
- }
- return val;
-};
-
-/**
- * Returns the value of the field element.
- */
-$.fieldValue = function(el, successful) {
- var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
- if (typeof successful == 'undefined') successful = true;
-
- if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
- (t == 'checkbox' || t == 'radio') && !el.checked ||
- (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
- tag == 'select' && el.selectedIndex == -1))
- return null;
-
- if (tag == 'select') {
- var index = el.selectedIndex;
- if (index < 0) return null;
- var a = [], ops = el.options;
- var one = (t == 'select-one');
- var max = (one ? index+1 : ops.length);
- for(var i=(one ? index : 0); i < max; i++) {
- var op = ops[i];
- if (op.selected) {
- var v = op.value;
- if (!v) // extra pain for IE...
- v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
- if (one) return v;
- a.push(v);
- }
- }
- return a;
- }
- return el.value;
-};
-
-/**
- * Clears the form data. Takes the following actions on the form's input fields:
- * - input text fields will have their 'value' property set to the empty string
- * - select elements will have their 'selectedIndex' property set to -1
- * - checkbox and radio inputs will have their 'checked' property set to false
- * - inputs of type submit, button, reset, and hidden will *not* be effected
- * - button elements will *not* be effected
- */
-$.fn.clearForm = function() {
- return this.each(function() {
- $('input,select,textarea', this).clearFields();
- });
-};
-
-/**
- * Clears the selected form elements.
- */
-$.fn.clearFields = $.fn.clearInputs = function() {
- return this.each(function() {
- var t = this.type, tag = this.tagName.toLowerCase();
- if (t == 'text' || t == 'password' || tag == 'textarea')
- this.value = '';
- else if (t == 'checkbox' || t == 'radio')
- this.checked = false;
- else if (tag == 'select')
- this.selectedIndex = -1;
- });
-};
-
-/**
- * Resets the form data. Causes all form elements to be reset to their original value.
- */
-$.fn.resetForm = function() {
- return this.each(function() {
- // guard against an input with the name of 'reset'
- // note that IE reports the reset function as an 'object'
- if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
- this.reset();
- });
-};
-
-/**
- * Enables or disables any matching elements.
- */
-$.fn.enable = function(b) {
- if (b == undefined) b = true;
- return this.each(function() {
- this.disabled = !b;
- });
-};
-
-/**
- * Checks/unchecks any matching checkboxes or radio buttons and
- * selects/deselects and matching option elements.
- */
-$.fn.selected = function(select) {
- if (select == undefined) select = true;
- return this.each(function() {
- var t = this.type;
- if (t == 'checkbox' || t == 'radio')
- this.checked = select;
- else if (this.tagName.toLowerCase() == 'option') {
- var $sel = $(this).parent('select');
- if (select && $sel[0] && $sel[0].type == 'select-one') {
- // deselect all other options
- $sel.find('option').selected(false);
- }
- this.selected = select;
- }
- });
-};
-
-// helper fn for console logging
-// set $.fn.ajaxSubmit.debug to true to enable debug logging
-function log() {
- if ($.fn.ajaxSubmit.debug && window.console && window.console.log)
- window.console.log('[jquery.form] ' + Array.prototype.join.call(arguments,''));
-};
-
-})(jQuery);
View
4,376 cms/media/cms/js/lib/jquery.js
0 additions, 4,376 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
250 cms/media/cms/js/lib/jquery.livequery.js
@@ -1,250 +0,0 @@
-/*! Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- *
- * Version: 1.0.3
- * Requires jQuery 1.1.3+
- * Docs: http://docs.jquery.com/Plugins/livequery
- */
-
-(function($) {
-
-$.extend($.fn, {
- livequery: function(type, fn, fn2) {
- var self = this, q;
-
- // Handle different call patterns
- if ($.isFunction(type))
- fn2 = fn, fn = type, type = undefined;
-
- // See if Live Query already exists
- $.each( $.livequery.queries, function(i, query) {
- if ( self.selector == query.selector && self.context == query.context &&
- type == query.type && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) )
- // Found the query, exit the each loop
- return (q = query) && false;
- });
-
- // Create new Live Query if it wasn't found
- q = q || new $.livequery(this.selector, this.context, type, fn, fn2);
-
- // Make sure it is running
- q.stopped = false;
-
- // Run it immediately for the first time
- q.run();
-
- // Contnue the chain
- return this;
- },
-
- expire: function(type, fn, fn2) {
- var self = this;
-
- // Handle different call patterns
- if ($.isFunction(type))
- fn2 = fn, fn = type, type = undefined;
-
- // Find the Live Query based on arguments and stop it
- $.each( $.livequery.queries, function(i, query) {
- if ( self.selector == query.selector && self.context == query.context &&
- (!type || type == query.type) && (!fn || fn.$lqguid == query.fn.$lqguid) && (!fn2 || fn2.$lqguid == query.fn2.$lqguid) && !this.stopped )
- $.livequery.stop(query.id);
- });
-
- // Continue the chain
- return this;
- }
-});
-
-$.livequery = function(selector, context, type, fn, fn2) {
- this.selector = selector;
- this.context = context || document;
- this.type = type;
- this.fn = fn;
- this.fn2 = fn2;
- this.elements = [];
- this.stopped = false;
-
- // The id is the index of the Live Query in $.livequery.queries
- this.id = $.livequery.queries.push(this)-1;
-
- // Mark the functions for matching later on
- fn.$lqguid = fn.$lqguid || $.livequery.guid++;
- if (fn2) fn2.$lqguid = fn2.$lqguid || $.livequery.guid++;
-