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,72 @@
|
|
1
|
+
/**
|
2
|
+
* ColorBox.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 widget lets you enter colors and browse for colors by pressing the color button. It also displays
|
13
|
+
* a preview of the current color.
|
14
|
+
*
|
15
|
+
* @-x-less ColorBox.less
|
16
|
+
* @class tinymce.ui.ColorBox
|
17
|
+
* @extends tinymce.ui.ComboBox
|
18
|
+
*/
|
19
|
+
define("tinymce/ui/ColorBox", [
|
20
|
+
"tinymce/ui/ComboBox"
|
21
|
+
], function(ComboBox) {
|
22
|
+
"use strict";
|
23
|
+
|
24
|
+
return ComboBox.extend({
|
25
|
+
/**
|
26
|
+
* Constructs a new control instance with the specified settings.
|
27
|
+
*
|
28
|
+
* @constructor
|
29
|
+
* @param {Object} settings Name/value object with settings.
|
30
|
+
*/
|
31
|
+
init: function(settings) {
|
32
|
+
var self = this;
|
33
|
+
|
34
|
+
settings.spellcheck = false;
|
35
|
+
|
36
|
+
if (settings.onaction) {
|
37
|
+
settings.icon = 'none';
|
38
|
+
}
|
39
|
+
|
40
|
+
self._super(settings);
|
41
|
+
|
42
|
+
self.classes.add('colorbox');
|
43
|
+
self.on('change keyup postrender', function() {
|
44
|
+
self.repaintColor(self.value());
|
45
|
+
});
|
46
|
+
},
|
47
|
+
|
48
|
+
repaintColor: function(value) {
|
49
|
+
var elm = this.getEl().getElementsByTagName('i')[0];
|
50
|
+
|
51
|
+
if (elm) {
|
52
|
+
try {
|
53
|
+
elm.style.background = value;
|
54
|
+
} catch (ex) {
|
55
|
+
// Ignore
|
56
|
+
}
|
57
|
+
}
|
58
|
+
},
|
59
|
+
|
60
|
+
bindStates: function() {
|
61
|
+
var self = this;
|
62
|
+
|
63
|
+
self.state.on('change:value', function(e) {
|
64
|
+
if (self._rendered) {
|
65
|
+
self.repaintColor(e.value);
|
66
|
+
}
|
67
|
+
});
|
68
|
+
|
69
|
+
return self._super();
|
70
|
+
}
|
71
|
+
});
|
72
|
+
});
|
@@ -0,0 +1,124 @@
|
|
1
|
+
/**
|
2
|
+
* ColorButton.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 creates a color button control. This is a split button in which the main
|
13
|
+
* button has a visual representation of the currently selected color. When clicked
|
14
|
+
* the caret button displays a color picker, allowing the user to select a new color.
|
15
|
+
*
|
16
|
+
* @-x-less ColorButton.less
|
17
|
+
* @class tinymce.ui.ColorButton
|
18
|
+
* @extends tinymce.ui.PanelButton
|
19
|
+
*/
|
20
|
+
define("tinymce/ui/ColorButton", [
|
21
|
+
"tinymce/ui/PanelButton",
|
22
|
+
"tinymce/dom/DOMUtils"
|
23
|
+
], function(PanelButton, DomUtils) {
|
24
|
+
"use strict";
|
25
|
+
|
26
|
+
var DOM = DomUtils.DOM;
|
27
|
+
|
28
|
+
return PanelButton.extend({
|
29
|
+
/**
|
30
|
+
* Constructs a new ColorButton instance with the specified settings.
|
31
|
+
*
|
32
|
+
* @constructor
|
33
|
+
* @param {Object} settings Name/value object with settings.
|
34
|
+
*/
|
35
|
+
init: function(settings) {
|
36
|
+
this._super(settings);
|
37
|
+
this.classes.add('colorbutton');
|
38
|
+
},
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Getter/setter for the current color.
|
42
|
+
*
|
43
|
+
* @method color
|
44
|
+
* @param {String} [color] Color to set.
|
45
|
+
* @return {String|tinymce.ui.ColorButton} Current color or current instance.
|
46
|
+
*/
|
47
|
+
color: function(color) {
|
48
|
+
if (color) {
|
49
|
+
this._color = color;
|
50
|
+
this.getEl('preview').style.backgroundColor = color;
|
51
|
+
return this;
|
52
|
+
}
|
53
|
+
|
54
|
+
return this._color;
|
55
|
+
},
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Resets the current color.
|
59
|
+
*
|
60
|
+
* @method resetColor
|
61
|
+
* @return {tinymce.ui.ColorButton} Current instance.
|
62
|
+
*/
|
63
|
+
resetColor: function() {
|
64
|
+
this._color = null;
|
65
|
+
this.getEl('preview').style.backgroundColor = null;
|
66
|
+
return this;
|
67
|
+
},
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Renders the control as a HTML string.
|
71
|
+
*
|
72
|
+
* @method renderHtml
|
73
|
+
* @return {String} HTML representing the control.
|
74
|
+
*/
|
75
|
+
renderHtml: function() {
|
76
|
+
var self = this, id = self._id, prefix = self.classPrefix, text = self.state.get('text');
|
77
|
+
var icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';
|
78
|
+
var image = self.settings.image ? ' style="background-image: url(\'' + self.settings.image + '\')"' : '',
|
79
|
+
textHtml = '';
|
80
|
+
|
81
|
+
if (text) {
|
82
|
+
self.classes.add('btn-has-text');
|
83
|
+
textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
|
84
|
+
}
|
85
|
+
|
86
|
+
return (
|
87
|
+
'<div id="' + id + '" class="' + self.classes + '" role="button" tabindex="-1" aria-haspopup="true">' +
|
88
|
+
'<button role="presentation" hidefocus="1" type="button" tabindex="-1">' +
|
89
|
+
(icon ? '<i class="' + icon + '"' + image + '></i>' : '') +
|
90
|
+
'<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' +
|
91
|
+
textHtml +
|
92
|
+
'</button>' +
|
93
|
+
'<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' +
|
94
|
+
' <i class="' + prefix + 'caret"></i>' +
|
95
|
+
'</button>' +
|
96
|
+
'</div>'
|
97
|
+
);
|
98
|
+
},
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Called after the control has been rendered.
|
102
|
+
*
|
103
|
+
* @method postRender
|
104
|
+
*/
|
105
|
+
postRender: function() {
|
106
|
+
var self = this, onClickHandler = self.settings.onclick;
|
107
|
+
|
108
|
+
self.on('click', function(e) {
|
109
|
+
if (e.aria && e.aria.key == 'down') {
|
110
|
+
return;
|
111
|
+
}
|
112
|
+
|
113
|
+
if (e.control == self && !DOM.getParent(e.target, '.' + self.classPrefix + 'open')) {
|
114
|
+
e.stopImmediatePropagation();
|
115
|
+
onClickHandler.call(self, e);
|
116
|
+
}
|
117
|
+
});
|
118
|
+
|
119
|
+
delete self.settings.onclick;
|
120
|
+
|
121
|
+
return self._super();
|
122
|
+
}
|
123
|
+
});
|
124
|
+
});
|
@@ -0,0 +1,206 @@
|
|
1
|
+
/**
|
2
|
+
* ColorPicker.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
|
+
* Color picker widget lets you select colors.
|
13
|
+
*
|
14
|
+
* @-x-less ColorPicker.less
|
15
|
+
* @class tinymce.ui.ColorPicker
|
16
|
+
* @extends tinymce.ui.Widget
|
17
|
+
*/
|
18
|
+
define("tinymce/ui/ColorPicker", [
|
19
|
+
"tinymce/ui/Widget",
|
20
|
+
"tinymce/ui/DragHelper",
|
21
|
+
"tinymce/ui/DomUtils",
|
22
|
+
"tinymce/util/Color"
|
23
|
+
], function(Widget, DragHelper, DomUtils, Color) {
|
24
|
+
"use strict";
|
25
|
+
|
26
|
+
return Widget.extend({
|
27
|
+
Defaults: {
|
28
|
+
classes: "widget colorpicker"
|
29
|
+
},
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Constructs a new colorpicker instance with the specified settings.
|
33
|
+
*
|
34
|
+
* @constructor
|
35
|
+
* @param {Object} settings Name/value object with settings.
|
36
|
+
* @setting {String} color Initial color value.
|
37
|
+
*/
|
38
|
+
init: function(settings) {
|
39
|
+
this._super(settings);
|
40
|
+
},
|
41
|
+
|
42
|
+
postRender: function() {
|
43
|
+
var self = this, color = self.color(), hsv, hueRootElm, huePointElm, svRootElm, svPointElm;
|
44
|
+
|
45
|
+
hueRootElm = self.getEl('h');
|
46
|
+
huePointElm = self.getEl('hp');
|
47
|
+
svRootElm = self.getEl('sv');
|
48
|
+
svPointElm = self.getEl('svp');
|
49
|
+
|
50
|
+
function getPos(elm, event) {
|
51
|
+
var pos = DomUtils.getPos(elm), x, y;
|
52
|
+
|
53
|
+
x = event.pageX - pos.x;
|
54
|
+
y = event.pageY - pos.y;
|
55
|
+
|
56
|
+
x = Math.max(0, Math.min(x / elm.clientWidth, 1));
|
57
|
+
y = Math.max(0, Math.min(y / elm.clientHeight, 1));
|
58
|
+
|
59
|
+
return {
|
60
|
+
x: x,
|
61
|
+
y: y
|
62
|
+
};
|
63
|
+
}
|
64
|
+
|
65
|
+
function updateColor(hsv, hueUpdate) {
|
66
|
+
var hue = (360 - hsv.h) / 360;
|
67
|
+
|
68
|
+
DomUtils.css(huePointElm, {
|
69
|
+
top: (hue * 100) + '%'
|
70
|
+
});
|
71
|
+
|
72
|
+
if (!hueUpdate) {
|
73
|
+
DomUtils.css(svPointElm, {
|
74
|
+
left: hsv.s + '%',
|
75
|
+
top: (100 - hsv.v) + '%'
|
76
|
+
});
|
77
|
+
}
|
78
|
+
|
79
|
+
svRootElm.style.background = new Color({s: 100, v: 100, h: hsv.h}).toHex();
|
80
|
+
self.color().parse({s: hsv.s, v: hsv.v, h: hsv.h});
|
81
|
+
}
|
82
|
+
|
83
|
+
function updateSaturationAndValue(e) {
|
84
|
+
var pos;
|
85
|
+
|
86
|
+
pos = getPos(svRootElm, e);
|
87
|
+
hsv.s = pos.x * 100;
|
88
|
+
hsv.v = (1 - pos.y) * 100;
|
89
|
+
|
90
|
+
updateColor(hsv);
|
91
|
+
self.fire('change');
|
92
|
+
}
|
93
|
+
|
94
|
+
function updateHue(e) {
|
95
|
+
var pos;
|
96
|
+
|
97
|
+
pos = getPos(hueRootElm, e);
|
98
|
+
hsv = color.toHsv();
|
99
|
+
hsv.h = (1 - pos.y) * 360;
|
100
|
+
updateColor(hsv, true);
|
101
|
+
self.fire('change');
|
102
|
+
}
|
103
|
+
|
104
|
+
self._repaint = function() {
|
105
|
+
hsv = color.toHsv();
|
106
|
+
updateColor(hsv);
|
107
|
+
};
|
108
|
+
|
109
|
+
self._super();
|
110
|
+
|
111
|
+
self._svdraghelper = new DragHelper(self._id + '-sv', {
|
112
|
+
start: updateSaturationAndValue,
|
113
|
+
drag: updateSaturationAndValue
|
114
|
+
});
|
115
|
+
|
116
|
+
self._hdraghelper = new DragHelper(self._id + '-h', {
|
117
|
+
start: updateHue,
|
118
|
+
drag: updateHue
|
119
|
+
});
|
120
|
+
|
121
|
+
self._repaint();
|
122
|
+
},
|
123
|
+
|
124
|
+
rgb: function() {
|
125
|
+
return this.color().toRgb();
|
126
|
+
},
|
127
|
+
|
128
|
+
value: function(value) {
|
129
|
+
var self = this;
|
130
|
+
|
131
|
+
if (arguments.length) {
|
132
|
+
self.color().parse(value);
|
133
|
+
|
134
|
+
if (self._rendered) {
|
135
|
+
self._repaint();
|
136
|
+
}
|
137
|
+
} else {
|
138
|
+
return self.color().toHex();
|
139
|
+
}
|
140
|
+
},
|
141
|
+
|
142
|
+
color: function() {
|
143
|
+
if (!this._color) {
|
144
|
+
this._color = new Color();
|
145
|
+
}
|
146
|
+
|
147
|
+
return this._color;
|
148
|
+
},
|
149
|
+
|
150
|
+
/**
|
151
|
+
* Renders the control as a HTML string.
|
152
|
+
*
|
153
|
+
* @method renderHtml
|
154
|
+
* @return {String} HTML representing the control.
|
155
|
+
*/
|
156
|
+
renderHtml: function() {
|
157
|
+
var self = this, id = self._id, prefix = self.classPrefix, hueHtml;
|
158
|
+
var stops = '#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000';
|
159
|
+
|
160
|
+
function getOldIeFallbackHtml() {
|
161
|
+
var i, l, html = '', gradientPrefix, stopsList;
|
162
|
+
|
163
|
+
gradientPrefix = 'filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=';
|
164
|
+
stopsList = stops.split(',');
|
165
|
+
for (i = 0, l = stopsList.length - 1; i < l; i++) {
|
166
|
+
html += (
|
167
|
+
'<div class="' + prefix + 'colorpicker-h-chunk" style="' +
|
168
|
+
'height:' + (100 / l) + '%;' +
|
169
|
+
gradientPrefix + stopsList[i] + ',endColorstr=' + stopsList[i + 1] + ');' +
|
170
|
+
'-ms-' + gradientPrefix + stopsList[i] + ',endColorstr=' + stopsList[i + 1] + ')' +
|
171
|
+
'"></div>'
|
172
|
+
);
|
173
|
+
}
|
174
|
+
|
175
|
+
return html;
|
176
|
+
}
|
177
|
+
|
178
|
+
var gradientCssText = (
|
179
|
+
'background: -ms-linear-gradient(top,' + stops + ');' +
|
180
|
+
'background: linear-gradient(to bottom,' + stops + ');'
|
181
|
+
);
|
182
|
+
|
183
|
+
hueHtml = (
|
184
|
+
'<div id="' + id + '-h" class="' + prefix + 'colorpicker-h" style="' + gradientCssText + '">' +
|
185
|
+
getOldIeFallbackHtml() +
|
186
|
+
'<div id="' + id + '-hp" class="' + prefix + 'colorpicker-h-marker"></div>' +
|
187
|
+
'</div>'
|
188
|
+
);
|
189
|
+
|
190
|
+
return (
|
191
|
+
'<div id="' + id + '" class="' + self.classes + '">' +
|
192
|
+
'<div id="' + id + '-sv" class="' + prefix + 'colorpicker-sv">' +
|
193
|
+
'<div class="' + prefix + 'colorpicker-overlay1">' +
|
194
|
+
'<div class="' + prefix + 'colorpicker-overlay2">' +
|
195
|
+
'<div id="' + id + '-svp" class="' + prefix + 'colorpicker-selector1">' +
|
196
|
+
'<div class="' + prefix + 'colorpicker-selector2"></div>' +
|
197
|
+
'</div>' +
|
198
|
+
'</div>' +
|
199
|
+
'</div>' +
|
200
|
+
'</div>' +
|
201
|
+
hueHtml +
|
202
|
+
'</div>'
|
203
|
+
);
|
204
|
+
}
|
205
|
+
});
|
206
|
+
});
|
@@ -0,0 +1,306 @@
|
|
1
|
+
/**
|
2
|
+
* ComboBox.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 creates a combobox control. Select box that you select a value from or
|
13
|
+
* type a value into.
|
14
|
+
*
|
15
|
+
* @-x-less ComboBox.less
|
16
|
+
* @class tinymce.ui.ComboBox
|
17
|
+
* @extends tinymce.ui.Widget
|
18
|
+
*/
|
19
|
+
define("tinymce/ui/ComboBox", [
|
20
|
+
"tinymce/ui/Widget",
|
21
|
+
"tinymce/ui/Factory",
|
22
|
+
"tinymce/ui/DomUtils",
|
23
|
+
"tinymce/dom/DomQuery"
|
24
|
+
], function(Widget, Factory, DomUtils, $) {
|
25
|
+
"use strict";
|
26
|
+
|
27
|
+
return Widget.extend({
|
28
|
+
/**
|
29
|
+
* Constructs a new control instance with the specified settings.
|
30
|
+
*
|
31
|
+
* @constructor
|
32
|
+
* @param {Object} settings Name/value object with settings.
|
33
|
+
* @setting {String} placeholder Placeholder text to display.
|
34
|
+
*/
|
35
|
+
init: function(settings) {
|
36
|
+
var self = this;
|
37
|
+
|
38
|
+
self._super(settings);
|
39
|
+
settings = self.settings;
|
40
|
+
|
41
|
+
self.classes.add('combobox');
|
42
|
+
self.subinput = true;
|
43
|
+
self.ariaTarget = 'inp'; // TODO: Figure out a better way
|
44
|
+
|
45
|
+
settings.menu = settings.menu || settings.values;
|
46
|
+
|
47
|
+
if (settings.menu) {
|
48
|
+
settings.icon = 'caret';
|
49
|
+
}
|
50
|
+
|
51
|
+
self.on('click', function(e) {
|
52
|
+
var elm = e.target, root = self.getEl();
|
53
|
+
|
54
|
+
if (!$.contains(root, elm) && elm != root) {
|
55
|
+
return;
|
56
|
+
}
|
57
|
+
|
58
|
+
while (elm && elm != root) {
|
59
|
+
if (elm.id && elm.id.indexOf('-open') != -1) {
|
60
|
+
self.fire('action');
|
61
|
+
|
62
|
+
if (settings.menu) {
|
63
|
+
self.showMenu();
|
64
|
+
|
65
|
+
if (e.aria) {
|
66
|
+
self.menu.items()[0].focus();
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
elm = elm.parentNode;
|
72
|
+
}
|
73
|
+
});
|
74
|
+
|
75
|
+
// TODO: Rework this
|
76
|
+
self.on('keydown', function(e) {
|
77
|
+
if (e.target.nodeName == "INPUT" && e.keyCode == 13) {
|
78
|
+
self.parents().reverse().each(function(ctrl) {
|
79
|
+
var stateValue = self.state.get('value'), inputValue = self.getEl('inp').value;
|
80
|
+
|
81
|
+
e.preventDefault();
|
82
|
+
|
83
|
+
self.state.set('value', inputValue);
|
84
|
+
|
85
|
+
if (stateValue != inputValue) {
|
86
|
+
self.fire('change');
|
87
|
+
}
|
88
|
+
|
89
|
+
if (ctrl.hasEventListeners('submit') && ctrl.toJSON) {
|
90
|
+
ctrl.fire('submit', {data: ctrl.toJSON()});
|
91
|
+
return false;
|
92
|
+
}
|
93
|
+
});
|
94
|
+
}
|
95
|
+
});
|
96
|
+
|
97
|
+
self.on('keyup', function(e) {
|
98
|
+
if (e.target.nodeName == "INPUT") {
|
99
|
+
self.state.set('value', e.target.value);
|
100
|
+
}
|
101
|
+
});
|
102
|
+
},
|
103
|
+
|
104
|
+
showMenu: function() {
|
105
|
+
var self = this, settings = self.settings, menu;
|
106
|
+
|
107
|
+
if (!self.menu) {
|
108
|
+
menu = settings.menu || [];
|
109
|
+
|
110
|
+
// Is menu array then auto constuct menu control
|
111
|
+
if (menu.length) {
|
112
|
+
menu = {
|
113
|
+
type: 'menu',
|
114
|
+
items: menu
|
115
|
+
};
|
116
|
+
} else {
|
117
|
+
menu.type = menu.type || 'menu';
|
118
|
+
}
|
119
|
+
|
120
|
+
self.menu = Factory.create(menu).parent(self).renderTo(self.getContainerElm());
|
121
|
+
self.fire('createmenu');
|
122
|
+
self.menu.reflow();
|
123
|
+
self.menu.on('cancel', function(e) {
|
124
|
+
if (e.control === self.menu) {
|
125
|
+
self.focus();
|
126
|
+
}
|
127
|
+
});
|
128
|
+
|
129
|
+
self.menu.on('show hide', function(e) {
|
130
|
+
e.control.items().each(function(ctrl) {
|
131
|
+
ctrl.active(ctrl.value() == self.value());
|
132
|
+
});
|
133
|
+
}).fire('show');
|
134
|
+
|
135
|
+
self.menu.on('select', function(e) {
|
136
|
+
self.value(e.control.value());
|
137
|
+
});
|
138
|
+
|
139
|
+
self.on('focusin', function(e) {
|
140
|
+
if (e.target.tagName.toUpperCase() == 'INPUT') {
|
141
|
+
self.menu.hide();
|
142
|
+
}
|
143
|
+
});
|
144
|
+
|
145
|
+
self.aria('expanded', true);
|
146
|
+
}
|
147
|
+
|
148
|
+
self.menu.show();
|
149
|
+
self.menu.layoutRect({w: self.layoutRect().w});
|
150
|
+
self.menu.moveRel(self.getEl(), self.isRtl() ? ['br-tr', 'tr-br'] : ['bl-tl', 'tl-bl']);
|
151
|
+
},
|
152
|
+
|
153
|
+
/**
|
154
|
+
* Focuses the input area of the control.
|
155
|
+
*
|
156
|
+
* @method focus
|
157
|
+
*/
|
158
|
+
focus: function() {
|
159
|
+
this.getEl('inp').focus();
|
160
|
+
},
|
161
|
+
|
162
|
+
/**
|
163
|
+
* Repaints the control after a layout operation.
|
164
|
+
*
|
165
|
+
* @method repaint
|
166
|
+
*/
|
167
|
+
repaint: function() {
|
168
|
+
var self = this, elm = self.getEl(), openElm = self.getEl('open'), rect = self.layoutRect();
|
169
|
+
var width, lineHeight;
|
170
|
+
|
171
|
+
if (openElm) {
|
172
|
+
width = rect.w - DomUtils.getSize(openElm).width - 10;
|
173
|
+
} else {
|
174
|
+
width = rect.w - 10;
|
175
|
+
}
|
176
|
+
|
177
|
+
// Detect old IE 7+8 add lineHeight to align caret vertically in the middle
|
178
|
+
var doc = document;
|
179
|
+
if (doc.all && (!doc.documentMode || doc.documentMode <= 8)) {
|
180
|
+
lineHeight = (self.layoutRect().h - 2) + 'px';
|
181
|
+
}
|
182
|
+
|
183
|
+
$(elm.firstChild).css({
|
184
|
+
width: width,
|
185
|
+
lineHeight: lineHeight
|
186
|
+
});
|
187
|
+
|
188
|
+
self._super();
|
189
|
+
|
190
|
+
return self;
|
191
|
+
},
|
192
|
+
|
193
|
+
/**
|
194
|
+
* Post render method. Called after the control has been rendered to the target.
|
195
|
+
*
|
196
|
+
* @method postRender
|
197
|
+
* @return {tinymce.ui.ComboBox} Current combobox instance.
|
198
|
+
*/
|
199
|
+
postRender: function() {
|
200
|
+
var self = this;
|
201
|
+
|
202
|
+
$(this.getEl('inp')).on('change', function(e) {
|
203
|
+
self.state.set('value', e.target.value);
|
204
|
+
self.fire('change', e);
|
205
|
+
});
|
206
|
+
|
207
|
+
return self._super();
|
208
|
+
},
|
209
|
+
|
210
|
+
/**
|
211
|
+
* Renders the control as a HTML string.
|
212
|
+
*
|
213
|
+
* @method renderHtml
|
214
|
+
* @return {String} HTML representing the control.
|
215
|
+
*/
|
216
|
+
renderHtml: function() {
|
217
|
+
var self = this, id = self._id, settings = self.settings, prefix = self.classPrefix;
|
218
|
+
var value = self.state.get('value') || '';
|
219
|
+
var icon, text, openBtnHtml = '', extraAttrs = '';
|
220
|
+
|
221
|
+
if ("spellcheck" in settings) {
|
222
|
+
extraAttrs += ' spellcheck="' + settings.spellcheck + '"';
|
223
|
+
}
|
224
|
+
|
225
|
+
if (settings.maxLength) {
|
226
|
+
extraAttrs += ' maxlength="' + settings.maxLength + '"';
|
227
|
+
}
|
228
|
+
|
229
|
+
if (settings.size) {
|
230
|
+
extraAttrs += ' size="' + settings.size + '"';
|
231
|
+
}
|
232
|
+
|
233
|
+
if (settings.subtype) {
|
234
|
+
extraAttrs += ' type="' + settings.subtype + '"';
|
235
|
+
}
|
236
|
+
|
237
|
+
if (self.disabled()) {
|
238
|
+
extraAttrs += ' disabled="disabled"';
|
239
|
+
}
|
240
|
+
|
241
|
+
icon = settings.icon;
|
242
|
+
if (icon && icon != 'caret') {
|
243
|
+
icon = prefix + 'ico ' + prefix + 'i-' + settings.icon;
|
244
|
+
}
|
245
|
+
|
246
|
+
text = self.state.get('text');
|
247
|
+
|
248
|
+
if (icon || text) {
|
249
|
+
openBtnHtml = (
|
250
|
+
'<div id="' + id + '-open" class="' + prefix + 'btn ' + prefix + 'open" tabIndex="-1" role="button">' +
|
251
|
+
'<button id="' + id + '-action" type="button" hidefocus="1" tabindex="-1">' +
|
252
|
+
(icon != 'caret' ? '<i class="' + icon + '"></i>' : '<i class="' + prefix + 'caret"></i>') +
|
253
|
+
(text ? (icon ? ' ' : '') + text : '') +
|
254
|
+
'</button>' +
|
255
|
+
'</div>'
|
256
|
+
);
|
257
|
+
|
258
|
+
self.classes.add('has-open');
|
259
|
+
}
|
260
|
+
|
261
|
+
return (
|
262
|
+
'<div id="' + id + '" class="' + self.classes + '">' +
|
263
|
+
'<input id="' + id + '-inp" class="' + prefix + 'textbox" value="' +
|
264
|
+
self.encode(value, false) + '" hidefocus="1"' + extraAttrs + ' placeholder="' +
|
265
|
+
self.encode(settings.placeholder) + '" />' +
|
266
|
+
openBtnHtml +
|
267
|
+
'</div>'
|
268
|
+
);
|
269
|
+
},
|
270
|
+
|
271
|
+
value: function(value) {
|
272
|
+
if (arguments.length) {
|
273
|
+
this.state.set('value', value);
|
274
|
+
return this;
|
275
|
+
}
|
276
|
+
|
277
|
+
// Make sure the real state is in sync
|
278
|
+
if (this.state.get('rendered')) {
|
279
|
+
this.state.set('value', this.getEl('inp').value);
|
280
|
+
}
|
281
|
+
|
282
|
+
return this.state.get('value');
|
283
|
+
},
|
284
|
+
|
285
|
+
bindStates: function() {
|
286
|
+
var self = this;
|
287
|
+
|
288
|
+
self.state.on('change:value', function(e) {
|
289
|
+
if (self.getEl('inp').value != e.value) {
|
290
|
+
self.getEl('inp').value = e.value;
|
291
|
+
}
|
292
|
+
});
|
293
|
+
|
294
|
+
self.state.on('change:disabled', function(e) {
|
295
|
+
self.getEl('inp').disabled = e.value;
|
296
|
+
});
|
297
|
+
|
298
|
+
return self._super();
|
299
|
+
},
|
300
|
+
|
301
|
+
remove: function() {
|
302
|
+
$(this.getEl('inp')).off();
|
303
|
+
this._super();
|
304
|
+
}
|
305
|
+
});
|
306
|
+
});
|