esp-ckeditor 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +32 -0
- data/Rakefile +28 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/_bootstrap.js +87 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor.js +141 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor_base.js +227 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ckeditor_basic.js +238 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/command.js +209 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/commanddefinition.js +129 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/config.js +423 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dataprocessor.js +65 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/comment.js +32 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/document.js +251 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/documentfragment.js +49 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/domobject.js +258 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/element.js +1691 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/elementpath.js +119 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/event.js +145 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/node.js +696 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/nodelist.js +26 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/range.js +2054 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/rangelist.js +213 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/text.js +128 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/walker.js +462 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom/window.js +96 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dom.js +20 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/dtd.js +266 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/editor.js +1060 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/editor_basic.js +186 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/env.js +305 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/event.js +342 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/eventInfo.js +120 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/focusmanager.js +152 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/basicwriter.js +145 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/cdata.js +43 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/comment.js +60 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/element.js +308 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/filter.js +288 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/fragment.js +518 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser/text.js +53 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/htmlparser.js +224 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/lang.js +157 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/loader.js +240 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/plugindefinition.js +83 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/plugins.js +103 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/resourcemanager.js +238 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/scriptloader.js +180 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/skins.js +184 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/themes.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/tools.js +763 -0
- data/app/assets/javascripts/esp-ckeditor/_source/core/ui.js +128 -0
- data/app/assets/javascripts/esp-ckeditor/_source/lang/_languages.js +27 -0
- data/app/assets/javascripts/esp-ckeditor/_source/lang/en.js +815 -0
- data/app/assets/javascripts/esp-ckeditor/_source/lang/ru.js +815 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +222 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/lang/en.js +108 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/lang/he.js +216 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/a11yhelp/plugin.js +47 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/basicstyles/plugin.js +129 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/button/plugin.js +290 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/clipboard/dialogs/paste.js +223 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/clipboard/plugin.js +453 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/contextmenu/plugin.js +179 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialog/dialogDefinition.js +1166 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialog/plugin.js +3308 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialogadvtab/plugin.js +208 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/dialogui/plugin.js +1541 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/domiterator/plugin.js +361 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/editingblock/plugin.js +278 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/elementspath/plugin.js +218 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/enterkey/plugin.js +433 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/entities/plugin.js +250 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/dialogs/esp_attachment.js +234 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/images/esp_attachment.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/en.js +22 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/ru.js +22 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/lang/uk.js +22 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_attachment/plugin.js +23 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/dialogs/esp_audio.js +207 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/images/esp_audio.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/en.js +18 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/ru.js +18 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/lang/uk.js +18 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_audio/plugin.js +182 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_blockquote/dialogs/esp_blockquote.js +132 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_blockquote/plugin.js +235 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/dialogs/esp_image.js +1414 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/images/esp_image.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/en.js +9 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/ru.js +9 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/lang/uk.js +9 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_image/plugin.js +80 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/dialogs/esp_anchor.js +145 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/dialogs/esp_link.js +1396 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_link.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/images/esp_unlink.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/en.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/ru.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/lang/uk.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_link/plugin.js +379 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_address.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_blockquote.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_div.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h1.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h2.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h3.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h4.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h5.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_h6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_p.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/block_pre.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/images/esp_showblocks.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_showblocks/plugin.js +163 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/dialogs/esp_video.js +277 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/images/esp_video.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/en.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/ru.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/lang/uk.js +19 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/esp_video/plugin.js +182 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/fakeobjects/plugin.js +175 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/filebrowser/plugin.js +534 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/find/dialogs/find.js +915 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/find/plugin.js +47 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/floatpanel/plugin.js +428 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/format/plugin.js +197 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/htmldataprocessor/plugin.js +596 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/htmlwriter/plugin.js +319 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/image/dialogs/image.js +1407 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/image/plugin.js +81 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/indent/plugin.js +461 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/justify/plugin.js +253 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/keystrokes/plugin.js +225 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/list/plugin.js +774 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/listblock/plugin.js +266 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +225 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/liststyle/plugin.js +66 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/maximize/plugin.js +353 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/menu/plugin.js +541 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/panel/plugin.js +400 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastefromword/filter/default.js +1367 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastefromword/plugin.js +141 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +67 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/pastetext/plugin.js +98 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/popup/plugin.js +64 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/removeformat/plugin.js +185 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/resize/plugin.js +168 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/richcombo/plugin.js +381 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/selection/plugin.js +1729 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/showborders/plugin.js +207 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/sourcearea/plugin.js +209 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/styles/plugin.js +1700 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/styles/styles/default.js +88 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/stylescombo/plugin.js +218 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/tab/plugin.js +367 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/table/dialogs/table.js +623 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/table/plugin.js +78 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +525 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/tabletools/plugin.js +1194 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/toolbar/plugin.js +545 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/undo/plugin.js +578 -0
- data/app/assets/javascripts/esp-ckeditor/_source/plugins/wysiwygarea/plugin.js +1347 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/dialog.css +988 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/editor.css +25 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/elementspath.css +73 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons.css +367 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/icons_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/mini.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/noimage.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/sprites.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/mainui.css +209 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/menu.css +232 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/panel.css +227 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/presets.css +49 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/reset.css +85 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/richcombo.css +287 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/skin.js +236 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/templates.css +88 -0
- data/app/assets/javascripts/esp-ckeditor/_source/skins/kama/toolbar.css +412 -0
- data/app/assets/javascripts/esp-ckeditor/_source/themes/default/theme.js +407 -0
- data/app/assets/javascripts/esp-ckeditor/application.js +8 -0
- data/app/assets/javascripts/esp-ckeditor/ckeditor.js +137 -0
- data/app/assets/javascripts/esp-ckeditor/ckeditor.pack +194 -0
- data/app/assets/javascripts/esp-ckeditor/ckeditor_source.js +35 -0
- data/app/assets/javascripts/esp-ckeditor/ckpackager.jar +0 -0
- data/app/assets/javascripts/esp-ckeditor/ckpackager.txt +2 -0
- data/app/assets/javascripts/esp-ckeditor/config.js +147 -0
- data/app/assets/javascripts/esp-ckeditor/contents.css +38 -0
- data/app/assets/javascripts/esp-ckeditor/images/spacer.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/init_ckeditor.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/lang/he.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/a11yhelp/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/basicstyles/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/button/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/clipboard/dialogs/paste.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/clipboard/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/contextmenu/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialog/dialogDefinition.js +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialog/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialogadvtab/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/dialogui/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/domiterator/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/editingblock/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/elementspath/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/enterkey/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/entities/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/dialogs/esp_attachment.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/images/esp_attachment.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_attachment/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/dialogs/esp_audio.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/images/esp_audio.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_audio/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_blockquote/dialogs/esp_blockquote.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_blockquote/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/dialogs/esp_image.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/images/esp_image.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_image/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/dialogs/esp_anchor.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/dialogs/esp_link.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_anchor.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_link.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/images/esp_unlink.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_link/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_address.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_blockquote.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_div.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h1.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h2.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h3.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h4.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h5.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_h6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_p.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/block_pre.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/images/esp_showblocks.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_showblocks/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/dialogs/esp_video.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/images/esp_video.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/images/placeholder.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/en.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/ru.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/lang/uk.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/esp_video/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/fakeobjects/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/filebrowser/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/find/dialogs/find.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/find/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/floatpanel/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/format/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/htmldataprocessor/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/htmlwriter/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/image/dialogs/image.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/image/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/indent/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/justify/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/keystrokes/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/list/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/listblock/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/liststyle/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/maximize/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/menu/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/panel/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastefromword/filter/default.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastefromword/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastetext/dialogs/pastetext.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/pastetext/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/popup/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/removeformat/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/resize/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/richcombo/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/selection/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/showborders/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/sourcearea/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/styles/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/styles/styles/default.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/stylescombo/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/tab/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/table/dialogs/table.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/table/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/tabletools/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/toolbar/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/undo/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/plugins/wysiwygarea/plugin.js +1 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/dialog.css +988 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/editor.css +25 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/elementspath.css +73 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/icons.css +367 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/icons.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/icons_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/mini.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/noimage.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/sprites.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/images/toolbar_start.gif +0 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/mainui.css +209 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/menu.css +232 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/panel.css +227 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/presets.css +49 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/reset.css +85 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/richcombo.css +287 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/skin.js +236 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/templates.css +88 -0
- data/app/assets/javascripts/esp-ckeditor/skins/kama/toolbar.css +412 -0
- data/app/inputs/ckeditor_input.rb +42 -0
- data/config/routes.rb +2 -0
- data/lib/esp-ckeditor/engine.rb +9 -0
- data/lib/esp-ckeditor/version.rb +3 -0
- data/lib/esp-ckeditor.rb +17 -0
- data/lib/tasks/esp-ckeditor_tasks.rake +4 -0
- metadata +434 -0
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.dialog.add("paste",function(c){var d=c.lang.clipboard;var b=CKEDITOR.env.isCustomDomain();function a(h){var g=new CKEDITOR.dom.document(h.document),f=g.$;var e=g.getById("cke_actscrpt");e&&e.remove();CKEDITOR.env.ie?f.body.contentEditable="true":f.designMode="on";if(CKEDITOR.env.ie&&CKEDITOR.env.version<8){g.getWindow().on("blur",function(){f.selection.empty()})}g.on("keydown",function(k){var j=k.data,i=j.getKeystroke(),l;switch(i){case 27:this.hide();l=1;break;case 9:case CKEDITOR.SHIFT+9:this.changeFocus(true);l=1}l&&j.preventDefault()},this);c.fire("ariaWidget",new CKEDITOR.dom.element(h.frameElement))}return{title:d.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?370:350,minHeight:CKEDITOR.env.quirks?250:245,onShow:function(){this.parts.dialog.$.offsetHeight;this.setupContent()},onHide:function(){if(CKEDITOR.env.ie){this.getParentEditor().document.getBody().$.contentEditable="true"}},onLoad:function(){if((CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&c.lang.dir=="rtl"){this.parts.contents.setStyle("overflow","hidden")}},onOk:function(){this.commitContent()},contents:[{id:"general",label:c.lang.common.generalTab,elements:[{type:"html",id:"securityMsg",html:'<div style="white-space:normal;width:340px;">'+d.securityMsg+"</div>"},{type:"html",id:"pasteMsg",html:'<div style="white-space:normal;width:340px;">'+d.pasteMsg+"</div>"},{type:"html",id:"editing_area",style:"width: 100%; height: 100%;",html:"",focus:function(){var e=this.getInputElement().$.contentWindow;setTimeout(function(){e.focus()},500)},setup:function(){var h=this.getDialog();var e='<html dir="'+c.config.contentsLangDirection+'" lang="'+(c.config.contentsLanguage||c.langCode)+'"><head><style>body { margin: 3px; height: 95%; } </style></head><body><script id="cke_actscrpt" type="text/javascript">window.parent.CKEDITOR.tools.callFunction( '+CKEDITOR.tools.addFunction(a,h)+", this );<\/script></body></html>";var j=CKEDITOR.env.air?"javascript:void(0)":b?"javascript:void((function(){document.open();document.domain='"+document.domain+"';document.close();})())\"":"";var i=CKEDITOR.dom.element.createFromHtml('<iframe class="cke_pasteframe" frameborder="0" allowTransparency="true" src="'+j+'" role="region" aria-label="'+d.pasteArea+'" aria-describedby="'+h.getContentElement("general","pasteMsg").domId+'" aria-multiple="true"></iframe>');i.on("load",function(l){l.removeListener();var k=i.getFrameDocument();k.write(e);if(CKEDITOR.env.air){a.call(this,k.getWindow().$)}},h);i.setCustomData("dialog",h);var f=this.getElement();f.setHtml("");f.append(i);if(CKEDITOR.env.ie){var g=CKEDITOR.dom.element.createFromHtml('<span tabindex="-1" style="position:absolute;" role="presentation"></span>');g.on("focus",function(){i.$.contentWindow.focus()});f.append(g);this.focus=function(){g.focus();this.fire("focus")}}this.getInputElement=function(){return i};if(CKEDITOR.env.ie){f.setStyle("display","block");f.setStyle("height",(i.$.offsetHeight+2)+"px")}},commit:function(j){var f=this.getElement(),i=this.getDialog().getParentEditor(),e=this.getInputElement().getFrameDocument().getBody(),h=e.getBogus(),g;h&&h.remove();g=e.getHtml();setTimeout(function(){i.fire("paste",{html:g})},0)}}]}]}});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var c=function(o,q){var p=o.document,m=p.getBody();var n=0;var r=function(){n=1};m.on(q,r);(CKEDITOR.env.version>7?p.$:p.$.selection.createRange())["execCommand"](q);m.removeListener(q,r);return n};var h=CKEDITOR.env.ie?function(n,m){return c(n,m)}:function(n,m){try{return n.document.$.execCommand(m,false,null)}catch(o){return false}};var k=function(m){this.type=m;this.canUndo=this.type=="cut";this.startDisabled=true};k.prototype={exec:function(m,n){this.type=="cut"&&i(m);var o=h(m,this.type);if(!o){alert(m.lang.clipboard[this.type+"Error"])}return o}};var g={canUndo:false,exec:CKEDITOR.env.ie?function(m){m.focus();if(!m.document.getBody().fire("beforepaste")&&!c(m,"paste")){m.fire("pasteDialog");return false}}:function(m){try{if(!m.document.getBody().fire("beforepaste")&&!m.document.$.execCommand("Paste",false,null)){throw 0}}catch(n){setTimeout(function(){m.fire("pasteDialog")},0);return false}}};var f=function(o){if(this.mode!="wysiwyg"){return}switch(o.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:var m=this.document.getBody();if(!CKEDITOR.env.ie&&m.fire("beforepaste")){o.cancel()}else{if(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.version<10900){m.fire("paste")}}return;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:var n=this;this.fire("saveSnapshot");setTimeout(function(){n.fire("saveSnapshot")},0)}};function l(m){m.cancel()}function j(u,q,v){var s=this.document;if(s.getById("cke_pastebin")){return}if(q=="text"&&u.data&&u.data.$.clipboardData){var t=u.data.$.clipboardData.getData("text/plain");if(t){u.data.preventDefault();v(t);return}}var m=this.getSelection(),p=new CKEDITOR.dom.range(s);var n=new CKEDITOR.dom.element(q=="text"?"textarea":CKEDITOR.env.webkit?"body":"div",s);n.setAttribute("id","cke_pastebin");CKEDITOR.env.webkit&&n.append(s.createText("\xa0"));s.getBody().append(n);n.setStyles({position:"absolute",top:m.getStartElement().getDocumentPosition().y+"px",width:"1px",height:"1px",overflow:"hidden"});n.setStyle(this.config.contentsLangDirection=="ltr"?"left":"right","-1000px");var o=m.createBookmarks();this.on("selectionChange",l,null,null,0);if(q=="text"){n.$.focus()}else{p.setStartAt(n,CKEDITOR.POSITION_AFTER_START);p.setEndAt(n,CKEDITOR.POSITION_BEFORE_END);p.select(true)}var r=this;window.setTimeout(function(){q=="text"&&CKEDITOR.env.gecko&&r.focusGrabber.focus();n.remove();r.removeListener("selectionChange",l);var w;n=(CKEDITOR.env.webkit&&(w=n.getFirst())&&(w.is&&w.hasClass("Apple-style-span"))?w:n);m.selectBookmarks(o);v(n["get"+(q=="text"?"Value":"Html")]())},0)}function i(n){if(!CKEDITOR.env.ie||CKEDITOR.env.quirks){return}var o=n.getSelection();var q;if((o.getType()==CKEDITOR.SELECTION_ELEMENT)&&(q=o.getSelectedElement())){var m=o.getRanges()[0];var p=n.document.createText("");p.insertBefore(q);m.setStartBefore(p);m.setEndAfter(q);o.selectRanges([m]);setTimeout(function(){if(q.getParent()){p.remove();o.selectElement(q)}},0)}}var b;function a(o,n){CKEDITOR.env.ie&&(b=1);var m=CKEDITOR.TRISTATE_OFF;try{m=n.document.$.queryCommandEnabled(o)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}catch(p){}b=0;return m}var d;function e(){if(this.mode!="wysiwyg"){return}this.getCommand("cut").setState(d?CKEDITOR.TRISTATE_DISABLED:a("Cut",this));this.getCommand("copy").setState(a("Copy",this));var m=d?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.env.webkit?CKEDITOR.TRISTATE_OFF:a("Paste",this);this.fire("pasteState",m)}CKEDITOR.plugins.add("clipboard",{requires:["dialog","htmldataprocessor"],init:function(m){m.on("paste",function(o){var p=o.data;if(p.html){m.insertHtml(p.html)}else{if(p.text){m.insertText(p.text)}}setTimeout(function(){m.fire("afterPaste")},0)},null,null,1000);m.on("pasteDialog",function(o){setTimeout(function(){m.openDialog("paste")},0)});m.on("pasteState",function(o){m.getCommand("paste").setState(o.data)});function n(o,q,s,p){var r=m.lang[q];m.addCommand(q,s);m.ui.addButton(o,{label:r,command:q});if(m.addMenuItems){m.addMenuItem(q,{label:r,command:q,group:"clipboard",order:p})}}n("Cut","cut",new k("cut"),1);n("Copy","copy",new k("copy"),4);n("Paste","paste",g,8);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));m.on("key",f,m);m.on("contentDom",function(){var o=m.document.getBody();o.on(CKEDITOR.env.webkit?"paste":"beforepaste",function(p){if(b){return}var q={mode:"html"};m.fire("beforePaste",q);j.call(m,p,q.mode,function(s){if(!(s=CKEDITOR.tools.trim(s.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"")))){return}var r={};r[q.mode]=s;m.fire("paste",r)})});o.on("contextmenu",function(){b=1;setTimeout(function(){b=0},10)});o.on("beforecut",function(){!b&&i(m)});o.on("mouseup",function(){setTimeout(function(){e.call(m)},0)},m);o.on("keyup",e,m)});m.on("selectionChange",function(o){d=o.data.selection.getRanges()[0].checkReadOnly();e.call(m)});if(m.contextMenu){m.contextMenu.addListener(function(o,p){var q=p.getRanges()[0].checkReadOnly();return{cut:!q&&a("Cut",m),copy:a("Copy",m),paste:!q&&(CKEDITOR.env.webkit?CKEDITOR.TRISTATE_OFF:a("Paste",m))}})}}})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("contextmenu",{requires:["menu"],onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(a){this.base.call(this,a,{panel:{className:a.skinClass+" cke_contextmenu",attributes:{"aria-label":a.lang.contextmenu.options}}})},proto:{addTarget:function(d,e){if(CKEDITOR.env.opera&&!("oncontextmenu" in document.body)){var a;d.on("mousedown",function(g){g=g.data;if(g.$.button!=2){if(g.getKeystroke()==CKEDITOR.CTRL+1){d.fire("contextmenu",g)}return}if(e&&(CKEDITOR.env.mac?g.$.metaKey:g.$.ctrlKey)){return}var i=g.getTarget();if(!a){var h=i.getDocument();a=h.createElement("input");a.$.type="button";h.getBody().append(a)}a.setAttribute("style","position:absolute;top:"+(g.$.clientY-2)+"px;left:"+(g.$.clientX-2)+"px;width:5px;height:5px;opacity:0.01")});d.on("mouseup",function(g){if(a){a.remove();a=undefined;d.fire("contextmenu",g.data)}})}d.on("contextmenu",function(j){var h=j.data;if(e&&(CKEDITOR.env.webkit?b:(CKEDITOR.env.mac?h.$.metaKey:h.$.ctrlKey))){return}h.preventDefault();var i=h.getTarget().getDocument().getDocumentElement(),g=h.$.clientX,k=h.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(i,null,g,k)},CKEDITOR.env.ie?200:0,this)},this);if(CKEDITOR.env.opera){d.on("keypress",function(g){var h=g.data;if(h.$.keyCode===0){h.preventDefault()}})}if(CKEDITOR.env.webkit){var b,c=function(g){b=CKEDITOR.env.mac?g.data.$.metaKey:g.data.$.ctrlKey},f=function(){b=0};d.on("keydown",c);d.on("keyup",f);d.on("contextmenu",f)}},open:function(c,b,a,d){this.editor.focus();c=c||CKEDITOR.document.getDocumentElement();this.show(c,b,a,d)}}})},beforeInit:function(a){a.contextMenu=new CKEDITOR.plugins.contextMenu(a);a.addCommand("contextMenu",{exec:function(){a.contextMenu.open(a.document.getBody())}})}});
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.DIALOG_RESIZE_NONE=0;CKEDITOR.DIALOG_RESIZE_WIDTH=1;CKEDITOR.DIALOG_RESIZE_HEIGHT=2;CKEDITOR.DIALOG_RESIZE_BOTH=3;(function(){var h=CKEDITOR.tools.cssLength;function f(G){return !!this._.tabs[G][0].$.offsetHeight}function q(){var H=this._.currentTabId,J=this._.tabIdList.length,G=CKEDITOR.tools.indexOf(this._.tabIdList,H)+J;for(var I=G-1;I>G-J;I--){if(f.call(this,this._.tabIdList[I%J])){return this._.tabIdList[I%J]}}return null}function A(){var H=this._.currentTabId,J=this._.tabIdList.length,G=CKEDITOR.tools.indexOf(this._.tabIdList,H);for(var I=G+1;I<G+J;I++){if(f.call(this,this._.tabIdList[I%J])){return this._.tabIdList[I%J]}}return null}function r(H,J){var G=H.$.getElementsByTagName("input");for(var I=0,L=G.length;I<L;I++){var K=new CKEDITOR.dom.element(G[I]);if(K.getAttribute("type").toLowerCase()=="text"){if(J){K.setAttribute("value",K.getCustomData("fake_value")||"");K.removeCustomData("fake_value")}else{K.setCustomData("fake_value",K.getAttribute("value"));K.setAttribute("value","")}}}}function b(H,I){var G=this.getInputElement();if(G){H?G.removeAttribute("aria-invalid"):G.setAttribute("aria-invalid",true)}if(!H){if(this.select){this.select()}else{this.focus()}}I&&alert(I);this.fire("validated",{valid:H,msg:I})}function x(){var G=this.getInputElement();G&&G.removeAttribute("aria-invalid")}CKEDITOR.dialog=function(J,N){var K=CKEDITOR.dialog._.dialogDefinitions[N],X=CKEDITOR.tools.clone(t),ad=J.config.dialog_buttonsOrder||"OS",Q=J.lang.dir;if((ad=="OS"&&CKEDITOR.env.mac)||(ad=="rtl"&&Q=="ltr")||(ad=="ltr"&&Q=="rtl")){X.buttons.reverse()}K=CKEDITOR.tools.extend(K(J),X);K=CKEDITOR.tools.clone(K);K=new s(this,K);var ae=CKEDITOR.document;var V=J.theme.buildDialog(J);this._={editor:J,element:V.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:false,focusList:[],currentFocusIndex:0,hasFocus:false};this.parts=V.parts;CKEDITOR.tools.setTimeout(function(){J.fire("ariaWidget",this.parts.contents)},0,this);var ab={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};ab[Q=="rtl"?"right":"left"]=0;this.parts.dialog.setStyles(ab);CKEDITOR.event.call(this);this.definition=K=CKEDITOR.fire("dialogDefinition",{name:N,definition:K},J).definition;var I={};if(!("removeDialogTabs" in J._)&&J.config.removeDialogTabs){var aa=J.config.removeDialogTabs.split(";");for(W=0;W<aa.length;W++){var S=aa[W].split(":");if(S.length==2){var H=S[0];if(!I[H]){I[H]=[]}I[H].push(S[1])}}J._.removeDialogTabs=I}if(J._.removeDialogTabs&&(I=J._.removeDialogTabs[N])){for(W=0;W<I.length;W++){K.removeContents(I[W])}}if(K.onLoad){this.on("load",K.onLoad)}if(K.onShow){this.on("show",K.onShow)}if(K.onHide){this.on("hide",K.onHide)}if(K.onOk){this.on("ok",function(af){J.fire("saveSnapshot");setTimeout(function(){J.fire("saveSnapshot")},0);if(K.onOk.call(this,af)===false){af.data.hide=false}})}if(K.onCancel){this.on("cancel",function(af){if(K.onCancel.call(this,af)===false){af.data.hide=false}})}var ac=this;var T=function(aj){var ai=ac._.contents,ah=false;for(var ag in ai){for(var af in ai[ag]){ah=aj.call(this,ai[ag][af]);if(ah){return}}}};this.on("ok",function(af){T(function(ah){if(ah.validate){var ag=ah.validate(this),ai=typeof(ag)=="string"||ag===false;if(ai){af.data.hide=false;af.stop()}b.call(ah,!ai,typeof ag=="string"?ag:undefined);return ai}})},this,null,0);this.on("cancel",function(af){T(function(ag){if(ag.isChanged()){if(!confirm(J.lang.common.confirmCancel)){af.data.hide=false}return true}})},this,null,0);this.parts.close.on("click",function(af){if(this.fire("cancel",{hide:true}).hide!==false){this.hide()}af.data.preventDefault()},this);function P(){var ah=ac._.focusList;ah.sort(function(aj,ai){if(aj.tabIndex!=ai.tabIndex){return ai.tabIndex-aj.tabIndex}else{return aj.focusIndex-ai.focusIndex}});var ag=ah.length;for(var af=0;af<ag;af++){ah[af].focusIndex=af}}function Z(ag){var al=ac._.focusList,ak=ag?1:-1;if(al.length<1){return}var ai=ac._.currentFocusIndex;try{al[ai].getInputElement().$.blur()}catch(ah){}var aj=(ai+ak+al.length)%al.length,af=aj;while(!al[af].isFocusable()){af=(af+ak+al.length)%al.length;if(af==aj){break}}al[af].focus();if(al[af].type=="text"){al[af].select()}}this.changeFocus=Z;var G;function R(af){if(ac!=CKEDITOR.dialog._.currentTop){return}var aj=af.data.getKeystroke(),ai=J.lang.dir=="rtl";G=0;if(aj==9||aj==CKEDITOR.SHIFT+9){var ah=(aj==CKEDITOR.SHIFT+9);if(ac._.tabBarMode){var ag=ah?q.call(ac):A.call(ac);ac.selectPage(ag);ac._.tabs[ag][0].focus()}else{Z(!ah)}G=1}else{if(aj==CKEDITOR.ALT+121&&!ac._.tabBarMode&&ac.getPageCount()>1){ac._.tabBarMode=true;ac._.tabs[ac._.currentTabId][0].focus();G=1}else{if((aj==37||aj==39)&&ac._.tabBarMode){ag=(aj==(ai?39:37)?q.call(ac):A.call(ac));ac.selectPage(ag);ac._.tabs[ag][0].focus();G=1}else{if((aj==13||aj==32)&&ac._.tabBarMode){this.selectPage(this._.currentTabId);this._.tabBarMode=false;this._.currentFocusIndex=-1;Z(true);G=1}}}}if(G){af.stop();af.data.preventDefault()}}function M(af){G&&af.data.preventDefault()}var U=this._.element;this.on("show",function(){U.on("keydown",R,this,null,0);if(CKEDITOR.env.opera||(CKEDITOR.env.gecko&&CKEDITOR.env.mac)){U.on("keypress",M,this)}});this.on("hide",function(){U.removeListener("keydown",R);if(CKEDITOR.env.opera||(CKEDITOR.env.gecko&&CKEDITOR.env.mac)){U.removeListener("keypress",M)}T(function(af){x.apply(af)})});this.on("iframeAdded",function(af){var ag=new CKEDITOR.dom.document(af.data.iframe.$.contentWindow.document);ag.on("keydown",R,this,null,0)});this.on("show",function(){P();if(J.config.dialog_startupFocusTab&&ac._.pageCount>1){ac._.tabBarMode=true;ac._.tabs[ac._.currentTabId][0].focus()}else{if(!this._.hasFocus){this._.currentFocusIndex=-1;if(K.onFocus){var ag=K.onFocus.call(this);ag&&ag.focus()}else{Z(true)}if(this._.editor.mode=="wysiwyg"&&CKEDITOR.env.ie){var af=J.document.$.selection,ai=af.createRange();if(ai){if(ai.parentElement&&ai.parentElement().ownerDocument==J.document.$||ai.item&&ai.item(0).ownerDocument==J.document.$){var ah=document.body.createTextRange();ah.moveToElementText(this.getElement().getFirst().$);ah.collapse(true);ah.select()}}}}}},this,null,4294967295);if(CKEDITOR.env.ie6Compat){this.on("load",function(af){var ah=this.getElement(),ag=ah.getFirst();ag.remove();ag.appendTo(ah)},this)}v(this);E(this);(new CKEDITOR.dom.text(K.title,CKEDITOR.document)).appendTo(this.parts.title);for(var W=0;W<K.contents.length;W++){var L=K.contents[W];L&&this.addPage(L)}this.parts.tabs.on("click",function(af){var ag=af.data.getTarget();if(ag.hasClass("cke_dialog_tab")){var ah=ag.$.id;this.selectPage(ah.substring(4,ah.lastIndexOf("_")));if(this._.tabBarMode){this._.tabBarMode=false;this._.currentFocusIndex=-1;Z(true)}af.data.preventDefault()}},this);var O=[],Y=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:K.buttons},O).getChild();this.parts.footer.setHtml(O.join(""));for(W=0;W<Y.length;W++){this._.buttons[Y[W].id]=Y[W]}};function C(I,H,G){this.element=H;this.focusIndex=G;this.tabIndex=0;this.isFocusable=function(){return !H.getAttribute("disabled")&&H.isVisible()};this.focus=function(){I._.currentFocusIndex=this.focusIndex;this.element.focus()};H.on("keydown",function(J){if(J.data.getKeystroke() in {32:1,13:1}){this.fire("click")}});H.on("focus",function(){this.fire("mouseover")});H.on("blur",function(){this.fire("mouseout")})}CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:(function(){return function(H,G){if(this._.contentSize&&this._.contentSize.width==H&&this._.contentSize.height==G){return}CKEDITOR.dialog.fire("resize",{dialog:this,skin:this._.editor.skinName,width:H,height:G},this._.editor);this.fire("resize",{skin:this._.editor.skinName,width:H,height:G},this._.editor);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:H,height:G}}})(),getSize:function(){var G=this._.element.getFirst();return{width:G.$.offsetWidth||0,height:G.$.offsetHeight||0}},move:(function(){var G;return function(O,L,K){var I=this._.element.getFirst(),M=this._.editor.lang.dir=="rtl";if(G===undefined){G=I.getComputedStyle("position")=="fixed"}if(G&&this._.position&&this._.position.x==O&&this._.position.y==L){return}this._.position={x:O,y:L};if(!G){var N=CKEDITOR.document.getWindow().getScrollPosition();O+=N.x;L+=N.y}if(M){var H=this.getSize(),J=CKEDITOR.document.getWindow().getViewPaneSize();O=J.width-H.width-O}var P={top:(L>0?L:0)+"px"};P[M?"right":"left"]=(O>0?O:0)+"px";I.setStyles(P);K&&(this._.moved=1)}})(),getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var I=this._.element;var H=this.definition;if(!(I.getParent()&&I.getParent().equals(CKEDITOR.document.getBody()))){I.appendTo(CKEDITOR.document.getBody())}else{I.setStyle("display","block")}if(CKEDITOR.env.gecko&&CKEDITOR.env.version<10900){var J=this.parts.dialog;J.setStyle("position","absolute");setTimeout(function(){J.setStyle("position","fixed")},0)}this.resize(this._.contentSize&&this._.contentSize.width||H.width||H.minWidth,this._.contentSize&&this._.contentSize.height||H.height||H.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(CKEDITOR.dialog._.currentZIndex===null){CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex}this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10);if(CKEDITOR.dialog._.currentTop===null){CKEDITOR.dialog._.currentTop=this;this._.parentDialog=null;i(this._.editor);I.on("keydown",n);I.on(CKEDITOR.env.opera?"keypress":"keyup",y);for(var K in {keyup:1,keydown:1,keypress:1}){I.on(K,D)}}else{this._.parentDialog=CKEDITOR.dialog._.currentTop;var G=this._.parentDialog.getElement().getFirst();G.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);CKEDITOR.dialog._.currentTop=this}l(this,this,"\x1b",null,function(){this.getButton("cancel")&&this.getButton("cancel").click()});this._.hasFocus=false;CKEDITOR.tools.setTimeout(function(){this.layout();this.parts.dialog.setStyle("visibility","");this.fireOnce("load",{});CKEDITOR.ui.fire("ready",this);this.fire("show",{});this._.editor.fire("dialogShow",this);this.foreach(function(L){L.setInitValue&&L.setInitValue()})},100,this)},layout:function(){var H=CKEDITOR.document.getWindow().getViewPaneSize(),G=this.getSize();this.move(this._.moved?this._.position.x:(H.width-G.width)/2,this._.moved?this._.position.y:(H.height-G.height)/2)},foreach:function(I){for(var H in this._.contents){for(var G in this._.contents[H]){I.call(this,this._.contents[H][G])}}return this},reset:(function(){var G=function(H){if(H.reset){H.reset(1)}};return function(){this.foreach(G);return this}})(),setupContent:function(){var G=arguments;this.foreach(function(H){if(H.setup){H.setup.apply(H,G)}})},commitContent:function(){var G=arguments;this.foreach(function(H){if(CKEDITOR.env.ie&&this._.currentFocusIndex==H.focusIndex){H.getInputElement().$.blur()}if(H.commit){H.commit.apply(H,G)}})},hide:function(){if(!this.parts.dialog.isVisible()){return}this.fire("hide",{});this._.editor.fire("dialogHide",this);var H=this._.element;H.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");k(this);while(CKEDITOR.dialog._.currentTop!=this){CKEDITOR.dialog._.currentTop.hide()}if(!this._.parentDialog){o()}else{var G=this._.parentDialog.getElement().getFirst();G.setStyle("z-index",parseInt(G.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}CKEDITOR.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){CKEDITOR.dialog._.currentZIndex=null;H.removeListener("keydown",n);H.removeListener(CKEDITOR.env.opera?"keypress":"keyup",y);for(var K in {keyup:1,keydown:1,keypress:1}){H.removeListener(K,D)}var J=this._.editor;J.focus();if(J.mode=="wysiwyg"&&CKEDITOR.env.ie){var I=J.getSelection();I&&I.unlock(true)}}else{CKEDITOR.dialog._.currentZIndex-=10}delete this._.parentDialog;this.foreach(function(L){L.resetInitValue&&L.resetInitValue()})},addPage:function(M){var J=[],N=M.label?' title="'+CKEDITOR.tools.htmlEncode(M.label)+'"':"",G=M.elements,Q=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:M.elements,expand:!!M.expand,padding:M.padding,style:M.style||"width: 100%;height:100%"},J);var P=CKEDITOR.dom.element.createFromHtml(J.join(""));P.setAttribute("role","tabpanel");var O=CKEDITOR.env;var I="cke_"+M.id+"_"+CKEDITOR.tools.getNextNumber(),K=CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"',(this._.pageCount>0?" cke_last":"cke_first"),N,(!!M.hidden?' style="display:none"':""),' id="',I,'"',O.gecko&&O.version>=10900&&!O.hc?"":' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',M.label,"</a>"].join(""));P.setAttribute("aria-labelledby",I);this._.tabs[M.id]=[K,P];this._.tabIdList.push(M.id);!M.hidden&&this._.pageCount++;this._.lastTab=K;this.updateStyle();var L=this._.contents[M.id]={},R,H=Q.getChild();while((R=H.shift())){L[R.id]=R;if(typeof(R.getChild)=="function"){H.push.apply(H,R.getChild())}}P.setAttribute("name",M.id);P.appendTo(this.parts.contents);K.unselectable();this.parts.tabs.append(K);if(M.accessKey){l(this,this,"CTRL+"+M.accessKey,F,g);this._.accessKeyMap["CTRL+"+M.accessKey]=M.id}},selectPage:function(K){if(this._.currentTabId==K){return}if(this.fire("selectPage",{page:K,currentPage:this._.currentTabId})===true){return}for(var G in this._.tabs){var I=this._.tabs[G][0],J=this._.tabs[G][1];if(G!=K){I.removeClass("cke_dialog_tab_selected");J.hide()}J.setAttribute("aria-hidden",G!=K)}var H=this._.tabs[K];H[0].addClass("cke_dialog_tab_selected");if(CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat){r(H[1]);H[1].show();setTimeout(function(){r(H[1],1)},0)}else{H[1].show()}this._.currentTabId=K;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,K)},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(H){var G=this._.tabs[H]&&this._.tabs[H][0];if(!G||this._.pageCount==1||!G.isVisible()){return}else{if(H==this._.currentTabId){this.selectPage(q.call(this))}}G.hide();this._.pageCount--;this.updateStyle()},showPage:function(H){var G=this._.tabs[H]&&this._.tabs[H][0];if(!G){return}G.show();this._.pageCount++;this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(H,G){var I=this._.contents[H];return I&&I[G]},getValueOf:function(H,G){return this.getContentElement(H,G).getValue()},setValueOf:function(H,G,I){return this.getContentElement(H,G).setValue(I)},getButton:function(G){return this._.buttons[G]},click:function(G){return this._.buttons[G].click()},disableButton:function(G){return this._.buttons[G].disable()},enableButton:function(G){return this._.buttons[G].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(I,G){if(typeof G=="undefined"){G=this._.focusList.length;this._.focusList.push(new C(this,I,G))}else{this._.focusList.splice(G,0,new C(this,I,G));for(var H=G+1;H<this._.focusList.length;H++){this._.focusList[H].focusIndex++}}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(G,H){if(!this._.dialogDefinitions[G]||typeof H=="function"){this._.dialogDefinitions[G]=H}},exists:function(G){return !!this._.dialogDefinitions[G]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},okButton:(function(){var G=function(I,H){H=H||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:I.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(J){var K=J.data.dialog;if(K.fire("ok",{hide:true}).hide!==false){K.hide()}}},H,true)};G.type="button";G.override=function(H){return CKEDITOR.tools.extend(function(I){return G(I,H)},{type:"button"},true)};return G})(),cancelButton:(function(){var G=function(I,H){H=H||{};return CKEDITOR.tools.extend({id:"cancel",type:"button",label:I.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(J){var K=J.data.dialog;if(K.fire("cancel",{hide:true}).hide!==false){K.hide()}}},H,true)};G.type="button";G.override=function(H){return CKEDITOR.tools.extend(function(I){return G(I,H)},{type:"button"},true)};return G})(),addUIElement:function(H,G){this._.uiElementBuilders[H]=G}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype,true);var t={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]};var z=function(L,K,J){for(var H=0,I;(I=L[H]);H++){if(I.id==K){return I}if(J&&I[J]){var G=z(I[J],K,J);if(G){return G}}}return null};var d=function(N,I,M,K,L){if(M){for(var H=0,J;(J=N[H]);H++){if(J.id==M){N.splice(H,0,I);return I}if(K&&J[K]){var G=d(J[K],I,M,K,true);if(G){return G}}}if(L){return null}}N.push(I);return I};var j=function(L,K,J){for(var H=0,I;(I=L[H]);H++){if(I.id==K){return L.splice(H,1)}if(J&&I[J]){var G=j(I[J],K,J);if(G){return G}}}return null};var s=function(H,K){this.dialog=H;var J=K.contents;for(var G=0,I;(I=J[G]);G++){J[G]=I&&new c(H,I)}CKEDITOR.tools.extend(this,K)};s.prototype={getContents:function(G){return z(this.contents,G)},getButton:function(G){return z(this.buttons,G)},addContents:function(G,H){return d(this.contents,G,H)},addButton:function(G,H){return d(this.buttons,G,H)},removeContents:function(G){j(this.contents,G)},removeButton:function(G){j(this.buttons,G)}};function c(G,H){this._={dialog:G};CKEDITOR.tools.extend(this,H)}c.prototype={get:function(G){return z(this.elements,G,"children")},add:function(H,G){return d(this.elements,H,G,"children")},remove:function(G){j(this.elements,G,"children")}};function v(L){var I=null,N=null,H=L.getElement().getFirst(),J=L.getParentEditor(),G=J.config.dialog_magnetDistance,M=J.skin.margins||[0,0,0,0];if(typeof G=="undefined"){G=20}function K(V){var P=L.getSize(),S=CKEDITOR.document.getWindow().getViewPaneSize(),U=V.data.$.screenX,T=V.data.$.screenY,X=U-I.x,W=T-I.y,R,Q;I={x:U,y:T};N.x+=X;N.y+=W;if(N.x+M[3]<G){R=-M[3]}else{if(N.x-M[1]>S.width-P.width-G){R=S.width-P.width+(J.lang.dir=="rtl"?0:M[1])}else{R=N.x}}if(N.y+M[0]<G){Q=-M[0]}else{if(N.y-M[2]>S.height-P.height-G){Q=S.height-P.height+M[2]}else{Q=N.y}}L.move(R,Q,1);V.data.preventDefault()}function O(P){CKEDITOR.document.removeListener("mousemove",K);CKEDITOR.document.removeListener("mouseup",O);if(CKEDITOR.env.ie6Compat){var Q=u.getChild(0).getFrameDocument();Q.removeListener("mousemove",K);Q.removeListener("mouseup",O)}}L.parts.title.on("mousedown",function(P){I={x:P.data.$.screenX,y:P.data.$.screenY};CKEDITOR.document.on("mousemove",K);CKEDITOR.document.on("mouseup",O);N=L.getPosition();if(CKEDITOR.env.ie6Compat){var Q=u.getChild(0).getFrameDocument();Q.on("mousemove",K);Q.on("mouseup",O)}P.data.preventDefault()},L)}function E(M){var H=M.definition,G=H.resizable;if(G==CKEDITOR.DIALOG_RESIZE_NONE){return}var L=M.getParentEditor();var J,I,N,P,Q,S;var O=CKEDITOR.tools.addFunction(function(U){Q=M.getSize();var V=M.parts.contents,T=V.$.getElementsByTagName("iframe").length;if(T){S=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>');V.append(S)}I=Q.height-M.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.opera||CKEDITOR.env.ie&&CKEDITOR.env.quirks));J=Q.width-M.parts.contents.getSize("width",1);P={x:U.screenX,y:U.screenY};N=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",K);CKEDITOR.document.on("mouseup",R);if(CKEDITOR.env.ie6Compat){var W=u.getChild(0).getFrameDocument();W.on("mousemove",K);W.on("mouseup",R)}U.preventDefault&&U.preventDefault()});M.on("load",function(){var T="";if(G==CKEDITOR.DIALOG_RESIZE_WIDTH){T=" cke_resizer_horizontal"}else{if(G==CKEDITOR.DIALOG_RESIZE_HEIGHT){T=" cke_resizer_vertical"}}var U=CKEDITOR.dom.element.createFromHtml('<div class="cke_resizer'+T+" cke_resizer_"+L.lang.dir+'" title="'+CKEDITOR.tools.htmlEncode(L.lang.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+O+', event )"></div>');M.parts.footer.append(U,1)});L.on("destroy",function(){CKEDITOR.tools.removeFunction(O)});function K(aa){var Y=L.lang.dir=="rtl",ad=(aa.data.$.screenX-P.x)*(Y?-1:1),ac=aa.data.$.screenY-P.y,T=Q.width,ab=Q.height,U=T+ad*(M._.moved?1:2),W=ab+ac*(M._.moved?1:2),V=M._.element.getFirst(),Z=Y&&V.getComputedStyle("right"),X=M.getPosition();if(X.y+W>N.height){W=N.height-X.y}if((Y?Z:X.x)+U>N.width){U=N.width-(Y?Z:X.x)}if((G==CKEDITOR.DIALOG_RESIZE_WIDTH||G==CKEDITOR.DIALOG_RESIZE_BOTH)){T=Math.max(H.minWidth||0,U-J)}if(G==CKEDITOR.DIALOG_RESIZE_HEIGHT||G==CKEDITOR.DIALOG_RESIZE_BOTH){ab=Math.max(H.minHeight||0,W-I)}M.resize(T,ab);if(!M._.moved){M.layout()}aa.data.preventDefault()}function R(){CKEDITOR.document.removeListener("mouseup",R);CKEDITOR.document.removeListener("mousemove",K);if(S){S.remove();S=null}if(CKEDITOR.env.ie6Compat){var T=u.getChild(0).getFrameDocument();T.removeListener("mouseup",R);T.removeListener("mousemove",K)}}}var p;var m={},u;function B(G){G.data.preventDefault(1)}function i(O){var N=CKEDITOR.document.getWindow();var H=O.config,P=H.dialog_backgroundCoverColor||"white",J=H.dialog_backgroundCoverOpacity,Q=H.baseFloatZIndex,S=CKEDITOR.tools.genKey(P,J,Q),I=m[S];if(!I){var M=['<div tabIndex="-1" style="position: ',(CKEDITOR.env.ie6Compat?"absolute":"fixed"),"; z-index: ",Q,"; top: 0px; left: 0px; ",(!CKEDITOR.env.ie6Compat?"background-color: "+P:""),'" class="cke_dialog_background_cover">'];if(CKEDITOR.env.ie6Compat){var L=CKEDITOR.env.isCustomDomain(),R="<html><body style=\\'background-color:"+P+";\\'></body></html>";M.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:');M.push("void((function(){document.open();"+(L?"document.domain='"+document.domain+"';":"")+"document.write( '"+R+"' );document.close();})())");M.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>')}M.push("</div>");I=CKEDITOR.dom.element.createFromHtml(M.join(""));I.setOpacity(J!=undefined?J:0.5);I.on("keydown",B);I.on("keypress",B);I.on("keyup",B);I.appendTo(CKEDITOR.document.getBody());m[S]=I}else{I.show()}u=I;var T=function(){var U=N.getViewPaneSize();I.setStyles({width:U.width+"px",height:U.height+"px"})};var K=function(){var W=N.getScrollPosition(),V=CKEDITOR.dialog._.currentTop;I.setStyles({left:W.x+"px",top:W.y+"px"});if(V){do{var U=V.getPosition();V.move(U.x,U.y)}while((V=V._.parentDialog))}};p=T;N.on("resize",T);T();if(!(CKEDITOR.env.mac&&CKEDITOR.env.webkit)){I.focus()}if(CKEDITOR.env.ie6Compat){var G=function(){K();arguments.callee.prevScrollHandler.apply(this,arguments)};N.$.setTimeout(function(){G.prevScrollHandler=window.onscroll||function(){};window.onscroll=G},0);K()}}function o(){if(!u){return}var G=CKEDITOR.document.getWindow();u.hide();G.removeListener("resize",p);if(CKEDITOR.env.ie6Compat){G.$.setTimeout(function(){var H=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=H||null},0)}p=null}function e(){for(var G in m){m[G].remove()}m={}}var w={};var n=function(I){var K=I.data.$.ctrlKey||I.data.$.metaKey,L=I.data.$.altKey,H=I.data.$.shiftKey,J=String.fromCharCode(I.data.$.keyCode),G=w[(K?"CTRL+":"")+(L?"ALT+":"")+(H?"SHIFT+":"")+J];if(!G||!G.length){return}G=G[G.length-1];G.keydown&&G.keydown.call(G.uiElement,G.dialog,G.key);I.data.preventDefault()};var y=function(I){var K=I.data.$.ctrlKey||I.data.$.metaKey,L=I.data.$.altKey,H=I.data.$.shiftKey,J=String.fromCharCode(I.data.$.keyCode),G=w[(K?"CTRL+":"")+(L?"ALT+":"")+(H?"SHIFT+":"")+J];if(!G||!G.length){return}G=G[G.length-1];if(G.keyup){G.keyup.call(G.uiElement,G.dialog,G.key);I.data.preventDefault()}};var l=function(G,I,H,J,L){var K=w[H]||(w[H]=[]);K.push({uiElement:G,dialog:I,key:H,keyup:L||G.accessKeyUp,keydown:J||G.accessKeyDown})};var k=function(J){for(var H in w){var I=w[H];for(var G=I.length-1;G>=0;G--){if(I[G].dialog==J||I[G].uiElement==J){I.splice(G,1)}}if(I.length===0){delete w[H]}}};var g=function(H,G){if(H._.accessKeyMap[G]){H.selectPage(H._.accessKeyMap[G])}};var F=function(H,G){};var a={27:1,13:1};var D=function(G){if(G.data.getKeystroke() in a){G.data.stopPropagation()}};(function(){CKEDITOR.ui.dialog={uiElement:function(Y,S,T,J,V,H,I){if(arguments.length<4){return}var G=(J.call?J(S):J)||"div",Q=["<",G," "],P=(V&&V.call?V(S):V)||{},O=(H&&H.call?H(S):H)||{},M=(I&&I.call?I.call(this,Y,S):I)||"",L=this.domId=O.id||CKEDITOR.tools.getNextId()+"_uiElement",U=this.id=S.id,X;O.id=L;var Z={};if(S.type){Z["cke_dialog_ui_"+S.type]=1}if(S.className){Z[S.className]=1}if(S.disabled){Z.cke_disabled=1}var N=(O["class"]&&O["class"].split)?O["class"].split(" "):[];for(X=0;X<N.length;X++){if(N[X]){Z[N[X]]=1}}var K=[];for(X in Z){K.push(X)}O["class"]=K.join(" ");if(S.title){O.title=S.title}var R=(S.style||"").split(";");if(S.align){var W=S.align;P["margin-left"]=W=="left"?0:"auto";P["margin-right"]=W=="right"?0:"auto"}for(X in P){R.push(X+":"+P[X])}if(S.hidden){R.push("display:none")}for(X=R.length-1;X>=0;X--){if(R[X]===""){R.splice(X,1)}}if(R.length>0){O.style=(O.style?(O.style+"; "):"")+R.join("; ")}for(X in O){Q.push(X+'="'+CKEDITOR.tools.htmlEncode(O[X])+'" ')}Q.push(">",M,"</",G,">");T.push(Q.join(""));(this._||(this._={})).dialog=Y;if(typeof(S.isChanged)=="boolean"){this.isChanged=function(){return S.isChanged}}if(typeof(S.isChanged)=="function"){this.isChanged=S.isChanged}if(typeof(S.setValue)=="function"){this.setValue=CKEDITOR.tools.override(this.setValue,function(ab){return function(ac){ab.call(this,S.setValue.call(this,ac))}})}if(typeof(S.getValue)=="function"){this.getValue=CKEDITOR.tools.override(this.getValue,function(ab){return function(){return S.getValue.call(this,ab.call(this))}})}CKEDITOR.event.implementOn(this);this.registerEvents(S);if(this.accessKeyUp&&this.accessKeyDown&&S.accessKey){l(this,Y,"CTRL+"+S.accessKey)}var aa=this;Y.on("load",function(){var ab=aa.getInputElement();if(ab){var ac=aa.type in {checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";ab.on("focus",function(){Y._.tabBarMode=false;Y._.hasFocus=true;aa.fire("focus");ac&&this.addClass(ac)});ab.on("blur",function(){aa.fire("blur");ac&&this.removeClass(ac)})}});if(this.keyboardFocusable){this.tabIndex=S.tabIndex||0;this.focusIndex=Y._.focusList.push(this)-1;this.on("focus",function(){Y._.currentFocusIndex=aa.focusIndex})}CKEDITOR.tools.extend(this,S)},hbox:function(M,Q,R,I,H){if(arguments.length<4){return}this._||(this._={});var J=this._.children=Q,K=H&&H.widths||null,O=H&&H.height||null,P={},L;var N=function(){var S=['<tbody><tr class="cke_dialog_ui_hbox">'];for(L=0;L<R.length;L++){var T="cke_dialog_ui_hbox_child",U=[];if(L===0){T="cke_dialog_ui_hbox_first"}if(L==R.length-1){T="cke_dialog_ui_hbox_last"}S.push('<td class="',T,'" role="presentation" ');if(K){if(K[L]){U.push("width:"+h(K[L]))}}else{U.push("width:"+Math.floor(100/R.length)+"%")}if(O){U.push("height:"+h(O))}if(H&&H.padding!=undefined){U.push("padding:"+h(H.padding))}if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&J[L].align){U.push("text-align:"+J[L].align)}if(U.length>0){S.push('style="'+U.join("; ")+'" ')}S.push(">",R[L],"</td>")}S.push("</tr></tbody>");return S.join("")};var G={role:"presentation"};H&&H.align&&(G.align=H.align);CKEDITOR.ui.dialog.uiElement.call(this,M,H||{type:"hbox"},I,"table",P,G,N)},vbox:function(K,N,O,I,G){if(arguments.length<3){return}this._||(this._={});var J=this._.children=N,H=G&&G.width||null,L=G&&G.heights||null;var M=function(){var Q=['<table role="presentation" cellspacing="0" border="0" '];Q.push('style="');if(G&&G.expand){Q.push("height:100%;")}Q.push("width:"+h(H||"100%"),";");Q.push('"');Q.push('align="',CKEDITOR.tools.htmlEncode((G&&G.align)||(K.getParentEditor().lang.dir=="ltr"?"left":"right")),'" ');Q.push("><tbody>");for(var P=0;P<O.length;P++){var R=[];Q.push('<tr><td role="presentation" ');if(H){R.push("width:"+h(H||"100%"))}if(L){R.push("height:"+h(L[P]))}else{if(G&&G.expand){R.push("height:"+Math.floor(100/O.length)+"%")}}if(G&&G.padding!=undefined){R.push("padding:"+h(G.padding))}if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&J[P].align){R.push("text-align:"+J[P].align)}if(R.length>0){Q.push('style="',R.join("; "),'" ')}Q.push(' class="cke_dialog_ui_vbox_child">',O[P],"</td></tr>")}Q.push("</tbody></table>");return Q.join("")};CKEDITOR.ui.dialog.uiElement.call(this,K,G||{type:"vbox"},I,"div",null,{role:"presentation"},M)}}})();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(H,G){this.getInputElement().setValue(H);!G&&this.fire("change",{value:H});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return false},selectParentTab:function(){var H=this.getInputElement(),I=H,G;while((I=I.getParent())&&I.$.className.search("cke_dialog_page_contents")==-1){}if(!I){return this}G=I.getAttribute("name");if(this._.dialog._.currentTabId!=G){this._.dialog.selectPage(G)}return this},focus:function(){this.selectParentTab().getInputElement().focus();return this},registerEvents:function(I){var J=/^on([A-Z]\w+)/,G;var K=function(M,N,L,O){N.on("load",function(){M.getInputElement().on(L,O,M)})};for(var H in I){if(!(G=H.match(J))){continue}if(this.eventProcessors[H]){this.eventProcessors[H].call(this,this._.dialog,I[H])}else{K(this,this._.dialog,G[1].toLowerCase(),I[H])}}return this},eventProcessors:{onLoad:function(G,H){G.on("load",H,this)},onShow:function(G,H){G.on("show",H,this)},onHide:function(G,H){G.on("hide",H,this)}},accessKeyDown:function(H,G){this.focus()},accessKeyUp:function(H,G){},disable:function(){var H=this.getElement(),G=this.getInputElement();G.setAttribute("disabled","true");H.addClass("cke_disabled")},enable:function(){var H=this.getElement(),G=this.getInputElement();G.removeAttribute("disabled");H.removeClass("cke_disabled")},isEnabled:function(){return !this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){if(!this.isEnabled()||!this.isVisible()){return false}return true}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(G){if(arguments.length<1){return this._.children.concat()}if(!G.splice){G=[G]}if(G.length<2){return this._.children[G[0]]}else{return(this._.children[G[0]]&&this._.children[G[0]].getChild)?this._.children[G[0]].getChild(G.slice(1,G.length)):null}}},true);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox();(function(){var G={build:function(N,H,K){var J=H.children,I,P=[],O=[];for(var M=0;(M<J.length&&(I=J[M]));M++){var L=[];P.push(L);O.push(CKEDITOR.dialog._.uiElementBuilders[I.type].build(N,I,L))}return new CKEDITOR.ui.dialog[H.type](N,O,P,K,H)}};CKEDITOR.dialog.addUIElement("hbox",G);CKEDITOR.dialog.addUIElement("vbox",G)})();CKEDITOR.dialogCommand=function(G){this.dialogName=G};CKEDITOR.dialogCommand.prototype={exec:function(G){CKEDITOR.env.opera?CKEDITOR.tools.setTimeout(function(){G.openDialog(this.dialogName)},0,this):G.openDialog(this.dialogName)},canUndo:false,editorFocus:CKEDITOR.env.ie||CKEDITOR.env.webkit};(function(){var H=/^([a]|[^a])+$/,G=/^\d*$/,I=/^\d*(?:\.\d+)?$/,J=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,L=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,K=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var M=arguments;return function(){var P=this&&this.getValue?this.getValue():M[0];var R=undefined,O=CKEDITOR.VALIDATE_AND,Q=[],N;for(N=0;N<M.length;N++){if(typeof(M[N])=="function"){Q.push(M[N])}else{break}}if(N<M.length&&typeof(M[N])=="string"){R=M[N];N++}if(N<M.length&&typeof(M[N])=="number"){O=M[N]}var S=(O==CKEDITOR.VALIDATE_AND?true:false);for(N=0;N<Q.length;N++){if(O==CKEDITOR.VALIDATE_AND){S=S&&Q[N](P)}else{S=S||Q[N](P)}}return !S?R:true}},regex:function(M,N){return function(){var O=this&&this.getValue?this.getValue():arguments[0];return !M.test(O)?N:true}},notEmpty:function(M){return this.regex(H,M)},integer:function(M){return this.regex(G,M)},number:function(M){return this.regex(I,M)},cssLength:function(M){return this.functions(function(N){return L.test(CKEDITOR.tools.trim(N))},M)},htmlLength:function(M){return this.functions(function(N){return J.test(CKEDITOR.tools.trim(N))},M)},inlineStyle:function(M){return this.functions(function(N){return K.test(CKEDITOR.tools.trim(N))},M)},equals:function(M,N){return this.functions(function(O){return O==M},N)},notEqual:function(M,N){return this.functions(function(O){return O!=M},N)}};CKEDITOR.on("instanceDestroyed",function(N){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){var M;while((M=CKEDITOR.dialog._.currentTop)){M.hide()}e()}var P=N.editor._.storedDialogs;for(var O in P){P[O].destroy()}})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(I,P){if(this.mode=="wysiwyg"&&CKEDITOR.env.ie){var M=this.getSelection();M&&M.lock()}var H=CKEDITOR.dialog._.dialogDefinitions[I],G=this.skin.dialog;if(CKEDITOR.dialog._.currentTop===null){i(this)}if(typeof H=="function"&&G._isLoaded){var N=this._.storedDialogs||(this._.storedDialogs={});var K=N[I]||(N[I]=new CKEDITOR.dialog(this,I));P&&P.call(K,K);K.show();return K}else{if(H=="failed"){o();throw new Error('[CKEDITOR.dialog.openDialog] Dialog "'+I+'" failed when loading definition.')}}var L=this;function J(R){var S=CKEDITOR.dialog._.dialogDefinitions[I],Q=L.skin.dialog;if(!Q._isLoaded||O&&typeof R=="undefined"){return}if(typeof S!="function"){CKEDITOR.dialog._.dialogDefinitions[I]="failed"}L.openDialog(I,P)}if(typeof H=="string"){var O=1;CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(H),J,null,0,1)}CKEDITOR.skins.load(this,"dialog",J);return null}})})();CKEDITOR.plugins.add("dialog",{requires:["dialogui"]});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function b(d){var c=this.att;var e=d&&d.hasAttribute(c)&&d.getAttribute(c)||"";if(e!==undefined){this.setValue(e)}}function a(){var e;for(var d=0;d<arguments.length;d++){if(arguments[d] instanceof CKEDITOR.dom.element){e=arguments[d];break}}if(e){var c=this.att,f=this.getValue();if(f){e.setAttribute(c,f)}else{e.removeAttribute(c,f)}}}CKEDITOR.plugins.add("dialogadvtab",{createAdvancedTab:function(d,f){if(!f){f={id:1,dir:1,classes:1,styles:1}}var g=d.lang.common;var c={id:"advanced",label:g.advancedTab,title:g.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]};var e=[];if(f.id||f.dir){if(f.id){e.push({id:"advId",att:"id",type:"text",label:g.id,setup:b,commit:a})}if(f.dir){e.push({id:"advLangDir",att:"dir",type:"select",label:g.langDir,"default":"",style:"width:100%",items:[[g.notSet,""],[g.langDirLTR,"ltr"],[g.langDirRTL,"rtl"]],setup:b,commit:a})}c.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(e)})}if(f.styles||f.classes){e=[];if(f.styles){e.push({id:"advStyles",att:"style",type:"text",label:g.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(g.invalidInlineStyle),onChange:function(){},getStyle:function(j,h){var i=this.getValue().match(new RegExp(j+"\\s*:\\s*([^;]*)","i"));return i?i[1]:h},updateStyle:function(h,j){var i=this.getValue();if(i){i=i.replace(new RegExp("\\s*"+h+"s*:[^;]*(?:$|;s*)","i"),"").replace(/^[;\s]+/,"").replace(/\s+$/,"")}if(j){i&&!(/;\s*$/).test(i)&&(i+="; ");i+=h+": "+j}this.setValue(i,1)},setup:b,commit:a})}if(f.classes){e.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",label:g.cssClasses,"default":"",setup:b,commit:a}]})}c.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(e)})}return c}})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("dialogui");(function(){var g=function(l){this._||(this._={});this._["default"]=this._.initValue=l["default"]||"";this._.required=l.required||false;var j=[this._];for(var k=1;k<arguments.length;k++){j.push(arguments[k])}j.push(true);CKEDITOR.tools.extend.apply(CKEDITOR.tools,j);return this._},a={build:function(j,k,i){return new CKEDITOR.ui.dialog.textInput(j,k,i)}},d={build:function(j,k,i){return new CKEDITOR.ui.dialog[k.type](j,k,i)}},f={build:function(p,j,m){var l=j.children,k,r=[],q=[];for(var o=0;(o<l.length&&(k=l[o]));o++){var n=[];r.push(n);q.push(CKEDITOR.dialog._.uiElementBuilders[k.type].build(p,k,n))}return new CKEDITOR.ui.dialog[j.type](p,q,r,m,j)}},c={isChanged:function(){return this.getValue()!=this.getInitValue()},reset:function(i){this.setValue(this.getInitValue(),i)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},b=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(i,j){if(!this._.domOnChangeRegistered){i.on("load",function(){this.getInputElement().on("change",function(){if(!i.parts.dialog.isVisible()){return}this.fire("change",{value:this.getValue()})},this)},this);this._.domOnChangeRegistered=true}this.on("change",j)}},true),h=/^on([A-Z]\w+)/,e=function(k){for(var j in k){if(h.test(j)||j=="title"||j=="type"){delete k[j]}}return k};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(k,o,l,m){if(arguments.length<4){return}var i=g.call(this,o);i.labelId=CKEDITOR.tools.getNextId()+"_label";var j=this._.children=[];var n=function(){var r=[],p=o.required?" cke_required":"";if(o.labelLayout!="horizontal"){r.push('<label class="cke_dialog_ui_labeled_label'+p+'" ',' id="'+i.labelId+'"',' for="'+i.inputId+'"',(o.labelStyle?' style="'+o.labelStyle+'"':"")+">",o.label,"</label>",'<div class="cke_dialog_ui_labeled_content"'+(o.controlStyle?' style="'+o.controlStyle+'"':"")+' role="presentation">',m.call(this,k,o),"</div>")}else{var q={type:"hbox",widths:o.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+p+'" id="'+i.labelId+'" for="'+i.inputId+'"'+(o.labelStyle?' style="'+o.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(o.label)+"</span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(o.controlStyle?' style="'+o.controlStyle+'"':"")+">"+m.call(this,k,o)+"</span>"}]};CKEDITOR.dialog._.uiElementBuilders.hbox.build(k,q,r)}return r.join("")};CKEDITOR.ui.dialog.uiElement.call(this,k,o,l,"div",null,{role:"presentation"},n)},textInput:function(o,j,k){if(arguments.length<3){return}g.call(this,j);var l=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",m={"class":"cke_dialog_ui_input_"+j.type,id:l,type:"text"},n;if(j.validate){this.validate=j.validate}if(j.maxLength){m.maxlength=j.maxLength}if(j.size){m.size=j.size}if(j.inputStyle){m.style=j.inputStyle}var p=this,r=false;o.on("load",function(){p.getInputElement().on("keydown",function(i){if(i.data.getKeystroke()==13){r=true}});p.getInputElement().on("keyup",function(i){if(i.data.getKeystroke()==13&&r){o.getButton("ok")&&setTimeout(function(){o.getButton("ok").click()},0);r=false}},null,null,1000)});var q=function(){var t=['<div class="cke_dialog_ui_input_',j.type,'" role="presentation"'];if(j.width){t.push('style="width:'+j.width+'" ')}t.push("><input ");m["aria-labelledby"]=this._.labelId;this._.required&&(m["aria-required"]=this._.required);for(var s in m){t.push(s+'="'+m[s]+'" ')}t.push(" /></div>");return t.join("")};CKEDITOR.ui.dialog.labeledElement.call(this,o,j,k,q)},textarea:function(j,o,m){if(arguments.length<3){return}g.call(this,o);var k=this,l=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",i={};if(o.validate){this.validate=o.validate}i.rows=o.rows||5;i.cols=o.cols||20;if(typeof o.inputStyle!="undefined"){i.style=o.inputStyle}var n=function(){i["aria-labelledby"]=this._.labelId;this._.required&&(i["aria-required"]=this._.required);var q=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea class="cke_dialog_ui_input_textarea" id="',l,'" '];for(var p in i){q.push(p+'="'+CKEDITOR.tools.htmlEncode(i[p])+'" ')}q.push(">",CKEDITOR.tools.htmlEncode(k._["default"]),"</textarea></div>");return q.join("")};CKEDITOR.ui.dialog.labeledElement.call(this,j,o,m,n)},checkbox:function(j,m,k){if(arguments.length<3){return}var i=g.call(this,m,{"default":!!m["default"]});if(m.validate){this.validate=m.validate}var l=function(){var p=CKEDITOR.tools.extend({},m,{id:m.id?m.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},true),o=[];var q=CKEDITOR.tools.getNextId()+"_label";var n={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":q};e(p);if(m["default"]){n.checked="checked"}if(typeof p.inputStyle!="undefined"){p.style=p.inputStyle}i.checkbox=new CKEDITOR.ui.dialog.uiElement(j,p,o,"input",null,n);o.push(' <label id="',q,'" for="',n.id,'"'+(m.labelStyle?' style="'+m.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(m.label),"</label>");return o.join("")};CKEDITOR.ui.dialog.uiElement.call(this,j,m,k,"span",null,null,l)},radio:function(j,n,l){if(arguments.length<3){return}g.call(this,n);if(!this._["default"]){this._["default"]=this._.initValue=n.items[0][1]}if(n.validate){this.validate=n.valdiate}var i=[],k=this;var m=function(){var z=[],s=[],y={"class":"cke_dialog_ui_radio_item","aria-labelledby":this._.labelId},q=n.id?n.id+"_radio":CKEDITOR.tools.getNextId()+"_radio";for(var r=0;r<n.items.length;r++){var A=n.items[r],v=A[2]!==undefined?A[2]:A[0],x=A[1]!==undefined?A[1]:A[0],w=CKEDITOR.tools.getNextId()+"_radio_input",p=w+"_label",t=CKEDITOR.tools.extend({},n,{id:w,title:null,type:null},true),o=CKEDITOR.tools.extend({},t,{title:v},true),u={type:"radio","class":"cke_dialog_ui_radio_input",name:q,value:x,"aria-labelledby":p},B=[];if(k._["default"]==x){u.checked="checked"}e(t);e(o);if(typeof t.inputStyle!="undefined"){t.style=t.inputStyle}i.push(new CKEDITOR.ui.dialog.uiElement(j,t,B,"input",null,u));B.push(" ");new CKEDITOR.ui.dialog.uiElement(j,o,B,"label",null,{id:p,"for":u.id},A[0]);z.push(B.join(""))}new CKEDITOR.ui.dialog.hbox(j,i,z,s);return s.join("")};CKEDITOR.ui.dialog.labeledElement.call(this,j,n,l,m);this._.children=i},button:function(i,n,l){if(!arguments.length){return}if(typeof n=="function"){n=n(i.getParentEditor())}g.call(this,n,{disabled:n.disabled||false});CKEDITOR.event.implementOn(this);var j=this;i.on("load",function(p){var o=this.getElement();(function(){o.on("click",function(q){j.fire("click",{dialog:j.getDialog()});q.data.preventDefault()});o.on("keydown",function(q){if(q.data.getKeystroke() in {32:1}){j.click();q.data.preventDefault()}})})();o.unselectable()},this);var m=CKEDITOR.tools.extend({},n);delete m.style;var k=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,i,m,l,"a",null,{style:n.style,href:"javascript:void(0)",title:n.label,hidefocus:"true","class":n["class"],role:"button","aria-labelledby":k},'<span id="'+k+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(n.label)+"</span>")},select:function(j,m,k){if(arguments.length<3){return}var i=g.call(this,m);if(m.validate){this.validate=m.validate}i.inputId=CKEDITOR.tools.getNextId()+"_select";var l=function(){var q=CKEDITOR.tools.extend({},m,{id:m.id?m.id+"_select":CKEDITOR.tools.getNextId()+"_select"},true),p=[],s=[],n={id:i.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};if(m.size!=undefined){n.size=m.size}if(m.multiple!=undefined){n.multiple=m.multiple}e(q);for(var o=0,r;o<m.items.length&&(r=m.items[o]);o++){s.push('<option value="',CKEDITOR.tools.htmlEncode(r[1]!==undefined?r[1]:r[0]).replace(/"/g,"""),'" /> ',CKEDITOR.tools.htmlEncode(r[0]))}if(typeof q.inputStyle!="undefined"){q.style=q.inputStyle}i.select=new CKEDITOR.ui.dialog.uiElement(j,q,p,"select",null,n,s.join(""));return p.join("")};CKEDITOR.ui.dialog.labeledElement.call(this,j,m,k,l)},file:function(j,m,k){if(arguments.length<3){return}if(m["default"]===undefined){m["default"]=""}var i=CKEDITOR.tools.extend(g.call(this,m),{definition:m,buttons:[]});if(m.validate){this.validate=m.validate}var l=function(){i.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var n=CKEDITOR.env.isCustomDomain();var o=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" id="',i.frameId,'" title="',m.label,'" src="javascript:void('];o.push(n?"(function(){document.open();document.domain='"+document.domain+"';document.close();})()":"0");o.push(')"></iframe>');return o.join("")};j.on("load",function(){var o=CKEDITOR.document.getById(i.frameId),n=o.getParent();n.addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,j,m,k,l)},fileButton:function(k,o,m){if(arguments.length<3){return}var i=g.call(this,o),l=this;if(o.validate){this.validate=o.validate}var j=CKEDITOR.tools.extend({},o);var n=j.onClick;j.className=(j.className?j.className+" ":"")+"cke_dialog_ui_button";j.onClick=function(p){var q=o["for"];if(!n||n.call(this,p)!==false){k.getContentElement(q[0],q[1]).submit();this.disable()}};k.on("load",function(){k.getContentElement(o["for"][0],o["for"][1])._.buttons.push(l)});CKEDITOR.ui.dialog.button.call(this,k,j,m)},html:(function(){var k=/^\s*<[\w:]+\s+([^>]*)?>/,j=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,i=/\/$/;return function(s,l,m){if(arguments.length<3){return}var o=[],u,p=l.html,q,t;if(p.charAt(0)!="<"){p="<span>"+p+"</span>"}var v=l.focus;if(v){var n=this.focus;this.focus=function(){n.call(this);typeof v=="function"&&v.call(this);this.fire("focus")};if(l.isFocusable){var r=this.isFocusable;this.isFocusable=r}this.keyboardFocusable=true}CKEDITOR.ui.dialog.uiElement.call(this,s,l,o,"span",null,null,"");u=o.join("");q=u.match(k);t=p.match(j)||["","",""];if(i.test(t[1])){t[1]=t[1].slice(0,-1);t[2]="/"+t[2]}m.push([t[1]," ",q[1]||"",t[2]].join(""))}})(),fieldset:function(i,o,n,k,m){var j=m.label;var l=function(){var q=[];j&&q.push("<legend>"+j+"</legend>");for(var p=0;p<n.length;p++){q.push(n[p])}return q.join("")};this._={children:o};CKEDITOR.ui.dialog.uiElement.call(this,i,m,k,"fieldset",null,null,l)}},true);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(i){var j=CKEDITOR.document.getById(this._.labelId);if(j.getChildCount()<1){(new CKEDITOR.dom.text(i,CKEDITOR.document)).appendTo(j)}else{j.getChild(0).$.nodeValue=i}return this},getLabel:function(){var i=CKEDITOR.document.getById(this._.labelId);if(!i||i.getChildCount()<1){return""}else{return i.getChild(0).getText()}},eventProcessors:b},true);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){if(!this._.disabled){return this.fire("click",{dialog:this._.dialog})}this.getElement().$.blur();return false},enable:function(){this._.disabled=false;var i=this.getElement();i&&i.removeClass("cke_disabled")},disable:function(){this._.disabled=true;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return !this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(i,j){this.on("click",j)}},true),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:true},true);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var i=this.selectParentTab();setTimeout(function(){var j=i.getInputElement();j&&j.$.focus()},0)},select:function(){var i=this.selectParentTab();setTimeout(function(){var j=i.getInputElement();if(j){j.$.focus();j.$.select()}},0)},accessKeyUp:function(){this.select()},setValue:function(i){!i&&(i="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},keyboardFocusable:true},c,true);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput();CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(k,m,j){var l=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),i=this.getInputElement().$;l.$.text=k;l.$.value=(m===undefined||m===null)?k:m;if(j===undefined||j===null){if(CKEDITOR.env.ie){i.add(l.$)}else{i.add(l.$,null)}}else{i.add(l.$,j)}return this},remove:function(j){var i=this.getInputElement().$;i.remove(j);return this},clear:function(){var i=this.getInputElement().$;while(i.length>0){i.remove(0)}return this},keyboardFocusable:true},c,true);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(j,i){this.getInputElement().$.checked=j;!i&&this.fire("change",{value:j})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(i,j){if(!CKEDITOR.env.ie){return b.onChange.apply(this,arguments)}else{i.on("load",function(){var k=this._.checkbox.getElement();k.on("propertychange",function(l){l=l.data.$;if(l.propertyName=="checked"){this.fire("change",{value:k.$.checked})}},this)},this);this.on("change",j)}return null}},keyboardFocusable:true},c,true);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(n,m){var k=this._.children,l;for(var j=0;(j<k.length)&&(l=k[j]);j++){l.getElement().$.checked=(l.getValue()==n)}!m&&this.fire("change",{value:n})},getValue:function(){var k=this._.children;for(var j=0;j<k.length;j++){if(k[j].getElement().$.checked){return k[j].getValue()}}return null},accessKeyUp:function(){var k=this._.children,j;for(j=0;j<k.length;j++){if(k[j].getElement().$.checked){k[j].getElement().focus();return}}k[0].getElement().focus()},eventProcessors:{onChange:function(i,j){if(!CKEDITOR.env.ie){return b.onChange.apply(this,arguments)}else{i.on("load",function(){var m=this._.children,n=this;for(var l=0;l<m.length;l++){var k=m[l].getElement();k.on("propertychange",function(o){o=o.data.$;if(o.propertyName=="checked"&&this.$.checked){n.fire("change",{value:this.getAttribute("value")})}})}},this);this.on("change",j)}return null}},keyboardFocusable:true},c,true);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,c,{getInputElement:function(){var i=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return i.$.forms.length>0?new CKEDITOR.dom.element(i.$.forms[0].elements[0]):this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(l){var m=/^on([A-Z]\w+)/,j;var n=function(o,p,i,q){o.on("formLoaded",function(){o.getInputElement().on(i,q,o)})};for(var k in l){if(!(j=k.match(m))){continue}if(this.eventProcessors[k]){this.eventProcessors[k].call(this,this._.dialog,l[k])}else{n(this,this._.dialog,j[1].toLowerCase(),l[k])}}return this},reset:function(){var r=this._,n=CKEDITOR.document.getById(r.frameId),p=n.getFrameDocument(),i=r.definition,q=r.buttons,l=this.formLoadedNumber,m=this.formUnloadNumber,j=r.dialog._.editor.lang.dir,o=r.dialog._.editor.langCode;if(!l){l=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this);m=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this);this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(l);CKEDITOR.tools.removeFunction(m)})}function k(){p.$.open();if(CKEDITOR.env.isCustomDomain()){p.$.domain=document.domain}var t="";if(i.size){t=i.size-(CKEDITOR.env.ie?7:0)}p.$.write(['<html dir="'+j+'" lang="'+o+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+j+'" lang="'+o+'" action="',CKEDITOR.tools.htmlEncode(i.action),'">','<input type="file" name="',CKEDITOR.tools.htmlEncode(i.id||"cke_upload"),'" size="',CKEDITOR.tools.htmlEncode(t>0?t:""),'" />',"</form>","</body></html>","<script>window.parent.CKEDITOR.tools.callFunction("+l+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+m+")}<\/script>"].join(""));p.$.close();for(var s=0;s<q.length;s++){q[s].enable()}}if(CKEDITOR.env.gecko){setTimeout(k,500)}else{k()}},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(i,j){if(!this._.domOnChangeRegistered){this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this);this._.domOnChangeRegistered=true}this.on("change",j)}},keyboardFocusable:true},true);CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",a);CKEDITOR.dialog.addUIElement("password",a);CKEDITOR.dialog.addUIElement("textarea",d);CKEDITOR.dialog.addUIElement("checkbox",d);CKEDITOR.dialog.addUIElement("radio",d);CKEDITOR.dialog.addUIElement("button",d);CKEDITOR.dialog.addUIElement("select",d);CKEDITOR.dialog.addUIElement("file",d);CKEDITOR.dialog.addUIElement("fileButton",d);CKEDITOR.dialog.addUIElement("html",d);CKEDITOR.dialog.addUIElement("fieldset",f)})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("domiterator");(function(){function b(g){if(arguments.length<1){return}this.range=g;this.forceBrBreak=0;this.enlargeBr=1;this.enforceRealBlocks=0;this._||(this._={})}var c=/^[\r\n\t ]+$/,f=CKEDITOR.dom.walker.bookmark(false,true),e=CKEDITOR.dom.walker.whitespaces(true),a=function(g){return f(g)&&e(g)};function d(j,g,i){var h=j.getNextSourceNode(g,null,i);while(!f(h)){h=h.getNextSourceNode(g,null,i)}return h}b.prototype={getNextParagraph:function(E){var p;var t;var s;var x;var y,l;if(!this._.lastNode){t=this.range.clone();t.shrink(CKEDITOR.NODE_ELEMENT,true);x=t.endContainer.hasAscendant("pre",true)||t.startContainer.hasAscendant("pre",true);t.enlarge(this.forceBrBreak&&!x||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);var z=new CKEDITOR.dom.walker(t),r=CKEDITOR.dom.walker.bookmark(true,true);z.evaluator=r;this._.nextNode=z.next();z=new CKEDITOR.dom.walker(t);z.evaluator=r;var m=z.previous();this._.lastNode=m.getNextSourceNode(true);if(this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()){var n=new CKEDITOR.dom.range(t.document);n.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END);if(n.checkEndOfBlock()){var w=new CKEDITOR.dom.elementPath(n.endContainer);var D=w.block||w.blockLimit;this._.lastNode=D.getNextSourceNode(true)}}if(!this._.lastNode){this._.lastNode=this._.docEndMarker=t.document.createText("");this._.lastNode.insertAfter(m)}t=null}var k=this._.nextNode;m=this._.lastNode;this._.nextNode=null;while(k){var i=0,q=k.hasAscendant("pre");var j=(k.type!=CKEDITOR.NODE_ELEMENT),F=0;if(!j){var g=k.getName();if(k.isBlockBoundary(this.forceBrBreak&&!q&&{br:1})){if(g=="br"){j=1}else{if(!t&&!k.getChildCount()&&g!="hr"){p=k;s=k.equals(m);break}}if(t){t.setEndAt(k,CKEDITOR.POSITION_BEFORE_START);if(g!="br"){this._.nextNode=k}}i=1}else{if(k.getFirst()){if(!t){t=new CKEDITOR.dom.range(this.range.document);t.setStartAt(k,CKEDITOR.POSITION_BEFORE_START)}k=k.getFirst();continue}j=1}}else{if(k.type==CKEDITOR.NODE_TEXT){if(c.test(k.getText())){j=0}}}if(j&&!t){t=new CKEDITOR.dom.range(this.range.document);t.setStartAt(k,CKEDITOR.POSITION_BEFORE_START)}s=((!i||j)&&k.equals(m));if(t&&!i){while(!k.getNext(a)&&!s){var o=k.getParent();if(o.isBlockBoundary(this.forceBrBreak&&!q&&{br:1})){i=1;j=0;s=s||(o.equals(m));t.setEndAt(o,CKEDITOR.POSITION_BEFORE_END);break}k=o;j=1;s=(k.equals(m));F=1}}if(j){t.setEndAt(k,CKEDITOR.POSITION_AFTER_END)}k=d(k,F,m);s=!k;if(s||(i&&t)){break}}if(!p){if(!t){this._.docEndMarker&&this._.docEndMarker.remove();this._.nextNode=null;return null}var C=new CKEDITOR.dom.elementPath(t.startContainer);var v=C.blockLimit,h={div:1,th:1,td:1};p=C.block;if(!p&&!this.enforceRealBlocks&&h[v.getName()]&&t.checkStartOfBlock()&&t.checkEndOfBlock()){p=v}else{if(!p||(this.enforceRealBlocks&&p.getName()=="li")){p=this.range.document.createElement(E||"p");t.extractContents().appendTo(p);p.trim();t.insertNode(p);y=l=true}else{if(p.getName()!="li"){if(!t.checkStartOfBlock()||!t.checkEndOfBlock()){p=p.clone(false);t.extractContents().appendTo(p);p.trim();var A=t.splitBlock();y=!A.wasStartOfBlock;l=!A.wasEndOfBlock;t.insertNode(p)}}else{if(!s){this._.nextNode=(p.equals(m)?null:d(t.getBoundaryNodes().endNode,1,m))}}}}}if(y){var u=p.getPrevious();if(u&&u.type==CKEDITOR.NODE_ELEMENT){if(u.getName()=="br"){u.remove()}else{if(u.getLast()&&u.getLast().$.nodeName.toLowerCase()=="br"){u.getLast().remove()}}}}if(l){var B=p.getLast();if(B&&B.type==CKEDITOR.NODE_ELEMENT&&B.getName()=="br"){if(CKEDITOR.env.ie||B.getPrevious(f)||B.getNext(f)){B.remove()}}}if(!this._.nextNode){this._.nextNode=(s||p.equals(m))?null:d(p,1,m)}return p}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a;CKEDITOR.plugins.add("editingblock",{init:function(b){if(!b.config.editingBlock){return}b.on("themeSpace",function(c){if(c.data.space=="contents"){c.data.html+="<br>"}});b.on("themeLoaded",function(){b.fireOnce("editingBlockReady")});b.on("uiReady",function(){b.setMode(b.config.startupMode)});b.on("afterSetData",function(){if(!a){function c(){a=true;b.getMode().loadData(b.getData());a=false}if(b.mode){c()}else{b.on("mode",function(){if(b.mode){c();b.removeListener("mode",arguments.callee)}})}}});b.on("beforeGetData",function(){if(!a&&b.mode){a=true;b.setData(b.getMode().getData(),null,1);a=false}});b.on("getSnapshot",function(c){if(b.mode){c.data=b.getMode().getSnapshotData()}});b.on("loadSnapshot",function(c){if(b.mode){b.getMode().loadSnapshotData(c.data)}});b.on("mode",function(c){c.removeListener();CKEDITOR.env.webkit&&b.container.on("focus",function(){b.focus()});if(b.config.startupFocus){b.focus()}setTimeout(function(){b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},0)});b.on("destroy",function(){if(this.mode){this._.modes[this.mode].unload(this.getThemeSpace("contents"))}})}});CKEDITOR.editor.prototype.mode="";CKEDITOR.editor.prototype.addMode=function(c,b){b.name=c;(this._.modes||(this._.modes={}))[c]=b};CKEDITOR.editor.prototype.setMode=function(g){this.fire("beforeSetMode",{newMode:g});var f,c=this.getThemeSpace("contents"),e=this.checkDirty();if(this.mode){if(g==this.mode){return}this._.previousMode=this.mode;this.fire("beforeModeUnload");var d=this.getMode();f=d.getData();d.unload(c);this.mode=""}c.setHtml("");var b=this.getMode(g);if(!b){throw'[CKEDITOR.editor.setMode] Unknown mode "'+g+'".'}if(!e){this.on("mode",function(){this.resetDirty();this.removeListener("mode",arguments.callee)})}b.load(c,(typeof f)!="string"?this.getData():f)};CKEDITOR.editor.prototype.getMode=function(b){return this._.modes&&this._.modes[b||this.mode]};CKEDITOR.editor.prototype.focus=function(){this.forceNextSelectionCheck();var b=this.getMode();if(b){b.focus()}}})();CKEDITOR.config.startupMode="wysiwyg";CKEDITOR.config.editingBlock=true;
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a={toolbarFocus:{editorFocus:false,readOnly:1,exec:function(d){var e=d._.elementsPath.idBase;var c=CKEDITOR.document.getById(e+"0");c&&c.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}};var b='<span class="cke_empty"> </span>';CKEDITOR.plugins.add("elementspath",{requires:["selection"],init:function(e){var i="cke_path_"+e.name;var j;var f=function(){if(!j){j=CKEDITOR.document.getById(i)}return j};var k="cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_";e._.elementsPath={idBase:k,filters:[]};e.on("themeSpace",function(l){if(l.data.space=="bottom"){l.data.html+='<span id="'+i+'_label" class="cke_voice_label">'+e.lang.elementsPath.eleLabel+'</span><div id="'+i+'" class="cke_path" role="group" aria-labelledby="'+i+'_label">'+b+"</div>"}});function g(n){e.focus();var m=e._.elementsPath.list[n];if(m.is("body")){var l=new CKEDITOR.dom.range(e.document);l.selectNodeContents(m);l.select()}else{e.getSelection().selectElement(m)}}var c=CKEDITOR.tools.addFunction(g);var h=CKEDITOR.tools.addFunction(function(m,o){var n=e._.elementsPath.idBase,l;o=new CKEDITOR.dom.event(o);var p=e.lang.dir=="rtl";switch(o.getKeystroke()){case p?39:37:case 9:l=CKEDITOR.document.getById(n+(m+1));if(!l){l=CKEDITOR.document.getById(n+"0")}l.focus();return false;case p?37:39:case CKEDITOR.SHIFT+9:l=CKEDITOR.document.getById(n+(m-1));if(!l){l=CKEDITOR.document.getById(n+(e._.elementsPath.list.length-1))}l.focus();return false;case 27:e.focus();return false;case 13:case 32:g(m);return false}return true});e.on("selectionChange",function(x){var t=CKEDITOR.env,A=x.data.selection,q=A.getStartElement(),r=[],u=x.editor,z=u._.elementsPath.list=[],n=u._.elementsPath.filters;while(q){var w=0,m;if(q.data("cke-display-name")){m=q.data("cke-display-name")}else{if(q.data("cke-real-element-type")){m=q.data("cke-real-element-type")}else{m=q.getName()}}for(var p=0;p<n.length;p++){var v=n[p](q,m);if(v===false){w=1;break}m=v||m}if(!w){var s=z.push(q)-1;var o="";if(t.opera||(t.gecko&&t.mac)){o+=' onkeypress="return false;"'}if(t.gecko){o+=' onblur="this.style.cssText = this.style.cssText;"'}var y=u.lang.elementsPath.eleTitle.replace(/%1/,m);r.unshift('<a id="',k,s,'" href="javascript:void(\'',m,'\')" tabindex="-1" title="',y,'"'+((CKEDITOR.env.gecko&&CKEDITOR.env.version<10900)?' onfocus="event.preventBubble();"':"")+' hidefocus="true" onkeydown="return CKEDITOR.tools.callFunction(',h,",",s,', event );"'+o,' onclick="CKEDITOR.tools.callFunction('+c,",",s,'); return false;"',' role="button" aria-labelledby="'+k+s+'_label">',m,'<span id="',k,s,'_label" class="cke_label">'+y+"</span>","</a>")}if(m=="body"){break}q=q.getParent()}var l=f();l.setHtml(r.join("")+b);u.fire("elementsPathUpdate",{space:l})});function d(){j&&j.setHtml(b);delete e._.elementsPath.list}e.on("readOnly",d);e.on("contentDomUnload",d);e.addCommand("elementsPathFocus",a.toolbarFocus)}})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){CKEDITOR.plugins.add("enterkey",{requires:["keystrokes","indent"],init:function(h){h.addCommand("enter",{modes:{wysiwyg:1},editorFocus:false,exec:function(j){f(j)}});h.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:false,exec:function(j){d(j)}});var i=h.keystrokeHandler.keystrokes;i[13]="enter";i[CKEDITOR.SHIFT+13]="shiftEnter"}});CKEDITOR.plugins.enterkey={enterBlock:function(n,s,t,p){t=t||e(n);if(!t){return}var E=t.document;var D=t.checkStartOfBlock(),u=t.checkEndOfBlock(),v=new CKEDITOR.dom.elementPath(t.startContainer),q=v.block;if(D&&u){if(q&&(q.is("li")||q.getParent().is("li"))){n.execCommand("outdent");return}if(q&&q.getParent().is("blockquote")){q.breakParent(q.getParent());if(!q.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))){q.getPrevious().remove()}if(!q.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))){q.getNext().remove()}t.moveToElementEditStart(q);t.select();return}}else{if(q&&q.is("pre")){if(!u){a(n,s,t,p);return}}else{if(q&&CKEDITOR.dtd.$captionBlock[q.getName()]){a(n,s,t,p);return}}}var C=(s==CKEDITOR.ENTER_DIV?"div":"p");var z=t.splitBlock(C);if(!z){return}var o=z.previousBlock,r=z.nextBlock;var k=z.wasStartOfBlock,w=z.wasEndOfBlock;var x;if(r){x=r.getParent();if(x.is("li")){r.breakParent(x);r.move(r.getNext(),1)}}else{if(o&&(x=o.getParent())&&x.is("li")){o.breakParent(x);x=o.getNext();t.moveToElementEditStart(x);o.move(o.getPrevious())}}if(!k&&!w){if(r.is("li")&&(x=r.getFirst(CKEDITOR.dom.walker.invisible(true)))&&x.is&&x.is("ul","ol")){(CKEDITOR.env.ie?E.createText("\xa0"):E.createElement("br")).insertBefore(x)}if(r){t.moveToElementEditStart(r)}}else{var l,m;if(o){if(o.is("li")||!(b.test(o.getName())||o.is("pre"))){l=o.clone()}}else{if(r){l=r.clone()}}if(!l){if(x&&x.is("li")){l=x}else{l=E.createElement(C);if(o&&(m=o.getDirection())){l.setAttribute("dir",m)}}}else{if(p&&!l.is("li")){l.renameNode(C)}}var h=z.elementPath;if(h){for(var y=0,A=h.elements.length;y<A;y++){var j=h.elements[y];if(j.equals(h.block)||j.equals(h.blockLimit)){break}if(CKEDITOR.dtd.$removeEmpty[j.getName()]){j=j.clone();l.moveChildren(j);l.append(j)}}}if(!CKEDITOR.env.ie){l.appendBogus()}if(!l.getParent()){t.insertNode(l)}l.is("li")&&l.removeAttribute("value");if(CKEDITOR.env.ie&&k&&(!w||!o.getChildCount())){t.moveToElementEditStart(w?o:l);t.select()}t.moveToElementEditStart(k&&!w?r:l)}if(!CKEDITOR.env.ie){if(r){var B=E.createElement("span");B.setHtml(" ");t.insertNode(B);B.scrollIntoView();t.deleteContents()}else{l.scrollIntoView()}}t.select()},enterBr:function(p,o,m,k){m=m||e(p);if(!m){return}var u=m.document;var n=(o==CKEDITOR.ENTER_DIV?"div":"p");var h=m.checkEndOfBlock();var v=new CKEDITOR.dom.elementPath(p.getSelection().getStartElement());var r=v.block,l=r&&v.block.getName();var i=false;if(!k&&l=="li"){g(p,o,m,k);return}if(!k&&h&&b.test(l)){var q,t;if((t=r.getDirection())){q=u.createElement("div");q.setAttribute("dir",t);q.insertAfter(r);m.setStart(q,0)}else{u.createElement("br").insertAfter(r);if(CKEDITOR.env.gecko){u.createText("").insertAfter(r)}m.setStartAt(r.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)}}else{var s;i=(l=="pre");if(i&&!CKEDITOR.env.gecko){s=u.createText(CKEDITOR.env.ie?"\r":"\n")}else{s=u.createElement("br")}m.deleteContents();m.insertNode(s);if(CKEDITOR.env.ie){m.setStartAt(s,CKEDITOR.POSITION_AFTER_END)}else{u.createText("\ufeff").insertAfter(s);if(h){s.getParent().appendBogus()}s.getNext().$.nodeValue="";m.setStartAt(s.getNext(),CKEDITOR.POSITION_AFTER_START);var j=null;if(!CKEDITOR.env.gecko){j=u.createElement("span");j.setHtml(" ")}else{j=u.createElement("br")}j.insertBefore(s.getNext());j.scrollIntoView();j.remove()}}m.collapse(true);m.select(i)}};var c=CKEDITOR.plugins.enterkey,a=c.enterBr,g=c.enterBlock,b=/^h[1-6]$/;function d(h){if(h.mode!="wysiwyg"){return false}return f(h,h.config.shiftEnterMode,1)}function f(h,i,j){j=h.config.forceEnterMode||j;if(h.mode!="wysiwyg"){return false}if(!i){i=h.config.enterMode}setTimeout(function(){h.fire("saveSnapshot");if(i==CKEDITOR.ENTER_BR){a(h,i,null,j)}else{g(h,i,null,j)}h.fire("saveSnapshot")},0);return true}function e(k){var h=k.getSelection().getRanges(true);for(var j=h.length-1;j>0;j--){h[j].deleteContents()}return h[0]}})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a="nbsp,gt,lt,amp";var d="quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro";var c="Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml";var e="Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv";function b(k,l){var o={},n=[];var j={nbsp:"\u00A0",shy:"\u00AD",gt:"\u003E",lt:"\u003C",amp:"\u0026"};k=k.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(q,p){var r=l?"&"+p+";":j[p],i=l?j[p]:"&"+p+";";o[r]=i;n.push(r);return""});if(!l&&k){k=k.split(",");var f=document.createElement("div"),m;f.innerHTML="&"+k.join(";&")+";";m=f.innerHTML;f=null;for(var h=0;h<m.length;h++){var g=m.charAt(h);o[g]="&"+k[h]+";";n.push(g)}}o.regex=n.join(l?"|":"");return o}CKEDITOR.plugins.add("entities",{afterInit:function(l){var j=l.config;var o=l.dataProcessor,g=o&&o.htmlFilter;if(g){var m="";if(j.basicEntities!==false){m+=a}if(j.entities){m+=","+d;if(j.entities_latin){m+=","+c}if(j.entities_greek){m+=","+e}if(j.entities_additional){m+=","+j.entities_additional}}var h=b(m);var n=h.regex?"["+h.regex+"]":"a^";delete h.regex;if(j.entities&&j.entities_processNumerical){n="[^ -~]|"+n}n=new RegExp(n,"g");function p(q){return j.entities_processNumerical=="force"||!h[q]?"&#"+q.charCodeAt(0)+";":h[q]}var k=b([a,"shy"].join(","),true),i=new RegExp(k.regex,"g");function f(q){return k[q]}g.addRules({text:function(q){return q.replace(i,f).replace(n,p)}})}}})})();CKEDITOR.config.basicEntities=true;CKEDITOR.config.entities=true;CKEDITOR.config.entities_latin=true;CKEDITOR.config.entities_greek=true;CKEDITOR.config.entities_additional="#39";
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){CKEDITOR.dialog.add("esp_attachment",function(c){var e=/^(_(?:self|top|parent|blank))$/;var b=function(q,n){var j=n?n.getAttribute("href"):"",p,o,l,k={};k.type="url";k.url=j;if(n){var r=n.getAttribute("target");k.target={};if(r){var h=r.match(e);if(h){k.target.type=k.target.name=r}else{k.target.type="frame";k.target.name=r}}var s=this;k.title=n.getAttribute("title")}var f=q.document.getElementsByTag("img"),t=new CKEDITOR.dom.nodeList(q.document.$.anchors),g=k.anchors=[];for(var m=0;m<f.count();m++){var u=f.getItem(m);if(u.getAttribute("_cke_realelement")&&u.getAttribute("_cke_real_element_type")=="anchor"){g.push(q.restoreRealElement(u))}}for(m=0;m<t.count();m++){g.push(t.getItem(m))}for(m=0;m<g.length;m++){u=g[m];g[m]={name:u.getAttribute("name"),id:u.getAttribute("id")}}this._.selectedElement=n;return k};var d=function(){var f=this.getDialog(),g=f.getContentElement("info","linkTargetName"),h=this.getValue();if(!g){return}g.setLabel(c.lang.link.targetFrameName);this.getDialog().setValueOf("info","linkTargetName",h.charAt(0)=="_"?h:"")};function a(g){var f=g.split("/").pop();var h=f.split(".").pop();return{filename:f.replace(/%20/g," "),className:"attach_"+h}}return{title:c.lang.esp_attachment.title,minWidth:420,minHeight:200,onShow:function(){this.fakeObj=false;var i=this.getParentEditor(),h=i.getSelection(),f=h.getRanges(),g=null,k=this;if(f.length==1){var j=f[0].getCommonAncestor(true);g=j.getAscendant("a",true);if(g&&g.getAttribute("href")){h.selectElement(g)}else{if((g=j.getAscendant("img",true))&&g.getAttribute("_cke_real_element_type")&&g.getAttribute("_cke_real_element_type")=="anchor"){this.fakeObj=g;g=i.restoreRealElement(this.fakeObj);h.selectElement(this.fakeObj)}else{g=null}}}this.setupContent(b.apply(this,[i,g]))},onOk:function(){var j={href:""},p=[],l={href:j.href},o=this,n=this.getParentEditor();this.commitContent(l);var h=l.url||"";j.href=(h.indexOf("/")===0||h.indexOf("http://")===0)?h:"http://"+h;var i=a(h);var q=l.title||"";j.title=(l.title.length==0)?i.filename:l.title;if(l.target){if(l.target.type!="notSet"&&l.target.name){j.target=l.target.name}else{p.push("target")}p.push("_cke_pa_onclick","onclick")}if(!this._.selectedElement){var r=n.getSelection(),g=r.getRanges();if(g.length==1&&g[0].collapsed){var s=new CKEDITOR.dom.text(j.title,n.document);g[0].insertNode(s);g[0].selectNodeContents(s);r.selectRanges(g)}var f=new CKEDITOR.style({element:"a",attributes:j});f.type=CKEDITOR.STYLE_INLINE;f.apply(n.document)}else{var k=this._.selectedElement;if(CKEDITOR.env.ie&&j.name!=k.getAttribute("name")){var m=new CKEDITOR.dom.element('<a name="'+CKEDITOR.tools.htmlEncode(j.name)+'">',n.document);r=n.getSelection();k.moveChildren(m);k.copyAttributes(m,{name:1});m.replace(k);k=m;r.selectElement(k)}k.setAttributes(j);k.removeAttributes(p);if(k.getAttribute("title")){k.setHtml(k.getAttribute("title"))}if(k.getAttribute("name")){k.addClass("cke_anchor")}else{k.removeClass("cke_anchor")}if(this.fakeObj){n.createFakeElement(k,"cke_anchor","anchor").replace(this.fakeObj)}delete this._.selectedElement}},contents:[{label:c.lang.common.generalTab,id:"info",accessKey:"I",elements:[{type:"vbox",padding:0,children:[{type:"html",html:"<span>"+CKEDITOR.tools.htmlEncode(c.lang.esp_attachment.url)+"</span>"},{type:"hbox",widths:["320px","80px"],align:"right",children:[{id:"txtUrl",type:"text",label:"",validate:CKEDITOR.dialog.validate.notEmpty(c.lang.flash.validateSrc),setup:function(f){if(f.url){this.setValue(f.url)}this.select()},commit:function(f){f.url=this.getValue()}},{type:"button",id:"browse",filebrowser:"info:txtUrl",hidden:true,align:"center",label:c.lang.esp_attachment.browseServer}]}]},{type:"vbox",padding:0,children:[{id:"txtAlt",type:"text",label:c.lang.esp_attachment.name,setup:function(f){if(f.title){this.setValue(f.title)}},commit:function(f){f.title=this.getValue()}}]},{type:"hbox",widths:["50%","50%"],children:[{type:"select",id:"linkTargetType",label:c.lang.link.target,"default":"notSet",style:"width : 100%;",items:[[c.lang.esp_attachment.link.targetNotSet,"notSet"],[c.lang.esp_attachment.link.targetFrame,"frame"],[c.lang.esp_attachment.link.targetNew,"_blank"],[c.lang.esp_attachment.link.targetTop,"_top"],[c.lang.esp_attachment.link.targetSelf,"_self"],[c.lang.esp_attachment.link.targetParent,"_parent"]],onChange:d,setup:function(f){if(f.target){this.setValue(f.target.type)}},commit:function(f){if(!f.target){f.target={}}f.target.type=this.getValue()}},{type:"text",id:"linkTargetName",label:c.lang.link.targetFrameName,"default":"",setup:function(f){if(f.target){this.setValue(f.target.name)}},commit:function(f){if(!f.target){f.target={}}f.target.name=this.getValue()}}]}]}]}})})();
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_attachment","en",{esp_attachment:{title:"Insert attachment",button:"Attachment",url:"URL",name:"Title",browseServer:"Browse",link:{targetNotSet:"<undefined>",targetFrame:"<frame>",targetNew:"New window (_blank)",targetTop:"Topmost window (_top)",targetSelf:"Same window (_self)",targetParent:"Parent window (_parent)"}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_attachment","ru",{esp_attachment:{title:"Вставить файл",button:"Файл",url:"Ссылка на файл",name:"Название файла",browseServer:"Вставить",link:{targetNotSet:"<не определено>",targetFrame:"<фрейм>",targetNew:"Новое окно (_blank)",targetTop:"Самое верхнее окно (_top)",targetSelf:"Тоже окно (_self)",targetParent:"Родительское окно (_parent)"}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_attachment","uk",{esp_attachment:{title:"Вставити файл",button:"Файл",url:"Посилання на файл",name:"Назва файлу",browseServer:"Вставити",link:{targetNotSet:"<не визначено>",targetFrame:"<фрейм>",targetNew:"Нове вікно (_blank)",targetTop:"Саме верхнє вікно (_top)",targetSelf:"Теж вікно (_self)",targetParent:"Батьківське вікно (_parent)"}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a={exec:function(b){b.openDialog("esp_attachment");return}};CKEDITOR.plugins.add("esp_attachment",{lang:["en","ru","uk"],requires:["dialog"],init:function(c){var b="esp_attachment";c.addCommand(b,a);c.ui.addButton("Esp_attachment",{label:c.lang.esp_attachment.button,command:b,icon:this.path+"images/esp_attachment.png"});CKEDITOR.dialog.add(b,CKEDITOR.getUrl(this.path+"dialogs/esp_attachment.js"))}})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.dialog.add("esp_audio",function(f){var a=f.lang.esp_audio;function e(j,l){var k=this.getValue();if(!k&&this.id=="id"){k=h()}j.setAttribute(this.id,k);if(!k){return}switch(this.id){case"width":l.width=k+"px";break;case"height":l.height=k+"px";break}}function b(j,o,l){var k=this.id.match(/(\w+)(\d)/),p=k[1],n=parseInt(k[2],10);var m=l[n]||(l[n]={});m[p]=this.getValue()}function g(j){if(j){this.setValue(j.getAttribute(this.id))}else{if(this.id=="id"){this.setValue(h())}}}function c(j,l){var k=this.id.match(/(\w+)(\d)/),o=k[1],n=parseInt(k[2],10);var m=l[n];if(!m){return}this.setValue(m[o])}function h(){var j=new Date();return"audio"+j.getFullYear()+j.getMonth()+j.getDate()+j.getHours()+j.getMinutes()+j.getSeconds()}var d=function(){var j=this.previewImage;j.removeListener("load",d);j.removeListener("error",i);j.removeListener("abort",i);this.setValueOf("info","width",j.$.width);this.setValueOf("info","height",j.$.height)};var i=function(){var j=this.previewImage;j.removeListener("load",d);j.removeListener("error",i);j.removeListener("abort",i)};return{title:a.dialogTitle,minWidth:400,minHeight:50,onShow:function(){this.fakeImage=this.audioNode=null;this.previewImage=f.document.createElement("img");var j=this.getSelectedElement();if(j&&j.data("cke-real-element-type")&&j.data("cke-real-element-type")=="audio"){this.fakeImage=j;var k=f.restoreRealElement(j),l=[];l.push({src:k.getAttribute("src")});this.audioNode=k;this.setupContent(k,l)}else{this.setupContent(null,[])}},onOk:function(){var l=null;if(!this.fakeImage){l=CKEDITOR.dom.element.createFromHtml("<cke:audio></cke:audio>",f.document);l.setAttributes({controls:"controls",src:this.getValueOf("info","src0")})}else{l=this.audioNode}var q={},n=[];this.commitContent(l,q,n);var k="",j="",o=a.linkTemplate||"",m=a.fallbackTemplate||"";j=o.replace("%src%",this.getValueOf("info","src0")).replace("%type%",this.getValueOf("info","src0").split("/").pop());l.setHtml(k+m.replace("%links%",j));var p=f.createFakeElement(l,"cke_audio","audio",false);p.setStyles(q);if(this.fakeImage){p.replace(this.fakeImage);f.getSelection().selectElement(p)}else{f.insertElement(p)}},onHide:function(){if(this.previewImage){this.previewImage.removeListener("load",d);this.previewImage.removeListener("error",i);this.previewImage.removeListener("abort",i);this.previewImage.remove();this.previewImage=null}},contents:[{id:"info",elements:[{type:"hbox",widths:["320px","80px"],children:[{type:"text",id:"src0",label:a.sourceAudio,commit:b,setup:c},{type:"button",id:"browse",hidden:"true",style:"display:inline-block;margin-top:10px;",filebrowser:{action:"Browse",target:"info:src0",url:f.config.filebrowserAudioBrowseUrl||f.config.filebrowserBrowseUrl},label:f.lang.esp_audio.browseServer}]}]}]}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_audio","en",{esp_audio:{toolbar:"Audio",dialogTitle:"Audio properties",browseServer:"Browse",fakeObject:"Audio",properties:"Edit Audio",widthRequired:"Width field cannot be empty",heightRequired:"Height field cannot be empty",sourceAudio:"Source audio",sourceType:"Audio type",linkTemplate:'<a href="%src%">%type%</a> ',fallbackTemplate:"Your browser doesn't support audio. Please download the file: %links%"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_audio","ru",{esp_audio:{toolbar:"Аудио",dialogTitle:"Параметры аудио",browseServer:"Выбор",fakeObject:"Аудио",properties:"Редактировать аудио",widthRequired:'Поле "ширина" не может быть пустым',heightRequired:'Поле "высота" не может быть пустым',sourceAudio:"Источник",sourceType:"Тип источника",linkTemplate:'<a href="%src%">%type%</a> ',fallbackTemplate:"Ваш браузер не поддерживает тэг audio. Вы можете скачать файл: %links%"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_audio","uk",{esp_audio:{toolbar:"Аудіо",dialogTitle:"Параметри аудіо",browseServer:"Вибір",fakeObject:"Аудіо",properties:"Редагувати аудіо",widthRequired:'Поле "ширина" не може бути порожнім',heightRequired:'Поле "висота" не може бути порожнім',sourceAudio:"Джерело",sourceType:"Тип джерела",linkTemplate:'<a href="%src%">%type%</a> ',fallbackTemplate:"Ваш браузер не підтримує тег audio. Ви можете завантажити файл: %links%"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("esp_audio",{lang:["en","ru","uk"],init:function(a){var b=a.lang.esp_audio;if(typeof a.element.data=="undefined"){alert('The "audio" plugin requires CKEditor 3.5 or newer');return}CKEDITOR.dialog.add("esp_audio",this.path+"dialogs/esp_audio.js");a.addCommand("esp_audio",new CKEDITOR.dialogCommand("esp_audio"));a.ui.addButton("Esp_audio",{label:b.toolbar,command:"esp_audio",icon:this.path+"images/esp_audio.png"});a.addCss("img.cke_audio{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;background-color: gray;border: 1px solid #a9a9a9;width: 300px;height: 64px;}");if(a.addMenuItems){a.addMenuItems({audio:{label:b.properties,command:"audio",group:"flash"}})}a.on("doubleclick",function(c){var d=c.data.element;if(d.is("img")&&d.data("cke-real-element-type")=="audio"){c.data.dialog="audio"}});if(a.contextMenu){a.contextMenu.addListener(function(c,d){if(c&&c.is("img")&&!c.isReadOnly()&&c.data("cke-real-element-type")=="audio"){return{audio:CKEDITOR.TRISTATE_OFF}}})}CKEDITOR.dtd.$empty["cke:source"]=1;CKEDITOR.dtd.$empty.source=1;a.lang.fakeobjects.audio=b.fakeObject},afterInit:function(c){var a=c.dataProcessor,e=a&&a.htmlFilter,d=a&&a.dataFilter;var b=c.plugins.googleMapsHandler;d.addRules({elements:{$:function(h){if(h.name=="audio"){h.name="cke:audio";var g=c.createFakeParserElement(h,"cke_audio","audio",false),j=g.attributes.style||"";var i=h.attributes.width,f=h.attributes.height,k=h.attributes.poster;if(typeof i!="undefined"){j=g.attributes.style=j+"width:"+CKEDITOR.tools.cssLength(i)+";"}if(typeof f!="undefined"){j=g.attributes.style=j+"height:"+CKEDITOR.tools.cssLength(f)+";"}if(k){j=g.attributes.style=j+"background-image:url("+k+");"}return g}}}});e.addRules({elements:{$:function(h){if(h.name=="img"){var j=h.attributes.mapnumber;if(j){var f,i=c.plugins.googleMapsHandler,g=i.getMap(j);if(g&&g.generatedType>1){i.CreatedMapsNames.push(g.number);f=new CKEDITOR.htmlParser.cdata(g.BuildScript());h.parent.children.push(f)}delete h.attributes.mapnumber}}return h}}})}});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){CKEDITOR.dialog.add("esp_blockquote",function(b){function c(){}function a(){}return{title:"Class for Blockquote",minWidth:200,minHeight:50,onShow:function(){},onOk:function(){var o=b.getSelection(),m=o&&o.getRanges(true)[0],l=m.createIterator();var n=[];while((block=l.getNextParagraph())){n.push(block)}if(n.length<1){var r=b.document.createElement(b.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),e=bookmarks.shift();m.insertNode(r);r.append(new CKEDITOR.dom.text("\ufeff",b.document));m.moveToBookmark(e);m.selectNodeContents(r);m.collapse(true);e=m.createBookmark();n.push(r);bookmarks.unshift(e)}var g=n[0].getParent(),k=[];for(var j=0;j<n.length;j++){block=n[j];g=g.getCommonAncestor(block.getParent())}var h={table:1,tbody:1,tr:1,ol:1,ul:1};while(h[g.getName()]){g=g.getParent()}var f=null;while(n.length>0){block=n.shift();while(!block.getParent().equals(g)){block=block.getParent()}if(!block.equals(f)){k.push(block)}f=block}while(k.length>0){block=k.shift();if(block.getName()=="blockquote"){var q=new CKEDITOR.dom.documentFragment(b.document);while(block.getFirst()){q.append(block.getFirst().remove());n.push(q.getLast())}q.replace(block)}else{n.push(block)}}var d=b.document.createElement("blockquote");var p=this.getValueOf("info","klass0");if(p){d.setAttribute("class",p);if(CKEDITOR.env.ie){d.setAttribute("className",p)}}d.insertBefore(n[0]);while(n.length>0){block=n.shift();d.append(block)}},onHide:function(){},contents:[{id:"info",elements:[{type:"text",id:"klass0",label:"Class",commit:c,setup:a}]}]}})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function a(e,g){var f=g.block||g.blockLimit;if(!f||f.getName()=="body"){return CKEDITOR.TRISTATE_OFF}if(f.getAscendant("blockquote",true)){return CKEDITOR.TRISTATE_ON}return CKEDITOR.TRISTATE_OFF}function d(e){var f=e.editor;if(f.readOnly){return}var g=f.getCommand("esp_blockquote");g.state=a(f,e.data.path);g.fire("state")}function c(g){for(var e=0,f=g.getChildCount(),h;e<f&&(h=g.getChild(e));e++){if(h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary()){return false}}return true}var b={exec:function(g){var j=g.getCommand("esp_blockquote").state,x=g.getSelection(),q=x&&x.getRanges(true)[0];if(!q){return}var k=x.createBookmarks();if(CKEDITOR.env.ie){var f=k[0].startNode,v=k[0].endNode,h;if(f&&f.getParent().getName()=="blockquote"){h=f;while((h=h.getNext())){if(h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary()){f.move(h,true);break}}}if(v&&v.getParent().getName()=="blockquote"){h=v;while((h=h.getPrevious())){if(h.type==CKEDITOR.NODE_ELEMENT&&h.isBlockBoundary()){v.move(h);break}}}}var t=q.createIterator(),n;t.enlargeBr=g.config.enterMode!=CKEDITOR.ENTER_BR;if(j==CKEDITOR.TRISTATE_OFF){g.openDialog("esp_blockquote")}else{if(j==CKEDITOR.TRISTATE_ON){var w=[],p={};while((n=t.getNextParagraph())){var y=null,r=null;while(n.getParent()){if(n.getParent().getName()=="blockquote"){y=n.getParent();r=n;break}n=n.getParent()}if(y&&r&&!r.getCustomData("blockquote_moveout")){w.push(r);CKEDITOR.dom.element.setMarker(p,r,"blockquote_moveout",true)}}CKEDITOR.dom.element.clearAllMarkers(p);var e=[],o=[];p={};while(w.length>0){var u=w.shift();bqBlock=u.getParent();if(!u.getPrevious()){u.remove().insertBefore(bqBlock)}else{if(!u.getNext()){u.remove().insertAfter(bqBlock)}else{u.breakParent(u.getParent());o.push(u.getNext())}}if(!bqBlock.getCustomData("blockquote_processed")){o.push(bqBlock);CKEDITOR.dom.element.setMarker(p,bqBlock,"blockquote_processed",true)}e.push(u)}CKEDITOR.dom.element.clearAllMarkers(p);for(i=o.length-1;i>=0;i--){bqBlock=o[i];if(c(bqBlock)){bqBlock.remove()}}if(g.config.enterMode==CKEDITOR.ENTER_BR){var m=true;while(e.length){u=e.shift();if(u.getName()=="div"){docFrag=new CKEDITOR.dom.documentFragment(g.document);var s=m&&u.getPrevious()&&!(u.getPrevious().type==CKEDITOR.NODE_ELEMENT&&u.getPrevious().isBlockBoundary());if(s){docFrag.append(g.document.createElement("br"))}var l=u.getNext()&&!(u.getNext().type==CKEDITOR.NODE_ELEMENT&&u.getNext().isBlockBoundary());while(u.getFirst()){u.getFirst().remove().appendTo(docFrag)}if(l){docFrag.append(g.document.createElement("br"))}docFrag.replace(u);m=false}}}}}x.selectBookmarks(k);g.focus()}};CKEDITOR.plugins.add("esp_blockquote",{init:function(f){var e="esp_blockquote";f.addCommand(e,b);f.ui.addButton("Esp_Blockquote",{label:f.lang.blockquote,command:e});f.on("selectionChange",d);CKEDITOR.dialog.add(e,CKEDITOR.getUrl(this.path+"dialogs/esp_blockquote.js"))},requires:["domiterator"]})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a=function(f,i){var e=1,n=2,o=4,C=8,r=/^\s*(\d+)((px)|\%)?\s*$/i,B=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,m=/^\d+px$/;var z=function(){var F=this.getValue(),E=this.getDialog(),D=F.match(r);if(D){if(D[2]=="%"){w(E,false)}F=D[1]}if(E.lockRatio){var G=E.originalElement;if(G.getCustomData("isReady")=="true"){if(this.id=="txtHeight"){if(F&&F!="0"){F=Math.round(G.$.width*(F/G.$.height))}if(!isNaN(F)){E.setValueOf("info","txtWidth",F)}}else{if(F&&F!="0"){F=Math.round(G.$.height*(F/G.$.width))}if(!isNaN(F)){E.setValueOf("info","txtHeight",F)}}}}t(E)};var j=function(I,G){if(G=="onOk"){var E=I.getValueOf("info","txtWidth");var K=I.getValueOf("info","txtHeight");var L="/"+E+"-"+K+"/";var J=I.getValueOf("info","txtUrl");if(J.search(/\/[0-9]+-[0-9]+\//)!=-1){J=J.replace(/\/[0-9]+-[0-9]+\//,L)}else{var F=J.search(/\/[0-9]+\//);var D=J.match(/\/[0-9]+\//);var H=J.substring(F+D[0].length);var J=J.substring(0,F)+D+L.substring(1)+H}}if(G=="onResetSize"){var J=I.getValueOf("info","txtUrl");if(J.search(/\/[0-9]+-[0-9]+/)!=-1){J=J.replace(/\/[0-9]+-[0-9]+/,"")}else{return false}}I.setValueOf("info","txtUrl",J)};var t=function(D){if(!D.originalElement||!D.preview){return 1}D.commitContent(o,D.preview);return 0};function v(){var E=arguments;var D=this.getContentElement("advanced","txtdlgGenStyle");D&&D.commit.apply(D,E);this.foreach(function(F){if(F.commit&&F.id!="txtdlgGenStyle"){F.commit.apply(F,E)}})}var q;function A(D){if(q){return}q=1;var G=this.getDialog(),F=G.imageElement;if(F){this.commit(e,F);D=[].concat(D);var H=D.length,I;for(var E=0;E<H;E++){I=G.getContentElement.apply(G,D[E].split(":"));I&&I.setup(e,F)}}q=0}var w=function(I,K){if(!I.getContentElement("info","ratioLock")){return null}var G=I.originalElement;if(!G){return null}if(K=="check"){if(!I.userlockRatio&&G.getCustomData("isReady")=="true"){var E=I.getValueOf("info","txtWidth"),L=I.getValueOf("info","txtHeight"),H=G.$.width*1000/G.$.height,D=E*1000/L;I.lockRatio=false;if(!E&&!L){I.lockRatio=true}else{if(!isNaN(H)&&!isNaN(D)){if(Math.round(H)==Math.round(D)){I.lockRatio=true}}}}}else{if(K!=undefined){I.lockRatio=K}else{I.userlockRatio=1;I.lockRatio=!I.lockRatio}}var F=CKEDITOR.document.getById(l);if(I.lockRatio){F.removeClass("cke_btn_unlocked")}else{F.addClass("cke_btn_unlocked")}F.setAttribute("aria-checked",I.lockRatio);if(CKEDITOR.env.hc){var J=F.getChild(0);J.setHtml(I.lockRatio?CKEDITOR.env.ie?"\u25A0":"\u25A3":CKEDITOR.env.ie?"\u25A1":"\u25A2")}return I.lockRatio};var k=function(D){j(D,"onResetSize");var G=D.originalElement;if(G.getCustomData("isReady")=="true"){var F=D.getContentElement("info","txtWidth"),E=D.getContentElement("info","txtHeight");F&&F.setValue(G.$.width);E&&E.setValue(G.$.height)}t(D)};var p=function(G,F){if(G!=e){return}function J(M,K){var L=M.match(r);if(L){if(L[2]=="%"){L[1]+="%";w(E,false)}return L[1]}return K}var E=this.getDialog(),H="",I=this.id=="txtWidth"?"width":"height",D=F.getAttribute(I);if(D){H=J(D,H)}H=J(F.getStyle(I),H);this.setValue(H)};var c;var y=function(){var D=this.originalElement;D.setCustomData("isReady","true");D.removeListener("load",y);D.removeListener("error",h);D.removeListener("abort",h);CKEDITOR.document.getById(u).setStyle("display","none");if(!this.dontResetSize){k(this)}if(this.firstLoad){CKEDITOR.tools.setTimeout(function(){w(this,"check")},0,this)}this.firstLoad=false;this.dontResetSize=false};var h=function(){var E=this.originalElement;E.removeListener("load",y);E.removeListener("error",h);E.removeListener("abort",h);var D=CKEDITOR.getUrl(f.skinPath+"images/noimage.png");if(this.preview){this.preview.setAttribute("src",D)}CKEDITOR.document.getById(u).setStyle("display","none");w(this,false)};var x=function(D){return CKEDITOR.tools.getNextId()+"_"+D},l=x("btnLockSizes"),s=x("btnResetSize"),u=x("ImagePreviewLoader"),b=x("ImagePreviewBox"),d=x("previewLink"),g=x("previewImage");return{title:f.lang.image[i=="image"?"title":"titleButton"],minWidth:420,minHeight:360,onShow:function(){this.imageElement=false;this.linkElement=false;this.imageEditMode=false;this.linkEditMode=false;this.lockRatio=true;this.userlockRatio=0;this.dontResetSize=false;this.firstLoad=true;this.addLink=false;var G=this.getParentEditor(),I=this.getParentEditor().getSelection(),F=I.getSelectedElement(),H=F&&F.getAscendant("a");CKEDITOR.document.getById(u).setStyle("display","none");c=new CKEDITOR.dom.element("img",G.document);this.preview=CKEDITOR.document.getById(g);this.originalElement=G.document.createElement("img");this.originalElement.setAttribute("alt","");this.originalElement.setCustomData("isReady","false");if(H){this.linkElement=H;this.linkEditMode=true;var E=H.getChildren();if(E.count()==1){var D=E.getItem(0).getName();if(D=="img"||D=="input"){this.imageElement=E.getItem(0);if(this.imageElement.getName()=="img"){this.imageEditMode="img"}else{if(this.imageElement.getName()=="input"){this.imageEditMode="input"}}}}if(i=="image"){this.setupContent(n,H)}}if(F&&F.getName()=="img"&&!F.data("cke-realelement")||F&&F.getName()=="input"&&F.getAttribute("type")=="image"){this.imageEditMode=F.getName();this.imageElement=F}if(this.imageEditMode){this.cleanImageElement=this.imageElement;this.imageElement=this.cleanImageElement.clone(true,true);this.setupContent(e,this.imageElement)}else{this.imageElement=G.document.createElement("img")}w(this,true);if(!CKEDITOR.tools.trim(this.getValueOf("info","txtUrl"))){this.preview.removeAttribute("src");this.preview.setStyle("display","none")}},onOk:function(){j(this,"onOk");if(this.imageEditMode){var D=this.imageEditMode;if(i=="image"&&D=="input"&&confirm(f.lang.image.button2Img)){D="img";this.imageElement=f.document.createElement("img");this.imageElement.setAttribute("alt","");f.insertElement(this.imageElement)}else{if(i!="image"&&D=="img"&&confirm(f.lang.image.img2Button)){D="input";this.imageElement=f.document.createElement("input");this.imageElement.setAttributes({type:"image",alt:""});f.insertElement(this.imageElement)}else{this.imageElement=this.cleanImageElement;delete this.cleanImageElement}}}else{if(i=="image"){this.imageElement=f.document.createElement("img")}else{this.imageElement=f.document.createElement("input");this.imageElement.setAttribute("type","image")}this.imageElement.setAttribute("alt","")}if(!this.linkEditMode){this.linkElement=f.document.createElement("a")}this.commitContent(e,this.imageElement);this.commitContent(n,this.linkElement);if(!this.imageElement.getAttribute("style")){this.imageElement.removeAttribute("style")}if(!this.imageEditMode){if(this.addLink){if(!this.linkEditMode){f.insertElement(this.linkElement);this.linkElement.append(this.imageElement,false)}else{f.insertElement(this.imageElement)}}else{f.insertElement(this.imageElement)}}else{if(!this.linkEditMode&&this.addLink){f.insertElement(this.linkElement);this.imageElement.appendTo(this.linkElement)}else{if(this.linkEditMode&&!this.addLink){f.getSelection().selectElement(this.linkElement);f.insertElement(this.imageElement)}}}},onLoad:function(){if(i!="image"){this.hidePage("Link")}var D=this._.element.getDocument();if(this.getContentElement("info","ratioLock")){this.addFocusable(D.getById(s),5);this.addFocusable(D.getById(l),5)}this.commitContent=v},onHide:function(){if(this.preview){this.commitContent(C,this.preview)}if(this.originalElement){this.originalElement.removeListener("load",y);this.originalElement.removeListener("error",h);this.originalElement.removeListener("abort",h);this.originalElement.remove();this.originalElement=false}delete this.imageElement},contents:[{id:"info",label:f.lang.image.infoTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["320px","80px"],align:"right",children:[{id:"txtUrl",type:"text",label:f.lang.common.url,required:true,onLoad:function(){this.getInputElement().setAttribute("readonly","readonly")},onChange:function(){var F=this.getDialog(),G=this.getValue();if(G.length>0){F=this.getDialog();var E=F.originalElement;F.preview.removeStyle("display");E.setCustomData("isReady","false");var D=CKEDITOR.document.getById(u);if(D){D.setStyle("display","")}E.on("load",y,F);E.on("error",h,F);E.on("abort",h,F);E.setAttribute("src",G);c.setAttribute("src",G);F.preview.setAttribute("src",c.$.src);t(F)}else{if(F.preview){F.preview.removeAttribute("src");F.preview.setStyle("display","none")}}},setup:function(F,E){if(F==e){var D=E.data("cke-saved-src")||E.getAttribute("src");var G=this;this.getDialog().dontResetSize=true;G.setValue(D);G.setInitValue()}},commit:function(E,D){if(E==e&&(this.getValue()||this.isChanged())){D.data("cke-saved-src",this.getValue());D.setAttribute("src",this.getValue())}else{if(E==C){D.setAttribute("src","");D.removeAttribute("src")}}},validate:CKEDITOR.dialog.validate.notEmpty(f.lang.image.urlMissing)},{type:"button",id:"browse",style:"display:inline-block;margin-top:10px;",align:"center",label:f.lang.esp_image.browseServer,hidden:true,filebrowser:{action:"Browse",target:"info:txtUrl",url:f.config.filebrowserImageBrowseUrl}}]}]},{id:"txtAlt",type:"text",label:f.lang.image.alt,accessKey:"T","default":"",onChange:function(){t(this.getDialog())},setup:function(E,D){if(E==e){this.setValue(D.getAttribute("alt"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("alt",this.getValue())}}else{if(E==o){D.setAttribute("alt",this.getValue())}else{if(E==C){D.removeAttribute("alt")}}}}},{type:"hbox",children:[{id:"basic",type:"vbox",children:[{type:"hbox",widths:["50%","50%"],children:[{type:"vbox",padding:1,children:[{type:"text",width:"40px",id:"txtWidth",label:f.lang.common.width,onKeyUp:z,onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:function(){var D=this.getValue().match(B),E=!!(D&&parseInt(D[1],10)!==0);if(!E){alert(f.lang.common.invalidWidth)}return E},setup:p,commit:function(G,F,E){var H=this.getValue();if(G==e){if(H){F.setStyle("width",CKEDITOR.tools.cssLength(H))}else{F.removeStyle("width")}!E&&F.removeAttribute("width")}else{if(G==o){var D=H.match(r);if(!D){var I=this.getDialog().originalElement;if(I.getCustomData("isReady")=="true"){F.setStyle("width",I.$.width+"px")}}else{F.setStyle("width",CKEDITOR.tools.cssLength(H))}}else{if(G==C){F.removeAttribute("width");F.removeStyle("width")}}}}},{type:"text",id:"txtHeight",width:"40px",label:f.lang.common.height,onKeyUp:z,onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:function(){var D=this.getValue().match(B),E=!!(D&&parseInt(D[1],10)!==0);if(!E){alert(f.lang.common.invalidHeight)}return E},setup:p,commit:function(G,F,E){var H=this.getValue();if(G==e){if(H){F.setStyle("height",CKEDITOR.tools.cssLength(H))}else{F.removeStyle("height")}!E&&F.removeAttribute("height")}else{if(G==o){var D=H.match(r);if(!D){var I=this.getDialog().originalElement;if(I.getCustomData("isReady")=="true"){F.setStyle("height",I.$.height+"px")}}else{F.setStyle("height",CKEDITOR.tools.cssLength(H))}}else{if(G==C){F.removeAttribute("height");F.removeStyle("height")}}}}}]},{id:"ratioLock",type:"html",style:"margin-top:30px;width:40px;height:40px;",onLoad:function(){var D=CKEDITOR.document.getById(s),E=CKEDITOR.document.getById(l);if(D){D.on("click",function(F){k(this);F.data&&F.data.preventDefault()},this.getDialog());D.on("mouseover",function(){this.addClass("cke_btn_over")},D);D.on("mouseout",function(){this.removeClass("cke_btn_over")},D)}if(E){E.on("click",function(G){var H=w(this),J=this.originalElement,I=this.getValueOf("info","txtWidth");if(J.getCustomData("isReady")=="true"&&I){var F=J.$.height/J.$.width*I;if(!isNaN(F)){this.setValueOf("info","txtHeight",Math.round(F));t(this)}}G.data&&G.data.preventDefault()},this.getDialog());E.on("mouseover",function(){this.addClass("cke_btn_over")},E);E.on("mouseout",function(){this.removeClass("cke_btn_over")},E)}},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+f.lang.image.lockRatio+'" class="cke_btn_locked" id="'+l+'" role="checkbox"><span class="cke_icon"></span><span class="cke_label">'+f.lang.image.lockRatio+'</span></a><a href="javascript:void(0)" tabindex="-1" title="'+f.lang.image.resetSize+'" class="cke_btn_reset" id="'+s+'" role="button"><span class="cke_label">'+f.lang.image.resetSize+"</span></a></div>"}]},{type:"vbox",padding:1,children:[{type:"text",id:"txtBorder",width:"60px",label:f.lang.image.border,"default":"",onKeyUp:function(){t(this.getDialog())},onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateBorder),setup:function(F,E){if(F==e){var G,D=E.getStyle("border-width");D=D&&D.match(/^(\d+px)(?: \1 \1 \1)?$/);G=D&&parseInt(D[1],10);isNaN(parseInt(G,10))&&(G=E.getAttribute("border"));this.setValue(G)}},commit:function(F,E,D){var G=parseInt(this.getValue(),10);if(F==e||F==o){if(!isNaN(G)){E.setStyle("border-width",CKEDITOR.tools.cssLength(G));E.setStyle("border-style","solid")}else{if(!G&&this.isChanged()){E.removeStyle("border-width");E.removeStyle("border-style");E.removeStyle("border-color")}}if(!D&&F==e){E.removeAttribute("border")}}else{if(F==C){E.removeAttribute("border");E.removeStyle("border-width");E.removeStyle("border-style");E.removeStyle("border-color")}}}},{type:"text",id:"txtHSpace",width:"60px",label:f.lang.image.hSpace,"default":"",onKeyUp:function(){t(this.getDialog())},onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateHSpace),setup:function(F,E){if(F==e){var H,G,J,D=E.getStyle("margin-left"),I=E.getStyle("margin-right");D=D&&D.match(m);I=I&&I.match(m);G=parseInt(D,10);J=parseInt(I,10);H=(G==J)&&G;isNaN(parseInt(H,10))&&(H=E.getAttribute("hspace"));this.setValue(H)}},commit:function(F,E,D){var G=parseInt(this.getValue(),10);if(F==e||F==o){if(!isNaN(G)){E.setStyle("margin-left",CKEDITOR.tools.cssLength(G));E.setStyle("margin-right",CKEDITOR.tools.cssLength(G))}else{if(!G&&this.isChanged()){E.removeStyle("margin-left");E.removeStyle("margin-right")}}if(!D&&F==e){E.removeAttribute("hspace")}}else{if(F==C){E.removeAttribute("hspace");E.removeStyle("margin-left");E.removeStyle("margin-right")}}}},{type:"text",id:"txtVSpace",width:"60px",label:f.lang.image.vSpace,"default":"",onKeyUp:function(){t(this.getDialog())},onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateVSpace),setup:function(I,H){if(I==e){var J,D,F,E=H.getStyle("margin-top"),G=H.getStyle("margin-bottom");E=E&&E.match(m);G=G&&G.match(m);D=parseInt(E,10);F=parseInt(G,10);J=(D==F)&&D;isNaN(parseInt(J,10))&&(J=H.getAttribute("vspace"));this.setValue(J)}},commit:function(F,E,D){var G=parseInt(this.getValue(),10);if(F==e||F==o){if(!isNaN(G)){E.setStyle("margin-top",CKEDITOR.tools.cssLength(G));E.setStyle("margin-bottom",CKEDITOR.tools.cssLength(G))}else{if(!G&&this.isChanged()){E.removeStyle("margin-top");E.removeStyle("margin-bottom")}}if(!D&&F==e){E.removeAttribute("vspace")}}else{if(F==C){E.removeAttribute("vspace");E.removeStyle("margin-top");E.removeStyle("margin-bottom")}}}},{id:"cmbAlign",type:"select",widths:["35%","65%"],style:"width:90px",label:f.lang.common.align,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.alignLeft,"left"],[f.lang.common.alignRight,"right"]],onChange:function(){t(this.getDialog());A.call(this,"advanced:txtdlgGenStyle")},setup:function(E,D){if(E==e){var F=D.getStyle("float");switch(F){case"inherit":case"none":F=""}!F&&(F=(D.getAttribute("align")||"").toLowerCase());this.setValue(F)}},commit:function(F,E,D){var G=this.getValue();if(F==e||F==o){if(G){E.setStyle("float",G)}else{E.removeStyle("float")}if(!D&&F==e){G=(E.getAttribute("align")||"").toLowerCase();switch(G){case"left":case"right":E.removeAttribute("align")}}}else{if(F==C){E.removeStyle("float")}}}}]}]},{type:"vbox",height:"250px",children:[{type:"html",id:"htmlPreview",style:"width:95%;",html:"<div>"+CKEDITOR.tools.htmlEncode(f.lang.common.preview)+'<br><div id="'+u+'" class="ImagePreviewLoader" style="display:none"><div class="loading"> </div></div><div id="'+b+'" class="ImagePreviewBox"><table><tr><td><a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+d+'"><img id="'+g+'" alt="" /></a>'+(f.config.image_previewText||"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.")+"</td></tr></table></div></div>"}]}]}]},{id:"Link",label:f.lang.link.title,padding:0,elements:[{id:"txtUrl",type:"text",label:f.lang.common.url,style:"width: 100%","default":"",setup:function(F,E){if(F==n){var D=E.data("cke-saved-href");if(!D){D=E.getAttribute("href")}this.setValue(D)}},commit:function(F,E){if(F==n){if(this.getValue()||this.isChanged()){var D=decodeURI(this.getValue());E.data("cke-saved-href",D);E.setAttribute("href",D);if(this.getValue()||!f.config.image_removeLinkByEmptyURL){this.getDialog().addLink=true}}}}},{type:"button",id:"browse",filebrowser:{action:"Browse",target:"Link:txtUrl",url:f.config.filebrowserImageBrowseUrl},style:"float:right",hidden:true,label:f.lang.esp_image.browseServer},{id:"cmbTarget",type:"select",label:f.lang.common.target,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.targetNew,"_blank"],[f.lang.common.targetTop,"_top"],[f.lang.common.targetSelf,"_self"],[f.lang.common.targetParent,"_parent"]],setup:function(E,D){if(E==n){this.setValue(D.getAttribute("target")||"")}},commit:function(E,D){if(E==n){if(this.getValue()||this.isChanged()){D.setAttribute("target",this.getValue())}}}}]},{id:"advanced",label:f.lang.common.advancedTab,elements:[{type:"hbox",widths:["50%","25%","25%"],children:[{type:"text",id:"linkId",label:f.lang.common.id,setup:function(E,D){if(E==e){this.setValue(D.getAttribute("id"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("id",this.getValue())}}}},{id:"cmbLangDir",type:"select",style:"width : 100px;",label:f.lang.common.langDir,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.langDirLtr,"ltr"],[f.lang.common.langDirRtl,"rtl"]],setup:function(E,D){if(E==e){this.setValue(D.getAttribute("dir"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("dir",this.getValue())}}}},{type:"text",id:"txtLangCode",label:f.lang.common.langCode,"default":"",setup:function(E,D){if(E==e){this.setValue(D.getAttribute("lang"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("lang",this.getValue())}}}}]},{type:"text",id:"txtGenLongDescr",label:f.lang.common.longDescr,setup:function(E,D){if(E==e){this.setValue(D.getAttribute("longDesc"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("longDesc",this.getValue())}}}},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"txtGenClass",label:f.lang.common.cssClass,"default":"",setup:function(E,D){if(E==e){this.setValue(D.getAttribute("class"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("class",this.getValue())}}}},{type:"text",id:"txtGenTitle",label:f.lang.common.advisoryTitle,"default":"",onChange:function(){t(this.getDialog())},setup:function(E,D){if(E==e){this.setValue(D.getAttribute("title"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("title",this.getValue())}}else{if(E==o){D.setAttribute("title",this.getValue())}else{if(E==C){D.removeAttribute("title")}}}}}]},{type:"text",id:"txtdlgGenStyle",label:f.lang.common.cssStyle,validate:CKEDITOR.dialog.validate.inlineStyle(f.lang.common.invalidInlineStyle),"default":"",setup:function(H,F){if(H==e){var I=F.getAttribute("style");if(!I&&F.$.style.cssText){I=F.$.style.cssText}this.setValue(I);var D=F.$.style.height,G=F.$.style.width,J=(D?D:"").match(r),E=(G?G:"").match(r);this.attributesInStyle={height:!!J,width:!!E}}},onChange:function(){A.call(this,["info:cmbFloat","info:cmbAlign","info:txtVSpace","info:txtHSpace","info:txtBorder","info:txtWidth","info:txtHeight"]);t(this)},commit:function(E,D){if(E==e&&(this.getValue()||this.isChanged())){D.setAttribute("style",this.getValue())}}}]}]}};CKEDITOR.dialog.add("esp_image",function(b){return a(b,"image")});CKEDITOR.dialog.add("esp_imagebutton",function(b){return a(b,"imagebutton")})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_image","en",{esp_image:{image:"Image",browseServer:"Browse"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_image","ru",{esp_image:{image:"Изображение",browseServer:"Выбор"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_image","uk",{esp_image:{image:"Зображення",browseServer:"Вибір"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("esp_image",{lang:["en","ru","uk"],init:function(a){var b="esp_image";CKEDITOR.dialog.add(b,this.path+"dialogs/esp_image.js");a.addCommand(b,new CKEDITOR.dialogCommand(b));a.ui.addButton("Esp_image",{label:a.lang.esp_image.image,command:b,icon:this.path+"images/esp_image.png"});a.on("doubleclick",function(c){var d=c.data.element;if(d.is("img")&&!d.data("cke-realelement")&&!d.isReadOnly()){c.data.dialog="esp_image"}});if(a.addMenuItems){a.addMenuItems({esp_image:{label:a.lang.esp_image.menu,command:"esp_image",group:"esp_image"}})}if(a.contextMenu){a.contextMenu.addListener(function(c,d){if(!c||!c.is("img")||c.data("cke-realelement")||c.isReadOnly()){return null}return{esp_image:CKEDITOR.TRISTATE_OFF}})}}});CKEDITOR.config.esp_image_removeLinkByEmptyURL=true;
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.dialog.add("esp_anchor",function(b){var c=function(d){this._.selectedElement=d;var e=d.data("cke-saved-name");this.setValueOf("info","txtName",e||"")};function a(e,d){return e.createFakeElement(d,"cke_anchor","anchor")}return{title:b.lang.anchor.title,minWidth:300,minHeight:60,onOk:function(){var g=this.getValueOf("info","txtName");var e={name:g,"data-cke-saved-name":g};if(this._.selectedElement){if(this._.selectedElement.data("cke-realelement")){var j=a(b,b.document.createElement("a",{attributes:e}));j.replace(this._.selectedElement)}else{this._.selectedElement.setAttributes(e)}}else{var i=b.getSelection(),d=i&&i.getRanges()[0];if(d.collapsed){if(CKEDITOR.plugins.link.synAnchorSelector){e["class"]="cke_anchor_empty"}if(CKEDITOR.plugins.link.emptyAnchorFix){e.contenteditable="false";e["data-cke-editable"]=1}var f=b.document.createElement("a",{attributes:e});if(CKEDITOR.plugins.link.fakeAnchor){f=a(b,f)}d.insertNode(f)}else{if(CKEDITOR.env.ie&&CKEDITOR.env.version<9){e["class"]="cke_anchor"}var h=new CKEDITOR.style({element:"a",attributes:e});h.type=CKEDITOR.STYLE_INLINE;h.apply(b.document)}}},onHide:function(){delete this._.selectedElement},onShow:function(){var f=b.getSelection(),g=f.getSelectedElement(),d;if(g){if(CKEDITOR.plugins.link.fakeAnchor){var e=CKEDITOR.plugins.link.tryRestoreFakeAnchor(b,g);e&&c.call(this,e);this._.selectedElement=g}else{if(g.is("a")&&g.hasAttribute("name")){c.call(this,g)}}}else{d=CKEDITOR.plugins.link.getSelectedLink(b);if(d){c.call(this,d);f.selectElement(d)}}this.getContentElement("info","txtName").focus()},contents:[{id:"info",label:b.lang.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:b.lang.anchor.name,required:true,validate:function(){if(!this.getValue()){alert(b.lang.anchor.errorName);return false}return true}}]}]}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.dialog.add("esp_link",function(l){var i=CKEDITOR.plugins.esp_link;var y=function(){var G=this.getDialog(),F=G.getContentElement("target","popupFeatures"),H=G.getContentElement("target","linkTargetName"),I=this.getValue();if(!F||!H){return}F=F.getElement();F.hide();H.setValue("");switch(I){case"frame":H.setLabel(l.lang.link.targetFrameName);H.getElement().show();break;case"popup":F.show();H.setLabel(l.lang.link.targetPopupName);H.getElement().show();break;default:H.setValue(I);H.getElement().hide();break}};var D=function(){var H=this.getDialog(),J=["urlOptions","anchorOptions","emailOptions"],I=this.getValue();if(I=="url"){if(l.config.linkShowTargetTab){H.showPage("target")}}else{H.hidePage("target")}for(var G=0;G<J.length;G++){var F=H.getContentElement("info",J[G]);if(!F){continue}F=F.getElement().getParent().getParent();if(J[G]==I+"Options"){F.show()}else{F.hide()}}H.layout()};var E=/^javascript:/,u=/^mailto:([^?]+)(?:\?(.+))?$/,j=/subject=([^;?:@&=$,\/]*)/,k=/body=([^;?:@&=$,\/]*)/,t=/^#(.*)$/,n=/^((?:http|https|ftp|news):\/\/)?(.*)$/,b=/^(_(?:self|top|parent|blank))$/,a=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,w=/^javascript:([^(]+)\(([^)]+)\)$/;var o=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/;var h=/(?:^|,)([^=]+)=(\d+|yes|no)/gi;var r=function(H,G){var W=(G&&(G.data("cke-saved-href")||G.getAttribute("href")))||"",J,V,T,K,P={};if((J=W.match(E))){if(p=="encode"){W=W.replace(a,function(ae,ag,af){return"mailto:"+String.fromCharCode.apply(String,ag.split(","))+(af&&x(af))})}else{if(p){W.replace(w,function(ak,am,ah){if(am==A.name){P.type="email";var al=P.email={};var af=/[^,\s]+/g,ag=/(^')|('$)/g,ae=ah.match(af),an=ae.length,aj,ao;for(var ai=0;ai<an;ai++){ao=decodeURIComponent(x(ae[ai].replace(ag,"")));aj=A.params[ai].toLowerCase();al[aj]=ao}al.address=[al.name,al.domain].join("@")}})}}}if(!P.type){if((T=W.match(t))){P.type="anchor";P.anchor={};P.anchor.name=P.anchor.id=T[1]}else{if((V=W.match(u))){var O=W.match(j),Q=W.match(k);P.type="email";var R=(P.email={});R.address=V[1];O&&(R.subject=decodeURIComponent(O[1]));Q&&(R.body=decodeURIComponent(Q[1]))}else{if(W&&(K=W.match(n))){P.type="url";P.url={};P.url.protocol=K[1];P.url.url=K[2]}else{P.type="url"}}}}if(G){var ab=G.getAttribute("target");P.target={};P.adv={};if(!ab){var ad=G.data("cke-pa-onclick")||G.getAttribute("onclick"),Y=ad&&ad.match(o);if(Y){P.target.type="popup";P.target.name=Y[1];var L;while((L=h.exec(Y[2]))){if((L[2]=="yes"||L[2]=="1")&&!(L[1] in {height:1,width:1,top:1,left:1})){P.target[L[1]]=true}else{if(isFinite(L[2])){P.target[L[1]]=L[2]}}}}}else{var ac=ab.match(b);if(ac){P.target.type=P.target.name=ab}else{P.target.type="frame";P.target.name=ab}}var aa=this;var S=function(ae,af){var ag=G.getAttribute(af);if(ag!==null){P.adv[ae]=ag||""}};S("advId","id");S("advLangDir","dir");S("advAccessKey","accessKey");P.adv.advName=G.data("cke-saved-name")||G.getAttribute("name")||"";S("advLangCode","lang");S("advTabIndex","tabindex");S("advTitle","title");S("advContentType","type");CKEDITOR.plugins.esp_link.synAnchorSelector?P.adv.advCSSClasses=B(G):S("advCSSClasses","class");S("advCharset","charset");S("advStyles","style");S("advRel","rel")}var N=P.anchors=[],Z;if(CKEDITOR.plugins.esp_link.emptyAnchorFix){var F=H.document.getElementsByTag("a");for(U=0,I=F.count();U<I;U++){Z=F.getItem(U);if(Z.data("cke-saved-name")||Z.hasAttribute("name")){N.push({name:Z.data("cke-saved-name")||Z.getAttribute("name"),id:Z.getAttribute("id")})}}}else{var X=new CKEDITOR.dom.nodeList(H.document.$.anchors);for(var U=0,I=X.count();U<I;U++){Z=X.getItem(U);N[U]={name:Z.getAttribute("name"),id:Z.getAttribute("id")}}}if(CKEDITOR.plugins.esp_link.fakeAnchor){var M=H.document.getElementsByTag("img");for(U=0,I=M.count();U<I;U++){if((Z=CKEDITOR.plugins.esp_link.tryRestoreFakeAnchor(H,M.getItem(U)))){N.push({name:Z.getAttribute("name"),id:Z.getAttribute("id")})}}}this._.selectedElement=G;return P};var g=function(G,F){if(F[G]){this.setValue(F[G][this.id]||"")}};var m=function(F){return g.call(this,"target",F)};var f=function(F){return g.call(this,"adv",F)};var e=function(G,F){if(!F[G]){F[G]={}}F[G][this.id]=this.getValue()||""};var C=function(F){return e.call(this,"target",F)};var d=function(F){return e.call(this,"adv",F)};function x(F){return F.replace(/\\'/g,"'")}function z(F){return F.replace(/'/g,"\\$&")}var p=l.config.emailProtection||"";if(p&&p!="encode"){var A={};p.replace(/^([^(]+)\(([^)]+)\)$/,function(F,G,H){A.name=G;A.params=[];H.replace(/[^,\s]+/g,function(I){A.params.push(I)})})}function c(H){var F,G=A.name,L=A.params,J,K;F=[G,"("];for(var I=0;I<L.length;I++){J=L[I].toLowerCase();K=H[J];I>0&&F.push(",");F.push("'",K?z(encodeURIComponent(H[J])):"","'")}F.push(")");return F.join("")}function v(G){var F,J=G.length,H=[];for(var I=0;I<J;I++){F=G.charCodeAt(I);H.push(F)}return"String.fromCharCode("+H.join(",")+")"}function B(G){var F=G.getAttribute("class");return F?F.replace(/\s*(?:cke_anchor_empty|cke_anchor)(?:\s*$)?/g,""):""}var s=l.lang.common,q=l.lang.link;return{title:q.title,minWidth:350,minHeight:230,contents:[{id:"info",label:q.info,title:q.info,elements:[{id:"linkType",type:"select",label:q.type,"default":"url",items:[[q.toUrl,"url"],[q.toAnchor,"anchor"],[q.toEmail,"email"]],onChange:D,setup:function(F){if(F.type){this.setValue(F.type)}},commit:function(F){F.type=this.getValue()}},{type:"vbox",id:"urlOptions",children:[{type:"hbox",widths:["25%","75%"],children:[{id:"protocol",type:"select",label:s.protocol,"default":"http://",items:[["http://\u200E","http://"],["https://\u200E","https://"],["ftp://\u200E","ftp://"],["news://\u200E","news://"],[q.other,""]],setup:function(F){if(F.url){this.setValue(F.url.protocol||"")}},commit:function(F){if(!F.url){F.url={}}F.url.protocol=this.getValue()}},{type:"text",id:"url",label:s.url,required:true,onLoad:function(){this.allowOnChange=true},onKeyUp:function(){this.allowOnChange=false;var H=this.getDialog().getContentElement("info","protocol"),F=this.getValue(),G=/^(http|https|ftp|news):\/\/(?=.)/i,J=/^((javascript:)|[#\/\.\?])/i;var I=G.exec(F);if(I){this.setValue(F.substr(I[0].length));H.setValue(I[0].toLowerCase())}else{if(J.test(F)){H.setValue("")}}this.allowOnChange=true},onChange:function(){if(this.allowOnChange){this.onKeyUp()}},validate:function(){var F=this.getDialog();if(F.getContentElement("info","linkType")&&F.getValueOf("info","linkType")!="url"){return true}if(this.getDialog().fakeObj){return true}var G=CKEDITOR.dialog.validate.notEmpty(q.noUrl);return G.apply(this)},setup:function(F){this.allowOnChange=false;if(F.url){this.setValue(F.url.url)}this.allowOnChange=true},commit:function(F){this.onChange();if(!F.url){F.url={}}F.url.url=this.getValue();this.allowOnChange=false}}],setup:function(F){if(!this.getDialog().getContentElement("info","linkType")){this.getElement().show()}}},{type:"button",id:"browse",hidden:"true",filebrowser:"info:url",label:l.lang.esp_link.browseServer}]},{type:"vbox",id:"anchorOptions",width:260,align:"center",padding:0,children:[{type:"fieldset",id:"selectAnchorText",label:q.selectAnchor,setup:function(F){if(F.anchors.length>0){this.getElement().show()}else{this.getElement().hide()}},children:[{type:"hbox",id:"selectAnchor",children:[{type:"select",id:"anchorName","default":"",label:q.anchorName,style:"width: 100%;",items:[[""]],setup:function(H){this.clear();this.add("");for(var G=0;G<H.anchors.length;G++){if(H.anchors[G].name){this.add(H.anchors[G].name)}}if(H.anchor){this.setValue(H.anchor.name)}var F=this.getDialog().getContentElement("info","linkType");if(F&&F.getValue()=="email"){this.focus()}},commit:function(F){if(!F.anchor){F.anchor={}}F.anchor.name=this.getValue()}},{type:"select",id:"anchorId","default":"",label:q.anchorId,style:"width: 100%;",items:[[""]],setup:function(G){this.clear();this.add("");for(var F=0;F<G.anchors.length;F++){if(G.anchors[F].id){this.add(G.anchors[F].id)}}if(G.anchor){this.setValue(G.anchor.id)}},commit:function(F){if(!F.anchor){F.anchor={}}F.anchor.id=this.getValue()}}],setup:function(F){if(F.anchors.length>0){this.getElement().show()}else{this.getElement().hide()}}}]},{type:"html",id:"noAnchors",style:"text-align: center;",html:'<div role="label" tabIndex="-1">'+CKEDITOR.tools.htmlEncode(q.noAnchors)+"</div>",focus:true,setup:function(F){if(F.anchors.length<1){this.getElement().show()}else{this.getElement().hide()}}}],setup:function(F){if(!this.getDialog().getContentElement("info","linkType")){this.getElement().hide()}}},{type:"vbox",id:"emailOptions",padding:1,children:[{type:"text",id:"emailAddress",label:q.emailAddress,required:true,validate:function(){var F=this.getDialog();if(!F.getContentElement("info","linkType")||F.getValueOf("info","linkType")!="email"){return true}var G=CKEDITOR.dialog.validate.notEmpty(q.noEmail);return G.apply(this)},setup:function(G){if(G.email){this.setValue(G.email.address)}var F=this.getDialog().getContentElement("info","linkType");if(F&&F.getValue()=="email"){this.select()}},commit:function(F){if(!F.email){F.email={}}F.email.address=this.getValue()}},{type:"text",id:"emailSubject",label:q.emailSubject,setup:function(F){if(F.email){this.setValue(F.email.subject)}},commit:function(F){if(!F.email){F.email={}}F.email.subject=this.getValue()}},{type:"textarea",id:"emailBody",label:q.emailBody,rows:3,"default":"",setup:function(F){if(F.email){this.setValue(F.email.body)}},commit:function(F){if(!F.email){F.email={}}F.email.body=this.getValue()}}],setup:function(F){if(!this.getDialog().getContentElement("info","linkType")){this.getElement().hide()}}}]},{id:"target",label:q.target,title:q.target,elements:[{type:"hbox",widths:["50%","50%"],children:[{type:"select",id:"linkTargetType",label:s.target,"default":"notSet",style:"width : 100%;",items:[[s.notSet,"notSet"],[q.targetFrame,"frame"],[q.targetPopup,"popup"],[s.targetNew,"_blank"],[s.targetTop,"_top"],[s.targetSelf,"_self"],[s.targetParent,"_parent"]],onChange:y,setup:function(F){if(F.target){this.setValue(F.target.type||"notSet")}y.call(this)},commit:function(F){if(!F.target){F.target={}}F.target.type=this.getValue()}},{type:"text",id:"linkTargetName",label:q.targetFrameName,"default":"",setup:function(F){if(F.target){this.setValue(F.target.name)}},commit:function(F){if(!F.target){F.target={}}F.target.name=this.getValue().replace(/\W/gi,"")}}]},{type:"vbox",width:"100%",align:"center",padding:2,id:"popupFeatures",children:[{type:"fieldset",label:q.popupFeatures,children:[{type:"hbox",children:[{type:"checkbox",id:"resizable",label:q.popupResizable,setup:m,commit:C},{type:"checkbox",id:"status",label:q.popupStatusBar,setup:m,commit:C}]},{type:"hbox",children:[{type:"checkbox",id:"location",label:q.popupLocationBar,setup:m,commit:C},{type:"checkbox",id:"toolbar",label:q.popupToolbar,setup:m,commit:C}]},{type:"hbox",children:[{type:"checkbox",id:"menubar",label:q.popupMenuBar,setup:m,commit:C},{type:"checkbox",id:"fullscreen",label:q.popupFullScreen,setup:m,commit:C}]},{type:"hbox",children:[{type:"checkbox",id:"scrollbars",label:q.popupScrollBars,setup:m,commit:C},{type:"checkbox",id:"dependent",label:q.popupDependent,setup:m,commit:C}]},{type:"hbox",children:[{type:"text",widths:["50%","50%"],labelLayout:"horizontal",label:s.width,id:"width",setup:m,commit:C},{type:"text",labelLayout:"horizontal",widths:["50%","50%"],label:q.popupLeft,id:"left",setup:m,commit:C}]},{type:"hbox",children:[{type:"text",labelLayout:"horizontal",widths:["50%","50%"],label:s.height,id:"height",setup:m,commit:C},{type:"text",labelLayout:"horizontal",label:q.popupTop,widths:["50%","50%"],id:"top",setup:m,commit:C}]}]}]}]},{id:"advanced",label:q.advanced,title:q.advanced,elements:[{type:"vbox",padding:1,children:[{type:"hbox",widths:["45%","35%","20%"],children:[{type:"text",id:"advId",label:q.id,setup:f,commit:d},{type:"select",id:"advLangDir",label:q.langDir,"default":"",style:"width:110px",items:[[s.notSet,""],[q.langDirLTR,"ltr"],[q.langDirRTL,"rtl"]],setup:f,commit:d},{type:"text",id:"advAccessKey",width:"80px",label:q.acccessKey,maxLength:1,setup:f,commit:d}]},{type:"hbox",widths:["45%","35%","20%"],children:[{type:"text",label:q.name,id:"advName",setup:f,commit:d},{type:"text",label:q.langCode,id:"advLangCode",width:"110px","default":"",setup:f,commit:d},{type:"text",label:q.tabIndex,id:"advTabIndex",width:"80px",maxLength:5,setup:f,commit:d}]}]},{type:"vbox",padding:1,children:[{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:q.advisoryTitle,"default":"",id:"advTitle",setup:f,commit:d},{type:"text",label:q.advisoryContentType,"default":"",id:"advContentType",setup:f,commit:d}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:q.cssClasses,"default":"",id:"advCSSClasses",setup:f,commit:d},{type:"text",label:q.charset,"default":"",id:"advCharset",setup:f,commit:d}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:q.rel,"default":"",id:"advRel",setup:f,commit:d},{type:"text",label:q.styles,"default":"",id:"advStyles",validate:CKEDITOR.dialog.validate.inlineStyle(l.lang.common.invalidInlineStyle),setup:f,commit:d}]}]}]}],onShow:function(){var H=this.getParentEditor(),G=H.getSelection(),F=null;if((F=i.getSelectedLink(H))&&F.hasAttribute("href")){G.selectElement(F)}else{F=null}this.setupContent(r.apply(this,[H,F]))},onOk:function(){var O={},I=[],af={},ae=this,K=this.getParentEditor();this.commitContent(af);switch(af.type||"url"){case"url":var T=(af.url&&af.url.protocol!=undefined)?af.url.protocol:"http://",L=(af.url&&CKEDITOR.tools.trim(af.url.url))||"";O["data-cke-saved-href"]=(L.indexOf("/")===0)?L:T+L;break;case"anchor":var ah=(af.anchor&&af.anchor.name),U=(af.anchor&&af.anchor.id);O["data-cke-saved-href"]="#"+(ah||U||"");break;case"email":var H,W=af.email,J=W.address;switch(p){case"":case"encode":var M=encodeURIComponent(W.subject||""),P=encodeURIComponent(W.body||"");var N=[];M&&N.push("subject="+M);P&&N.push("body="+P);N=N.length?"?"+N.join("&"):"";if(p=="encode"){H=["javascript:void(location.href='mailto:'+",v(J)];N&&H.push("+'",z(N),"'");H.push(")")}else{H=["mailto:",J,N]}break;default:var V=J.split("@",2);W.name=V[0];W.domain=V[1];H=["javascript:",c(W)]}O["data-cke-saved-href"]=H.join("");break}if(af.target){if(af.target.type=="popup"){var Y=["window.open(this.href, '",af.target.name||"","', '"];var ac=["resizable","status","location","toolbar","menubar","fullscreen","scrollbars","dependent"];var ad=ac.length;var S=function(ai){if(af.target[ai]){ac.push(ai+"="+af.target[ai])}};for(var aa=0;aa<ad;aa++){ac[aa]=ac[aa]+(af.target[ac[aa]]?"=yes":"=no")}S("width");S("left");S("height");S("top");Y.push(ac.join(","),"'); return false;");O["data-cke-pa-onclick"]=Y.join("");I.push("target")}else{if(af.target.type!="notSet"&&af.target.name){O.target=af.target.name}else{I.push("target")}I.push("data-cke-pa-onclick","onclick")}}if(af.adv){var X=function(ai,aj){var ak=af.adv[ai];if(ak){O[aj]=ak}else{I.push(aj)}};X("advId","id");X("advLangDir","dir");X("advAccessKey","accessKey");if(af.adv.advName){O.name=O["data-cke-saved-name"]=af.adv.advName}else{I=I.concat(["data-cke-saved-name","name"])}X("advLangCode","lang");X("advTabIndex","tabindex");X("advTitle","title");X("advContentType","type");X("advCSSClasses","class");X("advCharset","charset");X("advStyles","style");X("advRel","rel")}O.href=O["data-cke-saved-href"];if(!this._.selectedElement){var ag=K.getSelection(),G=ag.getRanges(true);if(G.length==1&&G[0].collapsed){var R=new CKEDITOR.dom.text(af.type=="email"?af.email.address:O["data-cke-saved-href"],K.document);G[0].insertNode(R);G[0].selectNodeContents(R);ag.selectRanges(G)}var ab=new CKEDITOR.style({element:"a",attributes:O});ab.type=CKEDITOR.STYLE_INLINE;ab.apply(K.document)}else{var F=this._.selectedElement,Z=F.data("cke-saved-href"),Q=F.getHtml();F.setAttributes(O);F.removeAttributes(I);if(af.adv&&af.adv.advName&&CKEDITOR.plugins.esp_link.synAnchorSelector){F.addClass(F.getChildCount()?"cke_anchor":"cke_anchor_empty")}if(Z==Q||af.type=="email"&&Q.indexOf("@")!=-1){F.setHtml(af.type=="email"?af.email.address:O["data-cke-saved-href"])}delete this._.selectedElement}},onLoad:function(){if(!l.config.linkShowAdvancedTab){this.hidePage("advanced")}if(!l.config.linkShowTargetTab){this.hidePage("target")}},onFocus:function(){var F=this.getContentElement("info","linkType"),G;if(F&&F.getValue()=="url"){G=this.getContentElement("info","url");G.select()}}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_link","en",{esp_link:{browseServer:"Browse"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_link","ru",{esp_link:{browseServer:"Выбор"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_link","uk",{esp_link:{browseServer:"Вибір"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("esp_link",{lang:["en","ru","uk"],init:function(b){b.addCommand("esp_link",new CKEDITOR.dialogCommand("esp_link"));b.addCommand("esp_anchor",new CKEDITOR.dialogCommand("esp_anchor"));b.addCommand("unlink",new CKEDITOR.unlinkCommand());b.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand());b.ui.addButton("Esp_link",{label:b.lang.link.toolbar,command:"esp_link",icon:this.path+"images/esp_link.png"});b.ui.addButton("Esp_unlink",{label:b.lang.unlink,command:"unlink",icon:this.path+"images/esp_unlink.png"});b.ui.addButton("Esp_anchor",{label:b.lang.anchor.toolbar,command:"esp_anchor",icon:this.path+"images/esp_anchor.png"});CKEDITOR.dialog.add("esp_link",this.path+"dialogs/esp_link.js");CKEDITOR.dialog.add("esp_anchor",this.path+"dialogs/esp_anchor.js");var a=(b.lang.dir=="rtl"?"right":"left");var c="background:url("+CKEDITOR.getUrl(this.path+"images/anchor.png")+") no-repeat "+a+" center;border:1px dotted #00f;";b.addCss("a.cke_anchor,a.cke_anchor_empty"+((CKEDITOR.env.ie&&CKEDITOR.env.version<7)?"":",a[name],a[data-cke-saved-name]")+"{"+c+"padding-"+a+":18px;cursor:auto;}"+(CKEDITOR.env.ie?("a.cke_anchor_empty{display:inline-block;}"):"")+"img.cke_anchor{"+c+"width:16px;min-height:15px;height:1.15em;vertical-align:"+(CKEDITOR.env.opera?"middle":"text-bottom")+";}");b.on("selectionChange",function(d){if(b.readOnly){return}var f=b.getCommand("unlink"),e=d.data.path.lastElement&&d.data.path.lastElement.getAscendant("a",true);if(e&&e.getName()=="a"&&e.getAttribute("href")&&e.getChildCount()){f.setState(CKEDITOR.TRISTATE_OFF)}else{f.setState(CKEDITOR.TRISTATE_DISABLED)}});b.on("doubleclick",function(d){var e=CKEDITOR.plugins.esp_link.getSelectedLink(b)||d.data.element;if(!e.isReadOnly()){if(e.is("a")){d.data.dialog=(e.getAttribute("name")&&(!e.getAttribute("href")||!e.getChildCount()))?"anchor":"link";b.getSelection().selectElement(e)}else{if(CKEDITOR.plugins.esp_link.tryRestoreFakeAnchor(b,e)){d.data.dialog="anchor"}}}});if(b.addMenuItems){b.addMenuItems({anchor:{label:b.lang.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:b.lang.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:b.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:b.lang.unlink,command:"unlink",group:"link",order:5}})}if(b.contextMenu){b.contextMenu.addListener(function(e,f){if(!e||e.isReadOnly()){return null}var d=CKEDITOR.plugins.esp_link.tryRestoreFakeAnchor(b,e);if(!d&&!(d=CKEDITOR.plugins.esp_link.getSelectedLink(b))){return null}var g={};if(d.getAttribute("href")&&d.getChildCount()){g={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF}}if(d&&d.hasAttribute("name")){g.anchor=g.removeAnchor=CKEDITOR.TRISTATE_OFF}return g})}},afterInit:function(b){var a=b.dataProcessor,d=a&&a.dataFilter,e=a&&a.htmlFilter,c=b._.elementsPath&&b._.elementsPath.filters;if(d){d.addRules({elements:{a:function(i){var h=i.attributes;if(!h.name){return null}var j=!i.children.length;if(CKEDITOR.plugins.esp_link.synAnchorSelector){var g=j?"cke_anchor_empty":"cke_anchor";var f=h["class"];if(h.name&&(!f||f.indexOf(g)<0)){h["class"]=(f||"")+" "+g}if(j&&CKEDITOR.plugins.esp_link.emptyAnchorFix){h.contenteditable="false";h["data-cke-editable"]=1}}else{if(CKEDITOR.plugins.esp_link.fakeAnchor&&j){return b.createFakeParserElement(i,"cke_anchor","anchor")}}return null}}})}if(CKEDITOR.plugins.esp_link.emptyAnchorFix&&e){e.addRules({elements:{a:function(f){delete f.attributes.contenteditable}}})}if(c){c.push(function(g,f){if(f=="a"){if(CKEDITOR.plugins.esp_link.tryRestoreFakeAnchor(b,g)||(g.getAttribute("name")&&(!g.getAttribute("href")||!g.getChildCount()))){return"anchor"}}})}},requires:["fakeobjects"]});CKEDITOR.plugins.esp_link={getSelectedLink:function(d){try{var c=d.getSelection();if(c.getType()==CKEDITOR.SELECTION_ELEMENT){var g=c.getSelectedElement();if(g.is("a")){return g}}var b=c.getRanges(true)[0];b.shrink(CKEDITOR.SHRINK_TEXT);var a=b.getCommonAncestor();return a.getAscendant("a",true)}catch(f){return null}},fakeAnchor:CKEDITOR.env.opera||CKEDITOR.env.webkit,synAnchorSelector:CKEDITOR.env.ie,emptyAnchorFix:CKEDITOR.env.ie&&CKEDITOR.env.version<8,tryRestoreFakeAnchor:function(b,a){if(a&&a.data("cke-real-element-type")&&a.data("cke-real-element-type")=="anchor"){var c=b.restoreRealElement(a);if(c.data("cke-saved-name")){return c}}}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(f){var e=f.getSelection(),d=e.createBookmarks(),a=e.getRanges(),g,c;for(var b=0;b<a.length;b++){g=a[b].getCommonAncestor(true);c=g.getAscendant("a",true);if(!c){continue}a[b].selectNodeContents(c)}e.selectRanges(a);f.document.$.execCommand("unlink",false,null);e.selectBookmarks(d)},startDisabled:true};CKEDITOR.removeAnchorCommand=function(){};CKEDITOR.removeAnchorCommand.prototype={exec:function(b){var d=b.getSelection(),c=d.createBookmarks(),a;if(d&&(a=d.getSelectedElement())&&(CKEDITOR.plugins.esp_link.fakeAnchor&&!a.getChildCount()?CKEDITOR.plugins.esp_link.tryRestoreFakeAnchor(b,a):a.is("a"))){a.remove(1)}else{if((a=CKEDITOR.plugins.esp_link.getSelectedLink(b))){if(a.hasAttribute("href")){a.removeAttributes({name:1,"data-cke-saved-name":1});a.removeClass("cke_anchor")}else{a.remove(1)}}}d.selectBookmarks(c)}};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:true,linkShowTargetTab:true});
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var e=".%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;background-position: top %3;border: 1px dotted gray;padding-top: 8px;padding-bottom: 8px;padding-%3: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}";var a=/%1/g,b=/%2/g,d=/%3/g;var c={readOnly:1,preserveState:true,editorFocus:false,exec:function(f){this.toggleState();this.refresh(f)},refresh:function(f){if(f.document){var g=(this.state==CKEDITOR.TRISTATE_ON)?"addClass":"removeClass";f.document.getBody()[g]("cke_show_blocks")}}};CKEDITOR.plugins.add("esp_showblocks",{requires:["wysiwygarea"],init:function(f){var g=f.addCommand("esp_showblocks",c);g.canUndo=false;if(f.config.startupOutlineBlocks){g.setState(CKEDITOR.TRISTATE_ON)}f.addCss(e.replace(a,"background-image: url("+CKEDITOR.getUrl(this.path)+"images/block_").replace(b,"cke_show_blocks ").replace(d,f.lang.dir=="rtl"?"right":"left"));f.ui.addButton("Esp_ShowBlocks",{label:f.lang.esp_showBlocks,command:"esp_showblocks",icon:this.path+"images/esp_showblocks.png"});f.on("mode",function(){if(g.state!=CKEDITOR.TRISTATE_DISABLED){g.refresh(f)}});f.on("contentDom",function(){if(g.state!=CKEDITOR.TRISTATE_DISABLED){g.refresh(f)}})}})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.dialog.add("esp_video",function(f){var a=f.lang.esp_video;function e(j,l){var k=this.getValue();if(!k&&this.id=="id"){k=h()}j.setAttribute(this.id,k);if(!k){return}switch(this.id){case"poster":l.backgroundImage="url("+k+")";break;case"width":l.width=k+"px";break;case"height":l.height=k+"px";break}}function b(n,o,k){var j=this.id.match(/(\w+)(\d)/),p=j[1],m=parseInt(j[2],10);var l=k[m]||(k[m]={});l[p]=this.getValue()}function g(j){if(j){this.setValue(j.getAttribute(this.id))}else{if(this.id=="id"){this.setValue(h())}}}function c(n,k){var j=this.id.match(/(\w+)(\d)/),o=j[1],m=parseInt(j[2],10);var l=k[m];if(!l){return}this.setValue(l[o])}function h(){var j=new Date();return"video"+j.getFullYear()+j.getMonth()+j.getDate()+j.getHours()+j.getMinutes()+j.getSeconds()}var d=function(){var j=this.previewImage;j.removeListener("load",d);j.removeListener("error",i);j.removeListener("abort",i);this.setValueOf("info","width",j.$.width);this.setValueOf("info","height",j.$.height)};var i=function(){var j=this.previewImage;j.removeListener("load",d);j.removeListener("error",i);j.removeListener("abort",i)};return{title:a.dialogTitle,minWidth:400,minHeight:140,onShow:function(){this.fakeImage=this.videoNode=null;this.previewImage=f.document.createElement("img");var j=this.getSelectedElement();if(j&&j.data("cke-real-element-type")&&j.data("cke-real-element-type")=="video"){this.fakeImage=j;var l=f.restoreRealElement(j),k=[];k.push({src:l.getAttribute("src")});this.videoNode=l;this.setupContent(l,k)}else{this.setupContent(null,[])}},onOk:function(){var o=null;if(!this.fakeImage){o=CKEDITOR.dom.element.createFromHtml("<cke:video></cke:video>",f.document);o.setAttributes({controls:"controls",src:this.getValueOf("info","src0")})}else{o=this.videoNode}var q={},m=[];this.commitContent(o,q,m);var k="",j="",n=a.linkTemplate||"",l=a.fallbackTemplate||"";j=n.replace("%src%",this.getValueOf("info","src0")).replace("%type%",this.getValueOf("info","src0").split("/").pop());o.setHtml(k+l.replace("%links%",j));var p=f.createFakeElement(o,"cke_video","video",false);p.setStyles(q);if(this.fakeImage){p.replace(this.fakeImage);f.getSelection().selectElement(p)}else{f.insertElement(p)}},onHide:function(){if(this.previewImage){this.previewImage.removeListener("load",d);this.previewImage.removeListener("error",i);this.previewImage.removeListener("abort",i);this.previewImage.remove();this.previewImage=null}},contents:[{id:"info",elements:[{type:"hbox",widths:["320px","80px"],children:[{type:"text",id:"src0",label:a.sourceVideo,commit:b,setup:c},{type:"button",id:"browse",hidden:"true",style:"display:inline-block;margin-top:10px;",filebrowser:{action:"Browse",target:"info:src0",url:f.config.filebrowserVideoBrowseUrl||f.config.filebrowserBrowseUrl},label:f.lang.esp_video.browseServer}]},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"width",label:f.lang.common.width,"default":512,validate:CKEDITOR.dialog.validate.notEmpty(a.widthRequired),commit:e,setup:g},{type:"text",id:"height",label:f.lang.common.height,"default":410,validate:CKEDITOR.dialog.validate.notEmpty(a.heightRequired),commit:e,setup:g}]},{type:"hbox",widths:["320px","80px"],children:[{type:"text",id:"poster",label:a.poster,commit:e,setup:g,onChange:function(){var j=this.getDialog(),l=this.getValue();if(l.length>0){j=this.getDialog();var k=j.previewImage;k.on("load",d,j);k.on("error",i,j);k.on("abort",i,j);k.setAttribute("src",l)}}},{type:"button",id:"browse",hidden:"true",style:"display:inline-block;margin-top:10px;",filebrowser:{action:"Browse",target:"info:poster",url:f.config.filebrowserImageBrowseUrl||f.config.filebrowserBrowseUrl},label:f.lang.esp_video.browseServer}]}]}]}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_video","en",{esp_video:{toolbar:"Video",dialogTitle:"Video properties",browseServer:"Browse",fakeObject:"Video",properties:"Edit video",widthRequired:"Width field cannot be empty",heightRequired:"Height field cannot be empty",poster:"Poster image",sourceVideo:"Source video",sourceType:"Video type",linkTemplate:'<a href="%src%">%type%</a> ',fallbackTemplate:"Your browser doesn't support video. Please download the file: %links%"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_video","ru",{esp_video:{toolbar:"Видео",dialogTitle:"Параметры видео",browseServer:"Выбор",fakeObject:"Видео",properties:"Редактировать видео",widthRequired:'Поле "ширина" не может быть пустым',heightRequired:'Поле "высота" не может быть пустым',poster:"Скриншот",sourceVideo:"Источник",sourceType:"Тип источника",linkTemplate:'<a href="%src%">%type%</a> ',fallbackTemplate:"Ваш браузер не поддерживает тэг video. Вы можете скачать файл: %links%"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.setLang("esp_video","uk",{esp_video:{toolbar:"Відео",dialogTitle:"Параметри відео",browseServer:"Вибір",fakeObject:"Відео",properties:"Редагувати відео",widthRequired:'Поле "ширина" не може бути порожнім',heightRequired:'Поле "висота" не може бути порожнім',poster:"Скріншот",sourceVideo:"Джерело",sourceType:"Тип джерела",linkTemplate:'<a href="%src%">%type%</a> ',fallbackTemplate:"Ваш браузер не підтримує тег video. Ви можете завантажити файл: %links%"}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("esp_video",{lang:["en","ru","uk"],init:function(a){var b=a.lang.esp_video;if(typeof a.element.data=="undefined"){alert('The "video" plugin requires CKEditor 3.5 or newer');return}CKEDITOR.dialog.add("esp_video",this.path+"dialogs/esp_video.js");a.addCommand("esp_video",new CKEDITOR.dialogCommand("esp_video"));a.ui.addButton("Esp_video",{label:b.toolbar,command:"esp_video",icon:this.path+"images/esp_video.png"});a.addCss("img.cke_video{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;background-color:gray;border: 1px solid #a9a9a9;width: 80px;height: 80px;}");if(a.addMenuItems){a.addMenuItems({video:{label:b.properties,command:"video",group:"flash"}})}a.on("doubleclick",function(c){var d=c.data.element;if(d.is("img")&&d.data("cke-real-element-type")=="video"){c.data.dialog="video"}});if(a.contextMenu){a.contextMenu.addListener(function(c,d){if(c&&c.is("img")&&!c.isReadOnly()&&c.data("cke-real-element-type")=="video"){return{video:CKEDITOR.TRISTATE_OFF}}})}CKEDITOR.dtd.$empty["cke:source"]=1;CKEDITOR.dtd.$empty.source=1;a.lang.fakeobjects.video=b.fakeObject},afterInit:function(c){var a=c.dataProcessor,e=a&&a.htmlFilter,d=a&&a.dataFilter;var b=c.plugins.googleMapsHandler;d.addRules({elements:{$:function(h){if(h.name=="video"){h.name="cke:video";var g=c.createFakeParserElement(h,"cke_video","video",false),j=g.attributes.style||"";var i=h.attributes.width,f=h.attributes.height,k=h.attributes.poster;if(typeof i!="undefined"){j=g.attributes.style=j+"width:"+CKEDITOR.tools.cssLength(i)+";"}if(typeof f!="undefined"){j=g.attributes.style=j+"height:"+CKEDITOR.tools.cssLength(f)+";"}if(k){j=g.attributes.style=j+"background-image:url("+k+");"}return g}}}});e.addRules({elements:{$:function(h){if(h.name=="img"){var j=h.attributes.mapnumber;if(j){var f,i=c.plugins.googleMapsHandler,g=i.getMap(j);if(g&&g.generatedType>1){i.CreatedMapsNames.push(g.number);f=new CKEDITOR.htmlParser.cdata(g.BuildScript());h.parent.children.push(f)}delete h.attributes.mapnumber}}return h}}})}});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var e=CKEDITOR.htmlParser.cssStyle,c=CKEDITOR.tools.cssLength;var d=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i;function a(i,g){var f=d.exec(i),h=d.exec(g);if(f){if(!f[2]&&h[2]=="px"){return h[1]}if(f[2]=="px"&&!h[2]){return h[1]+"px"}}return g}var b={elements:{$:function(j){var i=j.attributes,k=i&&i["data-cke-realelement"],h=k&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(k)),g=h&&h.children[0];if(g&&j.attributes["data-cke-resizable"]){var n=new e(j).rules,l=g.attributes,f=n.width,m=n.height;f&&(l.width=a(l.width,f));m&&(l.height=a(l.height,m))}return g}}};CKEDITOR.plugins.add("fakeobjects",{requires:["htmlwriter"],afterInit:function(g){var f=g.dataProcessor,h=f&&f.htmlFilter;if(h){h.addRules(b)}}});CKEDITOR.editor.prototype.createFakeElement=function(i,l,o,g){var h=this.lang.fakeobjects,m=h[o]||h.unknown;var j={"class":l,src:CKEDITOR.getUrl("images/spacer.gif"),"data-cke-realelement":encodeURIComponent(i.getOuterHtml()),"data-cke-real-node-type":i.type,alt:m,title:m,align:i.getAttribute("align")||""};if(o){j["data-cke-real-element-type"]=o}if(g){j["data-cke-resizable"]=g;var k=new e();var f=i.getAttribute("width"),n=i.getAttribute("height");f&&(k.rules.width=c(f));n&&(k.rules.height=c(n));k.populate(j)}return this.document.createElement("img",{attributes:j})};CKEDITOR.editor.prototype.createFakeParserElement=function(i,o,r,g){var h=this.lang.fakeobjects,p=h[r]||h.unknown,l;var j=new CKEDITOR.htmlParser.basicWriter();i.writeHtml(j);l=j.getHtml();var k={"class":o,src:CKEDITOR.getUrl("images/spacer.gif"),"data-cke-realelement":encodeURIComponent(l),"data-cke-real-node-type":i.type,alt:p,title:p,align:i.attributes.align||""};if(r){k["data-cke-real-element-type"]=r}if(g){k["data-cke-resizable"]=g;var m=i.attributes,n=new e();var f=m.width,q=m.height;f!=undefined&&(n.rules.width=c(f));q!=undefined&&(n.rules.height=c(q));n.populate(k)}return new CKEDITOR.htmlParser.element("img",k)};CKEDITOR.editor.prototype.restoreRealElement=function(g){if(g.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT){return null}var h=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(g.data("cke-realelement")),this.document);if(g.data("cke-resizable")){var i=g.getStyle("width"),f=g.getStyle("height");i&&h.setAttribute("width",a(h.getAttribute("width"),i));f&&h.setAttribute("height",a(h.getAttribute("height"),f))}return h}})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function c(j,l){var m=[];if(!l){return j}else{for(var k in l){m.push(k+"="+encodeURIComponent(l[k]))}}return j+((j.indexOf("?")!=-1)?"&":"?")+m.join("&")}function a(k){k+="";var j=k.charAt(0).toUpperCase();return j+k.substr(1)}function f(k){var m=this.getDialog();var o=m.getParentEditor();o._.filebrowserSe=this;var n=o.config["filebrowser"+a(m.getName())+"WindowWidth"]||o.config.filebrowserWindowWidth||"80%";var j=o.config["filebrowser"+a(m.getName())+"WindowHeight"]||o.config.filebrowserWindowHeight||"70%";var p=this.filebrowser.params||{};p.CKEditor=o.name;p.CKEditorFuncNum=o._.filebrowserFn;if(!p.langCode){p.langCode=o.langCode}var l=c(this.filebrowser.url,p);o.popup(l,n,j,o.config.filebrowserWindowFeatures||o.config.fileBrowserWindowFeatures)}function i(j){var k=this.getDialog();var l=k.getParentEditor();l._.filebrowserSe=this;if(!k.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value){return false}if(!k.getContentElement(this["for"][0],this["for"][1]).getAction()){return false}return true}function g(j,k,l){var m=l.params||{};m.CKEditor=j.name;m.CKEditorFuncNum=j._.filebrowserFn;if(!m.langCode){m.langCode=j.langCode}k.action=c(l.url,m);k.filebrowser=l}function d(r,m,l,j){var p,o;for(var q in j){p=j[q];if(p.type=="hbox"||p.type=="vbox"){d(r,m,l,p.children)}if(!p.filebrowser){continue}if(typeof p.filebrowser=="string"){var n={action:(p.type=="fileButton")?"QuickUpload":"Browse",target:p.filebrowser};p.filebrowser=n}if(p.filebrowser.action=="Browse"){var k=p.filebrowser.url;if(k===undefined){k=r.config["filebrowser"+a(m)+"BrowseUrl"];if(k===undefined){k=r.config.filebrowserBrowseUrl}}if(k){p.onClick=f;p.filebrowser.url=k;p.hidden=false}}else{if(p.filebrowser.action=="QuickUpload"&&p["for"]){k=p.filebrowser.url;if(k===undefined){k=r.config["filebrowser"+a(m)+"UploadUrl"];if(k===undefined){k=r.config.filebrowserUploadUrl}}if(k){var s=p.onClick;p.onClick=function(t){var u=t.sender;if(s&&s.call(u,t)===false){return false}return i.call(u,t)};p.filebrowser.url=k;p.hidden=false;g(r,l.getContents(p["for"][0]).get(p["for"][1]),p.filebrowser)}}}}}function h(l,k){var n=k.getDialog();var j=k.filebrowser.target||null;l=l.replace(/#/g,"%23");if(j){var o=j.split(":");var m=n.getContentElement(o[0],o[1]);if(m){m.setValue(l);n.selectPage(o[0])}}}function b(m,k,j){if(j.indexOf(";")!==-1){var n=j.split(";");for(var l=0;l<n.length;l++){if(b(m,k,n[l])){return true}}return false}var o=m.getContents(k).get(j).filebrowser;return(o&&o.url)}function e(k,n){var m=this._.filebrowserSe.getDialog(),j=this._.filebrowserSe["for"],l=this._.filebrowserSe.filebrowser.onSelect;if(j){m.getContentElement(j[0],j[1]).reset()}if(typeof n=="function"&&n.call(this._.filebrowserSe)===false){return}if(l&&l.call(this._.filebrowserSe,k,n)===false){return}if(typeof n=="string"&&n){alert(n)}if(k){h(k,this._.filebrowserSe)}}CKEDITOR.plugins.add("filebrowser",{init:function(k,j){k._.filebrowserFn=CKEDITOR.tools.addFunction(e,k);k.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",function(j){var m=j.data.definition,l;for(var k in m.contents){if((l=m.contents[k])){d(j.editor,j.data.name,m,l.elements);if(l.hidden&&l.filebrowser){l.hidden=!b(m,l.id,l.filebrowser)}}}})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var h;function e(i){return i.type==CKEDITOR.NODE_TEXT&&i.getLength()>0&&(!h||!i.isReadOnly())}function d(i){return !(i.type==CKEDITOR.NODE_ELEMENT&&i.isBlockBoundary(CKEDITOR.tools.extend({},CKEDITOR.dtd.$empty,CKEDITOR.dtd.$nonEditable)))}var f=function(){return{textNode:this.textNode,offset:this.offset,character:this.textNode?this.textNode.getText().charAt(this.offset):null,hitMatchBoundary:this._.matchBoundary}};var a=["find","replace"],c=[["txtFindFind","txtFindReplace"],["txtFindCaseChk","txtReplaceCaseChk"],["txtFindWordChk","txtReplaceWordChk"],["txtFindCyclic","txtReplaceCyclic"]];function g(k){var j,n,p,q;j=k==="find"?1:0;n=1-j;var o,m=c.length;for(o=0;o<m;o++){p=this.getContentElement(a[j],c[o][j]);q=this.getContentElement(a[n],c[o][n]);q.setValue(p.getValue())}}var b=function(t,n){var u=new CKEDITOR.style(CKEDITOR.tools.extend({attributes:{"data-cke-highlight":1},fullMatch:1,ignoreReadonly:1,childRule:function(){return 0}},t.config.find_highlight,true));var v=function(A,y){var z=this;var B=new CKEDITOR.dom.walker(A);B.guard=y?d:function(C){!d(C)&&(z._.matchBoundary=true)};B.evaluator=e;B.breakOnFalse=1;if(A.startContainer.type==CKEDITOR.NODE_TEXT){this.textNode=A.startContainer;this.offset=A.startOffset-1}this._={matchWord:y,walker:B,matchBoundary:false}};v.prototype={next:function(){return this.move()},back:function(){return this.move(true)},move:function(z){var y=this.textNode;if(y===null){return f.call(this)}this._.matchBoundary=false;if(y&&z&&this.offset>0){this.offset--;return f.call(this)}else{if(y&&this.offset<y.getLength()-1){this.offset++;return f.call(this)}else{y=null;while(!y){y=this._.walker[z?"previous":"next"].call(this._.walker);if(this._.matchWord&&!y||this._.walker._.end){break}}this.textNode=y;if(y){this.offset=z?y.getLength()-1:0}else{this.offset=0}}}return f.call(this)}};var r=function(y,z){this._={walker:y,cursors:[],rangeLength:z,highlightRange:null,isMatched:0}};r.prototype={toDomRange:function(){var y=new CKEDITOR.dom.range(t.document);var A=this._.cursors;if(A.length<1){var C=this._.walker.textNode;if(C){y.setStartAfter(C)}else{return null}}else{var B=A[0],z=A[A.length-1];y.setStart(B.textNode,B.offset);y.setEnd(z.textNode,z.offset+1)}return y},updateFromDomRange:function(y){var A,z=new v(y);this._.cursors=[];do{A=z.next();if(A.character){this._.cursors.push(A)}}while(A.character);this._.rangeLength=this._.cursors.length},setMatched:function(){this._.isMatched=true},clearMatched:function(){this._.isMatched=false},isMatched:function(){return this._.isMatched},highlight:function(){if(this._.cursors.length<1){return}if(this._.highlightRange){this.removeHighlight()}var y=this.toDomRange(),A=y.createBookmark();u.applyToRange(y);y.moveToBookmark(A);this._.highlightRange=y;var z=y.startContainer;if(z.type!=CKEDITOR.NODE_ELEMENT){z=z.getParent()}z.scrollIntoView();this.updateFromDomRange(y)},removeHighlight:function(){if(!this._.highlightRange){return}var y=this._.highlightRange.createBookmark();u.removeFromRange(this._.highlightRange);this._.highlightRange.moveToBookmark(y);this.updateFromDomRange(this._.highlightRange);this._.highlightRange=null},isReadOnly:function(){if(!this._.highlightRange){return 0}return this._.highlightRange.startContainer.isReadOnly()},moveBack:function(){var y=this._.walker.back(),z=this._.cursors;if(y.hitMatchBoundary){this._.cursors=z=[]}z.unshift(y);if(z.length>this._.rangeLength){z.pop()}return y},moveNext:function(){var y=this._.walker.next(),z=this._.cursors;if(y.hitMatchBoundary){this._.cursors=z=[]}z.push(y);if(z.length>this._.rangeLength){z.shift()}return y},getEndCharacter:function(){var y=this._.cursors;if(y.length<1){return null}return y[y.length-1].character},getNextCharacterRange:function(y){var z,B,A=this._.cursors;if((z=A[A.length-1])&&z.textNode){B=new v(x(z))}else{B=this._.walker}return new r(B,y)},getCursors:function(){return this._.cursors}};function x(A,y){var z=new CKEDITOR.dom.range();z.setStart(A.textNode,(y?A.offset:A.offset+1));z.setEndAt(t.document.getBody(),CKEDITOR.POSITION_BEFORE_END);return z}function s(z){var y=new CKEDITOR.dom.range();y.setStartAt(t.document.getBody(),CKEDITOR.POSITION_AFTER_START);y.setEnd(z.textNode,z.offset);return y}var q=0,p=1,j=2;var m=function(B,z){var y=[-1];if(z){B=B.toLowerCase()}for(var A=0;A<B.length;A++){y.push(y[A]+1);while(y[A+1]>0&&B.charAt(A)!=B.charAt(y[A+1]-1)){y[A+1]=y[y[A+1]-1]+1}}this._={overlap:y,state:0,ignoreCase:!!z,pattern:B}};m.prototype={feedCharacter:function(y){if(this._.ignoreCase){y=y.toLowerCase()}while(true){if(y==this._.pattern.charAt(this._.state)){this._.state++;if(this._.state==this._.pattern.length){this._.state=0;return j}return p}else{if(!this._.state){return q}else{this._.state=this._.overlap[this._.state]}}}return null},reset:function(){this._.state=0}};var i=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/;var l=function(z){if(!z){return true}var y=z.charCodeAt(0);return(y>=9&&y<=13)||(y>=8192&&y<=8202)||i.test(z)};var k={searchRange:null,matchRange:null,find:function(J,z,E,L,A,D){if(!this.matchRange){this.matchRange=new r(new v(this.searchRange),J.length)}else{this.matchRange.removeHighlight();this.matchRange=this.matchRange.getNextCharacterRange(J.length)}var G=new m(J,!z),B=q,H="%";while(H!==null){this.matchRange.moveNext();while((H=this.matchRange.getEndCharacter())){B=G.feedCharacter(H);if(B==j){break}if(this.matchRange.moveNext().hitMatchBoundary){G.reset()}}if(B==j){if(E){var y=this.matchRange.getCursors(),I=y[y.length-1],K=y[0];var C=new v(s(K),true),F=new v(x(I),true);if(!(l(C.back().character)&&l(F.next().character))){continue}}this.matchRange.setMatched();if(A!==false){this.matchRange.highlight()}return true}}this.matchRange.clearMatched();this.matchRange.removeHighlight();if(L&&!D){this.searchRange=w(1);this.matchRange=null;return arguments.callee.apply(this,Array.prototype.slice.call(arguments).concat([true]))}return false},replaceCounter:0,replace:function(C,B,D,y,A,H,z){h=1;var I=0;if(this.matchRange&&this.matchRange.isMatched()&&!this.matchRange._.isReplaced&&!this.matchRange.isReadOnly()){this.matchRange.removeHighlight();var G=this.matchRange.toDomRange();var F=t.document.createText(D);if(!z){var E=t.getSelection();E.selectRanges([G]);t.fire("saveSnapshot")}G.deleteContents();G.insertNode(F);if(!z){E.selectRanges([G]);t.fire("saveSnapshot")}this.matchRange.updateFromDomRange(G);if(!z){this.matchRange.highlight()}this.matchRange._.isReplaced=true;this.replaceCounter++;I=1}else{I=this.find(B,y,A,H,!z)}h=0;return I}};function w(B){var z,A=t.getSelection(),y=t.document.getBody();if(A&&!B){z=A.getRanges()[0].clone();z.collapse(true)}else{z=new CKEDITOR.dom.range();z.setStartAt(y,CKEDITOR.POSITION_AFTER_START)}z.setEndAt(y,CKEDITOR.POSITION_BEFORE_END);return z}var o=t.lang.findAndReplace;return{title:o.title,resizable:CKEDITOR.DIALOG_RESIZE_NONE,minWidth:350,minHeight:170,buttons:[CKEDITOR.dialog.cancelButton],contents:[{id:"find",label:o.find,title:o.find,accessKey:"",elements:[{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtFindFind",label:o.findWhat,isChanged:false,labelLayout:"horizontal",accessKey:"F"},{type:"button",id:"btnFind",align:"left",style:"width:100%",label:o.find,onClick:function(){var y=this.getDialog();if(!k.find(y.getValueOf("find","txtFindFind"),y.getValueOf("find","txtFindCaseChk"),y.getValueOf("find","txtFindWordChk"),y.getValueOf("find","txtFindCyclic"))){alert(o.notFoundMsg)}}}]},{type:"fieldset",label:CKEDITOR.tools.htmlEncode(o.findOptions),style:"margin-top:29px",children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"txtFindCaseChk",isChanged:false,label:o.matchCase},{type:"checkbox",id:"txtFindWordChk",isChanged:false,label:o.matchWord},{type:"checkbox",id:"txtFindCyclic",isChanged:false,"default":true,label:o.matchCyclic}]}]}]},{id:"replace",label:o.replace,accessKey:"M",elements:[{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtFindReplace",label:o.findWhat,isChanged:false,labelLayout:"horizontal",accessKey:"F"},{type:"button",id:"btnFindReplace",align:"left",style:"width:100%",label:o.replace,onClick:function(){var y=this.getDialog();if(!k.replace(y,y.getValueOf("replace","txtFindReplace"),y.getValueOf("replace","txtReplace"),y.getValueOf("replace","txtReplaceCaseChk"),y.getValueOf("replace","txtReplaceWordChk"),y.getValueOf("replace","txtReplaceCyclic"))){alert(o.notFoundMsg)}}}]},{type:"hbox",widths:["230px","90px"],children:[{type:"text",id:"txtReplace",label:o.replaceWith,isChanged:false,labelLayout:"horizontal",accessKey:"R"},{type:"button",id:"btnReplaceAll",align:"left",style:"width:100%",label:o.replaceAll,isChanged:false,onClick:function(){var z=this.getDialog();var y;k.replaceCounter=0;k.searchRange=w(1);if(k.matchRange){k.matchRange.removeHighlight();k.matchRange=null}t.fire("saveSnapshot");while(k.replace(z,z.getValueOf("replace","txtFindReplace"),z.getValueOf("replace","txtReplace"),z.getValueOf("replace","txtReplaceCaseChk"),z.getValueOf("replace","txtReplaceWordChk"),false,true)){}if(k.replaceCounter){alert(o.replaceSuccessMsg.replace(/%1/,k.replaceCounter));t.fire("saveSnapshot")}else{alert(o.notFoundMsg)}}}]},{type:"fieldset",label:CKEDITOR.tools.htmlEncode(o.findOptions),children:[{type:"vbox",padding:0,children:[{type:"checkbox",id:"txtReplaceCaseChk",isChanged:false,label:o.matchCase},{type:"checkbox",id:"txtReplaceWordChk",isChanged:false,label:o.matchWord},{type:"checkbox",id:"txtReplaceCyclic",isChanged:false,"default":true,label:o.matchCyclic}]}]}]}],onLoad:function(){var y=this;var B,z;var A=0;this.on("hide",function(){A=0});this.on("show",function(){A=1});this.selectPage=CKEDITOR.tools.override(this.selectPage,function(C){return function(E){C.call(y,E);var D=y._.tabs[E];var H,G,F;G=E==="find"?"txtFindFind":"txtFindReplace";F=E==="find"?"txtFindWordChk":"txtReplaceWordChk";B=y.getContentElement(E,G);z=y.getContentElement(E,F);if(!D.initialized){H=CKEDITOR.document.getById(B._.inputId);D.initialized=true}if(A){g.call(this,E)}}})},onShow:function(){k.searchRange=w();var A=this.getParentEditor().getSelection().getSelectedText(),y=(n=="find"?"txtFindFind":"txtFindReplace");var z=this.getContentElement(n,y);z.setValue(A);z.select();this.selectPage(n);this[(n=="find"&&this._.editor.readOnly?"hide":"show")+"Page"]("replace")},onHide:function(){var y;if(k.matchRange&&k.matchRange.isMatched()){k.matchRange.removeHighlight();t.focus();y=k.matchRange.toDomRange();if(y){t.getSelection().selectRanges([y])}}delete k.matchRange},onFocus:function(){if(n=="replace"){return this.getContentElement("replace","txtFindReplace")}else{return this.getContentElement("find","txtFindFind")}}}};CKEDITOR.dialog.add("find",function(i){return b(i,"find")});CKEDITOR.dialog.add("replace",function(i){return b(i,"replace")})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("find",{init:function(b){var a=CKEDITOR.plugins.find;b.ui.addButton("Find",{label:b.lang.findAndReplace.find,command:"find"});var d=b.addCommand("find",new CKEDITOR.dialogCommand("find"));d.canUndo=false;d.readOnly=1;b.ui.addButton("Replace",{label:b.lang.findAndReplace.replace,command:"replace"});var c=b.addCommand("replace",new CKEDITOR.dialogCommand("replace"));c.canUndo=false;CKEDITOR.dialog.add("find",this.path+"dialogs/find.js");CKEDITOR.dialog.add("replace",this.path+"dialogs/find.js")},requires:["styles"]});CKEDITOR.config.find_highlight={element:"span",styles:{"background-color":"#004",color:"#fff"}};
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("floatpanel",{requires:["panel"]});(function(){var b={};var a=false;function c(h,i,e,g,j){var f=CKEDITOR.tools.genKey(i.getUniqueId(),e.getUniqueId(),h.skinName,h.lang.dir,h.uiColor||"",g.css||"",j||"");var d=b[f];if(!d){d=b[f]=new CKEDITOR.ui.panel(i,g);d.element=e.append(CKEDITOR.dom.element.createFromHtml(d.renderHtml(h),i));d.element.setStyles({display:"none",position:"absolute"})}return d}CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(i,e,g,k){g.forceIFrame=1;var j=e.getDocument(),d=c(i,j,e,g,k||0),f=d.element,h=f.getFirst().getFirst();this.element=f;this._={editor:i,panel:d,parentElement:e,definition:g,document:j,iframe:h,children:[],dir:i.lang.dir};i.on("mode",function(){this.hide()},this)},proto:{addBlock:function(d,e){return this._.panel.addBlock(d,e)},addListBlock:function(d,e){return this._.panel.addListBlock(d,e)},getBlock:function(d){return this._.panel.getBlock(d)},showBlock:function(f,e,r,n,k){var d=this._.panel,i=d.showBlock(f);this.allowBlur(false);a=1;this._.returnFocus=this._.editor.focusManager.hasFocus?this._.editor:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);var l=this.element,j=this._.iframe,g=this._.definition,m=e.getDocumentPosition(l.getDocument()),q=this._.dir=="rtl";var h=m.x+(n||0),p=m.y+(k||0);if(q&&(r==1||r==4)){h+=e.$.offsetWidth}else{if(!q&&(r==2||r==3)){h+=e.$.offsetWidth-1}}if(r==3||r==4){p+=e.$.offsetHeight-1}this._.panel._.offsetParentId=e.getId();l.setStyles({top:p+"px",left:0,display:""});l.setOpacity(0);l.getFirst().removeStyle("width");if(!this._.blurSet){var o=CKEDITOR.env.ie?j:new CKEDITOR.dom.window(j.$.contentWindow);CKEDITOR.event.useCapture=true;o.on("blur",function(s){if(!this.allowBlur()){return}var t=s.data.getTarget();if(t.getName&&t.getName()!="iframe"){return}if(this.visible&&!this._.activeChild&&!a){delete this._.returnFocus;this.hide()}},this);o.on("focus",function(){this._.focused=true;this.hideChild();this.allowBlur(true)},this);CKEDITOR.event.useCapture=false;this._.blurSet=1}d.onEscape=CKEDITOR.tools.bind(function(s){if(this.onEscape&&this.onEscape(s)===false){return false}},this);CKEDITOR.tools.setTimeout(function(){if(q){h-=l.$.offsetWidth}var s=CKEDITOR.tools.bind(function(){var A=l.getFirst();if(i.autoSize){var E=i.element.$;if(CKEDITOR.env.gecko||CKEDITOR.env.opera){E=E.parentNode}if(CKEDITOR.env.ie){E=E.document.body}var u=E.scrollWidth;if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&u>0){u+=(A.$.offsetWidth||0)-(A.$.clientWidth||0)+3}u+=4;A.setStyle("width",u+"px");i.element.addClass("cke_frameLoaded");var F=i.element.$.scrollHeight;if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&F>0){F+=(A.$.offsetHeight||0)-(A.$.clientHeight||0)+3}A.setStyle("height",F+"px");d._.currentBlock.element.setStyle("display","none").removeStyle("display")}else{A.removeStyle("height")}var w=d.element,v=w.getWindow(),D=v.getScrollPosition(),x=v.getViewPaneSize(),B={height:w.$.offsetHeight,width:w.$.offsetWidth};if(q?h<0:h+B.width>x.width+D.x){h+=(B.width*(q?1:-1))}if(p+B.height>x.height+D.y){p-=B.height}if(CKEDITOR.env.ie){var t=new CKEDITOR.dom.element(l.$.offsetParent),C=t;if(C.getName()=="html"){C=C.getDocument().getBody()}if(C.getComputedStyle("direction")=="rtl"){if(CKEDITOR.env.ie8Compat){h-=l.getDocument().getDocumentElement().$.scrollLeft*2}else{h-=(t.$.scrollWidth-t.$.clientWidth)}}}var z=l.getFirst(),y;if((y=z.getCustomData("activePanel"))){y.onHide&&y.onHide.call(this,1)}z.setCustomData("activePanel",this);l.setStyles({top:p+"px",left:h+"px"});l.setOpacity(1)},this);d.isLoaded?s():d.onLoad=s;CKEDITOR.tools.setTimeout(function(){j.$.contentWindow.focus();this.allowBlur(true)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;if(this.onShow){this.onShow.call(this)}a=0},hide:function(e){if(this.visible&&(!this.onHide||this.onHide.call(this)!==true)){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");var d=e!==false&&this._.returnFocus;if(d){if(CKEDITOR.env.webkit&&d.type){d.getWindow().$.focus()}d.focus()}}},allowBlur:function(e){var d=this._.panel;if(e!=undefined){d.allowBlur=e}return d.allowBlur},showAsChild:function(e,f,h,g,d,i){if(this._.activeChild==e&&e._.panel._.offsetParentId==h.getId()){return}this.hideChild();e.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){if(!this._.focused){this.hide()}},0,this)},this);this._.activeChild=e;this._.focused=false;e.showBlock(f,h,g,d,i);if(CKEDITOR.env.ie7Compat||(CKEDITOR.env.ie8&&CKEDITOR.env.ie6Compat)){setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100)}},hideChild:function(){var d=this._.activeChild;if(d){delete d.onHide;delete d._.returnFocus;delete this._.activeChild;d.hide()}}}});CKEDITOR.on("instanceDestroyed",function(){var e=CKEDITOR.tools.isEmpty(CKEDITOR.instances);for(var f in b){var d=b[f];if(e){d.destroy()}else{d.element.hide()}}e&&(b={})})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("format",{requires:["richcombo","styles"],init:function(e){var c=e.config,g=e.lang.format;var b=c.format_tags.split(";");var f={};for(var d=0;d<b.length;d++){var a=b[d];f[a]=new CKEDITOR.style(c["format_"+a]);f[a]._.enterMode=e.config.enterMode}e.ui.addRichCombo("Format",{label:g.label,title:g.panelTitle,className:"cke_format",panel:{css:e.skin.editor.css.concat(c.contentsCss),multiSelect:false,attributes:{"aria-label":g.panelTitle}},init:function(){this.startGroup(g.panelTitle);for(var h in f){var i=g["tag_"+h];this.add(h,f[h].buildPreview(i),i)}},onClick:function(j){e.focus();e.fire("saveSnapshot");var i=f[j],h=new CKEDITOR.dom.elementPath(e.getSelection().getStartElement());i[i.checkActive(h)?"remove":"apply"](e.document);setTimeout(function(){e.fire("saveSnapshot")},0)},onRender:function(){e.on("selectionChange",function(k){var j=this.getValue();var i=k.data.path;for(var h in f){if(f[h].checkActive(i)){if(h!=j){this.setValue(h,e.lang.format["tag_"+h])}return}}this.setValue("")},this)}})}});CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div";CKEDITOR.config.format_p={element:"p"};CKEDITOR.config.format_div={element:"div"};CKEDITOR.config.format_pre={element:"pre"};CKEDITOR.config.format_address={element:"address"};CKEDITOR.config.format_h1={element:"h1"};CKEDITOR.config.format_h2={element:"h2"};CKEDITOR.config.format_h3={element:"h3"};CKEDITOR.config.format_h4={element:"h4"};CKEDITOR.config.format_h5={element:"h5"};CKEDITOR.config.format_h6={element:"h6"};
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var E=/^[\t\r\n ]*(?: |\xa0)$/;var F="{cke_protected}";function h(I){var J=I.children.length,i=I.children[J-1];while(i&&i.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(i.value)){i=I.children[--J]}return i}function q(K,i){var I=K.children,J=h(K);if(J){if((i||!CKEDITOR.env.ie)&&J.type==CKEDITOR.NODE_ELEMENT&&J.name=="br"){I.pop()}if(J.type==CKEDITOR.NODE_TEXT&&E.test(J.value)){I.pop()}}}function D(K,i,I){if(!i&&(!I||typeof I=="function"&&(I(K)===false))){return false}if(i&&CKEDITOR.env.ie&&(document.documentMode>7||K.name in CKEDITOR.dtd.tr||K.name in CKEDITOR.dtd.$listItem)){return false}var J=h(K);return !J||J&&(J.type==CKEDITOR.NODE_ELEMENT&&J.name=="br"||K.name=="form"&&J.name=="input")}function m(I,i){return function(J){q(J,!I);if(D(J,!I,i)){if(I||CKEDITOR.env.ie){J.add(new CKEDITOR.htmlParser.text("\xa0"))}else{J.add(new CKEDITOR.htmlParser.element("br",{}))}}}}var u=CKEDITOR.dtd;var G=["caption","colgroup","col","thead","tfoot","tbody"];var d=CKEDITOR.tools.extend({},u.$block,u.$listItem,u.$tableContent);for(var A in d){if(!("br" in u[A])){delete d[A]}}delete d.pre;var w={elements:{},attributeNames:[[(/^on/),"data-cke-pa-on"]]};var f={elements:{}};for(A in d){f.elements[A]=m()}var c={elementNames:[[(/^cke:/),""],[(/^\?xml:namespace$/),""]],attributeNames:[[(/^data-cke-(saved|pa)-/),""],[(/^data-cke-.*/),""],["hidefocus",""]],elements:{$:function(K){var M=K.attributes;if(M){if(M["data-cke-temp"]){return false}var L=["name","href","src"],J;for(var I=0;I<L.length;I++){J="data-cke-saved-"+L[I];J in M&&(delete M[L[I]])}}return K},table:function(I){var i=I.children;i.sort(function(K,J){return K.type==CKEDITOR.NODE_ELEMENT&&J.type==K.type?CKEDITOR.tools.indexOf(G,K.name)>CKEDITOR.tools.indexOf(G,J.name)?1:-1:0})},embed:function(I){var K=I.parent;if(K&&K.name=="object"){var J=K.attributes.width,i=K.attributes.height;J&&(I.attributes.width=J);i&&(I.attributes.height=i)}},param:function(i){i.children=[];i.isEmpty=true;return i},a:function(i){if(!(i.children.length||i.attributes.name||i.attributes["data-cke-saved-name"])){return false}},span:function(i){if(i.attributes["class"]=="Apple-style-span"){delete i.name}},pre:function(i){CKEDITOR.env.ie&&q(i)},html:function(i){delete i.attributes.contenteditable;delete i.attributes["class"]},body:function(i){delete i.attributes.spellcheck;delete i.attributes.contenteditable},style:function(i){var I=i.children[0];I&&I.value&&(I.value=CKEDITOR.tools.trim(I.value));if(!i.attributes.type){i.attributes.type="text/css"}},title:function(I){var i=I.children[0];i&&(i.value=I.attributes["data-cke-title"]||"")}},attributes:{"class":function(I,i){return CKEDITOR.tools.ltrim(I.replace(/(?:^|\s+)cke_[^\s]*/g,""))||false}}};if(CKEDITOR.env.ie){c.attributes.style=function(I,i){return I.replace(/(^|;)([^\:]+)/g,function(J){return J.toLowerCase()})}}function n(I){var i=I.attributes;if(i.contenteditable!="false"){i["data-cke-editable"]=i.contenteditable?"true":1}i.contenteditable="false"}function a(I){var i=I.attributes;switch(i["data-cke-editable"]){case"true":i.contenteditable="true";break;case"1":delete i.contenteditable;break}}for(A in {input:1,textarea:1}){w.elements[A]=n;c.elements[A]=a}var t=/<(a|area|img|input)\b([^>]*)>/gi,r=/\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi;var l=/(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,H=/<cke:encoded>([^<]*)<\/cke:encoded>/gi;var k=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,o=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi;var g=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;function s(i){return i.replace(t,function(K,I,J){return"<"+I+J.replace(r,function(M,L){if(!(/^on/).test(L)&&J.indexOf("data-cke-saved-"+L)==-1){return" data-cke-saved-"+M+" "+M}return M})+">"})}function e(i){return i.replace(l,function(I){return"<cke:encoded>"+encodeURIComponent(I)+"</cke:encoded>"})}function b(i){return i.replace(H,function(I,J){return decodeURIComponent(J)})}function v(i){return i.replace(k,"$1cke:$2")}function y(i){return i.replace(o,"$1$2")}function C(i){return i.replace(g,"<cke:$1$2></cke:$1>")}function z(i){return i.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2")}function x(i){return i.replace(/<!--(?!{cke_protected})[\s\S]+?-->/g,function(I){return"<!--"+F+"{C}"+encodeURIComponent(I).replace(/--/g,"%2D%2D")+"-->"})}function p(i){return i.replace(/<!--\{cke_protected\}\{C\}([\s\S]+?)-->/g,function(I,J){return decodeURIComponent(J)})}function j(I,J){var i=J._.dataStore;return I.replace(/<!--\{cke_protected\}([\s\S]+?)-->/g,function(K,L){return decodeURIComponent(L)}).replace(/\{cke_protected_(\d+)\}/g,function(K,L){return i&&i[L]||""})}function B(O,N){var J=[],P=N.config.protectedSource,K=N._.dataStore||(N._.dataStore={id:1}),M=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g;var I=[(/<script[\s\S]*?<\/script>/gi),/<noscript[\s\S]*?<\/noscript>/gi].concat(P);O=O.replace((/<!--[\s\S]*?-->/g),function(i){return"<!--{cke_tempcomment}"+(J.push(i)-1)+"-->"});for(var L=0;L<I.length;L++){O=O.replace(I[L],function(i){i=i.replace(M,function(R,Q,S){return J[S]});return(/cke_temp(comment)?/).test(i)?i:"<!--{cke_temp}"+(J.push(i)-1)+"-->"})}O=O.replace(M,function(Q,i,R){return"<!--"+F+(i?"{C}":"")+encodeURIComponent(J[R]).replace(/--/g,"%2D%2D")+"-->"});return O.replace(/(['"]).*?\1/g,function(i){return i.replace(/<!--\{cke_protected\}([\s\S]+?)-->/g,function(Q,R){K[K.id]=decodeURIComponent(R);return"{cke_protected_"+(K.id++)+"}"})})}CKEDITOR.plugins.add("htmldataprocessor",{requires:["htmlwriter"],init:function(J){var i=J.dataProcessor=new CKEDITOR.htmlDataProcessor(J);i.writer.forceSimpleAmpersand=J.config.forceSimpleAmpersand;i.dataFilter.addRules(w);i.dataFilter.addRules(f);i.htmlFilter.addRules(c);var I={elements:{}};for(A in d){I.elements[A]=m(true,J.config.fillEmptyBlocks)}i.htmlFilter.addRules(I)},onLoad:function(){!("fillEmptyBlocks" in CKEDITOR.config)&&(CKEDITOR.config.fillEmptyBlocks=1)}});CKEDITOR.htmlDataProcessor=function(i){this.editor=i;this.writer=new CKEDITOR.htmlWriter();this.dataFilter=new CKEDITOR.htmlParser.filter();this.htmlFilter=new CKEDITOR.htmlParser.filter()};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(K,i){K=B(K,this.editor);K=s(K);K=e(K);K=v(K);K=C(K);K=z(K);var L=new CKEDITOR.dom.element("div");L.setHtml("a"+K);K=L.getHtml().substr(1);K=y(K);K=b(K);K=p(K);var I=CKEDITOR.htmlParser.fragment.fromHtml(K,i),J=new CKEDITOR.htmlParser.basicWriter();I.writeHtml(J,this.dataFilter);K=J.getHtml(true);K=x(K);return K},toDataFormat:function(J,i){var L=this.writer,I=CKEDITOR.htmlParser.fragment.fromHtml(J,i);L.reset();I.writeHtml(L,this.htmlFilter);var K=L.getHtml(true);K=p(K);K=j(K,this.editor);return K}}})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("htmlwriter");CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" />";this.lineBreakChars="\n";this.forceSimpleAmpersand=0;this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var a=CKEDITOR.dtd;for(var b in CKEDITOR.tools.extend({},a.$nonBodyContent,a.$block,a.$listItem,a.$tableContent)){this.setRules(b,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!a[b]["#"],breakAfterClose:1})}this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{indent:0})},proto:{openTag:function(b,a){var c=this._.rules[b];if(this._.indent){this.indentation()}else{if(c&&c.breakBeforeOpen){this.lineBreak();this.indentation()}}this._.output.push("<",b)},openTagClose:function(a,b){var c=this._.rules[a];if(b){this._.output.push(this.selfClosingEnd)}else{this._.output.push(">");if(c&&c.indent){this._.indentation+=this.indentationChars}}if(c&&c.breakAfterOpen){this.lineBreak()}a=="pre"&&(this._.inPre=1)},attribute:function(b,a){if(typeof a=="string"){this.forceSimpleAmpersand&&(a=a.replace(/&/g,"&"));a=CKEDITOR.tools.htmlEncodeAttr(a)}this._.output.push(" ",b,'="',a,'"')},closeTag:function(a){var b=this._.rules[a];if(b&&b.indent){this._.indentation=this._.indentation.substr(this.indentationChars.length)}if(this._.indent){this.indentation()}else{if(b&&b.breakBeforeClose){this.lineBreak();this.indentation()}}this._.output.push("</",a,">");a=="pre"&&(this._.inPre=0);if(b&&b.breakAfterClose){this.lineBreak()}},text:function(a){if(this._.indent){this.indentation();!this._.inPre&&(a=CKEDITOR.tools.ltrim(a))}this._.output.push(a)},comment:function(a){if(this._.indent){this.indentation()}this._.output.push("<!--",a,"-->")},lineBreak:function(){if(!this._.inPre&&this._.output.length>0){this._.output.push(this.lineBreakChars)}this._.indent=1},indentation:function(){if(!this._.inPre){this._.output.push(this._.indentation)}this._.indent=0},setRules:function(a,c){var b=this._.rules[a];if(b){CKEDITOR.tools.extend(b,c,true)}else{this._.rules[a]=c}}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a=function(f,i){var e=1,m=2,n=4,B=8,q=/^\s*(\d+)((px)|\%)?\s*$/i,A=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,l=/^\d+px$/;var y=function(){var E=this.getValue(),D=this.getDialog(),C=E.match(q);if(C){if(C[2]=="%"){v(D,false)}E=C[1]}if(D.lockRatio){var F=D.originalElement;if(F.getCustomData("isReady")=="true"){if(this.id=="txtHeight"){if(E&&E!="0"){E=Math.round(F.$.width*(E/F.$.height))}if(!isNaN(E)){D.setValueOf("info","txtWidth",E)}}else{if(E&&E!="0"){E=Math.round(F.$.height*(E/F.$.width))}if(!isNaN(E)){D.setValueOf("info","txtHeight",E)}}}}s(D)};var s=function(C){if(!C.originalElement||!C.preview){return 1}C.commitContent(n,C.preview);return 0};function u(){var D=arguments;var C=this.getContentElement("advanced","txtdlgGenStyle");C&&C.commit.apply(C,D);this.foreach(function(E){if(E.commit&&E.id!="txtdlgGenStyle"){E.commit.apply(E,D)}})}var o;function z(C){if(o){return}o=1;var F=this.getDialog(),E=F.imageElement;if(E){this.commit(e,E);C=[].concat(C);var G=C.length,H;for(var D=0;D<G;D++){H=F.getContentElement.apply(F,C[D].split(":"));H&&H.setup(e,E)}}o=0}var v=function(H,J){if(!H.getContentElement("info","ratioLock")){return null}var F=H.originalElement;if(!F){return null}if(J=="check"){if(!H.userlockRatio&&F.getCustomData("isReady")=="true"){var D=H.getValueOf("info","txtWidth"),K=H.getValueOf("info","txtHeight"),G=F.$.width*1000/F.$.height,C=D*1000/K;H.lockRatio=false;if(!D&&!K){H.lockRatio=true}else{if(!isNaN(G)&&!isNaN(C)){if(Math.round(G)==Math.round(C)){H.lockRatio=true}}}}}else{if(J!=undefined){H.lockRatio=J}else{H.userlockRatio=1;H.lockRatio=!H.lockRatio}}var E=CKEDITOR.document.getById(k);if(H.lockRatio){E.removeClass("cke_btn_unlocked")}else{E.addClass("cke_btn_unlocked")}E.setAttribute("aria-checked",H.lockRatio);if(CKEDITOR.env.hc){var I=E.getChild(0);I.setHtml(H.lockRatio?CKEDITOR.env.ie?"\u25A0":"\u25A3":CKEDITOR.env.ie?"\u25A1":"\u25A2")}return H.lockRatio};var j=function(C){var F=C.originalElement;if(F.getCustomData("isReady")=="true"){var E=C.getContentElement("info","txtWidth"),D=C.getContentElement("info","txtHeight");E&&E.setValue(F.$.width);D&&D.setValue(F.$.height)}s(C)};var p=function(F,E){if(F!=e){return}function I(L,J){var K=L.match(q);if(K){if(K[2]=="%"){K[1]+="%";v(D,false)}return K[1]}return J}var D=this.getDialog(),G="",H=this.id=="txtWidth"?"width":"height",C=E.getAttribute(H);if(C){G=I(C,G)}G=I(E.getStyle(H),G);this.setValue(G)};var c;var x=function(){var C=this.originalElement;C.setCustomData("isReady","true");C.removeListener("load",x);C.removeListener("error",h);C.removeListener("abort",h);CKEDITOR.document.getById(t).setStyle("display","none");if(!this.dontResetSize){j(this)}if(this.firstLoad){CKEDITOR.tools.setTimeout(function(){v(this,"check")},0,this)}this.firstLoad=false;this.dontResetSize=false};var h=function(){var D=this.originalElement;D.removeListener("load",x);D.removeListener("error",h);D.removeListener("abort",h);var C=CKEDITOR.getUrl(f.skinPath+"images/noimage.png");if(this.preview){this.preview.setAttribute("src",C)}CKEDITOR.document.getById(t).setStyle("display","none");v(this,false)};var w=function(C){return CKEDITOR.tools.getNextId()+"_"+C},k=w("btnLockSizes"),r=w("btnResetSize"),t=w("ImagePreviewLoader"),b=w("ImagePreviewBox"),d=w("previewLink"),g=w("previewImage");return{title:f.lang.image[i=="image"?"title":"titleButton"],minWidth:420,minHeight:360,onShow:function(){this.imageElement=false;this.linkElement=false;this.imageEditMode=false;this.linkEditMode=false;this.lockRatio=true;this.userlockRatio=0;this.dontResetSize=false;this.firstLoad=true;this.addLink=false;var F=this.getParentEditor(),H=this.getParentEditor().getSelection(),E=H.getSelectedElement(),G=E&&E.getAscendant("a");CKEDITOR.document.getById(t).setStyle("display","none");c=new CKEDITOR.dom.element("img",F.document);this.preview=CKEDITOR.document.getById(g);this.originalElement=F.document.createElement("img");this.originalElement.setAttribute("alt","");this.originalElement.setCustomData("isReady","false");if(G){this.linkElement=G;this.linkEditMode=true;var D=G.getChildren();if(D.count()==1){var C=D.getItem(0).getName();if(C=="img"||C=="input"){this.imageElement=D.getItem(0);if(this.imageElement.getName()=="img"){this.imageEditMode="img"}else{if(this.imageElement.getName()=="input"){this.imageEditMode="input"}}}}if(i=="image"){this.setupContent(m,G)}}if(E&&E.getName()=="img"&&!E.data("cke-realelement")||E&&E.getName()=="input"&&E.getAttribute("type")=="image"){this.imageEditMode=E.getName();this.imageElement=E}if(this.imageEditMode){this.cleanImageElement=this.imageElement;this.imageElement=this.cleanImageElement.clone(true,true);this.setupContent(e,this.imageElement)}else{this.imageElement=F.document.createElement("img")}v(this,true);if(!CKEDITOR.tools.trim(this.getValueOf("info","txtUrl"))){this.preview.removeAttribute("src");this.preview.setStyle("display","none")}},onOk:function(){if(this.imageEditMode){var C=this.imageEditMode;if(i=="image"&&C=="input"&&confirm(f.lang.image.button2Img)){C="img";this.imageElement=f.document.createElement("img");this.imageElement.setAttribute("alt","");f.insertElement(this.imageElement)}else{if(i!="image"&&C=="img"&&confirm(f.lang.image.img2Button)){C="input";this.imageElement=f.document.createElement("input");this.imageElement.setAttributes({type:"image",alt:""});f.insertElement(this.imageElement)}else{this.imageElement=this.cleanImageElement;delete this.cleanImageElement}}}else{if(i=="image"){this.imageElement=f.document.createElement("img")}else{this.imageElement=f.document.createElement("input");this.imageElement.setAttribute("type","image")}this.imageElement.setAttribute("alt","")}if(!this.linkEditMode){this.linkElement=f.document.createElement("a")}this.commitContent(e,this.imageElement);this.commitContent(m,this.linkElement);if(!this.imageElement.getAttribute("style")){this.imageElement.removeAttribute("style")}if(!this.imageEditMode){if(this.addLink){if(!this.linkEditMode){f.insertElement(this.linkElement);this.linkElement.append(this.imageElement,false)}else{f.insertElement(this.imageElement)}}else{f.insertElement(this.imageElement)}}else{if(!this.linkEditMode&&this.addLink){f.insertElement(this.linkElement);this.imageElement.appendTo(this.linkElement)}else{if(this.linkEditMode&&!this.addLink){f.getSelection().selectElement(this.linkElement);f.insertElement(this.imageElement)}}}},onLoad:function(){if(i!="image"){this.hidePage("Link")}var C=this._.element.getDocument();if(this.getContentElement("info","ratioLock")){this.addFocusable(C.getById(r),5);this.addFocusable(C.getById(k),5)}this.commitContent=u},onHide:function(){if(this.preview){this.commitContent(B,this.preview)}if(this.originalElement){this.originalElement.removeListener("load",x);this.originalElement.removeListener("error",h);this.originalElement.removeListener("abort",h);this.originalElement.remove();this.originalElement=false}delete this.imageElement},contents:[{id:"info",label:f.lang.image.infoTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["280px","110px"],align:"right",children:[{id:"txtUrl",type:"text",label:f.lang.common.url,required:true,onChange:function(){var E=this.getDialog(),F=this.getValue();if(F.length>0){E=this.getDialog();var D=E.originalElement;E.preview.removeStyle("display");D.setCustomData("isReady","false");var C=CKEDITOR.document.getById(t);if(C){C.setStyle("display","")}D.on("load",x,E);D.on("error",h,E);D.on("abort",h,E);D.setAttribute("src",F);c.setAttribute("src",F);E.preview.setAttribute("src",c.$.src);s(E)}else{if(E.preview){E.preview.removeAttribute("src");E.preview.setStyle("display","none")}}},setup:function(E,D){if(E==e){var C=D.data("cke-saved-src")||D.getAttribute("src");var F=this;this.getDialog().dontResetSize=true;F.setValue(C);F.setInitValue()}},commit:function(D,C){if(D==e&&(this.getValue()||this.isChanged())){C.data("cke-saved-src",this.getValue());C.setAttribute("src",this.getValue())}else{if(D==B){C.setAttribute("src","");C.removeAttribute("src")}}},validate:CKEDITOR.dialog.validate.notEmpty(f.lang.image.urlMissing)},{type:"button",id:"browse",style:"display:inline-block;margin-top:10px;",align:"center",label:f.lang.common.browseServer,hidden:true,filebrowser:"info:txtUrl"}]}]},{id:"txtAlt",type:"text",label:f.lang.image.alt,accessKey:"T","default":"",onChange:function(){s(this.getDialog())},setup:function(D,C){if(D==e){this.setValue(C.getAttribute("alt"))}},commit:function(D,C){if(D==e){if(this.getValue()||this.isChanged()){C.setAttribute("alt",this.getValue())}}else{if(D==n){C.setAttribute("alt",this.getValue())}else{if(D==B){C.removeAttribute("alt")}}}}},{type:"hbox",children:[{id:"basic",type:"vbox",children:[{type:"hbox",widths:["50%","50%"],children:[{type:"vbox",padding:1,children:[{type:"text",width:"40px",id:"txtWidth",label:f.lang.common.width,onKeyUp:y,onChange:function(){z.call(this,"advanced:txtdlgGenStyle")},validate:function(){var C=this.getValue().match(A),D=!!(C&&parseInt(C[1],10)!==0);if(!D){alert(f.lang.common.invalidWidth)}return D},setup:p,commit:function(F,E,D){var G=this.getValue();if(F==e){if(G){E.setStyle("width",CKEDITOR.tools.cssLength(G))}else{E.removeStyle("width")}!D&&E.removeAttribute("width")}else{if(F==n){var C=G.match(q);if(!C){var H=this.getDialog().originalElement;if(H.getCustomData("isReady")=="true"){E.setStyle("width",H.$.width+"px")}}else{E.setStyle("width",CKEDITOR.tools.cssLength(G))}}else{if(F==B){E.removeAttribute("width");E.removeStyle("width")}}}}},{type:"text",id:"txtHeight",width:"40px",label:f.lang.common.height,onKeyUp:y,onChange:function(){z.call(this,"advanced:txtdlgGenStyle")},validate:function(){var C=this.getValue().match(A),D=!!(C&&parseInt(C[1],10)!==0);if(!D){alert(f.lang.common.invalidHeight)}return D},setup:p,commit:function(F,E,D){var G=this.getValue();if(F==e){if(G){E.setStyle("height",CKEDITOR.tools.cssLength(G))}else{E.removeStyle("height")}!D&&E.removeAttribute("height")}else{if(F==n){var C=G.match(q);if(!C){var H=this.getDialog().originalElement;if(H.getCustomData("isReady")=="true"){E.setStyle("height",H.$.height+"px")}}else{E.setStyle("height",CKEDITOR.tools.cssLength(G))}}else{if(F==B){E.removeAttribute("height");E.removeStyle("height")}}}}}]},{id:"ratioLock",type:"html",style:"margin-top:30px;width:40px;height:40px;",onLoad:function(){var C=CKEDITOR.document.getById(r),D=CKEDITOR.document.getById(k);if(C){C.on("click",function(E){j(this);E.data&&E.data.preventDefault()},this.getDialog());C.on("mouseover",function(){this.addClass("cke_btn_over")},C);C.on("mouseout",function(){this.removeClass("cke_btn_over")},C)}if(D){D.on("click",function(F){var G=v(this),I=this.originalElement,H=this.getValueOf("info","txtWidth");if(I.getCustomData("isReady")=="true"&&H){var E=I.$.height/I.$.width*H;if(!isNaN(E)){this.setValueOf("info","txtHeight",Math.round(E));s(this)}}F.data&&F.data.preventDefault()},this.getDialog());D.on("mouseover",function(){this.addClass("cke_btn_over")},D);D.on("mouseout",function(){this.removeClass("cke_btn_over")},D)}},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+f.lang.image.lockRatio+'" class="cke_btn_locked" id="'+k+'" role="checkbox"><span class="cke_icon"></span><span class="cke_label">'+f.lang.image.lockRatio+'</span></a><a href="javascript:void(0)" tabindex="-1" title="'+f.lang.image.resetSize+'" class="cke_btn_reset" id="'+r+'" role="button"><span class="cke_label">'+f.lang.image.resetSize+"</span></a></div>"}]},{type:"vbox",padding:1,children:[{type:"text",id:"txtBorder",width:"60px",label:f.lang.image.border,"default":"",onKeyUp:function(){s(this.getDialog())},onChange:function(){z.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateBorder),setup:function(E,D){if(E==e){var F,C=D.getStyle("border-width");C=C&&C.match(/^(\d+px)(?: \1 \1 \1)?$/);F=C&&parseInt(C[1],10);isNaN(parseInt(F,10))&&(F=D.getAttribute("border"));this.setValue(F)}},commit:function(E,D,C){var F=parseInt(this.getValue(),10);if(E==e||E==n){if(!isNaN(F)){D.setStyle("border-width",CKEDITOR.tools.cssLength(F));D.setStyle("border-style","solid")}else{if(!F&&this.isChanged()){D.removeStyle("border-width");D.removeStyle("border-style");D.removeStyle("border-color")}}if(!C&&E==e){D.removeAttribute("border")}}else{if(E==B){D.removeAttribute("border");D.removeStyle("border-width");D.removeStyle("border-style");D.removeStyle("border-color")}}}},{type:"text",id:"txtHSpace",width:"60px",label:f.lang.image.hSpace,"default":"",onKeyUp:function(){s(this.getDialog())},onChange:function(){z.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateHSpace),setup:function(E,D){if(E==e){var G,F,I,C=D.getStyle("margin-left"),H=D.getStyle("margin-right");C=C&&C.match(l);H=H&&H.match(l);F=parseInt(C,10);I=parseInt(H,10);G=(F==I)&&F;isNaN(parseInt(G,10))&&(G=D.getAttribute("hspace"));this.setValue(G)}},commit:function(E,D,C){var F=parseInt(this.getValue(),10);if(E==e||E==n){if(!isNaN(F)){D.setStyle("margin-left",CKEDITOR.tools.cssLength(F));D.setStyle("margin-right",CKEDITOR.tools.cssLength(F))}else{if(!F&&this.isChanged()){D.removeStyle("margin-left");D.removeStyle("margin-right")}}if(!C&&E==e){D.removeAttribute("hspace")}}else{if(E==B){D.removeAttribute("hspace");D.removeStyle("margin-left");D.removeStyle("margin-right")}}}},{type:"text",id:"txtVSpace",width:"60px",label:f.lang.image.vSpace,"default":"",onKeyUp:function(){s(this.getDialog())},onChange:function(){z.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateVSpace),setup:function(H,G){if(H==e){var I,C,E,D=G.getStyle("margin-top"),F=G.getStyle("margin-bottom");D=D&&D.match(l);F=F&&F.match(l);C=parseInt(D,10);E=parseInt(F,10);I=(C==E)&&C;isNaN(parseInt(I,10))&&(I=G.getAttribute("vspace"));this.setValue(I)}},commit:function(E,D,C){var F=parseInt(this.getValue(),10);if(E==e||E==n){if(!isNaN(F)){D.setStyle("margin-top",CKEDITOR.tools.cssLength(F));D.setStyle("margin-bottom",CKEDITOR.tools.cssLength(F))}else{if(!F&&this.isChanged()){D.removeStyle("margin-top");D.removeStyle("margin-bottom")}}if(!C&&E==e){D.removeAttribute("vspace")}}else{if(E==B){D.removeAttribute("vspace");D.removeStyle("margin-top");D.removeStyle("margin-bottom")}}}},{id:"cmbAlign",type:"select",widths:["35%","65%"],style:"width:90px",label:f.lang.common.align,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.alignLeft,"left"],[f.lang.common.alignRight,"right"]],onChange:function(){s(this.getDialog());z.call(this,"advanced:txtdlgGenStyle")},setup:function(D,C){if(D==e){var E=C.getStyle("float");switch(E){case"inherit":case"none":E=""}!E&&(E=(C.getAttribute("align")||"").toLowerCase());this.setValue(E)}},commit:function(E,D,C){var F=this.getValue();if(E==e||E==n){if(F){D.setStyle("float",F)}else{D.removeStyle("float")}if(!C&&E==e){F=(D.getAttribute("align")||"").toLowerCase();switch(F){case"left":case"right":D.removeAttribute("align")}}}else{if(E==B){D.removeStyle("float")}}}}]}]},{type:"vbox",height:"250px",children:[{type:"html",id:"htmlPreview",style:"width:95%;",html:"<div>"+CKEDITOR.tools.htmlEncode(f.lang.common.preview)+'<br><div id="'+t+'" class="ImagePreviewLoader" style="display:none"><div class="loading"> </div></div><div id="'+b+'" class="ImagePreviewBox"><table><tr><td><a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+d+'"><img id="'+g+'" alt="" /></a>'+(f.config.image_previewText||"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.")+"</td></tr></table></div></div>"}]}]}]},{id:"Link",label:f.lang.link.title,padding:0,elements:[{id:"txtUrl",type:"text",label:f.lang.common.url,style:"width: 100%","default":"",setup:function(E,D){if(E==m){var C=D.data("cke-saved-href");if(!C){C=D.getAttribute("href")}this.setValue(C)}},commit:function(E,D){if(E==m){if(this.getValue()||this.isChanged()){var C=decodeURI(this.getValue());D.data("cke-saved-href",C);D.setAttribute("href",C);if(this.getValue()||!f.config.image_removeLinkByEmptyURL){this.getDialog().addLink=true}}}}},{type:"button",id:"browse",filebrowser:{action:"Browse",target:"Link:txtUrl",url:f.config.filebrowserImageBrowseLinkUrl},style:"float:right",hidden:true,label:f.lang.common.browseServer},{id:"cmbTarget",type:"select",label:f.lang.common.target,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.targetNew,"_blank"],[f.lang.common.targetTop,"_top"],[f.lang.common.targetSelf,"_self"],[f.lang.common.targetParent,"_parent"]],setup:function(D,C){if(D==m){this.setValue(C.getAttribute("target")||"")}},commit:function(D,C){if(D==m){if(this.getValue()||this.isChanged()){C.setAttribute("target",this.getValue())}}}}]},{id:"Upload",hidden:true,filebrowser:"uploadButton",label:f.lang.image.upload,elements:[{type:"file",id:"upload",label:f.lang.image.btnUpload,style:"height:40px",size:38},{type:"fileButton",id:"uploadButton",filebrowser:"info:txtUrl",label:f.lang.image.btnUpload,"for":["Upload","upload"]}]},{id:"advanced",label:f.lang.common.advancedTab,elements:[{type:"hbox",widths:["50%","25%","25%"],children:[{type:"text",id:"linkId",label:f.lang.common.id,setup:function(D,C){if(D==e){this.setValue(C.getAttribute("id"))}},commit:function(D,C){if(D==e){if(this.getValue()||this.isChanged()){C.setAttribute("id",this.getValue())}}}},{id:"cmbLangDir",type:"select",style:"width : 100px;",label:f.lang.common.langDir,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.langDirLtr,"ltr"],[f.lang.common.langDirRtl,"rtl"]],setup:function(D,C){if(D==e){this.setValue(C.getAttribute("dir"))}},commit:function(D,C){if(D==e){if(this.getValue()||this.isChanged()){C.setAttribute("dir",this.getValue())}}}},{type:"text",id:"txtLangCode",label:f.lang.common.langCode,"default":"",setup:function(D,C){if(D==e){this.setValue(C.getAttribute("lang"))}},commit:function(D,C){if(D==e){if(this.getValue()||this.isChanged()){C.setAttribute("lang",this.getValue())}}}}]},{type:"text",id:"txtGenLongDescr",label:f.lang.common.longDescr,setup:function(D,C){if(D==e){this.setValue(C.getAttribute("longDesc"))}},commit:function(D,C){if(D==e){if(this.getValue()||this.isChanged()){C.setAttribute("longDesc",this.getValue())}}}},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"txtGenClass",label:f.lang.common.cssClass,"default":"",setup:function(D,C){if(D==e){this.setValue(C.getAttribute("class"))}},commit:function(D,C){if(D==e){if(this.getValue()||this.isChanged()){C.setAttribute("class",this.getValue())}}}},{type:"text",id:"txtGenTitle",label:f.lang.common.advisoryTitle,"default":"",onChange:function(){s(this.getDialog())},setup:function(D,C){if(D==e){this.setValue(C.getAttribute("title"))}},commit:function(D,C){if(D==e){if(this.getValue()||this.isChanged()){C.setAttribute("title",this.getValue())}}else{if(D==n){C.setAttribute("title",this.getValue())}else{if(D==B){C.removeAttribute("title")}}}}}]},{type:"text",id:"txtdlgGenStyle",label:f.lang.common.cssStyle,validate:CKEDITOR.dialog.validate.inlineStyle(f.lang.common.invalidInlineStyle),"default":"",setup:function(G,E){if(G==e){var H=E.getAttribute("style");if(!H&&E.$.style.cssText){H=E.$.style.cssText}this.setValue(H);var C=E.$.style.height,F=E.$.style.width,I=(C?C:"").match(q),D=(F?F:"").match(q);this.attributesInStyle={height:!!I,width:!!D}}},onChange:function(){z.call(this,["info:cmbFloat","info:cmbAlign","info:txtVSpace","info:txtHSpace","info:txtBorder","info:txtWidth","info:txtHeight"]);s(this)},commit:function(D,C){if(D==e&&(this.getValue()||this.isChanged())){C.setAttribute("style",this.getValue())}}}]}]}};CKEDITOR.dialog.add("image",function(b){return a(b,"image")});CKEDITOR.dialog.add("imagebutton",function(b){return a(b,"imagebutton")})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("image",{init:function(a){var b="image";CKEDITOR.dialog.add(b,this.path+"dialogs/image.js");a.addCommand(b,new CKEDITOR.dialogCommand(b));a.ui.addButton("Image",{label:a.lang.common.image,command:b});a.on("doubleclick",function(c){var d=c.data.element;if(d.is("img")&&!d.data("cke-realelement")&&!d.isReadOnly()){c.data.dialog="image"}});if(a.addMenuItems){a.addMenuItems({image:{label:a.lang.image.menu,command:"image",group:"image"}})}if(a.contextMenu){a.contextMenu.addListener(function(c,d){if(!c||!c.is("img")||c.data("cke-realelement")||c.isReadOnly()){return null}return{image:CKEDITOR.TRISTATE_OFF}})}}});CKEDITOR.config.image_removeLinkByEmptyURL=true;
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var b={ol:1,ul:1},g=CKEDITOR.dom.walker.whitespaces(true),f=CKEDITOR.dom.walker.bookmark(false,true);function e(i){if(i.editor.readOnly){return null}var m=i.editor,l=i.data.path,o=l&&l.contains(b),n=l.block||l.blockLimit;if(o){return this.setState(CKEDITOR.TRISTATE_OFF)}if(!this.useIndentClasses&&this.name=="indent"){return this.setState(CKEDITOR.TRISTATE_OFF)}if(!n){return this.setState(CKEDITOR.TRISTATE_DISABLED)}if(this.useIndentClasses){var k=n.$.className.match(this.classNameRegex),j=0;if(k){k=k[1];j=this.indentClassMap[k]}if((this.name=="outdent"&&!j)||(this.name=="indent"&&j==m.config.indentClasses.length)){return this.setState(CKEDITOR.TRISTATE_DISABLED)}return this.setState(CKEDITOR.TRISTATE_OFF)}else{var h=parseInt(n.getStyle(c(n)),10);if(isNaN(h)){h=0}if(h<=0){return this.setState(CKEDITOR.TRISTATE_DISABLED)}return this.setState(CKEDITOR.TRISTATE_OFF)}}function a(k,h){this.name=h;this.useIndentClasses=k.config.indentClasses&&k.config.indentClasses.length>0;if(this.useIndentClasses){this.classNameRegex=new RegExp("(?:^|\\s+)("+k.config.indentClasses.join("|")+")(?=$|\\s)");this.indentClassMap={};for(var j=0;j<k.config.indentClasses.length;j++){this.indentClassMap[k.config.indentClasses[j]]=j+1}}this.startDisabled=h=="outdent"}function c(i,h){return(h||i.getComputedStyle("direction"))=="ltr"?"margin-left":"margin-right"}function d(h){return h.type==CKEDITOR.NODE_ELEMENT&&h.is("li")}a.prototype={exec:function(k){var t=this,r={};function y(F){var U=s.startContainer,V=s.endContainer;while(U&&!U.getParent().equals(F)){U=U.getParent()}while(V&&!V.getParent().equals(F)){V=V.getParent()}if(!U||!V){return}var N=U,M=[],R=false;while(!R){if(N.equals(V)){R=true}M.push(N);N=N.getNext()}if(M.length<1){return}var O=F.getParents(true);for(var S=0;S<O.length;S++){if(O[S].getName&&b[O[S].getName()]){F=O[S];break}}var T=t.name=="indent"?1:-1,C=M[0],P=M[M.length-1];var K=CKEDITOR.plugins.list.listToArray(F,r);var A=K[P.getCustomData("listarray_index")].indent;for(S=C.getCustomData("listarray_index");S<=P.getCustomData("listarray_index");S++){K[S].indent+=T;var J=K[S].parent;K[S].parent=new CKEDITOR.dom.element(J.getName(),J.getDocument())}for(S=P.getCustomData("listarray_index")+1;S<K.length&&K[S].indent>A;S++){K[S].indent+=T}var G=CKEDITOR.plugins.list.arrayToList(K,r,null,k.config.enterMode,F.getDirection());if(t.name=="outdent"){var B;if((B=F.getParent())&&B.is("li")){var E=G.listNode.getChildren(),I=[],L=E.count(),H;for(S=L-1;S>=0;S--){if((H=E.getItem(S))&&H.is&&H.is("li")){I.push(H)}}}}if(G){G.listNode.replace(F)}if(I&&I.length){for(S=0;S<I.length;S++){var Q=I[S],D=Q;while((D=D.getNext())&&D.is&&D.getName() in b){if(CKEDITOR.env.ie&&!Q.getFirst(function(W){return g(W)&&f(W)})){Q.append(s.document.createText("\u00a0"))}Q.append(D)}Q.insertAfter(B)}}}function h(){var B=s.createIterator(),A=k.config.enterMode;B.enforceRealBlocks=true;B.enlargeBr=A!=CKEDITOR.ENTER_BR;var C;while((C=B.getNextParagraph(A==CKEDITOR.ENTER_P?"p":"div"))){i(C)}}function i(D,C){if(D.getCustomData("indent_processed")){return false}if(t.useIndentClasses){var B=D.$.className.match(t.classNameRegex),A=0;if(B){B=B[1];A=t.indentClassMap[B]}if(t.name=="outdent"){A--}else{A++}if(A<0){return false}A=Math.min(A,k.config.indentClasses.length);A=Math.max(A,0);D.$.className=CKEDITOR.tools.ltrim(D.$.className.replace(t.classNameRegex,""));if(A>0){D.addClass(k.config.indentClasses[A-1])}}else{var G=c(D,C),F=parseInt(D.getStyle(G),10);if(isNaN(F)){F=0}var E=k.config.indentOffset||40;F+=(t.name=="indent"?1:-1)*E;if(F<0){return false}F=Math.max(F,0);F=Math.ceil(F/E)*E;D.setStyle(G,F?F+(k.config.indentUnit||"px"):"");if(D.getAttribute("style")===""){D.removeAttribute("style")}}CKEDITOR.dom.element.setMarker(r,D,"indent_processed",1);return true}var z=k.getSelection(),n=z.createBookmarks(1),j=z&&z.getRanges(1),s;var u=j.createIterator();while((s=u.getNextRange())){var q=s.getCommonAncestor(),o=q;while(o&&!(o.type==CKEDITOR.NODE_ELEMENT&&b[o.getName()])){o=o.getParent()}if(!o){var w=s.getEnclosedNode();if(w&&w.type==CKEDITOR.NODE_ELEMENT&&w.getName() in b){s.setStartAt(w,CKEDITOR.POSITION_AFTER_START);s.setEndAt(w,CKEDITOR.POSITION_BEFORE_END);o=w}}if(o&&s.startContainer.type==CKEDITOR.NODE_ELEMENT&&s.startContainer.getName() in b){var v=new CKEDITOR.dom.walker(s);v.evaluator=d;s.startContainer=v.next()}if(o&&s.endContainer.type==CKEDITOR.NODE_ELEMENT&&s.endContainer.getName() in b){v=new CKEDITOR.dom.walker(s);v.evaluator=d;s.endContainer=v.previous()}if(o){var p=o.getFirst(d),l=!!p.getNext(d),x=s.startContainer,m=p.equals(x)||p.contains(x);if(!(m&&(t.name=="indent"||t.useIndentClasses||parseInt(o.getStyle(c(o)),10))&&i(o,!l&&p.getDirection()))){y(o)}}else{h()}}CKEDITOR.dom.element.clearAllMarkers(r);k.forceNextSelectionCheck();z.selectBookmarks(n)}};CKEDITOR.plugins.add("indent",{init:function(i){var h=i.addCommand("indent",new a(i,"indent")),j=i.addCommand("outdent",new a(i,"outdent"));i.ui.addButton("Indent",{label:i.lang.indent,command:"indent"});i.ui.addButton("Outdent",{label:i.lang.outdent,command:"outdent"});i.on("selectionChange",CKEDITOR.tools.bind(e,h));i.on("selectionChange",CKEDITOR.tools.bind(e,j));if(CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat){i.addCss("ul,ol{ margin-left: 0px; padding-left: 40px;}")}i.on("dirChanged",function(r){var p=new CKEDITOR.dom.range(i.document);p.setStartBefore(r.data.node);p.setEndAfter(r.data.node);var k=new CKEDITOR.dom.walker(p),l;while((l=k.next())){if(l.type==CKEDITOR.NODE_ELEMENT){if(!l.equals(r.data.node)&&l.getDirection()){p.setStartAfter(l);k=new CKEDITOR.dom.walker(p);continue}var n=i.config.indentClasses;if(n){var s=(r.data.dir=="ltr")?["_rtl",""]:["","_rtl"];for(var o=0;o<n.length;o++){if(l.hasClass(n[o]+s[0])){l.removeClass(n[o]+s[0]);l.addClass(n[o]+s[1])}}}var m=l.getStyle("margin-right"),q=l.getStyle("margin-left");m?l.setStyle("margin-left",m):l.removeStyle("margin-left");q?l.setStyle("margin-right",q):l.removeStyle("margin-right")}}})},requires:["domiterator","list"]})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function c(f,h){var g=h.block||h.blockLimit;if(!g||g.getName()=="body"){return CKEDITOR.TRISTATE_OFF}return(e(g,f.config.useComputedState)==this.value)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF}function e(g,f){f=f===undefined||f;var i;if(f){i=g.getComputedStyle("text-align")}else{while(!g.hasAttribute||!(g.hasAttribute("align")||g.getStyle("text-align"))){var h=g.getParent();if(!h){break}g=h}i=g.getStyle("text-align")||g.getAttribute("align")||""}i&&(i=i.replace(/-moz-|-webkit-|start|auto/i,""));!i&&f&&(i=g.getComputedStyle("direction")=="rtl"?"right":"left");return i}function d(f){if(f.editor.readOnly){return}var g=f.editor.getCommand(this.name);g.state=c.call(this,f.editor,f.data.path);g.fire("state")}function b(h,f,i){this.name=f;this.value=i;var g=h.config.justifyClasses;if(g){switch(i){case"left":this.cssClassName=g[0];break;case"center":this.cssClassName=g[1];break;case"right":this.cssClassName=g[2];break;case"justify":this.cssClassName=g[3];break}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+g.join("|")+")(?=$|\\s)")}}function a(k){var i=k.editor;var f=new CKEDITOR.dom.range(i.document);f.setStartBefore(k.data.node);f.setEndAfter(k.data.node);var l=new CKEDITOR.dom.walker(f),j;while((j=l.next())){if(j.type==CKEDITOR.NODE_ELEMENT){if(!j.equals(k.data.node)&&j.getDirection()){f.setStartAfter(j);l=new CKEDITOR.dom.walker(f);continue}var g=i.config.justifyClasses;if(g){if(j.hasClass(g[0])){j.removeClass(g[0]);j.addClass(g[2])}else{if(j.hasClass(g[2])){j.removeClass(g[2]);j.addClass(g[0])}}}var h="text-align";var m=j.getStyle(h);if(m=="left"){j.setStyle(h,"right")}else{if(m=="right"){j.setStyle(h,"left")}}}}}b.prototype={exec:function(m){var p=m.getSelection(),o=m.config.enterMode;if(!p){return}var g=p.createBookmarks(),f=p.getRanges(true);var q=this.cssClassName,l,j;var h=m.config.useComputedState;h=h===undefined||h;for(var k=f.length-1;k>=0;k--){l=f[k].createIterator();l.enlargeBr=o!=CKEDITOR.ENTER_BR;while((j=l.getNextParagraph(o==CKEDITOR.ENTER_P?"p":"div"))){j.removeAttribute("align");j.removeStyle("text-align");var n=q&&(j.$.className=CKEDITOR.tools.ltrim(j.$.className.replace(this.cssClassRegex,"")));var r=(this.state==CKEDITOR.TRISTATE_OFF)&&(!h||(e(j,true)!=this.value));if(q){if(r){j.addClass(q)}else{if(!n){j.removeAttribute("class")}}}else{if(r){j.setStyle("text-align",this.value)}}}}m.focus();m.forceNextSelectionCheck();p.selectBookmarks(g)}};CKEDITOR.plugins.add("justify",{init:function(i){var j=new b(i,"justifyleft","left"),f=new b(i,"justifycenter","center"),h=new b(i,"justifyright","right"),g=new b(i,"justifyblock","justify");i.addCommand("justifyleft",j);i.addCommand("justifycenter",f);i.addCommand("justifyright",h);i.addCommand("justifyblock",g);i.ui.addButton("JustifyLeft",{label:i.lang.justify.left,command:"justifyleft"});i.ui.addButton("JustifyCenter",{label:i.lang.justify.center,command:"justifycenter"});i.ui.addButton("JustifyRight",{label:i.lang.justify.right,command:"justifyright"});i.ui.addButton("JustifyBlock",{label:i.lang.justify.block,command:"justifyblock"});i.on("selectionChange",CKEDITOR.tools.bind(d,j));i.on("selectionChange",CKEDITOR.tools.bind(d,h));i.on("selectionChange",CKEDITOR.tools.bind(d,f));i.on("selectionChange",CKEDITOR.tools.bind(d,g));i.on("dirChanged",a)},requires:["domiterator"]})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("keystrokes",{beforeInit:function(a){a.keystrokeHandler=new CKEDITOR.keystrokeHandler(a);a.specialKeys={}},init:function(d){var f=d.config.keystrokes,a=d.config.blockedKeystrokes;var e=d.keystrokeHandler.keystrokes,b=d.keystrokeHandler.blockedKeystrokes;for(var c=0;c<f.length;c++){e[f[c][0]]=f[c][1]}for(c=0;c<a.length;c++){b[a[c]]=1}}});CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler){return a.keystrokeHandler}this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this};(function(){var c;var b=function(g){g=g.data;var d=g.getKeystroke();var i=this.keystrokes[d];var f=this._.editor;c=(f.fire("key",{keyCode:d})===true);if(!c){if(i){var h={from:"keystrokeHandler"};c=(f.execCommand(i,h)!==false)}if(!c){var e=f.specialKeys[d];c=(e&&e(f)===true);if(!c){c=!!this.blockedKeystrokes[d]}}}if(c){g.preventDefault(true)}return !c};var a=function(d){if(c){c=false;d.data.preventDefault(true)}};CKEDITOR.keystrokeHandler.prototype={attach:function(d){d.on("keydown",b,this);if(CKEDITOR.env.opera||(CKEDITOR.env.gecko&&CKEDITOR.env.mac)){d.on("keypress",a,this)}}}})();CKEDITOR.config.blockedKeystrokes=[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85];CKEDITOR.config.keystrokes=[[CKEDITOR.ALT+121,"toolbarFocus"],[CKEDITOR.ALT+122,"elementsPathFocus"],[CKEDITOR.SHIFT+121,"contextMenu"],[CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu"],[CKEDITOR.CTRL+90,"undo"],[CKEDITOR.CTRL+89,"redo"],[CKEDITOR.CTRL+CKEDITOR.SHIFT+90,"redo"],[CKEDITOR.CTRL+76,"link"],[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"],[CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse"],[CKEDITOR.ALT+48,"a11yHelp"]];
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var r={ol:1,ul:1},d=/^[\n\r\t ]*$/;var m=CKEDITOR.dom.walker.whitespaces(),e=CKEDITOR.dom.walker.bookmark(),h=function(i){return !(m(i)||e(i))};function c(w){var v,x,i;if((v=w.getDirection())){x=w.getParent();while(x&&!(i=x.getDirection())){x=x.getParent()}if(v==i){w.removeAttribute("dir")}}}CKEDITOR.plugins.list={listToArray:function(y,G,E,D,F){if(!r[y.getName()]){return[]}if(!D){D=0}if(!E){E=[]}for(var A=0,B=y.getChildCount();A<B;A++){var v=y.getChild(A);if(v.type==CKEDITOR.NODE_ELEMENT&&v.getName() in CKEDITOR.dtd.$list){CKEDITOR.plugins.list.listToArray(v,G,E,D+1)}if(v.$.nodeName.toLowerCase()!="li"){continue}var C={parent:y,indent:D,element:v,contents:[]};if(!F){C.grandparent=y.getParent();if(C.grandparent&&C.grandparent.$.nodeName.toLowerCase()=="li"){C.grandparent=C.grandparent.getParent()}}else{C.grandparent=F}if(G){CKEDITOR.dom.element.setMarker(G,v,"listarray_index",E.length)}E.push(C);for(var z=0,w=v.getChildCount(),x;z<w;z++){x=v.getChild(z);if(x.type==CKEDITOR.NODE_ELEMENT&&r[x.getName()]){CKEDITOR.plugins.list.listToArray(x,G,E,D+1,C.grandparent)}else{C.contents.push(x)}}}return E},arrayToList:function(B,F,G,R,J){if(!G){G=0}if(!B||B.length<G+1){return null}var Q=B[G].parent.getDocument(),I=new CKEDITOR.dom.documentFragment(Q),P=null,x=G,K=Math.max(B[G].indent,0),v=null,z,E=(R==CKEDITOR.ENTER_P?"p":"div");while(1){var N=B[x];z=N.element.getDirection(1);if(N.indent==K){if(!P||B[x].parent.getName()!=P.getName()){P=B[x].parent.clone(false,1);J&&P.setAttribute("dir",J);I.append(P)}v=P.append(N.element.clone(0,1));if(z!=P.getDirection(1)){v.setAttribute("dir",z)}for(var M=0;M<N.contents.length;M++){v.append(N.contents[M].clone(1,1))}x++}else{if(N.indent==Math.max(K,0)+1){var L=B[x-1].element.getDirection(1),H=CKEDITOR.plugins.list.arrayToList(B,null,x,R,L!=z?z:null);if(!v.getChildCount()&&CKEDITOR.env.ie&&!(Q.$.documentMode>7)){v.append(Q.createText("\xa0"))}v.append(H.listNode);x=H.nextIndex}else{if(N.indent==-1&&!G&&N.grandparent){if(r[N.grandparent.getName()]){v=N.element.clone(false,true)}else{if(J||N.element.hasAttributes()||R!=CKEDITOR.ENTER_BR){v=Q.createElement(E);N.element.copyAttributes(v,{type:1,value:1});if(!J&&R==CKEDITOR.ENTER_BR&&!v.hasAttributes()){v=new CKEDITOR.dom.documentFragment(Q)}}else{v=new CKEDITOR.dom.documentFragment(Q)}}if(v.type==CKEDITOR.NODE_ELEMENT){if(N.grandparent.getDirection(1)!=z){v.setAttribute("dir",z)}}for(M=0;M<N.contents.length;M++){v.append(N.contents[M].clone(1,1))}if(v.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&x!=B.length-1){var D=v.getLast();if(D&&D.type==CKEDITOR.NODE_ELEMENT&&D.getAttribute("type")=="_moz"){D.remove()}if(!(D=v.getLast(h)&&D.type==CKEDITOR.NODE_ELEMENT&&D.getName() in CKEDITOR.dtd.$block)){v.append(Q.createElement("br"))}}if(v.type==CKEDITOR.NODE_ELEMENT&&v.getName()==E&&v.$.firstChild){v.trim();var w=v.getFirst();if(w.type==CKEDITOR.NODE_ELEMENT&&w.isBlockBoundary()){var O=new CKEDITOR.dom.documentFragment(Q);v.moveChildren(O);v=O}}var C=v.$.nodeName.toLowerCase();if(!CKEDITOR.env.ie&&(C=="div"||C=="p")){v.appendBogus()}I.append(v);P=null;x++}else{return null}}}if(B.length<=x||Math.max(B[x].indent,0)<K){break}}if(F){var y=I.getFirst(),A=B[0].parent;while(y){if(y.type==CKEDITOR.NODE_ELEMENT){CKEDITOR.dom.element.clearMarkers(F,y);if(y.getName() in CKEDITOR.dtd.$listItem){c(y)}}y=y.getNextSourceNode()}}return{listNode:I,nextIndex:x}}};function k(v){if(v.editor.readOnly){return null}var A=v.data.path,w=A.blockLimit,z=A.elements,y,x;for(x=0;x<z.length&&(y=z[x])&&!y.equals(w);x++){if(r[z[x].getName()]){return this.setState(this.type==z[x].getName()?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}}return this.setState(CKEDITOR.TRISTATE_OFF)}function j(E,D,H,I){var A=CKEDITOR.plugins.list.listToArray(D.root,H),G=[];for(var C=0;C<D.contents.length;C++){var y=D.contents[C];y=y.getAscendant("li",true);if(!y||y.getCustomData("list_item_processed")){continue}G.push(y);CKEDITOR.dom.element.setMarker(H,y,"list_item_processed",true)}var F=D.root,B=F.getDocument().createElement(this.type);F.copyAttributes(B,{start:1,type:1});B.removeStyle("list-style-type");for(C=0;C<G.length;C++){var z=G[C].getCustomData("listarray_index");A[z].parent=B}var x=CKEDITOR.plugins.list.arrayToList(A,H,null,E.config.enterMode);var w,v=x.listNode.getChildCount();for(C=0;C<v&&(w=x.listNode.getChild(C));C++){if(w.getName()==this.type){I.push(w)}}x.listNode.replace(D.root)}var u=/^h[1-6]$/;function b(w,B,A){var J=B.contents,N=B.root.getDocument(),L=[];if(J.length==1&&J[0].equals(B.root)){var I=N.createElement("div");J[0].moveChildren&&J[0].moveChildren(I);J[0].append(I);J[0]=I}var F=B.contents[0].getParent();for(var H=0;H<J.length;H++){F=F.getCommonAncestor(J[H].getParent())}var K=w.config.useComputedState,G,v;K=K===undefined||K;for(H=0;H<J.length;H++){var y=J[H],C;while((C=y.getParent())){if(C.equals(F)){L.push(y);if(!v&&y.getDirection()){v=1}var E=y.getDirection(K);if(G!==null){if(G&&G!=E){G=null}else{G=E}}break}y=C}}if(L.length<1){return}var M=L[L.length-1].getNext(),x=N.createElement(this.type);A.push(x);var z,D;while(L.length){z=L.shift();D=N.createElement("li");if(z.is("pre")||u.test(z.getName())){z.appendTo(D)}else{z.copyAttributes(D);if(G&&z.getDirection()){D.removeStyle("direction");D.removeAttribute("dir")}z.moveChildren(D);z.remove()}D.appendTo(x)}if(G&&v){x.setAttribute("dir",G)}if(M){x.insertBefore(M)}else{x.appendTo(F)}}function t(E,D,K){var A=CKEDITOR.plugins.list.listToArray(D.root,K),I=[];for(var B=0;B<D.contents.length;B++){var x=D.contents[B];x=x.getAscendant("li",true);if(!x||x.getCustomData("list_item_processed")){continue}I.push(x);CKEDITOR.dom.element.setMarker(K,x,"list_item_processed",true)}var F=null;for(B=0;B<I.length;B++){var z=I[B].getCustomData("listarray_index");A[z].indent=-1;F=z}for(B=F+1;B<A.length;B++){if(A[B].indent>A[B-1].indent+1){var H=A[B-1].indent+1-A[B].indent;var y=A[B].indent;while(A[B]&&A[B].indent>=y){A[B].indent+=H;B++}B--}}var w=CKEDITOR.plugins.list.arrayToList(A,K,null,E.config.enterMode,D.root.getAttribute("dir"));var G=w.listNode,v,C;function J(i){if((v=G[i?"getFirst":"getLast"]())&&!(v.is&&v.isBlockBoundary())&&(C=D.root[i?"getPrevious":"getNext"](CKEDITOR.dom.walker.whitespaces(true)))&&!(C.is&&C.isBlockBoundary({br:1}))){E.document.createElement("br")[i?"insertBefore":"insertAfter"](v)}}J(true);J();G.replace(D.root)}function o(i,v){this.name=i;this.type=v}function f(y){var v=y.getDirection();if(v){for(var x=0,w=y.getChildren(),z;z=w.getItem(x),x<w.count();x++){if(z.type==CKEDITOR.NODE_ELEMENT&&z.is("li")&&!z.getDirection()){z.setAttribute("dir",v)}}y.removeAttribute("dir")}}o.prototype={exec:function(x){var Z=x.document,W=x.config,Y=x.getSelection(),w=Y&&Y.getRanges(true);if(!w||w.length<1){return}if(this.state==CKEDITOR.TRISTATE_OFF){var H=Z.getBody();if(!H.getFirst(h)){W.enterMode==CKEDITOR.ENTER_BR?H.appendBogus():w[0].fixBlock(1,W.enterMode==CKEDITOR.ENTER_P?"p":"div");Y.selectRanges(w)}else{var J=w.length==1&&w[0],T=J&&J.getEnclosedNode();if(T&&T.is&&this.type==T.getName()){this.setState(CKEDITOR.TRISTATE_ON)}}}var z=Y.createBookmarks(true);var U=[],I={},G=w.createIterator(),B=0;while((J=G.getNextRange())&&++B){var S=J.getBoundaryNodes(),X=S.startNode,K=S.endNode;if(X.type==CKEDITOR.NODE_ELEMENT&&X.getName()=="td"){J.setStartAt(S.startNode,CKEDITOR.POSITION_AFTER_START)}if(K.type==CKEDITOR.NODE_ELEMENT&&K.getName()=="td"){J.setEndAt(S.endNode,CKEDITOR.POSITION_BEFORE_END)}var M=J.createIterator(),F;M.forceBrBreak=(this.state==CKEDITOR.TRISTATE_OFF);while((F=M.getNextParagraph())){if(F.getCustomData("list_block")){continue}else{CKEDITOR.dom.element.setMarker(I,F,"list_block",1)}var L=new CKEDITOR.dom.elementPath(F),V=L.elements,R=V.length,y=null,E=0,A=L.blockLimit,v;for(var Q=R-1;Q>=0&&(v=V[Q]);Q--){if(r[v.getName()]&&A.contains(v)){A.removeCustomData("list_group_object_"+B);var D=v.getCustomData("list_group_object");if(D){D.contents.push(F)}else{D={root:v,contents:[F]};U.push(D);CKEDITOR.dom.element.setMarker(I,v,"list_group_object",D)}E=1;break}}if(E){continue}var P=A;if(P.getCustomData("list_group_object_"+B)){P.getCustomData("list_group_object_"+B).contents.push(F)}else{D={root:P,contents:[F]};CKEDITOR.dom.element.setMarker(I,P,"list_group_object_"+B,D);U.push(D)}}}var C=[];while(U.length>0){D=U.shift();if(this.state==CKEDITOR.TRISTATE_OFF){if(r[D.root.getName()]){j.call(this,x,D,I,C)}else{b.call(this,x,D,C)}}else{if(this.state==CKEDITOR.TRISTATE_ON&&r[D.root.getName()]){t.call(this,x,D,I)}}}for(Q=0;Q<C.length;Q++){y=C[Q];var N,O=this;(N=function(aa){var i=y[aa?"getPrevious":"getNext"](CKEDITOR.dom.walker.whitespaces(true));if(i&&i.getName&&i.getName()==O.type){if(i.getDirection(1)!=y.getDirection(1)){f(y.getDirection()?y:i)}i.remove();i.moveChildren(y,aa)}})();N(1)}CKEDITOR.dom.element.clearAllMarkers(I);Y.selectBookmarks(z);x.focus()}};var n=CKEDITOR.dtd;var s=/[\t\r\n ]*(?: |\xa0)$/;function l(x,A){var z,w=x.children,y=w.length;for(var v=0;v<y;v++){z=w[v];if(z.name&&(z.name in A)){return v}}return y}function a(i){return function(A){var x=A.children,z=l(A,n.$list),w=x[z],v=w&&w.previous,B;if(v&&(v.name&&v.name=="br"||v.value&&(B=v.value.match(s)))){var y=v;if(!(B&&B.index)&&y==x[0]){x[0]=(i||CKEDITOR.env.ie)?new CKEDITOR.htmlParser.text("\xa0"):new CKEDITOR.htmlParser.element("br",{})}else{if(y.name=="br"){x.splice(z-1,1)}else{y.value=y.value.replace(s,"")}}}}}var g={elements:{}};for(var p in n.$listItem){g.elements[p]=a()}var q={elements:{}};for(p in n.$listItem){q.elements[p]=a(true)}CKEDITOR.plugins.add("list",{init:function(v){var w=v.addCommand("numberedlist",new o("numberedlist","ol")),i=v.addCommand("bulletedlist",new o("bulletedlist","ul"));v.ui.addButton("NumberedList",{label:v.lang.numberedlist,command:"numberedlist"});v.ui.addButton("BulletedList",{label:v.lang.bulletedlist,command:"bulletedlist"});v.on("selectionChange",CKEDITOR.tools.bind(k,w));v.on("selectionChange",CKEDITOR.tools.bind(k,i))},afterInit:function(v){var i=v.dataProcessor;if(i){i.dataFilter.addRules(g);i.htmlFilter.addRules(q)}},requires:["domiterator"]})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("listblock",{requires:["panel"],onLoad:function(){CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,c){c=c||{};var d=c.attributes||(c.attributes={});(this.multiSelect=!!c.multiSelect)&&(d["aria-multiselectable"]=true);!d.role&&(d.role="listbox");this.base.apply(this,arguments);var b=this.keys;b[40]="next";b[9]="next";b[38]="prev";b[CKEDITOR.SHIFT+9]="prev";b[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(b[13]="mouseup");this._.pendingHtml=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){this._.pendingHtml.push("</ul>");delete this._.started}},getClick:function(){if(!this._.click){this._.click=CKEDITOR.tools.addFunction(function(b){var a=true;if(this.multiSelect){a=this.toggle(b)}else{this.mark(b)}if(this.onClick){this.onClick(b,a)}},this)}return this._.click}},proto:{add:function(c,a,d){var b=this._.pendingHtml,e=CKEDITOR.tools.getNextId();if(!this._.started){b.push('<ul role="presentation" class=cke_panel_list>');this._.started=1;this._.size=this._.size||0}this._.items[c]=e;b.push("<li id=",e,' class=cke_panel_listItem role=presentation><a id="',e,'_option" _cke_focus=1 hidefocus=true title="',d||c,'" href="javascript:void(\'',c,"')\" "+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction(',this._.getClick(),",'",c,"'); return false;\"",' role="option" aria-posinset="'+ ++this._.size+'">',a||c,"</a></li>")},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push('<h1 role="presentation" id=',b," class=cke_panel_grouptitle>",a,"</h1>")},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));var a=this._.items,c=this.element.getDocument();for(var b in a){c.getById(a[b]+"_option").setAttribute("aria-setsize",this._.size)}delete this._.size;this._.pendingHtml=[]},toggle:function(b){var a=this.isMarked(b);if(a){this.unmark(b)}else{this.mark(b)}return !a},hideGroup:function(a){var c=this.element.getDocument().getById(this._.groups[a]),b=c&&c.getNext();if(c){c.setStyle("display","none");if(b&&b.getName()=="ul"){b.setStyle("display","none")}}},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var b=this._.items,a=this._.groups,f=this.element.getDocument();for(var d in b){f.getById(b[d]).setStyle("display","")}for(var g in a){var e=f.getById(a[g]),c=e.getNext();e.setStyle("display","");if(c&&c.getName()=="ul"){c.setStyle("display","")}}},mark:function(b){if(!this.multiSelect){this.unmarkAll()}var c=this._.items[b],a=this.element.getDocument().getById(c);a.addClass("cke_selected");this.element.getDocument().getById(c+"_option").setAttribute("aria-selected",true);this.onMark&&this.onMark(a)},unmark:function(b){var c=this.element.getDocument(),d=this._.items[b],a=c.getById(d);a.removeClass("cke_selected");c.getById(d+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(a)},unmarkAll:function(){var a=this._.items,c=this.element.getDocument();for(var b in a){var d=a[b];c.getById(d).removeClass("cke_selected");c.getById(d+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(e){this._.focusIndex=-1;if(e){var c=this.element.getDocument().getById(this._.items[e]).getFirst();var a=this.element.getElementsByTag("a"),d,b=-1;while((d=a.getItem(++b))){if(d.equals(c)){this._.focusIndex=b;break}}setTimeout(function(){c.focus()},0)}}}})}});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function c(h,g){var f;try{f=h.getSelection().getRanges()[0]}catch(i){return null}f.shrink(CKEDITOR.SHRINK_TEXT);return f.getCommonAncestor().getAscendant(g,1)}var b=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.is("li")};var a={a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman","1":"decimal",disc:"disc",circle:"circle",square:"square"};function d(g,f){var h=g.lang.list;if(f=="bulletedListStyle"){return{title:h.bulletedTitle,minWidth:300,minHeight:50,contents:[{id:"info",accessKey:"I",elements:[{type:"select",label:h.type,id:"type",align:"center",style:"width:150px",items:[[h.notset,""],[h.circle,"circle"],[h.disc,"disc"],[h.square,"square"]],setup:function(i){var j=i.getStyle("list-style-type")||a[i.getAttribute("type")]||i.getAttribute("type")||"";this.setValue(j)},commit:function(i){var j=this.getValue();if(j){i.setStyle("list-style-type",j)}else{i.removeStyle("list-style-type")}}}]}],onShow:function(){var j=this.getParentEditor(),i=c(j,"ul");i&&this.setupContent(i)},onOk:function(){var j=this.getParentEditor(),i=c(j,"ul");i&&this.commitContent(i)}}}else{if(f=="numberedListStyle"){var e=[[h.notset,""],[h.lowerRoman,"lower-roman"],[h.upperRoman,"upper-roman"],[h.lowerAlpha,"lower-alpha"],[h.upperAlpha,"upper-alpha"],[h.decimal,"decimal"]];if(!CKEDITOR.env.ie||CKEDITOR.env.version>7){e.concat([[h.armenian,"armenian"],[h.decimalLeadingZero,"decimal-leading-zero"],[h.georgian,"georgian"],[h.lowerGreek,"lower-greek"]])}return{title:h.numberedTitle,minWidth:300,minHeight:50,contents:[{id:"info",accessKey:"I",elements:[{type:"hbox",widths:["25%","75%"],children:[{label:h.start,type:"text",id:"start",validate:CKEDITOR.dialog.validate.integer(h.validateStartNumber),setup:function(i){var j=i.getFirst(b).getAttribute("value")||i.getAttribute("start")||1;j&&this.setValue(j)},commit:function(j){var m=j.getFirst(b);var k=m.getAttribute("value")||j.getAttribute("start")||1;j.getFirst(b).removeAttribute("value");var n=parseInt(this.getValue(),10);if(isNaN(n)){j.removeAttribute("start")}else{j.setAttribute("start",n)}var i=m,o=k,l=isNaN(n)?1:n;while((i=i.getNext(b))&&o++){if(i.getAttribute("value")==o){i.setAttribute("value",l+o-k)}}}},{type:"select",label:h.type,id:"type",style:"width: 100%;",items:e,setup:function(i){var j=i.getStyle("list-style-type")||a[i.getAttribute("type")]||i.getAttribute("type")||"";this.setValue(j)},commit:function(i){var j=this.getValue();if(j){i.setStyle("list-style-type",j)}else{i.removeStyle("list-style-type")}}}]}]}],onShow:function(){var j=this.getParentEditor(),i=c(j,"ol");i&&this.setupContent(i)},onOk:function(){var j=this.getParentEditor(),i=c(j,"ol");i&&this.commitContent(i)}}}}}CKEDITOR.dialog.add("numberedListStyle",function(e){return d(e,"numberedListStyle")});CKEDITOR.dialog.add("bulletedListStyle",function(e){return d(e,"bulletedListStyle")})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){CKEDITOR.plugins.liststyle={requires:["dialog"],init:function(a){a.addCommand("numberedListStyle",new CKEDITOR.dialogCommand("numberedListStyle"));CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js");a.addCommand("bulletedListStyle",new CKEDITOR.dialogCommand("bulletedListStyle"));CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js");if(a.addMenuItems){a.addMenuGroup("list",108);a.addMenuItems({numberedlist:{label:a.lang.list.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:a.lang.list.bulletedTitle,group:"list",command:"bulletedListStyle"}})}if(a.contextMenu){a.contextMenu.addListener(function(c,d){if(!c||c.isReadOnly()){return null}while(c){var b=c.getName();if(b=="ol"){return{numberedlist:CKEDITOR.TRISTATE_OFF}}else{if(b=="ul"){return{bulletedlist:CKEDITOR.TRISTATE_OFF}}}c=c.getParent()}return null})}}};CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function c(l){if(!l||l.type!=CKEDITOR.NODE_ELEMENT||l.getName()!="form"){return[]}var n=[],m=["style","className"];for(var k=0;k<m.length;k++){var j=m[k];var g=l.$.elements.namedItem(j);if(g){var h=new CKEDITOR.dom.element(g);n.push([h,h.nextSibling]);h.remove()}}return n}function e(j,l){if(!j||j.type!=CKEDITOR.NODE_ELEMENT||j.getName()!="form"){return}if(l.length>0){for(var g=l.length-1;g>=0;g--){var k=l[g][0];var h=l[g][1];if(h){k.insertBefore(h)}else{k.appendTo(j)}}}}function d(j,i){var k=c(j);var h={};var g=j.$;if(!i){h["class"]=g.className||"";g.className=""}h.inline=g.style.cssText||"";if(!i){g.style.cssText="position: static; overflow: visible"}e(k);return h}function a(i,h){var j=c(i);var g=i.$;if("class" in h){g.className=h["class"]}if("inline" in h){g.style.cssText=h.inline}e(j)}function f(l){var k=CKEDITOR.instances;for(var j in k){var h=k[j];if(h.mode=="wysiwyg"&&!h.readOnly){var g=h.document.getBody();g.setAttribute("contentEditable",false);g.setAttribute("contentEditable",true)}}if(l.focusManager.hasFocus){l.toolbox.focus();l.focus()}}function b(g){if(!CKEDITOR.env.ie||CKEDITOR.env.version>6){return null}var h=CKEDITOR.dom.element.createFromHtml('<iframe frameborder="0" tabindex="-1" src="javascript:void((function(){document.open();'+(CKEDITOR.env.isCustomDomain()?"document.domain='"+this.getDocument().$.domain+"';":"")+'document.close();})())" style="display:block;position:absolute;z-index:-1;progid:DXImageTransform.Microsoft.Alpha(opacity=0);"></iframe>');return g.append(h,true)}CKEDITOR.plugins.add("maximize",{init:function(m){var g=m.lang;var i=CKEDITOR.document,l=i.getWindow();var n,o;var p;var k;function h(){var q=l.getViewPaneSize();k&&k.setStyles({width:q.width+"px",height:q.height+"px"});m.resize(q.width,q.height,null,true)}var j=CKEDITOR.TRISTATE_OFF;m.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:false,exec:function(){var q=m.container.getChild(1);var t=m.getThemeSpace("contents");if(m.mode=="wysiwyg"){var B=m.getSelection();n=B&&B.getRanges();o=l.getScrollPosition()}else{var y=m.textarea.$;n=!CKEDITOR.env.ie&&[y.selectionStart,y.selectionEnd];o=[y.scrollLeft,y.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){l.on("resize",h);p=l.getScrollPosition();var r=m.container;while((r=r.getParent())){r.setCustomData("maximize_saved_styles",d(r));r.setStyle("z-index",m.config.baseFloatZIndex-1)}t.setCustomData("maximize_saved_styles",d(t,true));q.setCustomData("maximize_saved_styles",d(q,true));var C={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};i.getDocumentElement().setStyles(C);!CKEDITOR.env.gecko&&i.getDocumentElement().setStyle("position","fixed");!(CKEDITOR.env.gecko&&CKEDITOR.env.quirks)&&i.getBody().setStyles(C);CKEDITOR.env.ie?setTimeout(function(){l.$.scrollTo(0,0)},0):l.$.scrollTo(0,0);q.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");q.$.offsetLeft;q.setStyles({"z-index":m.config.baseFloatZIndex-1,left:"0px",top:"0px"});k=b(q);q.addClass("cke_maximized");h();var u=q.getDocumentPosition();q.setStyles({left:(-1*u.x)+"px",top:(-1*u.y)+"px"});CKEDITOR.env.gecko&&f(m)}else{if(this.state==CKEDITOR.TRISTATE_ON){l.removeListener("resize",h);var z=[t,q];for(var w=0;w<z.length;w++){a(z[w],z[w].getCustomData("maximize_saved_styles"));z[w].removeCustomData("maximize_saved_styles")}r=m.container;while((r=r.getParent())){a(r,r.getCustomData("maximize_saved_styles"));r.removeCustomData("maximize_saved_styles")}CKEDITOR.env.ie?setTimeout(function(){l.$.scrollTo(p.x,p.y)},0):l.$.scrollTo(p.x,p.y);q.removeClass("cke_maximized");if(CKEDITOR.env.webkit){q.setStyle("display","inline");setTimeout(function(){q.setStyle("display","block")},0)}if(k){k.remove();k=null}m.fire("resize")}}this.toggleState();var x=this.uiItems[0];if(x){var A=(this.state==CKEDITOR.TRISTATE_OFF)?g.maximize:g.minimize;var s=m.element.getDocument().getById(x._.id);s.getChild(1).setHtml(A);s.setAttribute("title",A);s.setAttribute("href",'javascript:void("'+A+'");')}if(m.mode=="wysiwyg"){if(n){CKEDITOR.env.gecko&&f(m);m.getSelection().selectRanges(n);var v=m.getSelection().getStartElement();v&&v.scrollIntoView(true)}else{l.$.scrollTo(o.x,o.y)}}else{if(n){y.selectionStart=n[0];y.selectionEnd=n[1]}y.scrollLeft=o[0];y.scrollTop=o[1]}n=o=null;j=this.state},canUndo:false});m.ui.addButton("Maximize",{label:g.maximize,command:"maximize"});m.on("mode",function(){var q=m.getCommand("maximize");q.setState(q.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:j)},null,null,100)}})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("menu",{beforeInit:function(d){var a=d.config.menu_groups.split(","),e=d._.menuGroups={},c=d._.menuItems={};for(var b=0;b<a.length;b++){e[a[b]]=b+1}d.addMenuGroup=function(g,f){e[g]=f||100};d.addMenuItem=function(f,g){if(e[g.group]){c[f]=new CKEDITOR.menuItem(this,f,g)}};d.addMenuItems=function(f){for(var g in f){this.addMenuItem(g,f[g])}};d.getMenuItem=function(f){return c[f]};d.removeMenuItem=function(f){delete c[f]}},requires:["floatpanel"]});(function(){CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(d,c){c=this._.definition=c||{};this.id=CKEDITOR.tools.getNextId();this.editor=d;this.items=[];this._.listeners=[];this._.level=c.level||1;var e=CKEDITOR.tools.extend({},c.panel,{css:d.skin.editor.css,level:this._.level-1,block:{}});var b=e.block.attributes=(e.attributes||{});!b.role&&(b.role="menu");this._.panelDefinition=e},_:{onShow:function(){var g=this.editor.getSelection();if(CKEDITOR.env.ie){g&&g.lock()}var d=g&&g.getStartElement(),f=this._.listeners,e=[];this.removeAll();for(var c=0;c<f.length;c++){var b=f[c](d,g);if(b){for(var j in b){var h=this.editor.getMenuItem(j);if(h&&(!h.command||this.editor.getCommand(h.command).state)){h.state=b[j];this.add(h)}}}}},onClick:function(b){this.hide(false);if(b.onClick){b.onClick()}else{if(b.command){this.editor.execCommand(b.command)}}},onEscape:function(c){var b=this.parent;if(b){b._.panel.hideChild();var d=b._.panel._.panel._.currentBlock,e=d._.focusIndex;d._.markItem(e)}else{if(c==27){this.hide()}}return false},onHide:function(){if(CKEDITOR.env.ie){var b=this.editor.getSelection();b&&b.unlock()}this.onHide&&this.onHide()},showSubMenu:function(c){var g=this._.subMenu,e=this.items[c],i=e.getItems&&e.getItems();if(!i){this._.panel.hideChild();return}var f=this._.panel.getBlock(this.id);f._.focusIndex=c;if(g){g.removeAll()}else{g=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},true));g.parent=this;g._.onClick=CKEDITOR.tools.bind(this._.onClick,this)}for(var b in i){var h=this.editor.getMenuItem(b);if(h){h.state=i[b];g.add(h)}}var d=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(c));g.show(d,2)}},proto:{add:function(b){if(!b.order){b.order=this.items.length}this.items.push(b)},removeAll:function(){this.items=[]},show:function(b,f,q,p){if(!this.parent){this._.onShow();if(!this.items.length){return}}f=f||(this.editor.lang.dir=="rtl"?2:1);var n=this.items,e=this.editor,l=this._.panel,c=this._.element;if(!l){l=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);l.onEscape=CKEDITOR.tools.bind(function(i){if(this._.onEscape(i)===false){return false}},this);l.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);var g=l.addBlock(this.id,this._.panelDefinition.block);g.autoSize=true;var m=g.keys;m[40]="next";m[9]="next";m[38]="prev";m[CKEDITOR.SHIFT+9]="prev";m[(e.lang.dir=="rtl"?37:39)]=CKEDITOR.env.ie?"mouseup":"click";m[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(m[13]="mouseup");c=this._.element=g.element;c.addClass(e.skinClass);var j=c.getDocument();j.getBody().setStyle("overflow","hidden");j.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(i){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,e.config.menu_subMenuDelay||400,this,[i])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(i){clearTimeout(this._.showSubTimeout)},this);this._.itemClickFn=CKEDITOR.tools.addFunction(function(i){var u=this.items[i];if(u.state==CKEDITOR.TRISTATE_DISABLED){this.hide();return}if(u.getItems){this._.showSubMenu(i)}else{this._.onClick(u)}},this)}a(n);var t=e.container.getChild(1),k=t.hasClass("cke_mixed_dir_content")?" cke_mixed_dir_content":"";var h=['<div class="cke_menu'+k+'" role="presentation">'];var d=n.length,s=d&&n[0].group;for(var o=0;o<d;o++){var r=n[o];if(s!=r.group){h.push('<div class="cke_menuseparator" role="separator"></div>');s=r.group}r.render(this,o,h)}h.push("</div>");c.setHtml(h.join(""));CKEDITOR.ui.fire("ready",this);if(this.parent){this.parent._.panel.showAsChild(l,this.id,b,f,q,p)}else{l.showBlock(this.id,b,f,q,p)}e.fire("menuShow",[l])},addListener:function(b){this._.listeners.push(b)},hide:function(b){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(b)}}});function a(b){b.sort(function(d,c){if(d.group<c.group){return -1}else{if(d.group>c.group){return 1}}return d.order<c.order?-1:d.order>c.order?1:0})}CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(d,b,c){CKEDITOR.tools.extend(this,c,{order:0,className:"cke_button_"+b});this.group=d._.menuGroups[this.group];this.editor=d;this.name=b},proto:{render:function(f,j,g){var e=f.id+String(j),d=(typeof this.state=="undefined")?CKEDITOR.TRISTATE_OFF:this.state;var h=" cke_"+(d==CKEDITOR.TRISTATE_ON?"on":d==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var b=this.label;if(this.className){h+=" "+this.className}var c=this.getItems;g.push('<span class="cke_menuitem'+(this.icon&&this.icon.indexOf(".png")==-1?" cke_noalphafix":"")+'"><a id="',e,'" class="',h,'" href="javascript:void(\'',(this.label||"").replace("'",""),'\')" title="',this.label,'" tabindex="-1"_cke_focus=1 hidefocus="true" role="menuitem"'+(c?'aria-haspopup="true"':"")+(d==CKEDITOR.TRISTATE_DISABLED?'aria-disabled="true"':"")+(d==CKEDITOR.TRISTATE_ON?'aria-pressed="true"':""));if(CKEDITOR.env.opera||(CKEDITOR.env.gecko&&CKEDITOR.env.mac)){g.push(' onkeypress="return false;"')}if(CKEDITOR.env.gecko){g.push(' onblur="this.style.cssText = this.style.cssText;"')}var i=(this.iconOffset||0)*-16;g.push(' onmouseover="CKEDITOR.tools.callFunction(',f._.itemOverFn,",",j,');" onmouseout="CKEDITOR.tools.callFunction(',f._.itemOutFn,",",j,');" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction(',f._.itemClickFn,",",j,'); return false;"><span class="cke_icon_wrapper"><span class="cke_icon"'+(this.icon?' style="background-image:url('+CKEDITOR.getUrl(this.icon)+");background-position:0 "+i+'px;"':"")+'></span></span><span class="cke_label">');if(c){g.push('<span class="cke_menuarrow">',"<span>&#",(this.editor.lang.dir=="rtl"?"9668":"9658"),";</span>","</span>")}g.push(b,"</span></a></span>")}}})})();CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div";
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("panel",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(a,b){if(b){CKEDITOR.tools.extend(this,b)}CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=a;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(a){return new CKEDITOR.ui.panel(a)}};CKEDITOR.ui.panel.prototype={renderHtml:function(b){var a=[];this.render(b,a);return a.join("")},render:function(b,a){var c=this.id;a.push('<div class="',b.skinClass,'" lang="',b.langCode,'" role="presentation" style="display:none;z-index:'+(b.config.baseFloatZIndex+1)+'"><div id=',c," dir=",b.lang.dir,' role="presentation" class="cke_panel cke_',b.lang.dir);if(this.className){a.push(" ",this.className)}a.push('">');if(this.forceIFrame||this.css.length){a.push('<iframe id="',c,'_frame" frameborder="0" role="application" src="javascript:void(');a.push(CKEDITOR.env.isCustomDomain()?"(function(){document.open();document.domain='"+document.domain+"';document.close();})()":"0");a.push(')"></iframe>')}a.push("</div></div>");return c},getHolderElement:function(){var i=this._.holder;if(!i){if(this.forceIFrame||this.css.length){var c=this.document.getById(this.id+"_frame"),a=c.getParent(),b=a.getAttribute("dir"),g=a.getParent().getAttribute("class"),f=a.getParent().getAttribute("lang"),j=c.getFrameDocument();CKEDITOR.env.iOS&&a.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});var h=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(k){this.isLoaded=true;if(this.onLoad){this.onLoad()}},this));var d='<!DOCTYPE html><html dir="'+b+'" class="'+g+'_container" lang="'+f+'"><head><style>.'+g+'_container{visibility:hidden}</style></head><body class="cke_'+b+" cke_panel_frame "+CKEDITOR.env.cssClass+'" style="margin:0;padding:0" onload="( window.CKEDITOR || window.parent.CKEDITOR ).tools.callFunction('+h+');"></body>'+CKEDITOR.tools.buildStyleHtml(this.css)+"</html>";j.write(d);var e=j.getWindow();e.$.CKEDITOR=CKEDITOR;j.on("key"+(CKEDITOR.env.opera?"press":"down"),function(k){var m=k.data.getKeystroke(),l=this.document.getById(this.id).getAttribute("dir");if(this._.onKeyDown&&this._.onKeyDown(m)===false){k.data.preventDefault();return}if(m==27||m==(l=="rtl"?39:37)){if(this.onEscape&&this.onEscape(m)===false){k.data.preventDefault()}}},this);i=j.getBody();i.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(h)}else{i=this.document.getById(this.id)}this._.holder=i}return i},addBlock:function(a,b){b=this._.blocks[a]=b instanceof CKEDITOR.ui.panel.block?b:new CKEDITOR.ui.panel.block(this.getHolderElement(),b);if(!this._.currentBlock){this.showBlock(a)}return b},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){var e=this._.blocks,d=e[a],c=this._.currentBlock,b=this.forceIFrame?this.document.getById(this.id+"_frame"):this._.holder;b.getParent().getParent().disableContextMenu();if(c){b.removeAttributes(c.attributes);c.hide()}this._.currentBlock=d;b.setAttributes(d.attributes);CKEDITOR.fire("ariaWidget",b);d._.focusIndex=-1;this._.onKeyDown=d.onKeyDown&&CKEDITOR.tools.bind(d.onKeyDown,d);d.show();return d},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(a,b){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabIndex:-1,"class":"cke_panel_block",role:"presentation"},styles:{display:"none"}}));if(b){CKEDITOR.tools.extend(this,b)}if(!this.attributes.title){this.attributes.title=this.attributes["aria-label"]}this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(b){if(b==-1){return}var a=this.element.getElementsByTag("a");var c=a.getItem(this._.focusIndex=b);if(CKEDITOR.env.webkit||CKEDITOR.env.opera){c.getDocument().getWindow().focus()}c.focus();this.onMark&&this.onMark(c)}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){if(!this.onHide||this.onHide.call(this)!==true){this.element.setStyle("display","none")}},onKeyDown:function(e){var c=this.keys[e];switch(c){case"next":var b=this._.focusIndex,a=this.element.getElementsByTag("a"),d;while((d=a.getItem(++b))){if(d.getAttribute("_cke_focus")&&d.$.offsetWidth){this._.focusIndex=b;d.focus();break}}return false;case"prev":b=this._.focusIndex;a=this.element.getElementsByTag("a");while(b>0&&(d=a.getItem(--b))){if(d.getAttribute("_cke_focus")&&d.$.offsetWidth){this._.focusIndex=b;d.focus();break}}return false;case"click":case"mouseup":b=this._.focusIndex;d=b>=0&&this.element.getElementsByTag("a").getItem(b);if(d){d.$[c]?d.$[c]():d.$["on"+c]()}return false}return true}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var j=CKEDITOR.htmlParser.fragment.prototype,e=CKEDITOR.htmlParser.element.prototype;j.onlyChild=e.onlyChild=function(){var u=this.children,v=u.length,w=(v==1)&&u[0];return w||null};e.removeAnyChildWithName=function(w){var v=this.children,x=[],y;for(var u=0;u<v.length;u++){y=v[u];if(!y.name){continue}if(y.name==w){x.push(y);v.splice(u--,1)}x=x.concat(y.removeAnyChildWithName(w))}return x};e.getAncestor=function(u){var v=this.parent;while(v&&!(v.name&&v.name.match(u))){v=v.parent}return v};j.firstChild=e.firstChild=function(w){var v;for(var u=0;u<this.children.length;u++){v=this.children[u];if(w(v)){return v}else{if(v.name){v=v.firstChild(w);if(v){return v}}}}return null};e.addStyle=function(u,y,x){var z,v="";if(typeof y=="string"){v+=u+":"+y+";"}else{if(typeof u=="object"){for(var w in u){if(u.hasOwnProperty(w)){v+=w+":"+u[w]+";"}}}else{v+=u}x=y}if(!this.attributes){this.attributes={}}z=this.attributes.style||"";z=(x?[v,z]:[z,v]).join(";");this.attributes.style=z.replace(/^;|;(?=;)/,"")};CKEDITOR.dtd.parentOf=function(w){var v={};for(var u in this){if(u.indexOf("$")==-1&&this[u][w]){v[u]=1}}return v};function d(A){var v=A.children,u,C,z=A.children.length,y,B,D=/list-style-type:(.*?)(?:;|$)/,x=CKEDITOR.plugins.pastefromword.filters.stylesFilter;C=A.attributes;if(D.exec(C.style)){return}for(var w=0;w<z;w++){u=v[w];if(u.attributes.value&&Number(u.attributes.value)==w+1){delete u.attributes.value}y=D.exec(u.attributes.style);if(y){if(y[1]==B||!B){B=y[1]}else{B=null;break}}}if(B){for(w=0;w<z;w++){C=v[w].attributes;C.style&&(C.style=x([["list-style-type"]])(C.style)||"")}A.addStyle("list-style-type",B)}}var p=/^([.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz){1}?/i;var s=/^(?:\b0[^\s]*\s*){1,4}$/;var i="^m{0,4}(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})$",k=new RegExp(i),a=new RegExp(i.toUpperCase());var m={decimal:/\d+/,"lower-roman":k,"upper-roman":a,"lower-alpha":/^[a-z]+$/,"upper-alpha":/^[A-Z]+$/},l={disc:/[l\u00B7\u2002]/,circle:/[\u006F\u00D8]/,square:/[\u006E\u25C6]/},t={ol:m,ul:l},f=[[1000,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],g="ABCDEFGHIJKLMNOPQRSTUVWXYZ";function q(z){z=z.toUpperCase();var u=f.length,y=0;for(var x=0;x<u;++x){for(var w=f[x],v=w[1].length;z.substr(0,v)==w[1];z=z.substr(v)){y+=w[0]}}return y}function n(y){y=y.toUpperCase();var v=g.length,w=1;for(var u=1;y.length>0;u*=v){w+=g.indexOf(y.charAt(y.length-1))*u;y=y.substr(0,y.length-1)}return w}var o=0,h=null,c;var b=(CKEDITOR.plugins.pastefromword={utils:{createListBulletMarker:function(v,w){var u=new CKEDITOR.htmlParser.element("cke:listbullet");u.attributes={"cke:listsymbol":v[0]};u.add(new CKEDITOR.htmlParser.text(w));return u},isListBulletIndicator:function(u){var v=u.attributes&&u.attributes.style;if(/mso-list\s*:\s*Ignore/i.test(v)){return true}},isContainingOnlySpaces:function(u){var v;return((v=u.onlyChild())&&(/^(:?\s| )+$/).test(v.value))},resolveList:function(w){var u=w.attributes,v;if((v=w.removeAnyChildWithName("cke:listbullet"))&&v.length&&(v=v[0])){w.name="cke:li";if(u.style){u.style=b.filters.stylesFilter([["text-indent"],["line-height"],[(/^margin(:?-left)?$/),null,function(y){var x=y.split(" ");y=CKEDITOR.tools.convertToPx(x[3]||x[1]||x[0]);if(!o&&h!==null&&y>h){o=y-h}h=y;u["cke:indent"]=o&&(Math.ceil(y/o)+1)||1}],[(/^mso-list$/),null,function(z){z=z.split(" ");var y=Number(z[0].match(/\d+/)),x=Number(z[1].match(/\d+/));if(x==1){y!==c&&(u["cke:reset"]=1);c=y}u["cke:indent"]=x}]])(u.style,w)||""}if(!u["cke:indent"]){h=0;u["cke:indent"]=1}CKEDITOR.tools.extend(u,v.attributes);return true}else{c=h=o=null}return false},getStyleComponents:(function(){var u=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;"></div>',CKEDITOR.document);CKEDITOR.document.getBody().append(u);return function(x,v,w){u.setStyle(x,v);var A={},z=w.length;for(var y=0;y<z;y++){A[w[y]]=u.getStyle(w[y])}return A}})(),listDtdParents:CKEDITOR.dtd.parentOf("ol")},filters:{flattenList:function(A,u){u=typeof u=="number"?u:1;var G=A.attributes,B;switch(G.type){case"a":B="lower-alpha";break;case"1":B="decimal";break}var x=A.children,w;for(var C=0;C<x.length;C++){w=x[C];if(w.name in CKEDITOR.dtd.$listItem){var z=w.attributes,v=w.children,E=v.length,F=v[E-1];if(F.name in CKEDITOR.dtd.$list){A.add(F,C+1);if(!--v.length){x.splice(C--,1)}}w.name="cke:li";G.start&&!C&&(z.value=G.start);b.filters.stylesFilter([["tab-stops",null,function(I){var H=I.split(" ")[1].match(p);H&&(h=CKEDITOR.tools.convertToPx(H[0]))}],(u==1?["mso-list",null,function(I){I=I.split(" ");var H=Number(I[0].match(/\d+/));H!==c&&(z["cke:reset"]=1);c=H}]:null)])(z.style);z["cke:indent"]=u;z["cke:listtype"]=A.name;z["cke:list-style-type"]=B}else{if(w.name in CKEDITOR.dtd.$list){arguments.callee.apply(this,[w,u+1]);x=x.slice(0,C).concat(w.children).concat(x.slice(C+1));A.children=[];for(var y=0,D=x.length;y<D;y++){A.add(x[y])}}}}delete A.name;G["cke:list"]=1},assembleList:function(v){var z=v.children,A,D,E,y,G,w,M,P=[],N,L;var O,K,H,u;for(var I=0;I<z.length;I++){A=z[I];if("cke:li"==A.name){A.name="li";D=A;E=D.attributes;O=E["cke:listsymbol"];O=O&&O.match(/^(?:[(]?)([^\s]+?)([.)]?)$/);K=H=u=null;if(E["cke:ignored"]){z.splice(I--,1);continue}E["cke:reset"]&&(M=G=w=null);y=Number(E["cke:indent"]);if(y!=G){L=N=null}if(!O){K=E["cke:listtype"]||"ol";H=E["cke:list-style-type"]}else{if(L&&t[L][N].test(O[1])){K=L;H=N}else{for(var x in t){for(var J in t[x]){if(t[x][J].test(O[1])){if(x=="ol"&&(/alpha|roman/).test(J)){var B=/roman/.test(J)?q(O[1]):n(O[1]);if(!u||B<u){u=B;K=x;H=J}}else{K=x;H=J;break}}}}}!K&&(K=O[2]?"ol":"ul")}L=K;N=H||(K=="ol"?"decimal":"disc");if(H&&H!=(K=="ol"?"decimal":"disc")){D.addStyle("list-style-type",H)}if(K=="ol"&&O){switch(H){case"decimal":u=Number(O[1]);break;case"lower-roman":case"upper-roman":u=q(O[1]);break;case"lower-alpha":case"upper-alpha":u=n(O[1]);break}D.attributes.value=u}if(!M){P.push(M=new CKEDITOR.htmlParser.element(K));M.add(D);z[I]=M}else{if(y>G){P.push(M=new CKEDITOR.htmlParser.element(K));M.add(D);w.add(M)}else{if(y<G){var F=G-y,C;while(F--&&(C=M.parent)){M=C.parent}M.add(D)}else{M.add(D)}}z.splice(I--,1)}w=D;G=y}else{if(M){M=G=w=null}}}for(I=0;I<P.length;I++){d(P[I])}M=G=w=c=h=o=null},falsyFilter:function(u){return false},stylesFilter:function(v,u){return function(z,x){var y=[];(z||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(D,C,G){C=C.toLowerCase();C=="font-family"&&(G=G.replace(/["']/g,""));var F,B,H,A;for(var E=0;E<v.length;E++){if(v[E]){F=v[E][0];B=v[E][1];H=v[E][2];A=v[E][3];if(C.match(F)&&(!B||G.match(B))){C=A||C;u&&(H=H||G);if(typeof H=="function"){H=H(G,x,C)}if(H&&H.push){C=H[0],H=H[1]}if(typeof H=="string"){y.push([C,H])}return}}}!u&&y.push([C,G])});for(var w=0;w<y.length;w++){y[w]=y[w].join(":")}return y.length?(y.join(";")+";"):false}},elementMigrateFilter:function(u,v){return function(w){var x=v?new CKEDITOR.style(u,v)._.definition:u;w.name=x.element;CKEDITOR.tools.extend(w.attributes,CKEDITOR.tools.clone(x.attributes));w.addStyle(CKEDITOR.style.getStyleText(x))}},styleMigrateFilter:function(v,w){var u=this.elementMigrateFilter;return function(z,y){var x=new CKEDITOR.htmlParser.element(null),A={};A[w]=z;u(v,A)(x);x.children=y.children;y.children=[x]}},bogusAttrFilter:function(v,u){if(u.name.indexOf("cke:")==-1){return false}},applyStyleFilter:null},getRules:function(x){var J=CKEDITOR.dtd,v=CKEDITOR.tools.extend({},J.$block,J.$listItem,J.$tableContent),N=x.config,F=this.filters,M=F.falsyFilter,A=F.stylesFilter,B=F.elementMigrateFilter,w=CKEDITOR.tools.bind(this.filters.styleMigrateFilter,this.filters),u=this.utils.createListBulletMarker,z=F.flattenList,H=F.assembleList,E=this.utils.isListBulletIndicator,C=this.utils.isContainingOnlySpaces,D=this.utils.resolveList,G=function(O){O=CKEDITOR.tools.convertToPx(O);return isNaN(O)?O:O+"px"},K=this.utils.getStyleComponents,L=this.utils.listDtdParents,I=N.pasteFromWordRemoveFontStyles!==false,y=N.pasteFromWordRemoveStyles!==false;return{elementNames:[[(/meta|link|script/),""]],root:function(O){O.filterChildren();H(O)},elements:{"^":function(O){var P;if(CKEDITOR.env.gecko&&(P=F.applyStyleFilter)){P(O)}},$:function(R){var Q=R.name||"",P=R.attributes;if(Q in v&&P.style){P.style=A([[(/^(:?width|height)$/),null,G]])(P.style)||""}if(Q.match(/h\d/)){R.filterChildren();if(D(R)){return}B(N["format_"+Q])(R)}else{if(Q in J.$inline){R.filterChildren();if(C(R)){delete R.name}}else{if(Q.indexOf(":")!=-1&&Q.indexOf("cke")==-1){R.filterChildren();if(Q=="v:imagedata"){var O=R.attributes["o:href"];if(O){R.attributes.src=O}R.name="img";return}delete R.name}}}if(Q in L){R.filterChildren();H(R)}},style:function(P){if(CKEDITOR.env.gecko){var O=P.onlyChild().value.match(/\/\* Style Definitions \*\/([\s\S]*?)\/\*/),Q=O&&O[1],R={};if(Q){Q.replace(/[\n\r]/g,"").replace(/(.+?)\{(.+?)\}/g,function(X,V,U){V=V.split(",");var W=V.length,S;for(var T=0;T<W;T++){CKEDITOR.tools.trim(V[T]).replace(/^(\w+)(\.[\w-]+)?$/g,function(Y,Z,aa){Z=Z||"*";aa=aa.substring(1,aa.length);if(aa.match(/MsoNormal/)){return}if(!R[Z]){R[Z]={}}if(aa){R[Z][aa]=U}else{R[Z]=U}})}});F.applyStyleFilter=function(T){var S=R["*"]?"*":T.name,V=T.attributes&&T.attributes["class"],U;if(S in R){U=R[S];if(typeof U=="object"){U=U[V]}U&&T.addStyle(U,true)}}}}return false},p:function(Q){if(/MsoListParagraph/.exec(Q.attributes["class"])){var R=Q.firstChild(function(S){return S.type==CKEDITOR.NODE_TEXT&&!C(S.parent)});var O=R&&R.parent,P=O&&O.attributes;P&&!P.style&&(P.style="mso-list: Ignore;")}Q.filterChildren();if(D(Q)){return}if(N.enterMode==CKEDITOR.ENTER_BR){delete Q.name;Q.add(new CKEDITOR.htmlParser.element("br"))}else{B(N["format_"+(N.enterMode==CKEDITOR.ENTER_P?"p":"div")])(Q)}},div:function(P){var Q=P.onlyChild();if(Q&&Q.name=="table"){var O=P.attributes;Q.attributes=CKEDITOR.tools.extend(Q.attributes,O);O.style&&Q.addStyle(O.style);var R=new CKEDITOR.htmlParser.element("div");R.addStyle("clear","both");P.add(R);delete P.name}},td:function(O){if(O.getAncestor("thead")){O.name="th"}},ol:z,ul:z,dl:z,font:function(P){if(E(P.parent)){delete P.name;return}P.filterChildren();var O=P.attributes,R=O.style,Q=P.parent;if("font"==Q.name){CKEDITOR.tools.extend(Q.attributes,P.attributes);R&&Q.addStyle(R);delete P.name}else{R=R||"";if(O.color){O.color!="#000000"&&(R+="color:"+O.color+";");delete O.color}if(O.face){R+="font-family:"+O.face+";";delete O.face}if(O.size){R+="font-size:"+(O.size>3?"large":(O.size<3?"small":"medium"))+";";delete O.size}P.name="span";P.addStyle(R)}},span:function(R){if(E(R.parent)){return false}R.filterChildren();if(C(R)){delete R.name;return null}if(E(R)){var Q=R.firstChild(function(Y){return Y.value||Y.name=="img"});var U=Q&&(Q.value||"l."),W=U&&U.match(/^(?:[(]?)([^\s]+?)([.)]?)$/);if(W){var S=u(W,U);var T=R.getAncestor("span");if(T&&(/ mso-hide:\s*all|display:\s*none /).test(T.attributes.style)){S.attributes["cke:ignored"]=1}return S}}var P=R.children,X=R.attributes,O=X&&X.style,V=P&&P[0];if(O){X.style=A([["line-height"],[(/^font-family$/),null,!I?w(N.font_style,"family"):null],[(/^font-size$/),null,!I?w(N.fontSize_style,"size"):null],[(/^color$/),null,!I?w(N.colorButton_foreStyle,"color"):null],[(/^background-color$/),null,!I?w(N.colorButton_backStyle,"color"):null]])(O,R)||""}return null},b:B(N.coreStyles_bold),i:B(N.coreStyles_italic),u:B(N.coreStyles_underline),s:B(N.coreStyles_strike),sup:B(N.coreStyles_superscript),sub:B(N.coreStyles_subscript),a:function(P){var O=P.attributes;if(O&&!O.href&&O.name){delete P.name}else{if(CKEDITOR.env.webkit&&O.href&&O.href.match(/file:\/\/\/[\S]+#/i)){O.href=O.href.replace(/file:\/\/\/[^#]+/i,"")}}},"cke:listbullet":function(O){if(O.getAncestor(/h\d/)&&!N.pasteFromWordNumberedHeadingToList){delete O.name}}},attributeNames:[[(/^onmouse(:?out|over)/),""],[(/^onload$/),""],[(/(?:v|o):\w+/),""],[(/^lang/),""]],attributes:{style:A(y?[[(/^list-style-type$/),null],[(/^margin$|^margin-(?!bottom|top)/),null,function(R,Q,P){if(Q.name in {p:1,div:1}){var O=N.contentsLangDirection=="ltr"?"margin-left":"margin-right";if(P=="margin"){R=K(P,R,[O])[O]}else{if(P!=O){return null}}if(R&&!s.test(R)){return[O,R]}}return null}],[(/^clear$/)],[(/^border.*|margin.*|vertical-align|float$/),null,function(P,O){if(O.name=="img"){return P}}],[(/^width|height$/),null,function(P,O){if(O.name in {table:1,td:1,th:1,img:1}){return P}}]]:[[(/^mso-/)],[(/-color$/),null,function(O){if(O=="transparent"){return false}if(CKEDITOR.env.gecko){return O.replace(/-moz-use-text-color/g,"transparent")}}],[(/^margin$/),s],["text-indent","0cm"],["page-break-before"],["tab-stops"],["display","none"],I?[(/font-?/)]:null],y),width:function(P,O){if(O.name in J.$tableContent){return false}},border:function(P,O){if(O.name in J.$tableContent){return false}},"class":M,bgcolor:M,valign:y?M:function(P,O){O.addStyle("vertical-align",P);return false}},comment:!CKEDITOR.env.ie?function(U,O){var V=U.match(/<img.*?>/),P=U.match(/^\[if !supportLists\]([\s\S]*?)\[endif\]$/);if(P){var R=P[1]||(V&&"l."),T=R&&R.match(/>(?:[(]?)([^\s]+?)([.)]?)</);return u(T,R)}if(CKEDITOR.env.gecko&&V){var Q=CKEDITOR.htmlParser.fragment.fromHtml(V[0]).children[0],S=O.previous,W=S&&S.value.match(/<v:imagedata[^>]*o:href=['"](.*?)['"]/),X=W&&W[1];X&&(Q.attributes.src=X);return Q}return false}:M}}});var r=function(){this.dataFilter=new CKEDITOR.htmlParser.filter()};r.prototype={toHtml:function(w){var u=CKEDITOR.htmlParser.fragment.fromHtml(w,false),v=new CKEDITOR.htmlParser.basicWriter();u.writeHtml(v,this.dataFilter);return v.getHtml(true)}};CKEDITOR.cleanWord=function(x,v){if(CKEDITOR.env.gecko){x=x.replace(/(<!--\[if[^<]*?\])-->([\S\s]*?)<!--(\[endif\]-->)/gi,"$1$2$3")}var u=new r(),w=u.dataFilter;w.addRules(CKEDITOR.plugins.pastefromword.getRules(v));v.fire("beforeCleanWord",{filter:w});try{x=u.toHtml(x,false)}catch(y){alert(v.lang.pastefromword.error)}x=x.replace(/cke:.*?".*?"/g,"");x=x.replace(/style=""/g,"");x=x.replace(/<span>/g,"");return x}})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function a(b){b.data.mode="html"}CKEDITOR.plugins.add("pastefromword",{init:function(d){var b=0;var c=function(e){e&&e.removeListener();d.removeListener("beforePaste",a);b&&setTimeout(function(){b=0},0)};d.addCommand("pastefromword",{canUndo:false,exec:function(){b=1;d.on("beforePaste",a);if(d.execCommand("paste","html")===false){d.on("dialogShow",function(e){e.removeListener();e.data.on("cancel",c)});d.on("dialogHide",function(e){e.data.removeListener("cancel",c)})}d.on("afterPaste",c)}});d.ui.addButton("PasteFromWord",{label:d.lang.pastefromword.toolbar,command:"pastefromword"});d.on("pasteState",function(e){d.getCommand("pastefromword").setState(e.data)});d.on("paste",function(e){var g=e.data,h;if((h=g.html)&&(b||(/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/).test(h))){var f=this.loadFilterRules(function(){if(f){d.fire("paste",g)}else{if(!d.config.pasteFromWordPromptCleanup||(b||confirm(d.lang.pastefromword.confirmCleanup))){g.html=CKEDITOR.cleanWord(h,d)}}});f&&e.cancel()}},this)},loadFilterRules:function(d){var b=CKEDITOR.cleanWord;if(b){d()}else{var c=CKEDITOR.getUrl(CKEDITOR.config.pasteFromWordCleanupFile||(this.path+"filter/default.js"));CKEDITOR.scriptLoader.load(c,d,null,true)}return !b},requires:["clipboard"]})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){CKEDITOR.dialog.add("pastetext",function(a){return{title:a.lang.pasteText.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?368:350,minHeight:240,onShow:function(){this.setupContent()},onOk:function(){this.commitContent()},contents:[{label:a.lang.common.generalTab,id:"general",elements:[{type:"html",id:"pasteMsg",html:'<div style="white-space:normal;width:340px;">'+a.lang.clipboard.pasteMsg+"</div>"},{type:"textarea",id:"content",className:"cke_pastetext",onLoad:function(){var c=this.getDialog().getContentElement("general","pasteMsg").getElement(),b=this.getElement().getElementsByTag("textarea").getItem(0);b.setAttribute("aria-labelledby",c.$.id);b.setStyle("direction",a.config.contentsLangDirection)},focus:function(){this.getElement().focus()},setup:function(){this.setValue("")},commit:function(){var b=this.getValue();setTimeout(function(){a.fire("paste",{text:b})},0)}}]}]}})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a={exec:function(c){var b=CKEDITOR.tools.tryThese(function(){var d=window.clipboardData.getData("Text");if(!d){throw 0}return d});if(!b){c.openDialog("pastetext");return false}else{c.fire("paste",{text:b})}return true}};CKEDITOR.plugins.add("pastetext",{init:function(c){var b="pastetext",d=c.addCommand(b,a);c.ui.addButton("PasteText",{label:c.lang.pasteText.button,command:b});CKEDITOR.dialog.add(b,CKEDITOR.getUrl(this.path+"dialogs/pastetext.js"));if(c.config.forcePasteAsPlainText){c.on("beforeCommandExec",function(e){var f=e.data.commandData;if(e.data.name=="paste"&&f!="html"){c.execCommand("pastetext");e.cancel()}},null,null,0);c.on("beforePaste",function(e){e.data.mode="text"})}c.on("pasteState",function(e){c.getCommand("pastetext").setState(e.data)})},requires:["clipboard"]})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("popup");CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(c,f,a,b){f=f||"80%";a=a||"70%";if(typeof f=="string"&&f.length>1&&f.substr(f.length-1,1)=="%"){f=parseInt(window.screen.width*parseInt(f,10)/100,10)}if(typeof a=="string"&&a.length>1&&a.substr(a.length-1,1)=="%"){a=parseInt(window.screen.height*parseInt(a,10)/100,10)}if(f<640){f=640}if(a<420){a=420}var i=parseInt((window.screen.height-a)/2,10),h=parseInt((window.screen.width-f)/2,10);b=(b||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+f+",height="+a+",top="+i+",left="+h;var d=window.open("",null,b,true);if(!d){return false}try{d.moveTo(h,i);d.resizeTo(f,a);d.focus();d.location.href=c}catch(g){d=window.open(c,null,b,true)}return true}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("removeformat",{requires:["selection"],init:function(a){a.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton("RemoveFormat",{label:a.lang.removeFormat,command:"removeFormat"});a._.removeFormat={filters:[]}}});CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(k){var j=k._.removeFormatRegex||(k._.removeFormatRegex=new RegExp("^(?:"+k.config.removeFormatTags.replace(/,/g,"|")+")$","i"));var m=k._.removeAttributes||(k._.removeAttributes=k.config.removeFormatAttributes.split(","));var c=CKEDITOR.plugins.removeformat.filter;var a=k.getSelection().getRanges(1),g=a.createIterator(),h;while((h=g.getNextRange())){if(!h.collapsed){h.enlarge(CKEDITOR.ENLARGE_ELEMENT)}var l=h.createBookmark(),d=l.startNode,i=l.endNode,b;var f=function(q){var r=new CKEDITOR.dom.elementPath(q),n=r.elements;for(var o=1,p;p=n[o];o++){if(p.equals(r.block)||p.equals(r.blockLimit)){break}if(j.test(p.getName())&&c(k,p)){q.breakParent(p)}}};f(d);if(i){f(i);b=d.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT);while(b){if(b.equals(i)){break}var e=b.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT);if(!(b.getName()=="img"&&b.data("cke-realelement"))&&c(k,b)){if(j.test(b.getName())){b.remove(1)}else{b.removeAttributes(m);k.fire("removeFormatCleanup",b)}}b=e}}h.moveToBookmark(l)}k.getSelection().selectRanges(a)}}},filter:function(c,b){var d=c._.removeFormat.filters;for(var a=0;a<d.length;a++){if(d[a](b)===false){return false}}return true}};CKEDITOR.editor.prototype.addRemoveFormatFilter=function(a){this._.removeFormat.filters.push(a)};CKEDITOR.config.removeFormatTags="b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var";CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign";
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("resize",{init:function(e){var c=e.config;var k=e.element.getDirection(1);!c.resize_dir&&(c.resize_dir="both");(c.resize_maxWidth==undefined)&&(c.resize_maxWidth=3000);(c.resize_maxHeight==undefined)&&(c.resize_maxHeight=3000);(c.resize_minWidth==undefined)&&(c.resize_minWidth=750);(c.resize_minHeight==undefined)&&(c.resize_minHeight=250);if(c.resize_enabled!==false){var b=null,h,j,f=(c.resize_dir=="both"||c.resize_dir=="horizontal")&&(c.resize_minWidth!=c.resize_maxWidth),a=(c.resize_dir=="both"||c.resize_dir=="vertical")&&(c.resize_minHeight!=c.resize_maxHeight);function d(n){var o=n.data.$.screenX-h.x,m=n.data.$.screenY-h.y,q=j.width,l=j.height,p=q+o*(k=="rtl"?-1:1),r=l+m;if(f){q=Math.max(c.resize_minWidth,Math.min(p,c.resize_maxWidth))}if(a){l=Math.max(c.resize_minHeight,Math.min(r,c.resize_maxHeight))}e.resize(q,l)}function i(l){CKEDITOR.document.removeListener("mousemove",d);CKEDITOR.document.removeListener("mouseup",i);if(e.document){e.document.removeListener("mousemove",d);e.document.removeListener("mouseup",i)}}var g=CKEDITOR.tools.addFunction(function(l){if(!b){b=e.getResizable()}j={width:b.$.offsetWidth||0,height:b.$.offsetHeight||0};h={x:l.screenX,y:l.screenY};c.resize_minWidth>j.width&&(c.resize_minWidth=j.width);c.resize_minHeight>j.height&&(c.resize_minHeight=j.height);CKEDITOR.document.on("mousemove",d);CKEDITOR.document.on("mouseup",i);if(e.document){e.document.on("mousemove",d);e.document.on("mouseup",i)}});e.on("destroy",function(){CKEDITOR.tools.removeFunction(g)});e.on("themeSpace",function(l){if(l.data.space=="bottom"){var m="";if(f&&!a){m=" cke_resizer_horizontal"}if(!f&&a){m=" cke_resizer_vertical"}var n='<div class="cke_resizer'+m+" cke_resizer_"+k+'" title="'+CKEDITOR.tools.htmlEncode(e.lang.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+g+', event)"></div>';k=="ltr"&&m=="ltr"?l.data.html+=n:l.data.html=n+l.data.html}},e,null,100)}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("richcombo",{requires:["floatpanel","listblock","button"],beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}});CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{title:a.label,modes:{wysiwyg:1}});var b=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=(b&&b.parent&&b.parent.getDocument())||CKEDITOR.document;b.className=(b.className||"")+" cke_rcombopanel";b.block={multiSelect:b.multiSelect,attributes:b.attributes};this._={panelDefinition:b,items:{},state:CKEDITOR.TRISTATE_OFF}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}},proto:{renderHtml:function(b){var a=[];this.render(b,a);return a.join("")},render:function(e,d){var f=CKEDITOR.env;var c="cke_"+this.id;var a=CKEDITOR.tools.addFunction(function(j){var k=this._;if(k.state==CKEDITOR.TRISTATE_DISABLED){return}this.createPanel(e);if(k.on){k.panel.hide();return}this.commit();var l=this.getValue();if(l){k.list.mark(l)}else{k.list.unmarkAll()}k.panel.showBlock(this.id,new CKEDITOR.dom.element(j),4)},this);var h={id:c,combo:this,focus:function(){var j=CKEDITOR.document.getById(c).getChild(1);j.focus()},clickFn:a};function i(){var j=this.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;this.setState(e.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:j);this.setValue("")}e.on("mode",i,this);!this.readOnly&&e.on("readOnly",i,this);var g=CKEDITOR.tools.addFunction(function(k,j){k=new CKEDITOR.dom.event(k);var l=k.getKeystroke();switch(l){case 13:case 32:case 40:CKEDITOR.tools.callFunction(a,j);break;default:h.onkey(h,l)}k.preventDefault()});var b=CKEDITOR.tools.addFunction(function(){h.onfocus&&h.onfocus()});h.keyDownFn=g;d.push('<span class="cke_rcombo" role="presentation">',"<span id=",c);if(this.className){d.push(' class="',this.className,' cke_off"')}d.push(' role="presentation">','<span id="'+c+'_label" class=cke_label>',this.label,"</span>",'<a hidefocus=true title="',this.title,'" tabindex="-1"',f.gecko&&f.version>=10900&&!f.hc?"":" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',c,'_label" aria-describedby="',c,'_text" aria-haspopup="true"');if(CKEDITOR.env.opera||(CKEDITOR.env.gecko&&CKEDITOR.env.mac)){d.push(' onkeypress="return false;"')}if(CKEDITOR.env.gecko){d.push(' onblur="this.style.cssText = this.style.cssText;"')}d.push(' onkeydown="CKEDITOR.tools.callFunction( ',g,', event, this );" onfocus="return CKEDITOR.tools.callFunction(',b,', event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction(',a,', this); return false;"><span><span id="'+c+'_text" class="cke_text cke_inline_label">'+this.label+"</span></span><span class=cke_openbutton><span class=cke_icon>"+(CKEDITOR.env.hc?"▼":CKEDITOR.env.air?" ":"")+"</span></span></a></span></span>");if(this.onRender){this.onRender()}return h},createPanel:function(b){if(this._.panel){return}var g=this._.panelDefinition,f=this._.panelDefinition.block,e=g.parent||CKEDITOR.document.getBody(),a=new CKEDITOR.ui.floatPanel(b,e,g),d=a.addListBlock(this.id,f),c=this;a.onShow=function(){if(c.className){this.element.getFirst().addClass(c.className+"_panel")}c.setState(CKEDITOR.TRISTATE_ON);d.focus(!c.multiSelect&&c.getValue());c._.on=1;if(c.onOpen){c.onOpen()}};a.onHide=function(h){if(c.className){this.element.getFirst().removeClass(c.className+"_panel")}c.setState(c.modes&&c.modes[b.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);c._.on=0;if(!h&&c.onClose){c.onClose()}};a.onEscape=function(){a.hide()};d.onClick=function(i,h){c.document.getWindow().focus();if(c.onClick){c.onClick.call(c,i,h)}if(h){c.setValue(i,c._.items[i])}else{c.setValue("")}a.hide(false)};this._.panel=a;this._.list=d;a.getBlock(this.id).onHide=function(){c._.on=0;c.setState(CKEDITOR.TRISTATE_OFF)};if(this.init){this.init()}},setValue:function(b,c){this._.value=b;var a=this.document.getById("cke_"+this.id+"_text");if(a){if(!(b||c)){c=this.label;a.addClass("cke_inline_label")}else{a.removeClass("cke_inline_label")}a.setHtml(typeof c!="undefined"?c:b)}},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(b,a,c){this._.items[b]=c||b;this._.list.add(b,a,c)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){if(!this._.committed){this._.list.commit();this._.committed=1;CKEDITOR.ui.fire("ready",this)}this._.committed=1},setState:function(a){if(this._.state==a){return}this.document.getById("cke_"+this.id).setState(a);this._.state=a}}});CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,CKEDITOR.UI_RICHCOMBO,b)};
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){function g(){try{var o=this.getSelection();if(!o||!o.document.getWindow().$){return}var m=o.getStartElement();var n=new CKEDITOR.dom.elementPath(m);if(!n.compare(this._.selectionPreviousPath)){this._.selectionPreviousPath=n;this.fire("selectionChange",{selection:o,path:n,element:m})}}catch(p){}}var c,d;function k(){d=true;if(c){return}e.call(this);c=CKEDITOR.tools.setTimeout(e,200,this)}function e(){c=null;if(d){CKEDITOR.tools.setTimeout(g,0,this);d=false}}function f(m){function p(r){return r&&r.type==CKEDITOR.NODE_ELEMENT&&r.getName() in CKEDITOR.dtd.$removeEmpty}function n(s){var r=m.document.getBody();return !s.is("body")&&r.getChildCount()==1}var q=m.startContainer,o=m.startOffset;if(q.type==CKEDITOR.NODE_TEXT){return false}return !CKEDITOR.tools.trim(q.getHtml())?p(q)||n(q):p(q.getChild(o-1))||p(q.getChild(o))}var b={modes:{wysiwyg:1,source:1},readOnly:CKEDITOR.env.ie||CKEDITOR.env.webkit,exec:function(n){switch(n.mode){case"wysiwyg":n.document.$.execCommand("SelectAll",false,null);n.forceNextSelectionCheck();n.selectionChange();break;case"source":var m=n.textarea.$;if(CKEDITOR.env.ie){m.createTextRange().execCommand("SelectAll")}else{m.selectionStart=0;m.selectionEnd=m.value.length}m.focus()}},canUndo:false};function l(n){i(n);var m=n.createText("\u200B");n.setCustomData("cke-fillingChar",m);return m}function a(m){return m&&m.getCustomData("cke-fillingChar")}function j(n){var m=n&&a(n);if(m){if(m.getCustomData("ready")){i(n)}else{m.setCustomData("ready",1)}}}function i(n){var m=n&&n.removeCustomData("cke-fillingChar");if(m){m.setText(m.getText().replace(/\u200B/g,""));m=0}}CKEDITOR.plugins.add("selection",{init:function(o){if(CKEDITOR.env.webkit){o.on("selectionChange",function(){j(o.document)});o.on("beforeSetMode",function(){i(o.document)});o.on("key",function(r){switch(r.data.keyCode){case 13:case CKEDITOR.SHIFT+13:case 37:case 39:case 8:i(o.document)}},null,null,10);var m,p;function n(){var t=o.document,s=a(t);if(s){var r=t.$.defaultView.getSelection();if(r.type=="Caret"&&r.anchorNode==s.$){p=1}m=s.getText();s.setText(m.replace(/\u200B/g,""))}}function q(){var s=o.document,r=a(s);if(r){r.setText(m);if(p){s.$.defaultView.getSelection().setPosition(r.$,r.getLength());p=0}}}o.on("beforeUndoImage",n);o.on("afterUndoImage",q);o.on("beforeGetData",n,null,null,0);o.on("getData",q)}o.on("contentDom",function(){var y=o.document,u=y.getBody(),t=y.getDocumentElement();if(CKEDITOR.env.ie){var v,z,s=1;u.on("focusin",function(B){if(B.data.$.srcElement.nodeName!="BODY"){return}if(v){if(s){try{v.select()}catch(C){}var A=y.getCustomData("cke_locked_selection");if(A){A.unlock();A.lock()}}v=null}});u.on("focus",function(){z=1;r()});u.on("beforedeactivate",function(A){if(A.data.$.toElement){return}z=0;s=1});if(CKEDITOR.env.ie&&CKEDITOR.env.version<8){o.on("blur",function(A){try{o.document&&o.document.$.selection.empty()}catch(B){}})}t.on("mousedown",function(){s=0});t.on("mouseup",function(){s=1});if(CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.version<8||CKEDITOR.env.quirks)){t.on("click",function(A){if(A.data.getTarget().getName()=="html"){o.getSelection().getRanges()[0].select()}})}var x;u.on("mousedown",function(A){if(A.data.$.button==2){var B=o.document.$.selection;if(B.type=="None"){x=o.window.getScrollPosition()}}w()});u.on("mouseup",function(A){if(A.data.$.button==2&&x){o.document.$.documentElement.scrollLeft=x.x;o.document.$.documentElement.scrollTop=x.y}x=null;z=1;setTimeout(function(){r(true)},0)});u.on("keydown",w);u.on("keyup",function(){z=1;r()});y.on("selectionchange",r);function w(){z=0}function r(D){if(z){var C=o.document,B=o.getSelection(),A=B&&B.getNative();if(D&&A&&A.type=="None"){if(!C.$.queryCommandEnabled("InsertImage")){CKEDITOR.tools.setTimeout(r,50,this,true);return}}var E;if(A&&A.type&&A.type!="Control"&&(E=A.createRange())&&(E=E.parentElement())&&(E=E.nodeName)&&E.toLowerCase() in {input:1,textarea:1}){return}v=A&&B.getRanges()[0];k.call(o)}}}else{y.on("mouseup",k,o);y.on("keyup",k,o);y.on("selectionchange",k,o)}});o.on("contentDomUnload",o.forceNextSelectionCheck,o);o.addCommand("selectAll",b);o.ui.addButton("SelectAll",{label:o.lang.selectAll,command:"selectAll"});o.selectionChange=k;CKEDITOR.env.ie9Compat&&o.on("destroy",function(){var r=o.getSelection();r&&r.getNative().clear()},null,null,9)}});CKEDITOR.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection()};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){var m=new CKEDITOR.dom.selection(this);return(!m||m.isInvalid)?null:m};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(n){var m=n.getCustomData("cke_locked_selection");if(m){return m}this.document=n;this.isLocked=0;this._={cache:{}};if(CKEDITOR.env.ie){var o=this.getNative().createRange();if(!o||(o.item&&o.item(0).ownerDocument!=this.document.$)||(o.parentElement&&o.parentElement().ownerDocument!=this.document.$)){this.isInvalid=true}}return this};var h={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.dom.selection.prototype={getNative:CKEDITOR.env.ie?function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.$.selection)}:function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.getWindow().$.getSelection())},getType:CKEDITOR.env.ie?function(){var m=this._.cache;if(m.type){return m.type}var n=CKEDITOR.SELECTION_NONE;try{var o=this.getNative(),q=o.type;if(q=="Text"){n=CKEDITOR.SELECTION_TEXT}if(q=="Control"){n=CKEDITOR.SELECTION_ELEMENT}if(o.createRange().parentElement){n=CKEDITOR.SELECTION_TEXT}}catch(p){}return(m.type=n)}:function(){var n=this._.cache;if(n.type){return n.type}var o=CKEDITOR.SELECTION_TEXT;var q=this.getNative();if(!q){o=CKEDITOR.SELECTION_NONE}else{if(q.rangeCount==1){var m=q.getRangeAt(0),p=m.startContainer;if(p==m.endContainer&&p.nodeType==1&&(m.endOffset-m.startOffset)==1&&h[p.childNodes[m.startOffset].nodeName.toLowerCase()]){o=CKEDITOR.SELECTION_ELEMENT}}}return(n.type=o)},getRanges:(function(){var m=CKEDITOR.env.ie?(function(){function n(p){return new CKEDITOR.dom.node(p).getIndex()}var o=function(y,q){y=y.duplicate();y.collapse(q);var D=y.parentElement(),C=D.ownerDocument;if(!D.hasChildNodes()){return{container:D,offset:0}}var B=D.children,r,F,s=y.duplicate(),E=0,x=B.length-1,z=-1,w,p;while(E<=x){z=Math.floor((E+x)/2);r=B[z];s.moveToElementText(r);w=s.compareEndPoints("StartToStart",y);if(w>0){x=z-1}else{if(w<0){E=z+1}else{if(CKEDITOR.env.ie9Compat&&r.tagName=="BR"){var u="cke_range_marker";y.execCommand("CreateBookmark",false,u);r=C.getElementsByName(u)[0];var t=n(r);D.removeChild(r);return{container:D,offset:t}}else{return{container:D,offset:n(r)}}}}}if(z==-1||z==B.length-1&&w<0){s.moveToElementText(D);s.setEndPoint("StartToStart",y);p=s.text.replace(/(\r\n|\r)/g,"\n").length;B=D.childNodes;if(!p){r=B[B.length-1];if(r.nodeType==CKEDITOR.NODE_ELEMENT){return{container:D,offset:B.length}}else{return{container:r,offset:r.nodeValue.length}}}var v=B.length;while(p>0){p-=B[--v].nodeValue.length}return{container:B[v],offset:-p}}else{s.collapse(w>0?true:false);s.setEndPoint(w>0?"StartToStart":"EndToStart",y);p=s.text.replace(/(\r\n|\r)/g,"\n").length;if(!p){return{container:D,offset:n(r)+(w>0?0:1)}}while(p>0){try{F=r[w>0?"previousSibling":"nextSibling"];p-=F.nodeValue.length;r=F}catch(A){return{container:D,offset:n(r)}}}return{container:r,offset:w>0?-p:r.nodeValue.length+p}}};return function(){var r=this.getNative(),w=r&&r.createRange(),x=this.getType(),v;if(!r){return[]}if(x==CKEDITOR.SELECTION_TEXT){v=new CKEDITOR.dom.range(this.document);var p=o(w,true);v.setStart(new CKEDITOR.dom.node(p.container),p.offset);p=o(w);v.setEnd(new CKEDITOR.dom.node(p.container),p.offset);if(v.endContainer.getPosition(v.startContainer)&CKEDITOR.POSITION_PRECEDING&&v.endOffset<=v.startContainer.getIndex()){v.collapse()}return[v]}else{if(x==CKEDITOR.SELECTION_ELEMENT){var q=[];for(var t=0;t<w.length;t++){var u=w.item(t),y=u.parentNode,s=0;v=new CKEDITOR.dom.range(this.document);for(;s<y.childNodes.length&&y.childNodes[s]!=u;s++){}v.setStart(new CKEDITOR.dom.node(y),s);v.setEnd(new CKEDITOR.dom.node(y),s+1);q.push(v)}return q}}return[]}})():function(){var n=[],o,s=this.document,r=this.getNative();if(!r){return n}if(!r.rangeCount){o=new CKEDITOR.dom.range(s);o.moveToElementEditStart(s.getBody());n.push(o)}for(var p=0;p<r.rangeCount;p++){var q=r.getRangeAt(p);o=new CKEDITOR.dom.range(s);o.setStart(new CKEDITOR.dom.node(q.startContainer),q.startOffset);o.setEnd(new CKEDITOR.dom.node(q.endContainer),q.endOffset);n.push(o)}return n};return function(y){var o=this._.cache;if(o.ranges&&!y){return o.ranges}else{if(!o.ranges){o.ranges=new CKEDITOR.dom.rangeList(m.call(this))}}if(y){var p=o.ranges;for(var s=0;s<p.length;s++){var t=p[s];var x=t.getCommonAncestor();if(x.isReadOnly()){p.splice(s,1)}if(t.collapsed){continue}if(t.startContainer.isReadOnly()){var u=t.startContainer;while(u){if(u.is("body")||!u.isReadOnly()){break}if(u.type==CKEDITOR.NODE_ELEMENT&&u.getAttribute("contentEditable")=="false"){t.setStartAfter(u)}u=u.getParent()}}var r=t.startContainer,z=t.endContainer,v=t.startOffset,w=t.endOffset,q=t.clone();if(r&&r.type==CKEDITOR.NODE_TEXT){if(v>=r.getLength()){q.setStartAfter(r)}else{q.setStartBefore(r)}}if(z&&z.type==CKEDITOR.NODE_TEXT){if(!w){q.setEndBefore(z)}else{q.setEndAfter(z)}}var n=new CKEDITOR.dom.walker(q);n.evaluator=function(B){if(B.type==CKEDITOR.NODE_ELEMENT&&B.isReadOnly()){var A=t.clone();t.setEndBefore(B);if(t.collapsed){p.splice(s--,1)}if(!(B.getPosition(q.endContainer)&CKEDITOR.POSITION_CONTAINS)){A.setStartAfter(B);if(!A.collapsed){p.splice(s+1,0,A)}}return true}return false};n.next()}}return o.ranges}})(),getStartElement:function(){var o=this._.cache;if(o.startElement!==undefined){return o.startElement}var q,r=this.getNative();switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var n=this.getRanges()[0];if(n){if(!n.collapsed){n.optimize();while(1){var p=n.startContainer,m=n.startOffset;if(m==(p.getChildCount?p.getChildCount():p.getLength())&&!p.isBlockBoundary()){n.setStartAfter(p)}else{break}}q=n.startContainer;if(q.type!=CKEDITOR.NODE_ELEMENT){return q.getParent()}q=q.getChild(n.startOffset);if(!q||q.type!=CKEDITOR.NODE_ELEMENT){q=n.startContainer}else{var s=q.getFirst();while(s&&s.type==CKEDITOR.NODE_ELEMENT){q=s;s=s.getFirst()}}}else{q=n.startContainer;if(q.type!=CKEDITOR.NODE_ELEMENT){q=q.getParent()}}q=q.$}}return o.startElement=(q?new CKEDITOR.dom.element(q):null)},getSelectedElement:function(){var n=this._.cache;if(n.selectedElement!==undefined){return n.selectedElement}var m=this;var o=CKEDITOR.tools.tryThese(function(){return m.getNative().createRange().item(0)},function(){var x,q,u=m.getRanges()[0],s=u.getCommonAncestor(1,1),z={table:1,ul:1,ol:1,dl:1};for(var y in z){if(x=s.getAscendant(y,1)){break}}if(x){var r=new CKEDITOR.dom.range(this.document);r.setStartAt(x,CKEDITOR.POSITION_AFTER_START);r.setEnd(u.startContainer,u.startOffset);var v=CKEDITOR.tools.extend(z,CKEDITOR.dtd.$listItem,CKEDITOR.dtd.$tableContent),p=new CKEDITOR.dom.walker(r),w=function(A,t){return function(C,D){if(C.type==CKEDITOR.NODE_TEXT&&(!CKEDITOR.tools.trim(C.getText())||C.getParent().data("cke-bookmark"))){return true}var B;if(C.type==CKEDITOR.NODE_ELEMENT){B=C.getName();if(B=="br"&&t&&C.equals(C.getParent().getBogus())){return true}if(D&&B in v||B in CKEDITOR.dtd.$removeEmpty){return true}}A.halted=1;return false}};p.guard=w(p);if(p.checkBackward()&&!p.halted){p=new CKEDITOR.dom.walker(r);r.setStart(u.endContainer,u.endOffset);r.setEndAt(x,CKEDITOR.POSITION_BEFORE_END);p.guard=w(p,1);if(p.checkForward()&&!p.halted){q=x.$}}}if(!q){throw 0}return q},function(){var p=m.getRanges()[0],s,r;for(var q=2;q&&!((s=p.getEnclosedNode())&&(s.type==CKEDITOR.NODE_ELEMENT)&&h[s.getName()]&&(r=s));q--){p.shrink(CKEDITOR.SHRINK_ELEMENT)}return r.$});return n.selectedElement=(o?new CKEDITOR.dom.element(o):null)},getSelectedText:function(){var m=this._.cache;if(m.selectedText!==undefined){return m.selectedText}var o="",n=this.getNative();if(this.getType()==CKEDITOR.SELECTION_TEXT){o=CKEDITOR.env.ie?n.createRange().text:n.toString()}return(m.selectedText=o)},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel={};this.isLocked=1;this.document.setCustomData("cke_locked_selection",this)},unlock:function(o){var p=this.document,m=p.getCustomData("cke_locked_selection");if(m){p.setCustomData("cke_locked_selection",null);if(o){var q=m.getSelectedElement(),n=!q&&m.getRanges();this.isLocked=0;this.reset();p.getBody().focus();if(q){this.selectElement(q)}else{this.selectRanges(n)}}}if(!m||!o){this.isLocked=0;this.reset()}},reset:function(){this._.cache={}},selectElement:function(n){if(this.isLocked){var m=new CKEDITOR.dom.range(this.document);m.setStartBefore(n);m.setEndAfter(n);this._.cache.selectedElement=n;this._.cache.startElement=n;this._.cache.ranges=new CKEDITOR.dom.rangeList(m);this._.cache.type=CKEDITOR.SELECTION_ELEMENT;return}m=new CKEDITOR.dom.range(n.getDocument());m.setStartBefore(n);m.setEndAfter(n);m.select();this.document.fire("selectionchange");this.reset()},selectRanges:function(m){if(this.isLocked){this._.cache.selectedElement=null;this._.cache.startElement=m[0]&&m[0].getTouchedStartNode();this._.cache.ranges=new CKEDITOR.dom.rangeList(m);this._.cache.type=CKEDITOR.SELECTION_TEXT;return}if(CKEDITOR.env.ie){if(m.length>1){var w=m[m.length-1];m[0].setEnd(w.endContainer,w.endOffset);m.length=1}if(m[0]){m[0].select()}this.reset()}else{var n=this.getNative();if(!n){return}if(m.length){n.removeAllRanges();CKEDITOR.env.webkit&&i(this.document)}for(var q=0;q<m.length;q++){if(q<m.length-1){var p=m[q],x=m[q+1],z=p.clone();z.setStart(p.endContainer,p.endOffset);z.setEnd(x.startContainer,x.startOffset);if(!z.collapsed){z.shrink(CKEDITOR.NODE_ELEMENT,true);var t=z.getCommonAncestor(),A=z.getEnclosedNode();if(t.isReadOnly()||A&&A.isReadOnly()){x.setStart(p.startContainer,p.startOffset);m.splice(q--,1);continue}}}var s=m[q];var u=this.document.$.createRange();var o=s.startContainer;if(s.collapsed&&(CKEDITOR.env.opera||(CKEDITOR.env.gecko&&CKEDITOR.env.version<10900))&&o.type==CKEDITOR.NODE_ELEMENT&&!o.getChildCount()){o.appendText("")}if(s.collapsed&&CKEDITOR.env.webkit&&f(s)){var y=l(this.document);s.insertNode(y);var r=y.getNext();if(r&&!y.getPrevious()&&r.type==CKEDITOR.NODE_ELEMENT&&r.getName()=="br"){i(this.document);s.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START)}else{s.moveToPosition(y,CKEDITOR.POSITION_AFTER_END)}}u.setStart(s.startContainer.$,s.startOffset);try{u.setEnd(s.endContainer.$,s.endOffset)}catch(v){if(v.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=0){s.collapse(1);u.setEnd(s.endContainer.$,s.endOffset)}else{throw v}}n.addRange(u)}this.document.fire("selectionchange");this.reset()}},createBookmarks:function(m){return this.getRanges().createBookmarks(m)},createBookmarks2:function(m){return this.getRanges().createBookmarks2(m)},selectBookmarks:function(p){var m=[];for(var o=0;o<p.length;o++){var n=new CKEDITOR.dom.range(this.document);n.moveToBookmark(p[o]);m.push(n)}this.selectRanges(m);return this},getCommonAncestor:function(){var n=this.getRanges(),o=n[0].startContainer,m=n[n.length-1].endContainer;return o.getCommonAncestor(m)},scrollIntoView:function(){var m=this.getStartElement();m.scrollIntoView()}}})();(function(){var a=CKEDITOR.dom.walker.whitespaces(true),b=/\ufeff|\u00a0/,c={table:1,tbody:1,tr:1};CKEDITOR.dom.range.prototype.select=CKEDITOR.env.ie?function(f){var g=this.collapsed,n,k,d;var h=this.getEnclosedNode();if(h){try{d=this.document.$.body.createControlRange();d.addElement(h.$);d.select();return}catch(o){}}if(this.startContainer.type==CKEDITOR.NODE_ELEMENT&&this.startContainer.getName() in c||this.endContainer.type==CKEDITOR.NODE_ELEMENT&&this.endContainer.getName() in c){this.shrink(CKEDITOR.NODE_ELEMENT,true)}var m=this.createBookmark();var e=m.startNode;var j;if(!g){j=m.endNode}d=this.document.$.body.createTextRange();d.moveToElementText(e.$);d.moveStart("character",1);if(j){var l=this.document.$.body.createTextRange();l.moveToElementText(j.$);d.setEndPoint("EndToEnd",l);d.moveEnd("character",-1)}else{var i=e.getNext(a);n=(!(i&&i.getText&&i.getText().match(b))&&(f||!e.hasPrevious()||(e.getPrevious().is&&e.getPrevious().is("br"))));k=this.document.createElement("span");k.setHtml("");k.insertBefore(e);if(n){this.document.createText("\ufeff").insertBefore(e)}}this.setStartBefore(e);e.remove();if(g){if(n){d.moveStart("character",-1);d.select();this.document.$.selection.clear()}else{d.select()}this.moveToPosition(k,CKEDITOR.POSITION_BEFORE_START);k.remove()}else{this.setEndBefore(j);j.remove();d.select()}this.document.fire("selectionchange")}:function(){this.document.getSelection().selectRanges([this])}})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var a="cke_show_border",b,d=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:[".%1 table.%2,",".%1 table.%2 > tr > td, .%1 table.%2 > tr > th,",".%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,",".%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,",".%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th","{","border : #d3d3d3 1px dotted","}"]).join("");b=d.replace(/%2/g,a).replace(/%1/g,"cke_show_borders ");var c={preserveState:true,editorFocus:false,readOnly:1,exec:function(e){this.toggleState();this.refresh(e)},refresh:function(e){if(e.document){var f=(this.state==CKEDITOR.TRISTATE_ON)?"addClass":"removeClass";e.document.getBody()[f]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{requires:["wysiwygarea"],modes:{wysiwyg:1},init:function(e){var f=e.addCommand("showborders",c);f.canUndo=false;if(e.config.startupShowBorders!==false){f.setState(CKEDITOR.TRISTATE_ON)}e.addCss(b);e.on("mode",function(){if(f.state!=CKEDITOR.TRISTATE_DISABLED){f.refresh(e)}},null,null,100);e.on("contentDom",function(){if(f.state!=CKEDITOR.TRISTATE_DISABLED){f.refresh(e)}});e.on("removeFormatCleanup",function(g){var h=g.data;if(e.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&h.is("table")&&(!h.hasAttribute("border")||parseInt(h.getAttribute("border"),10)<=0)){h.addClass(a)}})},afterInit:function(f){var e=f.dataProcessor,g=e&&e.dataFilter,h=e&&e.htmlFilter;if(g){g.addRules({elements:{table:function(l){var j=l.attributes,i=j["class"],k=parseInt(j.border,10);if((!k||k<=0)&&(!i||i.indexOf(a)==-1)){j["class"]=(i||"")+" "+a}}}})}if(h){h.addRules({elements:{table:function(k){var j=k.attributes,i=j["class"];i&&(j["class"]=i.replace(a,"").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}}});CKEDITOR.on("dialogDefinition",function(h){var i=h.data.name;if(i=="table"||i=="tableProperties"){var l=h.data.definition,g=l.getContents("info"),f=g.get("txtBorder"),e=f.commit;f.commit=CKEDITOR.tools.override(e,function(m){return function(p,n){m.apply(this,arguments);var o=parseInt(this.getValue(),10);n[(!o||o<=0)?"addClass":"removeClass"](a)}});var k=l.getContents("advanced"),j=k&&k.get("advCSSClasses");if(j){j.setup=CKEDITOR.tools.override(j.setup,function(m){return function(){m.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}});j.commit=CKEDITOR.tools.override(j.commit,function(m){return function(o,n){m.apply(this,arguments);if(!parseInt(n.getAttribute("border"),10)){n.addClass("cke_show_border")}}})}}})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("sourcearea",{requires:["editingblock"],init:function(a){var c=CKEDITOR.plugins.sourcearea,b=CKEDITOR.document.getWindow();a.on("editingBlockReady",function(){var d,e;a.addMode("source",{load:function(g,i){if(CKEDITOR.env.ie&&CKEDITOR.env.version<8){g.setStyle("position","relative")}a.textarea=d=new CKEDITOR.dom.element("textarea");d.setAttributes({dir:"ltr",tabIndex:CKEDITOR.env.webkit?-1:a.tabIndex,role:"textbox","aria-label":a.lang.editorTitle.replace("%1",a.name)});d.addClass("cke_source");d.addClass("cke_enable_context_menu");a.readOnly&&d.setAttribute("readOnly","readonly");var h={width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"};if(CKEDITOR.env.ie){e=function(){d.hide();d.setStyle("height",g.$.clientHeight+"px");d.setStyle("width",g.$.clientWidth+"px");d.show()};a.on("resize",e);b.on("resize",e);setTimeout(e,0)}g.setHtml("");g.append(d);d.setStyles(h);a.fire("ariaWidget",d);d.on("blur",function(){a.focusManager.blur()});d.on("focus",function(){a.focusManager.focus()});a.mayBeDirty=true;this.loadData(i);var f=a.keystrokeHandler;if(f){f.attach(d)}setTimeout(function(){a.mode="source";a.fire("mode",{previousMode:a._.previousMode})},(CKEDITOR.env.gecko||CKEDITOR.env.webkit)?100:0)},loadData:function(f){d.setValue(f);a.fire("dataReady")},getData:function(){return d.getValue()},getSnapshotData:function(){return d.getValue()},unload:function(f){d.clearCustomData();a.textarea=d=null;if(e){a.removeListener("resize",e);b.removeListener("resize",e)}if(CKEDITOR.env.ie&&CKEDITOR.env.version<8){f.removeStyle("position")}},focus:function(){d.focus()}})});a.on("readOnly",function(){if(a.mode=="source"){if(a.readOnly){a.textarea.setAttribute("readOnly","readonly")}else{a.textarea.removeAttribute("readOnly")}}});a.addCommand("source",c.commands.source);if(a.ui.addButton){a.ui.addButton("Source",{label:a.lang.source,command:"source"})}a.on("mode",function(){a.getCommand("source").setState(a.mode=="source"?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)})}});CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:false,readOnly:1,exec:function(a){if(a.mode=="wysiwyg"){a.fire("saveSnapshot")}a.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);a.setMode(a.mode=="source"?"wysiwyg":"source")},canUndo:false}}};
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("styles",{requires:["selection"],init:function(a){a.on("contentDom",function(){a.document.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling)})}});CKEDITOR.editor.prototype.attachStyleStateChange=function(a,c){var b=this._.styleStateChangeCallbacks;if(!b){b=this._.styleStateChangeCallbacks=[];this.on("selectionChange",function(f){for(var d=0;d<b.length;d++){var g=b[d];var e=g.style.checkActive(f.data.path)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;g.fn.call(this,e)}})}b.push({style:a,fn:c})};CKEDITOR.STYLE_BLOCK=1;CKEDITOR.STYLE_INLINE=2;CKEDITOR.STYLE_OBJECT=3;(function(){var i={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},x={a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1};var F=/\s*(?:;\s*|$)/,c=/#\((.+?)\)/g;var f=CKEDITOR.dom.walker.bookmark(0,1),t=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(J,I){if(I){J=CKEDITOR.tools.clone(J);k(J.attributes,I);k(J.styles,I)}var H=this.element=J.element?(typeof J.element=="string"?J.element.toLowerCase():J.element):"*";this.type=i[H]?CKEDITOR.STYLE_BLOCK:x[H]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE;if(typeof this.element=="object"){this.type=CKEDITOR.STYLE_OBJECT}this._={definition:J}};CKEDITOR.style.prototype={apply:function(H){D.call(this,H,false)},remove:function(H){D.call(this,H,true)},applyToRange:function(H){return(this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?n:this.type==CKEDITOR.STYLE_BLOCK?u:this.type==CKEDITOR.STYLE_OBJECT?d:null).call(this,H)},removeFromRange:function(H){return(this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?y:this.type==CKEDITOR.STYLE_BLOCK?s:this.type==CKEDITOR.STYLE_OBJECT?r:null).call(this,H)},applyToObject:function(H){G(H,this)},checkActive:function(K){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(K.block||K.blockLimit,true);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:var L=K.elements;for(var J=0,I;J<L.length;J++){I=L[J];if(this.type==CKEDITOR.STYLE_INLINE&&(I==K.block||I==K.blockLimit)){continue}if(this.type==CKEDITOR.STYLE_OBJECT){var H=I.getName();if(!(typeof this.element=="string"?H==this.element:H in this.element)){continue}}if(this.checkElementRemovable(I,true)){return true}}}return false},checkApplicable:function(H){switch(this.type){case CKEDITOR.STYLE_INLINE:case CKEDITOR.STYLE_BLOCK:break;case CKEDITOR.STYLE_OBJECT:return H.lastElement.getAscendant(this.element,true)}return true},checkElementRemovable:function(N,K){var L=this._.definition;if(!N||!L.ignoreReadonly&&N.isReadOnly()){return false}var H,I=N.getName();if(typeof this.element=="string"?I==this.element:I in this.element){if(!K&&!N.hasAttributes()){return true}H=m(L);if(H._length){for(var O in H){if(O=="_length"){continue}var P=N.getAttribute(O)||"";if(O=="style"?v(H[O],l(P,false)):H[O]==P){if(!K){return true}}else{if(K){return false}}}if(K){return true}}else{return true}}var J=z(this)[N.getName()];if(J){if(!(H=J.attributes)){return true}for(var M=0;M<H.length;M++){O=H[M][0];var Q=N.getAttribute(O);if(Q){var R=H[M][1];if(R===null||(typeof R=="string"&&Q==R)||R.test(Q)){return true}}}}return false},buildPreview:function(J){var L=this._.definition,K=[],H=L.element;if(H=="bdo"){H="span"}K=["<",H];var M=L.attributes;if(M){for(var I in M){K.push(" ",I,'="',M[I],'"')}}var N=CKEDITOR.style.getStyleText(L);if(N){K.push(' style="',N,'"')}K.push(">",(J||L.name),"</",H,">");return K.join("")}};CKEDITOR.style.getStyleText=function(K){var I=K._ST;if(I){return I}I=K.styles;var H=(K.attributes&&K.attributes.style)||"",L="";if(H.length){H=H.replace(F,";")}for(var J in I){var N=I[J],M=(J+":"+N).replace(F,";");if(N=="inherit"){L+=M}else{H+=M}}if(H.length){H=l(H)}H+=L;return(K._ST=H)};function j(J){var H,I;while((J=J.getParent())){if(J.getName()=="body"){break}if(J.getAttribute("data-nostyle")){H=J}else{if(!I){var K=J.getAttribute("contentEditable");if(K=="false"){H=J}else{if(K=="true"){I=1}}}}}return H}function n(Z){var aa=Z.document;if(Z.collapsed){var I=o(this,aa);Z.insertNode(I);Z.moveToPosition(I,CKEDITOR.POSITION_BEFORE_END);return}var V=this.element;var X=this._.definition;var ad;var T=X.ignoreReadonly,Q=T||X.includeReadonly;if(Q==undefined){Q=aa.getCustomData("cke_includeReadonly")}var ac=CKEDITOR.dtd[V]||(ad=true,CKEDITOR.dtd.span);Z.enlarge(CKEDITOR.ENLARGE_ELEMENT,1);Z.trim();var ah=Z.createBookmark(),ae=ah.startNode,N=ah.endNode;var J=ae;var W;if(!T){var M=j(ae),af=j(N);if(M){J=M.getNextSourceNode(true)}if(af){N=af}}if(J.getPosition(N)==CKEDITOR.POSITION_FOLLOWING){J=0}while(J){var ak=false;if(J.equals(N)){J=null;ak=true}else{var L=J.type;var H=L==CKEDITOR.NODE_ELEMENT?J.getName():null;var O=H&&(J.getAttribute("contentEditable")=="false");var P=H&&J.getAttribute("data-nostyle");if(H&&J.data("cke-bookmark")){J=J.getNextSourceNode(true);continue}if(!H||(ac[H]&&!P&&(!O||Q)&&(J.getPosition(N)|CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED)==(CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED)&&(!X.childRule||X.childRule(J)))){var al=J.getParent();if(al&&((al.getDtd()||CKEDITOR.dtd.span)[V]||ad)&&(!X.parentRule||X.parentRule(al))){if(!W&&(!H||!CKEDITOR.dtd.$removeEmpty[H]||(J.getPosition(N)|CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED)==(CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED))){W=new CKEDITOR.dom.range(aa);W.setStartBefore(J)}if(L==CKEDITOR.NODE_TEXT||O||(L==CKEDITOR.NODE_ELEMENT&&!J.getChildCount())){var Y=J;var S;while((ak=!Y.getNext(f))&&(S=Y.getParent(),ac[S.getName()])&&(S.getPosition(ae)|CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED)==(CKEDITOR.POSITION_FOLLOWING+CKEDITOR.POSITION_IDENTICAL+CKEDITOR.POSITION_IS_CONTAINED)&&(!X.childRule||X.childRule(S))){Y=S}W.setEndAfter(Y)}}else{ak=true}}else{ak=true}J=J.getNextSourceNode(P||O)}if(ak&&W&&!W.collapsed){var aj=o(this,aa),R=aj.hasAttributes();var U=W.getCommonAncestor();var ai={styles:{},attrs:{},blockedStyles:{},blockedAttrs:{}};var ag,K,ab;while(aj&&U){if(U.getName()==V){for(ag in X.attributes){if(ai.blockedAttrs[ag]||!(ab=U.getAttribute(K))){continue}if(aj.getAttribute(ag)==ab){ai.attrs[ag]=1}else{ai.blockedAttrs[ag]=1}}for(K in X.styles){if(ai.blockedStyles[K]||!(ab=U.getStyle(K))){continue}if(aj.getStyle(K)==ab){ai.styles[K]=1}else{ai.blockedStyles[K]=1}}}U=U.getParent()}for(ag in ai.attrs){aj.removeAttribute(ag)}for(K in ai.styles){aj.removeStyle(K)}if(R&&!aj.hasAttributes()){aj=null}if(aj){W.extractContents().appendTo(aj);h(this,aj);W.insertNode(aj);aj.mergeSiblings();if(!CKEDITOR.env.ie){aj.$.normalize()}}else{aj=new CKEDITOR.dom.element("span");W.extractContents().appendTo(aj);W.insertNode(aj);h(this,aj);aj.remove(true)}W=null}}Z.moveToBookmark(ah);Z.shrink(CKEDITOR.SHRINK_TEXT)}function y(P){P.enlarge(CKEDITOR.ENLARGE_ELEMENT,1);var S=P.createBookmark(),J=S.startNode;if(P.collapsed){var V=new CKEDITOR.dom.elementPath(J.getParent()),L;for(var N=0,O;N<V.elements.length&&(O=V.elements[N]);N++){if(O==V.block||O==V.blockLimit){break}if(this.checkElementRemovable(O)){var H;if(P.collapsed&&(P.checkBoundaryOfElement(O,CKEDITOR.END)||(H=P.checkBoundaryOfElement(O,CKEDITOR.START)))){L=O;L.match=H?"start":"end"}else{O.mergeSiblings();if(O.getName()==this.element){b(this,O)}else{A(O,z(this)[O.getName()])}}}}if(L){var M=J;for(N=0;;N++){var R=V.elements[N];if(R.equals(L)){break}else{if(R.match){continue}else{R=R.clone()}}R.append(M);M=R}M[L.match=="start"?"insertBefore":"insertAfter"](L)}}else{var Q=S.endNode,T=this;function U(){var aa=new CKEDITOR.dom.elementPath(J.getParent()),W=new CKEDITOR.dom.elementPath(Q.getParent()),ab=null,Z=null;for(var Y=0;Y<aa.elements.length;Y++){var X=aa.elements[Y];if(X==aa.block||X==aa.blockLimit){break}if(T.checkElementRemovable(X)){ab=X}}for(Y=0;Y<W.elements.length;Y++){X=W.elements[Y];if(X==W.block||X==W.blockLimit){break}if(T.checkElementRemovable(X)){Z=X}}if(Z){Q.breakParent(Z)}if(ab){J.breakParent(ab)}}U();var I=J;while(!I.equals(Q)){var K=I.getNextSourceNode();if(I.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(I)){if(I.getName()==this.element){b(this,I)}else{A(I,z(this)[I.getName()])}if(K.type==CKEDITOR.NODE_ELEMENT&&K.contains(J)){U();K=J.getNext()}}I=K}}P.moveToBookmark(S)}function d(I){var H=I.getCommonAncestor(true,true),J=H.getAscendant(this.element,true);J&&!J.isReadOnly()&&G(J,this)}function r(K){var H=K.getCommonAncestor(true,true),M=H.getAscendant(this.element,true);if(!M){return}var N=this,O=N._.definition,J=O.attributes;if(J){for(var I in J){M.removeAttribute(I,J[I])}}if(O.styles){for(var L in O.styles){if(!O.styles.hasOwnProperty(L)){continue}M.removeStyle(L)}}}function u(H){var J=H.createBookmark(true);var I=H.createIterator();I.enforceRealBlocks=true;if(this._.enterMode){I.enlargeBr=(this._.enterMode!=CKEDITOR.ENTER_BR)}var M;var K=H.document;var L;while((M=I.getNextParagraph())){if(!M.isReadOnly()){var N=o(this,K,M);B(M,N)}}H.moveToBookmark(J)}function s(H){var J=H.createBookmark(1);var I=H.createIterator();I.enforceRealBlocks=true;I.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;var K;while((K=I.getNextParagraph())){if(this.checkElementRemovable(K)){if(K.is("pre")){var L=this._.enterMode==CKEDITOR.ENTER_BR?null:H.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div");L&&K.copyAttributes(L);B(K,L)}else{b(this,K,1)}}}H.moveToBookmark(J)}function B(M,N){var H=!N;if(H){N=M.getDocument().createElement("div");M.copyAttributes(N)}var I=N&&N.is("pre");var J=M.is("pre");var L=I&&!J;var K=!I&&J;if(L){N=a(M,N)}else{if(K){N=p(H?[M.getHtml()]:e(M),N)}else{M.moveChildren(N)}}N.replace(M);if(I){E(N)}else{if(H){w(N)}}}function E(J){var I;if(!((I=J.getPrevious(t))&&I.is&&I.is("pre"))){return}var H=C(I.getHtml(),/\n$/,"")+"\n\n"+C(J.getHtml(),/^\n/,"");if(CKEDITOR.env.ie){J.$.outerHTML="<pre>"+H+"</pre>"}else{J.setHtml(H)}I.remove()}function e(L){var J=/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,I=L.getName(),H=C(L.getOuterHtml(),J,function(M,N,O){return N+"</pre>"+O+"<pre>"});var K=[];H.replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(N,M){K.push(M)});return K}function C(L,K,I){var H="",J="";L=L.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(O,N,M){N&&(H=N);M&&(J=M);return""});return H+L.replace(K,I)+J}function p(K,M){var J;if(K.length>1){J=new CKEDITOR.dom.documentFragment(M.getDocument())}for(var I=0;I<K.length;I++){var H=K[I];H=H.replace(/(\r\n|\r)/g,"\n");H=C(H,/^[ \t]*\n/,"");H=C(H,/\n$/,"");H=C(H,/^[ \t]+|[ \t]+$/g,function(N,P,O){if(N.length==1){return" "}else{if(!P){return CKEDITOR.tools.repeat(" ",N.length-1)+" "}else{return" "+CKEDITOR.tools.repeat(" ",N.length-1)}}});H=H.replace(/\n/g,"<br>");H=H.replace(/[ \t]{2,}/g,function(N){return CKEDITOR.tools.repeat(" ",N.length-1)+" "});if(J){var L=M.clone();L.setHtml(H);J.append(L)}else{M.setHtml(H)}}return J||M}function a(K,L){var I=K.getBogus();I&&I.remove();var J=K.getHtml();J=C(J,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");J=J.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");J=J.replace(/([ \t\n\r]+| )/g," ");J=J.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var H=K.getDocument().createElement("div");H.append(L);L.$.outerHTML="<pre>"+J+"</pre>";L.copyAttributes(H.getFirst());L=H.getFirst().remove()}else{L.setHtml(J)}return L}function b(K,J){var M=K._.definition,H=CKEDITOR.tools.extend({},M.attributes,z(K)[J.getName()]),L=M.styles,O=CKEDITOR.tools.isEmpty(H)&&CKEDITOR.tools.isEmpty(L);for(var N in H){if((N=="class"||K._.definition.fullMatch)&&J.getAttribute(N)!=q(N,H[N])){continue}O=J.hasAttribute(N);J.removeAttribute(N)}for(var I in L){if(K._.definition.fullMatch&&J.getStyle(I)!=q(I,L[I],true)){continue}O=O||!!J.getStyle(I);J.removeStyle(I)}if(O){!CKEDITOR.dtd.$block[J.getName()]||K._.enterMode==CKEDITOR.ENTER_BR&&!J.hasAttributes()?w(J):J.renameNode(K._.enterMode==CKEDITOR.ENTER_P?"p":"div")}}function h(I,K){var J=I._.definition,H=J.attributes,Q=J.styles,O=z(I),P=K.getElementsByTag(I.element);for(var L=P.count();--L>=0;){b(I,P.getItem(L))}for(var N in O){if(N!=I.element){P=K.getElementsByTag(N);for(L=P.count()-1;L>=0;L--){var M=P.getItem(L);A(M,O[N])}}}}function A(K,M){var H=M&&M.attributes;if(H){for(var J=0;J<H.length;J++){var L=H[J][0],N;if((N=K.getAttribute(L))){var I=H[J][1];if(I===null||(I.test&&I.test(N))||(typeof I=="string"&&N==I)){K.removeAttribute(L)}}}}w(K)}function w(H){if(!H.hasAttributes()){if(CKEDITOR.dtd.$block[H.getName()]){var K=H.getPrevious(t),I=H.getNext(t);if(K&&(K.type==CKEDITOR.NODE_TEXT||!K.isBlockBoundary({br:1}))){H.append("br",1)}if(I&&(I.type==CKEDITOR.NODE_TEXT||!I.isBlockBoundary({br:1}))){H.append("br")}H.remove(true)}else{var L=H.getFirst();var J=H.getLast();H.remove(true);if(L){L.type==CKEDITOR.NODE_ELEMENT&&L.mergeSiblings();if(J&&!L.equals(J)&&J.type==CKEDITOR.NODE_ELEMENT){J.mergeSiblings()}}}}}function o(K,L,I){var J,M=K._.definition,H=K.element;if(H=="*"){H="span"}J=new CKEDITOR.dom.element(H,L);if(I){I.copyAttributes(J)}J=G(J,K);if(L.getCustomData("doc_processing_style")&&J.hasAttribute("id")){J.removeAttribute("id")}else{L.setCustomData("doc_processing_style",1)}return J}function G(K,J){var M=J._.definition,I=M.attributes,L=CKEDITOR.style.getStyleText(M);if(I){for(var H in I){K.setAttribute(H,I[H])}}if(L){K.setAttribute("style",L)}return K}function k(J,H){for(var I in J){J[I]=J[I].replace(c,function(K,L){return H[L]})}}function m(I){var L=I._AC;if(L){return L}L={};var J=0;var K=I.attributes;if(K){for(var H in K){J++;L[H]=K[H]}}var M=CKEDITOR.style.getStyleText(I);if(M){if(!L.style){J++}L.style=M}L._length=J;return(I._AC=L)}function z(H){if(H._.overrides){return H._.overrides}var O=(H._.overrides={}),K=H._.definition.overrides;if(K){if(!CKEDITOR.tools.isArray(K)){K=[K]}for(var L=0;L<K.length;L++){var I=K[L];var Q;var M;var P;if(typeof I=="string"){Q=I.toLowerCase()}else{Q=I.element?I.element.toLowerCase():H.element;P=I.attributes}M=O[Q]||(O[Q]={});if(P){var J=(M.attributes=M.attributes||new Array());for(var N in P){J.push([N.toLowerCase(),P[N]])}}}}return O}function q(I,K,J){var H=new CKEDITOR.dom.element("span");H[J?"setStyle":"setAttribute"](I,K);return H[J?"getStyle":"getAttribute"](I)}function l(J,I){var K;if(I!==false){var H=new CKEDITOR.dom.element("span");H.setAttribute("style",J);K=H.getAttribute("style")||""}else{K=J}K=K.replace(/(font-family:)(.*?)(?=;|$)/,function(L,P,O){var N=O.split(",");for(var M=0;M<N.length;M++){N[M]=CKEDITOR.tools.trim(N[M].replace(/["']/g,""))}return P+N.join(",")});return K.replace(/\s*([;:])\s*/,"$1").replace(/([^\s;])$/,"$1;").replace(/,\s+/g,",").replace(/\"/g,"").toLowerCase()}function g(I){var H={};I.replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(K,J,L){H[J]=L});return H}function v(I,J){typeof I=="string"&&(I=g(I));typeof J=="string"&&(J=g(J));for(var H in I){if(!(H in J&&(J[H]==I[H]||I[H]=="inherit"||J[H]=="inherit"))){return false}}return true}function D(I,H){var N=I.getSelection(),M=N.createBookmarks(1),J=N.getRanges(),O=H?this.removeFromRange:this.applyToRange,K;var L=J.createIterator();while((K=L.getNextRange())){O.call(this,K)}if(M.length==1&&M[0].collapsed){N.selectRanges(J);I.getById(M[0].startNode).remove()}else{N.selectBookmarks(M)}I.removeCustomData("doc_processing_style")}})();CKEDITOR.styleCommand=function(a){this.style=a};CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();var b=a.document;if(b){if(this.state==CKEDITOR.TRISTATE_OFF){this.style.apply(b)}else{if(this.state==CKEDITOR.TRISTATE_ON){this.style.remove(b)}}}return !!b};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(b,a,c){CKEDITOR.stylesSet.addExternal(b,a,"");CKEDITOR.stylesSet.load(b,c)};CKEDITOR.editor.prototype.getStylesSet=function(g){if(!this._.stylesDefinitions){var d=this,b=d.config.stylesCombo_stylesSet||d.config.stylesSet||"default";if(b instanceof Array){d._.stylesDefinitions=b;g(b);return}var c=b.split(":"),f=c[0],e=c[1],a=CKEDITOR.plugins.registered.styles.path;CKEDITOR.stylesSet.addExternal(f,e?c.slice(1).join(":"):a+"styles/"+f+".js","");CKEDITOR.stylesSet.load(f,function(h){d._.stylesDefinitions=h[f];g(d._.stylesDefinitions)})}else{g(this._.stylesDefinitions)}};
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.stylesSet.add("default",[{name:"Blue Title",element:"h3",styles:{color:"Blue"}},{name:"Red Title",element:"h3",styles:{color:"Red"}},{name:"Marker: Yellow",element:"span",styles:{"background-color":"Yellow"}},{name:"Marker: Green",element:"span",styles:{"background-color":"Lime"}},{name:"Big",element:"big"},{name:"Small",element:"small"},{name:"Typewriter",element:"tt"},{name:"Computer Code",element:"code"},{name:"Keyboard Phrase",element:"kbd"},{name:"Sample Text",element:"samp"},{name:"Variable",element:"var"},{name:"Deleted Text",element:"del"},{name:"Inserted Text",element:"ins"},{name:"Cited Work",element:"cite"},{name:"Inline Quotation",element:"q"},{name:"Language: RTL",element:"span",attributes:{dir:"rtl"}},{name:"Language: LTR",element:"span",attributes:{dir:"ltr"}},{name:"Image on Left",element:"img",attributes:{style:"padding: 5px; margin-right: 5px",border:"2",align:"left"}},{name:"Image on Right",element:"img",attributes:{style:"padding: 5px; margin-left: 5px",border:"2",align:"right"}},{name:"Borderless Table",element:"table",styles:{"border-style":"hidden","background-color":"#E6E6FA"}},{name:"Square Bulleted List",element:"ul",styles:{"list-style-type":"square"}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){CKEDITOR.plugins.add("stylescombo",{requires:["richcombo","styles"],init:function(e){var d=e.config,h=e.lang.stylesCombo,f={},c=[],g;function b(i){e.getStylesSet(function(o){if(!c.length){var m,k;for(var j=0,n=o.length;j<n;j++){var l=o[j];k=l.name;m=f[k]=new CKEDITOR.style(l);m._name=k;m._.enterMode=d.enterMode;c.push(m)}c.sort(a)}i&&i()})}e.ui.addRichCombo("Styles",{label:h.label,title:h.panelTitle,className:"cke_styles",panel:{css:e.skin.editor.css.concat(d.contentsCss),multiSelect:true,attributes:{"aria-label":h.panelTitle}},init:function(){g=this;b(function(){var n,k,m,l,j,o;for(j=0,o=c.length;j<o;j++){n=c[j];k=n._name;l=n.type;if(l!=m){g.startGroup(h["panelTitle"+String(l)]);m=l}g.add(k,n.type==CKEDITOR.STYLE_OBJECT?k:n.buildPreview(),k)}g.commit()})},onClick:function(l){e.focus();e.fire("saveSnapshot");var k=f[l],j=e.getSelection(),i=new CKEDITOR.dom.elementPath(j.getStartElement());k[k.checkActive(i)?"remove":"apply"](e.document);e.fire("saveSnapshot")},onRender:function(){e.on("selectionChange",function(o){var m=this.getValue(),l=o.data.path,q=l.elements;for(var k=0,n=q.length,j;k<n;k++){j=q[k];for(var p in f){if(f[p].checkElementRemovable(j,true)){if(p!=m){this.setValue(p)}return}}}this.setValue("")},this)},onOpen:function(){if(CKEDITOR.env.ie||CKEDITOR.env.webkit){e.focus()}var o=e.getSelection(),k=o.getSelectedElement(),n=new CKEDITOR.dom.elementPath(k||o.getStartElement()),i=[0,0,0,0];this.showAll();this.unmarkAll();for(var j in f){var m=f[j],l=m.type;if(m.checkActive(n)){this.mark(j)}else{if(l==CKEDITOR.STYLE_OBJECT&&!m.checkApplicable(n)){this.hideItem(j);i[l]--}}i[l]++}if(!i[CKEDITOR.STYLE_BLOCK]){this.hideGroup(h["panelTitle"+String(CKEDITOR.STYLE_BLOCK)])}if(!i[CKEDITOR.STYLE_INLINE]){this.hideGroup(h["panelTitle"+String(CKEDITOR.STYLE_INLINE)])}if(!i[CKEDITOR.STYLE_OBJECT]){this.hideGroup(h["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])}},reset:function(){if(g){delete g._.panel;delete g._.list;g._.committed=0;g._.items={};g._.state=CKEDITOR.TRISTATE_OFF}f={};c=[];b()}});e.on("instanceReady",function(){b()})}});function a(c,b){var e=c.type,d=b.type;return e==d?0:e==CKEDITOR.STYLE_OBJECT?-1:d==CKEDITOR.STYLE_OBJECT?1:d==CKEDITOR.STYLE_BLOCK?1:-1}})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var d={editorFocus:false,modes:{wysiwyg:1,source:1}};var a={exec:function(e){e.container.focusNext(true,e.tabIndex)}};var b={exec:function(e){e.container.focusPrevious(true,e.tabIndex)}};function c(e){return{editorFocus:false,canUndo:false,modes:{wysiwyg:1},exec:function(m){if(m.focusManager.hasFocus){var f=m.getSelection(),k=f.getCommonAncestor(),o;if((o=(k.getAscendant("td",true)||k.getAscendant("th",true)))){var n=new CKEDITOR.dom.range(m.document),j=CKEDITOR.tools.tryThese(function(){var s=o.getParent(),i=s.$.cells[o.$.cellIndex+(e?-1:1)];i.parentNode.parentNode;return i},function(){var t=o.getParent(),s=t.getAscendant("table"),i=s.$.rows[t.$.rowIndex+(e?-1:1)];return i.cells[e?i.cells.length-1:0]});if(!(j||e)){var q=o.getAscendant("table").$,r=o.getParent().$.cells;var p=new CKEDITOR.dom.element(q.insertRow(-1),m.document);for(var h=0,l=r.length;h<l;h++){var g=p.append(new CKEDITOR.dom.element(r[h],m.document).clone(false,false));!CKEDITOR.env.ie&&g.appendBogus()}n.moveToElementEditStart(p)}else{if(j){j=new CKEDITOR.dom.element(j);n.moveToElementEditStart(j);if(!(n.checkStartOfBlock()&&n.checkEndOfBlock())){n.selectNodeContents(j)}}else{return true}}n.select(true);return true}}return false}}}CKEDITOR.plugins.add("tab",{requires:["keystrokes"],init:function(g){var f=g.config.enableTabKeyTools!==false,h=g.config.tabSpaces||0,e="";while(h--){e+="\xa0"}if(e){g.on("key",function(i){if(i.data.keyCode==9){g.insertHtml(e);i.cancel()}})}if(f){g.on("key",function(i){if(i.data.keyCode==9&&g.execCommand("selectNextCell")||i.data.keyCode==(CKEDITOR.SHIFT+9)&&g.execCommand("selectPreviousCell")){i.cancel()}})}if(CKEDITOR.env.webkit||CKEDITOR.env.gecko){g.on("key",function(i){var j=i.data.keyCode;if(j==9&&!e){i.cancel();g.execCommand("blur")}if(j==(CKEDITOR.SHIFT+9)){g.execCommand("blurBack");i.cancel()}})}g.addCommand("blur",CKEDITOR.tools.extend(a,d));g.addCommand("blurBack",CKEDITOR.tools.extend(b,d));g.addCommand("selectNextCell",c());g.addCommand("selectPreviousCell",c(true))}})})();CKEDITOR.dom.element.prototype.focusNext=function(b,c){var e=this.$,f=(c===undefined?this.getTabIndex():c),i,h,a,g,d,j;if(f<=0){d=this.getNextSourceNode(b,CKEDITOR.NODE_ELEMENT);while(d){if(d.isVisible()&&d.getTabIndex()===0){a=d;break}d=d.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT)}}else{d=this.getDocument().getBody().getFirst();while((d=d.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT))){if(!i){if(!h&&d.equals(this)){h=true;if(b){if(!(d=d.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT))){break}i=1}}else{if(h&&!this.contains(d)){i=1}}}if(!d.isVisible()||(j=d.getTabIndex())<0){continue}if(i&&j==f){a=d;break}if(j>f&&(!a||!g||j<g)){a=d;g=j}else{if(!a&&j===0){a=d;g=j}}}}if(a){a.focus()}};CKEDITOR.dom.element.prototype.focusPrevious=function(b,c){var e=this.$,f=(c===undefined?this.getTabIndex():c),i,h,a,g=0,j;var d=this.getDocument().getBody().getLast();while((d=d.getPreviousSourceNode(false,CKEDITOR.NODE_ELEMENT))){if(!i){if(!h&&d.equals(this)){h=true;if(b){if(!(d=d.getPreviousSourceNode(true,CKEDITOR.NODE_ELEMENT))){break}i=1}}else{if(h&&!this.contains(d)){i=1}}}if(!d.isVisible()||(j=d.getTabIndex())<0){continue}if(f<=0){if(i&&j===0){a=d;break}if(j>g){a=d;g=j}}else{if(i&&j==f){a=d;break}if(j<f&&(!a||j>g)){a=d;g=j}}}if(a){a.focus()}};
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var d=CKEDITOR.tools.cssLength;var b=function(e){var f=this.id;if(!e.info){e.info={}}e.info[f]=this.getValue()};function a(m){var h=0,g=0;for(var f=0,n,o=m.$.rows.length;f<o;f++){n=m.$.rows[f],h=0;for(var e=0,k,l=n.cells.length;e<l;e++){k=n.cells[e];h+=k.colSpan}h>g&&(g=h)}return g}function c(f,h){var e=function(i){return new CKEDITOR.dom.element(i,f.document)};var g=f.plugins.dialogadvtab;return{title:f.lang.table.title,minWidth:310,minHeight:CKEDITOR.env.ie?310:280,onLoad:function(){var i=this;var j=i.getContentElement("advanced","advStyles");if(j){j.on("change",function(l){var n=this.getStyle("width",""),o=i.getContentElement("info","txtWidth");o&&o.setValue(n,true);var k=this.getStyle("height",""),m=i.getContentElement("info","txtHeight");m&&m.setValue(k,true)})}},onShow:function(){var o=f.getSelection(),k=o.getRanges(),n=null;var j=this.getContentElement("info","txtRows"),m=this.getContentElement("info","txtCols"),l=this.getContentElement("info","txtWidth"),i=this.getContentElement("info","txtHeight");if(h=="tableProperties"){if((n=o.getSelectedElement())){n=n.getAscendant("table",true)}else{if(k.length>0){if(CKEDITOR.env.webkit){k[0].shrink(CKEDITOR.NODE_ELEMENT)}var p=k[0].getCommonAncestor(true);n=p.getAscendant("table",true)}}this._.selectedElement=n}if(n){this.setupContent(n);j&&j.disable();m&&m.disable()}else{j&&j.enable();m&&m.enable()}l&&l.onChange();i&&i.onChange()},onOk:function(){var D=f.getSelection(),z=this._.selectedElement&&D.createBookmarks();var x=this._.selectedElement||e("table"),B=this,C={};this.commitContent(C,x);if(C.info){var y=C.info;if(!this._.selectedElement){var k=x.append(e("tbody")),r=parseInt(y.txtRows,10)||0,s=parseInt(y.txtCols,10)||0;for(var v=0;v<r;v++){var q=k.append(e("tr"));for(var u=0;u<s;u++){var m=q.append(e("td"));if(!CKEDITOR.env.ie){m.append(e("br"))}}}}var o=y.selHeaders;if(!x.$.tHead&&(o=="row"||o=="both")){var w=new CKEDITOR.dom.element(x.$.createTHead());k=x.getElementsByTag("tbody").getItem(0);var n=k.getElementsByTag("tr").getItem(0);for(v=0;v<n.getChildCount();v++){var p=n.getChild(v);if(p.type==CKEDITOR.NODE_ELEMENT&&!p.data("cke-bookmark")){p.renameNode("th");p.setAttribute("scope","col")}}w.append(n.remove())}if(x.$.tHead!==null&&!(o=="row"||o=="both")){w=new CKEDITOR.dom.element(x.$.tHead);k=x.getElementsByTag("tbody").getItem(0);var l=k.getFirst();while(w.getChildCount()>0){n=w.getFirst();for(v=0;v<n.getChildCount();v++){var t=n.getChild(v);if(t.type==CKEDITOR.NODE_ELEMENT){t.renameNode("td");t.removeAttribute("scope")}}n.insertBefore(l)}w.remove()}if(!this.hasColumnHeaders&&(o=="col"||o=="both")){for(q=0;q<x.$.rows.length;q++){t=new CKEDITOR.dom.element(x.$.rows[q].cells[0]);t.renameNode("th");t.setAttribute("scope","row")}}if((this.hasColumnHeaders)&&!(o=="col"||o=="both")){for(v=0;v<x.$.rows.length;v++){q=new CKEDITOR.dom.element(x.$.rows[v]);if(q.getParent().getName()=="tbody"){t=new CKEDITOR.dom.element(q.$.cells[0]);t.renameNode("td");t.removeAttribute("scope")}}}y.txtHeight?x.setStyle("height",y.txtHeight):x.removeStyle("height");y.txtWidth?x.setStyle("width",y.txtWidth):x.removeStyle("width");if(!x.getAttribute("style")){x.removeAttribute("style")}}if(!this._.selectedElement){f.insertElement(x);setTimeout(function(){var j=new CKEDITOR.dom.element(x.$.rows[0].cells[0]);var i=new CKEDITOR.dom.range(f.document);i.moveToPosition(j,CKEDITOR.POSITION_AFTER_START);i.select(1)},0)}else{try{D.selectBookmarks(z)}catch(A){}}},contents:[{id:"info",label:f.lang.table.title,elements:[{type:"hbox",widths:[null,null],styles:["vertical-align:top"],children:[{type:"vbox",padding:0,children:[{type:"text",id:"txtRows","default":3,label:f.lang.table.rows,required:true,controlStyle:"width:5em",validate:function(){var i=true,j=this.getValue();i=i&&CKEDITOR.dialog.validate.integer()(j)&&j>0;if(!i){alert(f.lang.table.invalidRows);this.select()}return i},setup:function(i){this.setValue(i.$.rows.length)},commit:b},{type:"text",id:"txtCols","default":2,label:f.lang.table.columns,required:true,controlStyle:"width:5em",validate:function(){var i=true,j=this.getValue();i=i&&CKEDITOR.dialog.validate.integer()(j)&&j>0;if(!i){alert(f.lang.table.invalidCols);this.select()}return i},setup:function(i){this.setValue(a(i))},commit:b},{type:"html",html:" "},{type:"select",id:"selHeaders","default":"",label:f.lang.table.headers,items:[[f.lang.table.headersNone,""],[f.lang.table.headersRow,"row"],[f.lang.table.headersColumn,"col"],[f.lang.table.headersBoth,"both"]],setup:function(j){var k=this.getDialog();k.hasColumnHeaders=true;for(var l=0;l<j.$.rows.length;l++){var i=j.$.rows[l].cells[0];if(i&&i.nodeName.toLowerCase()!="th"){k.hasColumnHeaders=false;break}}if((j.$.tHead!==null)){this.setValue(k.hasColumnHeaders?"both":"row")}else{this.setValue(k.hasColumnHeaders?"col":"")}},commit:b},{type:"text",id:"txtBorder","default":1,label:f.lang.table.border,controlStyle:"width:3em",validate:CKEDITOR.dialog.validate.number(f.lang.table.invalidBorder),setup:function(i){this.setValue(i.getAttribute("border")||"")},commit:function(j,i){if(this.getValue()){i.setAttribute("border",this.getValue())}else{i.removeAttribute("border")}}},{id:"cmbAlign",type:"select","default":"",label:f.lang.common.align,items:[[f.lang.common.notSet,""],[f.lang.common.alignLeft,"left"],[f.lang.common.alignCenter,"center"],[f.lang.common.alignRight,"right"]],setup:function(i){this.setValue(i.getAttribute("align")||"")},commit:function(j,i){if(this.getValue()){i.setAttribute("align",this.getValue())}else{i.removeAttribute("align")}}}]},{type:"vbox",padding:0,children:[{type:"hbox",widths:["5em"],children:[{type:"text",id:"txtWidth",controlStyle:"width:5em",label:f.lang.common.width,title:f.lang.common.cssLengthTooltip,"default":500,getValue:d,validate:CKEDITOR.dialog.validate.cssLength(f.lang.common.invalidCssLength.replace("%1",f.lang.common.width)),onChange:function(){var i=this.getDialog().getContentElement("advanced","advStyles");i&&i.updateStyle("width",this.getValue())},setup:function(i){var j=i.getStyle("width");j&&this.setValue(j)},commit:b}]},{type:"hbox",widths:["5em"],children:[{type:"text",id:"txtHeight",controlStyle:"width:5em",label:f.lang.common.height,title:f.lang.common.cssLengthTooltip,"default":"",getValue:d,validate:CKEDITOR.dialog.validate.cssLength(f.lang.common.invalidCssLength.replace("%1",f.lang.common.height)),onChange:function(){var i=this.getDialog().getContentElement("advanced","advStyles");i&&i.updateStyle("height",this.getValue())},setup:function(i){var j=i.getStyle("width");j&&this.setValue(j)},commit:b}]},{type:"html",html:" "},{type:"text",id:"txtCellSpace",controlStyle:"width:3em",label:f.lang.table.cellSpace,"default":1,validate:CKEDITOR.dialog.validate.number(f.lang.table.invalidCellSpacing),setup:function(i){this.setValue(i.getAttribute("cellSpacing")||"")},commit:function(j,i){if(this.getValue()){i.setAttribute("cellSpacing",this.getValue())}else{i.removeAttribute("cellSpacing")}}},{type:"text",id:"txtCellPad",controlStyle:"width:3em",label:f.lang.table.cellPad,"default":1,validate:CKEDITOR.dialog.validate.number(f.lang.table.invalidCellPadding),setup:function(i){this.setValue(i.getAttribute("cellPadding")||"")},commit:function(j,i){if(this.getValue()){i.setAttribute("cellPadding",this.getValue())}else{i.removeAttribute("cellPadding")}}}]}]},{type:"html",align:"right",html:""},{type:"vbox",padding:0,children:[{type:"text",id:"txtCaption",label:f.lang.table.caption,setup:function(k){this.enable();var j=k.getElementsByTag("caption");if(j.count()>0){var i=j.getItem(0);var l=i.getFirst(CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT));if(l&&!l.equals(i.getBogus())){this.disable();this.setValue(i.getText());return}i=CKEDITOR.tools.trim(i.getText());this.setValue(i)}},commit:function(n,m){if(!this.isEnabled()){return}var j=this.getValue(),l=m.getElementsByTag("caption");if(j){if(l.count()>0){l=l.getItem(0);l.setHtml("")}else{l=new CKEDITOR.dom.element("caption",f.document);if(m.getChildCount()){l.insertBefore(m.getFirst())}else{l.appendTo(m)}}l.append(new CKEDITOR.dom.text(j,f.document))}else{if(l.count()>0){for(var k=l.count()-1;k>=0;k--){l.getItem(k).remove()}}}}},{type:"text",id:"txtSummary",label:f.lang.table.summary,setup:function(i){this.setValue(i.getAttribute("summary")||"")},commit:function(j,i){if(this.getValue()){i.setAttribute("summary",this.getValue())}else{i.removeAttribute("summary")}}}]}]},g&&g.createAdvancedTab(f)]}}CKEDITOR.dialog.add("table",function(e){return c(e,"table")});CKEDITOR.dialog.add("tableProperties",function(e){return c(e,"tableProperties")})})();
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.plugins.add("table",{init:function(a){var b=CKEDITOR.plugins.table,c=a.lang.table;a.addCommand("table",new CKEDITOR.dialogCommand("table"));a.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties"));a.ui.addButton("Table",{label:c.toolbar,command:"table"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");if(a.addMenuItems){a.addMenuItems({table:{label:c.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:c.deleteTable,command:"tableDelete",group:"table",order:1}})}a.on("doubleclick",function(d){var e=d.data.element;if(e.is("table")){d.data.dialog="tableProperties"}});if(a.contextMenu){a.contextMenu.addListener(function(d,e){if(!d||d.isReadOnly()){return null}var f=d.hasAscendant("table",1);if(f){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}}return null})}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
CKEDITOR.dialog.add("cellProperties",function(d){var a=d.lang.table,c=a.cell,b=d.lang.common,h=CKEDITOR.dialog.validate,j=/^(\d+(?:\.\d+)?)(px|%)$/,i=/^(\d+(?:\.\d+)?)px$/,f=CKEDITOR.tools.bind,e={type:"html",html:" "},g=d.lang.dir=="rtl";function k(o,q){var n=function(){l(this);q(this,this._.parentDialog);this._.parentDialog.changeFocus(true)};var p=function(){l(this);this._.parentDialog.changeFocus()};var l=function(r){r.removeListener("ok",n);r.removeListener("cancel",p)};var m=function(r){r.on("ok",n);r.on("cancel",p)};d.execCommand(o);if(d._.storedDialogs.colordialog){m(d._.storedDialogs.colordialog)}else{CKEDITOR.on("dialogDefinition",function(s){if(s.data.name!=o){return}var r=s.data.definition;s.removeListener();r.onLoad=CKEDITOR.tools.override(r.onLoad,function(t){return function(){m(this);r.onLoad=t;if(typeof t=="function"){t.call(this)}}})})}}return{title:c.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?450:410,minHeight:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?230:200,contents:[{id:"info",label:c.title,accessKey:"I",elements:[{type:"hbox",widths:["40%","5%","40%"],children:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["70%","30%"],children:[{type:"text",id:"width",width:"100px",label:b.width,validate:h.number(c.invalidWidth),onLoad:function(){var m=this.getDialog().getContentElement("info","widthType"),l=m.getElement(),o=this.getInputElement(),n=o.getAttribute("aria-labelledby");o.setAttribute("aria-labelledby",[n,l.$.id].join(" "))},setup:function(l){var n=parseInt(l.getAttribute("width"),10),m=parseInt(l.getStyle("width"),10);!isNaN(n)&&this.setValue(n);!isNaN(m)&&this.setValue(m)},commit:function(l){var n=parseInt(this.getValue(),10),m=this.getDialog().getValueOf("info","widthType");if(!isNaN(n)){l.setStyle("width",n+m)}else{l.removeStyle("width")}l.removeAttribute("width")},"default":""},{type:"select",id:"widthType",label:d.lang.table.widthUnit,labelStyle:"visibility:hidden","default":"px",items:[[a.widthPx,"px"],[a.widthPc,"%"]],setup:function(l){var m=j.exec(l.getStyle("width")||l.getAttribute("width"));if(m){this.setValue(m[2])}}}]},{type:"hbox",widths:["70%","30%"],children:[{type:"text",id:"height",label:b.height,width:"100px","default":"",validate:h.number(c.invalidHeight),onLoad:function(){var n=this.getDialog().getContentElement("info","htmlHeightType"),l=n.getElement(),o=this.getInputElement(),m=o.getAttribute("aria-labelledby");o.setAttribute("aria-labelledby",[m,l.$.id].join(" "))},setup:function(n){var l=parseInt(n.getAttribute("height"),10),m=parseInt(n.getStyle("height"),10);!isNaN(l)&&this.setValue(l);!isNaN(m)&&this.setValue(m)},commit:function(l){var m=parseInt(this.getValue(),10);if(!isNaN(m)){l.setStyle("height",CKEDITOR.tools.cssLength(m))}else{l.removeStyle("height")}l.removeAttribute("height")}},{id:"htmlHeightType",type:"html",html:"<br />"+a.widthPx}]},e,{type:"select",id:"wordWrap",label:c.wordWrap,"default":"yes",items:[[c.yes,"yes"],[c.no,"no"]],setup:function(l){var n=l.getAttribute("noWrap"),m=l.getStyle("white-space");if(m=="nowrap"||n){this.setValue("no")}},commit:function(l){if(this.getValue()=="no"){l.setStyle("white-space","nowrap")}else{l.removeStyle("white-space")}l.removeAttribute("noWrap")}},e,{type:"select",id:"hAlign",label:c.hAlign,"default":"",items:[[b.notSet,""],[b.alignLeft,"left"],[b.alignCenter,"center"],[b.alignRight,"right"]],setup:function(m){var n=m.getAttribute("align"),l=m.getStyle("text-align");this.setValue(l||n||"")},commit:function(l){var m=this.getValue();if(m){l.setStyle("text-align",m)}else{l.removeStyle("text-align")}l.removeAttribute("align")}},{type:"select",id:"vAlign",label:c.vAlign,"default":"",items:[[b.notSet,""],[b.alignTop,"top"],[b.alignMiddle,"middle"],[b.alignBottom,"bottom"],[c.alignBaseline,"baseline"]],setup:function(l){var m=l.getAttribute("vAlign"),n=l.getStyle("vertical-align");switch(n){case"top":case"middle":case"bottom":case"baseline":break;default:n=""}this.setValue(n||m||"")},commit:function(l){var m=this.getValue();if(m){l.setStyle("vertical-align",m)}else{l.removeStyle("vertical-align")}l.removeAttribute("vAlign")}}]},e,{type:"vbox",padding:0,children:[{type:"select",id:"cellType",label:c.cellType,"default":"td",items:[[c.data,"td"],[c.header,"th"]],setup:function(l){this.setValue(l.getName())},commit:function(l){l.renameNode(this.getValue())}},e,{type:"text",id:"rowSpan",label:c.rowSpan,"default":"",validate:h.integer(c.invalidRowSpan),setup:function(l){var m=parseInt(l.getAttribute("rowSpan"),10);if(m&&m!=1){this.setValue(m)}},commit:function(l){var m=parseInt(this.getValue(),10);if(m&&m!=1){l.setAttribute("rowSpan",this.getValue())}else{l.removeAttribute("rowSpan")}}},{type:"text",id:"colSpan",label:c.colSpan,"default":"",validate:h.integer(c.invalidColSpan),setup:function(m){var l=parseInt(m.getAttribute("colSpan"),10);if(l&&l!=1){this.setValue(l)}},commit:function(l){var m=parseInt(this.getValue(),10);if(m&&m!=1){l.setAttribute("colSpan",this.getValue())}else{l.removeAttribute("colSpan")}}},e,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"bgColor",label:c.bgColor,"default":"",setup:function(m){var l=m.getAttribute("bgColor"),n=m.getStyle("background-color");this.setValue(n||l)},commit:function(l){var m=this.getValue();if(m){l.setStyle("background-color",this.getValue())}else{l.removeStyle("background-color")}l.removeAttribute("bgColor")}},{type:"button",id:"bgColorChoose","class":"colorChooser",label:c.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){var l=this;k("colordialog",function(m){l.getDialog().getContentElement("info","bgColor").setValue(m.getContentElement("picker","selectedColor").getValue())})}}]},e,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"borderColor",label:c.borderColor,"default":"",setup:function(m){var l=m.getAttribute("borderColor"),n=m.getStyle("border-color");this.setValue(n||l)},commit:function(l){var m=this.getValue();if(m){l.setStyle("border-color",this.getValue())}else{l.removeStyle("border-color")}l.removeAttribute("borderColor")}},{type:"button",id:"borderColorChoose","class":"colorChooser",label:c.chooseColor,style:(g?"margin-right":"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){var l=this;k("colordialog",function(m){l.getDialog().getContentElement("info","borderColor").setValue(m.getContentElement("picker","selectedColor").getValue())})}}]}]}]}]}],onShow:function(){this.cells=CKEDITOR.plugins.tabletools.getSelectedCells(this._.editor.getSelection());this.setupContent(this.cells[0])},onOk:function(){var p=this._.editor.getSelection(),o=p.createBookmarks();var l=this.cells;for(var m=0;m<l.length;m++){this.commitContent(l[m])}p.selectBookmarks(o);var n=p.getStartElement();var q=new CKEDITOR.dom.elementPath(n);this._.editor._.selectionPreviousPath=q;this._.editor.fire("selectionChange",{selection:p,path:q,element:n})}}});
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var b=/^(?:td|th)$/;function s(F){var y=F.createBookmarks();var v=F.getRanges();var w=[];var G={};function D(H){if(w.length>0){return}if(H.type==CKEDITOR.NODE_ELEMENT&&b.test(H.getName())&&!H.getCustomData("selected_cell")){CKEDITOR.dom.element.setMarker(G,H,"selected_cell",true);w.push(H)}}for(var B=0;B<v.length;B++){var C=v[B];if(C.collapsed){var x=C.getCommonAncestor();var A=x.getAscendant("td",true)||x.getAscendant("th",true);if(A){w.push(A)}}else{var u=new CKEDITOR.dom.walker(C);var z;u.guard=D;while((z=u.next())){var E=z.getAscendant("td")||z.getAscendant("th");if(E&&!E.getCustomData("selected_cell")){CKEDITOR.dom.element.setMarker(G,E,"selected_cell",true);w.push(E)}}}}CKEDITOR.dom.element.clearAllMarkers(G);F.selectBookmarks(y);return w}function t(v){var w=0,x=v.length-1,z={},u,A,y;while((u=v[w++])){CKEDITOR.dom.element.setMarker(z,u,"delete_cell",true)}w=0;while((u=v[w++])){if((A=u.getPrevious())&&!A.getCustomData("delete_cell")||(A=u.getNext())&&!A.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(z);return A}}CKEDITOR.dom.element.clearAllMarkers(z);y=v[0].getParent();if((y=y.getPrevious())){return y.getLast()}y=v[x].getParent();if((y=y.getNext())){return y.getChild(0)}return null}function a(M,z){var A=s(M),x=A[0],J=x.getAscendant("table"),N=x.getDocument(),u=A[0].getParent(),K=u.$.rowIndex,F=A[A.length-1],v=F.getParent().$.rowIndex+F.$.rowSpan-1,H=new CKEDITOR.dom.element(J.$.rows[v]),C=z?K:v,B=z?u:H;var L=CKEDITOR.tools.buildTableMap(J),D=L[C],G=z?L[C-1]:L[C+1],E=L[0].length;var y=N.createElement("tr");for(var I=0;D[I]&&I<E;I++){var w;if(D[I].rowSpan>1&&G&&D[I]==G[I]){w=D[I];w.rowSpan+=1}else{w=new CKEDITOR.dom.element(D[I]).clone();w.removeAttribute("rowSpan");!CKEDITOR.env.ie&&w.appendBogus();y.append(w);w=w.$}I+=w.colSpan-1}z?y.insertBefore(B):y.insertAfter(B)}function c(D){if(D instanceof CKEDITOR.dom.selection){var z=s(D),x=z[0],I=x.getAscendant("table"),L=CKEDITOR.tools.buildTableMap(I),u=z[0].getParent(),K=u.$.rowIndex,E=z[z.length-1],v=E.getParent().$.rowIndex+E.$.rowSpan-1,J=[];for(var H=K;H<=v;H++){var C=L[H],A=new CKEDITOR.dom.element(I.$.rows[H]);for(var F=0;F<C.length;F++){var w=new CKEDITOR.dom.element(C[F]),y=w.getParent().$.rowIndex;if(w.$.rowSpan==1){w.remove()}else{w.$.rowSpan-=1;if(y==H){var M=L[H+1];M[F-1]?w.insertAfter(new CKEDITOR.dom.element(M[F-1])):new CKEDITOR.dom.element(I.$.rows[H+1]).append(w,1)}}F+=w.$.colSpan-1}J.push(A)}var B=I.$.rows;var G=new CKEDITOR.dom.element(B[v+1]||(K>0?B[K-1]:null)||I.$.parentNode);for(H=J.length;H>=0;H--){c(J[H])}return G}else{if(D instanceof CKEDITOR.dom.element){I=D.getAscendant("table");if(I.$.rows.length==1){I.remove()}else{D.remove()}}}return null}function k(u,v){var z=u.getParent(),A=z.$.cells;var x=0;for(var y=0;y<A.length;y++){var w=A[y];x+=v?1:w.colSpan;if(w==u.$){break}}return x-1}function h(x,v){var u=v?Infinity:0;for(var y=0;y<x.length;y++){var w=k(x[y],v);if(v?w<u:w>u){u=w}}return u}function n(C,A){var I=s(C),B=I[0],H=B.getAscendant("table"),v=h(I,1),y=h(I),E=A?v:y;var u=CKEDITOR.tools.buildTableMap(H),x=[],w=[],F=u.length;for(var z=0;z<F;z++){x.push(u[z][E]);var G=A?u[z][E-1]:u[z][E+1];G&&w.push(G)}for(z=0;z<F;z++){var D;if(x[z].colSpan>1&&w.length&&w[z]==x[z]){D=x[z];D.colSpan+=1}else{D=new CKEDITOR.dom.element(x[z]).clone();D.removeAttribute("colSpan");!CKEDITOR.env.ie&&D.appendBogus();D[A?"insertBefore":"insertAfter"].call(D,new CKEDITOR.dom.element(x[z]));D=D.$}z+=D.rowSpan-1}}function g(u){var y=s(u),x=y[0],E=y[y.length-1],J=x.getAscendant("table"),L=CKEDITOR.tools.buildTableMap(J),v,z,K=[];for(var I=0,B=L.length;I<B;I++){for(var G=0,C=L[I].length;G<C;G++){if(L[I][G]==x.$){v=G}if(L[I][G]==E.$){z=G}}}for(I=v;I<=z;I++){for(G=0;G<L.length;G++){var D=L[G],A=new CKEDITOR.dom.element(J.$.rows[G]),w=new CKEDITOR.dom.element(D[I]);if(w.$){if(w.$.colSpan==1){w.remove()}else{w.$.colSpan-=1}G+=w.$.rowSpan-1;if(!A.$.cells.length){K.push(A)}}}}var F=J.$.rows[0]&&J.$.rows[0].cells;var H=new CKEDITOR.dom.element(F[v]||(v?F[v-1]:J.$.parentNode));if(K.length==B){J.remove()}return H}function r(x){var w=[],A=x[0]&&x[0].getAscendant("table"),y,z,v,u;for(y=0,z=x.length;y<z;y++){w.push(x[y].$.cellIndex)}w.sort();for(y=1,z=w.length;y<z;y++){if(w[y]-w[y-1]>1){v=w[y-1]+1;break}}if(!v){v=w[0]>0?(w[0]-1):(w[w.length-1]+1)}var B=A.$.rows;for(y=0,z=B.length;y<z;y++){u=B[y].cells[v];if(u){break}}return u?new CKEDITOR.dom.element(u):A.getPrevious()}function j(x,v){var w=x.getStartElement();var u=w.getAscendant("td",1)||w.getAscendant("th",1);if(!u){return}var y=u.clone();if(!CKEDITOR.env.ie){y.appendBogus()}if(v){y.insertBefore(u)}else{y.insertAfter(u)}}function m(x){if(x instanceof CKEDITOR.dom.selection){var u=s(x);var y=u[0]&&u[0].getAscendant("table");var v=t(u);for(var w=u.length-1;w>=0;w--){m(u[w])}if(v){e(v,true)}else{if(y){y.remove()}}}else{if(x instanceof CKEDITOR.dom.element){var z=x.getParent();if(z.getChildCount()==1){z.remove()}else{x.remove()}}}}function f(u){var v=u.getBogus();v&&v.remove();u.trim()}function e(u,w){var v=new CKEDITOR.dom.range(u.getDocument());if(!v["moveToElementEdit"+(w?"End":"Start")](u)){v.selectNodeContents(u);v.collapse(w?false:true)}v.select(true)}function q(y,x,u){var v=y[x];if(typeof u=="undefined"){return v}for(var w=0;v&&w<v.length;w++){if(u.is&&v[w]==u.$){return w}else{if(w==u){return new CKEDITOR.dom.element(v[w])}}}return u.is?-1:null}function o(z,v,u){var x=[];for(var w=0;w<z.length;w++){var y=z[w];if(typeof u=="undefined"){x.push(y[v])}else{if(u.is&&y[v]==u.$){return w}else{if(w==u){return new CKEDITOR.dom.element(y[v])}}}}return(typeof u=="undefined")?x:u.is?-1:null}function l(ab,H,K){var D=s(ab);var F;if((H?D.length!=1:D.length<2)||(F=ab.getCommonAncestor())&&F.type==CKEDITOR.NODE_ELEMENT&&F.is("table")){return false}var y,z=D[0],U=z.getAscendant("table"),W=CKEDITOR.tools.buildTableMap(U),R=W.length,T=W[0].length,u=z.getParent().$.rowIndex,E=q(W,u,z);if(H){var P;try{var Y=parseInt(z.getAttribute("rowspan"),10)||1;var A=parseInt(z.getAttribute("colspan"),10)||1;P=W[H=="up"?(u-Y):H=="down"?(u+Y):u][H=="left"?(E-A):H=="right"?(E+A):E]}catch(X){return false}if(!P||z.$==P){return false}D[(H=="up"||H=="left")?"unshift":"push"](new CKEDITOR.dom.element(P))}var aa=z.getDocument(),x=u,Z=0,B=0,w=!K&&new CKEDITOR.dom.documentFragment(aa),V=0;for(var S=0;S<D.length;S++){y=D[S];var v=y.getParent(),J=y.getFirst(),I=y.$.colSpan,C=y.$.rowSpan,M=v.$.rowIndex,O=q(W,M,y);V+=I*C;B=Math.max(B,O-E+I);Z=Math.max(Z,M-u+C);if(!K){if(f(y),y.getChildren().count()){if(M!=x&&J&&!(J.isBlockBoundary&&J.isBlockBoundary({br:1}))){var L=w.getLast(CKEDITOR.dom.walker.whitespaces(true));if(L&&!(L.is&&L.is("br"))){w.append("br")}}y.moveChildren(w)}S?y.remove():y.setHtml("")}x=M}if(!K){w.moveChildren(z);if(!CKEDITOR.env.ie){z.appendBogus()}if(B>=T){z.removeAttribute("rowSpan")}else{z.$.rowSpan=Z}if(Z>=R){z.removeAttribute("colSpan")}else{z.$.colSpan=B}var N=new CKEDITOR.dom.nodeList(U.$.rows),G=N.count();for(S=G-1;S>=0;S--){var Q=N.getItem(S);if(!Q.$.cells.length){Q.remove();G++;continue}}return z}else{return(Z*B)==V}}function d(N,B){var w=s(N);if(w.length>1){return false}else{if(B){return true}}var v=w[0],u=v.getParent(),J=u.getAscendant("table"),M=CKEDITOR.tools.buildTableMap(J),D=u.$.rowIndex,G=q(M,D,v),x=v.$.rowSpan,F,z,y,H;if(x>1){z=Math.ceil(x/2);y=Math.floor(x/2);H=D+z;var E=new CKEDITOR.dom.element(J.$.rows[H]),K=q(M,H),A;F=v.clone();for(var L=0;L<K.length;L++){A=K[L];if(A.parentNode==E.$&&L>G){F.insertBefore(new CKEDITOR.dom.element(A));break}else{A=null}}if(!A){E.append(F,true)}}else{y=z=1;E=u.clone();E.insertAfter(u);E.append(F=v.clone());var C=q(M,D);for(var I=0;I<C.length;I++){C[I].rowSpan++}}if(!CKEDITOR.env.ie){F.appendBogus()}v.$.rowSpan=z;F.$.rowSpan=y;if(z==1){v.removeAttribute("rowSpan")}if(y==1){F.removeAttribute("rowSpan")}return F}function p(D,B){var I=s(D);if(I.length>1){return false}else{if(B){return true}}var F=I[0],A=F.getParent(),H=A.getAscendant("table"),u=CKEDITOR.tools.buildTableMap(H),C=A.$.rowIndex,E=q(u,C,F),x=F.$.colSpan,w,z,G;if(x>1){z=Math.ceil(x/2);G=Math.floor(x/2)}else{G=z=1;var y=o(u,E);for(var v=0;v<y.length;v++){y[v].colSpan++}}w=F.clone();w.insertAfter(F);if(!CKEDITOR.env.ie){w.appendBogus()}F.$.colSpan=z;w.$.colSpan=G;if(z==1){F.removeAttribute("colSpan")}if(G==1){w.removeAttribute("colSpan")}return w}var i={thead:1,tbody:1,tfoot:1,td:1,tr:1,th:1};CKEDITOR.plugins.tabletools={init:function(u){var v=u.lang.table;u.addCommand("cellProperties",new CKEDITOR.dialogCommand("cellProperties"));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");u.addCommand("tableDelete",{exec:function(A){var z=A.getSelection(),y=z&&z.getStartElement(),B=y&&y.getAscendant("table",1);if(!B){return}var x=B.getParent();if(x.getChildCount()==1&&!x.is("body","td","th")){B=x}var w=new CKEDITOR.dom.range(A.document);w.moveToPosition(B,CKEDITOR.POSITION_BEFORE_START);B.remove();w.select()}});u.addCommand("rowDelete",{exec:function(x){var w=x.getSelection();e(c(w))}});u.addCommand("rowInsertBefore",{exec:function(x){var w=x.getSelection();a(w,true)}});u.addCommand("rowInsertAfter",{exec:function(x){var w=x.getSelection();a(w)}});u.addCommand("columnDelete",{exec:function(y){var x=y.getSelection();var w=g(x);w&&e(w,true)}});u.addCommand("columnInsertBefore",{exec:function(x){var w=x.getSelection();n(w,true)}});u.addCommand("columnInsertAfter",{exec:function(x){var w=x.getSelection();n(w)}});u.addCommand("cellDelete",{exec:function(x){var w=x.getSelection();m(w)}});u.addCommand("cellMerge",{exec:function(w){e(l(w.getSelection()),true)}});u.addCommand("cellMergeRight",{exec:function(w){e(l(w.getSelection(),"right"),true)}});u.addCommand("cellMergeDown",{exec:function(w){e(l(w.getSelection(),"down"),true)}});u.addCommand("cellVerticalSplit",{exec:function(w){e(d(w.getSelection()))}});u.addCommand("cellHorizontalSplit",{exec:function(w){e(p(w.getSelection()))}});u.addCommand("cellInsertBefore",{exec:function(x){var w=x.getSelection();j(w,true)}});u.addCommand("cellInsertAfter",{exec:function(x){var w=x.getSelection();j(w)}});if(u.addMenuItems){u.addMenuItems({tablecell:{label:v.cell.menu,group:"tablecell",order:1,getItems:function(){var x=u.getSelection(),w=s(x);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:l(x,null,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:l(x,"right",true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:l(x,"down",true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:d(x,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:p(x,true)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:w.length>0?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:v.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:v.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:v.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:v.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:v.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:v.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:v.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:v.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:v.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:v.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:v.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:v.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:v.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:v.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:v.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:v.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:v.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}})}if(u.contextMenu){u.contextMenu.addListener(function(w,x){if(!w||w.isReadOnly()){return null}while(w){if(w.getName() in i){return{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}}w=w.getParent()}return null})}},getSelectedCells:s};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)})();CKEDITOR.tools.buildTableMap=function(o){var n=o.$.rows;var a=-1;var m=[];for(var f=0;f<n.length;f++){a++;!m[a]&&(m[a]=[]);var l=-1;for(var e=0;e<n[f].cells.length;e++){var k=n[f].cells[e];l++;while(m[a][l]){l++}var d=isNaN(k.colSpan)?1:k.colSpan;var g=isNaN(k.rowSpan)?1:k.rowSpan;for(var b=0;b<g;b++){if(!m[a+b]){m[a+b]=[]}for(var h=0;h<d;h++){m[a+b][l+h]=n[f].cells[e]}}l+=d-1}}return m};
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var b=function(){this.toolbars=[];this.focusCommandExecuted=false};b.prototype.focus=function(){for(var d=0,f;f=this.toolbars[d++];){for(var c=0,e;e=f.items[c++];){if(e.focus){e.focus();return}}}};var a={toolbarFocus:{modes:{wysiwyg:1,source:1},readOnly:1,exec:function(c){if(c.toolbox){c.toolbox.focusCommandExecuted=true;if(CKEDITOR.env.ie||CKEDITOR.env.air){setTimeout(function(){c.toolbox.focus()},100)}else{c.toolbox.focus()}}}}};CKEDITOR.plugins.add("toolbar",{init:function(d){var e;var c=function(i,k){var g,h;var j=d.lang.dir=="rtl",f=d.config.toolbarGroupCycling;f=f===undefined||f;switch(k){case 9:case CKEDITOR.SHIFT+9:while(!h||!h.items.length){h=k==9?((h?h.next:i.toolbar.next)||d.toolbox.toolbars[0]):((h?h.previous:i.toolbar.previous)||d.toolbox.toolbars[d.toolbox.toolbars.length-1]);if(h.items.length){i=h.items[e?(h.items.length-1):0];while(i&&!i.focus){i=e?i.previous:i.next;if(!i){h=0}}}}if(i){i.focus()}return false;case j?37:39:case 40:g=i;do{g=g.next;if(!g&&f){g=i.toolbar.items[0]}}while(g&&!g.focus);if(g){g.focus()}else{c(i,9)}return false;case j?39:37:case 38:g=i;do{g=g.previous;if(!g&&f){g=i.toolbar.items[i.toolbar.items.length-1]}}while(g&&!g.focus);if(g){g.focus()}else{e=1;c(i,CKEDITOR.SHIFT+9);e=0}return false;case 27:d.focus();return false;case 13:case 32:i.execute();return false}return true};d.on("themeSpace",function(u){if(u.data.space==d.config.toolbarLocation){d.toolbox=new b();var A=CKEDITOR.tools.getNextId();var m=['<div class="cke_toolbox" role="group" aria-labelledby="',A,'" onmousedown="return false;"'],t=d.config.toolbarStartupExpanded!==false,x;m.push(t?">":' style="display:none">');m.push('<span id="',A,'" class="cke_voice_label">',d.lang.toolbars,"</span>");var s=d.toolbox.toolbars,n=(d.config.toolbar instanceof Array)?d.config.toolbar:d.config["toolbar_"+d.config.toolbar];for(var p=0;p<n.length;p++){var o,l=0,f,j=n[p],q;if(!j){continue}if(x){m.push("</div>");x=0}if(j==="/"){m.push('<div class="cke_break"></div>');continue}q=j.items||j;for(var v=0;v<q.length;v++){var z,w=q[v],y;z=d.ui.create(w);if(z){y=z.canGroup!==false;if(!l){o=CKEDITOR.tools.getNextId();l={id:o,items:[]};f=j.name&&(d.lang.toolbarGroups[j.name]||j.name);m.push('<span id="',o,'" class="cke_toolbar"',(f?' aria-labelledby="'+o+'_label"':""),' role="toolbar">');f&&m.push('<span id="',o,'_label" class="cke_voice_label">',f,"</span>");m.push('<span class="cke_toolbar_start"></span>');var h=s.push(l)-1;if(h>0){l.previous=s[h-1];l.previous.next=l}}if(y){if(!x){m.push('<span class="cke_toolgroup" role="presentation">');x=1}}else{if(x){m.push("</span>");x=0}}var k=z.render(d,m);h=l.items.push(k)-1;if(h>0){k.previous=l.items[h-1];k.previous.next=k}k.toolbar=l;k.onkey=c;k.onfocus=function(){if(!d.toolbox.focusCommandExecuted){d.focus()}}}}if(x){m.push("</span>");x=0}if(l){m.push('<span class="cke_toolbar_end"></span></span>')}}m.push("</div>");if(d.config.toolbarCanCollapse){var B=CKEDITOR.tools.addFunction(function(){d.execCommand("toolbarCollapse")});d.on("destroy",function(){CKEDITOR.tools.removeFunction(B)});var g=CKEDITOR.tools.getNextId();d.addCommand("toolbarCollapse",{readOnly:1,exec:function(D){var F=CKEDITOR.document.getById(g),E=F.getPrevious(),r=D.getThemeSpace("contents"),G=E.getParent(),H=parseInt(r.$.style.height,10),i=G.$.offsetHeight,C=!E.isVisible();if(!C){E.hide();F.addClass("cke_toolbox_collapser_min");F.setAttribute("title",D.lang.toolbarExpand)}else{E.show();F.removeClass("cke_toolbox_collapser_min");F.setAttribute("title",D.lang.toolbarCollapse)}F.getFirst().setText(C?"\u25B2":"\u25C0");var I=G.$.offsetHeight-i;r.setStyle("height",(H-I)+"px");D.fire("resize")},modes:{wysiwyg:1,source:1}});m.push('<a title="'+(t?d.lang.toolbarCollapse:d.lang.toolbarExpand)+'" id="'+g+'" tabIndex="-1" class="cke_toolbox_collapser');if(!t){m.push(" cke_toolbox_collapser_min")}m.push('" onclick="CKEDITOR.tools.callFunction('+B+')">',"<span>▲</span>","</a>")}u.data.html+=m.join("")}});d.on("destroy",function(){var k,h=0,j,g,f;k=this.toolbox.toolbars;for(;h<k.length;h++){g=k[h].items;for(j=0;j<g.length;j++){f=g[j];if(f.clickFn){CKEDITOR.tools.removeFunction(f.clickFn)}if(f.keyDownFn){CKEDITOR.tools.removeFunction(f.keyDownFn)}}}});d.addCommand("toolbarFocus",a.toolbarFocus);d.ui.add("-",CKEDITOR.UI_SEPARATOR,{});d.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(g,f){f.push('<span class="cke_separator" role="separator"></span>');return{}}}}})}})})();CKEDITOR.UI_SEPARATOR="separator";CKEDITOR.config.toolbarLocation="top";CKEDITOR.config.toolbar_Basic=[["Bold","Italic","-","NumberedList","BulletedList","-","Link","Unlink","-","About"]];CKEDITOR.config.toolbar_Full=[{name:"document",items:["Source","-","Save","NewPage","DocProps","Preview","Print","-","Templates"]},{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"editing",items:["Find","Replace","-","SelectAll","-","SpellChecker","Scayt"]},{name:"forms",items:["Form","Checkbox","Radio","TextField","Textarea","Select","Button","ImageButton","HiddenField"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak","Iframe"]},"/",{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},{name:"tools",items:["Maximize","ShowBlocks","-","About"]}];CKEDITOR.config.toolbar="Full";CKEDITOR.config.toolbarCanCollapse=true;
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){CKEDITOR.plugins.add("undo",{requires:["selection","wysiwygarea"],init:function(h){var k=new f(h);var g=h.addCommand("undo",{exec:function(){if(k.undo()){h.selectionChange();this.fire("afterUndo")}},state:CKEDITOR.TRISTATE_DISABLED,canUndo:false});var i=h.addCommand("redo",{exec:function(){if(k.redo()){h.selectionChange();this.fire("afterRedo")}},state:CKEDITOR.TRISTATE_DISABLED,canUndo:false});k.onChange=function(){g.setState(k.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);i.setState(k.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};function j(l){if(k.enabled&&l.data.command.canUndo!==false){k.save()}}h.on("beforeCommandExec",j);h.on("afterCommandExec",j);h.on("saveSnapshot",function(l){k.save(l.data&&l.data.contentOnly)});h.on("contentDom",function(){h.document.on("keydown",function(l){if(!l.data.$.ctrlKey&&!l.data.$.metaKey){k.type(l)}})});h.on("beforeModeUnload",function(){h.mode=="wysiwyg"&&k.save(true)});h.on("mode",function(){k.enabled=h.readOnly?false:h.mode=="wysiwyg";k.onChange()});h.ui.addButton("Undo",{label:h.lang.undo,command:"undo"});h.ui.addButton("Redo",{label:h.lang.redo,command:"redo"});h.resetUndo=function(){k.reset();h.fire("saveSnapshot")};h.on("updateSnapshot",function(){if(k.currentImage){k.update()}})}});CKEDITOR.plugins.undo={};var c=CKEDITOR.plugins.undo.Image=function(h){this.editor=h;h.fire("beforeUndoImage");var i=h.getSnapshot(),g=i&&h.getSelection();CKEDITOR.env.ie&&i&&(i=i.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=i;this.bookmarks=g&&g.createBookmarks2(true);h.fire("afterUndoImage")};var e=/\b(?:href|src|name)="[^"]*?"/gi;c.prototype={equals:function(p,k){var n=this.contents,o=p.contents;if(CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)){n=n.replace(e,"");o=o.replace(e,"")}if(n!=o){return false}if(k){return true}var h=this.bookmarks,g=p.bookmarks;if(h||g){if(!h||!g||h.length!=g.length){return false}for(var m=0;m<h.length;m++){var l=h[m],j=g[m];if(l.startOffset!=j.startOffset||l.endOffset!=j.endOffset||!CKEDITOR.tools.arrayCompare(l.start,j.start)||!CKEDITOR.tools.arrayCompare(l.end,j.end)){return false}}}return true}};function f(g){this.editor=g;this.reset()}var b={8:1,46:1},d={16:1,17:1,18:1},a={37:1,38:1,39:1,40:1};f.prototype={type:function(j){var o=j&&j.data.getKey(),g=o in d,k=o in b,p=this.lastKeystroke in b,q=k&&o==this.lastKeystroke,n=o in a,r=this.lastKeystroke in a,i=(!k&&!n),h=(k&&!q),m=!(g||this.typing)||(i&&(p||r));if(m||h){var l=new c(this.editor);CKEDITOR.tools.setTimeout(function(){var s=this.editor.getSnapshot();if(CKEDITOR.env.ie){s=s.replace(/\s+data-cke-expando=".*?"/g,"")}if(l.contents!=s){this.typing=true;if(!this.save(false,l,false)){this.snapshots.splice(this.index+1,this.snapshots.length-this.index-1)}this.hasUndo=true;this.hasRedo=false;this.typesCount=1;this.modifiersCount=1;this.onChange()}},0,this)}this.lastKeystroke=o;if(k){this.typesCount=0;this.modifiersCount++;if(this.modifiersCount>25){this.save(false,null,false);this.modifiersCount=1}}else{if(!n){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1}}}},reset:function(){this.lastKeystroke=0;this.snapshots=[];this.index=-1;this.limit=this.editor.config.undoStackSize||20;this.currentImage=null;this.hasUndo=false;this.hasRedo=false;this.resetType()},resetType:function(){this.typing=false;delete this.lastKeystroke;this.typesCount=0;this.modifiersCount=0},fireChange:function(){this.hasUndo=!!this.getNextImage(true);this.hasRedo=!!this.getNextImage(false);this.resetType();this.onChange()},save:function(g,i,j){var h=this.snapshots;if(!i){i=new c(this.editor)}if(i.contents===false){return false}if(this.currentImage&&i.equals(this.currentImage,g)){return false}h.splice(this.index+1,h.length-this.index-1);if(h.length==this.limit){h.shift()}this.index=h.push(i)-1;this.currentImage=i;if(j!==false){this.fireChange()}return true},restoreImage:function(g){this.editor.loadSnapshot(g.contents);if(g.bookmarks){this.editor.getSelection().selectBookmarks(g.bookmarks)}else{if(CKEDITOR.env.ie){var h=this.editor.document.getBody().$.createTextRange();h.collapse(true);h.select()}}this.index=g.index;this.update();this.fireChange()},getNextImage:function(g){var k=this.snapshots,j=this.currentImage,l,h;if(j){if(g){for(h=this.index-1;h>=0;h--){l=k[h];if(!j.equals(l,true)){l.index=h;return l}}}else{for(h=this.index+1;h<k.length;h++){l=k[h];if(!j.equals(l,true)){l.index=h;return l}}}}return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(true);var g=this.getNextImage(true);if(g){return this.restoreImage(g),true}}return false},redo:function(){if(this.redoable()){this.save(true);if(this.redoable()){var g=this.getNextImage(false);if(g){return this.restoreImage(g),true}}}return false},update:function(){this.snapshots.splice(this.index,1,(this.currentImage=new c(this.editor)))}}})();
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){var m=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;var f=CKEDITOR.dom.walker.whitespaces(true);function g(q){return q.isBlockBoundary()&&CKEDITOR.dtd.$empty[q.getName()]}function n(q){return function(r){if(this.mode=="wysiwyg"){this.focus();this.fire("saveSnapshot");q.call(this,r.data);CKEDITOR.tools.setTimeout(function(){this.fire("saveSnapshot")},0,this)}}}function o(r){if(this.dataProcessor){r=this.dataProcessor.toHtml(r)}if(!r){return}var w=this.getSelection(),t=w.getRanges()[0];if(t.checkReadOnly()){return}if(CKEDITOR.env.opera){var y=new CKEDITOR.dom.elementPath(t.startContainer);if(y.block){var q=CKEDITOR.htmlParser.fragment.fromHtml(r,false).children;for(var s=0,u=q.length;s<u;s++){if(q[s]._.isBlockLike){t.splitBlock(this.enterMode==CKEDITOR.ENTER_DIV?"div":"p");t.insertNode(t.document.createText(""));t.select();break}}}}if(CKEDITOR.env.ie){var z=w.isLocked;if(z){w.unlock()}var v=w.getNative();if(v.type=="Control"){v.clear()}else{if(w.getType()==CKEDITOR.SELECTION_TEXT){t=w.getRanges()[0];var x=t&&t.endContainer;if(x&&x.type==CKEDITOR.NODE_ELEMENT&&x.getAttribute("contenteditable")=="false"&&t.checkBoundaryOfElement(x,CKEDITOR.END)){t.setEndAfter(t.endContainer);t.deleteContents()}}}v.createRange().pasteHTML(r);if(z){this.getSelection().lock()}}else{this.document.$.execCommand("inserthtml",false,r)}if(CKEDITOR.env.webkit){w=this.getSelection();w.scrollIntoView()}}function i(x){var v=this.getSelection(),t=v.getStartElement().hasAscendant("pre",true)?CKEDITOR.ENTER_BR:this.config.enterMode,u=t==CKEDITOR.ENTER_BR;var s=CKEDITOR.tools.htmlEncode(x.replace(/\r\n|\r/g,"\n"));s=s.replace(/^[ \t]+|[ \t]+$/g,function(A,C,B){if(A.length==1){return" "}else{if(!C){return CKEDITOR.tools.repeat(" ",A.length-1)+" "}else{return" "+CKEDITOR.tools.repeat(" ",A.length-1)}}});s=s.replace(/[ \t]{2,}/g,function(A){return CKEDITOR.tools.repeat(" ",A.length-1)+" "});var w=t==CKEDITOR.ENTER_P?"p":"div";if(!u){s=s.replace(/(\n{2})([\s\S]*?)(?:$|\1)/g,function(B,A,C){return"<"+w+">"+C+"</"+w+">"})}s=s.replace(/\n/g,"<br>");if(!(u||CKEDITOR.env.ie)){s=s.replace(new RegExp("<br>(?=</"+w+">)"),function(A){return CKEDITOR.tools.repeat(A,2)})}if(CKEDITOR.env.gecko||CKEDITOR.env.webkit){var z=new CKEDITOR.dom.elementPath(v.getStartElement()),q=[];for(var r=0;r<z.elements.length;r++){var y=z.elements[r].getName();if(y in CKEDITOR.dtd.$inline){q.unshift(z.elements[r].getOuterHtml().match(/^<.*?>/))}else{if(y in CKEDITOR.dtd.$block){break}}}s=q.join("")+s}o.call(this,s)}function h(v){var C=this.getSelection(),r=C.getRanges(),E=v.getName(),t=CKEDITOR.dtd.$block[E];var D=C.isLocked;if(D){C.unlock()}var x,B,A,z;for(var u=r.length-1;u>=0;u--){x=r[u];if(!x.checkReadOnly()){x.deleteContents(1);B=!u&&v||v.clone(1);var y,q;if(t){while((y=x.getCommonAncestor(0,1))&&(q=CKEDITOR.dtd[y.getName()])&&!(q&&q[E])){if(y.getName() in CKEDITOR.dtd.span){x.splitElement(y)}else{if(x.checkStartOfBlock()&&x.checkEndOfBlock()){x.setStartBefore(y);x.collapse(true);y.remove()}else{x.splitBlock()}}}}x.insertNode(B);if(!A){A=B}}}if(A){x.moveToPosition(A,CKEDITOR.POSITION_AFTER_END);if(t){var w=A.getNext(f),s=w&&w.type==CKEDITOR.NODE_ELEMENT&&w.getName();if(s&&CKEDITOR.dtd.$block[s]&&CKEDITOR.dtd[s]["#"]){x.moveToElementEditStart(w)}}}C.selectRanges([x]);if(D){this.getSelection().lock()}}function k(q){if(!q.checkDirty()){setTimeout(function(){q.resetDirty()},0)}}var l=CKEDITOR.dom.walker.whitespaces(true),d=CKEDITOR.dom.walker.bookmark(false,true);function b(q){return l(q)&&d(q)}function e(q){return q.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(q.getText()).match(/^(?: |\xa0)$/)}function c(q){if(q.isLocked){q.unlock();setTimeout(function(){q.lock()},0)}}function j(q){return q.getOuterHtml().match(m)}l=CKEDITOR.dom.walker.whitespaces(true);function a(z){var y=z.window,B=z.document,w=z.document.getBody(),u=w.getFirst(),v=w.getChildren().count();if(!v||v==1&&u.type==CKEDITOR.NODE_ELEMENT&&u.hasAttribute("_moz_editor_bogus_node")){k(z);var A=z.element.getDocument();var t=A.getDocumentElement();var r=t.$.scrollTop;var s=t.$.scrollLeft;var q=B.$.createEvent("KeyEvents");q.initKeyEvent("keypress",true,true,y.$,false,false,false,false,0,32);B.$.dispatchEvent(q);if(r!=t.$.scrollTop||s!=t.$.scrollLeft){A.getWindow().$.scrollTo(s,r)}v&&w.getFirst().remove();B.getBody().appendBogus();var x=new CKEDITOR.dom.range(B);x.setStartAt(w,CKEDITOR.POSITION_AFTER_START);x.select()}}function p(D){var y=D.editor,F=D.data.path,A=F.blockLimit,C=D.data.selection,v=C.getRanges()[0],x=y.document.getBody(),B=y.config.enterMode;if(CKEDITOR.env.gecko){a(y);var E=F.block||F.blockLimit,q=E&&E.getLast(b);if(E&&E.isBlockBoundary()&&!(q&&q.type==CKEDITOR.NODE_ELEMENT&&q.isBlockBoundary())&&!E.is("pre")&&!E.getBogus()){E.appendBogus()}}if(y.config.autoParagraph!==false&&B!=CKEDITOR.ENTER_BR&&v.collapsed&&A.getName()=="body"&&!F.block){var s=v.fixBlock(true,y.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p");if(CKEDITOR.env.ie){var u=s.getFirst(b);u&&e(u)&&u.remove()}if(j(s)){var t=s.getNext(l);if(t&&t.type==CKEDITOR.NODE_ELEMENT&&!g(t)){v.moveToElementEditStart(t);s.remove()}else{t=s.getPrevious(l);if(t&&t.type==CKEDITOR.NODE_ELEMENT&&!g(t)){v.moveToElementEditEnd(t);s.remove()}}}v.select();D.cancel()}var r=new CKEDITOR.dom.range(y.document);r.moveToElementEditEnd(y.document.getBody());var w=new CKEDITOR.dom.elementPath(r.startContainer);if(!w.blockLimit.is("body")){var z;if(B!=CKEDITOR.ENTER_BR){z=x.append(y.document.createElement(B==CKEDITOR.ENTER_P?"p":"div"))}else{z=x}if(!CKEDITOR.env.ie){z.appendBogus()}}}CKEDITOR.plugins.add("wysiwygarea",{requires:["editingblock"],init:function(u){var x=(u.config.enterMode!=CKEDITOR.ENTER_BR&&u.config.autoParagraph!==false)?u.config.enterMode==CKEDITOR.ENTER_DIV?"div":"p":false;var r=u.lang.editorTitle.replace("%1",u.name);var v;u.on("editingBlockReady",function(){var H,z,C,D,G,E;var A=CKEDITOR.env.isCustomDomain();var B=function(J){if(z){z.remove()}var K="document.open();"+(A?('document.domain="'+document.domain+'";'):"")+"document.close();";K=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(K)+"}())":"";z=CKEDITOR.dom.element.createFromHtml('<iframe style="width:100%;height:100%" frameBorder="0" title="'+r+'" src="'+K+'" tabIndex="'+(CKEDITOR.env.webkit?-1:u.tabIndex)+'" allowTransparency="true"></iframe>');if(document.location.protocol=="chrome:"){CKEDITOR.event.useCapture=true}z.on("load",function(L){G=1;L.removeListener();var M=z.getFrameDocument();M.write(J);CKEDITOR.env.air&&F(M.getWindow().$)});if(document.location.protocol=="chrome:"){CKEDITOR.event.useCapture=false}H.append(z)};v=CKEDITOR.tools.addFunction(F);var I='<script id="cke_actscrpt" type="text/javascript" data-cke-temp="1">'+(A?('document.domain="'+document.domain+'";'):"")+"window.parent.CKEDITOR.tools.callFunction( "+v+", window );<\/script>";function F(M){if(!G){return}G=0;u.fire("ariaWidget",z);var S=M.document,N=S.body;var Q=S.getElementById("cke_actscrpt");Q&&Q.parentNode.removeChild(Q);N.spellcheck=!u.config.disableNativeSpellChecker;var K=!u.readOnly;if(CKEDITOR.env.ie){N.hideFocus=true;N.disabled=true;N.contentEditable=K;N.removeAttribute("disabled")}else{setTimeout(function(){if(CKEDITOR.env.gecko&&CKEDITOR.env.version>=10900||CKEDITOR.env.opera){S.$.body.contentEditable=K}else{if(CKEDITOR.env.webkit){S.$.body.parentNode.contentEditable=K}else{S.$.designMode=K?"off":"on"}}},0)}K&&CKEDITOR.env.gecko&&CKEDITOR.tools.setTimeout(a,0,null,u);M=u.window=new CKEDITOR.dom.window(M);S=u.document=new CKEDITOR.dom.document(S);K&&S.on("dblclick",function(T){var U=T.data.getTarget(),V={element:U,dialog:""};u.fire("doubleclick",V);V.dialog&&u.openDialog(V.dialog)});CKEDITOR.env.ie&&S.on("click",function(T){var U=T.data.getTarget();if(U.is("input")){var V=U.getAttribute("type");if(V=="submit"||V=="reset"){T.data.preventDefault()}}});if(!(CKEDITOR.env.ie||CKEDITOR.env.opera)){S.on("mousedown",function(T){var U=T.data.getTarget();if(U.is("img","hr","input","textarea","select")){u.getSelection().selectElement(U)}})}if(CKEDITOR.env.gecko){S.on("mouseup",function(U){if(U.data.$.button==2){var V=U.data.getTarget();if(!V.getOuterHtml().replace(m,"")){var T=new CKEDITOR.dom.range(S);T.moveToElementEditStart(V);T.select(true)}}})}S.on("click",function(T){T=T.data;if(T.getTarget().is("a")&&T.$.button!=2){T.preventDefault()}});if(CKEDITOR.env.webkit){S.on("mousedown",function(){P=1});S.on("click",function(T){if(T.data.getTarget().is("input","select")){T.data.preventDefault()}});S.on("mouseup",function(T){if(T.data.getTarget().is("input","textarea")){T.data.preventDefault()}})}if(K&&CKEDITOR.env.ie&&S.$.compatMode=="CSS1Compat"||CKEDITOR.env.gecko||CKEDITOR.env.opera){var L=S.getDocumentElement();L.on("mousedown",function(T){if(T.data.getTarget().equals(L)){if(CKEDITOR.env.gecko&&CKEDITOR.env.version>=10900){t()}s.focus()}})}var R=CKEDITOR.env.ie?z:M;R.on("blur",function(){u.focusManager.blur()});var P;R.on("focus",function(){var T=u.document;if(K&&CKEDITOR.env.gecko&&CKEDITOR.env.version>=10900){t()}else{if(CKEDITOR.env.opera){T.getBody().focus()}else{if(CKEDITOR.env.webkit){if(!P){u.document.getDocumentElement().focus();P=1}}}}u.focusManager.focus()});var O=u.keystrokeHandler;O.blockedKeystrokes[8]=!K;O.attach(S);S.getDocumentElement().addClass(S.$.compatMode);K&&S.on("keydown",function(T){var X=T.data.getKeystroke();if(X in {8:1,46:1}){var W=u.getSelection(),V=W.getSelectedElement(),U=W.getRanges()[0];if(V){u.fire("saveSnapshot");U.moveToPosition(V,CKEDITOR.POSITION_BEFORE_START);V.remove();U.select();u.fire("saveSnapshot");T.data.preventDefault();return}}});if(CKEDITOR.env.ie&&S.$.compatMode=="CSS1Compat"){var J={33:1,34:1};S.on("keydown",function(T){if(T.data.getKeystroke() in J){setTimeout(function(){u.getSelection().scrollIntoView()},0)}})}if(CKEDITOR.env.ie&&u.config.enterMode!=CKEDITOR.ENTER_P){S.on("selectionchange",function(){var T=S.getBody(),U=u.getSelection().getRanges()[0];if(T.getHtml().match(/^<p> <\/p>$/i)&&U.startContainer.equals(T)){setTimeout(function(){U=u.getSelection().getRanges()[0];if(!U.startContainer.equals("body")){T.getFirst().remove(1);U.moveToElementEditEnd(T);U.select(1)}},0)}})}if(u.contextMenu){u.contextMenu.addTarget(S,u.config.browserContextMenuOnCtrl!==false)}setTimeout(function(){u.fire("contentDom");if(E){u.mode="wysiwyg";u.fire("mode",{previousMode:u._.previousMode});E=false}C=false;if(D){u.focus();D=false}setTimeout(function(){u.fire("dataReady")},0);try{u.document.$.execCommand("enableInlineTableEditing",false,!u.config.disableNativeTableHandles)}catch(T){}if(u.config.disableObjectResizing){try{u.document.$.execCommand("enableObjectResizing",false,false)}catch(T){u.document.getBody().on(CKEDITOR.env.ie?"resizestart":"resize",function(U){U.data.preventDefault()})}}if(CKEDITOR.env.ie){setTimeout(function(){if(u.document){var U=u.document.$.body;U.runtimeStyle.marginBottom="0px";U.runtimeStyle.marginBottom=""}},1000)}},0)}u.addMode("wysiwyg",{load:function(J,K,L){H=J;if(CKEDITOR.env.ie&&CKEDITOR.env.quirks){J.setStyle("position","relative")}u.mayBeDirty=true;E=true;if(L){this.loadSnapshotData(K)}else{this.loadData(K)}},loadData:function(N){C=true;u._.dataStore={id:1};var L=u.config,J=L.fullPage,O=L.docType;var M='<style type="text/css" data-cke-temp="1">'+u._.styles.join("\n")+"</style>";!J&&(M=CKEDITOR.tools.buildStyleHtml(u.config.contentsCss)+M);var K=L.baseHref?'<base href="'+L.baseHref+'" data-cke-temp="1" />':"";if(J){N=N.replace(/<!DOCTYPE[^>]*>/i,function(P){u.docType=O=P;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(P){u.xmlDeclaration=P;return""})}if(u.dataProcessor){N=u.dataProcessor.toHtml(N,x)}if(J){if(!(/<body[\s|>]/).test(N)){N="<body>"+N}if(!(/<html[\s|>]/).test(N)){N="<html>"+N+"</html>"}if(!(/<head[\s|>]/).test(N)){N=N.replace(/<html[^>]*>/,"$&<head><title></title></head>")}else{if(!(/<title[\s|>]/).test(N)){N=N.replace(/<head[^>]*>/,"$&<title></title>")}}K&&(N=N.replace(/<head>/,"$&"+K));N=N.replace(/<\/head\s*>/,M+"$&");N=O+N}else{N=L.docType+'<html dir="'+L.contentsLangDirection+'" lang="'+(L.contentsLanguage||u.langCode)+'"><head><title>'+r+"</title>"+K+M+"</head><body"+(L.bodyId?' id="'+L.bodyId+'"':"")+(L.bodyClass?' class="'+L.bodyClass+'"':"")+">"+N+"</html>"}if(CKEDITOR.env.gecko){N=N.replace(/<br \/>(?=\s*<\/(:?html|body)>)/,'$&<br type="_moz" />')}N+=I;this.onDispose();B(N)},getData:function(){var L=u.config,K=L.fullPage,O=K&&u.docType,J=K&&u.xmlDeclaration,N=z.getFrameDocument();var M=K?N.getDocumentElement().getOuterHtml():N.getBody().getHtml();if(CKEDITOR.env.gecko){M=M.replace(/<br>(?=\s*(:?$|<\/body>))/,"")}if(u.dataProcessor){M=u.dataProcessor.toDataFormat(M,x)}if(L.ignoreEmptyParagraph){M=M.replace(m,function(P,Q){return Q})}if(J){M=J+"\n"+M}if(O){M=O+"\n"+M}return M},getSnapshotData:function(){return z.getFrameDocument().getBody().getHtml()},loadSnapshotData:function(J){z.getFrameDocument().getBody().setHtml(J)},onDispose:function(){if(!u.document){return}u.document.getDocumentElement().clearCustomData();u.document.getBody().clearCustomData();u.window.clearCustomData();u.document.clearCustomData();z.clearCustomData();z.remove()},unload:function(J){this.onDispose();u.window=u.document=z=H=D=null;u.fire("contentDomUnload")},focus:function(){var J=u.window;if(C){D=true}else{if(J){CKEDITOR.env.air?setTimeout(function(){J.focus()},0):J.focus();u.selectionChange()}}}});u.on("insertHtml",n(o),null,null,20);u.on("insertElement",n(h),null,null,20);u.on("insertText",n(i),null,null,20);u.on("selectionChange",function(J){if(u.readOnly){return}var L=u.getSelection();if(L&&!L.isLocked){var K=u.checkDirty();u.fire("saveSnapshot",{contentOnly:1});p.call(this,J);u.fire("updateSnapshot");!K&&u.resetDirty()}},null,null,1)});var q;u.on("contentDom",function(){var z=u.document.getElementsByTag("title").getItem(0);z.data("cke-title",u.document.$.title);u.document.$.title=r});u.on("readOnly",function(){if(u.mode=="wysiwyg"){var z=u.getMode();z.loadData(z.getData())}});if(CKEDITOR.document.$.documentMode>=8){u.addCss("html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}");var w=[];for(var y in CKEDITOR.dtd.$removeEmpty){w.push("html.CSS1Compat "+y+"[contenteditable=false]")}u.addCss(w.join(",")+"{ display:inline-block;}")}else{if(CKEDITOR.env.gecko){u.addCss("html { height: 100% !important; }");u.addCss("img:-moz-broken { -moz-force-broken-image-icon : 1; width : 24px; height : 24px; }")}}u.addCss("html { _overflow-y: scroll; cursor: text; *cursor:auto;}");u.addCss("img, input, textarea { cursor: default;}");function t(z){if(u.readOnly){return}CKEDITOR.tools.tryThese(function(){u.document.$.designMode="on";setTimeout(function(){u.document.$.designMode="off";if(CKEDITOR.currentInstance==u){u.document.getBody().focus()}},50)},function(){u.document.$.designMode="off";var A=u.document.getBody();A.setAttribute("contentEditable",false);A.setAttribute("contentEditable",true);!z&&t(1)})}if(CKEDITOR.env.gecko||CKEDITOR.env.ie||CKEDITOR.env.opera){var s;u.on("uiReady",function(){s=u.container.append(CKEDITOR.dom.element.createFromHtml('<span tabindex="-1" style="position:absolute;" role="presentation"></span>'));s.on("focus",function(){u.focus()});u.focusGrabber=s});u.on("destroy",function(){CKEDITOR.tools.removeFunction(v);s.clearCustomData();delete u.focusGrabber})}u.on("insertElement",function(z){var B=z.data;if(B.type==CKEDITOR.NODE_ELEMENT&&(B.is("input")||B.is("textarea"))){var A=B.getAttribute("contenteditable")=="false";if(!A){B.data("cke-editable",B.hasAttribute("contenteditable")?"true":"1");B.setAttribute("contenteditable",false)}}})}});if(CKEDITOR.env.gecko){(function(){var q=document.body;if(!q){window.addEventListener("load",arguments.callee,false)}else{var r=q.getAttribute("onpageshow");q.setAttribute("onpageshow",(r?r+";":"")+'event.persisted && (function(){var allInstances = CKEDITOR.instances, editor, doc;for ( var i in allInstances ){ editor = allInstances[ i ]; doc = editor.document; if ( doc ) { doc.$.designMode = "off"; doc.$.designMode = "on"; }}})();')}})()}})();CKEDITOR.config.disableObjectResizing=false;CKEDITOR.config.disableNativeTableHandles=true;CKEDITOR.config.disableNativeSpellChecker=true;CKEDITOR.config.ignoreEmptyParagraph=true;
|
@@ -0,0 +1,988 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
/* Restore the dialog visibility */
|
7
|
+
body .cke_dialog
|
8
|
+
{
|
9
|
+
visibility: visible;
|
10
|
+
}
|
11
|
+
|
12
|
+
/* Force Gecko to consider table as positioned */
|
13
|
+
.cke_skin_kama table.cke_dialog.cke_browser_gecko
|
14
|
+
{
|
15
|
+
display:block;
|
16
|
+
}
|
17
|
+
|
18
|
+
.cke_skin_kama .cke_dialog_body
|
19
|
+
{
|
20
|
+
z-index: 1;
|
21
|
+
border: solid 1px #ddd;
|
22
|
+
padding: 5px;
|
23
|
+
background-color: #fff;
|
24
|
+
-moz-border-radius: 5px;
|
25
|
+
-webkit-border-radius: 5px;
|
26
|
+
border-radius: 5px;
|
27
|
+
|
28
|
+
/* 'cke_dialog' element has been fixed positioned in all but IE6, while we
|
29
|
+
need it to be positioned to hold e.g. close button. */
|
30
|
+
position: relative;
|
31
|
+
_position: static;
|
32
|
+
}
|
33
|
+
|
34
|
+
.cke_skin_kama .cke_dialog_tl,
|
35
|
+
.cke_skin_kama .cke_dialog_tr,
|
36
|
+
.cke_skin_kama .cke_dialog_tc,
|
37
|
+
.cke_skin_kama .cke_dialog_bl,
|
38
|
+
.cke_skin_kama .cke_dialog_br,
|
39
|
+
.cke_skin_kama .cke_dialog_bc,
|
40
|
+
.cke_skin_kama .cke_dialog_ml,
|
41
|
+
.cke_skin_kama .cke_dialog_mr
|
42
|
+
{
|
43
|
+
display:none;
|
44
|
+
}
|
45
|
+
|
46
|
+
.cke_skin_kama .cke_dialog_title
|
47
|
+
{
|
48
|
+
font-weight: bold;
|
49
|
+
font-size: 14px;
|
50
|
+
padding: 3px 3px 8px;
|
51
|
+
cursor: move;
|
52
|
+
position: relative;
|
53
|
+
border-bottom: 1px solid #eee;
|
54
|
+
}
|
55
|
+
|
56
|
+
.cke_skin_kama .cke_browser_iequirks .cke_dialog_title,
|
57
|
+
.cke_skin_kama .cke_browser_ie6 .cke_dialog_title,
|
58
|
+
.cke_skin_kama .cke_browser_ie7 .cke_dialog_title
|
59
|
+
{
|
60
|
+
margin-bottom: 22px;
|
61
|
+
}
|
62
|
+
|
63
|
+
.cke_skin_kama .cke_browser_iequirks.cke_single_page .cke_dialog_title,
|
64
|
+
.cke_skin_kama .cke_browser_ie6.cke_single_page .cke_dialog_title,
|
65
|
+
.cke_skin_kama .cke_browser_ie7.cke_single_page .cke_dialog_title
|
66
|
+
{
|
67
|
+
margin-bottom: 10px;
|
68
|
+
}
|
69
|
+
|
70
|
+
.cke_skin_kama .cke_dialog_contents
|
71
|
+
{
|
72
|
+
background-color: #ebebeb;
|
73
|
+
border: solid 1px #fff;
|
74
|
+
border-bottom: none;
|
75
|
+
overflow: auto;
|
76
|
+
padding: 17px 10px 5px 10px;
|
77
|
+
-moz-border-radius-topleft: 5px;
|
78
|
+
-moz-border-radius-topright: 5px;
|
79
|
+
-webkit-border-top-left-radius: 5px;
|
80
|
+
-webkit-border-top-right-radius: 5px;
|
81
|
+
border-top-left-radius: 5px;
|
82
|
+
border-top-right-radius: 5px;
|
83
|
+
margin-top: 22px;
|
84
|
+
}
|
85
|
+
|
86
|
+
.cke_skin_kama .cke_dialog_footer
|
87
|
+
{
|
88
|
+
text-align: right;
|
89
|
+
background-color: #ebebeb;
|
90
|
+
border: solid 1px #fff;
|
91
|
+
border-bottom: none;
|
92
|
+
-moz-border-radius-bottomleft: 5px;
|
93
|
+
-moz-border-radius-bottomright: 5px;
|
94
|
+
-webkit-border-bottom-left-radius: 5px;
|
95
|
+
-webkit-border-bottom-right-radius: 5px;
|
96
|
+
border-bottom-left-radius: 5px;
|
97
|
+
border-bottom-right-radius: 5px;
|
98
|
+
}
|
99
|
+
|
100
|
+
.cke_skin_kama .cke_rtl .cke_dialog_footer
|
101
|
+
{
|
102
|
+
text-align: left;
|
103
|
+
}
|
104
|
+
|
105
|
+
.cke_skin_kama .cke_dialog_footer .cke_resizer
|
106
|
+
{
|
107
|
+
margin-top: 20px;
|
108
|
+
}
|
109
|
+
.cke_skin_kama .cke_browser_iequirks .cke_dialog_footer .cke_resizer,
|
110
|
+
.cke_skin_kama .cke_browser_ie6 .cke_dialog_footer .cke_resizer
|
111
|
+
{
|
112
|
+
margin-top: 27px;
|
113
|
+
}
|
114
|
+
|
115
|
+
/* tabs */
|
116
|
+
|
117
|
+
.cke_skin_kama .cke_dialog_tabs
|
118
|
+
{
|
119
|
+
height: 23px;
|
120
|
+
display: inline-block;
|
121
|
+
_display: block;
|
122
|
+
margin-left:10px;
|
123
|
+
margin-right:10px;
|
124
|
+
margin-top: 11px;
|
125
|
+
position: absolute;
|
126
|
+
z-index: 2;
|
127
|
+
}
|
128
|
+
|
129
|
+
.cke_skin_kama .cke_browser_iequirks .cke_dialog_tabs,
|
130
|
+
.cke_skin_kama .cke_browser_ie6 .cke_dialog_tabs,
|
131
|
+
.cke_skin_kama .cke_browser_ie7 .cke_dialog_tabs
|
132
|
+
{
|
133
|
+
top: 33px;
|
134
|
+
}
|
135
|
+
|
136
|
+
.cke_skin_kama .cke_rtl .cke_dialog_tabs
|
137
|
+
{
|
138
|
+
right: 10px;
|
139
|
+
}
|
140
|
+
|
141
|
+
.cke_skin_kama a.cke_dialog_tab,
|
142
|
+
.cke_skin_kama a:link.cke_dialog_tab,
|
143
|
+
.cke_skin_kama a:active.cke_dialog_tab,
|
144
|
+
.cke_skin_kama a:hover.cke_dialog_tab,
|
145
|
+
.cke_skin_kama a:visited.cke_dialog_tab
|
146
|
+
{
|
147
|
+
background-image: url(images/sprites.png);
|
148
|
+
background-repeat: repeat-x;
|
149
|
+
background-position: 0 -1323px;
|
150
|
+
|
151
|
+
background-color: #ebebeb;
|
152
|
+
height: 14px;
|
153
|
+
padding: 4px 8px;
|
154
|
+
display: inline-block;
|
155
|
+
cursor: pointer;
|
156
|
+
|
157
|
+
}
|
158
|
+
|
159
|
+
/* Gecko 1.8 layout workaround. */
|
160
|
+
.cke_skin_kama .cke_browser_gecko18 a.cke_dialog_tab,
|
161
|
+
.cke_skin_kama .cke_browser_gecko18 a:link.cke_dialog_tab,
|
162
|
+
.cke_skin_kama .cke_browser_gecko18 a:active.cke_dialog_tab,
|
163
|
+
.cke_skin_kama .cke_browser_gecko18 a:hover.cke_dialog_tab,
|
164
|
+
.cke_skin_kama .cke_browser_gecko18 a:visited.cke_dialog_tab
|
165
|
+
{
|
166
|
+
display: inline;
|
167
|
+
position: relative;
|
168
|
+
top: 6px;
|
169
|
+
}
|
170
|
+
|
171
|
+
.cke_skin_kama a:hover.cke_dialog_tab
|
172
|
+
{
|
173
|
+
background-color: #f1f1e3;
|
174
|
+
}
|
175
|
+
|
176
|
+
.cke_skin_kama .cke_hc a:hover.cke_dialog_tab
|
177
|
+
{
|
178
|
+
padding: 2px 6px !important;
|
179
|
+
border-width: 3px;
|
180
|
+
}
|
181
|
+
|
182
|
+
.cke_skin_kama a.cke_dialog_tab_selected,
|
183
|
+
.cke_skin_kama a:link.cke_dialog_tab_selected,
|
184
|
+
.cke_skin_kama a:active.cke_dialog_tab_selected,
|
185
|
+
.cke_skin_kama a:hover.cke_dialog_tab_selected,
|
186
|
+
.cke_skin_kama a:visited.cke_dialog_tab_selected
|
187
|
+
{
|
188
|
+
background-position: 0 -1279px;
|
189
|
+
cursor: default;
|
190
|
+
}
|
191
|
+
|
192
|
+
.cke_skin_kama .cke_hc a.cke_dialog_tab_selected,
|
193
|
+
.cke_skin_kama .cke_hc a:link.cke_dialog_tab_selected,
|
194
|
+
.cke_skin_kama .cke_hc a:active.cke_dialog_tab_selected,
|
195
|
+
.cke_skin_kama .cke_hc a:hover.cke_dialog_tab_selected,
|
196
|
+
.cke_skin_kama .cke_hc a:visited.cke_dialog_tab_selected
|
197
|
+
{
|
198
|
+
padding: 2px 6px !important;
|
199
|
+
border-width: 3px;
|
200
|
+
}
|
201
|
+
|
202
|
+
/* single_page */
|
203
|
+
|
204
|
+
.cke_skin_kama .cke_single_page .cke_dialog_tabs
|
205
|
+
{
|
206
|
+
display: none;
|
207
|
+
}
|
208
|
+
|
209
|
+
.cke_skin_kama .cke_single_page .cke_dialog_contents
|
210
|
+
{
|
211
|
+
padding-top: 5px;
|
212
|
+
margin-top: 10px;
|
213
|
+
}
|
214
|
+
|
215
|
+
/* IE7 + IE quirks */
|
216
|
+
.cke_skin_kama .cke_browser_ie7.cke_single_page .cke_dialog_contents
|
217
|
+
{
|
218
|
+
margin-top: 0px;
|
219
|
+
position: relative;
|
220
|
+
margin-bottom: -22px;
|
221
|
+
}
|
222
|
+
|
223
|
+
.cke_skin_kama .cke_dialog_ui_vbox table,
|
224
|
+
.cke_skin_kama .cke_dialog_ui_hbox table
|
225
|
+
{
|
226
|
+
margin: auto;
|
227
|
+
}
|
228
|
+
|
229
|
+
.cke_skin_kama .cke_dialog_ui_vbox_child
|
230
|
+
{
|
231
|
+
padding: 5px 0px;
|
232
|
+
}
|
233
|
+
|
234
|
+
.cke_skin_kama input.cke_dialog_ui_input_text,
|
235
|
+
.cke_skin_kama input.cke_dialog_ui_input_password
|
236
|
+
{
|
237
|
+
background-color: white;
|
238
|
+
border: none;
|
239
|
+
padding: 0px;
|
240
|
+
width: 100%;
|
241
|
+
height: 14px;
|
242
|
+
}
|
243
|
+
|
244
|
+
.cke_skin_kama div.cke_dialog_ui_input_text,
|
245
|
+
.cke_skin_kama div.cke_dialog_ui_input_password
|
246
|
+
{
|
247
|
+
background-color: white;
|
248
|
+
border: 1px solid #a0a0a0;
|
249
|
+
padding: 1px 0px;
|
250
|
+
/* IE6/Quirks - make sure the content does not overflow (#7321) */
|
251
|
+
_width: 99.9%;
|
252
|
+
}
|
253
|
+
|
254
|
+
/* Opera/IE doesn't leave enough padding in text input for cursor to blink in RTL. (#6087) */
|
255
|
+
.cke_skin_kama .cke_browser_ie.cke_rtl input.cke_dialog_ui_input_text,
|
256
|
+
.cke_skin_kama .cke_browser_opera.cke_rtl input.cke_dialog_ui_input_text,
|
257
|
+
.cke_skin_kama .cke_browser_ie.cke_rtl input.cke_dialog_ui_input_password,
|
258
|
+
.cke_skin_kama .cke_browser_opera.cke_rtl input.cke_dialog_ui_input_password
|
259
|
+
{
|
260
|
+
padding-right: 2px;
|
261
|
+
}
|
262
|
+
|
263
|
+
/* Compensate the padding added above on container. */
|
264
|
+
.cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_text,
|
265
|
+
.cke_skin_kama .cke_browser_opera.cke_rtl div.cke_dialog_ui_input_text,
|
266
|
+
.cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_password,
|
267
|
+
.cke_skin_kama .cke_browser_opera.cke_rtl div.cke_dialog_ui_input_password
|
268
|
+
{
|
269
|
+
padding-left: 2px;
|
270
|
+
}
|
271
|
+
|
272
|
+
.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_vbox_child,
|
273
|
+
.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_child,
|
274
|
+
.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_first,
|
275
|
+
.cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_last
|
276
|
+
{
|
277
|
+
padding-right: 2px !important;
|
278
|
+
}
|
279
|
+
|
280
|
+
.cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_text {
|
281
|
+
padding-right: 1px;
|
282
|
+
}
|
283
|
+
|
284
|
+
.cke_skin_kama .cke_browser_gecko.cke_hc div.cke_dialog_ui_input_text,
|
285
|
+
.cke_skin_kama .cke_browser_gecko.cke_hc div.cke_dialog_ui_input_password
|
286
|
+
{
|
287
|
+
border-width: 0px;
|
288
|
+
}
|
289
|
+
|
290
|
+
.cke_skin_kama .cke_browser_gecko18.cke_hc div.cke_dialog_ui_input_text,
|
291
|
+
.cke_skin_kama .cke_browser_gecko18.cke_hc div.cke_dialog_ui_input_password
|
292
|
+
{
|
293
|
+
border-width: 1px;
|
294
|
+
}
|
295
|
+
|
296
|
+
.cke_skin_kama textarea.cke_dialog_ui_input_textarea
|
297
|
+
{
|
298
|
+
background-color: white;
|
299
|
+
border: none;
|
300
|
+
padding: 0px;
|
301
|
+
width: 100%;
|
302
|
+
/*
|
303
|
+
* IE6 BUG: Scrollbars in textareas can overflow even if the outer DIV is set to overflow:hidden.
|
304
|
+
* So leave 1% width for the scrollbar. In most situations the 1% isn't noticeable by users.
|
305
|
+
*/
|
306
|
+
_width: 99%;
|
307
|
+
overflow: auto;
|
308
|
+
resize: none;
|
309
|
+
}
|
310
|
+
|
311
|
+
.cke_skin_kama div.cke_dialog_ui_input_textarea
|
312
|
+
{
|
313
|
+
background-color: white;
|
314
|
+
border: 1px solid #a0a0a0;
|
315
|
+
padding: 1px 0px;
|
316
|
+
}
|
317
|
+
|
318
|
+
.cke_skin_kama div.cke_disabled .cke_dialog_ui_labeled_content *
|
319
|
+
{
|
320
|
+
background-color : #a0a0a0;
|
321
|
+
cursor : default;
|
322
|
+
}
|
323
|
+
|
324
|
+
/* RTL + IE6: Input overflows dialog element. (#7321) */
|
325
|
+
.cke_skin_kama .cke_rtl .cke_dialog_ui_labeled_content
|
326
|
+
{
|
327
|
+
_width: 95%;
|
328
|
+
}
|
329
|
+
|
330
|
+
.cke_skin_kama .cke_dialog_ui_hbox
|
331
|
+
{
|
332
|
+
width: 100%;
|
333
|
+
}
|
334
|
+
|
335
|
+
.cke_skin_kama .cke_dialog_ui_hbox_first,
|
336
|
+
.cke_skin_kama .cke_dialog_ui_hbox_child,
|
337
|
+
.cke_skin_kama .cke_dialog_ui_hbox_last
|
338
|
+
{
|
339
|
+
vertical-align: top;
|
340
|
+
}
|
341
|
+
|
342
|
+
.cke_skin_kama .cke_ltr .cke_dialog_ui_hbox_first,
|
343
|
+
.cke_skin_kama .cke_ltr .cke_dialog_ui_hbox_child
|
344
|
+
{
|
345
|
+
padding-right: 10px;
|
346
|
+
}
|
347
|
+
|
348
|
+
.cke_skin_kama .cke_rtl .cke_dialog_ui_hbox_first,
|
349
|
+
.cke_skin_kama .cke_rtl .cke_dialog_ui_hbox_child
|
350
|
+
{
|
351
|
+
padding-left: 10px;
|
352
|
+
}
|
353
|
+
|
354
|
+
/* button */
|
355
|
+
|
356
|
+
.cke_skin_kama a.cke_dialog_ui_button
|
357
|
+
{
|
358
|
+
border-collapse: separate;
|
359
|
+
cursor: default;
|
360
|
+
|
361
|
+
-moz-border-radius: 5px;
|
362
|
+
-webkit-border-radius: 5px;
|
363
|
+
border-radius: 5px;
|
364
|
+
background: transparent url(images/sprites.png) repeat-x scroll 0 -1069px;
|
365
|
+
_background: none;
|
366
|
+
padding: 5px 0;
|
367
|
+
text-align: center;
|
368
|
+
}
|
369
|
+
|
370
|
+
.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button
|
371
|
+
{
|
372
|
+
padding: 0;
|
373
|
+
}
|
374
|
+
|
375
|
+
/* IE6 buttons. */
|
376
|
+
.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button span
|
377
|
+
{
|
378
|
+
width: 70px;
|
379
|
+
}
|
380
|
+
|
381
|
+
.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span,
|
382
|
+
.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span
|
383
|
+
{
|
384
|
+
width: 100px;
|
385
|
+
}
|
386
|
+
|
387
|
+
.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span,
|
388
|
+
.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span,
|
389
|
+
.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button span
|
390
|
+
{
|
391
|
+
padding: 5px 15px;
|
392
|
+
text-align: center;
|
393
|
+
color: #3b3b1f;
|
394
|
+
background: #53D9F0 none;
|
395
|
+
display: inline-block;
|
396
|
+
cursor: default;
|
397
|
+
}
|
398
|
+
/* END IE6 buttons. */
|
399
|
+
|
400
|
+
.cke_skin_kama .cke_browser_webkit a.cke_dialog_ui_button span.cke_dialog_ui_button
|
401
|
+
{
|
402
|
+
margin: 0;
|
403
|
+
}
|
404
|
+
.cke_skin_kama .cke_browser_webkit a.cke_dialog_ui_button
|
405
|
+
{
|
406
|
+
display:inline-block;
|
407
|
+
padding-top: 3px;
|
408
|
+
padding-bottom: 2px;
|
409
|
+
margin: 2px 0;
|
410
|
+
}
|
411
|
+
|
412
|
+
.cke_skin_kama a.cke_dialog_ui_button_ok span,
|
413
|
+
.cke_skin_kama a.cke_dialog_ui_button_cancel span
|
414
|
+
{
|
415
|
+
width:60px;
|
416
|
+
padding-right: 20px;
|
417
|
+
padding-left: 20px;
|
418
|
+
}
|
419
|
+
|
420
|
+
.cke_skin_kama a.cke_dialog_ui_button_ok
|
421
|
+
{
|
422
|
+
background-position: 0 -1143px;
|
423
|
+
}
|
424
|
+
|
425
|
+
.cke_skin_kama a.cke_dialog_ui_button_ok span
|
426
|
+
{
|
427
|
+
background: transparent url(images/sprites.png) no-repeat scroll right -1219px;
|
428
|
+
}
|
429
|
+
|
430
|
+
.cke_skin_kama .cke_rtl a.cke_dialog_ui_button_ok span
|
431
|
+
{
|
432
|
+
background-position: left -1219px;
|
433
|
+
}
|
434
|
+
|
435
|
+
.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_ok span,
|
436
|
+
.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_ok span
|
437
|
+
{
|
438
|
+
background-color: #B8E834;
|
439
|
+
margin-right: 0;
|
440
|
+
}
|
441
|
+
|
442
|
+
.cke_skin_kama a.cke_dialog_ui_button_cancel
|
443
|
+
{
|
444
|
+
background-position: 0 -1104px;
|
445
|
+
}
|
446
|
+
|
447
|
+
.cke_skin_kama a.cke_dialog_ui_button_cancel span
|
448
|
+
{
|
449
|
+
background: transparent url(images/sprites.png) no-repeat scroll right -1245px;
|
450
|
+
}
|
451
|
+
|
452
|
+
.cke_skin_kama .cke_rtl a.cke_dialog_ui_button_cancel span
|
453
|
+
{
|
454
|
+
background-position: left -1245px;
|
455
|
+
}
|
456
|
+
|
457
|
+
.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_cancel span,
|
458
|
+
.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_cancel span
|
459
|
+
{
|
460
|
+
background-color: #F65D20;
|
461
|
+
}
|
462
|
+
|
463
|
+
.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_cancel span,
|
464
|
+
.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_cancel span,
|
465
|
+
.cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_ok span,
|
466
|
+
.cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_ok span
|
467
|
+
{
|
468
|
+
background-image: none;
|
469
|
+
}
|
470
|
+
|
471
|
+
.cke_skin_kama span.cke_dialog_ui_button
|
472
|
+
{
|
473
|
+
padding: 2px 10px;
|
474
|
+
text-align: center;
|
475
|
+
color: #222;
|
476
|
+
display: inline-block;
|
477
|
+
cursor: default;
|
478
|
+
min-width: 60px;
|
479
|
+
}
|
480
|
+
|
481
|
+
/* Gecko 1.8 does not support display: inline-block */
|
482
|
+
.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons span.cke_dialog_ui_button
|
483
|
+
{
|
484
|
+
display: block;
|
485
|
+
}
|
486
|
+
|
487
|
+
.cke_skin_kama a.cke_dialog_ui_button span.cke_disabled
|
488
|
+
{
|
489
|
+
border: #898980 1px solid;
|
490
|
+
color: #5e5e55;
|
491
|
+
background-color: #c5c5b3;
|
492
|
+
}
|
493
|
+
|
494
|
+
.cke_skin_kama a:hover.cke_dialog_ui_button,
|
495
|
+
.cke_skin_kama a:focus.cke_dialog_ui_button,
|
496
|
+
.cke_skin_kama a:active.cke_dialog_ui_button
|
497
|
+
{
|
498
|
+
background-position: 0 -1179px;
|
499
|
+
}
|
500
|
+
|
501
|
+
.cke_skin_kama .cke_hc a:hover.cke_dialog_ui_button,
|
502
|
+
.cke_skin_kama .cke_hc a:focus.cke_dialog_ui_button,
|
503
|
+
.cke_skin_kama .cke_hc a:active.cke_dialog_ui_button
|
504
|
+
{
|
505
|
+
border-width: 2px;
|
506
|
+
}
|
507
|
+
|
508
|
+
/* Skip hover effect on IE6 */
|
509
|
+
.cke_skin_kama .cke_browser_iequirks a:hover.cke_dialog_ui_button span,
|
510
|
+
.cke_skin_kama .cke_browser_iequirks a:focus.cke_dialog_ui_button span,
|
511
|
+
.cke_skin_kama .cke_browser_iequirks a:active.cke_dialog_ui_button span,
|
512
|
+
.cke_skin_kama .cke_browser_ie6 a:hover.cke_dialog_ui_button span,
|
513
|
+
.cke_skin_kama .cke_browser_ie6 a:focus.cke_dialog_ui_button span,
|
514
|
+
.cke_skin_kama .cke_browser_ie6 a:active.cke_dialog_ui_button span
|
515
|
+
{
|
516
|
+
background-image: none;
|
517
|
+
background: #F7A922;
|
518
|
+
}
|
519
|
+
|
520
|
+
.cke_skin_kama .cke_dialog_footer_buttons
|
521
|
+
{
|
522
|
+
display: inline-table;
|
523
|
+
margin-right: 12px;
|
524
|
+
margin-left: 12px;
|
525
|
+
width: auto;
|
526
|
+
position: relative;
|
527
|
+
}
|
528
|
+
|
529
|
+
/* IE7 needs position static #6806 */
|
530
|
+
.cke_skin_kama .cke_browser_ie7 .cke_dialog_footer_buttons
|
531
|
+
{
|
532
|
+
position: static;
|
533
|
+
}
|
534
|
+
|
535
|
+
/* Gecko 1.8 does not support for display: inline-table */
|
536
|
+
.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons
|
537
|
+
{
|
538
|
+
display: inline;
|
539
|
+
}
|
540
|
+
|
541
|
+
.cke_skin_kama .cke_dialog_footer_buttons span.cke_dialog_ui_button
|
542
|
+
{
|
543
|
+
margin: 7px 0;
|
544
|
+
text-align: center;
|
545
|
+
}
|
546
|
+
|
547
|
+
/* Firefox2 buttons */
|
548
|
+
.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons a.cke_dialog_ui_button
|
549
|
+
{
|
550
|
+
display: block;
|
551
|
+
padding: 0;
|
552
|
+
}
|
553
|
+
|
554
|
+
.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons span.cke_dialog_ui_button
|
555
|
+
{
|
556
|
+
padding-bottom: 5px;
|
557
|
+
padding-top: 6px;
|
558
|
+
margin-bottom: 0;
|
559
|
+
}
|
560
|
+
|
561
|
+
.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons .cke_dialog_ui_button_ok .cke_dialog_ui_button
|
562
|
+
{
|
563
|
+
background-position: right -1214px;
|
564
|
+
}
|
565
|
+
|
566
|
+
.cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons .cke_dialog_ui_button_cancel .cke_dialog_ui_button
|
567
|
+
{
|
568
|
+
background-position: right -1242px;
|
569
|
+
}
|
570
|
+
/* END Firefox2 buttons */
|
571
|
+
|
572
|
+
.cke_skin_kama .cke_browser_ie9.cke_rtl .cke_dialog_footer_buttons td
|
573
|
+
{
|
574
|
+
padding-left: 2px;
|
575
|
+
}
|
576
|
+
|
577
|
+
.cke_skin_kama strong
|
578
|
+
{
|
579
|
+
font-weight: bold;
|
580
|
+
}
|
581
|
+
|
582
|
+
/* close_button */
|
583
|
+
|
584
|
+
.cke_skin_kama .cke_dialog .cke_dialog_body .cke_dialog_close_button
|
585
|
+
{
|
586
|
+
background-image: url(images/sprites.png);
|
587
|
+
background-repeat: no-repeat;
|
588
|
+
background-position: 0 -1022px;
|
589
|
+
position: absolute;
|
590
|
+
cursor: pointer;
|
591
|
+
text-align: center;
|
592
|
+
height: 20px;
|
593
|
+
width: 20px;
|
594
|
+
top: 5px;
|
595
|
+
/* IE 6 */
|
596
|
+
_background-image: url(images/sprites_ie6.png);
|
597
|
+
}
|
598
|
+
|
599
|
+
.cke_skin_kama .cke_dialog_close_button span
|
600
|
+
{
|
601
|
+
display: none;
|
602
|
+
}
|
603
|
+
|
604
|
+
.cke_skin_kama .cke_dialog_close_button:hover
|
605
|
+
{
|
606
|
+
background-position: 0 -1045px;
|
607
|
+
}
|
608
|
+
|
609
|
+
.cke_skin_kama .cke_ltr .cke_dialog_close_button
|
610
|
+
{
|
611
|
+
right: 10px;
|
612
|
+
}
|
613
|
+
|
614
|
+
.cke_skin_kama .cke_browser_ie8.cke_rtl .cke_dialog_close_button
|
615
|
+
{
|
616
|
+
left: 8px;
|
617
|
+
}
|
618
|
+
|
619
|
+
.cke_skin_kama .cke_rtl .cke_dialog_close_button
|
620
|
+
{
|
621
|
+
left: 10px;
|
622
|
+
}
|
623
|
+
|
624
|
+
.cke_skin_kama .cke_browser_ie7.cke_rtl .cke_dialog_close_button
|
625
|
+
{
|
626
|
+
left: 16px;
|
627
|
+
top: 0;
|
628
|
+
}
|
629
|
+
|
630
|
+
/*.cke_skin_kama .cke_browser_ie6.cke_rtl .cke_dialog_close_button
|
631
|
+
{
|
632
|
+
left: 16px;
|
633
|
+
}*/
|
634
|
+
|
635
|
+
/* IE7 + IE quirks */
|
636
|
+
.cke_skin_kama .cke_browser_ie7.cke_rtl .cke_dialog_close_button
|
637
|
+
{
|
638
|
+
position: absolute;
|
639
|
+
left: 10px;
|
640
|
+
top: 5px;
|
641
|
+
}
|
642
|
+
|
643
|
+
/* IE7 + IE quirks */
|
644
|
+
.cke_skin_kama .cke_browser_ie7.cke_single_page .cke_dialog_footer
|
645
|
+
{
|
646
|
+
margin-top: 22px;
|
647
|
+
}
|
648
|
+
|
649
|
+
.cke_skin_kama .cke_browser_ie6 .cke_dialog_close_button,
|
650
|
+
.cke_skin_kama .cke_browser_iequirks .cke_dialog_close_button
|
651
|
+
{
|
652
|
+
top: 7px;
|
653
|
+
}
|
654
|
+
|
655
|
+
/* IE7 + IE quirks */
|
656
|
+
.cke_skin_kama .cke_browser_ie7.cke_ltr .cke_dialog_close_button
|
657
|
+
{
|
658
|
+
margin-top: 0;
|
659
|
+
}
|
660
|
+
|
661
|
+
.cke_skin_kama .cke_dialog_ui_input_select
|
662
|
+
{
|
663
|
+
border: 1px solid #a0a0a0;
|
664
|
+
background-color: white;
|
665
|
+
}
|
666
|
+
|
667
|
+
.cke_skin_kama .cke_dialog_ui_input_file
|
668
|
+
{
|
669
|
+
width: 100%;
|
670
|
+
height: 25px;
|
671
|
+
}
|
672
|
+
|
673
|
+
/*
|
674
|
+
* Some utility CSS classes for dialog authors.
|
675
|
+
*/
|
676
|
+
.cke_skin_kama .cke_dialog .cke_dark_background
|
677
|
+
{
|
678
|
+
background-color: #eaead1;
|
679
|
+
}
|
680
|
+
|
681
|
+
.cke_skin_kama .cke_dialog .cke_hand
|
682
|
+
{
|
683
|
+
cursor: pointer;
|
684
|
+
}
|
685
|
+
|
686
|
+
.cke_skin_kama .cke_dialog .cke_centered
|
687
|
+
{
|
688
|
+
text-align: center;
|
689
|
+
}
|
690
|
+
|
691
|
+
.cke_skin_kama .cke_dialog a.cke_btn_reset
|
692
|
+
{
|
693
|
+
float: right;
|
694
|
+
background-position: 0 -32px;
|
695
|
+
background-image: url(images/mini.gif);
|
696
|
+
width: 16px;
|
697
|
+
height: 16px;
|
698
|
+
background-repeat: no-repeat;
|
699
|
+
border: 1px none;
|
700
|
+
font-size: 1px;
|
701
|
+
}
|
702
|
+
|
703
|
+
.cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_reset
|
704
|
+
{
|
705
|
+
float: left;
|
706
|
+
}
|
707
|
+
|
708
|
+
.cke_skin_kama .cke_dialog a.cke_btn_locked,
|
709
|
+
.cke_skin_kama .cke_dialog a.cke_btn_unlocked
|
710
|
+
{
|
711
|
+
float: left;
|
712
|
+
background-position: 0 0;
|
713
|
+
background-image: url(images/mini.gif);
|
714
|
+
width: 16px;
|
715
|
+
height: 16px;
|
716
|
+
background-repeat: no-repeat;
|
717
|
+
border: none 1px;
|
718
|
+
font-size: 1px;
|
719
|
+
}
|
720
|
+
.cke_skin_kama .cke_dialog a.cke_btn_locked .cke_icon
|
721
|
+
{
|
722
|
+
display:none;
|
723
|
+
}
|
724
|
+
|
725
|
+
.cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_locked,
|
726
|
+
.cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_unlocked
|
727
|
+
{
|
728
|
+
float: right;
|
729
|
+
}
|
730
|
+
|
731
|
+
.cke_skin_kama .cke_dialog a.cke_btn_unlocked
|
732
|
+
{
|
733
|
+
background-position: 0 -16px;
|
734
|
+
background-image: url(images/mini.gif);
|
735
|
+
}
|
736
|
+
|
737
|
+
.cke_skin_kama .cke_dialog .cke_btn_over
|
738
|
+
{
|
739
|
+
border: outset 1px;
|
740
|
+
cursor: pointer;
|
741
|
+
}
|
742
|
+
|
743
|
+
.cke_skin_kama .cke_dialog .ImagePreviewBox
|
744
|
+
{
|
745
|
+
border : 2px ridge black;
|
746
|
+
overflow : scroll;
|
747
|
+
height : 200px;
|
748
|
+
width : 300px;
|
749
|
+
padding : 2px;
|
750
|
+
background-color : white;
|
751
|
+
}
|
752
|
+
|
753
|
+
.cke_skin_kama .cke_dialog .ImagePreviewBox table td {
|
754
|
+
white-space: normal;
|
755
|
+
}
|
756
|
+
|
757
|
+
/* Fix iframedialog's height doesn't stretch to 100% #4863.*/
|
758
|
+
.cke_skin_kama .cke_browser_iequirks .cke_dialog_page_contents
|
759
|
+
{
|
760
|
+
_position: absolute;
|
761
|
+
}
|
762
|
+
|
763
|
+
.cke_skin_kama .cke_dialog .ImagePreviewLoader
|
764
|
+
{
|
765
|
+
position: absolute;
|
766
|
+
white-space : normal;
|
767
|
+
overflow : hidden;
|
768
|
+
height : 160px;
|
769
|
+
width : 230px;
|
770
|
+
margin : 2px;
|
771
|
+
padding : 2px;
|
772
|
+
opacity : 0.9;
|
773
|
+
filter : alpha(opacity=90);
|
774
|
+
|
775
|
+
background-color : #e4e4e4;
|
776
|
+
}
|
777
|
+
|
778
|
+
.cke_skin_kama .cke_dialog .FlashPreviewBox
|
779
|
+
{
|
780
|
+
white-space : normal;
|
781
|
+
border : 2px ridge black;
|
782
|
+
overflow : auto;
|
783
|
+
height : 160px;
|
784
|
+
width : 390px;
|
785
|
+
padding : 2px;
|
786
|
+
background-color : white;
|
787
|
+
}
|
788
|
+
|
789
|
+
.cke_skin_kama .cke_dialog .cke_pastetext
|
790
|
+
{
|
791
|
+
width: 346px;
|
792
|
+
height: 170px;
|
793
|
+
}
|
794
|
+
|
795
|
+
.cke_skin_kama .cke_dialog .cke_pastetext textarea
|
796
|
+
{
|
797
|
+
width: 340px;
|
798
|
+
height: 170px;
|
799
|
+
resize: none;
|
800
|
+
}
|
801
|
+
|
802
|
+
.cke_skin_kama .cke_dialog iframe.cke_pasteframe
|
803
|
+
{
|
804
|
+
width: 346px;
|
805
|
+
height: 130px;
|
806
|
+
background-color: white;
|
807
|
+
border: 1px solid black;
|
808
|
+
}
|
809
|
+
|
810
|
+
.cke_skin_kama .cke_dialog .cke_dark_background
|
811
|
+
{
|
812
|
+
text-align : center;
|
813
|
+
background-color: #eaead1;
|
814
|
+
font-size : 14px;
|
815
|
+
}
|
816
|
+
|
817
|
+
.cke_skin_kama .cke_dialog .cke_light_background
|
818
|
+
{
|
819
|
+
text-align : center;
|
820
|
+
background-color: #ffffbe;
|
821
|
+
}
|
822
|
+
|
823
|
+
.cke_skin_kama .cke_dialog .cke_hand
|
824
|
+
{
|
825
|
+
cursor: pointer;
|
826
|
+
}
|
827
|
+
|
828
|
+
.cke_skin_kama .cke_disabled
|
829
|
+
{
|
830
|
+
color: #a0a0a0;
|
831
|
+
}
|
832
|
+
|
833
|
+
/* High Contrast Mode */
|
834
|
+
|
835
|
+
.cke_skin_kama .cke_hc .cke_dialog_title,
|
836
|
+
.cke_skin_kama .cke_hc .cke_dialog_tabs,
|
837
|
+
.cke_skin_kama .cke_hc .cke_dialog_contents,
|
838
|
+
.cke_skin_kama .cke_hc .cke_dialog_footer
|
839
|
+
{
|
840
|
+
border-left: 1px solid;
|
841
|
+
border-right: 1px solid;
|
842
|
+
}
|
843
|
+
|
844
|
+
.cke_skin_kama .cke_hc .cke_dialog_title
|
845
|
+
{
|
846
|
+
border-top: 1px solid;
|
847
|
+
}
|
848
|
+
|
849
|
+
.cke_skin_kama .cke_hc .cke_dialog_footer
|
850
|
+
{
|
851
|
+
border-bottom: 1px solid;
|
852
|
+
}
|
853
|
+
|
854
|
+
.cke_skin_kama .cke_hc .cke_dialog_close_button span
|
855
|
+
{
|
856
|
+
display: inline;
|
857
|
+
cursor: pointer;
|
858
|
+
font-weight: bold;
|
859
|
+
position: relative;
|
860
|
+
top: 3px;
|
861
|
+
}
|
862
|
+
|
863
|
+
.cke_skin_kama .cke_dialog_body .cke_label
|
864
|
+
{
|
865
|
+
display: none;
|
866
|
+
}
|
867
|
+
|
868
|
+
.cke_skin_kama .cke_dialog_body label.cke_required
|
869
|
+
{
|
870
|
+
font-weight: bold;
|
871
|
+
}
|
872
|
+
|
873
|
+
.cke_skin_kama .cke_hc .cke_dialog_body .cke_label
|
874
|
+
{
|
875
|
+
display: inline;
|
876
|
+
cursor: inherit;
|
877
|
+
}
|
878
|
+
|
879
|
+
.cke_skin_kama .cke_hc a.cke_btn_locked,
|
880
|
+
.cke_skin_kama .cke_hc a.cke_btn_unlocked,
|
881
|
+
.cke_skin_kama .cke_hc a.cke_btn_reset
|
882
|
+
{
|
883
|
+
border-style: solid;
|
884
|
+
float: left;
|
885
|
+
width: auto;
|
886
|
+
height: auto;
|
887
|
+
padding: 0 2px;
|
888
|
+
}
|
889
|
+
|
890
|
+
.cke_skin_kama .cke_rtl.cke_hc a.cke_btn_locked,
|
891
|
+
.cke_skin_kama .cke_rtl.cke_hc a.cke_btn_unlocked,
|
892
|
+
.cke_skin_kama .cke_rtl.cke_hc a.cke_btn_reset
|
893
|
+
{
|
894
|
+
float: right;
|
895
|
+
}
|
896
|
+
.cke_skin_kama .cke_hc a.cke_btn_locked .cke_icon
|
897
|
+
{
|
898
|
+
display:inline;
|
899
|
+
}
|
900
|
+
|
901
|
+
.cke_skin_kama a.cke_smile img
|
902
|
+
{
|
903
|
+
/* IE6 does not support transparent borders */
|
904
|
+
border: 2px solid #eaead1;
|
905
|
+
}
|
906
|
+
|
907
|
+
.cke_skin_kama a.cke_smile:focus img,
|
908
|
+
.cke_skin_kama a.cke_smile:active img,
|
909
|
+
.cke_skin_kama a.cke_smile:hover img
|
910
|
+
{
|
911
|
+
border-color: #C7C78F;
|
912
|
+
}
|
913
|
+
|
914
|
+
.cke_skin_kama .cke_hc .cke_dialog_tabs a,
|
915
|
+
.cke_skin_kama .cke_hc .cke_dialog_footer a
|
916
|
+
{
|
917
|
+
opacity: 1.0;
|
918
|
+
filter: alpha(opacity=100);
|
919
|
+
border: 1px solid white;
|
920
|
+
}
|
921
|
+
|
922
|
+
.cke_skin_kama .cke_hc .ImagePreviewBox
|
923
|
+
{
|
924
|
+
width: 260px;
|
925
|
+
}
|
926
|
+
|
927
|
+
/**
|
928
|
+
* Styles specific to "cellProperties" dialog.
|
929
|
+
*/
|
930
|
+
|
931
|
+
.cke_skin_kama .cke_dialog_contents a.colorChooser
|
932
|
+
{
|
933
|
+
display:block;
|
934
|
+
margin-top:6px;
|
935
|
+
margin-left: 10px;
|
936
|
+
width: 80px;
|
937
|
+
}
|
938
|
+
|
939
|
+
.cke_skin_kama .cke_rtl .cke_dialog_contents a.colorChooser
|
940
|
+
{
|
941
|
+
margin-right: 10px;
|
942
|
+
}
|
943
|
+
|
944
|
+
/* Compensate focus outline for some input elements. (#6200) */
|
945
|
+
.cke_skin_kama .cke_browser_gecko .cke_dialog_ui_checkbox_input:focus,
|
946
|
+
.cke_skin_kama .cke_browser_gecko .cke_dialog_ui_radio_input:focus,
|
947
|
+
.cke_skin_kama .cke_browser_opera .cke_dialog_ui_checkbox_input:focus,
|
948
|
+
.cke_skin_kama .cke_browser_opera .cke_dialog_ui_radio_input:focus,
|
949
|
+
.cke_skin_kama .cke_browser_gecko .cke_dialog_ui_input_select:focus,
|
950
|
+
.cke_skin_kama .cke_browser_gecko .cke_btn_over,
|
951
|
+
.cke_skin_kama .cke_browser_opera .cke_btn_over,
|
952
|
+
.cke_skin_kama .cke_browser_ie .cke_btn_over
|
953
|
+
{
|
954
|
+
outline: 1px dotted #696969;
|
955
|
+
}
|
956
|
+
|
957
|
+
/* IE<8 instead doesn't support CSS outline property, emulated with dotted border. */
|
958
|
+
|
959
|
+
/* Predefined border to avoid visual size change impact. */
|
960
|
+
.cke_skin_kama .cke_browser_ie .cke_dialog_ui_checkbox_input,
|
961
|
+
.cke_skin_kama .cke_browser_ie .cke_dialog_ui_ratio_input,
|
962
|
+
.cke_skin_kama .cke_browser_ie .cke_btn_reset,
|
963
|
+
.cke_skin_kama .cke_browser_ie .cke_btn_locked,
|
964
|
+
.cke_skin_kama .cke_browser_ie .cke_btn_unlocked
|
965
|
+
{
|
966
|
+
*border: 1px solid transparent !important;
|
967
|
+
/* Emulating border-color: transparent in IE6.*/
|
968
|
+
-border: 1px solid red !important;
|
969
|
+
-filter: chroma(color=red);
|
970
|
+
}
|
971
|
+
|
972
|
+
.cke_skin_kama .cke_browser_ie .cke_dialog_ui_focused,
|
973
|
+
.cke_skin_kama .cke_browser_ie .cke_btn_over
|
974
|
+
{
|
975
|
+
*border: 1px dotted #696969 !important;
|
976
|
+
}
|
977
|
+
|
978
|
+
.cke_skin_kama .cke_iframe_shim
|
979
|
+
{
|
980
|
+
display:block;
|
981
|
+
position:absolute;
|
982
|
+
top:0;
|
983
|
+
left:0;
|
984
|
+
z-index:-1;
|
985
|
+
filter:alpha(opacity=0);
|
986
|
+
width:100%;
|
987
|
+
height:100%;
|
988
|
+
}
|