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,268 @@
|
|
1
|
+
/**
|
2
|
+
* Entities.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 bitwise:false */
|
12
|
+
/*eslint no-bitwise:0 */
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Entity encoder class.
|
16
|
+
*
|
17
|
+
* @class tinymce.html.Entities
|
18
|
+
* @static
|
19
|
+
* @version 3.4
|
20
|
+
*/
|
21
|
+
define("tinymce/html/Entities", [
|
22
|
+
"tinymce/util/Tools"
|
23
|
+
], function(Tools) {
|
24
|
+
var makeMap = Tools.makeMap;
|
25
|
+
|
26
|
+
var namedEntities, baseEntities, reverseEntities,
|
27
|
+
attrsCharsRegExp = /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
|
28
|
+
textCharsRegExp = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
|
29
|
+
rawCharsRegExp = /[<>&\"\']/g,
|
30
|
+
entityRegExp = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi,
|
31
|
+
asciiMap = {
|
32
|
+
128: "\u20AC", 130: "\u201A", 131: "\u0192", 132: "\u201E", 133: "\u2026", 134: "\u2020",
|
33
|
+
135: "\u2021", 136: "\u02C6", 137: "\u2030", 138: "\u0160", 139: "\u2039", 140: "\u0152",
|
34
|
+
142: "\u017D", 145: "\u2018", 146: "\u2019", 147: "\u201C", 148: "\u201D", 149: "\u2022",
|
35
|
+
150: "\u2013", 151: "\u2014", 152: "\u02DC", 153: "\u2122", 154: "\u0161", 155: "\u203A",
|
36
|
+
156: "\u0153", 158: "\u017E", 159: "\u0178"
|
37
|
+
};
|
38
|
+
|
39
|
+
// Raw entities
|
40
|
+
baseEntities = {
|
41
|
+
'\"': '"', // Needs to be escaped since the YUI compressor would otherwise break the code
|
42
|
+
"'": ''',
|
43
|
+
'<': '<',
|
44
|
+
'>': '>',
|
45
|
+
'&': '&',
|
46
|
+
'\u0060': '`'
|
47
|
+
};
|
48
|
+
|
49
|
+
// Reverse lookup table for raw entities
|
50
|
+
reverseEntities = {
|
51
|
+
'<': '<',
|
52
|
+
'>': '>',
|
53
|
+
'&': '&',
|
54
|
+
'"': '"',
|
55
|
+
''': "'"
|
56
|
+
};
|
57
|
+
|
58
|
+
// Decodes text by using the browser
|
59
|
+
function nativeDecode(text) {
|
60
|
+
var elm;
|
61
|
+
|
62
|
+
elm = document.createElement("div");
|
63
|
+
elm.innerHTML = text;
|
64
|
+
|
65
|
+
return elm.textContent || elm.innerText || text;
|
66
|
+
}
|
67
|
+
|
68
|
+
// Build a two way lookup table for the entities
|
69
|
+
function buildEntitiesLookup(items, radix) {
|
70
|
+
var i, chr, entity, lookup = {};
|
71
|
+
|
72
|
+
if (items) {
|
73
|
+
items = items.split(',');
|
74
|
+
radix = radix || 10;
|
75
|
+
|
76
|
+
// Build entities lookup table
|
77
|
+
for (i = 0; i < items.length; i += 2) {
|
78
|
+
chr = String.fromCharCode(parseInt(items[i], radix));
|
79
|
+
|
80
|
+
// Only add non base entities
|
81
|
+
if (!baseEntities[chr]) {
|
82
|
+
entity = '&' + items[i + 1] + ';';
|
83
|
+
lookup[chr] = entity;
|
84
|
+
lookup[entity] = chr;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
return lookup;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
// Unpack entities lookup where the numbers are in radix 32 to reduce the size
|
93
|
+
namedEntities = buildEntitiesLookup(
|
94
|
+
'50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,' +
|
95
|
+
'5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,' +
|
96
|
+
'5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,' +
|
97
|
+
'5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,' +
|
98
|
+
'68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,' +
|
99
|
+
'6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,' +
|
100
|
+
'6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,' +
|
101
|
+
'75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,' +
|
102
|
+
'7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,' +
|
103
|
+
'7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,' +
|
104
|
+
'sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,' +
|
105
|
+
'st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,' +
|
106
|
+
't9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,' +
|
107
|
+
'tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,' +
|
108
|
+
'u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,' +
|
109
|
+
'81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,' +
|
110
|
+
'8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,' +
|
111
|
+
'8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,' +
|
112
|
+
'8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,' +
|
113
|
+
'8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,' +
|
114
|
+
'nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,' +
|
115
|
+
'rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,' +
|
116
|
+
'Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,' +
|
117
|
+
'80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,' +
|
118
|
+
'811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro', 32);
|
119
|
+
|
120
|
+
var Entities = {
|
121
|
+
/**
|
122
|
+
* Encodes the specified string using raw entities. This means only the required XML base entities will be encoded.
|
123
|
+
*
|
124
|
+
* @method encodeRaw
|
125
|
+
* @param {String} text Text to encode.
|
126
|
+
* @param {Boolean} attr Optional flag to specify if the text is attribute contents.
|
127
|
+
* @return {String} Entity encoded text.
|
128
|
+
*/
|
129
|
+
encodeRaw: function(text, attr) {
|
130
|
+
return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
|
131
|
+
return baseEntities[chr] || chr;
|
132
|
+
});
|
133
|
+
},
|
134
|
+
|
135
|
+
/**
|
136
|
+
* Encoded the specified text with both the attributes and text entities. This function will produce larger text contents
|
137
|
+
* since it doesn't know if the context is within a attribute or text node. This was added for compatibility
|
138
|
+
* and is exposed as the DOMUtils.encode function.
|
139
|
+
*
|
140
|
+
* @method encodeAllRaw
|
141
|
+
* @param {String} text Text to encode.
|
142
|
+
* @return {String} Entity encoded text.
|
143
|
+
*/
|
144
|
+
encodeAllRaw: function(text) {
|
145
|
+
return ('' + text).replace(rawCharsRegExp, function(chr) {
|
146
|
+
return baseEntities[chr] || chr;
|
147
|
+
});
|
148
|
+
},
|
149
|
+
|
150
|
+
/**
|
151
|
+
* Encodes the specified string using numeric entities. The core entities will be
|
152
|
+
* encoded as named ones but all non lower ascii characters will be encoded into numeric entities.
|
153
|
+
*
|
154
|
+
* @method encodeNumeric
|
155
|
+
* @param {String} text Text to encode.
|
156
|
+
* @param {Boolean} attr Optional flag to specify if the text is attribute contents.
|
157
|
+
* @return {String} Entity encoded text.
|
158
|
+
*/
|
159
|
+
encodeNumeric: function(text, attr) {
|
160
|
+
return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
|
161
|
+
// Multi byte sequence convert it to a single entity
|
162
|
+
if (chr.length > 1) {
|
163
|
+
return '&#' + (((chr.charCodeAt(0) - 0xD800) * 0x400) + (chr.charCodeAt(1) - 0xDC00) + 0x10000) + ';';
|
164
|
+
}
|
165
|
+
|
166
|
+
return baseEntities[chr] || '&#' + chr.charCodeAt(0) + ';';
|
167
|
+
});
|
168
|
+
},
|
169
|
+
|
170
|
+
/**
|
171
|
+
* Encodes the specified string using named entities. The core entities will be encoded
|
172
|
+
* as named ones but all non lower ascii characters will be encoded into named entities.
|
173
|
+
*
|
174
|
+
* @method encodeNamed
|
175
|
+
* @param {String} text Text to encode.
|
176
|
+
* @param {Boolean} attr Optional flag to specify if the text is attribute contents.
|
177
|
+
* @param {Object} entities Optional parameter with entities to use.
|
178
|
+
* @return {String} Entity encoded text.
|
179
|
+
*/
|
180
|
+
encodeNamed: function(text, attr, entities) {
|
181
|
+
entities = entities || namedEntities;
|
182
|
+
|
183
|
+
return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
|
184
|
+
return baseEntities[chr] || entities[chr] || chr;
|
185
|
+
});
|
186
|
+
},
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Returns an encode function based on the name(s) and it's optional entities.
|
190
|
+
*
|
191
|
+
* @method getEncodeFunc
|
192
|
+
* @param {String} name Comma separated list of encoders for example named,numeric.
|
193
|
+
* @param {String} entities Optional parameter with entities to use instead of the built in set.
|
194
|
+
* @return {function} Encode function to be used.
|
195
|
+
*/
|
196
|
+
getEncodeFunc: function(name, entities) {
|
197
|
+
entities = buildEntitiesLookup(entities) || namedEntities;
|
198
|
+
|
199
|
+
function encodeNamedAndNumeric(text, attr) {
|
200
|
+
return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
|
201
|
+
return baseEntities[chr] || entities[chr] || '&#' + chr.charCodeAt(0) + ';' || chr;
|
202
|
+
});
|
203
|
+
}
|
204
|
+
|
205
|
+
function encodeCustomNamed(text, attr) {
|
206
|
+
return Entities.encodeNamed(text, attr, entities);
|
207
|
+
}
|
208
|
+
|
209
|
+
// Replace + with , to be compatible with previous TinyMCE versions
|
210
|
+
name = makeMap(name.replace(/\+/g, ','));
|
211
|
+
|
212
|
+
// Named and numeric encoder
|
213
|
+
if (name.named && name.numeric) {
|
214
|
+
return encodeNamedAndNumeric;
|
215
|
+
}
|
216
|
+
|
217
|
+
// Named encoder
|
218
|
+
if (name.named) {
|
219
|
+
// Custom names
|
220
|
+
if (entities) {
|
221
|
+
return encodeCustomNamed;
|
222
|
+
}
|
223
|
+
|
224
|
+
return Entities.encodeNamed;
|
225
|
+
}
|
226
|
+
|
227
|
+
// Numeric
|
228
|
+
if (name.numeric) {
|
229
|
+
return Entities.encodeNumeric;
|
230
|
+
}
|
231
|
+
|
232
|
+
// Raw encoder
|
233
|
+
return Entities.encodeRaw;
|
234
|
+
},
|
235
|
+
|
236
|
+
/**
|
237
|
+
* Decodes the specified string, this will replace entities with raw UTF characters.
|
238
|
+
*
|
239
|
+
* @method decode
|
240
|
+
* @param {String} text Text to entity decode.
|
241
|
+
* @return {String} Entity decoded string.
|
242
|
+
*/
|
243
|
+
decode: function(text) {
|
244
|
+
return text.replace(entityRegExp, function(all, numeric) {
|
245
|
+
if (numeric) {
|
246
|
+
if (numeric.charAt(0).toLowerCase() === 'x') {
|
247
|
+
numeric = parseInt(numeric.substr(1), 16);
|
248
|
+
} else {
|
249
|
+
numeric = parseInt(numeric, 10);
|
250
|
+
}
|
251
|
+
|
252
|
+
// Support upper UTF
|
253
|
+
if (numeric > 0xFFFF) {
|
254
|
+
numeric -= 0x10000;
|
255
|
+
|
256
|
+
return String.fromCharCode(0xD800 + (numeric >> 10), 0xDC00 + (numeric & 0x3FF));
|
257
|
+
}
|
258
|
+
|
259
|
+
return asciiMap[numeric] || String.fromCharCode(numeric);
|
260
|
+
}
|
261
|
+
|
262
|
+
return reverseEntities[all] || namedEntities[all] || nativeDecode(all);
|
263
|
+
});
|
264
|
+
}
|
265
|
+
};
|
266
|
+
|
267
|
+
return Entities;
|
268
|
+
});
|
@@ -0,0 +1,496 @@
|
|
1
|
+
/**
|
2
|
+
* Node.js
|
3
|
+
*
|
4
|
+
* Released under LGPL License.
|
5
|
+
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
6
|
+
*
|
7
|
+
* License: http://www.tinymce.com/license
|
8
|
+
* Contributing: http://www.tinymce.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
/**
|
12
|
+
* This class is a minimalistic implementation of a DOM like node used by the DomParser class.
|
13
|
+
*
|
14
|
+
* @example
|
15
|
+
* var node = new tinymce.html.Node('strong', 1);
|
16
|
+
* someRoot.append(node);
|
17
|
+
*
|
18
|
+
* @class tinymce.html.Node
|
19
|
+
* @version 3.4
|
20
|
+
*/
|
21
|
+
define("tinymce/html/Node", [], function() {
|
22
|
+
var whiteSpaceRegExp = /^[ \t\r\n]*$/, typeLookup = {
|
23
|
+
'#text': 3,
|
24
|
+
'#comment': 8,
|
25
|
+
'#cdata': 4,
|
26
|
+
'#pi': 7,
|
27
|
+
'#doctype': 10,
|
28
|
+
'#document-fragment': 11
|
29
|
+
};
|
30
|
+
|
31
|
+
// Walks the tree left/right
|
32
|
+
function walk(node, root_node, prev) {
|
33
|
+
var sibling, parent, startName = prev ? 'lastChild' : 'firstChild', siblingName = prev ? 'prev' : 'next';
|
34
|
+
|
35
|
+
// Walk into nodes if it has a start
|
36
|
+
if (node[startName]) {
|
37
|
+
return node[startName];
|
38
|
+
}
|
39
|
+
|
40
|
+
// Return the sibling if it has one
|
41
|
+
if (node !== root_node) {
|
42
|
+
sibling = node[siblingName];
|
43
|
+
|
44
|
+
if (sibling) {
|
45
|
+
return sibling;
|
46
|
+
}
|
47
|
+
|
48
|
+
// Walk up the parents to look for siblings
|
49
|
+
for (parent = node.parent; parent && parent !== root_node; parent = parent.parent) {
|
50
|
+
sibling = parent[siblingName];
|
51
|
+
|
52
|
+
if (sibling) {
|
53
|
+
return sibling;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
/**
|
60
|
+
* Constructs a new Node instance.
|
61
|
+
*
|
62
|
+
* @constructor
|
63
|
+
* @method Node
|
64
|
+
* @param {String} name Name of the node type.
|
65
|
+
* @param {Number} type Numeric type representing the node.
|
66
|
+
*/
|
67
|
+
function Node(name, type) {
|
68
|
+
this.name = name;
|
69
|
+
this.type = type;
|
70
|
+
|
71
|
+
if (type === 1) {
|
72
|
+
this.attributes = [];
|
73
|
+
this.attributes.map = {};
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
Node.prototype = {
|
78
|
+
/**
|
79
|
+
* Replaces the current node with the specified one.
|
80
|
+
*
|
81
|
+
* @example
|
82
|
+
* someNode.replace(someNewNode);
|
83
|
+
*
|
84
|
+
* @method replace
|
85
|
+
* @param {tinymce.html.Node} node Node to replace the current node with.
|
86
|
+
* @return {tinymce.html.Node} The old node that got replaced.
|
87
|
+
*/
|
88
|
+
replace: function(node) {
|
89
|
+
var self = this;
|
90
|
+
|
91
|
+
if (node.parent) {
|
92
|
+
node.remove();
|
93
|
+
}
|
94
|
+
|
95
|
+
self.insert(node, self);
|
96
|
+
self.remove();
|
97
|
+
|
98
|
+
return self;
|
99
|
+
},
|
100
|
+
|
101
|
+
/**
|
102
|
+
* Gets/sets or removes an attribute by name.
|
103
|
+
*
|
104
|
+
* @example
|
105
|
+
* someNode.attr("name", "value"); // Sets an attribute
|
106
|
+
* console.log(someNode.attr("name")); // Gets an attribute
|
107
|
+
* someNode.attr("name", null); // Removes an attribute
|
108
|
+
*
|
109
|
+
* @method attr
|
110
|
+
* @param {String} name Attribute name to set or get.
|
111
|
+
* @param {String} value Optional value to set.
|
112
|
+
* @return {String/tinymce.html.Node} String or undefined on a get operation or the current node on a set operation.
|
113
|
+
*/
|
114
|
+
attr: function(name, value) {
|
115
|
+
var self = this, attrs, i, undef;
|
116
|
+
|
117
|
+
if (typeof name !== "string") {
|
118
|
+
for (i in name) {
|
119
|
+
self.attr(i, name[i]);
|
120
|
+
}
|
121
|
+
|
122
|
+
return self;
|
123
|
+
}
|
124
|
+
|
125
|
+
if ((attrs = self.attributes)) {
|
126
|
+
if (value !== undef) {
|
127
|
+
// Remove attribute
|
128
|
+
if (value === null) {
|
129
|
+
if (name in attrs.map) {
|
130
|
+
delete attrs.map[name];
|
131
|
+
|
132
|
+
i = attrs.length;
|
133
|
+
while (i--) {
|
134
|
+
if (attrs[i].name === name) {
|
135
|
+
attrs = attrs.splice(i, 1);
|
136
|
+
return self;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
return self;
|
142
|
+
}
|
143
|
+
|
144
|
+
// Set attribute
|
145
|
+
if (name in attrs.map) {
|
146
|
+
// Set attribute
|
147
|
+
i = attrs.length;
|
148
|
+
while (i--) {
|
149
|
+
if (attrs[i].name === name) {
|
150
|
+
attrs[i].value = value;
|
151
|
+
break;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
} else {
|
155
|
+
attrs.push({name: name, value: value});
|
156
|
+
}
|
157
|
+
|
158
|
+
attrs.map[name] = value;
|
159
|
+
|
160
|
+
return self;
|
161
|
+
}
|
162
|
+
|
163
|
+
return attrs.map[name];
|
164
|
+
}
|
165
|
+
},
|
166
|
+
|
167
|
+
/**
|
168
|
+
* Does a shallow clones the node into a new node. It will also exclude id attributes since
|
169
|
+
* there should only be one id per document.
|
170
|
+
*
|
171
|
+
* @example
|
172
|
+
* var clonedNode = node.clone();
|
173
|
+
*
|
174
|
+
* @method clone
|
175
|
+
* @return {tinymce.html.Node} New copy of the original node.
|
176
|
+
*/
|
177
|
+
clone: function() {
|
178
|
+
var self = this, clone = new Node(self.name, self.type), i, l, selfAttrs, selfAttr, cloneAttrs;
|
179
|
+
|
180
|
+
// Clone element attributes
|
181
|
+
if ((selfAttrs = self.attributes)) {
|
182
|
+
cloneAttrs = [];
|
183
|
+
cloneAttrs.map = {};
|
184
|
+
|
185
|
+
for (i = 0, l = selfAttrs.length; i < l; i++) {
|
186
|
+
selfAttr = selfAttrs[i];
|
187
|
+
|
188
|
+
// Clone everything except id
|
189
|
+
if (selfAttr.name !== 'id') {
|
190
|
+
cloneAttrs[cloneAttrs.length] = {name: selfAttr.name, value: selfAttr.value};
|
191
|
+
cloneAttrs.map[selfAttr.name] = selfAttr.value;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
clone.attributes = cloneAttrs;
|
196
|
+
}
|
197
|
+
|
198
|
+
clone.value = self.value;
|
199
|
+
clone.shortEnded = self.shortEnded;
|
200
|
+
|
201
|
+
return clone;
|
202
|
+
},
|
203
|
+
|
204
|
+
/**
|
205
|
+
* Wraps the node in in another node.
|
206
|
+
*
|
207
|
+
* @example
|
208
|
+
* node.wrap(wrapperNode);
|
209
|
+
*
|
210
|
+
* @method wrap
|
211
|
+
*/
|
212
|
+
wrap: function(wrapper) {
|
213
|
+
var self = this;
|
214
|
+
|
215
|
+
self.parent.insert(wrapper, self);
|
216
|
+
wrapper.append(self);
|
217
|
+
|
218
|
+
return self;
|
219
|
+
},
|
220
|
+
|
221
|
+
/**
|
222
|
+
* Unwraps the node in other words it removes the node but keeps the children.
|
223
|
+
*
|
224
|
+
* @example
|
225
|
+
* node.unwrap();
|
226
|
+
*
|
227
|
+
* @method unwrap
|
228
|
+
*/
|
229
|
+
unwrap: function() {
|
230
|
+
var self = this, node, next;
|
231
|
+
|
232
|
+
for (node = self.firstChild; node;) {
|
233
|
+
next = node.next;
|
234
|
+
self.insert(node, self, true);
|
235
|
+
node = next;
|
236
|
+
}
|
237
|
+
|
238
|
+
self.remove();
|
239
|
+
},
|
240
|
+
|
241
|
+
/**
|
242
|
+
* Removes the node from it's parent.
|
243
|
+
*
|
244
|
+
* @example
|
245
|
+
* node.remove();
|
246
|
+
*
|
247
|
+
* @method remove
|
248
|
+
* @return {tinymce.html.Node} Current node that got removed.
|
249
|
+
*/
|
250
|
+
remove: function() {
|
251
|
+
var self = this, parent = self.parent, next = self.next, prev = self.prev;
|
252
|
+
|
253
|
+
if (parent) {
|
254
|
+
if (parent.firstChild === self) {
|
255
|
+
parent.firstChild = next;
|
256
|
+
|
257
|
+
if (next) {
|
258
|
+
next.prev = null;
|
259
|
+
}
|
260
|
+
} else {
|
261
|
+
prev.next = next;
|
262
|
+
}
|
263
|
+
|
264
|
+
if (parent.lastChild === self) {
|
265
|
+
parent.lastChild = prev;
|
266
|
+
|
267
|
+
if (prev) {
|
268
|
+
prev.next = null;
|
269
|
+
}
|
270
|
+
} else {
|
271
|
+
next.prev = prev;
|
272
|
+
}
|
273
|
+
|
274
|
+
self.parent = self.next = self.prev = null;
|
275
|
+
}
|
276
|
+
|
277
|
+
return self;
|
278
|
+
},
|
279
|
+
|
280
|
+
/**
|
281
|
+
* Appends a new node as a child of the current node.
|
282
|
+
*
|
283
|
+
* @example
|
284
|
+
* node.append(someNode);
|
285
|
+
*
|
286
|
+
* @method append
|
287
|
+
* @param {tinymce.html.Node} node Node to append as a child of the current one.
|
288
|
+
* @return {tinymce.html.Node} The node that got appended.
|
289
|
+
*/
|
290
|
+
append: function(node) {
|
291
|
+
var self = this, last;
|
292
|
+
|
293
|
+
if (node.parent) {
|
294
|
+
node.remove();
|
295
|
+
}
|
296
|
+
|
297
|
+
last = self.lastChild;
|
298
|
+
if (last) {
|
299
|
+
last.next = node;
|
300
|
+
node.prev = last;
|
301
|
+
self.lastChild = node;
|
302
|
+
} else {
|
303
|
+
self.lastChild = self.firstChild = node;
|
304
|
+
}
|
305
|
+
|
306
|
+
node.parent = self;
|
307
|
+
|
308
|
+
return node;
|
309
|
+
},
|
310
|
+
|
311
|
+
/**
|
312
|
+
* Inserts a node at a specific position as a child of the current node.
|
313
|
+
*
|
314
|
+
* @example
|
315
|
+
* parentNode.insert(newChildNode, oldChildNode);
|
316
|
+
*
|
317
|
+
* @method insert
|
318
|
+
* @param {tinymce.html.Node} node Node to insert as a child of the current node.
|
319
|
+
* @param {tinymce.html.Node} ref_node Reference node to set node before/after.
|
320
|
+
* @param {Boolean} before Optional state to insert the node before the reference node.
|
321
|
+
* @return {tinymce.html.Node} The node that got inserted.
|
322
|
+
*/
|
323
|
+
insert: function(node, ref_node, before) {
|
324
|
+
var parent;
|
325
|
+
|
326
|
+
if (node.parent) {
|
327
|
+
node.remove();
|
328
|
+
}
|
329
|
+
|
330
|
+
parent = ref_node.parent || this;
|
331
|
+
|
332
|
+
if (before) {
|
333
|
+
if (ref_node === parent.firstChild) {
|
334
|
+
parent.firstChild = node;
|
335
|
+
} else {
|
336
|
+
ref_node.prev.next = node;
|
337
|
+
}
|
338
|
+
|
339
|
+
node.prev = ref_node.prev;
|
340
|
+
node.next = ref_node;
|
341
|
+
ref_node.prev = node;
|
342
|
+
} else {
|
343
|
+
if (ref_node === parent.lastChild) {
|
344
|
+
parent.lastChild = node;
|
345
|
+
} else {
|
346
|
+
ref_node.next.prev = node;
|
347
|
+
}
|
348
|
+
|
349
|
+
node.next = ref_node.next;
|
350
|
+
node.prev = ref_node;
|
351
|
+
ref_node.next = node;
|
352
|
+
}
|
353
|
+
|
354
|
+
node.parent = parent;
|
355
|
+
|
356
|
+
return node;
|
357
|
+
},
|
358
|
+
|
359
|
+
/**
|
360
|
+
* Get all children by name.
|
361
|
+
*
|
362
|
+
* @method getAll
|
363
|
+
* @param {String} name Name of the child nodes to collect.
|
364
|
+
* @return {Array} Array with child nodes matchin the specified name.
|
365
|
+
*/
|
366
|
+
getAll: function(name) {
|
367
|
+
var self = this, node, collection = [];
|
368
|
+
|
369
|
+
for (node = self.firstChild; node; node = walk(node, self)) {
|
370
|
+
if (node.name === name) {
|
371
|
+
collection.push(node);
|
372
|
+
}
|
373
|
+
}
|
374
|
+
|
375
|
+
return collection;
|
376
|
+
},
|
377
|
+
|
378
|
+
/**
|
379
|
+
* Removes all children of the current node.
|
380
|
+
*
|
381
|
+
* @method empty
|
382
|
+
* @return {tinymce.html.Node} The current node that got cleared.
|
383
|
+
*/
|
384
|
+
empty: function() {
|
385
|
+
var self = this, nodes, i, node;
|
386
|
+
|
387
|
+
// Remove all children
|
388
|
+
if (self.firstChild) {
|
389
|
+
nodes = [];
|
390
|
+
|
391
|
+
// Collect the children
|
392
|
+
for (node = self.firstChild; node; node = walk(node, self)) {
|
393
|
+
nodes.push(node);
|
394
|
+
}
|
395
|
+
|
396
|
+
// Remove the children
|
397
|
+
i = nodes.length;
|
398
|
+
while (i--) {
|
399
|
+
node = nodes[i];
|
400
|
+
node.parent = node.firstChild = node.lastChild = node.next = node.prev = null;
|
401
|
+
}
|
402
|
+
}
|
403
|
+
|
404
|
+
self.firstChild = self.lastChild = null;
|
405
|
+
|
406
|
+
return self;
|
407
|
+
},
|
408
|
+
|
409
|
+
/**
|
410
|
+
* Returns true/false if the node is to be considered empty or not.
|
411
|
+
*
|
412
|
+
* @example
|
413
|
+
* node.isEmpty({img: true});
|
414
|
+
* @method isEmpty
|
415
|
+
* @param {Object} elements Name/value object with elements that are automatically treated as non empty elements.
|
416
|
+
* @return {Boolean} true/false if the node is empty or not.
|
417
|
+
*/
|
418
|
+
isEmpty: function(elements) {
|
419
|
+
var self = this, node = self.firstChild, i, name;
|
420
|
+
|
421
|
+
if (node) {
|
422
|
+
do {
|
423
|
+
if (node.type === 1) {
|
424
|
+
// Ignore bogus elements
|
425
|
+
if (node.attributes.map['data-mce-bogus']) {
|
426
|
+
continue;
|
427
|
+
}
|
428
|
+
|
429
|
+
// Keep empty elements like <img />
|
430
|
+
if (elements[node.name]) {
|
431
|
+
return false;
|
432
|
+
}
|
433
|
+
|
434
|
+
// Keep bookmark nodes and name attribute like <a name="1"></a>
|
435
|
+
i = node.attributes.length;
|
436
|
+
while (i--) {
|
437
|
+
name = node.attributes[i].name;
|
438
|
+
if (name === "name" || name.indexOf('data-mce-bookmark') === 0) {
|
439
|
+
return false;
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
|
444
|
+
// Keep comments
|
445
|
+
if (node.type === 8) {
|
446
|
+
return false;
|
447
|
+
}
|
448
|
+
|
449
|
+
// Keep non whitespace text nodes
|
450
|
+
if ((node.type === 3 && !whiteSpaceRegExp.test(node.value))) {
|
451
|
+
return false;
|
452
|
+
}
|
453
|
+
} while ((node = walk(node, self)));
|
454
|
+
}
|
455
|
+
|
456
|
+
return true;
|
457
|
+
},
|
458
|
+
|
459
|
+
/**
|
460
|
+
* Walks to the next or previous node and returns that node or null if it wasn't found.
|
461
|
+
*
|
462
|
+
* @method walk
|
463
|
+
* @param {Boolean} prev Optional previous node state defaults to false.
|
464
|
+
* @return {tinymce.html.Node} Node that is next to or previous of the current node.
|
465
|
+
*/
|
466
|
+
walk: function(prev) {
|
467
|
+
return walk(this, null, prev);
|
468
|
+
}
|
469
|
+
};
|
470
|
+
|
471
|
+
/**
|
472
|
+
* Creates a node of a specific type.
|
473
|
+
*
|
474
|
+
* @static
|
475
|
+
* @method create
|
476
|
+
* @param {String} name Name of the node type to create for example "b" or "#text".
|
477
|
+
* @param {Object} attrs Name/value collection of attributes that will be applied to elements.
|
478
|
+
*/
|
479
|
+
Node.create = function(name, attrs) {
|
480
|
+
var node, attrName;
|
481
|
+
|
482
|
+
// Create node
|
483
|
+
node = new Node(name, typeLookup[name] || 1);
|
484
|
+
|
485
|
+
// Add attributes if needed
|
486
|
+
if (attrs) {
|
487
|
+
for (attrName in attrs) {
|
488
|
+
node.attr(attrName, attrs[attrName]);
|
489
|
+
}
|
490
|
+
}
|
491
|
+
|
492
|
+
return node;
|
493
|
+
};
|
494
|
+
|
495
|
+
return Node;
|
496
|
+
});
|