gnuside-aloha-rails 0.23.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +18 -0
- data/README.md +48 -0
- data/Rakefile +69 -0
- data/app/assets/javascripts/aloha.js +3 -0
- data/app/assets/javascripts/aloha/preinit.js.erb +1 -0
- data/lib/aloha-rails.rb +1 -0
- data/lib/aloha/rails.rb +2 -0
- data/lib/aloha/rails/engine.rb +9 -0
- data/lib/aloha/rails/version.rb +7 -0
- data/lib/tasks/aloha-assets.rake +9 -0
- data/vendor/assets/javascripts/aloha/css/aloha.scss +31 -0
- data/vendor/assets/javascripts/aloha/img/arrow-down.png +0 -0
- data/vendor/assets/javascripts/aloha/img/arrow-left.png +0 -0
- data/vendor/assets/javascripts/aloha/img/arrow.png +0 -0
- data/vendor/assets/javascripts/aloha/img/base-multi.png +0 -0
- data/vendor/assets/javascripts/aloha/img/base.png +0 -0
- data/vendor/assets/javascripts/aloha/img/bg.png +0 -0
- data/vendor/assets/javascripts/aloha/img/breadcrumb-divider.png +0 -0
- data/vendor/assets/javascripts/aloha/img/gentics-logo.png +0 -0
- data/vendor/assets/javascripts/aloha/img/grabhandle.png +0 -0
- data/vendor/assets/javascripts/aloha/img/maximize.png +0 -0
- data/vendor/assets/javascripts/aloha/img/multisplit-base.jpg +0 -0
- data/vendor/assets/javascripts/aloha/img/multisplit-close.gif +0 -0
- data/vendor/assets/javascripts/aloha/img/multisplit-open.gif +0 -0
- data/vendor/assets/javascripts/aloha/img/pin.png +0 -0
- data/vendor/assets/javascripts/aloha/img/removeformat.png +0 -0
- data/vendor/assets/javascripts/aloha/img/text_indent.png +0 -0
- data/vendor/assets/javascripts/aloha/img/text_indent_remove.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/aloha-jquery-noconflict.js +14 -0
- data/vendor/assets/javascripts/aloha/lib/aloha.js +595 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/block-jump.js +153 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/command.js +287 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/console.js +347 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/contenthandlermanager.js +104 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/copypaste.js +108 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/core.js +623 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ecma5shims.js +326 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/editable.js +1042 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/engine.js +8646 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ephemera.js +492 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ierange-m2.js +29 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/jquery.aloha.js +542 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/markup.js +1276 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/nls/ca/i18n.js +11 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/nls/de/i18n.js +11 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/nls/i18n.js +20 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/nls/mk/i18n.js +11 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/nls/pt-br/i18n.js +11 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/nls/ru/i18n.js +11 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/nls/uk/i18n.js +11 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/nls/zh-hans/i18n.js +11 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/observable.js +113 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/plugin.js +281 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/pluginmanager.js +203 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/rangy-core.js +30 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/registry.js +137 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/repository.js +255 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/repositorymanager.js +742 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/repositoryobjects.js +162 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/selection.js +2402 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/sidebar.js +1045 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/state-override.js +147 -0
- data/vendor/assets/javascripts/aloha/lib/css.js +455 -0
- data/vendor/assets/javascripts/aloha/lib/i18n.js +192 -0
- data/vendor/assets/javascripts/aloha/lib/require.js +2053 -0
- data/vendor/assets/javascripts/aloha/lib/text.js +288 -0
- data/vendor/assets/javascripts/aloha/lib/util/arrays.js +287 -0
- data/vendor/assets/javascripts/aloha/lib/util/boundary-markers.js +86 -0
- data/vendor/assets/javascripts/aloha/lib/util/browser.js +32 -0
- data/vendor/assets/javascripts/aloha/lib/util/class.js +78 -0
- data/vendor/assets/javascripts/aloha/lib/util/dom.js +1888 -0
- data/vendor/assets/javascripts/aloha/lib/util/dom2.js +908 -0
- data/vendor/assets/javascripts/aloha/lib/util/functions.js +62 -0
- data/vendor/assets/javascripts/aloha/lib/util/html.js +311 -0
- data/vendor/assets/javascripts/aloha/lib/util/json2.js +464 -0
- data/vendor/assets/javascripts/aloha/lib/util/keys.js +65 -0
- data/vendor/assets/javascripts/aloha/lib/util/lang.js +89 -0
- data/vendor/assets/javascripts/aloha/lib/util/maps.js +130 -0
- data/vendor/assets/javascripts/aloha/lib/util/misc.js +51 -0
- data/vendor/assets/javascripts/aloha/lib/util/position.js +176 -0
- data/vendor/assets/javascripts/aloha/lib/util/range-context.js +776 -0
- data/vendor/assets/javascripts/aloha/lib/util/range.js +917 -0
- data/vendor/assets/javascripts/aloha/lib/util/strings.js +122 -0
- data/vendor/assets/javascripts/aloha/lib/util/trees.js +336 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/3rdparty.txt +70 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/amplify.store.js +298 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/class.js +76 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/grid.locale.de.js +138 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/grid.locale.en.js +133 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ierange-m2.js +508 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/jquery-1.7.2.js +9421 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/jquery-ui-1.9.0.custom-aloha.js +14711 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/jquery.jqgrid.js +474 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/jquery.jstree.js +4549 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/jquery.layout-1.3.0-rc30.7.js +5924 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/pubsub/js/pubsub-unminified.js +187 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/pubsub/js/pubsub.js +2 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/rangy-core.js +3295 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/css/jstree.css +88 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/css/repository-browser.css +744 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-000-medium.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-180.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-315-medium.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-stop-180.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow-stop.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/arrow.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/control-stop-square-small.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/folder-horizontal-open.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/folder-open.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/magnifier-left.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/page.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/picture.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/sort-alphabet-descending.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/sort-alphabet.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/img/throbber.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/js/repository-browser-unminified.js +1450 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/repository-browser/js/repository-browser.js +32 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/sanitize.js +278 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/css/abbr.css +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/img/remabbr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/lib/abbr-plugin.js +304 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/ca/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/de/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/i18n.js +15 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/mk/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/pt-br/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/ru/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/uk/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/zh-hans/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/LICENSE +166 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/README +12 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/css/align.css +31 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/img/align.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/lib/align-plugin.js +465 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/nls/ca/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/nls/de/i18n.js +9 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/nls/i18n.js +18 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/nls/mk/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/nls/pt-br/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/nls/ru/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/nls/uk/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/nls/zh-hans/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/package.json +2 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/README +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/css/block.css +110 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/img/toolbar-draghandle.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/block-plugin.js +347 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/block.js +1277 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockcontenthandler.js +118 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockmanager.js +621 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editor.js +331 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editormanager.js +55 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/sidebarattributeeditor.js +126 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/nls/ca/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/nls/de/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/nls/i18n.js +12 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/nls/mk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/nls/pt-br/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/nls/ru/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/nls/uk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/nls/zh-hans/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/package.json +11 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/css/characterpicker.css +44 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/img/icon.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/lib/characterpicker-plugin.js +466 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/ca/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/de/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/i18n.js +12 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/mk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/pt-br/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/ru/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/uk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/zh-hans/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/commands/css/abbr.css +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/commands/lib/commands-plugin.js +33 -0
- data/vendor/assets/javascripts/aloha/plugins/common/commands/lib/inserthtml.js +126 -0
- data/vendor/assets/javascripts/aloha/plugins/common/commands/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/README.md +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/blockelementcontenthandler.js +144 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-plugin.js +65 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/contenthandler-utils.js +58 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/genericcontenthandler.js +359 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/oembedcontenthandler.js +461 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/sanitizecontenthandler.js +186 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/wordcontenthandler.js +461 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/dom-to-xhtml/lib/dom-to-xhtml-plugin.js +74 -0
- data/vendor/assets/javascripts/aloha/plugins/common/dom-to-xhtml/lib/dom-to-xhtml.js +415 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/img/em.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/img/strong.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/lib/format-plugin.js +594 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/ca/i18n.js +52 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/de/i18n.js +52 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/i18n.js +61 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/mk/i18n.js +52 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/pt-br/i18n.js +52 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/ru/i18n.js +52 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/uk/i18n.js +52 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/zh-hans/i18n.js +52 -0
- data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/css/highlighteditables.css +14 -0
- data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/lib/highlighteditables-plugin.js +100 -0
- data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/css/horizontalruler.css +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/img/icon.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/lib/horizontalruler-plugin.js +95 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/ca/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/de/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/i18n.js +12 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/mk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/pt-br/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/ru/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/uk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/zh-hans/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/README.md +66 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/css/image.css +133 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/blank.jpg +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/crop-buttons.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/cropnresize.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/handle-sw.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-left.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-none.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-align-right.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-border.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/image-title.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/image.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/padding-decrease.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/padding-increase.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/page.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/size-decrease.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/size-increase.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/lib/image-floatingMenu.js +308 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/lib/image-plugin-actions.js +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/lib/image-plugin.js +1341 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/ca/i18n.js +32 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/de/i18n.js +32 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/i18n.js +41 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/mk/i18n.js +32 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/pt-br/i18n.js +32 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/ru/i18n.js +32 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/uk/i18n.js +32 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/zh-hans/i18n.js +32 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jcrop.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jquery.jcrop.css +46 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jquery.jcrop.min.js +165 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/mousewheel/mousewheel.js +85 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/css/link.css +52 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/extra/delicious.js +264 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/extra/linklist.js +247 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/extra/slowlinklist.js +247 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/lib/link-plugin.js +958 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/ca/i18n.js +14 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/de/i18n.js +14 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/i18n.js +23 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/mk/i18n.js +14 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/pt-br/i18n.js +14 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/ru/i18n.js +14 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/uk/i18n.js +14 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/zh-hans/i18n.js +14 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/lib/list-plugin.js +878 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/ca/i18n.js +7 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/de/i18n.js +7 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/i18n.js +16 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/mk/i18n.js +7 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/pt-br/i18n.js +7 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/ru/i18n.js +7 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/uk/i18n.js +7 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/zh-hans/i18n.js +7 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/paste/lib/paste-plugin.js +457 -0
- data/vendor/assets/javascripts/aloha/plugins/common/paste/package.json +8 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/css/table.css +125 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/img/down.cur +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/img/left.cur +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/img/table_layout.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/img/wai-green.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/img/wai-red.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-cell.js +542 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-create-layer.js +213 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-plugin-utils.js +494 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-plugin.js +1596 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-selection.js +468 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table.js +2110 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/ca/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/de/i18n.js +29 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/i18n.js +38 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/mk/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/pt-br/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/ru/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/uk/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/zh-hans/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/css/jquery-ui-1.9m6.css +430 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/css/ui.css +689 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/blockquote.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/character-picker.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/em.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/format-block.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/format-inline.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/indent.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/jqueryui/ui-icons_222222_256x240.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/justify.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/language-annotation.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/anchor.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/blockquote.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/caption.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/cite.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/dd.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/div.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/dl.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/dt.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h1.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h2.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h3.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h4.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h5.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/h6.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/p.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/pre.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/q.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/table.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/td.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/metaview/th.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/multisplit-close.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/multisplit-open.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/outdent.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/quote.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/removeformat.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/strong.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/img/tree.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/arena.js +11 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/autocomplete.js +70 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/button.js +114 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/component.js +121 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/container.js +210 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/context.js +53 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/dialog.js +215 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/floating.js +405 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/menuButton.js +169 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/multiSplit.js +237 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/port-helper-attribute-field.js +440 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/port-helper-multi-split.js +71 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/scopes.js +187 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/settings.js +202 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/subguarded.js +183 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/surface.js +106 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/tab.js +316 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/text.js +33 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/toggleButton.js +57 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/toolbar.js +251 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/ui-plugin.js +169 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/ui.js +181 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/lib/utils.js +104 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/ca/i18n.js +46 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/de/i18n.js +48 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/i18n.js +75 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/mk/i18n.js +46 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/pt-br/i18n.js +46 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/ru/i18n.js +46 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/uk/i18n.js +46 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/nls/zh-hans/i18n.js +46 -0
- data/vendor/assets/javascripts/aloha/plugins/common/ui/vendor/jquery-ui-autocomplete-html.js +42 -0
- data/vendor/assets/javascripts/aloha/plugins/common/undo/lib/undo-plugin.js +165 -0
- data/vendor/assets/javascripts/aloha/plugins/common/undo/package.json +7 -0
- data/vendor/assets/javascripts/aloha/plugins/common/undo/vendor/diff_match_patch_uncompressed.js +2155 -0
- data/vendor/assets/javascripts/aloha/plugins/common/undo/vendor/undo.js +121 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/README +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/css/attributes.css +12 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/lib/attributes-plugin.js +237 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/ca/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/de/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/i18n.js +14 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/mk/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/pt-br/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/ru/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/uk/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/zh-hans/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/captioned-image/css/captioned-image.css +15 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/captioned-image/lib/captioned-image-plugin.js +555 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/README +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/css/cite.css +39 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/img/blockquote.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/img/icon_cite.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/lib/cite-plugin.js +614 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/ca/i18n.js +4 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/de/i18n.js +4 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/i18n.js +13 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/mk/i18n.js +4 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/pt-br/i18n.js +4 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/ru/i18n.js +4 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/uk/i18n.js +4 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/zh-hans/i18n.js +4 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/add-icon.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/add.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/comments.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/hr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/comments/img/textbox.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/comments/lib/comments-plugin.js +692 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/comments/lib/comments.css +442 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/comments/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/README.md +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/TODO.md +2 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/cross.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/hourglass.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/loading.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/page.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/img/tick.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/draganddropfiles-plugin.js +4 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dragndropfiles.css +110 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dragndropfiles.js +363 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dropfilesrepository.js +365 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/ca/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/de/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/i18n.js +12 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/mk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/pt-br/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/ru/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/uk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/nls/zh-hans/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/README.md +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/css/formatless.css +7 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/img/button.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/lib/formatlesshandler.js +97 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/lib/formatlesspaste-plugin.js +230 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/ca/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/de/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/i18n.js +12 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/mk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/pt-br/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/ru/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/uk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/zh-hans/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/package.json +8 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/README +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/css/headerids.css +8 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/lib/headerids-plugin.js +254 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/ca/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/de/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/i18n.js +15 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/mk/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/pt-br/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/ru/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/uk/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/zh-hans/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/README.md +12 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/css/hints.css +29 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/lib/hints-plugin.js +97 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/package.json +9 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/vendor/tipsy.js +242 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/README +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/lib/imagebrowser-plugin.js +160 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/ca/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/de/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/i18n.js +15 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/mk/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/pt-br/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/ru/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/uk/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/imagebrowser/nls/zh-hans/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/README +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ad.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ae.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/af.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ag.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ai.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/al.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/am.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/an.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ao.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ar.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/as.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/at.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/au.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/aw.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ax.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/az.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ba.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bb.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bd.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/be.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bf.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bg.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bh.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bi.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bj.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bn.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bo.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/br.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bs.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bt.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bv.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bw.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/by.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/bz.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ca.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/catalonia.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cc.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cd.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cf.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cg.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ch.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ci.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ck.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cl.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cn.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/co.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cs.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cu.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cv.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cx.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cy.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/cz.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/de.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dj.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dk.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/do.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/dz.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ec.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ee.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/eg.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/eh.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/en.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/er.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/es.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/et.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/europeanunion.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fam.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fi.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fj.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fk.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fo.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/fr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ga.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gb.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gd.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ge.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gf.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gh.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gi.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gl.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gn.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gp.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gq.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gs.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gt.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gu.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gw.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/gy.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hk.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hn.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ht.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/hu.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/id.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ie.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/il.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/in.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/io.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/iq.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ir.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/is.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/it.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jo.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/jp.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ke.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kg.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kh.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ki.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/km.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kn.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kp.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kw.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ky.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/kz.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/la.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lb.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lc.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/li.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lk.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ls.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lt.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lu.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/lv.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ly.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ma.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mc.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/md.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/me.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mg.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mh.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mk.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ml.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mn.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mo.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mp.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mq.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ms.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mt.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mu.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mv.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mw.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mx.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/my.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/mz.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/na.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nc.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ne.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nf.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ng.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ni.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nl.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/no.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/np.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nu.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/nz.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/om.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pa.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pe.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pf.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pg.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ph.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pk.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pl.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pn.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ps.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pt.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/pw.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/py.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/qa.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/re.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ro.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/rs.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ru.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/rw.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sa.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sb.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sc.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/scotland.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sd.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/se.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sg.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sh.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/si.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sj.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sk.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sl.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sn.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/so.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/st.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sv.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sy.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/sz.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tc.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/td.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tf.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tg.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/th.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tj.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tk.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tl.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tn.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/to.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tt.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tv.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tw.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/tz.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ua.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ug.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/um.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/us.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/uy.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/uz.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/va.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vc.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ve.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vg.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vi.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vn.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/vu.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/wales.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/wf.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ws.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/ye.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/yt.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/za.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/zm.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/img/flags/zw.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/lib/linkbrowser-plugin.js +161 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/ca/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/de/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/i18n.js +15 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/mk/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/pt-br/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/ru/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/uk/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/zh-hans/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/ca/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/de/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/i18n.js +37 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/mk/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/pt-br/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/ru/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/uk/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/nls/zh-hans/i18n.js +28 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/proxy.php.example +244 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/src/linkchecker.css +14 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/src/linkchecker.js +269 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/listenforcer/lib/listenforcer-plugin.js +190 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/README +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/css/metaview.css +78 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/anchor.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/blockquote.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/button.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/caption.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/cite.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dd.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/div.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dl.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/dt.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h1.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h2.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h3.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h4.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h5.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/h6.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/hr.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/icon_cite.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/p.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/pre.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/table.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/td.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/img/th.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/lib/metaview-plugin.js +185 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/ca/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/de/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/i18n.js +12 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/mk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/pt-br/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/ru/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/uk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/zh-hans/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/README +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/css/numerated-headers.css +7 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/img/headers.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/lib/numerated-headers-plugin.js +421 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/ca/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/de/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/i18n.js +15 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/mk/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/pt-br/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/ru/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/uk/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/zh-hans/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/profiler/css/profiler.css +34 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/profiler/lib/profiler-plugin.js +304 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/README.md +8 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/css/ribbon.css +54 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/img/fade-in.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/img/fade-out.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/lib/ribbon-plugin.js +144 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/sourceview/css/sourceview.css +18 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/sourceview/lib/sourceview-plugin.js +252 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/sourceview/vendor/htmlbeautifier.js +468 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/css/textcolor.css +65 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/img/icon.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/lib/textcolor-plugin.js +420 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/nls/de/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/textcolor/nls/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/lib/toc-plugin.js +399 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/ca/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/de/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/i18n.js +12 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/mk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/pt-br/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/ru/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/uk/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/nls/zh-hans/i18n.js +3 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/validation/lib/validation-plugin.js +277 -0
- data/vendor/assets/stylesheets/aloha-common-extra.css +24 -0
- data/vendor/assets/stylesheets/aloha-core.css +19 -0
- data/vendor/assets/stylesheets/aloha-reset.css +24 -0
- data/vendor/assets/stylesheets/aloha-sidebar.css +296 -0
- data/vendor/assets/stylesheets/aloha.css +31 -0
- metadata +898 -0
@@ -0,0 +1,908 @@
|
|
1
|
+
/* dom2.js is part of Aloha Editor project http://aloha-editor.org
|
2
|
+
*
|
3
|
+
* Aloha Editor is a WYSIWYG HTML5 inline editing library and editor.
|
4
|
+
* Copyright (c) 2010-2012 Gentics Software GmbH, Vienna, Austria.
|
5
|
+
* Contributors http://aloha-editor.org/contribution.php
|
6
|
+
*
|
7
|
+
* Aloha Editor is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of the GNU General Public License
|
9
|
+
* as published by the Free Software Foundation; either version 2
|
10
|
+
* of the License, or any later version.
|
11
|
+
*
|
12
|
+
* Aloha Editor is distributed in the hope that it will be useful,
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
* GNU General Public License for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU General Public License
|
18
|
+
* along with this program; if not, write to the Free Software
|
19
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
20
|
+
*
|
21
|
+
* As an additional permission to the GNU GPL version 2, you may distribute
|
22
|
+
* non-source (e.g., minimized or compacted) forms of the Aloha-Editor
|
23
|
+
* source code without the copy of the GNU GPL normally required,
|
24
|
+
* provided you include this license notice and a URL through which
|
25
|
+
* recipients can access the Corresponding Source.
|
26
|
+
*/
|
27
|
+
define([
|
28
|
+
'aloha/core',
|
29
|
+
'jquery',
|
30
|
+
'util/functions',
|
31
|
+
'util/maps',
|
32
|
+
'util/arrays',
|
33
|
+
'util/strings',
|
34
|
+
'util/browser',
|
35
|
+
'util/dom',
|
36
|
+
'util/range'
|
37
|
+
], function (
|
38
|
+
Aloha,
|
39
|
+
$,
|
40
|
+
Fn,
|
41
|
+
Maps,
|
42
|
+
Arrays,
|
43
|
+
Strings,
|
44
|
+
Browser,
|
45
|
+
Dom1,
|
46
|
+
RangeObject
|
47
|
+
) {
|
48
|
+
'use strict';
|
49
|
+
|
50
|
+
var spacesRx = /\s+/;
|
51
|
+
var attrRegex = /\s([^\/<>\s=]+)(?:=(?:"[^"]*"|'[^']*'|[^>\/\s]+))?/g;
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Like insertBefore, inserts firstChild into parent before
|
55
|
+
* refChild, except also inserts all the following siblings of
|
56
|
+
* firstChild.
|
57
|
+
*/
|
58
|
+
function moveNextAll(parent, firstChild, refChild) {
|
59
|
+
while (firstChild) {
|
60
|
+
var nextChild = firstChild.nextSibling;
|
61
|
+
parent.insertBefore(firstChild, refChild);
|
62
|
+
firstChild = nextChild;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Used to serialize outerHTML of DOM elements in older (pre-HTML5) Gecko,
|
68
|
+
* Safari, and Opera browsers.
|
69
|
+
*
|
70
|
+
* Beware that XMLSerializer generates an XHTML string (<div class="team" />
|
71
|
+
* instead of <div class="team"></div>). It is noted here:
|
72
|
+
* http://stackoverflow.com/questions/1700870/how-do-i-do-outerhtml-in-firefox
|
73
|
+
* that some browsers (like older versions of Firefox) have problems with
|
74
|
+
* XMLSerializer, and an alternative, albeit more expensive option, is
|
75
|
+
* described.
|
76
|
+
*
|
77
|
+
* @type {XMLSerializer|null}
|
78
|
+
*/
|
79
|
+
var Serializer = window.XMLSerializer && new window.XMLSerializer();
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Gets the serialized HTML that describes the given DOM element and its
|
83
|
+
* innerHTML.
|
84
|
+
*
|
85
|
+
* Polyfill for older versions of Gecko, Safari, and Opera browsers.
|
86
|
+
* @see https://bugzilla.mozilla.org/show_bug.cgi?id=92264 for background.
|
87
|
+
*
|
88
|
+
* @param {HTMLElement} node DOM Element.
|
89
|
+
* @return {String}
|
90
|
+
*/
|
91
|
+
function outerHtml(node) {
|
92
|
+
var html = node.outerHTML;
|
93
|
+
if (typeof html !== 'undefined') {
|
94
|
+
return html;
|
95
|
+
}
|
96
|
+
try {
|
97
|
+
return Serializer ? Serializer.serializeToString(node) : node.xml;
|
98
|
+
} catch (e) {
|
99
|
+
return node.xml;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
/**
|
104
|
+
* Retrieves the names of all attributes from the given elmenet.
|
105
|
+
*
|
106
|
+
* Correctly handles the case that IE7 and IE8 have approx 70-90
|
107
|
+
* default attributes on each and every element.
|
108
|
+
*
|
109
|
+
* This implementation does not iterate over the elem.attributes
|
110
|
+
* property since that is much slower on IE7 (even when
|
111
|
+
* checking the attrNode.specified property). Instead it parses the
|
112
|
+
* HTML of the element. For elements with few attributes the
|
113
|
+
* performance on IE7 is improved by an order of magnitued.
|
114
|
+
*
|
115
|
+
* On IE7, when you clone a <button disabled="disabled"/> or an
|
116
|
+
* <input checked="checked"/> element the boolean properties will
|
117
|
+
* not be set on the cloned node. We choose the speed optimization
|
118
|
+
* over correctness in this case. The dom-to-xhtml plugin has a
|
119
|
+
* workaround for this case.
|
120
|
+
*/
|
121
|
+
function attrNames(elem) {
|
122
|
+
var names = [];
|
123
|
+
var html = outerHtml(elem.cloneNode(false));
|
124
|
+
var match;
|
125
|
+
while (null != (match = attrRegex.exec(html))) {
|
126
|
+
names.push(match[1]);
|
127
|
+
}
|
128
|
+
return names;
|
129
|
+
}
|
130
|
+
|
131
|
+
/**
|
132
|
+
* Gets the attributes of the given element.
|
133
|
+
*
|
134
|
+
* See attrNames() for an edge case on IE7.
|
135
|
+
*
|
136
|
+
* @param elem
|
137
|
+
* An element to get the attributes for.
|
138
|
+
* @return
|
139
|
+
* An array containing [name, value] tuples for each attribute.
|
140
|
+
* Attribute values will always be strings, but possibly empty strings.
|
141
|
+
*/
|
142
|
+
function attrs(elem) {
|
143
|
+
var as = [];
|
144
|
+
var names = attrNames(elem);
|
145
|
+
var i;
|
146
|
+
var len;
|
147
|
+
for (i = 0, len = names.length; i < len; i++) {
|
148
|
+
var name = names[i];
|
149
|
+
var value = $.attr(elem, name);
|
150
|
+
if (null == value) {
|
151
|
+
value = "";
|
152
|
+
} else {
|
153
|
+
value = value.toString();
|
154
|
+
}
|
155
|
+
as.push([name, value]);
|
156
|
+
}
|
157
|
+
return as;
|
158
|
+
}
|
159
|
+
|
160
|
+
/**
|
161
|
+
* Like indexByClass() but operates on a list of elements instead.
|
162
|
+
* The given list may be a NodeList, HTMLCollection, or an array.
|
163
|
+
*/
|
164
|
+
function indexByClassHaveList(elems, classMap) {
|
165
|
+
var index = {},
|
166
|
+
indexed,
|
167
|
+
classes,
|
168
|
+
elem,
|
169
|
+
cls,
|
170
|
+
len,
|
171
|
+
i,
|
172
|
+
j;
|
173
|
+
for (i = 0, len = elems.length; i < len; i++) {
|
174
|
+
elem = elems[i];
|
175
|
+
if (elem.className) {
|
176
|
+
classes = Strings.words(elem.className);
|
177
|
+
for (j = 0; j < classes.length; j++) {
|
178
|
+
cls = classes[j];
|
179
|
+
if (classMap[cls]) {
|
180
|
+
indexed = index[cls];
|
181
|
+
if (indexed) {
|
182
|
+
indexed.push(elem);
|
183
|
+
} else {
|
184
|
+
index[cls] = [elem];
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
188
|
+
}
|
189
|
+
}
|
190
|
+
return index;
|
191
|
+
}
|
192
|
+
|
193
|
+
/**
|
194
|
+
* Indexes descendant elements based on the individual classes in
|
195
|
+
* the class attribute.
|
196
|
+
*
|
197
|
+
* Based on these observations;
|
198
|
+
*
|
199
|
+
* * $('.class1, .class2') takes twice as long as $('.class1') on IE7.
|
200
|
+
*
|
201
|
+
* * $('.class1, .class2') is fast on IE8 (approx the same as
|
202
|
+
* $('.class'), no matter how many classes), but if the individual
|
203
|
+
* elements in the result set should be handled differently, the
|
204
|
+
* subsequent hasClass('.class1') and hasClass('.class2') calls
|
205
|
+
* slow things down again.
|
206
|
+
*
|
207
|
+
* * DOM traversal with elem.firstChild elem.nextSibling is very
|
208
|
+
* slow on IE7 compared to just iterating over
|
209
|
+
* root.getElementsByTagName('*').
|
210
|
+
*
|
211
|
+
* * $('name.class') is much faster than just $('.class'), but as
|
212
|
+
* soon as you need a single class in classMap that may be present
|
213
|
+
* on any element, that optimization doesn't gain anything since
|
214
|
+
* then you have to examine every element.
|
215
|
+
*
|
216
|
+
* This function will always take approx. the same amount of time
|
217
|
+
* (on IE7 approx. equivalent to a single call to $('.class')) no
|
218
|
+
* matter how many entries there are in classMap to index.
|
219
|
+
*
|
220
|
+
* This function only makes sense for multiple entries in
|
221
|
+
* classMap. For a single class lookup, $('.class') or
|
222
|
+
* $('name.class') is fine (even better in the latter case).
|
223
|
+
*
|
224
|
+
* @param root
|
225
|
+
* The root element to search for elements to index
|
226
|
+
* (will not be included in search).
|
227
|
+
* @param classMap
|
228
|
+
* A map from class name to boolean true.
|
229
|
+
* @return
|
230
|
+
* A map from class name to an array of elements with that class.
|
231
|
+
* Every entry in classMap for which elements have been found
|
232
|
+
* will have a corresponding entry in the returned
|
233
|
+
* map. Entries for which no elements have been found, may or
|
234
|
+
* may not have an entry in the returned map.
|
235
|
+
*/
|
236
|
+
function indexByClass(root, classMap) {
|
237
|
+
var elems;
|
238
|
+
if (Browser.ie7) {
|
239
|
+
elems = root.getElementsByTagName('*');
|
240
|
+
} else {
|
241
|
+
// Optimize for browsers that support querySelectorAll/getElementsByClassName.
|
242
|
+
// On IE8 for example, if there is a relatively high
|
243
|
+
// elems/resultSet ratio, performance can improve by a factor of 2.
|
244
|
+
elems = $(root).find('.' + Maps.keys(classMap).join(',.'));
|
245
|
+
}
|
246
|
+
return indexByClassHaveList(elems, classMap);
|
247
|
+
}
|
248
|
+
|
249
|
+
/**
|
250
|
+
* Indexes descendant elements based on elem.nodeName.
|
251
|
+
*
|
252
|
+
* Based on these observations:
|
253
|
+
*
|
254
|
+
* * On IE8, for moderate values of names.length, individual calls to
|
255
|
+
* getElementsByTagName is just as fast as $root.find('name, name,
|
256
|
+
* name, name').
|
257
|
+
*
|
258
|
+
* * On IE7, $root.find('name, name, name, name') is extemely slow
|
259
|
+
* (can be an order of magnitude slower than individual calls to
|
260
|
+
* getElementsByTagName, why is that?).
|
261
|
+
*
|
262
|
+
* * Although getElementsByTagName is very fast even on IE7, when
|
263
|
+
* names.length > 7 an alternative implementation that iterates
|
264
|
+
* over all tags and checks names from a hashmap (similar to how
|
265
|
+
* indexByClass does it) may become interesting, but
|
266
|
+
* names.length > 7 is unlikely.
|
267
|
+
*
|
268
|
+
* This function only makes sense if the given names array has many
|
269
|
+
* entries. For only one or two different names, calling $('name')
|
270
|
+
* or context.getElementsByTagName(name) directly is fine (but
|
271
|
+
* beware of $('name, name, ...') as explained above).
|
272
|
+
*
|
273
|
+
* The signature of this function differs from indexByClass by not
|
274
|
+
* taking a map but instead an array of names.
|
275
|
+
*
|
276
|
+
* @param root
|
277
|
+
* The root element to search for elements to index
|
278
|
+
* (will not be included in search).
|
279
|
+
* @param names
|
280
|
+
* An array of element names to look for.
|
281
|
+
* Names must be in all-uppercase (the same as elem.nodeName).
|
282
|
+
* @return
|
283
|
+
* A map from element name to an array of elements with that name.
|
284
|
+
* Names will be all-uppercase.
|
285
|
+
* Arrays will be proper arrays, not NodeLists.
|
286
|
+
* Every entry in classMap for which elements have been found
|
287
|
+
* will have a corresponding entry in the returned
|
288
|
+
* map. Entries for which no elements have been found, may or
|
289
|
+
* may not have an entry in the returned map.
|
290
|
+
*/
|
291
|
+
function indexByName(root, names) {
|
292
|
+
var i,
|
293
|
+
index = {},
|
294
|
+
len;
|
295
|
+
for (i = 0, len = names.length; i < len; i++) {
|
296
|
+
var name = names[i];
|
297
|
+
index[name] = $.makeArray(root.getElementsByTagName(name));
|
298
|
+
}
|
299
|
+
return index;
|
300
|
+
}
|
301
|
+
|
302
|
+
function nodeIndex(node) {
|
303
|
+
var ret = 0;
|
304
|
+
while (node.previousSibling) {
|
305
|
+
ret++;
|
306
|
+
node = node.previousSibling;
|
307
|
+
}
|
308
|
+
return ret;
|
309
|
+
}
|
310
|
+
|
311
|
+
/**
|
312
|
+
* Can't use elem.childNodes.length because
|
313
|
+
* http://www.quirksmode.org/dom/w3c_core.html
|
314
|
+
* "IE up to 8 does not count empty text nodes."
|
315
|
+
*/
|
316
|
+
function numChildren(elem) {
|
317
|
+
var count = 0;
|
318
|
+
var child = elem.firstChild;
|
319
|
+
while (child) {
|
320
|
+
count += 1;
|
321
|
+
child = child.nextSibling;
|
322
|
+
}
|
323
|
+
return count;
|
324
|
+
}
|
325
|
+
|
326
|
+
function nodeLength(node) {
|
327
|
+
if (1 === node.nodeType) {
|
328
|
+
return numChildren(node);
|
329
|
+
}
|
330
|
+
if (3 === node.nodeType) {
|
331
|
+
return node.length;
|
332
|
+
}
|
333
|
+
return 0;
|
334
|
+
}
|
335
|
+
|
336
|
+
function isAtEnd(node, offset) {
|
337
|
+
return (1 === node.nodeType
|
338
|
+
&& offset >= numChildren(node))
|
339
|
+
|| (3 === node.nodeType
|
340
|
+
&& offset === node.length
|
341
|
+
&& !node.nextSibling);
|
342
|
+
}
|
343
|
+
|
344
|
+
/**
|
345
|
+
* @param node if a text node, should have a parent node.
|
346
|
+
*/
|
347
|
+
function nodeAtOffset(node, offset) {
|
348
|
+
if (1 === node.nodeType && offset < numChildren(node)) {
|
349
|
+
node = node.childNodes[offset];
|
350
|
+
} else if (3 === node.nodeType && offset === node.length) {
|
351
|
+
node = node.nextSibling || node.parentNode;
|
352
|
+
}
|
353
|
+
return node;
|
354
|
+
}
|
355
|
+
|
356
|
+
function removeShallow(node) {
|
357
|
+
var parent = node.parentNode;
|
358
|
+
moveNextAll(parent, node.firstChild, node);
|
359
|
+
parent.removeChild(node);
|
360
|
+
}
|
361
|
+
|
362
|
+
function wrap(node, wrapper) {
|
363
|
+
node.parentNode.replaceChild(wrapper, node);
|
364
|
+
wrapper.appendChild(node);
|
365
|
+
}
|
366
|
+
|
367
|
+
function insert(node, ref, atEnd) {
|
368
|
+
if (atEnd) {
|
369
|
+
ref.appendChild(node);
|
370
|
+
} else {
|
371
|
+
ref.parentNode.insertBefore(node, ref);
|
372
|
+
}
|
373
|
+
}
|
374
|
+
|
375
|
+
function Cursor(node, atEnd) {
|
376
|
+
this.node = node;
|
377
|
+
this.atEnd = atEnd;
|
378
|
+
}
|
379
|
+
|
380
|
+
/**
|
381
|
+
* A cursor has the added utility over other iteration methods of
|
382
|
+
* iterating over the end position of an element. The start and end
|
383
|
+
* positions of an element are immediately before the element and
|
384
|
+
* immediately after the last child respectively. All node positions
|
385
|
+
* except end positions can be identified just by a node. To
|
386
|
+
* distinguish between element start and end positions, the
|
387
|
+
* additional atEnd boolean is necessary.
|
388
|
+
*/
|
389
|
+
function cursor(node, atEnd) {
|
390
|
+
return new Cursor(node, atEnd);
|
391
|
+
}
|
392
|
+
|
393
|
+
Cursor.prototype.next = function () {
|
394
|
+
var node = this.node;
|
395
|
+
var next;
|
396
|
+
if (this.atEnd || 1 !== node.nodeType) {
|
397
|
+
next = node.nextSibling;
|
398
|
+
if (next) {
|
399
|
+
this.atEnd = false;
|
400
|
+
} else {
|
401
|
+
next = node.parentNode;
|
402
|
+
if (!next) {
|
403
|
+
return false;
|
404
|
+
}
|
405
|
+
this.atEnd = true;
|
406
|
+
}
|
407
|
+
this.node = next;
|
408
|
+
} else {
|
409
|
+
next = node.firstChild;
|
410
|
+
if (next) {
|
411
|
+
this.node = next;
|
412
|
+
} else {
|
413
|
+
this.atEnd = true;
|
414
|
+
}
|
415
|
+
}
|
416
|
+
return true;
|
417
|
+
};
|
418
|
+
|
419
|
+
Cursor.prototype.prev = function () {
|
420
|
+
var node = this.node;
|
421
|
+
var prev;
|
422
|
+
if (this.atEnd) {
|
423
|
+
prev = node.lastChild;
|
424
|
+
if (prev) {
|
425
|
+
this.node = prev;
|
426
|
+
} else {
|
427
|
+
this.atEnd = false;
|
428
|
+
}
|
429
|
+
} else {
|
430
|
+
prev = node.previousSibling;
|
431
|
+
if (prev) {
|
432
|
+
if (1 === node.nodeType) {
|
433
|
+
this.atEnd = true;
|
434
|
+
}
|
435
|
+
} else {
|
436
|
+
prev = node.parentNode;
|
437
|
+
if (!prev) {
|
438
|
+
return false;
|
439
|
+
}
|
440
|
+
}
|
441
|
+
this.node = prev;
|
442
|
+
}
|
443
|
+
return true;
|
444
|
+
};
|
445
|
+
|
446
|
+
Cursor.prototype.equals = function (cursor) {
|
447
|
+
return cursor.node === this.node && cursor.atEnd === this.atEnd;
|
448
|
+
};
|
449
|
+
|
450
|
+
Cursor.prototype.clone = function (cursor) {
|
451
|
+
return cursor(cursor.node, cursor.atEnd);
|
452
|
+
};
|
453
|
+
|
454
|
+
Cursor.prototype.insert = function (node) {
|
455
|
+
return insert(node, this.node, this.atEnd);
|
456
|
+
};
|
457
|
+
|
458
|
+
/**
|
459
|
+
* @param offset if node is a text node, the offset will be ignored.
|
460
|
+
* @param node if a text node, should have a parent node.
|
461
|
+
*/
|
462
|
+
function cursorFromBoundaryPoint(node, offset) {
|
463
|
+
return cursor(nodeAtOffset(node, offset), isAtEnd(node, offset));
|
464
|
+
}
|
465
|
+
|
466
|
+
function parentsUntil(node, pred) {
|
467
|
+
var parents = [];
|
468
|
+
var parent = node.parentNode;
|
469
|
+
while (parent && !pred(parent)) {
|
470
|
+
parents.push(parent);
|
471
|
+
parent = parent.parentNode;
|
472
|
+
}
|
473
|
+
return parents;
|
474
|
+
}
|
475
|
+
|
476
|
+
function parentsUntilIncl(node, pred) {
|
477
|
+
var parents = parentsUntil(node, pred);
|
478
|
+
var topmost = parents.length ? parents[parents.length - 1] : node;
|
479
|
+
if (topmost.parentNode) {
|
480
|
+
parents.push(topmost.parentNode);
|
481
|
+
}
|
482
|
+
return parents;
|
483
|
+
}
|
484
|
+
|
485
|
+
function childAndParentsUntil(node, pred) {
|
486
|
+
if (pred(node)) {
|
487
|
+
return [];
|
488
|
+
}
|
489
|
+
var parents = parentsUntil(node, pred);
|
490
|
+
parents.unshift(node);
|
491
|
+
return parents;
|
492
|
+
}
|
493
|
+
|
494
|
+
function childAndParentsUntilIncl(node, pred) {
|
495
|
+
if (pred(node)) {
|
496
|
+
return [node];
|
497
|
+
}
|
498
|
+
var parents = parentsUntilIncl(node, pred);
|
499
|
+
parents.unshift(node);
|
500
|
+
return parents;
|
501
|
+
}
|
502
|
+
|
503
|
+
function childAndParentsUntilNode(node, untilNode) {
|
504
|
+
return childAndParentsUntil(node, function (nextNode) {
|
505
|
+
return nextNode === untilNode;
|
506
|
+
});
|
507
|
+
}
|
508
|
+
|
509
|
+
function childAndParentsUntilInclNode(node, untilInclNode) {
|
510
|
+
return childAndParentsUntilIncl(node, function (nextNode) {
|
511
|
+
return nextNode === untilInclNode;
|
512
|
+
});
|
513
|
+
}
|
514
|
+
|
515
|
+
function next(node, until, arg) {
|
516
|
+
while (node && !until(node, arg)) {
|
517
|
+
node = node.nextSibling;
|
518
|
+
}
|
519
|
+
return node;
|
520
|
+
}
|
521
|
+
|
522
|
+
function parent(node, until, arg) {
|
523
|
+
while (node && !until(node, arg)) {
|
524
|
+
node = node.parentNode;
|
525
|
+
}
|
526
|
+
return node;
|
527
|
+
}
|
528
|
+
|
529
|
+
function isTextNode(node) {
|
530
|
+
return 3 === node.nodeType;
|
531
|
+
}
|
532
|
+
|
533
|
+
function splitTextNode(node, offset) {
|
534
|
+
// Because node.splitText() is buggy on IE, split it manually.
|
535
|
+
// http://www.quirksmode.org/dom/w3c_core.html
|
536
|
+
var parent = node.parentNode;
|
537
|
+
var text = node.nodeValue;
|
538
|
+
if (0 === offset || offset >= text.length) {
|
539
|
+
return node;
|
540
|
+
}
|
541
|
+
var before = document.createTextNode(text.substring(0, offset));
|
542
|
+
var after = document.createTextNode(text.substring(offset, text.length));
|
543
|
+
parent.insertBefore(before, node);
|
544
|
+
parent.insertBefore(after, node);
|
545
|
+
parent.removeChild(node);
|
546
|
+
return before;
|
547
|
+
}
|
548
|
+
|
549
|
+
function adjustRangeAfterSplit(range, container, offset, setProp, splitNode, newNodeBeforeSplit) {
|
550
|
+
if (container !== splitNode) {
|
551
|
+
return;
|
552
|
+
}
|
553
|
+
var newNodeLength = newNodeBeforeSplit.length;
|
554
|
+
if (offset === 0) {
|
555
|
+
container = newNodeBeforeSplit.parentNode;
|
556
|
+
offset = nodeIndex(newNodeBeforeSplit);
|
557
|
+
} else if (offset < newNodeLength) {
|
558
|
+
container = newNodeBeforeSplit;
|
559
|
+
} else if (offset === newNodeLength) {
|
560
|
+
container = newNodeBeforeSplit.parentNode;
|
561
|
+
offset = nodeIndex(newNodeBeforeSplit) + 1;
|
562
|
+
} else {// offset > newNodeLength
|
563
|
+
var newNodeAfterSplit = newNodeBeforeSplit.nextSibling;
|
564
|
+
container = newNodeAfterSplit;
|
565
|
+
offset -= newNodeLength;
|
566
|
+
}
|
567
|
+
range[setProp].call(range, container, offset);
|
568
|
+
}
|
569
|
+
|
570
|
+
/**
|
571
|
+
* Splits the given text node at the given offset and, if the given
|
572
|
+
* range happens to have start or end containers equal to the given
|
573
|
+
* text node, adjusts it such that start and end position will point
|
574
|
+
* at the same position in the new text nodes.
|
575
|
+
*
|
576
|
+
* It is guaranteed that an adjusted boundary point will not point
|
577
|
+
* to the end of a text node. Instead, it will point to the next
|
578
|
+
* node. This guarantee often happens to be useful.
|
579
|
+
*
|
580
|
+
* If splitNode is not a text node, does nothing.
|
581
|
+
*/
|
582
|
+
function splitTextNodeAdjustRange(splitNode, splitOffset, range) {
|
583
|
+
if (3 !== splitNode.nodeType) {
|
584
|
+
return;
|
585
|
+
}
|
586
|
+
var sc = range.startContainer;
|
587
|
+
var so = range.startOffset;
|
588
|
+
var ec = range.endContainer;
|
589
|
+
var eo = range.endOffset;
|
590
|
+
var newNodeBeforeSplit = splitTextNode(splitNode, splitOffset);
|
591
|
+
adjustRangeAfterSplit(range, sc, so, 'setStart', splitNode, newNodeBeforeSplit);
|
592
|
+
adjustRangeAfterSplit(range, ec, eo, 'setEnd', splitNode, newNodeBeforeSplit);
|
593
|
+
}
|
594
|
+
|
595
|
+
function splitTextContainers(range) {
|
596
|
+
var sc = range.startContainer;
|
597
|
+
var so = range.startOffset;
|
598
|
+
splitTextNodeAdjustRange(sc, so, range);
|
599
|
+
// Because the range may have been adjusted.
|
600
|
+
var ec = range.endContainer;
|
601
|
+
var eo = range.endOffset;
|
602
|
+
splitTextNodeAdjustRange(ec, eo, range);
|
603
|
+
}
|
604
|
+
|
605
|
+
function walkUntil(node, fn, until, arg) {
|
606
|
+
while (node && !until(node, arg)) {
|
607
|
+
var next = node.nextSibling;
|
608
|
+
fn(node, arg);
|
609
|
+
node = next;
|
610
|
+
}
|
611
|
+
}
|
612
|
+
|
613
|
+
function walk(node, fn, arg) {
|
614
|
+
walkUntil(node, fn, Fn.returnFalse, arg);
|
615
|
+
}
|
616
|
+
|
617
|
+
/**
|
618
|
+
* Depth-first postwalk of the given DOM node.
|
619
|
+
*/
|
620
|
+
function walkRec(node, fn, arg) {
|
621
|
+
if (1 === node.nodeType) {
|
622
|
+
walk(node.firstChild, function (node) {
|
623
|
+
walkRec(node, fn, arg);
|
624
|
+
});
|
625
|
+
}
|
626
|
+
fn(node, arg);
|
627
|
+
}
|
628
|
+
|
629
|
+
function walkUntilNode(node, fn, untilNode, arg) {
|
630
|
+
walkUntil(node, fn, function (nextNode) {
|
631
|
+
return nextNode === untilNode;
|
632
|
+
}, arg);
|
633
|
+
}
|
634
|
+
|
635
|
+
function StableRange(range) {
|
636
|
+
if (!range) {
|
637
|
+
return;
|
638
|
+
}
|
639
|
+
this.startContainer = range.startContainer;
|
640
|
+
this.startOffset = range.startOffset;
|
641
|
+
this.endContainer = range.endContainer;
|
642
|
+
this.endOffset = range.endOffset;
|
643
|
+
this.commonAncestorContainer = range.commonAncestorContainer;
|
644
|
+
this.collapsed = range.collapsed;
|
645
|
+
}
|
646
|
+
|
647
|
+
StableRange.prototype.update = function () {
|
648
|
+
if (!this.startContainer || !this.endContainer) {
|
649
|
+
return;
|
650
|
+
}
|
651
|
+
this.collapsed = (this.startContainer === this.endContainer
|
652
|
+
&& this.startOffset === this.endOffset);
|
653
|
+
var start = childAndParentsUntil(this.startContainer, Fn.returnFalse);
|
654
|
+
var end = childAndParentsUntil(this.endContainer, Fn.returnFalse);
|
655
|
+
this.commonAncestorContainer = Arrays.intersect(start, end)[0];
|
656
|
+
};
|
657
|
+
|
658
|
+
StableRange.prototype.setStart = function (sc, so) {
|
659
|
+
this.startContainer = sc;
|
660
|
+
this.startOffset = so;
|
661
|
+
this.update();
|
662
|
+
};
|
663
|
+
|
664
|
+
StableRange.prototype.setEnd = function (ec, eo) {
|
665
|
+
this.endContainer = ec;
|
666
|
+
this.endOffset = eo;
|
667
|
+
this.update();
|
668
|
+
};
|
669
|
+
|
670
|
+
function setRangeStartFromCursor(range, cursor) {
|
671
|
+
if (cursor.atEnd) {
|
672
|
+
range.setStart(cursor.node, numChildren(cursor.node));
|
673
|
+
} else {
|
674
|
+
range.setStart(cursor.node.parentNode, nodeIndex(cursor.node));
|
675
|
+
}
|
676
|
+
}
|
677
|
+
|
678
|
+
function setRangeEndFromCursor(range, cursor) {
|
679
|
+
if (cursor.atEnd) {
|
680
|
+
range.setEnd(cursor.node, numChildren(cursor.node));
|
681
|
+
} else {
|
682
|
+
range.setEnd(cursor.node.parentNode, nodeIndex(cursor.node));
|
683
|
+
}
|
684
|
+
}
|
685
|
+
|
686
|
+
function setRangeFromRef(range, ref) {
|
687
|
+
range.setStart(ref.startContainer, ref.startOffset);
|
688
|
+
range.setEnd(ref.endContainer, ref.endOffset);
|
689
|
+
}
|
690
|
+
|
691
|
+
/**
|
692
|
+
* A native range is live, which means that modifying the DOM may
|
693
|
+
* mutate the range. Also, using setStart/setEnd may not set the
|
694
|
+
* properties correctly (the browser may perform its own
|
695
|
+
* normalization of boundary points). The behaviour of a native
|
696
|
+
* range is very erratic and should be converted to a stable range
|
697
|
+
* as the first thing in any algorithm.
|
698
|
+
*/
|
699
|
+
function stableRange(range) {
|
700
|
+
return new StableRange(range);
|
701
|
+
}
|
702
|
+
|
703
|
+
/**
|
704
|
+
* The dom cursor passed to ignoreLeft and ignoreRight does not
|
705
|
+
* traverse positions inside text nodes. The exact rules for when
|
706
|
+
* text node containers are passed are as follows: If the left
|
707
|
+
* boundary point is inside a text node, trimming will start before
|
708
|
+
* it. If the right boundary point is inside a text node, trimming
|
709
|
+
* will start after it.
|
710
|
+
*/
|
711
|
+
function trimRange(range, ignoreLeft, ignoreRight) {
|
712
|
+
if (range.collapsed) {
|
713
|
+
return;
|
714
|
+
}
|
715
|
+
var start = cursorFromBoundaryPoint(range.startContainer, range.startOffset);
|
716
|
+
var end = cursorFromBoundaryPoint(range.endContainer, range.endOffset);
|
717
|
+
var setStart = false;
|
718
|
+
while (!start.equals(end) && ignoreLeft(start) && start.next()) {
|
719
|
+
setStart = true;
|
720
|
+
}
|
721
|
+
ignoreRight = ignoreRight || ignoreLeft;
|
722
|
+
var setEnd = false;
|
723
|
+
// Because if the right boundary points is inside a text node,
|
724
|
+
// trimming starts after it.
|
725
|
+
if (3 === range.endContainer.nodeType
|
726
|
+
&& range.endOffset > 0
|
727
|
+
// Because the cursor already normalizes
|
728
|
+
// endOffset == endContainer.length to the node next after it.
|
729
|
+
&& range.endOffset < range.endContainer.length
|
730
|
+
&& end.next()) {
|
731
|
+
if (ignoreRight(end)) {
|
732
|
+
end.prev();
|
733
|
+
}
|
734
|
+
}
|
735
|
+
while (!end.equals(start) && ignoreRight(end) && end.prev()) {
|
736
|
+
setEnd = true;
|
737
|
+
}
|
738
|
+
if (setStart) {
|
739
|
+
setRangeStartFromCursor(range, start);
|
740
|
+
}
|
741
|
+
if (setEnd) {
|
742
|
+
setRangeEndFromCursor(range, end);
|
743
|
+
}
|
744
|
+
}
|
745
|
+
|
746
|
+
function trimRangeClosingOpening(range, ignoreLeft, ignoreRight) {
|
747
|
+
ignoreRight = ignoreRight || ignoreLeft;
|
748
|
+
trimRange(range, function (cursor) {
|
749
|
+
return cursor.atEnd || ignoreLeft(cursor.node);
|
750
|
+
}, function (cursor) {
|
751
|
+
var prev = cursor.atEnd ? cursor.node.lastChild : cursor.node.previousSibling;
|
752
|
+
return !prev || ignoreRight(prev);
|
753
|
+
});
|
754
|
+
}
|
755
|
+
|
756
|
+
function areRangesEq(a, b) {
|
757
|
+
return a.startContainer === b.startContainer
|
758
|
+
&& a.startOffset === b.startOffset
|
759
|
+
&& a.endContainer === b.endContainer
|
760
|
+
&& a.endOffset === b.endOffset;
|
761
|
+
}
|
762
|
+
|
763
|
+
function insertSelectText(text, range) {
|
764
|
+
// Because empty text nodes are generally not nice and even
|
765
|
+
// cause problems with IE8 (elem.childNodes).
|
766
|
+
if (!text.length) {
|
767
|
+
return;
|
768
|
+
}
|
769
|
+
splitTextNodeAdjustRange(range.startContainer, range.startOffset, range);
|
770
|
+
var node = nodeAtOffset(range.startContainer, range.startOffset);
|
771
|
+
var atEnd = isAtEnd(range.startContainer, range.startOffset);
|
772
|
+
// Because if the node following the insert position is already
|
773
|
+
// a text node we can just reuse it.
|
774
|
+
if (!atEnd && 3 === node.nodeType) {
|
775
|
+
node.insertData(0, text);
|
776
|
+
range.setStart(node, 0);
|
777
|
+
range.setEnd(node, text.length);
|
778
|
+
return;
|
779
|
+
}
|
780
|
+
// Because if the node preceding the insert position is already
|
781
|
+
// a text node we can just reuse it.
|
782
|
+
var prev;
|
783
|
+
if (!atEnd) {
|
784
|
+
prev = node.previousSibling;
|
785
|
+
} else {
|
786
|
+
prev = node.lastChild;
|
787
|
+
}
|
788
|
+
if (prev && 3 === prev.nodeType) {
|
789
|
+
prev.insertData(prev.length, text);
|
790
|
+
range.setStart(prev, prev.length - text.length);
|
791
|
+
range.setEnd(prev, prev.length);
|
792
|
+
return;
|
793
|
+
}
|
794
|
+
// Because if we can't reuse any text nodes, we have to insert a
|
795
|
+
// new one.
|
796
|
+
var textNode = document.createTextNode(text);
|
797
|
+
insert(textNode, node, atEnd);
|
798
|
+
range.setStart(textNode, 0);
|
799
|
+
range.setEnd(textNode, textNode.length);
|
800
|
+
}
|
801
|
+
|
802
|
+
function collapseToEnd(range) {
|
803
|
+
range.setStart(range.endContainer, range.endOffset);
|
804
|
+
}
|
805
|
+
|
806
|
+
function rangeFromRangeObject(alohaRange) {
|
807
|
+
var range = Aloha.createRange();
|
808
|
+
range.setStart(alohaRange.startContainer, alohaRange.startOffset);
|
809
|
+
range.setEnd(alohaRange.endContainer, alohaRange.endOffset);
|
810
|
+
return range;
|
811
|
+
}
|
812
|
+
|
813
|
+
function extendToWord(range) {
|
814
|
+
var rangeObject = new RangeObject(range);
|
815
|
+
Dom1.extendToWord(rangeObject);
|
816
|
+
setRangeFromRef(range, rangeObject);
|
817
|
+
}
|
818
|
+
|
819
|
+
function cloneShallow(node) {
|
820
|
+
return node.cloneNode(false);
|
821
|
+
}
|
822
|
+
|
823
|
+
/**
|
824
|
+
* Sets a style on the given element by modifying it's style attribute.
|
825
|
+
*/
|
826
|
+
function setStyle(node, name, value) {
|
827
|
+
// Because only the empty string removes a style.
|
828
|
+
$(node).css(name, null == value ? '' : value);
|
829
|
+
}
|
830
|
+
|
831
|
+
/**
|
832
|
+
* Gets a style from the given element's style attribute.
|
833
|
+
* Note that this is different from the computed/inherited style.
|
834
|
+
*/
|
835
|
+
function getStyle(node, name) {
|
836
|
+
// Because IE7 needs dashesToCamelCase().
|
837
|
+
name = Strings.dashesToCamelCase(name);
|
838
|
+
return node.nodeType === 1 ? node.style[name] : null;
|
839
|
+
}
|
840
|
+
|
841
|
+
/**
|
842
|
+
* Gets the computed/inherited style of the given node.
|
843
|
+
* @param node may be a text node.
|
844
|
+
*/
|
845
|
+
function getComputedStyle(node, name) {
|
846
|
+
if (node.currentStyle) {
|
847
|
+
return node.currentStyle[name];
|
848
|
+
}
|
849
|
+
var doc = node.ownerDocument;
|
850
|
+
if (doc.defaultView && doc.defaultView.getComputedStyle) {
|
851
|
+
var styles = doc.defaultView.getComputedStyle(node, null);
|
852
|
+
if (styles) {
|
853
|
+
return styles[name] || styles.getPropertyValue(name);
|
854
|
+
}
|
855
|
+
}
|
856
|
+
return null;
|
857
|
+
}
|
858
|
+
|
859
|
+
return {
|
860
|
+
moveNextAll: moveNextAll,
|
861
|
+
attrNames: attrNames,
|
862
|
+
attrs: attrs,
|
863
|
+
indexByClass: indexByClass,
|
864
|
+
indexByName: indexByName,
|
865
|
+
indexByClassHaveList: indexByClassHaveList,
|
866
|
+
outerHtml: outerHtml,
|
867
|
+
removeShallow: removeShallow,
|
868
|
+
wrap: wrap,
|
869
|
+
insert: insert,
|
870
|
+
cursor: cursor,
|
871
|
+
cursorFromBoundaryPoint: cursorFromBoundaryPoint,
|
872
|
+
nodeAtOffset: nodeAtOffset,
|
873
|
+
isAtEnd: isAtEnd,
|
874
|
+
parentsUntil: parentsUntil,
|
875
|
+
parentsUntilIncl: parentsUntilIncl,
|
876
|
+
childAndParentsUntil: childAndParentsUntil,
|
877
|
+
childAndParentsUntilIncl: childAndParentsUntilIncl,
|
878
|
+
childAndParentsUntilNode: childAndParentsUntilNode,
|
879
|
+
childAndParentsUntilInclNode: childAndParentsUntilInclNode,
|
880
|
+
next: next,
|
881
|
+
parent: parent,
|
882
|
+
isTextNode: isTextNode,
|
883
|
+
nodeIndex: nodeIndex,
|
884
|
+
splitTextNode: splitTextNode,
|
885
|
+
splitTextContainers: splitTextContainers,
|
886
|
+
walk: walk,
|
887
|
+
walkRec: walkRec,
|
888
|
+
walkUntil: walkUntil,
|
889
|
+
walkUntilNode: walkUntilNode,
|
890
|
+
stableRange: stableRange,
|
891
|
+
trimRange: trimRange,
|
892
|
+
trimRangeClosingOpening: trimRangeClosingOpening,
|
893
|
+
setRangeFromRef: setRangeFromRef,
|
894
|
+
setRangeStartFromCursor: setRangeStartFromCursor,
|
895
|
+
setRangeEndFromCursor: setRangeEndFromCursor,
|
896
|
+
splitTextNodeAdjustRange: splitTextNodeAdjustRange,
|
897
|
+
insertSelectText: insertSelectText,
|
898
|
+
areRangesEq: areRangesEq,
|
899
|
+
collapseToEnd: collapseToEnd,
|
900
|
+
extendToWord: extendToWord,
|
901
|
+
rangeFromRangeObject: rangeFromRangeObject,
|
902
|
+
cloneShallow: cloneShallow,
|
903
|
+
setStyle: setStyle,
|
904
|
+
getStyle: getStyle,
|
905
|
+
getComputedStyle: getComputedStyle,
|
906
|
+
nodeLength: nodeLength
|
907
|
+
};
|
908
|
+
});
|