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,57 @@
|
|
1
|
+
/**
|
2
|
+
* UndoStack.js
|
3
|
+
*
|
4
|
+
* Released under LGPL License.
|
5
|
+
* Copyright (c) 1999-2016 Ephox Corp. All rights reserved
|
6
|
+
*
|
7
|
+
* License: http://www.tinymce.com/license
|
8
|
+
* Contributing: http://www.tinymce.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
define("tinymce/imagetoolsplugin/UndoStack", [
|
12
|
+
], function() {
|
13
|
+
return function() {
|
14
|
+
var data = [], index = -1;
|
15
|
+
|
16
|
+
function add(state) {
|
17
|
+
var removed;
|
18
|
+
|
19
|
+
removed = data.splice(++index);
|
20
|
+
data.push(state);
|
21
|
+
|
22
|
+
return {
|
23
|
+
state: state,
|
24
|
+
removed: removed
|
25
|
+
};
|
26
|
+
}
|
27
|
+
|
28
|
+
function undo() {
|
29
|
+
if (canUndo()) {
|
30
|
+
return data[--index];
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
function redo() {
|
35
|
+
if (canRedo()) {
|
36
|
+
return data[++index];
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
function canUndo() {
|
41
|
+
return index > 0;
|
42
|
+
}
|
43
|
+
|
44
|
+
function canRedo() {
|
45
|
+
return index != -1 && index < data.length - 1;
|
46
|
+
}
|
47
|
+
|
48
|
+
return {
|
49
|
+
data: data,
|
50
|
+
add: add,
|
51
|
+
undo: undo,
|
52
|
+
redo: redo,
|
53
|
+
canUndo: canUndo,
|
54
|
+
canRedo: canRedo
|
55
|
+
};
|
56
|
+
};
|
57
|
+
});
|
@@ -0,0 +1,227 @@
|
|
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
|
+
|
13
|
+
tinymce.PluginManager.add('importcss', function(editor) {
|
14
|
+
var self = this, each = tinymce.each;
|
15
|
+
|
16
|
+
function removeCacheSuffix(url) {
|
17
|
+
var cacheSuffix = tinymce.Env.cacheSuffix;
|
18
|
+
|
19
|
+
if (typeof url == 'string') {
|
20
|
+
url = url.replace('?' + cacheSuffix, '').replace('&' + cacheSuffix, '');
|
21
|
+
}
|
22
|
+
|
23
|
+
return url;
|
24
|
+
}
|
25
|
+
|
26
|
+
function isSkinContentCss(href) {
|
27
|
+
var settings = editor.settings, skin = settings.skin !== false ? settings.skin || 'lightgray' : false;
|
28
|
+
|
29
|
+
if (skin) {
|
30
|
+
var skinUrl = settings.skin_url;
|
31
|
+
|
32
|
+
if (skinUrl) {
|
33
|
+
skinUrl = editor.documentBaseURI.toAbsolute(skinUrl);
|
34
|
+
} else {
|
35
|
+
skinUrl = tinymce.baseURL + '/skins/' + skin;
|
36
|
+
}
|
37
|
+
|
38
|
+
return href === skinUrl + '/content' + (editor.inline ? '.inline' : '') + '.min.css';
|
39
|
+
}
|
40
|
+
|
41
|
+
return false;
|
42
|
+
}
|
43
|
+
|
44
|
+
function compileFilter(filter) {
|
45
|
+
if (typeof filter == "string") {
|
46
|
+
return function(value) {
|
47
|
+
return value.indexOf(filter) !== -1;
|
48
|
+
};
|
49
|
+
} else if (filter instanceof RegExp) {
|
50
|
+
return function(value) {
|
51
|
+
return filter.test(value);
|
52
|
+
};
|
53
|
+
}
|
54
|
+
|
55
|
+
return filter;
|
56
|
+
}
|
57
|
+
|
58
|
+
function getSelectors(doc, fileFilter) {
|
59
|
+
var selectors = [], contentCSSUrls = {};
|
60
|
+
|
61
|
+
function append(styleSheet, imported) {
|
62
|
+
var href = styleSheet.href, rules;
|
63
|
+
|
64
|
+
href = removeCacheSuffix(href);
|
65
|
+
|
66
|
+
if (!href || !fileFilter(href, imported) || isSkinContentCss(href)) {
|
67
|
+
return;
|
68
|
+
}
|
69
|
+
|
70
|
+
each(styleSheet.imports, function(styleSheet) {
|
71
|
+
append(styleSheet, true);
|
72
|
+
});
|
73
|
+
|
74
|
+
try {
|
75
|
+
rules = styleSheet.cssRules || styleSheet.rules;
|
76
|
+
} catch (e) {
|
77
|
+
// Firefox fails on rules to remote domain for example:
|
78
|
+
// @import url(//fonts.googleapis.com/css?family=Pathway+Gothic+One);
|
79
|
+
}
|
80
|
+
|
81
|
+
each(rules, function(cssRule) {
|
82
|
+
if (cssRule.styleSheet) {
|
83
|
+
append(cssRule.styleSheet, true);
|
84
|
+
} else if (cssRule.selectorText) {
|
85
|
+
each(cssRule.selectorText.split(','), function(selector) {
|
86
|
+
selectors.push(tinymce.trim(selector));
|
87
|
+
});
|
88
|
+
}
|
89
|
+
});
|
90
|
+
}
|
91
|
+
|
92
|
+
each(editor.contentCSS, function(url) {
|
93
|
+
contentCSSUrls[url] = true;
|
94
|
+
});
|
95
|
+
|
96
|
+
if (!fileFilter) {
|
97
|
+
fileFilter = function(href, imported) {
|
98
|
+
return imported || contentCSSUrls[href];
|
99
|
+
};
|
100
|
+
}
|
101
|
+
|
102
|
+
try {
|
103
|
+
each(doc.styleSheets, function(styleSheet) {
|
104
|
+
append(styleSheet);
|
105
|
+
});
|
106
|
+
} catch (e) {
|
107
|
+
// Ignore
|
108
|
+
}
|
109
|
+
|
110
|
+
return selectors;
|
111
|
+
}
|
112
|
+
|
113
|
+
function convertSelectorToFormat(selectorText) {
|
114
|
+
var format;
|
115
|
+
|
116
|
+
// Parse simple element.class1, .class1
|
117
|
+
var selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
|
118
|
+
if (!selector) {
|
119
|
+
return;
|
120
|
+
}
|
121
|
+
|
122
|
+
var elementName = selector[1];
|
123
|
+
var classes = selector[2].substr(1).split('.').join(' ');
|
124
|
+
var inlineSelectorElements = tinymce.makeMap('a,img');
|
125
|
+
|
126
|
+
// element.class - Produce block formats
|
127
|
+
if (selector[1]) {
|
128
|
+
format = {
|
129
|
+
title: selectorText
|
130
|
+
};
|
131
|
+
|
132
|
+
if (editor.schema.getTextBlockElements()[elementName]) {
|
133
|
+
// Text block format ex: h1.class1
|
134
|
+
format.block = elementName;
|
135
|
+
} else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {
|
136
|
+
// Block elements such as table.class and special inline elements such as a.class or img.class
|
137
|
+
format.selector = elementName;
|
138
|
+
} else {
|
139
|
+
// Inline format strong.class1
|
140
|
+
format.inline = elementName;
|
141
|
+
}
|
142
|
+
} else if (selector[2]) {
|
143
|
+
// .class - Produce inline span with classes
|
144
|
+
format = {
|
145
|
+
inline: 'span',
|
146
|
+
title: selectorText.substr(1),
|
147
|
+
classes: classes
|
148
|
+
};
|
149
|
+
}
|
150
|
+
|
151
|
+
// Append to or override class attribute
|
152
|
+
if (editor.settings.importcss_merge_classes !== false) {
|
153
|
+
format.classes = classes;
|
154
|
+
} else {
|
155
|
+
format.attributes = {"class": classes};
|
156
|
+
}
|
157
|
+
|
158
|
+
return format;
|
159
|
+
}
|
160
|
+
|
161
|
+
editor.on('renderFormatsMenu', function(e) {
|
162
|
+
var settings = editor.settings, selectors = {};
|
163
|
+
var selectorConverter = settings.importcss_selector_converter || convertSelectorToFormat;
|
164
|
+
var selectorFilter = compileFilter(settings.importcss_selector_filter), ctrl = e.control;
|
165
|
+
|
166
|
+
if (!editor.settings.importcss_append) {
|
167
|
+
ctrl.items().remove();
|
168
|
+
}
|
169
|
+
|
170
|
+
// Setup new groups collection by cloning the configured one
|
171
|
+
var groups = [];
|
172
|
+
tinymce.each(settings.importcss_groups, function(group) {
|
173
|
+
group = tinymce.extend({}, group);
|
174
|
+
group.filter = compileFilter(group.filter);
|
175
|
+
groups.push(group);
|
176
|
+
});
|
177
|
+
|
178
|
+
each(getSelectors(e.doc || editor.getDoc(), compileFilter(settings.importcss_file_filter)), function(selector) {
|
179
|
+
if (selector.indexOf('.mce-') === -1) {
|
180
|
+
if (!selectors[selector] && (!selectorFilter || selectorFilter(selector))) {
|
181
|
+
var format = selectorConverter.call(self, selector), menu;
|
182
|
+
|
183
|
+
if (format) {
|
184
|
+
var formatName = format.name || tinymce.DOM.uniqueId();
|
185
|
+
|
186
|
+
if (groups) {
|
187
|
+
for (var i = 0; i < groups.length; i++) {
|
188
|
+
if (!groups[i].filter || groups[i].filter(selector)) {
|
189
|
+
if (!groups[i].item) {
|
190
|
+
groups[i].item = {text: groups[i].title, menu: []};
|
191
|
+
}
|
192
|
+
|
193
|
+
menu = groups[i].item.menu;
|
194
|
+
break;
|
195
|
+
}
|
196
|
+
}
|
197
|
+
}
|
198
|
+
|
199
|
+
editor.formatter.register(formatName, format);
|
200
|
+
|
201
|
+
var menuItem = tinymce.extend({}, ctrl.settings.itemDefaults, {
|
202
|
+
text: format.title,
|
203
|
+
format: formatName
|
204
|
+
});
|
205
|
+
|
206
|
+
if (menu) {
|
207
|
+
menu.push(menuItem);
|
208
|
+
} else {
|
209
|
+
ctrl.add(menuItem);
|
210
|
+
}
|
211
|
+
}
|
212
|
+
|
213
|
+
selectors[selector] = true;
|
214
|
+
}
|
215
|
+
}
|
216
|
+
});
|
217
|
+
|
218
|
+
each(groups, function(group) {
|
219
|
+
ctrl.add(group.item);
|
220
|
+
});
|
221
|
+
|
222
|
+
e.control.renderNew();
|
223
|
+
});
|
224
|
+
|
225
|
+
// Expose default convertSelectorToFormat implementation
|
226
|
+
self.convertSelectorToFormat = convertSelectorToFormat;
|
227
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
tinymce.PluginManager.add("importcss",function(a){function b(a){var b=tinymce.Env.cacheSuffix;return"string"==typeof a&&(a=a.replace("?"+b,"").replace("&"+b,"")),a}function c(b){var c=a.settings,d=c.skin!==!1?c.skin||"lightgray":!1;if(d){var e=c.skin_url;return e=e?a.documentBaseURI.toAbsolute(e):tinymce.baseURL+"/skins/"+d,b===e+"/content"+(a.inline?".inline":"")+".min.css"}return!1}function d(a){return"string"==typeof a?function(b){return-1!==b.indexOf(a)}:a instanceof RegExp?function(b){return a.test(b)}:a}function e(d,e){function f(a,d){var i,j=a.href;if(j=b(j),j&&e(j,d)&&!c(j)){h(a.imports,function(a){f(a,!0)});try{i=a.cssRules||a.rules}catch(k){}h(i,function(a){a.styleSheet?f(a.styleSheet,!0):a.selectorText&&h(a.selectorText.split(","),function(a){g.push(tinymce.trim(a))})})}}var g=[],i={};h(a.contentCSS,function(a){i[a]=!0}),e||(e=function(a,b){return b||i[a]});try{h(d.styleSheets,function(a){f(a)})}catch(j){}return g}function f(b){var c,d=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(b);if(d){var e=d[1],f=d[2].substr(1).split(".").join(" "),g=tinymce.makeMap("a,img");return d[1]?(c={title:b},a.schema.getTextBlockElements()[e]?c.block=e:a.schema.getBlockElements()[e]||g[e.toLowerCase()]?c.selector=e:c.inline=e):d[2]&&(c={inline:"span",title:b.substr(1),classes:f}),a.settings.importcss_merge_classes!==!1?c.classes=f:c.attributes={"class":f},c}}var g=this,h=tinymce.each;a.on("renderFormatsMenu",function(b){var c=a.settings,i={},j=c.importcss_selector_converter||f,k=d(c.importcss_selector_filter),l=b.control;a.settings.importcss_append||l.items().remove();var m=[];tinymce.each(c.importcss_groups,function(a){a=tinymce.extend({},a),a.filter=d(a.filter),m.push(a)}),h(e(b.doc||a.getDoc(),d(c.importcss_file_filter)),function(b){if(-1===b.indexOf(".mce-")&&!i[b]&&(!k||k(b))){var c,d=j.call(g,b);if(d){var e=d.name||tinymce.DOM.uniqueId();if(m)for(var f=0;f<m.length;f++)if(!m[f].filter||m[f].filter(b)){m[f].item||(m[f].item={text:m[f].title,menu:[]}),c=m[f].item.menu;break}a.formatter.register(e,d);var h=tinymce.extend({},l.settings.itemDefaults,{text:d.title,format:e});c?c.push(h):l.add(h)}i[b]=!0}}),h(m,function(a){l.add(a.item)}),b.control.renderNew()}),g.convertSelectorToFormat=f});
|
@@ -0,0 +1,121 @@
|
|
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
|
+
|
13
|
+
tinymce.PluginManager.add('insertdatetime', function(editor) {
|
14
|
+
var daysShort = "Sun Mon Tue Wed Thu Fri Sat Sun".split(' ');
|
15
|
+
var daysLong = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(' ');
|
16
|
+
var monthsShort = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(' ');
|
17
|
+
var monthsLong = "January February March April May June July August September October November December".split(' ');
|
18
|
+
var menuItems = [], lastFormat, defaultButtonTimeFormat;
|
19
|
+
|
20
|
+
function getDateTime(fmt, date) {
|
21
|
+
function addZeros(value, len) {
|
22
|
+
value = "" + value;
|
23
|
+
|
24
|
+
if (value.length < len) {
|
25
|
+
for (var i = 0; i < (len - value.length); i++) {
|
26
|
+
value = "0" + value;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
return value;
|
31
|
+
}
|
32
|
+
|
33
|
+
date = date || new Date();
|
34
|
+
|
35
|
+
fmt = fmt.replace("%D", "%m/%d/%Y");
|
36
|
+
fmt = fmt.replace("%r", "%I:%M:%S %p");
|
37
|
+
fmt = fmt.replace("%Y", "" + date.getFullYear());
|
38
|
+
fmt = fmt.replace("%y", "" + date.getYear());
|
39
|
+
fmt = fmt.replace("%m", addZeros(date.getMonth() + 1, 2));
|
40
|
+
fmt = fmt.replace("%d", addZeros(date.getDate(), 2));
|
41
|
+
fmt = fmt.replace("%H", "" + addZeros(date.getHours(), 2));
|
42
|
+
fmt = fmt.replace("%M", "" + addZeros(date.getMinutes(), 2));
|
43
|
+
fmt = fmt.replace("%S", "" + addZeros(date.getSeconds(), 2));
|
44
|
+
fmt = fmt.replace("%I", "" + ((date.getHours() + 11) % 12 + 1));
|
45
|
+
fmt = fmt.replace("%p", "" + (date.getHours() < 12 ? "AM" : "PM"));
|
46
|
+
fmt = fmt.replace("%B", "" + editor.translate(monthsLong[date.getMonth()]));
|
47
|
+
fmt = fmt.replace("%b", "" + editor.translate(monthsShort[date.getMonth()]));
|
48
|
+
fmt = fmt.replace("%A", "" + editor.translate(daysLong[date.getDay()]));
|
49
|
+
fmt = fmt.replace("%a", "" + editor.translate(daysShort[date.getDay()]));
|
50
|
+
fmt = fmt.replace("%%", "%");
|
51
|
+
|
52
|
+
return fmt;
|
53
|
+
}
|
54
|
+
|
55
|
+
function insertDateTime(format) {
|
56
|
+
var html = getDateTime(format);
|
57
|
+
|
58
|
+
if (editor.settings.insertdatetime_element) {
|
59
|
+
var computerTime;
|
60
|
+
|
61
|
+
if (/%[HMSIp]/.test(format)) {
|
62
|
+
computerTime = getDateTime("%Y-%m-%dT%H:%M");
|
63
|
+
} else {
|
64
|
+
computerTime = getDateTime("%Y-%m-%d");
|
65
|
+
}
|
66
|
+
|
67
|
+
html = '<time datetime="' + computerTime + '">' + html + '</time>';
|
68
|
+
|
69
|
+
var timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
|
70
|
+
if (timeElm) {
|
71
|
+
editor.dom.setOuterHTML(timeElm, html);
|
72
|
+
return;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
editor.insertContent(html);
|
77
|
+
}
|
78
|
+
|
79
|
+
editor.addCommand('mceInsertDate', function() {
|
80
|
+
insertDateTime(editor.getParam("insertdatetime_dateformat", editor.translate("%Y-%m-%d")));
|
81
|
+
});
|
82
|
+
|
83
|
+
editor.addCommand('mceInsertTime', function() {
|
84
|
+
insertDateTime(editor.getParam("insertdatetime_timeformat", editor.translate('%H:%M:%S')));
|
85
|
+
});
|
86
|
+
|
87
|
+
editor.addButton('insertdatetime', {
|
88
|
+
type: 'splitbutton',
|
89
|
+
title: 'Insert date/time',
|
90
|
+
onclick: function() {
|
91
|
+
insertDateTime(lastFormat || defaultButtonTimeFormat);
|
92
|
+
},
|
93
|
+
menu: menuItems
|
94
|
+
});
|
95
|
+
|
96
|
+
tinymce.each(editor.settings.insertdatetime_formats || [
|
97
|
+
"%H:%M:%S",
|
98
|
+
"%Y-%m-%d",
|
99
|
+
"%I:%M:%S %p",
|
100
|
+
"%D"
|
101
|
+
], function(fmt) {
|
102
|
+
if (!defaultButtonTimeFormat) {
|
103
|
+
defaultButtonTimeFormat = fmt;
|
104
|
+
}
|
105
|
+
|
106
|
+
menuItems.push({
|
107
|
+
text: getDateTime(fmt),
|
108
|
+
onclick: function() {
|
109
|
+
lastFormat = fmt;
|
110
|
+
insertDateTime(fmt);
|
111
|
+
}
|
112
|
+
});
|
113
|
+
});
|
114
|
+
|
115
|
+
editor.addMenuItem('insertdatetime', {
|
116
|
+
icon: 'date',
|
117
|
+
text: 'Insert date/time',
|
118
|
+
menu: menuItems,
|
119
|
+
context: 'insert'
|
120
|
+
});
|
121
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
tinymce.PluginManager.add("insertdatetime",function(a){function b(b,c){function d(a,b){if(a=""+a,a.length<b)for(var c=0;c<b-a.length;c++)a="0"+a;return a}return c=c||new Date,b=b.replace("%D","%m/%d/%Y"),b=b.replace("%r","%I:%M:%S %p"),b=b.replace("%Y",""+c.getFullYear()),b=b.replace("%y",""+c.getYear()),b=b.replace("%m",d(c.getMonth()+1,2)),b=b.replace("%d",d(c.getDate(),2)),b=b.replace("%H",""+d(c.getHours(),2)),b=b.replace("%M",""+d(c.getMinutes(),2)),b=b.replace("%S",""+d(c.getSeconds(),2)),b=b.replace("%I",""+((c.getHours()+11)%12+1)),b=b.replace("%p",""+(c.getHours()<12?"AM":"PM")),b=b.replace("%B",""+a.translate(i[c.getMonth()])),b=b.replace("%b",""+a.translate(h[c.getMonth()])),b=b.replace("%A",""+a.translate(g[c.getDay()])),b=b.replace("%a",""+a.translate(f[c.getDay()])),b=b.replace("%%","%")}function c(c){var d=b(c);if(a.settings.insertdatetime_element){var e;e=b(/%[HMSIp]/.test(c)?"%Y-%m-%dT%H:%M":"%Y-%m-%d"),d='<time datetime="'+e+'">'+d+"</time>";var f=a.dom.getParent(a.selection.getStart(),"time");if(f)return void a.dom.setOuterHTML(f,d)}a.insertContent(d)}var d,e,f="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),g="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),h="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),i="January February March April May June July August September October November December".split(" "),j=[];a.addCommand("mceInsertDate",function(){c(a.getParam("insertdatetime_dateformat",a.translate("%Y-%m-%d")))}),a.addCommand("mceInsertTime",function(){c(a.getParam("insertdatetime_timeformat",a.translate("%H:%M:%S")))}),a.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){c(d||e)},menu:j}),tinymce.each(a.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(a){e||(e=a),j.push({text:b(a),onclick:function(){d=a,c(a)}})}),a.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:j,context:"insert"})});
|
@@ -0,0 +1,225 @@
|
|
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
|
+
|
13
|
+
tinymce.PluginManager.add('layer', function(editor) {
|
14
|
+
function getParentLayer(node) {
|
15
|
+
do {
|
16
|
+
if (node.className && node.className.indexOf('mceItemLayer') != -1) {
|
17
|
+
return node;
|
18
|
+
}
|
19
|
+
} while ((node = node.parentNode));
|
20
|
+
}
|
21
|
+
|
22
|
+
function visualAid(e) {
|
23
|
+
var dom = editor.dom;
|
24
|
+
|
25
|
+
tinymce.each(dom.select('div,p', e), function(e) {
|
26
|
+
if (/^(absolute|relative|fixed)$/i.test(e.style.position)) {
|
27
|
+
if (e.hasVisual) {
|
28
|
+
dom.addClass(e, 'mceItemVisualAid');
|
29
|
+
} else {
|
30
|
+
dom.removeClass(e, 'mceItemVisualAid');
|
31
|
+
}
|
32
|
+
|
33
|
+
dom.addClass(e, 'mceItemLayer');
|
34
|
+
}
|
35
|
+
});
|
36
|
+
}
|
37
|
+
|
38
|
+
function move(d) {
|
39
|
+
var i, z = [], le = getParentLayer(editor.selection.getNode()), ci = -1, fi = -1, nl;
|
40
|
+
|
41
|
+
nl = [];
|
42
|
+
tinymce.walk(editor.getBody(), function(n) {
|
43
|
+
if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position)) {
|
44
|
+
nl.push(n);
|
45
|
+
}
|
46
|
+
}, 'childNodes');
|
47
|
+
|
48
|
+
// Find z-indexes
|
49
|
+
for (i = 0; i < nl.length; i++) {
|
50
|
+
z[i] = nl[i].style.zIndex ? parseInt(nl[i].style.zIndex, 10) : 0;
|
51
|
+
|
52
|
+
if (ci < 0 && nl[i] == le) {
|
53
|
+
ci = i;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
if (d < 0) {
|
58
|
+
// Move back
|
59
|
+
|
60
|
+
// Try find a lower one
|
61
|
+
for (i = 0; i < z.length; i++) {
|
62
|
+
if (z[i] < z[ci]) {
|
63
|
+
fi = i;
|
64
|
+
break;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
if (fi > -1) {
|
69
|
+
nl[ci].style.zIndex = z[fi];
|
70
|
+
nl[fi].style.zIndex = z[ci];
|
71
|
+
} else {
|
72
|
+
if (z[ci] > 0) {
|
73
|
+
nl[ci].style.zIndex = z[ci] - 1;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
} else {
|
77
|
+
// Move forward
|
78
|
+
|
79
|
+
// Try find a higher one
|
80
|
+
for (i = 0; i < z.length; i++) {
|
81
|
+
if (z[i] > z[ci]) {
|
82
|
+
fi = i;
|
83
|
+
break;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
if (fi > -1) {
|
88
|
+
nl[ci].style.zIndex = z[fi];
|
89
|
+
nl[fi].style.zIndex = z[ci];
|
90
|
+
} else {
|
91
|
+
nl[ci].style.zIndex = z[ci] + 1;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
editor.execCommand('mceRepaint');
|
96
|
+
}
|
97
|
+
|
98
|
+
function insertLayer() {
|
99
|
+
var dom = editor.dom, p = dom.getPos(dom.getParent(editor.selection.getNode(), '*'));
|
100
|
+
var body = editor.getBody();
|
101
|
+
|
102
|
+
editor.dom.add(body, 'div', {
|
103
|
+
style: {
|
104
|
+
position: 'absolute',
|
105
|
+
left: p.x,
|
106
|
+
top: (p.y > 20 ? p.y : 20),
|
107
|
+
width: 100,
|
108
|
+
height: 100
|
109
|
+
},
|
110
|
+
'class': 'mceItemVisualAid mceItemLayer'
|
111
|
+
}, editor.selection.getContent() || editor.getLang('layer.content'));
|
112
|
+
|
113
|
+
// Workaround for IE where it messes up the JS engine if you insert a layer on IE 6,7
|
114
|
+
if (tinymce.Env.ie) {
|
115
|
+
dom.setHTML(body, body.innerHTML);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
function toggleAbsolute() {
|
120
|
+
var le = getParentLayer(editor.selection.getNode());
|
121
|
+
|
122
|
+
if (!le) {
|
123
|
+
le = editor.dom.getParent(editor.selection.getNode(), 'DIV,P,IMG');
|
124
|
+
}
|
125
|
+
|
126
|
+
if (le) {
|
127
|
+
if (le.style.position.toLowerCase() == "absolute") {
|
128
|
+
editor.dom.setStyles(le, {
|
129
|
+
position: '',
|
130
|
+
left: '',
|
131
|
+
top: '',
|
132
|
+
width: '',
|
133
|
+
height: ''
|
134
|
+
});
|
135
|
+
|
136
|
+
editor.dom.removeClass(le, 'mceItemVisualAid');
|
137
|
+
editor.dom.removeClass(le, 'mceItemLayer');
|
138
|
+
} else {
|
139
|
+
if (!le.style.left) {
|
140
|
+
le.style.left = 20 + 'px';
|
141
|
+
}
|
142
|
+
|
143
|
+
if (!le.style.top) {
|
144
|
+
le.style.top = 20 + 'px';
|
145
|
+
}
|
146
|
+
|
147
|
+
if (!le.style.width) {
|
148
|
+
le.style.width = le.width ? (le.width + 'px') : '100px';
|
149
|
+
}
|
150
|
+
|
151
|
+
if (!le.style.height) {
|
152
|
+
le.style.height = le.height ? (le.height + 'px') : '100px';
|
153
|
+
}
|
154
|
+
|
155
|
+
le.style.position = "absolute";
|
156
|
+
|
157
|
+
editor.dom.setAttrib(le, 'data-mce-style', '');
|
158
|
+
editor.addVisual(editor.getBody());
|
159
|
+
}
|
160
|
+
|
161
|
+
editor.execCommand('mceRepaint');
|
162
|
+
editor.nodeChanged();
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
// Register commands
|
167
|
+
editor.addCommand('mceInsertLayer', insertLayer);
|
168
|
+
|
169
|
+
editor.addCommand('mceMoveForward', function() {
|
170
|
+
move(1);
|
171
|
+
});
|
172
|
+
|
173
|
+
editor.addCommand('mceMoveBackward', function() {
|
174
|
+
move(-1);
|
175
|
+
});
|
176
|
+
|
177
|
+
editor.addCommand('mceMakeAbsolute', function() {
|
178
|
+
toggleAbsolute();
|
179
|
+
});
|
180
|
+
|
181
|
+
// Register buttons
|
182
|
+
editor.addButton('moveforward', {title: 'layer.forward_desc', cmd: 'mceMoveForward'});
|
183
|
+
editor.addButton('movebackward', {title: 'layer.backward_desc', cmd: 'mceMoveBackward'});
|
184
|
+
editor.addButton('absolute', {title: 'layer.absolute_desc', cmd: 'mceMakeAbsolute'});
|
185
|
+
editor.addButton('insertlayer', {title: 'layer.insertlayer_desc', cmd: 'mceInsertLayer'});
|
186
|
+
|
187
|
+
editor.on('init', function() {
|
188
|
+
if (tinymce.Env.ie) {
|
189
|
+
editor.getDoc().execCommand('2D-Position', false, true);
|
190
|
+
}
|
191
|
+
});
|
192
|
+
|
193
|
+
// Remove serialized styles when selecting a layer since it might be changed by a drag operation
|
194
|
+
editor.on('mouseup', function(e) {
|
195
|
+
var layer = getParentLayer(e.target);
|
196
|
+
|
197
|
+
if (layer) {
|
198
|
+
editor.dom.setAttrib(layer, 'data-mce-style', '');
|
199
|
+
}
|
200
|
+
});
|
201
|
+
|
202
|
+
// Fixes edit focus issues with layers on Gecko
|
203
|
+
// This will enable designMode while inside a layer and disable it when outside
|
204
|
+
editor.on('mousedown', function(e) {
|
205
|
+
var node = e.target, doc = editor.getDoc(), parent;
|
206
|
+
|
207
|
+
if (tinymce.Env.gecko) {
|
208
|
+
if (getParentLayer(node)) {
|
209
|
+
if (doc.designMode !== 'on') {
|
210
|
+
doc.designMode = 'on';
|
211
|
+
|
212
|
+
// Repaint caret
|
213
|
+
node = doc.body;
|
214
|
+
parent = node.parentNode;
|
215
|
+
parent.removeChild(node);
|
216
|
+
parent.appendChild(node);
|
217
|
+
}
|
218
|
+
} else if (doc.designMode == 'on') {
|
219
|
+
doc.designMode = 'off';
|
220
|
+
}
|
221
|
+
}
|
222
|
+
});
|
223
|
+
|
224
|
+
editor.on('NodeChange', visualAid);
|
225
|
+
});
|