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("fullpage",function(a){function b(){var b=c();a.windowManager.open({title:"Document properties",data:b,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(a){d(tinymce.extend(b,a.data))}})}function c(){function b(a,b){var c=a.attr(b);return c||""}var c,d,f=e(),g={};return g.fontface=a.getParam("fullpage_default_fontface",""),g.fontsize=a.getParam("fullpage_default_fontsize",""),c=f.firstChild,7==c.type&&(g.xml_pi=!0,d=/encoding="([^"]+)"/.exec(c.value),d&&(g.docencoding=d[1])),c=f.getAll("#doctype")[0],c&&(g.doctype="<!DOCTYPE"+c.value+">"),c=f.getAll("title")[0],c&&c.firstChild&&(g.title=c.firstChild.value),k(f.getAll("meta"),function(a){var b,c=a.attr("name"),d=a.attr("http-equiv");c?g[c.toLowerCase()]=a.attr("content"):"Content-Type"==d&&(b=/charset\s*=\s*(.*)\s*/gi.exec(a.attr("content")),b&&(g.docencoding=b[1]))}),c=f.getAll("html")[0],c&&(g.langcode=b(c,"lang")||b(c,"xml:lang")),g.stylesheets=[],tinymce.each(f.getAll("link"),function(a){"stylesheet"==a.attr("rel")&&g.stylesheets.push(a.attr("href"))}),c=f.getAll("body")[0],c&&(g.langdir=b(c,"dir"),g.style=b(c,"style"),g.visited_color=b(c,"vlink"),g.link_color=b(c,"link"),g.active_color=b(c,"alink")),g}function d(b){function c(a,b,c){a.attr(b,c?c:void 0)}function d(a){g.firstChild?g.insert(a,g.firstChild):g.append(a)}var f,g,h,j,m,n=a.dom;f=e(),g=f.getAll("head")[0],g||(j=f.getAll("html")[0],g=new l("head",1),j.firstChild?j.insert(g,j.firstChild,!0):j.append(g)),j=f.firstChild,b.xml_pi?(m='version="1.0"',b.docencoding&&(m+=' encoding="'+b.docencoding+'"'),7!=j.type&&(j=new l("xml",7),f.insert(j,f.firstChild,!0)),j.value=m):j&&7==j.type&&j.remove(),j=f.getAll("#doctype")[0],b.doctype?(j||(j=new l("#doctype",10),b.xml_pi?f.insert(j,f.firstChild):d(j)),j.value=b.doctype.substring(9,b.doctype.length-1)):j&&j.remove(),j=null,k(f.getAll("meta"),function(a){"Content-Type"==a.attr("http-equiv")&&(j=a)}),b.docencoding?(j||(j=new l("meta",1),j.attr("http-equiv","Content-Type"),j.shortEnded=!0,d(j)),j.attr("content","text/html; charset="+b.docencoding)):j&&j.remove(),j=f.getAll("title")[0],b.title?(j?j.empty():(j=new l("title",1),d(j)),j.append(new l("#text",3)).value=b.title):j&&j.remove(),k("keywords,description,author,copyright,robots".split(","),function(a){var c,e,g=f.getAll("meta"),h=b[a];for(c=0;c<g.length;c++)if(e=g[c],e.attr("name")==a)return void(h?e.attr("content",h):e.remove());h&&(j=new l("meta",1),j.attr("name",a),j.attr("content",h),j.shortEnded=!0,d(j))});var o={};tinymce.each(f.getAll("link"),function(a){"stylesheet"==a.attr("rel")&&(o[a.attr("href")]=a)}),tinymce.each(b.stylesheets,function(a){o[a]||(j=new l("link",1),j.attr({rel:"stylesheet",text:"text/css",href:a}),j.shortEnded=!0,d(j)),delete o[a]}),tinymce.each(o,function(a){a.remove()}),j=f.getAll("body")[0],j&&(c(j,"dir",b.langdir),c(j,"style",b.style),c(j,"vlink",b.visited_color),c(j,"link",b.link_color),c(j,"alink",b.active_color),n.setAttribs(a.getBody(),{style:b.style,dir:b.dir,vLink:b.visited_color,link:b.link_color,aLink:b.active_color})),j=f.getAll("html")[0],j&&(c(j,"lang",b.langcode),c(j,"xml:lang",b.langcode)),g.firstChild||g.remove(),h=new tinymce.html.Serializer({validate:!1,indent:!0,apply_source_formatting:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(f),i=h.substring(0,h.indexOf("</body>"))}function e(){return new tinymce.html.DomParser({validate:!1,root_name:"#document"}).parse(i)}function f(b){function c(a){return a.replace(/<\/?[A-Z]+/g,function(a){return a.toLowerCase()})}var d,f,h,l,m=b.content,n="",o=a.dom;if(!b.selection&&!("raw"==b.format&&i||b.source_view&&a.getParam("fullpage_hide_in_source_view"))){0!==m.length||b.source_view||(m=tinymce.trim(i)+"\n"+tinymce.trim(m)+"\n"+tinymce.trim(j)),m=m.replace(/<(\/?)BODY/gi,"<$1body"),d=m.indexOf("<body"),-1!=d?(d=m.indexOf(">",d),i=c(m.substring(0,d+1)),f=m.indexOf("</body",d),-1==f&&(f=m.length),b.content=m.substring(d+1,f),j=c(m.substring(f))):(i=g(),j="\n</body>\n</html>"),h=e(),k(h.getAll("style"),function(a){a.firstChild&&(n+=a.firstChild.value)}),l=h.getAll("body")[0],l&&o.setAttribs(a.getBody(),{style:l.attr("style")||"",dir:l.attr("dir")||"",vLink:l.attr("vlink")||"",link:l.attr("link")||"",aLink:l.attr("alink")||""}),o.remove("fullpage_styles");var p=a.getDoc().getElementsByTagName("head")[0];n&&(o.add(p,"style",{id:"fullpage_styles"},n),l=o.get("fullpage_styles"),l.styleSheet&&(l.styleSheet.cssText=n));var q={};tinymce.each(p.getElementsByTagName("link"),function(a){"stylesheet"==a.rel&&a.getAttribute("data-mce-fullpage")&&(q[a.href]=a)}),tinymce.each(h.getAll("link"),function(a){var b=a.attr("href");q[b]||"stylesheet"!=a.attr("rel")||o.add(p,"link",{rel:"stylesheet",text:"text/css",href:b,"data-mce-fullpage":"1"}),delete q[b]}),tinymce.each(q,function(a){a.parentNode.removeChild(a)})}}function g(){var b,c="",d="";return a.getParam("fullpage_default_xml_pi")&&(c+='<?xml version="1.0" encoding="'+a.getParam("fullpage_default_encoding","ISO-8859-1")+'" ?>\n'),c+=a.getParam("fullpage_default_doctype","<!DOCTYPE html>"),c+="\n<html>\n<head>\n",(b=a.getParam("fullpage_default_title"))&&(c+="<title>"+b+"</title>\n"),(b=a.getParam("fullpage_default_encoding"))&&(c+='<meta http-equiv="Content-Type" content="text/html; charset='+b+'" />\n'),(b=a.getParam("fullpage_default_font_family"))&&(d+="font-family: "+b+";"),(b=a.getParam("fullpage_default_font_size"))&&(d+="font-size: "+b+";"),(b=a.getParam("fullpage_default_text_color"))&&(d+="color: "+b+";"),c+="</head>\n<body"+(d?' style="'+d+'"':"")+">\n"}function h(b){b.selection||b.source_view&&a.getParam("fullpage_hide_in_source_view")||(b.content=tinymce.trim(i)+"\n"+tinymce.trim(b.content)+"\n"+tinymce.trim(j))}var i,j,k=tinymce.each,l=tinymce.html.Node;a.addCommand("mceFullPageProperties",b),a.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),a.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),a.on("BeforeSetContent",f),a.on("GetContent",h)});
|
@@ -0,0 +1,154 @@
|
|
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('fullscreen', function(editor) {
|
14
|
+
var fullscreenState = false, DOM = tinymce.DOM, iframeWidth, iframeHeight, resizeHandler;
|
15
|
+
var containerWidth, containerHeight, scrollPos;
|
16
|
+
|
17
|
+
if (editor.settings.inline) {
|
18
|
+
return;
|
19
|
+
}
|
20
|
+
|
21
|
+
function getWindowSize() {
|
22
|
+
var w, h, win = window, doc = document;
|
23
|
+
var body = doc.body;
|
24
|
+
|
25
|
+
// Old IE
|
26
|
+
if (body.offsetWidth) {
|
27
|
+
w = body.offsetWidth;
|
28
|
+
h = body.offsetHeight;
|
29
|
+
}
|
30
|
+
|
31
|
+
// Modern browsers
|
32
|
+
if (win.innerWidth && win.innerHeight) {
|
33
|
+
w = win.innerWidth;
|
34
|
+
h = win.innerHeight;
|
35
|
+
}
|
36
|
+
|
37
|
+
return {w: w, h: h};
|
38
|
+
}
|
39
|
+
|
40
|
+
function getScrollPos() {
|
41
|
+
var vp = tinymce.DOM.getViewPort();
|
42
|
+
|
43
|
+
return {
|
44
|
+
x: vp.x,
|
45
|
+
y: vp.y
|
46
|
+
};
|
47
|
+
}
|
48
|
+
|
49
|
+
function setScrollPos(pos) {
|
50
|
+
scrollTo(pos.x, pos.y);
|
51
|
+
}
|
52
|
+
|
53
|
+
function toggleFullscreen() {
|
54
|
+
var body = document.body, documentElement = document.documentElement, editorContainerStyle;
|
55
|
+
var editorContainer, iframe, iframeStyle;
|
56
|
+
|
57
|
+
function resize() {
|
58
|
+
DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
|
59
|
+
}
|
60
|
+
|
61
|
+
fullscreenState = !fullscreenState;
|
62
|
+
|
63
|
+
editorContainer = editor.getContainer();
|
64
|
+
editorContainerStyle = editorContainer.style;
|
65
|
+
iframe = editor.getContentAreaContainer().firstChild;
|
66
|
+
iframeStyle = iframe.style;
|
67
|
+
|
68
|
+
if (fullscreenState) {
|
69
|
+
scrollPos = getScrollPos();
|
70
|
+
iframeWidth = iframeStyle.width;
|
71
|
+
iframeHeight = iframeStyle.height;
|
72
|
+
iframeStyle.width = iframeStyle.height = '100%';
|
73
|
+
containerWidth = editorContainerStyle.width;
|
74
|
+
containerHeight = editorContainerStyle.height;
|
75
|
+
editorContainerStyle.width = editorContainerStyle.height = '';
|
76
|
+
|
77
|
+
DOM.addClass(body, 'mce-fullscreen');
|
78
|
+
DOM.addClass(documentElement, 'mce-fullscreen');
|
79
|
+
DOM.addClass(editorContainer, 'mce-fullscreen');
|
80
|
+
|
81
|
+
DOM.bind(window, 'resize', resize);
|
82
|
+
resize();
|
83
|
+
resizeHandler = resize;
|
84
|
+
} else {
|
85
|
+
iframeStyle.width = iframeWidth;
|
86
|
+
iframeStyle.height = iframeHeight;
|
87
|
+
|
88
|
+
if (containerWidth) {
|
89
|
+
editorContainerStyle.width = containerWidth;
|
90
|
+
}
|
91
|
+
|
92
|
+
if (containerHeight) {
|
93
|
+
editorContainerStyle.height = containerHeight;
|
94
|
+
}
|
95
|
+
|
96
|
+
DOM.removeClass(body, 'mce-fullscreen');
|
97
|
+
DOM.removeClass(documentElement, 'mce-fullscreen');
|
98
|
+
DOM.removeClass(editorContainer, 'mce-fullscreen');
|
99
|
+
DOM.unbind(window, 'resize', resizeHandler);
|
100
|
+
setScrollPos(scrollPos);
|
101
|
+
}
|
102
|
+
|
103
|
+
editor.fire('FullscreenStateChanged', {state: fullscreenState});
|
104
|
+
}
|
105
|
+
|
106
|
+
editor.on('init', function() {
|
107
|
+
editor.addShortcut('Meta+Alt+F', '', toggleFullscreen);
|
108
|
+
});
|
109
|
+
|
110
|
+
editor.on('remove', function() {
|
111
|
+
if (resizeHandler) {
|
112
|
+
DOM.unbind(window, 'resize', resizeHandler);
|
113
|
+
}
|
114
|
+
});
|
115
|
+
|
116
|
+
editor.addCommand('mceFullScreen', toggleFullscreen);
|
117
|
+
|
118
|
+
editor.addMenuItem('fullscreen', {
|
119
|
+
text: 'Fullscreen',
|
120
|
+
shortcut: 'Meta+Alt+F',
|
121
|
+
selectable: true,
|
122
|
+
onClick: function() {
|
123
|
+
toggleFullscreen();
|
124
|
+
editor.focus();
|
125
|
+
},
|
126
|
+
onPostRender: function() {
|
127
|
+
var self = this;
|
128
|
+
|
129
|
+
editor.on('FullscreenStateChanged', function(e) {
|
130
|
+
self.active(e.state);
|
131
|
+
});
|
132
|
+
},
|
133
|
+
context: 'view'
|
134
|
+
});
|
135
|
+
|
136
|
+
editor.addButton('fullscreen', {
|
137
|
+
tooltip: 'Fullscreen',
|
138
|
+
shortcut: 'Meta+Alt+F',
|
139
|
+
onClick: toggleFullscreen,
|
140
|
+
onPostRender: function() {
|
141
|
+
var self = this;
|
142
|
+
|
143
|
+
editor.on('FullscreenStateChanged', function(e) {
|
144
|
+
self.active(e.state);
|
145
|
+
});
|
146
|
+
}
|
147
|
+
});
|
148
|
+
|
149
|
+
return {
|
150
|
+
isFullscreen: function() {
|
151
|
+
return fullscreenState;
|
152
|
+
}
|
153
|
+
};
|
154
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){var a=tinymce.DOM.getViewPort();return{x:a.x,y:a.y}}function d(a){scrollTo(a.x,a.y)}function e(){function e(){m.setStyle(p,"height",b().h-(o.clientHeight-p.clientHeight))}var n,o,p,q,r=document.body,s=document.documentElement;l=!l,o=a.getContainer(),n=o.style,p=a.getContentAreaContainer().firstChild,q=p.style,l?(k=c(),f=q.width,g=q.height,q.width=q.height="100%",i=n.width,j=n.height,n.width=n.height="",m.addClass(r,"mce-fullscreen"),m.addClass(s,"mce-fullscreen"),m.addClass(o,"mce-fullscreen"),m.bind(window,"resize",e),e(),h=e):(q.width=f,q.height=g,i&&(n.width=i),j&&(n.height=j),m.removeClass(r,"mce-fullscreen"),m.removeClass(s,"mce-fullscreen"),m.removeClass(o,"mce-fullscreen"),m.unbind(window,"resize",h),d(k)),a.fire("FullscreenStateChanged",{state:l})}var f,g,h,i,j,k,l=!1,m=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Meta+Alt+F","",e)}),a.on("remove",function(){h&&m.unbind(window,"resize",h)}),a.addCommand("mceFullScreen",e),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Alt+F",selectable:!0,onClick:function(){e(),a.focus()},onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Meta+Alt+F",onClick:e,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return l}})});
|
@@ -0,0 +1,30 @@
|
|
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('hr', function(editor) {
|
14
|
+
editor.addCommand('InsertHorizontalRule', function() {
|
15
|
+
editor.execCommand('mceInsertContent', false, '<hr />');
|
16
|
+
});
|
17
|
+
|
18
|
+
editor.addButton('hr', {
|
19
|
+
icon: 'hr',
|
20
|
+
tooltip: 'Horizontal line',
|
21
|
+
cmd: 'InsertHorizontalRule'
|
22
|
+
});
|
23
|
+
|
24
|
+
editor.addMenuItem('hr', {
|
25
|
+
icon: 'hr',
|
26
|
+
text: 'Horizontal line',
|
27
|
+
cmd: 'InsertHorizontalRule',
|
28
|
+
context: 'insert'
|
29
|
+
});
|
30
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
tinymce.PluginManager.add("hr",function(a){a.addCommand("InsertHorizontalRule",function(){a.execCommand("mceInsertContent",!1,"<hr />")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});
|
@@ -0,0 +1,630 @@
|
|
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('image', function(editor) {
|
14
|
+
function getImageSize(url, callback) {
|
15
|
+
var img = document.createElement('img');
|
16
|
+
|
17
|
+
function done(width, height) {
|
18
|
+
if (img.parentNode) {
|
19
|
+
img.parentNode.removeChild(img);
|
20
|
+
}
|
21
|
+
|
22
|
+
callback({width: width, height: height});
|
23
|
+
}
|
24
|
+
|
25
|
+
img.onload = function() {
|
26
|
+
done(Math.max(img.width, img.clientWidth), Math.max(img.height, img.clientHeight));
|
27
|
+
};
|
28
|
+
|
29
|
+
img.onerror = function() {
|
30
|
+
done();
|
31
|
+
};
|
32
|
+
|
33
|
+
var style = img.style;
|
34
|
+
style.visibility = 'hidden';
|
35
|
+
style.position = 'fixed';
|
36
|
+
style.bottom = style.left = 0;
|
37
|
+
style.width = style.height = 'auto';
|
38
|
+
|
39
|
+
document.body.appendChild(img);
|
40
|
+
img.src = url;
|
41
|
+
}
|
42
|
+
|
43
|
+
function buildListItems(inputList, itemCallback, startItems) {
|
44
|
+
function appendItems(values, output) {
|
45
|
+
output = output || [];
|
46
|
+
|
47
|
+
tinymce.each(values, function(item) {
|
48
|
+
var menuItem = {text: item.text || item.title};
|
49
|
+
|
50
|
+
if (item.menu) {
|
51
|
+
menuItem.menu = appendItems(item.menu);
|
52
|
+
} else {
|
53
|
+
menuItem.value = item.value;
|
54
|
+
itemCallback(menuItem);
|
55
|
+
}
|
56
|
+
|
57
|
+
output.push(menuItem);
|
58
|
+
});
|
59
|
+
|
60
|
+
return output;
|
61
|
+
}
|
62
|
+
|
63
|
+
return appendItems(inputList, startItems || []);
|
64
|
+
}
|
65
|
+
|
66
|
+
function createImageList(callback) {
|
67
|
+
return function() {
|
68
|
+
var imageList = editor.settings.image_list;
|
69
|
+
|
70
|
+
if (typeof imageList == "string") {
|
71
|
+
tinymce.util.XHR.send({
|
72
|
+
url: imageList,
|
73
|
+
success: function(text) {
|
74
|
+
callback(tinymce.util.JSON.parse(text));
|
75
|
+
}
|
76
|
+
});
|
77
|
+
} else if (typeof imageList == "function") {
|
78
|
+
imageList(callback);
|
79
|
+
} else {
|
80
|
+
callback(imageList);
|
81
|
+
}
|
82
|
+
};
|
83
|
+
}
|
84
|
+
|
85
|
+
function showDialog(imageList) {
|
86
|
+
var win, data = {}, dom = editor.dom, imgElm, figureElm;
|
87
|
+
var width, height, imageListCtrl, classListCtrl, imageDimensions = editor.settings.image_dimensions !== false;
|
88
|
+
|
89
|
+
function recalcSize() {
|
90
|
+
var widthCtrl, heightCtrl, newWidth, newHeight;
|
91
|
+
|
92
|
+
widthCtrl = win.find('#width')[0];
|
93
|
+
heightCtrl = win.find('#height')[0];
|
94
|
+
|
95
|
+
if (!widthCtrl || !heightCtrl) {
|
96
|
+
return;
|
97
|
+
}
|
98
|
+
|
99
|
+
newWidth = widthCtrl.value();
|
100
|
+
newHeight = heightCtrl.value();
|
101
|
+
|
102
|
+
if (win.find('#constrain')[0].checked() && width && height && newWidth && newHeight) {
|
103
|
+
if (width != newWidth) {
|
104
|
+
newHeight = Math.round((newWidth / width) * newHeight);
|
105
|
+
|
106
|
+
if (!isNaN(newHeight)) {
|
107
|
+
heightCtrl.value(newHeight);
|
108
|
+
}
|
109
|
+
} else {
|
110
|
+
newWidth = Math.round((newHeight / height) * newWidth);
|
111
|
+
|
112
|
+
if (!isNaN(newWidth)) {
|
113
|
+
widthCtrl.value(newWidth);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
width = newWidth;
|
119
|
+
height = newHeight;
|
120
|
+
}
|
121
|
+
|
122
|
+
function onSubmitForm() {
|
123
|
+
var figureElm, oldImg;
|
124
|
+
|
125
|
+
function waitLoad(imgElm) {
|
126
|
+
function selectImage() {
|
127
|
+
imgElm.onload = imgElm.onerror = null;
|
128
|
+
|
129
|
+
if (editor.selection) {
|
130
|
+
editor.selection.select(imgElm);
|
131
|
+
editor.nodeChanged();
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
imgElm.onload = function() {
|
136
|
+
if (!data.width && !data.height && imageDimensions) {
|
137
|
+
dom.setAttribs(imgElm, {
|
138
|
+
width: imgElm.clientWidth,
|
139
|
+
height: imgElm.clientHeight
|
140
|
+
});
|
141
|
+
}
|
142
|
+
|
143
|
+
selectImage();
|
144
|
+
};
|
145
|
+
|
146
|
+
imgElm.onerror = selectImage;
|
147
|
+
}
|
148
|
+
|
149
|
+
updateStyle();
|
150
|
+
recalcSize();
|
151
|
+
|
152
|
+
data = tinymce.extend(data, win.toJSON());
|
153
|
+
|
154
|
+
if (!data.alt) {
|
155
|
+
data.alt = '';
|
156
|
+
}
|
157
|
+
|
158
|
+
if (!data.title) {
|
159
|
+
data.title = '';
|
160
|
+
}
|
161
|
+
|
162
|
+
if (data.width === '') {
|
163
|
+
data.width = null;
|
164
|
+
}
|
165
|
+
|
166
|
+
if (data.height === '') {
|
167
|
+
data.height = null;
|
168
|
+
}
|
169
|
+
|
170
|
+
if (!data.style) {
|
171
|
+
data.style = null;
|
172
|
+
}
|
173
|
+
|
174
|
+
// Setup new data excluding style properties
|
175
|
+
/*eslint dot-notation: 0*/
|
176
|
+
data = {
|
177
|
+
src: data.src,
|
178
|
+
alt: data.alt,
|
179
|
+
title: data.title,
|
180
|
+
width: data.width,
|
181
|
+
height: data.height,
|
182
|
+
style: data.style,
|
183
|
+
caption: data.caption,
|
184
|
+
"class": data["class"]
|
185
|
+
};
|
186
|
+
|
187
|
+
editor.undoManager.transact(function() {
|
188
|
+
if (!data.src) {
|
189
|
+
if (imgElm) {
|
190
|
+
dom.remove(imgElm);
|
191
|
+
editor.focus();
|
192
|
+
editor.nodeChanged();
|
193
|
+
}
|
194
|
+
|
195
|
+
return;
|
196
|
+
}
|
197
|
+
|
198
|
+
if (data.title === "") {
|
199
|
+
data.title = null;
|
200
|
+
}
|
201
|
+
|
202
|
+
if (!imgElm) {
|
203
|
+
data.id = '__mcenew';
|
204
|
+
editor.focus();
|
205
|
+
editor.selection.setContent(dom.createHTML('img', data));
|
206
|
+
imgElm = dom.get('__mcenew');
|
207
|
+
dom.setAttrib(imgElm, 'id', null);
|
208
|
+
} else {
|
209
|
+
dom.setAttribs(imgElm, data);
|
210
|
+
}
|
211
|
+
|
212
|
+
editor.editorUpload.uploadImagesAuto();
|
213
|
+
|
214
|
+
if (data.caption === false) {
|
215
|
+
if (dom.is(imgElm.parentNode, 'figure.image')) {
|
216
|
+
figureElm = imgElm.parentNode;
|
217
|
+
dom.insertAfter(imgElm, figureElm);
|
218
|
+
dom.remove(figureElm);
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
222
|
+
function isTextBlock(node) {
|
223
|
+
return editor.schema.getTextBlockElements()[node.nodeName];
|
224
|
+
}
|
225
|
+
|
226
|
+
if (data.caption === true) {
|
227
|
+
if (!dom.is(imgElm.parentNode, 'figure.image')) {
|
228
|
+
oldImg = imgElm;
|
229
|
+
imgElm = imgElm.cloneNode(true);
|
230
|
+
figureElm = dom.create('figure', {'class': 'image'});
|
231
|
+
figureElm.appendChild(imgElm);
|
232
|
+
figureElm.appendChild(dom.create('figcaption', {contentEditable: true}, 'Caption'));
|
233
|
+
figureElm.contentEditable = false;
|
234
|
+
|
235
|
+
var textBlock = dom.getParent(oldImg, isTextBlock);
|
236
|
+
if (textBlock) {
|
237
|
+
dom.split(textBlock, oldImg, figureElm);
|
238
|
+
} else {
|
239
|
+
dom.replace(figureElm, oldImg);
|
240
|
+
}
|
241
|
+
|
242
|
+
editor.selection.select(figureElm);
|
243
|
+
}
|
244
|
+
|
245
|
+
return;
|
246
|
+
}
|
247
|
+
|
248
|
+
waitLoad(imgElm);
|
249
|
+
});
|
250
|
+
}
|
251
|
+
|
252
|
+
function removePixelSuffix(value) {
|
253
|
+
if (value) {
|
254
|
+
value = value.replace(/px$/, '');
|
255
|
+
}
|
256
|
+
|
257
|
+
return value;
|
258
|
+
}
|
259
|
+
|
260
|
+
function srcChange(e) {
|
261
|
+
var srcURL, prependURL, absoluteURLPattern, meta = e.meta || {};
|
262
|
+
|
263
|
+
if (imageListCtrl) {
|
264
|
+
imageListCtrl.value(editor.convertURL(this.value(), 'src'));
|
265
|
+
}
|
266
|
+
|
267
|
+
tinymce.each(meta, function(value, key) {
|
268
|
+
win.find('#' + key).value(value);
|
269
|
+
});
|
270
|
+
|
271
|
+
if (!meta.width && !meta.height) {
|
272
|
+
srcURL = editor.convertURL(this.value(), 'src');
|
273
|
+
|
274
|
+
// Pattern test the src url and make sure we haven't already prepended the url
|
275
|
+
prependURL = editor.settings.image_prepend_url;
|
276
|
+
absoluteURLPattern = new RegExp('^(?:[a-z]+:)?//', 'i');
|
277
|
+
if (prependURL && !absoluteURLPattern.test(srcURL) && srcURL.substring(0, prependURL.length) !== prependURL) {
|
278
|
+
srcURL = prependURL + srcURL;
|
279
|
+
}
|
280
|
+
|
281
|
+
this.value(srcURL);
|
282
|
+
|
283
|
+
getImageSize(editor.documentBaseURI.toAbsolute(this.value()), function(data) {
|
284
|
+
if (data.width && data.height && imageDimensions) {
|
285
|
+
width = data.width;
|
286
|
+
height = data.height;
|
287
|
+
|
288
|
+
win.find('#width').value(width);
|
289
|
+
win.find('#height').value(height);
|
290
|
+
}
|
291
|
+
});
|
292
|
+
}
|
293
|
+
}
|
294
|
+
|
295
|
+
imgElm = editor.selection.getNode();
|
296
|
+
figureElm = dom.getParent(imgElm, 'figure.image');
|
297
|
+
if (figureElm) {
|
298
|
+
imgElm = dom.select('img', figureElm)[0];
|
299
|
+
}
|
300
|
+
|
301
|
+
if (imgElm && (imgElm.nodeName != 'IMG' || imgElm.getAttribute('data-mce-object') || imgElm.getAttribute('data-mce-placeholder'))) {
|
302
|
+
imgElm = null;
|
303
|
+
}
|
304
|
+
|
305
|
+
if (imgElm) {
|
306
|
+
width = dom.getAttrib(imgElm, 'width');
|
307
|
+
height = dom.getAttrib(imgElm, 'height');
|
308
|
+
|
309
|
+
data = {
|
310
|
+
src: dom.getAttrib(imgElm, 'src'),
|
311
|
+
alt: dom.getAttrib(imgElm, 'alt'),
|
312
|
+
title: dom.getAttrib(imgElm, 'title'),
|
313
|
+
"class": dom.getAttrib(imgElm, 'class'),
|
314
|
+
width: width,
|
315
|
+
height: height,
|
316
|
+
caption: !!figureElm
|
317
|
+
};
|
318
|
+
}
|
319
|
+
|
320
|
+
if (imageList) {
|
321
|
+
imageListCtrl = {
|
322
|
+
type: 'listbox',
|
323
|
+
label: 'Image list',
|
324
|
+
values: buildListItems(
|
325
|
+
imageList,
|
326
|
+
function(item) {
|
327
|
+
item.value = editor.convertURL(item.value || item.url, 'src');
|
328
|
+
},
|
329
|
+
[{text: 'None', value: ''}]
|
330
|
+
),
|
331
|
+
value: data.src && editor.convertURL(data.src, 'src'),
|
332
|
+
onselect: function(e) {
|
333
|
+
var altCtrl = win.find('#alt');
|
334
|
+
|
335
|
+
if (!altCtrl.value() || (e.lastControl && altCtrl.value() == e.lastControl.text())) {
|
336
|
+
altCtrl.value(e.control.text());
|
337
|
+
}
|
338
|
+
|
339
|
+
win.find('#src').value(e.control.value()).fire('change');
|
340
|
+
},
|
341
|
+
onPostRender: function() {
|
342
|
+
/*eslint consistent-this: 0*/
|
343
|
+
imageListCtrl = this;
|
344
|
+
}
|
345
|
+
};
|
346
|
+
}
|
347
|
+
|
348
|
+
if (editor.settings.image_class_list) {
|
349
|
+
classListCtrl = {
|
350
|
+
name: 'class',
|
351
|
+
type: 'listbox',
|
352
|
+
label: 'Class',
|
353
|
+
values: buildListItems(
|
354
|
+
editor.settings.image_class_list,
|
355
|
+
function(item) {
|
356
|
+
if (item.value) {
|
357
|
+
item.textStyle = function() {
|
358
|
+
return editor.formatter.getCssText({inline: 'img', classes: [item.value]});
|
359
|
+
};
|
360
|
+
}
|
361
|
+
}
|
362
|
+
)
|
363
|
+
};
|
364
|
+
}
|
365
|
+
|
366
|
+
// General settings shared between simple and advanced dialogs
|
367
|
+
var generalFormItems = [
|
368
|
+
{
|
369
|
+
name: 'src',
|
370
|
+
type: 'filepicker',
|
371
|
+
filetype: 'image',
|
372
|
+
label: 'Source',
|
373
|
+
autofocus: true,
|
374
|
+
onchange: srcChange
|
375
|
+
},
|
376
|
+
imageListCtrl
|
377
|
+
];
|
378
|
+
|
379
|
+
if (editor.settings.image_description !== false) {
|
380
|
+
generalFormItems.push({name: 'alt', type: 'textbox', label: 'Image description'});
|
381
|
+
}
|
382
|
+
|
383
|
+
if (editor.settings.image_title) {
|
384
|
+
generalFormItems.push({name: 'title', type: 'textbox', label: 'Image Title'});
|
385
|
+
}
|
386
|
+
|
387
|
+
if (imageDimensions) {
|
388
|
+
generalFormItems.push({
|
389
|
+
type: 'container',
|
390
|
+
label: 'Dimensions',
|
391
|
+
layout: 'flex',
|
392
|
+
direction: 'row',
|
393
|
+
align: 'center',
|
394
|
+
spacing: 5,
|
395
|
+
items: [
|
396
|
+
{name: 'width', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Width'},
|
397
|
+
{type: 'label', text: 'x'},
|
398
|
+
{name: 'height', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Height'},
|
399
|
+
{name: 'constrain', type: 'checkbox', checked: true, text: 'Constrain proportions'}
|
400
|
+
]
|
401
|
+
});
|
402
|
+
}
|
403
|
+
|
404
|
+
generalFormItems.push(classListCtrl);
|
405
|
+
|
406
|
+
if (editor.settings.image_caption && tinymce.Env.ceFalse) {
|
407
|
+
generalFormItems.push({name: 'caption', type: 'checkbox', label: 'Caption'});
|
408
|
+
}
|
409
|
+
|
410
|
+
function mergeMargins(css) {
|
411
|
+
if (css.margin) {
|
412
|
+
|
413
|
+
var splitMargin = css.margin.split(" ");
|
414
|
+
|
415
|
+
switch (splitMargin.length) {
|
416
|
+
case 1: //margin: toprightbottomleft;
|
417
|
+
css['margin-top'] = css['margin-top'] || splitMargin[0];
|
418
|
+
css['margin-right'] = css['margin-right'] || splitMargin[0];
|
419
|
+
css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];
|
420
|
+
css['margin-left'] = css['margin-left'] || splitMargin[0];
|
421
|
+
break;
|
422
|
+
case 2: //margin: topbottom rightleft;
|
423
|
+
css['margin-top'] = css['margin-top'] || splitMargin[0];
|
424
|
+
css['margin-right'] = css['margin-right'] || splitMargin[1];
|
425
|
+
css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];
|
426
|
+
css['margin-left'] = css['margin-left'] || splitMargin[1];
|
427
|
+
break;
|
428
|
+
case 3: //margin: top rightleft bottom;
|
429
|
+
css['margin-top'] = css['margin-top'] || splitMargin[0];
|
430
|
+
css['margin-right'] = css['margin-right'] || splitMargin[1];
|
431
|
+
css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];
|
432
|
+
css['margin-left'] = css['margin-left'] || splitMargin[1];
|
433
|
+
break;
|
434
|
+
case 4: //margin: top right bottom left;
|
435
|
+
css['margin-top'] = css['margin-top'] || splitMargin[0];
|
436
|
+
css['margin-right'] = css['margin-right'] || splitMargin[1];
|
437
|
+
css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];
|
438
|
+
css['margin-left'] = css['margin-left'] || splitMargin[3];
|
439
|
+
}
|
440
|
+
delete css.margin;
|
441
|
+
}
|
442
|
+
return css;
|
443
|
+
}
|
444
|
+
|
445
|
+
function updateStyle() {
|
446
|
+
function addPixelSuffix(value) {
|
447
|
+
if (value.length > 0 && /^[0-9]+$/.test(value)) {
|
448
|
+
value += 'px';
|
449
|
+
}
|
450
|
+
|
451
|
+
return value;
|
452
|
+
}
|
453
|
+
|
454
|
+
if (!editor.settings.image_advtab) {
|
455
|
+
return;
|
456
|
+
}
|
457
|
+
|
458
|
+
var data = win.toJSON(),
|
459
|
+
css = dom.parseStyle(data.style);
|
460
|
+
|
461
|
+
css = mergeMargins(css);
|
462
|
+
|
463
|
+
if (data.vspace) {
|
464
|
+
css['margin-top'] = css['margin-bottom'] = addPixelSuffix(data.vspace);
|
465
|
+
}
|
466
|
+
if (data.hspace) {
|
467
|
+
css['margin-left'] = css['margin-right'] = addPixelSuffix(data.hspace);
|
468
|
+
}
|
469
|
+
if (data.border) {
|
470
|
+
css['border-width'] = addPixelSuffix(data.border);
|
471
|
+
}
|
472
|
+
|
473
|
+
win.find('#style').value(dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css))));
|
474
|
+
}
|
475
|
+
|
476
|
+
function updateVSpaceHSpaceBorder() {
|
477
|
+
if (!editor.settings.image_advtab) {
|
478
|
+
return;
|
479
|
+
}
|
480
|
+
|
481
|
+
var data = win.toJSON(),
|
482
|
+
css = dom.parseStyle(data.style);
|
483
|
+
|
484
|
+
win.find('#vspace').value("");
|
485
|
+
win.find('#hspace').value("");
|
486
|
+
|
487
|
+
css = mergeMargins(css);
|
488
|
+
|
489
|
+
//Move opposite equal margins to vspace/hspace field
|
490
|
+
if ((css['margin-top'] && css['margin-bottom']) || (css['margin-right'] && css['margin-left'])) {
|
491
|
+
if (css['margin-top'] === css['margin-bottom']) {
|
492
|
+
win.find('#vspace').value(removePixelSuffix(css['margin-top']));
|
493
|
+
} else {
|
494
|
+
win.find('#vspace').value('');
|
495
|
+
}
|
496
|
+
if (css['margin-right'] === css['margin-left']) {
|
497
|
+
win.find('#hspace').value(removePixelSuffix(css['margin-right']));
|
498
|
+
} else {
|
499
|
+
win.find('#hspace').value('');
|
500
|
+
}
|
501
|
+
}
|
502
|
+
|
503
|
+
//Move border-width
|
504
|
+
if (css['border-width']) {
|
505
|
+
win.find('#border').value(removePixelSuffix(css['border-width']));
|
506
|
+
}
|
507
|
+
|
508
|
+
win.find('#style').value(dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css))));
|
509
|
+
|
510
|
+
}
|
511
|
+
|
512
|
+
if (editor.settings.image_advtab) {
|
513
|
+
// Parse styles from img
|
514
|
+
if (imgElm) {
|
515
|
+
if (imgElm.style.marginLeft && imgElm.style.marginRight && imgElm.style.marginLeft === imgElm.style.marginRight) {
|
516
|
+
data.hspace = removePixelSuffix(imgElm.style.marginLeft);
|
517
|
+
}
|
518
|
+
if (imgElm.style.marginTop && imgElm.style.marginBottom && imgElm.style.marginTop === imgElm.style.marginBottom) {
|
519
|
+
data.vspace = removePixelSuffix(imgElm.style.marginTop);
|
520
|
+
}
|
521
|
+
if (imgElm.style.borderWidth) {
|
522
|
+
data.border = removePixelSuffix(imgElm.style.borderWidth);
|
523
|
+
}
|
524
|
+
|
525
|
+
data.style = editor.dom.serializeStyle(editor.dom.parseStyle(editor.dom.getAttrib(imgElm, 'style')));
|
526
|
+
}
|
527
|
+
|
528
|
+
// Advanced dialog shows general+advanced tabs
|
529
|
+
win = editor.windowManager.open({
|
530
|
+
title: 'Insert/edit image',
|
531
|
+
data: data,
|
532
|
+
bodyType: 'tabpanel',
|
533
|
+
body: [
|
534
|
+
{
|
535
|
+
title: 'General',
|
536
|
+
type: 'form',
|
537
|
+
items: generalFormItems
|
538
|
+
},
|
539
|
+
|
540
|
+
{
|
541
|
+
title: 'Advanced',
|
542
|
+
type: 'form',
|
543
|
+
pack: 'start',
|
544
|
+
items: [
|
545
|
+
{
|
546
|
+
label: 'Style',
|
547
|
+
name: 'style',
|
548
|
+
type: 'textbox',
|
549
|
+
onchange: updateVSpaceHSpaceBorder
|
550
|
+
},
|
551
|
+
{
|
552
|
+
type: 'form',
|
553
|
+
layout: 'grid',
|
554
|
+
packV: 'start',
|
555
|
+
columns: 2,
|
556
|
+
padding: 0,
|
557
|
+
alignH: ['left', 'right'],
|
558
|
+
defaults: {
|
559
|
+
type: 'textbox',
|
560
|
+
maxWidth: 50,
|
561
|
+
onchange: updateStyle
|
562
|
+
},
|
563
|
+
items: [
|
564
|
+
{label: 'Vertical space', name: 'vspace'},
|
565
|
+
{label: 'Horizontal space', name: 'hspace'},
|
566
|
+
{label: 'Border', name: 'border'}
|
567
|
+
]
|
568
|
+
}
|
569
|
+
]
|
570
|
+
}
|
571
|
+
],
|
572
|
+
onSubmit: onSubmitForm
|
573
|
+
});
|
574
|
+
} else {
|
575
|
+
// Simple default dialog
|
576
|
+
win = editor.windowManager.open({
|
577
|
+
title: 'Insert/edit image',
|
578
|
+
data: data,
|
579
|
+
body: generalFormItems,
|
580
|
+
onSubmit: onSubmitForm
|
581
|
+
});
|
582
|
+
}
|
583
|
+
}
|
584
|
+
|
585
|
+
editor.on('preInit', function() {
|
586
|
+
function hasImageClass(node) {
|
587
|
+
var className = node.attr('class');
|
588
|
+
return className && /\bimage\b/.test(className);
|
589
|
+
}
|
590
|
+
|
591
|
+
function toggleContentEditableState(state) {
|
592
|
+
return function(nodes) {
|
593
|
+
var i = nodes.length, node;
|
594
|
+
|
595
|
+
function toggleContentEditable(node) {
|
596
|
+
node.attr('contenteditable', state ? 'true' : null);
|
597
|
+
}
|
598
|
+
|
599
|
+
while (i--) {
|
600
|
+
node = nodes[i];
|
601
|
+
|
602
|
+
if (hasImageClass(node)) {
|
603
|
+
node.attr('contenteditable', state ? 'false' : null);
|
604
|
+
tinymce.each(node.getAll('figcaption'), toggleContentEditable);
|
605
|
+
}
|
606
|
+
}
|
607
|
+
};
|
608
|
+
}
|
609
|
+
|
610
|
+
editor.parser.addNodeFilter('figure', toggleContentEditableState(true));
|
611
|
+
editor.serializer.addNodeFilter('figure', toggleContentEditableState(false));
|
612
|
+
});
|
613
|
+
|
614
|
+
editor.addButton('image', {
|
615
|
+
icon: 'image',
|
616
|
+
tooltip: 'Insert/edit image',
|
617
|
+
onclick: createImageList(showDialog),
|
618
|
+
stateSelector: 'img:not([data-mce-object],[data-mce-placeholder]),figure.image'
|
619
|
+
});
|
620
|
+
|
621
|
+
editor.addMenuItem('image', {
|
622
|
+
icon: 'image',
|
623
|
+
text: 'Insert/edit image',
|
624
|
+
onclick: createImageList(showDialog),
|
625
|
+
context: 'insert',
|
626
|
+
prependToContext: true
|
627
|
+
});
|
628
|
+
|
629
|
+
editor.addCommand('mceImage', createImageList(showDialog));
|
630
|
+
});
|