aloha-rails 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +34 -0
- data/Rakefile +9 -0
- data/aloha-rails.gemspec +22 -0
- data/lib/aloha-rails.rb +13 -0
- data/lib/aloha-rails/engine.rb +9 -0
- data/lib/aloha-rails/helpers.rb +45 -0
- data/lib/aloha-rails/railtie.rb +9 -0
- data/lib/aloha-rails/version.rb +5 -0
- data/lib/generators/aloha/install/USAGE +9 -0
- data/lib/generators/aloha/install/install_generator.rb +25 -0
- data/lib/generators/aloha/install/templates/aloha-config.coffee +88 -0
- data/lib/generators/aloha/install/templates/aloha-config.js +108 -0
- data/lib/generators/aloha/install/templates/aloha.rb +21 -0
- data/lib/generators/aloha/install/templates/application.js +16 -0
- data/spec/aloha_spec.rb +20 -0
- data/spec/helpers/aloha_helpers_spec.rb +69 -0
- data/spec/spec_helper.rb +17 -0
- data/vendor/assets/javascripts/aloha/css/aloha-core.css +44 -0
- data/vendor/assets/javascripts/aloha/css/aloha-sidebar.css +284 -0
- data/vendor/assets/javascripts/aloha/css/aloha.css +7774 -0
- data/vendor/assets/javascripts/aloha/css/ext-aloha-reset.css +33 -0
- data/vendor/assets/javascripts/aloha/css/ext-aloha.css +357 -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-big.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/fade-in.png +0 -0
- data/vendor/assets/javascripts/aloha/img/fade-out.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-bootstrap.js +27645 -0
- data/vendor/assets/javascripts/aloha/lib/aloha.js +88750 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/command.js +246 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/console.js +330 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/contenthandlermanager.js +65 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/core.js +560 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ecma5.js +194 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ecma5shims.js +280 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/editable.js +854 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/engine.js +8306 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ext-alohaproxy.js +86 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ext-alohareader.js +50 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ext-alohatreeloader.js +77 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ext.js +32 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/floatingmenu.js +1304 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ierange-m2.js +546 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/jquery.aloha.js +324 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/jquery.js +24 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/jquery.patch.js +115 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/markup.js +977 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/message.js +115 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/nls/de/i18n.js +10 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/nls/i18n.js +20 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/observable.js +106 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/plugin.js +276 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/pluginmanager.js +146 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/rangy-core.js +3242 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/registry.js +59 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/repository.js +241 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/repositorymanager.js +570 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/repositoryobjects.js +146 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/selection.js +2083 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/sidebar.js +1133 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ui-attributefield.js +530 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ui-browser.js +214 -0
- data/vendor/assets/javascripts/aloha/lib/aloha/ui.js +889 -0
- data/vendor/assets/javascripts/aloha/lib/css.js +313 -0
- data/vendor/assets/javascripts/aloha/lib/i18n.js +153 -0
- data/vendor/assets/javascripts/aloha/lib/jquery-plugin.js +46 -0
- data/vendor/assets/javascripts/aloha/lib/order.js +140 -0
- data/vendor/assets/javascripts/aloha/lib/require.js +2013 -0
- data/vendor/assets/javascripts/aloha/lib/text.js +262 -0
- data/vendor/assets/javascripts/aloha/lib/util/class.js +80 -0
- data/vendor/assets/javascripts/aloha/lib/util/dom.js +1673 -0
- data/vendor/assets/javascripts/aloha/lib/util/json2.js +481 -0
- data/vendor/assets/javascripts/aloha/lib/util/lang.js +66 -0
- data/vendor/assets/javascripts/aloha/lib/util/position.js +158 -0
- data/vendor/assets/javascripts/aloha/lib/util/range.js +923 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/adapter/jquery/ext-jquery-adapter-debug.js +2470 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/adapter/jquery/ext-jquery-adapter.js +7 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/ext-all-debug.js +47684 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/ext-all.js +13 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/gpl-3.0.txt +674 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/license.txt +42 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/charts.swf +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/css/ext-all.css +5903 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/css/ext-all.less +6795 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/css/xtheme-gray.css +1692 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/expressinstall.swf +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/corners-blue.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/corners.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/l-blue.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/l.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/r-blue.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/r.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/tb-blue.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/box/tb.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/arrow.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/btn.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/group-cs.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/group-lr.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/group-tb.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-b-noline.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-b.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-bo.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-noline.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow-o.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/button/s-arrow.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/dd/drop-add.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/dd/drop-no.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/dd/drop-yes.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/editor/tb-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/checkbox.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/clear-trigger.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/clear-trigger.psd +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/date-trigger.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/date-trigger.psd +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/error-tip-corners.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/exclamation.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/radio.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/search-trigger.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/search-trigger.psd +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/text-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger-square.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger-square.psd +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger-tpl.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/form/trigger.psd +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/gradient-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/arrow-left-white.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/arrow-right-white.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/col-move-bottom.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/col-move-top.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/columns.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/dirty.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/done.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/drop-no.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/drop-yes.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/footer-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-blue-hd.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-blue-split.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-hrow.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-loading.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-split.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid-vista-hd.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-hd-btn.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-hrow-over.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-hrow.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-special-col-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/grid3-special-col-sel-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-by.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-collapse.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-expand-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/group-expand.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hd-pop.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-asc.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-desc.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-lock.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-lock.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-unlock.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/hmenu-unlock.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/invalid_line.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/loading.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/mso-hd.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/nowait.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-first-disabled.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-first.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-last-disabled.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-last.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-next-disabled.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-next.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-prev-disabled.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/page-prev.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/pick-button.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/refresh.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-check-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-expand-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-over.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/row-sel.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/sort-hd.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/sort_asc.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/sort_desc.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/grid/wait.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/collapse.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/expand.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/gradient-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-bottom.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-left.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-right.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/mini-top.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/ns-collapse.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/ns-expand.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/panel-close.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/panel-title-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/panel-title-light-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/stick.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/stuck.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/tab-close-on.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/layout/tab-close.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/checked.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/group-checked.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/item-over.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/menu-parent.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/menu.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/menu/unchecked.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/corners-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/left-right.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/light-hd.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/tool-sprite-tpl.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/tool-sprites.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/tools-sprites-trans.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/top-bottom.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/top-bottom.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/white-corners-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/white-left-right.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/panel/white-top-bottom.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/progress/progress-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/close.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/tip-anchor-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/qtip/tip-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/s.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shadow-c.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shadow-lr.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shadow.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/blue-loading.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/calendar.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/glass-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/hd-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/large-loading.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/left-btn.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/loading-balls.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/right-btn.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/shared/warning.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/e-handle-dark.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/e-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/ne-handle-dark.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/ne-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/nw-handle-dark.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/nw-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/s-handle-dark.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/s-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/se-handle-dark.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/se-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/square.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/sw-handle-dark.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/sizer/sw-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-bg.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-thumb.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-v-bg.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/slider/slider-v-thumb.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/scroll-left.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/scroll-right.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/scroller-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-left-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-over-left-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-over-right-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-btm-right-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-close.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-strip-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-strip-bg.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tab-strip-btm-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tabs/tabs-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/btn-arrow-light.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/btn-arrow.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/btn-over-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/gray-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/more.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-btn-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-xl-btn-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/toolbar/tb-xl-sep.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/arrows.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-add.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-between.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-no.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-over.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-under.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/drop-yes.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-minus-nl.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-minus.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-plus-nl.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end-plus.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-end.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-line.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-minus-nl.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-minus.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-plus-nl.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow-plus.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/elbow.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/folder-open.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/folder.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/leaf.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/loading.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/tree/s.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-error.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-info.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-question.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/icon-warning.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-corners.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-corners.psd +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-right.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/left-right.psd +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/right-corners.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/right-corners.psd +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/top-bottom.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/default/window/top-bottom.psd +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/btn-arrow.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/btn-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/btn.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/group-cs.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/group-lr.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/group-tb.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/s-arrow-bo.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/button/s-arrow-o.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/clear-trigger.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/date-trigger.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/search-trigger.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/trigger-square.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/form/trigger.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/gradient-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/col-move-bottom.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/col-move-top.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hd-btn.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow-over.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow-over2.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-hrow2.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-special-col-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-special-col-bg2.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/grid3-special-col-sel-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/group-collapse.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/group-expand-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/group-expand.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-first.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-last.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-next.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/page-prev.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/refresh.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/row-expand-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/sort_asc.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/grid/sort_desc.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/group-checked.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/item-over-disabled.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/item-over.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/menu/menu-parent.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/corners-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/left-right.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/light-hd.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/tool-sprite-tpl.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/tool-sprites.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/tools-sprites-trans.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/top-bottom.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/top-bottom.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/white-corners-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/white-left-right.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/panel/white-top-bottom.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/progress/progress-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/close.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/tip-anchor-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/qtip/tip-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/s.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/shared/hd-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/shared/left-btn.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/shared/right-btn.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/e-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/ne-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/nw-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/s-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/se-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/square.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/sizer/sw-handle.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/slider/slider-thumb.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/slider/slider-v-thumb.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/scroll-left.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/scroll-right.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/scroller-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-left-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-over-left-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-over-right-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-btm-right-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-close.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-strip-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-strip-bg.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tab-strip-btm-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tabs/tabs-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/btn-arrow-light.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/btn-arrow.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/btn-over-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/gray-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/more.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/tb-bg.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/toolbar/tb-btn-sprite.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/arrows.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-minus-nl.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-minus.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-plus-nl.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/tree/elbow-end-plus.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-error.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-info.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-question.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/icon-warning.gif +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/left-corners.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/left-corners.pspimage +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/left-right.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/right-corners.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/images/gray/window/top-bottom.png +0 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/ext-3.2.1/resources/resources.jsb +507 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/jquery-1.6.1.js +8936 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/jquery.json-2.2.min.js +33 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/jquery.store.js +446 -0
- data/vendor/assets/javascripts/aloha/lib/vendor/sanitize.js +267 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/css/abbr.css +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/lib/abbr-plugin.js +293 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/abbr/nls/i18n.js +4 -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 +19 -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 +345 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/nls/en/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/nls/fr/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/align/nls/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 +51 -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 +104 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/block.js +442 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockcontenthandler.js +58 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/blockmanager.js +242 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editor.js +209 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/editormanager.js +34 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/lib/sidebarattributeeditor.js +119 -0
- data/vendor/assets/javascripts/aloha/plugins/common/block/package.json +11 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/css/characterpicker.css +38 -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 +227 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/characterpicker/nls/i18n.js +4 -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 +15 -0
- data/vendor/assets/javascripts/aloha/plugins/common/commands/lib/inserthtml.js +107 -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/contenthandler-plugin.js +54 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/genericcontenthandler.js +255 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/oembedcontenthandler.js +276 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/sanitizecontenthandler.js +136 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/lib/wordcontenthandler.js +279 -0
- data/vendor/assets/javascripts/aloha/plugins/common/contenthandler/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/css/format.css +8 -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 +303 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/eo/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/fi/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/fr/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/i18n.js +10 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/it/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/pl/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/format/nls/ru/i18n.js +1 -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 +72 -0
- data/vendor/assets/javascripts/aloha/plugins/common/highlighteditables/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/css/horizontalruler.css +4 -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 +55 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/horizontalruler/nls/i18n.js +4 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/AGPL3 +661 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/LICENSE +25 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/README.md +83 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/css/image.css +124 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/demo/crop.html +76 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/demo/crop.php +21 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/demo/cropnresize.jpg +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/demo/index.html +120 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/img/blank.jpg +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-plugin.js +1615 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/cz/i18n.js +16 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/fr/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/i18n.js +7 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/nls/ru/i18n.js +16 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/test/test.css +12 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/test/test.html +40 -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 +35 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/jcrop/jquery.jcrop.min.js +163 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/mousewheel/mousewheel.js +60 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/jquery-ui-1.8.10.custom.min.js +97 -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/image/vendor/ui/ui-lightness/jquery-ui-1.8.10.cropnresize.css +33 -0
- data/vendor/assets/javascripts/aloha/plugins/common/image/vendor/ui/ui-lightness/jquery-ui-1.8.10.custom.css +314 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/css/link.css +55 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/demo/background.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/demo/external-link-ltr-icon.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/demo/index.css +91 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/demo/index.html +91 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/extra/delicious.js +246 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/extra/linklist.js +227 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/extra/slowlinklist.js +228 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/lib/link-plugin.js +759 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/de/i18n.js +13 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/fr/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/i18n.js +9 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/pl/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/link/nls/ru/i18n.js +6 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/lib/list-plugin.js +849 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/eo/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/fi/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/fr/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/i18n.js +9 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/it/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/nls/ru/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/list/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/paste/README.md +3 -0
- data/vendor/assets/javascripts/aloha/plugins/common/paste/lib/paste-plugin.js +221 -0
- data/vendor/assets/javascripts/aloha/plugins/common/paste/package.json +8 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/css/table.css +160 -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 +463 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-create-layer.js +210 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-plugin-utils.js +355 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-plugin.js +1498 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table-selection.js +374 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/lib/table.js +1529 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/eo/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/fi/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/fr/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/i18n.js +11 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/it/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/pl/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/nls/ru/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/table/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/common/undo/demo/index.css +49 -0
- data/vendor/assets/javascripts/aloha/plugins/common/undo/demo/index.html +85 -0
- data/vendor/assets/javascripts/aloha/plugins/common/undo/lib/undo-plugin.js +134 -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 +119 -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 +217 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/en/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/attributes/nls/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/README +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/browser.css +360 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/browser.jqgrid.css +374 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/browsercombined.css +752 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_222222_256x240.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_2e83ff_256x240.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_454545_256x240.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_888888_256x240.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/jquery-ui-1.8.13.custom.css +319 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/jstree.css +88 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/throbber.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/css/ui.jqgrid.css +148 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-000-medium.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-180.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-315-medium.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-stop-180.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow-stop.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/arrow.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/control-stop-square-small.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/folder-horizontal-open.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/folder-open.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/gcn-icons/gcn-icon-file.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/gcn-icons/gcn-icon-image.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/gcn-icons/gcn-icon-page.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/magnifier-left.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/page.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/picture.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/sort-alphabet-descending.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/sort-alphabet.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/img/throbber.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/lib/browser-plugin.js +10 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/lib/browser.js +1103 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/lib/locale.js +26 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/de.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/de/i18n.js +18 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/en.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/en/i18n.js +18 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/nls/i18n.js +4 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/grid.locale.de.js +134 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/grid.locale.en.js +129 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/jquery.jqGrid.js +467 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/jquery.jstree.js +4544 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/jquery.ui.js +756 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/browser/vendor/ui-layout.js +108 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/README +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/css/cite.css +49 -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 +539 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/en/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/cite/nls/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/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/comments/src/comments.css +442 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/comments/src/comments.js +669 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/AGPL3 +661 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/LICENSE +25 -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/demo/index.css +47 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/index.html +101 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/migration/index.css +189 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/migration/index.html +321 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/specs/DragnDropnImage.graphml +677 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/style.css +47 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/demo/upload.php +26 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/i18n/en.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/i18n/fr.json +1 -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 +349 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/lib/dropfilesrepository.js +365 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/draganddropfiles/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/README.md +3 -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 +67 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/lib/formatlesspaste-plugin.js +103 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/formatlesspaste/nls/i18n.js +7 -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 +127 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/en/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/headerids/nls/i18n.js +5 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/dep/jquery.poshytip.js +470 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/i18n/de.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/i18n/en.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/img/tip-twitter_arrows.gif +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/package.json +9 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/src/hints.css +61 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/hints/src/hints.js +49 -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 +153 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/fr/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/i18n.js +7 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/pl/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkbrowser/nls/ru/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/demo/index.css +49 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/demo/index.html +82 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/i18n/en.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/linkchecker/proxy.php +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 +256 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/listenforcer/lib/listenforcer-plugin.js +165 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/README +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/css/metaview.css +86 -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/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 +82 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/de.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/en.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/en/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/metaview/nls/i18n.js +5 -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/demo/index.css +189 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/demo/index.html +139 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/demo/js/aloha-config.js +115 -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 +233 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/de/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/en/i18n.js +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/numerated-headers/nls/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 +285 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/LICENSE.md +662 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/README.md +8 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/css/ribbon.css +10 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/lib/ribbon-plugin.js +186 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/ribbon/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/i18n/de.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/i18n/en.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/toc/src/toc.js +350 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/vie/LICENSE +22 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/vie/README.markdown +65 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/vie/demo/index.html +93 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/vie/img/cms-decoupled-communications.png +0 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/vie/package.json +1 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/backbone-min.js +27 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/underscore-min.js +25 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie-aloha.js +74 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie-collectionmanager.js +70 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie-containermanager.js +263 -0
- data/vendor/assets/javascripts/aloha/plugins/extra/vie/src/vie.js +20 -0
- data/vendor/assets/stylesheets/aloha.css +1 -0
- metadata +1133 -0
@@ -0,0 +1 @@
|
|
1
|
+
define({"floatingmenu.tab.table":"Tabelle","floatingmenu.tab.tablelayout":"Tabellenlayout","deleterows.confirm":"Wollen Sie die ausgew\u00e4hlten Zeilen wirklich l\u00f6schen?","deletecolumns.confirm":"Wollen Sie die ausgew\u00e4hlten Spalten wirklich l\u00f6schen?","deletetable.confirm":"Wollen Sie wirklich die ganze Tabelle l\u00f6schen?","Table":"Tabelle","button.createtable.tooltip":"Tabelle einf\u00fcgen","button.addcolleft.tooltip":"Spalte links einf\u00fcgen","button.addcolright.tooltip":"Spalte rechts einf\u00fcgen","button.delcols.tooltip":"Spalten l\u00f6schen","button.addrowbefore.tooltip":"Zeile dar\u00fcber einf\u00fcgen","button.addrowafter.tooltip":"Zeile darunter einf\u00fcgen","button.delrows.tooltip":"Zeilen l\u00f6schen","button.caption.tooltip":"Tabellen Bezeichnung","empty.caption":"Tabellen Bezeichnung","button.removeFormat.tooltip":"Formatierung entfernen","button.removeFormat.text":"Formatierung entfernen","button.rowheader.tooltip":"Zeile als Tabellenüberschrift formatieren","button.columnheader.tooltip":"Spalte als Tabellenüberschrift formatieren"});
|
@@ -0,0 +1 @@
|
|
1
|
+
define({"floatingmenu.tab.table":"Tabelo","deleterows.confirm":"\ufffdu vi vere volas vi\ufffdi la elektitajn vicojn?","deletecolumns.confirm":"\ufffdu vi vere volas vi\ufffdi la elektitajn kolumnojn?","deletetable.confirm":"\ufffdu vi vere volas forvi\ufffdi la tabelon?","Table":"Tabelo","button.createtable.tooltip":"Enmeti tabelon","button.addcolleft.tooltip":"Aldoni kolumnon maldekstre","button.addcolright.tooltip":"Aldoni kolumnon dekstre","button.delcols.tooltip":"Forvi\ufffdi kolumnojn","button.addrowbefore.tooltip":"Aldoni vicon anta\ufffde","button.addrowafter.tooltip":"Aldoni vicon poste","button.delrows.tooltip":"Forvi\ufffdi vicojn"});
|
@@ -0,0 +1 @@
|
|
1
|
+
define({"floatingmenu.tab.table":"Taulukko","deleterows.confirm":"Oletko varma ett\u00e4 haluat poistaa valitut rivit?","deletecolumns.confirm":"Oletko varma ett\u00e4 haluat poistaa valitut sarakkeet?","deletetable.confirm":"Oletko varma ett\u00e4 haluat poistaa taulukon?","Table":"Taulukko","button.createtable.tooltip":"Lis\u00e4\u00e4 taulukko","button.addcolleft.tooltip":"Lis\u00e4\u00e4 sarake vasemmalle","button.addcolright.tooltip":"Lis\u00e4\u00e4 sarake oikealle","button.delcols.tooltip":"Poista sarakkeet","button.addrowbefore.tooltip":"Lis\u00e4\u00e4 rivi ennen","button.addrowafter.tooltip":"Lis\u00e4\u00e4 rivi j\u00e4lkeen","button.delrows.tooltip":"Poista rivit"});
|
@@ -0,0 +1 @@
|
|
1
|
+
define({"floatingmenu.tab.table":"Table","deleterows.confirm":"Voulez-vous vraiment supprimer les lignes s\u00e9lectionn\u00e9es ?","deletecolumns.confirm":"Voulez-vous vraiment supprimer les colonnes s\u00e9lectionn\u00e9es ?","deletetable.confirm":"Voulez-vous vraiment supprimer la table ?","Table":"Tableau","button.createtable.tooltip":"Ins\u00e9rer un tableau","button.addcolleft.tooltip":"Ajouter une colonne \u00e0 gauche","button.addcolright.tooltip":"Ajouter Colonne \u00e0 droite","button.delcols.tooltip":"Colonnes Supprimer","button.addrowbefore.tooltip":"Ajouter une ligne avant","button.addrowafter.tooltip":"Ajouter une ligne apr\u00e8s","button.delrows.tooltip":"supprimer des lignes"});
|
@@ -0,0 +1,11 @@
|
|
1
|
+
define({
|
2
|
+
root: {"floatingmenu.tab.table":"Table","floatingmenu.tab.tablelayout":"Table Layout","deleterows.confirm":"Do you really want to delete the selected rows?","deletecolumns.confirm":"Do you really want to delete the selected columns?","deletetable.confirm":"Do you really want to delete the table?","Table":"Table","button.createtable.tooltip":"Insert Table","button.addcolleft.tooltip":"Add Column left","button.addcolright.tooltip":"Add Column right","button.delcols.tooltip":"Delete Columns","button.addrowbefore.tooltip":"Add Row before","button.addrowafter.tooltip":"Add Row after","button.delrows.tooltip":"Delete Rows","button.caption.tooltip":"Table caption","empty.caption":"Table caption","button.removeFormat.tooltip":"Remove formatting","button.removeFormat.text":"Remove formatting","button.rowheader.tooltip":"Format row as table header","button.columnheader.tooltip":"Format column as table header","button.mergecells.tooltip":"Merge Cells","button.splitcells.tooltip":"Split Cells","table.label.target":"Summary","table.sidebar.title":"Table","table.mergeCells.notRectangular":"Only a rectangular selection can be merged","table.addColumns.nonConsecutive":"Please select a single column or a consecutive range of columns",
|
3
|
+
"table.createTable.nestedTablesNoSupported":"Sorry, nested tables are not supported"},
|
4
|
+
"de":true,
|
5
|
+
"eo":true,
|
6
|
+
"fi":true,
|
7
|
+
"fr":true,
|
8
|
+
"it":true,
|
9
|
+
"pl":true,
|
10
|
+
"ru":true
|
11
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
define({"floatingmenu.tab.table":"Tabella","deleterows.confirm":"Vuoi davvero eliminare le righe selezionate?","deletecolumns.confirm":"Vuoi davvero eliminare le colonne selezionate?","deletetable.confirm":"Vuoi davvero eliminare la tabella?","Table":"Tabella","button.createtable.tooltip":"Crea una nuova tabella","button.addcolleft.tooltip":"Aggiungi una colonna a sinistra","button.addcolright.tooltip":"Aggiungi una colonna a destra","button.delcols.tooltip":"Elimina colonne","button.addrowbefore.tooltip":"Aggiungi una riga prima","button.addrowafter.tooltip":"Aggiungi una riga dopo","button.delrows.tooltip":"Elimina righe"});
|
@@ -0,0 +1 @@
|
|
1
|
+
define({"floatingmenu.tab.table":"Tabela","deleterows.confirm":"Czy na pewno chcesz usun\u0105\u0107 zaznaczone wiersze?","deletecolumns.confirm":"Czy na pewno chcesz usun\u0105\u0107 zaznaczone kolumny?","deletetable.confirm":"Czy na pewno chcesz usun\u0105\u0107 tabel\u0119?","Table":"Tabela","button.createtable.tooltip":"Wstaw tabel\u0119","button.addcolleft.tooltip":"Dodaj kolumn\u0119 na lewo","button.addcolright.tooltip":"Dodaj kolumn\u0119 na prawo","button.delcols.tooltip":"Usu\u0144 kolumny","button.addrowbefore.tooltip":"Dodaj wiersz przed","button.addrowafter.tooltip":"Dodaj wiersz po","button.delrows.tooltip":"Usu\u0144 wiersze"});
|
@@ -0,0 +1 @@
|
|
1
|
+
define({"floatingmenu.tab.table":"\u0422\u0430\u0431\u043b\u0438\u0446\u0430","deleterows.confirm":"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438?","deletecolumns.confirm":"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u043e\u043d\u043a\u0438?","deletetable.confirm":"\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443?","Table":"\u0422\u0430\u0431\u043b\u0438\u0446\u0430","button.createtable.tooltip":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0422\u0430\u0431\u043b\u0438\u0446\u0443","button.addcolleft.tooltip":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u043e\u043d\u043a\u0443 \u0441\u043b\u0435\u0432\u0430","button.addcolright.tooltip":"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043b\u043e\u043d\u043a\u0443 \u0441\u043f\u0440\u0430\u0432\u0430","button.delcols.tooltip":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u041a\u043e\u043b\u043e\u043d\u043a\u0438","button.addrowbefore.tooltip":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u0435\u0440\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443","button.addrowafter.tooltip":"\u0423\u0434\u0430\u043b\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443","button.delrows.tooltip":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0421\u0442\u0440\u043e\u043a\u0438"});
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
body {
|
2
|
+
font-family: sans-serif;
|
3
|
+
}
|
4
|
+
|
5
|
+
body {
|
6
|
+
background-color: #ccc;
|
7
|
+
}
|
8
|
+
|
9
|
+
#bodyContent {
|
10
|
+
font-size:0.9em;
|
11
|
+
}
|
12
|
+
|
13
|
+
h1, h2, h3, h4, h5, h6 {
|
14
|
+
font-family: sans-serif;
|
15
|
+
padding-bottom:0.1em;
|
16
|
+
padding-top:0.5em;
|
17
|
+
}
|
18
|
+
h1 {
|
19
|
+
border-bottom:1px solid #AAAAAA;
|
20
|
+
}
|
21
|
+
|
22
|
+
h1 { font-size: 188%; }
|
23
|
+
h2 { font-size: 150%; }
|
24
|
+
h3 { font-size: 132%; }
|
25
|
+
h4 { font-size: 116%; }
|
26
|
+
h5 { font-size: 100%; }
|
27
|
+
h6 { font-size: 80%; }
|
28
|
+
|
29
|
+
#main {
|
30
|
+
width: 650px;
|
31
|
+
margin-top: 40px;
|
32
|
+
margin-left: auto ;
|
33
|
+
margin-right: auto ;
|
34
|
+
padding: 70px;
|
35
|
+
background-color: white;
|
36
|
+
border-radius: 1px;
|
37
|
+
-moz-border-radius: 1px;
|
38
|
+
box-shadow: 5px 5px rgba(0,0,0,0.3);
|
39
|
+
-webkit-box-shadow: 5px 5px rgba(0,0,0,0.3);
|
40
|
+
-moz-box-shadow: 5px 5px rgba(0,0,0,0.3);
|
41
|
+
}
|
42
|
+
|
43
|
+
.GENTICS_link_error {
|
44
|
+
color: red;
|
45
|
+
}
|
46
|
+
|
47
|
+
.GENTICS_link_warn {
|
48
|
+
color: orange;
|
49
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
+
<title>Aloha, link checker!</title>
|
6
|
+
|
7
|
+
<base href="../../../">
|
8
|
+
|
9
|
+
<script src="dep/jquery-1.5.1.js" ></script>
|
10
|
+
<script src="aloha.js" id="aloha-script-include" data-plugins="format,table,list,highlighteditables,link,undo"></script>
|
11
|
+
<link href="aloha.css" id="aloha-style-include" rel="stylesheet">
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="demo/world/index.css" type="text/css">
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="AlohaLinkChecker.css" />
|
16
|
+
|
17
|
+
<!-- turn an element into editable Aloha continuous text -->
|
18
|
+
<script type="text/javascript">
|
19
|
+
GENTICS.Aloha.settings = {
|
20
|
+
logLevels: {'error': true, 'warn': true, 'info': true, 'debug': false},
|
21
|
+
errorhandling : false,
|
22
|
+
ribbon: false,
|
23
|
+
"i18n": {
|
24
|
+
// let the system detect the users language
|
25
|
+
//"acceptLanguage": '<?=$_SERVER['HTTP_ACCEPT_LANGUAGE']?>'
|
26
|
+
"acceptLanguage": 'de-de,de;q=0.8,it;q=0.6,en-us;q=0.7,en;q=0.2'
|
27
|
+
},
|
28
|
+
"plugins": {
|
29
|
+
"com.gentics.aloha.plugins.LinkChecker": {
|
30
|
+
'config': ['a'],
|
31
|
+
// use a proxy when you call it through a webserver
|
32
|
+
// 'proxyUrl': 'http://localhost:8888/Sites/Aloha-Editor/WebContent/plugins/com.gentics.aloha.plugins.LinkChecker/proxy.php?url='
|
33
|
+
}
|
34
|
+
}
|
35
|
+
};
|
36
|
+
|
37
|
+
$(document).ready(function() {
|
38
|
+
$('#content').aloha();
|
39
|
+
});
|
40
|
+
</script>
|
41
|
+
<style type="text/css">
|
42
|
+
|
43
|
+
.GENTICS_link_error {
|
44
|
+
color: red;
|
45
|
+
}
|
46
|
+
|
47
|
+
.GENTICS_link_warn {
|
48
|
+
color: red;
|
49
|
+
}
|
50
|
+
</style>
|
51
|
+
</head>
|
52
|
+
<body>
|
53
|
+
<div id="main">
|
54
|
+
<div id="bodyContent">
|
55
|
+
<div id="content" class="article">
|
56
|
+
<h1>Aloha</h1>
|
57
|
+
<h2>Etymology</h2>
|
58
|
+
<p>The word <a href="http://en.wikipedia.org/wiki/Aloha" target="_blank" class="external">aloha</a> derives from the Proto-Polynesian root <i>*qalofa</i>. It has cognates in other Polynesian languages, such as Samoan alofa
|
59
|
+
and Māori aroha, also meaning "love."</p>
|
60
|
+
<p><a href="http://aloha-editor.com/invalid">invalid Aloha Editor</a> is the word's most advanced browser based Editor made with aloha passion.</p>
|
61
|
+
<p>A folk etymology claims that it derives from a compound of the <a href="http://en.wikipedia.org/wiki/Hawaii" target="_blank" class="external">Hawaiian</a> words alo meaning "presence", "front", "face", or "share"; and
|
62
|
+
ha, meaning "breath of life" or "essence of life." Although alo does indeed mean "presence" etc., the word for breath is spelled with a macron
|
63
|
+
or kahakō over the a (hā) whereas the word aloha does not have a long a.</p>
|
64
|
+
<p>Links are the web's <a title="Aloha Editor rocks." href="http://rocket-power.org/not-working">Rocket Power</a>.</p>
|
65
|
+
<h2>Usage</h2>
|
66
|
+
<p>Before contact with the West, the words used for greeting were welina and anoai. Today, "aloha kakahiaka" is the phrase for "good
|
67
|
+
morning." "Aloha ʻauinalā" means "good afternoon" and "aloha ahiahi" means "good evening." "Aloha kākou" is a common form of "welcome to all."</p>
|
68
|
+
<p>In modern Hawaiʻi, numerous businesses have aloha in their names, with more than 3 pages of listings in the Oʻahu phone book alone.</p>
|
69
|
+
<h2>Trends</h2>
|
70
|
+
<p>Recent trends are popularizing the term elsewhere in the United States. Popular entertainer, Broadway star and Hollywood actress Bette
|
71
|
+
Midler, born in Honolulu, uses the greeting frequently in national appearances. The word was also used frequently in the hit television drama
|
72
|
+
Hawaii Five-O. In the influential 1982 film comedy Fast Times at Ridgemont High, the eccentric teacher Mr. Hand makes use of the greeting. The
|
73
|
+
Aloha Spirit is a major concept in Lilo and Stitch, a very popular Disney series of movies and TV shows, set in Hawaiʻi. The drama series Lost,
|
74
|
+
shot in Hawaiʻi, has a thank you note at the end of the credits saying "We thank the people of Hawaiʻi and their Aloha Spirit". Aloha is a term
|
75
|
+
also used in the Nickelodeon program Rocket Power.</p>
|
76
|
+
<ul>
|
77
|
+
<li>Arguably the most famous historical Hawaiian song, "Aloha ʻOe" was written by the last queen of Hawaii, Liliʻuokalani.</li>
|
78
|
+
<li>The term inspired the name of the ALOHA Protocol introduced in the 1970s by the University of Hawaii.</li>
|
79
|
+
<li>In Hawaii someone can be said to have or show aloha in the way they treat others; whether family, friend, neighbor or stranger.</li>
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
</body>
|
85
|
+
</html>
|
@@ -0,0 +1,134 @@
|
|
1
|
+
/*!
|
2
|
+
* Aloha Editor
|
3
|
+
* Author & Copyright (c) 2010 Gentics Software GmbH
|
4
|
+
* aloha-sales@gentics.com
|
5
|
+
* Licensed unter the terms of http://www.aloha-editor.com/license.html
|
6
|
+
*/
|
7
|
+
|
8
|
+
define(
|
9
|
+
['aloha', 'aloha/jquery', 'aloha/plugin', 'undo/vendor/undo', 'undo/vendor/diff_match_patch_uncompressed'],
|
10
|
+
function( Aloha, jQuery, Plugin) {
|
11
|
+
|
12
|
+
var
|
13
|
+
dmp = new diff_match_patch,
|
14
|
+
resetFlag = false;
|
15
|
+
|
16
|
+
function reversePatch(patch) {
|
17
|
+
var reversed = dmp.patch_deepCopy(patch);
|
18
|
+
for (var i = 0; i < reversed.length; i++) {
|
19
|
+
for (var j = 0; j < reversed[i].diffs.length; j++) {
|
20
|
+
reversed[i].diffs[j][0] = -(reversed[i].diffs[j][0]);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
return reversed;
|
24
|
+
}
|
25
|
+
|
26
|
+
/**
|
27
|
+
* register the plugin with unique name
|
28
|
+
*/
|
29
|
+
return Plugin.create('undo', {
|
30
|
+
/**
|
31
|
+
* Initialize the plugin and set initialize flag on true
|
32
|
+
*/
|
33
|
+
init: function () {
|
34
|
+
var stack = new Undo.Stack(),
|
35
|
+
EditCommand = Undo.Command.extend({
|
36
|
+
constructor: function(editable, patch) {
|
37
|
+
this.editable = editable;
|
38
|
+
this.patch = patch;
|
39
|
+
},
|
40
|
+
execute: function() {
|
41
|
+
//command object is created after execution.
|
42
|
+
},
|
43
|
+
undo: function() {
|
44
|
+
this.phase(reversePatch(this.patch));
|
45
|
+
},
|
46
|
+
redo: function() {
|
47
|
+
this.phase(this.patch);
|
48
|
+
},
|
49
|
+
phase: function(patch) {
|
50
|
+
var contents = this.editable.getContents(),
|
51
|
+
applied = dmp.patch_apply(patch, contents),
|
52
|
+
newValue = applied[0],
|
53
|
+
didNotApply = applied[1];
|
54
|
+
if (didNotApply.length) {
|
55
|
+
//error
|
56
|
+
}
|
57
|
+
this.reset(newValue);
|
58
|
+
},
|
59
|
+
reset: function(val) {
|
60
|
+
//we have to trigger a smartContentChange event
|
61
|
+
//after doing an undo or redo, but we mustn't
|
62
|
+
//push new commands on the stack, because there
|
63
|
+
//are no new commands, just the old commands on
|
64
|
+
//the stack that are undone or redone.
|
65
|
+
resetFlag = true;
|
66
|
+
|
67
|
+
var reactivate = null;
|
68
|
+
if (Aloha.getActiveEditable() === this.editable) {
|
69
|
+
Aloha.deactivateEditable();
|
70
|
+
reactivate = this.editable;
|
71
|
+
}
|
72
|
+
|
73
|
+
this.editable.obj.html(val);
|
74
|
+
|
75
|
+
if (null !== reactivate) {
|
76
|
+
reactivate.activate();
|
77
|
+
}
|
78
|
+
|
79
|
+
//TODO: this is a call to an internal
|
80
|
+
//function. There should be an API to generate
|
81
|
+
//new smartContentChangeEvents.
|
82
|
+
this.editable.smartContentChange({type : 'blur'});
|
83
|
+
|
84
|
+
resetFlag = false;
|
85
|
+
}
|
86
|
+
});
|
87
|
+
|
88
|
+
stack.changed = function() {
|
89
|
+
// update UI
|
90
|
+
};
|
91
|
+
|
92
|
+
jQuery(document).keydown(function(event) {
|
93
|
+
if (!event.metaKey || event.keyCode != 90) {
|
94
|
+
return;
|
95
|
+
}
|
96
|
+
event.preventDefault();
|
97
|
+
|
98
|
+
//Before doing an undo, bring the smartContentChange
|
99
|
+
//event up to date.
|
100
|
+
if ( null !== Aloha.getActiveEditable() ) {
|
101
|
+
Aloha.getActiveEditable().smartContentChange({type : 'blur'});
|
102
|
+
}
|
103
|
+
|
104
|
+
if (event.shiftKey) {
|
105
|
+
stack.canRedo() && stack.redo();
|
106
|
+
} else {
|
107
|
+
stack.canUndo() && stack.undo();
|
108
|
+
}
|
109
|
+
});
|
110
|
+
|
111
|
+
Aloha.bind('aloha-smart-content-changed', function(jevent, aevent) {
|
112
|
+
if (resetFlag) {
|
113
|
+
return;
|
114
|
+
}
|
115
|
+
var oldValue = aevent.snapshotContent,
|
116
|
+
newValue = aevent.editable.getContents(),
|
117
|
+
patch = dmp.patch_make(oldValue, newValue);
|
118
|
+
// only push an EditCommand if something actually changed.
|
119
|
+
if (0 !== patch.length) {
|
120
|
+
stack.execute( new EditCommand( aevent.editable, patch ) );
|
121
|
+
}
|
122
|
+
});
|
123
|
+
},
|
124
|
+
|
125
|
+
/**
|
126
|
+
* toString method
|
127
|
+
* @return string
|
128
|
+
*/
|
129
|
+
toString: function () {
|
130
|
+
return 'undo';
|
131
|
+
}
|
132
|
+
|
133
|
+
});
|
134
|
+
});
|
data/vendor/assets/javascripts/aloha/plugins/common/undo/vendor/diff_match_patch_uncompressed.js
ADDED
@@ -0,0 +1,2155 @@
|
|
1
|
+
/**
|
2
|
+
* Diff Match and Patch
|
3
|
+
*
|
4
|
+
* Copyright 2006 Google Inc.
|
5
|
+
* http://code.google.com/p/google-diff-match-patch/
|
6
|
+
*
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
10
|
+
*
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
18
|
+
*/
|
19
|
+
|
20
|
+
/**
|
21
|
+
* @fileoverview Computes the difference between two texts to create a patch.
|
22
|
+
* Applies the patch onto another text, allowing for errors.
|
23
|
+
* @author fraser@google.com (Neil Fraser)
|
24
|
+
*/
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Class containing the diff, match and patch methods.
|
28
|
+
* @constructor
|
29
|
+
*/
|
30
|
+
function diff_match_patch() {
|
31
|
+
|
32
|
+
// Defaults.
|
33
|
+
// Redefine these in your program to override the defaults.
|
34
|
+
|
35
|
+
// Number of seconds to map a diff before giving up (0 for infinity).
|
36
|
+
this.Diff_Timeout = 1.0;
|
37
|
+
// Cost of an empty edit operation in terms of edit characters.
|
38
|
+
this.Diff_EditCost = 4;
|
39
|
+
// At what point is no match declared (0.0 = perfection, 1.0 = very loose).
|
40
|
+
this.Match_Threshold = 0.5;
|
41
|
+
// How far to search for a match (0 = exact location, 1000+ = broad match).
|
42
|
+
// A match this many characters away from the expected location will add
|
43
|
+
// 1.0 to the score (0.0 is a perfect match).
|
44
|
+
this.Match_Distance = 1000;
|
45
|
+
// When deleting a large block of text (over ~64 characters), how close does
|
46
|
+
// the contents have to match the expected contents. (0.0 = perfection,
|
47
|
+
// 1.0 = very loose). Note that Match_Threshold controls how closely the
|
48
|
+
// end points of a delete need to match.
|
49
|
+
this.Patch_DeleteThreshold = 0.5;
|
50
|
+
// Chunk size for context length.
|
51
|
+
this.Patch_Margin = 4;
|
52
|
+
|
53
|
+
// The number of bits in an int.
|
54
|
+
this.Match_MaxBits = 32;
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
// DIFF FUNCTIONS
|
59
|
+
|
60
|
+
|
61
|
+
/**
|
62
|
+
* The data structure representing a diff is an array of tuples:
|
63
|
+
* [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]
|
64
|
+
* which means: delete 'Hello', add 'Goodbye' and keep ' world.'
|
65
|
+
*/
|
66
|
+
var DIFF_DELETE = -1;
|
67
|
+
var DIFF_INSERT = 1;
|
68
|
+
var DIFF_EQUAL = 0;
|
69
|
+
|
70
|
+
/** @typedef {!Array.<number|string>} */
|
71
|
+
diff_match_patch.Diff;
|
72
|
+
|
73
|
+
|
74
|
+
/**
|
75
|
+
* Find the differences between two texts. Simplifies the problem by stripping
|
76
|
+
* any common prefix or suffix off the texts before diffing.
|
77
|
+
* @param {string} text1 Old string to be diffed.
|
78
|
+
* @param {string} text2 New string to be diffed.
|
79
|
+
* @param {boolean=} opt_checklines Optional speedup flag. If present and false,
|
80
|
+
* then don't run a line-level diff first to identify the changed areas.
|
81
|
+
* Defaults to true, which does a faster, slightly less optimal diff.
|
82
|
+
* @param {number} opt_deadline Optional time when the diff should be complete
|
83
|
+
* by. Used internally for recursive calls. Users should set DiffTimeout
|
84
|
+
* instead.
|
85
|
+
* @return {!Array.<!diff_match_patch.Diff>} Array of diff tuples.
|
86
|
+
*/
|
87
|
+
diff_match_patch.prototype.diff_main = function(text1, text2, opt_checklines,
|
88
|
+
opt_deadline) {
|
89
|
+
// Set a deadline by which time the diff must be complete.
|
90
|
+
if (typeof opt_deadline == 'undefined') {
|
91
|
+
if (this.Diff_Timeout <= 0) {
|
92
|
+
opt_deadline = Number.MAX_VALUE;
|
93
|
+
} else {
|
94
|
+
opt_deadline = (new Date).getTime() + this.Diff_Timeout * 1000;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
var deadline = opt_deadline;
|
98
|
+
|
99
|
+
// Check for null inputs.
|
100
|
+
if (text1 == null || text2 == null) {
|
101
|
+
throw new Error('Null input. (diff_main)');
|
102
|
+
}
|
103
|
+
|
104
|
+
// Check for equality (speedup).
|
105
|
+
if (text1 == text2) {
|
106
|
+
if (text1) {
|
107
|
+
return [[DIFF_EQUAL, text1]];
|
108
|
+
}
|
109
|
+
return [];
|
110
|
+
}
|
111
|
+
|
112
|
+
if (typeof opt_checklines == 'undefined') {
|
113
|
+
opt_checklines = true;
|
114
|
+
}
|
115
|
+
var checklines = opt_checklines;
|
116
|
+
|
117
|
+
// Trim off common prefix (speedup).
|
118
|
+
var commonlength = this.diff_commonPrefix(text1, text2);
|
119
|
+
var commonprefix = text1.substring(0, commonlength);
|
120
|
+
text1 = text1.substring(commonlength);
|
121
|
+
text2 = text2.substring(commonlength);
|
122
|
+
|
123
|
+
// Trim off common suffix (speedup).
|
124
|
+
commonlength = this.diff_commonSuffix(text1, text2);
|
125
|
+
var commonsuffix = text1.substring(text1.length - commonlength);
|
126
|
+
text1 = text1.substring(0, text1.length - commonlength);
|
127
|
+
text2 = text2.substring(0, text2.length - commonlength);
|
128
|
+
|
129
|
+
// Compute the diff on the middle block.
|
130
|
+
var diffs = this.diff_compute_(text1, text2, checklines, deadline);
|
131
|
+
|
132
|
+
// Restore the prefix and suffix.
|
133
|
+
if (commonprefix) {
|
134
|
+
diffs.unshift([DIFF_EQUAL, commonprefix]);
|
135
|
+
}
|
136
|
+
if (commonsuffix) {
|
137
|
+
diffs.push([DIFF_EQUAL, commonsuffix]);
|
138
|
+
}
|
139
|
+
this.diff_cleanupMerge(diffs);
|
140
|
+
return diffs;
|
141
|
+
};
|
142
|
+
|
143
|
+
|
144
|
+
/**
|
145
|
+
* Find the differences between two texts. Assumes that the texts do not
|
146
|
+
* have any common prefix or suffix.
|
147
|
+
* @param {string} text1 Old string to be diffed.
|
148
|
+
* @param {string} text2 New string to be diffed.
|
149
|
+
* @param {boolean} checklines Speedup flag. If false, then don't run a
|
150
|
+
* line-level diff first to identify the changed areas.
|
151
|
+
* If true, then run a faster, slightly less optimal diff.
|
152
|
+
* @param {number} deadline Time when the diff should be complete by.
|
153
|
+
* @return {!Array.<!diff_match_patch.Diff>} Array of diff tuples.
|
154
|
+
* @private
|
155
|
+
*/
|
156
|
+
diff_match_patch.prototype.diff_compute_ = function(text1, text2, checklines,
|
157
|
+
deadline) {
|
158
|
+
var diffs;
|
159
|
+
|
160
|
+
if (!text1) {
|
161
|
+
// Just add some text (speedup).
|
162
|
+
return [[DIFF_INSERT, text2]];
|
163
|
+
}
|
164
|
+
|
165
|
+
if (!text2) {
|
166
|
+
// Just delete some text (speedup).
|
167
|
+
return [[DIFF_DELETE, text1]];
|
168
|
+
}
|
169
|
+
|
170
|
+
var longtext = text1.length > text2.length ? text1 : text2;
|
171
|
+
var shorttext = text1.length > text2.length ? text2 : text1;
|
172
|
+
var i = longtext.indexOf(shorttext);
|
173
|
+
if (i != -1) {
|
174
|
+
// Shorter text is inside the longer text (speedup).
|
175
|
+
diffs = [[DIFF_INSERT, longtext.substring(0, i)],
|
176
|
+
[DIFF_EQUAL, shorttext],
|
177
|
+
[DIFF_INSERT, longtext.substring(i + shorttext.length)]];
|
178
|
+
// Swap insertions for deletions if diff is reversed.
|
179
|
+
if (text1.length > text2.length) {
|
180
|
+
diffs[0][0] = diffs[2][0] = DIFF_DELETE;
|
181
|
+
}
|
182
|
+
return diffs;
|
183
|
+
}
|
184
|
+
|
185
|
+
if (shorttext.length == 1) {
|
186
|
+
// Single character string.
|
187
|
+
// After the previous speedup, the character can't be an equality.
|
188
|
+
return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];
|
189
|
+
}
|
190
|
+
longtext = shorttext = null; // Garbage collect.
|
191
|
+
|
192
|
+
// Check to see if the problem can be split in two.
|
193
|
+
var hm = this.diff_halfMatch_(text1, text2);
|
194
|
+
if (hm) {
|
195
|
+
// A half-match was found, sort out the return data.
|
196
|
+
var text1_a = hm[0];
|
197
|
+
var text1_b = hm[1];
|
198
|
+
var text2_a = hm[2];
|
199
|
+
var text2_b = hm[3];
|
200
|
+
var mid_common = hm[4];
|
201
|
+
// Send both pairs off for separate processing.
|
202
|
+
var diffs_a = this.diff_main(text1_a, text2_a, checklines, deadline);
|
203
|
+
var diffs_b = this.diff_main(text1_b, text2_b, checklines, deadline);
|
204
|
+
// Merge the results.
|
205
|
+
return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);
|
206
|
+
}
|
207
|
+
|
208
|
+
if (checklines && text1.length > 100 && text2.length > 100) {
|
209
|
+
return this.diff_lineMode_(text1, text2, deadline);
|
210
|
+
}
|
211
|
+
|
212
|
+
return this.diff_bisect_(text1, text2, deadline);
|
213
|
+
};
|
214
|
+
|
215
|
+
|
216
|
+
/**
|
217
|
+
* Do a quick line-level diff on both strings, then rediff the parts for
|
218
|
+
* greater accuracy.
|
219
|
+
* This speedup can produce non-minimal diffs.
|
220
|
+
* @param {string} text1 Old string to be diffed.
|
221
|
+
* @param {string} text2 New string to be diffed.
|
222
|
+
* @param {number} deadline Time when the diff should be complete by.
|
223
|
+
* @return {!Array.<!diff_match_patch.Diff>} Array of diff tuples.
|
224
|
+
* @private
|
225
|
+
*/
|
226
|
+
diff_match_patch.prototype.diff_lineMode_ = function(text1, text2, deadline) {
|
227
|
+
// Scan the text on a line-by-line basis first.
|
228
|
+
var a = this.diff_linesToChars_(text1, text2);
|
229
|
+
text1 = /** @type {string} */(a[0]);
|
230
|
+
text2 = /** @type {string} */(a[1]);
|
231
|
+
var linearray = /** @type {!Array.<string>} */(a[2]);
|
232
|
+
|
233
|
+
var diffs = this.diff_bisect_(text1, text2, deadline);
|
234
|
+
|
235
|
+
// Convert the diff back to original text.
|
236
|
+
this.diff_charsToLines_(diffs, linearray);
|
237
|
+
// Eliminate freak matches (e.g. blank lines)
|
238
|
+
this.diff_cleanupSemantic(diffs);
|
239
|
+
|
240
|
+
// Rediff any replacement blocks, this time character-by-character.
|
241
|
+
// Add a dummy entry at the end.
|
242
|
+
diffs.push([DIFF_EQUAL, '']);
|
243
|
+
var pointer = 0;
|
244
|
+
var count_delete = 0;
|
245
|
+
var count_insert = 0;
|
246
|
+
var text_delete = '';
|
247
|
+
var text_insert = '';
|
248
|
+
while (pointer < diffs.length) {
|
249
|
+
switch (diffs[pointer][0]) {
|
250
|
+
case DIFF_INSERT:
|
251
|
+
count_insert++;
|
252
|
+
text_insert += diffs[pointer][1];
|
253
|
+
break;
|
254
|
+
case DIFF_DELETE:
|
255
|
+
count_delete++;
|
256
|
+
text_delete += diffs[pointer][1];
|
257
|
+
break;
|
258
|
+
case DIFF_EQUAL:
|
259
|
+
// Upon reaching an equality, check for prior redundancies.
|
260
|
+
if (count_delete >= 1 && count_insert >= 1) {
|
261
|
+
// Delete the offending records and add the merged ones.
|
262
|
+
var a = this.diff_main(text_delete, text_insert, false, deadline);
|
263
|
+
diffs.splice(pointer - count_delete - count_insert,
|
264
|
+
count_delete + count_insert);
|
265
|
+
pointer = pointer - count_delete - count_insert;
|
266
|
+
for (var j = a.length - 1; j >= 0; j--) {
|
267
|
+
diffs.splice(pointer, 0, a[j]);
|
268
|
+
}
|
269
|
+
pointer = pointer + a.length;
|
270
|
+
}
|
271
|
+
count_insert = 0;
|
272
|
+
count_delete = 0;
|
273
|
+
text_delete = '';
|
274
|
+
text_insert = '';
|
275
|
+
break;
|
276
|
+
}
|
277
|
+
pointer++;
|
278
|
+
}
|
279
|
+
diffs.pop(); // Remove the dummy entry at the end.
|
280
|
+
|
281
|
+
return diffs;
|
282
|
+
};
|
283
|
+
|
284
|
+
|
285
|
+
/**
|
286
|
+
* Find the 'middle snake' of a diff, split the problem in two
|
287
|
+
* and return the recursively constructed diff.
|
288
|
+
* See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.
|
289
|
+
* @param {string} text1 Old string to be diffed.
|
290
|
+
* @param {string} text2 New string to be diffed.
|
291
|
+
* @param {number} deadline Time at which to bail if not yet complete.
|
292
|
+
* @return {!Array.<!diff_match_patch.Diff>} Array of diff tuples.
|
293
|
+
* @private
|
294
|
+
*/
|
295
|
+
diff_match_patch.prototype.diff_bisect_ = function(text1, text2, deadline) {
|
296
|
+
// Cache the text lengths to prevent multiple calls.
|
297
|
+
var text1_length = text1.length;
|
298
|
+
var text2_length = text2.length;
|
299
|
+
var max_d = Math.ceil((text1_length + text2_length) / 2);
|
300
|
+
var v_offset = max_d;
|
301
|
+
var v_length = 2 * max_d;
|
302
|
+
var v1 = new Array(v_length);
|
303
|
+
var v2 = new Array(v_length);
|
304
|
+
// Setting all elements to -1 is faster in Chrome & Firefox than mixing
|
305
|
+
// integers and undefined.
|
306
|
+
for (var x = 0; x < v_length; x++) {
|
307
|
+
v1[x] = -1;
|
308
|
+
v2[x] = -1;
|
309
|
+
}
|
310
|
+
v1[v_offset + 1] = 0;
|
311
|
+
v2[v_offset + 1] = 0;
|
312
|
+
var delta = text1_length - text2_length;
|
313
|
+
// If the total number of characters is odd, then the front path will collide
|
314
|
+
// with the reverse path.
|
315
|
+
var front = (delta % 2 != 0);
|
316
|
+
// Offsets for start and end of k loop.
|
317
|
+
// Prevents mapping of space beyond the grid.
|
318
|
+
var k1start = 0;
|
319
|
+
var k1end = 0;
|
320
|
+
var k2start = 0;
|
321
|
+
var k2end = 0;
|
322
|
+
for (var d = 0; d < max_d; d++) {
|
323
|
+
// Bail out if deadline is reached.
|
324
|
+
if ((new Date()).getTime() > deadline) {
|
325
|
+
break;
|
326
|
+
}
|
327
|
+
|
328
|
+
// Walk the front path one step.
|
329
|
+
for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {
|
330
|
+
var k1_offset = v_offset + k1;
|
331
|
+
var x1;
|
332
|
+
if (k1 == -d || k1 != d && v1[k1_offset - 1] < v1[k1_offset + 1]) {
|
333
|
+
x1 = v1[k1_offset + 1];
|
334
|
+
} else {
|
335
|
+
x1 = v1[k1_offset - 1] + 1;
|
336
|
+
}
|
337
|
+
var y1 = x1 - k1;
|
338
|
+
while (x1 < text1_length && y1 < text2_length &&
|
339
|
+
text1.charAt(x1) == text2.charAt(y1)) {
|
340
|
+
x1++;
|
341
|
+
y1++;
|
342
|
+
}
|
343
|
+
v1[k1_offset] = x1;
|
344
|
+
if (x1 > text1_length) {
|
345
|
+
// Ran off the right of the graph.
|
346
|
+
k1end += 2;
|
347
|
+
} else if (y1 > text2_length) {
|
348
|
+
// Ran off the bottom of the graph.
|
349
|
+
k1start += 2;
|
350
|
+
} else if (front) {
|
351
|
+
var k2_offset = v_offset + delta - k1;
|
352
|
+
if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] != -1) {
|
353
|
+
// Mirror x2 onto top-left coordinate system.
|
354
|
+
var x2 = text1_length - v2[k2_offset];
|
355
|
+
if (x1 >= x2) {
|
356
|
+
// Overlap detected.
|
357
|
+
return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);
|
358
|
+
}
|
359
|
+
}
|
360
|
+
}
|
361
|
+
}
|
362
|
+
|
363
|
+
// Walk the reverse path one step.
|
364
|
+
for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {
|
365
|
+
var k2_offset = v_offset + k2;
|
366
|
+
var x2;
|
367
|
+
if (k2 == -d || k2 != d && v2[k2_offset - 1] < v2[k2_offset + 1]) {
|
368
|
+
x2 = v2[k2_offset + 1];
|
369
|
+
} else {
|
370
|
+
x2 = v2[k2_offset - 1] + 1;
|
371
|
+
}
|
372
|
+
var y2 = x2 - k2;
|
373
|
+
while (x2 < text1_length && y2 < text2_length &&
|
374
|
+
text1.charAt(text1_length - x2 - 1) ==
|
375
|
+
text2.charAt(text2_length - y2 - 1)) {
|
376
|
+
x2++;
|
377
|
+
y2++;
|
378
|
+
}
|
379
|
+
v2[k2_offset] = x2;
|
380
|
+
if (x2 > text1_length) {
|
381
|
+
// Ran off the left of the graph.
|
382
|
+
k2end += 2;
|
383
|
+
} else if (y2 > text2_length) {
|
384
|
+
// Ran off the top of the graph.
|
385
|
+
k2start += 2;
|
386
|
+
} else if (!front) {
|
387
|
+
var k1_offset = v_offset + delta - k2;
|
388
|
+
if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] != -1) {
|
389
|
+
var x1 = v1[k1_offset];
|
390
|
+
var y1 = v_offset + x1 - k1_offset;
|
391
|
+
// Mirror x2 onto top-left coordinate system.
|
392
|
+
x2 = text1_length - x2;
|
393
|
+
if (x1 >= x2) {
|
394
|
+
// Overlap detected.
|
395
|
+
return this.diff_bisectSplit_(text1, text2, x1, y1, deadline);
|
396
|
+
}
|
397
|
+
}
|
398
|
+
}
|
399
|
+
}
|
400
|
+
}
|
401
|
+
// Diff took too long and hit the deadline or
|
402
|
+
// number of diffs equals number of characters, no commonality at all.
|
403
|
+
return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];
|
404
|
+
};
|
405
|
+
|
406
|
+
|
407
|
+
/**
|
408
|
+
* Given the location of the 'middle snake', split the diff in two parts
|
409
|
+
* and recurse.
|
410
|
+
* @param {string} text1 Old string to be diffed.
|
411
|
+
* @param {string} text2 New string to be diffed.
|
412
|
+
* @param {number} x Index of split point in text1.
|
413
|
+
* @param {number} y Index of split point in text2.
|
414
|
+
* @param {number} deadline Time at which to bail if not yet complete.
|
415
|
+
* @return {!Array.<!diff_match_patch.Diff>} Array of diff tuples.
|
416
|
+
* @private
|
417
|
+
*/
|
418
|
+
diff_match_patch.prototype.diff_bisectSplit_ = function(text1, text2, x, y,
|
419
|
+
deadline) {
|
420
|
+
var text1a = text1.substring(0, x);
|
421
|
+
var text2a = text2.substring(0, y);
|
422
|
+
var text1b = text1.substring(x);
|
423
|
+
var text2b = text2.substring(y);
|
424
|
+
|
425
|
+
// Compute both diffs serially.
|
426
|
+
var diffs = this.diff_main(text1a, text2a, false, deadline);
|
427
|
+
var diffsb = this.diff_main(text1b, text2b, false, deadline);
|
428
|
+
|
429
|
+
return diffs.concat(diffsb);
|
430
|
+
};
|
431
|
+
|
432
|
+
|
433
|
+
/**
|
434
|
+
* Split two texts into an array of strings. Reduce the texts to a string of
|
435
|
+
* hashes where each Unicode character represents one line.
|
436
|
+
* @param {string} text1 First string.
|
437
|
+
* @param {string} text2 Second string.
|
438
|
+
* @return {!Array.<string|!Array.<string>>} Three element Array, containing the
|
439
|
+
* encoded text1, the encoded text2 and the array of unique strings. The
|
440
|
+
* zeroth element of the array of unique strings is intentionally blank.
|
441
|
+
* @private
|
442
|
+
*/
|
443
|
+
diff_match_patch.prototype.diff_linesToChars_ = function(text1, text2) {
|
444
|
+
var lineArray = []; // e.g. lineArray[4] == 'Hello\n'
|
445
|
+
var lineHash = {}; // e.g. lineHash['Hello\n'] == 4
|
446
|
+
|
447
|
+
// '\x00' is a valid character, but various debuggers don't like it.
|
448
|
+
// So we'll insert a junk entry to avoid generating a null character.
|
449
|
+
lineArray[0] = '';
|
450
|
+
|
451
|
+
/**
|
452
|
+
* Split a text into an array of strings. Reduce the texts to a string of
|
453
|
+
* hashes where each Unicode character represents one line.
|
454
|
+
* Modifies linearray and linehash through being a closure.
|
455
|
+
* @param {string} text String to encode.
|
456
|
+
* @return {string} Encoded string.
|
457
|
+
* @private
|
458
|
+
*/
|
459
|
+
function diff_linesToCharsMunge_(text) {
|
460
|
+
var chars = '';
|
461
|
+
// Walk the text, pulling out a substring for each line.
|
462
|
+
// text.split('\n') would would temporarily double our memory footprint.
|
463
|
+
// Modifying text would create many large strings to garbage collect.
|
464
|
+
var lineStart = 0;
|
465
|
+
var lineEnd = -1;
|
466
|
+
// Keeping our own length variable is faster than looking it up.
|
467
|
+
var lineArrayLength = lineArray.length;
|
468
|
+
while (lineEnd < text.length - 1) {
|
469
|
+
lineEnd = text.indexOf('\n', lineStart);
|
470
|
+
if (lineEnd == -1) {
|
471
|
+
lineEnd = text.length - 1;
|
472
|
+
}
|
473
|
+
var line = text.substring(lineStart, lineEnd + 1);
|
474
|
+
lineStart = lineEnd + 1;
|
475
|
+
|
476
|
+
if (lineHash.hasOwnProperty ? lineHash.hasOwnProperty(line) :
|
477
|
+
(lineHash[line] !== undefined)) {
|
478
|
+
chars += String.fromCharCode(lineHash[line]);
|
479
|
+
} else {
|
480
|
+
chars += String.fromCharCode(lineArrayLength);
|
481
|
+
lineHash[line] = lineArrayLength;
|
482
|
+
lineArray[lineArrayLength++] = line;
|
483
|
+
}
|
484
|
+
}
|
485
|
+
return chars;
|
486
|
+
}
|
487
|
+
|
488
|
+
var chars1 = diff_linesToCharsMunge_(text1);
|
489
|
+
var chars2 = diff_linesToCharsMunge_(text2);
|
490
|
+
return [chars1, chars2, lineArray];
|
491
|
+
};
|
492
|
+
|
493
|
+
|
494
|
+
/**
|
495
|
+
* Rehydrate the text in a diff from a string of line hashes to real lines of
|
496
|
+
* text.
|
497
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
498
|
+
* @param {!Array.<string>} lineArray Array of unique strings.
|
499
|
+
* @private
|
500
|
+
*/
|
501
|
+
diff_match_patch.prototype.diff_charsToLines_ = function(diffs, lineArray) {
|
502
|
+
for (var x = 0; x < diffs.length; x++) {
|
503
|
+
var chars = diffs[x][1];
|
504
|
+
var text = [];
|
505
|
+
for (var y = 0; y < chars.length; y++) {
|
506
|
+
text[y] = lineArray[chars.charCodeAt(y)];
|
507
|
+
}
|
508
|
+
diffs[x][1] = text.join('');
|
509
|
+
}
|
510
|
+
};
|
511
|
+
|
512
|
+
|
513
|
+
/**
|
514
|
+
* Determine the common prefix of two strings.
|
515
|
+
* @param {string} text1 First string.
|
516
|
+
* @param {string} text2 Second string.
|
517
|
+
* @return {number} The number of characters common to the start of each
|
518
|
+
* string.
|
519
|
+
*/
|
520
|
+
diff_match_patch.prototype.diff_commonPrefix = function(text1, text2) {
|
521
|
+
// Quick check for common null cases.
|
522
|
+
if (!text1 || !text2 || text1.charAt(0) != text2.charAt(0)) {
|
523
|
+
return 0;
|
524
|
+
}
|
525
|
+
// Binary search.
|
526
|
+
// Performance analysis: http://neil.fraser.name/news/2007/10/09/
|
527
|
+
var pointermin = 0;
|
528
|
+
var pointermax = Math.min(text1.length, text2.length);
|
529
|
+
var pointermid = pointermax;
|
530
|
+
var pointerstart = 0;
|
531
|
+
while (pointermin < pointermid) {
|
532
|
+
if (text1.substring(pointerstart, pointermid) ==
|
533
|
+
text2.substring(pointerstart, pointermid)) {
|
534
|
+
pointermin = pointermid;
|
535
|
+
pointerstart = pointermin;
|
536
|
+
} else {
|
537
|
+
pointermax = pointermid;
|
538
|
+
}
|
539
|
+
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
540
|
+
}
|
541
|
+
return pointermid;
|
542
|
+
};
|
543
|
+
|
544
|
+
|
545
|
+
/**
|
546
|
+
* Determine the common suffix of two strings.
|
547
|
+
* @param {string} text1 First string.
|
548
|
+
* @param {string} text2 Second string.
|
549
|
+
* @return {number} The number of characters common to the end of each string.
|
550
|
+
*/
|
551
|
+
diff_match_patch.prototype.diff_commonSuffix = function(text1, text2) {
|
552
|
+
// Quick check for common null cases.
|
553
|
+
if (!text1 || !text2 ||
|
554
|
+
text1.charAt(text1.length - 1) != text2.charAt(text2.length - 1)) {
|
555
|
+
return 0;
|
556
|
+
}
|
557
|
+
// Binary search.
|
558
|
+
// Performance analysis: http://neil.fraser.name/news/2007/10/09/
|
559
|
+
var pointermin = 0;
|
560
|
+
var pointermax = Math.min(text1.length, text2.length);
|
561
|
+
var pointermid = pointermax;
|
562
|
+
var pointerend = 0;
|
563
|
+
while (pointermin < pointermid) {
|
564
|
+
if (text1.substring(text1.length - pointermid, text1.length - pointerend) ==
|
565
|
+
text2.substring(text2.length - pointermid, text2.length - pointerend)) {
|
566
|
+
pointermin = pointermid;
|
567
|
+
pointerend = pointermin;
|
568
|
+
} else {
|
569
|
+
pointermax = pointermid;
|
570
|
+
}
|
571
|
+
pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);
|
572
|
+
}
|
573
|
+
return pointermid;
|
574
|
+
};
|
575
|
+
|
576
|
+
|
577
|
+
/**
|
578
|
+
* Determine if the suffix of one string is the prefix of another.
|
579
|
+
* @param {string} text1 First string.
|
580
|
+
* @param {string} text2 Second string.
|
581
|
+
* @return {number} The number of characters common to the end of the first
|
582
|
+
* string and the start of the second string.
|
583
|
+
* @private
|
584
|
+
*/
|
585
|
+
diff_match_patch.prototype.diff_commonOverlap_ = function(text1, text2) {
|
586
|
+
// Cache the text lengths to prevent multiple calls.
|
587
|
+
var text1_length = text1.length;
|
588
|
+
var text2_length = text2.length;
|
589
|
+
// Eliminate the null case.
|
590
|
+
if (text1_length == 0 || text2_length == 0) {
|
591
|
+
return 0;
|
592
|
+
}
|
593
|
+
// Truncate the longer string.
|
594
|
+
if (text1_length > text2_length) {
|
595
|
+
text1 = text1.substring(text1_length - text2_length);
|
596
|
+
} else if (text1_length < text2_length) {
|
597
|
+
text2 = text2.substring(0, text1_length);
|
598
|
+
}
|
599
|
+
var text_length = Math.min(text1_length, text2_length);
|
600
|
+
// Quick check for the worst case.
|
601
|
+
if (text1 == text2) {
|
602
|
+
return text_length;
|
603
|
+
}
|
604
|
+
|
605
|
+
// Start by looking for a single character match
|
606
|
+
// and increase length until no match is found.
|
607
|
+
// Performance analysis: http://neil.fraser.name/news/2010/11/04/
|
608
|
+
var best = 0;
|
609
|
+
var length = 1;
|
610
|
+
while (true) {
|
611
|
+
var pattern = text1.substring(text_length - length);
|
612
|
+
var found = text2.indexOf(pattern);
|
613
|
+
if (found == -1) {
|
614
|
+
return best;
|
615
|
+
}
|
616
|
+
length += found;
|
617
|
+
if (found == 0 || text1.substring(text_length - length) ==
|
618
|
+
text2.substring(0, length)) {
|
619
|
+
best = length;
|
620
|
+
length++;
|
621
|
+
}
|
622
|
+
}
|
623
|
+
};
|
624
|
+
|
625
|
+
|
626
|
+
/**
|
627
|
+
* Do the two texts share a substring which is at least half the length of the
|
628
|
+
* longer text?
|
629
|
+
* This speedup can produce non-minimal diffs.
|
630
|
+
* @param {string} text1 First string.
|
631
|
+
* @param {string} text2 Second string.
|
632
|
+
* @return {Array.<string>} Five element Array, containing the prefix of
|
633
|
+
* text1, the suffix of text1, the prefix of text2, the suffix of
|
634
|
+
* text2 and the common middle. Or null if there was no match.
|
635
|
+
* @private
|
636
|
+
*/
|
637
|
+
diff_match_patch.prototype.diff_halfMatch_ = function(text1, text2) {
|
638
|
+
if (this.Diff_Timeout <= 0) {
|
639
|
+
// Don't risk returning a non-optimal diff if we have unlimited time.
|
640
|
+
return null;
|
641
|
+
}
|
642
|
+
var longtext = text1.length > text2.length ? text1 : text2;
|
643
|
+
var shorttext = text1.length > text2.length ? text2 : text1;
|
644
|
+
if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {
|
645
|
+
return null; // Pointless.
|
646
|
+
}
|
647
|
+
var dmp = this; // 'this' becomes 'window' in a closure.
|
648
|
+
|
649
|
+
/**
|
650
|
+
* Does a substring of shorttext exist within longtext such that the substring
|
651
|
+
* is at least half the length of longtext?
|
652
|
+
* Closure, but does not reference any external variables.
|
653
|
+
* @param {string} longtext Longer string.
|
654
|
+
* @param {string} shorttext Shorter string.
|
655
|
+
* @param {number} i Start index of quarter length substring within longtext.
|
656
|
+
* @return {Array.<string>} Five element Array, containing the prefix of
|
657
|
+
* longtext, the suffix of longtext, the prefix of shorttext, the suffix
|
658
|
+
* of shorttext and the common middle. Or null if there was no match.
|
659
|
+
* @private
|
660
|
+
*/
|
661
|
+
function diff_halfMatchI_(longtext, shorttext, i) {
|
662
|
+
// Start with a 1/4 length substring at position i as a seed.
|
663
|
+
var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));
|
664
|
+
var j = -1;
|
665
|
+
var best_common = '';
|
666
|
+
var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;
|
667
|
+
while ((j = shorttext.indexOf(seed, j + 1)) != -1) {
|
668
|
+
var prefixLength = dmp.diff_commonPrefix(longtext.substring(i),
|
669
|
+
shorttext.substring(j));
|
670
|
+
var suffixLength = dmp.diff_commonSuffix(longtext.substring(0, i),
|
671
|
+
shorttext.substring(0, j));
|
672
|
+
if (best_common.length < suffixLength + prefixLength) {
|
673
|
+
best_common = shorttext.substring(j - suffixLength, j) +
|
674
|
+
shorttext.substring(j, j + prefixLength);
|
675
|
+
best_longtext_a = longtext.substring(0, i - suffixLength);
|
676
|
+
best_longtext_b = longtext.substring(i + prefixLength);
|
677
|
+
best_shorttext_a = shorttext.substring(0, j - suffixLength);
|
678
|
+
best_shorttext_b = shorttext.substring(j + prefixLength);
|
679
|
+
}
|
680
|
+
}
|
681
|
+
if (best_common.length * 2 >= longtext.length) {
|
682
|
+
return [best_longtext_a, best_longtext_b,
|
683
|
+
best_shorttext_a, best_shorttext_b, best_common];
|
684
|
+
} else {
|
685
|
+
return null;
|
686
|
+
}
|
687
|
+
}
|
688
|
+
|
689
|
+
// First check if the second quarter is the seed for a half-match.
|
690
|
+
var hm1 = diff_halfMatchI_(longtext, shorttext,
|
691
|
+
Math.ceil(longtext.length / 4));
|
692
|
+
// Check again based on the third quarter.
|
693
|
+
var hm2 = diff_halfMatchI_(longtext, shorttext,
|
694
|
+
Math.ceil(longtext.length / 2));
|
695
|
+
var hm;
|
696
|
+
if (!hm1 && !hm2) {
|
697
|
+
return null;
|
698
|
+
} else if (!hm2) {
|
699
|
+
hm = hm1;
|
700
|
+
} else if (!hm1) {
|
701
|
+
hm = hm2;
|
702
|
+
} else {
|
703
|
+
// Both matched. Select the longest.
|
704
|
+
hm = hm1[4].length > hm2[4].length ? hm1 : hm2;
|
705
|
+
}
|
706
|
+
|
707
|
+
// A half-match was found, sort out the return data.
|
708
|
+
var text1_a, text1_b, text2_a, text2_b;
|
709
|
+
if (text1.length > text2.length) {
|
710
|
+
text1_a = hm[0];
|
711
|
+
text1_b = hm[1];
|
712
|
+
text2_a = hm[2];
|
713
|
+
text2_b = hm[3];
|
714
|
+
} else {
|
715
|
+
text2_a = hm[0];
|
716
|
+
text2_b = hm[1];
|
717
|
+
text1_a = hm[2];
|
718
|
+
text1_b = hm[3];
|
719
|
+
}
|
720
|
+
var mid_common = hm[4];
|
721
|
+
return [text1_a, text1_b, text2_a, text2_b, mid_common];
|
722
|
+
};
|
723
|
+
|
724
|
+
|
725
|
+
/**
|
726
|
+
* Reduce the number of edits by eliminating semantically trivial equalities.
|
727
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
728
|
+
*/
|
729
|
+
diff_match_patch.prototype.diff_cleanupSemantic = function(diffs) {
|
730
|
+
var changes = false;
|
731
|
+
var equalities = []; // Stack of indices where equalities are found.
|
732
|
+
var equalitiesLength = 0; // Keeping our own length var is faster in JS.
|
733
|
+
/** @type {?string} */
|
734
|
+
var lastequality = null; // Always equal to equalities[equalitiesLength-1][1]
|
735
|
+
var pointer = 0; // Index of current position.
|
736
|
+
// Number of characters that changed prior to the equality.
|
737
|
+
var length_insertions1 = 0;
|
738
|
+
var length_deletions1 = 0;
|
739
|
+
// Number of characters that changed after the equality.
|
740
|
+
var length_insertions2 = 0;
|
741
|
+
var length_deletions2 = 0;
|
742
|
+
while (pointer < diffs.length) {
|
743
|
+
if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.
|
744
|
+
equalities[equalitiesLength++] = pointer;
|
745
|
+
length_insertions1 = length_insertions2;
|
746
|
+
length_deletions1 = length_deletions2;
|
747
|
+
length_insertions2 = 0;
|
748
|
+
length_deletions2 = 0;
|
749
|
+
lastequality = /** @type {string} */(diffs[pointer][1]);
|
750
|
+
} else { // An insertion or deletion.
|
751
|
+
if (diffs[pointer][0] == DIFF_INSERT) {
|
752
|
+
length_insertions2 += diffs[pointer][1].length;
|
753
|
+
} else {
|
754
|
+
length_deletions2 += diffs[pointer][1].length;
|
755
|
+
}
|
756
|
+
if (lastequality !== null && (lastequality.length <=
|
757
|
+
Math.max(length_insertions1, length_deletions1)) &&
|
758
|
+
(lastequality.length <= Math.max(length_insertions2,
|
759
|
+
length_deletions2))) {
|
760
|
+
// Duplicate record.
|
761
|
+
diffs.splice(equalities[equalitiesLength - 1], 0,
|
762
|
+
[DIFF_DELETE, lastequality]);
|
763
|
+
// Change second copy to insert.
|
764
|
+
diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;
|
765
|
+
// Throw away the equality we just deleted.
|
766
|
+
equalitiesLength--;
|
767
|
+
// Throw away the previous equality (it needs to be reevaluated).
|
768
|
+
equalitiesLength--;
|
769
|
+
pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;
|
770
|
+
length_insertions1 = 0; // Reset the counters.
|
771
|
+
length_deletions1 = 0;
|
772
|
+
length_insertions2 = 0;
|
773
|
+
length_deletions2 = 0;
|
774
|
+
lastequality = null;
|
775
|
+
changes = true;
|
776
|
+
}
|
777
|
+
}
|
778
|
+
pointer++;
|
779
|
+
}
|
780
|
+
|
781
|
+
// Normalize the diff.
|
782
|
+
if (changes) {
|
783
|
+
this.diff_cleanupMerge(diffs);
|
784
|
+
}
|
785
|
+
this.diff_cleanupSemanticLossless(diffs);
|
786
|
+
|
787
|
+
// Find any overlaps between deletions and insertions.
|
788
|
+
// e.g: <del>abcxx</del><ins>xxdef</ins>
|
789
|
+
// -> <del>abc</del>xx<ins>def</ins>
|
790
|
+
pointer = 1;
|
791
|
+
while (pointer < diffs.length) {
|
792
|
+
if (diffs[pointer - 1][0] == DIFF_DELETE &&
|
793
|
+
diffs[pointer][0] == DIFF_INSERT) {
|
794
|
+
var deletion = /** @type {string} */(diffs[pointer - 1][1]);
|
795
|
+
var insertion = /** @type {string} */(diffs[pointer][1]);
|
796
|
+
var overlap_length = this.diff_commonOverlap_(deletion, insertion);
|
797
|
+
if (overlap_length) {
|
798
|
+
// Overlap found. Insert an equality and trim the surrounding edits.
|
799
|
+
diffs.splice(pointer, 0,
|
800
|
+
[DIFF_EQUAL, insertion.substring(0, overlap_length)]);
|
801
|
+
diffs[pointer - 1][1] =
|
802
|
+
deletion.substring(0, deletion.length - overlap_length);
|
803
|
+
diffs[pointer + 1][1] = insertion.substring(overlap_length);
|
804
|
+
pointer++;
|
805
|
+
}
|
806
|
+
pointer++;
|
807
|
+
}
|
808
|
+
pointer++;
|
809
|
+
}
|
810
|
+
};
|
811
|
+
|
812
|
+
|
813
|
+
/**
|
814
|
+
* Look for single edits surrounded on both sides by equalities
|
815
|
+
* which can be shifted sideways to align the edit to a word boundary.
|
816
|
+
* e.g: The c<ins>at c</ins>ame. -> The <ins>cat </ins>came.
|
817
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
818
|
+
*/
|
819
|
+
diff_match_patch.prototype.diff_cleanupSemanticLossless = function(diffs) {
|
820
|
+
// Define some regex patterns for matching boundaries.
|
821
|
+
var punctuation = /[^a-zA-Z0-9]/;
|
822
|
+
var whitespace = /\s/;
|
823
|
+
var linebreak = /[\r\n]/;
|
824
|
+
var blanklineEnd = /\n\r?\n$/;
|
825
|
+
var blanklineStart = /^\r?\n\r?\n/;
|
826
|
+
|
827
|
+
/**
|
828
|
+
* Given two strings, compute a score representing whether the internal
|
829
|
+
* boundary falls on logical boundaries.
|
830
|
+
* Scores range from 5 (best) to 0 (worst).
|
831
|
+
* Closure, makes reference to regex patterns defined above.
|
832
|
+
* @param {string} one First string.
|
833
|
+
* @param {string} two Second string.
|
834
|
+
* @return {number} The score.
|
835
|
+
* @private
|
836
|
+
*/
|
837
|
+
function diff_cleanupSemanticScore_(one, two) {
|
838
|
+
if (!one || !two) {
|
839
|
+
// Edges are the best.
|
840
|
+
return 5;
|
841
|
+
}
|
842
|
+
|
843
|
+
// Each port of this function behaves slightly differently due to
|
844
|
+
// subtle differences in each language's definition of things like
|
845
|
+
// 'whitespace'. Since this function's purpose is largely cosmetic,
|
846
|
+
// the choice has been made to use each language's native features
|
847
|
+
// rather than force total conformity.
|
848
|
+
var score = 0;
|
849
|
+
// One point for non-alphanumeric.
|
850
|
+
if (one.charAt(one.length - 1).match(punctuation) ||
|
851
|
+
two.charAt(0).match(punctuation)) {
|
852
|
+
score++;
|
853
|
+
// Two points for whitespace.
|
854
|
+
if (one.charAt(one.length - 1).match(whitespace) ||
|
855
|
+
two.charAt(0).match(whitespace)) {
|
856
|
+
score++;
|
857
|
+
// Three points for line breaks.
|
858
|
+
if (one.charAt(one.length - 1).match(linebreak) ||
|
859
|
+
two.charAt(0).match(linebreak)) {
|
860
|
+
score++;
|
861
|
+
// Four points for blank lines.
|
862
|
+
if (one.match(blanklineEnd) || two.match(blanklineStart)) {
|
863
|
+
score++;
|
864
|
+
}
|
865
|
+
}
|
866
|
+
}
|
867
|
+
}
|
868
|
+
return score;
|
869
|
+
}
|
870
|
+
|
871
|
+
var pointer = 1;
|
872
|
+
// Intentionally ignore the first and last element (don't need checking).
|
873
|
+
while (pointer < diffs.length - 1) {
|
874
|
+
if (diffs[pointer - 1][0] == DIFF_EQUAL &&
|
875
|
+
diffs[pointer + 1][0] == DIFF_EQUAL) {
|
876
|
+
// This is a single edit surrounded by equalities.
|
877
|
+
var equality1 = /** @type {string} */(diffs[pointer - 1][1]);
|
878
|
+
var edit = /** @type {string} */(diffs[pointer][1]);
|
879
|
+
var equality2 = /** @type {string} */(diffs[pointer + 1][1]);
|
880
|
+
|
881
|
+
// First, shift the edit as far left as possible.
|
882
|
+
var commonOffset = this.diff_commonSuffix(equality1, edit);
|
883
|
+
if (commonOffset) {
|
884
|
+
var commonString = edit.substring(edit.length - commonOffset);
|
885
|
+
equality1 = equality1.substring(0, equality1.length - commonOffset);
|
886
|
+
edit = commonString + edit.substring(0, edit.length - commonOffset);
|
887
|
+
equality2 = commonString + equality2;
|
888
|
+
}
|
889
|
+
|
890
|
+
// Second, step character by character right, looking for the best fit.
|
891
|
+
var bestEquality1 = equality1;
|
892
|
+
var bestEdit = edit;
|
893
|
+
var bestEquality2 = equality2;
|
894
|
+
var bestScore = diff_cleanupSemanticScore_(equality1, edit) +
|
895
|
+
diff_cleanupSemanticScore_(edit, equality2);
|
896
|
+
while (edit.charAt(0) === equality2.charAt(0)) {
|
897
|
+
equality1 += edit.charAt(0);
|
898
|
+
edit = edit.substring(1) + equality2.charAt(0);
|
899
|
+
equality2 = equality2.substring(1);
|
900
|
+
var score = diff_cleanupSemanticScore_(equality1, edit) +
|
901
|
+
diff_cleanupSemanticScore_(edit, equality2);
|
902
|
+
// The >= encourages trailing rather than leading whitespace on edits.
|
903
|
+
if (score >= bestScore) {
|
904
|
+
bestScore = score;
|
905
|
+
bestEquality1 = equality1;
|
906
|
+
bestEdit = edit;
|
907
|
+
bestEquality2 = equality2;
|
908
|
+
}
|
909
|
+
}
|
910
|
+
|
911
|
+
if (diffs[pointer - 1][1] != bestEquality1) {
|
912
|
+
// We have an improvement, save it back to the diff.
|
913
|
+
if (bestEquality1) {
|
914
|
+
diffs[pointer - 1][1] = bestEquality1;
|
915
|
+
} else {
|
916
|
+
diffs.splice(pointer - 1, 1);
|
917
|
+
pointer--;
|
918
|
+
}
|
919
|
+
diffs[pointer][1] = bestEdit;
|
920
|
+
if (bestEquality2) {
|
921
|
+
diffs[pointer + 1][1] = bestEquality2;
|
922
|
+
} else {
|
923
|
+
diffs.splice(pointer + 1, 1);
|
924
|
+
pointer--;
|
925
|
+
}
|
926
|
+
}
|
927
|
+
}
|
928
|
+
pointer++;
|
929
|
+
}
|
930
|
+
};
|
931
|
+
|
932
|
+
|
933
|
+
/**
|
934
|
+
* Reduce the number of edits by eliminating operationally trivial equalities.
|
935
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
936
|
+
*/
|
937
|
+
diff_match_patch.prototype.diff_cleanupEfficiency = function(diffs) {
|
938
|
+
var changes = false;
|
939
|
+
var equalities = []; // Stack of indices where equalities are found.
|
940
|
+
var equalitiesLength = 0; // Keeping our own length var is faster in JS.
|
941
|
+
var lastequality = ''; // Always equal to equalities[equalitiesLength-1][1]
|
942
|
+
var pointer = 0; // Index of current position.
|
943
|
+
// Is there an insertion operation before the last equality.
|
944
|
+
var pre_ins = false;
|
945
|
+
// Is there a deletion operation before the last equality.
|
946
|
+
var pre_del = false;
|
947
|
+
// Is there an insertion operation after the last equality.
|
948
|
+
var post_ins = false;
|
949
|
+
// Is there a deletion operation after the last equality.
|
950
|
+
var post_del = false;
|
951
|
+
while (pointer < diffs.length) {
|
952
|
+
if (diffs[pointer][0] == DIFF_EQUAL) { // Equality found.
|
953
|
+
if (diffs[pointer][1].length < this.Diff_EditCost &&
|
954
|
+
(post_ins || post_del)) {
|
955
|
+
// Candidate found.
|
956
|
+
equalities[equalitiesLength++] = pointer;
|
957
|
+
pre_ins = post_ins;
|
958
|
+
pre_del = post_del;
|
959
|
+
lastequality = diffs[pointer][1];
|
960
|
+
} else {
|
961
|
+
// Not a candidate, and can never become one.
|
962
|
+
equalitiesLength = 0;
|
963
|
+
lastequality = '';
|
964
|
+
}
|
965
|
+
post_ins = post_del = false;
|
966
|
+
} else { // An insertion or deletion.
|
967
|
+
if (diffs[pointer][0] == DIFF_DELETE) {
|
968
|
+
post_del = true;
|
969
|
+
} else {
|
970
|
+
post_ins = true;
|
971
|
+
}
|
972
|
+
/*
|
973
|
+
* Five types to be split:
|
974
|
+
* <ins>A</ins><del>B</del>XY<ins>C</ins><del>D</del>
|
975
|
+
* <ins>A</ins>X<ins>C</ins><del>D</del>
|
976
|
+
* <ins>A</ins><del>B</del>X<ins>C</ins>
|
977
|
+
* <ins>A</del>X<ins>C</ins><del>D</del>
|
978
|
+
* <ins>A</ins><del>B</del>X<del>C</del>
|
979
|
+
*/
|
980
|
+
if (lastequality && ((pre_ins && pre_del && post_ins && post_del) ||
|
981
|
+
((lastequality.length < this.Diff_EditCost / 2) &&
|
982
|
+
(pre_ins + pre_del + post_ins + post_del) == 3))) {
|
983
|
+
// Duplicate record.
|
984
|
+
diffs.splice(equalities[equalitiesLength - 1], 0,
|
985
|
+
[DIFF_DELETE, lastequality]);
|
986
|
+
// Change second copy to insert.
|
987
|
+
diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;
|
988
|
+
equalitiesLength--; // Throw away the equality we just deleted;
|
989
|
+
lastequality = '';
|
990
|
+
if (pre_ins && pre_del) {
|
991
|
+
// No changes made which could affect previous entry, keep going.
|
992
|
+
post_ins = post_del = true;
|
993
|
+
equalitiesLength = 0;
|
994
|
+
} else {
|
995
|
+
equalitiesLength--; // Throw away the previous equality.
|
996
|
+
pointer = equalitiesLength > 0 ?
|
997
|
+
equalities[equalitiesLength - 1] : -1;
|
998
|
+
post_ins = post_del = false;
|
999
|
+
}
|
1000
|
+
changes = true;
|
1001
|
+
}
|
1002
|
+
}
|
1003
|
+
pointer++;
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
if (changes) {
|
1007
|
+
this.diff_cleanupMerge(diffs);
|
1008
|
+
}
|
1009
|
+
};
|
1010
|
+
|
1011
|
+
|
1012
|
+
/**
|
1013
|
+
* Reorder and merge like edit sections. Merge equalities.
|
1014
|
+
* Any edit section can move as long as it doesn't cross an equality.
|
1015
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
1016
|
+
*/
|
1017
|
+
diff_match_patch.prototype.diff_cleanupMerge = function(diffs) {
|
1018
|
+
diffs.push([DIFF_EQUAL, '']); // Add a dummy entry at the end.
|
1019
|
+
var pointer = 0;
|
1020
|
+
var count_delete = 0;
|
1021
|
+
var count_insert = 0;
|
1022
|
+
var text_delete = '';
|
1023
|
+
var text_insert = '';
|
1024
|
+
var commonlength;
|
1025
|
+
while (pointer < diffs.length) {
|
1026
|
+
switch (diffs[pointer][0]) {
|
1027
|
+
case DIFF_INSERT:
|
1028
|
+
count_insert++;
|
1029
|
+
text_insert += diffs[pointer][1];
|
1030
|
+
pointer++;
|
1031
|
+
break;
|
1032
|
+
case DIFF_DELETE:
|
1033
|
+
count_delete++;
|
1034
|
+
text_delete += diffs[pointer][1];
|
1035
|
+
pointer++;
|
1036
|
+
break;
|
1037
|
+
case DIFF_EQUAL:
|
1038
|
+
// Upon reaching an equality, check for prior redundancies.
|
1039
|
+
if (count_delete + count_insert > 1) {
|
1040
|
+
if (count_delete !== 0 && count_insert !== 0) {
|
1041
|
+
// Factor out any common prefixies.
|
1042
|
+
commonlength = this.diff_commonPrefix(text_insert, text_delete);
|
1043
|
+
if (commonlength !== 0) {
|
1044
|
+
if ((pointer - count_delete - count_insert) > 0 &&
|
1045
|
+
diffs[pointer - count_delete - count_insert - 1][0] ==
|
1046
|
+
DIFF_EQUAL) {
|
1047
|
+
diffs[pointer - count_delete - count_insert - 1][1] +=
|
1048
|
+
text_insert.substring(0, commonlength);
|
1049
|
+
} else {
|
1050
|
+
diffs.splice(0, 0, [DIFF_EQUAL,
|
1051
|
+
text_insert.substring(0, commonlength)]);
|
1052
|
+
pointer++;
|
1053
|
+
}
|
1054
|
+
text_insert = text_insert.substring(commonlength);
|
1055
|
+
text_delete = text_delete.substring(commonlength);
|
1056
|
+
}
|
1057
|
+
// Factor out any common suffixies.
|
1058
|
+
commonlength = this.diff_commonSuffix(text_insert, text_delete);
|
1059
|
+
if (commonlength !== 0) {
|
1060
|
+
diffs[pointer][1] = text_insert.substring(text_insert.length -
|
1061
|
+
commonlength) + diffs[pointer][1];
|
1062
|
+
text_insert = text_insert.substring(0, text_insert.length -
|
1063
|
+
commonlength);
|
1064
|
+
text_delete = text_delete.substring(0, text_delete.length -
|
1065
|
+
commonlength);
|
1066
|
+
}
|
1067
|
+
}
|
1068
|
+
// Delete the offending records and add the merged ones.
|
1069
|
+
if (count_delete === 0) {
|
1070
|
+
diffs.splice(pointer - count_delete - count_insert,
|
1071
|
+
count_delete + count_insert, [DIFF_INSERT, text_insert]);
|
1072
|
+
} else if (count_insert === 0) {
|
1073
|
+
diffs.splice(pointer - count_delete - count_insert,
|
1074
|
+
count_delete + count_insert, [DIFF_DELETE, text_delete]);
|
1075
|
+
} else {
|
1076
|
+
diffs.splice(pointer - count_delete - count_insert,
|
1077
|
+
count_delete + count_insert, [DIFF_DELETE, text_delete],
|
1078
|
+
[DIFF_INSERT, text_insert]);
|
1079
|
+
}
|
1080
|
+
pointer = pointer - count_delete - count_insert +
|
1081
|
+
(count_delete ? 1 : 0) + (count_insert ? 1 : 0) + 1;
|
1082
|
+
} else if (pointer !== 0 && diffs[pointer - 1][0] == DIFF_EQUAL) {
|
1083
|
+
// Merge this equality with the previous one.
|
1084
|
+
diffs[pointer - 1][1] += diffs[pointer][1];
|
1085
|
+
diffs.splice(pointer, 1);
|
1086
|
+
} else {
|
1087
|
+
pointer++;
|
1088
|
+
}
|
1089
|
+
count_insert = 0;
|
1090
|
+
count_delete = 0;
|
1091
|
+
text_delete = '';
|
1092
|
+
text_insert = '';
|
1093
|
+
break;
|
1094
|
+
}
|
1095
|
+
}
|
1096
|
+
if (diffs[diffs.length - 1][1] === '') {
|
1097
|
+
diffs.pop(); // Remove the dummy entry at the end.
|
1098
|
+
}
|
1099
|
+
|
1100
|
+
// Second pass: look for single edits surrounded on both sides by equalities
|
1101
|
+
// which can be shifted sideways to eliminate an equality.
|
1102
|
+
// e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC
|
1103
|
+
var changes = false;
|
1104
|
+
pointer = 1;
|
1105
|
+
// Intentionally ignore the first and last element (don't need checking).
|
1106
|
+
while (pointer < diffs.length - 1) {
|
1107
|
+
if (diffs[pointer - 1][0] == DIFF_EQUAL &&
|
1108
|
+
diffs[pointer + 1][0] == DIFF_EQUAL) {
|
1109
|
+
// This is a single edit surrounded by equalities.
|
1110
|
+
if (diffs[pointer][1].substring(diffs[pointer][1].length -
|
1111
|
+
diffs[pointer - 1][1].length) == diffs[pointer - 1][1]) {
|
1112
|
+
// Shift the edit over the previous equality.
|
1113
|
+
diffs[pointer][1] = diffs[pointer - 1][1] +
|
1114
|
+
diffs[pointer][1].substring(0, diffs[pointer][1].length -
|
1115
|
+
diffs[pointer - 1][1].length);
|
1116
|
+
diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];
|
1117
|
+
diffs.splice(pointer - 1, 1);
|
1118
|
+
changes = true;
|
1119
|
+
} else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==
|
1120
|
+
diffs[pointer + 1][1]) {
|
1121
|
+
// Shift the edit over the next equality.
|
1122
|
+
diffs[pointer - 1][1] += diffs[pointer + 1][1];
|
1123
|
+
diffs[pointer][1] =
|
1124
|
+
diffs[pointer][1].substring(diffs[pointer + 1][1].length) +
|
1125
|
+
diffs[pointer + 1][1];
|
1126
|
+
diffs.splice(pointer + 1, 1);
|
1127
|
+
changes = true;
|
1128
|
+
}
|
1129
|
+
}
|
1130
|
+
pointer++;
|
1131
|
+
}
|
1132
|
+
// If shifts were made, the diff needs reordering and another shift sweep.
|
1133
|
+
if (changes) {
|
1134
|
+
this.diff_cleanupMerge(diffs);
|
1135
|
+
}
|
1136
|
+
};
|
1137
|
+
|
1138
|
+
|
1139
|
+
/**
|
1140
|
+
* loc is a location in text1, compute and return the equivalent location in
|
1141
|
+
* text2.
|
1142
|
+
* e.g. 'The cat' vs 'The big cat', 1->1, 5->8
|
1143
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
1144
|
+
* @param {number} loc Location within text1.
|
1145
|
+
* @return {number} Location within text2.
|
1146
|
+
*/
|
1147
|
+
diff_match_patch.prototype.diff_xIndex = function(diffs, loc) {
|
1148
|
+
var chars1 = 0;
|
1149
|
+
var chars2 = 0;
|
1150
|
+
var last_chars1 = 0;
|
1151
|
+
var last_chars2 = 0;
|
1152
|
+
var x;
|
1153
|
+
for (x = 0; x < diffs.length; x++) {
|
1154
|
+
if (diffs[x][0] !== DIFF_INSERT) { // Equality or deletion.
|
1155
|
+
chars1 += diffs[x][1].length;
|
1156
|
+
}
|
1157
|
+
if (diffs[x][0] !== DIFF_DELETE) { // Equality or insertion.
|
1158
|
+
chars2 += diffs[x][1].length;
|
1159
|
+
}
|
1160
|
+
if (chars1 > loc) { // Overshot the location.
|
1161
|
+
break;
|
1162
|
+
}
|
1163
|
+
last_chars1 = chars1;
|
1164
|
+
last_chars2 = chars2;
|
1165
|
+
}
|
1166
|
+
// Was the location was deleted?
|
1167
|
+
if (diffs.length != x && diffs[x][0] === DIFF_DELETE) {
|
1168
|
+
return last_chars2;
|
1169
|
+
}
|
1170
|
+
// Add the remaining character length.
|
1171
|
+
return last_chars2 + (loc - last_chars1);
|
1172
|
+
};
|
1173
|
+
|
1174
|
+
|
1175
|
+
/**
|
1176
|
+
* Convert a diff array into a pretty HTML report.
|
1177
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
1178
|
+
* @return {string} HTML representation.
|
1179
|
+
*/
|
1180
|
+
diff_match_patch.prototype.diff_prettyHtml = function(diffs) {
|
1181
|
+
var html = [];
|
1182
|
+
var i = 0;
|
1183
|
+
var pattern_amp = /&/g;
|
1184
|
+
var pattern_lt = /</g;
|
1185
|
+
var pattern_gt = />/g;
|
1186
|
+
var pattern_para = /\n/g;
|
1187
|
+
for (var x = 0; x < diffs.length; x++) {
|
1188
|
+
var op = diffs[x][0]; // Operation (insert, delete, equal)
|
1189
|
+
var data = diffs[x][1]; // Text of change.
|
1190
|
+
var text = data.replace(pattern_amp, '&').replace(pattern_lt, '<')
|
1191
|
+
.replace(pattern_gt, '>').replace(pattern_para, '¶<br>');
|
1192
|
+
switch (op) {
|
1193
|
+
case DIFF_INSERT:
|
1194
|
+
html[x] = '<ins style="background:#e6ffe6;">' + text + '</ins>';
|
1195
|
+
break;
|
1196
|
+
case DIFF_DELETE:
|
1197
|
+
html[x] = '<del style="background:#ffe6e6;">' + text + '</del>';
|
1198
|
+
break;
|
1199
|
+
case DIFF_EQUAL:
|
1200
|
+
html[x] = '<span>' + text + '</span>';
|
1201
|
+
break;
|
1202
|
+
}
|
1203
|
+
if (op !== DIFF_DELETE) {
|
1204
|
+
i += data.length;
|
1205
|
+
}
|
1206
|
+
}
|
1207
|
+
return html.join('');
|
1208
|
+
};
|
1209
|
+
|
1210
|
+
|
1211
|
+
/**
|
1212
|
+
* Compute and return the source text (all equalities and deletions).
|
1213
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
1214
|
+
* @return {string} Source text.
|
1215
|
+
*/
|
1216
|
+
diff_match_patch.prototype.diff_text1 = function(diffs) {
|
1217
|
+
var text = [];
|
1218
|
+
for (var x = 0; x < diffs.length; x++) {
|
1219
|
+
if (diffs[x][0] !== DIFF_INSERT) {
|
1220
|
+
text[x] = diffs[x][1];
|
1221
|
+
}
|
1222
|
+
}
|
1223
|
+
return text.join('');
|
1224
|
+
};
|
1225
|
+
|
1226
|
+
|
1227
|
+
/**
|
1228
|
+
* Compute and return the destination text (all equalities and insertions).
|
1229
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
1230
|
+
* @return {string} Destination text.
|
1231
|
+
*/
|
1232
|
+
diff_match_patch.prototype.diff_text2 = function(diffs) {
|
1233
|
+
var text = [];
|
1234
|
+
for (var x = 0; x < diffs.length; x++) {
|
1235
|
+
if (diffs[x][0] !== DIFF_DELETE) {
|
1236
|
+
text[x] = diffs[x][1];
|
1237
|
+
}
|
1238
|
+
}
|
1239
|
+
return text.join('');
|
1240
|
+
};
|
1241
|
+
|
1242
|
+
|
1243
|
+
/**
|
1244
|
+
* Compute the Levenshtein distance; the number of inserted, deleted or
|
1245
|
+
* substituted characters.
|
1246
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
1247
|
+
* @return {number} Number of changes.
|
1248
|
+
*/
|
1249
|
+
diff_match_patch.prototype.diff_levenshtein = function(diffs) {
|
1250
|
+
var levenshtein = 0;
|
1251
|
+
var insertions = 0;
|
1252
|
+
var deletions = 0;
|
1253
|
+
for (var x = 0; x < diffs.length; x++) {
|
1254
|
+
var op = diffs[x][0];
|
1255
|
+
var data = diffs[x][1];
|
1256
|
+
switch (op) {
|
1257
|
+
case DIFF_INSERT:
|
1258
|
+
insertions += data.length;
|
1259
|
+
break;
|
1260
|
+
case DIFF_DELETE:
|
1261
|
+
deletions += data.length;
|
1262
|
+
break;
|
1263
|
+
case DIFF_EQUAL:
|
1264
|
+
// A deletion and an insertion is one substitution.
|
1265
|
+
levenshtein += Math.max(insertions, deletions);
|
1266
|
+
insertions = 0;
|
1267
|
+
deletions = 0;
|
1268
|
+
break;
|
1269
|
+
}
|
1270
|
+
}
|
1271
|
+
levenshtein += Math.max(insertions, deletions);
|
1272
|
+
return levenshtein;
|
1273
|
+
};
|
1274
|
+
|
1275
|
+
|
1276
|
+
/**
|
1277
|
+
* Crush the diff into an encoded string which describes the operations
|
1278
|
+
* required to transform text1 into text2.
|
1279
|
+
* E.g. =3\t-2\t+ing -> Keep 3 chars, delete 2 chars, insert 'ing'.
|
1280
|
+
* Operations are tab-separated. Inserted text is escaped using %xx notation.
|
1281
|
+
* @param {!Array.<!diff_match_patch.Diff>} diffs Array of diff tuples.
|
1282
|
+
* @return {string} Delta text.
|
1283
|
+
*/
|
1284
|
+
diff_match_patch.prototype.diff_toDelta = function(diffs) {
|
1285
|
+
var text = [];
|
1286
|
+
for (var x = 0; x < diffs.length; x++) {
|
1287
|
+
switch (diffs[x][0]) {
|
1288
|
+
case DIFF_INSERT:
|
1289
|
+
text[x] = '+' + encodeURI(diffs[x][1]);
|
1290
|
+
break;
|
1291
|
+
case DIFF_DELETE:
|
1292
|
+
text[x] = '-' + diffs[x][1].length;
|
1293
|
+
break;
|
1294
|
+
case DIFF_EQUAL:
|
1295
|
+
text[x] = '=' + diffs[x][1].length;
|
1296
|
+
break;
|
1297
|
+
}
|
1298
|
+
}
|
1299
|
+
return text.join('\t').replace(/%20/g, ' ');
|
1300
|
+
};
|
1301
|
+
|
1302
|
+
|
1303
|
+
/**
|
1304
|
+
* Given the original text1, and an encoded string which describes the
|
1305
|
+
* operations required to transform text1 into text2, compute the full diff.
|
1306
|
+
* @param {string} text1 Source string for the diff.
|
1307
|
+
* @param {string} delta Delta text.
|
1308
|
+
* @return {!Array.<!diff_match_patch.Diff>} Array of diff tuples.
|
1309
|
+
* @throws {!Error} If invalid input.
|
1310
|
+
*/
|
1311
|
+
diff_match_patch.prototype.diff_fromDelta = function(text1, delta) {
|
1312
|
+
var diffs = [];
|
1313
|
+
var diffsLength = 0; // Keeping our own length var is faster in JS.
|
1314
|
+
var pointer = 0; // Cursor in text1
|
1315
|
+
var tokens = delta.split(/\t/g);
|
1316
|
+
for (var x = 0; x < tokens.length; x++) {
|
1317
|
+
// Each token begins with a one character parameter which specifies the
|
1318
|
+
// operation of this token (delete, insert, equality).
|
1319
|
+
var param = tokens[x].substring(1);
|
1320
|
+
switch (tokens[x].charAt(0)) {
|
1321
|
+
case '+':
|
1322
|
+
try {
|
1323
|
+
diffs[diffsLength++] = [DIFF_INSERT, decodeURI(param)];
|
1324
|
+
} catch (ex) {
|
1325
|
+
// Malformed URI sequence.
|
1326
|
+
throw new Error('Illegal escape in diff_fromDelta: ' + param);
|
1327
|
+
}
|
1328
|
+
break;
|
1329
|
+
case '-':
|
1330
|
+
// Fall through.
|
1331
|
+
case '=':
|
1332
|
+
var n = parseInt(param, 10);
|
1333
|
+
if (isNaN(n) || n < 0) {
|
1334
|
+
throw new Error('Invalid number in diff_fromDelta: ' + param);
|
1335
|
+
}
|
1336
|
+
var text = text1.substring(pointer, pointer += n);
|
1337
|
+
if (tokens[x].charAt(0) == '=') {
|
1338
|
+
diffs[diffsLength++] = [DIFF_EQUAL, text];
|
1339
|
+
} else {
|
1340
|
+
diffs[diffsLength++] = [DIFF_DELETE, text];
|
1341
|
+
}
|
1342
|
+
break;
|
1343
|
+
default:
|
1344
|
+
// Blank tokens are ok (from a trailing \t).
|
1345
|
+
// Anything else is an error.
|
1346
|
+
if (tokens[x]) {
|
1347
|
+
throw new Error('Invalid diff operation in diff_fromDelta: ' +
|
1348
|
+
tokens[x]);
|
1349
|
+
}
|
1350
|
+
}
|
1351
|
+
}
|
1352
|
+
if (pointer != text1.length) {
|
1353
|
+
throw new Error('Delta length (' + pointer +
|
1354
|
+
') does not equal source text length (' + text1.length + ').');
|
1355
|
+
}
|
1356
|
+
return diffs;
|
1357
|
+
};
|
1358
|
+
|
1359
|
+
|
1360
|
+
// MATCH FUNCTIONS
|
1361
|
+
|
1362
|
+
|
1363
|
+
/**
|
1364
|
+
* Locate the best instance of 'pattern' in 'text' near 'loc'.
|
1365
|
+
* @param {string} text The text to search.
|
1366
|
+
* @param {string} pattern The pattern to search for.
|
1367
|
+
* @param {number} loc The location to search around.
|
1368
|
+
* @return {number} Best match index or -1.
|
1369
|
+
*/
|
1370
|
+
diff_match_patch.prototype.match_main = function(text, pattern, loc) {
|
1371
|
+
// Check for null inputs.
|
1372
|
+
if (text == null || pattern == null || loc == null) {
|
1373
|
+
throw new Error('Null input. (match_main)');
|
1374
|
+
}
|
1375
|
+
|
1376
|
+
loc = Math.max(0, Math.min(loc, text.length));
|
1377
|
+
if (text == pattern) {
|
1378
|
+
// Shortcut (potentially not guaranteed by the algorithm)
|
1379
|
+
return 0;
|
1380
|
+
} else if (!text.length) {
|
1381
|
+
// Nothing to match.
|
1382
|
+
return -1;
|
1383
|
+
} else if (text.substring(loc, loc + pattern.length) == pattern) {
|
1384
|
+
// Perfect match at the perfect spot! (Includes case of null pattern)
|
1385
|
+
return loc;
|
1386
|
+
} else {
|
1387
|
+
// Do a fuzzy compare.
|
1388
|
+
return this.match_bitap_(text, pattern, loc);
|
1389
|
+
}
|
1390
|
+
};
|
1391
|
+
|
1392
|
+
|
1393
|
+
/**
|
1394
|
+
* Locate the best instance of 'pattern' in 'text' near 'loc' using the
|
1395
|
+
* Bitap algorithm.
|
1396
|
+
* @param {string} text The text to search.
|
1397
|
+
* @param {string} pattern The pattern to search for.
|
1398
|
+
* @param {number} loc The location to search around.
|
1399
|
+
* @return {number} Best match index or -1.
|
1400
|
+
* @private
|
1401
|
+
*/
|
1402
|
+
diff_match_patch.prototype.match_bitap_ = function(text, pattern, loc) {
|
1403
|
+
if (pattern.length > this.Match_MaxBits) {
|
1404
|
+
throw new Error('Pattern too long for this browser.');
|
1405
|
+
}
|
1406
|
+
|
1407
|
+
// Initialise the alphabet.
|
1408
|
+
var s = this.match_alphabet_(pattern);
|
1409
|
+
|
1410
|
+
var dmp = this; // 'this' becomes 'window' in a closure.
|
1411
|
+
|
1412
|
+
/**
|
1413
|
+
* Compute and return the score for a match with e errors and x location.
|
1414
|
+
* Accesses loc and pattern through being a closure.
|
1415
|
+
* @param {number} e Number of errors in match.
|
1416
|
+
* @param {number} x Location of match.
|
1417
|
+
* @return {number} Overall score for match (0.0 = good, 1.0 = bad).
|
1418
|
+
* @private
|
1419
|
+
*/
|
1420
|
+
function match_bitapScore_(e, x) {
|
1421
|
+
var accuracy = e / pattern.length;
|
1422
|
+
var proximity = Math.abs(loc - x);
|
1423
|
+
if (!dmp.Match_Distance) {
|
1424
|
+
// Dodge divide by zero error.
|
1425
|
+
return proximity ? 1.0 : accuracy;
|
1426
|
+
}
|
1427
|
+
return accuracy + (proximity / dmp.Match_Distance);
|
1428
|
+
}
|
1429
|
+
|
1430
|
+
// Highest score beyond which we give up.
|
1431
|
+
var score_threshold = this.Match_Threshold;
|
1432
|
+
// Is there a nearby exact match? (speedup)
|
1433
|
+
var best_loc = text.indexOf(pattern, loc);
|
1434
|
+
if (best_loc != -1) {
|
1435
|
+
score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold);
|
1436
|
+
// What about in the other direction? (speedup)
|
1437
|
+
best_loc = text.lastIndexOf(pattern, loc + pattern.length);
|
1438
|
+
if (best_loc != -1) {
|
1439
|
+
score_threshold =
|
1440
|
+
Math.min(match_bitapScore_(0, best_loc), score_threshold);
|
1441
|
+
}
|
1442
|
+
}
|
1443
|
+
|
1444
|
+
// Initialise the bit arrays.
|
1445
|
+
var matchmask = 1 << (pattern.length - 1);
|
1446
|
+
best_loc = -1;
|
1447
|
+
|
1448
|
+
var bin_min, bin_mid;
|
1449
|
+
var bin_max = pattern.length + text.length;
|
1450
|
+
var last_rd;
|
1451
|
+
for (var d = 0; d < pattern.length; d++) {
|
1452
|
+
// Scan for the best match; each iteration allows for one more error.
|
1453
|
+
// Run a binary search to determine how far from 'loc' we can stray at this
|
1454
|
+
// error level.
|
1455
|
+
bin_min = 0;
|
1456
|
+
bin_mid = bin_max;
|
1457
|
+
while (bin_min < bin_mid) {
|
1458
|
+
if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {
|
1459
|
+
bin_min = bin_mid;
|
1460
|
+
} else {
|
1461
|
+
bin_max = bin_mid;
|
1462
|
+
}
|
1463
|
+
bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min);
|
1464
|
+
}
|
1465
|
+
// Use the result from this iteration as the maximum for the next.
|
1466
|
+
bin_max = bin_mid;
|
1467
|
+
var start = Math.max(1, loc - bin_mid + 1);
|
1468
|
+
var finish = Math.min(loc + bin_mid, text.length) + pattern.length;
|
1469
|
+
|
1470
|
+
var rd = Array(finish + 2);
|
1471
|
+
rd[finish + 1] = (1 << d) - 1;
|
1472
|
+
for (var j = finish; j >= start; j--) {
|
1473
|
+
// The alphabet (s) is a sparse hash, so the following line generates
|
1474
|
+
// warnings.
|
1475
|
+
var charMatch = s[text.charAt(j - 1)];
|
1476
|
+
if (d === 0) { // First pass: exact match.
|
1477
|
+
rd[j] = ((rd[j + 1] << 1) | 1) & charMatch;
|
1478
|
+
} else { // Subsequent passes: fuzzy match.
|
1479
|
+
rd[j] = ((rd[j + 1] << 1) | 1) & charMatch |
|
1480
|
+
(((last_rd[j + 1] | last_rd[j]) << 1) | 1) |
|
1481
|
+
last_rd[j + 1];
|
1482
|
+
}
|
1483
|
+
if (rd[j] & matchmask) {
|
1484
|
+
var score = match_bitapScore_(d, j - 1);
|
1485
|
+
// This match will almost certainly be better than any existing match.
|
1486
|
+
// But check anyway.
|
1487
|
+
if (score <= score_threshold) {
|
1488
|
+
// Told you so.
|
1489
|
+
score_threshold = score;
|
1490
|
+
best_loc = j - 1;
|
1491
|
+
if (best_loc > loc) {
|
1492
|
+
// When passing loc, don't exceed our current distance from loc.
|
1493
|
+
start = Math.max(1, 2 * loc - best_loc);
|
1494
|
+
} else {
|
1495
|
+
// Already passed loc, downhill from here on in.
|
1496
|
+
break;
|
1497
|
+
}
|
1498
|
+
}
|
1499
|
+
}
|
1500
|
+
}
|
1501
|
+
// No hope for a (better) match at greater error levels.
|
1502
|
+
if (match_bitapScore_(d + 1, loc) > score_threshold) {
|
1503
|
+
break;
|
1504
|
+
}
|
1505
|
+
last_rd = rd;
|
1506
|
+
}
|
1507
|
+
return best_loc;
|
1508
|
+
};
|
1509
|
+
|
1510
|
+
|
1511
|
+
/**
|
1512
|
+
* Initialise the alphabet for the Bitap algorithm.
|
1513
|
+
* @param {string} pattern The text to encode.
|
1514
|
+
* @return {!Object} Hash of character locations.
|
1515
|
+
* @private
|
1516
|
+
*/
|
1517
|
+
diff_match_patch.prototype.match_alphabet_ = function(pattern) {
|
1518
|
+
var s = {};
|
1519
|
+
for (var i = 0; i < pattern.length; i++) {
|
1520
|
+
s[pattern.charAt(i)] = 0;
|
1521
|
+
}
|
1522
|
+
for (var i = 0; i < pattern.length; i++) {
|
1523
|
+
s[pattern.charAt(i)] |= 1 << (pattern.length - i - 1);
|
1524
|
+
}
|
1525
|
+
return s;
|
1526
|
+
};
|
1527
|
+
|
1528
|
+
|
1529
|
+
// PATCH FUNCTIONS
|
1530
|
+
|
1531
|
+
|
1532
|
+
/**
|
1533
|
+
* Increase the context until it is unique,
|
1534
|
+
* but don't let the pattern expand beyond Match_MaxBits.
|
1535
|
+
* @param {!patch_obj} patch The patch to grow.
|
1536
|
+
* @param {string} text Source text.
|
1537
|
+
* @private
|
1538
|
+
*/
|
1539
|
+
diff_match_patch.prototype.patch_addContext_ = function(patch, text) {
|
1540
|
+
if (text.length == 0) {
|
1541
|
+
return;
|
1542
|
+
}
|
1543
|
+
var pattern = text.substring(patch.start2, patch.start2 + patch.length1);
|
1544
|
+
var padding = 0;
|
1545
|
+
|
1546
|
+
// Look for the first and last matches of pattern in text. If two different
|
1547
|
+
// matches are found, increase the pattern length.
|
1548
|
+
while (text.indexOf(pattern) != text.lastIndexOf(pattern) &&
|
1549
|
+
pattern.length < this.Match_MaxBits - this.Patch_Margin -
|
1550
|
+
this.Patch_Margin) {
|
1551
|
+
padding += this.Patch_Margin;
|
1552
|
+
pattern = text.substring(patch.start2 - padding,
|
1553
|
+
patch.start2 + patch.length1 + padding);
|
1554
|
+
}
|
1555
|
+
// Add one chunk for good luck.
|
1556
|
+
padding += this.Patch_Margin;
|
1557
|
+
|
1558
|
+
// Add the prefix.
|
1559
|
+
var prefix = text.substring(patch.start2 - padding, patch.start2);
|
1560
|
+
if (prefix) {
|
1561
|
+
patch.diffs.unshift([DIFF_EQUAL, prefix]);
|
1562
|
+
}
|
1563
|
+
// Add the suffix.
|
1564
|
+
var suffix = text.substring(patch.start2 + patch.length1,
|
1565
|
+
patch.start2 + patch.length1 + padding);
|
1566
|
+
if (suffix) {
|
1567
|
+
patch.diffs.push([DIFF_EQUAL, suffix]);
|
1568
|
+
}
|
1569
|
+
|
1570
|
+
// Roll back the start points.
|
1571
|
+
patch.start1 -= prefix.length;
|
1572
|
+
patch.start2 -= prefix.length;
|
1573
|
+
// Extend the lengths.
|
1574
|
+
patch.length1 += prefix.length + suffix.length;
|
1575
|
+
patch.length2 += prefix.length + suffix.length;
|
1576
|
+
};
|
1577
|
+
|
1578
|
+
|
1579
|
+
/**
|
1580
|
+
* Compute a list of patches to turn text1 into text2.
|
1581
|
+
* Use diffs if provided, otherwise compute it ourselves.
|
1582
|
+
* There are four ways to call this function, depending on what data is
|
1583
|
+
* available to the caller:
|
1584
|
+
* Method 1:
|
1585
|
+
* a = text1, b = text2
|
1586
|
+
* Method 2:
|
1587
|
+
* a = diffs
|
1588
|
+
* Method 3 (optimal):
|
1589
|
+
* a = text1, b = diffs
|
1590
|
+
* Method 4 (deprecated, use method 3):
|
1591
|
+
* a = text1, b = text2, c = diffs
|
1592
|
+
*
|
1593
|
+
* @param {string|!Array.<!diff_match_patch.Diff>} a text1 (methods 1,3,4) or
|
1594
|
+
* Array of diff tuples for text1 to text2 (method 2).
|
1595
|
+
* @param {string|!Array.<!diff_match_patch.Diff>} opt_b text2 (methods 1,4) or
|
1596
|
+
* Array of diff tuples for text1 to text2 (method 3) or undefined (method 2).
|
1597
|
+
* @param {string|!Array.<!diff_match_patch.Diff>} opt_c Array of diff tuples
|
1598
|
+
* for text1 to text2 (method 4) or undefined (methods 1,2,3).
|
1599
|
+
* @return {!Array.<!patch_obj>} Array of patch objects.
|
1600
|
+
*/
|
1601
|
+
diff_match_patch.prototype.patch_make = function(a, opt_b, opt_c) {
|
1602
|
+
var text1, diffs;
|
1603
|
+
if (typeof a == 'string' && typeof opt_b == 'string' &&
|
1604
|
+
typeof opt_c == 'undefined') {
|
1605
|
+
// Method 1: text1, text2
|
1606
|
+
// Compute diffs from text1 and text2.
|
1607
|
+
text1 = /** @type {string} */(a);
|
1608
|
+
diffs = this.diff_main(text1, /** @type {string} */(opt_b), true);
|
1609
|
+
if (diffs.length > 2) {
|
1610
|
+
this.diff_cleanupSemantic(diffs);
|
1611
|
+
this.diff_cleanupEfficiency(diffs);
|
1612
|
+
}
|
1613
|
+
} else if (a && typeof a == 'object' && typeof opt_b == 'undefined' &&
|
1614
|
+
typeof opt_c == 'undefined') {
|
1615
|
+
// Method 2: diffs
|
1616
|
+
// Compute text1 from diffs.
|
1617
|
+
diffs = /** @type {!Array.<!diff_match_patch.Diff>} */(a);
|
1618
|
+
text1 = this.diff_text1(diffs);
|
1619
|
+
} else if (typeof a == 'string' && opt_b && typeof opt_b == 'object' &&
|
1620
|
+
typeof opt_c == 'undefined') {
|
1621
|
+
// Method 3: text1, diffs
|
1622
|
+
text1 = /** @type {string} */(a);
|
1623
|
+
diffs = /** @type {!Array.<!diff_match_patch.Diff>} */(opt_b);
|
1624
|
+
} else if (typeof a == 'string' && typeof opt_b == 'string' &&
|
1625
|
+
opt_c && typeof opt_c == 'object') {
|
1626
|
+
// Method 4: text1, text2, diffs
|
1627
|
+
// text2 is not used.
|
1628
|
+
text1 = /** @type {string} */(a);
|
1629
|
+
diffs = /** @type {!Array.<!diff_match_patch.Diff>} */(opt_c);
|
1630
|
+
} else {
|
1631
|
+
throw new Error('Unknown call format to patch_make.');
|
1632
|
+
}
|
1633
|
+
|
1634
|
+
if (diffs.length === 0) {
|
1635
|
+
return []; // Get rid of the null case.
|
1636
|
+
}
|
1637
|
+
var patches = [];
|
1638
|
+
var patch = new patch_obj();
|
1639
|
+
var patchDiffLength = 0; // Keeping our own length var is faster in JS.
|
1640
|
+
var char_count1 = 0; // Number of characters into the text1 string.
|
1641
|
+
var char_count2 = 0; // Number of characters into the text2 string.
|
1642
|
+
// Start with text1 (prepatch_text) and apply the diffs until we arrive at
|
1643
|
+
// text2 (postpatch_text). We recreate the patches one by one to determine
|
1644
|
+
// context info.
|
1645
|
+
var prepatch_text = text1;
|
1646
|
+
var postpatch_text = text1;
|
1647
|
+
for (var x = 0; x < diffs.length; x++) {
|
1648
|
+
var diff_type = diffs[x][0];
|
1649
|
+
var diff_text = diffs[x][1];
|
1650
|
+
|
1651
|
+
if (!patchDiffLength && diff_type !== DIFF_EQUAL) {
|
1652
|
+
// A new patch starts here.
|
1653
|
+
patch.start1 = char_count1;
|
1654
|
+
patch.start2 = char_count2;
|
1655
|
+
}
|
1656
|
+
|
1657
|
+
switch (diff_type) {
|
1658
|
+
case DIFF_INSERT:
|
1659
|
+
patch.diffs[patchDiffLength++] = diffs[x];
|
1660
|
+
patch.length2 += diff_text.length;
|
1661
|
+
postpatch_text = postpatch_text.substring(0, char_count2) + diff_text +
|
1662
|
+
postpatch_text.substring(char_count2);
|
1663
|
+
break;
|
1664
|
+
case DIFF_DELETE:
|
1665
|
+
patch.length1 += diff_text.length;
|
1666
|
+
patch.diffs[patchDiffLength++] = diffs[x];
|
1667
|
+
postpatch_text = postpatch_text.substring(0, char_count2) +
|
1668
|
+
postpatch_text.substring(char_count2 +
|
1669
|
+
diff_text.length);
|
1670
|
+
break;
|
1671
|
+
case DIFF_EQUAL:
|
1672
|
+
if (diff_text.length <= 2 * this.Patch_Margin &&
|
1673
|
+
patchDiffLength && diffs.length != x + 1) {
|
1674
|
+
// Small equality inside a patch.
|
1675
|
+
patch.diffs[patchDiffLength++] = diffs[x];
|
1676
|
+
patch.length1 += diff_text.length;
|
1677
|
+
patch.length2 += diff_text.length;
|
1678
|
+
} else if (diff_text.length >= 2 * this.Patch_Margin) {
|
1679
|
+
// Time for a new patch.
|
1680
|
+
if (patchDiffLength) {
|
1681
|
+
this.patch_addContext_(patch, prepatch_text);
|
1682
|
+
patches.push(patch);
|
1683
|
+
patch = new patch_obj();
|
1684
|
+
patchDiffLength = 0;
|
1685
|
+
// Unlike Unidiff, our patch lists have a rolling context.
|
1686
|
+
// http://code.google.com/p/google-diff-match-patch/wiki/Unidiff
|
1687
|
+
// Update prepatch text & pos to reflect the application of the
|
1688
|
+
// just completed patch.
|
1689
|
+
prepatch_text = postpatch_text;
|
1690
|
+
char_count1 = char_count2;
|
1691
|
+
}
|
1692
|
+
}
|
1693
|
+
break;
|
1694
|
+
}
|
1695
|
+
|
1696
|
+
// Update the current character count.
|
1697
|
+
if (diff_type !== DIFF_INSERT) {
|
1698
|
+
char_count1 += diff_text.length;
|
1699
|
+
}
|
1700
|
+
if (diff_type !== DIFF_DELETE) {
|
1701
|
+
char_count2 += diff_text.length;
|
1702
|
+
}
|
1703
|
+
}
|
1704
|
+
// Pick up the leftover patch if not empty.
|
1705
|
+
if (patchDiffLength) {
|
1706
|
+
this.patch_addContext_(patch, prepatch_text);
|
1707
|
+
patches.push(patch);
|
1708
|
+
}
|
1709
|
+
|
1710
|
+
return patches;
|
1711
|
+
};
|
1712
|
+
|
1713
|
+
|
1714
|
+
/**
|
1715
|
+
* Given an array of patches, return another array that is identical.
|
1716
|
+
* @param {!Array.<!patch_obj>} patches Array of patch objects.
|
1717
|
+
* @return {!Array.<!patch_obj>} Array of patch objects.
|
1718
|
+
*/
|
1719
|
+
diff_match_patch.prototype.patch_deepCopy = function(patches) {
|
1720
|
+
// Making deep copies is hard in JavaScript.
|
1721
|
+
var patchesCopy = [];
|
1722
|
+
for (var x = 0; x < patches.length; x++) {
|
1723
|
+
var patch = patches[x];
|
1724
|
+
var patchCopy = new patch_obj();
|
1725
|
+
patchCopy.diffs = [];
|
1726
|
+
for (var y = 0; y < patch.diffs.length; y++) {
|
1727
|
+
patchCopy.diffs[y] = patch.diffs[y].slice();
|
1728
|
+
}
|
1729
|
+
patchCopy.start1 = patch.start1;
|
1730
|
+
patchCopy.start2 = patch.start2;
|
1731
|
+
patchCopy.length1 = patch.length1;
|
1732
|
+
patchCopy.length2 = patch.length2;
|
1733
|
+
patchesCopy[x] = patchCopy;
|
1734
|
+
}
|
1735
|
+
return patchesCopy;
|
1736
|
+
};
|
1737
|
+
|
1738
|
+
|
1739
|
+
/**
|
1740
|
+
* Merge a set of patches onto the text. Return a patched text, as well
|
1741
|
+
* as a list of true/false values indicating which patches were applied.
|
1742
|
+
* @param {!Array.<!patch_obj>} patches Array of patch objects.
|
1743
|
+
* @param {string} text Old text.
|
1744
|
+
* @return {!Array.<string|!Array.<boolean>>} Two element Array, containing the
|
1745
|
+
* new text and an array of boolean values.
|
1746
|
+
*/
|
1747
|
+
diff_match_patch.prototype.patch_apply = function(patches, text) {
|
1748
|
+
if (patches.length == 0) {
|
1749
|
+
return [text, []];
|
1750
|
+
}
|
1751
|
+
|
1752
|
+
// Deep copy the patches so that no changes are made to originals.
|
1753
|
+
patches = this.patch_deepCopy(patches);
|
1754
|
+
|
1755
|
+
var nullPadding = this.patch_addPadding(patches);
|
1756
|
+
text = nullPadding + text + nullPadding;
|
1757
|
+
|
1758
|
+
this.patch_splitMax(patches);
|
1759
|
+
// delta keeps track of the offset between the expected and actual location
|
1760
|
+
// of the previous patch. If there are patches expected at positions 10 and
|
1761
|
+
// 20, but the first patch was found at 12, delta is 2 and the second patch
|
1762
|
+
// has an effective expected position of 22.
|
1763
|
+
var delta = 0;
|
1764
|
+
var results = [];
|
1765
|
+
for (var x = 0; x < patches.length; x++) {
|
1766
|
+
var expected_loc = patches[x].start2 + delta;
|
1767
|
+
var text1 = this.diff_text1(patches[x].diffs);
|
1768
|
+
var start_loc;
|
1769
|
+
var end_loc = -1;
|
1770
|
+
if (text1.length > this.Match_MaxBits) {
|
1771
|
+
// patch_splitMax will only provide an oversized pattern in the case of
|
1772
|
+
// a monster delete.
|
1773
|
+
start_loc = this.match_main(text, text1.substring(0, this.Match_MaxBits),
|
1774
|
+
expected_loc);
|
1775
|
+
if (start_loc != -1) {
|
1776
|
+
end_loc = this.match_main(text,
|
1777
|
+
text1.substring(text1.length - this.Match_MaxBits),
|
1778
|
+
expected_loc + text1.length - this.Match_MaxBits);
|
1779
|
+
if (end_loc == -1 || start_loc >= end_loc) {
|
1780
|
+
// Can't find valid trailing context. Drop this patch.
|
1781
|
+
start_loc = -1;
|
1782
|
+
}
|
1783
|
+
}
|
1784
|
+
} else {
|
1785
|
+
start_loc = this.match_main(text, text1, expected_loc);
|
1786
|
+
}
|
1787
|
+
if (start_loc == -1) {
|
1788
|
+
// No match found. :(
|
1789
|
+
results[x] = false;
|
1790
|
+
// Subtract the delta for this failed patch from subsequent patches.
|
1791
|
+
delta -= patches[x].length2 - patches[x].length1;
|
1792
|
+
} else {
|
1793
|
+
// Found a match. :)
|
1794
|
+
results[x] = true;
|
1795
|
+
delta = start_loc - expected_loc;
|
1796
|
+
var text2;
|
1797
|
+
if (end_loc == -1) {
|
1798
|
+
text2 = text.substring(start_loc, start_loc + text1.length);
|
1799
|
+
} else {
|
1800
|
+
text2 = text.substring(start_loc, end_loc + this.Match_MaxBits);
|
1801
|
+
}
|
1802
|
+
if (text1 == text2) {
|
1803
|
+
// Perfect match, just shove the replacement text in.
|
1804
|
+
text = text.substring(0, start_loc) +
|
1805
|
+
this.diff_text2(patches[x].diffs) +
|
1806
|
+
text.substring(start_loc + text1.length);
|
1807
|
+
} else {
|
1808
|
+
// Imperfect match. Run a diff to get a framework of equivalent
|
1809
|
+
// indices.
|
1810
|
+
var diffs = this.diff_main(text1, text2, false);
|
1811
|
+
if (text1.length > this.Match_MaxBits &&
|
1812
|
+
this.diff_levenshtein(diffs) / text1.length >
|
1813
|
+
this.Patch_DeleteThreshold) {
|
1814
|
+
// The end points match, but the content is unacceptably bad.
|
1815
|
+
results[x] = false;
|
1816
|
+
} else {
|
1817
|
+
this.diff_cleanupSemanticLossless(diffs);
|
1818
|
+
var index1 = 0;
|
1819
|
+
var index2;
|
1820
|
+
for (var y = 0; y < patches[x].diffs.length; y++) {
|
1821
|
+
var mod = patches[x].diffs[y];
|
1822
|
+
if (mod[0] !== DIFF_EQUAL) {
|
1823
|
+
index2 = this.diff_xIndex(diffs, index1);
|
1824
|
+
}
|
1825
|
+
if (mod[0] === DIFF_INSERT) { // Insertion
|
1826
|
+
text = text.substring(0, start_loc + index2) + mod[1] +
|
1827
|
+
text.substring(start_loc + index2);
|
1828
|
+
} else if (mod[0] === DIFF_DELETE) { // Deletion
|
1829
|
+
text = text.substring(0, start_loc + index2) +
|
1830
|
+
text.substring(start_loc + this.diff_xIndex(diffs,
|
1831
|
+
index1 + mod[1].length));
|
1832
|
+
}
|
1833
|
+
if (mod[0] !== DIFF_DELETE) {
|
1834
|
+
index1 += mod[1].length;
|
1835
|
+
}
|
1836
|
+
}
|
1837
|
+
}
|
1838
|
+
}
|
1839
|
+
}
|
1840
|
+
}
|
1841
|
+
// Strip the padding off.
|
1842
|
+
text = text.substring(nullPadding.length, text.length - nullPadding.length);
|
1843
|
+
return [text, results];
|
1844
|
+
};
|
1845
|
+
|
1846
|
+
|
1847
|
+
/**
|
1848
|
+
* Add some padding on text start and end so that edges can match something.
|
1849
|
+
* Intended to be called only from within patch_apply.
|
1850
|
+
* @param {!Array.<!patch_obj>} patches Array of patch objects.
|
1851
|
+
* @return {string} The padding string added to each side.
|
1852
|
+
*/
|
1853
|
+
diff_match_patch.prototype.patch_addPadding = function(patches) {
|
1854
|
+
var paddingLength = this.Patch_Margin;
|
1855
|
+
var nullPadding = '';
|
1856
|
+
for (var x = 1; x <= paddingLength; x++) {
|
1857
|
+
nullPadding += String.fromCharCode(x);
|
1858
|
+
}
|
1859
|
+
|
1860
|
+
// Bump all the patches forward.
|
1861
|
+
for (var x = 0; x < patches.length; x++) {
|
1862
|
+
patches[x].start1 += paddingLength;
|
1863
|
+
patches[x].start2 += paddingLength;
|
1864
|
+
}
|
1865
|
+
|
1866
|
+
// Add some padding on start of first diff.
|
1867
|
+
var patch = patches[0];
|
1868
|
+
var diffs = patch.diffs;
|
1869
|
+
if (diffs.length == 0 || diffs[0][0] != DIFF_EQUAL) {
|
1870
|
+
// Add nullPadding equality.
|
1871
|
+
diffs.unshift([DIFF_EQUAL, nullPadding]);
|
1872
|
+
patch.start1 -= paddingLength; // Should be 0.
|
1873
|
+
patch.start2 -= paddingLength; // Should be 0.
|
1874
|
+
patch.length1 += paddingLength;
|
1875
|
+
patch.length2 += paddingLength;
|
1876
|
+
} else if (paddingLength > diffs[0][1].length) {
|
1877
|
+
// Grow first equality.
|
1878
|
+
var extraLength = paddingLength - diffs[0][1].length;
|
1879
|
+
diffs[0][1] = nullPadding.substring(diffs[0][1].length) + diffs[0][1];
|
1880
|
+
patch.start1 -= extraLength;
|
1881
|
+
patch.start2 -= extraLength;
|
1882
|
+
patch.length1 += extraLength;
|
1883
|
+
patch.length2 += extraLength;
|
1884
|
+
}
|
1885
|
+
|
1886
|
+
// Add some padding on end of last diff.
|
1887
|
+
patch = patches[patches.length - 1];
|
1888
|
+
diffs = patch.diffs;
|
1889
|
+
if (diffs.length == 0 || diffs[diffs.length - 1][0] != DIFF_EQUAL) {
|
1890
|
+
// Add nullPadding equality.
|
1891
|
+
diffs.push([DIFF_EQUAL, nullPadding]);
|
1892
|
+
patch.length1 += paddingLength;
|
1893
|
+
patch.length2 += paddingLength;
|
1894
|
+
} else if (paddingLength > diffs[diffs.length - 1][1].length) {
|
1895
|
+
// Grow last equality.
|
1896
|
+
var extraLength = paddingLength - diffs[diffs.length - 1][1].length;
|
1897
|
+
diffs[diffs.length - 1][1] += nullPadding.substring(0, extraLength);
|
1898
|
+
patch.length1 += extraLength;
|
1899
|
+
patch.length2 += extraLength;
|
1900
|
+
}
|
1901
|
+
|
1902
|
+
return nullPadding;
|
1903
|
+
};
|
1904
|
+
|
1905
|
+
|
1906
|
+
/**
|
1907
|
+
* Look through the patches and break up any which are longer than the maximum
|
1908
|
+
* limit of the match algorithm.
|
1909
|
+
* Intended to be called only from within patch_apply.
|
1910
|
+
* @param {!Array.<!patch_obj>} patches Array of patch objects.
|
1911
|
+
*/
|
1912
|
+
diff_match_patch.prototype.patch_splitMax = function(patches) {
|
1913
|
+
var patch_size = this.Match_MaxBits;
|
1914
|
+
for (var x = 0; x < patches.length; x++) {
|
1915
|
+
if (patches[x].length1 > patch_size) {
|
1916
|
+
var bigpatch = patches[x];
|
1917
|
+
// Remove the big old patch.
|
1918
|
+
patches.splice(x--, 1);
|
1919
|
+
var start1 = bigpatch.start1;
|
1920
|
+
var start2 = bigpatch.start2;
|
1921
|
+
var precontext = '';
|
1922
|
+
while (bigpatch.diffs.length !== 0) {
|
1923
|
+
// Create one of several smaller patches.
|
1924
|
+
var patch = new patch_obj();
|
1925
|
+
var empty = true;
|
1926
|
+
patch.start1 = start1 - precontext.length;
|
1927
|
+
patch.start2 = start2 - precontext.length;
|
1928
|
+
if (precontext !== '') {
|
1929
|
+
patch.length1 = patch.length2 = precontext.length;
|
1930
|
+
patch.diffs.push([DIFF_EQUAL, precontext]);
|
1931
|
+
}
|
1932
|
+
while (bigpatch.diffs.length !== 0 &&
|
1933
|
+
patch.length1 < patch_size - this.Patch_Margin) {
|
1934
|
+
var diff_type = bigpatch.diffs[0][0];
|
1935
|
+
var diff_text = bigpatch.diffs[0][1];
|
1936
|
+
if (diff_type === DIFF_INSERT) {
|
1937
|
+
// Insertions are harmless.
|
1938
|
+
patch.length2 += diff_text.length;
|
1939
|
+
start2 += diff_text.length;
|
1940
|
+
patch.diffs.push(bigpatch.diffs.shift());
|
1941
|
+
empty = false;
|
1942
|
+
} else if (diff_type === DIFF_DELETE && patch.diffs.length == 1 &&
|
1943
|
+
patch.diffs[0][0] == DIFF_EQUAL &&
|
1944
|
+
diff_text.length > 2 * patch_size) {
|
1945
|
+
// This is a large deletion. Let it pass in one chunk.
|
1946
|
+
patch.length1 += diff_text.length;
|
1947
|
+
start1 += diff_text.length;
|
1948
|
+
empty = false;
|
1949
|
+
patch.diffs.push([diff_type, diff_text]);
|
1950
|
+
bigpatch.diffs.shift();
|
1951
|
+
} else {
|
1952
|
+
// Deletion or equality. Only take as much as we can stomach.
|
1953
|
+
diff_text = diff_text.substring(0,
|
1954
|
+
patch_size - patch.length1 - this.Patch_Margin);
|
1955
|
+
patch.length1 += diff_text.length;
|
1956
|
+
start1 += diff_text.length;
|
1957
|
+
if (diff_type === DIFF_EQUAL) {
|
1958
|
+
patch.length2 += diff_text.length;
|
1959
|
+
start2 += diff_text.length;
|
1960
|
+
} else {
|
1961
|
+
empty = false;
|
1962
|
+
}
|
1963
|
+
patch.diffs.push([diff_type, diff_text]);
|
1964
|
+
if (diff_text == bigpatch.diffs[0][1]) {
|
1965
|
+
bigpatch.diffs.shift();
|
1966
|
+
} else {
|
1967
|
+
bigpatch.diffs[0][1] =
|
1968
|
+
bigpatch.diffs[0][1].substring(diff_text.length);
|
1969
|
+
}
|
1970
|
+
}
|
1971
|
+
}
|
1972
|
+
// Compute the head context for the next patch.
|
1973
|
+
precontext = this.diff_text2(patch.diffs);
|
1974
|
+
precontext =
|
1975
|
+
precontext.substring(precontext.length - this.Patch_Margin);
|
1976
|
+
// Append the end context for this patch.
|
1977
|
+
var postcontext = this.diff_text1(bigpatch.diffs)
|
1978
|
+
.substring(0, this.Patch_Margin);
|
1979
|
+
if (postcontext !== '') {
|
1980
|
+
patch.length1 += postcontext.length;
|
1981
|
+
patch.length2 += postcontext.length;
|
1982
|
+
if (patch.diffs.length !== 0 &&
|
1983
|
+
patch.diffs[patch.diffs.length - 1][0] === DIFF_EQUAL) {
|
1984
|
+
patch.diffs[patch.diffs.length - 1][1] += postcontext;
|
1985
|
+
} else {
|
1986
|
+
patch.diffs.push([DIFF_EQUAL, postcontext]);
|
1987
|
+
}
|
1988
|
+
}
|
1989
|
+
if (!empty) {
|
1990
|
+
patches.splice(++x, 0, patch);
|
1991
|
+
}
|
1992
|
+
}
|
1993
|
+
}
|
1994
|
+
}
|
1995
|
+
};
|
1996
|
+
|
1997
|
+
|
1998
|
+
/**
|
1999
|
+
* Take a list of patches and return a textual representation.
|
2000
|
+
* @param {!Array.<!patch_obj>} patches Array of patch objects.
|
2001
|
+
* @return {string} Text representation of patches.
|
2002
|
+
*/
|
2003
|
+
diff_match_patch.prototype.patch_toText = function(patches) {
|
2004
|
+
var text = [];
|
2005
|
+
for (var x = 0; x < patches.length; x++) {
|
2006
|
+
text[x] = patches[x];
|
2007
|
+
}
|
2008
|
+
return text.join('');
|
2009
|
+
};
|
2010
|
+
|
2011
|
+
|
2012
|
+
/**
|
2013
|
+
* Parse a textual representation of patches and return a list of patch objects.
|
2014
|
+
* @param {string} textline Text representation of patches.
|
2015
|
+
* @return {!Array.<!patch_obj>} Array of patch objects.
|
2016
|
+
* @throws {!Error} If invalid input.
|
2017
|
+
*/
|
2018
|
+
diff_match_patch.prototype.patch_fromText = function(textline) {
|
2019
|
+
var patches = [];
|
2020
|
+
if (!textline) {
|
2021
|
+
return patches;
|
2022
|
+
}
|
2023
|
+
var text = textline.split('\n');
|
2024
|
+
var textPointer = 0;
|
2025
|
+
var patchHeader = /^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;
|
2026
|
+
while (textPointer < text.length) {
|
2027
|
+
var m = text[textPointer].match(patchHeader);
|
2028
|
+
if (!m) {
|
2029
|
+
throw new Error('Invalid patch string: ' + text[textPointer]);
|
2030
|
+
}
|
2031
|
+
var patch = new patch_obj();
|
2032
|
+
patches.push(patch);
|
2033
|
+
patch.start1 = parseInt(m[1], 10);
|
2034
|
+
if (m[2] === '') {
|
2035
|
+
patch.start1--;
|
2036
|
+
patch.length1 = 1;
|
2037
|
+
} else if (m[2] == '0') {
|
2038
|
+
patch.length1 = 0;
|
2039
|
+
} else {
|
2040
|
+
patch.start1--;
|
2041
|
+
patch.length1 = parseInt(m[2], 10);
|
2042
|
+
}
|
2043
|
+
|
2044
|
+
patch.start2 = parseInt(m[3], 10);
|
2045
|
+
if (m[4] === '') {
|
2046
|
+
patch.start2--;
|
2047
|
+
patch.length2 = 1;
|
2048
|
+
} else if (m[4] == '0') {
|
2049
|
+
patch.length2 = 0;
|
2050
|
+
} else {
|
2051
|
+
patch.start2--;
|
2052
|
+
patch.length2 = parseInt(m[4], 10);
|
2053
|
+
}
|
2054
|
+
textPointer++;
|
2055
|
+
|
2056
|
+
while (textPointer < text.length) {
|
2057
|
+
var sign = text[textPointer].charAt(0);
|
2058
|
+
try {
|
2059
|
+
var line = decodeURI(text[textPointer].substring(1));
|
2060
|
+
} catch (ex) {
|
2061
|
+
// Malformed URI sequence.
|
2062
|
+
throw new Error('Illegal escape in patch_fromText: ' + line);
|
2063
|
+
}
|
2064
|
+
if (sign == '-') {
|
2065
|
+
// Deletion.
|
2066
|
+
patch.diffs.push([DIFF_DELETE, line]);
|
2067
|
+
} else if (sign == '+') {
|
2068
|
+
// Insertion.
|
2069
|
+
patch.diffs.push([DIFF_INSERT, line]);
|
2070
|
+
} else if (sign == ' ') {
|
2071
|
+
// Minor equality.
|
2072
|
+
patch.diffs.push([DIFF_EQUAL, line]);
|
2073
|
+
} else if (sign == '@') {
|
2074
|
+
// Start of next patch.
|
2075
|
+
break;
|
2076
|
+
} else if (sign === '') {
|
2077
|
+
// Blank line? Whatever.
|
2078
|
+
} else {
|
2079
|
+
// WTF?
|
2080
|
+
throw new Error('Invalid patch mode "' + sign + '" in: ' + line);
|
2081
|
+
}
|
2082
|
+
textPointer++;
|
2083
|
+
}
|
2084
|
+
}
|
2085
|
+
return patches;
|
2086
|
+
};
|
2087
|
+
|
2088
|
+
|
2089
|
+
/**
|
2090
|
+
* Class representing one patch operation.
|
2091
|
+
* @constructor
|
2092
|
+
*/
|
2093
|
+
function patch_obj() {
|
2094
|
+
/** @type {!Array.<!diff_match_patch.Diff>} */
|
2095
|
+
this.diffs = [];
|
2096
|
+
/** @type {?number} */
|
2097
|
+
this.start1 = null;
|
2098
|
+
/** @type {?number} */
|
2099
|
+
this.start2 = null;
|
2100
|
+
/** @type {number} */
|
2101
|
+
this.length1 = 0;
|
2102
|
+
/** @type {number} */
|
2103
|
+
this.length2 = 0;
|
2104
|
+
}
|
2105
|
+
|
2106
|
+
|
2107
|
+
/**
|
2108
|
+
* Emmulate GNU diff's format.
|
2109
|
+
* Header: @@ -382,8 +481,9 @@
|
2110
|
+
* Indicies are printed as 1-based, not 0-based.
|
2111
|
+
* @return {string} The GNU diff string.
|
2112
|
+
*/
|
2113
|
+
patch_obj.prototype.toString = function() {
|
2114
|
+
var coords1, coords2;
|
2115
|
+
if (this.length1 === 0) {
|
2116
|
+
coords1 = this.start1 + ',0';
|
2117
|
+
} else if (this.length1 == 1) {
|
2118
|
+
coords1 = this.start1 + 1;
|
2119
|
+
} else {
|
2120
|
+
coords1 = (this.start1 + 1) + ',' + this.length1;
|
2121
|
+
}
|
2122
|
+
if (this.length2 === 0) {
|
2123
|
+
coords2 = this.start2 + ',0';
|
2124
|
+
} else if (this.length2 == 1) {
|
2125
|
+
coords2 = this.start2 + 1;
|
2126
|
+
} else {
|
2127
|
+
coords2 = (this.start2 + 1) + ',' + this.length2;
|
2128
|
+
}
|
2129
|
+
var text = ['@@ -' + coords1 + ' +' + coords2 + ' @@\n'];
|
2130
|
+
var op;
|
2131
|
+
// Escape the body of the patch with %xx notation.
|
2132
|
+
for (var x = 0; x < this.diffs.length; x++) {
|
2133
|
+
switch (this.diffs[x][0]) {
|
2134
|
+
case DIFF_INSERT:
|
2135
|
+
op = '+';
|
2136
|
+
break;
|
2137
|
+
case DIFF_DELETE:
|
2138
|
+
op = '-';
|
2139
|
+
break;
|
2140
|
+
case DIFF_EQUAL:
|
2141
|
+
op = ' ';
|
2142
|
+
break;
|
2143
|
+
}
|
2144
|
+
text[x + 1] = op + encodeURI(this.diffs[x][1]) + '\n';
|
2145
|
+
}
|
2146
|
+
return text.join('').replace(/%20/g, ' ');
|
2147
|
+
};
|
2148
|
+
|
2149
|
+
|
2150
|
+
// Export these global variables so that they survive Google's JS compiler.
|
2151
|
+
window['diff_match_patch'] = diff_match_patch;
|
2152
|
+
window['patch_obj'] = patch_obj;
|
2153
|
+
window['DIFF_DELETE'] = DIFF_DELETE;
|
2154
|
+
window['DIFF_INSERT'] = DIFF_INSERT;
|
2155
|
+
window['DIFF_EQUAL'] = DIFF_EQUAL;
|