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,68 @@
|
|
1
|
+
/**
|
2
|
+
* Resizable.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
|
+
* Resizable mixin. Enables controls to be resized.
|
13
|
+
*
|
14
|
+
* @mixin tinymce.ui.Resizable
|
15
|
+
*/
|
16
|
+
define("tinymce/ui/Resizable", [
|
17
|
+
"tinymce/ui/DomUtils"
|
18
|
+
], function(DomUtils) {
|
19
|
+
"use strict";
|
20
|
+
|
21
|
+
return {
|
22
|
+
/**
|
23
|
+
* Resizes the control to contents.
|
24
|
+
*
|
25
|
+
* @method resizeToContent
|
26
|
+
*/
|
27
|
+
resizeToContent: function() {
|
28
|
+
this._layoutRect.autoResize = true;
|
29
|
+
this._lastRect = null;
|
30
|
+
this.reflow();
|
31
|
+
},
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Resizes the control to a specific width/height.
|
35
|
+
*
|
36
|
+
* @method resizeTo
|
37
|
+
* @param {Number} w Control width.
|
38
|
+
* @param {Number} h Control height.
|
39
|
+
* @return {tinymce.ui.Control} Current control instance.
|
40
|
+
*/
|
41
|
+
resizeTo: function(w, h) {
|
42
|
+
// TODO: Fix hack
|
43
|
+
if (w <= 1 || h <= 1) {
|
44
|
+
var rect = DomUtils.getWindowSize();
|
45
|
+
|
46
|
+
w = w <= 1 ? w * rect.w : w;
|
47
|
+
h = h <= 1 ? h * rect.h : h;
|
48
|
+
}
|
49
|
+
|
50
|
+
this._layoutRect.autoResize = false;
|
51
|
+
return this.layoutRect({minW: w, minH: h, w: w, h: h}).reflow();
|
52
|
+
},
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Resizes the control to a specific relative width/height.
|
56
|
+
*
|
57
|
+
* @method resizeBy
|
58
|
+
* @param {Number} dw Relative control width.
|
59
|
+
* @param {Number} dh Relative control height.
|
60
|
+
* @return {tinymce.ui.Control} Current control instance.
|
61
|
+
*/
|
62
|
+
resizeBy: function(dw, dh) {
|
63
|
+
var self = this, rect = self.layoutRect();
|
64
|
+
|
65
|
+
return self.resizeTo(rect.w + dw, rect.h + dh);
|
66
|
+
}
|
67
|
+
};
|
68
|
+
});
|
@@ -0,0 +1,86 @@
|
|
1
|
+
/**
|
2
|
+
* ResizeHandle.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
|
+
* Renders a resize handle that fires ResizeStart, Resize and ResizeEnd events.
|
13
|
+
*
|
14
|
+
* @-x-less ResizeHandle.less
|
15
|
+
* @class tinymce.ui.ResizeHandle
|
16
|
+
* @extends tinymce.ui.Widget
|
17
|
+
*/
|
18
|
+
define("tinymce/ui/ResizeHandle", [
|
19
|
+
"tinymce/ui/Widget",
|
20
|
+
"tinymce/ui/DragHelper"
|
21
|
+
], function(Widget, DragHelper) {
|
22
|
+
"use strict";
|
23
|
+
|
24
|
+
return Widget.extend({
|
25
|
+
/**
|
26
|
+
* Renders the control as a HTML string.
|
27
|
+
*
|
28
|
+
* @method renderHtml
|
29
|
+
* @return {String} HTML representing the control.
|
30
|
+
*/
|
31
|
+
renderHtml: function() {
|
32
|
+
var self = this, prefix = self.classPrefix;
|
33
|
+
|
34
|
+
self.classes.add('resizehandle');
|
35
|
+
|
36
|
+
if (self.settings.direction == "both") {
|
37
|
+
self.classes.add('resizehandle-both');
|
38
|
+
}
|
39
|
+
|
40
|
+
self.canFocus = false;
|
41
|
+
|
42
|
+
return (
|
43
|
+
'<div id="' + self._id + '" class="' + self.classes + '">' +
|
44
|
+
'<i class="' + prefix + 'ico ' + prefix + 'i-resize"></i>' +
|
45
|
+
'</div>'
|
46
|
+
);
|
47
|
+
},
|
48
|
+
|
49
|
+
/**
|
50
|
+
* Called after the control has been rendered.
|
51
|
+
*
|
52
|
+
* @method postRender
|
53
|
+
*/
|
54
|
+
postRender: function() {
|
55
|
+
var self = this;
|
56
|
+
|
57
|
+
self._super();
|
58
|
+
|
59
|
+
self.resizeDragHelper = new DragHelper(this._id, {
|
60
|
+
start: function() {
|
61
|
+
self.fire('ResizeStart');
|
62
|
+
},
|
63
|
+
|
64
|
+
drag: function(e) {
|
65
|
+
if (self.settings.direction != "both") {
|
66
|
+
e.deltaX = 0;
|
67
|
+
}
|
68
|
+
|
69
|
+
self.fire('Resize', e);
|
70
|
+
},
|
71
|
+
|
72
|
+
stop: function() {
|
73
|
+
self.fire('ResizeEnd');
|
74
|
+
}
|
75
|
+
});
|
76
|
+
},
|
77
|
+
|
78
|
+
remove: function() {
|
79
|
+
if (this.resizeDragHelper) {
|
80
|
+
this.resizeDragHelper.destroy();
|
81
|
+
}
|
82
|
+
|
83
|
+
return this._super();
|
84
|
+
}
|
85
|
+
});
|
86
|
+
});
|
@@ -0,0 +1,141 @@
|
|
1
|
+
/**
|
2
|
+
* Scrollable.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 mixin makes controls scrollable using custom scrollbars.
|
13
|
+
*
|
14
|
+
* @-x-less Scrollable.less
|
15
|
+
* @mixin tinymce.ui.Scrollable
|
16
|
+
*/
|
17
|
+
define("tinymce/ui/Scrollable", [
|
18
|
+
"tinymce/dom/DomQuery",
|
19
|
+
"tinymce/ui/DragHelper"
|
20
|
+
], function($, DragHelper) {
|
21
|
+
"use strict";
|
22
|
+
|
23
|
+
return {
|
24
|
+
init: function() {
|
25
|
+
var self = this;
|
26
|
+
self.on('repaint', self.renderScroll);
|
27
|
+
},
|
28
|
+
|
29
|
+
renderScroll: function() {
|
30
|
+
var self = this, margin = 2;
|
31
|
+
|
32
|
+
function repaintScroll() {
|
33
|
+
var hasScrollH, hasScrollV, bodyElm;
|
34
|
+
|
35
|
+
function repaintAxis(axisName, posName, sizeName, contentSizeName, hasScroll, ax) {
|
36
|
+
var containerElm, scrollBarElm, scrollThumbElm;
|
37
|
+
var containerSize, scrollSize, ratio, rect;
|
38
|
+
var posNameLower, sizeNameLower;
|
39
|
+
|
40
|
+
scrollBarElm = self.getEl('scroll' + axisName);
|
41
|
+
if (scrollBarElm) {
|
42
|
+
posNameLower = posName.toLowerCase();
|
43
|
+
sizeNameLower = sizeName.toLowerCase();
|
44
|
+
|
45
|
+
$(self.getEl('absend')).css(posNameLower, self.layoutRect()[contentSizeName] - 1);
|
46
|
+
|
47
|
+
if (!hasScroll) {
|
48
|
+
$(scrollBarElm).css('display', 'none');
|
49
|
+
return;
|
50
|
+
}
|
51
|
+
|
52
|
+
$(scrollBarElm).css('display', 'block');
|
53
|
+
containerElm = self.getEl('body');
|
54
|
+
scrollThumbElm = self.getEl('scroll' + axisName + "t");
|
55
|
+
containerSize = containerElm["client" + sizeName] - (margin * 2);
|
56
|
+
containerSize -= hasScrollH && hasScrollV ? scrollBarElm["client" + ax] : 0;
|
57
|
+
scrollSize = containerElm["scroll" + sizeName];
|
58
|
+
ratio = containerSize / scrollSize;
|
59
|
+
|
60
|
+
rect = {};
|
61
|
+
rect[posNameLower] = containerElm["offset" + posName] + margin;
|
62
|
+
rect[sizeNameLower] = containerSize;
|
63
|
+
$(scrollBarElm).css(rect);
|
64
|
+
|
65
|
+
rect = {};
|
66
|
+
rect[posNameLower] = containerElm["scroll" + posName] * ratio;
|
67
|
+
rect[sizeNameLower] = containerSize * ratio;
|
68
|
+
$(scrollThumbElm).css(rect);
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
bodyElm = self.getEl('body');
|
73
|
+
hasScrollH = bodyElm.scrollWidth > bodyElm.clientWidth;
|
74
|
+
hasScrollV = bodyElm.scrollHeight > bodyElm.clientHeight;
|
75
|
+
|
76
|
+
repaintAxis("h", "Left", "Width", "contentW", hasScrollH, "Height");
|
77
|
+
repaintAxis("v", "Top", "Height", "contentH", hasScrollV, "Width");
|
78
|
+
}
|
79
|
+
|
80
|
+
function addScroll() {
|
81
|
+
function addScrollAxis(axisName, posName, sizeName, deltaPosName, ax) {
|
82
|
+
var scrollStart, axisId = self._id + '-scroll' + axisName, prefix = self.classPrefix;
|
83
|
+
|
84
|
+
$(self.getEl()).append(
|
85
|
+
'<div id="' + axisId + '" class="' + prefix + 'scrollbar ' + prefix + 'scrollbar-' + axisName + '">' +
|
86
|
+
'<div id="' + axisId + 't" class="' + prefix + 'scrollbar-thumb"></div>' +
|
87
|
+
'</div>'
|
88
|
+
);
|
89
|
+
|
90
|
+
self.draghelper = new DragHelper(axisId + 't', {
|
91
|
+
start: function() {
|
92
|
+
scrollStart = self.getEl('body')["scroll" + posName];
|
93
|
+
$('#' + axisId).addClass(prefix + 'active');
|
94
|
+
},
|
95
|
+
|
96
|
+
drag: function(e) {
|
97
|
+
var ratio, hasScrollH, hasScrollV, containerSize, layoutRect = self.layoutRect();
|
98
|
+
|
99
|
+
hasScrollH = layoutRect.contentW > layoutRect.innerW;
|
100
|
+
hasScrollV = layoutRect.contentH > layoutRect.innerH;
|
101
|
+
containerSize = self.getEl('body')["client" + sizeName] - (margin * 2);
|
102
|
+
containerSize -= hasScrollH && hasScrollV ? self.getEl('scroll' + axisName)["client" + ax] : 0;
|
103
|
+
|
104
|
+
ratio = containerSize / self.getEl('body')["scroll" + sizeName];
|
105
|
+
self.getEl('body')["scroll" + posName] = scrollStart + (e["delta" + deltaPosName] / ratio);
|
106
|
+
},
|
107
|
+
|
108
|
+
stop: function() {
|
109
|
+
$('#' + axisId).removeClass(prefix + 'active');
|
110
|
+
}
|
111
|
+
});
|
112
|
+
}
|
113
|
+
|
114
|
+
self.classes.add('scroll');
|
115
|
+
|
116
|
+
addScrollAxis("v", "Top", "Height", "Y", "Width");
|
117
|
+
addScrollAxis("h", "Left", "Width", "X", "Height");
|
118
|
+
}
|
119
|
+
|
120
|
+
if (self.settings.autoScroll) {
|
121
|
+
if (!self._hasScroll) {
|
122
|
+
self._hasScroll = true;
|
123
|
+
addScroll();
|
124
|
+
|
125
|
+
self.on('wheel', function(e) {
|
126
|
+
var bodyEl = self.getEl('body');
|
127
|
+
|
128
|
+
bodyEl.scrollLeft += (e.deltaX || 0) * 10;
|
129
|
+
bodyEl.scrollTop += e.deltaY * 10;
|
130
|
+
|
131
|
+
repaintScroll();
|
132
|
+
});
|
133
|
+
|
134
|
+
$(self.getEl('body')).on("scroll", repaintScroll);
|
135
|
+
}
|
136
|
+
|
137
|
+
repaintScroll();
|
138
|
+
}
|
139
|
+
}
|
140
|
+
};
|
141
|
+
});
|
@@ -0,0 +1,106 @@
|
|
1
|
+
/**
|
2
|
+
* SelectBox.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
|
+
* Creates a new select box control.
|
13
|
+
*
|
14
|
+
* @-x-less SelectBox.less
|
15
|
+
* @class tinymce.ui.SelectBox
|
16
|
+
* @extends tinymce.ui.Widget
|
17
|
+
*/
|
18
|
+
define("tinymce/ui/SelectBox", [
|
19
|
+
"tinymce/ui/Widget"
|
20
|
+
], function(Widget) {
|
21
|
+
"use strict";
|
22
|
+
|
23
|
+
function createOptions(options) {
|
24
|
+
var strOptions = '';
|
25
|
+
if (options) {
|
26
|
+
for (var i = 0; i < options.length; i++) {
|
27
|
+
strOptions += '<option value="' + options[i] + '">' + options[i] + '</option>';
|
28
|
+
}
|
29
|
+
}
|
30
|
+
return strOptions;
|
31
|
+
}
|
32
|
+
|
33
|
+
return Widget.extend({
|
34
|
+
Defaults: {
|
35
|
+
classes: "selectbox",
|
36
|
+
role: "selectbox",
|
37
|
+
options: []
|
38
|
+
},
|
39
|
+
/**
|
40
|
+
* Constructs a instance with the specified settings.
|
41
|
+
*
|
42
|
+
* @constructor
|
43
|
+
* @param {Object} settings Name/value object with settings.
|
44
|
+
* @setting {Array} values Array with values to add to list box.
|
45
|
+
*/
|
46
|
+
init: function(settings) {
|
47
|
+
var self = this;
|
48
|
+
|
49
|
+
self._super(settings);
|
50
|
+
|
51
|
+
if (self.settings.size) {
|
52
|
+
|
53
|
+
self.size = self.settings.size;
|
54
|
+
|
55
|
+
}
|
56
|
+
|
57
|
+
if (self.settings.options) {
|
58
|
+
self._options = self.settings.options;
|
59
|
+
}
|
60
|
+
|
61
|
+
},
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Getter/setter function for the options state.
|
65
|
+
*
|
66
|
+
* @method options
|
67
|
+
* @param {Array} [state] State to be set.
|
68
|
+
* @return {Array|tinymce.ui.SelectBox} Array of string options.
|
69
|
+
*/
|
70
|
+
options: function(state) {
|
71
|
+
if (!arguments.length) {
|
72
|
+
return this.state.get('options');
|
73
|
+
}
|
74
|
+
|
75
|
+
this.state.set('options', state);
|
76
|
+
|
77
|
+
return this;
|
78
|
+
},
|
79
|
+
|
80
|
+
renderHtml: function() {
|
81
|
+
var self = this, options, size = '';
|
82
|
+
|
83
|
+
options = createOptions(self._options);
|
84
|
+
|
85
|
+
if (self.size) {
|
86
|
+
size = ' size = "' + self.size + '"';
|
87
|
+
}
|
88
|
+
|
89
|
+
return (
|
90
|
+
'<select id="' + self._id + '" class="' + self.classes + '"' + size + '>' +
|
91
|
+
options +
|
92
|
+
'</select>'
|
93
|
+
);
|
94
|
+
},
|
95
|
+
|
96
|
+
bindStates: function() {
|
97
|
+
var self = this;
|
98
|
+
|
99
|
+
self.state.on('change:options', function(e) {
|
100
|
+
self.getEl().innerHTML = createOptions(e.value);
|
101
|
+
});
|
102
|
+
|
103
|
+
return self._super();
|
104
|
+
}
|
105
|
+
});
|
106
|
+
});
|
@@ -0,0 +1,369 @@
|
|
1
|
+
/**
|
2
|
+
* Selector.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
|
+
/*eslint no-nested-ternary:0 */
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Selector engine, enables you to select controls by using CSS like expressions.
|
15
|
+
* We currently only support basic CSS expressions to reduce the size of the core
|
16
|
+
* and the ones we support should be enough for most cases.
|
17
|
+
*
|
18
|
+
* @example
|
19
|
+
* Supported expressions:
|
20
|
+
* element
|
21
|
+
* element#name
|
22
|
+
* element.class
|
23
|
+
* element[attr]
|
24
|
+
* element[attr*=value]
|
25
|
+
* element[attr~=value]
|
26
|
+
* element[attr!=value]
|
27
|
+
* element[attr^=value]
|
28
|
+
* element[attr$=value]
|
29
|
+
* element:<state>
|
30
|
+
* element:not(<expression>)
|
31
|
+
* element:first
|
32
|
+
* element:last
|
33
|
+
* element:odd
|
34
|
+
* element:even
|
35
|
+
* element element
|
36
|
+
* element > element
|
37
|
+
*
|
38
|
+
* @class tinymce.ui.Selector
|
39
|
+
*/
|
40
|
+
define("tinymce/ui/Selector", [
|
41
|
+
"tinymce/util/Class"
|
42
|
+
], function(Class) {
|
43
|
+
"use strict";
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Produces an array with a unique set of objects. It will not compare the values
|
47
|
+
* but the references of the objects.
|
48
|
+
*
|
49
|
+
* @private
|
50
|
+
* @method unqiue
|
51
|
+
* @param {Array} array Array to make into an array with unique items.
|
52
|
+
* @return {Array} Array with unique items.
|
53
|
+
*/
|
54
|
+
function unique(array) {
|
55
|
+
var uniqueItems = [], i = array.length, item;
|
56
|
+
|
57
|
+
while (i--) {
|
58
|
+
item = array[i];
|
59
|
+
|
60
|
+
if (!item.__checked) {
|
61
|
+
uniqueItems.push(item);
|
62
|
+
item.__checked = 1;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
i = uniqueItems.length;
|
67
|
+
while (i--) {
|
68
|
+
delete uniqueItems[i].__checked;
|
69
|
+
}
|
70
|
+
|
71
|
+
return uniqueItems;
|
72
|
+
}
|
73
|
+
|
74
|
+
var expression = /^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i;
|
75
|
+
|
76
|
+
/*jshint maxlen:255 */
|
77
|
+
/*eslint max-len:0 */
|
78
|
+
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
|
79
|
+
whiteSpace = /^\s*|\s*$/g,
|
80
|
+
Collection;
|
81
|
+
|
82
|
+
var Selector = Class.extend({
|
83
|
+
/**
|
84
|
+
* Constructs a new Selector instance.
|
85
|
+
*
|
86
|
+
* @constructor
|
87
|
+
* @method init
|
88
|
+
* @param {String} selector CSS like selector expression.
|
89
|
+
*/
|
90
|
+
init: function(selector) {
|
91
|
+
var match = this.match;
|
92
|
+
|
93
|
+
function compileNameFilter(name) {
|
94
|
+
if (name) {
|
95
|
+
name = name.toLowerCase();
|
96
|
+
|
97
|
+
return function(item) {
|
98
|
+
return name === '*' || item.type === name;
|
99
|
+
};
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
function compileIdFilter(id) {
|
104
|
+
if (id) {
|
105
|
+
return function(item) {
|
106
|
+
return item._name === id;
|
107
|
+
};
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
function compileClassesFilter(classes) {
|
112
|
+
if (classes) {
|
113
|
+
classes = classes.split('.');
|
114
|
+
|
115
|
+
return function(item) {
|
116
|
+
var i = classes.length;
|
117
|
+
|
118
|
+
while (i--) {
|
119
|
+
if (!item.classes.contains(classes[i])) {
|
120
|
+
return false;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
return true;
|
125
|
+
};
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
129
|
+
function compileAttrFilter(name, cmp, check) {
|
130
|
+
if (name) {
|
131
|
+
return function(item) {
|
132
|
+
var value = item[name] ? item[name]() : '';
|
133
|
+
|
134
|
+
return !cmp ? !!check :
|
135
|
+
cmp === "=" ? value === check :
|
136
|
+
cmp === "*=" ? value.indexOf(check) >= 0 :
|
137
|
+
cmp === "~=" ? (" " + value + " ").indexOf(" " + check + " ") >= 0 :
|
138
|
+
cmp === "!=" ? value != check :
|
139
|
+
cmp === "^=" ? value.indexOf(check) === 0 :
|
140
|
+
cmp === "$=" ? value.substr(value.length - check.length) === check :
|
141
|
+
false;
|
142
|
+
};
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
function compilePsuedoFilter(name) {
|
147
|
+
var notSelectors;
|
148
|
+
|
149
|
+
if (name) {
|
150
|
+
name = /(?:not\((.+)\))|(.+)/i.exec(name);
|
151
|
+
|
152
|
+
if (!name[1]) {
|
153
|
+
name = name[2];
|
154
|
+
|
155
|
+
return function(item, index, length) {
|
156
|
+
return name === 'first' ? index === 0 :
|
157
|
+
name === 'last' ? index === length - 1 :
|
158
|
+
name === 'even' ? index % 2 === 0 :
|
159
|
+
name === 'odd' ? index % 2 === 1 :
|
160
|
+
item[name] ? item[name]() :
|
161
|
+
false;
|
162
|
+
};
|
163
|
+
}
|
164
|
+
|
165
|
+
// Compile not expression
|
166
|
+
notSelectors = parseChunks(name[1], []);
|
167
|
+
|
168
|
+
return function(item) {
|
169
|
+
return !match(item, notSelectors);
|
170
|
+
};
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
function compile(selector, filters, direct) {
|
175
|
+
var parts;
|
176
|
+
|
177
|
+
function add(filter) {
|
178
|
+
if (filter) {
|
179
|
+
filters.push(filter);
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
// Parse expression into parts
|
184
|
+
parts = expression.exec(selector.replace(whiteSpace, ''));
|
185
|
+
|
186
|
+
add(compileNameFilter(parts[1]));
|
187
|
+
add(compileIdFilter(parts[2]));
|
188
|
+
add(compileClassesFilter(parts[3]));
|
189
|
+
add(compileAttrFilter(parts[4], parts[5], parts[6]));
|
190
|
+
add(compilePsuedoFilter(parts[7]));
|
191
|
+
|
192
|
+
// Mark the filter with pseudo for performance
|
193
|
+
filters.pseudo = !!parts[7];
|
194
|
+
filters.direct = direct;
|
195
|
+
|
196
|
+
return filters;
|
197
|
+
}
|
198
|
+
|
199
|
+
// Parser logic based on Sizzle by John Resig
|
200
|
+
function parseChunks(selector, selectors) {
|
201
|
+
var parts = [], extra, matches, i;
|
202
|
+
|
203
|
+
do {
|
204
|
+
chunker.exec("");
|
205
|
+
matches = chunker.exec(selector);
|
206
|
+
|
207
|
+
if (matches) {
|
208
|
+
selector = matches[3];
|
209
|
+
parts.push(matches[1]);
|
210
|
+
|
211
|
+
if (matches[2]) {
|
212
|
+
extra = matches[3];
|
213
|
+
break;
|
214
|
+
}
|
215
|
+
}
|
216
|
+
} while (matches);
|
217
|
+
|
218
|
+
if (extra) {
|
219
|
+
parseChunks(extra, selectors);
|
220
|
+
}
|
221
|
+
|
222
|
+
selector = [];
|
223
|
+
for (i = 0; i < parts.length; i++) {
|
224
|
+
if (parts[i] != '>') {
|
225
|
+
selector.push(compile(parts[i], [], parts[i - 1] === '>'));
|
226
|
+
}
|
227
|
+
}
|
228
|
+
|
229
|
+
selectors.push(selector);
|
230
|
+
|
231
|
+
return selectors;
|
232
|
+
}
|
233
|
+
|
234
|
+
this._selectors = parseChunks(selector, []);
|
235
|
+
},
|
236
|
+
|
237
|
+
/**
|
238
|
+
* Returns true/false if the selector matches the specified control.
|
239
|
+
*
|
240
|
+
* @method match
|
241
|
+
* @param {tinymce.ui.Control} control Control to match against the selector.
|
242
|
+
* @param {Array} selectors Optional array of selectors, mostly used internally.
|
243
|
+
* @return {Boolean} true/false state if the control matches or not.
|
244
|
+
*/
|
245
|
+
match: function(control, selectors) {
|
246
|
+
var i, l, si, sl, selector, fi, fl, filters, index, length, siblings, count, item;
|
247
|
+
|
248
|
+
selectors = selectors || this._selectors;
|
249
|
+
for (i = 0, l = selectors.length; i < l; i++) {
|
250
|
+
selector = selectors[i];
|
251
|
+
sl = selector.length;
|
252
|
+
item = control;
|
253
|
+
count = 0;
|
254
|
+
|
255
|
+
for (si = sl - 1; si >= 0; si--) {
|
256
|
+
filters = selector[si];
|
257
|
+
|
258
|
+
while (item) {
|
259
|
+
// Find the index and length since a pseudo filter like :first needs it
|
260
|
+
if (filters.pseudo) {
|
261
|
+
siblings = item.parent().items();
|
262
|
+
index = length = siblings.length;
|
263
|
+
while (index--) {
|
264
|
+
if (siblings[index] === item) {
|
265
|
+
break;
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
269
|
+
|
270
|
+
for (fi = 0, fl = filters.length; fi < fl; fi++) {
|
271
|
+
if (!filters[fi](item, index, length)) {
|
272
|
+
fi = fl + 1;
|
273
|
+
break;
|
274
|
+
}
|
275
|
+
}
|
276
|
+
|
277
|
+
if (fi === fl) {
|
278
|
+
count++;
|
279
|
+
break;
|
280
|
+
} else {
|
281
|
+
// If it didn't match the right most expression then
|
282
|
+
// break since it's no point looking at the parents
|
283
|
+
if (si === sl - 1) {
|
284
|
+
break;
|
285
|
+
}
|
286
|
+
}
|
287
|
+
|
288
|
+
item = item.parent();
|
289
|
+
}
|
290
|
+
}
|
291
|
+
|
292
|
+
// If we found all selectors then return true otherwise continue looking
|
293
|
+
if (count === sl) {
|
294
|
+
return true;
|
295
|
+
}
|
296
|
+
}
|
297
|
+
|
298
|
+
return false;
|
299
|
+
},
|
300
|
+
|
301
|
+
/**
|
302
|
+
* Returns a tinymce.ui.Collection with matches of the specified selector inside the specified container.
|
303
|
+
*
|
304
|
+
* @method find
|
305
|
+
* @param {tinymce.ui.Control} container Container to look for items in.
|
306
|
+
* @return {tinymce.ui.Collection} Collection with matched elements.
|
307
|
+
*/
|
308
|
+
find: function(container) {
|
309
|
+
var matches = [], i, l, selectors = this._selectors;
|
310
|
+
|
311
|
+
function collect(items, selector, index) {
|
312
|
+
var i, l, fi, fl, item, filters = selector[index];
|
313
|
+
|
314
|
+
for (i = 0, l = items.length; i < l; i++) {
|
315
|
+
item = items[i];
|
316
|
+
|
317
|
+
// Run each filter against the item
|
318
|
+
for (fi = 0, fl = filters.length; fi < fl; fi++) {
|
319
|
+
if (!filters[fi](item, i, l)) {
|
320
|
+
fi = fl + 1;
|
321
|
+
break;
|
322
|
+
}
|
323
|
+
}
|
324
|
+
|
325
|
+
// All filters matched the item
|
326
|
+
if (fi === fl) {
|
327
|
+
// Matched item is on the last expression like: panel toolbar [button]
|
328
|
+
if (index == selector.length - 1) {
|
329
|
+
matches.push(item);
|
330
|
+
} else {
|
331
|
+
// Collect next expression type
|
332
|
+
if (item.items) {
|
333
|
+
collect(item.items(), selector, index + 1);
|
334
|
+
}
|
335
|
+
}
|
336
|
+
} else if (filters.direct) {
|
337
|
+
return;
|
338
|
+
}
|
339
|
+
|
340
|
+
// Collect child items
|
341
|
+
if (item.items) {
|
342
|
+
collect(item.items(), selector, index);
|
343
|
+
}
|
344
|
+
}
|
345
|
+
}
|
346
|
+
|
347
|
+
if (container.items) {
|
348
|
+
for (i = 0, l = selectors.length; i < l; i++) {
|
349
|
+
collect(container.items(), selectors[i], 0);
|
350
|
+
}
|
351
|
+
|
352
|
+
// Unique the matches if needed
|
353
|
+
if (l > 1) {
|
354
|
+
matches = unique(matches);
|
355
|
+
}
|
356
|
+
}
|
357
|
+
|
358
|
+
// Fix for circular reference
|
359
|
+
if (!Collection) {
|
360
|
+
// TODO: Fix me!
|
361
|
+
Collection = Selector.Collection;
|
362
|
+
}
|
363
|
+
|
364
|
+
return new Collection(matches);
|
365
|
+
}
|
366
|
+
});
|
367
|
+
|
368
|
+
return Selector;
|
369
|
+
});
|