goldencobra 1.4.27 → 2.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.markdown +112 -41
- data/app/adapters/goldencobra/article_adapter.rb +75 -0
- data/app/assets/images/goldencobra/chosen-sprite@2x.png +0 -0
- data/app/assets/images/goldencobra/lastnode.png +0 -0
- data/app/assets/images/goldencobra/node.png +0 -0
- data/app/assets/images/goldencobra/vline.png +0 -0
- data/app/assets/javascripts/active_admin.js +1 -0
- data/app/assets/javascripts/goldencobra/active_admin.js +189 -202
- data/app/assets/javascripts/goldencobra/application.js.erb +86 -0
- data/app/assets/javascripts/goldencobra/chosen.jquery.js +1257 -0
- data/app/assets/javascripts/goldencobra/components.js +1 -0
- data/app/assets/javascripts/goldencobra/components/navigation_menu.js +191 -0
- data/app/assets/javascripts/goldencobra/components/overviewTree.js +156 -0
- data/app/assets/javascripts/goldencobra/components/select.js +43 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/adapters/jquery.js +10 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/ckeditor.js +996 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/ckeditor_inits.js +25 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/config.js +45 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/contents.css +132 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/lang/de.js +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/lang/en-gb.js +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/lang/en.js +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/about/dialogs/about.js +7 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/autogrow/plugin.js +221 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/clipboard/dialogs/paste.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/dialogadvtab/plugin.js +196 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/icons.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/icons_hidpi.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/image/dialogs/image.js +44 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/image/images/noimage.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/link/dialogs/anchor.js +7 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/link/dialogs/link.js +26 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/link/images/anchor.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/magicline/images/icon.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/pastefromword/filter/default.js +32 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/scayt/LICENSE.md +28 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/scayt/README.md +25 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/scayt/dialogs/options.js +18 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/lang/zh.js +9 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/table/dialogs/table.js +21 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/tabletools/dialogs/tableCell.js +17 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/wsc/LICENSE.md +28 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/wsc/README.md +25 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/wsc/dialogs/wsc.js +92 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/dialog.css +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/dialog_ie.css +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/dialog_ie7.css +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/dialog_ie8.css +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/dialog_iequirks.css +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/editor.css +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/editor_gecko.css +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/editor_ie.css +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/editor_ie7.css +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/editor_ie8.css +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/editor_iequirks.css +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/icons.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/images/arrow.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/images/close.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/images/lock.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/images/refresh.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/images/spinner.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/skins/moono/readme.md +49 -0
- data/app/assets/javascripts/goldencobra/html_editors/ckeditor/styles.js +111 -0
- data/app/assets/javascripts/goldencobra/html_editors/general.js +32 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/jquery.tinymce_v3.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/langs/de.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/langs/en.js +1 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advhr/css/advhr.css +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advhr/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advhr/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advhr/js/rule.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advhr/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advhr/rule.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advimage/css/advimage.css +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advimage/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advimage/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advimage/image.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advimage/img/sample.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/advimage/js/image.js +464 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advimage/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advlink/css/advlink.css +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advlink/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advlink/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/advlink/js/advlink.js +543 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advlink/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advlink/link.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advlist/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/advlist/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/autolink/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/autolink/editor_plugin_src.js +184 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/autoresize/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/autoresize/editor_plugin_src.js +119 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/autosave/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/autosave/editor_plugin_src.js +433 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/bbcode/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/bbcode/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/contextmenu/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/contextmenu/editor_plugin_src.js +163 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/directionality/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/directionality/editor_plugin_src.js +85 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/emotions/emotions.htm +42 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-cool.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-cry.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-embarassed.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-frown.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-innocent.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-kiss.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-laughing.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-money-mouth.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-sealed.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-smile.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-surprised.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-tongue-out.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-undecided.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-wink.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/img/smiley-yell.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/js/emotions.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/emotions/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/example/dialog.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/example/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/example/editor_plugin_src.js +84 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/example/img/example.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/example/js/dialog.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/example/langs/en.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/example/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/example_dependency/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/example_dependency/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/fullpage/css/fullpage.css +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/fullpage/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/fullpage/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/fullpage/fullpage.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/fullpage/js/fullpage.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/fullpage/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/fullscreen/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/fullscreen/editor_plugin_src.js +234 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/fullscreen/fullscreen.htm +117 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/iespell/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/iespell/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/inlinepopups/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/inlinepopups/editor_plugin_src.js +699 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/inlinepopups/skins/clearlooks2/window.css +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/inlinepopups/template.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/insertdatetime/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/insertdatetime/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/layer/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/layer/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/legacyoutput/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/legacyoutput/editor_plugin_src.js +139 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/lists/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/lists/editor_plugin_src.js +955 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/media/css/media.css +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/media/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/media/editor_plugin_src.js +898 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/media/js/embed.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/media/js/media.js +513 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/media/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/media/media.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/media/moxieplayer.swf +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/nonbreaking/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/nonbreaking/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/noneditable/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/noneditable/editor_plugin_src.js +537 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/pagebreak/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/pagebreak/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/paste/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/paste/editor_plugin_src.js +887 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/paste/js/pastetext.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/paste/js/pasteword.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/paste/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/paste/pastetext.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/paste/pasteword.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/preview/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/preview/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/preview/example.html +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/preview/jscripts/embed.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/preview/preview.html +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/print/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/print/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/save/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/save/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/searchreplace/css/searchreplace.css +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/searchreplace/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/searchreplace/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/searchreplace/js/searchreplace.js +152 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/searchreplace/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/searchreplace/searchreplace.htm +100 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/spellchecker/css/content.css +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/spellchecker/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/spellchecker/editor_plugin_src.js +471 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/spellchecker/img/wline.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/style/css/props.css +14 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/style/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/style/editor_plugin_src.js +71 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/style/js/props.js +709 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/style/langs/en_dlg.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/style/props.htm +845 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/style/readme.txt +19 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/tabfocus/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/tabfocus/editor_plugin_src.js +122 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/table/cell.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/table/css/cell.css +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/table/css/row.css +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/table/css/table.css +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/table/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/table/editor_plugin_src.js +1456 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/table/js/cell.js +319 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/table/js/merge_cells.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/table/js/row.js +254 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/table/js/table.js +501 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/table/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/table/merge_cells.htm +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/table/row.htm +158 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/table/table.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/template/blank.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/template/css/template.css +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/template/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/template/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/template/js/template.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/template/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/template/template.htm +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/visualblocks/css/visualblocks.css +21 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/visualblocks/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/visualblocks/editor_plugin_src.js +63 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/visualchars/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/visualchars/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/wordcount/editor_plugin.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/wordcount/editor_plugin_src.js +122 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/abbr.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/acronym.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/attributes.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/cite.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/css/attributes.css +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/css/popup.css +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/del.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/editor_plugin.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/editor_plugin_src.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/ins.htm +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/js/abbr.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/js/acronym.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/js/attributes.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/js/cite.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/js/del.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/js/element_common.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/js/ins.js +0 -0
- data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/xhtmlxtras/langs/en_dlg.js +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/about.htm +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/anchor.htm +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/charmap.htm +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/color_picker.htm +70 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/editor_template.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/editor_template_src.js +1490 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/image.htm +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/img/colorpicker.jpg +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/img/flash.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/img/icons.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/img/iframe.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/img/pagebreak.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/img/quicktime.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/img/realmedia.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/img/shockwave.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/img/trans.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/img/video.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/img/windowsmedia.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/js/about.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/js/anchor.js +56 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/js/charmap.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/js/color_picker.js +345 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/js/image.js +253 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/js/link.js +159 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/js/source_editor.js +78 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/langs/de.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/langs/de_dlg.js +1 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/langs/en.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/langs/en_dlg.js +1 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/link.htm +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/shortcuts.htm +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/default/content.css +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/skins/default/dialog.css +118 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/default/img/buttons.png +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/default/img/items.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/default/img/menu_check.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/default/img/progress.gif +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/default/img/tabs.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/skins/default/ui.css +219 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/highcontrast/content.css +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/skins/highcontrast/dialog.css +106 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/skins/highcontrast/ui.css +106 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/o2k7/content.css +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/skins/o2k7/dialog.css +118 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/skins/o2k7/ui.css +222 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/o2k7/ui_black.css +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/advanced/skins/o2k7/ui_silver.css +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/advanced/source_editor.htm +25 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/simple/editor_template.js +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/simple/editor_template_src.js +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/simple/img/icons.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/themes/simple/langs/de.js +1 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/simple/langs/en.js +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/simple/skins/default/content.css +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/simple/skins/default/ui.css +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/simple/skins/o2k7/content.css +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/simple/skins/o2k7/img/button_bg.png +0 -0
- data/app/assets/javascripts/goldencobra/{themes → html_editors/tinymce_v3/themes}/simple/skins/o2k7/ui.css +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/tiny_mce_popup.js +5 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/tiny_mce_src.js +17942 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/tinymce_v3.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/tinymce_v3_inits.js +62 -0
- data/app/assets/javascripts/goldencobra/{utils → html_editors/tinymce_v3/utils}/editable_selects.js +0 -0
- data/app/assets/javascripts/goldencobra/{utils → html_editors/tinymce_v3/utils}/form_utils.js +0 -0
- data/app/assets/javascripts/goldencobra/{utils → html_editors/tinymce_v3/utils}/mctabs.js +0 -0
- data/app/assets/javascripts/goldencobra/{utils → html_editors/tinymce_v3/utils}/validate.js +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/jquery.tinymce_v4.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/langs/de.js +219 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/langs/readme.md +3 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/advlist/plugin.js +97 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/advlist/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/anchor/plugin.js +47 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/anchor/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/autolink/plugin.js +199 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/autolink/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/autoresize/plugin.js +162 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/autoresize/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/autosave/plugin.js +165 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/autosave/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/bbcode/plugin.js +123 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/bbcode/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/charmap/plugin.js +398 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/charmap/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/code/plugin.js +60 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/code/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/colorpicker/plugin.js +112 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/colorpicker/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/css/dialog.css +118 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/img/buttons.png +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/img/icons.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/img/items.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/img/menu_arrow.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/img/menu_check.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/img/progress.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/img/tabs.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/plugin.js +297 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/tiny_mce_popup.js +542 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/utils/editable_selects.js +70 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/utils/form_utils.js +210 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/utils/mctabs.js +164 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/compat3x/utils/validate.js +252 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/contextmenu/plugin.js +88 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/contextmenu/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/directionality/plugin.js +64 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/directionality/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/plugin.js +65 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/emoticons/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/example/dialog.html +8 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/example/plugin.js +68 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/example/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/example_dependency/plugin.js +22 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/example_dependency/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/fullpage/plugin.js +490 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/fullpage/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/fullscreen/plugin.js +136 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/fullscreen/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/hr/plugin.js +30 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/hr/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/image/plugin.js +550 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/image/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/Canvas.js +35 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/ColorMatrix.js +222 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/Conversions.js +186 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/CropRect.js +214 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/Dialog.js +486 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/Filters.js +221 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/ImagePanel.js +218 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/ImageSize.js +27 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/ImageTools.js +99 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/Mime.js +42 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/Plugin.js +390 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/classes/UndoStack.js +57 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/plugin.dev.js +149 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/plugin.js +2334 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/imagetools/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/importcss/plugin.js +197 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/importcss/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/insertdatetime/plugin.js +121 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/insertdatetime/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/layer/plugin.js +225 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/layer/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/legacyoutput/plugin.js +211 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/legacyoutput/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/link/plugin.js +403 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/link/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/lists/plugin.js +821 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/lists/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/media/moxieplayer.swf +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/media/plugin.js +795 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/media/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/nonbreaking/plugin.js +53 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/nonbreaking/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/noneditable/plugin.js +614 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/noneditable/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/pagebreak/plugin.js +88 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/pagebreak/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/paste/classes/Clipboard.js +688 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/paste/classes/Plugin.js +110 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/paste/classes/Quirks.js +159 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/paste/classes/Utils.js +129 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/paste/classes/WordFilter.js +498 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/paste/plugin.dev.js +142 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/paste/plugin.js +1700 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/paste/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/preview/plugin.js +88 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/preview/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/print/plugin.js +32 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/print/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/save/plugin.js +94 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/save/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/searchreplace/plugin.js +600 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/searchreplace/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/spellchecker/classes/DomTextMatcher.js +470 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/spellchecker/classes/Plugin.js +435 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/spellchecker/plugin.dev.js +139 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/spellchecker/plugin.js +1012 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/spellchecker/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/tabfocus/plugin.js +120 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/tabfocus/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/table/classes/CellSelection.js +176 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/table/classes/Dialogs.js +824 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/table/classes/Plugin.js +436 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/table/classes/Quirks.js +397 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/table/classes/TableGrid.js +860 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/table/classes/Utils.js +34 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/table/plugin.dev.js +141 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/table/plugin.js +2844 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/table/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/template/plugin.js +264 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/template/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/textcolor/plugin.js +282 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/textcolor/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/textpattern/plugin.js +268 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/textpattern/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/css/visualblocks.css +135 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/address.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/article.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/aside.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/blockquote.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/div.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/dl.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/figure.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/h1.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/h2.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/h3.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/h4.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/h5.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/h6.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/hgroup.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/ol.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/p.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/pre.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/section.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/img/ul.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/plugin.js +86 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualblocks/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualchars/plugin.js +123 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/visualchars/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/wordcount/plugin.js +69 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/plugins/wordcount/plugin.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/content.inline.min.css +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/content.min.css +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/fonts/tinymce-small.svg +62 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/fonts/tinymce.eot +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/fonts/tinymce.svg +83 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/fonts/tinymce.woff +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/img/anchor.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/img/loader.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/img/object.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/img/trans.gif +0 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/skin.ie7.min.css +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/skins/lightgray/skin.min.css +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/themes/modern/theme.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/themes/modern/theme.min.js +1 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/tinymce_v4.js +11 -0
- data/app/assets/javascripts/goldencobra/html_editors/tinymce_v4/tinymce_v4_inits.js +62 -0
- data/app/assets/javascripts/goldencobra/jquery.color-2.1.2.js +663 -0
- data/app/assets/javascripts/goldencobra/pagination.js +28 -0
- data/app/assets/javascripts/goldencobra/react_0.13.1.min.js +15 -0
- data/app/assets/javascripts/goldencobra/tiny_mce_popup.js +1 -1
- data/app/assets/javascripts/goldencobra/tiny_mce_src.js +17942 -0
- data/app/assets/stylesheets/goldencobra/active_admin.scss +16 -0
- data/app/assets/stylesheets/goldencobra/active_admin_backup.scss +608 -0
- data/app/assets/stylesheets/goldencobra/{application.css.scss → application.scss} +0 -0
- data/app/assets/stylesheets/goldencobra/chosen.css +51 -31
- data/app/assets/stylesheets/goldencobra/gc-articles.scss +12 -0
- data/app/assets/stylesheets/goldencobra/gc-chosen-overwrite.scss +12 -0
- data/app/assets/stylesheets/goldencobra/gc-general.scss +487 -0
- data/app/assets/stylesheets/goldencobra/gc-grid.scss +5 -0
- data/app/assets/stylesheets/goldencobra/gc-header.scss +47 -0
- data/app/assets/stylesheets/goldencobra/gc-overview-tree.scss +145 -0
- data/app/assets/stylesheets/goldencobra/gc-settings.scss +52 -0
- data/app/assets/stylesheets/goldencobra/ikusei_active_admin.scss +16 -34
- data/app/controllers/goldencobra/api/v1/tokens_controller.rb +10 -0
- data/app/controllers/goldencobra/api/v2/articles_controller.rb +213 -143
- data/app/controllers/goldencobra/api/v2/locales_controller.rb +1 -1
- data/app/controllers/goldencobra/api/v2/navigation_menus_controller.rb +223 -0
- data/app/controllers/goldencobra/api/v2/settings_controller.rb +1 -1
- data/app/controllers/goldencobra/api/v2/uploads_controller.rb +32 -0
- data/app/controllers/goldencobra/api/v3/articles_controller.rb +124 -0
- data/app/controllers/goldencobra/application_controller.rb +17 -41
- data/app/controllers/goldencobra/articles_controller.rb +60 -62
- data/app/controllers/goldencobra/manage_controller.rb +3 -4
- data/app/controllers/goldencobra/sessions_controller.rb +22 -15
- data/app/helpers/goldencobra/application_helper.rb +15 -3
- data/app/helpers/goldencobra/articles_helper.rb +80 -52
- data/app/helpers/goldencobra/login_helper.rb +4 -5
- data/app/helpers/goldencobra/navigation_helper.rb +52 -44
- data/app/mailers/goldencobra/confirmation_mailer.rb +3 -2
- data/app/models/ability.rb +1 -1
- data/app/models/active_admin/views/index_as_seo_table.rb +9 -0
- data/app/models/active_admin/views/index_as_tree.rb +118 -0
- data/app/models/goldencobra/article.rb +327 -246
- data/app/models/goldencobra/article_concerns/meta_tag.rb +104 -0
- data/app/models/goldencobra/article_image.rb +2 -2
- data/app/models/goldencobra/article_url.rb +54 -0
- data/app/models/goldencobra/articletype.rb +109 -48
- data/app/models/goldencobra/articletype_field.rb +3 -2
- data/app/models/goldencobra/articletype_group.rb +4 -4
- data/app/models/goldencobra/author.rb +5 -3
- data/app/models/goldencobra/comment.rb +7 -7
- data/app/models/goldencobra/domain.rb +3 -3
- data/app/models/goldencobra/import.rb +282 -282
- data/app/models/goldencobra/import_metadata.rb +5 -1
- data/app/models/goldencobra/link_checker.rb +27 -14
- data/app/models/goldencobra/location.rb +16 -4
- data/app/models/goldencobra/menue.rb +144 -17
- data/app/models/goldencobra/permission.rb +15 -3
- data/app/models/goldencobra/redirector.rb +23 -23
- data/app/models/goldencobra/role.rb +1 -0
- data/app/models/goldencobra/role_user.rb +4 -2
- data/app/models/goldencobra/setting.rb +54 -35
- data/app/models/goldencobra/tracking.rb +6 -3
- data/app/models/goldencobra/upload.rb +71 -53
- data/app/models/goldencobra/vita.rb +3 -3
- data/app/models/goldencobra/widget.rb +22 -16
- data/app/models/translation.rb +2 -2
- data/app/models/user.rb +18 -15
- data/app/models/visitor.rb +13 -8
- data/app/presenters/goldencobra/articletype_presenter.rb +266 -0
- data/app/serializers/goldencobra/article_custom_serializer.rb +24 -0
- data/app/serializers/goldencobra/article_serializer.rb +26 -0
- data/app/serializers/goldencobra/upload_serializer.rb +22 -0
- data/app/services/goldencobra/attribute_repair_service.rb +47 -0
- data/app/services/goldencobra/attribute_validator.rb +55 -0
- data/app/services/goldencobra/settings_cleanup.rb +95 -0
- data/app/services/goldencobra/url.rb +25 -0
- data/app/views/goldencobra/admin/articles/_article_type.html.erb +4 -3
- data/app/views/goldencobra/admin/articles/_image_module_sidebar.html.erb +2 -2
- data/app/views/goldencobra/admin/articles/_link_checker.html.erb +10 -13
- data/app/views/goldencobra/admin/articles/_select_article_type.html.erb +1 -4
- data/app/views/goldencobra/admin/dashboard/_base_dashboard.html.arb +106 -0
- data/app/views/goldencobra/admin/shared/_item.html.erb +1 -1
- data/app/views/goldencobra/admin/shared/_overview.html.erb +3 -3
- data/app/views/goldencobra/admin/shared/_react_overview.html.erb +15 -0
- data/app/views/goldencobra/admin/shared/load_overviewtree.js.erb +8 -3
- data/app/views/goldencobra/api/v2/articles/index.xml.builder +29 -0
- data/app/views/goldencobra/articles/show.rss.builder +1 -1
- data/app/views/goldencobra/manage/_admin_article_management_content.html.erb +2 -2
- data/app/views/layouts/goldencobra/active_admin_resque.html.erb +15 -15
- data/app/views/layouts/goldencobra/application.html.erb +1 -1
- data/app/views/layouts/goldencobra/bare_layout.html.erb +1 -1
- data/app/views/layouts/goldencobra/for_pdf.html.erb +1 -1
- data/app/worker/articles_cache_worker.rb +1 -2
- data/config/initializers/active_admin_devise.rb +4 -4
- data/config/initializers/check_for_missing_articletypes.rb +2 -55
- data/config/initializers/devise.rb +9 -1
- data/config/initializers/http_validator.rb +8 -10
- data/config/initializers/sass_load_path.rb +4 -0
- data/config/initializers/sidekiq.rb.tmpl +7 -0
- data/config/locales/active_admin.de.yml +49 -25
- data/config/locales/active_admin.en.yml +46 -22
- data/config/locales/active_admin.zh-CN.yml +645 -0
- data/config/locales/de.yml +95 -78
- data/config/locales/en.yml +97 -90
- data/config/locales/zh-CN.yml +632 -0
- data/config/routes.rb +37 -78
- data/config/settings.yml +17 -8
- data/config/spring.rb +1 -0
- data/db/migrate/20150811082119_install_goldencobra.rb +589 -0
- data/db/migrate/20150818133609_change_article_index_type_default.rb +5 -0
- data/db/migrate/20150818140444_rename_user_title_to_user_position.rb +5 -0
- data/db/migrate/20150818141321_add_displayarticletypeindex_to_goldencobra_articles.rb +5 -0
- data/db/migrate/20150819121715_add_descendentsdepth_to_goldencobra_articles.rb +6 -0
- data/db/migrate/20150820073443_change_metatag_storage.rb +13 -0
- data/db/migrate/20160527083745_add_state_to_goldencobra_articles.rb +5 -0
- data/db/migrate/20160614074840_create_goldencobra_article_urls.rb +10 -0
- data/db/migrate/20160704070529_add_showindexarticles_to_goldencobra_articles.rb +5 -0
- data/db/seeds.rb +28 -13
- data/lib/generators/goldencobra/articletype/articletype_generator.rb +3 -5
- data/lib/generators/goldencobra/articletype/templates/edit_articletype.html.erb +3 -3
- data/lib/generators/goldencobra/articletype/templates/edit_index.html.erb +11 -6
- data/lib/generators/goldencobra/articletype/templates/edit_show.html.erb +4 -6
- data/lib/generators/goldencobra/articletype/templates/index.html.erb +18 -21
- data/lib/generators/goldencobra/articletype/templates/initializer.rb +3 -6
- data/lib/generators/goldencobra/articletype/templates/show.html.erb +187 -9
- data/lib/generators/goldencobra/install_generator.rb +47 -65
- data/lib/generators/goldencobra/server_generator.rb +14 -17
- data/lib/generators/goldencobra/templates/active_admin.rb.erb +20 -17
- data/lib/generators/goldencobra/templates/assets/javascripts/application.js +1 -29
- data/lib/generators/goldencobra/templates/assets/stylesheets/_bootstrap_overwrite.scss +60 -0
- data/lib/generators/goldencobra/templates/assets/stylesheets/{active_admin.css.scss → active_admin.scss} +0 -0
- data/lib/generators/goldencobra/templates/assets/stylesheets/application.scss +16 -0
- data/lib/generators/goldencobra/templates/deploy.rb.erb +0 -6
- data/lib/generators/goldencobra/templates/robots.txt +6 -2
- data/lib/generators/goldencobra/templates/seeds.rb.erb +29 -163
- data/lib/generators/goldencobra/templates/views/articletypes/default/_edit_index.html.erb +3 -9
- data/lib/generators/goldencobra/templates/views/articletypes/default/_show.html.erb +181 -15
- data/lib/generators/goldencobra/templates/views/layouts/_footer.html.erb +22 -18
- data/lib/generators/goldencobra/templates/views/layouts/_header_meta.html.erb +29 -15
- data/lib/generators/goldencobra/templates/views/layouts/_navigation.html.erb +31 -0
- data/lib/generators/goldencobra/templates/views/layouts/_startpage.html.erb +71 -0
- data/lib/generators/goldencobra/templates/views/layouts/application.html.erb +10 -41
- data/lib/goldencobra.rb +33 -0
- data/lib/goldencobra/acts_as_setting.rb +8 -10
- data/lib/goldencobra/engine.rb +30 -41
- data/lib/goldencobra/version.rb +1 -3
- data/lib/i18n/backend/active_record.rb +61 -0
- data/lib/i18n/backend/active_record/translation.rb +109 -0
- data/lib/tasks/article_cache.rake +1 -1
- data/lib/tasks/attribute_validator.rake +18 -0
- data/lib/tasks/link_checker.rake +3 -7
- metadata +917 -803
- data/app/assets/javascripts/goldencobra/application.js +0 -84
- data/app/assets/javascripts/goldencobra/jquery.tinymce.js +0 -1
- data/app/assets/javascripts/goldencobra/langs/en.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/advimage/js/image.js +0 -462
- data/app/assets/javascripts/goldencobra/plugins/advlink/js/advlink.js +0 -532
- data/app/assets/javascripts/goldencobra/plugins/autolink/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/autolink/editor_plugin_src.js +0 -172
- data/app/assets/javascripts/goldencobra/plugins/autoresize/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/autoresize/editor_plugin_src.js +0 -137
- data/app/assets/javascripts/goldencobra/plugins/autosave/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/autosave/editor_plugin_src.js +0 -431
- data/app/assets/javascripts/goldencobra/plugins/autosave/langs/en.js +0 -4
- data/app/assets/javascripts/goldencobra/plugins/contextmenu/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/contextmenu/editor_plugin_src.js +0 -160
- data/app/assets/javascripts/goldencobra/plugins/directionality/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/directionality/editor_plugin_src.js +0 -82
- data/app/assets/javascripts/goldencobra/plugins/emotions/emotions.htm +0 -42
- data/app/assets/javascripts/goldencobra/plugins/example/editor_plugin_src.js +0 -84
- data/app/assets/javascripts/goldencobra/plugins/example/img/image_button.gif +0 -0
- data/app/assets/javascripts/goldencobra/plugins/fullscreen/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/fullscreen/editor_plugin_src.js +0 -159
- data/app/assets/javascripts/goldencobra/plugins/fullscreen/fullscreen.htm +0 -110
- data/app/assets/javascripts/goldencobra/plugins/inlinepopups/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/inlinepopups/editor_plugin_src.js +0 -699
- data/app/assets/javascripts/goldencobra/plugins/legacyoutput/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/legacyoutput/editor_plugin_src.js +0 -139
- data/app/assets/javascripts/goldencobra/plugins/lists/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/lists/editor_plugin_src.js +0 -925
- data/app/assets/javascripts/goldencobra/plugins/media/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/media/editor_plugin_src.js +0 -890
- data/app/assets/javascripts/goldencobra/plugins/media/js/media.js +0 -464
- data/app/assets/javascripts/goldencobra/plugins/noneditable/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/noneditable/editor_plugin_src.js +0 -95
- data/app/assets/javascripts/goldencobra/plugins/paste/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/paste/editor_plugin_src.js +0 -871
- data/app/assets/javascripts/goldencobra/plugins/searchreplace/js/searchreplace.js +0 -142
- data/app/assets/javascripts/goldencobra/plugins/searchreplace/searchreplace.htm +0 -100
- data/app/assets/javascripts/goldencobra/plugins/spellchecker/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/spellchecker/editor_plugin_src.js +0 -436
- data/app/assets/javascripts/goldencobra/plugins/style/css/props.css +0 -13
- data/app/assets/javascripts/goldencobra/plugins/style/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/style/editor_plugin_src.js +0 -55
- data/app/assets/javascripts/goldencobra/plugins/style/js/props.js +0 -635
- data/app/assets/javascripts/goldencobra/plugins/style/langs/en_dlg.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/style/props.htm +0 -840
- data/app/assets/javascripts/goldencobra/plugins/tabfocus/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/tabfocus/editor_plugin_src.js +0 -122
- data/app/assets/javascripts/goldencobra/plugins/table/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/table/editor_plugin_src.js +0 -1408
- data/app/assets/javascripts/goldencobra/plugins/table/js/cell.js +0 -319
- data/app/assets/javascripts/goldencobra/plugins/table/js/row.js +0 -237
- data/app/assets/javascripts/goldencobra/plugins/table/js/table.js +0 -484
- data/app/assets/javascripts/goldencobra/plugins/table/row.htm +0 -158
- data/app/assets/javascripts/goldencobra/plugins/wordcount/editor_plugin.js +0 -1
- data/app/assets/javascripts/goldencobra/plugins/wordcount/editor_plugin_src.js +0 -114
- data/app/assets/javascripts/goldencobra/themes/advanced/color_picker.htm +0 -74
- data/app/assets/javascripts/goldencobra/themes/advanced/editor_template.js +0 -1
- data/app/assets/javascripts/goldencobra/themes/advanced/editor_template_src.js +0 -1362
- data/app/assets/javascripts/goldencobra/themes/advanced/img/icons.gif +0 -0
- data/app/assets/javascripts/goldencobra/themes/advanced/js/anchor.js +0 -43
- data/app/assets/javascripts/goldencobra/themes/advanced/js/color_picker.js +0 -329
- data/app/assets/javascripts/goldencobra/themes/advanced/js/image.js +0 -251
- data/app/assets/javascripts/goldencobra/themes/advanced/js/link.js +0 -153
- data/app/assets/javascripts/goldencobra/themes/advanced/js/source_editor.js +0 -56
- data/app/assets/javascripts/goldencobra/themes/advanced/langs/en_dlg.js +0 -1
- data/app/assets/javascripts/goldencobra/themes/advanced/skins/default/dialog.css +0 -117
- data/app/assets/javascripts/goldencobra/themes/advanced/skins/default/ui.css +0 -214
- data/app/assets/javascripts/goldencobra/themes/advanced/skins/highcontrast/dialog.css +0 -105
- data/app/assets/javascripts/goldencobra/themes/advanced/skins/highcontrast/ui.css +0 -102
- data/app/assets/javascripts/goldencobra/themes/advanced/skins/o2k7/dialog.css +0 -117
- data/app/assets/javascripts/goldencobra/themes/advanced/skins/o2k7/ui.css +0 -217
- data/app/assets/javascripts/goldencobra/themes/advanced/source_editor.htm +0 -25
- data/app/assets/javascripts/goldencobra/tiny_mce.js +0 -1
- data/app/assets/stylesheets/goldencobra/active_admin.css.scss +0 -595
- data/app/models/goldencobra/metatag.rb +0 -23
- data/app/models/goldencobra/url_builder.rb +0 -58
- data/app/views/goldencobra/admin/articles/_articles_index.html.erb +0 -4
- data/app/views/goldencobra/admin/articles/_widgets_sidebar.html.erb +0 -15
- data/app/views/goldencobra/admin/articles/toggle_expert_mode.js.erb +0 -7
- data/config/initializers/check_for_migrations.rb +0 -21
- data/config/initializers/compass.rb +0 -24
- data/db/migrate/20120109093658_create_articles.rb +0 -9
- data/db/migrate/20120109111205_add_devise_to_admin_users.rb +0 -56
- data/db/migrate/20120109121212_create_admin_notes.rb +0 -16
- data/db/migrate/20120109121213_move_admin_notes_to_comments.rb +0 -25
- data/db/migrate/20120109140423_create_roles.rb +0 -10
- data/db/migrate/20120109141338_create_role_users.rb +0 -8
- data/db/migrate/20120110112157_add_urlname_to_article.rb +0 -7
- data/db/migrate/20120110114803_create_friendly_id_slugs.rb +0 -18
- data/db/migrate/20120112163045_add_body_to_articles.rb +0 -6
- data/db/migrate/20120112171037_add_ancestry_to_articles.rb +0 -6
- data/db/migrate/20120112172723_add_index_to_articles.rb +0 -9
- data/db/migrate/20120113100243_create_menues.rb +0 -12
- data/db/migrate/20120113101714_add_ancestry_to_menues.rb +0 -6
- data/db/migrate/20120113170904_add_startpage_to_article.rb +0 -5
- data/db/migrate/20120120095700_create_goldencobra_metatags.rb +0 -11
- data/db/migrate/20120125145920_add_fields_to_articles.rb +0 -9
- data/db/migrate/20120125161800_add_noindex_to_articles.rb +0 -5
- data/db/migrate/20120126132846_create_goldencobra_uploads.rb +0 -14
- data/db/migrate/20120206110452_create_goldencobra_locations.rb +0 -15
- data/db/migrate/20120209100956_create_goldencobra_settings.rb +0 -11
- data/db/migrate/20120217085735_add_options_to_users.rb +0 -16
- data/db/migrate/20120221100021_create_goldencobra_helps.rb +0 -11
- data/db/migrate/20120307151355_add_breadcrumb_to_goldencobra_articles.rb +0 -6
- data/db/migrate/20120312111338_create_goldencobra_widgets.rb +0 -12
- data/db/migrate/20120312150558_create_goldencobra_article_widgets.rb +0 -10
- data/db/migrate/20120313125443_create_goldencobra_permissions.rb +0 -18
- data/db/migrate/20120313142221_add_name_to_goldencobra_widgets.rb +0 -6
- data/db/migrate/20120313142421_add_sorter_to_goldencobra_widgets.rb +0 -6
- data/db/migrate/20120314102039_add_template_to_goldencobra_articles.rb +0 -6
- data/db/migrate/20120315161536_add_sorter_to_goldencobra_menue.rb +0 -6
- data/db/migrate/20120321102414_acts_as_taggable_on_migration.rb +0 -30
- data/db/migrate/20120321114923_add_articleindex_to_goldencobra_articles.rb +0 -7
- data/db/migrate/20120321120727_add_social_sharing_to_goldencobra_articles.rb +0 -6
- data/db/migrate/20120321130204_add_articleindeximages_to_goldencobra_articles.rb +0 -6
- data/db/migrate/20120321131058_create_goldencobra_article_images.rb +0 -10
- data/db/migrate/20120416154848_create_goldencobra_vita.rb +0 -13
- data/db/migrate/20120420094029_add_cachable_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20120423141814_add_imagegallery_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20120509125734_add_title_to_goldencobra_locations.rb +0 -5
- data/db/migrate/20120604141401_add_article_type_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20120605082035_add_description_to_goldencobra_menues.rb +0 -6
- data/db/migrate/20120608095444_add_teaser_title_to_goldencobra_menue.rb +0 -5
- data/db/migrate/20120608121356_create_versions.rb +0 -18
- data/db/migrate/20120611082814_create_goldencobra_imports.rb +0 -13
- data/db/migrate/20120615085225_add_externalurl_to_goldencobra_article.rb +0 -5
- data/db/migrate/20120615150128_add_attachable_to_goldencobra_uploads.rb +0 -6
- data/db/migrate/20120618122627_add_indextag_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20120618132330_add_sliderfields_to_widgets.rb +0 -5
- data/db/migrate/20120618141449_add_teaser_to_goldencobra_widgets.rb +0 -5
- data/db/migrate/20120619123238_add_sorter_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20120619132259_add_reverse_sort_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20120625131154_add_author_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20120627122742_add_sorter_limit_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20120718153348_add_nottags_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20120730103912_add_use_frontend_tags_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20120807124808_add_image_to_goldencobra_menues.rb +0 -5
- data/db/migrate/20120814111900_add_default_and_description_to_goldencobra.rb +0 -6
- data/db/migrate/20120814114800_change_default_type_to_goldencobra_widgets.rb +0 -6
- data/db/migrate/20120821105002_add_alttext_to_goldencobra_uploads.rb +0 -5
- data/db/migrate/20120926133635_add_position_to_goldencobra_article_images.rb +0 -5
- data/db/migrate/20120928092721_create_goldencobra_comments.rb +0 -16
- data/db/migrate/20120928105956_devise_create_visitors.rb +0 -46
- data/db/migrate/20121001092249_add_names_to_visitors.rb +0 -6
- data/db/migrate/20121002143111_add_columns_to_visitors.rb +0 -8
- data/db/migrate/20121003102003_add_dynamicredirect_to_goldencobraarticles.rb +0 -6
- data/db/migrate/20121003140056_add_token_to_visitors.rb +0 -12
- data/db/migrate/20121006095912_add_commentable_to_article.rb +0 -5
- data/db/migrate/20121007125002_add_activesince_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20121011062432_add_username_to_visitors.rb +0 -5
- data/db/migrate/20121015071150_add_link_title_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20121029131138_add_offline_setter_to_goldencobra_widgets.rb +0 -7
- data/db/migrate/20121030112343_add_offline_active_to_goldencobra_widgets.rb +0 -5
- data/db/migrate/20121030120838_add_alternative_content_to_goldencobra_widgets.rb +0 -5
- data/db/migrate/20121121144623_add_datum_to_widgets.rb +0 -6
- data/db/migrate/20121122091033_add_sorter_number_to_goldencobra_uploads.rb +0 -5
- data/db/migrate/20121206104701_add_type_to_goldencobra_settings.rb +0 -5
- data/db/migrate/20130104145454_add_weektimes_to_goldencobra_widgets.rb +0 -7
- data/db/migrate/20130114154115_add_sorter_to_goldencobra_permissions.rb +0 -8
- data/db/migrate/20130115104440_add_expert_mode_to_users.rb +0 -5
- data/db/migrate/20130118115233_add_poly_to_goldencobra_role_users.rb +0 -6
- data/db/migrate/20130128170204_add_default_article_type_for_nil.rb +0 -11
- data/db/migrate/20130129092029_add_poly_to_goldencobra_locations.rb +0 -6
- data/db/migrate/20130204102953_add_locationoption_to_goldencobra_locations.rb +0 -5
- data/db/migrate/20130205084748_add_loginable_to_visitors.rb +0 -6
- data/db/migrate/20130225154241_add_redirect_to_goldencobra_roles.rb +0 -5
- data/db/migrate/20130301144344_add_indextypes_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20130404110743_add_sessions_table.rb +0 -12
- data/db/migrate/20130404121434_create_goldencobra_trackings.rb +0 -13
- data/db/migrate/20130404135801_add_options_to_goldencobra_trackings.rb +0 -6
- data/db/migrate/20130404140858_add_moreoptions_to_goldencobra_trackings.rb +0 -8
- data/db/migrate/20130405071320_add_params_to_goldencobra_trackings.rb +0 -5
- data/db/migrate/20130405073103_add_googleparams_to_goldencobra_trackings.rb +0 -9
- data/db/migrate/20130405074654_add_location_to_tracking.rb +0 -5
- data/db/migrate/20130426123928_add_polymorphic_to_goldencobra_metatags.rb +0 -6
- data/db/migrate/20130507115517_create_translations.rb +0 -13
- data/db/migrate/20130702155529_create_goldencobra_authors.rb +0 -12
- data/db/migrate/20130702160247_rename_authorstobackup_to_goldencobra_articles.rb +0 -11
- data/db/migrate/20130722152135_add_encodingtype_to_goldencobra_imports.rb +0 -5
- data/db/migrate/20130723084542_add_assgroup_to_goldencobra_importer.rb +0 -5
- data/db/migrate/20130724123225_create_goldencobra_import_metadata.rb +0 -16
- data/db/migrate/20130730113452_add_skip_to_goldencobra_locations.rb +0 -5
- data/db/migrate/20130730144331_add_linkchecker_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20130903085746_change_datatype_of_url_paremeters.rb +0 -9
- data/db/migrate/20130909143144_create_goldencobra_domains.rb +0 -11
- data/db/migrate/20130925133203_add_prefix_to_goldencobra_domains.rb +0 -5
- data/db/migrate/20131018111343_add_cache_to_goldencobra_menues.rb +0 -12
- data/db/migrate/20131129143509_add_remote_to_goldencobra_menues.rb +0 -5
- data/db/migrate/20131216110750_add_main_to_goldencobra_domains.rb +0 -7
- data/db/migrate/20140127084929_create_goldencobra_articletypes.rb +0 -16
- data/db/migrate/20140128091516_create_goldencobra_articletype_groups.rb +0 -16
- data/db/migrate/20140128104519_create_goldencobra_articletype_fields.rb +0 -14
- data/db/migrate/20140128112747_add_position_to_goldencobra_articletype_group.rb +0 -7
- data/db/migrate/20140204221345_add_operator_to_goldencobra_permissions.rb +0 -5
- data/db/migrate/20140411152728_add_creator_id_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20140505144517_add_taggingcounter.rb +0 -15
- data/db/migrate/20140603084537_add_domain_to_goldencobra_permissions.rb +0 -7
- data/db/migrate/20140615200342_resize_link_checkfield.rb +0 -13
- data/db/migrate/20140626135753_add_externalreferee_to_goldencobra_articles.rb +0 -6
- data/db/migrate/20140702103024_add_externaldate_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20140702105550_add_remoteurl_to_goldencobra_uploads.rb +0 -5
- data/db/migrate/20140702142818_add_image_gallery_type_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20140819101033_add_urlpath_to_goldencobra_articles.rb +0 -5
- data/db/migrate/20141104115144_create_goldencobra_redirectors.rb +0 -15
- data/db/migrate/20141112124531_add_globalsorting_to_goldencobra_articles.rb +0 -7
- data/db/migrate/20141124170930_add_indiex_to_gc.rb +0 -26
- data/db/migrate/20150115111024_create_goldencobra_article_authors.rb +0 -28
- data/db/migrate/20150115134707_add_remove_author_stuff.rb +0 -11
- data/db/migrate/20150417153454_add_status_to_goldencobra_vita_steps.rb +0 -5
- data/lib/generators/goldencobra/templates/assets/images/icons/icon-bookmark-40x40-light.png +0 -0
- data/lib/generators/goldencobra/templates/assets/images/icons/icon-pdf-40x40-light.png +0 -0
- data/lib/generators/goldencobra/templates/assets/images/icons/icon-print-40x40-light.png +0 -0
- data/lib/generators/goldencobra/templates/assets/images/logo.gif +0 -0
- data/lib/generators/goldencobra/templates/assets/images/rails.png +0 -0
- data/lib/generators/goldencobra/templates/assets/stylesheets/application.css.scss +0 -29
- data/lib/generators/goldencobra/templates/assets/stylesheets/footer/content.css.scss +0 -31
- data/lib/generators/goldencobra/templates/assets/stylesheets/header/content.css.scss +0 -102
- data/lib/generators/goldencobra/templates/assets/stylesheets/main/content.css.scss +0 -192
- data/lib/generators/goldencobra/templates/assets/stylesheets/share/mixins.css.scss +0 -174
- data/lib/generators/goldencobra/templates/assets/stylesheets/share/variables.css.scss +0 -31
- data/lib/generators/goldencobra/templates/views/layouts/_header.html.erb +0 -61
- data/lib/generators/goldencobra/templates/views/layouts/_header_slider.html.erb +0 -14
@@ -0,0 +1,19 @@
|
|
1
|
+
Edit CSS Style plug-in notes
|
2
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
3
|
+
Unlike WYSIWYG editor functionality that operates only on the selected text,
|
4
|
+
typically by inserting new HTML elements with the specified styles.
|
5
|
+
This plug-in operates on the HTML blocks surrounding the selected text.
|
6
|
+
No new HTML elements are created.
|
7
|
+
|
8
|
+
This plug-in only operates on the surrounding blocks and not the nearest
|
9
|
+
parent node. This means that if a block encapsulates a node,
|
10
|
+
e.g <p><span>text</span></p>, then only the styles in the block are
|
11
|
+
recognized, not those in the span.
|
12
|
+
|
13
|
+
When selecting text that includes multiple blocks at the same level (peers),
|
14
|
+
this plug-in accumulates the specified styles in all of the surrounding blocks
|
15
|
+
and populates the dialogue checkboxes accordingly. There is no differentiation
|
16
|
+
between styles set in all the blocks versus styles set in some of the blocks.
|
17
|
+
|
18
|
+
When the [Update] or [Apply] buttons are pressed, the styles selected in the
|
19
|
+
checkboxes are applied to all blocks that surround the selected text.
|
data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/tabfocus/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]:not(iframe)");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m<n.length;m++){if(r(n[m])){return n[m]}}}else{for(m=j-1;m>=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})();
|
@@ -0,0 +1,122 @@
|
|
1
|
+
/**
|
2
|
+
* editor_plugin_src.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function() {
|
12
|
+
var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
|
13
|
+
|
14
|
+
tinymce.create('tinymce.plugins.TabFocusPlugin', {
|
15
|
+
init : function(ed, url) {
|
16
|
+
function tabCancel(ed, e) {
|
17
|
+
if (e.keyCode === 9)
|
18
|
+
return Event.cancel(e);
|
19
|
+
}
|
20
|
+
|
21
|
+
function tabHandler(ed, e) {
|
22
|
+
var x, i, f, el, v;
|
23
|
+
|
24
|
+
function find(d) {
|
25
|
+
el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
|
26
|
+
|
27
|
+
function canSelectRecursive(e) {
|
28
|
+
return e.nodeName==="BODY" || (e.type != 'hidden' &&
|
29
|
+
!(e.style.display == "none") &&
|
30
|
+
!(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
|
31
|
+
}
|
32
|
+
function canSelectInOldIe(el) {
|
33
|
+
return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
|
34
|
+
}
|
35
|
+
function isOldIe() {
|
36
|
+
return tinymce.isIE6 || tinymce.isIE7;
|
37
|
+
}
|
38
|
+
function canSelect(el) {
|
39
|
+
return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
|
40
|
+
}
|
41
|
+
|
42
|
+
each(el, function(e, i) {
|
43
|
+
if (e.id == ed.id) {
|
44
|
+
x = i;
|
45
|
+
return false;
|
46
|
+
}
|
47
|
+
});
|
48
|
+
if (d > 0) {
|
49
|
+
for (i = x + 1; i < el.length; i++) {
|
50
|
+
if (canSelect(el[i]))
|
51
|
+
return el[i];
|
52
|
+
}
|
53
|
+
} else {
|
54
|
+
for (i = x - 1; i >= 0; i--) {
|
55
|
+
if (canSelect(el[i]))
|
56
|
+
return el[i];
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
return null;
|
61
|
+
}
|
62
|
+
|
63
|
+
if (e.keyCode === 9) {
|
64
|
+
v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
|
65
|
+
|
66
|
+
if (v.length == 1) {
|
67
|
+
v[1] = v[0];
|
68
|
+
v[0] = ':prev';
|
69
|
+
}
|
70
|
+
|
71
|
+
// Find element to focus
|
72
|
+
if (e.shiftKey) {
|
73
|
+
if (v[0] == ':prev')
|
74
|
+
el = find(-1);
|
75
|
+
else
|
76
|
+
el = DOM.get(v[0]);
|
77
|
+
} else {
|
78
|
+
if (v[1] == ':next')
|
79
|
+
el = find(1);
|
80
|
+
else
|
81
|
+
el = DOM.get(v[1]);
|
82
|
+
}
|
83
|
+
|
84
|
+
if (el) {
|
85
|
+
if (el.id && (ed = tinymce.get(el.id || el.name)))
|
86
|
+
ed.focus();
|
87
|
+
else
|
88
|
+
window.setTimeout(function() {
|
89
|
+
if (!tinymce.isWebKit)
|
90
|
+
window.focus();
|
91
|
+
el.focus();
|
92
|
+
}, 10);
|
93
|
+
|
94
|
+
return Event.cancel(e);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
ed.onKeyUp.add(tabCancel);
|
100
|
+
|
101
|
+
if (tinymce.isGecko) {
|
102
|
+
ed.onKeyPress.add(tabHandler);
|
103
|
+
ed.onKeyDown.add(tabCancel);
|
104
|
+
} else
|
105
|
+
ed.onKeyDown.add(tabHandler);
|
106
|
+
|
107
|
+
},
|
108
|
+
|
109
|
+
getInfo : function() {
|
110
|
+
return {
|
111
|
+
longname : 'Tabfocus',
|
112
|
+
author : 'Moxiecode Systems AB',
|
113
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
114
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
|
115
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
116
|
+
};
|
117
|
+
}
|
118
|
+
});
|
119
|
+
|
120
|
+
// Register plugin
|
121
|
+
tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
|
122
|
+
})();
|
data/app/assets/javascripts/goldencobra/{plugins → html_editors/tinymce_v3/plugins}/table/cell.htm
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/table/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE&&!d.isIE11?" ":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE||d.isIE11){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{L=D=null;e(g,function(Z,aa){e(Z,function(ac,ab){if(j(ac)){if(!L){L={x:ab,y:aa}}D={x:ab,y:aa}}})});P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){if(!O){return}var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}});G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected")}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){if(r.settings.forced_root_block){r.dom.add(r.getBody(),r.settings.forced_root_block,null,d.isIE&&!d.isIE11?" ":'<br data-mce-bogus="1" />')}else{r.dom.add(r.getBody(),"br",{"data-mce-bogus":"1"})}}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&(z.nodeName=="BR"||(z.childNodes.length==1&&(z.firstChild.nodeName=="BR"||z.firstChild.nodeValue=="\u00a0")))&&z.previousSibling&&z.previousSibling.nodeName=="TABLE"){w.dom.remove(z)}});s();r.startContent=r.getContent({format:"raw"})});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce);
|
data/app/assets/javascripts/goldencobra/html_editors/tinymce_v3/plugins/table/editor_plugin_src.js
ADDED
@@ -0,0 +1,1456 @@
|
|
1
|
+
/**
|
2
|
+
* editor_plugin_src.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function(tinymce) {
|
12
|
+
var each = tinymce.each;
|
13
|
+
|
14
|
+
// Checks if the selection/caret is at the start of the specified block element
|
15
|
+
function isAtStart(rng, par) {
|
16
|
+
var doc = par.ownerDocument, rng2 = doc.createRange(), elm;
|
17
|
+
|
18
|
+
rng2.setStartBefore(par);
|
19
|
+
rng2.setEnd(rng.endContainer, rng.endOffset);
|
20
|
+
|
21
|
+
elm = doc.createElement('body');
|
22
|
+
elm.appendChild(rng2.cloneContents());
|
23
|
+
|
24
|
+
// Check for text characters of other elements that should be treated as content
|
25
|
+
return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0;
|
26
|
+
};
|
27
|
+
|
28
|
+
function getSpanVal(td, name) {
|
29
|
+
return parseInt(td.getAttribute(name) || 1);
|
30
|
+
}
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Table Grid class.
|
34
|
+
*/
|
35
|
+
function TableGrid(table, dom, selection) {
|
36
|
+
var grid, startPos, endPos, selectedCell;
|
37
|
+
|
38
|
+
buildGrid();
|
39
|
+
selectedCell = dom.getParent(selection.getStart(), 'th,td');
|
40
|
+
if (selectedCell) {
|
41
|
+
startPos = getPos(selectedCell);
|
42
|
+
endPos = findEndPos();
|
43
|
+
selectedCell = getCell(startPos.x, startPos.y);
|
44
|
+
}
|
45
|
+
|
46
|
+
function cloneNode(node, children) {
|
47
|
+
node = node.cloneNode(children);
|
48
|
+
node.removeAttribute('id');
|
49
|
+
|
50
|
+
return node;
|
51
|
+
}
|
52
|
+
|
53
|
+
function buildGrid() {
|
54
|
+
var startY = 0;
|
55
|
+
|
56
|
+
grid = [];
|
57
|
+
|
58
|
+
each(['thead', 'tbody', 'tfoot'], function(part) {
|
59
|
+
var rows = dom.select('> ' + part + ' tr', table);
|
60
|
+
|
61
|
+
each(rows, function(tr, y) {
|
62
|
+
y += startY;
|
63
|
+
|
64
|
+
each(dom.select('> td, > th', tr), function(td, x) {
|
65
|
+
var x2, y2, rowspan, colspan;
|
66
|
+
|
67
|
+
// Skip over existing cells produced by rowspan
|
68
|
+
if (grid[y]) {
|
69
|
+
while (grid[y][x])
|
70
|
+
x++;
|
71
|
+
}
|
72
|
+
|
73
|
+
// Get col/rowspan from cell
|
74
|
+
rowspan = getSpanVal(td, 'rowspan');
|
75
|
+
colspan = getSpanVal(td, 'colspan');
|
76
|
+
|
77
|
+
// Fill out rowspan/colspan right and down
|
78
|
+
for (y2 = y; y2 < y + rowspan; y2++) {
|
79
|
+
if (!grid[y2])
|
80
|
+
grid[y2] = [];
|
81
|
+
|
82
|
+
for (x2 = x; x2 < x + colspan; x2++) {
|
83
|
+
grid[y2][x2] = {
|
84
|
+
part : part,
|
85
|
+
real : y2 == y && x2 == x,
|
86
|
+
elm : td,
|
87
|
+
rowspan : rowspan,
|
88
|
+
colspan : colspan
|
89
|
+
};
|
90
|
+
}
|
91
|
+
}
|
92
|
+
});
|
93
|
+
});
|
94
|
+
|
95
|
+
startY += rows.length;
|
96
|
+
});
|
97
|
+
};
|
98
|
+
|
99
|
+
function getCell(x, y) {
|
100
|
+
var row;
|
101
|
+
|
102
|
+
row = grid[y];
|
103
|
+
if (row)
|
104
|
+
return row[x];
|
105
|
+
};
|
106
|
+
|
107
|
+
function setSpanVal(td, name, val) {
|
108
|
+
if (td) {
|
109
|
+
val = parseInt(val);
|
110
|
+
|
111
|
+
if (val === 1)
|
112
|
+
td.removeAttribute(name, 1);
|
113
|
+
else
|
114
|
+
td.setAttribute(name, val, 1);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
function isCellSelected(cell) {
|
119
|
+
return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell);
|
120
|
+
};
|
121
|
+
|
122
|
+
function getSelectedRows() {
|
123
|
+
var rows = [];
|
124
|
+
|
125
|
+
each(table.rows, function(row) {
|
126
|
+
each(row.cells, function(cell) {
|
127
|
+
if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) {
|
128
|
+
rows.push(row);
|
129
|
+
return false;
|
130
|
+
}
|
131
|
+
});
|
132
|
+
});
|
133
|
+
|
134
|
+
return rows;
|
135
|
+
};
|
136
|
+
|
137
|
+
function deleteTable() {
|
138
|
+
var rng = dom.createRng();
|
139
|
+
|
140
|
+
rng.setStartAfter(table);
|
141
|
+
rng.setEndAfter(table);
|
142
|
+
|
143
|
+
selection.setRng(rng);
|
144
|
+
|
145
|
+
dom.remove(table);
|
146
|
+
};
|
147
|
+
|
148
|
+
function cloneCell(cell) {
|
149
|
+
var formatNode;
|
150
|
+
|
151
|
+
// Clone formats
|
152
|
+
tinymce.walk(cell, function(node) {
|
153
|
+
var curNode;
|
154
|
+
|
155
|
+
if (node.nodeType == 3) {
|
156
|
+
each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) {
|
157
|
+
node = cloneNode(node, false);
|
158
|
+
|
159
|
+
if (!formatNode)
|
160
|
+
formatNode = curNode = node;
|
161
|
+
else if (curNode)
|
162
|
+
curNode.appendChild(node);
|
163
|
+
|
164
|
+
curNode = node;
|
165
|
+
});
|
166
|
+
|
167
|
+
// Add something to the inner node
|
168
|
+
if (curNode)
|
169
|
+
curNode.innerHTML = tinymce.isIE && !tinymce.isIE11 ? ' ' : '<br data-mce-bogus="1" />';
|
170
|
+
|
171
|
+
return false;
|
172
|
+
}
|
173
|
+
}, 'childNodes');
|
174
|
+
|
175
|
+
cell = cloneNode(cell, false);
|
176
|
+
setSpanVal(cell, 'rowSpan', 1);
|
177
|
+
setSpanVal(cell, 'colSpan', 1);
|
178
|
+
|
179
|
+
if (formatNode) {
|
180
|
+
cell.appendChild(formatNode);
|
181
|
+
} else {
|
182
|
+
if (!tinymce.isIE || tinymce.isIE11)
|
183
|
+
cell.innerHTML = '<br data-mce-bogus="1" />';
|
184
|
+
}
|
185
|
+
|
186
|
+
return cell;
|
187
|
+
};
|
188
|
+
|
189
|
+
function cleanup() {
|
190
|
+
var rng = dom.createRng();
|
191
|
+
|
192
|
+
// Empty rows
|
193
|
+
each(dom.select('tr', table), function(tr) {
|
194
|
+
if (tr.cells.length == 0)
|
195
|
+
dom.remove(tr);
|
196
|
+
});
|
197
|
+
|
198
|
+
// Empty table
|
199
|
+
if (dom.select('tr', table).length == 0) {
|
200
|
+
rng.setStartAfter(table);
|
201
|
+
rng.setEndAfter(table);
|
202
|
+
selection.setRng(rng);
|
203
|
+
dom.remove(table);
|
204
|
+
return;
|
205
|
+
}
|
206
|
+
|
207
|
+
// Empty header/body/footer
|
208
|
+
each(dom.select('thead,tbody,tfoot', table), function(part) {
|
209
|
+
if (part.rows.length == 0)
|
210
|
+
dom.remove(part);
|
211
|
+
});
|
212
|
+
|
213
|
+
// Restore selection to start position if it still exists
|
214
|
+
buildGrid();
|
215
|
+
|
216
|
+
// Restore the selection to the closest table position
|
217
|
+
row = grid[Math.min(grid.length - 1, startPos.y)];
|
218
|
+
if (row) {
|
219
|
+
selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true);
|
220
|
+
selection.collapse(true);
|
221
|
+
}
|
222
|
+
};
|
223
|
+
|
224
|
+
function fillLeftDown(x, y, rows, cols) {
|
225
|
+
var tr, x2, r, c, cell;
|
226
|
+
|
227
|
+
tr = grid[y][x].elm.parentNode;
|
228
|
+
for (r = 1; r <= rows; r++) {
|
229
|
+
tr = dom.getNext(tr, 'tr');
|
230
|
+
|
231
|
+
if (tr) {
|
232
|
+
// Loop left to find real cell
|
233
|
+
for (x2 = x; x2 >= 0; x2--) {
|
234
|
+
cell = grid[y + r][x2].elm;
|
235
|
+
|
236
|
+
if (cell.parentNode == tr) {
|
237
|
+
// Append clones after
|
238
|
+
for (c = 1; c <= cols; c++)
|
239
|
+
dom.insertAfter(cloneCell(cell), cell);
|
240
|
+
|
241
|
+
break;
|
242
|
+
}
|
243
|
+
}
|
244
|
+
|
245
|
+
if (x2 == -1) {
|
246
|
+
// Insert nodes before first cell
|
247
|
+
for (c = 1; c <= cols; c++)
|
248
|
+
tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]);
|
249
|
+
}
|
250
|
+
}
|
251
|
+
}
|
252
|
+
};
|
253
|
+
|
254
|
+
function split() {
|
255
|
+
each(grid, function(row, y) {
|
256
|
+
each(row, function(cell, x) {
|
257
|
+
var colSpan, rowSpan, newCell, i;
|
258
|
+
|
259
|
+
if (isCellSelected(cell)) {
|
260
|
+
cell = cell.elm;
|
261
|
+
colSpan = getSpanVal(cell, 'colspan');
|
262
|
+
rowSpan = getSpanVal(cell, 'rowspan');
|
263
|
+
|
264
|
+
if (colSpan > 1 || rowSpan > 1) {
|
265
|
+
setSpanVal(cell, 'rowSpan', 1);
|
266
|
+
setSpanVal(cell, 'colSpan', 1);
|
267
|
+
|
268
|
+
// Insert cells right
|
269
|
+
for (i = 0; i < colSpan - 1; i++)
|
270
|
+
dom.insertAfter(cloneCell(cell), cell);
|
271
|
+
|
272
|
+
fillLeftDown(x, y, rowSpan - 1, colSpan);
|
273
|
+
}
|
274
|
+
}
|
275
|
+
});
|
276
|
+
});
|
277
|
+
};
|
278
|
+
|
279
|
+
function merge(cell, cols, rows) {
|
280
|
+
var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count;
|
281
|
+
|
282
|
+
// Use specified cell and cols/rows
|
283
|
+
if (cell) {
|
284
|
+
pos = getPos(cell);
|
285
|
+
startX = pos.x;
|
286
|
+
startY = pos.y;
|
287
|
+
endX = startX + (cols - 1);
|
288
|
+
endY = startY + (rows - 1);
|
289
|
+
} else {
|
290
|
+
startPos = endPos = null;
|
291
|
+
|
292
|
+
// Calculate start/end pos by checking for selected cells in grid works better with context menu
|
293
|
+
each(grid, function(row, y) {
|
294
|
+
each(row, function(cell, x) {
|
295
|
+
if (isCellSelected(cell)) {
|
296
|
+
if (!startPos) {
|
297
|
+
startPos = {x: x, y: y};
|
298
|
+
}
|
299
|
+
|
300
|
+
endPos = {x: x, y: y};
|
301
|
+
}
|
302
|
+
});
|
303
|
+
});
|
304
|
+
|
305
|
+
// Use selection
|
306
|
+
startX = startPos.x;
|
307
|
+
startY = startPos.y;
|
308
|
+
endX = endPos.x;
|
309
|
+
endY = endPos.y;
|
310
|
+
}
|
311
|
+
|
312
|
+
// Find start/end cells
|
313
|
+
startCell = getCell(startX, startY);
|
314
|
+
endCell = getCell(endX, endY);
|
315
|
+
|
316
|
+
// Check if the cells exists and if they are of the same part for example tbody = tbody
|
317
|
+
if (startCell && endCell && startCell.part == endCell.part) {
|
318
|
+
// Split and rebuild grid
|
319
|
+
split();
|
320
|
+
buildGrid();
|
321
|
+
|
322
|
+
// Set row/col span to start cell
|
323
|
+
startCell = getCell(startX, startY).elm;
|
324
|
+
setSpanVal(startCell, 'colSpan', (endX - startX) + 1);
|
325
|
+
setSpanVal(startCell, 'rowSpan', (endY - startY) + 1);
|
326
|
+
|
327
|
+
// Remove other cells and add it's contents to the start cell
|
328
|
+
for (y = startY; y <= endY; y++) {
|
329
|
+
for (x = startX; x <= endX; x++) {
|
330
|
+
if (!grid[y] || !grid[y][x])
|
331
|
+
continue;
|
332
|
+
|
333
|
+
cell = grid[y][x].elm;
|
334
|
+
|
335
|
+
if (cell != startCell) {
|
336
|
+
// Move children to startCell
|
337
|
+
children = tinymce.grep(cell.childNodes);
|
338
|
+
each(children, function(node) {
|
339
|
+
startCell.appendChild(node);
|
340
|
+
});
|
341
|
+
|
342
|
+
// Remove bogus nodes if there is children in the target cell
|
343
|
+
if (children.length) {
|
344
|
+
children = tinymce.grep(startCell.childNodes);
|
345
|
+
count = 0;
|
346
|
+
each(children, function(node) {
|
347
|
+
if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1)
|
348
|
+
startCell.removeChild(node);
|
349
|
+
});
|
350
|
+
}
|
351
|
+
|
352
|
+
// Remove cell
|
353
|
+
dom.remove(cell);
|
354
|
+
}
|
355
|
+
}
|
356
|
+
}
|
357
|
+
|
358
|
+
// Remove empty rows etc and restore caret location
|
359
|
+
cleanup();
|
360
|
+
}
|
361
|
+
};
|
362
|
+
|
363
|
+
function insertRow(before) {
|
364
|
+
var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan;
|
365
|
+
|
366
|
+
// Find first/last row
|
367
|
+
each(grid, function(row, y) {
|
368
|
+
each(row, function(cell, x) {
|
369
|
+
if (isCellSelected(cell)) {
|
370
|
+
cell = cell.elm;
|
371
|
+
rowElm = cell.parentNode;
|
372
|
+
newRow = cloneNode(rowElm, false);
|
373
|
+
posY = y;
|
374
|
+
|
375
|
+
if (before)
|
376
|
+
return false;
|
377
|
+
}
|
378
|
+
});
|
379
|
+
|
380
|
+
if (before)
|
381
|
+
return !posY;
|
382
|
+
});
|
383
|
+
|
384
|
+
for (x = 0; x < grid[0].length; x++) {
|
385
|
+
// Cell not found could be because of an invalid table structure
|
386
|
+
if (!grid[posY][x])
|
387
|
+
continue;
|
388
|
+
|
389
|
+
cell = grid[posY][x].elm;
|
390
|
+
|
391
|
+
if (cell != lastCell) {
|
392
|
+
if (!before) {
|
393
|
+
rowSpan = getSpanVal(cell, 'rowspan');
|
394
|
+
if (rowSpan > 1) {
|
395
|
+
setSpanVal(cell, 'rowSpan', rowSpan + 1);
|
396
|
+
continue;
|
397
|
+
}
|
398
|
+
} else {
|
399
|
+
// Check if cell above can be expanded
|
400
|
+
if (posY > 0 && grid[posY - 1][x]) {
|
401
|
+
otherCell = grid[posY - 1][x].elm;
|
402
|
+
rowSpan = getSpanVal(otherCell, 'rowSpan');
|
403
|
+
if (rowSpan > 1) {
|
404
|
+
setSpanVal(otherCell, 'rowSpan', rowSpan + 1);
|
405
|
+
continue;
|
406
|
+
}
|
407
|
+
}
|
408
|
+
}
|
409
|
+
|
410
|
+
// Insert new cell into new row
|
411
|
+
newCell = cloneCell(cell);
|
412
|
+
setSpanVal(newCell, 'colSpan', cell.colSpan);
|
413
|
+
|
414
|
+
newRow.appendChild(newCell);
|
415
|
+
|
416
|
+
lastCell = cell;
|
417
|
+
}
|
418
|
+
}
|
419
|
+
|
420
|
+
if (newRow.hasChildNodes()) {
|
421
|
+
if (!before)
|
422
|
+
dom.insertAfter(newRow, rowElm);
|
423
|
+
else
|
424
|
+
rowElm.parentNode.insertBefore(newRow, rowElm);
|
425
|
+
}
|
426
|
+
};
|
427
|
+
|
428
|
+
function insertCol(before) {
|
429
|
+
var posX, lastCell;
|
430
|
+
|
431
|
+
// Find first/last column
|
432
|
+
each(grid, function(row, y) {
|
433
|
+
each(row, function(cell, x) {
|
434
|
+
if (isCellSelected(cell)) {
|
435
|
+
posX = x;
|
436
|
+
|
437
|
+
if (before)
|
438
|
+
return false;
|
439
|
+
}
|
440
|
+
});
|
441
|
+
|
442
|
+
if (before)
|
443
|
+
return !posX;
|
444
|
+
});
|
445
|
+
|
446
|
+
each(grid, function(row, y) {
|
447
|
+
var cell, rowSpan, colSpan;
|
448
|
+
|
449
|
+
if (!row[posX])
|
450
|
+
return;
|
451
|
+
|
452
|
+
cell = row[posX].elm;
|
453
|
+
if (cell != lastCell) {
|
454
|
+
colSpan = getSpanVal(cell, 'colspan');
|
455
|
+
rowSpan = getSpanVal(cell, 'rowspan');
|
456
|
+
|
457
|
+
if (colSpan == 1) {
|
458
|
+
if (!before) {
|
459
|
+
dom.insertAfter(cloneCell(cell), cell);
|
460
|
+
fillLeftDown(posX, y, rowSpan - 1, colSpan);
|
461
|
+
} else {
|
462
|
+
cell.parentNode.insertBefore(cloneCell(cell), cell);
|
463
|
+
fillLeftDown(posX, y, rowSpan - 1, colSpan);
|
464
|
+
}
|
465
|
+
} else
|
466
|
+
setSpanVal(cell, 'colSpan', cell.colSpan + 1);
|
467
|
+
|
468
|
+
lastCell = cell;
|
469
|
+
}
|
470
|
+
});
|
471
|
+
};
|
472
|
+
|
473
|
+
function deleteCols() {
|
474
|
+
var cols = [];
|
475
|
+
|
476
|
+
// Get selected column indexes
|
477
|
+
each(grid, function(row, y) {
|
478
|
+
each(row, function(cell, x) {
|
479
|
+
if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) {
|
480
|
+
each(grid, function(row) {
|
481
|
+
var cell = row[x].elm, colSpan;
|
482
|
+
|
483
|
+
colSpan = getSpanVal(cell, 'colSpan');
|
484
|
+
|
485
|
+
if (colSpan > 1)
|
486
|
+
setSpanVal(cell, 'colSpan', colSpan - 1);
|
487
|
+
else
|
488
|
+
dom.remove(cell);
|
489
|
+
});
|
490
|
+
|
491
|
+
cols.push(x);
|
492
|
+
}
|
493
|
+
});
|
494
|
+
});
|
495
|
+
|
496
|
+
cleanup();
|
497
|
+
};
|
498
|
+
|
499
|
+
function deleteRows() {
|
500
|
+
var rows;
|
501
|
+
|
502
|
+
function deleteRow(tr) {
|
503
|
+
var nextTr, pos, lastCell;
|
504
|
+
|
505
|
+
nextTr = dom.getNext(tr, 'tr');
|
506
|
+
|
507
|
+
// Move down row spanned cells
|
508
|
+
each(tr.cells, function(cell) {
|
509
|
+
var rowSpan = getSpanVal(cell, 'rowSpan');
|
510
|
+
|
511
|
+
if (rowSpan > 1) {
|
512
|
+
setSpanVal(cell, 'rowSpan', rowSpan - 1);
|
513
|
+
pos = getPos(cell);
|
514
|
+
fillLeftDown(pos.x, pos.y, 1, 1);
|
515
|
+
}
|
516
|
+
});
|
517
|
+
|
518
|
+
// Delete cells
|
519
|
+
pos = getPos(tr.cells[0]);
|
520
|
+
each(grid[pos.y], function(cell) {
|
521
|
+
var rowSpan;
|
522
|
+
|
523
|
+
cell = cell.elm;
|
524
|
+
|
525
|
+
if (cell != lastCell) {
|
526
|
+
rowSpan = getSpanVal(cell, 'rowSpan');
|
527
|
+
|
528
|
+
if (rowSpan <= 1)
|
529
|
+
dom.remove(cell);
|
530
|
+
else
|
531
|
+
setSpanVal(cell, 'rowSpan', rowSpan - 1);
|
532
|
+
|
533
|
+
lastCell = cell;
|
534
|
+
}
|
535
|
+
});
|
536
|
+
};
|
537
|
+
|
538
|
+
// Get selected rows and move selection out of scope
|
539
|
+
rows = getSelectedRows();
|
540
|
+
|
541
|
+
// Delete all selected rows
|
542
|
+
each(rows.reverse(), function(tr) {
|
543
|
+
deleteRow(tr);
|
544
|
+
});
|
545
|
+
|
546
|
+
cleanup();
|
547
|
+
};
|
548
|
+
|
549
|
+
function cutRows() {
|
550
|
+
var rows = getSelectedRows();
|
551
|
+
|
552
|
+
dom.remove(rows);
|
553
|
+
cleanup();
|
554
|
+
|
555
|
+
return rows;
|
556
|
+
};
|
557
|
+
|
558
|
+
function copyRows() {
|
559
|
+
var rows = getSelectedRows();
|
560
|
+
|
561
|
+
each(rows, function(row, i) {
|
562
|
+
rows[i] = cloneNode(row, true);
|
563
|
+
});
|
564
|
+
|
565
|
+
return rows;
|
566
|
+
};
|
567
|
+
|
568
|
+
function pasteRows(rows, before) {
|
569
|
+
// If we don't have any rows in the clipboard, return immediately
|
570
|
+
if(!rows)
|
571
|
+
return;
|
572
|
+
|
573
|
+
var selectedRows = getSelectedRows(),
|
574
|
+
targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
|
575
|
+
targetCellCount = targetRow.cells.length;
|
576
|
+
|
577
|
+
// Calc target cell count
|
578
|
+
each(grid, function(row) {
|
579
|
+
var match;
|
580
|
+
|
581
|
+
targetCellCount = 0;
|
582
|
+
each(row, function(cell, x) {
|
583
|
+
if (cell.real)
|
584
|
+
targetCellCount += cell.colspan;
|
585
|
+
|
586
|
+
if (cell.elm.parentNode == targetRow)
|
587
|
+
match = 1;
|
588
|
+
});
|
589
|
+
|
590
|
+
if (match)
|
591
|
+
return false;
|
592
|
+
});
|
593
|
+
|
594
|
+
if (!before)
|
595
|
+
rows.reverse();
|
596
|
+
|
597
|
+
each(rows, function(row) {
|
598
|
+
var cellCount = row.cells.length, cell;
|
599
|
+
|
600
|
+
// Remove col/rowspans
|
601
|
+
for (i = 0; i < cellCount; i++) {
|
602
|
+
cell = row.cells[i];
|
603
|
+
setSpanVal(cell, 'colSpan', 1);
|
604
|
+
setSpanVal(cell, 'rowSpan', 1);
|
605
|
+
}
|
606
|
+
|
607
|
+
// Needs more cells
|
608
|
+
for (i = cellCount; i < targetCellCount; i++)
|
609
|
+
row.appendChild(cloneCell(row.cells[cellCount - 1]));
|
610
|
+
|
611
|
+
// Needs less cells
|
612
|
+
for (i = targetCellCount; i < cellCount; i++)
|
613
|
+
dom.remove(row.cells[i]);
|
614
|
+
|
615
|
+
// Add before/after
|
616
|
+
if (before)
|
617
|
+
targetRow.parentNode.insertBefore(row, targetRow);
|
618
|
+
else
|
619
|
+
dom.insertAfter(row, targetRow);
|
620
|
+
});
|
621
|
+
|
622
|
+
// Remove current selection
|
623
|
+
dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
|
624
|
+
};
|
625
|
+
|
626
|
+
function getPos(target) {
|
627
|
+
var pos;
|
628
|
+
|
629
|
+
each(grid, function(row, y) {
|
630
|
+
each(row, function(cell, x) {
|
631
|
+
if (cell.elm == target) {
|
632
|
+
pos = {x : x, y : y};
|
633
|
+
return false;
|
634
|
+
}
|
635
|
+
});
|
636
|
+
|
637
|
+
return !pos;
|
638
|
+
});
|
639
|
+
|
640
|
+
return pos;
|
641
|
+
};
|
642
|
+
|
643
|
+
function setStartCell(cell) {
|
644
|
+
startPos = getPos(cell);
|
645
|
+
};
|
646
|
+
|
647
|
+
function findEndPos() {
|
648
|
+
var pos, maxX, maxY;
|
649
|
+
|
650
|
+
maxX = maxY = 0;
|
651
|
+
|
652
|
+
each(grid, function(row, y) {
|
653
|
+
each(row, function(cell, x) {
|
654
|
+
var colSpan, rowSpan;
|
655
|
+
|
656
|
+
if (isCellSelected(cell)) {
|
657
|
+
cell = grid[y][x];
|
658
|
+
|
659
|
+
if (x > maxX)
|
660
|
+
maxX = x;
|
661
|
+
|
662
|
+
if (y > maxY)
|
663
|
+
maxY = y;
|
664
|
+
|
665
|
+
if (cell.real) {
|
666
|
+
colSpan = cell.colspan - 1;
|
667
|
+
rowSpan = cell.rowspan - 1;
|
668
|
+
|
669
|
+
if (colSpan) {
|
670
|
+
if (x + colSpan > maxX)
|
671
|
+
maxX = x + colSpan;
|
672
|
+
}
|
673
|
+
|
674
|
+
if (rowSpan) {
|
675
|
+
if (y + rowSpan > maxY)
|
676
|
+
maxY = y + rowSpan;
|
677
|
+
}
|
678
|
+
}
|
679
|
+
}
|
680
|
+
});
|
681
|
+
});
|
682
|
+
|
683
|
+
return {x : maxX, y : maxY};
|
684
|
+
};
|
685
|
+
|
686
|
+
function setEndCell(cell) {
|
687
|
+
var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan;
|
688
|
+
|
689
|
+
endPos = getPos(cell);
|
690
|
+
|
691
|
+
if (startPos && endPos) {
|
692
|
+
// Get start/end positions
|
693
|
+
startX = Math.min(startPos.x, endPos.x);
|
694
|
+
startY = Math.min(startPos.y, endPos.y);
|
695
|
+
endX = Math.max(startPos.x, endPos.x);
|
696
|
+
endY = Math.max(startPos.y, endPos.y);
|
697
|
+
|
698
|
+
// Expand end positon to include spans
|
699
|
+
maxX = endX;
|
700
|
+
maxY = endY;
|
701
|
+
|
702
|
+
// Expand startX
|
703
|
+
for (y = startY; y <= maxY; y++) {
|
704
|
+
cell = grid[y][startX];
|
705
|
+
|
706
|
+
if (!cell.real) {
|
707
|
+
if (startX - (cell.colspan - 1) < startX)
|
708
|
+
startX -= cell.colspan - 1;
|
709
|
+
}
|
710
|
+
}
|
711
|
+
|
712
|
+
// Expand startY
|
713
|
+
for (x = startX; x <= maxX; x++) {
|
714
|
+
cell = grid[startY][x];
|
715
|
+
|
716
|
+
if (!cell.real) {
|
717
|
+
if (startY - (cell.rowspan - 1) < startY)
|
718
|
+
startY -= cell.rowspan - 1;
|
719
|
+
}
|
720
|
+
}
|
721
|
+
|
722
|
+
// Find max X, Y
|
723
|
+
for (y = startY; y <= endY; y++) {
|
724
|
+
for (x = startX; x <= endX; x++) {
|
725
|
+
cell = grid[y][x];
|
726
|
+
|
727
|
+
if (cell.real) {
|
728
|
+
colSpan = cell.colspan - 1;
|
729
|
+
rowSpan = cell.rowspan - 1;
|
730
|
+
|
731
|
+
if (colSpan) {
|
732
|
+
if (x + colSpan > maxX)
|
733
|
+
maxX = x + colSpan;
|
734
|
+
}
|
735
|
+
|
736
|
+
if (rowSpan) {
|
737
|
+
if (y + rowSpan > maxY)
|
738
|
+
maxY = y + rowSpan;
|
739
|
+
}
|
740
|
+
}
|
741
|
+
}
|
742
|
+
}
|
743
|
+
|
744
|
+
// Remove current selection
|
745
|
+
dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
|
746
|
+
|
747
|
+
// Add new selection
|
748
|
+
for (y = startY; y <= maxY; y++) {
|
749
|
+
for (x = startX; x <= maxX; x++) {
|
750
|
+
if (grid[y][x])
|
751
|
+
dom.addClass(grid[y][x].elm, 'mceSelected');
|
752
|
+
}
|
753
|
+
}
|
754
|
+
}
|
755
|
+
};
|
756
|
+
|
757
|
+
// Expose to public
|
758
|
+
tinymce.extend(this, {
|
759
|
+
deleteTable : deleteTable,
|
760
|
+
split : split,
|
761
|
+
merge : merge,
|
762
|
+
insertRow : insertRow,
|
763
|
+
insertCol : insertCol,
|
764
|
+
deleteCols : deleteCols,
|
765
|
+
deleteRows : deleteRows,
|
766
|
+
cutRows : cutRows,
|
767
|
+
copyRows : copyRows,
|
768
|
+
pasteRows : pasteRows,
|
769
|
+
getPos : getPos,
|
770
|
+
setStartCell : setStartCell,
|
771
|
+
setEndCell : setEndCell
|
772
|
+
});
|
773
|
+
};
|
774
|
+
|
775
|
+
tinymce.create('tinymce.plugins.TablePlugin', {
|
776
|
+
init : function(ed, url) {
|
777
|
+
var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload
|
778
|
+
|
779
|
+
function createTableGrid(node) {
|
780
|
+
var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table');
|
781
|
+
|
782
|
+
if (tblElm)
|
783
|
+
return new TableGrid(tblElm, ed.dom, selection);
|
784
|
+
};
|
785
|
+
|
786
|
+
function cleanup() {
|
787
|
+
// Restore selection possibilities
|
788
|
+
ed.getBody().style.webkitUserSelect = '';
|
789
|
+
|
790
|
+
if (hasCellSelection) {
|
791
|
+
ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
|
792
|
+
hasCellSelection = false;
|
793
|
+
}
|
794
|
+
};
|
795
|
+
|
796
|
+
// Register buttons
|
797
|
+
each([
|
798
|
+
['table', 'table.desc', 'mceInsertTable', true],
|
799
|
+
['delete_table', 'table.del', 'mceTableDelete'],
|
800
|
+
['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'],
|
801
|
+
['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'],
|
802
|
+
['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'],
|
803
|
+
['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'],
|
804
|
+
['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'],
|
805
|
+
['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'],
|
806
|
+
['row_props', 'table.row_desc', 'mceTableRowProps', true],
|
807
|
+
['cell_props', 'table.cell_desc', 'mceTableCellProps', true],
|
808
|
+
['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true],
|
809
|
+
['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true]
|
810
|
+
], function(c) {
|
811
|
+
ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]});
|
812
|
+
});
|
813
|
+
|
814
|
+
// Select whole table is a table border is clicked
|
815
|
+
if (!tinymce.isIE) {
|
816
|
+
ed.onClick.add(function(ed, e) {
|
817
|
+
e = e.target;
|
818
|
+
|
819
|
+
if (e.nodeName === 'TABLE') {
|
820
|
+
ed.selection.select(e);
|
821
|
+
ed.nodeChanged();
|
822
|
+
}
|
823
|
+
});
|
824
|
+
}
|
825
|
+
|
826
|
+
ed.onPreProcess.add(function(ed, args) {
|
827
|
+
var nodes, i, node, dom = ed.dom, value;
|
828
|
+
|
829
|
+
nodes = dom.select('table', args.node);
|
830
|
+
i = nodes.length;
|
831
|
+
while (i--) {
|
832
|
+
node = nodes[i];
|
833
|
+
dom.setAttrib(node, 'data-mce-style', '');
|
834
|
+
|
835
|
+
if ((value = dom.getAttrib(node, 'width'))) {
|
836
|
+
dom.setStyle(node, 'width', value);
|
837
|
+
dom.setAttrib(node, 'width', '');
|
838
|
+
}
|
839
|
+
|
840
|
+
if ((value = dom.getAttrib(node, 'height'))) {
|
841
|
+
dom.setStyle(node, 'height', value);
|
842
|
+
dom.setAttrib(node, 'height', '');
|
843
|
+
}
|
844
|
+
}
|
845
|
+
});
|
846
|
+
|
847
|
+
// Handle node change updates
|
848
|
+
ed.onNodeChange.add(function(ed, cm, n) {
|
849
|
+
var p;
|
850
|
+
|
851
|
+
n = ed.selection.getStart();
|
852
|
+
p = ed.dom.getParent(n, 'td,th,caption');
|
853
|
+
cm.setActive('table', n.nodeName === 'TABLE' || !!p);
|
854
|
+
|
855
|
+
// Disable table tools if we are in caption
|
856
|
+
if (p && p.nodeName === 'CAPTION')
|
857
|
+
p = 0;
|
858
|
+
|
859
|
+
cm.setDisabled('delete_table', !p);
|
860
|
+
cm.setDisabled('delete_col', !p);
|
861
|
+
cm.setDisabled('delete_table', !p);
|
862
|
+
cm.setDisabled('delete_row', !p);
|
863
|
+
cm.setDisabled('col_after', !p);
|
864
|
+
cm.setDisabled('col_before', !p);
|
865
|
+
cm.setDisabled('row_after', !p);
|
866
|
+
cm.setDisabled('row_before', !p);
|
867
|
+
cm.setDisabled('row_props', !p);
|
868
|
+
cm.setDisabled('cell_props', !p);
|
869
|
+
cm.setDisabled('split_cells', !p);
|
870
|
+
cm.setDisabled('merge_cells', !p);
|
871
|
+
});
|
872
|
+
|
873
|
+
ed.onInit.add(function(ed) {
|
874
|
+
var startTable, startCell, dom = ed.dom, tableGrid;
|
875
|
+
|
876
|
+
winMan = ed.windowManager;
|
877
|
+
|
878
|
+
// Add cell selection logic
|
879
|
+
ed.onMouseDown.add(function(ed, e) {
|
880
|
+
if (e.button != 2) {
|
881
|
+
cleanup();
|
882
|
+
|
883
|
+
startCell = dom.getParent(e.target, 'td,th');
|
884
|
+
startTable = dom.getParent(startCell, 'table');
|
885
|
+
}
|
886
|
+
});
|
887
|
+
|
888
|
+
dom.bind(ed.getDoc(), 'mouseover', function(e) {
|
889
|
+
var sel, table, target = e.target;
|
890
|
+
|
891
|
+
if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) {
|
892
|
+
table = dom.getParent(target, 'table');
|
893
|
+
if (table == startTable) {
|
894
|
+
if (!tableGrid) {
|
895
|
+
tableGrid = createTableGrid(table);
|
896
|
+
tableGrid.setStartCell(startCell);
|
897
|
+
|
898
|
+
ed.getBody().style.webkitUserSelect = 'none';
|
899
|
+
}
|
900
|
+
|
901
|
+
tableGrid.setEndCell(target);
|
902
|
+
hasCellSelection = true;
|
903
|
+
}
|
904
|
+
|
905
|
+
// Remove current selection
|
906
|
+
sel = ed.selection.getSel();
|
907
|
+
|
908
|
+
try {
|
909
|
+
if (sel.removeAllRanges)
|
910
|
+
sel.removeAllRanges();
|
911
|
+
else
|
912
|
+
sel.empty();
|
913
|
+
} catch (ex) {
|
914
|
+
// IE9 might throw errors here
|
915
|
+
}
|
916
|
+
|
917
|
+
e.preventDefault();
|
918
|
+
}
|
919
|
+
});
|
920
|
+
|
921
|
+
ed.onMouseUp.add(function(ed, e) {
|
922
|
+
var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode;
|
923
|
+
|
924
|
+
// Move selection to startCell
|
925
|
+
if (startCell) {
|
926
|
+
if (tableGrid)
|
927
|
+
ed.getBody().style.webkitUserSelect = '';
|
928
|
+
|
929
|
+
function setPoint(node, start) {
|
930
|
+
var walker = new tinymce.dom.TreeWalker(node, node);
|
931
|
+
|
932
|
+
do {
|
933
|
+
// Text node
|
934
|
+
if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) {
|
935
|
+
if (start)
|
936
|
+
rng.setStart(node, 0);
|
937
|
+
else
|
938
|
+
rng.setEnd(node, node.nodeValue.length);
|
939
|
+
|
940
|
+
return;
|
941
|
+
}
|
942
|
+
|
943
|
+
// BR element
|
944
|
+
if (node.nodeName == 'BR') {
|
945
|
+
if (start)
|
946
|
+
rng.setStartBefore(node);
|
947
|
+
else
|
948
|
+
rng.setEndBefore(node);
|
949
|
+
|
950
|
+
return;
|
951
|
+
}
|
952
|
+
} while (node = (start ? walker.next() : walker.prev()));
|
953
|
+
}
|
954
|
+
|
955
|
+
// Try to expand text selection as much as we can only Gecko supports cell selection
|
956
|
+
selectedCells = dom.select('td.mceSelected,th.mceSelected');
|
957
|
+
if (selectedCells.length > 0) {
|
958
|
+
rng = dom.createRng();
|
959
|
+
node = selectedCells[0];
|
960
|
+
endNode = selectedCells[selectedCells.length - 1];
|
961
|
+
rng.setStartBefore(node);
|
962
|
+
rng.setEndAfter(node);
|
963
|
+
|
964
|
+
setPoint(node, 1);
|
965
|
+
walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
|
966
|
+
|
967
|
+
do {
|
968
|
+
if (node.nodeName == 'TD' || node.nodeName == 'TH') {
|
969
|
+
if (!dom.hasClass(node, 'mceSelected'))
|
970
|
+
break;
|
971
|
+
|
972
|
+
lastNode = node;
|
973
|
+
}
|
974
|
+
} while (node = walker.next());
|
975
|
+
|
976
|
+
setPoint(lastNode);
|
977
|
+
|
978
|
+
sel.setRng(rng);
|
979
|
+
}
|
980
|
+
|
981
|
+
ed.nodeChanged();
|
982
|
+
startCell = tableGrid = startTable = null;
|
983
|
+
}
|
984
|
+
});
|
985
|
+
|
986
|
+
ed.onKeyUp.add(function(ed, e) {
|
987
|
+
cleanup();
|
988
|
+
});
|
989
|
+
|
990
|
+
ed.onKeyDown.add(function (ed, e) {
|
991
|
+
fixTableCellSelection(ed);
|
992
|
+
});
|
993
|
+
|
994
|
+
ed.onMouseDown.add(function (ed, e) {
|
995
|
+
if (e.button != 2) {
|
996
|
+
fixTableCellSelection(ed);
|
997
|
+
}
|
998
|
+
});
|
999
|
+
function tableCellSelected(ed, rng, n, currentCell) {
|
1000
|
+
// The decision of when a table cell is selected is somewhat involved. The fact that this code is
|
1001
|
+
// required is actually a pointer to the root cause of this bug. A cell is selected when the start
|
1002
|
+
// and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases)
|
1003
|
+
// or the parent of the table (in the case of the selection containing the last cell of a table).
|
1004
|
+
var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'),
|
1005
|
+
tableParent, allOfCellSelected, tableCellSelection;
|
1006
|
+
if (table)
|
1007
|
+
tableParent = table.parentNode;
|
1008
|
+
allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE &&
|
1009
|
+
rng.startOffset == 0 &&
|
1010
|
+
rng.endOffset == 0 &&
|
1011
|
+
currentCell &&
|
1012
|
+
(n.nodeName=="TR" || n==tableParent);
|
1013
|
+
tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell;
|
1014
|
+
return allOfCellSelected || tableCellSelection;
|
1015
|
+
// return false;
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
// this nasty hack is here to work around some WebKit selection bugs.
|
1019
|
+
function fixTableCellSelection(ed) {
|
1020
|
+
if (!tinymce.isWebKit)
|
1021
|
+
return;
|
1022
|
+
|
1023
|
+
var rng = ed.selection.getRng();
|
1024
|
+
var n = ed.selection.getNode();
|
1025
|
+
var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH');
|
1026
|
+
|
1027
|
+
if (!tableCellSelected(ed, rng, n, currentCell))
|
1028
|
+
return;
|
1029
|
+
if (!currentCell) {
|
1030
|
+
currentCell=n;
|
1031
|
+
}
|
1032
|
+
|
1033
|
+
// Get the very last node inside the table cell
|
1034
|
+
var end = currentCell.lastChild;
|
1035
|
+
while (end.lastChild)
|
1036
|
+
end = end.lastChild;
|
1037
|
+
|
1038
|
+
// Select the entire table cell. Nothing outside of the table cell should be selected.
|
1039
|
+
rng.setEnd(end, end.nodeValue.length);
|
1040
|
+
ed.selection.setRng(rng);
|
1041
|
+
}
|
1042
|
+
ed.plugins.table.fixTableCellSelection=fixTableCellSelection;
|
1043
|
+
|
1044
|
+
// Add context menu
|
1045
|
+
if (ed && ed.plugins.contextmenu) {
|
1046
|
+
ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
|
1047
|
+
var sm, se = ed.selection, el = se.getNode() || ed.getBody();
|
1048
|
+
|
1049
|
+
if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) {
|
1050
|
+
m.removeAll();
|
1051
|
+
|
1052
|
+
if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) {
|
1053
|
+
m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
|
1054
|
+
m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
|
1055
|
+
m.addSeparator();
|
1056
|
+
}
|
1057
|
+
|
1058
|
+
if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) {
|
1059
|
+
m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
|
1060
|
+
m.addSeparator();
|
1061
|
+
}
|
1062
|
+
|
1063
|
+
m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}});
|
1064
|
+
m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'});
|
1065
|
+
m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'});
|
1066
|
+
m.addSeparator();
|
1067
|
+
|
1068
|
+
// Cell menu
|
1069
|
+
sm = m.addMenu({title : 'table.cell'});
|
1070
|
+
sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'});
|
1071
|
+
sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'});
|
1072
|
+
sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'});
|
1073
|
+
|
1074
|
+
// Row menu
|
1075
|
+
sm = m.addMenu({title : 'table.row'});
|
1076
|
+
sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'});
|
1077
|
+
sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'});
|
1078
|
+
sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'});
|
1079
|
+
sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'});
|
1080
|
+
sm.addSeparator();
|
1081
|
+
sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'});
|
1082
|
+
sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'});
|
1083
|
+
sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows);
|
1084
|
+
sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows);
|
1085
|
+
|
1086
|
+
// Column menu
|
1087
|
+
sm = m.addMenu({title : 'table.col'});
|
1088
|
+
sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'});
|
1089
|
+
sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'});
|
1090
|
+
sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'});
|
1091
|
+
} else
|
1092
|
+
m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'});
|
1093
|
+
});
|
1094
|
+
}
|
1095
|
+
|
1096
|
+
// Fix to allow navigating up and down in a table in WebKit browsers.
|
1097
|
+
if (tinymce.isWebKit) {
|
1098
|
+
function moveSelection(ed, e) {
|
1099
|
+
var VK = tinymce.VK;
|
1100
|
+
var key = e.keyCode;
|
1101
|
+
|
1102
|
+
function handle(upBool, sourceNode, event) {
|
1103
|
+
var siblingDirection = upBool ? 'previousSibling' : 'nextSibling';
|
1104
|
+
var currentRow = ed.dom.getParent(sourceNode, 'tr');
|
1105
|
+
var siblingRow = currentRow[siblingDirection];
|
1106
|
+
|
1107
|
+
if (siblingRow) {
|
1108
|
+
moveCursorToRow(ed, sourceNode, siblingRow, upBool);
|
1109
|
+
tinymce.dom.Event.cancel(event);
|
1110
|
+
return true;
|
1111
|
+
} else {
|
1112
|
+
var tableNode = ed.dom.getParent(currentRow, 'table');
|
1113
|
+
var middleNode = currentRow.parentNode;
|
1114
|
+
var parentNodeName = middleNode.nodeName.toLowerCase();
|
1115
|
+
if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) {
|
1116
|
+
var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody');
|
1117
|
+
if (targetParent !== null) {
|
1118
|
+
return moveToRowInTarget(upBool, targetParent, sourceNode, event);
|
1119
|
+
}
|
1120
|
+
}
|
1121
|
+
return escapeTable(upBool, currentRow, siblingDirection, tableNode, event);
|
1122
|
+
}
|
1123
|
+
}
|
1124
|
+
|
1125
|
+
function getTargetParent(upBool, topNode, secondNode, nodeName) {
|
1126
|
+
var tbodies = ed.dom.select('>' + nodeName, topNode);
|
1127
|
+
var position = tbodies.indexOf(secondNode);
|
1128
|
+
if (upBool && position === 0 || !upBool && position === tbodies.length - 1) {
|
1129
|
+
return getFirstHeadOrFoot(upBool, topNode);
|
1130
|
+
} else if (position === -1) {
|
1131
|
+
var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1;
|
1132
|
+
return tbodies[topOrBottom];
|
1133
|
+
} else {
|
1134
|
+
return tbodies[position + (upBool ? -1 : 1)];
|
1135
|
+
}
|
1136
|
+
}
|
1137
|
+
|
1138
|
+
function getFirstHeadOrFoot(upBool, parent) {
|
1139
|
+
var tagName = upBool ? 'thead' : 'tfoot';
|
1140
|
+
var headOrFoot = ed.dom.select('>' + tagName, parent);
|
1141
|
+
return headOrFoot.length !== 0 ? headOrFoot[0] : null;
|
1142
|
+
}
|
1143
|
+
|
1144
|
+
function moveToRowInTarget(upBool, targetParent, sourceNode, event) {
|
1145
|
+
var targetRow = getChildForDirection(targetParent, upBool);
|
1146
|
+
targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool);
|
1147
|
+
tinymce.dom.Event.cancel(event);
|
1148
|
+
return true;
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
function escapeTable(upBool, currentRow, siblingDirection, table, event) {
|
1152
|
+
var tableSibling = table[siblingDirection];
|
1153
|
+
if (tableSibling) {
|
1154
|
+
moveCursorToStartOfElement(tableSibling);
|
1155
|
+
return true;
|
1156
|
+
} else {
|
1157
|
+
var parentCell = ed.dom.getParent(table, 'td,th');
|
1158
|
+
if (parentCell) {
|
1159
|
+
return handle(upBool, parentCell, event);
|
1160
|
+
} else {
|
1161
|
+
var backUpSibling = getChildForDirection(currentRow, !upBool);
|
1162
|
+
moveCursorToStartOfElement(backUpSibling);
|
1163
|
+
return tinymce.dom.Event.cancel(event);
|
1164
|
+
}
|
1165
|
+
}
|
1166
|
+
}
|
1167
|
+
|
1168
|
+
function getChildForDirection(parent, up) {
|
1169
|
+
var child = parent && parent[up ? 'lastChild' : 'firstChild'];
|
1170
|
+
// BR is not a valid table child to return in this case we return the table cell
|
1171
|
+
return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child;
|
1172
|
+
}
|
1173
|
+
|
1174
|
+
function moveCursorToStartOfElement(n) {
|
1175
|
+
ed.selection.setCursorLocation(n, 0);
|
1176
|
+
}
|
1177
|
+
|
1178
|
+
function isVerticalMovement() {
|
1179
|
+
return key == VK.UP || key == VK.DOWN;
|
1180
|
+
}
|
1181
|
+
|
1182
|
+
function isInTable(ed) {
|
1183
|
+
var node = ed.selection.getNode();
|
1184
|
+
var currentRow = ed.dom.getParent(node, 'tr');
|
1185
|
+
return currentRow !== null;
|
1186
|
+
}
|
1187
|
+
|
1188
|
+
function columnIndex(column) {
|
1189
|
+
var colIndex = 0;
|
1190
|
+
var c = column;
|
1191
|
+
while (c.previousSibling) {
|
1192
|
+
c = c.previousSibling;
|
1193
|
+
colIndex = colIndex + getSpanVal(c, "colspan");
|
1194
|
+
}
|
1195
|
+
return colIndex;
|
1196
|
+
}
|
1197
|
+
|
1198
|
+
function findColumn(rowElement, columnIndex) {
|
1199
|
+
var c = 0;
|
1200
|
+
var r = 0;
|
1201
|
+
each(rowElement.children, function(cell, i) {
|
1202
|
+
c = c + getSpanVal(cell, "colspan");
|
1203
|
+
r = i;
|
1204
|
+
if (c > columnIndex)
|
1205
|
+
return false;
|
1206
|
+
});
|
1207
|
+
return r;
|
1208
|
+
}
|
1209
|
+
|
1210
|
+
function moveCursorToRow(ed, node, row, upBool) {
|
1211
|
+
var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th'));
|
1212
|
+
var tgtColumnIndex = findColumn(row, srcColumnIndex);
|
1213
|
+
var tgtNode = row.childNodes[tgtColumnIndex];
|
1214
|
+
var rowCellTarget = getChildForDirection(tgtNode, upBool);
|
1215
|
+
moveCursorToStartOfElement(rowCellTarget || tgtNode);
|
1216
|
+
}
|
1217
|
+
|
1218
|
+
function shouldFixCaret(preBrowserNode) {
|
1219
|
+
var newNode = ed.selection.getNode();
|
1220
|
+
var newParent = ed.dom.getParent(newNode, 'td,th');
|
1221
|
+
var oldParent = ed.dom.getParent(preBrowserNode, 'td,th');
|
1222
|
+
return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent)
|
1223
|
+
}
|
1224
|
+
|
1225
|
+
function checkSameParentTable(nodeOne, NodeTwo) {
|
1226
|
+
return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE');
|
1227
|
+
}
|
1228
|
+
|
1229
|
+
if (isVerticalMovement() && isInTable(ed)) {
|
1230
|
+
var preBrowserNode = ed.selection.getNode();
|
1231
|
+
setTimeout(function() {
|
1232
|
+
if (shouldFixCaret(preBrowserNode)) {
|
1233
|
+
handle(!e.shiftKey && key === VK.UP, preBrowserNode, e);
|
1234
|
+
}
|
1235
|
+
}, 0);
|
1236
|
+
}
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
ed.onKeyDown.add(moveSelection);
|
1240
|
+
}
|
1241
|
+
|
1242
|
+
// Fixes an issue on Gecko where it's impossible to place the caret behind a table
|
1243
|
+
// This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled
|
1244
|
+
function fixTableCaretPos() {
|
1245
|
+
var last;
|
1246
|
+
|
1247
|
+
// Skip empty text nodes form the end
|
1248
|
+
for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ;
|
1249
|
+
|
1250
|
+
if (last && last.nodeName == 'TABLE') {
|
1251
|
+
if (ed.settings.forced_root_block)
|
1252
|
+
ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE && !tinymce.isIE11 ? ' ' : '<br data-mce-bogus="1" />');
|
1253
|
+
else
|
1254
|
+
ed.dom.add(ed.getBody(), 'br', {'data-mce-bogus': '1'});
|
1255
|
+
}
|
1256
|
+
};
|
1257
|
+
|
1258
|
+
// Fixes an bug where it's impossible to place the caret before a table in Gecko
|
1259
|
+
// this fix solves it by detecting when the caret is at the beginning of such a table
|
1260
|
+
// and then manually moves the caret infront of the table
|
1261
|
+
if (tinymce.isGecko) {
|
1262
|
+
ed.onKeyDown.add(function(ed, e) {
|
1263
|
+
var rng, table, dom = ed.dom;
|
1264
|
+
|
1265
|
+
// On gecko it's not possible to place the caret before a table
|
1266
|
+
if (e.keyCode == 37 || e.keyCode == 38) {
|
1267
|
+
rng = ed.selection.getRng();
|
1268
|
+
table = dom.getParent(rng.startContainer, 'table');
|
1269
|
+
|
1270
|
+
if (table && ed.getBody().firstChild == table) {
|
1271
|
+
if (isAtStart(rng, table)) {
|
1272
|
+
rng = dom.createRng();
|
1273
|
+
|
1274
|
+
rng.setStartBefore(table);
|
1275
|
+
rng.setEndBefore(table);
|
1276
|
+
|
1277
|
+
ed.selection.setRng(rng);
|
1278
|
+
|
1279
|
+
e.preventDefault();
|
1280
|
+
}
|
1281
|
+
}
|
1282
|
+
}
|
1283
|
+
});
|
1284
|
+
}
|
1285
|
+
|
1286
|
+
ed.onKeyUp.add(fixTableCaretPos);
|
1287
|
+
ed.onSetContent.add(fixTableCaretPos);
|
1288
|
+
ed.onVisualAid.add(fixTableCaretPos);
|
1289
|
+
|
1290
|
+
ed.onPreProcess.add(function(ed, o) {
|
1291
|
+
var last = o.node.lastChild;
|
1292
|
+
|
1293
|
+
if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 && (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) && last.previousSibling && last.previousSibling.nodeName == "TABLE") {
|
1294
|
+
ed.dom.remove(last);
|
1295
|
+
}
|
1296
|
+
});
|
1297
|
+
|
1298
|
+
|
1299
|
+
/**
|
1300
|
+
* Fixes bug in Gecko where shift-enter in table cell does not place caret on new line
|
1301
|
+
*
|
1302
|
+
* Removed: Since the new enter logic seems to fix this one.
|
1303
|
+
*/
|
1304
|
+
/*
|
1305
|
+
if (tinymce.isGecko) {
|
1306
|
+
ed.onKeyDown.add(function(ed, e) {
|
1307
|
+
if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) {
|
1308
|
+
var node = ed.selection.getRng().startContainer;
|
1309
|
+
var tableCell = dom.getParent(node, 'td,th');
|
1310
|
+
if (tableCell) {
|
1311
|
+
var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF");
|
1312
|
+
dom.insertAfter(zeroSizedNbsp, node);
|
1313
|
+
}
|
1314
|
+
}
|
1315
|
+
});
|
1316
|
+
}
|
1317
|
+
*/
|
1318
|
+
|
1319
|
+
fixTableCaretPos();
|
1320
|
+
ed.startContent = ed.getContent({format : 'raw'});
|
1321
|
+
});
|
1322
|
+
|
1323
|
+
// Register action commands
|
1324
|
+
each({
|
1325
|
+
mceTableSplitCells : function(grid) {
|
1326
|
+
grid.split();
|
1327
|
+
},
|
1328
|
+
|
1329
|
+
mceTableMergeCells : function(grid) {
|
1330
|
+
var rowSpan, colSpan, cell;
|
1331
|
+
|
1332
|
+
cell = ed.dom.getParent(ed.selection.getNode(), 'th,td');
|
1333
|
+
if (cell) {
|
1334
|
+
rowSpan = cell.rowSpan;
|
1335
|
+
colSpan = cell.colSpan;
|
1336
|
+
}
|
1337
|
+
|
1338
|
+
if (!ed.dom.select('td.mceSelected,th.mceSelected').length) {
|
1339
|
+
winMan.open({
|
1340
|
+
url : url + '/merge_cells.htm',
|
1341
|
+
width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)),
|
1342
|
+
height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)),
|
1343
|
+
inline : 1
|
1344
|
+
}, {
|
1345
|
+
rows : rowSpan,
|
1346
|
+
cols : colSpan,
|
1347
|
+
onaction : function(data) {
|
1348
|
+
grid.merge(cell, data.cols, data.rows);
|
1349
|
+
},
|
1350
|
+
plugin_url : url
|
1351
|
+
});
|
1352
|
+
} else
|
1353
|
+
grid.merge();
|
1354
|
+
},
|
1355
|
+
|
1356
|
+
mceTableInsertRowBefore : function(grid) {
|
1357
|
+
grid.insertRow(true);
|
1358
|
+
},
|
1359
|
+
|
1360
|
+
mceTableInsertRowAfter : function(grid) {
|
1361
|
+
grid.insertRow();
|
1362
|
+
},
|
1363
|
+
|
1364
|
+
mceTableInsertColBefore : function(grid) {
|
1365
|
+
grid.insertCol(true);
|
1366
|
+
},
|
1367
|
+
|
1368
|
+
mceTableInsertColAfter : function(grid) {
|
1369
|
+
grid.insertCol();
|
1370
|
+
},
|
1371
|
+
|
1372
|
+
mceTableDeleteCol : function(grid) {
|
1373
|
+
grid.deleteCols();
|
1374
|
+
},
|
1375
|
+
|
1376
|
+
mceTableDeleteRow : function(grid) {
|
1377
|
+
grid.deleteRows();
|
1378
|
+
},
|
1379
|
+
|
1380
|
+
mceTableCutRow : function(grid) {
|
1381
|
+
clipboardRows = grid.cutRows();
|
1382
|
+
},
|
1383
|
+
|
1384
|
+
mceTableCopyRow : function(grid) {
|
1385
|
+
clipboardRows = grid.copyRows();
|
1386
|
+
},
|
1387
|
+
|
1388
|
+
mceTablePasteRowBefore : function(grid) {
|
1389
|
+
grid.pasteRows(clipboardRows, true);
|
1390
|
+
},
|
1391
|
+
|
1392
|
+
mceTablePasteRowAfter : function(grid) {
|
1393
|
+
grid.pasteRows(clipboardRows);
|
1394
|
+
},
|
1395
|
+
|
1396
|
+
mceTableDelete : function(grid) {
|
1397
|
+
grid.deleteTable();
|
1398
|
+
}
|
1399
|
+
}, function(func, name) {
|
1400
|
+
ed.addCommand(name, function() {
|
1401
|
+
var grid = createTableGrid();
|
1402
|
+
|
1403
|
+
if (grid) {
|
1404
|
+
func(grid);
|
1405
|
+
ed.execCommand('mceRepaint');
|
1406
|
+
cleanup();
|
1407
|
+
}
|
1408
|
+
});
|
1409
|
+
});
|
1410
|
+
|
1411
|
+
// Register dialog commands
|
1412
|
+
each({
|
1413
|
+
mceInsertTable : function(val) {
|
1414
|
+
winMan.open({
|
1415
|
+
url : url + '/table.htm',
|
1416
|
+
width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)),
|
1417
|
+
height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)),
|
1418
|
+
inline : 1
|
1419
|
+
}, {
|
1420
|
+
plugin_url : url,
|
1421
|
+
action : val ? val.action : 0
|
1422
|
+
});
|
1423
|
+
},
|
1424
|
+
|
1425
|
+
mceTableRowProps : function() {
|
1426
|
+
winMan.open({
|
1427
|
+
url : url + '/row.htm',
|
1428
|
+
width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)),
|
1429
|
+
height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)),
|
1430
|
+
inline : 1
|
1431
|
+
}, {
|
1432
|
+
plugin_url : url
|
1433
|
+
});
|
1434
|
+
},
|
1435
|
+
|
1436
|
+
mceTableCellProps : function() {
|
1437
|
+
winMan.open({
|
1438
|
+
url : url + '/cell.htm',
|
1439
|
+
width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)),
|
1440
|
+
height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)),
|
1441
|
+
inline : 1
|
1442
|
+
}, {
|
1443
|
+
plugin_url : url
|
1444
|
+
});
|
1445
|
+
}
|
1446
|
+
}, function(func, name) {
|
1447
|
+
ed.addCommand(name, function(ui, val) {
|
1448
|
+
func(val);
|
1449
|
+
});
|
1450
|
+
});
|
1451
|
+
}
|
1452
|
+
});
|
1453
|
+
|
1454
|
+
// Register plugin
|
1455
|
+
tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin);
|
1456
|
+
})(tinymce);
|