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,776 @@
|
|
1
|
+
/* range-context.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
|
+
/**
|
28
|
+
* TODO improve restacking and joining algorithm
|
29
|
+
* TODO what do do about insignificant whitespace when pushing down or setting a context?
|
30
|
+
* TODO check contained-in rules when when pushing down or setting a context
|
31
|
+
* TODO formatStyle: in the following case the outer "font-family: arial" span should be removed.
|
32
|
+
* Can be done similar to how findReusableAncestor() works.
|
33
|
+
* <span style="font-family: arial">
|
34
|
+
* <span style="font-family: times">one</span>
|
35
|
+
* <span style="font-family: helvetica">two<span>
|
36
|
+
* </span>
|
37
|
+
*/
|
38
|
+
define([
|
39
|
+
'jquery',
|
40
|
+
'util/dom2',
|
41
|
+
'util/arrays',
|
42
|
+
'util/trees',
|
43
|
+
'util/strings',
|
44
|
+
'util/functions',
|
45
|
+
'util/html'
|
46
|
+
], function (
|
47
|
+
$,
|
48
|
+
Dom,
|
49
|
+
Arrays,
|
50
|
+
Trees,
|
51
|
+
Strings,
|
52
|
+
Fn,
|
53
|
+
Html
|
54
|
+
) {
|
55
|
+
'use strict';
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Walks the siblings of the given child, calling before for
|
59
|
+
* siblings before the given child, after for siblings after the
|
60
|
+
* given child, and at for the given child.
|
61
|
+
*/
|
62
|
+
function walkSiblings(parent, beforeAfterChild, before, at, after, arg) {
|
63
|
+
var fn = before;
|
64
|
+
Dom.walk(parent.firstChild, function (child) {
|
65
|
+
if (child !== beforeAfterChild) {
|
66
|
+
fn(child, arg);
|
67
|
+
} else {
|
68
|
+
fn = after;
|
69
|
+
at(child, arg);
|
70
|
+
}
|
71
|
+
});
|
72
|
+
}
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Walks the siblings of each node in the given array (see
|
76
|
+
* walkSiblings()).
|
77
|
+
*
|
78
|
+
* @param ascendNodes from lowest descendant to topmost parent. The
|
79
|
+
* topmost parent and its siblings will not be walked over.
|
80
|
+
*
|
81
|
+
* @param atEnd indicates that the position to ascend from is not at
|
82
|
+
* ascendNodes[0], but at the end of ascendNodes[0] (meaning that
|
83
|
+
* all of ascendNodes[0]'s children will be walked over as well).
|
84
|
+
*
|
85
|
+
* @param carryDown is invoked on each node in the given array,
|
86
|
+
* allowing the carrying down of a context value. May return null
|
87
|
+
* to return the carryDown value from above.
|
88
|
+
*/
|
89
|
+
function ascendWalkSiblings(ascendNodes, atEnd, carryDown, before, at, after, arg) {
|
90
|
+
var i;
|
91
|
+
var args = [];
|
92
|
+
i = ascendNodes.length;
|
93
|
+
while (i--) {
|
94
|
+
arg = carryDown(ascendNodes[i], arg) || arg;
|
95
|
+
args.push(arg);
|
96
|
+
}
|
97
|
+
args.reverse();
|
98
|
+
// Because with end positions like
|
99
|
+
// <elem>text{</elem> or <elem>text}</elem>
|
100
|
+
// ascendecending would start at <elem> ignoring "text".
|
101
|
+
if (ascendNodes.length && atEnd) {
|
102
|
+
Dom.walk(ascendNodes[0].firstChild, before, args[0]);
|
103
|
+
}
|
104
|
+
for (i = 0; i < ascendNodes.length - 1; i++) {
|
105
|
+
var child = ascendNodes[i];
|
106
|
+
var parent = ascendNodes[i + 1];
|
107
|
+
walkSiblings(parent, child, before, at, after, args[i + 1]);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
function makePointNodeStep(pointNode, atEnd, stepOutsideInside, stepPartial) {
|
112
|
+
// Because the start node is inside the range, the end node is
|
113
|
+
// outside, and all ancestors of start and end are partially
|
114
|
+
// inside/outside (for startEnd/endEnd positions the nodes are
|
115
|
+
// also ancestors of the position).
|
116
|
+
return function (node, arg) {
|
117
|
+
if (node === pointNode && !atEnd) {
|
118
|
+
stepOutsideInside(node, arg);
|
119
|
+
} else {
|
120
|
+
stepPartial(node, arg);
|
121
|
+
}
|
122
|
+
};
|
123
|
+
}
|
124
|
+
|
125
|
+
/**
|
126
|
+
* Walks the boundary of the range.
|
127
|
+
*
|
128
|
+
* The range's boundary starts at startContainer/startOffset, goes
|
129
|
+
* up to to the commonAncestorContainer's child above or equal
|
130
|
+
* startContainer/startOffset, continues to the
|
131
|
+
* commonAnestorContainer's child above or equal to
|
132
|
+
* endContainer/endOffset, and goes down again to
|
133
|
+
* endContainer/endOffset.
|
134
|
+
*
|
135
|
+
* Requires range's boundary points to be between nodes
|
136
|
+
* (Dom.splitTextContainers).
|
137
|
+
*/
|
138
|
+
function walkBoundary(liveRange, carryDown, stepOutside, stepPartial, stepInside, arg) {
|
139
|
+
// Because range may be mutated during traversal, we must only
|
140
|
+
// refer to it before traversal.
|
141
|
+
var cac = liveRange.commonAncestorContainer;
|
142
|
+
var sc = liveRange.startContainer;
|
143
|
+
var ec = liveRange.endContainer;
|
144
|
+
var so = liveRange.startOffset;
|
145
|
+
var eo = liveRange.endOffset;
|
146
|
+
var start = Dom.nodeAtOffset(sc, so);
|
147
|
+
var end = Dom.nodeAtOffset(ec, eo);
|
148
|
+
var startEnd = Dom.isAtEnd(sc, so);
|
149
|
+
var endEnd = Dom.isAtEnd(ec, eo);
|
150
|
+
var ascStart = Dom.childAndParentsUntilNode(start, cac);
|
151
|
+
var ascEnd = Dom.childAndParentsUntilNode(end, cac);
|
152
|
+
var stepAtStart = makePointNodeStep(start, startEnd, stepInside, stepPartial);
|
153
|
+
var stepAtEnd = makePointNodeStep(end, endEnd, stepOutside, stepPartial);
|
154
|
+
ascendWalkSiblings(ascStart, startEnd, carryDown, stepOutside, stepAtStart, stepInside, arg);
|
155
|
+
ascendWalkSiblings(ascEnd, endEnd, carryDown, stepInside, stepAtEnd, stepOutside, arg);
|
156
|
+
var cacChildStart = Arrays.last(ascStart);
|
157
|
+
var cacChildEnd = Arrays.last(ascEnd);
|
158
|
+
if (cacChildStart && cacChildStart !== cacChildEnd) {
|
159
|
+
var next;
|
160
|
+
Dom.walkUntilNode(cac.firstChild, stepOutside, cacChildStart, arg);
|
161
|
+
next = cacChildStart.nextSibling;
|
162
|
+
stepAtStart(cacChildStart, arg);
|
163
|
+
Dom.walkUntilNode(next, stepInside, cacChildEnd, arg);
|
164
|
+
if (cacChildEnd) {
|
165
|
+
next = cacChildEnd.nextSibling;
|
166
|
+
stepAtEnd(cacChildEnd, arg);
|
167
|
+
Dom.walk(next, stepOutside, arg);
|
168
|
+
}
|
169
|
+
}
|
170
|
+
}
|
171
|
+
|
172
|
+
/**
|
173
|
+
* Pushes down a context to the given range by clearing all
|
174
|
+
* overrides between pushDownFrom and range.commonAncestorContainer,
|
175
|
+
* and clearing all overrides inside and along the range's boundary
|
176
|
+
* (see walkBoundary()), invoking pushDownOverride on all siblings
|
177
|
+
* of the range boundary that are not contained in it.
|
178
|
+
*
|
179
|
+
* Requires range's boundary points to be between nodes
|
180
|
+
* (Dom.splitTextContainers).
|
181
|
+
*/
|
182
|
+
function pushDownContext(liveRange, pushDownFrom, cacOverride, getOverride, clearOverride, clearOverrideRec, pushDownOverride) {
|
183
|
+
// Because range may be mutated during traversal, we must only
|
184
|
+
// refer to it before traversal.
|
185
|
+
var cac = liveRange.commonAncestorContainer;
|
186
|
+
walkBoundary(liveRange, getOverride, pushDownOverride, clearOverride, clearOverrideRec, cacOverride);
|
187
|
+
var fromCacToTop = Dom.childAndParentsUntilInclNode(cac, pushDownFrom);
|
188
|
+
ascendWalkSiblings(fromCacToTop, false, getOverride, pushDownOverride, clearOverride, pushDownOverride, null);
|
189
|
+
clearOverride(pushDownFrom);
|
190
|
+
}
|
191
|
+
|
192
|
+
/**
|
193
|
+
* Walks around the boundary of range and invokes the given
|
194
|
+
* functions with the nodes it encounters.
|
195
|
+
*
|
196
|
+
* clearOverride - invoked for partially contained nodes.
|
197
|
+
* clearOverrideRec - invoked for top-level contained nodes.
|
198
|
+
* pushDownOverride - invoked for left siblings of ancestors
|
199
|
+
* of startContainer[startOffset], and for right siblings of
|
200
|
+
* ancestors of endContainer[endOffset].
|
201
|
+
* setContext - invoked for top-level contained nodes.
|
202
|
+
*
|
203
|
+
* The purpose of the walk is to either push-down or set a context
|
204
|
+
* on all nodes within the range, and push-down any overrides that
|
205
|
+
* exist along the bounderies of the range.
|
206
|
+
*
|
207
|
+
* An override is a context that overrides the context to set.
|
208
|
+
*
|
209
|
+
* Pushing-down a context means that an existing context-giving
|
210
|
+
* ancestor element will be reused, if available, and setContext()
|
211
|
+
* will not be invoked.
|
212
|
+
*
|
213
|
+
* Pushing-down an override means that ancestors of the range's
|
214
|
+
* start or end containers will have their overrides cleared and the
|
215
|
+
* subset of the ancestors' children that is not contained by the
|
216
|
+
* range will have the override applied via pushDownOverride().
|
217
|
+
*
|
218
|
+
* This algorithm will not by itself mutate anything, or depend on
|
219
|
+
* any mutations by the given functions.
|
220
|
+
*
|
221
|
+
* clearOverride, clearOverideRec, setContext, pushDownContext may
|
222
|
+
* mutate the given node and it's previous siblings, and may insert
|
223
|
+
* nextSiblings, but must not mutate the next sibling of the given
|
224
|
+
* node, and must return the nextSibling of the given node (the
|
225
|
+
* nextSibling before any mutations).
|
226
|
+
*
|
227
|
+
* When setContext is invoked with hasOverrideAncestor, it is for
|
228
|
+
* example when a bold element is at the same time the upper
|
229
|
+
* boundary (for example when the bold element itself is the editing
|
230
|
+
* host) and an attempt is made to set a non-bold context inside the
|
231
|
+
* bold element. To work around this, setContext() could force a
|
232
|
+
* non-bold context by wrapping the node with a <span
|
233
|
+
* style="font-weight: normal">. See hasOverrideAncestor below.
|
234
|
+
*
|
235
|
+
* @param liveRange range's boundary points should be between nodes
|
236
|
+
* (Dom.splitTextContainers).
|
237
|
+
*
|
238
|
+
* @param formatter a map with the following properties
|
239
|
+
* isUpperBoundary(node) - identifies exclusive upper
|
240
|
+
* boundary element, only elements below which will be modified.
|
241
|
+
*
|
242
|
+
* getOverride(node) - returns a node's override, or null/undefined
|
243
|
+
* if the node does not provide an override. The topmost node for
|
244
|
+
* which getOverride returns a non-null value is the topmost
|
245
|
+
* override. If there is a topmost override, and it is below the
|
246
|
+
* upper boundary element, it will be cleared and pushed down.
|
247
|
+
* A node with an override must not also provide the context:
|
248
|
+
* !(null != getOverride(node) && hasContext(node))
|
249
|
+
*
|
250
|
+
* clearOverride(node) - should clear the given node of an
|
251
|
+
* override. The given node may or may not have an override
|
252
|
+
* set. Will be invoked shallowly for all ancestors of start and end
|
253
|
+
* containers (up to isUpperBoundary or hasContext). May perform
|
254
|
+
* mutations as explained above.
|
255
|
+
*
|
256
|
+
* clearOverrideRec(node) - like clearOverride but should clear
|
257
|
+
* the override recursively. If not provided, clearOverride will
|
258
|
+
* be applied recursively.
|
259
|
+
*
|
260
|
+
* pushDownOverride(node, override) - applies the given
|
261
|
+
* override to node. Should check whether the given node doesn't
|
262
|
+
* already provide its own override, in which case the given
|
263
|
+
* override should not be applied. May perform mutations as
|
264
|
+
* explained above.
|
265
|
+
*
|
266
|
+
* hasContext(node) - returns true if the given node
|
267
|
+
* already provides the context to set.
|
268
|
+
*
|
269
|
+
* setContext(node, hasOverrideAncestor) - applies the context
|
270
|
+
* to the given node. Should clear overrides recursively. Should
|
271
|
+
* also clear context recursively to avoid unnecessarily nested
|
272
|
+
* contexts. hasOverrideAncestor is true if an override is in effect
|
273
|
+
* above the given node (see explanation above). May perform
|
274
|
+
* mutations as explained above.
|
275
|
+
*/
|
276
|
+
function mutate(liveRange, formatter, rootHasImpliedContext) {
|
277
|
+
if (liveRange.collapsed) {
|
278
|
+
return;
|
279
|
+
}
|
280
|
+
// Because range may be mutated during traversal, we must only
|
281
|
+
// refer to it before traversal.
|
282
|
+
var cac = liveRange.commonAncestorContainer;
|
283
|
+
var topmostOverrideNode = null;
|
284
|
+
var bottommostOverrideNode = null;
|
285
|
+
var isNonClearableOverride = false;
|
286
|
+
var upperBoundaryAndBeyond = false;
|
287
|
+
var fromCacToContext = Dom.childAndParentsUntilIncl(cac, function (node) {
|
288
|
+
// Because we shouldn't expect hasContext to handle the
|
289
|
+
// document element (which has nodeType 9).
|
290
|
+
return !node.parentNode || 9 === node.parentNode.nodeType || formatter.hasContext(node);
|
291
|
+
});
|
292
|
+
Arrays.forEach(fromCacToContext, function (node) {
|
293
|
+
upperBoundaryAndBeyond = upperBoundaryAndBeyond || formatter.isUpperBoundary(node);
|
294
|
+
if (null != formatter.getOverride(node)) {
|
295
|
+
topmostOverrideNode = node;
|
296
|
+
isNonClearableOverride = upperBoundaryAndBeyond;
|
297
|
+
bottommostOverrideNode = bottommostOverrideNode || node;
|
298
|
+
}
|
299
|
+
});
|
300
|
+
if ((rootHasImpliedContext || formatter.hasContext(Arrays.last(fromCacToContext)))
|
301
|
+
&& !isNonClearableOverride) {
|
302
|
+
var pushDownFrom = topmostOverrideNode || cac;
|
303
|
+
var cacOverride = formatter.getOverride(bottommostOverrideNode || cac);
|
304
|
+
var clearOverrideRec = formatter.clearOverrideRec || function (node) {
|
305
|
+
Dom.walkRec(node, formatter.clearOverride);
|
306
|
+
};
|
307
|
+
pushDownContext(
|
308
|
+
liveRange,
|
309
|
+
pushDownFrom,
|
310
|
+
cacOverride,
|
311
|
+
formatter.getOverride,
|
312
|
+
formatter.clearOverride,
|
313
|
+
clearOverrideRec,
|
314
|
+
formatter.pushDownOverride
|
315
|
+
);
|
316
|
+
} else {
|
317
|
+
var setContext = function (node) {
|
318
|
+
formatter.setContext(node, isNonClearableOverride);
|
319
|
+
};
|
320
|
+
walkBoundary(
|
321
|
+
liveRange,
|
322
|
+
formatter.getOverride,
|
323
|
+
formatter.pushDownOverride,
|
324
|
+
formatter.clearOverride,
|
325
|
+
setContext
|
326
|
+
);
|
327
|
+
}
|
328
|
+
}
|
329
|
+
|
330
|
+
function fixupRange(liveRange, mutate) {
|
331
|
+
// Because we are mutating the range several times and don't
|
332
|
+
// want the caller to see the in-between updates, and because we
|
333
|
+
// are using trimRange() below to adjust the range's boundary
|
334
|
+
// points, which we don't want the browser to re-adjust (which
|
335
|
+
// some browsers do).
|
336
|
+
var range = Dom.stableRange(liveRange);
|
337
|
+
|
338
|
+
// Because we should avoid splitTextContainers() if this call is a noop.
|
339
|
+
if (range.collapsed) {
|
340
|
+
return;
|
341
|
+
}
|
342
|
+
|
343
|
+
// Because trimRangeClosingOpening(), mutate() and
|
344
|
+
// adjustPointMoveBackWithinRange() require boundary points to
|
345
|
+
// be between nodes.
|
346
|
+
Dom.splitTextContainers(range);
|
347
|
+
|
348
|
+
// Because we want unbolding
|
349
|
+
// <b>one<i>two{</i>three}</b>
|
350
|
+
// to result in
|
351
|
+
// <b>one<i>two</i></b>three
|
352
|
+
// and not in
|
353
|
+
// <b>one</b><i><b>two</b></i>three
|
354
|
+
// and because adjustPointMoveBackWithinRange() requires the
|
355
|
+
// left boundary point to be next to a non-ignorable node.
|
356
|
+
Dom.trimRangeClosingOpening(range, Html.isIgnorableWhitespace);
|
357
|
+
|
358
|
+
// Because mutation needs to keep track and adjust boundary
|
359
|
+
// points.
|
360
|
+
var leftPoint = Dom.cursorFromBoundaryPoint(range.startContainer, range.startOffset);
|
361
|
+
var rightPoint = Dom.cursorFromBoundaryPoint(range.endContainer, range.endOffset);
|
362
|
+
|
363
|
+
mutate(range, leftPoint, rightPoint);
|
364
|
+
|
365
|
+
// Because we must reflect the adjusted boundary points in the
|
366
|
+
// given range.
|
367
|
+
Dom.setRangeStartFromCursor(liveRange, leftPoint);
|
368
|
+
Dom.setRangeEndFromCursor(liveRange, rightPoint);
|
369
|
+
}
|
370
|
+
|
371
|
+
function adjustPointShallowRemove(point, left, node) {
|
372
|
+
if (point.node === node) {
|
373
|
+
point.next();
|
374
|
+
}
|
375
|
+
}
|
376
|
+
|
377
|
+
function adjustPointMoveBackWithinRange(point, left, node, ref, atEnd) {
|
378
|
+
if (point.node === node) {
|
379
|
+
// Because Left positions will be moved back with the node,
|
380
|
+
// which is correct, while right positions must stay where
|
381
|
+
// they are.
|
382
|
+
// Because right positions with point.atEnd == true/false
|
383
|
+
// must both stay where they are, we don't need an extra
|
384
|
+
// check for point.atEnd.
|
385
|
+
if (!left) {
|
386
|
+
point.next();
|
387
|
+
}
|
388
|
+
}
|
389
|
+
// Because trimRangeClosingOpening will ensure that the boundary
|
390
|
+
// points will be next to a node that is moved, we don't need
|
391
|
+
// any special handling for ref.
|
392
|
+
}
|
393
|
+
|
394
|
+
function adjustPointWrap(point, left, node, wrapper) {
|
395
|
+
// Because we prefer the range to be outside the wrapper (no
|
396
|
+
// particular reason though).
|
397
|
+
if (point.node === node && !point.atEnd) {
|
398
|
+
point.node = wrapper;
|
399
|
+
}
|
400
|
+
}
|
401
|
+
|
402
|
+
function removeShallowAdjust(node, leftPoint, rightPoint) {
|
403
|
+
adjustPointShallowRemove(leftPoint, true, node);
|
404
|
+
adjustPointShallowRemove(rightPoint, false, node);
|
405
|
+
Dom.removeShallow(node);
|
406
|
+
}
|
407
|
+
|
408
|
+
function wrapAdjust(node, wrapper, leftPoint, rightPoint) {
|
409
|
+
if (wrapper.parentNode) {
|
410
|
+
removeShallowAdjust(wrapper, leftPoint, rightPoint);
|
411
|
+
}
|
412
|
+
adjustPointWrap(leftPoint, true, node, wrapper);
|
413
|
+
adjustPointWrap(rightPoint, false, node, wrapper);
|
414
|
+
Dom.wrap(node, wrapper);
|
415
|
+
}
|
416
|
+
|
417
|
+
function insertAdjust(node, ref, atEnd, leftPoint, rightPoint) {
|
418
|
+
adjustPointMoveBackWithinRange(leftPoint, true, node, ref, atEnd);
|
419
|
+
adjustPointMoveBackWithinRange(rightPoint, false, node, ref, atEnd);
|
420
|
+
Dom.insert(node, ref, atEnd);
|
421
|
+
}
|
422
|
+
|
423
|
+
function restackRec(node, hasContext, notIgnoreHorizontal, notIgnoreVertical) {
|
424
|
+
if (1 !== node.nodeType || notIgnoreVertical(node)) {
|
425
|
+
return null;
|
426
|
+
}
|
427
|
+
var maybeContext = Dom.next(node.firstChild, notIgnoreHorizontal);
|
428
|
+
if (!maybeContext) {
|
429
|
+
return null;
|
430
|
+
}
|
431
|
+
var notIgnorable = Dom.next(maybeContext.nextSibling, notIgnoreHorizontal);
|
432
|
+
if (notIgnorable) {
|
433
|
+
return null;
|
434
|
+
}
|
435
|
+
if (hasContext(maybeContext)) {
|
436
|
+
return maybeContext;
|
437
|
+
}
|
438
|
+
return restackRec(maybeContext, hasContext, notIgnoreHorizontal, notIgnoreVertical);
|
439
|
+
}
|
440
|
+
|
441
|
+
function restack(node, hasContext, ignoreHorizontal, ignoreVertical, leftPoint, rightPoint) {
|
442
|
+
var notIgnoreHorizontal = function (node) {
|
443
|
+
return hasContext(node) || !ignoreHorizontal(node);
|
444
|
+
};
|
445
|
+
var notIgnoreVertical = Fn.complement(ignoreVertical);
|
446
|
+
if (hasContext(node)) {
|
447
|
+
return true;
|
448
|
+
}
|
449
|
+
var context = restackRec(node, hasContext, notIgnoreHorizontal, notIgnoreVertical);
|
450
|
+
if (!context) {
|
451
|
+
return false;
|
452
|
+
}
|
453
|
+
wrapAdjust(node, context, leftPoint, rightPoint);
|
454
|
+
return true;
|
455
|
+
}
|
456
|
+
|
457
|
+
function ensureWrapper(node, nodeName, hasWrapper, leftPoint, rightPoint) {
|
458
|
+
if (node.previousSibling && !hasWrapper(node.previousSibling)) {
|
459
|
+
// Because restacking here solves two problems: one the
|
460
|
+
// case where the context was unnecessarily pushed down
|
461
|
+
// on the left of the range, and two to join with a
|
462
|
+
// context node that already exists to the left of the
|
463
|
+
// range.
|
464
|
+
restack(node.previousSibling,
|
465
|
+
hasWrapper,
|
466
|
+
Html.isIgnorableWhitespace,
|
467
|
+
Html.isInlineFormattable,
|
468
|
+
leftPoint,
|
469
|
+
rightPoint);
|
470
|
+
}
|
471
|
+
if (node.previousSibling && hasWrapper(node.previousSibling)) {
|
472
|
+
insertAdjust(node, node.previousSibling, true, leftPoint, rightPoint);
|
473
|
+
return true;
|
474
|
+
}
|
475
|
+
if (!hasWrapper(node)) {
|
476
|
+
var wrapper = document.createElement(nodeName);
|
477
|
+
wrapAdjust(node, wrapper, leftPoint, rightPoint);
|
478
|
+
return true;
|
479
|
+
}
|
480
|
+
return false;
|
481
|
+
}
|
482
|
+
|
483
|
+
function isUpperBoundary_default(node) {
|
484
|
+
// Because the body element is an obvious upper boundary, and
|
485
|
+
// because, when we are inside an editable, we shouldn't make
|
486
|
+
// modifications outside the editable (if we are not inside
|
487
|
+
// an editable, we don't care).
|
488
|
+
return 'BODY' === node.nodeName || Html.isEditingHost(node);
|
489
|
+
}
|
490
|
+
|
491
|
+
function makeNodeFormatter(nodeName, leftPoint, rightPoint) {
|
492
|
+
function hasContext(node) {
|
493
|
+
return nodeName === node.nodeName;
|
494
|
+
}
|
495
|
+
|
496
|
+
function clearContext(node) {
|
497
|
+
if (nodeName === node.nodeName) {
|
498
|
+
removeShallowAdjust(node, leftPoint, rightPoint);
|
499
|
+
}
|
500
|
+
}
|
501
|
+
|
502
|
+
function clearContextRec(node) {
|
503
|
+
Dom.walkRec(node, clearContext);
|
504
|
+
}
|
505
|
+
|
506
|
+
function setContext(node) {
|
507
|
+
if (ensureWrapper(node, nodeName, hasContext, leftPoint, rightPoint)) {
|
508
|
+
// Because the node was wrapped with a context, and if
|
509
|
+
// the node itself has the context, it should be cleared
|
510
|
+
// to avoid nested contexts.
|
511
|
+
clearContextRec(node);
|
512
|
+
} else {
|
513
|
+
// Because the node itself has the context and was not
|
514
|
+
// wrapped, we must only clear its children.
|
515
|
+
Dom.walk(node.firstChild, clearContextRec);
|
516
|
+
}
|
517
|
+
}
|
518
|
+
|
519
|
+
return {
|
520
|
+
hasContext: hasContext,
|
521
|
+
getOverride: Fn.noop,
|
522
|
+
clearOverride: Fn.noop,
|
523
|
+
pushDownOverride: Fn.noop,
|
524
|
+
setContext: setContext,
|
525
|
+
isUpperBoundary: isUpperBoundary_default
|
526
|
+
};
|
527
|
+
}
|
528
|
+
|
529
|
+
function makeNodeUnformatter(nodeName, leftPoint, rightPoint) {
|
530
|
+
|
531
|
+
function getOverride(node) {
|
532
|
+
return nodeName === node.nodeName ? true : null;
|
533
|
+
}
|
534
|
+
|
535
|
+
function clearOverride(node) {
|
536
|
+
if (nodeName === node.nodeName) {
|
537
|
+
removeShallowAdjust(node, leftPoint, rightPoint);
|
538
|
+
}
|
539
|
+
}
|
540
|
+
|
541
|
+
function pushDownOverride(node, override) {
|
542
|
+
if (!override) {
|
543
|
+
return;
|
544
|
+
}
|
545
|
+
ensureWrapper(node, nodeName, getOverride, leftPoint, rightPoint);
|
546
|
+
}
|
547
|
+
|
548
|
+
return {
|
549
|
+
hasContext: Fn.returnFalse,
|
550
|
+
setContext: Fn.noop,
|
551
|
+
getOverride: getOverride,
|
552
|
+
clearOverride: clearOverride,
|
553
|
+
pushDownOverride: pushDownOverride,
|
554
|
+
isUpperBoundary: isUpperBoundary_default
|
555
|
+
};
|
556
|
+
}
|
557
|
+
|
558
|
+
function createStyleWrapper_default() {
|
559
|
+
return document.createElement('SPAN');
|
560
|
+
}
|
561
|
+
|
562
|
+
function isStyleEq_default(styleValueA, styleValueB) {
|
563
|
+
return styleValueA === styleValueB;
|
564
|
+
}
|
565
|
+
|
566
|
+
function isStyleWrapperReusable_default(node) {
|
567
|
+
return 'SPAN' === node.nodeName;
|
568
|
+
}
|
569
|
+
|
570
|
+
function isStyleWrapperPrunable_default(node) {
|
571
|
+
return ('SPAN' === node.nodeName
|
572
|
+
&& Arrays.every(Arrays.map(Dom.attrs(node), Arrays.second),
|
573
|
+
Strings.empty));
|
574
|
+
}
|
575
|
+
|
576
|
+
function makeStyleFormatter(styleName, styleValue, createWrapper, isStyleEq, isReusable, isPrunable, leftPoint, rightPoint) {
|
577
|
+
|
578
|
+
function removeStyle(node, styleName) {
|
579
|
+
if (Strings.empty(Dom.getStyle(node, styleName))) {
|
580
|
+
return;
|
581
|
+
}
|
582
|
+
Dom.setStyle(node, styleName, null);
|
583
|
+
if (isPrunable(node)) {
|
584
|
+
removeShallowAdjust(node, leftPoint, rightPoint);
|
585
|
+
}
|
586
|
+
}
|
587
|
+
|
588
|
+
function setStyle(node, styleName, styleValue, prevWrapper) {
|
589
|
+
if (prevWrapper && prevWrapper === node.previousSibling) {
|
590
|
+
insertAdjust(node, prevWrapper, true, leftPoint, rightPoint);
|
591
|
+
removeStyle(node, styleName);
|
592
|
+
return prevWrapper;
|
593
|
+
}
|
594
|
+
if (isReusable(node)) {
|
595
|
+
Dom.setStyle(node, styleName, styleValue);
|
596
|
+
return prevWrapper;
|
597
|
+
}
|
598
|
+
var wrapper = createWrapper();
|
599
|
+
Dom.setStyle(wrapper, styleName, styleValue);
|
600
|
+
wrapAdjust(node, wrapper, leftPoint, rightPoint);
|
601
|
+
removeStyle(node, styleName);
|
602
|
+
return wrapper;
|
603
|
+
}
|
604
|
+
|
605
|
+
function hasContext(node) {
|
606
|
+
return isStyleEq(Dom.getStyle(node, styleName), styleValue);
|
607
|
+
}
|
608
|
+
|
609
|
+
function getOverride(node) {
|
610
|
+
var override = Dom.getStyle(node, styleName);
|
611
|
+
return (Strings.empty(override) || isStyleEq(override, styleValue)
|
612
|
+
? null
|
613
|
+
: override);
|
614
|
+
}
|
615
|
+
|
616
|
+
function clearOverride(node) {
|
617
|
+
removeStyle(node, styleName);
|
618
|
+
}
|
619
|
+
|
620
|
+
function clearOverrideRec(node) {
|
621
|
+
Dom.walkRec(node, clearOverride);
|
622
|
+
}
|
623
|
+
|
624
|
+
var overrideWrapper = null;
|
625
|
+
function pushDownOverride(node, override) {
|
626
|
+
if (Strings.empty(override) || !Strings.empty(Dom.getStyle(node, styleName))) {
|
627
|
+
return;
|
628
|
+
}
|
629
|
+
overrideWrapper = setStyle(node, styleName, override, overrideWrapper);
|
630
|
+
}
|
631
|
+
|
632
|
+
var contextWrapper = null;
|
633
|
+
function setContext(node) {
|
634
|
+
Dom.walk(node.firstChild, clearOverrideRec);
|
635
|
+
contextWrapper = setStyle(node, styleName, styleValue, contextWrapper);
|
636
|
+
}
|
637
|
+
|
638
|
+
return {
|
639
|
+
hasContext: hasContext,
|
640
|
+
getOverride: getOverride,
|
641
|
+
clearOverride: clearOverride,
|
642
|
+
pushDownOverride: pushDownOverride,
|
643
|
+
setContext: setContext,
|
644
|
+
isUpperBoundary: isUpperBoundary_default
|
645
|
+
};
|
646
|
+
}
|
647
|
+
|
648
|
+
function format(liveRange, nodeName) {
|
649
|
+
fixupRange(liveRange, function (range, leftPoint, rightPoint) {
|
650
|
+
mutate(range, makeNodeFormatter(nodeName, leftPoint, rightPoint));
|
651
|
+
});
|
652
|
+
}
|
653
|
+
|
654
|
+
function unformat(liveRange, nodeName) {
|
655
|
+
fixupRange(liveRange, function (range, leftPoint, rightPoint) {
|
656
|
+
mutate(range, makeNodeUnformatter(nodeName, leftPoint, rightPoint), true);
|
657
|
+
});
|
658
|
+
}
|
659
|
+
|
660
|
+
function findReusableAncestor(range, hasContext, getOverride, isUpperBoundary, isReusable) {
|
661
|
+
var obstruction = null;
|
662
|
+
function untilIncl(node) {
|
663
|
+
return (null != getOverride(node)
|
664
|
+
|| hasContext(node)
|
665
|
+
|| isReusable(node)
|
666
|
+
|| isUpperBoundary(node));
|
667
|
+
}
|
668
|
+
function beforeAfter(node) {
|
669
|
+
obstruction = obstruction || !Html.isIgnorableWhitespace(node);
|
670
|
+
}
|
671
|
+
var start = Dom.nodeAtOffset(range.startContainer, range.startOffset);
|
672
|
+
var end = Dom.nodeAtOffset(range.endContainer, range.endOffset);
|
673
|
+
var startEnd = Dom.isAtEnd(range.startContainer, range.startOffset);
|
674
|
+
var endEnd = Dom.isAtEnd(range.endContainer, range.endOffset);
|
675
|
+
var ascStart = Dom.childAndParentsUntilIncl(start, untilIncl);
|
676
|
+
var ascEnd = Dom.childAndParentsUntilIncl(end, untilIncl);
|
677
|
+
var reusable = Arrays.last(ascStart);
|
678
|
+
function at(node) {
|
679
|
+
// Because the start node is inside the range.
|
680
|
+
if (node === start && !startEnd) {
|
681
|
+
return;
|
682
|
+
}
|
683
|
+
// Because the end node is outside the range.
|
684
|
+
if (node === end && !endEnd) {
|
685
|
+
beforeAfter(node);
|
686
|
+
return;
|
687
|
+
}
|
688
|
+
obstruction = obstruction || !Html.isInlineFormattable(node);
|
689
|
+
}
|
690
|
+
if (!reusable || !isReusable(reusable) || reusable !== Arrays.last(ascEnd)) {
|
691
|
+
return null;
|
692
|
+
}
|
693
|
+
ascendWalkSiblings(ascStart, startEnd, Fn.noop, beforeAfter, at, Fn.noop);
|
694
|
+
if (obstruction) {
|
695
|
+
return null;
|
696
|
+
}
|
697
|
+
ascendWalkSiblings(ascEnd, endEnd, Fn.noop, Fn.noop, at, beforeAfter);
|
698
|
+
if (obstruction) {
|
699
|
+
return null;
|
700
|
+
}
|
701
|
+
return reusable;
|
702
|
+
}
|
703
|
+
|
704
|
+
function formatStyle(liveRange, styleName, styleValue, createWrapper, isStyleEq, isReusable, isPrunable) {
|
705
|
+
createWrapper = createWrapper || createStyleWrapper_default;
|
706
|
+
isStyleEq = isStyleEq || isStyleEq_default;
|
707
|
+
isReusable = isReusable || isStyleWrapperReusable_default;
|
708
|
+
isPrunable = isPrunable || isStyleWrapperPrunable_default;
|
709
|
+
fixupRange(liveRange, function (range, leftPoint, rightPoint) {
|
710
|
+
var formatter = makeStyleFormatter(
|
711
|
+
styleName,
|
712
|
+
styleValue,
|
713
|
+
createWrapper,
|
714
|
+
isStyleEq,
|
715
|
+
isReusable,
|
716
|
+
isPrunable,
|
717
|
+
leftPoint,
|
718
|
+
rightPoint
|
719
|
+
);
|
720
|
+
var reusableAncestor = findReusableAncestor(
|
721
|
+
range,
|
722
|
+
formatter.hasContext,
|
723
|
+
formatter.getOverride,
|
724
|
+
formatter.isUpperBoundary,
|
725
|
+
isReusable
|
726
|
+
);
|
727
|
+
if (reusableAncestor) {
|
728
|
+
formatter.setContext(reusableAncestor);
|
729
|
+
} else {
|
730
|
+
mutate(range, formatter, false);
|
731
|
+
}
|
732
|
+
});
|
733
|
+
}
|
734
|
+
|
735
|
+
function splitBoundary(liveRange, pred, clone) {
|
736
|
+
clone = clone || Dom.cloneShallow;
|
737
|
+
fixupRange(liveRange, function (range, leftPoint, rightPoint) {
|
738
|
+
|
739
|
+
var wrapper = null;
|
740
|
+
|
741
|
+
function carryDown(elem, stop) {
|
742
|
+
return stop || !pred(elem);
|
743
|
+
}
|
744
|
+
|
745
|
+
function pushDown(node, stop) {
|
746
|
+
if (stop) {
|
747
|
+
return;
|
748
|
+
}
|
749
|
+
if (!wrapper || node.parentNode.previousSibling !== wrapper) {
|
750
|
+
wrapper = clone(node.parentNode);
|
751
|
+
insertAdjust(wrapper, node.parentNode, false, leftPoint, rightPoint);
|
752
|
+
}
|
753
|
+
insertAdjust(node, wrapper, true, leftPoint, rightPoint);
|
754
|
+
}
|
755
|
+
|
756
|
+
var sc = range.startContainer;
|
757
|
+
var so = range.startOffset;
|
758
|
+
var ec = range.endContainer;
|
759
|
+
var eo = range.endOffset;
|
760
|
+
var cac = range.commonAncestorContainer;
|
761
|
+
var startEnd = Dom.isAtEnd(sc, so);
|
762
|
+
var endEnd = Dom.isAtEnd(ec, eo);
|
763
|
+
var ascStart = Dom.childAndParentsUntilNode(Dom.nodeAtOffset(sc, so), cac);
|
764
|
+
var ascEnd = Dom.childAndParentsUntilNode(Dom.nodeAtOffset(ec, eo), cac);
|
765
|
+
ascendWalkSiblings(ascStart, startEnd, carryDown, pushDown, Fn.noop, Fn.noop, null);
|
766
|
+
ascendWalkSiblings(ascEnd, endEnd, carryDown, pushDown, Fn.noop, Fn.noop, null);
|
767
|
+
});
|
768
|
+
}
|
769
|
+
|
770
|
+
return {
|
771
|
+
format: format,
|
772
|
+
unformat: unformat,
|
773
|
+
formatStyle: formatStyle,
|
774
|
+
splitBoundary: splitBoundary
|
775
|
+
};
|
776
|
+
});
|