bedrock_sass 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/_vendor/ace/ace.js +255 -589
- data/assets/_vendor/ace/ext-beautify.js +1 -2
- data/assets/_vendor/ace/ext-elastic_tabstops_lite.js +2 -2
- data/assets/_vendor/ace/ext-emmet.js +4 -4
- data/assets/_vendor/ace/ext-error_marker.js +1 -2
- data/assets/_vendor/ace/ext-keybinding_menu.js +1 -2
- data/assets/_vendor/ace/ext-language_tools.js +5 -9
- data/assets/_vendor/ace/ext-linking.js +1 -2
- data/assets/_vendor/ace/ext-modelist.js +9 -5
- data/assets/_vendor/ace/ext-options.js +10 -7
- data/assets/_vendor/ace/ext-rtl.js +1 -2
- data/assets/_vendor/ace/ext-searchbox.js +8 -4
- data/assets/_vendor/ace/ext-settings_menu.js +10 -7
- data/assets/_vendor/ace/ext-spellcheck.js +1 -2
- data/assets/_vendor/ace/ext-split.js +1 -2
- data/assets/_vendor/ace/ext-static_highlight.js +11 -8
- data/assets/_vendor/ace/ext-statusbar.js +1 -2
- data/assets/_vendor/ace/ext-textarea.js +1 -5
- data/assets/_vendor/ace/ext-themelist.js +2 -4
- data/assets/_vendor/ace/ext-whitespace.js +1 -2
- data/assets/_vendor/ace/keybinding-emacs.js +6 -2
- data/assets/_vendor/ace/keybinding-vim.js +13 -25
- data/assets/_vendor/ace/mode-abap.js +2 -3
- data/assets/_vendor/ace/mode-abc.js +3 -2
- data/assets/_vendor/ace/mode-actionscript.js +2 -2
- data/assets/_vendor/ace/mode-ada.js +1 -2
- data/assets/_vendor/ace/mode-apache_conf.js +2 -2
- data/assets/_vendor/ace/mode-apex.js +457 -0
- data/assets/_vendor/ace/mode-applescript.js +1 -2
- data/assets/_vendor/ace/mode-asciidoc.js +2 -2
- data/assets/_vendor/ace/mode-asl.js +1 -2
- data/assets/_vendor/ace/mode-assembly_x86.js +2 -2
- data/assets/_vendor/ace/mode-autohotkey.js +1 -2
- data/assets/_vendor/ace/mode-batchfile.js +2 -2
- data/assets/_vendor/ace/mode-bro.js +2 -2
- data/assets/_vendor/ace/mode-c9search.js +1 -2
- data/assets/_vendor/ace/mode-c_cpp.js +2 -2
- data/assets/_vendor/ace/mode-cirru.js +1 -2
- data/assets/_vendor/ace/mode-clojure.js +2 -2
- data/assets/_vendor/ace/mode-cobol.js +1 -2
- data/assets/_vendor/ace/mode-coffee.js +1 -2
- data/assets/_vendor/ace/mode-coldfusion.js +3 -2
- data/assets/_vendor/ace/mode-csharp.js +3 -3
- data/assets/_vendor/ace/mode-csound_document.js +319 -80
- data/assets/_vendor/ace/mode-csound_orchestra.js +323 -86
- data/assets/_vendor/ace/mode-csound_score.js +1 -2
- data/assets/_vendor/ace/mode-csp.js +1 -2
- data/assets/_vendor/ace/mode-css.js +2 -2
- data/assets/_vendor/ace/mode-curly.js +3 -2
- data/assets/_vendor/ace/mode-d.js +2 -2
- data/assets/_vendor/ace/mode-dart.js +24 -14
- data/assets/_vendor/ace/mode-diff.js +4 -4
- data/assets/_vendor/ace/mode-django.js +3 -2
- data/assets/_vendor/ace/mode-dockerfile.js +3 -2
- data/assets/_vendor/ace/mode-dot.js +1 -2
- data/assets/_vendor/ace/mode-drools.js +3 -2
- data/assets/_vendor/ace/mode-edifact.js +2 -2
- data/assets/_vendor/ace/mode-eiffel.js +1 -2
- data/assets/_vendor/ace/mode-ejs.js +5 -2
- data/assets/_vendor/ace/mode-elixir.js +2 -2
- data/assets/_vendor/ace/mode-elm.js +1 -2
- data/assets/_vendor/ace/mode-erlang.js +2 -2
- data/assets/_vendor/ace/mode-forth.js +2 -2
- data/assets/_vendor/ace/mode-fortran.js +1 -2
- data/assets/_vendor/ace/mode-fsharp.js +1 -2
- data/assets/_vendor/ace/mode-fsl.js +258 -0
- data/assets/_vendor/ace/mode-ftl.js +3 -2
- data/assets/_vendor/ace/mode-gcode.js +1 -2
- data/assets/_vendor/ace/mode-gherkin.js +2 -4
- data/assets/_vendor/ace/mode-gitignore.js +1 -2
- data/assets/_vendor/ace/mode-glsl.js +2 -2
- data/assets/_vendor/ace/mode-gobstones.js +3 -2
- data/assets/_vendor/ace/mode-golang.js +1 -2
- data/assets/_vendor/ace/mode-graphqlschema.js +1 -2
- data/assets/_vendor/ace/mode-groovy.js +4 -2
- data/assets/_vendor/ace/mode-haml.js +5 -2
- data/assets/_vendor/ace/mode-handlebars.js +3 -2
- data/assets/_vendor/ace/mode-haskell.js +2 -2
- data/assets/_vendor/ace/mode-haskell_cabal.js +1 -2
- data/assets/_vendor/ace/mode-haxe.js +2 -2
- data/assets/_vendor/ace/mode-hjson.js +2 -2
- data/assets/_vendor/ace/mode-html.js +3 -2
- data/assets/_vendor/ace/mode-html_elixir.js +4 -2
- data/assets/_vendor/ace/mode-html_ruby.js +5 -2
- data/assets/_vendor/ace/mode-ini.js +1 -2
- data/assets/_vendor/ace/mode-io.js +2 -2
- data/assets/_vendor/ace/mode-jack.js +1 -2
- data/assets/_vendor/ace/mode-jade.js +14 -115
- data/assets/_vendor/ace/mode-java.js +64 -3
- data/assets/_vendor/ace/mode-javascript.js +2 -2
- data/assets/_vendor/ace/mode-json.js +1 -2
- data/assets/_vendor/ace/mode-jsoniq.js +8 -2317
- data/assets/_vendor/ace/mode-jsp.js +4 -2
- data/assets/_vendor/ace/mode-jssm.js +2 -2
- data/assets/_vendor/ace/mode-jsx.js +1 -2
- data/assets/_vendor/ace/mode-julia.js +2 -2
- data/assets/_vendor/ace/mode-kotlin.js +2 -2
- data/assets/_vendor/ace/mode-latex.js +1 -2
- data/assets/_vendor/ace/mode-less.js +4 -2
- data/assets/_vendor/ace/mode-liquid.js +2026 -477
- data/assets/_vendor/ace/mode-lisp.js +2 -2
- data/assets/_vendor/ace/mode-livescript.js +1 -2
- data/assets/_vendor/ace/mode-logiql.js +2 -2
- data/assets/_vendor/ace/mode-logtalk.js +352 -0
- data/assets/_vendor/ace/mode-lsl.js +1 -2
- data/assets/_vendor/ace/mode-lua.js +1 -2
- data/assets/_vendor/ace/mode-luapage.js +3 -2
- data/assets/_vendor/ace/mode-lucene.js +2 -3
- data/assets/_vendor/ace/mode-makefile.js +3 -2
- data/assets/_vendor/ace/mode-markdown.js +5 -2
- data/assets/_vendor/ace/mode-mask.js +3 -2
- data/assets/_vendor/ace/mode-matlab.js +1 -2
- data/assets/_vendor/ace/mode-maze.js +2 -2
- data/assets/_vendor/ace/mode-mel.js +2 -2
- data/assets/_vendor/ace/mode-mixal.js +1 -2
- data/assets/_vendor/ace/mode-mushcode.js +2 -2
- data/assets/_vendor/ace/mode-mysql.js +3 -4
- data/assets/_vendor/ace/mode-nix.js +2 -2
- data/assets/_vendor/ace/mode-nsis.js +2 -2
- data/assets/_vendor/ace/mode-objectivec.js +3 -2
- data/assets/_vendor/ace/mode-ocaml.js +1 -2
- data/assets/_vendor/ace/mode-pascal.js +2 -2
- data/assets/_vendor/ace/mode-perl.js +2 -2
- data/assets/_vendor/ace/mode-perl6.js +593 -0
- data/assets/_vendor/ace/mode-pgsql.js +304 -69
- data/assets/_vendor/ace/mode-php.js +844 -1029
- data/assets/_vendor/ace/mode-php_laravel_blade.js +844 -1029
- data/assets/_vendor/ace/mode-pig.js +2 -2
- data/assets/_vendor/ace/mode-plain_text.js +1 -2
- data/assets/_vendor/ace/mode-powershell.js +2 -2
- data/assets/_vendor/ace/mode-praat.js +2 -2
- data/assets/_vendor/ace/mode-prolog.js +2 -2
- data/assets/_vendor/ace/mode-properties.js +1 -2
- data/assets/_vendor/ace/mode-protobuf.js +2 -2
- data/assets/_vendor/ace/mode-puppet.js +1 -2
- data/assets/_vendor/ace/mode-python.js +297 -63
- data/assets/_vendor/ace/mode-r.js +3 -2
- data/assets/_vendor/ace/mode-razor.js +9 -3
- data/assets/_vendor/ace/mode-rdoc.js +2 -2
- data/assets/_vendor/ace/mode-red.js +2 -2
- data/assets/_vendor/ace/mode-redshift.js +1 -2
- data/assets/_vendor/ace/mode-rhtml.js +5 -2
- data/assets/_vendor/ace/mode-rst.js +1 -2
- data/assets/_vendor/ace/mode-ruby.js +3 -2
- data/assets/_vendor/ace/mode-rust.js +2 -2
- data/assets/_vendor/ace/mode-sass.js +205 -117
- data/assets/_vendor/ace/mode-scad.js +2 -2
- data/assets/_vendor/ace/mode-scala.js +3 -2
- data/assets/_vendor/ace/mode-scheme.js +2 -2
- data/assets/_vendor/ace/mode-scss.js +204 -115
- data/assets/_vendor/ace/mode-sh.js +3 -2
- data/assets/_vendor/ace/mode-sjs.js +2 -2
- data/assets/_vendor/ace/mode-slim.js +18 -117
- data/assets/_vendor/ace/mode-smarty.js +3 -2
- data/assets/_vendor/ace/mode-snippets.js +1 -2
- data/assets/_vendor/ace/mode-soy_template.js +4 -2
- data/assets/_vendor/ace/mode-space.js +1 -2
- data/assets/_vendor/ace/mode-sparql.js +2 -2
- data/assets/_vendor/ace/mode-sql.js +2 -3
- data/assets/_vendor/ace/mode-sqlserver.js +2 -2
- data/assets/_vendor/ace/mode-stylus.js +3 -2
- data/assets/_vendor/ace/mode-svg.js +2 -2
- data/assets/_vendor/ace/mode-swift.js +1 -2
- data/assets/_vendor/ace/mode-tcl.js +2 -2
- data/assets/_vendor/ace/mode-terraform.js +1 -2
- data/assets/_vendor/ace/mode-tex.js +2 -2
- data/assets/_vendor/ace/mode-text.js +1 -2
- data/assets/_vendor/ace/mode-textile.js +1 -2
- data/assets/_vendor/ace/mode-toml.js +1 -2
- data/assets/_vendor/ace/mode-tsx.js +2 -2
- data/assets/_vendor/ace/mode-turtle.js +2 -2
- data/assets/_vendor/ace/mode-twig.js +3 -2
- data/assets/_vendor/ace/mode-typescript.js +2 -2
- data/assets/_vendor/ace/mode-vala.js +2 -2
- data/assets/_vendor/ace/mode-vbscript.js +1 -2
- data/assets/_vendor/ace/mode-velocity.js +4 -2
- data/assets/_vendor/ace/mode-verilog.js +1 -2
- data/assets/_vendor/ace/mode-vhdl.js +1 -2
- data/assets/_vendor/ace/mode-visualforce.js +2641 -0
- data/assets/_vendor/ace/mode-wollok.js +3 -2
- data/assets/_vendor/ace/mode-xml.js +1 -2
- data/assets/_vendor/ace/mode-xquery.js +8 -2287
- data/assets/_vendor/ace/mode-yaml.js +1 -2
- data/assets/_vendor/ace/snippets/abap.js +2 -3
- data/assets/_vendor/ace/snippets/abc.js +1 -2
- data/assets/_vendor/ace/snippets/actionscript.js +1 -2
- data/assets/_vendor/ace/snippets/ada.js +2 -3
- data/assets/_vendor/ace/snippets/apache_conf.js +2 -3
- data/assets/_vendor/ace/snippets/apex.js +14 -0
- data/assets/_vendor/ace/snippets/applescript.js +2 -3
- data/assets/_vendor/ace/snippets/asciidoc.js +2 -3
- data/assets/_vendor/ace/snippets/asl.js +2 -3
- data/assets/_vendor/ace/snippets/assembly_x86.js +2 -3
- data/assets/_vendor/ace/snippets/autohotkey.js +2 -3
- data/assets/_vendor/ace/snippets/batchfile.js +2 -3
- data/assets/_vendor/ace/snippets/bro.js +1 -2
- data/assets/_vendor/ace/snippets/c9search.js +2 -3
- data/assets/_vendor/ace/snippets/c_cpp.js +1 -2
- data/assets/_vendor/ace/snippets/cirru.js +2 -3
- data/assets/_vendor/ace/snippets/clojure.js +1 -2
- data/assets/_vendor/ace/snippets/cobol.js +2 -3
- data/assets/_vendor/ace/snippets/coffee.js +1 -2
- data/assets/_vendor/ace/snippets/coldfusion.js +2 -3
- data/assets/_vendor/ace/snippets/csharp.js +2 -3
- data/assets/_vendor/ace/snippets/csound_document.js +1 -2
- data/assets/_vendor/ace/snippets/csound_orchestra.js +1 -2
- data/assets/_vendor/ace/snippets/csound_score.js +2 -3
- data/assets/_vendor/ace/snippets/csp.js +1 -2
- data/assets/_vendor/ace/snippets/css.js +1 -2
- data/assets/_vendor/ace/snippets/curly.js +2 -3
- data/assets/_vendor/ace/snippets/d.js +2 -3
- data/assets/_vendor/ace/snippets/dart.js +1 -2
- data/assets/_vendor/ace/snippets/diff.js +1 -2
- data/assets/_vendor/ace/snippets/django.js +1 -2
- data/assets/_vendor/ace/snippets/dockerfile.js +2 -3
- data/assets/_vendor/ace/snippets/dot.js +2 -3
- data/assets/_vendor/ace/snippets/drools.js +1 -2
- data/assets/_vendor/ace/snippets/edifact.js +1 -2
- data/assets/_vendor/ace/snippets/eiffel.js +2 -3
- data/assets/_vendor/ace/snippets/ejs.js +2 -3
- data/assets/_vendor/ace/snippets/elixir.js +1 -2
- data/assets/_vendor/ace/snippets/elm.js +2 -3
- data/assets/_vendor/ace/snippets/erlang.js +1 -2
- data/assets/_vendor/ace/snippets/forth.js +2 -3
- data/assets/_vendor/ace/snippets/fortran.js +2 -3
- data/assets/_vendor/ace/snippets/fsharp.js +2 -3
- data/assets/_vendor/ace/snippets/fsl.js +14 -0
- data/assets/_vendor/ace/snippets/ftl.js +2 -3
- data/assets/_vendor/ace/snippets/gcode.js +2 -3
- data/assets/_vendor/ace/snippets/gherkin.js +2 -3
- data/assets/_vendor/ace/snippets/gitignore.js +2 -3
- data/assets/_vendor/ace/snippets/glsl.js +2 -3
- data/assets/_vendor/ace/snippets/gobstones.js +1 -2
- data/assets/_vendor/ace/snippets/golang.js +2 -3
- data/assets/_vendor/ace/snippets/graphqlschema.js +1 -2
- data/assets/_vendor/ace/snippets/groovy.js +2 -3
- data/assets/_vendor/ace/snippets/haml.js +1 -2
- data/assets/_vendor/ace/snippets/handlebars.js +2 -3
- data/assets/_vendor/ace/snippets/haskell.js +1 -2
- data/assets/_vendor/ace/snippets/haskell_cabal.js +2 -3
- data/assets/_vendor/ace/snippets/haxe.js +2 -3
- data/assets/_vendor/ace/snippets/hjson.js +1 -2
- data/assets/_vendor/ace/snippets/html.js +1 -2
- data/assets/_vendor/ace/snippets/html_elixir.js +2 -3
- data/assets/_vendor/ace/snippets/html_ruby.js +2 -3
- data/assets/_vendor/ace/snippets/ini.js +2 -3
- data/assets/_vendor/ace/snippets/io.js +1 -2
- data/assets/_vendor/ace/snippets/jack.js +2 -3
- data/assets/_vendor/ace/snippets/jade.js +2 -3
- data/assets/_vendor/ace/snippets/java.js +1 -2
- data/assets/_vendor/ace/snippets/javascript.js +1 -2
- data/assets/_vendor/ace/snippets/json.js +2 -3
- data/assets/_vendor/ace/snippets/jsoniq.js +1 -2
- data/assets/_vendor/ace/snippets/jsp.js +1 -2
- data/assets/_vendor/ace/snippets/jssm.js +1 -2
- data/assets/_vendor/ace/snippets/jsx.js +2 -3
- data/assets/_vendor/ace/snippets/julia.js +2 -3
- data/assets/_vendor/ace/snippets/kotlin.js +1 -2
- data/assets/_vendor/ace/snippets/latex.js +2 -3
- data/assets/_vendor/ace/snippets/less.js +2 -3
- data/assets/_vendor/ace/snippets/liquid.js +883 -3
- data/assets/_vendor/ace/snippets/lisp.js +2 -3
- data/assets/_vendor/ace/snippets/livescript.js +2 -3
- data/assets/_vendor/ace/snippets/logiql.js +2 -3
- data/assets/_vendor/ace/snippets/logtalk.js +14 -0
- data/assets/_vendor/ace/snippets/lsl.js +1 -2
- data/assets/_vendor/ace/snippets/lua.js +1 -2
- data/assets/_vendor/ace/snippets/luapage.js +2 -3
- data/assets/_vendor/ace/snippets/lucene.js +2 -3
- data/assets/_vendor/ace/snippets/makefile.js +1 -2
- data/assets/_vendor/ace/snippets/markdown.js +1 -2
- data/assets/_vendor/ace/snippets/mask.js +2 -3
- data/assets/_vendor/ace/snippets/matlab.js +2 -3
- data/assets/_vendor/ace/snippets/maze.js +1 -2
- data/assets/_vendor/ace/snippets/mel.js +2 -3
- data/assets/_vendor/ace/snippets/mixal.js +2 -3
- data/assets/_vendor/ace/snippets/mushcode.js +2 -3
- data/assets/_vendor/ace/snippets/mysql.js +2 -3
- data/assets/_vendor/ace/snippets/nix.js +2 -3
- data/assets/_vendor/ace/snippets/nsis.js +1 -2
- data/assets/_vendor/ace/snippets/objectivec.js +2 -3
- data/assets/_vendor/ace/snippets/ocaml.js +2 -3
- data/assets/_vendor/ace/snippets/pascal.js +2 -3
- data/assets/_vendor/ace/snippets/perl.js +1 -2
- data/assets/_vendor/ace/snippets/perl6.js +14 -0
- data/assets/_vendor/ace/snippets/pgsql.js +2 -3
- data/assets/_vendor/ace/snippets/php.js +1 -2
- data/assets/_vendor/ace/snippets/php_laravel_blade.js +2 -3
- data/assets/_vendor/ace/snippets/pig.js +2 -3
- data/assets/_vendor/ace/snippets/plain_text.js +2 -3
- data/assets/_vendor/ace/snippets/powershell.js +2 -3
- data/assets/_vendor/ace/snippets/praat.js +2 -3
- data/assets/_vendor/ace/snippets/prolog.js +2 -3
- data/assets/_vendor/ace/snippets/properties.js +2 -3
- data/assets/_vendor/ace/snippets/protobuf.js +1 -2
- data/assets/_vendor/ace/snippets/puppet.js +2 -3
- data/assets/_vendor/ace/snippets/python.js +1 -2
- data/assets/_vendor/ace/snippets/r.js +1 -2
- data/assets/_vendor/ace/snippets/razor.js +1 -2
- data/assets/_vendor/ace/snippets/rdoc.js +2 -3
- data/assets/_vendor/ace/snippets/red.js +1 -2
- data/assets/_vendor/ace/snippets/redshift.js +2 -3
- data/assets/_vendor/ace/snippets/rhtml.js +2 -3
- data/assets/_vendor/ace/snippets/rst.js +1 -2
- data/assets/_vendor/ace/snippets/ruby.js +1 -2
- data/assets/_vendor/ace/snippets/rust.js +2 -3
- data/assets/_vendor/ace/snippets/sass.js +2 -3
- data/assets/_vendor/ace/snippets/scad.js +2 -3
- data/assets/_vendor/ace/snippets/scala.js +2 -3
- data/assets/_vendor/ace/snippets/scheme.js +2 -3
- data/assets/_vendor/ace/snippets/scss.js +2 -3
- data/assets/_vendor/ace/snippets/sh.js +1 -2
- data/assets/_vendor/ace/snippets/sjs.js +2 -3
- data/assets/_vendor/ace/snippets/slim.js +2 -3
- data/assets/_vendor/ace/snippets/smarty.js +2 -3
- data/assets/_vendor/ace/snippets/snippets.js +1 -2
- data/assets/_vendor/ace/snippets/soy_template.js +2 -3
- data/assets/_vendor/ace/snippets/space.js +2 -3
- data/assets/_vendor/ace/snippets/sparql.js +1 -2
- data/assets/_vendor/ace/snippets/sql.js +1 -2
- data/assets/_vendor/ace/snippets/sqlserver.js +1 -2
- data/assets/_vendor/ace/snippets/stylus.js +2 -3
- data/assets/_vendor/ace/snippets/svg.js +2 -3
- data/assets/_vendor/ace/snippets/swift.js +2 -3
- data/assets/_vendor/ace/snippets/tcl.js +1 -2
- data/assets/_vendor/ace/snippets/terraform.js +2 -3
- data/assets/_vendor/ace/snippets/tex.js +1 -2
- data/assets/_vendor/ace/snippets/text.js +2 -3
- data/assets/_vendor/ace/snippets/textile.js +1 -2
- data/assets/_vendor/ace/snippets/toml.js +2 -3
- data/assets/_vendor/ace/snippets/tsx.js +2 -3
- data/assets/_vendor/ace/snippets/turtle.js +1 -2
- data/assets/_vendor/ace/snippets/twig.js +2 -3
- data/assets/_vendor/ace/snippets/typescript.js +2 -3
- data/assets/_vendor/ace/snippets/vala.js +1 -2
- data/assets/_vendor/ace/snippets/vbscript.js +2 -3
- data/assets/_vendor/ace/snippets/velocity.js +1 -2
- data/assets/_vendor/ace/snippets/verilog.js +2 -3
- data/assets/_vendor/ace/snippets/vhdl.js +2 -3
- data/assets/_vendor/ace/snippets/visualforce.js +14 -0
- data/assets/_vendor/ace/snippets/wollok.js +1 -2
- data/assets/_vendor/ace/snippets/xml.js +2 -3
- data/assets/_vendor/ace/snippets/xquery.js +1 -2
- data/assets/_vendor/ace/snippets/yaml.js +2 -3
- data/assets/_vendor/ace/theme-ambiance.js +1 -2
- data/assets/_vendor/ace/theme-chaos.js +1 -2
- data/assets/_vendor/ace/theme-chrome.js +1 -2
- data/assets/_vendor/ace/theme-clouds.js +1 -2
- data/assets/_vendor/ace/theme-clouds_midnight.js +1 -2
- data/assets/_vendor/ace/theme-cobalt.js +1 -2
- data/assets/_vendor/ace/theme-crimson_editor.js +1 -2
- data/assets/_vendor/ace/theme-dawn.js +1 -2
- data/assets/_vendor/ace/theme-dracula.js +1 -2
- data/assets/_vendor/ace/theme-dreamweaver.js +1 -2
- data/assets/_vendor/ace/theme-eclipse.js +1 -2
- data/assets/_vendor/ace/theme-github.js +3 -3
- data/assets/_vendor/ace/theme-gob.js +1 -2
- data/assets/_vendor/ace/theme-gruvbox.js +1 -2
- data/assets/_vendor/ace/theme-idle_fingers.js +1 -2
- data/assets/_vendor/ace/theme-iplastic.js +1 -2
- data/assets/_vendor/ace/theme-katzenmilch.js +1 -2
- data/assets/_vendor/ace/theme-kr_theme.js +1 -2
- data/assets/_vendor/ace/theme-kuroir.js +1 -2
- data/assets/_vendor/ace/theme-merbivore.js +1 -2
- data/assets/_vendor/ace/theme-merbivore_soft.js +1 -2
- data/assets/_vendor/ace/theme-mono_industrial.js +1 -2
- data/assets/_vendor/ace/theme-monokai.js +1 -2
- data/assets/_vendor/ace/theme-pastel_on_dark.js +1 -2
- data/assets/_vendor/ace/theme-solarized_dark.js +1 -2
- data/assets/_vendor/ace/theme-solarized_light.js +1 -2
- data/assets/_vendor/ace/theme-sqlserver.js +1 -2
- data/assets/_vendor/ace/theme-terminal.js +1 -2
- data/assets/_vendor/ace/theme-textmate.js +1 -2
- data/assets/_vendor/ace/theme-tomorrow.js +1 -2
- data/assets/_vendor/ace/theme-tomorrow_night.js +1 -2
- data/assets/_vendor/ace/theme-tomorrow_night_blue.js +1 -2
- data/assets/_vendor/ace/theme-tomorrow_night_bright.js +1 -2
- data/assets/_vendor/ace/theme-tomorrow_night_eighties.js +1 -2
- data/assets/_vendor/ace/theme-twilight.js +1 -2
- data/assets/_vendor/ace/theme-vibrant_ink.js +1 -2
- data/assets/_vendor/ace/theme-xcode.js +1 -2
- data/assets/_vendor/ace/worker-coffee.js +11 -20
- data/assets/_vendor/ace/worker-css.js +23 -20
- data/assets/_vendor/ace/worker-html.js +25 -31
- data/assets/_vendor/ace/worker-javascript.js +76 -36
- data/assets/_vendor/ace/worker-json.js +25 -20
- data/assets/_vendor/ace/worker-lua.js +68 -69
- data/assets/_vendor/ace/worker-php.js +12 -20
- data/assets/_vendor/ace/worker-xml.js +12 -22
- data/assets/_vendor/ace/worker-xquery.js +44 -12378
- data/assets/_vendor/tinymce/plugins/advlist/plugin.js +137 -137
- data/assets/_vendor/tinymce/plugins/anchor/plugin.js +102 -102
- data/assets/_vendor/tinymce/plugins/autolink/plugin.js +154 -154
- data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +145 -145
- data/assets/_vendor/tinymce/plugins/autosave/plugin.js +207 -217
- data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +89 -89
- data/assets/_vendor/tinymce/plugins/charmap/plugin.js +1246 -1246
- data/assets/_vendor/tinymce/plugins/code/plugin.js +80 -80
- data/assets/_vendor/tinymce/plugins/codesample/plugin.js +852 -852
- data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +109 -109
- data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +144 -144
- data/assets/_vendor/tinymce/plugins/directionality/plugin.js +53 -53
- data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +74 -74
- data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +464 -464
- data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +152 -152
- data/assets/_vendor/tinymce/plugins/help/plugin.js +639 -678
- data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/hr/plugin.js +29 -29
- data/assets/_vendor/tinymce/plugins/image/plugin.js +1119 -1126
- data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +3414 -3445
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/importcss/plugin.js +230 -230
- data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +152 -152
- data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +193 -193
- data/assets/_vendor/tinymce/plugins/link/plugin.js +646 -646
- data/assets/_vendor/tinymce/plugins/lists/plugin.js +2103 -1037
- data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/media/plugin.js +1050 -1050
- data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +69 -69
- data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +98 -98
- data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +91 -91
- data/assets/_vendor/tinymce/plugins/paste/plugin.js +1725 -1364
- data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/preview/plugin.js +107 -107
- data/assets/_vendor/tinymce/plugins/print/plugin.js +28 -28
- data/assets/_vendor/tinymce/plugins/save/plugin.js +101 -101
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +535 -537
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +683 -681
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +95 -95
- data/assets/_vendor/tinymce/plugins/table/plugin.js +8927 -9805
- data/assets/_vendor/tinymce/plugins/table/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/template/plugin.js +305 -311
- data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +317 -317
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +575 -329
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/toc/plugin.js +201 -201
- data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +113 -113
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +419 -471
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +371 -308
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -1
- data/assets/_vendor/tinymce/themes/inlite/theme.js +9272 -9686
- data/assets/_vendor/tinymce/themes/inlite/theme.min.js +1 -1
- data/assets/_vendor/tinymce/themes/mobile/theme.js +12130 -13042
- data/assets/_vendor/tinymce/themes/mobile/theme.min.js +1 -1
- data/assets/_vendor/tinymce/themes/modern/theme.js +9090 -9504
- data/assets/_vendor/tinymce/themes/modern/theme.min.js +1 -1
- data/assets/_vendor/tinymce/tinymce.js +24914 -25218
- data/assets/bedrock/js/bedrock.js +1 -1
- data/assets/bedrock/scss/components/no-content.scss +5 -0
- data/assets/bedrock/scss/components/select-box.scss +1 -1
- data/lib/bedrock_sass.rb +51 -16
- data/lib/bedrock_sass/engine.rb +3 -2
- data/lib/bedrock_sass/version.rb +1 -1
- metadata +17 -7
@@ -1,603 +1,601 @@
|
|
1
1
|
(function () {
|
2
2
|
var searchreplace = (function () {
|
3
|
-
|
3
|
+
'use strict';
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
5
|
+
var Cell = function (initial) {
|
6
|
+
var value = initial;
|
7
|
+
var get = function () {
|
8
|
+
return value;
|
9
|
+
};
|
10
|
+
var set = function (v) {
|
11
|
+
value = v;
|
12
|
+
};
|
13
|
+
var clone = function () {
|
14
|
+
return Cell(get());
|
15
|
+
};
|
16
|
+
return {
|
17
|
+
get: get,
|
18
|
+
set: set,
|
19
|
+
clone: clone
|
20
|
+
};
|
20
21
|
};
|
21
|
-
};
|
22
22
|
|
23
|
-
|
23
|
+
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
24
24
|
|
25
|
-
|
25
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
}
|
30
|
-
function findAndReplaceDOMText(regex, node, replacementNode, captureGroup, schema) {
|
31
|
-
var m;
|
32
|
-
var matches = [];
|
33
|
-
var text, count = 0, doc;
|
34
|
-
var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
|
35
|
-
doc = node.ownerDocument;
|
36
|
-
blockElementsMap = schema.getBlockElements();
|
37
|
-
hiddenTextElementsMap = schema.getWhiteSpaceElements();
|
38
|
-
shortEndedElementsMap = schema.getShortEndedElements();
|
39
|
-
function getMatchIndexes(m, captureGroup) {
|
40
|
-
captureGroup = captureGroup || 0;
|
41
|
-
if (!m[0]) {
|
42
|
-
throw new Error('findAndReplaceDOMText cannot handle zero-length matches');
|
43
|
-
}
|
44
|
-
var index = m.index;
|
45
|
-
if (captureGroup > 0) {
|
46
|
-
var cg = m[captureGroup];
|
47
|
-
if (!cg) {
|
48
|
-
throw new Error('Invalid capture group');
|
49
|
-
}
|
50
|
-
index += m[0].indexOf(cg);
|
51
|
-
m[0] = cg;
|
52
|
-
}
|
53
|
-
return [
|
54
|
-
index,
|
55
|
-
index + m[0].length,
|
56
|
-
[m[0]]
|
57
|
-
];
|
27
|
+
function isContentEditableFalse(node) {
|
28
|
+
return node && node.nodeType === 1 && node.contentEditable === 'false';
|
58
29
|
}
|
59
|
-
function
|
60
|
-
var
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
30
|
+
function findAndReplaceDOMText(regex, node, replacementNode, captureGroup, schema) {
|
31
|
+
var m;
|
32
|
+
var matches = [];
|
33
|
+
var text, count = 0, doc;
|
34
|
+
var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
|
35
|
+
doc = node.ownerDocument;
|
36
|
+
blockElementsMap = schema.getBlockElements();
|
37
|
+
hiddenTextElementsMap = schema.getWhiteSpaceElements();
|
38
|
+
shortEndedElementsMap = schema.getShortEndedElements();
|
39
|
+
function getMatchIndexes(m, captureGroup) {
|
40
|
+
captureGroup = captureGroup || 0;
|
41
|
+
if (!m[0]) {
|
42
|
+
throw new Error('findAndReplaceDOMText cannot handle zero-length matches');
|
43
|
+
}
|
44
|
+
var index = m.index;
|
45
|
+
if (captureGroup > 0) {
|
46
|
+
var cg = m[captureGroup];
|
47
|
+
if (!cg) {
|
48
|
+
throw new Error('Invalid capture group');
|
49
|
+
}
|
50
|
+
index += m[0].indexOf(cg);
|
51
|
+
m[0] = cg;
|
52
|
+
}
|
53
|
+
return [
|
54
|
+
index,
|
55
|
+
index + m[0].length,
|
56
|
+
[m[0]]
|
57
|
+
];
|
73
58
|
}
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
59
|
+
function getText(node) {
|
60
|
+
var txt;
|
61
|
+
if (node.nodeType === 3) {
|
62
|
+
return node.data;
|
63
|
+
}
|
64
|
+
if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
|
65
|
+
return '';
|
66
|
+
}
|
67
|
+
txt = '';
|
68
|
+
if (isContentEditableFalse(node)) {
|
69
|
+
return '\n';
|
70
|
+
}
|
71
|
+
if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
|
72
|
+
txt += '\n';
|
73
|
+
}
|
74
|
+
if (node = node.firstChild) {
|
75
|
+
do {
|
76
|
+
txt += getText(node);
|
77
|
+
} while (node = node.nextSibling);
|
78
|
+
}
|
79
|
+
return txt;
|
78
80
|
}
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
if (blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName] || isContentEditableFalse(curNode)) {
|
86
|
-
atIndex++;
|
87
|
-
}
|
88
|
-
if (curNode.nodeType === 3) {
|
89
|
-
if (!endNode && curNode.length + atIndex >= matchLocation[1]) {
|
90
|
-
endNode = curNode;
|
91
|
-
endNodeIndex = matchLocation[1] - atIndex;
|
92
|
-
} else if (startNode) {
|
93
|
-
innerNodes.push(curNode);
|
94
|
-
}
|
95
|
-
if (!startNode && curNode.length + atIndex > matchLocation[0]) {
|
96
|
-
startNode = curNode;
|
97
|
-
startNodeIndex = matchLocation[0] - atIndex;
|
81
|
+
function stepThroughMatches(node, matches, replaceFn) {
|
82
|
+
var startNode, endNode, startNodeIndex, endNodeIndex, innerNodes = [], atIndex = 0, curNode = node, matchLocation = matches.shift(), matchIndex = 0;
|
83
|
+
out:
|
84
|
+
while (true) {
|
85
|
+
if (blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName] || isContentEditableFalse(curNode)) {
|
86
|
+
atIndex++;
|
98
87
|
}
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
startNode
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
atIndex -= endNode.length - endNodeIndex;
|
112
|
-
startNode = null;
|
113
|
-
endNode = null;
|
114
|
-
innerNodes = [];
|
115
|
-
matchLocation = matches.shift();
|
116
|
-
matchIndex++;
|
117
|
-
if (!matchLocation) {
|
118
|
-
break;
|
88
|
+
if (curNode.nodeType === 3) {
|
89
|
+
if (!endNode && curNode.length + atIndex >= matchLocation[1]) {
|
90
|
+
endNode = curNode;
|
91
|
+
endNodeIndex = matchLocation[1] - atIndex;
|
92
|
+
} else if (startNode) {
|
93
|
+
innerNodes.push(curNode);
|
94
|
+
}
|
95
|
+
if (!startNode && curNode.length + atIndex > matchLocation[0]) {
|
96
|
+
startNode = curNode;
|
97
|
+
startNodeIndex = matchLocation[0] - atIndex;
|
98
|
+
}
|
99
|
+
atIndex += curNode.length;
|
119
100
|
}
|
120
|
-
|
121
|
-
|
122
|
-
|
101
|
+
if (startNode && endNode) {
|
102
|
+
curNode = replaceFn({
|
103
|
+
startNode: startNode,
|
104
|
+
startNodeIndex: startNodeIndex,
|
105
|
+
endNode: endNode,
|
106
|
+
endNodeIndex: endNodeIndex,
|
107
|
+
innerNodes: innerNodes,
|
108
|
+
match: matchLocation[2],
|
109
|
+
matchIndex: matchIndex
|
110
|
+
});
|
111
|
+
atIndex -= endNode.length - endNodeIndex;
|
112
|
+
startNode = null;
|
113
|
+
endNode = null;
|
114
|
+
innerNodes = [];
|
115
|
+
matchLocation = matches.shift();
|
116
|
+
matchIndex++;
|
117
|
+
if (!matchLocation) {
|
118
|
+
break;
|
119
|
+
}
|
120
|
+
} else if ((!hiddenTextElementsMap[curNode.nodeName] || blockElementsMap[curNode.nodeName]) && curNode.firstChild) {
|
121
|
+
if (!isContentEditableFalse(curNode)) {
|
122
|
+
curNode = curNode.firstChild;
|
123
|
+
continue;
|
124
|
+
}
|
125
|
+
} else if (curNode.nextSibling) {
|
126
|
+
curNode = curNode.nextSibling;
|
123
127
|
continue;
|
124
128
|
}
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
curNode = curNode.parentNode;
|
135
|
-
} else {
|
136
|
-
break out;
|
129
|
+
while (true) {
|
130
|
+
if (curNode.nextSibling) {
|
131
|
+
curNode = curNode.nextSibling;
|
132
|
+
break;
|
133
|
+
} else if (curNode.parentNode !== node) {
|
134
|
+
curNode = curNode.parentNode;
|
135
|
+
} else {
|
136
|
+
break out;
|
137
|
+
}
|
137
138
|
}
|
138
139
|
}
|
140
|
+
}
|
141
|
+
function genReplacer(nodeName) {
|
142
|
+
var makeReplacementNode;
|
143
|
+
if (typeof nodeName !== 'function') {
|
144
|
+
var stencilNode_1 = nodeName.nodeType ? nodeName : doc.createElement(nodeName);
|
145
|
+
makeReplacementNode = function (fill, matchIndex) {
|
146
|
+
var clone = stencilNode_1.cloneNode(false);
|
147
|
+
clone.setAttribute('data-mce-index', matchIndex);
|
148
|
+
if (fill) {
|
149
|
+
clone.appendChild(doc.createTextNode(fill));
|
150
|
+
}
|
151
|
+
return clone;
|
152
|
+
};
|
153
|
+
} else {
|
154
|
+
makeReplacementNode = nodeName;
|
139
155
|
}
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
var
|
147
|
-
|
148
|
-
|
149
|
-
|
156
|
+
return function (range) {
|
157
|
+
var before;
|
158
|
+
var after;
|
159
|
+
var parentNode;
|
160
|
+
var startNode = range.startNode;
|
161
|
+
var endNode = range.endNode;
|
162
|
+
var matchIndex = range.matchIndex;
|
163
|
+
if (startNode === endNode) {
|
164
|
+
var node_1 = startNode;
|
165
|
+
parentNode = node_1.parentNode;
|
166
|
+
if (range.startNodeIndex > 0) {
|
167
|
+
before = doc.createTextNode(node_1.data.substring(0, range.startNodeIndex));
|
168
|
+
parentNode.insertBefore(before, node_1);
|
169
|
+
}
|
170
|
+
var el = makeReplacementNode(range.match[0], matchIndex);
|
171
|
+
parentNode.insertBefore(el, node_1);
|
172
|
+
if (range.endNodeIndex < node_1.length) {
|
173
|
+
after = doc.createTextNode(node_1.data.substring(range.endNodeIndex));
|
174
|
+
parentNode.insertBefore(after, node_1);
|
175
|
+
}
|
176
|
+
node_1.parentNode.removeChild(node_1);
|
177
|
+
return el;
|
178
|
+
}
|
179
|
+
before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
|
180
|
+
after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
|
181
|
+
var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
|
182
|
+
for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
|
183
|
+
var innerNode = range.innerNodes[i];
|
184
|
+
var innerEl = makeReplacementNode(innerNode.data, matchIndex);
|
185
|
+
innerNode.parentNode.replaceChild(innerEl, innerNode);
|
150
186
|
}
|
151
|
-
|
187
|
+
var elB = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
|
188
|
+
parentNode = startNode.parentNode;
|
189
|
+
parentNode.insertBefore(before, startNode);
|
190
|
+
parentNode.insertBefore(elA, startNode);
|
191
|
+
parentNode.removeChild(startNode);
|
192
|
+
parentNode = endNode.parentNode;
|
193
|
+
parentNode.insertBefore(elB, endNode);
|
194
|
+
parentNode.insertBefore(after, endNode);
|
195
|
+
parentNode.removeChild(endNode);
|
196
|
+
return elB;
|
152
197
|
};
|
153
|
-
} else {
|
154
|
-
makeReplacementNode = nodeName;
|
155
198
|
}
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
if (startNode === endNode) {
|
164
|
-
var node_1 = startNode;
|
165
|
-
parentNode = node_1.parentNode;
|
166
|
-
if (range.startNodeIndex > 0) {
|
167
|
-
before = doc.createTextNode(node_1.data.substring(0, range.startNodeIndex));
|
168
|
-
parentNode.insertBefore(before, node_1);
|
169
|
-
}
|
170
|
-
var el = makeReplacementNode(range.match[0], matchIndex);
|
171
|
-
parentNode.insertBefore(el, node_1);
|
172
|
-
if (range.endNodeIndex < node_1.length) {
|
173
|
-
after = doc.createTextNode(node_1.data.substring(range.endNodeIndex));
|
174
|
-
parentNode.insertBefore(after, node_1);
|
175
|
-
}
|
176
|
-
node_1.parentNode.removeChild(node_1);
|
177
|
-
return el;
|
178
|
-
}
|
179
|
-
before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
|
180
|
-
after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
|
181
|
-
var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
|
182
|
-
var innerEls = [];
|
183
|
-
for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
|
184
|
-
var innerNode = range.innerNodes[i];
|
185
|
-
var innerEl = makeReplacementNode(innerNode.data, matchIndex);
|
186
|
-
innerNode.parentNode.replaceChild(innerEl, innerNode);
|
187
|
-
innerEls.push(innerEl);
|
199
|
+
text = getText(node);
|
200
|
+
if (!text) {
|
201
|
+
return;
|
202
|
+
}
|
203
|
+
if (regex.global) {
|
204
|
+
while (m = regex.exec(text)) {
|
205
|
+
matches.push(getMatchIndexes(m, captureGroup));
|
188
206
|
}
|
189
|
-
|
190
|
-
|
191
|
-
parentNode.insertBefore(before, startNode);
|
192
|
-
parentNode.insertBefore(elA, startNode);
|
193
|
-
parentNode.removeChild(startNode);
|
194
|
-
parentNode = endNode.parentNode;
|
195
|
-
parentNode.insertBefore(elB, endNode);
|
196
|
-
parentNode.insertBefore(after, endNode);
|
197
|
-
parentNode.removeChild(endNode);
|
198
|
-
return elB;
|
199
|
-
};
|
200
|
-
}
|
201
|
-
text = getText(node);
|
202
|
-
if (!text) {
|
203
|
-
return;
|
204
|
-
}
|
205
|
-
if (regex.global) {
|
206
|
-
while (m = regex.exec(text)) {
|
207
|
+
} else {
|
208
|
+
m = text.match(regex);
|
207
209
|
matches.push(getMatchIndexes(m, captureGroup));
|
208
210
|
}
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
count = matches.length;
|
215
|
-
stepThroughMatches(node, matches, genReplacer(replacementNode));
|
211
|
+
if (matches.length) {
|
212
|
+
count = matches.length;
|
213
|
+
stepThroughMatches(node, matches, genReplacer(replacementNode));
|
214
|
+
}
|
215
|
+
return count;
|
216
216
|
}
|
217
|
-
|
218
|
-
}
|
219
|
-
var $_g9bydlk0jm0ofzvp = { findAndReplaceDOMText: findAndReplaceDOMText };
|
217
|
+
var FindReplaceText = { findAndReplaceDOMText: findAndReplaceDOMText };
|
220
218
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
}
|
226
|
-
return value;
|
227
|
-
};
|
228
|
-
var markAllMatches = function (editor, currentIndexState, regex) {
|
229
|
-
var node, marker;
|
230
|
-
marker = editor.dom.create('span', { 'data-mce-bogus': 1 });
|
231
|
-
marker.className = 'mce-match-marker';
|
232
|
-
node = editor.getBody();
|
233
|
-
done(editor, currentIndexState, false);
|
234
|
-
return $_g9bydlk0jm0ofzvp.findAndReplaceDOMText(regex, node, marker, false, editor.schema);
|
235
|
-
};
|
236
|
-
var unwrap = function (node) {
|
237
|
-
var parentNode = node.parentNode;
|
238
|
-
if (node.firstChild) {
|
239
|
-
parentNode.insertBefore(node.firstChild, node);
|
240
|
-
}
|
241
|
-
node.parentNode.removeChild(node);
|
242
|
-
};
|
243
|
-
var findSpansByIndex = function (editor, index) {
|
244
|
-
var nodes;
|
245
|
-
var spans = [];
|
246
|
-
nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
|
247
|
-
if (nodes.length) {
|
248
|
-
for (var i = 0; i < nodes.length; i++) {
|
249
|
-
var nodeIndex = getElmIndex(nodes[i]);
|
250
|
-
if (nodeIndex === null || !nodeIndex.length) {
|
251
|
-
continue;
|
252
|
-
}
|
253
|
-
if (nodeIndex === index.toString()) {
|
254
|
-
spans.push(nodes[i]);
|
255
|
-
}
|
219
|
+
var getElmIndex = function (elm) {
|
220
|
+
var value = elm.getAttribute('data-mce-index');
|
221
|
+
if (typeof value === 'number') {
|
222
|
+
return '' + value;
|
256
223
|
}
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
}
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
text = text.replace(/\s/g, '\\s');
|
288
|
-
text = wholeWord ? '\\b' + text + '\\b' : text;
|
289
|
-
var count = markAllMatches(editor, currentIndexState, new RegExp(text, matchCase ? 'g' : 'gi'));
|
290
|
-
if (count) {
|
291
|
-
currentIndexState.set(-1);
|
292
|
-
currentIndexState.set(moveSelection(editor, currentIndexState, true));
|
293
|
-
}
|
294
|
-
return count;
|
295
|
-
};
|
296
|
-
var next = function (editor, currentIndexState) {
|
297
|
-
var index = moveSelection(editor, currentIndexState, true);
|
298
|
-
if (index !== -1) {
|
299
|
-
currentIndexState.set(index);
|
300
|
-
}
|
301
|
-
};
|
302
|
-
var prev = function (editor, currentIndexState) {
|
303
|
-
var index = moveSelection(editor, currentIndexState, false);
|
304
|
-
if (index !== -1) {
|
305
|
-
currentIndexState.set(index);
|
306
|
-
}
|
307
|
-
};
|
308
|
-
var isMatchSpan = function (node) {
|
309
|
-
var matchIndex = getElmIndex(node);
|
310
|
-
return matchIndex !== null && matchIndex.length > 0;
|
311
|
-
};
|
312
|
-
var replace = function (editor, currentIndexState, text, forward, all) {
|
313
|
-
var i, nodes, node, matchIndex, currentMatchIndex, nextIndex = currentIndexState.get(), hasMore;
|
314
|
-
forward = forward !== false;
|
315
|
-
node = editor.getBody();
|
316
|
-
nodes = global$1.grep(global$1.toArray(node.getElementsByTagName('span')), isMatchSpan);
|
317
|
-
for (i = 0; i < nodes.length; i++) {
|
318
|
-
var nodeIndex = getElmIndex(nodes[i]);
|
319
|
-
matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
|
320
|
-
if (all || matchIndex === currentIndexState.get()) {
|
321
|
-
if (text.length) {
|
322
|
-
nodes[i].firstChild.nodeValue = text;
|
323
|
-
unwrap(nodes[i]);
|
324
|
-
} else {
|
325
|
-
removeNode(editor.dom, nodes[i]);
|
224
|
+
return value;
|
225
|
+
};
|
226
|
+
var markAllMatches = function (editor, currentIndexState, regex) {
|
227
|
+
var node, marker;
|
228
|
+
marker = editor.dom.create('span', { 'data-mce-bogus': 1 });
|
229
|
+
marker.className = 'mce-match-marker';
|
230
|
+
node = editor.getBody();
|
231
|
+
done(editor, currentIndexState, false);
|
232
|
+
return FindReplaceText.findAndReplaceDOMText(regex, node, marker, false, editor.schema);
|
233
|
+
};
|
234
|
+
var unwrap = function (node) {
|
235
|
+
var parentNode = node.parentNode;
|
236
|
+
if (node.firstChild) {
|
237
|
+
parentNode.insertBefore(node.firstChild, node);
|
238
|
+
}
|
239
|
+
node.parentNode.removeChild(node);
|
240
|
+
};
|
241
|
+
var findSpansByIndex = function (editor, index) {
|
242
|
+
var nodes;
|
243
|
+
var spans = [];
|
244
|
+
nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
|
245
|
+
if (nodes.length) {
|
246
|
+
for (var i = 0; i < nodes.length; i++) {
|
247
|
+
var nodeIndex = getElmIndex(nodes[i]);
|
248
|
+
if (nodeIndex === null || !nodeIndex.length) {
|
249
|
+
continue;
|
250
|
+
}
|
251
|
+
if (nodeIndex === index.toString()) {
|
252
|
+
spans.push(nodes[i]);
|
253
|
+
}
|
326
254
|
}
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
255
|
+
}
|
256
|
+
return spans;
|
257
|
+
};
|
258
|
+
var moveSelection = function (editor, currentIndexState, forward) {
|
259
|
+
var testIndex = currentIndexState.get();
|
260
|
+
var dom = editor.dom;
|
261
|
+
forward = forward !== false;
|
262
|
+
if (forward) {
|
263
|
+
testIndex++;
|
264
|
+
} else {
|
265
|
+
testIndex--;
|
266
|
+
}
|
267
|
+
dom.removeClass(findSpansByIndex(editor, currentIndexState.get()), 'mce-match-marker-selected');
|
268
|
+
var spans = findSpansByIndex(editor, testIndex);
|
269
|
+
if (spans.length) {
|
270
|
+
dom.addClass(findSpansByIndex(editor, testIndex), 'mce-match-marker-selected');
|
271
|
+
editor.selection.scrollIntoView(spans[0]);
|
272
|
+
return testIndex;
|
273
|
+
}
|
274
|
+
return -1;
|
275
|
+
};
|
276
|
+
var removeNode = function (dom, node) {
|
277
|
+
var parent = node.parentNode;
|
278
|
+
dom.remove(node);
|
279
|
+
if (dom.isEmpty(parent)) {
|
280
|
+
dom.remove(parent);
|
281
|
+
}
|
282
|
+
};
|
283
|
+
var find = function (editor, currentIndexState, text, matchCase, wholeWord) {
|
284
|
+
text = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
285
|
+
text = text.replace(/\s/g, '[^\\S\\r\\n]');
|
286
|
+
text = wholeWord ? '\\b' + text + '\\b' : text;
|
287
|
+
var count = markAllMatches(editor, currentIndexState, new RegExp(text, matchCase ? 'g' : 'gi'));
|
288
|
+
if (count) {
|
289
|
+
currentIndexState.set(-1);
|
290
|
+
currentIndexState.set(moveSelection(editor, currentIndexState, true));
|
291
|
+
}
|
292
|
+
return count;
|
293
|
+
};
|
294
|
+
var next = function (editor, currentIndexState) {
|
295
|
+
var index = moveSelection(editor, currentIndexState, true);
|
296
|
+
if (index !== -1) {
|
297
|
+
currentIndexState.set(index);
|
298
|
+
}
|
299
|
+
};
|
300
|
+
var prev = function (editor, currentIndexState) {
|
301
|
+
var index = moveSelection(editor, currentIndexState, false);
|
302
|
+
if (index !== -1) {
|
303
|
+
currentIndexState.set(index);
|
304
|
+
}
|
305
|
+
};
|
306
|
+
var isMatchSpan = function (node) {
|
307
|
+
var matchIndex = getElmIndex(node);
|
308
|
+
return matchIndex !== null && matchIndex.length > 0;
|
309
|
+
};
|
310
|
+
var replace = function (editor, currentIndexState, text, forward, all) {
|
311
|
+
var i, nodes, node, matchIndex, currentMatchIndex, nextIndex = currentIndexState.get(), hasMore;
|
312
|
+
forward = forward !== false;
|
313
|
+
node = editor.getBody();
|
314
|
+
nodes = global$1.grep(global$1.toArray(node.getElementsByTagName('span')), isMatchSpan);
|
315
|
+
for (i = 0; i < nodes.length; i++) {
|
316
|
+
var nodeIndex = getElmIndex(nodes[i]);
|
317
|
+
matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
|
318
|
+
if (all || matchIndex === currentIndexState.get()) {
|
319
|
+
if (text.length) {
|
320
|
+
nodes[i].firstChild.nodeValue = text;
|
321
|
+
unwrap(nodes[i]);
|
331
322
|
} else {
|
332
|
-
i
|
333
|
-
break;
|
323
|
+
removeNode(editor.dom, nodes[i]);
|
334
324
|
}
|
325
|
+
while (nodes[++i]) {
|
326
|
+
matchIndex = parseInt(getElmIndex(nodes[i]), 10);
|
327
|
+
if (matchIndex === currentMatchIndex) {
|
328
|
+
removeNode(editor.dom, nodes[i]);
|
329
|
+
} else {
|
330
|
+
i--;
|
331
|
+
break;
|
332
|
+
}
|
333
|
+
}
|
334
|
+
if (forward) {
|
335
|
+
nextIndex--;
|
336
|
+
}
|
337
|
+
} else if (currentMatchIndex > currentIndexState.get()) {
|
338
|
+
nodes[i].setAttribute('data-mce-index', currentMatchIndex - 1);
|
335
339
|
}
|
336
|
-
if (forward) {
|
337
|
-
nextIndex--;
|
338
|
-
}
|
339
|
-
} else if (currentMatchIndex > currentIndexState.get()) {
|
340
|
-
nodes[i].setAttribute('data-mce-index', currentMatchIndex - 1);
|
341
340
|
}
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
341
|
+
currentIndexState.set(nextIndex);
|
342
|
+
if (forward) {
|
343
|
+
hasMore = hasNext(editor, currentIndexState);
|
344
|
+
next(editor, currentIndexState);
|
345
|
+
} else {
|
346
|
+
hasMore = hasPrev(editor, currentIndexState);
|
347
|
+
prev(editor, currentIndexState);
|
348
|
+
}
|
349
|
+
return !all && hasMore;
|
350
|
+
};
|
351
|
+
var done = function (editor, currentIndexState, keepEditorSelection) {
|
352
|
+
var i, nodes, startContainer, endContainer;
|
353
|
+
nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
|
354
|
+
for (i = 0; i < nodes.length; i++) {
|
355
|
+
var nodeIndex = getElmIndex(nodes[i]);
|
356
|
+
if (nodeIndex !== null && nodeIndex.length) {
|
357
|
+
if (nodeIndex === currentIndexState.get().toString()) {
|
358
|
+
if (!startContainer) {
|
359
|
+
startContainer = nodes[i].firstChild;
|
360
|
+
}
|
361
|
+
endContainer = nodes[i].firstChild;
|
362
362
|
}
|
363
|
-
|
363
|
+
unwrap(nodes[i]);
|
364
364
|
}
|
365
|
-
unwrap(nodes[i]);
|
366
365
|
}
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
366
|
+
if (startContainer && endContainer) {
|
367
|
+
var rng = editor.dom.createRng();
|
368
|
+
rng.setStart(startContainer, 0);
|
369
|
+
rng.setEnd(endContainer, endContainer.data.length);
|
370
|
+
if (keepEditorSelection !== false) {
|
371
|
+
editor.selection.setRng(rng);
|
372
|
+
}
|
373
|
+
return rng;
|
374
374
|
}
|
375
|
-
return rng;
|
376
|
-
}
|
377
|
-
};
|
378
|
-
var hasNext = function (editor, currentIndexState) {
|
379
|
-
return findSpansByIndex(editor, currentIndexState.get() + 1).length > 0;
|
380
|
-
};
|
381
|
-
var hasPrev = function (editor, currentIndexState) {
|
382
|
-
return findSpansByIndex(editor, currentIndexState.get() - 1).length > 0;
|
383
|
-
};
|
384
|
-
var $_czmqpkjyjm0ofzvi = {
|
385
|
-
done: done,
|
386
|
-
find: find,
|
387
|
-
next: next,
|
388
|
-
prev: prev,
|
389
|
-
replace: replace,
|
390
|
-
hasNext: hasNext,
|
391
|
-
hasPrev: hasPrev
|
392
|
-
};
|
393
|
-
|
394
|
-
var get = function (editor, currentIndexState) {
|
395
|
-
var done = function (keepEditorSelection) {
|
396
|
-
return $_czmqpkjyjm0ofzvi.done(editor, currentIndexState, keepEditorSelection);
|
397
|
-
};
|
398
|
-
var find = function (text, matchCase, wholeWord) {
|
399
|
-
return $_czmqpkjyjm0ofzvi.find(editor, currentIndexState, text, matchCase, wholeWord);
|
400
|
-
};
|
401
|
-
var next = function () {
|
402
|
-
return $_czmqpkjyjm0ofzvi.next(editor, currentIndexState);
|
403
375
|
};
|
404
|
-
var
|
405
|
-
return
|
376
|
+
var hasNext = function (editor, currentIndexState) {
|
377
|
+
return findSpansByIndex(editor, currentIndexState.get() + 1).length > 0;
|
406
378
|
};
|
407
|
-
var
|
408
|
-
return
|
379
|
+
var hasPrev = function (editor, currentIndexState) {
|
380
|
+
return findSpansByIndex(editor, currentIndexState.get() - 1).length > 0;
|
409
381
|
};
|
410
|
-
|
382
|
+
var Actions = {
|
411
383
|
done: done,
|
412
384
|
find: find,
|
413
385
|
next: next,
|
414
386
|
prev: prev,
|
415
|
-
replace: replace
|
387
|
+
replace: replace,
|
388
|
+
hasNext: hasNext,
|
389
|
+
hasPrev: hasPrev
|
416
390
|
};
|
417
|
-
};
|
418
|
-
var $_nqujjxjm0ofzvg = { get: get };
|
419
391
|
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
updateButtonStates();
|
468
|
-
last = {
|
469
|
-
text: text,
|
470
|
-
caseState: caseState,
|
471
|
-
wholeWord: wholeWord
|
472
|
-
};
|
473
|
-
},
|
474
|
-
buttons: [
|
475
|
-
{
|
476
|
-
text: 'Find',
|
477
|
-
subtype: 'primary',
|
478
|
-
onclick: function () {
|
479
|
-
win.submit();
|
480
|
-
}
|
481
|
-
},
|
482
|
-
{
|
483
|
-
text: 'Replace',
|
484
|
-
disabled: true,
|
485
|
-
onclick: function () {
|
486
|
-
if (!$_czmqpkjyjm0ofzvi.replace(editor, currentIndexState, win.find('#replace').value())) {
|
487
|
-
win.statusbar.items().slice(1).disabled(true);
|
488
|
-
currentIndexState.set(-1);
|
489
|
-
last = {};
|
490
|
-
}
|
491
|
-
}
|
392
|
+
var get = function (editor, currentIndexState) {
|
393
|
+
var done = function (keepEditorSelection) {
|
394
|
+
return Actions.done(editor, currentIndexState, keepEditorSelection);
|
395
|
+
};
|
396
|
+
var find = function (text, matchCase, wholeWord) {
|
397
|
+
return Actions.find(editor, currentIndexState, text, matchCase, wholeWord);
|
398
|
+
};
|
399
|
+
var next = function () {
|
400
|
+
return Actions.next(editor, currentIndexState);
|
401
|
+
};
|
402
|
+
var prev = function () {
|
403
|
+
return Actions.prev(editor, currentIndexState);
|
404
|
+
};
|
405
|
+
var replace = function (text, forward, all) {
|
406
|
+
return Actions.replace(editor, currentIndexState, text, forward, all);
|
407
|
+
};
|
408
|
+
return {
|
409
|
+
done: done,
|
410
|
+
find: find,
|
411
|
+
next: next,
|
412
|
+
prev: prev,
|
413
|
+
replace: replace
|
414
|
+
};
|
415
|
+
};
|
416
|
+
var Api = { get: get };
|
417
|
+
|
418
|
+
var open = function (editor, currentIndexState) {
|
419
|
+
var last = {}, selectedText;
|
420
|
+
editor.undoManager.add();
|
421
|
+
selectedText = global$1.trim(editor.selection.getContent({ format: 'text' }));
|
422
|
+
function updateButtonStates() {
|
423
|
+
win.statusbar.find('#next').disabled(Actions.hasNext(editor, currentIndexState) === false);
|
424
|
+
win.statusbar.find('#prev').disabled(Actions.hasPrev(editor, currentIndexState) === false);
|
425
|
+
}
|
426
|
+
function notFoundAlert() {
|
427
|
+
editor.windowManager.alert('Could not find the specified string.', function () {
|
428
|
+
win.find('#find')[0].focus();
|
429
|
+
});
|
430
|
+
}
|
431
|
+
var win = editor.windowManager.open({
|
432
|
+
layout: 'flex',
|
433
|
+
pack: 'center',
|
434
|
+
align: 'center',
|
435
|
+
onClose: function () {
|
436
|
+
editor.focus();
|
437
|
+
Actions.done(editor, currentIndexState);
|
438
|
+
editor.undoManager.add();
|
492
439
|
},
|
493
|
-
{
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
440
|
+
onSubmit: function (e) {
|
441
|
+
var count, caseState, text, wholeWord;
|
442
|
+
e.preventDefault();
|
443
|
+
caseState = win.find('#case').checked();
|
444
|
+
wholeWord = win.find('#words').checked();
|
445
|
+
text = win.find('#find').value();
|
446
|
+
if (!text.length) {
|
447
|
+
Actions.done(editor, currentIndexState, false);
|
498
448
|
win.statusbar.items().slice(1).disabled(true);
|
499
|
-
|
449
|
+
return;
|
500
450
|
}
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
text: 'Prev',
|
508
|
-
name: 'prev',
|
509
|
-
disabled: true,
|
510
|
-
onclick: function () {
|
511
|
-
$_czmqpkjyjm0ofzvi.prev(editor, currentIndexState);
|
451
|
+
if (last.text === text && last.caseState === caseState && last.wholeWord === wholeWord) {
|
452
|
+
if (!Actions.hasNext(editor, currentIndexState)) {
|
453
|
+
notFoundAlert();
|
454
|
+
return;
|
455
|
+
}
|
456
|
+
Actions.next(editor, currentIndexState);
|
512
457
|
updateButtonStates();
|
458
|
+
return;
|
513
459
|
}
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
name: 'next',
|
518
|
-
disabled: true,
|
519
|
-
onclick: function () {
|
520
|
-
$_czmqpkjyjm0ofzvi.next(editor, currentIndexState);
|
521
|
-
updateButtonStates();
|
460
|
+
count = Actions.find(editor, currentIndexState, text, caseState, wholeWord);
|
461
|
+
if (!count) {
|
462
|
+
notFoundAlert();
|
522
463
|
}
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
464
|
+
win.statusbar.items().slice(1).disabled(count === 0);
|
465
|
+
updateButtonStates();
|
466
|
+
last = {
|
467
|
+
text: text,
|
468
|
+
caseState: caseState,
|
469
|
+
wholeWord: wholeWord
|
470
|
+
};
|
471
|
+
},
|
472
|
+
buttons: [
|
473
|
+
{
|
474
|
+
text: 'Find',
|
475
|
+
subtype: 'primary',
|
476
|
+
onclick: function () {
|
477
|
+
win.submit();
|
478
|
+
}
|
479
|
+
},
|
480
|
+
{
|
481
|
+
text: 'Replace',
|
482
|
+
disabled: true,
|
483
|
+
onclick: function () {
|
484
|
+
if (!Actions.replace(editor, currentIndexState, win.find('#replace').value())) {
|
485
|
+
win.statusbar.items().slice(1).disabled(true);
|
486
|
+
currentIndexState.set(-1);
|
487
|
+
last = {};
|
488
|
+
}
|
489
|
+
}
|
490
|
+
},
|
532
491
|
{
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
492
|
+
text: 'Replace all',
|
493
|
+
disabled: true,
|
494
|
+
onclick: function () {
|
495
|
+
Actions.replace(editor, currentIndexState, win.find('#replace').value(), true, true);
|
496
|
+
win.statusbar.items().slice(1).disabled(true);
|
497
|
+
last = {};
|
498
|
+
}
|
538
499
|
},
|
539
500
|
{
|
540
|
-
type: '
|
541
|
-
|
542
|
-
size: 40,
|
543
|
-
label: 'Replace with'
|
501
|
+
type: 'spacer',
|
502
|
+
flex: 1
|
544
503
|
},
|
545
504
|
{
|
546
|
-
|
547
|
-
name: '
|
548
|
-
|
549
|
-
|
505
|
+
text: 'Prev',
|
506
|
+
name: 'prev',
|
507
|
+
disabled: true,
|
508
|
+
onclick: function () {
|
509
|
+
Actions.prev(editor, currentIndexState);
|
510
|
+
updateButtonStates();
|
511
|
+
}
|
550
512
|
},
|
551
513
|
{
|
552
|
-
|
553
|
-
name: '
|
554
|
-
|
555
|
-
|
514
|
+
text: 'Next',
|
515
|
+
name: 'next',
|
516
|
+
disabled: true,
|
517
|
+
onclick: function () {
|
518
|
+
Actions.next(editor, currentIndexState);
|
519
|
+
updateButtonStates();
|
520
|
+
}
|
556
521
|
}
|
557
|
-
]
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
522
|
+
],
|
523
|
+
title: 'Find and replace',
|
524
|
+
items: {
|
525
|
+
type: 'form',
|
526
|
+
padding: 20,
|
527
|
+
labelGap: 30,
|
528
|
+
spacing: 10,
|
529
|
+
items: [
|
530
|
+
{
|
531
|
+
type: 'textbox',
|
532
|
+
name: 'find',
|
533
|
+
size: 40,
|
534
|
+
label: 'Find',
|
535
|
+
value: selectedText
|
536
|
+
},
|
537
|
+
{
|
538
|
+
type: 'textbox',
|
539
|
+
name: 'replace',
|
540
|
+
size: 40,
|
541
|
+
label: 'Replace with'
|
542
|
+
},
|
543
|
+
{
|
544
|
+
type: 'checkbox',
|
545
|
+
name: 'case',
|
546
|
+
text: 'Match case',
|
547
|
+
label: ' '
|
548
|
+
},
|
549
|
+
{
|
550
|
+
type: 'checkbox',
|
551
|
+
name: 'words',
|
552
|
+
text: 'Whole words',
|
553
|
+
label: ' '
|
554
|
+
}
|
555
|
+
]
|
556
|
+
}
|
557
|
+
});
|
558
|
+
};
|
559
|
+
var Dialog = { open: open };
|
562
560
|
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
561
|
+
var register = function (editor, currentIndexState) {
|
562
|
+
editor.addCommand('SearchReplace', function () {
|
563
|
+
Dialog.open(editor, currentIndexState);
|
564
|
+
});
|
565
|
+
};
|
566
|
+
var Commands = { register: register };
|
569
567
|
|
570
|
-
|
571
|
-
|
572
|
-
|
568
|
+
var showDialog = function (editor, currentIndexState) {
|
569
|
+
return function () {
|
570
|
+
Dialog.open(editor, currentIndexState);
|
571
|
+
};
|
573
572
|
};
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
var $_d1nvw7k3jm0ofzvz = { register: register$1 };
|
573
|
+
var register$1 = function (editor, currentIndexState) {
|
574
|
+
editor.addMenuItem('searchreplace', {
|
575
|
+
text: 'Find and replace',
|
576
|
+
shortcut: 'Meta+F',
|
577
|
+
onclick: showDialog(editor, currentIndexState),
|
578
|
+
separator: 'before',
|
579
|
+
context: 'edit'
|
580
|
+
});
|
581
|
+
editor.addButton('searchreplace', {
|
582
|
+
tooltip: 'Find and replace',
|
583
|
+
onclick: showDialog(editor, currentIndexState)
|
584
|
+
});
|
585
|
+
editor.shortcuts.add('Meta+F', '', showDialog(editor, currentIndexState));
|
586
|
+
};
|
587
|
+
var Buttons = { register: register$1 };
|
590
588
|
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
589
|
+
global.add('searchreplace', function (editor) {
|
590
|
+
var currentIndexState = Cell(-1);
|
591
|
+
Commands.register(editor, currentIndexState);
|
592
|
+
Buttons.register(editor, currentIndexState);
|
593
|
+
return Api.get(editor, currentIndexState);
|
594
|
+
});
|
595
|
+
function Plugin () {
|
596
|
+
}
|
599
597
|
|
600
|
-
|
598
|
+
return Plugin;
|
601
599
|
|
602
600
|
}());
|
603
601
|
})();
|