esp-ckeditor 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,342 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* @fileOverview Defines the {@link CKEDITOR.event} class, which serves as the
|
|
8
|
+
* base for classes and objects that require event handling features.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
if ( !CKEDITOR.event )
|
|
12
|
+
{
|
|
13
|
+
/**
|
|
14
|
+
* Creates an event class instance. This constructor is rearely used, being
|
|
15
|
+
* the {@link #.implementOn} function used in class prototypes directly
|
|
16
|
+
* instead.
|
|
17
|
+
* @class This is a base class for classes and objects that require event
|
|
18
|
+
* handling features.<br />
|
|
19
|
+
* <br />
|
|
20
|
+
* Do not confuse this class with {@link CKEDITOR.dom.event} which is
|
|
21
|
+
* instead used for DOM events. The CKEDITOR.event class implements the
|
|
22
|
+
* internal event system used by the CKEditor to fire API related events.
|
|
23
|
+
* @example
|
|
24
|
+
*/
|
|
25
|
+
CKEDITOR.event = function()
|
|
26
|
+
{};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Implements the {@link CKEDITOR.event} features in an object.
|
|
30
|
+
* @param {Object} targetObject The object into which implement the features.
|
|
31
|
+
* @example
|
|
32
|
+
* var myObject = { message : 'Example' };
|
|
33
|
+
* <b>CKEDITOR.event.implementOn( myObject }</b>;
|
|
34
|
+
* myObject.on( 'testEvent', function()
|
|
35
|
+
* {
|
|
36
|
+
* alert( this.message ); // "Example"
|
|
37
|
+
* });
|
|
38
|
+
* myObject.fire( 'testEvent' );
|
|
39
|
+
*/
|
|
40
|
+
CKEDITOR.event.implementOn = function( targetObject )
|
|
41
|
+
{
|
|
42
|
+
var eventProto = CKEDITOR.event.prototype;
|
|
43
|
+
|
|
44
|
+
for ( var prop in eventProto )
|
|
45
|
+
{
|
|
46
|
+
if ( targetObject[ prop ] == undefined )
|
|
47
|
+
targetObject[ prop ] = eventProto[ prop ];
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
CKEDITOR.event.prototype = (function()
|
|
52
|
+
{
|
|
53
|
+
// Returns the private events object for a given object.
|
|
54
|
+
var getPrivate = function( obj )
|
|
55
|
+
{
|
|
56
|
+
var _ = ( obj.getPrivate && obj.getPrivate() ) || obj._ || ( obj._ = {} );
|
|
57
|
+
return _.events || ( _.events = {} );
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var eventEntry = function( eventName )
|
|
61
|
+
{
|
|
62
|
+
this.name = eventName;
|
|
63
|
+
this.listeners = [];
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
eventEntry.prototype =
|
|
67
|
+
{
|
|
68
|
+
// Get the listener index for a specified function.
|
|
69
|
+
// Returns -1 if not found.
|
|
70
|
+
getListenerIndex : function( listenerFunction )
|
|
71
|
+
{
|
|
72
|
+
for ( var i = 0, listeners = this.listeners ; i < listeners.length ; i++ )
|
|
73
|
+
{
|
|
74
|
+
if ( listeners[i].fn == listenerFunction )
|
|
75
|
+
return i;
|
|
76
|
+
}
|
|
77
|
+
return -1;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
return /** @lends CKEDITOR.event.prototype */ {
|
|
82
|
+
/**
|
|
83
|
+
* Registers a listener to a specific event in the current object.
|
|
84
|
+
* @param {String} eventName The event name to which listen.
|
|
85
|
+
* @param {Function} listenerFunction The function listening to the
|
|
86
|
+
* event. A single {@link CKEDITOR.eventInfo} object instanced
|
|
87
|
+
* is passed to this function containing all the event data.
|
|
88
|
+
* @param {Object} [scopeObj] The object used to scope the listener
|
|
89
|
+
* call (the this object. If omitted, the current object is used.
|
|
90
|
+
* @param {Object} [listenerData] Data to be sent as the
|
|
91
|
+
* {@link CKEDITOR.eventInfo#listenerData} when calling the
|
|
92
|
+
* listener.
|
|
93
|
+
* @param {Number} [priority] The listener priority. Lower priority
|
|
94
|
+
* listeners are called first. Listeners with the same priority
|
|
95
|
+
* value are called in registration order. Defaults to 10.
|
|
96
|
+
* @example
|
|
97
|
+
* someObject.on( 'someEvent', function()
|
|
98
|
+
* {
|
|
99
|
+
* alert( this == someObject ); // "true"
|
|
100
|
+
* });
|
|
101
|
+
* @example
|
|
102
|
+
* someObject.on( 'someEvent', function()
|
|
103
|
+
* {
|
|
104
|
+
* alert( this == anotherObject ); // "true"
|
|
105
|
+
* }
|
|
106
|
+
* , anotherObject );
|
|
107
|
+
* @example
|
|
108
|
+
* someObject.on( 'someEvent', function( event )
|
|
109
|
+
* {
|
|
110
|
+
* alert( event.listenerData ); // "Example"
|
|
111
|
+
* }
|
|
112
|
+
* , null, 'Example' );
|
|
113
|
+
* @example
|
|
114
|
+
* someObject.on( 'someEvent', function() { ... } ); // 2nd called
|
|
115
|
+
* someObject.on( 'someEvent', function() { ... }, null, null, 100 ); // 3rd called
|
|
116
|
+
* someObject.on( 'someEvent', function() { ... }, null, null, 1 ); // 1st called
|
|
117
|
+
*/
|
|
118
|
+
on : function( eventName, listenerFunction, scopeObj, listenerData, priority )
|
|
119
|
+
{
|
|
120
|
+
// Get the event entry (create it if needed).
|
|
121
|
+
var events = getPrivate( this ),
|
|
122
|
+
event = events[ eventName ] || ( events[ eventName ] = new eventEntry( eventName ) );
|
|
123
|
+
|
|
124
|
+
if ( event.getListenerIndex( listenerFunction ) < 0 )
|
|
125
|
+
{
|
|
126
|
+
// Get the listeners.
|
|
127
|
+
var listeners = event.listeners;
|
|
128
|
+
|
|
129
|
+
// Fill the scope.
|
|
130
|
+
if ( !scopeObj )
|
|
131
|
+
scopeObj = this;
|
|
132
|
+
|
|
133
|
+
// Default the priority, if needed.
|
|
134
|
+
if ( isNaN( priority ) )
|
|
135
|
+
priority = 10;
|
|
136
|
+
|
|
137
|
+
var me = this;
|
|
138
|
+
|
|
139
|
+
// Create the function to be fired for this listener.
|
|
140
|
+
var listenerFirer = function( editor, publisherData, stopFn, cancelFn )
|
|
141
|
+
{
|
|
142
|
+
var ev =
|
|
143
|
+
{
|
|
144
|
+
name : eventName,
|
|
145
|
+
sender : this,
|
|
146
|
+
editor : editor,
|
|
147
|
+
data : publisherData,
|
|
148
|
+
listenerData : listenerData,
|
|
149
|
+
stop : stopFn,
|
|
150
|
+
cancel : cancelFn,
|
|
151
|
+
removeListener : function()
|
|
152
|
+
{
|
|
153
|
+
me.removeListener( eventName, listenerFunction );
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
listenerFunction.call( scopeObj, ev );
|
|
158
|
+
|
|
159
|
+
return ev.data;
|
|
160
|
+
};
|
|
161
|
+
listenerFirer.fn = listenerFunction;
|
|
162
|
+
listenerFirer.priority = priority;
|
|
163
|
+
|
|
164
|
+
// Search for the right position for this new listener, based on its
|
|
165
|
+
// priority.
|
|
166
|
+
for ( var i = listeners.length - 1 ; i >= 0 ; i-- )
|
|
167
|
+
{
|
|
168
|
+
// Find the item which should be before the new one.
|
|
169
|
+
if ( listeners[ i ].priority <= priority )
|
|
170
|
+
{
|
|
171
|
+
// Insert the listener in the array.
|
|
172
|
+
listeners.splice( i + 1, 0, listenerFirer );
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// If no position has been found (or zero length), put it in
|
|
178
|
+
// the front of list.
|
|
179
|
+
listeners.unshift( listenerFirer );
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Fires an specific event in the object. All registered listeners are
|
|
185
|
+
* called at this point.
|
|
186
|
+
* @function
|
|
187
|
+
* @param {String} eventName The event name to fire.
|
|
188
|
+
* @param {Object} [data] Data to be sent as the
|
|
189
|
+
* {@link CKEDITOR.eventInfo#data} when calling the
|
|
190
|
+
* listeners.
|
|
191
|
+
* @param {CKEDITOR.editor} [editor] The editor instance to send as the
|
|
192
|
+
* {@link CKEDITOR.eventInfo#editor} when calling the
|
|
193
|
+
* listener.
|
|
194
|
+
* @returns {Boolean|Object} A booloan indicating that the event is to be
|
|
195
|
+
* canceled, or data returned by one of the listeners.
|
|
196
|
+
* @example
|
|
197
|
+
* someObject.on( 'someEvent', function() { ... } );
|
|
198
|
+
* someObject.on( 'someEvent', function() { ... } );
|
|
199
|
+
* <b>someObject.fire( 'someEvent' )</b>; // both listeners are called
|
|
200
|
+
* @example
|
|
201
|
+
* someObject.on( 'someEvent', function( event )
|
|
202
|
+
* {
|
|
203
|
+
* alert( event.data ); // "Example"
|
|
204
|
+
* });
|
|
205
|
+
* <b>someObject.fire( 'someEvent', 'Example' )</b>;
|
|
206
|
+
*/
|
|
207
|
+
fire : (function()
|
|
208
|
+
{
|
|
209
|
+
// Create the function that marks the event as stopped.
|
|
210
|
+
var stopped = false;
|
|
211
|
+
var stopEvent = function()
|
|
212
|
+
{
|
|
213
|
+
stopped = true;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
// Create the function that marks the event as canceled.
|
|
217
|
+
var canceled = false;
|
|
218
|
+
var cancelEvent = function()
|
|
219
|
+
{
|
|
220
|
+
canceled = true;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
return function( eventName, data, editor )
|
|
224
|
+
{
|
|
225
|
+
// Get the event entry.
|
|
226
|
+
var event = getPrivate( this )[ eventName ];
|
|
227
|
+
|
|
228
|
+
// Save the previous stopped and cancelled states. We may
|
|
229
|
+
// be nesting fire() calls.
|
|
230
|
+
var previousStopped = stopped,
|
|
231
|
+
previousCancelled = canceled;
|
|
232
|
+
|
|
233
|
+
// Reset the stopped and canceled flags.
|
|
234
|
+
stopped = canceled = false;
|
|
235
|
+
|
|
236
|
+
if ( event )
|
|
237
|
+
{
|
|
238
|
+
var listeners = event.listeners;
|
|
239
|
+
|
|
240
|
+
if ( listeners.length )
|
|
241
|
+
{
|
|
242
|
+
// As some listeners may remove themselves from the
|
|
243
|
+
// event, the original array length is dinamic. So,
|
|
244
|
+
// let's make a copy of all listeners, so we are
|
|
245
|
+
// sure we'll call all of them.
|
|
246
|
+
listeners = listeners.slice( 0 );
|
|
247
|
+
|
|
248
|
+
// Loop through all listeners.
|
|
249
|
+
for ( var i = 0 ; i < listeners.length ; i++ )
|
|
250
|
+
{
|
|
251
|
+
// Call the listener, passing the event data.
|
|
252
|
+
var retData = listeners[i].call( this, editor, data, stopEvent, cancelEvent );
|
|
253
|
+
|
|
254
|
+
if ( typeof retData != 'undefined' )
|
|
255
|
+
data = retData;
|
|
256
|
+
|
|
257
|
+
// No further calls is stopped or canceled.
|
|
258
|
+
if ( stopped || canceled )
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
var ret = canceled || ( typeof data == 'undefined' ? false : data );
|
|
265
|
+
|
|
266
|
+
// Restore the previous stopped and canceled states.
|
|
267
|
+
stopped = previousStopped;
|
|
268
|
+
canceled = previousCancelled;
|
|
269
|
+
|
|
270
|
+
return ret;
|
|
271
|
+
};
|
|
272
|
+
})(),
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Fires an specific event in the object, releasing all listeners
|
|
276
|
+
* registered to that event. The same listeners are not called again on
|
|
277
|
+
* successive calls of it or of {@link #fire}.
|
|
278
|
+
* @param {String} eventName The event name to fire.
|
|
279
|
+
* @param {Object} [data] Data to be sent as the
|
|
280
|
+
* {@link CKEDITOR.eventInfo#data} when calling the
|
|
281
|
+
* listeners.
|
|
282
|
+
* @param {CKEDITOR.editor} [editor] The editor instance to send as the
|
|
283
|
+
* {@link CKEDITOR.eventInfo#editor} when calling the
|
|
284
|
+
* listener.
|
|
285
|
+
* @returns {Boolean|Object} A booloan indicating that the event is to be
|
|
286
|
+
* canceled, or data returned by one of the listeners.
|
|
287
|
+
* @example
|
|
288
|
+
* someObject.on( 'someEvent', function() { ... } );
|
|
289
|
+
* someObject.fire( 'someEvent' ); // above listener called
|
|
290
|
+
* <b>someObject.fireOnce( 'someEvent' )</b>; // above listener called
|
|
291
|
+
* someObject.fire( 'someEvent' ); // no listeners called
|
|
292
|
+
*/
|
|
293
|
+
fireOnce : function( eventName, data, editor )
|
|
294
|
+
{
|
|
295
|
+
var ret = this.fire( eventName, data, editor );
|
|
296
|
+
delete getPrivate( this )[ eventName ];
|
|
297
|
+
return ret;
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Unregisters a listener function from being called at the specified
|
|
302
|
+
* event. No errors are thrown if the listener has not been
|
|
303
|
+
* registered previously.
|
|
304
|
+
* @param {String} eventName The event name.
|
|
305
|
+
* @param {Function} listenerFunction The listener function to unregister.
|
|
306
|
+
* @example
|
|
307
|
+
* var myListener = function() { ... };
|
|
308
|
+
* someObject.on( 'someEvent', myListener );
|
|
309
|
+
* someObject.fire( 'someEvent' ); // myListener called
|
|
310
|
+
* <b>someObject.removeListener( 'someEvent', myListener )</b>;
|
|
311
|
+
* someObject.fire( 'someEvent' ); // myListener not called
|
|
312
|
+
*/
|
|
313
|
+
removeListener : function( eventName, listenerFunction )
|
|
314
|
+
{
|
|
315
|
+
// Get the event entry.
|
|
316
|
+
var event = getPrivate( this )[ eventName ];
|
|
317
|
+
|
|
318
|
+
if ( event )
|
|
319
|
+
{
|
|
320
|
+
var index = event.getListenerIndex( listenerFunction );
|
|
321
|
+
if ( index >= 0 )
|
|
322
|
+
event.listeners.splice( index, 1 );
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Checks if there is any listener registered to a given event.
|
|
328
|
+
* @param {String} eventName The event name.
|
|
329
|
+
* @example
|
|
330
|
+
* var myListener = function() { ... };
|
|
331
|
+
* someObject.on( 'someEvent', myListener );
|
|
332
|
+
* alert( someObject.<b>hasListeners( 'someEvent' )</b> ); // "true"
|
|
333
|
+
* alert( someObject.<b>hasListeners( 'noEvent' )</b> ); // "false"
|
|
334
|
+
*/
|
|
335
|
+
hasListeners : function( eventName )
|
|
336
|
+
{
|
|
337
|
+
var event = getPrivate( this )[ eventName ];
|
|
338
|
+
return ( event && event.listeners.length > 0 ) ;
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
})();
|
|
342
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* @fileOverview Defines the "virtual" {@link CKEDITOR.eventInfo} class, which
|
|
8
|
+
* contains the defintions of the event object passed to event listeners.
|
|
9
|
+
* This file is for documentation purposes only.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* (Virtual Class) Do not call this constructor. This class is not really part
|
|
14
|
+
* of the API.
|
|
15
|
+
* @class Virtual class that illustrates the features of the event object to be
|
|
16
|
+
* passed to event listeners by a {@link CKEDITOR.event} based object.
|
|
17
|
+
* @name CKEDITOR.eventInfo
|
|
18
|
+
* @example
|
|
19
|
+
* // Do not do this.
|
|
20
|
+
* var myEvent = new CKEDITOR.eventInfo(); // Error: CKEDITOR.eventInfo is undefined
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The event name.
|
|
25
|
+
* @name CKEDITOR.eventInfo.prototype.name
|
|
26
|
+
* @field
|
|
27
|
+
* @type String
|
|
28
|
+
* @example
|
|
29
|
+
* someObject.on( 'someEvent', function( event )
|
|
30
|
+
* {
|
|
31
|
+
* alert( <b>event.name</b> ); // "someEvent"
|
|
32
|
+
* });
|
|
33
|
+
* someObject.fire( 'someEvent' );
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The object that publishes (sends) the event.
|
|
38
|
+
* @name CKEDITOR.eventInfo.prototype.sender
|
|
39
|
+
* @field
|
|
40
|
+
* @type Object
|
|
41
|
+
* @example
|
|
42
|
+
* someObject.on( 'someEvent', function( event )
|
|
43
|
+
* {
|
|
44
|
+
* alert( <b>event.sender</b> == someObject ); // "true"
|
|
45
|
+
* });
|
|
46
|
+
* someObject.fire( 'someEvent' );
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The editor instance that holds the sender. May be the same as sender. May be
|
|
51
|
+
* null if the sender is not part of an editor instance, like a component
|
|
52
|
+
* running in standalone mode.
|
|
53
|
+
* @name CKEDITOR.eventInfo.prototype.editor
|
|
54
|
+
* @field
|
|
55
|
+
* @type CKEDITOR.editor
|
|
56
|
+
* @example
|
|
57
|
+
* myButton.on( 'someEvent', function( event )
|
|
58
|
+
* {
|
|
59
|
+
* alert( <b>event.editor</b> == myEditor ); // "true"
|
|
60
|
+
* });
|
|
61
|
+
* myButton.fire( 'someEvent', null, <b>myEditor</b> );
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Any kind of additional data. Its format and usage is event dependent.
|
|
66
|
+
* @name CKEDITOR.eventInfo.prototype.data
|
|
67
|
+
* @field
|
|
68
|
+
* @type Object
|
|
69
|
+
* @example
|
|
70
|
+
* someObject.on( 'someEvent', function( event )
|
|
71
|
+
* {
|
|
72
|
+
* alert( <b>event.data</b> ); // "Example"
|
|
73
|
+
* });
|
|
74
|
+
* someObject.fire( 'someEvent', <b>'Example'</b> );
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Any extra data appended during the listener registration.
|
|
79
|
+
* @name CKEDITOR.eventInfo.prototype.listenerData
|
|
80
|
+
* @field
|
|
81
|
+
* @type Object
|
|
82
|
+
* @example
|
|
83
|
+
* someObject.on( 'someEvent', function( event )
|
|
84
|
+
* {
|
|
85
|
+
* alert( <b>event.listenerData</b> ); // "Example"
|
|
86
|
+
* }
|
|
87
|
+
* , null, <b>'Example'</b> );
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Indicates that no further listeners are to be called.
|
|
92
|
+
* @name CKEDITOR.eventInfo.prototype.stop
|
|
93
|
+
* @function
|
|
94
|
+
* @example
|
|
95
|
+
* someObject.on( 'someEvent', function( event )
|
|
96
|
+
* {
|
|
97
|
+
* <b>event.stop()</b>;
|
|
98
|
+
* });
|
|
99
|
+
* someObject.on( 'someEvent', function( event )
|
|
100
|
+
* {
|
|
101
|
+
* // This one will not be called.
|
|
102
|
+
* });
|
|
103
|
+
* alert( someObject.fire( 'someEvent' ) ); // "false"
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Indicates that the event is to be cancelled (if cancelable).
|
|
108
|
+
* @name CKEDITOR.eventInfo.prototype.cancel
|
|
109
|
+
* @function
|
|
110
|
+
* @example
|
|
111
|
+
* someObject.on( 'someEvent', function( event )
|
|
112
|
+
* {
|
|
113
|
+
* <b>event.cancel()</b>;
|
|
114
|
+
* });
|
|
115
|
+
* someObject.on( 'someEvent', function( event )
|
|
116
|
+
* {
|
|
117
|
+
* // This one will not be called.
|
|
118
|
+
* });
|
|
119
|
+
* alert( someObject.fire( 'someEvent' ) ); // "true"
|
|
120
|
+
*/
|