spiderfw 0.6.38 → 0.6.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/CHANGELOG +23 -0
- data/VERSION +1 -1
- data/apps/core/admin/views/admin.layout.shtml +6 -0
- data/apps/core/auth/controllers/login_controller.rb +1 -1
- data/apps/core/components/assets.rb +55 -6
- data/apps/core/components/public/bootstrap/scss/_variables.scss +5 -2
- data/apps/core/components/public/bootstrap/scss/bootstrap.css +942 -236
- data/apps/core/components/public/bootstrap/scss/responsive.css +187 -30
- data/apps/core/components/public/css/tinymce/skins/lightgray/AbsoluteLayout.less +17 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Animations.less +10 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Button.less +172 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/ButtonGroup.less +71 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Checkbox.less +49 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/ColorBox.less +6 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/ColorButton.less +72 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/ColorPicker.less +80 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/ComboBox.less +39 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Container.less +9 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Content.Inline.less +4 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Content.Objects.less +166 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Content.less +27 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/CropRect.less +54 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/FieldSet.less +15 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/FitLayout.less +9 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/FloatPanel.less +69 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/FlowLayout.less +36 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Icons.Ie7.less +136 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Icons.less +180 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Iframe.less +6 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/ImagePanel.less +20 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/InfoBox.less +71 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Label.less +38 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/ListBox.less +26 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Menu.less +34 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/MenuBar.less +32 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/MenuButton.less +34 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/MenuItem.less +142 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Mixins.less +54 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Notification.less +144 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Panel.less +7 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Path.less +45 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Progress.less +34 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Radio.less +1 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Reset.less +32 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/ResizeHandle.less +18 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Scrollable.less +44 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/SelectBox.less +6 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Slider.less +29 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Spacer.less +5 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/SplitButton.less +49 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/StackLayout.less +5 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/TabPanel.less +44 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/TextBox.less +41 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Throbber.less +19 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/TinyMCE.less +159 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/ToolTip.less +129 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Variables.less +214 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/Window.less +127 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/content.inline.min.css +1 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/content.min.css +1 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/readme.md +1 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.json +1277 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.json +3381 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.svg +129 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/img/object.gif +0 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/skin.dev.less +46 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.dev.less +46 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.less +2542 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/skin.less +2586 -0
- data/apps/core/components/public/css/tinymce/skins/lightgray/skin.min.css +1 -0
- data/apps/core/components/public/js/bootbox_2/bootbox.js +551 -0
- data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-it-min.js +4 -0
- data/apps/core/components/public/js/spider.js +7 -3
- data/apps/core/components/public/js/tinymce/classes/AddOnManager.js +265 -0
- data/apps/core/components/public/js/tinymce/classes/Compat.js +90 -0
- data/apps/core/components/public/js/tinymce/classes/DragDropOverrides.js +224 -0
- data/apps/core/components/public/js/tinymce/classes/Editor.js +2221 -0
- data/apps/core/components/public/js/tinymce/classes/EditorCommands.js +1028 -0
- data/apps/core/components/public/js/tinymce/classes/EditorManager.js +715 -0
- data/apps/core/components/public/js/tinymce/classes/EditorObservable.js +204 -0
- data/apps/core/components/public/js/tinymce/classes/EditorUpload.js +191 -0
- data/apps/core/components/public/js/tinymce/classes/EnterKey.js +676 -0
- data/apps/core/components/public/js/tinymce/classes/Env.js +177 -0
- data/apps/core/components/public/js/tinymce/classes/FocusManager.js +266 -0
- data/apps/core/components/public/js/tinymce/classes/ForceBlocks.js +138 -0
- data/apps/core/components/public/js/tinymce/classes/Formatter.js +2378 -0
- data/apps/core/components/public/js/tinymce/classes/LegacyInput.js +82 -0
- data/apps/core/components/public/js/tinymce/classes/Mode.js +54 -0
- data/apps/core/components/public/js/tinymce/classes/NodeChange.js +154 -0
- data/apps/core/components/public/js/tinymce/classes/NotificationManager.js +156 -0
- data/apps/core/components/public/js/tinymce/classes/Register.js +34 -0
- data/apps/core/components/public/js/tinymce/classes/SelectionOverrides.js +810 -0
- data/apps/core/components/public/js/tinymce/classes/Shortcuts.js +172 -0
- data/apps/core/components/public/js/tinymce/classes/UndoManager.js +346 -0
- data/apps/core/components/public/js/tinymce/classes/WindowManager.js +278 -0
- data/apps/core/components/public/js/tinymce/classes/caret/CaretBookmark.js +263 -0
- data/apps/core/components/public/js/tinymce/classes/caret/CaretCandidate.js +86 -0
- data/apps/core/components/public/js/tinymce/classes/caret/CaretContainer.js +151 -0
- data/apps/core/components/public/js/tinymce/classes/caret/CaretPosition.js +371 -0
- data/apps/core/components/public/js/tinymce/classes/caret/CaretUtils.js +302 -0
- data/apps/core/components/public/js/tinymce/classes/caret/CaretWalker.js +215 -0
- data/apps/core/components/public/js/tinymce/classes/caret/FakeCaret.js +192 -0
- data/apps/core/components/public/js/tinymce/classes/caret/LineUtils.js +135 -0
- data/apps/core/components/public/js/tinymce/classes/caret/LineWalker.js +166 -0
- data/apps/core/components/public/js/tinymce/classes/data/Binding.js +79 -0
- data/apps/core/components/public/js/tinymce/classes/data/ObservableArray.js +196 -0
- data/apps/core/components/public/js/tinymce/classes/data/ObservableObject.js +194 -0
- data/apps/core/components/public/js/tinymce/classes/dom/BookmarkManager.js +456 -0
- data/apps/core/components/public/js/tinymce/classes/dom/ControlSelection.js +634 -0
- data/apps/core/components/public/js/tinymce/classes/dom/DOMUtils.js +1853 -0
- data/apps/core/components/public/js/tinymce/classes/dom/Dimensions.js +64 -0
- data/apps/core/components/public/js/tinymce/classes/dom/DomQuery.js +1578 -0
- data/apps/core/components/public/js/tinymce/classes/dom/ElementUtils.js +118 -0
- data/apps/core/components/public/js/tinymce/classes/dom/EventUtils.js +583 -0
- data/apps/core/components/public/js/tinymce/classes/dom/NodePath.js +50 -0
- data/apps/core/components/public/js/tinymce/classes/dom/NodeType.js +110 -0
- data/apps/core/components/public/js/tinymce/classes/dom/Range.js +785 -0
- data/apps/core/components/public/js/tinymce/classes/dom/RangeUtils.js +628 -0
- data/apps/core/components/public/js/tinymce/classes/dom/ScriptLoader.js +254 -0
- data/apps/core/components/public/js/tinymce/classes/dom/Selection.js +1008 -0
- data/apps/core/components/public/js/tinymce/classes/dom/Serializer.js +506 -0
- data/apps/core/components/public/js/tinymce/classes/dom/Sizzle.jQuery.js +23 -0
- data/apps/core/components/public/js/tinymce/classes/dom/Sizzle.js +2039 -0
- data/apps/core/components/public/js/tinymce/classes/dom/StyleSheetLoader.js +190 -0
- data/apps/core/components/public/js/tinymce/classes/dom/TreeWalker.js +127 -0
- data/apps/core/components/public/js/tinymce/classes/dom/TridentSelection.js +508 -0
- data/apps/core/components/public/js/tinymce/classes/file/BlobCache.js +72 -0
- data/apps/core/components/public/js/tinymce/classes/file/Conversions.js +106 -0
- data/apps/core/components/public/js/tinymce/classes/file/ImageScanner.js +145 -0
- data/apps/core/components/public/js/tinymce/classes/file/Uploader.js +193 -0
- data/apps/core/components/public/js/tinymce/classes/fmt/Hooks.js +66 -0
- data/apps/core/components/public/js/tinymce/classes/fmt/Preview.js +151 -0
- data/apps/core/components/public/js/tinymce/classes/geom/ClientRect.js +136 -0
- data/apps/core/components/public/js/tinymce/classes/geom/Rect.js +214 -0
- data/apps/core/components/public/js/tinymce/classes/html/DomParser.js +822 -0
- data/apps/core/components/public/js/tinymce/classes/html/Entities.js +268 -0
- data/apps/core/components/public/js/tinymce/classes/html/Node.js +496 -0
- data/apps/core/components/public/js/tinymce/classes/html/SaxParser.js +474 -0
- data/apps/core/components/public/js/tinymce/classes/html/Schema.js +1004 -0
- data/apps/core/components/public/js/tinymce/classes/html/Serializer.js +158 -0
- data/apps/core/components/public/js/tinymce/classes/html/Styles.js +363 -0
- data/apps/core/components/public/js/tinymce/classes/html/Writer.js +199 -0
- data/apps/core/components/public/js/tinymce/classes/jquery.tinymce.js +377 -0
- data/apps/core/components/public/js/tinymce/classes/text/ExtendingChar.js +53 -0
- data/apps/core/components/public/js/tinymce/classes/text/Zwsp.js +36 -0
- data/apps/core/components/public/js/tinymce/classes/ui/AbsoluteLayout.js +63 -0
- data/apps/core/components/public/js/tinymce/classes/ui/BoxUtils.js +98 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Button.js +199 -0
- data/apps/core/components/public/js/tinymce/classes/ui/ButtonGroup.js +62 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Checkbox.js +162 -0
- data/apps/core/components/public/js/tinymce/classes/ui/ClassList.js +149 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Collection.js +438 -0
- data/apps/core/components/public/js/tinymce/classes/ui/ColorBox.js +72 -0
- data/apps/core/components/public/js/tinymce/classes/ui/ColorButton.js +124 -0
- data/apps/core/components/public/js/tinymce/classes/ui/ColorPicker.js +206 -0
- data/apps/core/components/public/js/tinymce/classes/ui/ComboBox.js +306 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Container.js +506 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Control.js +1301 -0
- data/apps/core/components/public/js/tinymce/classes/ui/DomUtils.js +107 -0
- data/apps/core/components/public/js/tinymce/classes/ui/DragHelper.js +144 -0
- data/apps/core/components/public/js/tinymce/classes/ui/ElementPath.js +79 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Factory.js +105 -0
- data/apps/core/components/public/js/tinymce/classes/ui/FieldSet.js +59 -0
- data/apps/core/components/public/js/tinymce/classes/ui/FilePicker.js +85 -0
- data/apps/core/components/public/js/tinymce/classes/ui/FitLayout.js +48 -0
- data/apps/core/components/public/js/tinymce/classes/ui/FlexLayout.js +246 -0
- data/apps/core/components/public/js/tinymce/classes/ui/FloatPanel.js +409 -0
- data/apps/core/components/public/js/tinymce/classes/ui/FlowLayout.js +46 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Form.js +157 -0
- data/apps/core/components/public/js/tinymce/classes/ui/FormItem.js +56 -0
- data/apps/core/components/public/js/tinymce/classes/ui/FormatControls.js +535 -0
- data/apps/core/components/public/js/tinymce/classes/ui/GridLayout.js +233 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Iframe.js +85 -0
- data/apps/core/components/public/js/tinymce/classes/ui/InfoBox.js +93 -0
- data/apps/core/components/public/js/tinymce/classes/ui/KeyboardNavigation.js +406 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Label.js +144 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Layout.js +120 -0
- data/apps/core/components/public/js/tinymce/classes/ui/ListBox.js +152 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Menu.js +195 -0
- data/apps/core/components/public/js/tinymce/classes/ui/MenuBar.js +33 -0
- data/apps/core/components/public/js/tinymce/classes/ui/MenuButton.js +268 -0
- data/apps/core/components/public/js/tinymce/classes/ui/MenuItem.js +336 -0
- data/apps/core/components/public/js/tinymce/classes/ui/MessageBox.js +202 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Movable.js +200 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Notification.js +154 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Panel.js +67 -0
- data/apps/core/components/public/js/tinymce/classes/ui/PanelButton.js +114 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Path.js +127 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Progress.js +81 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Radio.js +29 -0
- data/apps/core/components/public/js/tinymce/classes/ui/ReflowQueue.js +79 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Resizable.js +68 -0
- data/apps/core/components/public/js/tinymce/classes/ui/ResizeHandle.js +86 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Scrollable.js +141 -0
- data/apps/core/components/public/js/tinymce/classes/ui/SelectBox.js +106 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Selector.js +369 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Slider.js +161 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Spacer.js +39 -0
- data/apps/core/components/public/js/tinymce/classes/ui/SplitButton.js +146 -0
- data/apps/core/components/public/js/tinymce/classes/ui/StackLayout.js +34 -0
- data/apps/core/components/public/js/tinymce/classes/ui/TabPanel.js +178 -0
- data/apps/core/components/public/js/tinymce/classes/ui/TextBox.js +208 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Throbber.js +88 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Toolbar.js +56 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Tooltip.js +73 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Widget.js +151 -0
- data/apps/core/components/public/js/tinymce/classes/ui/Window.js +474 -0
- data/apps/core/components/public/js/tinymce/classes/util/Arr.js +153 -0
- data/apps/core/components/public/js/tinymce/classes/util/Class.js +167 -0
- data/apps/core/components/public/js/tinymce/classes/util/Color.js +235 -0
- data/apps/core/components/public/js/tinymce/classes/util/Delay.js +191 -0
- data/apps/core/components/public/js/tinymce/classes/util/EventDispatcher.js +294 -0
- data/apps/core/components/public/js/tinymce/classes/util/Fun.js +87 -0
- data/apps/core/components/public/js/tinymce/classes/util/I18n.js +116 -0
- data/apps/core/components/public/js/tinymce/classes/util/JSON.js +109 -0
- data/apps/core/components/public/js/tinymce/classes/util/JSONP.js +38 -0
- data/apps/core/components/public/js/tinymce/classes/util/JSONRequest.js +110 -0
- data/apps/core/components/public/js/tinymce/classes/util/LocalStorage.js +213 -0
- data/apps/core/components/public/js/tinymce/classes/util/Observable.js +129 -0
- data/apps/core/components/public/js/tinymce/classes/util/Promise.js +200 -0
- data/apps/core/components/public/js/tinymce/classes/util/Quirks.js +1701 -0
- data/apps/core/components/public/js/tinymce/classes/util/Tools.js +442 -0
- data/apps/core/components/public/js/tinymce/classes/util/URI.js +411 -0
- data/apps/core/components/public/js/tinymce/classes/util/VK.js +37 -0
- data/apps/core/components/public/js/tinymce/classes/util/XHR.js +110 -0
- data/apps/core/components/public/js/tinymce/jquery.tinymce.min.js +1 -0
- data/apps/core/components/public/js/tinymce/langs/it.js +219 -0
- data/apps/core/components/public/js/tinymce/langs/readme.md +3 -0
- data/apps/core/components/public/js/tinymce/license.txt +504 -0
- data/apps/core/components/public/js/tinymce/plugins/advlist/plugin.js +97 -0
- data/apps/core/components/public/js/tinymce/plugins/advlist/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/anchor/plugin.js +55 -0
- data/apps/core/components/public/js/tinymce/plugins/anchor/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/autolink/plugin.js +204 -0
- data/apps/core/components/public/js/tinymce/plugins/autolink/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/autoresize/plugin.js +162 -0
- data/apps/core/components/public/js/tinymce/plugins/autoresize/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/autosave/plugin.js +165 -0
- data/apps/core/components/public/js/tinymce/plugins/autosave/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/bbcode/plugin.js +123 -0
- data/apps/core/components/public/js/tinymce/plugins/bbcode/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/charmap/plugin.js +450 -0
- data/apps/core/components/public/js/tinymce/plugins/charmap/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/code/plugin.js +60 -0
- data/apps/core/components/public/js/tinymce/plugins/code/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Dialog.js +121 -0
- data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Plugin.js +95 -0
- data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Prism.js +937 -0
- data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Utils.js +33 -0
- data/apps/core/components/public/js/tinymce/plugins/codesample/css/prism.css +138 -0
- data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.dev.js +141 -0
- data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.js +1299 -0
- data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/colorpicker/plugin.js +112 -0
- data/apps/core/components/public/js/tinymce/plugins/colorpicker/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/css/dialog.css +118 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/img/buttons.png +0 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/img/icons.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/img/items.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/img/menu_arrow.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/img/menu_check.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/img/progress.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/img/tabs.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/plugin.js +297 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/tiny_mce_popup.js +542 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/editable_selects.js +70 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/form_utils.js +210 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/mctabs.js +164 -0
- data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/validate.js +252 -0
- data/apps/core/components/public/js/tinymce/plugins/contextmenu/plugin.js +88 -0
- data/apps/core/components/public/js/tinymce/plugins/contextmenu/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/directionality/plugin.js +64 -0
- data/apps/core/components/public/js/tinymce/plugins/directionality/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/plugin.js +65 -0
- data/apps/core/components/public/js/tinymce/plugins/emoticons/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/example/dialog.html +8 -0
- data/apps/core/components/public/js/tinymce/plugins/example/plugin.js +68 -0
- data/apps/core/components/public/js/tinymce/plugins/example/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/example_dependency/plugin.js +22 -0
- data/apps/core/components/public/js/tinymce/plugins/example_dependency/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/fullpage/plugin.js +490 -0
- data/apps/core/components/public/js/tinymce/plugins/fullpage/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/fullscreen/plugin.js +154 -0
- data/apps/core/components/public/js/tinymce/plugins/fullscreen/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/hr/plugin.js +30 -0
- data/apps/core/components/public/js/tinymce/plugins/hr/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/image/plugin.js +630 -0
- data/apps/core/components/public/js/tinymce/plugins/image/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/atomic.js +6 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/browser.js +6 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/demo.js +8 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/prod.js +6 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/plugin.js +2668 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/src/demo/html/demo.html +16 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/src/demo/js/Demo.js +92 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/CropRect.js +214 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/Dialog.js +485 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/ImagePanel.js +218 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/Plugin.js +411 -0
- data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/UndoStack.js +57 -0
- data/apps/core/components/public/js/tinymce/plugins/importcss/plugin.js +227 -0
- data/apps/core/components/public/js/tinymce/plugins/importcss/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/insertdatetime/plugin.js +121 -0
- data/apps/core/components/public/js/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/layer/plugin.js +225 -0
- data/apps/core/components/public/js/tinymce/plugins/layer/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/legacyoutput/plugin.js +211 -0
- data/apps/core/components/public/js/tinymce/plugins/legacyoutput/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/link/plugin.js +403 -0
- data/apps/core/components/public/js/tinymce/plugins/link/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/lists/plugin.js +885 -0
- data/apps/core/components/public/js/tinymce/plugins/lists/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/media/moxieplayer.swf +0 -0
- data/apps/core/components/public/js/tinymce/plugins/media/plugin.js +878 -0
- data/apps/core/components/public/js/tinymce/plugins/media/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/nonbreaking/plugin.js +53 -0
- data/apps/core/components/public/js/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/noneditable/plugin.js +101 -0
- data/apps/core/components/public/js/tinymce/plugins/noneditable/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/pagebreak/plugin.js +88 -0
- data/apps/core/components/public/js/tinymce/plugins/pagebreak/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/paste/classes/Clipboard.js +672 -0
- data/apps/core/components/public/js/tinymce/plugins/paste/classes/Plugin.js +121 -0
- data/apps/core/components/public/js/tinymce/plugins/paste/classes/Quirks.js +159 -0
- data/apps/core/components/public/js/tinymce/plugins/paste/classes/Utils.js +140 -0
- data/apps/core/components/public/js/tinymce/plugins/paste/classes/WordFilter.js +500 -0
- data/apps/core/components/public/js/tinymce/plugins/paste/plugin.dev.js +142 -0
- data/apps/core/components/public/js/tinymce/plugins/paste/plugin.js +1708 -0
- data/apps/core/components/public/js/tinymce/plugins/paste/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/preview/plugin.js +88 -0
- data/apps/core/components/public/js/tinymce/plugins/preview/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/print/plugin.js +32 -0
- data/apps/core/components/public/js/tinymce/plugins/print/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/save/plugin.js +98 -0
- data/apps/core/components/public/js/tinymce/plugins/save/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/searchreplace/plugin.js +609 -0
- data/apps/core/components/public/js/tinymce/plugins/searchreplace/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/spellchecker/classes/DomTextMatcher.js +480 -0
- data/apps/core/components/public/js/tinymce/plugins/spellchecker/classes/Plugin.js +439 -0
- data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.dev.js +139 -0
- data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.js +1026 -0
- data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/tabfocus/plugin.js +120 -0
- data/apps/core/components/public/js/tinymce/plugins/tabfocus/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/table/classes/CellSelection.js +202 -0
- data/apps/core/components/public/js/tinymce/plugins/table/classes/Dialogs.js +824 -0
- data/apps/core/components/public/js/tinymce/plugins/table/classes/Plugin.js +599 -0
- data/apps/core/components/public/js/tinymce/plugins/table/classes/Quirks.js +400 -0
- data/apps/core/components/public/js/tinymce/plugins/table/classes/ResizeBars.js +984 -0
- data/apps/core/components/public/js/tinymce/plugins/table/classes/TableGrid.js +941 -0
- data/apps/core/components/public/js/tinymce/plugins/table/classes/Utils.js +36 -0
- data/apps/core/components/public/js/tinymce/plugins/table/plugin.dev.js +142 -0
- data/apps/core/components/public/js/tinymce/plugins/table/plugin.js +4106 -0
- data/apps/core/components/public/js/tinymce/plugins/table/plugin.min.js +2 -0
- data/apps/core/components/public/js/tinymce/plugins/template/plugin.js +270 -0
- data/apps/core/components/public/js/tinymce/plugins/template/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/textcolor/plugin.js +282 -0
- data/apps/core/components/public/js/tinymce/plugins/textcolor/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/textpattern/plugin.js +268 -0
- data/apps/core/components/public/js/tinymce/plugins/textpattern/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/css/visualblocks.css +135 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/address.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/article.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/aside.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/blockquote.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/div.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/dl.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/figure.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h1.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h2.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h3.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h4.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h5.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h6.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/hgroup.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/ol.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/p.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/pre.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/section.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/ul.gif +0 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/plugin.js +86 -0
- data/apps/core/components/public/js/tinymce/plugins/visualblocks/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/visualchars/plugin.js +123 -0
- data/apps/core/components/public/js/tinymce/plugins/visualchars/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/plugins/wordcount/plugin.js +69 -0
- data/apps/core/components/public/js/tinymce/plugins/wordcount/plugin.min.js +1 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/AbsoluteLayout.less +17 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Animations.less +10 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Button.less +172 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/ButtonGroup.less +71 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Checkbox.less +49 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/ColorBox.less +6 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/ColorButton.less +72 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/ColorPicker.less +80 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/ComboBox.less +39 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Container.less +9 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Content.Inline.less +4 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Content.Objects.less +166 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Content.less +27 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/CropRect.less +54 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/FieldSet.less +15 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/FitLayout.less +9 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/FloatPanel.less +69 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/FlowLayout.less +36 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Icons.Ie7.less +136 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Icons.less +180 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Iframe.less +6 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/ImagePanel.less +20 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/InfoBox.less +71 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Label.less +38 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/ListBox.less +26 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Menu.less +34 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/MenuBar.less +32 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/MenuButton.less +34 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/MenuItem.less +142 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Mixins.less +54 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Notification.less +144 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Panel.less +7 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Path.less +45 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Progress.less +34 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Radio.less +1 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Reset.less +32 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/ResizeHandle.less +18 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Scrollable.less +44 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/SelectBox.less +6 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Slider.less +29 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Spacer.less +5 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/SplitButton.less +49 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/StackLayout.less +5 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/TabPanel.less +44 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/TextBox.less +41 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Throbber.less +19 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/TinyMCE.less +159 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/ToolTip.less +129 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Variables.less +214 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/Window.less +127 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/content.inline.min.css +1 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/content.min.css +1 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/readme.md +1 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.json +1277 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.json +3381 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.svg +129 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/img/object.gif +0 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/skin.dev.less +46 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.dev.less +46 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.less +2542 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/skin.less +2586 -0
- data/apps/core/components/public/js/tinymce/skins/lightgray/skin.min.css +1 -0
- data/apps/core/components/public/js/tinymce/themes/modern/theme.js +878 -0
- data/apps/core/components/public/js/tinymce/themes/modern/theme.min.js +1 -0
- data/apps/core/components/public/js/tinymce/tinymce.dev.js +286 -0
- data/apps/core/components/public/js/tinymce/tinymce.js +45811 -0
- data/apps/core/components/public/js/tinymce/tinymce.min.js +13 -0
- data/apps/core/forms/widgets/form/form.rb +3 -1
- data/apps/core/forms/widgets/form/form.shtml +1 -0
- data/apps/core/forms/widgets/inputs/search_select/search_select.rb +1 -1
- data/apps/core/forms/widgets/inputs/select/select.rb +1 -1
- data/apps/core/forms/widgets/inputs/select/select.shtml +0 -1
- data/apps/messenger/backends/sms/skebby.rb +1 -1
- data/apps/messenger/controllers/mixins/messenger_helper.rb +23 -5
- data/lib/spiderfw/config/options/spider.rb +1 -1
- data/lib/spiderfw/controller/mixins/visual.rb +2 -0
- data/lib/spiderfw/http/adapters/rack.rb +10 -5
- data/lib/spiderfw/http/http.rb +4 -2
- data/lib/spiderfw/model/base_model.rb +4 -4
- data/lib/spiderfw/model/mappers/db_mapper.rb +4 -2
- data/lib/spiderfw/model/storage/db/adapters/mysql.rb +2 -1
- data/lib/spiderfw/model/storage/db/db_storage.rb +4 -0
- data/lib/spiderfw/spider.rb +6 -0
- data/lib/spiderfw/templates/layout.rb +1 -1
- data/lib/spiderfw/utils/monkey/object.rb +3 -0
- data/spider.gemspec +6 -2
- metadata +539 -42
- data/blueprints/.DS_Store +0 -0
@@ -0,0 +1,634 @@
|
|
1
|
+
/**
|
2
|
+
* ControlSelection.js
|
3
|
+
*
|
4
|
+
* Released under LGPL License.
|
5
|
+
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
6
|
+
*
|
7
|
+
* License: http://www.tinymce.com/license
|
8
|
+
* Contributing: http://www.tinymce.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
/**
|
12
|
+
* This class handles control selection of elements. Controls are elements
|
13
|
+
* that can be resized and needs to be selected as a whole. It adds custom resize handles
|
14
|
+
* to all browser engines that support properly disabling the built in resize logic.
|
15
|
+
*
|
16
|
+
* @class tinymce.dom.ControlSelection
|
17
|
+
*/
|
18
|
+
define("tinymce/dom/ControlSelection", [
|
19
|
+
"tinymce/util/VK",
|
20
|
+
"tinymce/util/Tools",
|
21
|
+
"tinymce/util/Delay",
|
22
|
+
"tinymce/Env",
|
23
|
+
"tinymce/dom/NodeType"
|
24
|
+
], function(VK, Tools, Delay, Env, NodeType) {
|
25
|
+
var isContentEditableFalse = NodeType.isContentEditableFalse;
|
26
|
+
|
27
|
+
return function(selection, editor) {
|
28
|
+
var dom = editor.dom, each = Tools.each;
|
29
|
+
var selectedElm, selectedElmGhost, resizeHelper, resizeHandles, selectedHandle, lastMouseDownEvent;
|
30
|
+
var startX, startY, selectedElmX, selectedElmY, startW, startH, ratio, resizeStarted;
|
31
|
+
var width, height, editableDoc = editor.getDoc(), rootDocument = document, isIE = Env.ie && Env.ie < 11;
|
32
|
+
var abs = Math.abs, round = Math.round, rootElement = editor.getBody(), startScrollWidth, startScrollHeight;
|
33
|
+
|
34
|
+
// Details about each resize handle how to scale etc
|
35
|
+
resizeHandles = {
|
36
|
+
// Name: x multiplier, y multiplier, delta size x, delta size y
|
37
|
+
/*n: [0.5, 0, 0, -1],
|
38
|
+
e: [1, 0.5, 1, 0],
|
39
|
+
s: [0.5, 1, 0, 1],
|
40
|
+
w: [0, 0.5, -1, 0],*/
|
41
|
+
nw: [0, 0, -1, -1],
|
42
|
+
ne: [1, 0, 1, -1],
|
43
|
+
se: [1, 1, 1, 1],
|
44
|
+
sw: [0, 1, -1, 1]
|
45
|
+
};
|
46
|
+
|
47
|
+
// Add CSS for resize handles, cloned element and selected
|
48
|
+
var rootClass = '.mce-content-body';
|
49
|
+
editor.contentStyles.push(
|
50
|
+
rootClass + ' div.mce-resizehandle {' +
|
51
|
+
'position: absolute;' +
|
52
|
+
'border: 1px solid black;' +
|
53
|
+
'background: #FFF;' +
|
54
|
+
'width: 7px;' +
|
55
|
+
'height: 7px;' +
|
56
|
+
'z-index: 10000' +
|
57
|
+
'}' +
|
58
|
+
rootClass + ' .mce-resizehandle:hover {' +
|
59
|
+
'background: #000' +
|
60
|
+
'}' +
|
61
|
+
rootClass + ' img[data-mce-selected],' + rootClass + ' hr[data-mce-selected] {' +
|
62
|
+
'outline: 1px solid black;' +
|
63
|
+
'resize: none' + // Have been talks about implementing this in browsers
|
64
|
+
'}' +
|
65
|
+
rootClass + ' .mce-clonedresizable {' +
|
66
|
+
'position: absolute;' +
|
67
|
+
(Env.gecko ? '' : 'outline: 1px dashed black;') + // Gecko produces trails while resizing
|
68
|
+
'opacity: .5;' +
|
69
|
+
'filter: alpha(opacity=50);' +
|
70
|
+
'z-index: 10000' +
|
71
|
+
'}' +
|
72
|
+
rootClass + ' .mce-resize-helper {' +
|
73
|
+
'background: #555;' +
|
74
|
+
'background: rgba(0,0,0,0.75);' +
|
75
|
+
'border-radius: 3px;' +
|
76
|
+
'border: 1px;' +
|
77
|
+
'color: white;' +
|
78
|
+
'display: none;' +
|
79
|
+
'font-family: sans-serif;' +
|
80
|
+
'font-size: 12px;' +
|
81
|
+
'white-space: nowrap;' +
|
82
|
+
'line-height: 14px;' +
|
83
|
+
'margin: 5px 10px;' +
|
84
|
+
'padding: 5px;' +
|
85
|
+
'position: absolute;' +
|
86
|
+
'z-index: 10001' +
|
87
|
+
'}'
|
88
|
+
);
|
89
|
+
|
90
|
+
function isResizable(elm) {
|
91
|
+
var selector = editor.settings.object_resizing;
|
92
|
+
|
93
|
+
if (selector === false || Env.iOS) {
|
94
|
+
return false;
|
95
|
+
}
|
96
|
+
|
97
|
+
if (typeof selector != 'string') {
|
98
|
+
selector = 'table,img,div';
|
99
|
+
}
|
100
|
+
|
101
|
+
if (elm.getAttribute('data-mce-resize') === 'false') {
|
102
|
+
return false;
|
103
|
+
}
|
104
|
+
|
105
|
+
if (elm == editor.getBody()) {
|
106
|
+
return false;
|
107
|
+
}
|
108
|
+
|
109
|
+
return editor.dom.is(elm, selector);
|
110
|
+
}
|
111
|
+
|
112
|
+
function resizeGhostElement(e) {
|
113
|
+
var deltaX, deltaY, proportional;
|
114
|
+
var resizeHelperX, resizeHelperY;
|
115
|
+
|
116
|
+
// Calc new width/height
|
117
|
+
deltaX = e.screenX - startX;
|
118
|
+
deltaY = e.screenY - startY;
|
119
|
+
|
120
|
+
// Calc new size
|
121
|
+
width = deltaX * selectedHandle[2] + startW;
|
122
|
+
height = deltaY * selectedHandle[3] + startH;
|
123
|
+
|
124
|
+
// Never scale down lower than 5 pixels
|
125
|
+
width = width < 5 ? 5 : width;
|
126
|
+
height = height < 5 ? 5 : height;
|
127
|
+
|
128
|
+
if (selectedElm.nodeName == "IMG" && editor.settings.resize_img_proportional !== false) {
|
129
|
+
proportional = !VK.modifierPressed(e);
|
130
|
+
} else {
|
131
|
+
proportional = VK.modifierPressed(e) || (selectedElm.nodeName == "IMG" && selectedHandle[2] * selectedHandle[3] !== 0);
|
132
|
+
}
|
133
|
+
|
134
|
+
// Constrain proportions
|
135
|
+
if (proportional) {
|
136
|
+
if (abs(deltaX) > abs(deltaY)) {
|
137
|
+
height = round(width * ratio);
|
138
|
+
width = round(height / ratio);
|
139
|
+
} else {
|
140
|
+
width = round(height / ratio);
|
141
|
+
height = round(width * ratio);
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
// Update ghost size
|
146
|
+
dom.setStyles(selectedElmGhost, {
|
147
|
+
width: width,
|
148
|
+
height: height
|
149
|
+
});
|
150
|
+
|
151
|
+
// Update resize helper position
|
152
|
+
resizeHelperX = selectedHandle.startPos.x + deltaX;
|
153
|
+
resizeHelperY = selectedHandle.startPos.y + deltaY;
|
154
|
+
resizeHelperX = resizeHelperX > 0 ? resizeHelperX : 0;
|
155
|
+
resizeHelperY = resizeHelperY > 0 ? resizeHelperY : 0;
|
156
|
+
|
157
|
+
dom.setStyles(resizeHelper, {
|
158
|
+
left: resizeHelperX,
|
159
|
+
top: resizeHelperY,
|
160
|
+
display: 'block'
|
161
|
+
});
|
162
|
+
|
163
|
+
resizeHelper.innerHTML = width + ' × ' + height;
|
164
|
+
|
165
|
+
// Update ghost X position if needed
|
166
|
+
if (selectedHandle[2] < 0 && selectedElmGhost.clientWidth <= width) {
|
167
|
+
dom.setStyle(selectedElmGhost, 'left', selectedElmX + (startW - width));
|
168
|
+
}
|
169
|
+
|
170
|
+
// Update ghost Y position if needed
|
171
|
+
if (selectedHandle[3] < 0 && selectedElmGhost.clientHeight <= height) {
|
172
|
+
dom.setStyle(selectedElmGhost, 'top', selectedElmY + (startH - height));
|
173
|
+
}
|
174
|
+
|
175
|
+
// Calculate how must overflow we got
|
176
|
+
deltaX = rootElement.scrollWidth - startScrollWidth;
|
177
|
+
deltaY = rootElement.scrollHeight - startScrollHeight;
|
178
|
+
|
179
|
+
// Re-position the resize helper based on the overflow
|
180
|
+
if (deltaX + deltaY !== 0) {
|
181
|
+
dom.setStyles(resizeHelper, {
|
182
|
+
left: resizeHelperX - deltaX,
|
183
|
+
top: resizeHelperY - deltaY
|
184
|
+
});
|
185
|
+
}
|
186
|
+
|
187
|
+
if (!resizeStarted) {
|
188
|
+
editor.fire('ObjectResizeStart', {target: selectedElm, width: startW, height: startH});
|
189
|
+
resizeStarted = true;
|
190
|
+
}
|
191
|
+
}
|
192
|
+
|
193
|
+
function endGhostResize() {
|
194
|
+
resizeStarted = false;
|
195
|
+
|
196
|
+
function setSizeProp(name, value) {
|
197
|
+
if (value) {
|
198
|
+
// Resize by using style or attribute
|
199
|
+
if (selectedElm.style[name] || !editor.schema.isValid(selectedElm.nodeName.toLowerCase(), name)) {
|
200
|
+
dom.setStyle(selectedElm, name, value);
|
201
|
+
} else {
|
202
|
+
dom.setAttrib(selectedElm, name, value);
|
203
|
+
}
|
204
|
+
}
|
205
|
+
}
|
206
|
+
|
207
|
+
// Set width/height properties
|
208
|
+
setSizeProp('width', width);
|
209
|
+
setSizeProp('height', height);
|
210
|
+
|
211
|
+
dom.unbind(editableDoc, 'mousemove', resizeGhostElement);
|
212
|
+
dom.unbind(editableDoc, 'mouseup', endGhostResize);
|
213
|
+
|
214
|
+
if (rootDocument != editableDoc) {
|
215
|
+
dom.unbind(rootDocument, 'mousemove', resizeGhostElement);
|
216
|
+
dom.unbind(rootDocument, 'mouseup', endGhostResize);
|
217
|
+
}
|
218
|
+
|
219
|
+
// Remove ghost/helper and update resize handle positions
|
220
|
+
dom.remove(selectedElmGhost);
|
221
|
+
dom.remove(resizeHelper);
|
222
|
+
|
223
|
+
if (!isIE || selectedElm.nodeName == "TABLE") {
|
224
|
+
showResizeRect(selectedElm);
|
225
|
+
}
|
226
|
+
|
227
|
+
editor.fire('ObjectResized', {target: selectedElm, width: width, height: height});
|
228
|
+
dom.setAttrib(selectedElm, 'style', dom.getAttrib(selectedElm, 'style'));
|
229
|
+
editor.nodeChanged();
|
230
|
+
}
|
231
|
+
|
232
|
+
function showResizeRect(targetElm, mouseDownHandleName, mouseDownEvent) {
|
233
|
+
var position, targetWidth, targetHeight, e, rect;
|
234
|
+
|
235
|
+
hideResizeRect();
|
236
|
+
unbindResizeHandleEvents();
|
237
|
+
|
238
|
+
// Get position and size of target
|
239
|
+
position = dom.getPos(targetElm, rootElement);
|
240
|
+
selectedElmX = position.x;
|
241
|
+
selectedElmY = position.y;
|
242
|
+
rect = targetElm.getBoundingClientRect(); // Fix for Gecko offsetHeight for table with caption
|
243
|
+
targetWidth = rect.width || (rect.right - rect.left);
|
244
|
+
targetHeight = rect.height || (rect.bottom - rect.top);
|
245
|
+
|
246
|
+
// Reset width/height if user selects a new image/table
|
247
|
+
if (selectedElm != targetElm) {
|
248
|
+
detachResizeStartListener();
|
249
|
+
selectedElm = targetElm;
|
250
|
+
width = height = 0;
|
251
|
+
}
|
252
|
+
|
253
|
+
// Makes it possible to disable resizing
|
254
|
+
e = editor.fire('ObjectSelected', {target: targetElm});
|
255
|
+
|
256
|
+
if (isResizable(targetElm) && !e.isDefaultPrevented()) {
|
257
|
+
each(resizeHandles, function(handle, name) {
|
258
|
+
var handleElm;
|
259
|
+
|
260
|
+
function startDrag(e) {
|
261
|
+
startX = e.screenX;
|
262
|
+
startY = e.screenY;
|
263
|
+
startW = selectedElm.clientWidth;
|
264
|
+
startH = selectedElm.clientHeight;
|
265
|
+
ratio = startH / startW;
|
266
|
+
selectedHandle = handle;
|
267
|
+
|
268
|
+
handle.startPos = {
|
269
|
+
x: targetWidth * handle[0] + selectedElmX,
|
270
|
+
y: targetHeight * handle[1] + selectedElmY
|
271
|
+
};
|
272
|
+
|
273
|
+
startScrollWidth = rootElement.scrollWidth;
|
274
|
+
startScrollHeight = rootElement.scrollHeight;
|
275
|
+
|
276
|
+
selectedElmGhost = selectedElm.cloneNode(true);
|
277
|
+
dom.addClass(selectedElmGhost, 'mce-clonedresizable');
|
278
|
+
dom.setAttrib(selectedElmGhost, 'data-mce-bogus', 'all');
|
279
|
+
selectedElmGhost.contentEditable = false; // Hides IE move layer cursor
|
280
|
+
selectedElmGhost.unSelectabe = true;
|
281
|
+
dom.setStyles(selectedElmGhost, {
|
282
|
+
left: selectedElmX,
|
283
|
+
top: selectedElmY,
|
284
|
+
margin: 0
|
285
|
+
});
|
286
|
+
|
287
|
+
selectedElmGhost.removeAttribute('data-mce-selected');
|
288
|
+
rootElement.appendChild(selectedElmGhost);
|
289
|
+
|
290
|
+
dom.bind(editableDoc, 'mousemove', resizeGhostElement);
|
291
|
+
dom.bind(editableDoc, 'mouseup', endGhostResize);
|
292
|
+
|
293
|
+
if (rootDocument != editableDoc) {
|
294
|
+
dom.bind(rootDocument, 'mousemove', resizeGhostElement);
|
295
|
+
dom.bind(rootDocument, 'mouseup', endGhostResize);
|
296
|
+
}
|
297
|
+
|
298
|
+
resizeHelper = dom.add(rootElement, 'div', {
|
299
|
+
'class': 'mce-resize-helper',
|
300
|
+
'data-mce-bogus': 'all'
|
301
|
+
}, startW + ' × ' + startH);
|
302
|
+
}
|
303
|
+
|
304
|
+
if (mouseDownHandleName) {
|
305
|
+
// Drag started by IE native resizestart
|
306
|
+
if (name == mouseDownHandleName) {
|
307
|
+
startDrag(mouseDownEvent);
|
308
|
+
}
|
309
|
+
|
310
|
+
return;
|
311
|
+
}
|
312
|
+
|
313
|
+
// Get existing or render resize handle
|
314
|
+
handleElm = dom.get('mceResizeHandle' + name);
|
315
|
+
if (handleElm) {
|
316
|
+
dom.remove(handleElm);
|
317
|
+
}
|
318
|
+
|
319
|
+
handleElm = dom.add(rootElement, 'div', {
|
320
|
+
id: 'mceResizeHandle' + name,
|
321
|
+
'data-mce-bogus': 'all',
|
322
|
+
'class': 'mce-resizehandle',
|
323
|
+
unselectable: true,
|
324
|
+
style: 'cursor:' + name + '-resize; margin:0; padding:0'
|
325
|
+
});
|
326
|
+
|
327
|
+
// Hides IE move layer cursor
|
328
|
+
// If we set it on Chrome we get this wounderful bug: #6725
|
329
|
+
if (Env.ie) {
|
330
|
+
handleElm.contentEditable = false;
|
331
|
+
}
|
332
|
+
|
333
|
+
dom.bind(handleElm, 'mousedown', function(e) {
|
334
|
+
e.stopImmediatePropagation();
|
335
|
+
e.preventDefault();
|
336
|
+
startDrag(e);
|
337
|
+
});
|
338
|
+
|
339
|
+
handle.elm = handleElm;
|
340
|
+
|
341
|
+
// Position element
|
342
|
+
dom.setStyles(handleElm, {
|
343
|
+
left: (targetWidth * handle[0] + selectedElmX) - (handleElm.offsetWidth / 2),
|
344
|
+
top: (targetHeight * handle[1] + selectedElmY) - (handleElm.offsetHeight / 2)
|
345
|
+
});
|
346
|
+
});
|
347
|
+
} else {
|
348
|
+
hideResizeRect();
|
349
|
+
}
|
350
|
+
|
351
|
+
selectedElm.setAttribute('data-mce-selected', '1');
|
352
|
+
}
|
353
|
+
|
354
|
+
function hideResizeRect() {
|
355
|
+
var name, handleElm;
|
356
|
+
|
357
|
+
unbindResizeHandleEvents();
|
358
|
+
|
359
|
+
if (selectedElm) {
|
360
|
+
selectedElm.removeAttribute('data-mce-selected');
|
361
|
+
}
|
362
|
+
|
363
|
+
for (name in resizeHandles) {
|
364
|
+
handleElm = dom.get('mceResizeHandle' + name);
|
365
|
+
if (handleElm) {
|
366
|
+
dom.unbind(handleElm);
|
367
|
+
dom.remove(handleElm);
|
368
|
+
}
|
369
|
+
}
|
370
|
+
}
|
371
|
+
|
372
|
+
function updateResizeRect(e) {
|
373
|
+
var startElm, controlElm;
|
374
|
+
|
375
|
+
function isChildOrEqual(node, parent) {
|
376
|
+
if (node) {
|
377
|
+
do {
|
378
|
+
if (node === parent) {
|
379
|
+
return true;
|
380
|
+
}
|
381
|
+
} while ((node = node.parentNode));
|
382
|
+
}
|
383
|
+
}
|
384
|
+
|
385
|
+
// Ignore all events while resizing or if the editor instance was removed
|
386
|
+
if (resizeStarted || editor.removed) {
|
387
|
+
return;
|
388
|
+
}
|
389
|
+
|
390
|
+
// Remove data-mce-selected from all elements since they might have been copied using Ctrl+c/v
|
391
|
+
each(dom.select('img[data-mce-selected],hr[data-mce-selected]'), function(img) {
|
392
|
+
img.removeAttribute('data-mce-selected');
|
393
|
+
});
|
394
|
+
|
395
|
+
controlElm = e.type == 'mousedown' ? e.target : selection.getNode();
|
396
|
+
controlElm = dom.$(controlElm).closest(isIE ? 'table' : 'table,img,hr')[0];
|
397
|
+
|
398
|
+
if (isChildOrEqual(controlElm, rootElement)) {
|
399
|
+
disableGeckoResize();
|
400
|
+
startElm = selection.getStart(true);
|
401
|
+
|
402
|
+
if (isChildOrEqual(startElm, controlElm) && isChildOrEqual(selection.getEnd(true), controlElm)) {
|
403
|
+
if (!isIE || (controlElm != startElm && startElm.nodeName !== 'IMG')) {
|
404
|
+
showResizeRect(controlElm);
|
405
|
+
return;
|
406
|
+
}
|
407
|
+
}
|
408
|
+
}
|
409
|
+
|
410
|
+
hideResizeRect();
|
411
|
+
}
|
412
|
+
|
413
|
+
function attachEvent(elm, name, func) {
|
414
|
+
if (elm && elm.attachEvent) {
|
415
|
+
elm.attachEvent('on' + name, func);
|
416
|
+
}
|
417
|
+
}
|
418
|
+
|
419
|
+
function detachEvent(elm, name, func) {
|
420
|
+
if (elm && elm.detachEvent) {
|
421
|
+
elm.detachEvent('on' + name, func);
|
422
|
+
}
|
423
|
+
}
|
424
|
+
|
425
|
+
function resizeNativeStart(e) {
|
426
|
+
var target = e.srcElement, pos, name, corner, cornerX, cornerY, relativeX, relativeY;
|
427
|
+
|
428
|
+
pos = target.getBoundingClientRect();
|
429
|
+
relativeX = lastMouseDownEvent.clientX - pos.left;
|
430
|
+
relativeY = lastMouseDownEvent.clientY - pos.top;
|
431
|
+
|
432
|
+
// Figure out what corner we are draging on
|
433
|
+
for (name in resizeHandles) {
|
434
|
+
corner = resizeHandles[name];
|
435
|
+
|
436
|
+
cornerX = target.offsetWidth * corner[0];
|
437
|
+
cornerY = target.offsetHeight * corner[1];
|
438
|
+
|
439
|
+
if (abs(cornerX - relativeX) < 8 && abs(cornerY - relativeY) < 8) {
|
440
|
+
selectedHandle = corner;
|
441
|
+
break;
|
442
|
+
}
|
443
|
+
}
|
444
|
+
|
445
|
+
// Remove native selection and let the magic begin
|
446
|
+
resizeStarted = true;
|
447
|
+
editor.fire('ObjectResizeStart', {
|
448
|
+
target: selectedElm,
|
449
|
+
width: selectedElm.clientWidth,
|
450
|
+
height: selectedElm.clientHeight
|
451
|
+
});
|
452
|
+
editor.getDoc().selection.empty();
|
453
|
+
showResizeRect(target, name, lastMouseDownEvent);
|
454
|
+
}
|
455
|
+
|
456
|
+
function preventDefault(e) {
|
457
|
+
if (e.preventDefault) {
|
458
|
+
e.preventDefault();
|
459
|
+
} else {
|
460
|
+
e.returnValue = false; // IE
|
461
|
+
}
|
462
|
+
}
|
463
|
+
|
464
|
+
function nativeControlSelect(e) {
|
465
|
+
var target = e.srcElement;
|
466
|
+
|
467
|
+
if (isContentEditableFalse(target)) {
|
468
|
+
preventDefault(e);
|
469
|
+
return;
|
470
|
+
}
|
471
|
+
|
472
|
+
if (target != selectedElm) {
|
473
|
+
editor.fire('ObjectSelected', {target: target});
|
474
|
+
detachResizeStartListener();
|
475
|
+
|
476
|
+
if (target.id.indexOf('mceResizeHandle') === 0) {
|
477
|
+
e.returnValue = false;
|
478
|
+
return;
|
479
|
+
}
|
480
|
+
|
481
|
+
if (target.nodeName == 'IMG' || target.nodeName == 'TABLE') {
|
482
|
+
hideResizeRect();
|
483
|
+
selectedElm = target;
|
484
|
+
attachEvent(target, 'resizestart', resizeNativeStart);
|
485
|
+
}
|
486
|
+
}
|
487
|
+
}
|
488
|
+
|
489
|
+
function detachResizeStartListener() {
|
490
|
+
detachEvent(selectedElm, 'resizestart', resizeNativeStart);
|
491
|
+
}
|
492
|
+
|
493
|
+
function unbindResizeHandleEvents() {
|
494
|
+
for (var name in resizeHandles) {
|
495
|
+
var handle = resizeHandles[name];
|
496
|
+
|
497
|
+
if (handle.elm) {
|
498
|
+
dom.unbind(handle.elm);
|
499
|
+
delete handle.elm;
|
500
|
+
}
|
501
|
+
}
|
502
|
+
}
|
503
|
+
|
504
|
+
function disableGeckoResize() {
|
505
|
+
try {
|
506
|
+
// Disable object resizing on Gecko
|
507
|
+
editor.getDoc().execCommand('enableObjectResizing', false, false);
|
508
|
+
} catch (ex) {
|
509
|
+
// Ignore
|
510
|
+
}
|
511
|
+
}
|
512
|
+
|
513
|
+
function controlSelect(elm) {
|
514
|
+
var ctrlRng;
|
515
|
+
|
516
|
+
if (!isIE) {
|
517
|
+
return;
|
518
|
+
}
|
519
|
+
|
520
|
+
ctrlRng = editableDoc.body.createControlRange();
|
521
|
+
|
522
|
+
try {
|
523
|
+
ctrlRng.addElement(elm);
|
524
|
+
ctrlRng.select();
|
525
|
+
return true;
|
526
|
+
} catch (ex) {
|
527
|
+
// Ignore since the element can't be control selected for example a P tag
|
528
|
+
}
|
529
|
+
}
|
530
|
+
|
531
|
+
editor.on('init', function() {
|
532
|
+
if (isIE) {
|
533
|
+
// Hide the resize rect on resize and reselect the image
|
534
|
+
editor.on('ObjectResized', function(e) {
|
535
|
+
if (e.target.nodeName != 'TABLE') {
|
536
|
+
hideResizeRect();
|
537
|
+
controlSelect(e.target);
|
538
|
+
}
|
539
|
+
});
|
540
|
+
|
541
|
+
attachEvent(rootElement, 'controlselect', nativeControlSelect);
|
542
|
+
|
543
|
+
editor.on('mousedown', function(e) {
|
544
|
+
lastMouseDownEvent = e;
|
545
|
+
});
|
546
|
+
} else {
|
547
|
+
disableGeckoResize();
|
548
|
+
|
549
|
+
// Sniff sniff, hard to feature detect this stuff
|
550
|
+
if (Env.ie >= 11) {
|
551
|
+
// Needs to be mousedown for drag/drop to work on IE 11
|
552
|
+
// Needs to be click on Edge to properly select images
|
553
|
+
editor.on('mousedown click', function(e) {
|
554
|
+
var nodeName = e.target.nodeName;
|
555
|
+
|
556
|
+
if (!resizeStarted && /^(TABLE|IMG|HR)$/.test(nodeName)) {
|
557
|
+
editor.selection.select(e.target, nodeName == 'TABLE');
|
558
|
+
|
559
|
+
// Only fire once since nodeChange is expensive
|
560
|
+
if (e.type == 'mousedown') {
|
561
|
+
editor.nodeChanged();
|
562
|
+
}
|
563
|
+
}
|
564
|
+
});
|
565
|
+
|
566
|
+
editor.dom.bind(rootElement, 'mscontrolselect', function(e) {
|
567
|
+
function delayedSelect(node) {
|
568
|
+
Delay.setEditorTimeout(editor, function() {
|
569
|
+
editor.selection.select(node);
|
570
|
+
});
|
571
|
+
}
|
572
|
+
|
573
|
+
if (isContentEditableFalse(e.target)) {
|
574
|
+
e.preventDefault();
|
575
|
+
delayedSelect(e.target);
|
576
|
+
return;
|
577
|
+
}
|
578
|
+
|
579
|
+
if (/^(TABLE|IMG|HR)$/.test(e.target.nodeName)) {
|
580
|
+
e.preventDefault();
|
581
|
+
|
582
|
+
// This moves the selection from being a control selection to a text like selection like in WebKit #6753
|
583
|
+
// TODO: Fix this the day IE works like other browsers without this nasty native ugly control selections.
|
584
|
+
if (e.target.tagName == 'IMG') {
|
585
|
+
delayedSelect(e.target);
|
586
|
+
}
|
587
|
+
}
|
588
|
+
});
|
589
|
+
}
|
590
|
+
}
|
591
|
+
|
592
|
+
var throttledUpdateResizeRect = Delay.throttle(updateResizeRect);
|
593
|
+
|
594
|
+
editor.on('nodechange ResizeEditor ResizeWindow drop', function(e) {
|
595
|
+
if (!editor.composing) {
|
596
|
+
throttledUpdateResizeRect(e);
|
597
|
+
}
|
598
|
+
});
|
599
|
+
|
600
|
+
// Update resize rect while typing in a table
|
601
|
+
editor.on('keydown keyup compositionend', function(e) {
|
602
|
+
// Don't update the resize rect while composing since it blows away the IME see: #2710
|
603
|
+
if (selectedElm && selectedElm.nodeName == "TABLE" && !editor.composing) {
|
604
|
+
throttledUpdateResizeRect(e);
|
605
|
+
}
|
606
|
+
});
|
607
|
+
|
608
|
+
editor.on('hide blur', hideResizeRect);
|
609
|
+
|
610
|
+
// Hide rect on focusout since it would float on top of windows otherwise
|
611
|
+
//editor.on('focusout', hideResizeRect);
|
612
|
+
});
|
613
|
+
|
614
|
+
editor.on('remove', unbindResizeHandleEvents);
|
615
|
+
|
616
|
+
function destroy() {
|
617
|
+
selectedElm = selectedElmGhost = null;
|
618
|
+
|
619
|
+
if (isIE) {
|
620
|
+
detachResizeStartListener();
|
621
|
+
detachEvent(rootElement, 'controlselect', nativeControlSelect);
|
622
|
+
}
|
623
|
+
}
|
624
|
+
|
625
|
+
return {
|
626
|
+
isResizable: isResizable,
|
627
|
+
showResizeRect: showResizeRect,
|
628
|
+
hideResizeRect: hideResizeRect,
|
629
|
+
updateResizeRect: updateResizeRect,
|
630
|
+
controlSelect: controlSelect,
|
631
|
+
destroy: destroy
|
632
|
+
};
|
633
|
+
};
|
634
|
+
});
|