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 @@
|
|
1
|
+
tinymce.PluginManager.add("link",function(a){function b(b){return function(){var c=a.settings.link_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):"function"==typeof c?c(b):b(c)}}function c(a,b,c){function d(a,c){return c=c||[],tinymce.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b&&b(e)),c.push(e)}),c}return d(a,c||[])}function d(b){function d(a){var b=l.find("#text");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),l.find("#href").value(a.control.value())}function e(b){var c=[];return tinymce.each(a.dom.select("a:not([href])"),function(a){var d=a.name||a.id;d&&c.push({text:d,value:"#"+d,selected:-1!=b.indexOf("#"+d)})}),c.length?(c.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:c,onselect:d}):void 0}function f(){!k&&0===u.text.length&&m&&this.parent().parent().find("#text")[0].value(this.value())}function g(b){var c=b.meta||{};o&&o.value(a.convertURL(this.value(),"href")),tinymce.each(b.meta,function(a,b){l.find("#"+b).value(a)}),c.text||f.call(this)}function h(a){var b=v.getContent();if(/</.test(b)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(b)||-1==b.indexOf("href=")))return!1;if(a){var c,d=a.childNodes;if(0===d.length)return!1;for(c=d.length-1;c>=0;c--)if(3!=d[c].nodeType)return!1}return!0}var i,j,k,l,m,n,o,p,q,r,s,t,u={},v=a.selection,w=a.dom;i=v.getNode(),j=w.getParent(i,"a[href]"),m=h(),u.text=k=j?j.innerText||j.textContent:v.getContent({format:"text"}),u.href=j?w.getAttrib(j,"href"):"",j?u.target=w.getAttrib(j,"target"):a.settings.default_link_target&&(u.target=a.settings.default_link_target),(t=w.getAttrib(j,"rel"))&&(u.rel=t),(t=w.getAttrib(j,"class"))&&(u["class"]=t),(t=w.getAttrib(j,"title"))&&(u.title=t),m&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){u.text=this.value()}}),b&&(o={type:"listbox",label:"Link list",values:c(b,function(b){b.value=a.convertURL(b.value||b.url,"href")},[{text:"None",value:""}]),onselect:d,value:a.convertURL(u.href,"href"),onPostRender:function(){o=this}}),a.settings.target_list!==!1&&(a.settings.target_list||(a.settings.target_list=[{text:"None",value:""},{text:"New window",value:"_blank"}]),q={name:"target",type:"listbox",label:"Target",values:c(a.settings.target_list)}),a.settings.rel_list&&(p={name:"rel",type:"listbox",label:"Rel",values:c(a.settings.rel_list)}),a.settings.link_class_list&&(r={name:"class",type:"listbox",label:"Class",values:c(a.settings.link_class_list,function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[b.value]})})})}),a.settings.link_title!==!1&&(s={name:"title",type:"textbox",label:"Title",value:u.title}),l=a.windowManager.open({title:"Insert link",data:u,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:g,onkeyup:f},n,s,e(u.href),o,p,q,r],onSubmit:function(b){function c(b,c){var d=a.selection.getRng();tinymce.util.Delay.setEditorTimeout(a,function(){a.windowManager.confirm(b,function(b){a.selection.setRng(d),c(b)})})}function d(){var b={href:e,target:u.target?u.target:null,rel:u.rel?u.rel:null,"class":u["class"]?u["class"]:null,title:u.title?u.title:null};j?(a.focus(),m&&u.text!=k&&("innerText"in j?j.innerText=u.text:j.textContent=u.text),w.setAttribs(j,b),v.select(j),a.undoManager.add()):m?a.insertContent(w.createHTML("a",b,w.encode(u.text))):a.execCommand("mceInsertLink",!1,b)}var e;return u=tinymce.extend(u,b.data),(e=u.href)?e.indexOf("@")>0&&-1==e.indexOf("//")&&-1==e.indexOf("mailto:")?void c("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(a){a&&(e="mailto:"+e),d()}):a.settings.link_assume_external_targets&&!/^\w+:/i.test(e)||!a.settings.link_assume_external_targets&&/^\s*www[\.|\d\.]/i.test(e)?void c("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){a&&(e="http://"+e),d()}):void d():void a.execCommand("unlink")}})}a.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]"}),a.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),a.addShortcut("Meta+K","",b(d)),a.addCommand("mceLink",b(d)),this.showDialog=d,a.addMenuItem("link",{icon:"link",text:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]",context:"insert",prependToContext:!0})});
|
@@ -0,0 +1,885 @@
|
|
1
|
+
/**
|
2
|
+
* plugin.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
|
+
/*global tinymce:true */
|
12
|
+
/*eslint consistent-this:0 */
|
13
|
+
|
14
|
+
tinymce.PluginManager.add('lists', function(editor) {
|
15
|
+
var self = this;
|
16
|
+
|
17
|
+
function isChildOfBody(elm) {
|
18
|
+
return editor.$.contains(editor.getBody(), elm);
|
19
|
+
}
|
20
|
+
|
21
|
+
function isBr(node) {
|
22
|
+
return node && node.nodeName == 'BR';
|
23
|
+
}
|
24
|
+
|
25
|
+
function isListNode(node) {
|
26
|
+
return node && (/^(OL|UL|DL)$/).test(node.nodeName) && isChildOfBody(node);
|
27
|
+
}
|
28
|
+
|
29
|
+
function isFirstChild(node) {
|
30
|
+
return node.parentNode.firstChild == node;
|
31
|
+
}
|
32
|
+
|
33
|
+
function isLastChild(node) {
|
34
|
+
return node.parentNode.lastChild == node;
|
35
|
+
}
|
36
|
+
|
37
|
+
function isTextBlock(node) {
|
38
|
+
return node && !!editor.schema.getTextBlockElements()[node.nodeName];
|
39
|
+
}
|
40
|
+
|
41
|
+
function isEditorBody(elm) {
|
42
|
+
return elm === editor.getBody();
|
43
|
+
}
|
44
|
+
|
45
|
+
editor.on('init', function() {
|
46
|
+
var dom = editor.dom, selection = editor.selection;
|
47
|
+
|
48
|
+
function isEmpty(elm, keepBookmarks) {
|
49
|
+
var empty = dom.isEmpty(elm);
|
50
|
+
|
51
|
+
if (keepBookmarks && dom.select('span[data-mce-type=bookmark]').length > 0) {
|
52
|
+
return false;
|
53
|
+
}
|
54
|
+
|
55
|
+
return empty;
|
56
|
+
}
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Returns a range bookmark. This will convert indexed bookmarks into temporary span elements with
|
60
|
+
* index 0 so that they can be restored properly after the DOM has been modified. Text bookmarks will not have spans
|
61
|
+
* added to them since they can be restored after a dom operation.
|
62
|
+
*
|
63
|
+
* So this: <p><b>|</b><b>|</b></p>
|
64
|
+
* becomes: <p><b><span data-mce-type="bookmark">|</span></b><b data-mce-type="bookmark">|</span></b></p>
|
65
|
+
*
|
66
|
+
* @param {DOMRange} rng DOM Range to get bookmark on.
|
67
|
+
* @return {Object} Bookmark object.
|
68
|
+
*/
|
69
|
+
function createBookmark(rng) {
|
70
|
+
var bookmark = {};
|
71
|
+
|
72
|
+
function setupEndPoint(start) {
|
73
|
+
var offsetNode, container, offset;
|
74
|
+
|
75
|
+
container = rng[start ? 'startContainer' : 'endContainer'];
|
76
|
+
offset = rng[start ? 'startOffset' : 'endOffset'];
|
77
|
+
|
78
|
+
if (container.nodeType == 1) {
|
79
|
+
offsetNode = dom.create('span', {'data-mce-type': 'bookmark'});
|
80
|
+
|
81
|
+
if (container.hasChildNodes()) {
|
82
|
+
offset = Math.min(offset, container.childNodes.length - 1);
|
83
|
+
|
84
|
+
if (start) {
|
85
|
+
container.insertBefore(offsetNode, container.childNodes[offset]);
|
86
|
+
} else {
|
87
|
+
dom.insertAfter(offsetNode, container.childNodes[offset]);
|
88
|
+
}
|
89
|
+
} else {
|
90
|
+
container.appendChild(offsetNode);
|
91
|
+
}
|
92
|
+
|
93
|
+
container = offsetNode;
|
94
|
+
offset = 0;
|
95
|
+
}
|
96
|
+
|
97
|
+
bookmark[start ? 'startContainer' : 'endContainer'] = container;
|
98
|
+
bookmark[start ? 'startOffset' : 'endOffset'] = offset;
|
99
|
+
}
|
100
|
+
|
101
|
+
setupEndPoint(true);
|
102
|
+
|
103
|
+
if (!rng.collapsed) {
|
104
|
+
setupEndPoint();
|
105
|
+
}
|
106
|
+
|
107
|
+
return bookmark;
|
108
|
+
}
|
109
|
+
|
110
|
+
/**
|
111
|
+
* Moves the selection to the current bookmark and removes any selection container wrappers.
|
112
|
+
*
|
113
|
+
* @param {Object} bookmark Bookmark object to move selection to.
|
114
|
+
*/
|
115
|
+
function moveToBookmark(bookmark) {
|
116
|
+
function restoreEndPoint(start) {
|
117
|
+
var container, offset, node;
|
118
|
+
|
119
|
+
function nodeIndex(container) {
|
120
|
+
var node = container.parentNode.firstChild, idx = 0;
|
121
|
+
|
122
|
+
while (node) {
|
123
|
+
if (node == container) {
|
124
|
+
return idx;
|
125
|
+
}
|
126
|
+
|
127
|
+
// Skip data-mce-type=bookmark nodes
|
128
|
+
if (node.nodeType != 1 || node.getAttribute('data-mce-type') != 'bookmark') {
|
129
|
+
idx++;
|
130
|
+
}
|
131
|
+
|
132
|
+
node = node.nextSibling;
|
133
|
+
}
|
134
|
+
|
135
|
+
return -1;
|
136
|
+
}
|
137
|
+
|
138
|
+
container = node = bookmark[start ? 'startContainer' : 'endContainer'];
|
139
|
+
offset = bookmark[start ? 'startOffset' : 'endOffset'];
|
140
|
+
|
141
|
+
if (!container) {
|
142
|
+
return;
|
143
|
+
}
|
144
|
+
|
145
|
+
if (container.nodeType == 1) {
|
146
|
+
offset = nodeIndex(container);
|
147
|
+
container = container.parentNode;
|
148
|
+
dom.remove(node);
|
149
|
+
}
|
150
|
+
|
151
|
+
bookmark[start ? 'startContainer' : 'endContainer'] = container;
|
152
|
+
bookmark[start ? 'startOffset' : 'endOffset'] = offset;
|
153
|
+
}
|
154
|
+
|
155
|
+
restoreEndPoint(true);
|
156
|
+
restoreEndPoint();
|
157
|
+
|
158
|
+
var rng = dom.createRng();
|
159
|
+
|
160
|
+
rng.setStart(bookmark.startContainer, bookmark.startOffset);
|
161
|
+
|
162
|
+
if (bookmark.endContainer) {
|
163
|
+
rng.setEnd(bookmark.endContainer, bookmark.endOffset);
|
164
|
+
}
|
165
|
+
|
166
|
+
selection.setRng(rng);
|
167
|
+
}
|
168
|
+
|
169
|
+
function createNewTextBlock(contentNode, blockName) {
|
170
|
+
var node, textBlock, fragment = dom.createFragment(), hasContentNode;
|
171
|
+
var blockElements = editor.schema.getBlockElements();
|
172
|
+
|
173
|
+
if (editor.settings.forced_root_block) {
|
174
|
+
blockName = blockName || editor.settings.forced_root_block;
|
175
|
+
}
|
176
|
+
|
177
|
+
if (blockName) {
|
178
|
+
textBlock = dom.create(blockName);
|
179
|
+
|
180
|
+
if (textBlock.tagName === editor.settings.forced_root_block) {
|
181
|
+
dom.setAttribs(textBlock, editor.settings.forced_root_block_attrs);
|
182
|
+
}
|
183
|
+
|
184
|
+
fragment.appendChild(textBlock);
|
185
|
+
}
|
186
|
+
|
187
|
+
if (contentNode) {
|
188
|
+
while ((node = contentNode.firstChild)) {
|
189
|
+
var nodeName = node.nodeName;
|
190
|
+
|
191
|
+
if (!hasContentNode && (nodeName != 'SPAN' || node.getAttribute('data-mce-type') != 'bookmark')) {
|
192
|
+
hasContentNode = true;
|
193
|
+
}
|
194
|
+
|
195
|
+
if (blockElements[nodeName]) {
|
196
|
+
fragment.appendChild(node);
|
197
|
+
textBlock = null;
|
198
|
+
} else {
|
199
|
+
if (blockName) {
|
200
|
+
if (!textBlock) {
|
201
|
+
textBlock = dom.create(blockName);
|
202
|
+
fragment.appendChild(textBlock);
|
203
|
+
}
|
204
|
+
|
205
|
+
textBlock.appendChild(node);
|
206
|
+
} else {
|
207
|
+
fragment.appendChild(node);
|
208
|
+
}
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
|
213
|
+
if (!editor.settings.forced_root_block) {
|
214
|
+
fragment.appendChild(dom.create('br'));
|
215
|
+
} else {
|
216
|
+
// BR is needed in empty blocks on non IE browsers
|
217
|
+
if (!hasContentNode && (!tinymce.Env.ie || tinymce.Env.ie > 10)) {
|
218
|
+
textBlock.appendChild(dom.create('br', {'data-mce-bogus': '1'}));
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
222
|
+
return fragment;
|
223
|
+
}
|
224
|
+
|
225
|
+
function getSelectedListItems() {
|
226
|
+
return tinymce.grep(selection.getSelectedBlocks(), function(block) {
|
227
|
+
return /^(LI|DT|DD)$/.test(block.nodeName);
|
228
|
+
});
|
229
|
+
}
|
230
|
+
|
231
|
+
function splitList(ul, li, newBlock) {
|
232
|
+
var tmpRng, fragment, bookmarks, node;
|
233
|
+
|
234
|
+
function removeAndKeepBookmarks(targetNode) {
|
235
|
+
tinymce.each(bookmarks, function(node) {
|
236
|
+
targetNode.parentNode.insertBefore(node, li.parentNode);
|
237
|
+
});
|
238
|
+
|
239
|
+
dom.remove(targetNode);
|
240
|
+
}
|
241
|
+
|
242
|
+
bookmarks = dom.select('span[data-mce-type="bookmark"]', ul);
|
243
|
+
newBlock = newBlock || createNewTextBlock(li);
|
244
|
+
tmpRng = dom.createRng();
|
245
|
+
tmpRng.setStartAfter(li);
|
246
|
+
tmpRng.setEndAfter(ul);
|
247
|
+
fragment = tmpRng.extractContents();
|
248
|
+
|
249
|
+
for (node = fragment.firstChild; node; node = node.firstChild) {
|
250
|
+
if (node.nodeName == 'LI' && dom.isEmpty(node)) {
|
251
|
+
dom.remove(node);
|
252
|
+
break;
|
253
|
+
}
|
254
|
+
}
|
255
|
+
|
256
|
+
if (!dom.isEmpty(fragment)) {
|
257
|
+
dom.insertAfter(fragment, ul);
|
258
|
+
}
|
259
|
+
|
260
|
+
dom.insertAfter(newBlock, ul);
|
261
|
+
|
262
|
+
if (isEmpty(li.parentNode)) {
|
263
|
+
removeAndKeepBookmarks(li.parentNode);
|
264
|
+
}
|
265
|
+
|
266
|
+
dom.remove(li);
|
267
|
+
|
268
|
+
if (isEmpty(ul)) {
|
269
|
+
dom.remove(ul);
|
270
|
+
}
|
271
|
+
}
|
272
|
+
|
273
|
+
function mergeWithAdjacentLists(listBlock) {
|
274
|
+
var sibling, node;
|
275
|
+
|
276
|
+
sibling = listBlock.nextSibling;
|
277
|
+
if (sibling && isListNode(sibling) && sibling.nodeName == listBlock.nodeName) {
|
278
|
+
while ((node = sibling.firstChild)) {
|
279
|
+
listBlock.appendChild(node);
|
280
|
+
}
|
281
|
+
|
282
|
+
dom.remove(sibling);
|
283
|
+
}
|
284
|
+
|
285
|
+
sibling = listBlock.previousSibling;
|
286
|
+
if (sibling && isListNode(sibling) && sibling.nodeName == listBlock.nodeName) {
|
287
|
+
while ((node = sibling.firstChild)) {
|
288
|
+
listBlock.insertBefore(node, listBlock.firstChild);
|
289
|
+
}
|
290
|
+
|
291
|
+
dom.remove(sibling);
|
292
|
+
}
|
293
|
+
}
|
294
|
+
|
295
|
+
/**
|
296
|
+
* Normalizes the all lists in the specified element.
|
297
|
+
*/
|
298
|
+
function normalizeList(element) {
|
299
|
+
tinymce.each(tinymce.grep(dom.select('ol,ul', element)), function(ul) {
|
300
|
+
var sibling, parentNode = ul.parentNode;
|
301
|
+
|
302
|
+
// Move UL/OL to previous LI if it's the only child of a LI
|
303
|
+
if (parentNode.nodeName == 'LI' && parentNode.firstChild == ul) {
|
304
|
+
sibling = parentNode.previousSibling;
|
305
|
+
if (sibling && sibling.nodeName == 'LI') {
|
306
|
+
sibling.appendChild(ul);
|
307
|
+
|
308
|
+
if (isEmpty(parentNode)) {
|
309
|
+
dom.remove(parentNode);
|
310
|
+
}
|
311
|
+
}
|
312
|
+
}
|
313
|
+
|
314
|
+
// Append OL/UL to previous LI if it's in a parent OL/UL i.e. old HTML4
|
315
|
+
if (isListNode(parentNode)) {
|
316
|
+
sibling = parentNode.previousSibling;
|
317
|
+
if (sibling && sibling.nodeName == 'LI') {
|
318
|
+
sibling.appendChild(ul);
|
319
|
+
}
|
320
|
+
}
|
321
|
+
});
|
322
|
+
}
|
323
|
+
|
324
|
+
function outdent(li) {
|
325
|
+
var ul = li.parentNode, ulParent = ul.parentNode, newBlock;
|
326
|
+
|
327
|
+
function removeEmptyLi(li) {
|
328
|
+
if (isEmpty(li)) {
|
329
|
+
dom.remove(li);
|
330
|
+
}
|
331
|
+
}
|
332
|
+
|
333
|
+
if (isEditorBody(ul)) {
|
334
|
+
return true;
|
335
|
+
}
|
336
|
+
|
337
|
+
if (li.nodeName == 'DD') {
|
338
|
+
dom.rename(li, 'DT');
|
339
|
+
return true;
|
340
|
+
}
|
341
|
+
|
342
|
+
if (isFirstChild(li) && isLastChild(li)) {
|
343
|
+
if (ulParent.nodeName == "LI") {
|
344
|
+
dom.insertAfter(li, ulParent);
|
345
|
+
removeEmptyLi(ulParent);
|
346
|
+
dom.remove(ul);
|
347
|
+
} else if (isListNode(ulParent)) {
|
348
|
+
dom.remove(ul, true);
|
349
|
+
} else {
|
350
|
+
ulParent.insertBefore(createNewTextBlock(li), ul);
|
351
|
+
dom.remove(ul);
|
352
|
+
}
|
353
|
+
|
354
|
+
return true;
|
355
|
+
} else if (isFirstChild(li)) {
|
356
|
+
if (ulParent.nodeName == "LI") {
|
357
|
+
dom.insertAfter(li, ulParent);
|
358
|
+
li.appendChild(ul);
|
359
|
+
removeEmptyLi(ulParent);
|
360
|
+
} else if (isListNode(ulParent)) {
|
361
|
+
ulParent.insertBefore(li, ul);
|
362
|
+
} else {
|
363
|
+
ulParent.insertBefore(createNewTextBlock(li), ul);
|
364
|
+
dom.remove(li);
|
365
|
+
}
|
366
|
+
|
367
|
+
return true;
|
368
|
+
} else if (isLastChild(li)) {
|
369
|
+
if (ulParent.nodeName == "LI") {
|
370
|
+
dom.insertAfter(li, ulParent);
|
371
|
+
} else if (isListNode(ulParent)) {
|
372
|
+
dom.insertAfter(li, ul);
|
373
|
+
} else {
|
374
|
+
dom.insertAfter(createNewTextBlock(li), ul);
|
375
|
+
dom.remove(li);
|
376
|
+
}
|
377
|
+
|
378
|
+
return true;
|
379
|
+
}
|
380
|
+
|
381
|
+
if (ulParent.nodeName == 'LI') {
|
382
|
+
ul = ulParent;
|
383
|
+
newBlock = createNewTextBlock(li, 'LI');
|
384
|
+
} else if (isListNode(ulParent)) {
|
385
|
+
newBlock = createNewTextBlock(li, 'LI');
|
386
|
+
} else {
|
387
|
+
newBlock = createNewTextBlock(li);
|
388
|
+
}
|
389
|
+
|
390
|
+
splitList(ul, li, newBlock);
|
391
|
+
normalizeList(ul.parentNode);
|
392
|
+
|
393
|
+
return true;
|
394
|
+
}
|
395
|
+
|
396
|
+
function indent(li) {
|
397
|
+
var sibling, newList;
|
398
|
+
|
399
|
+
function mergeLists(from, to) {
|
400
|
+
var node;
|
401
|
+
|
402
|
+
if (isListNode(from)) {
|
403
|
+
while ((node = li.lastChild.firstChild)) {
|
404
|
+
to.appendChild(node);
|
405
|
+
}
|
406
|
+
|
407
|
+
dom.remove(from);
|
408
|
+
}
|
409
|
+
}
|
410
|
+
|
411
|
+
if (li.nodeName == 'DT') {
|
412
|
+
dom.rename(li, 'DD');
|
413
|
+
return true;
|
414
|
+
}
|
415
|
+
|
416
|
+
sibling = li.previousSibling;
|
417
|
+
|
418
|
+
if (sibling && isListNode(sibling)) {
|
419
|
+
sibling.appendChild(li);
|
420
|
+
return true;
|
421
|
+
}
|
422
|
+
|
423
|
+
if (sibling && sibling.nodeName == 'LI' && isListNode(sibling.lastChild)) {
|
424
|
+
sibling.lastChild.appendChild(li);
|
425
|
+
mergeLists(li.lastChild, sibling.lastChild);
|
426
|
+
return true;
|
427
|
+
}
|
428
|
+
|
429
|
+
sibling = li.nextSibling;
|
430
|
+
|
431
|
+
if (sibling && isListNode(sibling)) {
|
432
|
+
sibling.insertBefore(li, sibling.firstChild);
|
433
|
+
return true;
|
434
|
+
}
|
435
|
+
|
436
|
+
if (sibling && sibling.nodeName == 'LI' && isListNode(li.lastChild)) {
|
437
|
+
return false;
|
438
|
+
}
|
439
|
+
|
440
|
+
sibling = li.previousSibling;
|
441
|
+
if (sibling && sibling.nodeName == 'LI') {
|
442
|
+
newList = dom.create(li.parentNode.nodeName);
|
443
|
+
sibling.appendChild(newList);
|
444
|
+
newList.appendChild(li);
|
445
|
+
mergeLists(li.lastChild, newList);
|
446
|
+
return true;
|
447
|
+
}
|
448
|
+
|
449
|
+
return false;
|
450
|
+
}
|
451
|
+
|
452
|
+
function indentSelection() {
|
453
|
+
var listElements = getSelectedListItems();
|
454
|
+
|
455
|
+
if (listElements.length) {
|
456
|
+
var bookmark = createBookmark(selection.getRng(true));
|
457
|
+
|
458
|
+
for (var i = 0; i < listElements.length; i++) {
|
459
|
+
if (!indent(listElements[i]) && i === 0) {
|
460
|
+
break;
|
461
|
+
}
|
462
|
+
}
|
463
|
+
|
464
|
+
moveToBookmark(bookmark);
|
465
|
+
editor.nodeChanged();
|
466
|
+
|
467
|
+
return true;
|
468
|
+
}
|
469
|
+
}
|
470
|
+
|
471
|
+
function outdentSelection() {
|
472
|
+
var listElements = getSelectedListItems();
|
473
|
+
|
474
|
+
if (listElements.length) {
|
475
|
+
var bookmark = createBookmark(selection.getRng(true));
|
476
|
+
var i, y, root = editor.getBody();
|
477
|
+
|
478
|
+
i = listElements.length;
|
479
|
+
while (i--) {
|
480
|
+
var node = listElements[i].parentNode;
|
481
|
+
|
482
|
+
while (node && node != root) {
|
483
|
+
y = listElements.length;
|
484
|
+
while (y--) {
|
485
|
+
if (listElements[y] === node) {
|
486
|
+
listElements.splice(i, 1);
|
487
|
+
break;
|
488
|
+
}
|
489
|
+
}
|
490
|
+
|
491
|
+
node = node.parentNode;
|
492
|
+
}
|
493
|
+
}
|
494
|
+
|
495
|
+
for (i = 0; i < listElements.length; i++) {
|
496
|
+
if (!outdent(listElements[i]) && i === 0) {
|
497
|
+
break;
|
498
|
+
}
|
499
|
+
}
|
500
|
+
|
501
|
+
moveToBookmark(bookmark);
|
502
|
+
editor.nodeChanged();
|
503
|
+
|
504
|
+
return true;
|
505
|
+
}
|
506
|
+
}
|
507
|
+
|
508
|
+
function applyList(listName) {
|
509
|
+
var rng = selection.getRng(true), bookmark, listItemName = 'LI';
|
510
|
+
|
511
|
+
if (dom.getContentEditable(selection.getNode()) === "false") {
|
512
|
+
return;
|
513
|
+
}
|
514
|
+
|
515
|
+
listName = listName.toUpperCase();
|
516
|
+
|
517
|
+
if (listName == 'DL') {
|
518
|
+
listItemName = 'DT';
|
519
|
+
}
|
520
|
+
|
521
|
+
function getSelectedTextBlocks() {
|
522
|
+
var textBlocks = [], root = editor.getBody();
|
523
|
+
|
524
|
+
function getEndPointNode(start) {
|
525
|
+
var container, offset;
|
526
|
+
|
527
|
+
container = rng[start ? 'startContainer' : 'endContainer'];
|
528
|
+
offset = rng[start ? 'startOffset' : 'endOffset'];
|
529
|
+
|
530
|
+
// Resolve node index
|
531
|
+
if (container.nodeType == 1) {
|
532
|
+
container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
|
533
|
+
}
|
534
|
+
|
535
|
+
while (container.parentNode != root) {
|
536
|
+
if (isTextBlock(container)) {
|
537
|
+
return container;
|
538
|
+
}
|
539
|
+
|
540
|
+
if (/^(TD|TH)$/.test(container.parentNode.nodeName)) {
|
541
|
+
return container;
|
542
|
+
}
|
543
|
+
|
544
|
+
container = container.parentNode;
|
545
|
+
}
|
546
|
+
|
547
|
+
return container;
|
548
|
+
}
|
549
|
+
|
550
|
+
var startNode = getEndPointNode(true);
|
551
|
+
var endNode = getEndPointNode();
|
552
|
+
var block, siblings = [];
|
553
|
+
|
554
|
+
for (var node = startNode; node; node = node.nextSibling) {
|
555
|
+
siblings.push(node);
|
556
|
+
|
557
|
+
if (node == endNode) {
|
558
|
+
break;
|
559
|
+
}
|
560
|
+
}
|
561
|
+
|
562
|
+
tinymce.each(siblings, function(node) {
|
563
|
+
if (isTextBlock(node)) {
|
564
|
+
textBlocks.push(node);
|
565
|
+
block = null;
|
566
|
+
return;
|
567
|
+
}
|
568
|
+
|
569
|
+
if (dom.isBlock(node) || isBr(node)) {
|
570
|
+
if (isBr(node)) {
|
571
|
+
dom.remove(node);
|
572
|
+
}
|
573
|
+
|
574
|
+
block = null;
|
575
|
+
return;
|
576
|
+
}
|
577
|
+
|
578
|
+
var nextSibling = node.nextSibling;
|
579
|
+
if (tinymce.dom.BookmarkManager.isBookmarkNode(node)) {
|
580
|
+
if (isTextBlock(nextSibling) || (!nextSibling && node.parentNode == root)) {
|
581
|
+
block = null;
|
582
|
+
return;
|
583
|
+
}
|
584
|
+
}
|
585
|
+
|
586
|
+
if (!block) {
|
587
|
+
block = dom.create('p');
|
588
|
+
node.parentNode.insertBefore(block, node);
|
589
|
+
textBlocks.push(block);
|
590
|
+
}
|
591
|
+
|
592
|
+
block.appendChild(node);
|
593
|
+
});
|
594
|
+
|
595
|
+
return textBlocks;
|
596
|
+
}
|
597
|
+
|
598
|
+
bookmark = createBookmark(rng);
|
599
|
+
|
600
|
+
tinymce.each(getSelectedTextBlocks(), function(block) {
|
601
|
+
var listBlock, sibling;
|
602
|
+
|
603
|
+
sibling = block.previousSibling;
|
604
|
+
if (sibling && isListNode(sibling) && sibling.nodeName == listName) {
|
605
|
+
listBlock = sibling;
|
606
|
+
block = dom.rename(block, listItemName);
|
607
|
+
sibling.appendChild(block);
|
608
|
+
} else {
|
609
|
+
listBlock = dom.create(listName);
|
610
|
+
block.parentNode.insertBefore(listBlock, block);
|
611
|
+
listBlock.appendChild(block);
|
612
|
+
block = dom.rename(block, listItemName);
|
613
|
+
}
|
614
|
+
|
615
|
+
mergeWithAdjacentLists(listBlock);
|
616
|
+
});
|
617
|
+
|
618
|
+
moveToBookmark(bookmark);
|
619
|
+
}
|
620
|
+
|
621
|
+
function removeList() {
|
622
|
+
var bookmark = createBookmark(selection.getRng(true)), root = editor.getBody();
|
623
|
+
|
624
|
+
tinymce.each(getSelectedListItems(), function(li) {
|
625
|
+
var node, rootList;
|
626
|
+
|
627
|
+
if (isEditorBody(li.parentNode)) {
|
628
|
+
return;
|
629
|
+
}
|
630
|
+
|
631
|
+
if (isEmpty(li)) {
|
632
|
+
outdent(li);
|
633
|
+
return;
|
634
|
+
}
|
635
|
+
|
636
|
+
for (node = li; node && node != root; node = node.parentNode) {
|
637
|
+
if (isListNode(node)) {
|
638
|
+
rootList = node;
|
639
|
+
}
|
640
|
+
}
|
641
|
+
|
642
|
+
splitList(rootList, li);
|
643
|
+
});
|
644
|
+
|
645
|
+
moveToBookmark(bookmark);
|
646
|
+
}
|
647
|
+
|
648
|
+
function toggleList(listName) {
|
649
|
+
var parentList = dom.getParent(selection.getStart(), 'OL,UL,DL');
|
650
|
+
|
651
|
+
if (isEditorBody(parentList)) {
|
652
|
+
return;
|
653
|
+
}
|
654
|
+
|
655
|
+
if (parentList) {
|
656
|
+
if (parentList.nodeName == listName) {
|
657
|
+
removeList(listName);
|
658
|
+
} else {
|
659
|
+
var bookmark = createBookmark(selection.getRng(true));
|
660
|
+
mergeWithAdjacentLists(dom.rename(parentList, listName));
|
661
|
+
moveToBookmark(bookmark);
|
662
|
+
}
|
663
|
+
} else {
|
664
|
+
applyList(listName);
|
665
|
+
}
|
666
|
+
}
|
667
|
+
|
668
|
+
function queryListCommandState(listName) {
|
669
|
+
return function() {
|
670
|
+
var parentList = dom.getParent(editor.selection.getStart(), 'UL,OL,DL');
|
671
|
+
|
672
|
+
return parentList && parentList.nodeName == listName;
|
673
|
+
};
|
674
|
+
}
|
675
|
+
|
676
|
+
function isBogusBr(node) {
|
677
|
+
if (!isBr(node)) {
|
678
|
+
return false;
|
679
|
+
}
|
680
|
+
|
681
|
+
if (dom.isBlock(node.nextSibling) && !isBr(node.previousSibling)) {
|
682
|
+
return true;
|
683
|
+
}
|
684
|
+
|
685
|
+
return false;
|
686
|
+
}
|
687
|
+
|
688
|
+
self.backspaceDelete = function(isForward) {
|
689
|
+
function findNextCaretContainer(rng, isForward) {
|
690
|
+
var node = rng.startContainer, offset = rng.startOffset;
|
691
|
+
var nonEmptyBlocks, walker;
|
692
|
+
|
693
|
+
if (node.nodeType == 3 && (isForward ? offset < node.data.length : offset > 0)) {
|
694
|
+
return node;
|
695
|
+
}
|
696
|
+
|
697
|
+
nonEmptyBlocks = editor.schema.getNonEmptyElements();
|
698
|
+
walker = new tinymce.dom.TreeWalker(rng.startContainer, editor.getBody());
|
699
|
+
|
700
|
+
// Delete at <li>|<br></li> then jump over the bogus br
|
701
|
+
if (isForward) {
|
702
|
+
if (isBogusBr(tinymce.dom.RangeUtils.getNode(rng.startContainer, rng.startOffset))) {
|
703
|
+
walker.next();
|
704
|
+
}
|
705
|
+
}
|
706
|
+
|
707
|
+
while ((node = walker[isForward ? 'next' : 'prev2']())) {
|
708
|
+
if (node.nodeName == 'LI' && !node.hasChildNodes()) {
|
709
|
+
return node;
|
710
|
+
}
|
711
|
+
|
712
|
+
if (nonEmptyBlocks[node.nodeName]) {
|
713
|
+
return node;
|
714
|
+
}
|
715
|
+
|
716
|
+
if (node.nodeType == 3 && node.data.length > 0) {
|
717
|
+
return node;
|
718
|
+
}
|
719
|
+
}
|
720
|
+
}
|
721
|
+
|
722
|
+
function mergeLiElements(fromElm, toElm) {
|
723
|
+
var node, listNode, ul = fromElm.parentNode;
|
724
|
+
|
725
|
+
if (!isChildOfBody(fromElm) || !isChildOfBody(toElm)) {
|
726
|
+
return;
|
727
|
+
}
|
728
|
+
|
729
|
+
if (isListNode(toElm.lastChild)) {
|
730
|
+
listNode = toElm.lastChild;
|
731
|
+
}
|
732
|
+
|
733
|
+
if (ul == toElm.lastChild) {
|
734
|
+
if (isBr(ul.previousSibling)) {
|
735
|
+
dom.remove(ul.previousSibling);
|
736
|
+
}
|
737
|
+
}
|
738
|
+
|
739
|
+
node = toElm.lastChild;
|
740
|
+
if (node && isBr(node) && fromElm.hasChildNodes()) {
|
741
|
+
dom.remove(node);
|
742
|
+
}
|
743
|
+
|
744
|
+
if (isEmpty(toElm, true)) {
|
745
|
+
dom.$(toElm).empty();
|
746
|
+
}
|
747
|
+
|
748
|
+
if (!isEmpty(fromElm, true)) {
|
749
|
+
while ((node = fromElm.firstChild)) {
|
750
|
+
toElm.appendChild(node);
|
751
|
+
}
|
752
|
+
}
|
753
|
+
|
754
|
+
if (listNode) {
|
755
|
+
toElm.appendChild(listNode);
|
756
|
+
}
|
757
|
+
|
758
|
+
dom.remove(fromElm);
|
759
|
+
|
760
|
+
if (isEmpty(ul) && !isEditorBody(ul)) {
|
761
|
+
dom.remove(ul);
|
762
|
+
}
|
763
|
+
}
|
764
|
+
|
765
|
+
if (selection.isCollapsed()) {
|
766
|
+
var li = dom.getParent(selection.getStart(), 'LI'), ul, rng, otherLi;
|
767
|
+
|
768
|
+
if (li) {
|
769
|
+
ul = li.parentNode;
|
770
|
+
if (isEditorBody(ul) && dom.isEmpty(ul)) {
|
771
|
+
return true;
|
772
|
+
}
|
773
|
+
|
774
|
+
rng = selection.getRng(true);
|
775
|
+
otherLi = dom.getParent(findNextCaretContainer(rng, isForward), 'LI');
|
776
|
+
|
777
|
+
if (otherLi && otherLi != li) {
|
778
|
+
var bookmark = createBookmark(rng);
|
779
|
+
|
780
|
+
if (isForward) {
|
781
|
+
mergeLiElements(otherLi, li);
|
782
|
+
} else {
|
783
|
+
mergeLiElements(li, otherLi);
|
784
|
+
}
|
785
|
+
|
786
|
+
moveToBookmark(bookmark);
|
787
|
+
|
788
|
+
return true;
|
789
|
+
} else if (!otherLi) {
|
790
|
+
if (!isForward && removeList(ul.nodeName)) {
|
791
|
+
return true;
|
792
|
+
}
|
793
|
+
}
|
794
|
+
}
|
795
|
+
}
|
796
|
+
};
|
797
|
+
|
798
|
+
editor.on('BeforeExecCommand', function(e) {
|
799
|
+
var cmd = e.command.toLowerCase(), isHandled;
|
800
|
+
|
801
|
+
if (cmd == "indent") {
|
802
|
+
if (indentSelection()) {
|
803
|
+
isHandled = true;
|
804
|
+
}
|
805
|
+
} else if (cmd == "outdent") {
|
806
|
+
if (outdentSelection()) {
|
807
|
+
isHandled = true;
|
808
|
+
}
|
809
|
+
}
|
810
|
+
|
811
|
+
if (isHandled) {
|
812
|
+
editor.fire('ExecCommand', {command: e.command});
|
813
|
+
e.preventDefault();
|
814
|
+
return true;
|
815
|
+
}
|
816
|
+
});
|
817
|
+
|
818
|
+
editor.addCommand('InsertUnorderedList', function() {
|
819
|
+
toggleList('UL');
|
820
|
+
});
|
821
|
+
|
822
|
+
editor.addCommand('InsertOrderedList', function() {
|
823
|
+
toggleList('OL');
|
824
|
+
});
|
825
|
+
|
826
|
+
editor.addCommand('InsertDefinitionList', function() {
|
827
|
+
toggleList('DL');
|
828
|
+
});
|
829
|
+
|
830
|
+
editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState('UL'));
|
831
|
+
editor.addQueryStateHandler('InsertOrderedList', queryListCommandState('OL'));
|
832
|
+
editor.addQueryStateHandler('InsertDefinitionList', queryListCommandState('DL'));
|
833
|
+
|
834
|
+
editor.on('keydown', function(e) {
|
835
|
+
// Check for tab but not ctrl/cmd+tab since it switches browser tabs
|
836
|
+
if (e.keyCode != 9 || tinymce.util.VK.metaKeyPressed(e)) {
|
837
|
+
return;
|
838
|
+
}
|
839
|
+
|
840
|
+
if (editor.dom.getParent(editor.selection.getStart(), 'LI,DT,DD')) {
|
841
|
+
e.preventDefault();
|
842
|
+
|
843
|
+
if (e.shiftKey) {
|
844
|
+
outdentSelection();
|
845
|
+
} else {
|
846
|
+
indentSelection();
|
847
|
+
}
|
848
|
+
}
|
849
|
+
});
|
850
|
+
});
|
851
|
+
|
852
|
+
editor.addButton('indent', {
|
853
|
+
icon: 'indent',
|
854
|
+
title: 'Increase indent',
|
855
|
+
cmd: 'Indent',
|
856
|
+
onPostRender: function() {
|
857
|
+
var ctrl = this;
|
858
|
+
|
859
|
+
editor.on('nodechange', function() {
|
860
|
+
var blocks = editor.selection.getSelectedBlocks();
|
861
|
+
var disable = false;
|
862
|
+
|
863
|
+
for (var i = 0, l = blocks.length; !disable && i < l; i++) {
|
864
|
+
var tag = blocks[i].nodeName;
|
865
|
+
|
866
|
+
disable = (tag == 'LI' && isFirstChild(blocks[i]) || tag == 'UL' || tag == 'OL' || tag == 'DD');
|
867
|
+
}
|
868
|
+
|
869
|
+
ctrl.disabled(disable);
|
870
|
+
});
|
871
|
+
}
|
872
|
+
});
|
873
|
+
|
874
|
+
editor.on('keydown', function(e) {
|
875
|
+
if (e.keyCode == tinymce.util.VK.BACKSPACE) {
|
876
|
+
if (self.backspaceDelete()) {
|
877
|
+
e.preventDefault();
|
878
|
+
}
|
879
|
+
} else if (e.keyCode == tinymce.util.VK.DELETE) {
|
880
|
+
if (self.backspaceDelete(true)) {
|
881
|
+
e.preventDefault();
|
882
|
+
}
|
883
|
+
}
|
884
|
+
});
|
885
|
+
});
|