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,233 @@
|
|
1
|
+
/**
|
2
|
+
* GridLayout.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 layout manager places controls in a grid.
|
13
|
+
*
|
14
|
+
* @setting {Number} spacing Spacing between controls.
|
15
|
+
* @setting {Number} spacingH Horizontal spacing between controls.
|
16
|
+
* @setting {Number} spacingV Vertical spacing between controls.
|
17
|
+
* @setting {Number} columns Number of columns to use.
|
18
|
+
* @setting {String/Array} alignH start|end|center|stretch or array of values for each column.
|
19
|
+
* @setting {String/Array} alignV start|end|center|stretch or array of values for each column.
|
20
|
+
* @setting {String} pack start|end
|
21
|
+
*
|
22
|
+
* @class tinymce.ui.GridLayout
|
23
|
+
* @extends tinymce.ui.AbsoluteLayout
|
24
|
+
*/
|
25
|
+
define("tinymce/ui/GridLayout", [
|
26
|
+
"tinymce/ui/AbsoluteLayout"
|
27
|
+
], function(AbsoluteLayout) {
|
28
|
+
"use strict";
|
29
|
+
|
30
|
+
return AbsoluteLayout.extend({
|
31
|
+
/**
|
32
|
+
* Recalculates the positions of the controls in the specified container.
|
33
|
+
*
|
34
|
+
* @method recalc
|
35
|
+
* @param {tinymce.ui.Container} container Container instance to recalc.
|
36
|
+
*/
|
37
|
+
recalc: function(container) {
|
38
|
+
var settings, rows, cols, items, contLayoutRect, width, height, rect,
|
39
|
+
ctrlLayoutRect, ctrl, x, y, posX, posY, ctrlSettings, contPaddingBox, align, spacingH, spacingV, alignH, alignV, maxX, maxY,
|
40
|
+
colWidths = [], rowHeights = [], ctrlMinWidth, ctrlMinHeight, availableWidth, availableHeight, reverseRows, idx;
|
41
|
+
|
42
|
+
// Get layout settings
|
43
|
+
settings = container.settings;
|
44
|
+
items = container.items().filter(':visible');
|
45
|
+
contLayoutRect = container.layoutRect();
|
46
|
+
cols = settings.columns || Math.ceil(Math.sqrt(items.length));
|
47
|
+
rows = Math.ceil(items.length / cols);
|
48
|
+
spacingH = settings.spacingH || settings.spacing || 0;
|
49
|
+
spacingV = settings.spacingV || settings.spacing || 0;
|
50
|
+
alignH = settings.alignH || settings.align;
|
51
|
+
alignV = settings.alignV || settings.align;
|
52
|
+
contPaddingBox = container.paddingBox;
|
53
|
+
reverseRows = 'reverseRows' in settings ? settings.reverseRows : container.isRtl();
|
54
|
+
|
55
|
+
if (alignH && typeof alignH == "string") {
|
56
|
+
alignH = [alignH];
|
57
|
+
}
|
58
|
+
|
59
|
+
if (alignV && typeof alignV == "string") {
|
60
|
+
alignV = [alignV];
|
61
|
+
}
|
62
|
+
|
63
|
+
// Zero padd columnWidths
|
64
|
+
for (x = 0; x < cols; x++) {
|
65
|
+
colWidths.push(0);
|
66
|
+
}
|
67
|
+
|
68
|
+
// Zero padd rowHeights
|
69
|
+
for (y = 0; y < rows; y++) {
|
70
|
+
rowHeights.push(0);
|
71
|
+
}
|
72
|
+
|
73
|
+
// Calculate columnWidths and rowHeights
|
74
|
+
for (y = 0; y < rows; y++) {
|
75
|
+
for (x = 0; x < cols; x++) {
|
76
|
+
ctrl = items[y * cols + x];
|
77
|
+
|
78
|
+
// Out of bounds
|
79
|
+
if (!ctrl) {
|
80
|
+
break;
|
81
|
+
}
|
82
|
+
|
83
|
+
ctrlLayoutRect = ctrl.layoutRect();
|
84
|
+
ctrlMinWidth = ctrlLayoutRect.minW;
|
85
|
+
ctrlMinHeight = ctrlLayoutRect.minH;
|
86
|
+
|
87
|
+
colWidths[x] = ctrlMinWidth > colWidths[x] ? ctrlMinWidth : colWidths[x];
|
88
|
+
rowHeights[y] = ctrlMinHeight > rowHeights[y] ? ctrlMinHeight : rowHeights[y];
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
// Calculate maxX
|
93
|
+
availableWidth = contLayoutRect.innerW - contPaddingBox.left - contPaddingBox.right;
|
94
|
+
for (maxX = 0, x = 0; x < cols; x++) {
|
95
|
+
maxX += colWidths[x] + (x > 0 ? spacingH : 0);
|
96
|
+
availableWidth -= (x > 0 ? spacingH : 0) + colWidths[x];
|
97
|
+
}
|
98
|
+
|
99
|
+
// Calculate maxY
|
100
|
+
availableHeight = contLayoutRect.innerH - contPaddingBox.top - contPaddingBox.bottom;
|
101
|
+
for (maxY = 0, y = 0; y < rows; y++) {
|
102
|
+
maxY += rowHeights[y] + (y > 0 ? spacingV : 0);
|
103
|
+
availableHeight -= (y > 0 ? spacingV : 0) + rowHeights[y];
|
104
|
+
}
|
105
|
+
|
106
|
+
maxX += contPaddingBox.left + contPaddingBox.right;
|
107
|
+
maxY += contPaddingBox.top + contPaddingBox.bottom;
|
108
|
+
|
109
|
+
// Calculate minW/minH
|
110
|
+
rect = {};
|
111
|
+
rect.minW = maxX + (contLayoutRect.w - contLayoutRect.innerW);
|
112
|
+
rect.minH = maxY + (contLayoutRect.h - contLayoutRect.innerH);
|
113
|
+
|
114
|
+
rect.contentW = rect.minW - contLayoutRect.deltaW;
|
115
|
+
rect.contentH = rect.minH - contLayoutRect.deltaH;
|
116
|
+
rect.minW = Math.min(rect.minW, contLayoutRect.maxW);
|
117
|
+
rect.minH = Math.min(rect.minH, contLayoutRect.maxH);
|
118
|
+
rect.minW = Math.max(rect.minW, contLayoutRect.startMinWidth);
|
119
|
+
rect.minH = Math.max(rect.minH, contLayoutRect.startMinHeight);
|
120
|
+
|
121
|
+
// Resize container container if minSize was changed
|
122
|
+
if (contLayoutRect.autoResize && (rect.minW != contLayoutRect.minW || rect.minH != contLayoutRect.minH)) {
|
123
|
+
rect.w = rect.minW;
|
124
|
+
rect.h = rect.minH;
|
125
|
+
|
126
|
+
container.layoutRect(rect);
|
127
|
+
this.recalc(container);
|
128
|
+
|
129
|
+
// Forced recalc for example if items are hidden/shown
|
130
|
+
if (container._lastRect === null) {
|
131
|
+
var parentCtrl = container.parent();
|
132
|
+
if (parentCtrl) {
|
133
|
+
parentCtrl._lastRect = null;
|
134
|
+
parentCtrl.recalc();
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
138
|
+
return;
|
139
|
+
}
|
140
|
+
|
141
|
+
// Update contentW/contentH so absEnd moves correctly
|
142
|
+
if (contLayoutRect.autoResize) {
|
143
|
+
rect = container.layoutRect(rect);
|
144
|
+
rect.contentW = rect.minW - contLayoutRect.deltaW;
|
145
|
+
rect.contentH = rect.minH - contLayoutRect.deltaH;
|
146
|
+
}
|
147
|
+
|
148
|
+
var flexV;
|
149
|
+
|
150
|
+
if (settings.packV == 'start') {
|
151
|
+
flexV = 0;
|
152
|
+
} else {
|
153
|
+
flexV = availableHeight > 0 ? Math.floor(availableHeight / rows) : 0;
|
154
|
+
}
|
155
|
+
|
156
|
+
// Calculate totalFlex
|
157
|
+
var totalFlex = 0;
|
158
|
+
var flexWidths = settings.flexWidths;
|
159
|
+
if (flexWidths) {
|
160
|
+
for (x = 0; x < flexWidths.length; x++) {
|
161
|
+
totalFlex += flexWidths[x];
|
162
|
+
}
|
163
|
+
} else {
|
164
|
+
totalFlex = cols;
|
165
|
+
}
|
166
|
+
|
167
|
+
// Calculate new column widths based on flex values
|
168
|
+
var ratio = availableWidth / totalFlex;
|
169
|
+
for (x = 0; x < cols; x++) {
|
170
|
+
colWidths[x] += flexWidths ? flexWidths[x] * ratio : ratio;
|
171
|
+
}
|
172
|
+
|
173
|
+
// Move/resize controls
|
174
|
+
posY = contPaddingBox.top;
|
175
|
+
for (y = 0; y < rows; y++) {
|
176
|
+
posX = contPaddingBox.left;
|
177
|
+
height = rowHeights[y] + flexV;
|
178
|
+
|
179
|
+
for (x = 0; x < cols; x++) {
|
180
|
+
if (reverseRows) {
|
181
|
+
idx = y * cols + cols - 1 - x;
|
182
|
+
} else {
|
183
|
+
idx = y * cols + x;
|
184
|
+
}
|
185
|
+
|
186
|
+
ctrl = items[idx];
|
187
|
+
|
188
|
+
// No more controls to render then break
|
189
|
+
if (!ctrl) {
|
190
|
+
break;
|
191
|
+
}
|
192
|
+
|
193
|
+
// Get control settings and calculate x, y
|
194
|
+
ctrlSettings = ctrl.settings;
|
195
|
+
ctrlLayoutRect = ctrl.layoutRect();
|
196
|
+
width = Math.max(colWidths[x], ctrlLayoutRect.startMinWidth);
|
197
|
+
ctrlLayoutRect.x = posX;
|
198
|
+
ctrlLayoutRect.y = posY;
|
199
|
+
|
200
|
+
// Align control horizontal
|
201
|
+
align = ctrlSettings.alignH || (alignH ? (alignH[x] || alignH[0]) : null);
|
202
|
+
if (align == "center") {
|
203
|
+
ctrlLayoutRect.x = posX + (width / 2) - (ctrlLayoutRect.w / 2);
|
204
|
+
} else if (align == "right") {
|
205
|
+
ctrlLayoutRect.x = posX + width - ctrlLayoutRect.w;
|
206
|
+
} else if (align == "stretch") {
|
207
|
+
ctrlLayoutRect.w = width;
|
208
|
+
}
|
209
|
+
|
210
|
+
// Align control vertical
|
211
|
+
align = ctrlSettings.alignV || (alignV ? (alignV[x] || alignV[0]) : null);
|
212
|
+
if (align == "center") {
|
213
|
+
ctrlLayoutRect.y = posY + (height / 2) - (ctrlLayoutRect.h / 2);
|
214
|
+
} else if (align == "bottom") {
|
215
|
+
ctrlLayoutRect.y = posY + height - ctrlLayoutRect.h;
|
216
|
+
} else if (align == "stretch") {
|
217
|
+
ctrlLayoutRect.h = height;
|
218
|
+
}
|
219
|
+
|
220
|
+
ctrl.layoutRect(ctrlLayoutRect);
|
221
|
+
|
222
|
+
posX += width + spacingH;
|
223
|
+
|
224
|
+
if (ctrl.recalc) {
|
225
|
+
ctrl.recalc();
|
226
|
+
}
|
227
|
+
}
|
228
|
+
|
229
|
+
posY += height + spacingV;
|
230
|
+
}
|
231
|
+
}
|
232
|
+
});
|
233
|
+
});
|
@@ -0,0 +1,85 @@
|
|
1
|
+
/**
|
2
|
+
* Iframe.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 scripturl:true */
|
12
|
+
|
13
|
+
/**
|
14
|
+
* This class creates an iframe.
|
15
|
+
*
|
16
|
+
* @setting {String} url Url to open in the iframe.
|
17
|
+
*
|
18
|
+
* @-x-less Iframe.less
|
19
|
+
* @class tinymce.ui.Iframe
|
20
|
+
* @extends tinymce.ui.Widget
|
21
|
+
*/
|
22
|
+
define("tinymce/ui/Iframe", [
|
23
|
+
"tinymce/ui/Widget",
|
24
|
+
"tinymce/util/Delay"
|
25
|
+
], function(Widget, Delay) {
|
26
|
+
"use strict";
|
27
|
+
|
28
|
+
return Widget.extend({
|
29
|
+
/**
|
30
|
+
* Renders the control as a HTML string.
|
31
|
+
*
|
32
|
+
* @method renderHtml
|
33
|
+
* @return {String} HTML representing the control.
|
34
|
+
*/
|
35
|
+
renderHtml: function() {
|
36
|
+
var self = this;
|
37
|
+
|
38
|
+
self.classes.add('iframe');
|
39
|
+
self.canFocus = false;
|
40
|
+
|
41
|
+
/*eslint no-script-url:0 */
|
42
|
+
return (
|
43
|
+
'<iframe id="' + self._id + '" class="' + self.classes + '" tabindex="-1" src="' +
|
44
|
+
(self.settings.url || "javascript:''") + '" frameborder="0"></iframe>'
|
45
|
+
);
|
46
|
+
},
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Setter for the iframe source.
|
50
|
+
*
|
51
|
+
* @method src
|
52
|
+
* @param {String} src Source URL for iframe.
|
53
|
+
*/
|
54
|
+
src: function(src) {
|
55
|
+
this.getEl().src = src;
|
56
|
+
},
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Inner HTML for the iframe.
|
60
|
+
*
|
61
|
+
* @method html
|
62
|
+
* @param {String} html HTML string to set as HTML inside the iframe.
|
63
|
+
* @param {function} callback Optional callback to execute when the iframe body is filled with contents.
|
64
|
+
* @return {tinymce.ui.Iframe} Current iframe control.
|
65
|
+
*/
|
66
|
+
html: function(html, callback) {
|
67
|
+
var self = this, body = this.getEl().contentWindow.document.body;
|
68
|
+
|
69
|
+
// Wait for iframe to initialize IE 10 takes time
|
70
|
+
if (!body) {
|
71
|
+
Delay.setTimeout(function() {
|
72
|
+
self.html(html);
|
73
|
+
});
|
74
|
+
} else {
|
75
|
+
body.innerHTML = html;
|
76
|
+
|
77
|
+
if (callback) {
|
78
|
+
callback();
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
return this;
|
83
|
+
}
|
84
|
+
});
|
85
|
+
});
|
@@ -0,0 +1,93 @@
|
|
1
|
+
/**
|
2
|
+
* InfoBox.js
|
3
|
+
*
|
4
|
+
* Released under LGPL License.
|
5
|
+
* Copyright (c) 1999-2016 Ephox Corp. All rights reserved
|
6
|
+
*
|
7
|
+
* License: http://www.tinymce.com/license
|
8
|
+
* Contributing: http://www.tinymce.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
/**
|
12
|
+
* ....
|
13
|
+
*
|
14
|
+
* @-x-less InfoBox.less
|
15
|
+
* @class tinymce.ui.InfoBox
|
16
|
+
* @extends tinymce.ui.Widget
|
17
|
+
*/
|
18
|
+
define("tinymce/ui/InfoBox", [
|
19
|
+
"tinymce/ui/Widget"
|
20
|
+
], function(Widget) {
|
21
|
+
"use strict";
|
22
|
+
|
23
|
+
return Widget.extend({
|
24
|
+
/**
|
25
|
+
* Constructs a instance with the specified settings.
|
26
|
+
*
|
27
|
+
* @constructor
|
28
|
+
* @param {Object} settings Name/value object with settings.
|
29
|
+
* @setting {Boolean} multiline Multiline label.
|
30
|
+
*/
|
31
|
+
init: function(settings) {
|
32
|
+
var self = this;
|
33
|
+
|
34
|
+
self._super(settings);
|
35
|
+
self.classes.add('widget').add('infobox');
|
36
|
+
self.canFocus = false;
|
37
|
+
},
|
38
|
+
|
39
|
+
severity: function(level) {
|
40
|
+
this.classes.remove('error');
|
41
|
+
this.classes.remove('warning');
|
42
|
+
this.classes.remove('success');
|
43
|
+
this.classes.add(level);
|
44
|
+
},
|
45
|
+
|
46
|
+
help: function(state) {
|
47
|
+
this.state.set('help', state);
|
48
|
+
},
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Renders the control as a HTML string.
|
52
|
+
*
|
53
|
+
* @method renderHtml
|
54
|
+
* @return {String} HTML representing the control.
|
55
|
+
*/
|
56
|
+
renderHtml: function() {
|
57
|
+
var self = this, prefix = self.classPrefix;
|
58
|
+
|
59
|
+
return (
|
60
|
+
'<div id="' + self._id + '" class="' + self.classes + '">' +
|
61
|
+
'<div id="' + self._id + '-body">' +
|
62
|
+
self.encode(self.state.get('text')) +
|
63
|
+
'<button role="button" tabindex="-1">' +
|
64
|
+
'<i class="' + prefix + 'ico ' + prefix + 'i-help"></i>' +
|
65
|
+
'</button>' +
|
66
|
+
'</div>' +
|
67
|
+
'</div>'
|
68
|
+
);
|
69
|
+
},
|
70
|
+
|
71
|
+
bindStates: function() {
|
72
|
+
var self = this;
|
73
|
+
|
74
|
+
self.state.on('change:text', function(e) {
|
75
|
+
self.getEl('body').firstChild.data = self.encode(e.value);
|
76
|
+
|
77
|
+
if (self.state.get('rendered')) {
|
78
|
+
self.updateLayoutRect();
|
79
|
+
}
|
80
|
+
});
|
81
|
+
|
82
|
+
self.state.on('change:help', function(e) {
|
83
|
+
self.classes.toggle('has-help', e.value);
|
84
|
+
|
85
|
+
if (self.state.get('rendered')) {
|
86
|
+
self.updateLayoutRect();
|
87
|
+
}
|
88
|
+
});
|
89
|
+
|
90
|
+
return self._super();
|
91
|
+
}
|
92
|
+
});
|
93
|
+
});
|
@@ -0,0 +1,406 @@
|
|
1
|
+
/**
|
2
|
+
* KeyboardNavigation.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 handles keyboard navigation of controls and elements.
|
13
|
+
*
|
14
|
+
* @class tinymce.ui.KeyboardNavigation
|
15
|
+
*/
|
16
|
+
define("tinymce/ui/KeyboardNavigation", [
|
17
|
+
], function() {
|
18
|
+
"use strict";
|
19
|
+
|
20
|
+
/**
|
21
|
+
* This class handles all keyboard navigation for WAI-ARIA support. Each root container
|
22
|
+
* gets an instance of this class.
|
23
|
+
*
|
24
|
+
* @constructor
|
25
|
+
*/
|
26
|
+
return function(settings) {
|
27
|
+
var root = settings.root, focusedElement, focusedControl;
|
28
|
+
|
29
|
+
function isElement(node) {
|
30
|
+
return node && node.nodeType === 1;
|
31
|
+
}
|
32
|
+
|
33
|
+
try {
|
34
|
+
focusedElement = document.activeElement;
|
35
|
+
} catch (ex) {
|
36
|
+
// IE sometimes fails to return a proper element
|
37
|
+
focusedElement = document.body;
|
38
|
+
}
|
39
|
+
|
40
|
+
focusedControl = root.getParentCtrl(focusedElement);
|
41
|
+
|
42
|
+
/**
|
43
|
+
* Returns the currently focused elements wai aria role of the currently
|
44
|
+
* focused element or specified element.
|
45
|
+
*
|
46
|
+
* @private
|
47
|
+
* @param {Element} elm Optional element to get role from.
|
48
|
+
* @return {String} Role of specified element.
|
49
|
+
*/
|
50
|
+
function getRole(elm) {
|
51
|
+
elm = elm || focusedElement;
|
52
|
+
|
53
|
+
if (isElement(elm)) {
|
54
|
+
return elm.getAttribute('role');
|
55
|
+
}
|
56
|
+
|
57
|
+
return null;
|
58
|
+
}
|
59
|
+
|
60
|
+
/**
|
61
|
+
* Returns the wai role of the parent element of the currently
|
62
|
+
* focused element or specified element.
|
63
|
+
*
|
64
|
+
* @private
|
65
|
+
* @param {Element} elm Optional element to get parent role from.
|
66
|
+
* @return {String} Role of the first parent that has a role.
|
67
|
+
*/
|
68
|
+
function getParentRole(elm) {
|
69
|
+
var role, parent = elm || focusedElement;
|
70
|
+
|
71
|
+
while ((parent = parent.parentNode)) {
|
72
|
+
if ((role = getRole(parent))) {
|
73
|
+
return role;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
/**
|
79
|
+
* Returns a wai aria property by name for example aria-selected.
|
80
|
+
*
|
81
|
+
* @private
|
82
|
+
* @param {String} name Name of the aria property to get for example "disabled".
|
83
|
+
* @return {String} Aria property value.
|
84
|
+
*/
|
85
|
+
function getAriaProp(name) {
|
86
|
+
var elm = focusedElement;
|
87
|
+
|
88
|
+
if (isElement(elm)) {
|
89
|
+
return elm.getAttribute('aria-' + name);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Is the element a text input element or not.
|
95
|
+
*
|
96
|
+
* @private
|
97
|
+
* @param {Element} elm Element to check if it's an text input element or not.
|
98
|
+
* @return {Boolean} True/false if the element is a text element or not.
|
99
|
+
*/
|
100
|
+
function isTextInputElement(elm) {
|
101
|
+
var tagName = elm.tagName.toUpperCase();
|
102
|
+
|
103
|
+
// Notice: since type can be "email" etc we don't check the type
|
104
|
+
// So all input elements gets treated as text input elements
|
105
|
+
return tagName == "INPUT" || tagName == "TEXTAREA";
|
106
|
+
}
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Returns true/false if the specified element can be focused or not.
|
110
|
+
*
|
111
|
+
* @private
|
112
|
+
* @param {Element} elm DOM element to check if it can be focused or not.
|
113
|
+
* @return {Boolean} True/false if the element can have focus.
|
114
|
+
*/
|
115
|
+
function canFocus(elm) {
|
116
|
+
if (isTextInputElement(elm) && !elm.hidden) {
|
117
|
+
return true;
|
118
|
+
}
|
119
|
+
|
120
|
+
if (/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell)$/.test(getRole(elm))) {
|
121
|
+
return true;
|
122
|
+
}
|
123
|
+
|
124
|
+
return false;
|
125
|
+
}
|
126
|
+
|
127
|
+
/**
|
128
|
+
* Returns an array of focusable visible elements within the specified container element.
|
129
|
+
*
|
130
|
+
* @private
|
131
|
+
* @param {Element} elm DOM element to find focusable elements within.
|
132
|
+
* @return {Array} Array of focusable elements.
|
133
|
+
*/
|
134
|
+
function getFocusElements(elm) {
|
135
|
+
var elements = [];
|
136
|
+
|
137
|
+
function collect(elm) {
|
138
|
+
if (elm.nodeType != 1 || elm.style.display == 'none') {
|
139
|
+
return;
|
140
|
+
}
|
141
|
+
|
142
|
+
if (canFocus(elm)) {
|
143
|
+
elements.push(elm);
|
144
|
+
}
|
145
|
+
|
146
|
+
for (var i = 0; i < elm.childNodes.length; i++) {
|
147
|
+
collect(elm.childNodes[i]);
|
148
|
+
}
|
149
|
+
}
|
150
|
+
|
151
|
+
collect(elm || root.getEl());
|
152
|
+
|
153
|
+
return elements;
|
154
|
+
}
|
155
|
+
|
156
|
+
/**
|
157
|
+
* Returns the navigation root control for the specified control. The navigation root
|
158
|
+
* is the control that the keyboard navigation gets scoped to for example a menubar or toolbar group.
|
159
|
+
* It will look for parents of the specified target control or the currently focused control if this option is omitted.
|
160
|
+
*
|
161
|
+
* @private
|
162
|
+
* @param {tinymce.ui.Control} targetControl Optional target control to find root of.
|
163
|
+
* @return {tinymce.ui.Control} Navigation root control.
|
164
|
+
*/
|
165
|
+
function getNavigationRoot(targetControl) {
|
166
|
+
var navigationRoot, controls;
|
167
|
+
|
168
|
+
targetControl = targetControl || focusedControl;
|
169
|
+
controls = targetControl.parents().toArray();
|
170
|
+
controls.unshift(targetControl);
|
171
|
+
|
172
|
+
for (var i = 0; i < controls.length; i++) {
|
173
|
+
navigationRoot = controls[i];
|
174
|
+
|
175
|
+
if (navigationRoot.settings.ariaRoot) {
|
176
|
+
break;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
180
|
+
return navigationRoot;
|
181
|
+
}
|
182
|
+
|
183
|
+
/**
|
184
|
+
* Focuses the first item in the specified targetControl element or the last aria index if the
|
185
|
+
* navigation root has the ariaRemember option enabled.
|
186
|
+
*
|
187
|
+
* @private
|
188
|
+
* @param {tinymce.ui.Control} targetControl Target control to focus the first item in.
|
189
|
+
*/
|
190
|
+
function focusFirst(targetControl) {
|
191
|
+
var navigationRoot = getNavigationRoot(targetControl);
|
192
|
+
var focusElements = getFocusElements(navigationRoot.getEl());
|
193
|
+
|
194
|
+
if (navigationRoot.settings.ariaRemember && "lastAriaIndex" in navigationRoot) {
|
195
|
+
moveFocusToIndex(navigationRoot.lastAriaIndex, focusElements);
|
196
|
+
} else {
|
197
|
+
moveFocusToIndex(0, focusElements);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
|
201
|
+
/**
|
202
|
+
* Moves the focus to the specified index within the elements list.
|
203
|
+
* This will scope the index to the size of the element list if it changed.
|
204
|
+
*
|
205
|
+
* @private
|
206
|
+
* @param {Number} idx Specified index to move to.
|
207
|
+
* @param {Array} elements Array with dom elements to move focus within.
|
208
|
+
* @return {Number} Input index or a changed index if it was out of range.
|
209
|
+
*/
|
210
|
+
function moveFocusToIndex(idx, elements) {
|
211
|
+
if (idx < 0) {
|
212
|
+
idx = elements.length - 1;
|
213
|
+
} else if (idx >= elements.length) {
|
214
|
+
idx = 0;
|
215
|
+
}
|
216
|
+
|
217
|
+
if (elements[idx]) {
|
218
|
+
elements[idx].focus();
|
219
|
+
}
|
220
|
+
|
221
|
+
return idx;
|
222
|
+
}
|
223
|
+
|
224
|
+
/**
|
225
|
+
* Moves the focus forwards or backwards.
|
226
|
+
*
|
227
|
+
* @private
|
228
|
+
* @param {Number} dir Direction to move in positive means forward, negative means backwards.
|
229
|
+
* @param {Array} elements Optional array of elements to move within defaults to the current navigation roots elements.
|
230
|
+
*/
|
231
|
+
function moveFocus(dir, elements) {
|
232
|
+
var idx = -1, navigationRoot = getNavigationRoot();
|
233
|
+
|
234
|
+
elements = elements || getFocusElements(navigationRoot.getEl());
|
235
|
+
|
236
|
+
for (var i = 0; i < elements.length; i++) {
|
237
|
+
if (elements[i] === focusedElement) {
|
238
|
+
idx = i;
|
239
|
+
}
|
240
|
+
}
|
241
|
+
|
242
|
+
idx += dir;
|
243
|
+
navigationRoot.lastAriaIndex = moveFocusToIndex(idx, elements);
|
244
|
+
}
|
245
|
+
|
246
|
+
/**
|
247
|
+
* Moves the focus to the left this is called by the left key.
|
248
|
+
*
|
249
|
+
* @private
|
250
|
+
*/
|
251
|
+
function left() {
|
252
|
+
var parentRole = getParentRole();
|
253
|
+
|
254
|
+
if (parentRole == "tablist") {
|
255
|
+
moveFocus(-1, getFocusElements(focusedElement.parentNode));
|
256
|
+
} else if (focusedControl.parent().submenu) {
|
257
|
+
cancel();
|
258
|
+
} else {
|
259
|
+
moveFocus(-1);
|
260
|
+
}
|
261
|
+
}
|
262
|
+
|
263
|
+
/**
|
264
|
+
* Moves the focus to the right this is called by the right key.
|
265
|
+
*
|
266
|
+
* @private
|
267
|
+
*/
|
268
|
+
function right() {
|
269
|
+
var role = getRole(), parentRole = getParentRole();
|
270
|
+
|
271
|
+
if (parentRole == "tablist") {
|
272
|
+
moveFocus(1, getFocusElements(focusedElement.parentNode));
|
273
|
+
} else if (role == "menuitem" && parentRole == "menu" && getAriaProp('haspopup')) {
|
274
|
+
enter();
|
275
|
+
} else {
|
276
|
+
moveFocus(1);
|
277
|
+
}
|
278
|
+
}
|
279
|
+
|
280
|
+
/**
|
281
|
+
* Moves the focus to the up this is called by the up key.
|
282
|
+
*
|
283
|
+
* @private
|
284
|
+
*/
|
285
|
+
function up() {
|
286
|
+
moveFocus(-1);
|
287
|
+
}
|
288
|
+
|
289
|
+
/**
|
290
|
+
* Moves the focus to the up this is called by the down key.
|
291
|
+
*
|
292
|
+
* @private
|
293
|
+
*/
|
294
|
+
function down() {
|
295
|
+
var role = getRole(), parentRole = getParentRole();
|
296
|
+
|
297
|
+
if (role == "menuitem" && parentRole == "menubar") {
|
298
|
+
enter();
|
299
|
+
} else if (role == "button" && getAriaProp('haspopup')) {
|
300
|
+
enter({key: 'down'});
|
301
|
+
} else {
|
302
|
+
moveFocus(1);
|
303
|
+
}
|
304
|
+
}
|
305
|
+
|
306
|
+
/**
|
307
|
+
* Moves the focus to the next item or previous item depending on shift key.
|
308
|
+
*
|
309
|
+
* @private
|
310
|
+
* @param {DOMEvent} e DOM event object.
|
311
|
+
*/
|
312
|
+
function tab(e) {
|
313
|
+
var parentRole = getParentRole();
|
314
|
+
|
315
|
+
if (parentRole == "tablist") {
|
316
|
+
var elm = getFocusElements(focusedControl.getEl('body'))[0];
|
317
|
+
|
318
|
+
if (elm) {
|
319
|
+
elm.focus();
|
320
|
+
}
|
321
|
+
} else {
|
322
|
+
moveFocus(e.shiftKey ? -1 : 1);
|
323
|
+
}
|
324
|
+
}
|
325
|
+
|
326
|
+
/**
|
327
|
+
* Calls the cancel event on the currently focused control. This is normally done using the Esc key.
|
328
|
+
*
|
329
|
+
* @private
|
330
|
+
*/
|
331
|
+
function cancel() {
|
332
|
+
focusedControl.fire('cancel');
|
333
|
+
}
|
334
|
+
|
335
|
+
/**
|
336
|
+
* Calls the click event on the currently focused control. This is normally done using the Enter/Space keys.
|
337
|
+
*
|
338
|
+
* @private
|
339
|
+
* @param {Object} aria Optional aria data to pass along with the enter event.
|
340
|
+
*/
|
341
|
+
function enter(aria) {
|
342
|
+
aria = aria || {};
|
343
|
+
focusedControl.fire('click', {target: focusedElement, aria: aria});
|
344
|
+
}
|
345
|
+
|
346
|
+
root.on('keydown', function(e) {
|
347
|
+
function handleNonTabOrEscEvent(e, handler) {
|
348
|
+
// Ignore non tab keys for text elements
|
349
|
+
if (isTextInputElement(focusedElement)) {
|
350
|
+
return;
|
351
|
+
}
|
352
|
+
|
353
|
+
if (handler(e) !== false) {
|
354
|
+
e.preventDefault();
|
355
|
+
}
|
356
|
+
}
|
357
|
+
|
358
|
+
if (e.isDefaultPrevented()) {
|
359
|
+
return;
|
360
|
+
}
|
361
|
+
|
362
|
+
switch (e.keyCode) {
|
363
|
+
case 37: // DOM_VK_LEFT
|
364
|
+
handleNonTabOrEscEvent(e, left);
|
365
|
+
break;
|
366
|
+
|
367
|
+
case 39: // DOM_VK_RIGHT
|
368
|
+
handleNonTabOrEscEvent(e, right);
|
369
|
+
break;
|
370
|
+
|
371
|
+
case 38: // DOM_VK_UP
|
372
|
+
handleNonTabOrEscEvent(e, up);
|
373
|
+
break;
|
374
|
+
|
375
|
+
case 40: // DOM_VK_DOWN
|
376
|
+
handleNonTabOrEscEvent(e, down);
|
377
|
+
break;
|
378
|
+
|
379
|
+
case 27: // DOM_VK_ESCAPE
|
380
|
+
cancel();
|
381
|
+
break;
|
382
|
+
|
383
|
+
case 14: // DOM_VK_ENTER
|
384
|
+
case 13: // DOM_VK_RETURN
|
385
|
+
case 32: // DOM_VK_SPACE
|
386
|
+
handleNonTabOrEscEvent(e, enter);
|
387
|
+
break;
|
388
|
+
|
389
|
+
case 9: // DOM_VK_TAB
|
390
|
+
if (tab(e) !== false) {
|
391
|
+
e.preventDefault();
|
392
|
+
}
|
393
|
+
break;
|
394
|
+
}
|
395
|
+
});
|
396
|
+
|
397
|
+
root.on('focusin', function(e) {
|
398
|
+
focusedElement = e.target;
|
399
|
+
focusedControl = e.control;
|
400
|
+
});
|
401
|
+
|
402
|
+
return {
|
403
|
+
focusFirst: focusFirst
|
404
|
+
};
|
405
|
+
};
|
406
|
+
});
|