From 1d19879202ca10cc36d029f5c10e40b73ef1d1b7 Mon Sep 17 00:00:00 2001 From: Simon Caminada Date: Wed, 23 May 2018 15:14:36 +0000 Subject: [PATCH] install app files for djangocms-text-ckeditor==3.6.0 --- .../ckeditor/CHANGES.md | 1358 +++++++ .../ckeditor/LICENSE.md | 1420 +++++++ .../ckeditor/README.md | 39 + .../ckeditor/adapters/.aldryn-folder | 0 .../ckeditor/adapters/jquery.js | 10 + .../ckeditor/build-config.js | 187 + .../ckeditor/ckeditor.js | 1251 ++++++ .../ckeditor/config.js | 10 + .../ckeditor/contents.css | 208 + .../ckeditor/lang/.aldryn-folder | 0 .../ckeditor/lang/af.js | 5 + .../ckeditor/lang/ar.js | 5 + .../ckeditor/lang/az.js | 5 + .../ckeditor/lang/bg.js | 5 + .../ckeditor/lang/bn.js | 5 + .../ckeditor/lang/bs.js | 5 + .../ckeditor/lang/ca.js | 5 + .../ckeditor/lang/cs.js | 5 + .../ckeditor/lang/cy.js | 5 + .../ckeditor/lang/da.js | 5 + .../ckeditor/lang/de-ch.js | 5 + .../ckeditor/lang/de.js | 5 + .../ckeditor/lang/el.js | 5 + .../ckeditor/lang/en-au.js | 5 + .../ckeditor/lang/en-ca.js | 5 + .../ckeditor/lang/en-gb.js | 5 + .../ckeditor/lang/en.js | 5 + .../ckeditor/lang/eo.js | 5 + .../ckeditor/lang/es.js | 5 + .../ckeditor/lang/et.js | 5 + .../ckeditor/lang/eu.js | 5 + .../ckeditor/lang/fa.js | 5 + .../ckeditor/lang/fi.js | 5 + .../ckeditor/lang/fo.js | 5 + .../ckeditor/lang/fr-ca.js | 5 + .../ckeditor/lang/fr.js | 5 + .../ckeditor/lang/gl.js | 5 + .../ckeditor/lang/gu.js | 5 + .../ckeditor/lang/he.js | 5 + .../ckeditor/lang/hi.js | 5 + .../ckeditor/lang/hr.js | 5 + .../ckeditor/lang/hu.js | 5 + .../ckeditor/lang/id.js | 5 + .../ckeditor/lang/is.js | 5 + .../ckeditor/lang/it.js | 5 + .../ckeditor/lang/ja.js | 5 + .../ckeditor/lang/ka.js | 5 + .../ckeditor/lang/km.js | 5 + .../ckeditor/lang/ko.js | 5 + .../ckeditor/lang/ku.js | 5 + .../ckeditor/lang/lt.js | 5 + .../ckeditor/lang/lv.js | 5 + .../ckeditor/lang/mk.js | 5 + .../ckeditor/lang/mn.js | 5 + .../ckeditor/lang/ms.js | 5 + .../ckeditor/lang/nb.js | 5 + .../ckeditor/lang/nl.js | 5 + .../ckeditor/lang/no.js | 5 + .../ckeditor/lang/oc.js | 5 + .../ckeditor/lang/pl.js | 5 + .../ckeditor/lang/pt-br.js | 5 + .../ckeditor/lang/pt.js | 5 + .../ckeditor/lang/ro.js | 5 + .../ckeditor/lang/ru.js | 5 + .../ckeditor/lang/si.js | 5 + .../ckeditor/lang/sk.js | 5 + .../ckeditor/lang/sl.js | 5 + .../ckeditor/lang/sq.js | 5 + .../ckeditor/lang/sr-latn.js | 5 + .../ckeditor/lang/sr.js | 5 + .../ckeditor/lang/sv.js | 5 + .../ckeditor/lang/th.js | 5 + .../ckeditor/lang/tr.js | 5 + .../ckeditor/lang/tt.js | 5 + .../ckeditor/lang/ug.js | 5 + .../ckeditor/lang/uk.js | 5 + .../ckeditor/lang/vi.js | 5 + .../ckeditor/lang/zh-cn.js | 5 + .../ckeditor/lang/zh.js | 5 + .../plugins/a11yhelp/dialogs/.aldryn-folder | 0 .../plugins/a11yhelp/dialogs/a11yhelp.js | 10 + .../a11yhelp/dialogs/lang/.aldryn-folder | 0 .../dialogs/lang/_translationstatus.txt | 25 + .../plugins/a11yhelp/dialogs/lang/af.js | 11 + .../plugins/a11yhelp/dialogs/lang/ar.js | 11 + .../plugins/a11yhelp/dialogs/lang/az.js | 11 + .../plugins/a11yhelp/dialogs/lang/bg.js | 11 + .../plugins/a11yhelp/dialogs/lang/ca.js | 13 + .../plugins/a11yhelp/dialogs/lang/cs.js | 12 + .../plugins/a11yhelp/dialogs/lang/cy.js | 11 + .../plugins/a11yhelp/dialogs/lang/da.js | 11 + .../plugins/a11yhelp/dialogs/lang/de-ch.js | 12 + .../plugins/a11yhelp/dialogs/lang/de.js | 13 + .../plugins/a11yhelp/dialogs/lang/el.js | 12 + .../plugins/a11yhelp/dialogs/lang/en-gb.js | 11 + .../plugins/a11yhelp/dialogs/lang/en.js | 11 + .../plugins/a11yhelp/dialogs/lang/eo.js | 12 + .../plugins/a11yhelp/dialogs/lang/es-mx.js | 13 + .../plugins/a11yhelp/dialogs/lang/es.js | 13 + .../plugins/a11yhelp/dialogs/lang/et.js | 11 + .../plugins/a11yhelp/dialogs/lang/eu.js | 12 + .../plugins/a11yhelp/dialogs/lang/fa.js | 11 + .../plugins/a11yhelp/dialogs/lang/fi.js | 11 + .../plugins/a11yhelp/dialogs/lang/fo.js | 11 + .../plugins/a11yhelp/dialogs/lang/fr-ca.js | 11 + .../plugins/a11yhelp/dialogs/lang/fr.js | 13 + .../plugins/a11yhelp/dialogs/lang/gl.js | 12 + .../plugins/a11yhelp/dialogs/lang/gu.js | 11 + .../plugins/a11yhelp/dialogs/lang/he.js | 11 + .../plugins/a11yhelp/dialogs/lang/hi.js | 11 + .../plugins/a11yhelp/dialogs/lang/hr.js | 11 + .../plugins/a11yhelp/dialogs/lang/hu.js | 12 + .../plugins/a11yhelp/dialogs/lang/id.js | 11 + .../plugins/a11yhelp/dialogs/lang/it.js | 13 + .../plugins/a11yhelp/dialogs/lang/ja.js | 9 + .../plugins/a11yhelp/dialogs/lang/km.js | 11 + .../plugins/a11yhelp/dialogs/lang/ko.js | 10 + .../plugins/a11yhelp/dialogs/lang/ku.js | 11 + .../plugins/a11yhelp/dialogs/lang/lt.js | 11 + .../plugins/a11yhelp/dialogs/lang/lv.js | 12 + .../plugins/a11yhelp/dialogs/lang/mk.js | 11 + .../plugins/a11yhelp/dialogs/lang/mn.js | 11 + .../plugins/a11yhelp/dialogs/lang/nb.js | 12 + .../plugins/a11yhelp/dialogs/lang/nl.js | 12 + .../plugins/a11yhelp/dialogs/lang/no.js | 11 + .../plugins/a11yhelp/dialogs/lang/oc.js | 12 + .../plugins/a11yhelp/dialogs/lang/pl.js | 13 + .../plugins/a11yhelp/dialogs/lang/pt-br.js | 13 + .../plugins/a11yhelp/dialogs/lang/pt.js | 12 + .../plugins/a11yhelp/dialogs/lang/ro.js | 11 + .../plugins/a11yhelp/dialogs/lang/ru.js | 11 + .../plugins/a11yhelp/dialogs/lang/si.js | 10 + .../plugins/a11yhelp/dialogs/lang/sk.js | 11 + .../plugins/a11yhelp/dialogs/lang/sl.js | 11 + .../plugins/a11yhelp/dialogs/lang/sq.js | 11 + .../plugins/a11yhelp/dialogs/lang/sr-latn.js | 11 + .../plugins/a11yhelp/dialogs/lang/sr.js | 11 + .../plugins/a11yhelp/dialogs/lang/sv.js | 11 + .../plugins/a11yhelp/dialogs/lang/th.js | 11 + .../plugins/a11yhelp/dialogs/lang/tr.js | 12 + .../plugins/a11yhelp/dialogs/lang/tt.js | 11 + .../plugins/a11yhelp/dialogs/lang/ug.js | 12 + .../plugins/a11yhelp/dialogs/lang/uk.js | 12 + .../plugins/a11yhelp/dialogs/lang/vi.js | 11 + .../plugins/a11yhelp/dialogs/lang/zh-cn.js | 9 + .../plugins/a11yhelp/dialogs/lang/zh.js | 9 + .../plugins/about/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/about/dialogs/about.js | 8 + .../about/dialogs/hidpi/.aldryn-folder | 0 .../about/dialogs/hidpi/logo_ckeditor.png | Bin 0 -> 13339 bytes .../plugins/about/dialogs/logo_ckeditor.png | Bin 0 -> 6757 bytes .../colordialog/dialogs/.aldryn-folder | 0 .../colordialog/dialogs/colordialog.css | 20 + .../colordialog/dialogs/colordialog.js | 14 + .../copyformatting/cursors/.aldryn-folder | 0 .../cursors/cursor-disabled.svg | 25 + .../plugins/copyformatting/cursors/cursor.svg | 14 + .../copyformatting/styles/.aldryn-folder | 0 .../copyformatting/styles/copyformatting.css | 45 + .../ckeditor/plugins/dialog/.aldryn-folder | 0 .../plugins/dialog/dialogDefinition.js | 4 + .../plugins/div/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/div/dialogs/div.js | 9 + .../plugins/find/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/find/dialogs/find.js | 25 + .../plugins/flash/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/flash/dialogs/flash.js | 24 + .../plugins/flash/images/.aldryn-folder | 0 .../plugins/flash/images/placeholder.png | Bin 0 -> 256 bytes .../plugins/forms/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/forms/dialogs/button.js | 8 + .../plugins/forms/dialogs/checkbox.js | 9 + .../ckeditor/plugins/forms/dialogs/form.js | 8 + .../plugins/forms/dialogs/hiddenfield.js | 7 + .../ckeditor/plugins/forms/dialogs/radio.js | 9 + .../ckeditor/plugins/forms/dialogs/select.js | 20 + .../plugins/forms/dialogs/textarea.js | 8 + .../plugins/forms/dialogs/textfield.js | 11 + .../plugins/forms/images/.aldryn-folder | 0 .../plugins/forms/images/hiddenfield.gif | Bin 0 -> 178 bytes .../ckeditor/plugins/icons.png | Bin 0 -> 12421 bytes .../ckeditor/plugins/icons_hidpi.png | Bin 0 -> 40265 bytes .../plugins/iframe/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/iframe/dialogs/iframe.js | 10 + .../plugins/iframe/images/.aldryn-folder | 0 .../plugins/iframe/images/placeholder.png | Bin 0 -> 265 bytes .../plugins/image/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/image/dialogs/image.js | 44 + .../plugins/image/images/.aldryn-folder | 0 .../ckeditor/plugins/image/images/noimage.png | Bin 0 -> 1610 bytes .../plugins/link/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/link/dialogs/anchor.js | 8 + .../ckeditor/plugins/link/dialogs/link.js | 28 + .../plugins/link/images/.aldryn-folder | 0 .../ckeditor/plugins/link/images/anchor.png | Bin 0 -> 752 bytes .../plugins/link/images/hidpi/.aldryn-folder | 0 .../plugins/link/images/hidpi/anchor.png | Bin 0 -> 1109 bytes .../plugins/liststyle/dialogs/.aldryn-folder | 0 .../plugins/liststyle/dialogs/liststyle.js | 10 + .../magicline/images/hidpi/.aldryn-folder | 0 .../magicline/images/hidpi/icon-rtl.png | Bin 0 -> 176 bytes .../plugins/magicline/images/hidpi/icon.png | Bin 0 -> 199 bytes .../plugins/magicline/images/icon-rtl.png | Bin 0 -> 138 bytes .../plugins/magicline/images/icon.png | Bin 0 -> 133 bytes .../plugins/pagebreak/images/.aldryn-folder | 0 .../plugins/pagebreak/images/pagebreak.gif | Bin 0 -> 99 bytes .../pastefromword/filter/.aldryn-folder | 0 .../plugins/pastefromword/filter/default.js | 53 + .../ckeditor/plugins/preview/.aldryn-folder | 0 .../ckeditor/plugins/preview/preview.html | 13 + .../ckeditor/plugins/scayt/.aldryn-folder | 0 .../ckeditor/plugins/scayt/CHANGELOG.md | 20 + .../ckeditor/plugins/scayt/LICENSE.md | 28 + .../ckeditor/plugins/scayt/README.md | 25 + .../plugins/scayt/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/scayt/dialogs/dialog.css | 23 + .../ckeditor/plugins/scayt/dialogs/options.js | 33 + .../plugins/scayt/dialogs/toolbar.css | 71 + .../scayt/skins/moono-lisa/.aldryn-folder | 0 .../plugins/scayt/skins/moono-lisa/scayt.css | 25 + .../plugins/showblocks/images/.aldryn-folder | 0 .../showblocks/images/block_address.png | Bin 0 -> 152 bytes .../showblocks/images/block_blockquote.png | Bin 0 -> 154 bytes .../plugins/showblocks/images/block_div.png | Bin 0 -> 127 bytes .../plugins/showblocks/images/block_h1.png | Bin 0 -> 120 bytes .../plugins/showblocks/images/block_h2.png | Bin 0 -> 127 bytes .../plugins/showblocks/images/block_h3.png | Bin 0 -> 123 bytes .../plugins/showblocks/images/block_h4.png | Bin 0 -> 123 bytes .../plugins/showblocks/images/block_h5.png | Bin 0 -> 126 bytes .../plugins/showblocks/images/block_h6.png | Bin 0 -> 123 bytes .../plugins/showblocks/images/block_p.png | Bin 0 -> 115 bytes .../plugins/showblocks/images/block_pre.png | Bin 0 -> 128 bytes .../plugins/smiley/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/smiley/dialogs/smiley.js | 11 + .../plugins/smiley/images/.aldryn-folder | 0 .../plugins/smiley/images/angel_smile.gif | Bin 0 -> 1245 bytes .../plugins/smiley/images/angel_smile.png | Bin 0 -> 1172 bytes .../plugins/smiley/images/angry_smile.gif | Bin 0 -> 1219 bytes .../plugins/smiley/images/angry_smile.png | Bin 0 -> 1220 bytes .../plugins/smiley/images/broken_heart.gif | Bin 0 -> 732 bytes .../plugins/smiley/images/broken_heart.png | Bin 0 -> 1139 bytes .../plugins/smiley/images/confused_smile.gif | Bin 0 -> 1202 bytes .../plugins/smiley/images/confused_smile.png | Bin 0 -> 1101 bytes .../plugins/smiley/images/cry_smile.gif | Bin 0 -> 795 bytes .../plugins/smiley/images/cry_smile.png | Bin 0 -> 1214 bytes .../plugins/smiley/images/devil_smile.gif | Bin 0 -> 1239 bytes .../plugins/smiley/images/devil_smile.png | Bin 0 -> 1220 bytes .../smiley/images/embaressed_smile.gif | Bin 0 -> 786 bytes .../smiley/images/embarrassed_smile.gif | Bin 0 -> 786 bytes .../smiley/images/embarrassed_smile.png | Bin 0 -> 1145 bytes .../ckeditor/plugins/smiley/images/heart.gif | Bin 0 -> 692 bytes .../ckeditor/plugins/smiley/images/heart.png | Bin 0 -> 999 bytes .../ckeditor/plugins/smiley/images/kiss.gif | Bin 0 -> 683 bytes .../ckeditor/plugins/smiley/images/kiss.png | Bin 0 -> 1003 bytes .../plugins/smiley/images/lightbulb.gif | Bin 0 -> 660 bytes .../plugins/smiley/images/lightbulb.png | Bin 0 -> 919 bytes .../plugins/smiley/images/omg_smile.gif | Bin 0 -> 820 bytes .../plugins/smiley/images/omg_smile.png | Bin 0 -> 1122 bytes .../plugins/smiley/images/regular_smile.gif | Bin 0 -> 1209 bytes .../plugins/smiley/images/regular_smile.png | Bin 0 -> 1084 bytes .../plugins/smiley/images/sad_smile.gif | Bin 0 -> 782 bytes .../plugins/smiley/images/sad_smile.png | Bin 0 -> 1115 bytes .../plugins/smiley/images/shades_smile.gif | Bin 0 -> 1231 bytes .../plugins/smiley/images/shades_smile.png | Bin 0 -> 1204 bytes .../plugins/smiley/images/teeth_smile.gif | Bin 0 -> 1201 bytes .../plugins/smiley/images/teeth_smile.png | Bin 0 -> 1183 bytes .../plugins/smiley/images/thumbs_down.gif | Bin 0 -> 715 bytes .../plugins/smiley/images/thumbs_down.png | Bin 0 -> 985 bytes .../plugins/smiley/images/thumbs_up.gif | Bin 0 -> 714 bytes .../plugins/smiley/images/thumbs_up.png | Bin 0 -> 959 bytes .../plugins/smiley/images/tongue_smile.gif | Bin 0 -> 1210 bytes .../plugins/smiley/images/tongue_smile.png | Bin 0 -> 1132 bytes .../plugins/smiley/images/tounge_smile.gif | Bin 0 -> 1210 bytes .../images/whatchutalkingabout_smile.gif | Bin 0 -> 775 bytes .../images/whatchutalkingabout_smile.png | Bin 0 -> 1039 bytes .../plugins/smiley/images/wink_smile.gif | Bin 0 -> 1202 bytes .../plugins/smiley/images/wink_smile.png | Bin 0 -> 1114 bytes .../specialchar/dialogs/lang/.aldryn-folder | 0 .../dialogs/lang/_translationstatus.txt | 20 + .../plugins/specialchar/dialogs/lang/af.js | 13 + .../plugins/specialchar/dialogs/lang/ar.js | 13 + .../plugins/specialchar/dialogs/lang/az.js | 10 + .../plugins/specialchar/dialogs/lang/bg.js | 13 + .../plugins/specialchar/dialogs/lang/ca.js | 14 + .../plugins/specialchar/dialogs/lang/cs.js | 13 + .../plugins/specialchar/dialogs/lang/cy.js | 14 + .../plugins/specialchar/dialogs/lang/da.js | 11 + .../plugins/specialchar/dialogs/lang/de-ch.js | 13 + .../plugins/specialchar/dialogs/lang/de.js | 13 + .../plugins/specialchar/dialogs/lang/el.js | 13 + .../plugins/specialchar/dialogs/lang/en-au.js | 13 + .../plugins/specialchar/dialogs/lang/en-ca.js | 13 + .../plugins/specialchar/dialogs/lang/en-gb.js | 13 + .../plugins/specialchar/dialogs/lang/en.js | 13 + .../plugins/specialchar/dialogs/lang/eo.js | 12 + .../plugins/specialchar/dialogs/lang/es-mx.js | 13 + .../plugins/specialchar/dialogs/lang/es.js | 13 + .../plugins/specialchar/dialogs/lang/et.js | 13 + .../plugins/specialchar/dialogs/lang/eu.js | 13 + .../plugins/specialchar/dialogs/lang/fa.js | 12 + .../plugins/specialchar/dialogs/lang/fi.js | 13 + .../plugins/specialchar/dialogs/lang/fr-ca.js | 10 + .../plugins/specialchar/dialogs/lang/fr.js | 12 + .../plugins/specialchar/dialogs/lang/gl.js | 13 + .../plugins/specialchar/dialogs/lang/he.js | 12 + .../plugins/specialchar/dialogs/lang/hr.js | 13 + .../plugins/specialchar/dialogs/lang/hu.js | 12 + .../plugins/specialchar/dialogs/lang/id.js | 13 + .../plugins/specialchar/dialogs/lang/it.js | 14 + .../plugins/specialchar/dialogs/lang/ja.js | 9 + .../plugins/specialchar/dialogs/lang/km.js | 13 + .../plugins/specialchar/dialogs/lang/ko.js | 10 + .../plugins/specialchar/dialogs/lang/ku.js | 13 + .../plugins/specialchar/dialogs/lang/lt.js | 13 + .../plugins/specialchar/dialogs/lang/lv.js | 13 + .../plugins/specialchar/dialogs/lang/nb.js | 11 + .../plugins/specialchar/dialogs/lang/nl.js | 13 + .../plugins/specialchar/dialogs/lang/no.js | 11 + .../plugins/specialchar/dialogs/lang/oc.js | 12 + .../plugins/specialchar/dialogs/lang/pl.js | 12 + .../plugins/specialchar/dialogs/lang/pt-br.js | 11 + .../plugins/specialchar/dialogs/lang/pt.js | 13 + .../plugins/specialchar/dialogs/lang/ru.js | 13 + .../plugins/specialchar/dialogs/lang/si.js | 13 + .../plugins/specialchar/dialogs/lang/sk.js | 13 + .../plugins/specialchar/dialogs/lang/sl.js | 12 + .../plugins/specialchar/dialogs/lang/sq.js | 13 + .../plugins/specialchar/dialogs/lang/sv.js | 11 + .../plugins/specialchar/dialogs/lang/th.js | 13 + .../plugins/specialchar/dialogs/lang/tr.js | 12 + .../plugins/specialchar/dialogs/lang/tt.js | 13 + .../plugins/specialchar/dialogs/lang/ug.js | 13 + .../plugins/specialchar/dialogs/lang/uk.js | 12 + .../plugins/specialchar/dialogs/lang/vi.js | 14 + .../plugins/specialchar/dialogs/lang/zh-cn.js | 9 + .../plugins/specialchar/dialogs/lang/zh.js | 9 + .../specialchar/dialogs/specialchar.js | 14 + .../plugins/table/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/table/dialogs/table.js | 21 + .../plugins/tabletools/dialogs/.aldryn-folder | 0 .../plugins/tabletools/dialogs/tableCell.js | 17 + .../plugins/templates/dialogs/.aldryn-folder | 0 .../plugins/templates/dialogs/templates.css | 84 + .../plugins/templates/dialogs/templates.js | 10 + .../templates/templates/.aldryn-folder | 0 .../plugins/templates/templates/default.js | 7 + .../templates/templates/images/.aldryn-folder | 0 .../templates/templates/images/template1.gif | Bin 0 -> 539 bytes .../templates/templates/images/template2.gif | Bin 0 -> 497 bytes .../templates/templates/images/template3.gif | Bin 0 -> 557 bytes .../plugins/widget/images/.aldryn-folder | 0 .../ckeditor/plugins/widget/images/handle.png | Bin 0 -> 220 bytes .../ckeditor/plugins/wsc/LICENSE.md | 28 + .../ckeditor/plugins/wsc/README.md | 25 + .../plugins/wsc/dialogs/.aldryn-folder | 0 .../ckeditor/plugins/wsc/dialogs/ciframe.html | 66 + .../plugins/wsc/dialogs/tmpFrameset.html | 52 + .../ckeditor/plugins/wsc/dialogs/wsc.css | 82 + .../ckeditor/plugins/wsc/dialogs/wsc.js | 91 + .../ckeditor/plugins/wsc/dialogs/wsc_ie.js | 11 + .../wsc/skins/moono-lisa/.aldryn-folder | 0 .../plugins/wsc/skins/moono-lisa/wsc.css | 43 + .../ckeditor/samples/css/.aldryn-folder | 0 .../ckeditor/samples/css/samples.css | 1632 ++++++++ .../ckeditor/samples/img/.aldryn-folder | 0 .../ckeditor/samples/img/github-top.png | Bin 0 -> 383 bytes .../ckeditor/samples/img/header-bg.png | Bin 0 -> 13086 bytes .../ckeditor/samples/img/header-separator.png | Bin 0 -> 123 bytes .../ckeditor/samples/img/logo.png | Bin 0 -> 5891 bytes .../ckeditor/samples/img/navigation-tip.png | Bin 0 -> 12029 bytes .../ckeditor/samples/index.html | 128 + .../ckeditor/samples/js/.aldryn-folder | 0 .../ckeditor/samples/js/sample.js | 53 + .../ckeditor/samples/js/sf.js | 17 + .../ckeditor/samples/old/.aldryn-folder | 0 .../ckeditor/samples/old/ajax.html | 85 + .../ckeditor/samples/old/api.html | 210 + .../ckeditor/samples/old/appendto.html | 59 + .../old/assets/inlineall/.aldryn-folder | 0 .../samples/old/assets/inlineall/logo.png | Bin 0 -> 4283 bytes .../old/assets/outputxhtml/.aldryn-folder | 0 .../old/assets/outputxhtml/outputxhtml.css | 204 + .../samples/old/assets/posteddata.php | 59 + .../ckeditor/samples/old/assets/sample.jpg | Bin 0 -> 14449 bytes .../old/assets/uilanguages/.aldryn-folder | 0 .../old/assets/uilanguages/languages.js | 7 + .../ckeditor/samples/old/datafiltering.html | 508 +++ .../samples/old/dialog/assets/.aldryn-folder | 0 .../samples/old/dialog/assets/my_dialog.js | 48 + .../ckeditor/samples/old/dialog/dialog.html | 190 + .../ckeditor/samples/old/divreplace.html | 144 + .../samples/old/enterkey/.aldryn-folder | 0 .../samples/old/enterkey/enterkey.html | 106 + .../assets/outputforflash/.aldryn-folder | 0 .../assets/outputforflash/outputforflash.fla | Bin 0 -> 85504 bytes .../assets/outputforflash/outputforflash.swf | Bin 0 -> 15571 bytes .../assets/outputforflash/swfobject.js | 19 + .../old/htmlwriter/outputforflash.html | 283 ++ .../samples/old/htmlwriter/outputhtml.html | 224 ++ .../ckeditor/samples/old/index.html | 131 + .../ckeditor/samples/old/inlineall.html | 314 ++ .../ckeditor/samples/old/inlinebycode.html | 124 + .../ckeditor/samples/old/inlinetextarea.html | 113 + .../ckeditor/samples/old/jquery.html | 103 + .../samples/old/magicline/.aldryn-folder | 0 .../samples/old/magicline/magicline.html | 209 + .../ckeditor/samples/old/readonly.html | 76 + .../ckeditor/samples/old/replacebyclass.html | 60 + .../ckeditor/samples/old/replacebycode.html | 59 + .../ckeditor/samples/old/sample.css | 357 ++ .../ckeditor/samples/old/sample.js | 50 + .../samples/old/sample_posteddata.php | 16 + .../ckeditor/samples/old/tabindex.html | 78 + .../samples/old/toolbar/.aldryn-folder | 0 .../ckeditor/samples/old/toolbar/toolbar.html | 235 ++ .../ckeditor/samples/old/uicolor.html | 72 + .../ckeditor/samples/old/uilanguages.html | 122 + .../samples/old/wysiwygarea/.aldryn-folder | 0 .../samples/old/wysiwygarea/fullpage.html | 80 + .../ckeditor/samples/old/xhtmlstyle.html | 234 ++ .../toolbarconfigurator/css/.aldryn-folder | 0 .../toolbarconfigurator/css/fontello.css | 55 + .../toolbarconfigurator/font/.aldryn-folder | 0 .../toolbarconfigurator/font/LICENSE.txt | 10 + .../toolbarconfigurator/font/config.json | 28 + .../toolbarconfigurator/font/fontello.eot | Bin 0 -> 4988 bytes .../toolbarconfigurator/font/fontello.svg | 14 + .../toolbarconfigurator/font/fontello.ttf | Bin 0 -> 4820 bytes .../toolbarconfigurator/font/fontello.woff | Bin 0 -> 2904 bytes .../samples/toolbarconfigurator/index.html | 446 +++ .../toolbarconfigurator/js/.aldryn-folder | 0 .../js/abstracttoolbarmodifier.js | 13 + .../js/fulltoolbareditor.js | 9 + .../toolbarconfigurator/js/toolbarmodifier.js | 33 + .../js/toolbartextmodifier.js | 14 + .../lib/codemirror/.aldryn-folder | 0 .../lib/codemirror/LICENSE | 19 + .../lib/codemirror/codemirror.css | 325 ++ .../lib/codemirror/codemirror.js | 288 ++ .../lib/codemirror/javascript.js | 25 + .../lib/codemirror/neo.css | 36 + .../lib/codemirror/show-hint.css | 38 + .../lib/codemirror/show-hint.js | 16 + .../ckeditor/skins/moono-lisa/.aldryn-folder | 0 .../ckeditor/skins/moono-lisa/dialog.css | 5 + .../ckeditor/skins/moono-lisa/dialog_ie.css | 5 + .../ckeditor/skins/moono-lisa/dialog_ie8.css | 5 + .../skins/moono-lisa/dialog_iequirks.css | 5 + .../ckeditor/skins/moono-lisa/editor.css | 5 + .../skins/moono-lisa/editor_gecko.css | 5 + .../ckeditor/skins/moono-lisa/editor_ie.css | 5 + .../ckeditor/skins/moono-lisa/editor_ie8.css | 5 + .../skins/moono-lisa/editor_iequirks.css | 5 + .../ckeditor/skins/moono-lisa/icons.png | Bin 0 -> 12421 bytes .../ckeditor/skins/moono-lisa/icons_hidpi.png | Bin 0 -> 40265 bytes .../skins/moono-lisa/images/.aldryn-folder | 0 .../skins/moono-lisa/images/arrow.png | Bin 0 -> 191 bytes .../skins/moono-lisa/images/close.png | Bin 0 -> 615 bytes .../moono-lisa/images/hidpi/.aldryn-folder | 0 .../skins/moono-lisa/images/hidpi/close.png | Bin 0 -> 1238 bytes .../moono-lisa/images/hidpi/lock-open.png | Bin 0 -> 1071 bytes .../skins/moono-lisa/images/hidpi/lock.png | Bin 0 -> 1062 bytes .../skins/moono-lisa/images/hidpi/refresh.png | Bin 0 -> 1623 bytes .../skins/moono-lisa/images/lock-open.png | Bin 0 -> 511 bytes .../ckeditor/skins/moono-lisa/images/lock.png | Bin 0 -> 506 bytes .../skins/moono-lisa/images/refresh.png | Bin 0 -> 757 bytes .../skins/moono-lisa/images/spinner.gif | Bin 0 -> 2984 bytes .../ckeditor/skins/moono-lisa/readme.md | 46 + .../ckeditor/styles.js | 137 + .../ckeditor_plugins/cmsdialog/.aldryn-folder | 0 .../ckeditor_plugins/cmsdialog/plugin.js | 3427 +++++++++++++++++ .../cmsplugins/icons/.aldryn-folder | 0 .../cmsplugins/icons/cmsplugins.png | Bin 0 -> 1205 bytes .../cmsplugins/icons/cmsplugins.psd | Bin 0 -> 29726 bytes .../ckeditor_plugins/cmsplugins/plugin.js | 552 +++ .../ckeditor_plugins/cmsresize/.aldryn-folder | 0 .../ckeditor_plugins/cmsresize/plugin.js | 180 + .../ckeditor_plugins/cmswidget/.aldryn-folder | 0 .../ckeditor_plugins/cmswidget/plugin.js | 174 + .../css/.aldryn-folder | 0 .../css/cms.ckeditor.css | 107 + .../djangocms_text_ckeditor/js/.aldryn-folder | 0 .../js/cms.ckeditor.js | 232 ++ .../js/dist/.aldryn-folder | 0 .../bundle-45a646fecc.cms.ckeditor.min.js | 1274 ++++++ static/djangocms_text_ckeditor/js/post.js | 2 + static/djangocms_text_ckeditor/js/pre.js | 2 + 487 files changed, 21480 insertions(+) create mode 100644 static/djangocms_text_ckeditor/ckeditor/CHANGES.md create mode 100644 static/djangocms_text_ckeditor/ckeditor/LICENSE.md create mode 100644 static/djangocms_text_ckeditor/ckeditor/README.md create mode 100644 static/djangocms_text_ckeditor/ckeditor/adapters/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/adapters/jquery.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/build-config.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/ckeditor.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/config.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/contents.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/af.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/ar.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/az.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/bg.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/bn.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/bs.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/ca.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/cs.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/cy.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/da.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/de-ch.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/de.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/el.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/en-au.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/en-ca.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/en-gb.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/en.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/eo.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/es.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/et.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/eu.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/fa.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/fi.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/fo.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/fr-ca.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/fr.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/gl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/gu.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/he.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/hi.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/hr.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/hu.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/id.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/is.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/it.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/ja.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/ka.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/km.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/ko.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/ku.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/lt.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/lv.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/mk.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/mn.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/ms.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/nb.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/nl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/no.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/oc.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/pl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/pt-br.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/pt.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/ro.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/ru.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/si.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/sk.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/sl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/sq.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/sr-latn.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/sr.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/sv.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/th.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/tr.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/tt.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/ug.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/uk.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/vi.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/zh-cn.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/lang/zh.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/af.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/az.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/da.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/de.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/el.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/en.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/es.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/et.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/he.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/id.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/it.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/km.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/no.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/si.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/th.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/about/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/about/dialogs/about.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/about/dialogs/hidpi/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/about/dialogs/logo_ckeditor.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/colordialog/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/colordialog/dialogs/colordialog.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/colordialog/dialogs/colordialog.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/copyformatting/cursors/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/copyformatting/cursors/cursor-disabled.svg create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/copyformatting/cursors/cursor.svg create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/copyformatting/styles/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/copyformatting/styles/copyformatting.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/dialog/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/dialog/dialogDefinition.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/div/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/div/dialogs/div.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/find/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/find/dialogs/find.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/flash/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/flash/dialogs/flash.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/flash/images/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/flash/images/placeholder.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/forms/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/forms/dialogs/button.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/forms/dialogs/checkbox.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/forms/dialogs/form.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/forms/dialogs/hiddenfield.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/forms/dialogs/radio.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/forms/dialogs/select.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/forms/dialogs/textarea.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/forms/dialogs/textfield.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/forms/images/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/forms/images/hiddenfield.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/icons.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/icons_hidpi.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/iframe/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/iframe/dialogs/iframe.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/iframe/images/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/iframe/images/placeholder.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/image/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/image/dialogs/image.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/image/images/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/image/images/noimage.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/link/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/link/dialogs/anchor.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/link/dialogs/link.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/link/images/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/link/images/anchor.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/link/images/hidpi/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/link/images/hidpi/anchor.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/liststyle/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/liststyle/dialogs/liststyle.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/magicline/images/hidpi/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/magicline/images/hidpi/icon.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/magicline/images/icon-rtl.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/magicline/images/icon.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/pagebreak/images/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/pagebreak/images/pagebreak.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/pastefromword/filter/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/pastefromword/filter/default.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/preview/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/preview/preview.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/scayt/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/scayt/CHANGELOG.md create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/scayt/LICENSE.md create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/scayt/README.md create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/scayt/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/scayt/dialogs/dialog.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/scayt/dialogs/options.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/scayt/dialogs/toolbar.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/scayt/skins/moono-lisa/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/block_address.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/block_blockquote.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/block_div.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/block_h1.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/block_h2.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/block_h3.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/block_h4.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/block_h5.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/block_h6.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/block_p.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/showblocks/images/block_pre.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/dialogs/smiley.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/angel_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/angel_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/angry_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/angry_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/broken_heart.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/broken_heart.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/confused_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/confused_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/cry_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/cry_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/devil_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/devil_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/embaressed_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/embarrassed_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/embarrassed_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/heart.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/heart.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/kiss.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/kiss.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/lightbulb.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/lightbulb.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/omg_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/omg_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/regular_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/regular_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/sad_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/sad_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/shades_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/shades_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/teeth_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/teeth_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/thumbs_down.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/thumbs_down.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/thumbs_up.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/thumbs_up.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/tongue_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/tongue_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/tounge_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/wink_smile.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/smiley/images/wink_smile.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/af.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/ar.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/az.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/bg.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/ca.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/cs.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/cy.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/da.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/de.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/el.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/en-au.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/en.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/eo.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/es.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/et.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/eu.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/fa.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/fi.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/fr.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/gl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/he.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/hr.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/hu.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/id.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/it.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/ja.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/km.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/ko.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/ku.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/lt.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/lv.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/nb.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/nl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/no.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/oc.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/pl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/pt.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/ru.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/si.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/sk.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/sl.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/sq.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/sv.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/th.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/tr.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/tt.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/ug.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/uk.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/vi.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/lang/zh.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/specialchar/dialogs/specialchar.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/table/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/table/dialogs/table.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/tabletools/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/tabletools/dialogs/tableCell.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/templates/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/templates/dialogs/templates.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/templates/dialogs/templates.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/templates/templates/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/templates/templates/default.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/templates/templates/images/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/templates/templates/images/template1.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/templates/templates/images/template2.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/templates/templates/images/template3.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/widget/images/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/widget/images/handle.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/wsc/LICENSE.md create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/wsc/README.md create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/wsc/dialogs/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/wsc/dialogs/ciframe.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/wsc/dialogs/tmpFrameset.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/wsc/dialogs/wsc.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/wsc/dialogs/wsc.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/wsc/dialogs/wsc_ie.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/wsc/skins/moono-lisa/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/css/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/css/samples.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/img/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/img/github-top.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/img/header-bg.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/img/header-separator.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/img/logo.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/img/navigation-tip.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/index.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/js/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/js/sample.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/js/sf.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/ajax.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/api.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/appendto.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/assets/inlineall/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/assets/inlineall/logo.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/assets/outputxhtml/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/assets/posteddata.php create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/assets/sample.jpg create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/assets/uilanguages/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/assets/uilanguages/languages.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/datafiltering.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/dialog/assets/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/dialog/assets/my_dialog.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/dialog/dialog.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/divreplace.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/enterkey/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/enterkey/enterkey.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/htmlwriter/assets/outputforflash/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/htmlwriter/assets/outputforflash/swfobject.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/htmlwriter/outputforflash.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/htmlwriter/outputhtml.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/index.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/inlineall.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/inlinebycode.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/inlinetextarea.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/jquery.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/magicline/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/magicline/magicline.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/readonly.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/replacebyclass.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/replacebycode.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/sample.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/sample.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/sample_posteddata.php create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/tabindex.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/toolbar/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/toolbar/toolbar.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/uicolor.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/uilanguages.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/wysiwygarea/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/wysiwygarea/fullpage.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/old/xhtmlstyle.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/css/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/css/fontello.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/font/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/font/config.json create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/font/fontello.eot create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/font/fontello.svg create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/font/fontello.ttf create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/font/fontello.woff create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/index.html create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/js/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/lib/codemirror/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/lib/codemirror/LICENSE create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/lib/codemirror/javascript.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.js create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/dialog.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/dialog_ie.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/dialog_ie8.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/dialog_iequirks.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/editor.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/editor_gecko.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/editor_ie.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/editor_ie8.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/editor_iequirks.css create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/icons.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/icons_hidpi.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/arrow.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/close.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/hidpi/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/hidpi/close.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/hidpi/lock.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/hidpi/refresh.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/lock-open.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/lock.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/refresh.png create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/images/spinner.gif create mode 100644 static/djangocms_text_ckeditor/ckeditor/skins/moono-lisa/readme.md create mode 100644 static/djangocms_text_ckeditor/ckeditor/styles.js create mode 100644 static/djangocms_text_ckeditor/ckeditor_plugins/cmsdialog/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor_plugins/cmsdialog/plugin.js create mode 100644 static/djangocms_text_ckeditor/ckeditor_plugins/cmsplugins/icons/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor_plugins/cmsplugins/icons/cmsplugins.png create mode 100644 static/djangocms_text_ckeditor/ckeditor_plugins/cmsplugins/icons/cmsplugins.psd create mode 100644 static/djangocms_text_ckeditor/ckeditor_plugins/cmsplugins/plugin.js create mode 100644 static/djangocms_text_ckeditor/ckeditor_plugins/cmsresize/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor_plugins/cmsresize/plugin.js create mode 100644 static/djangocms_text_ckeditor/ckeditor_plugins/cmswidget/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/ckeditor_plugins/cmswidget/plugin.js create mode 100644 static/djangocms_text_ckeditor/css/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/css/cms.ckeditor.css create mode 100644 static/djangocms_text_ckeditor/js/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/js/cms.ckeditor.js create mode 100644 static/djangocms_text_ckeditor/js/dist/.aldryn-folder create mode 100644 static/djangocms_text_ckeditor/js/dist/bundle-45a646fecc.cms.ckeditor.min.js create mode 100644 static/djangocms_text_ckeditor/js/post.js create mode 100644 static/djangocms_text_ckeditor/js/pre.js diff --git a/static/djangocms_text_ckeditor/ckeditor/CHANGES.md b/static/djangocms_text_ckeditor/ckeditor/CHANGES.md new file mode 100644 index 0000000..0803614 --- /dev/null +++ b/static/djangocms_text_ckeditor/ckeditor/CHANGES.md @@ -0,0 +1,1358 @@ +CKEditor 4 Changelog +==================== + +## CKEditor 4.7.3 + +New Features: + +* [#568](https://github.com/ckeditor/ckeditor-dev/issues/568): Added possibility to adjust nested editables' filters using the [`CKEDITOR.filter.disallowedContent`](https://docs.ckeditor.com/#!/api/CKEDITOR.filter-property-disallowedContent) property. + +Fixed Issues: + +* [#554](https://github.com/ckeditor/ckeditor-dev/issues/554): Fixed: [`change`](https://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-change) event not fired when typing the first character after pasting into the editor. Thanks to [Daniel Miller](https://github.com/millerdev)! +* [#566](https://github.com/ckeditor/ckeditor-dev/issues/566): Fixed: The CSS `border` shorthand property with zero width (`border: 0px solid #000;`) causes the table to have the border attribute set to 1. +* [#779](https://github.com/ckeditor/ckeditor-dev/issues/779): Fixed: The [Remove Format](https://ckeditor.com/addon/removeformat) plugin removes elements with language definition inserted by the [Language](https://ckeditor.com/addon/language) plugin. +* [#423](https://github.com/ckeditor/ckeditor-dev/issues/423): Fixed: The [Paste from Word](https://ckeditor.com/addon/pastefromword) plugin pastes paragraphs into the editor even if [`CKEDITOR.config.enterMode`](https://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode) is set to `CKEDITOR.ENTER_BR`. +* [#719](https://github.com/ckeditor/ckeditor-dev/issues/719): Fixed: Image inserted using the [Enhanced Image](https://ckeditor.com/addon/image2) plugin can be resized when the editor is in [read-only mode](https://docs.ckeditor.com/#!/guide/dev_readonly). +* [#577](https://github.com/ckeditor/ckeditor-dev/issues/577): Fixed: The "Delete Columns" command provided by the [Table Tools](https://ckeditor.com/addon/tabletools) plugin throws an error when trying to delete columns. +* [#867](https://github.com/ckeditor/ckeditor-dev/issues/867): Fixed: Typing into a selected table throws an error. +* [#817](https://github.com/ckeditor/ckeditor-dev/issues/817): Fixed: The [Save](https://ckeditor.com/addon/save) plugin does not work in [Source Mode](https://ckeditor.com/addon/sourcearea). + +Other Changes: + +* Updated the [WebSpellChecker](http://ckeditor.com/addon/wsc) plugin: + * [#40](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/40): Fixed: IE10 throws an error when spell checking is started. +* [#800](https://github.com/ckeditor/ckeditor-dev/issues/800): Added the [`CKEDITOR.dom.selection.isCollapsed`](https://docs.ckeditor.com/#!/api/CKEDITOR.dom.selection-method-isCollapsed) method which is a simpler way to check if the selection is collapsed. +* [#830](https://github.com/ckeditor/ckeditor-dev/issues/830): Added an option to define which dialog tab should be shown by default when creating [`CKEDITOR.dialogCommand`](https://docs.ckeditor.com/#!/api/CKEDITOR.dialogCommand). + +## CKEditor 4.7.2 + +New Features: + +* [#455](https://github.com/ckeditor/ckeditor-dev/issues/455): Added [Advanced Content Filter](https://docs.ckeditor.com/#!/guide/dev_acf) integration with the [Justify](http://ckeditor.com/addon/justify) plugin. + +Fixed Issues: + +* [#663](https://github.com/ckeditor/ckeditor-dev/issues/663): [Chrome] Fixed: Clicking the scrollbar throws an `Uncaught TypeError: element.is is not a function` error. +* [#694](https://github.com/ckeditor/ckeditor-dev/pull/694): Refactoring in the [Table Selection](http://ckeditor.com/addon/tableselection) plugin: + * [#520](https://github.com/ckeditor/ckeditor-dev/issues/520): Fixed: Widgets cannot be properly pasted into a table cell. + * [#460](https://github.com/ckeditor/ckeditor-dev/issues/460): Fixed: Editor gone after pasting into an editor within a table. +* [#579](https://github.com/ckeditor/ckeditor-dev/issues/579): Fixed: Internal `cke_table-faked-selection-table` class is visible in the Stylesheet Classes field of the [Table Properties](http://ckeditor.com/addon/table) dialog. +* [#545](https://github.com/ckeditor/ckeditor-dev/issues/545): [Edge] Fixed: Error thrown when pressing the [Select All](https://ckeditor.com/addon/selectall) button in [Source Mode](http://ckeditor.com/addon/sourcearea). +* [#582](https://github.com/ckeditor/ckeditor-dev/issues/582): Fixed: Double slash in the path to stylesheet needed by the [Table Selection](http://ckeditor.com/addon/tableselection) plugin. Thanks to [Marius Dumitru Florea](https://github.com/mflorea)! +* [#491](https://github.com/ckeditor/ckeditor-dev/issues/491): Fixed: Unnecessary dependency on the [Editor Toolbar](http://ckeditor.com/addon/toolbar) plugin inside the [Notification](http://ckeditor.com/addon/notification) plugin. +* [#646](https://github.com/ckeditor/ckeditor-dev/issues/646): Fixed: Error thrown into the browser console after opening the [Styles Combo](http://ckeditor.com/addon/stylescombo) plugin menu in the editor without any selection. +* [#501](https://github.com/ckeditor/ckeditor-dev/issues/501): Fixed: Double click does not open the dialog for modifying anchors inserted via the [Link](http://ckeditor.com/addon/link) plugin. +* [#9780](https://dev.ckeditor.com/ticket/9780): [IE8-9] Fixed: Clicking inside an empty [read-only](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-readOnly) editor throws an error. +* [#16820](https://dev.ckeditor.com/ticket/16820): [IE10] Fixed: Clicking below a single horizontal rule throws an error. +* [#426](https://github.com/ckeditor/ckeditor-dev/issues/426): Fixed: The [`range.cloneContents`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-cloneContents) method selects the whole element when the selection starts at the beginning of that element. +* [#644](https://github.com/ckeditor/ckeditor-dev/issues/644): Fixed: The [`range.extractContents`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-extractContents) method returns an incorrect result when multiple nodes are selected. +* [#684](https://github.com/ckeditor/ckeditor-dev/issues/684): Fixed: The [`elementPath.contains`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.elementPath-method-contains) method incorrectly excludes the last element instead of root when the `fromTop` parameter is set to `true`. + +Other Changes: + +* Updated the [SCAYT](http://ckeditor.com/addon/scayt) (Spell Check As You Type) plugin: + * [#148](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/148): Fixed: SCAYT leaves underlined word after the CKEditor Replace dialog corrects it. +* [#751](https://github.com/ckeditor/ckeditor-dev/issues/751): Added the [`CKEDITOR.dom.nodeList.toArray`](https://docs.ckeditor.com/#!/api/CKEDITOR.dom.nodeList-method-toArray) method which returns an array representation of a [node list](https://docs.ckeditor.com/#!/api/CKEDITOR.dom.nodeList). + +## CKEditor 4.7.1 + +New Features: + +* Added a new Mexican Spanish localization. Thanks to [David Alexandro Rodriguez](https://www.transifex.com/user/profile/darsco16/)! +* [#413](https://github.com/ckeditor/ckeditor-dev/issues/413): Added Paste as Plain Text keyboard shortcut to the [Accessibility Help](http://ckeditor.com/addon/a11yhelp) instructions. + +Fixed Issues: + +* [#515](https://github.com/ckeditor/ckeditor-dev/issues/515): [Chrome] Fixed: Mouse actions on CKEditor scrollbar throw an exception when the [Table Selection](http://ckeditor.com/addon/tableselection) plugin is loaded. +* [#493](https://github.com/ckeditor/ckeditor-dev/issues/493): Fixed: Selection started from a nested table causes an error in the browser while scrolling down. +* [#415](https://github.com/ckeditor/ckeditor-dev/issues/415): [Firefox] Fixed: Enter key breaks the table structure when pressed in a table selection. +* [#457](https://github.com/ckeditor/ckeditor-dev/issues/457): Fixed: Error thrown when deleting content from the editor with no selection. +* [#478](https://github.com/ckeditor/ckeditor-dev/issues/478): [Chrome] Fixed: Error thrown by the [Enter Key](http://ckeditor.com/addon/enterkey) plugin when pressing Enter with no selection. +* [#424](https://github.com/ckeditor/ckeditor-dev/issues/424): Fixed: Error thrown by [Tab Key Handling](http://ckeditor.com/addon/tab) and [Indent List](http://ckeditor.com/addon/indentlist) plugins when pressing Tab with no selection in inline editor. +* [#476](https://github.com/ckeditor/ckeditor-dev/issues/476): Fixed: Anchors inserted with the [Link](http://ckeditor.com/addon/link) plugin on collapsed selection cannot be edited. +* [#417](https://github.com/ckeditor/ckeditor-dev/issues/417): Fixed: The [Table Resize](http://ckeditor.com/addon/tableresize) plugin throws an error when used with a table with only header or footer rows. +* [#523](https://github.com/ckeditor/ckeditor-dev/issues/523): Fixed: The [`editor.getCommandKeystroke`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getCommandKeystroke) method does not obtain the correct keystroke. +* [#534](https://github.com/ckeditor/ckeditor-dev/issues/534): [IE] Fixed: [Paste from Word](http://ckeditor.com/addon/pastefromword) does not work in Quirks Mode. +* [#450](https://github.com/ckeditor/ckeditor-dev/issues/450): Fixed: [`CKEDITOR.filter`](http://docs.ckeditor.com/#!/api/CKEDITOR.filter) incorrectly transforms the `margin` CSS property. + +## CKEditor 4.7 + +**Important Notes:** + +* [#13793](http://dev.ckeditor.com/ticket/13793): The [`embed_provider`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-embed_provider) configuration option for the [Media Embed](http://ckeditor.com/addon/embed) and [Semantic Media Embed](http://ckeditor.com/addon/embedsemantic) plugins is no longer preset by default. +* The [UI Color](http://ckeditor.com/addon/uicolor) plugin now uses a custom color picker instead of the `YUI 2.7.0` library which has some known vulnerabilities (it's a security precaution, there was no security issue in CKEditor due to the way it was used). + +New Features: + +* [#16755](http://dev.ckeditor.com/ticket/16755): Added the [Table Selection](http://ckeditor.com/addon/tableselection) plugin that lets you select and manipulate an arbitrary rectangular table fragment (a few cells, a row or a column). +* [#16961](http://dev.ckeditor.com/ticket/16961): Added support for pasting from Microsoft Excel. +* [#13381](http://dev.ckeditor.com/ticket/13381): Dynamic code evaluation call in [`CKEDITOR.template`](http://docs.ckeditor.com/#!/api/CKEDITOR.template) removed. CKEditor can now be used without the `unsafe-eval` Content Security Policy. Thanks to [Caridy Patiño](http://caridy.name)! +* [#16971](http://dev.ckeditor.com/ticket/16971): Added support for color in the `background` property containing also other styles for table cells in the [Table Tools](http://ckeditor.com/addon/tabletools) plugin. +* [#16847](http://dev.ckeditor.com/ticket/16847): Added support for parsing and inlining any formatting created using the Microsoft Word style system to the [Paste from Word](http://ckeditor.com/addon/pastefromword) plugin. +* [#16818](http://dev.ckeditor.com/ticket/16818): Added table cell height parsing in the [Paste from Word](http://ckeditor.com/addon/pastefromword) plugin. +* [#16850](http://dev.ckeditor.com/ticket/16850): Added a new [`config.enableContextMenu`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enableContextMenu) configuration option for enabling and disabling the [context menu](http://ckeditor.com/addon/contextmenu). +* [#16937](http://dev.ckeditor.com/ticket/16937): The `command` parameter in [CKEDITOR.editor.getCommandKeystroke](http://docs.ckeditor.dev/#!/api/CKEDITOR.editor-method-getCommandKeystroke) now also accepts a command name as an argument. +* [#17010](http://dev.ckeditor.com/ticket/17010): The [`CKEDITOR.dom.range.shrink`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.range-method-shrink) method now allows for skipping bogus `
` elements. + +Fixed Issues: + +* [#16935](http://dev.ckeditor.com/ticket/16935): [Chrome] Fixed: Blurring the editor in [Source Mode](http://ckeditor.com/addon/sourcearea) throws an error. +* [#16825](http://dev.ckeditor.com/ticket/16825): [Chrome] Fixed: Error thrown when destroying a focused inline editor. +* [#16857](http://dev.ckeditor.com/ticket/16857): Fixed: Ctrl+Shift+V blocked by [Copy Formatting](http://ckeditor.com/addon/copyformatting). +* [#16845](https://dev.ckeditor.com/ticket/16845): [IE] Fixed: Cursor jumps to the top of the scrolled editor after focusing it when the [Copy Formatting](http://ckeditor.com/addon/copyformatting) plugin is enabled. +* [#16786](http://dev.ckeditor.com/ticket/16786): Fixed: Added missing translations for the [Copy Formatting](http://ckeditor.com/addon/copyformatting) plugin. +* [#14714](http://dev.ckeditor.com/ticket/14714): [WebKit/Blink] Fixed: Exception thrown on refocusing a blurred inline editor. +* [#16913](http://dev.ckeditor.com/ticket/16913): [Firefox, IE] Fixed: [Paste as Plain Text](http://ckeditor.com/addon/pastetext) keystroke does not work. +* [#16968](http://dev.ckeditor.com/ticket/16968): Fixed: [Safari] [Paste as Plain Text](http://ckeditor.com/addon/pastetext) is not handled by the editor. +* [#16912](http://dev.ckeditor.com/ticket/16912): Fixed: Exception thrown when a single image is pasted using [Paste from Word](http://ckeditor.com/addon/pastefromword). +* [#16821](http://dev.ckeditor.com/ticket/16821): Fixed: Extraneous `` elements with `height` style stacked when [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#16866](http://dev.ckeditor.com/ticket/16866): [IE, Edge] Fixed: Whitespaces not preserved when [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#16860](http://dev.ckeditor.com/ticket/16860): Fixed: Paragraphs which only look like lists incorrectly transformed into them when [pasting from Word](http://ckeditor.com/addon/pastefromword). +* [#16817](http://dev.ckeditor.com/ticket/16817): Fixed: When [pasting from Word](http://ckeditor.com/addon/pastefromword), paragraphs are transformed into lists with some corrupted data. +* [#16833](http://dev.ckeditor.com/ticket/16833): [IE11] Fixed: Malformed list with headers [pasted from Word](http://ckeditor.com/addon/pastefromword). +* [#16826](http://dev.ckeditor.com/ticket/16826): [IE] Fixed: Superfluous paragraphs within lists [pasted from Word](http://ckeditor.com/addon/pastefromword). +* [#12465](http://dev.ckeditor.com/ticket/12465): Fixed: Cannot change the state of checkboxes or radio buttons if the properties dialog was invoked with a double-click. +* [#13062](http://dev.ckeditor.com/ticket/13062): Fixed: Impossible to unlink when the caret is at the edge of the link. +* [#13585](http://dev.ckeditor.com/ticket/13585): Fixed: Error when wrapping two adjacent `
` elements with a `
`. +* [#16811](http://dev.ckeditor.com/ticket/16811): Fixed: Table alignment is not preserved by the [Paste from Word](http://ckeditor.com/addon/pastefromword) plugin. +* [#16810](http://dev.ckeditor.com/ticket/16810): Fixed: Vertical align in tables is not supported by the [Paste from Word](http://ckeditor.com/addon/pastefromword) plugin. +* [#11956](http://dev.ckeditor.com/ticket/11956): [Blink, IE] Fixed: [Link](http://ckeditor.com/addon/link) dialog does not open on a double click on the second word of the link with a background color or other styles. +* [#10472](http://dev.ckeditor.com/ticket/10472): Fixed: Unable to use [Table Resize](http://ckeditor.com/addon/tableresize) on table header and footer. +* [#14762](http://dev.ckeditor.com/ticket/14762): Fixed: Hovering over an empty table (without rows or cells) throws an error when the [Table Resize](http://ckeditor.com/addon/tableresize) plugin is active. +* [#16777](https://dev.ckeditor.com/ticket/16777): [Edge] Fixed: The [Clipboard](http://ckeditor.com/addon/clipboard) plugin does not allow to drop widgets into the editor. +* [#14894](https://dev.ckeditor.com/ticket/14894): [Chrome] Fixed: The editor scrolls to the top after focusing or when a dialog is opened. +* [#14769](https://dev.ckeditor.com/ticket/14769): Fixed: URLs with '-' in host are not detected by the [Auto Link](http://ckeditor.com/addon/autolink) plugin. +* [#16804](https://dev.ckeditor.com/ticket/16804): Fixed: Focus is not on the first menu item when the user opens a context menu or a drop-down list from the editor toolbar. +* [#14407](https://dev.ckeditor.com/ticket/14407): [IE] Fixed: Non-editable widgets can be edited. +* [#16927](https://dev.ckeditor.com/ticket/16927): Fixed: An error thrown if a bundle containing the [Color Button](http://ckeditor.com/addon/colorbutton) plugin is run in ES5 strict mode. Thanks to [Igor Rubinovich](https://github.com/IgorRubinovich)! +* [#16920](http://dev.ckeditor.com/ticket/16920): Fixed: Several plugins not using the [Dialog](http://ckeditor.com/addon/dialog) plugin as a direct dependency. +* [PR#336](https://github.com/ckeditor/ckeditor-dev/pull/336): Fixed: Typo in [`CKEDITOR.getCss`](http://docs.ckeditor.com/#!/api/CKEDITOR-method-getCss) API documentation. Thanks to [knusperpixel](https://github.com/knusperpixel)! +* [#17027](http://dev.ckeditor.com/ticket/17027): Fixed: Command event data should be initialized as an empty object. +* Fixed the behavior of HTML parser when parsing `src`/`srcdoc` attributes of the `' ); + iframe.appendTo( body.getParent() ); + } + + // Make the Title and Close Button unselectable. + title.unselectable(); + close.unselectable(); + + return { + element: element, + parts: { + dialog: element.getChild( 0 ), + title: title, + close: close, + tabs: body.getChild( 2 ), + contents: body.getChild( [ 3, 0, 0, 0 ] ), + footer: body.getChild( [ 3, 0, 1, 0 ] ) + } + }; + } + + /** + * This is the base class for runtime dialog objects. An instance of this + * class represents a single named dialog for a single editor instance. + * + * var dialogObj = new CKEDITOR.dialog( editor, 'smiley' ); + * + * @class + * @constructor Creates a dialog class instance. + * @param {Object} editor The editor which created the dialog. + * @param {String} dialogName The dialog's registered name. + */ + CKEDITOR.dialog = function( editor, dialogName ) { + // Load the dialog definition. + var definition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ], + defaultDefinition = CKEDITOR.tools.clone( defaultDialogDefinition ), + buttonsOrder = editor.config.dialog_buttonsOrder || 'OS', + dir = editor.lang.dir, + tabsToRemove = {}, + i, processed, stopPropagation; + + if ( ( buttonsOrder == 'OS' && CKEDITOR.env.mac ) || // The buttons in MacOS Apps are in reverse order (#4750) + ( buttonsOrder == 'rtl' && dir == 'ltr' ) || ( buttonsOrder == 'ltr' && dir == 'rtl' ) ) + defaultDefinition.buttons.reverse(); + + + // Completes the definition with the default values. + definition = CKEDITOR.tools.extend( definition( editor ), defaultDefinition ); + + // Clone a functionally independent copy for this dialog. + definition = CKEDITOR.tools.clone( definition ); + + // Create a complex definition object, extending it with the API + // functions. + definition = new definitionObject( this, definition ); + + var themeBuilt = buildDialog( editor ); + + // Initialize some basic parameters. + this._ = { + editor: editor, + element: themeBuilt.element, + name: dialogName, + contentSize: { width: 0, height: 0 }, + size: { width: 0, height: 0 }, + contents: {}, + buttons: {}, + accessKeyMap: {}, + + // Initialize the tab and page map. + tabs: {}, + tabIdList: [], + currentTabId: null, + currentTabIndex: null, + pageCount: 0, + lastTab: null, + tabBarMode: false, + + // Initialize the tab order array for input widgets. + focusList: [], + currentFocusIndex: 0, + hasFocus: false + }; + + this.parts = themeBuilt.parts; + + CKEDITOR.tools.setTimeout( function() { + editor.fire( 'ariaWidget', this.parts.contents ); + }, 0, this ); + + // Set the startup styles for the dialog, avoiding it enlarging the + // page size on the dialog creation. + var startStyles = { + position: CKEDITOR.env.ie6Compat ? 'absolute' : 'fixed', + top: 0, + visibility: 'hidden' + }; + + startStyles[ dir == 'rtl' ? 'right' : 'left' ] = 0; + this.parts.dialog.setStyles( startStyles ); + + + // Call the CKEDITOR.event constructor to initialize this instance. + CKEDITOR.event.call( this ); + + // Fire the "dialogDefinition" event, making it possible to customize + // the dialog definition. + this.definition = definition = CKEDITOR.fire( 'dialogDefinition', { + name: dialogName, + definition: definition + }, editor ).definition; + + // Cache tabs that should be removed. + if ( !( 'removeDialogTabs' in editor._ ) && editor.config.removeDialogTabs ) { + var removeContents = editor.config.removeDialogTabs.split( ';' ); + + for ( i = 0; i < removeContents.length; i++ ) { + var parts = removeContents[ i ].split( ':' ); + if ( parts.length == 2 ) { + var removeDialogName = parts[ 0 ]; + if ( !tabsToRemove[ removeDialogName ] ) + tabsToRemove[ removeDialogName ] = []; + tabsToRemove[ removeDialogName ].push( parts[ 1 ] ); + } + } + editor._.removeDialogTabs = tabsToRemove; + } + + // Remove tabs of this dialog. + if ( editor._.removeDialogTabs && ( tabsToRemove = editor._.removeDialogTabs[ dialogName ] ) ) { + for ( i = 0; i < tabsToRemove.length; i++ ) + definition.removeContents( tabsToRemove[ i ] ); + } + + // Initialize load, show, hide, ok and cancel events. + if ( definition.onLoad ) + this.on( 'load', definition.onLoad ); + + if ( definition.onShow ) + this.on( 'show', definition.onShow ); + + if ( definition.onHide ) + this.on( 'hide', definition.onHide ); + + if ( definition.onOk ) { + this.on( 'ok', function( evt ) { + // Dialog confirm might probably introduce content changes (#5415). + editor.fire( 'saveSnapshot' ); + setTimeout( function() { + editor.fire( 'saveSnapshot' ); + }, 0 ); + if ( definition.onOk.call( this, evt ) === false ) + evt.data.hide = false; + } ); + } + + // Set default dialog state. + this.state = CKEDITOR.DIALOG_STATE_IDLE; + + if ( definition.onCancel ) { + this.on( 'cancel', function( evt ) { + if ( definition.onCancel.call( this, evt ) === false ) + evt.data.hide = false; + } ); + } + + var me = this; + + // Iterates over all items inside all content in the dialog, calling a + // function for each of them. + var iterContents = function( func ) { + var contents = me._.contents, + stop = false; + + for ( var i in contents ) { + for ( var j in contents[ i ] ) { + stop = func.call( this, contents[ i ][ j ] ); + if ( stop ) + return; + } + } + }; + + this.on( 'ok', function( evt ) { + iterContents( function( item ) { + if ( item.validate ) { + var retval = item.validate( this ), + invalid = ( typeof retval == 'string' ) || retval === false; + + if ( invalid ) { + evt.data.hide = false; + evt.stop(); + } + + handleFieldValidated.call( item, !invalid, typeof retval == 'string' ? retval : undefined ); + return invalid; + } + } ); + }, this, null, 0 ); + + this.on( 'cancel', function( evt ) { + iterContents( function( item ) { + if ( item.isChanged() ) { + if ( !editor.config.dialog_noConfirmCancel && !confirm( editor.lang.common.confirmCancel ) ) // jshint ignore:line + evt.data.hide = false; + return true; + } + } ); + }, this, null, 0 ); + + this.parts.close.on( 'click', function( evt ) { + if ( this.fire( 'cancel', { hide: true } ).hide !== false ) + this.hide(); + evt.data.preventDefault(); + }, this ); + + // Sort focus list according to tab order definitions. + function setupFocus() { + var focusList = me._.focusList; + focusList.sort( function( a, b ) { + // Mimics browser tab order logics; + if ( a.tabIndex != b.tabIndex ) + return b.tabIndex - a.tabIndex; + // Sort is not stable in some browsers, + // fall-back the comparator to 'focusIndex'; + else + return a.focusIndex - b.focusIndex; + } ); + + var size = focusList.length; + for ( var i = 0; i < size; i++ ) + focusList[ i ].focusIndex = i; + } + + // Expects 1 or -1 as an offset, meaning direction of the offset change. + function changeFocus( offset ) { + var focusList = me._.focusList; + offset = offset || 0; + + if ( focusList.length < 1 ) + return; + + var startIndex = me._.currentFocusIndex; + + if ( me._.tabBarMode && offset < 0 ) { + // If we are in tab mode, we need to mimic that we started tabbing back from the first + // focusList (so it will go to the last one). + startIndex = 0; + } + + // Trigger the 'blur' event of any input element before anything, + // since certain UI updates may depend on it. + try { + focusList[ startIndex ].getInputElement().$.blur(); + } catch ( e ) {} + + var currentIndex = startIndex, + hasTabs = me._.pageCount > 1; + + do { + currentIndex = currentIndex + offset; + + if ( hasTabs && !me._.tabBarMode && ( currentIndex == focusList.length || currentIndex == -1 ) ) { + // If the dialog was not in tab mode, then focus the first tab (#13027). + me._.tabBarMode = true; + me._.tabs[ me._.currentTabId ][ 0 ].focus(); + me._.currentFocusIndex = -1; + + // Early return, in order to avoid accessing focusList[ -1 ]. + return; + } + + currentIndex = ( currentIndex + focusList.length ) % focusList.length; + + if ( currentIndex == startIndex ) { + break; + } + } while ( offset && !focusList[ currentIndex ].isFocusable() ); + + focusList[ currentIndex ].focus(); + + // Select whole field content. + if ( focusList[ currentIndex ].type == 'text' ) + focusList[ currentIndex ].select(); + } + + this.changeFocus = changeFocus; + + + function keydownHandler( evt ) { + // If I'm not the top dialog, ignore. + if ( me != CKEDITOR.dialog._.currentTop ) + return; + + var keystroke = evt.data.getKeystroke(), + rtl = editor.lang.dir == 'rtl', + arrowKeys = [ 37, 38, 39, 40 ], + button; + + processed = stopPropagation = 0; + + if ( keystroke == 9 || keystroke == CKEDITOR.SHIFT + 9 ) { + var shiftPressed = ( keystroke == CKEDITOR.SHIFT + 9 ); + changeFocus( shiftPressed ? -1 : 1 ); + processed = 1; + } else if ( keystroke == CKEDITOR.ALT + 121 && !me._.tabBarMode && me.getPageCount() > 1 ) { + // Alt-F10 puts focus into the current tab item in the tab bar. + me._.tabBarMode = true; + me._.tabs[ me._.currentTabId ][ 0 ].focus(); + me._.currentFocusIndex = -1; + processed = 1; + } else if ( CKEDITOR.tools.indexOf( arrowKeys, keystroke ) != -1 && me._.tabBarMode ) { + // Array with key codes that activate previous tab. + var prevKeyCodes = [ + // Depending on the lang dir: right or left key + rtl ? 39 : 37, + // Top/bot arrow: actually for both cases it's the same. + 38 + ], + nextId = CKEDITOR.tools.indexOf( prevKeyCodes, keystroke ) != -1 ? getPreviousVisibleTab.call( me ) : getNextVisibleTab.call( me ); + + me.selectPage( nextId ); + me._.tabs[ nextId ][ 0 ].focus(); + processed = 1; + } else if ( ( keystroke == 13 || keystroke == 32 ) && me._.tabBarMode ) { + this.selectPage( this._.currentTabId ); + this._.tabBarMode = false; + this._.currentFocusIndex = -1; + changeFocus( 1 ); + processed = 1; + } + // If user presses enter key in a text box, it implies clicking OK for the dialog. + else if ( keystroke == 13 /*ENTER*/ ) { + // Don't do that for a target that handles ENTER. + var target = evt.data.getTarget(); + if ( !target.is( 'a', 'button', 'select', 'textarea' ) && ( !target.is( 'input' ) || target.$.type != 'button' ) ) { + button = this.getButton( 'ok' ); + button && CKEDITOR.tools.setTimeout( button.click, 0, button ); + processed = 1; + } + stopPropagation = 1; // Always block the propagation (#4269) + } else if ( keystroke == 27 /*ESC*/ ) { + button = this.getButton( 'cancel' ); + + // If there's a Cancel button, click it, else just fire the cancel event and hide the dialog. + if ( button ) + CKEDITOR.tools.setTimeout( button.click, 0, button ); + else { + if ( this.fire( 'cancel', { hide: true } ).hide !== false ) + this.hide(); + } + stopPropagation = 1; // Always block the propagation (#4269) + } else { + return; + } + + keypressHandler( evt ); + } + + function keypressHandler( evt ) { + if ( processed ) + evt.data.preventDefault( 1 ); + else if ( stopPropagation ) + evt.data.stopPropagation(); + } + + var dialogElement = this._.element; + + editor.focusManager.add( dialogElement, 1 ); + + // Add the dialog keyboard handlers. + this.on( 'show', function() { + dialogElement.on( 'keydown', keydownHandler, this ); + + // Some browsers instead, don't cancel key events in the keydown, but in the + // keypress. So we must do a longer trip in those cases. (#4531,#8985) + if ( CKEDITOR.env.gecko ) + dialogElement.on( 'keypress', keypressHandler, this ); + + } ); + this.on( 'hide', function() { + dialogElement.removeListener( 'keydown', keydownHandler ); + if ( CKEDITOR.env.gecko ) + dialogElement.removeListener( 'keypress', keypressHandler ); + + // Reset fields state when closing dialog. + iterContents( function( item ) { + resetField.apply( item ); + } ); + } ); + this.on( 'iframeAdded', function( evt ) { + var doc = new CKEDITOR.dom.document( evt.data.iframe.$.contentWindow.document ); + doc.on( 'keydown', keydownHandler, this, null, 0 ); + } ); + + // Auto-focus logic in dialog. + this.on( 'show', function() { + // Setup tabIndex on showing the dialog instead of on loading + // to allow dynamic tab order happen in dialog definition. + setupFocus(); + + var hasTabs = me._.pageCount > 1; + + if ( editor.config.dialog_startupFocusTab && hasTabs ) { + me._.tabBarMode = true; + me._.tabs[ me._.currentTabId ][ 0 ].focus(); + me._.currentFocusIndex = -1; + } else if ( !this._.hasFocus ) { + // http://dev.ckeditor.com/ticket/13114#comment:4. + this._.currentFocusIndex = hasTabs ? -1 : this._.focusList.length - 1; + + // Decide where to put the initial focus. + if ( definition.onFocus ) { + var initialFocus = definition.onFocus.call( this ); + // Focus the field that the user specified. + initialFocus && initialFocus.focus(); + } + // Focus the first field in layout order. + else { + changeFocus( 1 ); + } + } + }, this, null, 0xffffffff ); + + // IE6 BUG: Text fields and text areas are only half-rendered the first time the dialog appears in IE6 (#2661). + // This is still needed after [2708] and [2709] because text fields in hidden TR tags are still broken. + if ( CKEDITOR.env.ie6Compat ) { + this.on( 'load', function() { + var outer = this.getElement(), + inner = outer.getFirst(); + inner.remove(); + inner.appendTo( outer ); + }, this ); + } + + initDragAndDrop( this ); + initResizeHandles( this ); + + // Insert the title. + ( new CKEDITOR.dom.text( definition.title, CKEDITOR.document ) ).appendTo( this.parts.title ); + + // Insert the tabs and contents. + for ( i = 0; i < definition.contents.length; i++ ) { + var page = definition.contents[ i ]; + page && this.addPage( page ); + } + + this.parts.tabs.on( 'click', function( evt ) { + var target = evt.data.getTarget(); + // If we aren't inside a tab, bail out. + if ( target.hasClass( 'cke_dialog_tab' ) ) { + // Get the ID of the tab, without the 'cke_' prefix and the unique number suffix. + var id = target.$.id; + this.selectPage( id.substring( 4, id.lastIndexOf( '_' ) ) ); + + if ( this._.tabBarMode ) { + this._.tabBarMode = false; + this._.currentFocusIndex = -1; + changeFocus( 1 ); + } + evt.data.preventDefault(); + } + }, this ); + + // Insert buttons. + var buttonsHtml = [], + buttons = CKEDITOR.dialog._.uiElementBuilders.hbox.build( this, { + type: 'hbox', + className: 'cke_dialog_footer_buttons', + widths: [], + children: definition.buttons + }, buttonsHtml ).getChild(); + this.parts.footer.setHtml( buttonsHtml.join( '' ) ); + + for ( i = 0; i < buttons.length; i++ ) + this._.buttons[ buttons[ i ].id ] = buttons[ i ]; + + /** + * Current state of the dialog. Use the {@link #setState} method to update it. + * See the {@link #event-state} event to know more. + * + * @readonly + * @property {Number} [state=CKEDITOR.DIALOG_STATE_IDLE] + */ + }; + + // Focusable interface. Use it via dialog.addFocusable. + function Focusable( dialog, element, index ) { + this.element = element; + this.focusIndex = index; + // TODO: support tabIndex for focusables. + this.tabIndex = 0; + this.isFocusable = function() { + return !element.getAttribute( 'disabled' ) && element.isVisible(); + }; + this.focus = function() { + dialog._.currentFocusIndex = this.focusIndex; + this.element.focus(); + }; + // Bind events + element.on( 'keydown', function( e ) { + if ( e.data.getKeystroke() in { 32: 1, 13: 1 } ) + this.fire( 'click' ); + } ); + element.on( 'focus', function() { + this.fire( 'mouseover' ); + } ); + element.on( 'blur', function() { + this.fire( 'mouseout' ); + } ); + } + + // Re-layout the dialog on window resize. + function resizeWithWindow( dialog ) { + var win = CKEDITOR.document.getWindow(); + function resizeHandler() { + dialog.layout(); + } + win.on( 'resize', resizeHandler ); + dialog.on( 'hide', function() { + win.removeListener( 'resize', resizeHandler ); + } ); + } + + CKEDITOR.dialog.prototype = { + destroy: function() { + this.hide(); + this._.element.remove(); + }, + + /** + * Resizes the dialog. + * + * dialogObj.resize( 800, 640 ); + * + * @method + * @param {Number} width The width of the dialog in pixels. + * @param {Number} height The height of the dialog in pixels. + */ + resize: ( function() { + return function( width, height ) { + if ( this._.contentSize && this._.contentSize.width == width && this._.contentSize.height == height ) + return; + + CKEDITOR.dialog.fire( 'resize', { + dialog: this, + width: width, + height: height + }, this._.editor ); + + this.fire( 'resize', { + width: width, + height: height + }, this._.editor ); + + var contents = this.parts.contents; + contents.setStyles( { + width: width + 'px', + height: height + 'px' + } ); + + // Update dialog position when dimension get changed in RTL. + if ( this._.editor.lang.dir == 'rtl' && this._.position ) + this._.position.x = CKEDITOR.document.getWindow().getViewPaneSize().width - this._.contentSize.width - parseInt( this._.element.getFirst().getStyle( 'right' ), 10 ); + + this._.contentSize = { width: width, height: height }; + }; + } )(), + + /** + * Gets the current size of the dialog in pixels. + * + * var width = dialogObj.getSize().width; + * + * @returns {Object} + * @returns {Number} return.width + * @returns {Number} return.height + */ + getSize: function() { + var element = this._.element.getFirst(); + return { width: element.$.offsetWidth || 0, height: element.$.offsetHeight || 0 }; + }, + + /** + * Moves the dialog to an `(x, y)` coordinate relative to the window. + * + * dialogObj.move( 10, 40 ); + * + * @method + * @param {Number} x The target x-coordinate. + * @param {Number} y The target y-coordinate. + * @param {Boolean} save Flag indicate whether the dialog position should be remembered on next open up. + */ + move: function( x, y, save ) { + + // The dialog may be fixed positioned or absolute positioned. Ask the + // browser what is the current situation first. + var element = this._.element.getFirst(), rtl = this._.editor.lang.dir == 'rtl'; + var isFixed = element.getComputedStyle( 'position' ) == 'fixed'; + + // (#8888) In some cases of a very small viewport, dialog is incorrectly + // positioned in IE7. It also happens that it remains sticky and user cannot + // scroll down/up to reveal dialog's content below/above the viewport; this is + // cumbersome. + // The only way to fix this is to move mouse out of the browser and + // go back to see that dialog position is automagically fixed. No events, + // no style change - pure magic. This is a IE7 rendering issue, which can be + // fixed with dummy style redraw on each move. + if ( CKEDITOR.env.ie ) + element.setStyle( 'zoom', '100%' ); + + if ( isFixed && this._.position && this._.position.x == x && this._.position.y == y ) + return; + + // Save the current position. + this._.position = { x: x, y: y }; + + // If not fixed positioned, add scroll position to the coordinates. + if ( !isFixed ) { + var scrollPosition = CKEDITOR.document.getWindow().getScrollPosition(); + x += scrollPosition.x; + y += scrollPosition.y; + } + + // Translate coordinate for RTL. + if ( rtl ) { + var dialogSize = this.getSize(), viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize(); + x = viewPaneSize.width - dialogSize.width - x; + } + + var styles = { 'top': ( y > 0 ? y : 0 ) + 'px' }; + styles[ rtl ? 'right' : 'left' ] = ( x > 0 ? x : 0 ) + 'px'; + + element.setStyles( styles ); + + save && ( this._.moved = 1 ); + }, + + /** + * Gets the dialog's position in the window. + * + * var dialogX = dialogObj.getPosition().x; + * + * @returns {Object} + * @returns {Number} return.x + * @returns {Number} return.y + */ + getPosition: function() { + return CKEDITOR.tools.extend( {}, this._.position ); + }, + + /** + * Shows the dialog box. + * + * dialogObj.show(); + */ + show: function() { + // Insert the dialog's element to the root document. + var element = this._.element; + var definition = this.definition; + if ( !( element.getParent() && element.getParent().equals( CKEDITOR.document.getBody() ) ) ) + element.appendTo( CKEDITOR.document.getBody() ); + else + element.setStyle( 'display', 'block' ); + + // First, set the dialog to an appropriate size. + this.resize( + this._.contentSize && this._.contentSize.width || definition.width || definition.minWidth, + this._.contentSize && this._.contentSize.height || definition.height || definition.minHeight + ); + + // Reset all inputs back to their default value. + this.reset(); + + // Selects the first tab if no tab is already selected. + if ( this._.currentTabId === null ) { + this.selectPage( this.definition.contents[ 0 ].id ); + } + + // Set z-index. + if ( CKEDITOR.dialog._.currentZIndex === null ) + CKEDITOR.dialog._.currentZIndex = this._.editor.config.baseFloatZIndex; + this._.element.getFirst().setStyle( 'z-index', CKEDITOR.dialog._.currentZIndex += 10 ); + + // Maintain the dialog ordering and dialog cover. + if ( CKEDITOR.dialog._.currentTop === null ) { + CKEDITOR.dialog._.currentTop = this; + this._.parentDialog = null; + showCover( this._.editor ); + + } else { + this._.parentDialog = CKEDITOR.dialog._.currentTop; + var parentElement = this._.parentDialog.getElement().getFirst(); + parentElement.$.style.zIndex -= Math.floor( this._.editor.config.baseFloatZIndex / 2 ); + CKEDITOR.dialog._.currentTop = this; + } + + element.on( 'keydown', accessKeyDownHandler ); + element.on( 'keyup', accessKeyUpHandler ); + + // Reset the hasFocus state. + this._.hasFocus = false; + + for ( var i in definition.contents ) { + if ( !definition.contents[ i ] ) + continue; + + var content = definition.contents[ i ], + tab = this._.tabs[ content.id ], + requiredContent = content.requiredContent, + enableElements = 0; + + if ( !tab ) + continue; + + for ( var j in this._.contents[ content.id ] ) { + var elem = this._.contents[ content.id ][ j ]; + + if ( elem.type == 'hbox' || elem.type == 'vbox' || !elem.getInputElement() ) + continue; + + if ( elem.requiredContent && !this._.editor.activeFilter.check( elem.requiredContent ) ) + elem.disable(); + else { + elem.enable(); + enableElements++; + } + } + + if ( !enableElements || ( requiredContent && !this._.editor.activeFilter.check( requiredContent ) ) ) + tab[ 0 ].addClass( 'cke_dialog_tab_disabled' ); + else + tab[ 0 ].removeClass( 'cke_dialog_tab_disabled' ); + } + + CKEDITOR.tools.setTimeout( function() { + this.layout(); + resizeWithWindow( this ); + + this.parts.dialog.setStyle( 'visibility', '' ); + + // Execute onLoad for the first show. + this.fireOnce( 'load', {} ); + CKEDITOR.ui.fire( 'ready', this ); + + this.fire( 'show', {} ); + this._.editor.fire( 'dialogShow', this ); + + if ( !this._.parentDialog ) + this._.editor.focusManager.lock(); + + // Save the initial values of the dialog. + this.foreach( function( contentObj ) { + contentObj.setInitValue && contentObj.setInitValue(); + } ); + + }, 100, this ); + }, + + /** + * Rearrange the dialog to its previous position or the middle of the window. + * + * @since 3.5 + */ + layout: function() { + var el = this.parts.dialog; + var dialogSize = this.getSize(); + var win = CKEDITOR.document.getWindow(), + viewSize = win.getViewPaneSize(); + + var posX = ( viewSize.width - dialogSize.width ) / 2, + posY = ( viewSize.height - dialogSize.height ) / 2; + + // Switch to absolute position when viewport is smaller than dialog size. + if ( !CKEDITOR.env.ie6Compat ) { + if ( dialogSize.height + ( posY > 0 ? posY : 0 ) > viewSize.height || dialogSize.width + ( posX > 0 ? posX : 0 ) > viewSize.width ) { + el.setStyle( 'position', 'absolute' ); + } else { + el.setStyle( 'position', 'fixed' ); + } + } + + this.move( this._.moved ? this._.position.x : posX, this._.moved ? this._.position.y : posY ); + }, + + /** + * Executes a function for each UI element. + * + * @param {Function} fn Function to execute for each UI element. + * @returns {CKEDITOR.dialog} The current dialog object. + */ + foreach: function( fn ) { + for ( var i in this._.contents ) { + for ( var j in this._.contents[ i ] ) { + fn.call( this, this._.contents[i][j] ); + } + } + + return this; + }, + + /** + * Resets all input values in the dialog. + * + * dialogObj.reset(); + * + * @method + * @chainable + */ + reset: ( function() { + var fn = function( widget ) { + if ( widget.reset ) + widget.reset( 1 ); + }; + return function() { + this.foreach( fn ); + return this; + }; + } )(), + + + /** + * Calls the {@link CKEDITOR.dialog.definition.uiElement#setup} method of each + * of the UI elements, with the arguments passed through it. + * It is usually being called when the dialog is opened, to put the initial value inside the field. + * + * dialogObj.setupContent(); + * + * var timestamp = ( new Date() ).valueOf(); + * dialogObj.setupContent( timestamp ); + */ + setupContent: function() { + var args = arguments; + this.foreach( function( widget ) { + if ( widget.setup ) + widget.setup.apply( widget, args ); + } ); + }, + + /** + * Calls the {@link CKEDITOR.dialog.definition.uiElement#commit} method of each + * of the UI elements, with the arguments passed through it. + * It is usually being called when the user confirms the dialog, to process the values. + * + * dialogObj.commitContent(); + * + * var timestamp = ( new Date() ).valueOf(); + * dialogObj.commitContent( timestamp ); + */ + commitContent: function() { + var args = arguments; + this.foreach( function( widget ) { + // Make sure IE triggers "change" event on last focused input before closing the dialog. (#7915) + if ( CKEDITOR.env.ie && this._.currentFocusIndex == widget.focusIndex ) + widget.getInputElement().$.blur(); + + if ( widget.commit ) + widget.commit.apply( widget, args ); + } ); + }, + + /** + * Hides the dialog box. + * + * dialogObj.hide(); + */ + hide: function() { + if ( !this.parts.dialog.isVisible() ) + return; + + this.fire( 'hide', {} ); + this._.editor.fire( 'dialogHide', this ); + // Reset the tab page. + this.selectPage( this._.tabIdList[ 0 ] ); + var element = this._.element; + element.setStyle( 'display', 'none' ); + this.parts.dialog.setStyle( 'visibility', 'hidden' ); + // Unregister all access keys associated with this dialog. + unregisterAccessKey( this ); + + // Close any child(top) dialogs first. + while ( CKEDITOR.dialog._.currentTop != this ) + CKEDITOR.dialog._.currentTop.hide(); + + // Maintain dialog ordering and remove cover if needed. + if ( !this._.parentDialog ) + hideCover( this._.editor ); + else { + var parentElement = this._.parentDialog.getElement().getFirst(); + parentElement.setStyle( 'z-index', parseInt( parentElement.$.style.zIndex, 10 ) + Math.floor( this._.editor.config.baseFloatZIndex / 2 ) ); + } + CKEDITOR.dialog._.currentTop = this._.parentDialog; + + // Deduct or clear the z-index. + if ( !this._.parentDialog ) { + CKEDITOR.dialog._.currentZIndex = null; + + // Remove access key handlers. + element.removeListener( 'keydown', accessKeyDownHandler ); + element.removeListener( 'keyup', accessKeyUpHandler ); + + var editor = this._.editor; + editor.focus(); + + // Give a while before unlock, waiting for focus to return to the editable. (#172) + setTimeout( function() { + editor.focusManager.unlock(); + + // Fixed iOS focus issue (#12381). + // Keep in mind that editor.focus() does not work in this case. + if ( CKEDITOR.env.iOS ) { + editor.window.focus(); + } + }, 0 ); + + } else { + CKEDITOR.dialog._.currentZIndex -= 10; + } + + delete this._.parentDialog; + // Reset the initial values of the dialog. + this.foreach( function( contentObj ) { + contentObj.resetInitValue && contentObj.resetInitValue(); + } ); + + // Reset dialog state back to IDLE, if busy (#13213). + this.setState( CKEDITOR.DIALOG_STATE_IDLE ); + }, + + /** + * Adds a tabbed page into the dialog. + * + * @param {Object} contents Content definition. + */ + addPage: function( contents ) { + if ( contents.requiredContent && !this._.editor.filter.check( contents.requiredContent ) ) + return; + + var pageHtml = [], + titleHtml = contents.label ? ' title="' + CKEDITOR.tools.htmlEncode( contents.label ) + '"' : '', + vbox = CKEDITOR.dialog._.uiElementBuilders.vbox.build( this, { + type: 'vbox', + className: 'cke_dialog_page_contents', + children: contents.elements, + expand: !!contents.expand, + padding: contents.padding, + style: contents.style || 'width: 100%;' + }, pageHtml ); + + var contentMap = this._.contents[ contents.id ] = {}, + cursor, + children = vbox.getChild(), + enabledFields = 0; + + while ( ( cursor = children.shift() ) ) { + // Count all allowed fields. + if ( !cursor.notAllowed && cursor.type != 'hbox' && cursor.type != 'vbox' ) + enabledFields++; + + contentMap[ cursor.id ] = cursor; + if ( typeof cursor.getChild == 'function' ) + children.push.apply( children, cursor.getChild() ); + } + + // If all fields are disabled (because they are not allowed) hide this tab. + if ( !enabledFields ) + contents.hidden = true; + + // Create the HTML for the tab and the content block. + var page = CKEDITOR.dom.element.createFromHtml( pageHtml.join( '' ) ); + page.setAttribute( 'role', 'tabpanel' ); + + var env = CKEDITOR.env; + var tabId = 'cke_' + contents.id + '_' + CKEDITOR.tools.getNextNumber(), + tab = CKEDITOR.dom.element.createFromHtml( [ + ' 0 ? ' cke_last' : 'cke_first' ), + titleHtml, + ( !!contents.hidden ? ' style="display:none"' : '' ), + ' id="', tabId, '"', + env.gecko && !env.hc ? '' : ' href="javascript:void(0)"', + ' tabIndex="-1"', + ' hidefocus="true"', + ' role="tab">', + contents.label, + '' + ].join( '' ) ); + + page.setAttribute( 'aria-labelledby', tabId ); + + // Take records for the tabs and elements created. + this._.tabs[ contents.id ] = [ tab, page ]; + this._.tabIdList.push( contents.id ); + !contents.hidden && this._.pageCount++; + this._.lastTab = tab; + this.updateStyle(); + + // Attach the DOM nodes. + + page.setAttribute( 'name', contents.id ); + page.appendTo( this.parts.contents ); + + tab.unselectable(); + this.parts.tabs.append( tab ); + + // Add access key handlers if access key is defined. + if ( contents.accessKey ) { + registerAccessKey( this, this, 'CTRL+' + contents.accessKey, tabAccessKeyDown, tabAccessKeyUp ); + this._.accessKeyMap[ 'CTRL+' + contents.accessKey ] = contents.id; + } + }, + + /** + * Activates a tab page in the dialog by its id. + * + * dialogObj.selectPage( 'tab_1' ); + * + * @param {String} id The id of the dialog tab to be activated. + */ + selectPage: function( id ) { + if ( this._.currentTabId == id ) + return; + + if ( this._.tabs[ id ][ 0 ].hasClass( 'cke_dialog_tab_disabled' ) ) + return; + + // If event was canceled - do nothing. + if ( this.fire( 'selectPage', { page: id, currentPage: this._.currentTabId } ) === false ) + return; + + // Hide the non-selected tabs and pages. + for ( var i in this._.tabs ) { + var tab = this._.tabs[ i ][ 0 ], + page = this._.tabs[ i ][ 1 ]; + if ( i != id ) { + tab.removeClass( 'cke_dialog_tab_selected' ); + page.hide(); + } + page.setAttribute( 'aria-hidden', i != id ); + } + + var selected = this._.tabs[ id ]; + selected[ 0 ].addClass( 'cke_dialog_tab_selected' ); + + // [IE] an invisible input[type='text'] will enlarge it's width + // if it's value is long when it shows, so we clear it's value + // before it shows and then recover it (#5649) + if ( CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat ) { + clearOrRecoverTextInputValue( selected[ 1 ] ); + selected[ 1 ].show(); + setTimeout( function() { + clearOrRecoverTextInputValue( selected[ 1 ], 1 ); + }, 0 ); + } else { + selected[ 1 ].show(); + } + + this._.currentTabId = id; + this._.currentTabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, id ); + }, + + /** + * Dialog state-specific style updates. + */ + updateStyle: function() { + // If only a single page shown, a different style is used in the central pane. + this.parts.dialog[ ( this._.pageCount === 1 ? 'add' : 'remove' ) + 'Class' ]( 'cke_single_page' ); + }, + + /** + * Hides a page's tab away from the dialog. + * + * dialog.hidePage( 'tab_3' ); + * + * @param {String} id The page's Id. + */ + hidePage: function( id ) { + var tab = this._.tabs[ id ] && this._.tabs[ id ][ 0 ]; + if ( !tab || this._.pageCount == 1 || !tab.isVisible() ) + return; + // Switch to other tab first when we're hiding the active tab. + else if ( id == this._.currentTabId ) + this.selectPage( getPreviousVisibleTab.call( this ) ); + + tab.hide(); + this._.pageCount--; + this.updateStyle(); + }, + + /** + * Unhides a page's tab. + * + * dialog.showPage( 'tab_2' ); + * + * @param {String} id The page's Id. + */ + showPage: function( id ) { + var tab = this._.tabs[ id ] && this._.tabs[ id ][ 0 ]; + if ( !tab ) + return; + tab.show(); + this._.pageCount++; + this.updateStyle(); + }, + + /** + * Gets the root DOM element of the dialog. + * + * var dialogElement = dialogObj.getElement().getFirst(); + * dialogElement.setStyle( 'padding', '5px' ); + * + * @returns {CKEDITOR.dom.element} The `` element containing this dialog. + */ + getElement: function() { + return this._.element; + }, + + /** + * Gets the name of the dialog. + * + * var dialogName = dialogObj.getName(); + * + * @returns {String} The name of this dialog. + */ + getName: function() { + return this._.name; + }, + + /** + * Gets a dialog UI element object from a dialog page. + * + * dialogObj.getContentElement( 'tabId', 'elementId' ).setValue( 'Example' ); + * + * @param {String} pageId id of dialog page. + * @param {String} elementId id of UI element. + * @returns {CKEDITOR.ui.dialog.uiElement} The dialog UI element. + */ + getContentElement: function( pageId, elementId ) { + var page = this._.contents[ pageId ]; + return page && page[ elementId ]; + }, + + /** + * Gets the value of a dialog UI element. + * + * alert( dialogObj.getValueOf( 'tabId', 'elementId' ) ); + * + * @param {String} pageId id of dialog page. + * @param {String} elementId id of UI element. + * @returns {Object} The value of the UI element. + */ + getValueOf: function( pageId, elementId ) { + return this.getContentElement( pageId, elementId ).getValue(); + }, + + /** + * Sets the value of a dialog UI element. + * + * dialogObj.setValueOf( 'tabId', 'elementId', 'Example' ); + * + * @param {String} pageId id of the dialog page. + * @param {String} elementId id of the UI element. + * @param {Object} value The new value of the UI element. + */ + setValueOf: function( pageId, elementId, value ) { + return this.getContentElement( pageId, elementId ).setValue( value ); + }, + + /** + * Gets the UI element of a button in the dialog's button row. + * + * @returns {CKEDITOR.ui.dialog.button} The button object. + * + * @param {String} id The id of the button. + */ + getButton: function( id ) { + return this._.buttons[ id ]; + }, + + /** + * Simulates a click to a dialog button in the dialog's button row. + * + * @returns The return value of the dialog's `click` event. + * + * @param {String} id The id of the button. + */ + click: function( id ) { + return this._.buttons[ id ].click(); + }, + + /** + * Disables a dialog button. + * + * @param {String} id The id of the button. + */ + disableButton: function( id ) { + return this._.buttons[ id ].disable(); + }, + + /** + * Enables a dialog button. + * + * @param {String} id The id of the button. + */ + enableButton: function( id ) { + return this._.buttons[ id ].enable(); + }, + + /** + * Gets the number of pages in the dialog. + * + * @returns {Number} Page count. + */ + getPageCount: function() { + return this._.pageCount; + }, + + /** + * Gets the editor instance which opened this dialog. + * + * @returns {CKEDITOR.editor} Parent editor instances. + */ + getParentEditor: function() { + return this._.editor; + }, + + /** + * Gets the element that was selected when opening the dialog, if any. + * + * @returns {CKEDITOR.dom.element} The element that was selected, or `null`. + */ + getSelectedElement: function() { + return this.getParentEditor().getSelection().getSelectedElement(); + }, + + /** + * Adds element to dialog's focusable list. + * + * @param {CKEDITOR.dom.element} element + * @param {Number} [index] + */ + addFocusable: function( element, index ) { + if ( typeof index == 'undefined' ) { + index = this._.focusList.length; + this._.focusList.push( new Focusable( this, element, index ) ); + } else { + this._.focusList.splice( index, 0, new Focusable( this, element, index ) ); + for ( var i = index + 1; i < this._.focusList.length; i++ ) + this._.focusList[ i ].focusIndex++; + } + }, + + /** + * Sets the dialog {@link #property-state}. + * + * @since 4.5 + * @param {Number} state Either {@link CKEDITOR#DIALOG_STATE_IDLE} or {@link CKEDITOR#DIALOG_STATE_BUSY}. + */ + setState: function( state ) { + var oldState = this.state; + + if ( oldState == state ) { + return; + } + + this.state = state; + + if ( state == CKEDITOR.DIALOG_STATE_BUSY ) { + // Insert the spinner on demand. + if ( !this.parts.spinner ) { + var dir = this.getParentEditor().lang.dir, + spinnerDef = { + attributes: { + 'class': 'cke_dialog_spinner' + }, + styles: { + 'float': dir == 'rtl' ? 'right' : 'left' + } + }; + + spinnerDef.styles[ 'margin-' + ( dir == 'rtl' ? 'left' : 'right' ) ] = '8px'; + + this.parts.spinner = CKEDITOR.document.createElement( 'div', spinnerDef ); + + this.parts.spinner.setHtml( '⌛' ); + this.parts.spinner.appendTo( this.parts.title, 1 ); + } + + // Finally, show the spinner. + this.parts.spinner.show(); + + this.getButton( 'ok' ).disable(); + } else if ( state == CKEDITOR.DIALOG_STATE_IDLE ) { + // Hide the spinner. But don't do anything if there is no spinner yet. + this.parts.spinner && this.parts.spinner.hide(); + + this.getButton( 'ok' ).enable(); + } + + this.fire( 'state', state ); + } + }; + + CKEDITOR.tools.extend( CKEDITOR.dialog, { + /** + * Registers a dialog. + * + * // Full sample plugin, which does not only register a dialog window but also adds an item to the context menu. + * // To open the dialog window, choose "Open dialog" in the context menu. + * CKEDITOR.plugins.add( 'myplugin', { + * init: function( editor ) { + * editor.addCommand( 'mydialog',new CKEDITOR.dialogCommand( 'mydialog' ) ); + * + * if ( editor.contextMenu ) { + * editor.addMenuGroup( 'mygroup', 10 ); + * editor.addMenuItem( 'My Dialog', { + * label: 'Open dialog', + * command: 'mydialog', + * group: 'mygroup' + * } ); + * editor.contextMenu.addListener( function( element ) { + * return { 'My Dialog': CKEDITOR.TRISTATE_OFF }; + * } ); + * } + * + * CKEDITOR.dialog.add( 'mydialog', function( api ) { + * // CKEDITOR.dialog.definition + * var dialogDefinition = { + * title: 'Sample dialog', + * minWidth: 390, + * minHeight: 130, + * contents: [ + * { + * id: 'tab1', + * label: 'Label', + * title: 'Title', + * expand: true, + * padding: 0, + * elements: [ + * { + * type: 'html', + * html: '

This is some sample HTML content.

' + * }, + * { + * type: 'textarea', + * id: 'textareaId', + * rows: 4, + * cols: 40 + * } + * ] + * } + * ], + * buttons: [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ], + * onOk: function() { + * // "this" is now a CKEDITOR.dialog object. + * // Accessing dialog elements: + * var textareaObj = this.getContentElement( 'tab1', 'textareaId' ); + * alert( "You have entered: " + textareaObj.getValue() ); + * } + * }; + * + * return dialogDefinition; + * } ); + * } + * } ); + * + * CKEDITOR.replace( 'editor1', { extraPlugins: 'myplugin' } ); + * + * @static + * @param {String} name The dialog's name. + * @param {Function/String} dialogDefinition + * A function returning the dialog's definition, or the URL to the `.js` file holding the function. + * The function should accept an argument `editor` which is the current editor instance, and + * return an object conforming to {@link CKEDITOR.dialog.definition}. + * @see CKEDITOR.dialog.definition + */ + add: function( name, dialogDefinition ) { + // Avoid path registration from multiple instances override definition. + if ( !this._.dialogDefinitions[ name ] || typeof dialogDefinition == 'function' ) + this._.dialogDefinitions[ name ] = dialogDefinition; + }, + + /** + * @static + * @todo + */ + exists: function( name ) { + return !!this._.dialogDefinitions[ name ]; + }, + + /** + * @static + * @todo + */ + getCurrent: function() { + return CKEDITOR.dialog._.currentTop; + }, + + /** + * Check whether tab wasn't removed by {@link CKEDITOR.config#removeDialogTabs}. + * + * @since 4.1 + * @static + * @param {CKEDITOR.editor} editor + * @param {String} dialogName + * @param {String} tabName + * @returns {Boolean} + */ + isTabEnabled: function( editor, dialogName, tabName ) { + var cfg = editor.config.removeDialogTabs; + + return !( cfg && cfg.match( new RegExp( '(?:^|;)' + dialogName + ':' + tabName + '(?:$|;)', 'i' ) ) ); + }, + + /** + * The default OK button for dialogs. Fires the `ok` event and closes the dialog if the event succeeds. + * + * @static + * @method + */ + okButton: ( function() { + var retval = function( editor, override ) { + override = override || {}; + return CKEDITOR.tools.extend( { + id: 'ok', + type: 'button', + label: editor.lang.common.ok, + 'class': 'cke_dialog_ui_button_ok', + onClick: function( evt ) { + var dialog = evt.data.dialog; + if ( dialog.fire( 'ok', { hide: true } ).hide !== false ) + dialog.hide(); + } + }, override, true ); + }; + retval.type = 'button'; + retval.override = function( override ) { + return CKEDITOR.tools.extend( function( editor ) { + return retval( editor, override ); + }, { type: 'button' }, true ); + }; + return retval; + } )(), + + /** + * The default cancel button for dialogs. Fires the `cancel` event and + * closes the dialog if no UI element value changed. + * + * @static + * @method + */ + cancelButton: ( function() { + var retval = function( editor, override ) { + override = override || {}; + return CKEDITOR.tools.extend( { + id: 'cancel', + type: 'button', + label: editor.lang.common.cancel, + 'class': 'cke_dialog_ui_button_cancel', + onClick: function( evt ) { + var dialog = evt.data.dialog; + if ( dialog.fire( 'cancel', { hide: true } ).hide !== false ) + dialog.hide(); + } + }, override, true ); + }; + retval.type = 'button'; + retval.override = function( override ) { + return CKEDITOR.tools.extend( function( editor ) { + return retval( editor, override ); + }, { type: 'button' }, true ); + }; + return retval; + } )(), + + /** + * Registers a dialog UI element. + * + * @static + * @param {String} typeName The name of the UI element. + * @param {Function} builder The function to build the UI element. + */ + addUIElement: function( typeName, builder ) { + this._.uiElementBuilders[ typeName ] = builder; + } + } ); + + CKEDITOR.dialog._ = { + uiElementBuilders: {}, + + dialogDefinitions: {}, + + currentTop: null, + + currentZIndex: null + }; + + // "Inherit" (copy actually) from CKEDITOR.event. + CKEDITOR.event.implementOn( CKEDITOR.dialog ); + CKEDITOR.event.implementOn( CKEDITOR.dialog.prototype ); + + var defaultDialogDefinition = { + resizable: CKEDITOR.DIALOG_RESIZE_BOTH, + minWidth: 600, + minHeight: 400, + buttons: [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ] + }; + + // Tool function used to return an item from an array based on its id + // property. + var getById = function( array, id, recurse ) { + for ( var i = 0, item; + ( item = array[ i ] ); i++ ) { + if ( item.id == id ) + return item; + if ( recurse && item[ recurse ] ) { + var retval = getById( item[ recurse ], id, recurse ); + if ( retval ) + return retval; + } + } + return null; + }; + + // Tool function used to add an item into an array. + var addById = function( array, newItem, nextSiblingId, recurse, nullIfNotFound ) { + if ( nextSiblingId ) { + for ( var i = 0, item; + ( item = array[ i ] ); i++ ) { + if ( item.id == nextSiblingId ) { + array.splice( i, 0, newItem ); + return newItem; + } + + if ( recurse && item[ recurse ] ) { + var retval = addById( item[ recurse ], newItem, nextSiblingId, recurse, true ); + if ( retval ) + return retval; + } + } + + if ( nullIfNotFound ) + return null; + } + + array.push( newItem ); + return newItem; + }; + + // Tool function used to remove an item from an array based on its id. + var removeById = function( array, id, recurse ) { + for ( var i = 0, item; + ( item = array[ i ] ); i++ ) { + if ( item.id == id ) + return array.splice( i, 1 ); + if ( recurse && item[ recurse ] ) { + var retval = removeById( item[ recurse ], id, recurse ); + if ( retval ) + return retval; + } + } + return null; + }; + + /** + * This class is not really part of the API. It is the `definition` property value + * passed to `dialogDefinition` event handlers. + * + * CKEDITOR.on( 'dialogDefinition', function( evt ) { + * var definition = evt.data.definition; + * var content = definition.getContents( 'page1' ); + * // ... + * } ); + * + * @private + * @class CKEDITOR.dialog.definitionObject + * @extends CKEDITOR.dialog.definition + * @constructor Creates a definitionObject class instance. + */ + var definitionObject = function( dialog, dialogDefinition ) { + // TODO : Check if needed. + this.dialog = dialog; + + // Transform the contents entries in contentObjects. + var contents = dialogDefinition.contents; + for ( var i = 0, content; + ( content = contents[ i ] ); i++ ) + contents[ i ] = content && new contentObject( dialog, content ); + + CKEDITOR.tools.extend( this, dialogDefinition ); + }; + + definitionObject.prototype = { + /** + * Gets a content definition. + * + * @param {String} id The id of the content definition. + * @returns {CKEDITOR.dialog.definition.content} The content definition matching id. + */ + getContents: function( id ) { + return getById( this.contents, id ); + }, + + /** + * Gets a button definition. + * + * @param {String} id The id of the button definition. + * @returns {CKEDITOR.dialog.definition.button} The button definition matching id. + */ + getButton: function( id ) { + return getById( this.buttons, id ); + }, + + /** + * Adds a content definition object under this dialog definition. + * + * @param {CKEDITOR.dialog.definition.content} contentDefinition The + * content definition. + * @param {String} [nextSiblingId] The id of an existing content + * definition which the new content definition will be inserted + * before. Omit if the new content definition is to be inserted as + * the last item. + * @returns {CKEDITOR.dialog.definition.content} The inserted content definition. + */ + addContents: function( contentDefinition, nextSiblingId ) { + return addById( this.contents, contentDefinition, nextSiblingId ); + }, + + /** + * Adds a button definition object under this dialog definition. + * + * @param {CKEDITOR.dialog.definition.button} buttonDefinition The + * button definition. + * @param {String} [nextSiblingId] The id of an existing button + * definition which the new button definition will be inserted + * before. Omit if the new button definition is to be inserted as + * the last item. + * @returns {CKEDITOR.dialog.definition.button} The inserted button definition. + */ + addButton: function( buttonDefinition, nextSiblingId ) { + return addById( this.buttons, buttonDefinition, nextSiblingId ); + }, + + /** + * Removes a content definition from this dialog definition. + * + * @param {String} id The id of the content definition to be removed. + * @returns {CKEDITOR.dialog.definition.content} The removed content definition. + */ + removeContents: function( id ) { + removeById( this.contents, id ); + }, + + /** + * Removes a button definition from the dialog definition. + * + * @param {String} id The id of the button definition to be removed. + * @returns {CKEDITOR.dialog.definition.button} The removed button definition. + */ + removeButton: function( id ) { + removeById( this.buttons, id ); + } + }; + + /** + * This class is not really part of the API. It is the template of the + * objects representing content pages inside the + * CKEDITOR.dialog.definitionObject. + * + * CKEDITOR.on( 'dialogDefinition', function( evt ) { + * var definition = evt.data.definition; + * var content = definition.getContents( 'page1' ); + * content.remove( 'textInput1' ); + * // ... + * } ); + * + * @private + * @class CKEDITOR.dialog.definition.contentObject + * @constructor Creates a contentObject class instance. + */ + function contentObject( dialog, contentDefinition ) { + this._ = { + dialog: dialog + }; + + CKEDITOR.tools.extend( this, contentDefinition ); + } + + contentObject.prototype = { + /** + * Gets a UI element definition under the content definition. + * + * @param {String} id The id of the UI element definition. + * @returns {CKEDITOR.dialog.definition.uiElement} + */ + get: function( id ) { + return getById( this.elements, id, 'children' ); + }, + + /** + * Adds a UI element definition to the content definition. + * + * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition The + * UI elemnet definition to be added. + * @param {String} nextSiblingId The id of an existing UI element + * definition which the new UI element definition will be inserted + * before. Omit if the new button definition is to be inserted as + * the last item. + * @returns {CKEDITOR.dialog.definition.uiElement} The element definition inserted. + */ + add: function( elementDefinition, nextSiblingId ) { + return addById( this.elements, elementDefinition, nextSiblingId, 'children' ); + }, + + /** + * Removes a UI element definition from the content definition. + * + * @param {String} id The id of the UI element definition to be removed. + * @returns {CKEDITOR.dialog.definition.uiElement} The element definition removed. + */ + remove: function( id ) { + removeById( this.elements, id, 'children' ); + } + }; + + function initDragAndDrop( dialog ) { + var lastCoords = null, + abstractDialogCoords = null, + editor = dialog.getParentEditor(), + magnetDistance = editor.config.dialog_magnetDistance, + margins = CKEDITOR.skin.margins || [ 0, 0, 0, 0 ]; + + if ( typeof magnetDistance == 'undefined' ) + magnetDistance = 20; + + function mouseMoveHandler( evt ) { + var dialogSize = dialog.getSize(), + viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize(), + x = evt.originalEvent.screenX, + y = evt.originalEvent.screenY, + dx = x - lastCoords.x, + dy = y - lastCoords.y, + realX, realY; + + lastCoords = { x: x, y: y }; + abstractDialogCoords.x += dx; + abstractDialogCoords.y += dy; + + if ( abstractDialogCoords.x + margins[ 3 ] < magnetDistance ) + realX = -margins[ 3 ]; + else if ( abstractDialogCoords.x - margins[ 1 ] > viewPaneSize.width - dialogSize.width - magnetDistance ) + realX = viewPaneSize.width - dialogSize.width + ( editor.lang.dir == 'rtl' ? 0 : margins[ 1 ] ); + else + realX = abstractDialogCoords.x; + + if ( abstractDialogCoords.y + margins[ 0 ] < magnetDistance ) + realY = -margins[ 0 ]; + else if ( abstractDialogCoords.y - margins[ 2 ] > viewPaneSize.height - dialogSize.height - magnetDistance ) + realY = viewPaneSize.height - dialogSize.height + margins[ 2 ]; + else + realY = abstractDialogCoords.y; + + dialog.move( realX, realY, 1 ); + + evt.preventDefault(); + } + + function mouseUpHandler() { + CMS.$(CKEDITOR.document.$).off( 'pointermove', mouseMoveHandler ); + CMS.$(CKEDITOR.document.$).off( 'pointerup', mouseUpHandler ); + + if ( CKEDITOR.env.ie6Compat ) { + var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); + coverDoc.removeListener( 'mousemove', mouseMoveHandler ); + coverDoc.removeListener( 'mouseup', mouseUpHandler ); + } + } + + CMS.$(dialog.parts.title.$).on( 'pointerdown', function( evt ) { + lastCoords = { x: evt.originalEvent.screenX, y: evt.originalEvent.screenY }; + + CMS.$(CKEDITOR.document.$).on( 'pointermove', mouseMoveHandler ); + CMS.$(CKEDITOR.document.$).on( 'pointerup', mouseUpHandler ); + abstractDialogCoords = dialog.getPosition(); + + if ( CKEDITOR.env.ie6Compat ) { + var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); + coverDoc.on( 'mousemove', mouseMoveHandler ); + coverDoc.on( 'mouseup', mouseUpHandler ); + } + + evt.preventDefault(); + }); + } + + function initResizeHandles( dialog ) { + var def = dialog.definition, + resizable = def.resizable; + + if ( resizable == CKEDITOR.DIALOG_RESIZE_NONE ) + return; + + var editor = dialog.getParentEditor(); + var wrapperWidth, wrapperHeight, viewSize, origin, startSize, dialogCover; + + var mouseDownFn = CKEDITOR.tools.addFunction( function( $event ) { + startSize = dialog.getSize(); + + var content = dialog.parts.contents, + iframeDialog = content.$.getElementsByTagName( 'iframe' ).length; + + // Shim to help capturing "mousemove" over iframe. + if ( iframeDialog ) { + CMS.$('.cke_dialog_resize_cover').remove(); + dialogCover = CKEDITOR.dom.element.createFromHtml( '
' ); + content.append( dialogCover ); + } + + // Calculate the offset between content and chrome size. + wrapperHeight = startSize.height - dialog.parts.contents.getSize( 'height', !( CKEDITOR.env.gecko || CKEDITOR.env.ie && CKEDITOR.env.quirks ) ); + wrapperWidth = startSize.width - dialog.parts.contents.getSize( 'width', 1 ); + + origin = { x: $event.screenX, y: $event.screenY }; + + viewSize = CKEDITOR.document.getWindow().getViewPaneSize(); + + CMS.$(CKEDITOR.document.$).on( 'pointermove', mouseMoveHandler ); + CMS.$(CKEDITOR.document.$).on( 'pointerup', mouseUpHandler ); + + if ( CKEDITOR.env.ie6Compat ) { + var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); + coverDoc.on( 'mousemove', mouseMoveHandler ); + coverDoc.on( 'mouseup', mouseUpHandler ); + } + + $event.preventDefault && $event.preventDefault(); + } ); + + // Prepend the grip to the dialog. + dialog.on( 'load', function() { + var direction = ''; + if ( resizable == CKEDITOR.DIALOG_RESIZE_WIDTH ) + direction = ' cke_resizer_horizontal'; + else if ( resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT ) + direction = ' cke_resizer_vertical'; + var resizer = CKEDITOR.dom.element.createFromHtml( + '' + + // BLACK LOWER RIGHT TRIANGLE (ltr) + // BLACK LOWER LEFT TRIANGLE (rtl) + ( editor.lang.dir == 'ltr' ? '\u25E2' : '\u25E3' ) + + '
' ); + dialog.parts.footer.append( resizer, 1 ); + } ); + editor.on( 'destroy', function() { + CKEDITOR.tools.removeFunction( mouseDownFn ); + } ); + + function mouseMoveHandler( evt ) { + var rtl = editor.lang.dir == 'rtl', + dx = ( evt.originalEvent.screenX - origin.x ) * ( rtl ? -1 : 1 ), + dy = evt.originalEvent.screenY - origin.y, + width = startSize.width, + height = startSize.height, + internalWidth = width + dx * ( dialog._.moved ? 1 : 2 ), + internalHeight = height + dy * ( dialog._.moved ? 1 : 2 ), + element = dialog._.element.getFirst(), + right = rtl && element.getComputedStyle( 'right' ), + position = dialog.getPosition(); + + if ( position.y + internalHeight > viewSize.height ) + internalHeight = viewSize.height - position.y; + + if ( ( rtl ? right : position.x ) + internalWidth > viewSize.width ) + internalWidth = viewSize.width - ( rtl ? right : position.x ); + + // Make sure the dialog will not be resized to the wrong side when it's in the leftmost position for RTL. + if ( ( resizable == CKEDITOR.DIALOG_RESIZE_WIDTH || resizable == CKEDITOR.DIALOG_RESIZE_BOTH ) ) + width = Math.max( def.minWidth || 0, internalWidth - wrapperWidth ); + + if ( resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT || resizable == CKEDITOR.DIALOG_RESIZE_BOTH ) + height = Math.max( def.minHeight || 0, internalHeight - wrapperHeight ); + + dialog.resize( width, height ); + + if ( !dialog._.moved ) + dialog.layout(); + + evt.preventDefault(); + } + + function mouseUpHandler() { + CMS.$(CKEDITOR.document.$).off( 'pointermove', mouseMoveHandler ); + CMS.$(CKEDITOR.document.$).off( 'pointerup', mouseUpHandler ); + + if ( dialogCover ) { + dialogCover.remove(); + dialogCover = null; + } + + if ( CKEDITOR.env.ie6Compat ) { + var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); + coverDoc.removeListener( 'mouseup', mouseUpHandler ); + coverDoc.removeListener( 'mousemove', mouseMoveHandler ); + } + } + } + + var resizeCover; + // Caching resuable covers and allowing only one cover + // on screen. + var covers = {}, + currentCover; + + function cancelEvent( ev ) { + ev.data.preventDefault( 1 ); + } + + function showCover( editor ) { + var win = CKEDITOR.document.getWindow(); + var config = editor.config, + backgroundColorStyle = config.dialog_backgroundCoverColor || 'white', + backgroundCoverOpacity = config.dialog_backgroundCoverOpacity, + baseFloatZIndex = config.baseFloatZIndex, + coverKey = CKEDITOR.tools.genKey( backgroundColorStyle, backgroundCoverOpacity, baseFloatZIndex ), + coverElement = covers[ coverKey ]; + + CMS.$('.cke_dialog_background_cover:not(.cms-ckeditor-dialog-background-cover)').remove(); + if ( !coverElement ) { + covers = {}; + var html = [ + '
' + ]; + + if ( CKEDITOR.env.ie6Compat ) { + // Support for custom document.domain in IE. + var iframeHtml = ''; + + html.push( '' + + '' ); + } + + html.push( '
' ); + + coverElement = CKEDITOR.dom.element.createFromHtml( html.join( '' ) ); + coverElement.setOpacity( backgroundCoverOpacity !== undefined ? backgroundCoverOpacity : 0.5 ); + + coverElement.on( 'keydown', cancelEvent ); + coverElement.on( 'keypress', cancelEvent ); + coverElement.on( 'keyup', cancelEvent ); + + coverElement.appendTo( CKEDITOR.document.getBody() ); + covers[ coverKey ] = coverElement; + } else { + coverElement.show(); + } + + // Makes the dialog cover a focus holder as well. + editor.focusManager.add( coverElement ); + + currentCover = coverElement; + var resizeFunc = function() { + var size = win.getViewPaneSize(); + coverElement.setStyles( { + width: size.width + 'px', + height: size.height + 'px' + } ); + }; + + var scrollFunc = function() { + var pos = win.getScrollPosition(), + cursor = CKEDITOR.dialog._.currentTop; + coverElement.setStyles( { + left: pos.x + 'px', + top: pos.y + 'px' + } ); + + if ( cursor ) { + do { + var dialogPos = cursor.getPosition(); + cursor.move( dialogPos.x, dialogPos.y ); + } while ( ( cursor = cursor._.parentDialog ) ); + } + }; + + resizeCover = resizeFunc; + win.on( 'resize', resizeFunc ); + resizeFunc(); + // Using Safari/Mac, focus must be kept where it is (#7027) + if ( !( CKEDITOR.env.mac && CKEDITOR.env.webkit ) ) + coverElement.focus(); + + if ( CKEDITOR.env.ie6Compat ) { + // IE BUG: win.$.onscroll assignment doesn't work.. it must be window.onscroll. + // So we need to invent a really funny way to make it work. + var myScrollHandler = function() { + scrollFunc(); + arguments.callee.prevScrollHandler.apply( this, arguments ); + }; + win.$.setTimeout( function() { + myScrollHandler.prevScrollHandler = window.onscroll || + function() {}; + window.onscroll = myScrollHandler; + }, 0 ); + scrollFunc(); + } + } + + function hideCover( editor ) { + CMS.$('.cke_dialog_background_cover:not(.cms-ckeditor-dialog-background-cover)').remove(); + if ( !currentCover ) + return; + + editor.focusManager.remove( currentCover ); + var win = CKEDITOR.document.getWindow(); + currentCover.hide(); + win.removeListener( 'resize', resizeCover ); + + if ( CKEDITOR.env.ie6Compat ) { + win.$.setTimeout( function() { + var prevScrollHandler = window.onscroll && window.onscroll.prevScrollHandler; + window.onscroll = prevScrollHandler || null; + }, 0 ); + } + resizeCover = null; + } + + function removeCovers() { + for ( var coverId in covers ) + covers[ coverId ].remove(); + covers = {}; + } + + var accessKeyProcessors = {}; + + var accessKeyDownHandler = function( evt ) { + var ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey, + alt = evt.data.$.altKey, + shift = evt.data.$.shiftKey, + key = String.fromCharCode( evt.data.$.keyCode ), + keyProcessor = accessKeyProcessors[ ( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '' ) + ( shift ? 'SHIFT+' : '' ) + key ]; + + if ( !keyProcessor || !keyProcessor.length ) + return; + + keyProcessor = keyProcessor[ keyProcessor.length - 1 ]; + keyProcessor.keydown && keyProcessor.keydown.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key ); + evt.data.preventDefault(); + }; + + var accessKeyUpHandler = function( evt ) { + var ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey, + alt = evt.data.$.altKey, + shift = evt.data.$.shiftKey, + key = String.fromCharCode( evt.data.$.keyCode ), + keyProcessor = accessKeyProcessors[ ( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '' ) + ( shift ? 'SHIFT+' : '' ) + key ]; + + if ( !keyProcessor || !keyProcessor.length ) + return; + + keyProcessor = keyProcessor[ keyProcessor.length - 1 ]; + if ( keyProcessor.keyup ) { + keyProcessor.keyup.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key ); + evt.data.preventDefault(); + } + }; + + var registerAccessKey = function( uiElement, dialog, key, downFunc, upFunc ) { + var procList = accessKeyProcessors[ key ] || ( accessKeyProcessors[ key ] = [] ); + procList.push( { + uiElement: uiElement, + dialog: dialog, + key: key, + keyup: upFunc || uiElement.accessKeyUp, + keydown: downFunc || uiElement.accessKeyDown + } ); + }; + + var unregisterAccessKey = function( obj ) { + for ( var i in accessKeyProcessors ) { + var list = accessKeyProcessors[ i ]; + for ( var j = list.length - 1; j >= 0; j-- ) { + if ( list[ j ].dialog == obj || list[ j ].uiElement == obj ) + list.splice( j, 1 ); + } + if ( list.length === 0 ) + delete accessKeyProcessors[ i ]; + } + }; + + var tabAccessKeyUp = function( dialog, key ) { + if ( dialog._.accessKeyMap[ key ] ) + dialog.selectPage( dialog._.accessKeyMap[ key ] ); + }; + + var tabAccessKeyDown = function() {}; + + ( function() { + CKEDITOR.ui.dialog = { + /** + * The base class of all dialog UI elements. + * + * @class CKEDITOR.ui.dialog.uiElement + * @constructor Creates a uiElement class instance. + * @param {CKEDITOR.dialog} dialog Parent dialog object. + * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition Element + * definition. + * + * Accepted fields: + * + * * `id` (Required) The id of the UI element. See {@link CKEDITOR.dialog#getContentElement}. + * * `type` (Required) The type of the UI element. The + * value to this field specifies which UI element class will be used to + * generate the final widget. + * * `title` (Optional) The popup tooltip for the UI + * element. + * * `hidden` (Optional) A flag that tells if the element + * should be initially visible. + * * `className` (Optional) Additional CSS class names + * to add to the UI element. Separated by space. + * * `style` (Optional) Additional CSS inline styles + * to add to the UI element. A semicolon (;) is required after the last + * style declaration. + * * `accessKey` (Optional) The alphanumeric access key + * for this element. Access keys are automatically prefixed by CTRL. + * * `on*` (Optional) Any UI element definition field that + * starts with `on` followed immediately by a capital letter and + * probably more letters is an event handler. Event handlers may be further + * divided into registered event handlers and DOM event handlers. Please + * refer to {@link CKEDITOR.ui.dialog.uiElement#registerEvents} and + * {@link CKEDITOR.ui.dialog.uiElement#eventProcessors} for more information. + * + * @param {Array} htmlList + * List of HTML code to be added to the dialog's content area. + * @param {Function/String} [nodeNameArg='div'] + * A function returning a string, or a simple string for the node name for + * the root DOM node. + * @param {Function/Object} [stylesArg={}] + * A function returning an object, or a simple object for CSS styles applied + * to the DOM node. + * @param {Function/Object} [attributesArg={}] + * A fucntion returning an object, or a simple object for attributes applied + * to the DOM node. + * @param {Function/String} [contentsArg=''] + * A function returning a string, or a simple string for the HTML code inside + * the root DOM node. Default is empty string. + */ + uiElement: function( dialog, elementDefinition, htmlList, nodeNameArg, stylesArg, attributesArg, contentsArg ) { + if ( arguments.length < 4 ) + return; + + var nodeName = ( nodeNameArg.call ? nodeNameArg( elementDefinition ) : nodeNameArg ) || 'div', + html = [ '<', nodeName, ' ' ], + styles = ( stylesArg && stylesArg.call ? stylesArg( elementDefinition ) : stylesArg ) || {}, + attributes = ( attributesArg && attributesArg.call ? attributesArg( elementDefinition ) : attributesArg ) || {}, + innerHTML = ( contentsArg && contentsArg.call ? contentsArg.call( this, dialog, elementDefinition ) : contentsArg ) || '', + domId = this.domId = attributes.id || CKEDITOR.tools.getNextId() + '_uiElement', + i; + + if ( elementDefinition.requiredContent && !dialog.getParentEditor().filter.check( elementDefinition.requiredContent ) ) { + styles.display = 'none'; + this.notAllowed = true; + } + + // Set the id, a unique id is required for getElement() to work. + attributes.id = domId; + + // Set the type and definition CSS class names. + var classes = {}; + if ( elementDefinition.type ) + classes[ 'cke_dialog_ui_' + elementDefinition.type ] = 1; + if ( elementDefinition.className ) + classes[ elementDefinition.className ] = 1; + if ( elementDefinition.disabled ) + classes.cke_disabled = 1; + + var attributeClasses = ( attributes[ 'class' ] && attributes[ 'class' ].split ) ? attributes[ 'class' ].split( ' ' ) : []; + for ( i = 0; i < attributeClasses.length; i++ ) { + if ( attributeClasses[ i ] ) + classes[ attributeClasses[ i ] ] = 1; + } + var finalClasses = []; + for ( i in classes ) + finalClasses.push( i ); + attributes[ 'class' ] = finalClasses.join( ' ' ); + + // Set the popup tooltop. + if ( elementDefinition.title ) + attributes.title = elementDefinition.title; + + // Write the inline CSS styles. + var styleStr = ( elementDefinition.style || '' ).split( ';' ); + + // Element alignment support. + if ( elementDefinition.align ) { + var align = elementDefinition.align; + styles[ 'margin-left' ] = align == 'left' ? 0 : 'auto'; + styles[ 'margin-right' ] = align == 'right' ? 0 : 'auto'; + } + + for ( i in styles ) + styleStr.push( i + ':' + styles[ i ] ); + if ( elementDefinition.hidden ) + styleStr.push( 'display:none' ); + for ( i = styleStr.length - 1; i >= 0; i-- ) { + if ( styleStr[ i ] === '' ) + styleStr.splice( i, 1 ); + } + if ( styleStr.length > 0 ) + attributes.style = ( attributes.style ? ( attributes.style + '; ' ) : '' ) + styleStr.join( '; ' ); + + // Write the attributes. + for ( i in attributes ) + html.push( i + '="' + CKEDITOR.tools.htmlEncode( attributes[ i ] ) + '" ' ); + + // Write the content HTML. + html.push( '>', innerHTML, '' ); + + // Add contents to the parent HTML array. + htmlList.push( html.join( '' ) ); + + ( this._ || ( this._ = {} ) ).dialog = dialog; + + // Override isChanged if it is defined in element definition. + if ( typeof elementDefinition.isChanged == 'boolean' ) + this.isChanged = function() { + return elementDefinition.isChanged; + }; + if ( typeof elementDefinition.isChanged == 'function' ) + this.isChanged = elementDefinition.isChanged; + + // Overload 'get(set)Value' on definition. + if ( typeof elementDefinition.setValue == 'function' ) { + this.setValue = CKEDITOR.tools.override( this.setValue, function( org ) { + return function( val ) { + org.call( this, elementDefinition.setValue.call( this, val ) ); + }; + } ); + } + + if ( typeof elementDefinition.getValue == 'function' ) { + this.getValue = CKEDITOR.tools.override( this.getValue, function( org ) { + return function() { + return elementDefinition.getValue.call( this, org.call( this ) ); + }; + } ); + } + + // Add events. + CKEDITOR.event.implementOn( this ); + + this.registerEvents( elementDefinition ); + if ( this.accessKeyUp && this.accessKeyDown && elementDefinition.accessKey ) + registerAccessKey( this, dialog, 'CTRL+' + elementDefinition.accessKey ); + + var me = this; + dialog.on( 'load', function() { + var input = me.getInputElement(); + if ( input ) { + var focusClass = me.type in { 'checkbox': 1, 'ratio': 1 } && CKEDITOR.env.ie && CKEDITOR.env.version < 8 ? 'cke_dialog_ui_focused' : ''; + input.on( 'focus', function() { + dialog._.tabBarMode = false; + dialog._.hasFocus = true; + me.fire( 'focus' ); + focusClass && this.addClass( focusClass ); + + } ); + + input.on( 'blur', function() { + me.fire( 'blur' ); + focusClass && this.removeClass( focusClass ); + } ); + } + } ); + + // Completes this object with everything we have in the + // definition. + CKEDITOR.tools.extend( this, elementDefinition ); + + // Register the object as a tab focus if it can be included. + if ( this.keyboardFocusable ) { + this.tabIndex = elementDefinition.tabIndex || 0; + + this.focusIndex = dialog._.focusList.push( this ) - 1; + this.on( 'focus', function() { + dialog._.currentFocusIndex = me.focusIndex; + } ); + } + }, + + /** + * Horizontal layout box for dialog UI elements, auto-expends to available width of container. + * + * @class CKEDITOR.ui.dialog.hbox + * @extends CKEDITOR.ui.dialog.uiElement + * @constructor Creates a hbox class instance. + * @param {CKEDITOR.dialog} dialog Parent dialog object. + * @param {Array} childObjList + * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this container. + * @param {Array} childHtmlList + * Array of HTML code that correspond to the HTML output of all the + * objects in childObjList. + * @param {Array} htmlList + * Array of HTML code that this element will output to. + * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition + * The element definition. Accepted fields: + * + * * `widths` (Optional) The widths of child cells. + * * `height` (Optional) The height of the layout. + * * `padding` (Optional) The padding width inside child cells. + * * `align` (Optional) The alignment of the whole layout. + */ + hbox: function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) { + if ( arguments.length < 4 ) + return; + + this._ || ( this._ = {} ); + + var children = this._.children = childObjList, + widths = elementDefinition && elementDefinition.widths || null, + height = elementDefinition && elementDefinition.height || null, + styles = {}, + i; + /** @ignore */ + var innerHTML = function() { + var html = [ '' ]; + for ( i = 0; i < childHtmlList.length; i++ ) { + var className = 'cke_dialog_ui_hbox_child', + styles = []; + if ( i === 0 ) { + className = 'cke_dialog_ui_hbox_first'; + } + if ( i == childHtmlList.length - 1 ) { + className = 'cke_dialog_ui_hbox_last'; + } + + html.push( ' 0 ) { + html.push( 'style="' + styles.join( '; ' ) + '" ' ); + } + html.push( '>', childHtmlList[ i ], '' ); + } + html.push( '' ); + return html.join( '' ); + }; + + var attribs = { role: 'presentation' }; + elementDefinition && elementDefinition.align && ( attribs.align = elementDefinition.align ); + + CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type: 'hbox' }, htmlList, 'table', styles, attribs, innerHTML ); + }, + + /** + * Vertical layout box for dialog UI elements. + * + * @class CKEDITOR.ui.dialog.vbox + * @extends CKEDITOR.ui.dialog.hbox + * @constructor Creates a vbox class instance. + * @param {CKEDITOR.dialog} dialog Parent dialog object. + * @param {Array} childObjList + * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this container. + * @param {Array} childHtmlList + * Array of HTML code that correspond to the HTML output of all the + * objects in childObjList. + * @param {Array} htmlList Array of HTML code that this element will output to. + * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition + * The element definition. Accepted fields: + * + * * `width` (Optional) The width of the layout. + * * `heights` (Optional) The heights of individual cells. + * * `align` (Optional) The alignment of the layout. + * * `padding` (Optional) The padding width inside child cells. + * * `expand` (Optional) Whether the layout should expand + * vertically to fill its container. + */ + vbox: function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) { + if ( arguments.length < 3 ) + return; + + this._ || ( this._ = {} ); + + var children = this._.children = childObjList, + width = elementDefinition && elementDefinition.width || null, + heights = elementDefinition && elementDefinition.heights || null; + /** @ignore */ + var innerHTML = function() { + var html = [ '' ); + for ( var i = 0; i < childHtmlList.length; i++ ) { + var styles = []; + html.push( '' ); + } + html.push( '
0 ) + html.push( 'style="', styles.join( '; ' ), '" ' ); + html.push( ' class="cke_dialog_ui_vbox_child">', childHtmlList[ i ], '
' ); + return html.join( '' ); + }; + CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type: 'vbox' }, htmlList, 'div', null, { role: 'presentation' }, innerHTML ); + } + }; + } )(); + + /** @class CKEDITOR.ui.dialog.uiElement */ + CKEDITOR.ui.dialog.uiElement.prototype = { + /** + * Gets the root DOM element of this dialog UI object. + * + * uiElement.getElement().hide(); + * + * @returns {CKEDITOR.dom.element} Root DOM element of UI object. + */ + getElement: function() { + return CKEDITOR.document.getById( this.domId ); + }, + + /** + * Gets the DOM element that the user inputs values. + * + * This function is used by {@link #setValue}, {@link #getValue} and {@link #focus}. It should + * be overrided in child classes where the input element isn't the root + * element. + * + * var rawValue = textInput.getInputElement().$.value; + * + * @returns {CKEDITOR.dom.element} The element where the user input values. + */ + getInputElement: function() { + return this.getElement(); + }, + + /** + * Gets the parent dialog object containing this UI element. + * + * var dialog = uiElement.getDialog(); + * + * @returns {CKEDITOR.dialog} Parent dialog object. + */ + getDialog: function() { + return this._.dialog; + }, + + /** + * Sets the value of this dialog UI object. + * + * uiElement.setValue( 'Dingo' ); + * + * @chainable + * @param {Object} value The new value. + * @param {Boolean} noChangeEvent Internal commit, to supress `change` event on this element. + */ + setValue: function( value, noChangeEvent ) { + this.getInputElement().setValue( value ); + !noChangeEvent && this.fire( 'change', { value: value } ); + return this; + }, + + /** + * Gets the current value of this dialog UI object. + * + * var myValue = uiElement.getValue(); + * + * @returns {Object} The current value. + */ + getValue: function() { + return this.getInputElement().getValue(); + }, + + /** + * Tells whether the UI object's value has changed. + * + * if ( uiElement.isChanged() ) + * confirm( 'Value changed! Continue?' ); + * + * @returns {Boolean} `true` if changed, `false` if not changed. + */ + isChanged: function() { + // Override in input classes. + return false; + }, + + /** + * Selects the parent tab of this element. Usually called by focus() or overridden focus() methods. + * + * focus : function() { + * this.selectParentTab(); + * // do something else. + * } + * + * @chainable + */ + selectParentTab: function() { + var element = this.getInputElement(), + cursor = element, + tabId; + while ( ( cursor = cursor.getParent() ) && cursor.$.className.search( 'cke_dialog_page_contents' ) == -1 ) { + + } + + // Some widgets don't have parent tabs (e.g. OK and Cancel buttons). + if ( !cursor ) + return this; + + tabId = cursor.getAttribute( 'name' ); + // Avoid duplicate select. + if ( this._.dialog._.currentTabId != tabId ) + this._.dialog.selectPage( tabId ); + return this; + }, + + /** + * Puts the focus to the UI object. Switches tabs if the UI object isn't in the active tab page. + * + * uiElement.focus(); + * + * @chainable + */ + focus: function() { + this.selectParentTab().getInputElement().focus(); + return this; + }, + + /** + * Registers the `on*` event handlers defined in the element definition. + * + * The default behavior of this function is: + * + * 1. If the on* event is defined in the class's eventProcesors list, + * then the registration is delegated to the corresponding function + * in the eventProcessors list. + * 2. If the on* event is not defined in the eventProcessors list, then + * register the event handler under the corresponding DOM event of + * the UI element's input DOM element (as defined by the return value + * of {@link #getInputElement}). + * + * This function is only called at UI element instantiation, but can + * be overridded in child classes if they require more flexibility. + * + * @chainable + * @param {CKEDITOR.dialog.definition.uiElement} definition The UI element + * definition. + */ + registerEvents: function( definition ) { + var regex = /^on([A-Z]\w+)/, + match; + + var registerDomEvent = function( uiElement, dialog, eventName, func ) { + dialog.on( 'load', function() { + uiElement.getInputElement().on( eventName, func, uiElement ); + } ); + }; + + for ( var i in definition ) { + if ( !( match = i.match( regex ) ) ) + continue; + if ( this.eventProcessors[ i ] ) + this.eventProcessors[ i ].call( this, this._.dialog, definition[ i ] ); + else + registerDomEvent( this, this._.dialog, match[ 1 ].toLowerCase(), definition[ i ] ); + } + + return this; + }, + + /** + * The event processor list used by + * {@link CKEDITOR.ui.dialog.uiElement#getInputElement} at UI element + * instantiation. The default list defines three `on*` events: + * + * 1. `onLoad` - Called when the element's parent dialog opens for the + * first time. + * 2. `onShow` - Called whenever the element's parent dialog opens. + * 3. `onHide` - Called whenever the element's parent dialog closes. + * + * // This connects the 'click' event in CKEDITOR.ui.dialog.button to onClick + * // handlers in the UI element's definitions. + * CKEDITOR.ui.dialog.button.eventProcessors = CKEDITOR.tools.extend( {}, + * CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, + * { onClick : function( dialog, func ) { this.on( 'click', func ); } }, + * true + * ); + * + * @property {Object} + */ + eventProcessors: { + onLoad: function( dialog, func ) { + dialog.on( 'load', func, this ); + }, + + onShow: function( dialog, func ) { + dialog.on( 'show', func, this ); + }, + + onHide: function( dialog, func ) { + dialog.on( 'hide', func, this ); + } + }, + + /** + * The default handler for a UI element's access key down event, which + * tries to put focus to the UI element. + * + * Can be overridded in child classes for more sophisticaed behavior. + * + * @param {CKEDITOR.dialog} dialog The parent dialog object. + * @param {String} key The key combination pressed. Since access keys + * are defined to always include the `CTRL` key, its value should always + * include a `'CTRL+'` prefix. + */ + accessKeyDown: function() { + this.focus(); + }, + + /** + * The default handler for a UI element's access key up event, which + * does nothing. + * + * Can be overridded in child classes for more sophisticated behavior. + * + * @param {CKEDITOR.dialog} dialog The parent dialog object. + * @param {String} key The key combination pressed. Since access keys + * are defined to always include the `CTRL` key, its value should always + * include a `'CTRL+'` prefix. + */ + accessKeyUp: function() {}, + + /** + * Disables a UI element. + */ + disable: function() { + var element = this.getElement(), + input = this.getInputElement(); + input.setAttribute( 'disabled', 'true' ); + element.addClass( 'cke_disabled' ); + }, + + /** + * Enables a UI element. + */ + enable: function() { + var element = this.getElement(), + input = this.getInputElement(); + input.removeAttribute( 'disabled' ); + element.removeClass( 'cke_disabled' ); + }, + + /** + * Determines whether an UI element is enabled or not. + * + * @returns {Boolean} Whether the UI element is enabled. + */ + isEnabled: function() { + return !this.getElement().hasClass( 'cke_disabled' ); + }, + + /** + * Determines whether an UI element is visible or not. + * + * @returns {Boolean} Whether the UI element is visible. + */ + isVisible: function() { + return this.getInputElement().isVisible(); + }, + + /** + * Determines whether an UI element is focus-able or not. + * Focus-able is defined as being both visible and enabled. + * + * @returns {Boolean} Whether the UI element can be focused. + */ + isFocusable: function() { + if ( !this.isEnabled() || !this.isVisible() ) + return false; + return true; + } + }; + + /** @class CKEDITOR.ui.dialog.hbox */ + CKEDITOR.ui.dialog.hbox.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement(), { + /** + * Gets a child UI element inside this container. + * + * var checkbox = hbox.getChild( [0,1] ); + * checkbox.setValue( true ); + * + * @param {Array/Number} indices An array or a single number to indicate the child's + * position in the container's descendant tree. Omit to get all the children in an array. + * @returns {Array/CKEDITOR.ui.dialog.uiElement} Array of all UI elements in the container + * if no argument given, or the specified UI element if indices is given. + */ + getChild: function( indices ) { + // If no arguments, return a clone of the children array. + if ( arguments.length < 1 ) + return this._.children.concat(); + + // If indices isn't array, make it one. + if ( !indices.splice ) + indices = [ indices ]; + + // Retrieve the child element according to tree position. + if ( indices.length < 2 ) + return this._.children[ indices[ 0 ] ]; + else + return ( this._.children[ indices[ 0 ] ] && this._.children[ indices[ 0 ] ].getChild ) ? this._.children[ indices[ 0 ] ].getChild( indices.slice( 1, indices.length ) ) : null; + } + }, true ); + + CKEDITOR.ui.dialog.vbox.prototype = new CKEDITOR.ui.dialog.hbox(); + + ( function() { + var commonBuilder = { + build: function( dialog, elementDefinition, output ) { + var children = elementDefinition.children, + child, + childHtmlList = [], + childObjList = []; + for ( var i = 0; + ( i < children.length && ( child = children[ i ] ) ); i++ ) { + var childHtml = []; + childHtmlList.push( childHtml ); + childObjList.push( CKEDITOR.dialog._.uiElementBuilders[ child.type ].build( dialog, child, childHtml ) ); + } + return new CKEDITOR.ui.dialog[ elementDefinition.type ]( dialog, childObjList, childHtmlList, output, elementDefinition ); + } + }; + + CKEDITOR.dialog.addUIElement( 'hbox', commonBuilder ); + CKEDITOR.dialog.addUIElement( 'vbox', commonBuilder ); + } )(); + + /** + * Generic dialog command. It opens a specific dialog when executed. + * + * // Register the "link" command, which opens the "link" dialog. + * editor.addCommand( 'link', new CKEDITOR.dialogCommand( 'link' ) ); + * + * @class + * @constructor Creates a dialogCommand class instance. + * @extends CKEDITOR.commandDefinition + * @param {String} dialogName The name of the dialog to open when executing + * this command. + * @param {Object} [ext] Additional command definition's properties. + * @param {String} [ext.tabId] You can provide additional property (`tabId`) if you wish to open the dialog on a specific tabId. + * + * // Open the dialog on the 'keystroke' tabId. + * editor.addCommand( 'keystroke', new CKEDITOR.dialogCommand( 'a11yHelp', { tabId: 'keystroke' } ) ); + */ + CKEDITOR.dialogCommand = function( dialogName, ext ) { + this.dialogName = dialogName; + CKEDITOR.tools.extend( this, ext, true ); + }; + + CKEDITOR.dialogCommand.prototype = { + exec: function( editor ) { + var tabId = this.tabId; + editor.openDialog( this.dialogName, function( dialog ) { + // Select different tab if it's provided (#830). + if ( tabId ) { + dialog.selectPage( tabId ); + } + } ); + }, + + // Dialog commands just open a dialog ui, thus require no undo logic, + // undo support should dedicate to specific dialog implementation. + canUndo: false, + + editorFocus: 1 + }; + + ( function() { + var notEmptyRegex = /^([a]|[^a])+$/, + integerRegex = /^\d*$/, + numberRegex = /^\d*(?:\.\d+)?$/, + htmlLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/, + cssLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i, + inlineStyleRegex = /^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/; + + CKEDITOR.VALIDATE_OR = 1; + CKEDITOR.VALIDATE_AND = 2; + + CKEDITOR.dialog.validate = { + functions: function() { + var args = arguments; + return function() { + /** + * It's important for validate functions to be able to accept the value + * as argument in addition to this.getValue(), so that it is possible to + * combine validate functions together to make more sophisticated + * validators. + */ + var value = this && this.getValue ? this.getValue() : args[ 0 ]; + + var msg, + relation = CKEDITOR.VALIDATE_AND, + functions = [], + i; + + for ( i = 0; i < args.length; i++ ) { + if ( typeof args[ i ] == 'function' ) + functions.push( args[ i ] ); + else + break; + } + + if ( i < args.length && typeof args[ i ] == 'string' ) { + msg = args[ i ]; + i++; + } + + if ( i < args.length && typeof args[ i ] == 'number' ) + relation = args[ i ]; + + var passed = ( relation == CKEDITOR.VALIDATE_AND ? true : false ); + for ( i = 0; i < functions.length; i++ ) { + if ( relation == CKEDITOR.VALIDATE_AND ) + passed = passed && functions[ i ]( value ); + else + passed = passed || functions[ i ]( value ); + } + + return !passed ? msg : true; + }; + }, + + regex: function( regex, msg ) { + /* + * Can be greatly shortened by deriving from functions validator if code size + * turns out to be more important than performance. + */ + return function() { + var value = this && this.getValue ? this.getValue() : arguments[ 0 ]; + return !regex.test( value ) ? msg : true; + }; + }, + + notEmpty: function( msg ) { + return this.regex( notEmptyRegex, msg ); + }, + + integer: function( msg ) { + return this.regex( integerRegex, msg ); + }, + + 'number': function( msg ) { + return this.regex( numberRegex, msg ); + }, + + 'cssLength': function( msg ) { + return this.functions( function( val ) { + return cssLengthRegex.test( CKEDITOR.tools.trim( val ) ); + }, msg ); + }, + + 'htmlLength': function( msg ) { + return this.functions( function( val ) { + return htmlLengthRegex.test( CKEDITOR.tools.trim( val ) ); + }, msg ); + }, + + 'inlineStyle': function( msg ) { + return this.functions( function( val ) { + return inlineStyleRegex.test( CKEDITOR.tools.trim( val ) ); + }, msg ); + }, + + equals: function( value, msg ) { + return this.functions( function( val ) { + return val == value; + }, msg ); + }, + + notEqual: function( value, msg ) { + return this.functions( function( val ) { + return val != value; + }, msg ); + } + }; + + CKEDITOR.on( 'instanceDestroyed', function( evt ) { + // Remove dialog cover on last instance destroy. + if ( CKEDITOR.tools.isEmpty( CKEDITOR.instances ) ) { + var currentTopDialog; + while ( ( currentTopDialog = CKEDITOR.dialog._.currentTop ) ) + currentTopDialog.hide(); + removeCovers(); + } + + var dialogs = evt.editor._.storedDialogs; + for ( var name in dialogs ) + dialogs[ name ].destroy(); + + } ); + + } )(); + + // Extend the CKEDITOR.editor class with dialog specific functions. + CKEDITOR.tools.extend( CKEDITOR.editor.prototype, { + /** + * Loads and opens a registered dialog. + * + * CKEDITOR.instances.editor1.openDialog( 'smiley' ); + * + * @member CKEDITOR.editor + * @param {String} dialogName The registered name of the dialog. + * @param {Function} callback The function to be invoked after dialog instance created. + * @returns {CKEDITOR.dialog} The dialog object corresponding to the dialog displayed. + * `null` if the dialog name is not registered. + * @see CKEDITOR.dialog#add + */ + openDialog: function( dialogName, callback ) { + var dialog = null, dialogDefinitions = CKEDITOR.dialog._.dialogDefinitions[ dialogName ]; + + if ( CKEDITOR.dialog._.currentTop === null ) + showCover( this ); + + // If the dialogDefinition is already loaded, open it immediately. + if ( typeof dialogDefinitions == 'function' ) { + var storedDialogs = this._.storedDialogs || ( this._.storedDialogs = {} ); + + dialog = storedDialogs[ dialogName ] || ( storedDialogs[ dialogName ] = new CKEDITOR.dialog( this, dialogName ) ); + + callback && callback.call( dialog, dialog ); + dialog.show(); + + } else if ( dialogDefinitions == 'failed' ) { + hideCover( this ); + throw new Error( '[CKEDITOR.dialog.openDialog] Dialog "' + dialogName + '" failed when loading definition.' ); + } else if ( typeof dialogDefinitions == 'string' ) { + + CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( dialogDefinitions ), + function() { + var dialogDefinition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ]; + // In case of plugin error, mark it as loading failed. + if ( typeof dialogDefinition != 'function' ) + CKEDITOR.dialog._.dialogDefinitions[ dialogName ] = 'failed'; + + this.openDialog( dialogName, callback ); + }, this, 0, 1 ); + } + + CKEDITOR.skin.loadPart( 'dialog' ); + + return dialog; + } + } ); +} )(); + +CKEDITOR.plugins.registered['dialog'] = null; +CKEDITOR.plugins.add( 'dialog', { + requires: 'dialogui', + init: function( editor ) { + editor.on( 'doubleclick', function( evt ) { + if ( evt.data.dialog ) + editor.openDialog( evt.data.dialog ); + }, null, null, 999 ); + } +} ); +CKEDITOR.plugins.add( 'cmsdialog', { + requires: 'dialogui', + init: function( editor ) { + } +} ); + +// Dialog related configurations. + +/** + * The color of the dialog background cover. It should be a valid CSS color string. + * + * config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)'; + * + * @cfg {String} [dialog_backgroundCoverColor='white'] + * @member CKEDITOR.config + */ + +/** + * The opacity of the dialog background cover. It should be a number within the + * range `[0.0, 1.0]`. + * + * config.dialog_backgroundCoverOpacity = 0.7; + * + * @cfg {Number} [dialog_backgroundCoverOpacity=0.5] + * @member CKEDITOR.config + */ + +/** + * If the dialog has more than one tab, put focus into the first tab as soon as dialog is opened. + * + * config.dialog_startupFocusTab = true; + * + * @cfg {Boolean} [dialog_startupFocusTab=false] + * @member CKEDITOR.config + */ + +/** + * The distance of magnetic borders used in moving and resizing dialogs, + * measured in pixels. + * + * config.dialog_magnetDistance = 30; + * + * @cfg {Number} [dialog_magnetDistance=20] + * @member CKEDITOR.config + */ + +/** + * The guideline to follow when generating the dialog buttons. There are 3 possible options: + * + * * `'OS'` - the buttons will be displayed in the default order of the user's OS; + * * `'ltr'` - for Left-To-Right order; + * * `'rtl'` - for Right-To-Left order. + * + * Example: + * + * config.dialog_buttonsOrder = 'rtl'; + * + * @since 3.5 + * @cfg {String} [dialog_buttonsOrder='OS'] + * @member CKEDITOR.config + */ + +/** + * The dialog contents to removed. It's a string composed by dialog name and tab name with a colon between them. + * + * Separate each pair with semicolon (see example). + * + * **Note:** All names are case-sensitive. + * + * **Note:** Be cautious when specifying dialog tabs that are mandatory, + * like `'info'`, dialog functionality might be broken because of this! + * + * config.removeDialogTabs = 'flash:advanced;image:Link'; + * + * @since 3.5 + * @cfg {String} [removeDialogTabs=''] + * @member CKEDITOR.config + */ + +/** + * Tells if user should not be asked to confirm close, if any dialog field was modified. + * By default it is set to `false` meaning that the confirmation dialog will be shown. + * + * config.dialog_noConfirmCancel = true; + * + * @since 4.3 + * @cfg {Boolean} [dialog_noConfirmCancel=false] + * @member CKEDITOR.config + */ + +/** + * Event fired when a dialog definition is about to be used to create a dialog into + * an editor instance. This event makes it possible to customize the definition + * before creating it. + * + * Note that this event is called only the first time a specific dialog is + * opened. Successive openings will use the cached dialog, and this event will + * not get fired. + * + * @event dialogDefinition + * @member CKEDITOR + * @param {CKEDITOR.dialog.definition} data The dialog defination that + * is being loaded. + * @param {CKEDITOR.editor} editor The editor instance that will use the dialog. + */ + +/** + * Event fired when a tab is going to be selected in a dialog. + * + * @event selectPage + * @member CKEDITOR.dialog + * @param data + * @param {String} data.page The id of the page that it's gonna be selected. + * @param {String} data.currentPage The id of the current page. + */ + +/** + * Event fired when the user tries to dismiss a dialog. + * + * @event cancel + * @member CKEDITOR.dialog + * @param data + * @param {Boolean} data.hide Whether the event should proceed or not. + */ + +/** + * Event fired when the user tries to confirm a dialog. + * + * @event ok + * @member CKEDITOR.dialog + * @param data + * @param {Boolean} data.hide Whether the event should proceed or not. + */ + +/** + * Event fired when a dialog is shown. + * + * @event show + * @member CKEDITOR.dialog + */ + +/** + * Event fired when a dialog is shown. + * + * @event dialogShow + * @member CKEDITOR.editor + * @param {CKEDITOR.editor} editor This editor instance. + * @param {CKEDITOR.dialog} data The opened dialog instance. + */ + +/** + * Event fired when a dialog is hidden. + * + * @event hide + * @member CKEDITOR.dialog + */ + +/** + * Event fired when a dialog is hidden. + * + * @event dialogHide + * @member CKEDITOR.editor + * @param {CKEDITOR.editor} editor This editor instance. + * @param {CKEDITOR.dialog} data The hidden dialog instance. + */ + +/** + * Event fired when a dialog is being resized. The event is fired on + * both the {@link CKEDITOR.dialog} object and the dialog instance + * since 3.5.3, previously it was only available in the global object. + * + * @static + * @event resize + * @member CKEDITOR.dialog + * @param data + * @param {CKEDITOR.dialog} data.dialog The dialog being resized (if + * it is fired on the dialog itself, this parameter is not sent). + * @param {String} data.skin The skin name. + * @param {Number} data.width The new width. + * @param {Number} data.height The new height. + */ + +/** + * Event fired when a dialog is being resized. The event is fired on + * both the {@link CKEDITOR.dialog} object and the dialog instance + * since 3.5.3, previously it was only available in the global object. + * + * @since 3.5 + * @event resize + * @member CKEDITOR.dialog + * @param data + * @param {Number} data.width The new width. + * @param {Number} data.height The new height. + */ + +/** + * Event fired when the dialog state changes, usually by {@link CKEDITOR.dialog#setState}. + * + * @since 4.5 + * @event state + * @member CKEDITOR.dialog + * @param data + * @param {Number} data The new state. Either {@link CKEDITOR#DIALOG_STATE_IDLE} or {@link CKEDITOR#DIALOG_STATE_BUSY}. + */ +})(CMS.$); diff --git a/static/djangocms_text_ckeditor/ckeditor_plugins/cmsplugins/icons/.aldryn-folder b/static/djangocms_text_ckeditor/ckeditor_plugins/cmsplugins/icons/.aldryn-folder new file mode 100644 index 0000000..e69de29 diff --git a/static/djangocms_text_ckeditor/ckeditor_plugins/cmsplugins/icons/cmsplugins.png b/static/djangocms_text_ckeditor/ckeditor_plugins/cmsplugins/icons/cmsplugins.png new file mode 100644 index 0000000000000000000000000000000000000000..18d784fd44da4274323447420ee80a5e7912bdfe GIT binary patch literal 1205 zcmbVMTWHfz7|u44=@bTnPMz#5f+#M{rES{A)vasVu4w1zDh^R-nw+(9%f;ku?e;Ld zz3A}59z;G8|L%vd zksvB^YN``;CN>MQp}8an<0@z-W)nnXQ^AzvZiqkzW>q~%ju&r|Kvja|HgAGSm|>Vx zTL&!IG0>Kh2fF2eLN;v#jRgSM{fahJT$IJ6<1K=2zqZxej6zdVZyukUu%tc~rmeM68#psMJyb6*zgiL{^ z^ZC3h?{*nhmSzKifTO{26h=^XzmB8=rQ54Z3L>;+OEr;d=)h5wGDa^7lGxMf5HvH9 zm=)ITnMC1~(FMt*Srv)3R7GICew;<0hw*U??`K&*$AuzcJ{k&nm;l3tOB!== zMZeqUW7vor!&x@MwFJ0mi@r!(53Q*KH)}GA!9uvE3Q2_)o47wxEOzD`glx zr3z@z8OX46h6%zQJXo8MWL0-I);R|>9j^#2wGS#$%h147h6QyF4??Uz>W&5?Z1``H zPji+3$r_EFp`G&hqg+Z`xCWi+Z1Lm8Z2LeR_l$*`ga5v97jCRqaWRxCJk2QC>}MsN zK2dddc+rKuubWSgReD~Y9336KaOqM*{CZu};MkS?_>0#K;MB;-$nwb_-(tgMAP8=N zikivEA4BKT@19*V`z(uV+kb0*_0?5p8xK`2rM4f~`uO{oiQ8z$j@rSB%Cerftz7!e zlaaJQlI6v++S=Om*9S-I#Nxbr1WnV!H}++2-9NnY{jLMo9zB14#;i$C92pv_8e9e{ zVzJoy%-#jZ+nZ~Y^^0CD*)LTS*)X_kaIvy1U`kt#K-oAuFynwJfR3 zrlA{6#j{viJFC1}KdVVU(hxT$J79EcW~;?!p*fwZ)naDsnXOrII)k;I&IB5>6XR4w zglo!*%f%k5iDi{4jg_TUsR<+E^+{^ADlIKRosycCroKUyoTN@pOoG3(cy&rttlahxgsWX$3L`rzc4m!%L22;aKmyYCkb#i=CYPEVq zW-|O`h;@i0JL-TEHRw2rx zLNlBlN<{5hA_jeCgO#=DxNM!xW;W?{xX=@u8H2MZZLYEzo#+<*vr{cZA|&3!lmzdq z4NCCJ)L6|{7D|ZD9x*zxGq$M6+}Fq!FWdsR`Ms-!@ZrXHD=7N4A;7ON4- z{n?oZ6E7?4Jmao9WU(Z6R`={&K{HfKXEpbL%oWmJJ<~=fR?&8=gVoao&0qxXy6&uz zWo4NqjGfaldb%V(89BAtjip)8k5)t;Y=` zZ5W;C!F4CAV=&Xzg?4>(dEKI*UF&aYq?v0qtGp^A)wL44wSjBVv2?Bx?BM$CJ+IR< zP)Fr_V`(=1D~iC%G}G*FDFi5L9rWikYtL?AtrnHZqBGKoHpZyptg7oaseE=tI{uA$ zwdXnNCYUn zA$)LogOVWQgG+$I8^Q;dHz)}*KDY!ZydivWd4rN5%z#r9`5H;b@w1Sg;4C@m*tPu{)H6)tXwd zM4pMmVX!x^lV;0dFHd#B#A;yik?{dwi=eeZOLGoeMg4R=cm|a1k|mW{z>DD5&0HGIJ(|s04q1BCRQ#G>+eqJPNCj#KXm%;|NiXE6A=~ zJNS3Qk{TPwxH18mtY-yBmC;@%I5aGyaXT2!?I^7`+XbI;BiAfA3M}S)!2vkBRp;rO zj7}hUln`v4)Ie&;M(iqsN@cJ*>T|4ZIECaWVwtOWdFHF-@>oOl1coc@UuDK+D;#-d zgQ_!rmEFt{er2mUr%DhHXr}eBbq{vq!p>!3)th;KC9BVwgf);OOwU?vwXkch5?iQ=F}mOj!5&qRraUXhSuJKOV{`@ya{1sS zi1@)SewE4CDE0_+c|h6(d0bbd-}7le#c-$K=e(18G>G_xI3tDInA!Xec7aUa0 z>KHq0M57t~Ox_ZsiBDg+2BT`Qb{%4n9c)|&G!3*K&2;XfPbHG!a0PQ{ZznE<3>2@Y z4{?)S`6Qh`5qAKV#D`Nyupm`OQrtsu_a&ju5Vt?M!iCp87}pV~aX4ObP(=1Dp^H&s zLj(Aj;i}+$ot%}AEfYA&;6tH0xVmI;ZYYFnpp!#%{sL}YBsri6PABTPbj7-QVyEOB zTyQ977|dfFX53KX3hr00v(uu6QjR8oUC>|^_)x&70vLn6L-U~L)ZjU9bS@WPmbeM&4w72N*S`Io}3evclC6pbgR z%x?7T#S}U-SFJO8NQLNWv$>jX8>+Ml!9p#Qhi;)XH6 z3@zwY+@N~W;$FoMgko>(AWmw_5F8Km?@$fKoFX*eiiHw(F?bc1ni#7DY|#RJBK~H; z#7T83qRsN1_-i9W3|mBMWPy_AF6`Slw_!i=@v81aq*S#^%Wg!fN!H% zY&r(|96rxD6pFa&qYZ@3U#{sXlDig(%a->)GoF+g6|>vTbBA>EtgE1Hg&s)yfSXtU z7($!wM5z0xZr*^WU^qGtp^bY*`H8{yBKmBLiPk4zK!xMF0)k}MgeblQ9G~#P3spW} zgH_n7_3%9n2djcHfu2^ycQoSP9Z-}kQ95p@q8n&D_MlZYU}Z3Lg5qWjCh`Ru6XWq& z4v~i68BC-Ble}F65xM#bikg~$!uCcX>G!*lEHV&DZ+sGbD52a+{cB+Ck5FywN#5>( z27hw(xJd2?r^Id|y#mryRjc$4wwV`^;hP-BEukn1^+0`5e>4O}9LXphjY2u70F6Zz zFy@+sZh}!(BeFo>+JbIDbI^RW5Iuk%M$6C&v>L5N>(R?-6M7wOL+_vu(1++CI)d8J zar7-Zh0dXi6h$eiU@DU8LB&!7so_*Il|f}w1ym_jMNOinQAUcP9Mmn;9n?ZL+9cmf&PtIqP#PocCyke8NHx+5X`Qq|%1UpOE|4yju9B{o zZjtViek5&^ekc7^rjSL-RI+&4C|R*=f=n-)A-hesNVZJ&tZbufr|cuyQQ0Zk6?w3{ zw|uxfQ(hvUC^yPmDHMtr#b8CcqF6CWFm>2PM z#Eyt#kA?eBKJd#~;}-RbTNy1&@{VD}3>R6PoM zH1&9}$EF^i_muS<)^mK%mYz@ce7om&y`p-J>ZR|spx4X2KJ6{(J*;JH@^u9~_zS;Nd*vQ!ISX1nh*sZbOsG?Q5DzoZQ)lSu^ ze!cq@_jB}H*>6w3i*bYFCdAE+dok|w{sH|n`Zx4n(tmsZQv+fLlnuCLz`6mS4)hIBfZ_y~8EL(}tUdKQVmY4e}dC-oV_j>W0JdLGiiq&GGBvk0!()s5Rc}%Mlsqh1pS(Qzz=+@xg(Gesv3bPl zl;J6K%9AM{r$(lhrQVggJ@s;0dK#OyKJDxD0qN7yA5TA=5tUJyu_)u+k@AswBX1x1 z`p921(=xftmotAH6+fzJ)N`Z08a;S4J$m)%V_9)ox~!F1ZP}{qY1vO@w~gsHMmJ{F zm@jks=NNL<3{RV*(aSNve{;gUWj`jWLJr^cp_y>;x)aY5s>v`~TT^#-a>3+> zCm+8t^~U)(9-1jUVloj z(LbX9){tXZV)&ZQq8HOA8?qV}H+*HxGCpMdx^Yb7(#G#h8q+e<>FLGOS4=DZO(39-uz2TP0K5-;jK*T?wP}8-ZS&$tioA;xmk9z{^sqs^t)xwEk|$7y>;bn z)NS>*ZNI($?elIwKD%i4vvUIGG|l<@+@!gS=l*<0?Hya@^_e$&-myE2?p!xNWIj9p z@Li+sT5-4RZqwa+?iq2u7hYPVU-bUH>U$r(xBb3``}W+QcK?$P zC>~%QIP~C{2cKOWzIfK+V-J-*v~h`Q$$}+6KRor}_m-wCUGYf3BaTPf9xZ)z^J4=Z zd*HE4%Nmy*T%Nc5#m9R;e$V6QpD;YJ|H+&u*RSZaV&RGlPnn+jcxBPbjjIN&TKcr& z>E@?TtgczT>n|C9S-Ym^nuTjFKf^rJ_H5O&JJ+VKUHe?`=k8x8S?5^y_47AA|KSVy zFKk{PzkcP5F)uEB3BBZa>6^b!`|F{X$GyD$m5f)`|83yk9^VkTVZlaf33Cd2hCFowfDsTei2p+h*K$Z2Q#h zM|MoyabV~8oqOIM_x8K*6uz@#SMIK@?`FOG`g@u0z50H}`GRN*@Dl*K41Dp?=M#UW9UC#Y)fl<<7ocT-Ct_IJaSBb?Aw3Z|9R>7 zyc5AEmY$3~x%R8%uU`MU@aqr1nf%T1Z*AXR{BHjD;om?0!;l~T_G8YEyH8C#b^J7Y zy8Wj`XL_7@=I4~3x1X&%`^7oSxr^r){LXMfH3b=QU33nwqOTvA?o^zzWlTds_| z@>#p3y`4O3M3K<|9t=bgHy%MF$qu;S@kE&Ogt0V!?3O%(x+ALnpwQ^QW9r48iTBB+mUwdg&hkk z#_zUNtlY(D-&OWI)bogS?Uwgn&~KX5l>Q^T?(Dj6c3t`+ee#50+S2s=&JSLApswiI zZ+d=vWJ(z`d2;RA3n{Vdw$^2~9Ne>F8k1x_l(bL7CZYrH&slxs-Un+xo$*upk8A$1 zvi8iA%MuUAt~X!!p!*vm&uxl6__whD)R z7S01G;L>b_V7}3Lzs`p%5&m9hCj2F(s$5@^1T{$d6y;9eQxYMLu&1PM8VkaqpkN3M zcM4_|M0ug&+xY zf|SO2;W2{%hRD9*r44t$KAb?&=y!)5vIIJ3%(MEK=Brs3WvKJLz#2E z24_qOv+j2IzNoMeLPD;>0g<1@o&s~axZjKEjZpNd_A7+XU$DL~1kE|zYX~cklu;h( zC-bl#1^{b^ju)nT@tiU~hJZmsi0hyJdMkW>+61dB{A!fBp%qr+{Hu92qTIMvpU8S# z7i+H}7M&f6rEsFQ#l-0wUCSA$gw-~Bm<{1T6lAbXGrD?Ld7(0}4rjrDB{5|<9p$XW zjPLONfXY)%r%T?cs6C(!%OfN#d5d`1KFQL!h*x3LJD0FM){>FKXeR5&q*9o5Ml)H6 z&Si`_H}MhRYrdUhT$Nmi`Xca;c^9h zptfi|G0-;JG$0Pv11c;km2=HViAs?PR)}e`R!sD1*k+Y;%}(N}L&H{L+a)@R*;x$6 zhXiq6YFJJ$=3PIu_{9TPXfdydEi`*-!5oM#5J%}U34;5zOrooTD`Is9r+R->L>A5s z00&+&#~FpAh&3>9lVjQgHVwQ)Vkcu_3-%+Dg)WnXP=%PMfp=Z-9lw%6jOiup;tw!W z*V1T5n9X?6hzt5iYMX;X%+FjOKTX>DNZY9;EtnnbHZV(e`@RRrHo#lD6TvMHVaK2^K5jm9Rw}8ZOKM1;JR0 z3kXbKGeeN)e@9=IKoUYOMdlU(`n-bb0?gDlL6WHPj+-DzRH{Ax#yjMNpkF z%V0O);ot~3C4Bz`R4bgMuYx-{u%yLdRv~Jui^T^wiG!264*obeX)U5-@Q;_o<3^ZC zfFY-dX@%keVLX-Nj-9+z_2wIVF!;A541!4U%z}$&;zJE5p-4nPdFUmP4FWH5Wc742 zt~%u;m@A8rO`JI#jgUzandgj$Wb0OvC7cXT9}*h=p9E-)!B~YjcK$o5z8>NPObPE7px*&8FUsvL04V- zf8|rCM>jo*hmEvPzp8ew^>yK_L$2V*UsB(iV6d9QW1E2YXU>?p~U_d;Oo^ zOK-S#FHOPJo&x&e&VLHzN0pp7+fJP*K_||%qZ6mwJO2^ilhoLgAp6g;(7Si8PvD-e zy7uosM1umbk--nIwc(#1^1Fhrv|mR2^;a06;Pbrm{%bpSUFmRko|p6OSO5Mcl2CQA zvq~y\s]+)[\s\S]*?>/) || [0, false]).splice(1); + + var containsAnyBlockLikeElements = innerTags.some(function (tag) { + return tag && CKEDITOR.dtd.$block[tag]; + }); + + var fakeRealType = 'span'; + + if (containsAnyBlockLikeElements) { + fakeRealType = 'div'; + } + + return fakeRealType; + } + + /** + * @function replaceTagName + * @private + * @param {jQuery} elements + * @param {String} tagName + */ + function replaceTagName(elements, tagName) { + elements.each(function (i, el) { + var newElement; + + var element = $(el); + + newElement = $('<' + tagName + '>'); + + // attributes + $.each(el.attributes, function (index, attribute) { + newElement.attr(attribute.nodeName, attribute.nodeValue); + }); + + // content + newElement.html(element.html()); + + element.replaceWith(newElement); + }); + } + + CKEDITOR.plugins.add('cmsplugins', { + + // Register the icons. They must match command names. + icons: 'cmsplugins', + + // The plugin initialization logic goes inside this method. + init: function (editor) { + var that = this; + + this.options = CMS.CKEditor.options.settings; + this.editor = editor; + + /** + * populated with _fresh_ child plugins + */ + this.child_plugins = []; + this.setupCancelCleanupCallback(this.options); + + // don't do anything if there are no plugins defined + if (this.options === undefined || this.options.plugins === undefined) { + return false; + } + + this.setupDialog(); + + // add the button + this.editor.ui.add('cmsplugins', CKEDITOR.UI_PANELBUTTON, { + toolbar: 'cms,0', + label: this.options.lang.toolbar, + title: this.options.lang.toolbar, + className: 'cke_panelbutton__cmsplugins', + modes: { wysiwyg: 1 }, + editorFocus: 0, + + panel: { + css: [CKEDITOR.skin.getPath('editor')].concat(that.editor.config.contentsCss), + attributes: { 'role': 'cmsplugins', 'aria-label': this.options.lang.aria } + }, + + // this is called when creating the dropdown list + onBlock: function (panel, block) { + block.element.setHtml(that.editor.plugins.cmsplugins.setupDropdown()); + + var anchors = $(block.element.$).find('.cke_panel_listItem a'); + + anchors.bind('click', function (e) { + e.preventDefault(); + + that.addPlugin($(this), panel); + }); + } + }); + + // handle edit event via context menu + if (this.editor.contextMenu) { + this.setupContextMenu(); + } + + this.editor.addCommand('cmspluginsEdit', { + exec: function () { + var element = that.getElementFromSelection(); + var plugin = that.getPluginWidget(element); + + if (plugin) { + that.editPlugin(plugin); + } + } + }); + + // handle edit event on double click + // if event is a jQuery event (touchend), than we mutate + // event a bit so we make the payload similar to what ckeditor.event produces + var handleEdit = function (event) { + var element; + + if (event.type === 'touchend' || event.type === 'click') { + var cmsPluginNode = $(event.currentTarget).closest('cms-plugin')[0]; + + // pick cke_widget span + // eslint-disable-next-line new-cap + element = new CKEDITOR.dom.element(cmsPluginNode).getParent(); + + event.data = event.data || {}; + // have to fake selection to be able to replace markup after editing + that.editor.getSelection().fake(element); + } + + that.editor.execCommand('cmspluginsEdit'); + }; + + this.editor.on('doubleclick', handleEdit); + this.editor.on('instanceReady', function () { + CMS.$('cms-plugin', CMS.$('iframe.cke_wysiwyg_frame')[0] + .contentWindow.document.documentElement).on('click touchend', handleEdit); + }); + + this.setupDataProcessor(); + }, + + getElementFromSelection: function () { + var selection = this.editor.getSelection(); + var element = selection.getSelectedElement() || + selection.getCommonAncestor().getAscendant('cms-plugin', true); + + return element; + }, + + getPluginWidget: function (element) { + if (!element) { + return null; + } + return element.getAscendant('cms-plugin', true) || element.findOne('cms-plugin'); + }, + + setupDialog: function () { + var that = this; + var definition = function () { + return { + title: '', + minWidth: 200, + minHeight: 200, + contents: [{ + elements: [ + { + type: 'html', + html: '').appendTo(i.getParent())}return n.unselectable(),o.unselectable(),{element:e,parts:{dialog:e.getChild(0),title:n,close:o,tabs:i.getChild(2),contents:i.getChild([3,0,0,0]),footer:i.getChild([3,0,1,0])}}}function r(t,e,i){this.element=e,this.focusIndex=i,this.tabIndex=0,this.isFocusable=function(){return!e.getAttribute("disabled")&&e.isVisible()},this.focus=function(){t._.currentFocusIndex=this.focusIndex,this.element.focus()},e.on("keydown",function(t){t.data.getKeystroke()in{32:1,13:1}&&this.fire("click")}),e.on("focus",function(){this.fire("mouseover")}),e.on("blur",function(){this.fire("mouseout")})}function l(t){function e(){t.layout()}var i=CKEDITOR.document.getWindow();i.on("resize",e),t.on("hide",function(){i.removeListener("resize",e)})}function d(t,e){this._={dialog:t},CKEDITOR.tools.extend(this,e)}function u(t){function e(e){var i,l,d=t.getSize(),u=CKEDITOR.document.getWindow().getViewPaneSize(),c=e.originalEvent.screenX,h=e.originalEvent.screenY,g=c-n.x,f=h-n.y;n={x:c,y:h},o.x+=g,o.y+=f,i=o.x+r[3]u.width-d.width-a?u.width-d.width+("rtl"==s.lang.dir?0:r[1]):o.x,l=o.y+r[0]u.height-d.height-a?u.height-d.height+r[2]:o.y,t.move(i,l,1),e.preventDefault()}function i(){if(CMS.$(CKEDITOR.document.$).off("pointermove",e),CMS.$(CKEDITOR.document.$).off("pointerup",i),CKEDITOR.env.ie6Compat){var t=b.getChild(0).getFrameDocument();t.removeListener("mousemove",e),t.removeListener("mouseup",i)}}var n=null,o=null,s=t.getParentEditor(),a=s.config.dialog_magnetDistance,r=CKEDITOR.skin.margins||[0,0,0,0];void 0===a&&(a=20),CMS.$(t.parts.title.$).on("pointerdown",function(s){if(n={x:s.originalEvent.screenX,y:s.originalEvent.screenY},CMS.$(CKEDITOR.document.$).on("pointermove",e),CMS.$(CKEDITOR.document.$).on("pointerup",i),o=t.getPosition(),CKEDITOR.env.ie6Compat){var a=b.getChild(0).getFrameDocument();a.on("mousemove",e),a.on("mouseup",i)}s.preventDefault()})}function c(t){function e(e){var i="rtl"==c.lang.dir,u=(e.originalEvent.screenX-l.x)*(i?-1:1),h=e.originalEvent.screenY-l.y,g=d.width,f=d.height,p=g+u*(t._.moved?1:2),_=f+h*(t._.moved?1:2),I=t._.element.getFirst(),m=i&&I.getComputedStyle("right"),v=t.getPosition();v.y+_>r.height&&(_=r.height-v.y),(i?m:v.x)+p>r.width&&(p=r.width-(i?m:v.x)),o!=CKEDITOR.DIALOG_RESIZE_WIDTH&&o!=CKEDITOR.DIALOG_RESIZE_BOTH||(g=Math.max(n.minWidth||0,p-s)),o!=CKEDITOR.DIALOG_RESIZE_HEIGHT&&o!=CKEDITOR.DIALOG_RESIZE_BOTH||(f=Math.max(n.minHeight||0,_-a)),t.resize(g,f),t._.moved||t.layout(),e.preventDefault()}function i(){if(CMS.$(CKEDITOR.document.$).off("pointermove",e),CMS.$(CKEDITOR.document.$).off("pointerup",i),u&&(u.remove(),u=null),CKEDITOR.env.ie6Compat){var t=b.getChild(0).getFrameDocument();t.removeListener("mouseup",i),t.removeListener("mousemove",e)}}var n=t.definition,o=n.resizable;if(o!=CKEDITOR.DIALOG_RESIZE_NONE){var s,a,r,l,d,u,c=t.getParentEditor(),h=CKEDITOR.tools.addFunction(function(n){d=t.getSize();var o=t.parts.contents;if(o.$.getElementsByTagName("iframe").length&&(CMS.$(".cke_dialog_resize_cover").remove(),u=CKEDITOR.dom.element.createFromHtml('
'),o.append(u)),a=d.height-t.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks)),s=d.width-t.parts.contents.getSize("width",1),l={x:n.screenX,y:n.screenY},r=CKEDITOR.document.getWindow().getViewPaneSize(),CMS.$(CKEDITOR.document.$).on("pointermove",e),CMS.$(CKEDITOR.document.$).on("pointerup",i),CKEDITOR.env.ie6Compat){var c=b.getChild(0).getFrameDocument();c.on("mousemove",e),c.on("mouseup",i)}n.preventDefault&&n.preventDefault()});t.on("load",function(){var e="";o==CKEDITOR.DIALOG_RESIZE_WIDTH?e=" cke_resizer_horizontal":o==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(e=" cke_resizer_vertical");var i=CKEDITOR.dom.element.createFromHtml('
'+("ltr"==c.lang.dir?"◢":"◣")+"
");t.parts.footer.append(i,1)}),c.on("destroy",function(){CKEDITOR.tools.removeFunction(h)})}}function h(t){t.data.preventDefault(1)}function g(t){var e=CKEDITOR.document.getWindow(),i=t.config,n=i.dialog_backgroundCoverColor||"white",o=i.dialog_backgroundCoverOpacity,s=i.baseFloatZIndex,a=CKEDITOR.tools.genKey(n,o,s),r=O[a];if(CMS.$(".cke_dialog_background_cover:not(.cms-ckeditor-dialog-background-cover)").remove(),r)r.show();else{O={};var l=['
'];if(CKEDITOR.env.ie6Compat){var d="";l.push('')}l.push("
"),r=CKEDITOR.dom.element.createFromHtml(l.join("")),r.setOpacity(void 0!==o?o:.5),r.on("keydown",h),r.on("keypress",h),r.on("keyup",h),r.appendTo(CKEDITOR.document.getBody()),O[a]=r}t.focusManager.add(r),b=r;var u=function(){var t=e.getViewPaneSize();r.setStyles({width:t.width+"px",height:t.height+"px"})},c=function(){var t=e.getScrollPosition(),i=CKEDITOR.dialog._.currentTop;if(r.setStyles({left:t.x+"px",top:t.y+"px"}),i)do{var n=i.getPosition();i.move(n.x,n.y)}while(i=i._.parentDialog)};if(D=u,e.on("resize",u),u(),CKEDITOR.env.mac&&CKEDITOR.env.webkit||r.focus(),CKEDITOR.env.ie6Compat){var g=function(){c(),arguments.callee.prevScrollHandler.apply(this,arguments)};e.$.setTimeout(function(){g.prevScrollHandler=window.onscroll||function(){},window.onscroll=g},0),c()}}function f(t){if(CMS.$(".cke_dialog_background_cover:not(.cms-ckeditor-dialog-background-cover)").remove(),b){t.focusManager.remove(b);var e=CKEDITOR.document.getWindow();b.hide(),e.removeListener("resize",D),CKEDITOR.env.ie6Compat&&e.$.setTimeout(function(){var t=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=t||null},0),D=null}}function p(){for(var t in O)O[t].remove();O={}}var _=CKEDITOR.tools.cssLength,I='';CKEDITOR.dialog=function(t,n){function r(){var t=y._.focusList;t.sort(function(t,e){return t.tabIndex!=e.tabIndex?e.tabIndex-t.tabIndex:t.focusIndex-e.focusIndex});for(var e=t.length,i=0;i1;do{if(n+=t,o&&!y._.tabBarMode&&(n==e.length||-1==n))return y._.tabBarMode=!0,y._.tabs[y._.currentTabId][0].focus(),void(y._.currentFocusIndex=-1);if((n=(n+e.length)%e.length)==i)break}while(t&&!e[n].isFocusable());e[n].focus(),"text"==e[n].type&&e[n].select()}}function d(n){if(y==CKEDITOR.dialog._.currentTop){var o,s=n.data.getKeystroke(),a="rtl"==t.lang.dir,r=[37,38,39,40];if(f=p=0,9==s||s==CKEDITOR.SHIFT+9){l(s==CKEDITOR.SHIFT+9?-1:1),f=1}else if(s==CKEDITOR.ALT+121&&!y._.tabBarMode&&y.getPageCount()>1)y._.tabBarMode=!0,y._.tabs[y._.currentTabId][0].focus(),y._.currentFocusIndex=-1,f=1;else if(-1!=CKEDITOR.tools.indexOf(r,s)&&y._.tabBarMode){var d=[a?39:37,38],u=-1!=CKEDITOR.tools.indexOf(d,s)?e.call(y):i.call(y);y.selectPage(u),y._.tabs[u][0].focus(),f=1}else if(13!=s&&32!=s||!y._.tabBarMode)if(13==s){var c=n.data.getTarget();c.is("a","button","select","textarea")||c.is("input")&&"button"==c.$.type||(o=this.getButton("ok"),o&&CKEDITOR.tools.setTimeout(o.click,0,o),f=1),p=1}else{if(27!=s)return;o=this.getButton("cancel"),o?CKEDITOR.tools.setTimeout(o.click,0,o):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),p=1}else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1),f=1;h(n)}}function h(t){f?t.data.preventDefault(1):p&&t.data.stopPropagation()}var g,f,p,_=CKEDITOR.dialog._.dialogDefinitions[n],I=CKEDITOR.tools.clone(m),v=t.config.dialog_buttonsOrder||"OS",C=t.lang.dir,E={};("OS"==v&&CKEDITOR.env.mac||"rtl"==v&&"ltr"==C||"ltr"==v&&"rtl"==C)&&I.buttons.reverse(),_=CKEDITOR.tools.extend(_(t),I),_=CKEDITOR.tools.clone(_),_=new T(this,_);var D=a(t);this._={editor:t,element:D.element,name:n,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1},this.parts=D.parts,CKEDITOR.tools.setTimeout(function(){t.fire("ariaWidget",this.parts.contents)},0,this);var b={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};if(b["rtl"==C?"right":"left"]=0,this.parts.dialog.setStyles(b),CKEDITOR.event.call(this),this.definition=_=CKEDITOR.fire("dialogDefinition",{name:n,definition:_},t).definition,!("removeDialogTabs"in t._)&&t.config.removeDialogTabs){var O=t.config.removeDialogTabs.split(";");for(g=0;g1;if(t.config.dialog_startupFocusTab&&e)y._.tabBarMode=!0,y._.tabs[y._.currentTabId][0].focus(),y._.currentFocusIndex=-1;else if(!this._.hasFocus)if(this._.currentFocusIndex=e?-1:this._.focusList.length-1,_.onFocus){var i=_.onFocus.call(this);i&&i.focus()}else l(1)},this,null,4294967295),CKEDITOR.env.ie6Compat&&this.on("load",function(){var t=this.getElement(),e=t.getFirst();e.remove(),e.appendTo(t)},this),u(this),c(this),new CKEDITOR.dom.text(_.title,CKEDITOR.document).appendTo(this.parts.title),g=0;g<_.contents.length;g++){var w=_.contents[g];w&&this.addPage(w)}this.parts.tabs.on("click",function(t){var e=t.data.getTarget();if(e.hasClass("cke_dialog_tab")){var i=e.$.id;this.selectPage(i.substring(4,i.lastIndexOf("_"))),this._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1)),t.data.preventDefault()}},this);var S=[],L=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:_.buttons},S).getChild();for(this.parts.footer.setHtml(S.join("")),g=0;g0?e:0)+"px"};l[o?"right":"left"]=(t>0?t:0)+"px",n.setStyles(l),i&&(this._.moved=1)}},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var t=this._.element,e=this.definition;if(t.getParent()&&t.getParent().equals(CKEDITOR.document.getBody())?t.setStyle("display","block"):t.appendTo(CKEDITOR.document.getBody()),this.resize(this._.contentSize&&this._.contentSize.width||e.width||e.minWidth,this._.contentSize&&this._.contentSize.height||e.height||e.minHeight),this.reset(),null===this._.currentTabId&&this.selectPage(this.definition.contents[0].id),null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex),this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10),null===CKEDITOR.dialog._.currentTop)CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,g(this._.editor);else{this._.parentDialog=CKEDITOR.dialog._.currentTop;this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),CKEDITOR.dialog._.currentTop=this}t.on("keydown",R),t.on("keyup",y),this._.hasFocus=!1;for(var i in e.contents)if(e.contents[i]){var n=e.contents[i],o=this._.tabs[n.id],s=n.requiredContent,a=0;if(o){for(var r in this._.contents[n.id]){var d=this._.contents[n.id][r];"hbox"!=d.type&&"vbox"!=d.type&&d.getInputElement()&&(d.requiredContent&&!this._.editor.activeFilter.check(d.requiredContent)?d.disable():(d.enable(),a++))}!a||s&&!this._.editor.activeFilter.check(s)?o[0].addClass("cke_dialog_tab_disabled"):o[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout(),l(this),this.parts.dialog.setStyle("visibility",""),this.fireOnce("load",{}),CKEDITOR.ui.fire("ready",this),this.fire("show",{}),this._.editor.fire("dialogShow",this),this._.parentDialog||this._.editor.focusManager.lock(),this.foreach(function(t){t.setInitValue&&t.setInitValue()})},100,this)},layout:function(){var t=this.parts.dialog,e=this.getSize(),i=CKEDITOR.document.getWindow(),n=i.getViewPaneSize(),o=(n.width-e.width)/2,s=(n.height-e.height)/2;CKEDITOR.env.ie6Compat||(e.height+(s>0?s:0)>n.height||e.width+(o>0?o:0)>n.width?t.setStyle("position","absolute"):t.setStyle("position","fixed")),this.move(this._.moved?this._.position.x:o,this._.moved?this._.position.y:s)},foreach:function(t){for(var e in this._.contents)for(var i in this._.contents[e])t.call(this,this._.contents[e][i]);return this},reset:function(){var t=function(t){t.reset&&t.reset(1)};return function(){return this.foreach(t),this}}(),setupContent:function(){var t=arguments;this.foreach(function(e){e.setup&&e.setup.apply(e,t)})},commitContent:function(){var t=arguments;this.foreach(function(e){CKEDITOR.env.ie&&this._.currentFocusIndex==e.focusIndex&&e.getInputElement().$.blur(),e.commit&&e.commit.apply(e,t)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{}),this._.editor.fire("dialogHide",this),this.selectPage(this._.tabIdList[0]);var t=this._.element;for(t.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),k(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var e=this._.parentDialog.getElement().getFirst();e.setStyle("z-index",parseInt(e.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else f(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog,this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null,t.removeListener("keydown",R),t.removeListener("keyup",y);var i=this._.editor;i.focus(),setTimeout(function(){i.focusManager.unlock(),CKEDITOR.env.iOS&&i.window.focus()},0)}delete this._.parentDialog,this.foreach(function(t){t.resetInitValue&&t.resetInitValue()}),this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(t){if(!t.requiredContent||this._.editor.filter.check(t.requiredContent)){for(var e,i=[],n=t.label?' title="'+CKEDITOR.tools.htmlEncode(t.label)+'"':"",o=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:t.elements,expand:!!t.expand,padding:t.padding,style:t.style||"width: 100%;"},i),s=this._.contents[t.id]={},a=o.getChild(),r=0;e=a.shift();)e.notAllowed||"hbox"==e.type||"vbox"==e.type||r++,s[e.id]=e,"function"==typeof e.getChild&&a.push.apply(a,e.getChild());r||(t.hidden=!0);var l=CKEDITOR.dom.element.createFromHtml(i.join(""));l.setAttribute("role","tabpanel");var d=CKEDITOR.env,u="cke_"+t.id+"_"+CKEDITOR.tools.getNextNumber(),c=CKEDITOR.dom.element.createFromHtml(['0?" cke_last":"cke_first",n,t.hidden?' style="display:none"':"",' id="',u,'"',d.gecko&&!d.hc?"":' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',t.label,""].join(""));l.setAttribute("aria-labelledby",u),this._.tabs[t.id]=[c,l],this._.tabIdList.push(t.id),!t.hidden&&this._.pageCount++,this._.lastTab=c,this.updateStyle(),l.setAttribute("name",t.id),l.appendTo(this.parts.contents),c.unselectable(),this.parts.tabs.append(c),t.accessKey&&(x(this,this,"CTRL+"+t.accessKey,S,w),this._.accessKeyMap["CTRL+"+t.accessKey]=t.id)}},selectPage:function(t){if(this._.currentTabId!=t&&!this._.tabs[t][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:t,currentPage:this._.currentTabId})){for(var e in this._.tabs){var i=this._.tabs[e][0],o=this._.tabs[e][1];e!=t&&(i.removeClass("cke_dialog_tab_selected"),o.hide()),o.setAttribute("aria-hidden",e!=t)}var s=this._.tabs[t];s[0].addClass("cke_dialog_tab_selected"),CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(n(s[1]),s[1].show(),setTimeout(function(){n(s[1],1)},0)):s[1].show(),this._.currentTabId=t,this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,t)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(t){var i=this._.tabs[t]&&this._.tabs[t][0];i&&1!=this._.pageCount&&i.isVisible()&&(t==this._.currentTabId&&this.selectPage(e.call(this)),i.hide(),this._.pageCount--,this.updateStyle())},showPage:function(t){var e=this._.tabs[t]&&this._.tabs[t][0];e&&(e.show(),this._.pageCount++,this.updateStyle())},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(t,e){var i=this._.contents[t];return i&&i[e]},getValueOf:function(t,e){return this.getContentElement(t,e).getValue()},setValueOf:function(t,e,i){return this.getContentElement(t,e).setValue(i)},getButton:function(t){return this._.buttons[t]},click:function(t){return this._.buttons[t].click()},disableButton:function(t){return this._.buttons[t].disable()},enableButton:function(t){return this._.buttons[t].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(t,e){if(void 0===e)e=this._.focusList.length,this._.focusList.push(new r(this,t,e));else{this._.focusList.splice(e,0,new r(this,t,e));for(var i=e+1;i=0;n--)i[n].dialog!=t&&i[n].uiElement!=t||i.splice(n,1);0===i.length&&delete K[e]}},w=function(t,e){t._.accessKeyMap[e]&&t.selectPage(t._.accessKeyMap[e])},S=function(){};!function(){CKEDITOR.ui.dialog={uiElement:function(t,e,i,n,o,s,a){if(!(arguments.length<4)){var r,l=(n.call?n(e):n)||"div",d=["<",l," "],u=(o&&o.call?o(e):o)||{},c=(s&&s.call?s(e):s)||{},h=(a&&a.call?a.call(this,t,e):a)||"",g=this.domId=c.id||CKEDITOR.tools.getNextId()+"_uiElement";e.requiredContent&&!t.getParentEditor().filter.check(e.requiredContent)&&(u.display="none",this.notAllowed=!0),c.id=g;var f={};e.type&&(f["cke_dialog_ui_"+e.type]=1),e.className&&(f[e.className]=1),e.disabled&&(f.cke_disabled=1);var p=c.class&&c.class.split?c.class.split(" "):[];for(r=0;r=0;r--)""===I[r]&&I.splice(r,1);I.length>0&&(c.style=(c.style?c.style+"; ":"")+I.join("; "));for(r in c)d.push(r+'="'+CKEDITOR.tools.htmlEncode(c[r])+'" ');d.push(">",h,""),i.push(d.join("")),(this._||(this._={})).dialog=t,"boolean"==typeof e.isChanged&&(this.isChanged=function(){return e.isChanged}),"function"==typeof e.isChanged&&(this.isChanged=e.isChanged),"function"==typeof e.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(t){return function(i){t.call(this,e.setValue.call(this,i))}})),"function"==typeof e.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(t){return function(){return e.getValue.call(this,t.call(this))}})),CKEDITOR.event.implementOn(this),this.registerEvents(e),this.accessKeyUp&&this.accessKeyDown&&e.accessKey&&x(this,t,"CTRL+"+e.accessKey);var v=this;t.on("load",function(){var e=v.getInputElement();if(e){var i=v.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";e.on("focus",function(){t._.tabBarMode=!1,t._.hasFocus=!0,v.fire("focus"),i&&this.addClass(i)}),e.on("blur",function(){v.fire("blur"),i&&this.removeClass(i)})}}),CKEDITOR.tools.extend(this,e),this.keyboardFocusable&&(this.tabIndex=e.tabIndex||0,this.focusIndex=t._.focusList.push(this)-1,this.on("focus",function(){t._.currentFocusIndex=v.focusIndex}))}},hbox:function(t,e,i,n,o){if(!(arguments.length<4)){this._||(this._={});var s,a=this._.children=e,r=o&&o.widths||null,l=o&&o.height||null,d={},u=function(){var t=[''];for(s=0;s0&&t.push('style="'+n.join("; ")+'" '),t.push(">",i[s],"")}return t.push(""),t.join("")},c={role:"presentation"};o&&o.align&&(c.align=o.align),CKEDITOR.ui.dialog.uiElement.call(this,t,o||{type:"hbox"},n,"table",d,c,u)}},vbox:function(t,e,i,n,o){if(!(arguments.length<3)){this._||(this._={});var s=this._.children=e,a=o&&o.width||null,r=o&&o.heights||null,l=function(){var e=['");for(var n=0;n")}return e.push("
0&&e.push('style="',l.join("; "),'" '),e.push(' class="cke_dialog_ui_vbox_child">',i[n],"
"),e.join("")};CKEDITOR.ui.dialog.uiElement.call(this,t,o||{type:"vbox"},n,"div",null,{role:"presentation"},l)}}}}(),CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()}, +getDialog:function(){return this._.dialog},setValue:function(t,e){return this.getInputElement().setValue(t),!e&&this.fire("change",{value:t}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var t,e=this.getInputElement(),i=e;(i=i.getParent())&&-1==i.$.className.search("cke_dialog_page_contents"););return i?(t=i.getAttribute("name"),this._.dialog._.currentTabId!=t&&this._.dialog.selectPage(t),this):this},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(t){var e,i=/^on([A-Z]\w+)/;for(var n in t)(e=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,t[n]):function(t,e,i,n){e.on("load",function(){t.getInputElement().on(i,n,t)})}(this,this._.dialog,e[1].toLowerCase(),t[n]));return this},eventProcessors:{onLoad:function(t,e){t.on("load",e,this)},onShow:function(t,e){t.on("show",e,this)},onHide:function(t,e){t.on("hide",e,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var t=this.getElement();this.getInputElement().setAttribute("disabled","true"),t.addClass("cke_disabled")},enable:function(){var t=this.getElement();this.getInputElement().removeAttribute("disabled"),t.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return!(!this.isEnabled()||!this.isVisible())}},CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(t){return arguments.length<1?this._.children.concat():(t.splice||(t=[t]),t.length<2?this._.children[t[0]]:this._.children[t[0]]&&this._.children[t[0]].getChild?this._.children[t[0]].getChild(t.slice(1,t.length)):null)}},!0),CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox,function(){var t={build:function(t,e,i){for(var n,o=e.children,s=[],a=[],r=0;rd.width&&(n.resize_minWidth=d.width),n.resize_minHeight>d.height&&(n.resize_minHeight=d.height),CMS.$(CKEDITOR.document.$).on("pointermove",i),CMS.$(CKEDITOR.document.$).on("pointerup",t),e.document&&(CMS.$(e.document.$).on("pointermove",i),CMS.$(e.document.$).on("pointerup",t)),r.preventDefault&&r.preventDefault()});CMS.$(CKEDITOR.document.$).find("html").attr("data-touch-action","none"),e.on("destroy",function(){CKEDITOR.tools.removeFunction(c)}),e.on("uiSpace",function(i){if("bottom"==i.data.space){var t="";m&&!h&&(t=" cke_resizer_horizontal"),!m&&h&&(t=" cke_resizer_vertical");var n=''+("ltr"==o?"◢":"◣")+"";"ltr"==o&&"ltr"==t?i.data.html+=n:i.data.html=n+i.data.html}},e,null,100),e.on("maximize",function(i){e.ui.space("resizer")[i.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}})}(CMS.$); +!function(e){function t(e){var t=(e.match(/<\s*([^>\s]+)[\s\S]*?>/)||[0,!1]).splice(1),i=t.some(function(e){return e&&CKEDITOR.dtd.$block[e]}),n="span";return i&&(n="div"),n}function i(t,i){t.each(function(t,n){var s,l=e(n);s=e("<"+i+">"),e.each(n.attributes,function(e,t){s.attr(t.nodeName,t.nodeValue)}),s.html(l.html()),l.replaceWith(s)})}CKEDITOR&&CKEDITOR.plugins&&CKEDITOR.plugins.registered&&CKEDITOR.plugins.registered.cmsplugins||CKEDITOR.plugins.add("cmsplugins",{icons:"cmsplugins",init:function(t){var i=this;if(this.options=CMS.CKEditor.options.settings,this.editor=t,this.child_plugins=[],this.setupCancelCleanupCallback(this.options),void 0===this.options||void 0===this.options.plugins)return!1;this.setupDialog(),this.editor.ui.add("cmsplugins",CKEDITOR.UI_PANELBUTTON,{toolbar:"cms,0",label:this.options.lang.toolbar,title:this.options.lang.toolbar,className:"cke_panelbutton__cmsplugins",modes:{wysiwyg:1},editorFocus:0,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(i.editor.config.contentsCss),attributes:{role:"cmsplugins","aria-label":this.options.lang.aria}},onBlock:function(t,n){n.element.setHtml(i.editor.plugins.cmsplugins.setupDropdown()),e(n.element.$).find(".cke_panel_listItem a").bind("click",function(n){n.preventDefault(),i.addPlugin(e(this),t)})}}),this.editor.contextMenu&&this.setupContextMenu(),this.editor.addCommand("cmspluginsEdit",{exec:function(){var e=i.getElementFromSelection(),t=i.getPluginWidget(e);t&&i.editPlugin(t)}});var n=function(t){var n;if("touchend"===t.type||"click"===t.type){var s=e(t.currentTarget).closest("cms-plugin")[0];n=new CKEDITOR.dom.element(s).getParent(),t.data=t.data||{},i.editor.getSelection().fake(n)}i.editor.execCommand("cmspluginsEdit")};this.editor.on("doubleclick",n),this.editor.on("instanceReady",function(){CMS.$("cms-plugin",CMS.$("iframe.cke_wysiwyg_frame")[0].contentWindow.document.documentElement).on("click touchend",n)}),this.setupDataProcessor()},getElementFromSelection:function(){var e=this.editor.getSelection();return e.getSelectedElement()||e.getCommonAncestor().getAscendant("cms-plugin",!0)},getPluginWidget:function(e){return e?e.getAscendant("cms-plugin",!0)||e.findOne("cms-plugin"):null},setupDialog:function(){var t=this,i=function(){return{title:"",minWidth:200,minHeight:200,contents:[{elements:[{type:"html",html:'