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,917 @@
|
|
1
|
+
/* range.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
|
+
// Ensure GENTICS Namespace
|
28
|
+
window.GENTICS = window.GENTICS || {};
|
29
|
+
window.GENTICS.Utils = window.GENTICS.Utils || {};
|
30
|
+
|
31
|
+
define([
|
32
|
+
'jquery',
|
33
|
+
'util/dom',
|
34
|
+
'util/class',
|
35
|
+
'aloha/console',
|
36
|
+
'aloha/rangy-core'
|
37
|
+
], function (jQuery, Dom, Class, console, rangy) {
|
38
|
+
"use strict";
|
39
|
+
|
40
|
+
var GENTICS = window.GENTICS;
|
41
|
+
var Aloha = window.Aloha;
|
42
|
+
|
43
|
+
function selfAndParentsUntil(container, limit) {
|
44
|
+
var parents = [],
|
45
|
+
cur;
|
46
|
+
if (1 === container.nodeType) {
|
47
|
+
cur = container;
|
48
|
+
} else {
|
49
|
+
cur = container.parentNode;
|
50
|
+
}
|
51
|
+
for (;;) {
|
52
|
+
if (!cur || cur === limit || 9 === cur.nodeType) {
|
53
|
+
break;
|
54
|
+
}
|
55
|
+
if (1 === cur.nodeType) {
|
56
|
+
parents.push(cur);
|
57
|
+
}
|
58
|
+
cur = cur.parentNode;
|
59
|
+
}
|
60
|
+
return parents;
|
61
|
+
}
|
62
|
+
|
63
|
+
/**
|
64
|
+
* @namespace GENTICS.Utils
|
65
|
+
* @class RangeObject
|
66
|
+
* Represents a selection range in the browser that
|
67
|
+
* has some advanced features like selecting the range.
|
68
|
+
* @param {object} param if boolean true is passed, the range will be deducted from the current browser selection.
|
69
|
+
* If another rangeObject is passed, it will be cloned.
|
70
|
+
* If nothing is passed, the rangeObject will be empty.
|
71
|
+
* @constructor
|
72
|
+
*/
|
73
|
+
GENTICS.Utils.RangeObject = Class.extend({
|
74
|
+
_constructor: function (param) {
|
75
|
+
// Take the values from the passed object
|
76
|
+
if (typeof param === 'object') {
|
77
|
+
if (typeof param.startContainer !== 'undefined') {
|
78
|
+
this.startContainer = param.startContainer;
|
79
|
+
}
|
80
|
+
if (typeof param.startOffset !== 'undefined') {
|
81
|
+
this.startOffset = param.startOffset;
|
82
|
+
}
|
83
|
+
if (typeof param.endContainer !== 'undefined') {
|
84
|
+
this.endContainer = param.endContainer;
|
85
|
+
}
|
86
|
+
if (typeof param.endOffset !== 'undefined') {
|
87
|
+
this.endOffset = param.endOffset;
|
88
|
+
}
|
89
|
+
} else if (param === true) {
|
90
|
+
this.initializeFromUserSelection();
|
91
|
+
}
|
92
|
+
},
|
93
|
+
|
94
|
+
/**
|
95
|
+
* DOM object of the start container of the selection.
|
96
|
+
* This is always has to be a DOM text node.
|
97
|
+
* @property startContainer
|
98
|
+
* @type {DOMObject}
|
99
|
+
*/
|
100
|
+
startContainer: undefined,
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Offset of the selection in the start container
|
104
|
+
* @property startOffset
|
105
|
+
* @type {Integer}
|
106
|
+
*/
|
107
|
+
startOffset: undefined,
|
108
|
+
|
109
|
+
/**
|
110
|
+
* DOM object of the end container of the selection.
|
111
|
+
* This is always has to be a DOM text node.
|
112
|
+
* @property endContainer
|
113
|
+
* @type {DOMObject}
|
114
|
+
*/
|
115
|
+
endContainer: undefined,
|
116
|
+
|
117
|
+
/**
|
118
|
+
* Offset of the selection in the end container
|
119
|
+
* @property endOffset
|
120
|
+
* @type {Integer}
|
121
|
+
*/
|
122
|
+
endOffset: undefined,
|
123
|
+
|
124
|
+
/**
|
125
|
+
* Delete all contents selected by the current range
|
126
|
+
* @param rangeTree a GENTICS.Utils.RangeTree object may be provided to start from. This parameter is optional
|
127
|
+
*/
|
128
|
+
deleteContents: function () {
|
129
|
+
|
130
|
+
Dom.removeRange(this);
|
131
|
+
|
132
|
+
},
|
133
|
+
|
134
|
+
/**
|
135
|
+
* Output some log
|
136
|
+
* TODO: move this to Aloha.Log
|
137
|
+
* @param message log message to output
|
138
|
+
* @return void
|
139
|
+
* @deprecated
|
140
|
+
* @hide
|
141
|
+
*/
|
142
|
+
log: function (message) {
|
143
|
+
console.deprecated('Utils.RangeObject', 'log() is deprecated. use ' + 'console.log() from module "aloha/console" instead: ' + message);
|
144
|
+
},
|
145
|
+
|
146
|
+
/**
|
147
|
+
* Method to test if a range object is collapsed.
|
148
|
+
* A range is considered collapsed if either no endContainer exists or the endContainer/Offset equal startContainer/Offset
|
149
|
+
* @return {boolean} true if collapsed, false otherwise
|
150
|
+
* @method
|
151
|
+
*/
|
152
|
+
isCollapsed: function () {
|
153
|
+
return (!this.endContainer || (this.startContainer === this.endContainer && this.startOffset === this.endOffset));
|
154
|
+
},
|
155
|
+
|
156
|
+
/**
|
157
|
+
* Method to (re-)calculate the common ancestor container and to get it.
|
158
|
+
* The common ancestor container is the DOM Object which encloses the
|
159
|
+
* whole range and is nearest to the start and end container objects.
|
160
|
+
* @return {DOMObject} get the common ancestor container
|
161
|
+
* @method
|
162
|
+
*/
|
163
|
+
getCommonAncestorContainer: function () {
|
164
|
+
if (this.commonAncestorContainer) {
|
165
|
+
// sometimes it's cached (or was set)
|
166
|
+
return this.commonAncestorContainer;
|
167
|
+
}
|
168
|
+
// if it's not cached, calculate and then cache it
|
169
|
+
this.updateCommonAncestorContainer();
|
170
|
+
|
171
|
+
// now return it anyway
|
172
|
+
return this.commonAncestorContainer;
|
173
|
+
},
|
174
|
+
|
175
|
+
/**
|
176
|
+
* Get the parent elements of the startContainer/endContainer up to the given limit. When the startContainer/endContainer
|
177
|
+
* is no text element, but a node, the node itself is returned as first element.
|
178
|
+
* @param {jQuery} limit limit object (default: body)
|
179
|
+
* @param {boolean} fromStart true to fetch the parents from the startContainer, false for the endContainer
|
180
|
+
* @return {jQuery} parent elements of the startContainer/endContainer as jQuery objects
|
181
|
+
* @method
|
182
|
+
*/
|
183
|
+
getContainerParents: function (limit, fromEnd) {
|
184
|
+
// TODO cache the calculated parents
|
185
|
+
var container = fromEnd ? this.endContainer : this.startContainer;
|
186
|
+
if (!container) {
|
187
|
+
return false;
|
188
|
+
}
|
189
|
+
return jQuery(selfAndParentsUntil(container, limit ? limit[0] : null));
|
190
|
+
},
|
191
|
+
|
192
|
+
/**
|
193
|
+
* Get the parent elements of the startContainer up to the given limit. When the startContainer
|
194
|
+
* is no text element, but a node, the node itself is returned as first element.
|
195
|
+
* @param {jQuery} limit limit object (default: body)
|
196
|
+
* @return {jQuery} parent elements of the startContainer as jQuery objects
|
197
|
+
* @method
|
198
|
+
*/
|
199
|
+
getStartContainerParents: function (limit) {
|
200
|
+
return this.getContainerParents(limit, false);
|
201
|
+
},
|
202
|
+
|
203
|
+
/**
|
204
|
+
* Get the parent elements of the endContainer up to the given limit. When the endContainer is
|
205
|
+
* no text element, but a node, the node itself is returned as first element.
|
206
|
+
* @param {jQuery} limit limit object (default: body)
|
207
|
+
* @return {jQuery} parent elements of the endContainer as jQuery objects
|
208
|
+
* @method
|
209
|
+
*/
|
210
|
+
getEndContainerParents: function (limit) {
|
211
|
+
return this.getContainerParents(limit, true);
|
212
|
+
},
|
213
|
+
|
214
|
+
/**
|
215
|
+
* TODO: the commonAncestorContainer is not calculated correctly, if either the start or
|
216
|
+
* the endContainer would be the cac itself (e.g. when the startContainer is a textNode
|
217
|
+
* and the endContainer is the startContainer's parent <p>). in this case the cac will be set
|
218
|
+
* to the parent div
|
219
|
+
* Method to update a range object internally
|
220
|
+
* @param commonAncestorContainer (DOM Object); optional Parameter; if set, the parameter
|
221
|
+
* will be used instead of the automatically calculated CAC
|
222
|
+
* @return void
|
223
|
+
* @hide
|
224
|
+
*/
|
225
|
+
updateCommonAncestorContainer: function (commonAncestorContainer) {
|
226
|
+
// if no parameter was passed, calculate it
|
227
|
+
if (!commonAncestorContainer) {
|
228
|
+
// this will be needed either right now for finding the CAC or later for the crossing index
|
229
|
+
var parentsStartContainer = this.getStartContainerParents(),
|
230
|
+
parentsEndContainer = this.getEndContainerParents(),
|
231
|
+
i;
|
232
|
+
|
233
|
+
// find the crossing between startContainer and endContainer parents (=commonAncestorContainer)
|
234
|
+
if (!(parentsStartContainer.length > 0 && parentsEndContainer.length > 0)) {
|
235
|
+
console.warn('aloha/range', 'could not find commonAncestorContainer');
|
236
|
+
return false;
|
237
|
+
}
|
238
|
+
|
239
|
+
for (i = 0; i < parentsStartContainer.length; i++) {
|
240
|
+
if (parentsEndContainer.index(parentsStartContainer[i]) != -1) {
|
241
|
+
this.commonAncestorContainer = parentsStartContainer[i];
|
242
|
+
break;
|
243
|
+
}
|
244
|
+
}
|
245
|
+
} else {
|
246
|
+
this.commonAncestorContainer = commonAncestorContainer;
|
247
|
+
}
|
248
|
+
|
249
|
+
// if everything went well, return true :-)
|
250
|
+
console.debug(commonAncestorContainer ? 'commonAncestorContainer was set successfully' : 'commonAncestorContainer was calculated successfully');
|
251
|
+
return true;
|
252
|
+
},
|
253
|
+
|
254
|
+
/**
|
255
|
+
* Helper function for selection in IE. Creates a collapsed text range at the given position
|
256
|
+
* @param container container
|
257
|
+
* @param offset offset
|
258
|
+
* @return collapsed text range at that position
|
259
|
+
* @hide
|
260
|
+
*/
|
261
|
+
getCollapsedIERange: function (container, offset) {
|
262
|
+
// create a text range
|
263
|
+
var ieRange = document.body.createTextRange(),
|
264
|
+
tmpRange,
|
265
|
+
right,
|
266
|
+
parent,
|
267
|
+
left;
|
268
|
+
|
269
|
+
// search to the left for the next element
|
270
|
+
left = this.searchElementToLeft(container, offset);
|
271
|
+
if (left.element) {
|
272
|
+
// found an element, set the start to the end of that element
|
273
|
+
tmpRange = document.body.createTextRange();
|
274
|
+
tmpRange.moveToElementText(left.element);
|
275
|
+
ieRange.setEndPoint('StartToEnd', tmpRange);
|
276
|
+
|
277
|
+
// and correct the start
|
278
|
+
if (left.characters !== 0) {
|
279
|
+
ieRange.moveStart('character', left.characters);
|
280
|
+
} else {
|
281
|
+
// this is a hack, when we are at the start of a text node, move the range anyway
|
282
|
+
ieRange.moveStart('character', 1);
|
283
|
+
ieRange.moveStart('character', -1);
|
284
|
+
}
|
285
|
+
} else {
|
286
|
+
// found nothing to the left, so search right
|
287
|
+
right = this.searchElementToRight(container, offset);
|
288
|
+
// also found no element to the right, use the container itself
|
289
|
+
parent = container.nodeType == 3 ? container.parentNode : container;
|
290
|
+
tmpRange = document.body.createTextRange();
|
291
|
+
tmpRange.moveToElementText(parent);
|
292
|
+
ieRange.setEndPoint('StartToStart', tmpRange);
|
293
|
+
|
294
|
+
// and correct the start
|
295
|
+
if (left.characters !== 0) {
|
296
|
+
ieRange.moveStart('character', left.characters);
|
297
|
+
}
|
298
|
+
}
|
299
|
+
ieRange.collapse();
|
300
|
+
|
301
|
+
return ieRange;
|
302
|
+
},
|
303
|
+
|
304
|
+
/**
|
305
|
+
* Sets the visible selection in the Browser based on the range object.
|
306
|
+
* If the selection is collapsed, this will result in a blinking cursor,
|
307
|
+
* otherwise in a text selection.
|
308
|
+
* @method
|
309
|
+
*/
|
310
|
+
select: function () {
|
311
|
+
var ieRange, endRange, startRange, range, sel;
|
312
|
+
|
313
|
+
if (typeof this.startContainer === 'undefined' || typeof this.endContainer === 'undefined') {
|
314
|
+
console.warn('can not select an empty range');
|
315
|
+
return false;
|
316
|
+
}
|
317
|
+
|
318
|
+
// create a range
|
319
|
+
range = rangy.createRange();
|
320
|
+
// set start and endContainer
|
321
|
+
range.setStart(this.startContainer, this.startOffset);
|
322
|
+
range.setEnd(this.endContainer, this.endOffset);
|
323
|
+
|
324
|
+
// update the selection
|
325
|
+
sel = rangy.getSelection();
|
326
|
+
sel.setSingleRange(range);
|
327
|
+
},
|
328
|
+
|
329
|
+
/**
|
330
|
+
* Starting at the given position, search for the next element to the left and count the number of characters are in between
|
331
|
+
* @param container container of the startpoint
|
332
|
+
* @param offset offset of the startpoint in the container
|
333
|
+
* @return object with 'element' (null if no element found) and 'characters'
|
334
|
+
* @hide
|
335
|
+
*/
|
336
|
+
searchElementToLeft: function (container, offset) {
|
337
|
+
var checkElement,
|
338
|
+
characters = 0;
|
339
|
+
|
340
|
+
if (container.nodeType === 3) {
|
341
|
+
// start is in a text node
|
342
|
+
characters = offset;
|
343
|
+
// begin check at the element to the left (if any)
|
344
|
+
checkElement = container.previousSibling;
|
345
|
+
} else {
|
346
|
+
// start is between nodes, begin check at the element to the left (if any)
|
347
|
+
if (offset > 0) {
|
348
|
+
checkElement = container.childNodes[offset - 1];
|
349
|
+
}
|
350
|
+
}
|
351
|
+
|
352
|
+
// move to the right until we find an element
|
353
|
+
while (checkElement && checkElement.nodeType === 3) {
|
354
|
+
characters += checkElement.data.length;
|
355
|
+
checkElement = checkElement.previousSibling;
|
356
|
+
}
|
357
|
+
|
358
|
+
return {
|
359
|
+
'element': checkElement,
|
360
|
+
'characters': characters
|
361
|
+
};
|
362
|
+
},
|
363
|
+
|
364
|
+
/**
|
365
|
+
* Starting at the given position, search for the next element to the right and count the number of characters that are in between
|
366
|
+
* @param container container of the startpoint
|
367
|
+
* @param offset offset of the startpoint in the container
|
368
|
+
* @return object with 'element' (null if no element found) and 'characters'
|
369
|
+
* @hide
|
370
|
+
*/
|
371
|
+
searchElementToRight: function (container, offset) {
|
372
|
+
var checkElement,
|
373
|
+
characters = 0;
|
374
|
+
|
375
|
+
if (container.nodeType === 3) {
|
376
|
+
// start is in a text node
|
377
|
+
characters = container.data.length - offset;
|
378
|
+
|
379
|
+
// begin check at the element to the right (if any)
|
380
|
+
checkElement = container.nextSibling;
|
381
|
+
} else {
|
382
|
+
// start is between nodes, begin check at the element to the right (if any)
|
383
|
+
if (offset < container.childNodes.length) {
|
384
|
+
checkElement = container.childNodes[offset];
|
385
|
+
}
|
386
|
+
}
|
387
|
+
|
388
|
+
// move to the right until we find an element
|
389
|
+
while (checkElement && checkElement.nodeType === 3) {
|
390
|
+
characters += checkElement.data.length;
|
391
|
+
checkElement = checkElement.nextSibling;
|
392
|
+
}
|
393
|
+
|
394
|
+
return {
|
395
|
+
'element': checkElement,
|
396
|
+
'characters': characters
|
397
|
+
};
|
398
|
+
},
|
399
|
+
|
400
|
+
/**
|
401
|
+
* Method which updates the rangeObject including all extending properties like commonAncestorContainer etc...
|
402
|
+
* TODO: is this method needed here? or should it contain the same code as Aloha.Selection.prototype.SelectionRange.prototype.update?
|
403
|
+
* @return void
|
404
|
+
* @hide
|
405
|
+
*/
|
406
|
+
update: function (event) {
|
407
|
+
console.debug('now updating rangeObject');
|
408
|
+
|
409
|
+
this.initializeFromUserSelection(event);
|
410
|
+
this.updateCommonAncestorContainer();
|
411
|
+
},
|
412
|
+
|
413
|
+
/**
|
414
|
+
* Initialize the current range object from the user selection of the browser.
|
415
|
+
* @param event which calls the method
|
416
|
+
* @return void
|
417
|
+
* @hide
|
418
|
+
*/
|
419
|
+
initializeFromUserSelection: function (event) {
|
420
|
+
var selection = rangy.getSelection(),
|
421
|
+
browserRange;
|
422
|
+
|
423
|
+
if (!selection) {
|
424
|
+
return false;
|
425
|
+
}
|
426
|
+
|
427
|
+
// check if a ragne exists
|
428
|
+
if (!selection.rangeCount) {
|
429
|
+
return false;
|
430
|
+
}
|
431
|
+
|
432
|
+
// getBrowserRange
|
433
|
+
browserRange = selection.getRangeAt(0);
|
434
|
+
if (!browserRange) {
|
435
|
+
return false;
|
436
|
+
}
|
437
|
+
|
438
|
+
// initially set the range to what the browser tells us
|
439
|
+
this.startContainer = browserRange.startContainer;
|
440
|
+
this.endContainer = browserRange.endContainer;
|
441
|
+
this.startOffset = browserRange.startOffset;
|
442
|
+
this.endOffset = browserRange.endOffset;
|
443
|
+
|
444
|
+
// now try to correct the range
|
445
|
+
this.correctRange();
|
446
|
+
return;
|
447
|
+
},
|
448
|
+
|
449
|
+
/**
|
450
|
+
* Correct the current range. The general goal of the algorithm is to have start
|
451
|
+
* and end of the range in text nodes if possible and the end of the range never
|
452
|
+
* at the beginning of an element or text node. Details of the algorithm can be
|
453
|
+
* found in the code comments
|
454
|
+
* @method
|
455
|
+
*/
|
456
|
+
correctRange: function () {
|
457
|
+
var adjacentTextNode,
|
458
|
+
textNode,
|
459
|
+
checkedElement,
|
460
|
+
parentNode,
|
461
|
+
offset;
|
462
|
+
|
463
|
+
this.clearCaches();
|
464
|
+
if (this.isCollapsed()) {
|
465
|
+
// collapsed ranges are treated specially
|
466
|
+
|
467
|
+
// first check if the range is not in a text node
|
468
|
+
if (this.startContainer.nodeType === 1) {
|
469
|
+
if (this.startOffset > 0 && this.startContainer.childNodes[this.startOffset - 1].nodeType === 3) {
|
470
|
+
// when the range is between nodes (container is an element
|
471
|
+
// node) and there is a text node to the left -> move into this text
|
472
|
+
// node (at the end)
|
473
|
+
this.startContainer = this.startContainer.childNodes[this.startOffset - 1];
|
474
|
+
this.startOffset = this.startContainer.data.length;
|
475
|
+
this.endContainer = this.startContainer;
|
476
|
+
this.endOffset = this.startOffset;
|
477
|
+
return;
|
478
|
+
}
|
479
|
+
|
480
|
+
if (this.startOffset > 0 && this.startContainer.childNodes[this.startOffset - 1].nodeType === 1) {
|
481
|
+
// search for the next text node to the left
|
482
|
+
adjacentTextNode = GENTICS.Utils.Dom.searchAdjacentTextNode(this.startContainer, this.startOffset, true);
|
483
|
+
if (adjacentTextNode) {
|
484
|
+
this.startContainer = this.endContainer = adjacentTextNode;
|
485
|
+
this.startOffset = this.endOffset = adjacentTextNode.data.length;
|
486
|
+
return;
|
487
|
+
}
|
488
|
+
// search for the next text node to the right
|
489
|
+
adjacentTextNode = GENTICS.Utils.Dom.searchAdjacentTextNode(this.startContainer, this.startOffset, false);
|
490
|
+
if (adjacentTextNode) {
|
491
|
+
this.startContainer = this.endContainer = adjacentTextNode;
|
492
|
+
this.startOffset = this.endOffset = 0;
|
493
|
+
return;
|
494
|
+
}
|
495
|
+
}
|
496
|
+
|
497
|
+
if (this.startOffset < this.startContainer.childNodes.length && this.startContainer.childNodes[this.startOffset].nodeType === 3) {
|
498
|
+
// when the range is between nodes and there is a text node
|
499
|
+
// to the right -> move into this text node (at the start)
|
500
|
+
this.startContainer = this.startContainer.childNodes[this.startOffset];
|
501
|
+
this.startOffset = 0;
|
502
|
+
this.endContainer = this.startContainer;
|
503
|
+
this.endOffset = 0;
|
504
|
+
return;
|
505
|
+
}
|
506
|
+
}
|
507
|
+
|
508
|
+
// when the selection is in a text node at the start, look for an adjacent text node and if one found, move into that at the end
|
509
|
+
if (this.startContainer.nodeType === 3 && this.startOffset === 0) {
|
510
|
+
adjacentTextNode = GENTICS.Utils.Dom.searchAdjacentTextNode(this.startContainer.parentNode, GENTICS.Utils.Dom.getIndexInParent(this.startContainer), true);
|
511
|
+
//only move the selection if the adjacentTextNode is inside the current editable
|
512
|
+
//the cursor should not be outside the editable
|
513
|
+
if (adjacentTextNode && jQuery(adjacentTextNode).closest(Aloha.activeEditable.obj).length > 0) {
|
514
|
+
this.startContainer = this.endContainer = adjacentTextNode;
|
515
|
+
this.startOffset = this.endOffset = adjacentTextNode.data.length;
|
516
|
+
}
|
517
|
+
}
|
518
|
+
} else {
|
519
|
+
// expanded range found
|
520
|
+
|
521
|
+
// correct the start, but only if between nodes
|
522
|
+
if (this.startContainer.nodeType === 1) {
|
523
|
+
// if there is a text node to the right, move into this
|
524
|
+
if (this.startOffset < this.startContainer.childNodes.length && this.startContainer.childNodes[this.startOffset].nodeType === 3) {
|
525
|
+
this.startContainer = this.startContainer.childNodes[this.startOffset];
|
526
|
+
this.startOffset = 0;
|
527
|
+
} else if (this.startOffset < this.startContainer.childNodes.length && this.startContainer.childNodes[this.startOffset].nodeType === 1) {
|
528
|
+
// there is an element node to the right, so recursively check all first child nodes until we find a text node
|
529
|
+
textNode = false;
|
530
|
+
checkedElement = this.startContainer.childNodes[this.startOffset];
|
531
|
+
while (textNode === false && checkedElement.childNodes && checkedElement.childNodes.length > 0) {
|
532
|
+
// go to the first child of the checked element
|
533
|
+
checkedElement = checkedElement.childNodes[0];
|
534
|
+
// when this element is a text node, we are done
|
535
|
+
if (checkedElement.nodeType === 3) {
|
536
|
+
textNode = checkedElement;
|
537
|
+
}
|
538
|
+
}
|
539
|
+
|
540
|
+
// found a text node, so move into it
|
541
|
+
if (textNode !== false) {
|
542
|
+
this.startContainer = textNode;
|
543
|
+
this.startOffset = 0;
|
544
|
+
}
|
545
|
+
}
|
546
|
+
}
|
547
|
+
|
548
|
+
// check whether the start is inside a text node at the end
|
549
|
+
if (this.startContainer.nodeType === 3 && this.startOffset === this.startContainer.data.length) {
|
550
|
+
// check whether there is an adjacent text node to the right and if
|
551
|
+
// yes, move into it
|
552
|
+
adjacentTextNode = GENTICS.Utils.Dom.searchAdjacentTextNode(this.startContainer.parentNode, GENTICS.Utils.Dom.getIndexInParent(this.startContainer) + 1, false);
|
553
|
+
if (adjacentTextNode) {
|
554
|
+
this.startContainer = adjacentTextNode;
|
555
|
+
this.startOffset = 0;
|
556
|
+
}
|
557
|
+
}
|
558
|
+
|
559
|
+
// now correct the end
|
560
|
+
if (this.endContainer.nodeType === 3 && this.endOffset === 0) {
|
561
|
+
// we are in a text node at the start
|
562
|
+
if (this.endContainer.previousSibling && this.endContainer.previousSibling.nodeType === 3) {
|
563
|
+
// found a text node to the left -> move into it (at the end)
|
564
|
+
this.endContainer = this.endContainer.previousSibling;
|
565
|
+
this.endOffset = this.endContainer.data.length;
|
566
|
+
} else if (this.endContainer.previousSibling && this.endContainer.previousSibling.nodeType === 1 && this.endContainer.parentNode) {
|
567
|
+
// found an element node to the left -> move in between
|
568
|
+
parentNode = this.endContainer.parentNode;
|
569
|
+
for (offset = 0; offset < parentNode.childNodes.length; ++offset) {
|
570
|
+
if (parentNode.childNodes[offset] == this.endContainer) {
|
571
|
+
this.endOffset = offset;
|
572
|
+
break;
|
573
|
+
}
|
574
|
+
}
|
575
|
+
this.endContainer = parentNode;
|
576
|
+
}
|
577
|
+
}
|
578
|
+
|
579
|
+
if (this.endContainer.nodeType == 1 && this.endOffset === 0) {
|
580
|
+
// we are in an element node at the start, possibly move to the previous sibling at the end
|
581
|
+
if (this.endContainer.previousSibling) {
|
582
|
+
if (this.endContainer.previousSibling.nodeType === 3) {
|
583
|
+
// previous sibling is a text node, move end into here (at the end)
|
584
|
+
this.endContainer = this.endContainer.previousSibling;
|
585
|
+
this.endOffset = this.endContainer.data.length;
|
586
|
+
} else if (this.endContainer.previousSibling.nodeType === 1 && this.endContainer.previousSibling.childNodes && this.endContainer.previousSibling.childNodes.length > 0) {
|
587
|
+
// previous sibling is another element node with children,
|
588
|
+
// move end into here (at the end)
|
589
|
+
this.endContainer = this.endContainer.previousSibling;
|
590
|
+
this.endOffset = this.endContainer.childNodes.length;
|
591
|
+
}
|
592
|
+
}
|
593
|
+
}
|
594
|
+
|
595
|
+
// correct the end, but only if between nodes
|
596
|
+
if (this.endContainer.nodeType == 1) {
|
597
|
+
// if there is a text node to the left, move into this
|
598
|
+
if (this.endOffset > 0 && this.endContainer.childNodes[this.endOffset - 1].nodeType === 3) {
|
599
|
+
this.endContainer = this.endContainer.childNodes[this.endOffset - 1];
|
600
|
+
this.endOffset = this.endContainer.data.length;
|
601
|
+
} else if (this.endOffset > 0 && this.endContainer.childNodes[this.endOffset - 1].nodeType === 1) {
|
602
|
+
// there is an element node to the left, so recursively check all last child nodes until we find a text node
|
603
|
+
textNode = false;
|
604
|
+
checkedElement = this.endContainer.childNodes[this.endOffset - 1];
|
605
|
+
while (textNode === false && checkedElement.childNodes && checkedElement.childNodes.length > 0) {
|
606
|
+
// go to the last child of the checked element
|
607
|
+
checkedElement = checkedElement.childNodes[checkedElement.childNodes.length - 1];
|
608
|
+
// when this element is a text node, we are done
|
609
|
+
if (checkedElement.nodeType === 3) {
|
610
|
+
textNode = checkedElement;
|
611
|
+
}
|
612
|
+
}
|
613
|
+
|
614
|
+
// found a text node, so move into it
|
615
|
+
if (textNode !== false) {
|
616
|
+
this.endContainer = textNode;
|
617
|
+
this.endOffset = this.endContainer.data.length;
|
618
|
+
}
|
619
|
+
}
|
620
|
+
}
|
621
|
+
}
|
622
|
+
},
|
623
|
+
|
624
|
+
/**
|
625
|
+
* Clear the caches for this range. This method must be called when the range itself (start-/endContainer or start-/endOffset) is modified.
|
626
|
+
* @method
|
627
|
+
*/
|
628
|
+
clearCaches: function () {
|
629
|
+
this.commonAncestorContainer = undefined;
|
630
|
+
},
|
631
|
+
|
632
|
+
/**
|
633
|
+
* Get the range tree of this range.
|
634
|
+
* The range tree will be cached for every root object. When the range itself is modified, the cache should be cleared by calling GENTICS.Utils.RangeObject.clearCaches
|
635
|
+
* @param {DOMObject} root root object of the range tree, if non given, the common ancestor container of the start and end containers will be used
|
636
|
+
* @return {RangeTree} array of RangeTree object for the given root object
|
637
|
+
* @method
|
638
|
+
*/
|
639
|
+
getRangeTree: function (root) {
|
640
|
+
// TODO cache rangeTrees
|
641
|
+
if (typeof root === 'undefined') {
|
642
|
+
root = this.getCommonAncestorContainer();
|
643
|
+
}
|
644
|
+
|
645
|
+
this.inselection = false;
|
646
|
+
return this.recursiveGetRangeTree(root);
|
647
|
+
},
|
648
|
+
|
649
|
+
/**
|
650
|
+
* Recursive inner function for generating the range tree.
|
651
|
+
* @param currentObject current DOM object for which the range tree shall be generated
|
652
|
+
* @return array of Tree objects for the children of the current DOM object
|
653
|
+
* @hide
|
654
|
+
*/
|
655
|
+
recursiveGetRangeTree: function (currentObject) {
|
656
|
+
// get all direct children of the given object
|
657
|
+
var jQueryCurrentObject = jQuery(currentObject),
|
658
|
+
childCount = 0,
|
659
|
+
that = this,
|
660
|
+
currentElements = [];
|
661
|
+
|
662
|
+
jQueryCurrentObject.contents().each(function (index) {
|
663
|
+
var type = 'none',
|
664
|
+
startOffset = false,
|
665
|
+
endOffset = false,
|
666
|
+
collapsedFound = false,
|
667
|
+
noneFound = false,
|
668
|
+
partialFound = false,
|
669
|
+
fullFound = false,
|
670
|
+
i;
|
671
|
+
|
672
|
+
// check for collapsed selections between nodes
|
673
|
+
if (that.isCollapsed() && currentObject === that.startContainer && that.startOffset === index) {
|
674
|
+
// insert an extra rangetree object for the collapsed range here
|
675
|
+
currentElements[childCount] = new GENTICS.Utils.RangeTree();
|
676
|
+
currentElements[childCount].type = 'collapsed';
|
677
|
+
currentElements[childCount].domobj = undefined;
|
678
|
+
that.inselection = false;
|
679
|
+
collapsedFound = true;
|
680
|
+
childCount++;
|
681
|
+
}
|
682
|
+
|
683
|
+
if (!that.inselection && !collapsedFound) {
|
684
|
+
// the start of the selection was not yet found, so look for it now
|
685
|
+
// check whether the start of the selection is found here
|
686
|
+
|
687
|
+
// check is dependent on the node type
|
688
|
+
switch (this.nodeType) {
|
689
|
+
case 3:
|
690
|
+
// text node
|
691
|
+
if (this === that.startContainer) {
|
692
|
+
// the selection starts here
|
693
|
+
that.inselection = true;
|
694
|
+
|
695
|
+
// when the startoffset is > 0, the selection type is only partial
|
696
|
+
type = that.startOffset > 0 ? 'partial' : 'full';
|
697
|
+
startOffset = that.startOffset;
|
698
|
+
endOffset = this.length;
|
699
|
+
}
|
700
|
+
break;
|
701
|
+
case 1:
|
702
|
+
// element node
|
703
|
+
if (this === that.startContainer && that.startOffset === 0) {
|
704
|
+
// the selection starts here
|
705
|
+
that.inselection = true;
|
706
|
+
type = 'full';
|
707
|
+
}
|
708
|
+
if (currentObject === that.startContainer && that.startOffset === index) {
|
709
|
+
// the selection starts here
|
710
|
+
that.inselection = true;
|
711
|
+
type = 'full';
|
712
|
+
}
|
713
|
+
break;
|
714
|
+
}
|
715
|
+
}
|
716
|
+
|
717
|
+
if (that.inselection && !collapsedFound) {
|
718
|
+
if (type == 'none') {
|
719
|
+
type = 'full';
|
720
|
+
}
|
721
|
+
// we already found the start of the selection, so look for the end of the selection now
|
722
|
+
// check whether the end of the selection is found here
|
723
|
+
|
724
|
+
switch (this.nodeType) {
|
725
|
+
case 3:
|
726
|
+
// text node
|
727
|
+
if (this === that.endContainer) {
|
728
|
+
// the selection ends here
|
729
|
+
that.inselection = false;
|
730
|
+
|
731
|
+
// check for partial selection here
|
732
|
+
if (that.endOffset < this.length) {
|
733
|
+
type = 'partial';
|
734
|
+
}
|
735
|
+
if (startOffset === false) {
|
736
|
+
startOffset = 0;
|
737
|
+
}
|
738
|
+
endOffset = that.endOffset;
|
739
|
+
}
|
740
|
+
break;
|
741
|
+
case 1:
|
742
|
+
// element node
|
743
|
+
if (this === that.endContainer && that.endOffset === 0) {
|
744
|
+
that.inselection = false;
|
745
|
+
}
|
746
|
+
break;
|
747
|
+
}
|
748
|
+
if (currentObject === that.endContainer && that.endOffset <= index) {
|
749
|
+
that.inselection = false;
|
750
|
+
type = 'none';
|
751
|
+
}
|
752
|
+
}
|
753
|
+
|
754
|
+
// create the current selection tree entry
|
755
|
+
currentElements[childCount] = new GENTICS.Utils.RangeTree();
|
756
|
+
currentElements[childCount].domobj = this;
|
757
|
+
currentElements[childCount].type = type;
|
758
|
+
if (type == 'partial') {
|
759
|
+
currentElements[childCount].startOffset = startOffset;
|
760
|
+
currentElements[childCount].endOffset = endOffset;
|
761
|
+
}
|
762
|
+
|
763
|
+
// now do the recursion step into the current object
|
764
|
+
currentElements[childCount].children = that.recursiveGetRangeTree(this);
|
765
|
+
|
766
|
+
// check whether a selection was found within the children
|
767
|
+
if (currentElements[childCount].children.length > 0) {
|
768
|
+
for (i = 0; i < currentElements[childCount].children.length; ++i) {
|
769
|
+
switch (currentElements[childCount].children[i].type) {
|
770
|
+
case 'none':
|
771
|
+
noneFound = true;
|
772
|
+
break;
|
773
|
+
case 'full':
|
774
|
+
fullFound = true;
|
775
|
+
break;
|
776
|
+
case 'partial':
|
777
|
+
partialFound = true;
|
778
|
+
break;
|
779
|
+
}
|
780
|
+
}
|
781
|
+
|
782
|
+
if (partialFound || (fullFound && noneFound)) {
|
783
|
+
// found at least one 'partial' DOM object in the children, or both 'full' and 'none', so this element is also 'partial' contained
|
784
|
+
currentElements[childCount].type = 'partial';
|
785
|
+
} else if (fullFound && !partialFound && !noneFound) {
|
786
|
+
// only found 'full' contained children, so this element is also 'full' contained
|
787
|
+
currentElements[childCount].type = 'full';
|
788
|
+
}
|
789
|
+
}
|
790
|
+
|
791
|
+
childCount++;
|
792
|
+
});
|
793
|
+
|
794
|
+
// extra check for collapsed selections at the end of the current element
|
795
|
+
if (this.isCollapsed() && currentObject === this.startContainer && this.startOffset == currentObject.childNodes.length) {
|
796
|
+
currentElements[childCount] = new GENTICS.Utils.RangeTree();
|
797
|
+
currentElements[childCount].type = 'collapsed';
|
798
|
+
currentElements[childCount].domobj = undefined;
|
799
|
+
}
|
800
|
+
|
801
|
+
return currentElements;
|
802
|
+
},
|
803
|
+
|
804
|
+
/**
|
805
|
+
* Find certain the first occurrence of some markup within the parents of either the start or the end of this range.
|
806
|
+
* The markup can be identified by means of a given comparator function. The function will be passed every parent (up to the eventually given limit object, which itself is not considered) to the comparator function as this.
|
807
|
+
* When the comparator function returns boolean true, the markup found and finally returned from this function as dom object.<br/>
|
808
|
+
* Example for finding an anchor tag at the start of the range up to the active editable object:<br/>
|
809
|
+
* <pre>
|
810
|
+
* range.findMarkup(
|
811
|
+
* function() {
|
812
|
+
* return this.nodeName.toLowerCase() == 'a';
|
813
|
+
* },
|
814
|
+
* jQuery(Aloha.activeEditable.obj)
|
815
|
+
* );
|
816
|
+
* </pre>
|
817
|
+
* @param {function} comparator comparator function to find certain markup
|
818
|
+
* @param {jQuery} limit limit objects for limit the parents taken into consideration
|
819
|
+
* @param {boolean} atEnd true for searching at the end of the range, false for the start (default: false)
|
820
|
+
* @return {DOMObject} the found dom object or false if nothing found.
|
821
|
+
* @method
|
822
|
+
*/
|
823
|
+
findMarkup: function (comparator, limit, atEnd) {
|
824
|
+
var container = atEnd ? this.endContainer : this.startContainer,
|
825
|
+
parents,
|
826
|
+
i,
|
827
|
+
len;
|
828
|
+
limit = limit ? limit[0] : null;
|
829
|
+
if (!container) {
|
830
|
+
return;
|
831
|
+
}
|
832
|
+
parents = selfAndParentsUntil(container, limit);
|
833
|
+
for (i = 0, len = parents.length; i < len; i++) {
|
834
|
+
if (comparator.apply(parents[i])) {
|
835
|
+
return parents[i];
|
836
|
+
}
|
837
|
+
}
|
838
|
+
return false;
|
839
|
+
},
|
840
|
+
|
841
|
+
/**
|
842
|
+
* Get the text enclosed by this range
|
843
|
+
* @return {String} the text of the range
|
844
|
+
* @method
|
845
|
+
*/
|
846
|
+
getText: function () {
|
847
|
+
if (this.isCollapsed()) {
|
848
|
+
return '';
|
849
|
+
}
|
850
|
+
return this.recursiveGetText(this.getRangeTree());
|
851
|
+
},
|
852
|
+
|
853
|
+
recursiveGetText: function (tree) {
|
854
|
+
if (!tree) {
|
855
|
+
return '';
|
856
|
+
}
|
857
|
+
var that = this,
|
858
|
+
text = '';
|
859
|
+
jQuery.each(tree, function () {
|
860
|
+
if (this.type == 'full') {
|
861
|
+
// fully selected element/text node
|
862
|
+
text += jQuery(this.domobj).text();
|
863
|
+
} else if (this.type == 'partial' && this.domobj.nodeType === 3) {
|
864
|
+
// partially selected text node
|
865
|
+
text += jQuery(this.domobj).text().substring(this.startOffset, this.endOffset);
|
866
|
+
} else if (this.type == 'partial' && this.domobj.nodeType === 1 && this.children) {
|
867
|
+
// partially selected element node
|
868
|
+
text += that.recursiveGetText(this.children);
|
869
|
+
}
|
870
|
+
});
|
871
|
+
return text;
|
872
|
+
}
|
873
|
+
});
|
874
|
+
|
875
|
+
/**
|
876
|
+
* @namespace GENTICS.Utils
|
877
|
+
* @class RangeTree
|
878
|
+
* Class definition of a RangeTree, which gives a tree view of the DOM objects included in this range
|
879
|
+
* Structure:
|
880
|
+
* <pre>
|
881
|
+
* +
|
882
|
+
* |-domobj: <reference to the DOM Object> (NOT jQuery)
|
883
|
+
* |-type: defines if this node is marked by user [none|partial|full|collapsed]
|
884
|
+
* |-children: recursive structure like this
|
885
|
+
* </pre>
|
886
|
+
*/
|
887
|
+
GENTICS.Utils.RangeTree = Class.extend({
|
888
|
+
/**
|
889
|
+
* DOMObject, if the type is one of [none|partial|full], undefined if the type is [collapsed]
|
890
|
+
* @property domobj
|
891
|
+
* @type {DOMObject}
|
892
|
+
*/
|
893
|
+
domobj: {},
|
894
|
+
|
895
|
+
/**
|
896
|
+
* type of the participation of the dom object in the range. Is one of:
|
897
|
+
* <pre>
|
898
|
+
* - none the DOMObject is outside of the range
|
899
|
+
* - partial the DOMObject partially in the range
|
900
|
+
* - full the DOMObject is completely in the range
|
901
|
+
* - collapsed the current RangeTree element marks the position of a collapsed range between DOM nodes
|
902
|
+
* </pre>
|
903
|
+
* @property type
|
904
|
+
* @type {String}
|
905
|
+
*/
|
906
|
+
type: null,
|
907
|
+
|
908
|
+
/**
|
909
|
+
* Array of RangeTree objects which reflect the status of the child elements of the current DOMObject
|
910
|
+
* @property children
|
911
|
+
* @type {Array}
|
912
|
+
*/
|
913
|
+
children: []
|
914
|
+
});
|
915
|
+
|
916
|
+
return GENTICS.Utils.RangeObject;
|
917
|
+
});
|