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,118 @@
|
|
1
|
+
/**
|
2
|
+
* ElementUtils.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
|
+
* Utility class for various element specific functions.
|
13
|
+
*
|
14
|
+
* @private
|
15
|
+
* @class tinymce.dom.ElementUtils
|
16
|
+
*/
|
17
|
+
define("tinymce/dom/ElementUtils", [
|
18
|
+
"tinymce/dom/BookmarkManager",
|
19
|
+
"tinymce/util/Tools"
|
20
|
+
], function(BookmarkManager, Tools) {
|
21
|
+
var each = Tools.each;
|
22
|
+
|
23
|
+
function ElementUtils(dom) {
|
24
|
+
/**
|
25
|
+
* Compares two nodes and checks if it's attributes and styles matches.
|
26
|
+
* This doesn't compare classes as items since their order is significant.
|
27
|
+
*
|
28
|
+
* @method compare
|
29
|
+
* @param {Node} node1 First node to compare with.
|
30
|
+
* @param {Node} node2 Second node to compare with.
|
31
|
+
* @return {boolean} True/false if the nodes are the same or not.
|
32
|
+
*/
|
33
|
+
this.compare = function(node1, node2) {
|
34
|
+
// Not the same name
|
35
|
+
if (node1.nodeName != node2.nodeName) {
|
36
|
+
return false;
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Returns all the nodes attributes excluding internal ones, styles and classes.
|
41
|
+
*
|
42
|
+
* @private
|
43
|
+
* @param {Node} node Node to get attributes from.
|
44
|
+
* @return {Object} Name/value object with attributes and attribute values.
|
45
|
+
*/
|
46
|
+
function getAttribs(node) {
|
47
|
+
var attribs = {};
|
48
|
+
|
49
|
+
each(dom.getAttribs(node), function(attr) {
|
50
|
+
var name = attr.nodeName.toLowerCase();
|
51
|
+
|
52
|
+
// Don't compare internal attributes or style
|
53
|
+
if (name.indexOf('_') !== 0 && name !== 'style' && name !== 'data-mce-style') {
|
54
|
+
attribs[name] = dom.getAttrib(node, name);
|
55
|
+
}
|
56
|
+
});
|
57
|
+
|
58
|
+
return attribs;
|
59
|
+
}
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Compares two objects checks if it's key + value exists in the other one.
|
63
|
+
*
|
64
|
+
* @private
|
65
|
+
* @param {Object} obj1 First object to compare.
|
66
|
+
* @param {Object} obj2 Second object to compare.
|
67
|
+
* @return {boolean} True/false if the objects matches or not.
|
68
|
+
*/
|
69
|
+
function compareObjects(obj1, obj2) {
|
70
|
+
var value, name;
|
71
|
+
|
72
|
+
for (name in obj1) {
|
73
|
+
// Obj1 has item obj2 doesn't have
|
74
|
+
if (obj1.hasOwnProperty(name)) {
|
75
|
+
value = obj2[name];
|
76
|
+
|
77
|
+
// Obj2 doesn't have obj1 item
|
78
|
+
if (typeof value == "undefined") {
|
79
|
+
return false;
|
80
|
+
}
|
81
|
+
|
82
|
+
// Obj2 item has a different value
|
83
|
+
if (obj1[name] != value) {
|
84
|
+
return false;
|
85
|
+
}
|
86
|
+
|
87
|
+
// Delete similar value
|
88
|
+
delete obj2[name];
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
// Check if obj 2 has something obj 1 doesn't have
|
93
|
+
for (name in obj2) {
|
94
|
+
// Obj2 has item obj1 doesn't have
|
95
|
+
if (obj2.hasOwnProperty(name)) {
|
96
|
+
return false;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
return true;
|
101
|
+
}
|
102
|
+
|
103
|
+
// Attribs are not the same
|
104
|
+
if (!compareObjects(getAttribs(node1), getAttribs(node2))) {
|
105
|
+
return false;
|
106
|
+
}
|
107
|
+
|
108
|
+
// Styles are not the same
|
109
|
+
if (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style')))) {
|
110
|
+
return false;
|
111
|
+
}
|
112
|
+
|
113
|
+
return !BookmarkManager.isBookmarkNode(node1) && !BookmarkManager.isBookmarkNode(node2);
|
114
|
+
};
|
115
|
+
}
|
116
|
+
|
117
|
+
return ElementUtils;
|
118
|
+
});
|
@@ -0,0 +1,583 @@
|
|
1
|
+
/**
|
2
|
+
* EventUtils.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 loopfunc:true*/
|
12
|
+
/*eslint no-loop-func:0 */
|
13
|
+
|
14
|
+
/**
|
15
|
+
* This class wraps the browsers native event logic with more convenient methods.
|
16
|
+
*
|
17
|
+
* @class tinymce.dom.EventUtils
|
18
|
+
*/
|
19
|
+
define("tinymce/dom/EventUtils", [
|
20
|
+
"tinymce/util/Delay"
|
21
|
+
], function(Delay) {
|
22
|
+
"use strict";
|
23
|
+
|
24
|
+
var eventExpandoPrefix = "mce-data-";
|
25
|
+
var mouseEventRe = /^(?:mouse|contextmenu)|click/;
|
26
|
+
var deprecated = {keyLocation: 1, layerX: 1, layerY: 1, returnValue: 1, webkitMovementX: 1, webkitMovementY: 1};
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Binds a native event to a callback on the speified target.
|
30
|
+
*/
|
31
|
+
function addEvent(target, name, callback, capture) {
|
32
|
+
if (target.addEventListener) {
|
33
|
+
target.addEventListener(name, callback, capture || false);
|
34
|
+
} else if (target.attachEvent) {
|
35
|
+
target.attachEvent('on' + name, callback);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Unbinds a native event callback on the specified target.
|
41
|
+
*/
|
42
|
+
function removeEvent(target, name, callback, capture) {
|
43
|
+
if (target.removeEventListener) {
|
44
|
+
target.removeEventListener(name, callback, capture || false);
|
45
|
+
} else if (target.detachEvent) {
|
46
|
+
target.detachEvent('on' + name, callback);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Normalizes a native event object or just adds the event specific methods on a custom event.
|
52
|
+
*/
|
53
|
+
function fix(originalEvent, data) {
|
54
|
+
var name, event = data || {}, undef;
|
55
|
+
|
56
|
+
// Dummy function that gets replaced on the delegation state functions
|
57
|
+
function returnFalse() {
|
58
|
+
return false;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Dummy function that gets replaced on the delegation state functions
|
62
|
+
function returnTrue() {
|
63
|
+
return true;
|
64
|
+
}
|
65
|
+
|
66
|
+
// Copy all properties from the original event
|
67
|
+
for (name in originalEvent) {
|
68
|
+
// layerX/layerY is deprecated in Chrome and produces a warning
|
69
|
+
if (!deprecated[name]) {
|
70
|
+
event[name] = originalEvent[name];
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
// Normalize target IE uses srcElement
|
75
|
+
if (!event.target) {
|
76
|
+
event.target = event.srcElement || document;
|
77
|
+
}
|
78
|
+
|
79
|
+
// When target element is inside Shadow DOM we need to take first element from path
|
80
|
+
// otherwise we'll get Shadow Root parent, not actual target element
|
81
|
+
|
82
|
+
// Normalize target for WebComponents v0 implementation (in Chrome)
|
83
|
+
if (event.path) {
|
84
|
+
event.target = event.path[0];
|
85
|
+
}
|
86
|
+
|
87
|
+
// Normalize target for WebComponents v1 implementation (standard)
|
88
|
+
if (event.deepPath) {
|
89
|
+
event.target = event.deepPath[0];
|
90
|
+
}
|
91
|
+
|
92
|
+
// Calculate pageX/Y if missing and clientX/Y available
|
93
|
+
if (originalEvent && mouseEventRe.test(originalEvent.type) && originalEvent.pageX === undef && originalEvent.clientX !== undef) {
|
94
|
+
var eventDoc = event.target.ownerDocument || document;
|
95
|
+
var doc = eventDoc.documentElement;
|
96
|
+
var body = eventDoc.body;
|
97
|
+
|
98
|
+
event.pageX = originalEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) -
|
99
|
+
(doc && doc.clientLeft || body && body.clientLeft || 0);
|
100
|
+
|
101
|
+
event.pageY = originalEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) -
|
102
|
+
(doc && doc.clientTop || body && body.clientTop || 0);
|
103
|
+
}
|
104
|
+
|
105
|
+
// Add preventDefault method
|
106
|
+
event.preventDefault = function() {
|
107
|
+
event.isDefaultPrevented = returnTrue;
|
108
|
+
|
109
|
+
// Execute preventDefault on the original event object
|
110
|
+
if (originalEvent) {
|
111
|
+
if (originalEvent.preventDefault) {
|
112
|
+
originalEvent.preventDefault();
|
113
|
+
} else {
|
114
|
+
originalEvent.returnValue = false; // IE
|
115
|
+
}
|
116
|
+
}
|
117
|
+
};
|
118
|
+
|
119
|
+
// Add stopPropagation
|
120
|
+
event.stopPropagation = function() {
|
121
|
+
event.isPropagationStopped = returnTrue;
|
122
|
+
|
123
|
+
// Execute stopPropagation on the original event object
|
124
|
+
if (originalEvent) {
|
125
|
+
if (originalEvent.stopPropagation) {
|
126
|
+
originalEvent.stopPropagation();
|
127
|
+
} else {
|
128
|
+
originalEvent.cancelBubble = true; // IE
|
129
|
+
}
|
130
|
+
}
|
131
|
+
};
|
132
|
+
|
133
|
+
// Add stopImmediatePropagation
|
134
|
+
event.stopImmediatePropagation = function() {
|
135
|
+
event.isImmediatePropagationStopped = returnTrue;
|
136
|
+
event.stopPropagation();
|
137
|
+
};
|
138
|
+
|
139
|
+
// Add event delegation states
|
140
|
+
if (!event.isDefaultPrevented) {
|
141
|
+
event.isDefaultPrevented = returnFalse;
|
142
|
+
event.isPropagationStopped = returnFalse;
|
143
|
+
event.isImmediatePropagationStopped = returnFalse;
|
144
|
+
}
|
145
|
+
|
146
|
+
// Add missing metaKey for IE 8
|
147
|
+
if (typeof event.metaKey == 'undefined') {
|
148
|
+
event.metaKey = false;
|
149
|
+
}
|
150
|
+
|
151
|
+
return event;
|
152
|
+
}
|
153
|
+
|
154
|
+
/**
|
155
|
+
* Bind a DOMContentLoaded event across browsers and executes the callback once the page DOM is initialized.
|
156
|
+
* It will also set/check the domLoaded state of the event_utils instance so ready isn't called multiple times.
|
157
|
+
*/
|
158
|
+
function bindOnReady(win, callback, eventUtils) {
|
159
|
+
var doc = win.document, event = {type: 'ready'};
|
160
|
+
|
161
|
+
if (eventUtils.domLoaded) {
|
162
|
+
callback(event);
|
163
|
+
return;
|
164
|
+
}
|
165
|
+
|
166
|
+
// Gets called when the DOM is ready
|
167
|
+
function readyHandler() {
|
168
|
+
if (!eventUtils.domLoaded) {
|
169
|
+
eventUtils.domLoaded = true;
|
170
|
+
callback(event);
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
function waitForDomLoaded() {
|
175
|
+
// Check complete or interactive state if there is a body
|
176
|
+
// element on some iframes IE 8 will produce a null body
|
177
|
+
if (doc.readyState === "complete" || (doc.readyState === "interactive" && doc.body)) {
|
178
|
+
removeEvent(doc, "readystatechange", waitForDomLoaded);
|
179
|
+
readyHandler();
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
function tryScroll() {
|
184
|
+
try {
|
185
|
+
// If IE is used, use the trick by Diego Perini licensed under MIT by request to the author.
|
186
|
+
// http://javascript.nwbox.com/IEContentLoaded/
|
187
|
+
doc.documentElement.doScroll("left");
|
188
|
+
} catch (ex) {
|
189
|
+
Delay.setTimeout(tryScroll);
|
190
|
+
return;
|
191
|
+
}
|
192
|
+
|
193
|
+
readyHandler();
|
194
|
+
}
|
195
|
+
|
196
|
+
// Use W3C method
|
197
|
+
if (doc.addEventListener) {
|
198
|
+
if (doc.readyState === "complete") {
|
199
|
+
readyHandler();
|
200
|
+
} else {
|
201
|
+
addEvent(win, 'DOMContentLoaded', readyHandler);
|
202
|
+
}
|
203
|
+
} else {
|
204
|
+
// Use IE method
|
205
|
+
addEvent(doc, "readystatechange", waitForDomLoaded);
|
206
|
+
|
207
|
+
// Wait until we can scroll, when we can the DOM is initialized
|
208
|
+
if (doc.documentElement.doScroll && win.self === win.top) {
|
209
|
+
tryScroll();
|
210
|
+
}
|
211
|
+
}
|
212
|
+
|
213
|
+
// Fallback if any of the above methods should fail for some odd reason
|
214
|
+
addEvent(win, 'load', readyHandler);
|
215
|
+
}
|
216
|
+
|
217
|
+
/**
|
218
|
+
* This class enables you to bind/unbind native events to elements and normalize it's behavior across browsers.
|
219
|
+
*/
|
220
|
+
function EventUtils() {
|
221
|
+
var self = this, events = {}, count, expando, hasFocusIn, hasMouseEnterLeave, mouseEnterLeave;
|
222
|
+
|
223
|
+
expando = eventExpandoPrefix + (+new Date()).toString(32);
|
224
|
+
hasMouseEnterLeave = "onmouseenter" in document.documentElement;
|
225
|
+
hasFocusIn = "onfocusin" in document.documentElement;
|
226
|
+
mouseEnterLeave = {mouseenter: 'mouseover', mouseleave: 'mouseout'};
|
227
|
+
count = 1;
|
228
|
+
|
229
|
+
// State if the DOMContentLoaded was executed or not
|
230
|
+
self.domLoaded = false;
|
231
|
+
self.events = events;
|
232
|
+
|
233
|
+
/**
|
234
|
+
* Executes all event handler callbacks for a specific event.
|
235
|
+
*
|
236
|
+
* @private
|
237
|
+
* @param {Event} evt Event object.
|
238
|
+
* @param {String} id Expando id value to look for.
|
239
|
+
*/
|
240
|
+
function executeHandlers(evt, id) {
|
241
|
+
var callbackList, i, l, callback, container = events[id];
|
242
|
+
|
243
|
+
callbackList = container && container[evt.type];
|
244
|
+
if (callbackList) {
|
245
|
+
for (i = 0, l = callbackList.length; i < l; i++) {
|
246
|
+
callback = callbackList[i];
|
247
|
+
|
248
|
+
// Check if callback exists might be removed if a unbind is called inside the callback
|
249
|
+
if (callback && callback.func.call(callback.scope, evt) === false) {
|
250
|
+
evt.preventDefault();
|
251
|
+
}
|
252
|
+
|
253
|
+
// Should we stop propagation to immediate listeners
|
254
|
+
if (evt.isImmediatePropagationStopped()) {
|
255
|
+
return;
|
256
|
+
}
|
257
|
+
}
|
258
|
+
}
|
259
|
+
}
|
260
|
+
|
261
|
+
/**
|
262
|
+
* Binds a callback to an event on the specified target.
|
263
|
+
*
|
264
|
+
* @method bind
|
265
|
+
* @param {Object} target Target node/window or custom object.
|
266
|
+
* @param {String} names Name of the event to bind.
|
267
|
+
* @param {function} callback Callback function to execute when the event occurs.
|
268
|
+
* @param {Object} scope Scope to call the callback function on, defaults to target.
|
269
|
+
* @return {function} Callback function that got bound.
|
270
|
+
*/
|
271
|
+
self.bind = function(target, names, callback, scope) {
|
272
|
+
var id, callbackList, i, name, fakeName, nativeHandler, capture, win = window;
|
273
|
+
|
274
|
+
// Native event handler function patches the event and executes the callbacks for the expando
|
275
|
+
function defaultNativeHandler(evt) {
|
276
|
+
executeHandlers(fix(evt || win.event), id);
|
277
|
+
}
|
278
|
+
|
279
|
+
// Don't bind to text nodes or comments
|
280
|
+
if (!target || target.nodeType === 3 || target.nodeType === 8) {
|
281
|
+
return;
|
282
|
+
}
|
283
|
+
|
284
|
+
// Create or get events id for the target
|
285
|
+
if (!target[expando]) {
|
286
|
+
id = count++;
|
287
|
+
target[expando] = id;
|
288
|
+
events[id] = {};
|
289
|
+
} else {
|
290
|
+
id = target[expando];
|
291
|
+
}
|
292
|
+
|
293
|
+
// Setup the specified scope or use the target as a default
|
294
|
+
scope = scope || target;
|
295
|
+
|
296
|
+
// Split names and bind each event, enables you to bind multiple events with one call
|
297
|
+
names = names.split(' ');
|
298
|
+
i = names.length;
|
299
|
+
while (i--) {
|
300
|
+
name = names[i];
|
301
|
+
nativeHandler = defaultNativeHandler;
|
302
|
+
fakeName = capture = false;
|
303
|
+
|
304
|
+
// Use ready instead of DOMContentLoaded
|
305
|
+
if (name === "DOMContentLoaded") {
|
306
|
+
name = "ready";
|
307
|
+
}
|
308
|
+
|
309
|
+
// DOM is already ready
|
310
|
+
if (self.domLoaded && name === "ready" && target.readyState == 'complete') {
|
311
|
+
callback.call(scope, fix({type: name}));
|
312
|
+
continue;
|
313
|
+
}
|
314
|
+
|
315
|
+
// Handle mouseenter/mouseleaver
|
316
|
+
if (!hasMouseEnterLeave) {
|
317
|
+
fakeName = mouseEnterLeave[name];
|
318
|
+
|
319
|
+
if (fakeName) {
|
320
|
+
nativeHandler = function(evt) {
|
321
|
+
var current, related;
|
322
|
+
|
323
|
+
current = evt.currentTarget;
|
324
|
+
related = evt.relatedTarget;
|
325
|
+
|
326
|
+
// Check if related is inside the current target if it's not then the event should
|
327
|
+
// be ignored since it's a mouseover/mouseout inside the element
|
328
|
+
if (related && current.contains) {
|
329
|
+
// Use contains for performance
|
330
|
+
related = current.contains(related);
|
331
|
+
} else {
|
332
|
+
while (related && related !== current) {
|
333
|
+
related = related.parentNode;
|
334
|
+
}
|
335
|
+
}
|
336
|
+
|
337
|
+
// Fire fake event
|
338
|
+
if (!related) {
|
339
|
+
evt = fix(evt || win.event);
|
340
|
+
evt.type = evt.type === 'mouseout' ? 'mouseleave' : 'mouseenter';
|
341
|
+
evt.target = current;
|
342
|
+
executeHandlers(evt, id);
|
343
|
+
}
|
344
|
+
};
|
345
|
+
}
|
346
|
+
}
|
347
|
+
|
348
|
+
// Fake bubbling of focusin/focusout
|
349
|
+
if (!hasFocusIn && (name === "focusin" || name === "focusout")) {
|
350
|
+
capture = true;
|
351
|
+
fakeName = name === "focusin" ? "focus" : "blur";
|
352
|
+
nativeHandler = function(evt) {
|
353
|
+
evt = fix(evt || win.event);
|
354
|
+
evt.type = evt.type === 'focus' ? 'focusin' : 'focusout';
|
355
|
+
executeHandlers(evt, id);
|
356
|
+
};
|
357
|
+
}
|
358
|
+
|
359
|
+
// Setup callback list and bind native event
|
360
|
+
callbackList = events[id][name];
|
361
|
+
if (!callbackList) {
|
362
|
+
events[id][name] = callbackList = [{func: callback, scope: scope}];
|
363
|
+
callbackList.fakeName = fakeName;
|
364
|
+
callbackList.capture = capture;
|
365
|
+
//callbackList.callback = callback;
|
366
|
+
|
367
|
+
// Add the nativeHandler to the callback list so that we can later unbind it
|
368
|
+
callbackList.nativeHandler = nativeHandler;
|
369
|
+
|
370
|
+
// Check if the target has native events support
|
371
|
+
|
372
|
+
if (name === "ready") {
|
373
|
+
bindOnReady(target, nativeHandler, self);
|
374
|
+
} else {
|
375
|
+
addEvent(target, fakeName || name, nativeHandler, capture);
|
376
|
+
}
|
377
|
+
} else {
|
378
|
+
if (name === "ready" && self.domLoaded) {
|
379
|
+
callback({type: name});
|
380
|
+
} else {
|
381
|
+
// If it already has an native handler then just push the callback
|
382
|
+
callbackList.push({func: callback, scope: scope});
|
383
|
+
}
|
384
|
+
}
|
385
|
+
}
|
386
|
+
|
387
|
+
target = callbackList = 0; // Clean memory for IE
|
388
|
+
|
389
|
+
return callback;
|
390
|
+
};
|
391
|
+
|
392
|
+
/**
|
393
|
+
* Unbinds the specified event by name, name and callback or all events on the target.
|
394
|
+
*
|
395
|
+
* @method unbind
|
396
|
+
* @param {Object} target Target node/window or custom object.
|
397
|
+
* @param {String} names Optional event name to unbind.
|
398
|
+
* @param {function} callback Optional callback function to unbind.
|
399
|
+
* @return {EventUtils} Event utils instance.
|
400
|
+
*/
|
401
|
+
self.unbind = function(target, names, callback) {
|
402
|
+
var id, callbackList, i, ci, name, eventMap;
|
403
|
+
|
404
|
+
// Don't bind to text nodes or comments
|
405
|
+
if (!target || target.nodeType === 3 || target.nodeType === 8) {
|
406
|
+
return self;
|
407
|
+
}
|
408
|
+
|
409
|
+
// Unbind event or events if the target has the expando
|
410
|
+
id = target[expando];
|
411
|
+
if (id) {
|
412
|
+
eventMap = events[id];
|
413
|
+
|
414
|
+
// Specific callback
|
415
|
+
if (names) {
|
416
|
+
names = names.split(' ');
|
417
|
+
i = names.length;
|
418
|
+
while (i--) {
|
419
|
+
name = names[i];
|
420
|
+
callbackList = eventMap[name];
|
421
|
+
|
422
|
+
// Unbind the event if it exists in the map
|
423
|
+
if (callbackList) {
|
424
|
+
// Remove specified callback
|
425
|
+
if (callback) {
|
426
|
+
ci = callbackList.length;
|
427
|
+
while (ci--) {
|
428
|
+
if (callbackList[ci].func === callback) {
|
429
|
+
var nativeHandler = callbackList.nativeHandler;
|
430
|
+
var fakeName = callbackList.fakeName, capture = callbackList.capture;
|
431
|
+
|
432
|
+
// Clone callbackList since unbind inside a callback would otherwise break the handlers loop
|
433
|
+
callbackList = callbackList.slice(0, ci).concat(callbackList.slice(ci + 1));
|
434
|
+
callbackList.nativeHandler = nativeHandler;
|
435
|
+
callbackList.fakeName = fakeName;
|
436
|
+
callbackList.capture = capture;
|
437
|
+
|
438
|
+
eventMap[name] = callbackList;
|
439
|
+
}
|
440
|
+
}
|
441
|
+
}
|
442
|
+
|
443
|
+
// Remove all callbacks if there isn't a specified callback or there is no callbacks left
|
444
|
+
if (!callback || callbackList.length === 0) {
|
445
|
+
delete eventMap[name];
|
446
|
+
removeEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);
|
447
|
+
}
|
448
|
+
}
|
449
|
+
}
|
450
|
+
} else {
|
451
|
+
// All events for a specific element
|
452
|
+
for (name in eventMap) {
|
453
|
+
callbackList = eventMap[name];
|
454
|
+
removeEvent(target, callbackList.fakeName || name, callbackList.nativeHandler, callbackList.capture);
|
455
|
+
}
|
456
|
+
|
457
|
+
eventMap = {};
|
458
|
+
}
|
459
|
+
|
460
|
+
// Check if object is empty, if it isn't then we won't remove the expando map
|
461
|
+
for (name in eventMap) {
|
462
|
+
return self;
|
463
|
+
}
|
464
|
+
|
465
|
+
// Delete event object
|
466
|
+
delete events[id];
|
467
|
+
|
468
|
+
// Remove expando from target
|
469
|
+
try {
|
470
|
+
// IE will fail here since it can't delete properties from window
|
471
|
+
delete target[expando];
|
472
|
+
} catch (ex) {
|
473
|
+
// IE will set it to null
|
474
|
+
target[expando] = null;
|
475
|
+
}
|
476
|
+
}
|
477
|
+
|
478
|
+
return self;
|
479
|
+
};
|
480
|
+
|
481
|
+
/**
|
482
|
+
* Fires the specified event on the specified target.
|
483
|
+
*
|
484
|
+
* @method fire
|
485
|
+
* @param {Object} target Target node/window or custom object.
|
486
|
+
* @param {String} name Event name to fire.
|
487
|
+
* @param {Object} args Optional arguments to send to the observers.
|
488
|
+
* @return {EventUtils} Event utils instance.
|
489
|
+
*/
|
490
|
+
self.fire = function(target, name, args) {
|
491
|
+
var id;
|
492
|
+
|
493
|
+
// Don't bind to text nodes or comments
|
494
|
+
if (!target || target.nodeType === 3 || target.nodeType === 8) {
|
495
|
+
return self;
|
496
|
+
}
|
497
|
+
|
498
|
+
// Build event object by patching the args
|
499
|
+
args = fix(null, args);
|
500
|
+
args.type = name;
|
501
|
+
args.target = target;
|
502
|
+
|
503
|
+
do {
|
504
|
+
// Found an expando that means there is listeners to execute
|
505
|
+
id = target[expando];
|
506
|
+
if (id) {
|
507
|
+
executeHandlers(args, id);
|
508
|
+
}
|
509
|
+
|
510
|
+
// Walk up the DOM
|
511
|
+
target = target.parentNode || target.ownerDocument || target.defaultView || target.parentWindow;
|
512
|
+
} while (target && !args.isPropagationStopped());
|
513
|
+
|
514
|
+
return self;
|
515
|
+
};
|
516
|
+
|
517
|
+
/**
|
518
|
+
* Removes all bound event listeners for the specified target. This will also remove any bound
|
519
|
+
* listeners to child nodes within that target.
|
520
|
+
*
|
521
|
+
* @method clean
|
522
|
+
* @param {Object} target Target node/window object.
|
523
|
+
* @return {EventUtils} Event utils instance.
|
524
|
+
*/
|
525
|
+
self.clean = function(target) {
|
526
|
+
var i, children, unbind = self.unbind;
|
527
|
+
|
528
|
+
// Don't bind to text nodes or comments
|
529
|
+
if (!target || target.nodeType === 3 || target.nodeType === 8) {
|
530
|
+
return self;
|
531
|
+
}
|
532
|
+
|
533
|
+
// Unbind any element on the specified target
|
534
|
+
if (target[expando]) {
|
535
|
+
unbind(target);
|
536
|
+
}
|
537
|
+
|
538
|
+
// Target doesn't have getElementsByTagName it's probably a window object then use it's document to find the children
|
539
|
+
if (!target.getElementsByTagName) {
|
540
|
+
target = target.document;
|
541
|
+
}
|
542
|
+
|
543
|
+
// Remove events from each child element
|
544
|
+
if (target && target.getElementsByTagName) {
|
545
|
+
unbind(target);
|
546
|
+
|
547
|
+
children = target.getElementsByTagName('*');
|
548
|
+
i = children.length;
|
549
|
+
while (i--) {
|
550
|
+
target = children[i];
|
551
|
+
|
552
|
+
if (target[expando]) {
|
553
|
+
unbind(target);
|
554
|
+
}
|
555
|
+
}
|
556
|
+
}
|
557
|
+
|
558
|
+
return self;
|
559
|
+
};
|
560
|
+
|
561
|
+
/**
|
562
|
+
* Destroys the event object. Call this on IE to remove memory leaks.
|
563
|
+
*/
|
564
|
+
self.destroy = function() {
|
565
|
+
events = {};
|
566
|
+
};
|
567
|
+
|
568
|
+
// Legacy function for canceling events
|
569
|
+
self.cancel = function(e) {
|
570
|
+
if (e) {
|
571
|
+
e.preventDefault();
|
572
|
+
e.stopImmediatePropagation();
|
573
|
+
}
|
574
|
+
|
575
|
+
return false;
|
576
|
+
};
|
577
|
+
}
|
578
|
+
|
579
|
+
EventUtils.Event = new EventUtils();
|
580
|
+
EventUtils.Event.bind(window, 'ready', function() {});
|
581
|
+
|
582
|
+
return EventUtils;
|
583
|
+
});
|