spiderfw 0.6.38 → 0.6.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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("lists",function(a){function b(b){return a.$.contains(a.getBody(),b)}function c(a){return a&&"BR"==a.nodeName}function d(a){return a&&/^(OL|UL|DL)$/.test(a.nodeName)&&b(a)}function e(a){return a.parentNode.firstChild==a}function f(a){return a.parentNode.lastChild==a}function g(b){return b&&!!a.schema.getTextBlockElements()[b.nodeName]}function h(b){return b===a.getBody()}var i=this;a.on("init",function(){function j(a,b){var c=A.isEmpty(a);return b&&A.select("span[data-mce-type=bookmark]").length>0?!1:c}function k(a){function b(b){var d,e,f;e=a[b?"startContainer":"endContainer"],f=a[b?"startOffset":"endOffset"],1==e.nodeType&&(d=A.create("span",{"data-mce-type":"bookmark"}),e.hasChildNodes()?(f=Math.min(f,e.childNodes.length-1),b?e.insertBefore(d,e.childNodes[f]):A.insertAfter(d,e.childNodes[f])):e.appendChild(d),e=d,f=0),c[b?"startContainer":"endContainer"]=e,c[b?"startOffset":"endOffset"]=f}var c={};return b(!0),a.collapsed||b(),c}function l(a){function b(b){function c(a){for(var b=a.parentNode.firstChild,c=0;b;){if(b==a)return c;1==b.nodeType&&"bookmark"==b.getAttribute("data-mce-type")||c++,b=b.nextSibling}return-1}var d,e,f;d=f=a[b?"startContainer":"endContainer"],e=a[b?"startOffset":"endOffset"],d&&(1==d.nodeType&&(e=c(d),d=d.parentNode,A.remove(f)),a[b?"startContainer":"endContainer"]=d,a[b?"startOffset":"endOffset"]=e)}b(!0),b();var c=A.createRng();c.setStart(a.startContainer,a.startOffset),a.endContainer&&c.setEnd(a.endContainer,a.endOffset),B.setRng(c)}function m(b,c){var d,e,f,g=A.createFragment(),h=a.schema.getBlockElements();if(a.settings.forced_root_block&&(c=c||a.settings.forced_root_block),c&&(e=A.create(c),e.tagName===a.settings.forced_root_block&&A.setAttribs(e,a.settings.forced_root_block_attrs),g.appendChild(e)),b)for(;d=b.firstChild;){var i=d.nodeName;f||"SPAN"==i&&"bookmark"==d.getAttribute("data-mce-type")||(f=!0),h[i]?(g.appendChild(d),e=null):c?(e||(e=A.create(c),g.appendChild(e)),e.appendChild(d)):g.appendChild(d)}return a.settings.forced_root_block?f||tinymce.Env.ie&&!(tinymce.Env.ie>10)||e.appendChild(A.create("br",{"data-mce-bogus":"1"})):g.appendChild(A.create("br")),g}function n(){return tinymce.grep(B.getSelectedBlocks(),function(a){return/^(LI|DT|DD)$/.test(a.nodeName)})}function o(a,b,c){function d(a){tinymce.each(g,function(c){a.parentNode.insertBefore(c,b.parentNode)}),A.remove(a)}var e,f,g,h;for(g=A.select('span[data-mce-type="bookmark"]',a),c=c||m(b),e=A.createRng(),e.setStartAfter(b),e.setEndAfter(a),f=e.extractContents(),h=f.firstChild;h;h=h.firstChild)if("LI"==h.nodeName&&A.isEmpty(h)){A.remove(h);break}A.isEmpty(f)||A.insertAfter(f,a),A.insertAfter(c,a),j(b.parentNode)&&d(b.parentNode),A.remove(b),j(a)&&A.remove(a)}function p(a){var b,c;if(b=a.nextSibling,b&&d(b)&&b.nodeName==a.nodeName){for(;c=b.firstChild;)a.appendChild(c);A.remove(b)}if(b=a.previousSibling,b&&d(b)&&b.nodeName==a.nodeName){for(;c=b.firstChild;)a.insertBefore(c,a.firstChild);A.remove(b)}}function q(a){tinymce.each(tinymce.grep(A.select("ol,ul",a)),function(a){var b,c=a.parentNode;"LI"==c.nodeName&&c.firstChild==a&&(b=c.previousSibling,b&&"LI"==b.nodeName&&(b.appendChild(a),j(c)&&A.remove(c))),d(c)&&(b=c.previousSibling,b&&"LI"==b.nodeName&&b.appendChild(a))})}function r(a){function b(a){j(a)&&A.remove(a)}var c,g=a.parentNode,i=g.parentNode;return h(g)?!0:"DD"==a.nodeName?(A.rename(a,"DT"),!0):e(a)&&f(a)?("LI"==i.nodeName?(A.insertAfter(a,i),b(i),A.remove(g)):d(i)?A.remove(g,!0):(i.insertBefore(m(a),g),A.remove(g)),!0):e(a)?("LI"==i.nodeName?(A.insertAfter(a,i),a.appendChild(g),b(i)):d(i)?i.insertBefore(a,g):(i.insertBefore(m(a),g),A.remove(a)),!0):f(a)?("LI"==i.nodeName?A.insertAfter(a,i):d(i)?A.insertAfter(a,g):(A.insertAfter(m(a),g),A.remove(a)),!0):("LI"==i.nodeName?(g=i,c=m(a,"LI")):c=d(i)?m(a,"LI"):m(a),o(g,a,c),q(g.parentNode),!0)}function s(a){function b(b,c){var e;if(d(b)){for(;e=a.lastChild.firstChild;)c.appendChild(e);A.remove(b)}}var c,e;return"DT"==a.nodeName?(A.rename(a,"DD"),!0):(c=a.previousSibling,c&&d(c)?(c.appendChild(a),!0):c&&"LI"==c.nodeName&&d(c.lastChild)?(c.lastChild.appendChild(a),b(a.lastChild,c.lastChild),!0):(c=a.nextSibling,c&&d(c)?(c.insertBefore(a,c.firstChild),!0):c&&"LI"==c.nodeName&&d(a.lastChild)?!1:(c=a.previousSibling,c&&"LI"==c.nodeName?(e=A.create(a.parentNode.nodeName),c.appendChild(e),e.appendChild(a),b(a.lastChild,e),!0):!1)))}function t(){var b=n();if(b.length){for(var c=k(B.getRng(!0)),d=0;d<b.length&&(s(b[d])||0!==d);d++);return l(c),a.nodeChanged(),!0}}function u(){var b=n();if(b.length){var c,d,e=k(B.getRng(!0)),f=a.getBody();for(c=b.length;c--;)for(var g=b[c].parentNode;g&&g!=f;){for(d=b.length;d--;)if(b[d]===g){b.splice(c,1);break}g=g.parentNode}for(c=0;c<b.length&&(r(b[c])||0!==c);c++);return l(e),a.nodeChanged(),!0}}function v(b){function e(){function b(a){var b,c;for(b=h[a?"startContainer":"endContainer"],c=h[a?"startOffset":"endOffset"],1==b.nodeType&&(b=b.childNodes[Math.min(c,b.childNodes.length-1)]||b);b.parentNode!=f;){if(g(b))return b;if(/^(TD|TH)$/.test(b.parentNode.nodeName))return b;b=b.parentNode}return b}for(var d,e=[],f=a.getBody(),i=b(!0),j=b(),k=[],l=i;l&&(k.push(l),l!=j);l=l.nextSibling);return tinymce.each(k,function(a){if(g(a))return e.push(a),void(d=null);if(A.isBlock(a)||c(a))return c(a)&&A.remove(a),void(d=null);var b=a.nextSibling;return tinymce.dom.BookmarkManager.isBookmarkNode(a)&&(g(b)||!b&&a.parentNode==f)?void(d=null):(d||(d=A.create("p"),a.parentNode.insertBefore(d,a),e.push(d)),void d.appendChild(a))}),e}var f,h=B.getRng(!0),i="LI";"false"!==A.getContentEditable(B.getNode())&&(b=b.toUpperCase(),"DL"==b&&(i="DT"),f=k(h),tinymce.each(e(),function(a){var c,e;e=a.previousSibling,e&&d(e)&&e.nodeName==b?(c=e,a=A.rename(a,i),e.appendChild(a)):(c=A.create(b),a.parentNode.insertBefore(c,a),c.appendChild(a),a=A.rename(a,i)),p(c)}),l(f))}function w(){var b=k(B.getRng(!0)),c=a.getBody();tinymce.each(n(),function(a){var b,e;if(!h(a.parentNode)){if(j(a))return void r(a);for(b=a;b&&b!=c;b=b.parentNode)d(b)&&(e=b);o(e,a)}}),l(b)}function x(a){var b=A.getParent(B.getStart(),"OL,UL,DL");if(!h(b))if(b)if(b.nodeName==a)w(a);else{var c=k(B.getRng(!0));p(A.rename(b,a)),l(c)}else v(a)}function y(b){return function(){var c=A.getParent(a.selection.getStart(),"UL,OL,DL");return c&&c.nodeName==b}}function z(a){return c(a)?!(!A.isBlock(a.nextSibling)||c(a.previousSibling)):!1}var A=a.dom,B=a.selection;i.backspaceDelete=function(e){function f(b,c){var d,e,f=b.startContainer,g=b.startOffset;if(3==f.nodeType&&(c?g<f.data.length:g>0))return f;for(d=a.schema.getNonEmptyElements(),e=new tinymce.dom.TreeWalker(b.startContainer,a.getBody()),c&&z(tinymce.dom.RangeUtils.getNode(b.startContainer,b.startOffset))&&e.next();f=e[c?"next":"prev2"]();){if("LI"==f.nodeName&&!f.hasChildNodes())return f;if(d[f.nodeName])return f;if(3==f.nodeType&&f.data.length>0)return f}}function g(a,e){var f,g,i=a.parentNode;if(b(a)&&b(e)){if(d(e.lastChild)&&(g=e.lastChild),i==e.lastChild&&c(i.previousSibling)&&A.remove(i.previousSibling),f=e.lastChild,f&&c(f)&&a.hasChildNodes()&&A.remove(f),j(e,!0)&&A.$(e).empty(),!j(a,!0))for(;f=a.firstChild;)e.appendChild(f);g&&e.appendChild(g),A.remove(a),j(i)&&!h(i)&&A.remove(i)}}if(B.isCollapsed()){var i,m,n,o=A.getParent(B.getStart(),"LI");if(o){if(i=o.parentNode,h(i)&&A.isEmpty(i))return!0;if(m=B.getRng(!0),n=A.getParent(f(m,e),"LI"),n&&n!=o){var p=k(m);return e?g(n,o):g(o,n),l(p),!0}if(!n&&!e&&w(i.nodeName))return!0}}},a.on("BeforeExecCommand",function(b){var c,d=b.command.toLowerCase();return"indent"==d?t()&&(c=!0):"outdent"==d&&u()&&(c=!0),c?(a.fire("ExecCommand",{command:b.command}),b.preventDefault(),!0):void 0}),a.addCommand("InsertUnorderedList",function(){x("UL")}),a.addCommand("InsertOrderedList",function(){x("OL")}),a.addCommand("InsertDefinitionList",function(){x("DL")}),a.addQueryStateHandler("InsertUnorderedList",y("UL")),a.addQueryStateHandler("InsertOrderedList",y("OL")),a.addQueryStateHandler("InsertDefinitionList",y("DL")),a.on("keydown",function(b){9!=b.keyCode||tinymce.util.VK.metaKeyPressed(b)||a.dom.getParent(a.selection.getStart(),"LI,DT,DD")&&(b.preventDefault(),b.shiftKey?u():t())})}),a.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(){var b=this;a.on("nodechange",function(){for(var c=a.selection.getSelectedBlocks(),d=!1,f=0,g=c.length;!d&&g>f;f++){var h=c[f].nodeName;d="LI"==h&&e(c[f])||"UL"==h||"OL"==h||"DD"==h}b.disabled(d)})}}),a.on("keydown",function(a){a.keyCode==tinymce.util.VK.BACKSPACE?i.backspaceDelete()&&a.preventDefault():a.keyCode==tinymce.util.VK.DELETE&&i.backspaceDelete(!0)&&a.preventDefault()})});
|
@@ -0,0 +1,878 @@
|
|
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
|
+
/*jshint maxlen:255 */
|
12
|
+
/*eslint max-len:0 */
|
13
|
+
/*global tinymce:true */
|
14
|
+
|
15
|
+
tinymce.PluginManager.add('media', function(editor, url) {
|
16
|
+
var urlPatterns = [
|
17
|
+
{regex: /youtu\.be\/([\w\-.]+)/, type: 'iframe', w: 560, h: 314, url: '//www.youtube.com/embed/$1', allowFullscreen: true},
|
18
|
+
{regex: /youtube\.com(.+)v=([^&]+)/, type: 'iframe', w: 560, h: 314, url: '//www.youtube.com/embed/$2', allowFullscreen: true},
|
19
|
+
{regex: /youtube.com\/embed\/([a-z0-9\-_]+)/i, type: 'iframe', w: 560, h: 314, url: '//www.youtube.com/embed/$1', allowFullscreen: true},
|
20
|
+
{regex: /vimeo\.com\/([0-9]+)/, type: 'iframe', w: 425, h: 350, url: '//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc', allowfullscreen: true},
|
21
|
+
{regex: /vimeo\.com\/(.*)\/([0-9]+)/, type: "iframe", w: 425, h: 350, url: "//player.vimeo.com/video/$2?title=0&byline=0", allowfullscreen: true},
|
22
|
+
{regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: '//maps.google.com/maps/ms?msid=$2&output=embed"', allowFullscreen: false}
|
23
|
+
];
|
24
|
+
|
25
|
+
var embedChange = (tinymce.Env.ie && tinymce.Env.ie <= 8) ? 'onChange' : 'onInput';
|
26
|
+
|
27
|
+
function guessMime(url) {
|
28
|
+
url = url.toLowerCase();
|
29
|
+
|
30
|
+
if (url.indexOf('.mp3') != -1) {
|
31
|
+
return 'audio/mpeg';
|
32
|
+
}
|
33
|
+
|
34
|
+
if (url.indexOf('.wav') != -1) {
|
35
|
+
return 'audio/wav';
|
36
|
+
}
|
37
|
+
|
38
|
+
if (url.indexOf('.mp4') != -1) {
|
39
|
+
return 'video/mp4';
|
40
|
+
}
|
41
|
+
|
42
|
+
if (url.indexOf('.webm') != -1) {
|
43
|
+
return 'video/webm';
|
44
|
+
}
|
45
|
+
|
46
|
+
if (url.indexOf('.ogg') != -1) {
|
47
|
+
return 'video/ogg';
|
48
|
+
}
|
49
|
+
|
50
|
+
if (url.indexOf('.swf') != -1) {
|
51
|
+
return 'application/x-shockwave-flash';
|
52
|
+
}
|
53
|
+
|
54
|
+
return '';
|
55
|
+
}
|
56
|
+
|
57
|
+
function getVideoScriptMatch(src) {
|
58
|
+
var prefixes = editor.settings.media_scripts;
|
59
|
+
|
60
|
+
if (prefixes) {
|
61
|
+
for (var i = 0; i < prefixes.length; i++) {
|
62
|
+
if (src.indexOf(prefixes[i].filter) !== -1) {
|
63
|
+
return prefixes[i];
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
function showDialog() {
|
70
|
+
var win, width, height, data;
|
71
|
+
|
72
|
+
var generalFormItems = [
|
73
|
+
{
|
74
|
+
name: 'source1',
|
75
|
+
type: 'filepicker',
|
76
|
+
filetype: 'media',
|
77
|
+
size: 40,
|
78
|
+
autofocus: true,
|
79
|
+
label: 'Source',
|
80
|
+
onchange: function(e) {
|
81
|
+
tinymce.each(e.meta, function(value, key) {
|
82
|
+
win.find('#' + key).value(value);
|
83
|
+
});
|
84
|
+
}
|
85
|
+
}
|
86
|
+
];
|
87
|
+
|
88
|
+
function recalcSize(e) {
|
89
|
+
var widthCtrl, heightCtrl, newWidth, newHeight;
|
90
|
+
|
91
|
+
widthCtrl = win.find('#width')[0];
|
92
|
+
heightCtrl = win.find('#height')[0];
|
93
|
+
|
94
|
+
newWidth = widthCtrl.value();
|
95
|
+
newHeight = heightCtrl.value();
|
96
|
+
|
97
|
+
if (win.find('#constrain')[0].checked() && width && height && newWidth && newHeight) {
|
98
|
+
if (e.control == widthCtrl) {
|
99
|
+
newHeight = Math.round((newWidth / width) * newHeight);
|
100
|
+
|
101
|
+
if (!isNaN(newHeight)) {
|
102
|
+
heightCtrl.value(newHeight);
|
103
|
+
}
|
104
|
+
} else {
|
105
|
+
newWidth = Math.round((newHeight / height) * newWidth);
|
106
|
+
|
107
|
+
if (!isNaN(newWidth)) {
|
108
|
+
widthCtrl.value(newWidth);
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
width = newWidth;
|
114
|
+
height = newHeight;
|
115
|
+
}
|
116
|
+
|
117
|
+
if (editor.settings.media_alt_source !== false) {
|
118
|
+
generalFormItems.push({name: 'source2', type: 'filepicker', filetype: 'media', size: 40, label: 'Alternative source'});
|
119
|
+
}
|
120
|
+
|
121
|
+
if (editor.settings.media_poster !== false) {
|
122
|
+
generalFormItems.push({name: 'poster', type: 'filepicker', filetype: 'image', size: 40, label: 'Poster'});
|
123
|
+
}
|
124
|
+
|
125
|
+
if (editor.settings.media_dimensions !== false) {
|
126
|
+
generalFormItems.push({
|
127
|
+
type: 'container',
|
128
|
+
label: 'Dimensions',
|
129
|
+
layout: 'flex',
|
130
|
+
align: 'center',
|
131
|
+
spacing: 5,
|
132
|
+
items: [
|
133
|
+
{name: 'width', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Width'},
|
134
|
+
{type: 'label', text: 'x'},
|
135
|
+
{name: 'height', type: 'textbox', maxLength: 5, size: 3, onchange: recalcSize, ariaLabel: 'Height'},
|
136
|
+
{name: 'constrain', type: 'checkbox', checked: true, text: 'Constrain proportions'}
|
137
|
+
]
|
138
|
+
});
|
139
|
+
}
|
140
|
+
|
141
|
+
data = getData(editor.selection.getNode());
|
142
|
+
width = data.width;
|
143
|
+
height = data.height;
|
144
|
+
|
145
|
+
var embedTextBox = {
|
146
|
+
id: 'mcemediasource',
|
147
|
+
type: 'textbox',
|
148
|
+
flex: 1,
|
149
|
+
name: 'embed',
|
150
|
+
value: getSource(),
|
151
|
+
multiline: true,
|
152
|
+
label: 'Source'
|
153
|
+
};
|
154
|
+
|
155
|
+
function updateValueOnChange() {
|
156
|
+
data = htmlToData(this.value());
|
157
|
+
this.parent().parent().fromJSON(data);
|
158
|
+
}
|
159
|
+
|
160
|
+
embedTextBox[embedChange] = updateValueOnChange;
|
161
|
+
|
162
|
+
win = editor.windowManager.open({
|
163
|
+
title: 'Insert/edit video',
|
164
|
+
data: data,
|
165
|
+
bodyType: 'tabpanel',
|
166
|
+
body: [
|
167
|
+
{
|
168
|
+
title: 'General',
|
169
|
+
type: "form",
|
170
|
+
onShowTab: function() {
|
171
|
+
data = htmlToData(this.next().find('#embed').value());
|
172
|
+
this.fromJSON(data);
|
173
|
+
},
|
174
|
+
items: generalFormItems
|
175
|
+
},
|
176
|
+
|
177
|
+
{
|
178
|
+
title: 'Embed',
|
179
|
+
type: "container",
|
180
|
+
layout: 'flex',
|
181
|
+
direction: 'column',
|
182
|
+
align: 'stretch',
|
183
|
+
padding: 10,
|
184
|
+
spacing: 10,
|
185
|
+
onShowTab: function() {
|
186
|
+
this.find('#embed').value(dataToHtml(this.parent().toJSON()));
|
187
|
+
},
|
188
|
+
items: [
|
189
|
+
{
|
190
|
+
type: 'label',
|
191
|
+
text: 'Paste your embed code below:',
|
192
|
+
forId: 'mcemediasource'
|
193
|
+
},
|
194
|
+
embedTextBox
|
195
|
+
]
|
196
|
+
}
|
197
|
+
],
|
198
|
+
onSubmit: function() {
|
199
|
+
var beforeObjects, afterObjects, i, y;
|
200
|
+
|
201
|
+
beforeObjects = editor.dom.select('img[data-mce-object]');
|
202
|
+
editor.insertContent(dataToHtml(this.toJSON()));
|
203
|
+
afterObjects = editor.dom.select('img[data-mce-object]');
|
204
|
+
|
205
|
+
// Find new image placeholder so we can select it
|
206
|
+
for (i = 0; i < beforeObjects.length; i++) {
|
207
|
+
for (y = afterObjects.length - 1; y >= 0; y--) {
|
208
|
+
if (beforeObjects[i] == afterObjects[y]) {
|
209
|
+
afterObjects.splice(y, 1);
|
210
|
+
}
|
211
|
+
}
|
212
|
+
}
|
213
|
+
|
214
|
+
editor.selection.select(afterObjects[0]);
|
215
|
+
editor.nodeChanged();
|
216
|
+
}
|
217
|
+
});
|
218
|
+
}
|
219
|
+
|
220
|
+
function getSource() {
|
221
|
+
var elm = editor.selection.getNode();
|
222
|
+
|
223
|
+
if (elm.getAttribute('data-mce-object')) {
|
224
|
+
return editor.selection.getContent();
|
225
|
+
}
|
226
|
+
}
|
227
|
+
|
228
|
+
function dataToHtml(data) {
|
229
|
+
var html = '';
|
230
|
+
|
231
|
+
if (!data.source1) {
|
232
|
+
tinymce.extend(data, htmlToData(data.embed));
|
233
|
+
if (!data.source1) {
|
234
|
+
return '';
|
235
|
+
}
|
236
|
+
}
|
237
|
+
|
238
|
+
if (!data.source2) {
|
239
|
+
data.source2 = '';
|
240
|
+
}
|
241
|
+
|
242
|
+
if (!data.poster) {
|
243
|
+
data.poster = '';
|
244
|
+
}
|
245
|
+
|
246
|
+
data.source1 = editor.convertURL(data.source1, "source");
|
247
|
+
data.source2 = editor.convertURL(data.source2, "source");
|
248
|
+
data.source1mime = guessMime(data.source1);
|
249
|
+
data.source2mime = guessMime(data.source2);
|
250
|
+
data.poster = editor.convertURL(data.poster, "poster");
|
251
|
+
data.flashPlayerUrl = editor.convertURL(url + '/moxieplayer.swf', "movie");
|
252
|
+
|
253
|
+
tinymce.each(urlPatterns, function(pattern) {
|
254
|
+
var match, i, url;
|
255
|
+
|
256
|
+
if ((match = pattern.regex.exec(data.source1))) {
|
257
|
+
url = pattern.url;
|
258
|
+
|
259
|
+
for (i = 0; match[i]; i++) {
|
260
|
+
/*jshint loopfunc:true*/
|
261
|
+
/*eslint no-loop-func:0 */
|
262
|
+
url = url.replace('$' + i, function() {
|
263
|
+
return match[i];
|
264
|
+
});
|
265
|
+
}
|
266
|
+
|
267
|
+
data.source1 = url;
|
268
|
+
data.type = pattern.type;
|
269
|
+
data.allowFullscreen = pattern.allowFullscreen;
|
270
|
+
data.width = data.width || pattern.w;
|
271
|
+
data.height = data.height || pattern.h;
|
272
|
+
}
|
273
|
+
});
|
274
|
+
|
275
|
+
if (data.embed) {
|
276
|
+
html = updateHtml(data.embed, data, true);
|
277
|
+
} else {
|
278
|
+
var videoScript = getVideoScriptMatch(data.source1);
|
279
|
+
if (videoScript) {
|
280
|
+
data.type = 'script';
|
281
|
+
data.width = videoScript.width;
|
282
|
+
data.height = videoScript.height;
|
283
|
+
}
|
284
|
+
|
285
|
+
data.width = data.width || 300;
|
286
|
+
data.height = data.height || 150;
|
287
|
+
|
288
|
+
tinymce.each(data, function(value, key) {
|
289
|
+
data[key] = editor.dom.encode(value);
|
290
|
+
});
|
291
|
+
|
292
|
+
if (data.type == "iframe") {
|
293
|
+
var allowFullscreen = data.allowFullscreen ? ' allowFullscreen="1"' : '';
|
294
|
+
html += '<iframe src="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '"' + allowFullscreen + '></iframe>';
|
295
|
+
} else if (data.source1mime == "application/x-shockwave-flash") {
|
296
|
+
html += '<object data="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">';
|
297
|
+
|
298
|
+
if (data.poster) {
|
299
|
+
html += '<img src="' + data.poster + '" width="' + data.width + '" height="' + data.height + '" />';
|
300
|
+
}
|
301
|
+
|
302
|
+
html += '</object>';
|
303
|
+
} else if (data.source1mime.indexOf('audio') != -1) {
|
304
|
+
if (editor.settings.audio_template_callback) {
|
305
|
+
html = editor.settings.audio_template_callback(data);
|
306
|
+
} else {
|
307
|
+
html += (
|
308
|
+
'<audio controls="controls" src="' + data.source1 + '">' +
|
309
|
+
(data.source2 ? '\n<source src="' + data.source2 + '"' + (data.source2mime ? ' type="' + data.source2mime + '"' : '') + ' />\n' : '') +
|
310
|
+
'</audio>'
|
311
|
+
);
|
312
|
+
}
|
313
|
+
} else if (data.type == "script") {
|
314
|
+
html += '<script src="' + data.source1 + '"></script>';
|
315
|
+
} else {
|
316
|
+
if (editor.settings.video_template_callback) {
|
317
|
+
html = editor.settings.video_template_callback(data);
|
318
|
+
} else {
|
319
|
+
html = (
|
320
|
+
'<video width="' + data.width + '" height="' + data.height + '"' + (data.poster ? ' poster="' + data.poster + '"' : '') + ' controls="controls">\n' +
|
321
|
+
'<source src="' + data.source1 + '"' + (data.source1mime ? ' type="' + data.source1mime + '"' : '') + ' />\n' +
|
322
|
+
(data.source2 ? '<source src="' + data.source2 + '"' + (data.source2mime ? ' type="' + data.source2mime + '"' : '') + ' />\n' : '') +
|
323
|
+
'</video>'
|
324
|
+
);
|
325
|
+
}
|
326
|
+
}
|
327
|
+
}
|
328
|
+
|
329
|
+
return html;
|
330
|
+
}
|
331
|
+
|
332
|
+
function htmlToData(html) {
|
333
|
+
var data = {};
|
334
|
+
|
335
|
+
new tinymce.html.SaxParser({
|
336
|
+
validate: false,
|
337
|
+
allow_conditional_comments: true,
|
338
|
+
special: 'script,noscript',
|
339
|
+
start: function(name, attrs) {
|
340
|
+
if (!data.source1 && name == "param") {
|
341
|
+
data.source1 = attrs.map.movie;
|
342
|
+
}
|
343
|
+
|
344
|
+
if (name == "iframe" || name == "object" || name == "embed" || name == "video" || name == "audio") {
|
345
|
+
if (!data.type) {
|
346
|
+
data.type = name;
|
347
|
+
}
|
348
|
+
|
349
|
+
data = tinymce.extend(attrs.map, data);
|
350
|
+
}
|
351
|
+
|
352
|
+
if (name == "script") {
|
353
|
+
var videoScript = getVideoScriptMatch(attrs.map.src);
|
354
|
+
if (!videoScript) {
|
355
|
+
return;
|
356
|
+
}
|
357
|
+
|
358
|
+
data = {
|
359
|
+
type: "script",
|
360
|
+
source1: attrs.map.src,
|
361
|
+
width: videoScript.width,
|
362
|
+
height: videoScript.height
|
363
|
+
};
|
364
|
+
}
|
365
|
+
|
366
|
+
if (name == "source") {
|
367
|
+
if (!data.source1) {
|
368
|
+
data.source1 = attrs.map.src;
|
369
|
+
} else if (!data.source2) {
|
370
|
+
data.source2 = attrs.map.src;
|
371
|
+
}
|
372
|
+
}
|
373
|
+
|
374
|
+
if (name == "img" && !data.poster) {
|
375
|
+
data.poster = attrs.map.src;
|
376
|
+
}
|
377
|
+
}
|
378
|
+
}).parse(html);
|
379
|
+
|
380
|
+
data.source1 = data.source1 || data.src || data.data;
|
381
|
+
data.source2 = data.source2 || '';
|
382
|
+
data.poster = data.poster || '';
|
383
|
+
|
384
|
+
return data;
|
385
|
+
}
|
386
|
+
|
387
|
+
function getData(element) {
|
388
|
+
if (element.getAttribute('data-mce-object')) {
|
389
|
+
return htmlToData(editor.serializer.serialize(element, {selection: true}));
|
390
|
+
}
|
391
|
+
|
392
|
+
return {};
|
393
|
+
}
|
394
|
+
|
395
|
+
function sanitize(html) {
|
396
|
+
if (editor.settings.media_filter_html === false) {
|
397
|
+
return html;
|
398
|
+
}
|
399
|
+
|
400
|
+
var writer = new tinymce.html.Writer(), blocked;
|
401
|
+
|
402
|
+
new tinymce.html.SaxParser({
|
403
|
+
validate: false,
|
404
|
+
allow_conditional_comments: false,
|
405
|
+
special: 'script,noscript',
|
406
|
+
|
407
|
+
comment: function(text) {
|
408
|
+
writer.comment(text);
|
409
|
+
},
|
410
|
+
|
411
|
+
cdata: function(text) {
|
412
|
+
writer.cdata(text);
|
413
|
+
},
|
414
|
+
|
415
|
+
text: function(text, raw) {
|
416
|
+
writer.text(text, raw);
|
417
|
+
},
|
418
|
+
|
419
|
+
start: function(name, attrs, empty) {
|
420
|
+
blocked = true;
|
421
|
+
|
422
|
+
if (name == 'script' || name == 'noscript') {
|
423
|
+
return;
|
424
|
+
}
|
425
|
+
|
426
|
+
for (var i = 0; i < attrs.length; i++) {
|
427
|
+
if (attrs[i].name.indexOf('on') === 0) {
|
428
|
+
return;
|
429
|
+
}
|
430
|
+
|
431
|
+
if (attrs[i].name == 'style') {
|
432
|
+
attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
|
433
|
+
}
|
434
|
+
}
|
435
|
+
|
436
|
+
writer.start(name, attrs, empty);
|
437
|
+
blocked = false;
|
438
|
+
},
|
439
|
+
|
440
|
+
end: function(name) {
|
441
|
+
if (blocked) {
|
442
|
+
return;
|
443
|
+
}
|
444
|
+
|
445
|
+
writer.end(name);
|
446
|
+
}
|
447
|
+
}, new tinymce.html.Schema({})).parse(html);
|
448
|
+
|
449
|
+
return writer.getContent();
|
450
|
+
}
|
451
|
+
|
452
|
+
function updateHtml(html, data, updateAll) {
|
453
|
+
var writer = new tinymce.html.Writer();
|
454
|
+
var sourceCount = 0, hasImage;
|
455
|
+
|
456
|
+
function setAttributes(attrs, updatedAttrs) {
|
457
|
+
var name, i, value, attr;
|
458
|
+
|
459
|
+
for (name in updatedAttrs) {
|
460
|
+
value = "" + updatedAttrs[name];
|
461
|
+
|
462
|
+
if (attrs.map[name]) {
|
463
|
+
i = attrs.length;
|
464
|
+
while (i--) {
|
465
|
+
attr = attrs[i];
|
466
|
+
|
467
|
+
if (attr.name == name) {
|
468
|
+
if (value) {
|
469
|
+
attrs.map[name] = value;
|
470
|
+
attr.value = value;
|
471
|
+
} else {
|
472
|
+
delete attrs.map[name];
|
473
|
+
attrs.splice(i, 1);
|
474
|
+
}
|
475
|
+
}
|
476
|
+
}
|
477
|
+
} else if (value) {
|
478
|
+
attrs.push({
|
479
|
+
name: name,
|
480
|
+
value: value
|
481
|
+
});
|
482
|
+
|
483
|
+
attrs.map[name] = value;
|
484
|
+
}
|
485
|
+
}
|
486
|
+
}
|
487
|
+
|
488
|
+
new tinymce.html.SaxParser({
|
489
|
+
validate: false,
|
490
|
+
allow_conditional_comments: true,
|
491
|
+
special: 'script,noscript',
|
492
|
+
|
493
|
+
comment: function(text) {
|
494
|
+
writer.comment(text);
|
495
|
+
},
|
496
|
+
|
497
|
+
cdata: function(text) {
|
498
|
+
writer.cdata(text);
|
499
|
+
},
|
500
|
+
|
501
|
+
text: function(text, raw) {
|
502
|
+
writer.text(text, raw);
|
503
|
+
},
|
504
|
+
|
505
|
+
start: function(name, attrs, empty) {
|
506
|
+
switch (name) {
|
507
|
+
case "video":
|
508
|
+
case "object":
|
509
|
+
case "embed":
|
510
|
+
case "img":
|
511
|
+
case "iframe":
|
512
|
+
setAttributes(attrs, {
|
513
|
+
width: data.width,
|
514
|
+
height: data.height
|
515
|
+
});
|
516
|
+
break;
|
517
|
+
}
|
518
|
+
|
519
|
+
if (updateAll) {
|
520
|
+
switch (name) {
|
521
|
+
case "video":
|
522
|
+
setAttributes(attrs, {
|
523
|
+
poster: data.poster,
|
524
|
+
src: ""
|
525
|
+
});
|
526
|
+
|
527
|
+
if (data.source2) {
|
528
|
+
setAttributes(attrs, {
|
529
|
+
src: ""
|
530
|
+
});
|
531
|
+
}
|
532
|
+
break;
|
533
|
+
|
534
|
+
case "iframe":
|
535
|
+
setAttributes(attrs, {
|
536
|
+
src: data.source1
|
537
|
+
});
|
538
|
+
break;
|
539
|
+
|
540
|
+
case "source":
|
541
|
+
sourceCount++;
|
542
|
+
|
543
|
+
if (sourceCount <= 2) {
|
544
|
+
setAttributes(attrs, {
|
545
|
+
src: data["source" + sourceCount],
|
546
|
+
type: data["source" + sourceCount + "mime"]
|
547
|
+
});
|
548
|
+
|
549
|
+
if (!data["source" + sourceCount]) {
|
550
|
+
return;
|
551
|
+
}
|
552
|
+
}
|
553
|
+
break;
|
554
|
+
|
555
|
+
case "img":
|
556
|
+
if (!data.poster) {
|
557
|
+
return;
|
558
|
+
}
|
559
|
+
|
560
|
+
hasImage = true;
|
561
|
+
break;
|
562
|
+
}
|
563
|
+
}
|
564
|
+
|
565
|
+
writer.start(name, attrs, empty);
|
566
|
+
},
|
567
|
+
|
568
|
+
end: function(name) {
|
569
|
+
if (name == "video" && updateAll) {
|
570
|
+
for (var index = 1; index <= 2; index++) {
|
571
|
+
if (data["source" + index]) {
|
572
|
+
var attrs = [];
|
573
|
+
attrs.map = {};
|
574
|
+
|
575
|
+
if (sourceCount < index) {
|
576
|
+
setAttributes(attrs, {
|
577
|
+
src: data["source" + index],
|
578
|
+
type: data["source" + index + "mime"]
|
579
|
+
});
|
580
|
+
|
581
|
+
writer.start("source", attrs, true);
|
582
|
+
}
|
583
|
+
}
|
584
|
+
}
|
585
|
+
}
|
586
|
+
|
587
|
+
if (data.poster && name == "object" && updateAll && !hasImage) {
|
588
|
+
var imgAttrs = [];
|
589
|
+
imgAttrs.map = {};
|
590
|
+
|
591
|
+
setAttributes(imgAttrs, {
|
592
|
+
src: data.poster,
|
593
|
+
width: data.width,
|
594
|
+
height: data.height
|
595
|
+
});
|
596
|
+
|
597
|
+
writer.start("img", imgAttrs, true);
|
598
|
+
}
|
599
|
+
|
600
|
+
writer.end(name);
|
601
|
+
}
|
602
|
+
}, new tinymce.html.Schema({})).parse(html);
|
603
|
+
|
604
|
+
return writer.getContent();
|
605
|
+
}
|
606
|
+
|
607
|
+
editor.on('ResolveName', function(e) {
|
608
|
+
var name;
|
609
|
+
|
610
|
+
if (e.target.nodeType == 1 && (name = e.target.getAttribute("data-mce-object"))) {
|
611
|
+
e.name = name;
|
612
|
+
}
|
613
|
+
});
|
614
|
+
|
615
|
+
function retainAttributesAndInnerHtml(sourceNode, targetNode) {
|
616
|
+
var attrName, attrValue, attribs, ai, innerHtml;
|
617
|
+
|
618
|
+
// Prefix all attributes except width, height and style since we
|
619
|
+
// will add these to the placeholder
|
620
|
+
attribs = sourceNode.attributes;
|
621
|
+
ai = attribs.length;
|
622
|
+
while (ai--) {
|
623
|
+
attrName = attribs[ai].name;
|
624
|
+
attrValue = attribs[ai].value;
|
625
|
+
|
626
|
+
if (attrName !== "width" && attrName !== "height" && attrName !== "style") {
|
627
|
+
if (attrName == "data" || attrName == "src") {
|
628
|
+
attrValue = editor.convertURL(attrValue, attrName);
|
629
|
+
}
|
630
|
+
|
631
|
+
targetNode.attr('data-mce-p-' + attrName, attrValue);
|
632
|
+
}
|
633
|
+
}
|
634
|
+
|
635
|
+
// Place the inner HTML contents inside an escaped attribute
|
636
|
+
// This enables us to copy/paste the fake object
|
637
|
+
innerHtml = sourceNode.firstChild && sourceNode.firstChild.value;
|
638
|
+
if (innerHtml) {
|
639
|
+
targetNode.attr("data-mce-html", escape(innerHtml));
|
640
|
+
targetNode.firstChild = null;
|
641
|
+
}
|
642
|
+
}
|
643
|
+
|
644
|
+
function createPlaceholderNode(node) {
|
645
|
+
var placeHolder, name = node.name;
|
646
|
+
|
647
|
+
placeHolder = new tinymce.html.Node('img', 1);
|
648
|
+
placeHolder.shortEnded = true;
|
649
|
+
|
650
|
+
retainAttributesAndInnerHtml(node, placeHolder);
|
651
|
+
|
652
|
+
placeHolder.attr({
|
653
|
+
width: node.attr('width') || "300",
|
654
|
+
height: node.attr('height') || (name == "audio" ? "30" : "150"),
|
655
|
+
style: node.attr('style'),
|
656
|
+
src: tinymce.Env.transparentSrc,
|
657
|
+
"data-mce-object": name,
|
658
|
+
"class": "mce-object mce-object-" + name
|
659
|
+
});
|
660
|
+
|
661
|
+
return placeHolder;
|
662
|
+
}
|
663
|
+
|
664
|
+
function createPreviewNode(node) {
|
665
|
+
var previewWrapper, previewNode, shimNode, name = node.name;
|
666
|
+
|
667
|
+
previewWrapper = new tinymce.html.Node('span', 1);
|
668
|
+
previewWrapper.attr({
|
669
|
+
contentEditable: 'false',
|
670
|
+
style: node.attr('style'),
|
671
|
+
"data-mce-object": name,
|
672
|
+
"class": "mce-preview-object mce-object-" + name
|
673
|
+
});
|
674
|
+
|
675
|
+
retainAttributesAndInnerHtml(node, previewWrapper);
|
676
|
+
|
677
|
+
previewNode = new tinymce.html.Node(name, 1);
|
678
|
+
previewNode.attr({
|
679
|
+
src: node.attr('src'),
|
680
|
+
allowfullscreen: node.attr('allowfullscreen'),
|
681
|
+
width: node.attr('width') || "300",
|
682
|
+
height: node.attr('height') || (name == "audio" ? "30" : "150"),
|
683
|
+
frameborder: '0'
|
684
|
+
});
|
685
|
+
|
686
|
+
shimNode = new tinymce.html.Node('span', 1);
|
687
|
+
shimNode.attr('class', 'mce-shim');
|
688
|
+
|
689
|
+
previewWrapper.append(previewNode);
|
690
|
+
previewWrapper.append(shimNode);
|
691
|
+
|
692
|
+
return previewWrapper;
|
693
|
+
}
|
694
|
+
|
695
|
+
editor.on('preInit', function() {
|
696
|
+
// Make sure that any messy HTML is retained inside these
|
697
|
+
var specialElements = editor.schema.getSpecialElements();
|
698
|
+
tinymce.each('video audio iframe object'.split(' '), function(name) {
|
699
|
+
specialElements[name] = new RegExp('<\/' + name + '[^>]*>', 'gi');
|
700
|
+
});
|
701
|
+
|
702
|
+
// Allow elements
|
703
|
+
//editor.schema.addValidElements('object[id|style|width|height|classid|codebase|*],embed[id|style|width|height|type|src|*],video[*],audio[*]');
|
704
|
+
|
705
|
+
// Set allowFullscreen attribs as boolean
|
706
|
+
var boolAttrs = editor.schema.getBoolAttrs();
|
707
|
+
tinymce.each('webkitallowfullscreen mozallowfullscreen allowfullscreen'.split(' '), function(name) {
|
708
|
+
boolAttrs[name] = {};
|
709
|
+
});
|
710
|
+
|
711
|
+
// Converts iframe, video etc into placeholder images
|
712
|
+
editor.parser.addNodeFilter('iframe,video,audio,object,embed,script', function(nodes) {
|
713
|
+
var i = nodes.length, node, placeHolder, videoScript;
|
714
|
+
|
715
|
+
while (i--) {
|
716
|
+
node = nodes[i];
|
717
|
+
if (!node.parent) {
|
718
|
+
continue;
|
719
|
+
}
|
720
|
+
|
721
|
+
if (node.parent.attr('data-mce-object')) {
|
722
|
+
continue;
|
723
|
+
}
|
724
|
+
|
725
|
+
if (node.name == 'script') {
|
726
|
+
videoScript = getVideoScriptMatch(node.attr('src'));
|
727
|
+
if (!videoScript) {
|
728
|
+
continue;
|
729
|
+
}
|
730
|
+
}
|
731
|
+
|
732
|
+
if (videoScript) {
|
733
|
+
if (videoScript.width) {
|
734
|
+
node.attr('width', videoScript.width.toString());
|
735
|
+
}
|
736
|
+
|
737
|
+
if (videoScript.height) {
|
738
|
+
node.attr('height', videoScript.height.toString());
|
739
|
+
}
|
740
|
+
}
|
741
|
+
|
742
|
+
if (node.name == 'iframe' && editor.settings.media_live_embeds !== false && tinymce.Env.ceFalse) {
|
743
|
+
placeHolder = createPreviewNode(node);
|
744
|
+
} else {
|
745
|
+
placeHolder = createPlaceholderNode(node);
|
746
|
+
}
|
747
|
+
|
748
|
+
node.replace(placeHolder);
|
749
|
+
}
|
750
|
+
});
|
751
|
+
|
752
|
+
// Replaces placeholder images with real elements for video, object, iframe etc
|
753
|
+
editor.serializer.addAttributeFilter('data-mce-object', function(nodes, name) {
|
754
|
+
var i = nodes.length, node, realElm, ai, attribs, innerHtml, innerNode, realElmName, className;
|
755
|
+
|
756
|
+
while (i--) {
|
757
|
+
node = nodes[i];
|
758
|
+
if (!node.parent) {
|
759
|
+
continue;
|
760
|
+
}
|
761
|
+
|
762
|
+
realElmName = node.attr(name);
|
763
|
+
realElm = new tinymce.html.Node(realElmName, 1);
|
764
|
+
|
765
|
+
// Add width/height to everything but audio
|
766
|
+
if (realElmName != "audio" && realElmName != "script") {
|
767
|
+
className = node.attr('class');
|
768
|
+
if (className && className.indexOf('mce-preview-object') !== -1) {
|
769
|
+
realElm.attr({
|
770
|
+
width: node.firstChild.attr('width'),
|
771
|
+
height: node.firstChild.attr('height')
|
772
|
+
});
|
773
|
+
} else {
|
774
|
+
realElm.attr({
|
775
|
+
width: node.attr('width'),
|
776
|
+
height: node.attr('height')
|
777
|
+
});
|
778
|
+
}
|
779
|
+
}
|
780
|
+
|
781
|
+
realElm.attr({
|
782
|
+
style: node.attr('style')
|
783
|
+
});
|
784
|
+
|
785
|
+
// Unprefix all placeholder attributes
|
786
|
+
attribs = node.attributes;
|
787
|
+
ai = attribs.length;
|
788
|
+
while (ai--) {
|
789
|
+
var attrName = attribs[ai].name;
|
790
|
+
|
791
|
+
if (attrName.indexOf('data-mce-p-') === 0) {
|
792
|
+
realElm.attr(attrName.substr(11), attribs[ai].value);
|
793
|
+
}
|
794
|
+
}
|
795
|
+
|
796
|
+
if (realElmName == "script") {
|
797
|
+
realElm.attr('type', 'text/javascript');
|
798
|
+
}
|
799
|
+
|
800
|
+
// Inject innerhtml
|
801
|
+
innerHtml = node.attr('data-mce-html');
|
802
|
+
if (innerHtml) {
|
803
|
+
innerNode = new tinymce.html.Node('#text', 3);
|
804
|
+
innerNode.raw = true;
|
805
|
+
innerNode.value = sanitize(unescape(innerHtml));
|
806
|
+
realElm.append(innerNode);
|
807
|
+
}
|
808
|
+
|
809
|
+
node.replace(realElm);
|
810
|
+
}
|
811
|
+
});
|
812
|
+
});
|
813
|
+
|
814
|
+
editor.on('click keyup', function() {
|
815
|
+
var selectedNode = editor.selection.getNode();
|
816
|
+
|
817
|
+
if (selectedNode && editor.dom.hasClass(selectedNode, 'mce-preview-object')) {
|
818
|
+
if (editor.dom.getAttrib(selectedNode, 'data-mce-selected')) {
|
819
|
+
selectedNode.setAttribute('data-mce-selected', '2');
|
820
|
+
}
|
821
|
+
}
|
822
|
+
});
|
823
|
+
|
824
|
+
editor.on('ObjectSelected', function(e) {
|
825
|
+
var objectType = e.target.getAttribute('data-mce-object');
|
826
|
+
|
827
|
+
if (objectType == "audio" || objectType == "script") {
|
828
|
+
e.preventDefault();
|
829
|
+
}
|
830
|
+
});
|
831
|
+
|
832
|
+
editor.on('objectResized', function(e) {
|
833
|
+
var target = e.target, html;
|
834
|
+
|
835
|
+
if (target.getAttribute('data-mce-object')) {
|
836
|
+
html = target.getAttribute('data-mce-html');
|
837
|
+
if (html) {
|
838
|
+
html = unescape(html);
|
839
|
+
target.setAttribute('data-mce-html', escape(
|
840
|
+
updateHtml(html, {
|
841
|
+
width: e.width,
|
842
|
+
height: e.height
|
843
|
+
})
|
844
|
+
));
|
845
|
+
}
|
846
|
+
}
|
847
|
+
});
|
848
|
+
|
849
|
+
editor.addButton('media', {
|
850
|
+
tooltip: 'Insert/edit video',
|
851
|
+
onclick: showDialog,
|
852
|
+
stateSelector: ['img[data-mce-object]', 'span[data-mce-object]']
|
853
|
+
});
|
854
|
+
|
855
|
+
editor.addMenuItem('media', {
|
856
|
+
icon: 'media',
|
857
|
+
text: 'Insert/edit video',
|
858
|
+
onclick: showDialog,
|
859
|
+
context: 'insert',
|
860
|
+
prependToContext: true
|
861
|
+
});
|
862
|
+
|
863
|
+
editor.on('setContent', function() {
|
864
|
+
// TODO: This shouldn't be needed there should be a way to mark bogus
|
865
|
+
// elements so they are never removed except external save
|
866
|
+
editor.$('span.mce-preview-object').each(function(index, elm) {
|
867
|
+
var $elm = editor.$(elm);
|
868
|
+
|
869
|
+
if ($elm.find('span.mce-shim', elm).length === 0) {
|
870
|
+
$elm.append('<span class="mce-shim"></span>');
|
871
|
+
}
|
872
|
+
});
|
873
|
+
});
|
874
|
+
|
875
|
+
editor.addCommand('mceMedia', showDialog);
|
876
|
+
|
877
|
+
this.showDialog = showDialog;
|
878
|
+
});
|