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,1596 @@
|
|
1
|
+
/* table-plugin.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-2013 Gentics Software GmbH, Vienna, Austria.
|
5
|
+
* Contributors http://aloha-editor.org/contribution.php
|
6
|
+
*
|
7
|
+
* Aloha Editor is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of the GNU General Public License
|
9
|
+
* as published by the Free Software Foundation; either version 2
|
10
|
+
* of the License, or any later version.
|
11
|
+
*
|
12
|
+
* Aloha Editor is distributed in the hope that it will be useful,
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
* GNU General Public License for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU General Public License
|
18
|
+
* along with this program; if not, write to the Free Software
|
19
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
20
|
+
*
|
21
|
+
* As an additional permission to the GNU GPL version 2, you may distribute
|
22
|
+
* non-source (e.g., minimized or compacted) forms of the Aloha-Editor
|
23
|
+
* source code without the copy of the GNU GPL normally required,
|
24
|
+
* provided you include this license notice and a URL through which
|
25
|
+
* recipients can access the Corresponding Source.
|
26
|
+
*/
|
27
|
+
define([
|
28
|
+
'aloha',
|
29
|
+
'jquery',
|
30
|
+
'aloha/plugin',
|
31
|
+
'aloha/pluginmanager',
|
32
|
+
'ui/ui',
|
33
|
+
'ui/scopes',
|
34
|
+
'ui/button',
|
35
|
+
'ui/toggleButton',
|
36
|
+
'ui/dialog',
|
37
|
+
'ui/port-helper-attribute-field',
|
38
|
+
'ui/port-helper-multi-split',
|
39
|
+
'i18n!table/nls/i18n',
|
40
|
+
'i18n!aloha/nls/i18n',
|
41
|
+
'table/table-create-layer',
|
42
|
+
'table/table',
|
43
|
+
'table/table-plugin-utils',
|
44
|
+
'util/dom',
|
45
|
+
'aloha/console'
|
46
|
+
], function(
|
47
|
+
Aloha,
|
48
|
+
jQuery,
|
49
|
+
Plugin,
|
50
|
+
PluginManager,
|
51
|
+
Ui,
|
52
|
+
Scopes,
|
53
|
+
Button,
|
54
|
+
ToggleButton,
|
55
|
+
Dialog,
|
56
|
+
AttributeField,
|
57
|
+
MultiSplitButton,
|
58
|
+
i18n,
|
59
|
+
i18nCore,
|
60
|
+
CreateLayer,
|
61
|
+
Table,
|
62
|
+
Utils,
|
63
|
+
Dom,
|
64
|
+
Console
|
65
|
+
) {
|
66
|
+
var $ = jQuery;
|
67
|
+
var GENTICS = window.GENTICS;
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Register the TablePlugin as Aloha.Plugin
|
71
|
+
*/
|
72
|
+
var TablePlugin = new Plugin('table');
|
73
|
+
|
74
|
+
/**
|
75
|
+
* The Create-Layer Object of the TablePlugin
|
76
|
+
*
|
77
|
+
* @see Table.CreateLayer
|
78
|
+
*/
|
79
|
+
TablePlugin.createLayer = undefined;
|
80
|
+
|
81
|
+
/**
|
82
|
+
* default button configuration
|
83
|
+
*/
|
84
|
+
TablePlugin.config = [ 'table' ];
|
85
|
+
|
86
|
+
/**
|
87
|
+
* An Array which holds all newly created tables contains DOM-Nodes of
|
88
|
+
* table-objects
|
89
|
+
*/
|
90
|
+
TablePlugin.TableRegistry = new Array();
|
91
|
+
|
92
|
+
/**
|
93
|
+
* Holds the active table-object
|
94
|
+
*/
|
95
|
+
TablePlugin.activeTable = undefined;
|
96
|
+
|
97
|
+
/**
|
98
|
+
* parameters-objects for tables
|
99
|
+
*
|
100
|
+
* @param className
|
101
|
+
* The class of activated tables
|
102
|
+
*/
|
103
|
+
TablePlugin.parameters = {
|
104
|
+
className : 'aloha-table', // class of editable tables
|
105
|
+
classSelectionRow : 'aloha-table-selectcolumn', // class for the upper table-row to select columns
|
106
|
+
classSelectionColumn : 'aloha-table-selectrow', // class for the left bound table-cells to select rows
|
107
|
+
classLeftUpperCorner : 'aloha-table-leftuppercorner', // class for the left upper corner cell
|
108
|
+
classTableWrapper : 'aloha-table-wrapper', // class of the outest table-wrapping div
|
109
|
+
classCellSelected : 'aloha-cell-selected', // class of cell which are selected (row/column selection)
|
110
|
+
waiRed : 'aloha-wai-red', // class that shows wai of div
|
111
|
+
waiGreen : 'aloha-wai-green', // class that shows wai of div
|
112
|
+
selectionArea : 10 // width/height of the selection rows (in pixel)
|
113
|
+
};
|
114
|
+
|
115
|
+
/**
|
116
|
+
* @hide
|
117
|
+
* {name:'green', text:'Green',tooltip:'Green',iconClass:'GENTICS_table GENTICS_button_green',cssClass:'green'}
|
118
|
+
*/
|
119
|
+
TablePlugin.checkConfig = function (c){
|
120
|
+
if (typeof c == 'object' && c.length) {
|
121
|
+
var newC = [];
|
122
|
+
|
123
|
+
for (var i = 0; i < c.length; i++) {
|
124
|
+
if (c[i]) {
|
125
|
+
newC.push({
|
126
|
+
name : c[i].name,
|
127
|
+
text : c[i].text ? c[i].text : c[i].name,
|
128
|
+
tooltip : c[i].tooltip ? c[i].tooltip : c[i].text,
|
129
|
+
iconClass : c[i].iconClass ? c[i].iconClass : 'aloha-icon-' + c[i].name,
|
130
|
+
cssClass : c[i].cssClass ? c[i].cssClass : c[i].name
|
131
|
+
});
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
c = newC;
|
136
|
+
} else {
|
137
|
+
c = [];
|
138
|
+
}
|
139
|
+
|
140
|
+
return c;
|
141
|
+
};
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Checks whether the given DOM element is nested within a table.
|
145
|
+
*
|
146
|
+
* @param {jQuery.<HTMLElement>} $element
|
147
|
+
* @return {boolean} True if the given element is nested in a table.
|
148
|
+
*/
|
149
|
+
function isWithinTable($element) {
|
150
|
+
return 0 < $element.parents('.aloha-editable table').length;
|
151
|
+
}
|
152
|
+
|
153
|
+
/**
|
154
|
+
* Checks whether the given DOM element is nested within an aloha block.
|
155
|
+
*
|
156
|
+
* @param {jQuery.<HTMLElement>} $element
|
157
|
+
* @return {boolean} True if the given element is nested in an aloha block.
|
158
|
+
*/
|
159
|
+
function isWithinBlock($element) {
|
160
|
+
var i;
|
161
|
+
var $node;
|
162
|
+
var $parents = $element.parents();
|
163
|
+
for (i = 0; i < $parents.length; i++) {
|
164
|
+
$node = $parents.eq(i);
|
165
|
+
if ($node.is('.aloha-editable')) {
|
166
|
+
return false;
|
167
|
+
}
|
168
|
+
if ($node.is('.aloha-block')) {
|
169
|
+
return true;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
return false;
|
173
|
+
}
|
174
|
+
|
175
|
+
/**
|
176
|
+
* Checks whether the table is an editable element.
|
177
|
+
*
|
178
|
+
* @return {boolean} True if the table's parent element is contentEditable;
|
179
|
+
* false otherwise.
|
180
|
+
*/
|
181
|
+
function isEditableTable(table) {
|
182
|
+
return GENTICS.Utils.Dom.isEditable(table);
|
183
|
+
}
|
184
|
+
|
185
|
+
/**
|
186
|
+
* Checks for the presence of nested tables in the given element.
|
187
|
+
*
|
188
|
+
* @param {jQuery.<HTMLElement>} $element jQuery unit set containing a DOM
|
189
|
+
* element.
|
190
|
+
* @return {boolean} True if nested tables were detected; false otherwise.
|
191
|
+
*/
|
192
|
+
function checkForNestedTables($element) {
|
193
|
+
var selector = $element.is('table') ? 'table' : 'table table';
|
194
|
+
if ($element.find(selector).length) {
|
195
|
+
Console.warn('Table Plugin',
|
196
|
+
'Nested tables found. They will not be initialized.');
|
197
|
+
return true;
|
198
|
+
}
|
199
|
+
return false;
|
200
|
+
}
|
201
|
+
|
202
|
+
/**
|
203
|
+
* Creates a table, if it is allowed, and registers a new Table object for
|
204
|
+
* the given table DOM element.
|
205
|
+
*
|
206
|
+
* If the table's editable parent is activated, the table will also
|
207
|
+
* automatically be activated.
|
208
|
+
*
|
209
|
+
* @param {HTMLElement} element HTML table element.
|
210
|
+
* @return {Table|null} The created Table object or null if it was not
|
211
|
+
* allowed to create the table.
|
212
|
+
*/
|
213
|
+
function createNewTable(element) {
|
214
|
+
var $table = $(element);
|
215
|
+
var create = isEditableTable(element)
|
216
|
+
&& !isWithinTable($table)
|
217
|
+
&& !isWithinBlock($table);
|
218
|
+
if (create) {
|
219
|
+
var table = new Table(element, TablePlugin);
|
220
|
+
var $host = $(Dom.getEditingHostOf(element));
|
221
|
+
table.parentEditable = Aloha.getEditableById($host.attr('id'));
|
222
|
+
TablePlugin.TableRegistry.push(table);
|
223
|
+
checkForNestedTables($table);
|
224
|
+
if (Aloha.activeEditable === table.parentEditable) {
|
225
|
+
table.activate();
|
226
|
+
}
|
227
|
+
return table;
|
228
|
+
}
|
229
|
+
return null;
|
230
|
+
}
|
231
|
+
|
232
|
+
/**
|
233
|
+
* Sets the currently selected elements as headers of the table, or removes header-status
|
234
|
+
* if the whole selection is already used as a header
|
235
|
+
*
|
236
|
+
* @param {Aloha.Table} table the table-object for which the headers are to be set
|
237
|
+
* @param {string} scope for which the header should be used (i.e. 'row' or 'column')
|
238
|
+
*/
|
239
|
+
function toggleHeaderStatus(table, scope) {
|
240
|
+
var i,
|
241
|
+
j,
|
242
|
+
allHeaders = table.selection.isHeader(),
|
243
|
+
domCell, // representation of the cell in the dom
|
244
|
+
tableCell, // table-cell object
|
245
|
+
bufferCell; // temporary buffer
|
246
|
+
|
247
|
+
for (i = 0; i < table.selection.selectedCells.length; i++) {
|
248
|
+
domCell = table.selection.selectedCells[i];
|
249
|
+
|
250
|
+
// tries to match the current cell with a cell-object in the table
|
251
|
+
for (j = 0; j < table.cells.length; j++) {
|
252
|
+
if (domCell === table.cells[j].obj[0]) {
|
253
|
+
cell = table.cells[j];
|
254
|
+
break;
|
255
|
+
}
|
256
|
+
}
|
257
|
+
|
258
|
+
// the transformed dom objects are first stored in a buffer, and only applied to
|
259
|
+
// the table-cell-object if a match was found
|
260
|
+
if (allHeaders) {
|
261
|
+
bufferCell = Aloha.Markup.transformDomObject(domCell, 'td').removeAttr('scope').get(0);
|
262
|
+
} else {
|
263
|
+
bufferCell = Aloha.Markup.transformDomObject(domCell, 'th').attr('scope', scope).get(0);
|
264
|
+
}
|
265
|
+
|
266
|
+
if (cell != null) {
|
267
|
+
// assign the changed dom-element to the table-cell
|
268
|
+
cell.obj[0] = bufferCell;
|
269
|
+
|
270
|
+
// reactivate the table cell in order to bind events to the changed dom object
|
271
|
+
// TODO: re-attaching event-handlers should be factored out into a utility function
|
272
|
+
// so we don't have to do the whole activation/deactivation process for the cells
|
273
|
+
cell.deactivate();
|
274
|
+
cell.activate();
|
275
|
+
}
|
276
|
+
|
277
|
+
// uncommented code-segment, presumably added to force IE to target the wrapper
|
278
|
+
// on mouse-down by applying a timeout after event propagation
|
279
|
+
jQuery(table.selection.selectedCells[i]).bind('mousedown', function (jqEvent) {
|
280
|
+
var wrapper = jQuery(this).children('div').eq(0);
|
281
|
+
window.setTimeout(function () {
|
282
|
+
wrapper.trigger( 'focus' );
|
283
|
+
}, 1);
|
284
|
+
});
|
285
|
+
}
|
286
|
+
}
|
287
|
+
|
288
|
+
/**
|
289
|
+
* If the specified style is not already active in all selected cells, it is applied;
|
290
|
+
* otherwise, it is removed from the cells
|
291
|
+
*
|
292
|
+
* @param {Array} config defined styles as defined in the configuration
|
293
|
+
* @param {String} cssClass
|
294
|
+
* @param {Array} sc the selection of target table cells
|
295
|
+
*/
|
296
|
+
function applyStyle(config, cssClass, sc) {
|
297
|
+
var appliedToAll = true;
|
298
|
+
|
299
|
+
for (var i = 0; i < sc.length; i++) {
|
300
|
+
if (jQuery(sc[i]).attr('class').indexOf(cssClass) < 0 ) {
|
301
|
+
appliedToAll = false;
|
302
|
+
break;
|
303
|
+
}
|
304
|
+
}
|
305
|
+
|
306
|
+
if (!appliedToAll) {
|
307
|
+
for (var i = 0; i < sc.length; i++) {
|
308
|
+
jQuery(sc[i]).addClass(cssClass);
|
309
|
+
for (var f = 0; f < config.length; f++) {
|
310
|
+
if (config[f].cssClass != cssClass) {
|
311
|
+
jQuery(sc[i]).removeClass(config[f].cssClass);
|
312
|
+
}
|
313
|
+
}
|
314
|
+
}
|
315
|
+
} else {
|
316
|
+
for (var i = 0; i < sc.length; i++) {
|
317
|
+
jQuery(sc[i]).removeClass(cssClass);
|
318
|
+
}
|
319
|
+
}
|
320
|
+
}
|
321
|
+
|
322
|
+
/**
|
323
|
+
* Init method of the Table-plugin transforms all tables in the document
|
324
|
+
*
|
325
|
+
* @return void
|
326
|
+
*/
|
327
|
+
TablePlugin.init = function() {
|
328
|
+
var that = this,
|
329
|
+
isEnabled = {};
|
330
|
+
|
331
|
+
// apply settings
|
332
|
+
this.tableConfig = this.checkConfig(this.tableConfig||this.settings.tableConfig);
|
333
|
+
this.columnConfig = this.checkConfig(this.columnConfig||this.settings.columnConfig);
|
334
|
+
this.rowConfig = this.checkConfig(this.rowConfig||this.settings.rowConfig);
|
335
|
+
this.cellConfig = this.checkConfig(this.cellConfig||this.settings.cellConfig);
|
336
|
+
|
337
|
+
// table resize settings
|
338
|
+
this.tableResize = this.settings.tableResize === undefined ? false : this.settings.tableResize;
|
339
|
+
this.colResize = this.settings.colResize === undefined ? false : this.settings.colResize;
|
340
|
+
this.rowResize = this.settings.rowResize === undefined ? false : this.settings.rowResize;
|
341
|
+
|
342
|
+
// disable table resize settings on browsers below IE8
|
343
|
+
if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 8) {
|
344
|
+
this.tableResize = false;
|
345
|
+
this.colResize = false;
|
346
|
+
this.rowResize = false;
|
347
|
+
}
|
348
|
+
|
349
|
+
// add reference to the create layer object
|
350
|
+
this.createLayer = new CreateLayer( this );
|
351
|
+
|
352
|
+
// subscribe for the 'editableActivated' event to activate all tables in the editable
|
353
|
+
Aloha.bind( 'aloha-editable-created', function (event, editable) {
|
354
|
+
var config = that.getEditableConfig(editable.obj);
|
355
|
+
isEnabled[editable.getId()] = (-1 !== jQuery.inArray('table', config));
|
356
|
+
|
357
|
+
// add a mousedown event to all created editables to check if focus leaves a table
|
358
|
+
editable.obj.bind( 'mousedown', function ( jqEvent ) {
|
359
|
+
TablePlugin.setFocusedTable( undefined );
|
360
|
+
} );
|
361
|
+
|
362
|
+
editable.obj.find('table').each(function (__unused__, elem) {
|
363
|
+
createNewTable(elem);
|
364
|
+
});
|
365
|
+
} );
|
366
|
+
|
367
|
+
// initialize the table buttons
|
368
|
+
this.initTableButtons();
|
369
|
+
|
370
|
+
Aloha.bind( 'aloha-table-selection-changed', function () {
|
371
|
+
|
372
|
+
// check if selected cells are split/merge able and set button status
|
373
|
+
if ( typeof TablePlugin.activeTable !== 'undefined' &&
|
374
|
+
TablePlugin.activeTable.selection ) {
|
375
|
+
|
376
|
+
TablePlugin.updateFloatingMenuScope();
|
377
|
+
|
378
|
+
if ( TablePlugin.activeTable.selection.cellsAreSplitable() ) {
|
379
|
+
that._splitcellsButton.enable(true);
|
380
|
+
that._splitcellsRowButton.enable(true);
|
381
|
+
that._splitcellsColumnButton.enable(true);
|
382
|
+
} else {
|
383
|
+
that._splitcellsButton.enable(false);
|
384
|
+
that._splitcellsRowButton.enable(false);
|
385
|
+
that._splitcellsColumnButton.enable(false);
|
386
|
+
}
|
387
|
+
|
388
|
+
if ( TablePlugin.activeTable.selection.cellsAreMergeable() ) {
|
389
|
+
that._mergecellsButton.enable(true);
|
390
|
+
that._mergecellsRowButton.enable(true);
|
391
|
+
that._mergecellsColumnButton.enable(true);
|
392
|
+
} else {
|
393
|
+
that._mergecellsButton.enable(false);
|
394
|
+
that._mergecellsRowButton.enable(false);
|
395
|
+
that._mergecellsColumnButton.enable(false);
|
396
|
+
}
|
397
|
+
}
|
398
|
+
|
399
|
+
});
|
400
|
+
|
401
|
+
Aloha.bind( 'aloha-selection-changed', function (event, rangeObject) {
|
402
|
+
// this case probably occurs when the selection is empty?
|
403
|
+
if (!rangeObject.startContainer || !Aloha.activeEditable) {
|
404
|
+
return;
|
405
|
+
}
|
406
|
+
|
407
|
+
// show hide buttons regarding configuration and DOM position
|
408
|
+
if (isEnabled[Aloha.activeEditable.getId()] && Aloha.Selection.mayInsertTag('table') ) {
|
409
|
+
that._createTableButton.show();
|
410
|
+
} else {
|
411
|
+
that._createTableButton.hide();
|
412
|
+
}
|
413
|
+
|
414
|
+
if (!that.activeTable) {
|
415
|
+
return;
|
416
|
+
}
|
417
|
+
|
418
|
+
// check wheater we are inside a table
|
419
|
+
var table = rangeObject.findMarkup(function() {
|
420
|
+
return this.nodeName === 'TABLE';
|
421
|
+
}, Aloha.activeEditable.obj);
|
422
|
+
if (table) {
|
423
|
+
TablePlugin.updateFloatingMenuScope();
|
424
|
+
TablePlugin.setActiveCellStyle();
|
425
|
+
} else {
|
426
|
+
that.activeTable.selection.cellSelectionMode = false;
|
427
|
+
that.activeTable.selection.baseCellPosition = null;
|
428
|
+
that.activeTable.selection.lastSelectionRange = null;
|
429
|
+
that.activeTable.focusOut();
|
430
|
+
}
|
431
|
+
});
|
432
|
+
|
433
|
+
Aloha.bind('aloha-editable-activated', function (__event__, data) {
|
434
|
+
that._splitcellsButton.enable(false);
|
435
|
+
that._mergecellsButton.enable(false);
|
436
|
+
that._splitcellsRowButton.enable(false);
|
437
|
+
that._mergecellsRowButton.enable(false);
|
438
|
+
that._splitcellsColumnButton.enable(false);
|
439
|
+
that._mergecellsColumnButton.enable(false);
|
440
|
+
|
441
|
+
data.editable.obj.find('table').each(function () {
|
442
|
+
var registry = TablePlugin.TableRegistry;
|
443
|
+
for (var i = 0; i < registry.length; i++) {
|
444
|
+
if (registry[i].obj.attr('id') === jQuery(this).attr('id')) {
|
445
|
+
registry[i].activate();
|
446
|
+
return true;
|
447
|
+
}
|
448
|
+
}
|
449
|
+
|
450
|
+
// Because table this is a new table that is not yet in the
|
451
|
+
// registry.
|
452
|
+
createNewTable(this);
|
453
|
+
});
|
454
|
+
|
455
|
+
});
|
456
|
+
|
457
|
+
Aloha.bind('aloha-editable-deactivated', function () {
|
458
|
+
if (TablePlugin.activeTable) {
|
459
|
+
TablePlugin.activeTable.selection.unselectCells();
|
460
|
+
}
|
461
|
+
TablePlugin.setFocusedTable(undefined);
|
462
|
+
var registry = TablePlugin.TableRegistry;
|
463
|
+
for (var i = 0; i < registry.length; i++) {
|
464
|
+
registry[i].deactivate();
|
465
|
+
}
|
466
|
+
});
|
467
|
+
|
468
|
+
Aloha.bind('aloha-smart-content-changed', function () {
|
469
|
+
if (Aloha.activeEditable) {
|
470
|
+
Aloha.activeEditable.obj.find('table').each(function () {
|
471
|
+
if (TablePlugin.indexOfTableInRegistry(this) == -1) {
|
472
|
+
if (createNewTable(this)) {
|
473
|
+
this.id = GENTICS.Utils.guid();
|
474
|
+
}
|
475
|
+
}
|
476
|
+
});
|
477
|
+
}
|
478
|
+
});
|
479
|
+
|
480
|
+
if (this.settings.summaryinsidebar) {
|
481
|
+
Aloha.bind('aloha-plugins-loaded', function () {
|
482
|
+
that.initSidebar(Aloha.Sidebar.right.show());
|
483
|
+
});
|
484
|
+
}
|
485
|
+
};
|
486
|
+
|
487
|
+
//namespace prefix for this plugin
|
488
|
+
var tableNamespace = 'aloha-table';
|
489
|
+
|
490
|
+
function nsSel () {
|
491
|
+
var stringBuilder = [], prefix = tableNamespace;
|
492
|
+
jQuery.each(arguments, function () { stringBuilder.push('.' + (this == '' ? prefix : prefix + '-' + this)); });
|
493
|
+
return jQuery.trim(stringBuilder.join(' '));
|
494
|
+
};
|
495
|
+
|
496
|
+
//Creates string with this component's namepsace prefixed the each classname
|
497
|
+
function nsClass () {
|
498
|
+
var stringBuilder = [], prefix = tableNamespace;
|
499
|
+
jQuery.each(arguments, function () { stringBuilder.push(this == '' ? prefix : prefix + '-' + this); });
|
500
|
+
return jQuery.trim(stringBuilder.join(' '));
|
501
|
+
};
|
502
|
+
|
503
|
+
TablePlugin.initSidebar = function(sidebar) {
|
504
|
+
var pl = this;
|
505
|
+
pl.sidebar = sidebar;
|
506
|
+
pl.sidebarPanel = sidebar.addPanel({
|
507
|
+
|
508
|
+
id : nsClass('sidebar-panel'),
|
509
|
+
title : i18n.t('table.sidebar.title'),
|
510
|
+
content : '',
|
511
|
+
expanded : true,
|
512
|
+
activeOn : 'table',
|
513
|
+
|
514
|
+
onInit : function () {
|
515
|
+
var that = this,
|
516
|
+
content = this.setContent(
|
517
|
+
'<label class="' + nsClass('label') + '" for="' + nsClass('textarea') + '" >' + i18n.t('table.label.target') + '</label>' +
|
518
|
+
'<textarea id="' + nsClass('textarea') + '" class="' + nsClass('textarea') + '" />').content;
|
519
|
+
|
520
|
+
jQuery(nsSel('textarea')).live('keyup', function() {
|
521
|
+
//The original developer thought that escaping the
|
522
|
+
//quote characters of the textarea value are
|
523
|
+
//necessary to work around a bug in IE. I could not
|
524
|
+
//reproduce the bug, so I commented the following
|
525
|
+
//out.
|
526
|
+
//.replace("\"", '"').replace("'", "'")
|
527
|
+
jQuery(that.effective).attr('summary', jQuery(nsSel('textarea')).val());
|
528
|
+
var waiDiv = jQuery('div[class*="wai"]', 'table#' + jQuery(that.effective).attr('id'));
|
529
|
+
waiDiv.removeClass(pl.get('waiGreen'));
|
530
|
+
waiDiv.removeClass(pl.get('waiRed'));
|
531
|
+
|
532
|
+
if (jQuery(nsSel('textarea')).val().trim() != '') {
|
533
|
+
waiDiv.addClass(pl.get('waiGreen'));
|
534
|
+
} else {
|
535
|
+
waiDiv.addClass(pl.get('waiRed'));
|
536
|
+
}
|
537
|
+
});
|
538
|
+
},
|
539
|
+
|
540
|
+
onActivate: function (effective) {
|
541
|
+
var that = this;
|
542
|
+
that.effective = effective;
|
543
|
+
jQuery(nsSel('textarea')).val(jQuery(that.effective).attr('summary'));
|
544
|
+
}
|
545
|
+
|
546
|
+
});
|
547
|
+
sidebar.show();
|
548
|
+
};
|
549
|
+
|
550
|
+
/**
|
551
|
+
* test if the table is editable
|
552
|
+
* @return boolean true if the table's parent element is contentEditable, false otherwise
|
553
|
+
*/
|
554
|
+
TablePlugin.isEditableTable = function (table) {
|
555
|
+
return GENTICS.Utils.Dom.isEditable( table );
|
556
|
+
};
|
557
|
+
|
558
|
+
/**
|
559
|
+
* @param {DOMElement} table
|
560
|
+
* @return {Number}
|
561
|
+
*/
|
562
|
+
TablePlugin.indexOfTableInRegistry = function ( table ) {
|
563
|
+
var registry = this.TableRegistry;
|
564
|
+
|
565
|
+
for ( var i = 0; i < registry.length; i++ ) {
|
566
|
+
// We need to find exactly the same object from the
|
567
|
+
// registry since we could also deal with cloned objects
|
568
|
+
if ( registry[ i ].obj[ 0 ].id == table.id ) {
|
569
|
+
return i;
|
570
|
+
}
|
571
|
+
}
|
572
|
+
|
573
|
+
return -1;
|
574
|
+
};
|
575
|
+
|
576
|
+
/**
|
577
|
+
* @param {DOMElement} table
|
578
|
+
* @return {Table}
|
579
|
+
*/
|
580
|
+
TablePlugin.getTableFromRegistry = function ( table ) {
|
581
|
+
var i = this.indexOfTableInRegistry( table );
|
582
|
+
if ( i > -1 ) {
|
583
|
+
return this.TableRegistry[ i ];
|
584
|
+
}
|
585
|
+
return null;
|
586
|
+
};
|
587
|
+
|
588
|
+
/**
|
589
|
+
* Checks whether the current selection is inside a table within an
|
590
|
+
* editable
|
591
|
+
*
|
592
|
+
* @return {Boolean} true if we are inside a table
|
593
|
+
*/
|
594
|
+
TablePlugin.isSelectionInTable = function () {
|
595
|
+
var range = Aloha.Selection.getRangeObject();
|
596
|
+
var container = jQuery( range.commonAncestorContainer );
|
597
|
+
|
598
|
+
if ( container.length == 0 ) {
|
599
|
+
return false;
|
600
|
+
}
|
601
|
+
|
602
|
+
if ( container.parents( '.aloha-editable table' ).length ) {
|
603
|
+
return true;
|
604
|
+
}
|
605
|
+
|
606
|
+
return false;
|
607
|
+
};
|
608
|
+
|
609
|
+
TablePlugin.preventNestedTables = function () {
|
610
|
+
if ( this.isSelectionInTable() ) {
|
611
|
+
Dialog.alert({
|
612
|
+
title : i18n.t( 'Table' ),
|
613
|
+
text : i18n.t( 'table.createTable.nestedTablesNoSupported' )
|
614
|
+
});
|
615
|
+
|
616
|
+
return true;
|
617
|
+
}
|
618
|
+
|
619
|
+
return false;
|
620
|
+
};
|
621
|
+
|
622
|
+
TablePlugin.initMergeSplitCellsBtns = function(){
|
623
|
+
// TODO current it is not possible to add the same buttons to
|
624
|
+
// multiple tabs. To work around this limitation we are
|
625
|
+
// defining the mergecells and splitcells components
|
626
|
+
// multiple times, once for each tab.
|
627
|
+
|
628
|
+
this._mergecellsButton = Ui.adopt("mergecells", Button, {
|
629
|
+
tooltip: i18n.t("button.mergecells.tooltip"),
|
630
|
+
icon: "aloha-icon aloha-icon-mergecells",
|
631
|
+
scope: this.name + '.cell',
|
632
|
+
click: function() {
|
633
|
+
if (TablePlugin.activeTable) {
|
634
|
+
TablePlugin.activeTable.selection.mergeCells();
|
635
|
+
}
|
636
|
+
}
|
637
|
+
});
|
638
|
+
|
639
|
+
this._splitcellsButton = Ui.adopt("splitcells", Button, {
|
640
|
+
tooltip: i18n.t("button.splitcells.tooltip"),
|
641
|
+
icon: "aloha-icon aloha-icon-splitcells",
|
642
|
+
scope: this.name + '.cell',
|
643
|
+
click: function() {
|
644
|
+
var activeCell;
|
645
|
+
if (TablePlugin.activeTable) {
|
646
|
+
if (TablePlugin.activeTable.selection.selectedCells.length > 0) {
|
647
|
+
TablePlugin.activeTable.selection.splitCells();
|
648
|
+
} else {
|
649
|
+
// if there is currently no selection, the active cell is split instead
|
650
|
+
activeCell = TablePlugin.selectedOrActiveCells();
|
651
|
+
if (activeCell.length > 0) {
|
652
|
+
Utils.splitCell(activeCell, function () {
|
653
|
+
return TablePlugin.activeTable.newActiveCell().obj;
|
654
|
+
});
|
655
|
+
Aloha.trigger('aloha-table-selection-changed');
|
656
|
+
}
|
657
|
+
}
|
658
|
+
}
|
659
|
+
}
|
660
|
+
});
|
661
|
+
|
662
|
+
this._mergecellsRowButton = Ui.adopt("mergecellsRow", Button, {
|
663
|
+
tooltip: i18n.t("button.mergecells.tooltip"),
|
664
|
+
icon: "aloha-icon aloha-icon-mergecells",
|
665
|
+
scope: this.name + '.row',
|
666
|
+
click: function() {
|
667
|
+
if (TablePlugin.activeTable) {
|
668
|
+
TablePlugin.activeTable.selection.mergeCells();
|
669
|
+
}
|
670
|
+
}
|
671
|
+
});
|
672
|
+
|
673
|
+
this._splitcellsRowButton = Ui.adopt("splitcellsRow", Button, {
|
674
|
+
tooltip: i18n.t("button.splitcells.tooltip"),
|
675
|
+
icon: "aloha-icon aloha-icon-splitcells",
|
676
|
+
scope: this.name + '.row',
|
677
|
+
click: function() {
|
678
|
+
if (TablePlugin.activeTable) {
|
679
|
+
TablePlugin.activeTable.selection.splitCells();
|
680
|
+
}
|
681
|
+
}
|
682
|
+
});
|
683
|
+
|
684
|
+
this._mergecellsColumnButton = Ui.adopt("mergecellsColumn", Button, {
|
685
|
+
tooltip: i18n.t("button.mergecells.tooltip"),
|
686
|
+
icon: "aloha-icon aloha-icon-mergecells",
|
687
|
+
scope: this.name + '.column',
|
688
|
+
click: function() {
|
689
|
+
if (TablePlugin.activeTable) {
|
690
|
+
TablePlugin.activeTable.selection.mergeCells();
|
691
|
+
}
|
692
|
+
}
|
693
|
+
});
|
694
|
+
|
695
|
+
this._splitcellsColumnButton = Ui.adopt("splitcellsColumn", Button, {
|
696
|
+
tooltip: i18n.t("button.splitcells.tooltip"),
|
697
|
+
icon: "aloha-icon aloha-icon-splitcells",
|
698
|
+
scope: this.name + '.column',
|
699
|
+
click: function() {
|
700
|
+
if (TablePlugin.activeTable) {
|
701
|
+
TablePlugin.activeTable.selection.splitCells();
|
702
|
+
}
|
703
|
+
}
|
704
|
+
});
|
705
|
+
};
|
706
|
+
|
707
|
+
TablePlugin.initNaturalFitBtn = function() {
|
708
|
+
var that = this;
|
709
|
+
|
710
|
+
if (this.colResize || this.rowResize) {
|
711
|
+
this._tableNaturalFitButton = Ui.adopt("naturalFit", Button, {
|
712
|
+
tooltip: i18n.t("button.naturalfit.tooltip"),
|
713
|
+
icon: "aloha-icon aloha-icon-table-naturalfit",
|
714
|
+
scope: this.name + '.cell',
|
715
|
+
click: function() {
|
716
|
+
if (that.activeTable) {
|
717
|
+
var tableObj = that.activeTable.obj;
|
718
|
+
tableObj.find('td, th').each(function() {
|
719
|
+
jQuery(this).find('div').css('width', '');
|
720
|
+
jQuery(this).css('width', '');
|
721
|
+
});
|
722
|
+
tableObj.find('tr').each(function() {
|
723
|
+
jQuery(this).css('height', '');
|
724
|
+
});
|
725
|
+
}
|
726
|
+
}
|
727
|
+
});
|
728
|
+
}
|
729
|
+
};
|
730
|
+
|
731
|
+
/**
|
732
|
+
* Adds default row buttons, and custom formatting buttons to floating menu
|
733
|
+
*/
|
734
|
+
TablePlugin.initRowsBtns = function () {
|
735
|
+
var that = this;
|
736
|
+
|
737
|
+
this._addrowbeforeButton = Ui.adopt("addrowbefore", Button, {
|
738
|
+
tooltip: i18n.t( "button.addrowbefore.tooltip"),
|
739
|
+
icon: "aloha-icon aloha-icon-addrowbefore",
|
740
|
+
scope: this.name + '.row',
|
741
|
+
click: function() {
|
742
|
+
if (that.activeTable) {
|
743
|
+
that.activeTable.addRowBeforeSelection();
|
744
|
+
}
|
745
|
+
}
|
746
|
+
});
|
747
|
+
|
748
|
+
this._addrowafterButton = Ui.adopt("addrowafter", Button, {
|
749
|
+
tooltip: i18n.t("button.addrowafter.tooltip"),
|
750
|
+
icon: "aloha-icon aloha-icon-addrowafter",
|
751
|
+
scope: this.name + '.row',
|
752
|
+
click: function() {
|
753
|
+
if (that.activeTable) {
|
754
|
+
that.activeTable.addRowAfterSelection();
|
755
|
+
}
|
756
|
+
}
|
757
|
+
});
|
758
|
+
|
759
|
+
this._deleterowsButton = Ui.adopt("deleterows", Button, {
|
760
|
+
tooltip: i18n.t("button.delrows.tooltip"),
|
761
|
+
icon: "aloha-icon aloha-icon-deleterows",
|
762
|
+
scope: this.name + '.row',
|
763
|
+
click: function() {
|
764
|
+
if (that.activeTable) {
|
765
|
+
var aTable = that.activeTable;
|
766
|
+
Dialog.confirm({
|
767
|
+
title: i18n.t('Table'),
|
768
|
+
text: i18n.t('deleterows.confirm'),
|
769
|
+
yes: function(){
|
770
|
+
aTable.deleteRows();
|
771
|
+
}
|
772
|
+
});
|
773
|
+
}
|
774
|
+
}
|
775
|
+
});
|
776
|
+
|
777
|
+
this._rowheaderButton = Ui.adopt("rowheader", ToggleButton, {
|
778
|
+
tooltip: i18n.t("button.rowheader.tooltip"),
|
779
|
+
icon: "aloha-icon aloha-icon-rowheader",
|
780
|
+
scope: this.name + '.row',
|
781
|
+
click: function() {
|
782
|
+
if (that.activeTable) {
|
783
|
+
that.activeTable.refresh();
|
784
|
+
|
785
|
+
toggleHeaderStatus(that.activeTable, 'column');
|
786
|
+
|
787
|
+
that.activeTable.selection.unselectCells();
|
788
|
+
that.activeTable.selection.selectRows(that.activeTable.selection.selectedRowIdxs);
|
789
|
+
}
|
790
|
+
}
|
791
|
+
});
|
792
|
+
|
793
|
+
// generate formatting buttons
|
794
|
+
this.rowMSItems = [];
|
795
|
+
jQuery.each(this.rowConfig, function (j, itemConf) {
|
796
|
+
that.rowMSItems.push({
|
797
|
+
name: itemConf.name,
|
798
|
+
text: i18n.t(itemConf.text),
|
799
|
+
tooltip: i18n.t(itemConf.tooltip),
|
800
|
+
iconClass: 'aloha-icon aloha-row-layout ' + itemConf.iconClass,
|
801
|
+
click: function () {
|
802
|
+
if (that.activeTable) {
|
803
|
+
applyStyle(that.rowConfig, itemConf.cssClass, that.activeTable.selection.selectedCells);
|
804
|
+
|
805
|
+
// selection could have changed.
|
806
|
+
that.activeTable.selectRows();
|
807
|
+
}
|
808
|
+
}
|
809
|
+
});
|
810
|
+
});
|
811
|
+
|
812
|
+
if (this.rowMSItems.length > 0) {
|
813
|
+
this.rowMSItems.push({
|
814
|
+
name : 'removeFormat',
|
815
|
+
text : i18n.t('button.removeFormat.text'),
|
816
|
+
tooltip : i18n.t('button.removeFormat.tooltip'),
|
817
|
+
'cls' : 'aloha-ui-multisplit-fullwidth',
|
818
|
+
wide : true,
|
819
|
+
click : function () {
|
820
|
+
if (that.activeTable) {
|
821
|
+
var sc = that.activeTable.selection.selectedCells;
|
822
|
+
// if a selection was made, transform the selected cells
|
823
|
+
for (var i = 0; i < sc.length; i++) {
|
824
|
+
for (var f = 0; f < that.rowConfig.length; f++) {
|
825
|
+
jQuery(sc[i]).removeClass(that.rowConfig[f].cssClass);
|
826
|
+
}
|
827
|
+
}
|
828
|
+
// selection could have changed.
|
829
|
+
that.activeTable.selectRows();
|
830
|
+
}
|
831
|
+
}
|
832
|
+
});
|
833
|
+
}
|
834
|
+
|
835
|
+
this.rowMSButton = MultiSplitButton({
|
836
|
+
items: this.rowMSItems,
|
837
|
+
name: 'formatRow',
|
838
|
+
hideIfEmpty: true,
|
839
|
+
scope: this.name + '.row'
|
840
|
+
});
|
841
|
+
};
|
842
|
+
|
843
|
+
/**
|
844
|
+
* Adds default column buttons, and custom formatting buttons to floating menu
|
845
|
+
*/
|
846
|
+
TablePlugin.initColumnBtns = function () {
|
847
|
+
var that = this;
|
848
|
+
|
849
|
+
this._addcolumnleftButton = Ui.adopt("addcolumnleft", Button, {
|
850
|
+
tooltip: i18n.t("button.addcolleft.tooltip"),
|
851
|
+
icon: "aloha-icon aloha-icon-addcolumnleft",
|
852
|
+
scope: this.name + '.column',
|
853
|
+
click: function() {
|
854
|
+
if (that.activeTable) {
|
855
|
+
that.activeTable.addColumnsLeft();
|
856
|
+
}
|
857
|
+
}
|
858
|
+
});
|
859
|
+
|
860
|
+
this._addcolumnrightButton = Ui.adopt("addcolumnright", Button, {
|
861
|
+
tooltip: i18n.t("button.addcolright.tooltip"),
|
862
|
+
icon: "aloha-icon aloha-icon-addcolumnright",
|
863
|
+
scope: this.name + '.column',
|
864
|
+
click: function() {
|
865
|
+
if (that.activeTable) {
|
866
|
+
that.activeTable.addColumnsRight();
|
867
|
+
}
|
868
|
+
}
|
869
|
+
});
|
870
|
+
|
871
|
+
this._deletecolumnsButton = Ui.adopt("deletecolumns", Button, {
|
872
|
+
tooltip: i18n.t("button.delcols.tooltip"),
|
873
|
+
icon: "aloha-icon aloha-icon-deletecolumns",
|
874
|
+
scope: this.name + '.column',
|
875
|
+
click: function() {
|
876
|
+
if (that.activeTable) {
|
877
|
+
var aTable = that.activeTable;
|
878
|
+
Dialog.confirm({
|
879
|
+
title: i18n.t('Table'),
|
880
|
+
text: i18n.t('deletecolumns.confirm'),
|
881
|
+
yes: function(){
|
882
|
+
aTable.deleteColumns();
|
883
|
+
}
|
884
|
+
});
|
885
|
+
}
|
886
|
+
}
|
887
|
+
});
|
888
|
+
|
889
|
+
this._columnheaderButton = Ui.adopt("columnheader", ToggleButton, {
|
890
|
+
tooltip: i18n.t("button.columnheader.tooltip"),
|
891
|
+
icon: "aloha-icon aloha-icon-columnheader",
|
892
|
+
scope: this.name + '.column',
|
893
|
+
click: function() {
|
894
|
+
if (that.activeTable) {
|
895
|
+
that.activeTable.refresh();
|
896
|
+
|
897
|
+
toggleHeaderStatus(that.activeTable, 'row');
|
898
|
+
|
899
|
+
that.activeTable.selection.unselectCells();
|
900
|
+
that.activeTable.selection.selectColumns(that.activeTable.selection.selectedColumnIdxs);
|
901
|
+
}
|
902
|
+
}
|
903
|
+
});
|
904
|
+
|
905
|
+
// generate formatting buttons
|
906
|
+
this.columnMSItems = [];
|
907
|
+
jQuery.each(this.columnConfig, function (j, itemConf) {
|
908
|
+
var item = {
|
909
|
+
name : itemConf.name,
|
910
|
+
text : i18n.t(itemConf.text),
|
911
|
+
tooltip : i18n.t(itemConf.tooltip),
|
912
|
+
iconClass : 'aloha-icon aloha-column-layout ' + itemConf.iconClass,
|
913
|
+
click : function (x,y,z) {
|
914
|
+
if (that.activeTable) {
|
915
|
+
applyStyle(that.columnConfig, itemConf.cssClass, that.activeTable.selection.selectedCells);
|
916
|
+
|
917
|
+
// selection could have changed.
|
918
|
+
that.activeTable.selectColumns();
|
919
|
+
}
|
920
|
+
}
|
921
|
+
};
|
922
|
+
|
923
|
+
that.columnMSItems.push(item);
|
924
|
+
});
|
925
|
+
|
926
|
+
if (this.columnMSItems.length > 0) {
|
927
|
+
this.columnMSItems.push({
|
928
|
+
name : 'removeFormat',
|
929
|
+
text : i18n.t('button.removeFormat.text'),
|
930
|
+
tooltip : i18n.t('button.removeFormat.tooltip'),
|
931
|
+
'cls' : 'aloha-ui-multisplit-fullwidth',
|
932
|
+
wide : true,
|
933
|
+
click : function () {
|
934
|
+
if (that.activeTable) {
|
935
|
+
var sc = that.activeTable.selection.selectedCells;
|
936
|
+
// if a selection was made, transform the selected cells
|
937
|
+
for (var i = 0; i < sc.length; i++) {
|
938
|
+
for (var f = 0; f < that.columnConfig.length; f++) {
|
939
|
+
jQuery(sc[i]).removeClass(that.columnConfig[f].cssClass);
|
940
|
+
}
|
941
|
+
}
|
942
|
+
// selection could have changed.
|
943
|
+
that.activeTable.selectColumns();
|
944
|
+
}
|
945
|
+
}
|
946
|
+
});
|
947
|
+
}
|
948
|
+
|
949
|
+
this.columnMSButton = MultiSplitButton({
|
950
|
+
items: this.columnMSItems,
|
951
|
+
name: 'formatColumn',
|
952
|
+
hideIfEmpty: true,
|
953
|
+
scope: this.name + '.column'
|
954
|
+
});
|
955
|
+
};
|
956
|
+
|
957
|
+
/**
|
958
|
+
* Adds custom formatting buttons for cells to floating menu
|
959
|
+
*/
|
960
|
+
TablePlugin.initCellBtns = function () {
|
961
|
+
var that = this;
|
962
|
+
|
963
|
+
// generate formatting buttons
|
964
|
+
this.cellMSItems = [];
|
965
|
+
jQuery.each(this.cellConfig, function (j, itemConf) {
|
966
|
+
var item = {
|
967
|
+
name : itemConf.name,
|
968
|
+
text : i18n.t(itemConf.text),
|
969
|
+
tooltip : i18n.t(itemConf.tooltip),
|
970
|
+
iconClass : 'aloha-icon aloha-column-layout ' + itemConf.iconClass,
|
971
|
+
click : function (x,y,z) {
|
972
|
+
if (that.activeTable) {
|
973
|
+
applyStyle(that.cellConfig, itemConf.cssClass, that.selectedOrActiveCells());
|
974
|
+
|
975
|
+
that.setActiveCellStyle();
|
976
|
+
}
|
977
|
+
}
|
978
|
+
};
|
979
|
+
|
980
|
+
that.cellMSItems.push(item);
|
981
|
+
});
|
982
|
+
|
983
|
+
if (this.cellMSItems.length > 0) {
|
984
|
+
this.cellMSItems.push({
|
985
|
+
name : 'removeFormat',
|
986
|
+
text : i18n.t('button.removeFormat.text'),
|
987
|
+
tooltip : i18n.t('button.removeFormat.tooltip'),
|
988
|
+
'cls' : 'aloha-ui-multisplit-fullwidth',
|
989
|
+
wide : true,
|
990
|
+
click : function () {
|
991
|
+
if (that.activeTable) {
|
992
|
+
var sc = that.selectedOrActiveCells();
|
993
|
+
// if a selection was made, transform the selected cells
|
994
|
+
for (var i = 0; i < sc.length; i++) {
|
995
|
+
for (var f = 0; f < that.cellConfig.length; f++) {
|
996
|
+
jQuery(sc[i]).removeClass(that.cellConfig[f].cssClass);
|
997
|
+
}
|
998
|
+
}
|
999
|
+
|
1000
|
+
that.setActiveCellStyle();
|
1001
|
+
}
|
1002
|
+
}
|
1003
|
+
});
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
this.cellMSButton = MultiSplitButton({
|
1007
|
+
items: this.cellMSItems,
|
1008
|
+
name: 'formatCell',
|
1009
|
+
hideIfEmpty: true,
|
1010
|
+
scope: this.name + '.cell'
|
1011
|
+
});
|
1012
|
+
};
|
1013
|
+
|
1014
|
+
|
1015
|
+
/**
|
1016
|
+
* initialize the buttons and register them on floating menu
|
1017
|
+
*/
|
1018
|
+
TablePlugin.initTableButtons = function () {
|
1019
|
+
var that = this;
|
1020
|
+
|
1021
|
+
// generate the new scopes
|
1022
|
+
Scopes.createScope(this.name + '.row', 'Aloha.continuoustext');
|
1023
|
+
Scopes.createScope(this.name + '.column', 'Aloha.continuoustext');
|
1024
|
+
Scopes.createScope(this.name + '.cell', 'Aloha.continuoustext');
|
1025
|
+
|
1026
|
+
this._createTableButton = Ui.adopt("createTable", Button, {
|
1027
|
+
tooltip: i18n.t("button.createtable.tooltip"),
|
1028
|
+
icon: "aloha-icon aloha-icon-createTable",
|
1029
|
+
scope: 'Aloha.continuoustext',
|
1030
|
+
click: function() {
|
1031
|
+
TablePlugin.createDialog(this.element);
|
1032
|
+
}
|
1033
|
+
});
|
1034
|
+
|
1035
|
+
// now the specific table buttons
|
1036
|
+
|
1037
|
+
// generate formatting buttons for columns
|
1038
|
+
this.initColumnBtns();
|
1039
|
+
|
1040
|
+
// generate formatting buttons for rows
|
1041
|
+
this.initRowsBtns();
|
1042
|
+
|
1043
|
+
// generate formatting buttons for cells
|
1044
|
+
this.initCellBtns();
|
1045
|
+
|
1046
|
+
this.initMergeSplitCellsBtns();
|
1047
|
+
|
1048
|
+
this.initNaturalFitBtn();
|
1049
|
+
|
1050
|
+
// generate formatting buttons for tables
|
1051
|
+
this.tableMSItems = [];
|
1052
|
+
|
1053
|
+
var tableConfig = this.tableConfig;
|
1054
|
+
|
1055
|
+
jQuery.each(tableConfig, function(j, itemConf){
|
1056
|
+
that.tableMSItems.push({
|
1057
|
+
name: itemConf.name,
|
1058
|
+
text: i18n.t(itemConf.text),
|
1059
|
+
tooltip: i18n.t(itemConf.tooltip),
|
1060
|
+
iconClass: 'aloha-icon aloha-table-layout ' + itemConf.iconClass,
|
1061
|
+
click: function(){
|
1062
|
+
// set table css class
|
1063
|
+
if (that.activeTable) {
|
1064
|
+
if (!that.activeTable.obj.hasClass(itemConf.cssClass)) {
|
1065
|
+
for (var f = 0; f < tableConfig.length; f++) {
|
1066
|
+
that.activeTable.obj.removeClass(tableConfig[f].cssClass);
|
1067
|
+
}
|
1068
|
+
that.activeTable.obj.addClass(itemConf.cssClass);
|
1069
|
+
that.tableMSButton.setActiveItem(itemConf.cssClass);
|
1070
|
+
} else {
|
1071
|
+
for (var f = 0; f < tableConfig.length; f++) {
|
1072
|
+
that.activeTable.obj.removeClass(tableConfig[f].cssClass);
|
1073
|
+
}
|
1074
|
+
that.tableMSButton.setActiveItem();
|
1075
|
+
}
|
1076
|
+
}
|
1077
|
+
}
|
1078
|
+
});
|
1079
|
+
});
|
1080
|
+
|
1081
|
+
if(this.tableMSItems.length > 0) {
|
1082
|
+
this.tableMSItems.push({
|
1083
|
+
name : 'removeFormat',
|
1084
|
+
text : i18n.t('button.removeFormat.text'),
|
1085
|
+
tooltip : i18n.t('button.removeFormat.tooltip'),
|
1086
|
+
'cls' : 'aloha-ui-multisplit-fullwidth',
|
1087
|
+
wide : true,
|
1088
|
+
click : function () {
|
1089
|
+
// remove all table classes
|
1090
|
+
if (that.activeTable) {
|
1091
|
+
for (var f = 0; f < tableConfig.length; f++) {
|
1092
|
+
that.activeTable.obj.removeClass(that.tableConfig[f].cssClass);
|
1093
|
+
}
|
1094
|
+
that.tableMSButton.setActiveItem();
|
1095
|
+
}
|
1096
|
+
}
|
1097
|
+
});
|
1098
|
+
}
|
1099
|
+
|
1100
|
+
this.tableMSButton = MultiSplitButton({
|
1101
|
+
items : this.tableMSItems,
|
1102
|
+
name : 'formatTable',
|
1103
|
+
hideIfEmpty: true,
|
1104
|
+
scope: this.name + '.cell'
|
1105
|
+
});
|
1106
|
+
|
1107
|
+
this._tableCaptionButton = Ui.adopt("tableCaption", ToggleButton, {
|
1108
|
+
tooltip: i18n.t("button.caption.tooltip"),
|
1109
|
+
icon: "aloha-icon aloha-icon-table-caption",
|
1110
|
+
scope: this.name + '.cell',
|
1111
|
+
click: function() {
|
1112
|
+
if (that.activeTable) {
|
1113
|
+
// look if table object has a child caption
|
1114
|
+
if ( that.activeTable.obj.children("caption").is('caption') ) {
|
1115
|
+
that.activeTable.obj.children("caption").remove();
|
1116
|
+
} else {
|
1117
|
+
var captionText = i18n.t('empty.caption');
|
1118
|
+
var c = jQuery('<caption></caption>');
|
1119
|
+
that.activeTable.obj.prepend(c);
|
1120
|
+
that.makeCaptionEditable(c, captionText);
|
1121
|
+
|
1122
|
+
// get the editable span within the caption and select it
|
1123
|
+
var cDiv = c.find('div').eq(0);
|
1124
|
+
var captionContent = cDiv.contents().eq(0);
|
1125
|
+
if (captionContent.length > 0) {
|
1126
|
+
var newRange = new GENTICS.Utils.RangeObject();
|
1127
|
+
newRange.startContainer = newRange.endContainer = captionContent.get(0);
|
1128
|
+
newRange.startOffset = 0;
|
1129
|
+
newRange.endOffset = captionContent.text().length;
|
1130
|
+
|
1131
|
+
// blur all editables within the table
|
1132
|
+
that.activeTable.obj.find('div.aloha-table-cell-editable').blur();
|
1133
|
+
|
1134
|
+
cDiv.focus();
|
1135
|
+
newRange.select();
|
1136
|
+
Aloha.Selection.updateSelection();
|
1137
|
+
}
|
1138
|
+
}
|
1139
|
+
}
|
1140
|
+
}
|
1141
|
+
});
|
1142
|
+
|
1143
|
+
this.summary = AttributeField( {
|
1144
|
+
width : 275,
|
1145
|
+
name : 'tableSummary',
|
1146
|
+
noTargetHighlight: true,
|
1147
|
+
scope: this.name + '.cell'
|
1148
|
+
} );
|
1149
|
+
|
1150
|
+
this.summary.addListener( 'keyup', function( event ) {
|
1151
|
+
if (that.activeTable) {
|
1152
|
+
that.activeTable.checkWai();
|
1153
|
+
}
|
1154
|
+
} );
|
1155
|
+
};
|
1156
|
+
|
1157
|
+
/**
|
1158
|
+
* Helper method to make the caption editable
|
1159
|
+
* @param caption caption as jQuery object
|
1160
|
+
* @param captionText default text for the caption
|
1161
|
+
*/
|
1162
|
+
TablePlugin.makeCaptionEditable = function(caption, captionText) {
|
1163
|
+
var that = this;
|
1164
|
+
var cSpan = caption.children('div');
|
1165
|
+
if (cSpan.length === 0) {
|
1166
|
+
// generate a new div
|
1167
|
+
cSpan = jQuery('<div></div>');
|
1168
|
+
jQuery(cSpan).addClass('aloha-ui');
|
1169
|
+
jQuery(cSpan).addClass('aloha-editable-caption');
|
1170
|
+
if (caption.contents().length > 0) {
|
1171
|
+
// when the caption has content, we wrap it with the new div
|
1172
|
+
cSpan.append(caption.contents());
|
1173
|
+
caption.append(cSpan);
|
1174
|
+
} else {
|
1175
|
+
// caption has no content, so insert the default caption text
|
1176
|
+
if (captionText) {
|
1177
|
+
cSpan.text(captionText);
|
1178
|
+
}
|
1179
|
+
// and append the div into the caption
|
1180
|
+
caption.append(cSpan);
|
1181
|
+
}
|
1182
|
+
} else if (cSpan.length > 1) {
|
1183
|
+
// merge multiple divs (they are probably created by IE)
|
1184
|
+
caption.children('div:not(:first-child)').each(function () {
|
1185
|
+
$this = jQuery(this);
|
1186
|
+
cSpan.eq(0).append($this.contents());
|
1187
|
+
$this.remove();
|
1188
|
+
});
|
1189
|
+
cSpan = cSpan.eq(0);
|
1190
|
+
}
|
1191
|
+
// make the div editable
|
1192
|
+
cSpan.contentEditable(true);
|
1193
|
+
};
|
1194
|
+
|
1195
|
+
/**
|
1196
|
+
* This function adds the createDialog to the calling element
|
1197
|
+
*
|
1198
|
+
* @param callingElement
|
1199
|
+
* The element, which was clicked. It's needed to set the right
|
1200
|
+
* position to the create-table-dialog.
|
1201
|
+
*/
|
1202
|
+
TablePlugin.createDialog = function(callingElement) {
|
1203
|
+
// set the calling element to the layer the calling element mostly will be
|
1204
|
+
// the element which was clicked on it is used to position the createLayer
|
1205
|
+
this.createLayer.set('target', callingElement);
|
1206
|
+
|
1207
|
+
// show the createLayer
|
1208
|
+
this.createLayer.show();
|
1209
|
+
};
|
1210
|
+
|
1211
|
+
/**
|
1212
|
+
* Creates a normal html-table, "activates" this table and inserts it into the
|
1213
|
+
* active Editable
|
1214
|
+
*
|
1215
|
+
* @param cols
|
1216
|
+
* number of colums for the created table
|
1217
|
+
* @param cols
|
1218
|
+
* number of rows for the created table
|
1219
|
+
* @return void
|
1220
|
+
*/
|
1221
|
+
TablePlugin.createTable = function(cols, rows) {
|
1222
|
+
if ( this.preventNestedTables() ) {
|
1223
|
+
return;
|
1224
|
+
}
|
1225
|
+
|
1226
|
+
// Check if there is an active Editable and that it contains an element (= .obj)
|
1227
|
+
if ( Aloha.activeEditable && typeof Aloha.activeEditable.obj !== 'undefined' ) {
|
1228
|
+
// create a dom-table object
|
1229
|
+
var table = document.createElement( 'table' );
|
1230
|
+
var tableId = table.id = GENTICS.Utils.guid();
|
1231
|
+
var tbody = document.createElement( 'tbody' );
|
1232
|
+
|
1233
|
+
// create "rows"-number of rows
|
1234
|
+
for ( var i = 0; i < rows; i++ ) {
|
1235
|
+
var tr = document.createElement( 'tr' );
|
1236
|
+
// create "cols"-number of columns
|
1237
|
+
for ( var j = 0; j < cols; j++ ) {
|
1238
|
+
var text = document.createTextNode( '\u00a0' );
|
1239
|
+
var td = document.createElement( 'td' );
|
1240
|
+
td.appendChild( text );
|
1241
|
+
tr.appendChild( td );
|
1242
|
+
}
|
1243
|
+
tbody.appendChild( tr );
|
1244
|
+
}
|
1245
|
+
table.appendChild( tbody );
|
1246
|
+
|
1247
|
+
prepareRangeContainersForInsertion(
|
1248
|
+
Aloha.Selection.getRangeObject(), table );
|
1249
|
+
|
1250
|
+
// insert the table at the current selection
|
1251
|
+
GENTICS.Utils.Dom.insertIntoDOM(
|
1252
|
+
jQuery( table ),
|
1253
|
+
Aloha.Selection.getRangeObject(),
|
1254
|
+
Aloha.activeEditable.obj
|
1255
|
+
);
|
1256
|
+
|
1257
|
+
cleanupAfterInsertion();
|
1258
|
+
|
1259
|
+
var tableReloadedFromDOM = document.getElementById( tableId );
|
1260
|
+
var tableObj = createNewTable(tableReloadedFromDOM);
|
1261
|
+
|
1262
|
+
if (tableObj) {
|
1263
|
+
// Because without the 10ms delay, we cannot place the cursor
|
1264
|
+
// automatically into the first cell in IE.
|
1265
|
+
if ($.browser.msie) {
|
1266
|
+
window.setTimeout(function () {
|
1267
|
+
tableObj.cells[0].wrapper.get(0).focus();
|
1268
|
+
}, 20 );
|
1269
|
+
} else {
|
1270
|
+
tableObj.cells[0].wrapper.get(0).focus();
|
1271
|
+
}
|
1272
|
+
}
|
1273
|
+
|
1274
|
+
// The selection starts out in the first cell of the new
|
1275
|
+
// table. The table tab/scope has to be activated
|
1276
|
+
// accordingly.
|
1277
|
+
tableObj.focus();
|
1278
|
+
TablePlugin.activeTable.selection.selectionType = 'cell';
|
1279
|
+
TablePlugin.updateFloatingMenuScope();
|
1280
|
+
|
1281
|
+
} else {
|
1282
|
+
this.error( 'There is no active Editable where the table can be\
|
1283
|
+
inserted!' );
|
1284
|
+
}
|
1285
|
+
};
|
1286
|
+
|
1287
|
+
TablePlugin.setFocusedTable = function(focusTable) {
|
1288
|
+
var that = this;
|
1289
|
+
|
1290
|
+
// clicking outside the table unselects the cells of the table
|
1291
|
+
if ( null == focusTable && null != this.activeTable ) {
|
1292
|
+
this.activeTable.selection.unselectCells();
|
1293
|
+
}
|
1294
|
+
|
1295
|
+
for (var i = 0; i < TablePlugin.TableRegistry.length; i++) {
|
1296
|
+
TablePlugin.TableRegistry[i].hasFocus = false;
|
1297
|
+
}
|
1298
|
+
if (typeof focusTable != 'undefined') {
|
1299
|
+
this.summary.setTargetObject(focusTable.obj, 'summary');
|
1300
|
+
if ( focusTable.obj.children("caption").is('caption') ) {
|
1301
|
+
// set caption button
|
1302
|
+
this._tableCaptionButton.setState(true);
|
1303
|
+
var c = focusTable.obj.children("caption");
|
1304
|
+
that.makeCaptionEditable(c);
|
1305
|
+
}
|
1306
|
+
focusTable.hasFocus = true;
|
1307
|
+
}
|
1308
|
+
TablePlugin.activeTable = focusTable;
|
1309
|
+
|
1310
|
+
// show configured formatting classes
|
1311
|
+
for (var i = 0; i < this.tableMSItems.length; i++) {
|
1312
|
+
this.tableMSButton.showItem(this.tableMSItems[i].name);
|
1313
|
+
}
|
1314
|
+
this.tableMSButton.setActiveItem();
|
1315
|
+
|
1316
|
+
if (this.activeTable) {
|
1317
|
+
for (var i = 0; i < this.tableConfig.length; i++) {
|
1318
|
+
if (this.activeTable.obj.hasClass(this.tableConfig[i].cssClass)) {
|
1319
|
+
this.tableMSButton.setActiveItem(this.tableConfig[i].name);
|
1320
|
+
}
|
1321
|
+
}
|
1322
|
+
}
|
1323
|
+
};
|
1324
|
+
|
1325
|
+
/**
|
1326
|
+
* Calls the Aloha.log function with 'error' level
|
1327
|
+
*
|
1328
|
+
* @see Aloha.log
|
1329
|
+
* @param msg
|
1330
|
+
* The message to display
|
1331
|
+
* @return void
|
1332
|
+
*/
|
1333
|
+
TablePlugin.error = function(msg) {
|
1334
|
+
Aloha.Log.error(this, msg);
|
1335
|
+
};
|
1336
|
+
|
1337
|
+
/**
|
1338
|
+
* Calls the Aloha.log function with 'debug' level
|
1339
|
+
*
|
1340
|
+
* @see Aloha.log
|
1341
|
+
* @param msg
|
1342
|
+
* The message to display
|
1343
|
+
* @return void
|
1344
|
+
*/
|
1345
|
+
TablePlugin.debug = function(msg) {
|
1346
|
+
Aloha.Log.debug(this, msg);
|
1347
|
+
};
|
1348
|
+
|
1349
|
+
/**
|
1350
|
+
* Calls the Aloha.log function with 'info' level
|
1351
|
+
*
|
1352
|
+
* @see Aloha.log
|
1353
|
+
* @param msg
|
1354
|
+
* The message to display
|
1355
|
+
* @return void
|
1356
|
+
*/
|
1357
|
+
TablePlugin.info = function(msg) {
|
1358
|
+
Aloha.Log.info(this, msg);
|
1359
|
+
};
|
1360
|
+
|
1361
|
+
/**
|
1362
|
+
* Calls the Aloha.log function with 'info' level
|
1363
|
+
*
|
1364
|
+
* @see Aloha.log
|
1365
|
+
* @param msg
|
1366
|
+
* The message to display
|
1367
|
+
* @return void
|
1368
|
+
*/
|
1369
|
+
TablePlugin.log = function(msg) {
|
1370
|
+
Aloha.log('log', this, msg);
|
1371
|
+
};
|
1372
|
+
|
1373
|
+
/**
|
1374
|
+
* The "get"-method returns the value of the given key.
|
1375
|
+
* First it searches in the config for the property.
|
1376
|
+
* If there is no property with the given name in the
|
1377
|
+
* "config"-object it returns the entry associated with
|
1378
|
+
* in the parameters-object
|
1379
|
+
*
|
1380
|
+
* @param property
|
1381
|
+
* @return void
|
1382
|
+
*
|
1383
|
+
*/
|
1384
|
+
TablePlugin.get = function (property) {
|
1385
|
+
if (this.config[property]) {
|
1386
|
+
return this.config[property];
|
1387
|
+
}
|
1388
|
+
if (this.parameters[property]) {
|
1389
|
+
return this.parameters[property];
|
1390
|
+
}
|
1391
|
+
return undefined;
|
1392
|
+
};
|
1393
|
+
|
1394
|
+
/**
|
1395
|
+
* The "set"-method takes a key and a value. It checks if there is a
|
1396
|
+
* key-value pair in the config-object. If so it saves the data in the
|
1397
|
+
* config-object. If not it saves the data in the parameters-object.
|
1398
|
+
*
|
1399
|
+
* @param key the key which should be set
|
1400
|
+
* @param value the value which should be set for the associated key
|
1401
|
+
*/
|
1402
|
+
TablePlugin.set = function (key, value) {
|
1403
|
+
if (this.config[key]) {
|
1404
|
+
this.config[key] = value;
|
1405
|
+
}else{
|
1406
|
+
this.parameters[key] = value;
|
1407
|
+
}
|
1408
|
+
};
|
1409
|
+
|
1410
|
+
/**
|
1411
|
+
* Make the given jQuery object (representing an editable) clean for saving
|
1412
|
+
* Find all tables and deactivate them
|
1413
|
+
* @param obj jQuery object to make clean
|
1414
|
+
* @return void
|
1415
|
+
*/
|
1416
|
+
TablePlugin.makeClean = function ( obj ) {
|
1417
|
+
var that = this;
|
1418
|
+
obj.find( 'table' ).each( function () {
|
1419
|
+
// Make sure that we only deactivate tables in obj which have the
|
1420
|
+
// same id as tables which have been activated and registered
|
1421
|
+
if ( that.getTableFromRegistry( this ) ) {
|
1422
|
+
( new Table( this, that ) ).deactivate();
|
1423
|
+
// remove the id attribute
|
1424
|
+
jQuery(this).attr('id', null);
|
1425
|
+
}
|
1426
|
+
} );
|
1427
|
+
};
|
1428
|
+
|
1429
|
+
/**
|
1430
|
+
* String representation of the Table-object
|
1431
|
+
*
|
1432
|
+
* @return The plugins namespace (string)
|
1433
|
+
*/
|
1434
|
+
TablePlugin.toString = function() {
|
1435
|
+
return this.prefix;
|
1436
|
+
};
|
1437
|
+
|
1438
|
+
TablePlugin.updateFloatingMenuScope = function() {
|
1439
|
+
if ( null != TablePlugin.activeTable && null != TablePlugin.activeTable.selection.selectionType ) {
|
1440
|
+
Scopes.setScope(TablePlugin.name + '.' + TablePlugin.activeTable.selection.selectionType);
|
1441
|
+
}
|
1442
|
+
};
|
1443
|
+
|
1444
|
+
/**
|
1445
|
+
* Set the cell-style to match the active item, if all selected cells have the same style
|
1446
|
+
* TODO: Algorithm very similar to setActiveStyle in table.js, should be refactored
|
1447
|
+
*/
|
1448
|
+
TablePlugin.setActiveCellStyle = function() {
|
1449
|
+
var that = this;
|
1450
|
+
var allSelected = false;
|
1451
|
+
var className;
|
1452
|
+
|
1453
|
+
// reset any selected cell styles
|
1454
|
+
this.cellMSButton.setActiveItem();
|
1455
|
+
|
1456
|
+
var selectedCells = that.selectedOrActiveCells();
|
1457
|
+
|
1458
|
+
for (var i = 0; i < that.cellConfig.length; i++) {
|
1459
|
+
if (jQuery(selectedCells[0]).hasClass(that.cellConfig[i].cssClass) ) {
|
1460
|
+
className = that.cellConfig[i].name;
|
1461
|
+
allSelected = true;
|
1462
|
+
break;
|
1463
|
+
}
|
1464
|
+
}
|
1465
|
+
|
1466
|
+
// if all selected cells have the same class, set it as active
|
1467
|
+
jQuery(selectedCells).each(function(index) {
|
1468
|
+
if (!jQuery(this).hasClass(className)) {
|
1469
|
+
allSelected = false;
|
1470
|
+
}
|
1471
|
+
});
|
1472
|
+
if (allSelected) {
|
1473
|
+
this.cellMSButton.setActiveItem(className);
|
1474
|
+
}
|
1475
|
+
};
|
1476
|
+
|
1477
|
+
TablePlugin.selectedOrActiveCells = function() {
|
1478
|
+
var that = this;
|
1479
|
+
var sc = this.activeTable.selection.selectedCells;
|
1480
|
+
|
1481
|
+
// if there are no selected cells,
|
1482
|
+
// set the active cell as the selected cell.
|
1483
|
+
if (!sc || sc.length < 1) {
|
1484
|
+
var activeCell = function() {
|
1485
|
+
var range = Aloha.Selection.getRangeObject();
|
1486
|
+
if (Aloha.activeEditable) {
|
1487
|
+
return range.findMarkup( function() {
|
1488
|
+
return this.nodeName.toLowerCase() === 'td';
|
1489
|
+
}, Aloha.activeEditable.obj );
|
1490
|
+
} else {
|
1491
|
+
return null;
|
1492
|
+
}
|
1493
|
+
}
|
1494
|
+
|
1495
|
+
var active_cell = activeCell();
|
1496
|
+
return (active_cell ? [ active_cell ] : []);
|
1497
|
+
} else {
|
1498
|
+
return sc;
|
1499
|
+
}
|
1500
|
+
};
|
1501
|
+
|
1502
|
+
PluginManager.register(TablePlugin);
|
1503
|
+
|
1504
|
+
/**
|
1505
|
+
* Detects a situation where we are about to insert content into a
|
1506
|
+
* selection that looks like this: <p> [</p>...
|
1507
|
+
* We will assume that the nbsp inside the <p> node was placed there to
|
1508
|
+
* "prop-up" the empty paragraph--that is--to make the empty paragraph
|
1509
|
+
* visible in HTML5 conformant rendering engines, like WebKit. Without the
|
1510
|
+
* white space, such browsers would correctly render an empty <p> as
|
1511
|
+
* invisible.
|
1512
|
+
*
|
1513
|
+
* If we detect this situation, we remove the white space so that when we
|
1514
|
+
* paste new content into the paragraph, it is not be split and leaving an
|
1515
|
+
* empty paragraph on top of the pasted content.
|
1516
|
+
*
|
1517
|
+
* Note that we do not use <br />'s to prop up the paragraphs, as WebKit
|
1518
|
+
* does, because IE, will break from the HTML5 specification and will
|
1519
|
+
* display empty paragraphs if they are content-editable. So a <br />
|
1520
|
+
* inside an empty content-editable paragraph will result in 2 lines to be
|
1521
|
+
* shown instead of 1 in IE.
|
1522
|
+
*
|
1523
|
+
* @param {Object} range
|
1524
|
+
* @param {DOMElement} table
|
1525
|
+
*/
|
1526
|
+
function prepareRangeContainersForInsertion ( range, table ) {
|
1527
|
+
var eNode = range.endContainer,
|
1528
|
+
sNode = range.startContainer,
|
1529
|
+
eNodeLength = ( eNode.nodeType == 3 )
|
1530
|
+
? eNode.length
|
1531
|
+
: eNode.childNodes.length;
|
1532
|
+
|
1533
|
+
|
1534
|
+
if ( sNode.nodeType == 3 &&
|
1535
|
+
sNode.parentNode.tagName == 'P' &&
|
1536
|
+
sNode.parentNode.childNodes.length == 1 &&
|
1537
|
+
/^(\s|%A0)$/.test( escape( sNode.data ) ) ) {
|
1538
|
+
sNode.data = '';
|
1539
|
+
range.startOffset = 0;
|
1540
|
+
|
1541
|
+
// In case ... <p> []</p>
|
1542
|
+
if ( eNode == sNode ) {
|
1543
|
+
range.endOffset = 0;
|
1544
|
+
}
|
1545
|
+
}
|
1546
|
+
|
1547
|
+
// If the table is not allowed to be nested inside the startContainer,
|
1548
|
+
// then it will have to be split in order to insert the table.
|
1549
|
+
// We will therefore check if the selection touches the start and/or
|
1550
|
+
// end of their container nodes.
|
1551
|
+
// If they do, we will mark their container so that after they are
|
1552
|
+
// split we can check whether or not they should be removed
|
1553
|
+
if ( !GENTICS.Utils.Dom.allowsNesting(
|
1554
|
+
sNode.nodeType == 3 ? sNode.parentNode : sNode, table ) ) {
|
1555
|
+
|
1556
|
+
if ( range.startOffset == 0 ) {
|
1557
|
+
jQuery( sNode.nodeType == 3 ? sNode.parentNode : sNode )
|
1558
|
+
.addClass( 'aloha-table-cleanme' );
|
1559
|
+
}
|
1560
|
+
|
1561
|
+
if ( range.endOffset == eNodeLength ) {
|
1562
|
+
jQuery( eNode.nodeType == 3 ? eNode.parentNode : eNode )
|
1563
|
+
.addClass( 'aloha-table-cleanme' );
|
1564
|
+
}
|
1565
|
+
}
|
1566
|
+
};
|
1567
|
+
|
1568
|
+
/**
|
1569
|
+
* Looks for elements marked with "aloha-table-cleanme", and removes them
|
1570
|
+
* if they are absolutely empty.
|
1571
|
+
* Note that this will leave paragraphs which contain empty nested elements
|
1572
|
+
* even though they are also invisible.
|
1573
|
+
* We can consider removing these as well at a later stage, if needed.
|
1574
|
+
*/
|
1575
|
+
function cleanupAfterInsertion () {
|
1576
|
+
var dirty = jQuery( '.aloha-table-cleanme' ).removeClass(
|
1577
|
+
'aloha-table-cleanme' );
|
1578
|
+
|
1579
|
+
for ( var i = 0; i < dirty.length; i++ ) {
|
1580
|
+
if ( jQuery.trim( jQuery( dirty[ i ] ).html() ) == '' &&
|
1581
|
+
!GENTICS.Utils.Dom.isEditingHost( dirty[ i ] ) ) {
|
1582
|
+
jQuery( dirty[ i ] ).remove();
|
1583
|
+
|
1584
|
+
/*
|
1585
|
+
// For debugging: to see what we are deleting
|
1586
|
+
jQuery( dirty[ i ] ).css({
|
1587
|
+
border: '3px solid red',
|
1588
|
+
display: 'block'
|
1589
|
+
});
|
1590
|
+
*/
|
1591
|
+
}
|
1592
|
+
}
|
1593
|
+
};
|
1594
|
+
|
1595
|
+
return TablePlugin;
|
1596
|
+
});
|