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,713 +1,713 @@
|
|
1
1
|
(function () {
|
2
2
|
var link = (function () {
|
3
|
-
|
3
|
+
'use strict';
|
4
4
|
|
5
|
-
|
5
|
+
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
6
6
|
|
7
|
-
|
7
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
9
|
+
var assumeExternalTargets = function (editorSettings) {
|
10
|
+
return typeof editorSettings.link_assume_external_targets === 'boolean' ? editorSettings.link_assume_external_targets : false;
|
11
|
+
};
|
12
|
+
var hasContextToolbar = function (editorSettings) {
|
13
|
+
return typeof editorSettings.link_context_toolbar === 'boolean' ? editorSettings.link_context_toolbar : false;
|
14
|
+
};
|
15
|
+
var getLinkList = function (editorSettings) {
|
16
|
+
return editorSettings.link_list;
|
17
|
+
};
|
18
|
+
var hasDefaultLinkTarget = function (editorSettings) {
|
19
|
+
return typeof editorSettings.default_link_target === 'string';
|
20
|
+
};
|
21
|
+
var getDefaultLinkTarget = function (editorSettings) {
|
22
|
+
return editorSettings.default_link_target;
|
23
|
+
};
|
24
|
+
var getTargetList = function (editorSettings) {
|
25
|
+
return editorSettings.target_list;
|
26
|
+
};
|
27
|
+
var setTargetList = function (editor, list) {
|
28
|
+
editor.settings.target_list = list;
|
29
|
+
};
|
30
|
+
var shouldShowTargetList = function (editorSettings) {
|
31
|
+
return getTargetList(editorSettings) !== false;
|
32
|
+
};
|
33
|
+
var getRelList = function (editorSettings) {
|
34
|
+
return editorSettings.rel_list;
|
35
|
+
};
|
36
|
+
var hasRelList = function (editorSettings) {
|
37
|
+
return getRelList(editorSettings) !== undefined;
|
38
|
+
};
|
39
|
+
var getLinkClassList = function (editorSettings) {
|
40
|
+
return editorSettings.link_class_list;
|
41
|
+
};
|
42
|
+
var hasLinkClassList = function (editorSettings) {
|
43
|
+
return getLinkClassList(editorSettings) !== undefined;
|
44
|
+
};
|
45
|
+
var shouldShowLinkTitle = function (editorSettings) {
|
46
|
+
return editorSettings.link_title !== false;
|
47
|
+
};
|
48
|
+
var allowUnsafeLinkTarget = function (editorSettings) {
|
49
|
+
return typeof editorSettings.allow_unsafe_link_target === 'boolean' ? editorSettings.allow_unsafe_link_target : false;
|
50
|
+
};
|
51
|
+
var Settings = {
|
52
|
+
assumeExternalTargets: assumeExternalTargets,
|
53
|
+
hasContextToolbar: hasContextToolbar,
|
54
|
+
getLinkList: getLinkList,
|
55
|
+
hasDefaultLinkTarget: hasDefaultLinkTarget,
|
56
|
+
getDefaultLinkTarget: getDefaultLinkTarget,
|
57
|
+
getTargetList: getTargetList,
|
58
|
+
setTargetList: setTargetList,
|
59
|
+
shouldShowTargetList: shouldShowTargetList,
|
60
|
+
getRelList: getRelList,
|
61
|
+
hasRelList: hasRelList,
|
62
|
+
getLinkClassList: getLinkClassList,
|
63
|
+
hasLinkClassList: hasLinkClassList,
|
64
|
+
shouldShowLinkTitle: shouldShowLinkTitle,
|
65
|
+
allowUnsafeLinkTarget: allowUnsafeLinkTarget
|
66
|
+
};
|
67
67
|
|
68
|
-
|
68
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
69
69
|
|
70
|
-
|
70
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
|
71
71
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
72
|
+
var appendClickRemove = function (link, evt) {
|
73
|
+
document.body.appendChild(link);
|
74
|
+
link.dispatchEvent(evt);
|
75
|
+
document.body.removeChild(link);
|
76
|
+
};
|
77
|
+
var open$$1 = function (url) {
|
78
|
+
if (!global$3.ie || global$3.ie > 10) {
|
79
|
+
var link = document.createElement('a');
|
80
|
+
link.target = '_blank';
|
81
|
+
link.href = url;
|
82
|
+
link.rel = 'noreferrer noopener';
|
83
|
+
var evt = document.createEvent('MouseEvents');
|
84
|
+
evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
85
|
+
appendClickRemove(link, evt);
|
86
|
+
} else {
|
87
|
+
var win = window.open('', '_blank');
|
88
|
+
if (win) {
|
89
|
+
win.opener = null;
|
90
|
+
var doc = win.document;
|
91
|
+
doc.open();
|
92
|
+
doc.write('<meta http-equiv="refresh" content="0; url=' + global$2.DOM.encode(url) + '">');
|
93
|
+
doc.close();
|
94
|
+
}
|
94
95
|
}
|
95
|
-
}
|
96
|
-
|
97
|
-
var $_evd3tpfvjm0ofzck = { open: open$$1 };
|
96
|
+
};
|
97
|
+
var OpenUrl = { open: open$$1 };
|
98
98
|
|
99
|
-
|
99
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
100
100
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
101
|
+
var toggleTargetRules = function (rel, isUnsafe) {
|
102
|
+
var rules = ['noopener'];
|
103
|
+
var newRel = rel ? rel.split(/\s+/) : [];
|
104
|
+
var toString = function (rel) {
|
105
|
+
return global$4.trim(rel.sort().join(' '));
|
106
|
+
};
|
107
|
+
var addTargetRules = function (rel) {
|
108
|
+
rel = removeTargetRules(rel);
|
109
|
+
return rel.length ? rel.concat(rules) : rules;
|
110
|
+
};
|
111
|
+
var removeTargetRules = function (rel) {
|
112
|
+
return rel.filter(function (val) {
|
113
|
+
return global$4.inArray(rules, val) === -1;
|
114
|
+
});
|
115
|
+
};
|
116
|
+
newRel = isUnsafe ? addTargetRules(newRel) : removeTargetRules(newRel);
|
117
|
+
return newRel.length ? toString(newRel) : null;
|
115
118
|
};
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
}
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
var
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
119
|
+
var trimCaretContainers = function (text) {
|
120
|
+
return text.replace(/\uFEFF/g, '');
|
121
|
+
};
|
122
|
+
var getAnchorElement = function (editor, selectedElm) {
|
123
|
+
selectedElm = selectedElm || editor.selection.getNode();
|
124
|
+
if (isImageFigure(selectedElm)) {
|
125
|
+
return editor.dom.select('a[href]', selectedElm)[0];
|
126
|
+
} else {
|
127
|
+
return editor.dom.getParent(selectedElm, 'a[href]');
|
128
|
+
}
|
129
|
+
};
|
130
|
+
var getAnchorText = function (selection, anchorElm) {
|
131
|
+
var text = anchorElm ? anchorElm.innerText || anchorElm.textContent : selection.getContent({ format: 'text' });
|
132
|
+
return trimCaretContainers(text);
|
133
|
+
};
|
134
|
+
var isLink = function (elm) {
|
135
|
+
return elm && elm.nodeName === 'A' && elm.href;
|
136
|
+
};
|
137
|
+
var hasLinks = function (elements) {
|
138
|
+
return global$4.grep(elements, isLink).length > 0;
|
139
|
+
};
|
140
|
+
var isOnlyTextSelected = function (html) {
|
141
|
+
if (/</.test(html) && (!/^<a [^>]+>[^<]+<\/a>$/.test(html) || html.indexOf('href=') === -1)) {
|
142
|
+
return false;
|
143
|
+
}
|
144
|
+
return true;
|
145
|
+
};
|
146
|
+
var isImageFigure = function (node) {
|
147
|
+
return node && node.nodeName === 'FIGURE' && /\bimage\b/i.test(node.className);
|
148
|
+
};
|
149
|
+
var link = function (editor, attachState) {
|
150
|
+
return function (data) {
|
151
|
+
editor.undoManager.transact(function () {
|
152
|
+
var selectedElm = editor.selection.getNode();
|
153
|
+
var anchorElm = getAnchorElement(editor, selectedElm);
|
154
|
+
var linkAttrs = {
|
155
|
+
href: data.href,
|
156
|
+
target: data.target ? data.target : null,
|
157
|
+
rel: data.rel ? data.rel : null,
|
158
|
+
class: data.class ? data.class : null,
|
159
|
+
title: data.title ? data.title : null
|
160
|
+
};
|
161
|
+
if (!Settings.hasRelList(editor.settings) && Settings.allowUnsafeLinkTarget(editor.settings) === false) {
|
162
|
+
linkAttrs.rel = toggleTargetRules(linkAttrs.rel, linkAttrs.target === '_blank');
|
163
|
+
}
|
164
|
+
if (data.href === attachState.href) {
|
165
|
+
attachState.attach();
|
166
|
+
attachState = {};
|
167
|
+
}
|
168
|
+
if (anchorElm) {
|
169
|
+
editor.focus();
|
170
|
+
if (data.hasOwnProperty('text')) {
|
171
|
+
if ('innerText' in anchorElm) {
|
172
|
+
anchorElm.innerText = data.text;
|
173
|
+
} else {
|
174
|
+
anchorElm.textContent = data.text;
|
175
|
+
}
|
176
|
+
}
|
177
|
+
editor.dom.setAttribs(anchorElm, linkAttrs);
|
178
|
+
editor.selection.select(anchorElm);
|
179
|
+
editor.undoManager.add();
|
180
|
+
} else {
|
181
|
+
if (isImageFigure(selectedElm)) {
|
182
|
+
linkImageFigure(editor, selectedElm, linkAttrs);
|
183
|
+
} else if (data.hasOwnProperty('text')) {
|
184
|
+
editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(data.text)));
|
173
185
|
} else {
|
174
|
-
|
186
|
+
editor.execCommand('mceInsertLink', false, linkAttrs);
|
175
187
|
}
|
176
188
|
}
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
189
|
+
});
|
190
|
+
};
|
191
|
+
};
|
192
|
+
var unlink = function (editor) {
|
193
|
+
return function () {
|
194
|
+
editor.undoManager.transact(function () {
|
195
|
+
var node = editor.selection.getNode();
|
196
|
+
if (isImageFigure(node)) {
|
197
|
+
unlinkImageFigure(editor, node);
|
185
198
|
} else {
|
186
|
-
editor.execCommand('
|
199
|
+
editor.execCommand('unlink');
|
187
200
|
}
|
188
|
-
}
|
189
|
-
}
|
201
|
+
});
|
202
|
+
};
|
190
203
|
};
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
if (
|
197
|
-
|
198
|
-
|
199
|
-
editor.execCommand('unlink');
|
204
|
+
var unlinkImageFigure = function (editor, fig) {
|
205
|
+
var a, img;
|
206
|
+
img = editor.dom.select('img', fig)[0];
|
207
|
+
if (img) {
|
208
|
+
a = editor.dom.getParents(img, 'a[href]', fig)[0];
|
209
|
+
if (a) {
|
210
|
+
a.parentNode.insertBefore(img, a);
|
211
|
+
editor.dom.remove(a);
|
200
212
|
}
|
201
|
-
}
|
213
|
+
}
|
202
214
|
};
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
a.parentNode.insertBefore(img, a);
|
211
|
-
editor.dom.remove(a);
|
215
|
+
var linkImageFigure = function (editor, fig, attrs) {
|
216
|
+
var a, img;
|
217
|
+
img = editor.dom.select('img', fig)[0];
|
218
|
+
if (img) {
|
219
|
+
a = editor.dom.create('a', attrs);
|
220
|
+
img.parentNode.insertBefore(a, img);
|
221
|
+
a.appendChild(img);
|
212
222
|
}
|
213
|
-
}
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
var $_d522tkfzjm0ofzda = {
|
225
|
-
link: link,
|
226
|
-
unlink: unlink,
|
227
|
-
isLink: isLink,
|
228
|
-
hasLinks: hasLinks,
|
229
|
-
isOnlyTextSelected: isOnlyTextSelected,
|
230
|
-
getAnchorElement: getAnchorElement,
|
231
|
-
getAnchorText: getAnchorText,
|
232
|
-
toggleTargetRules: toggleTargetRules
|
233
|
-
};
|
223
|
+
};
|
224
|
+
var Utils = {
|
225
|
+
link: link,
|
226
|
+
unlink: unlink,
|
227
|
+
isLink: isLink,
|
228
|
+
hasLinks: hasLinks,
|
229
|
+
isOnlyTextSelected: isOnlyTextSelected,
|
230
|
+
getAnchorElement: getAnchorElement,
|
231
|
+
getAnchorText: getAnchorText,
|
232
|
+
toggleTargetRules: toggleTargetRules
|
233
|
+
};
|
234
234
|
|
235
|
-
|
235
|
+
var global$5 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
236
236
|
|
237
|
-
|
237
|
+
var global$6 = tinymce.util.Tools.resolve('tinymce.util.XHR');
|
238
238
|
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
}
|
248
|
-
});
|
249
|
-
} else if (typeof linkList === 'function') {
|
250
|
-
linkList(function (list) {
|
251
|
-
callback(editor, list);
|
252
|
-
});
|
253
|
-
} else {
|
254
|
-
callback(editor, linkList);
|
255
|
-
}
|
256
|
-
};
|
257
|
-
var buildListItems = function (inputList, itemCallback, startItems) {
|
258
|
-
var appendItems = function (values, output) {
|
259
|
-
output = output || [];
|
260
|
-
global$4.each(values, function (item) {
|
261
|
-
var menuItem = { text: item.text || item.title };
|
262
|
-
if (item.menu) {
|
263
|
-
menuItem.menu = appendItems(item.menu);
|
264
|
-
} else {
|
265
|
-
menuItem.value = item.value;
|
266
|
-
if (itemCallback) {
|
267
|
-
itemCallback(menuItem);
|
239
|
+
var attachState = {};
|
240
|
+
var createLinkList = function (editor, callback) {
|
241
|
+
var linkList = Settings.getLinkList(editor.settings);
|
242
|
+
if (typeof linkList === 'string') {
|
243
|
+
global$6.send({
|
244
|
+
url: linkList,
|
245
|
+
success: function (text) {
|
246
|
+
callback(editor, JSON.parse(text));
|
268
247
|
}
|
269
|
-
}
|
270
|
-
output.push(menuItem);
|
271
|
-
});
|
272
|
-
return output;
|
273
|
-
};
|
274
|
-
return appendItems(inputList, startItems || []);
|
275
|
-
};
|
276
|
-
var delayedConfirm = function (editor, message, callback) {
|
277
|
-
var rng = editor.selection.getRng();
|
278
|
-
global$5.setEditorTimeout(editor, function () {
|
279
|
-
editor.windowManager.confirm(message, function (state) {
|
280
|
-
editor.selection.setRng(rng);
|
281
|
-
callback(state);
|
282
|
-
});
|
283
|
-
});
|
284
|
-
};
|
285
|
-
var showDialog = function (editor, linkList) {
|
286
|
-
var data = {};
|
287
|
-
var selection = editor.selection;
|
288
|
-
var dom = editor.dom;
|
289
|
-
var anchorElm, initialText;
|
290
|
-
var win, onlyText, textListCtrl, linkListCtrl, relListCtrl, targetListCtrl, classListCtrl, linkTitleCtrl, value;
|
291
|
-
var linkListChangeHandler = function (e) {
|
292
|
-
var textCtrl = win.find('#text');
|
293
|
-
if (!textCtrl.value() || e.lastControl && textCtrl.value() === e.lastControl.text()) {
|
294
|
-
textCtrl.value(e.control.text());
|
295
|
-
}
|
296
|
-
win.find('#href').value(e.control.value());
|
297
|
-
};
|
298
|
-
var buildAnchorListControl = function (url) {
|
299
|
-
var anchorList = [];
|
300
|
-
global$4.each(editor.dom.select('a:not([href])'), function (anchor) {
|
301
|
-
var id = anchor.name || anchor.id;
|
302
|
-
if (id) {
|
303
|
-
anchorList.push({
|
304
|
-
text: id,
|
305
|
-
value: '#' + id,
|
306
|
-
selected: url.indexOf('#' + id) !== -1
|
307
|
-
});
|
308
|
-
}
|
309
|
-
});
|
310
|
-
if (anchorList.length) {
|
311
|
-
anchorList.unshift({
|
312
|
-
text: 'None',
|
313
|
-
value: ''
|
314
248
|
});
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
};
|
322
|
-
}
|
323
|
-
};
|
324
|
-
var updateText = function () {
|
325
|
-
if (!initialText && onlyText && !data.text) {
|
326
|
-
this.parent().parent().find('#text')[0].value(this.value());
|
249
|
+
} else if (typeof linkList === 'function') {
|
250
|
+
linkList(function (list) {
|
251
|
+
callback(editor, list);
|
252
|
+
});
|
253
|
+
} else {
|
254
|
+
callback(editor, linkList);
|
327
255
|
}
|
328
256
|
};
|
329
|
-
var
|
330
|
-
var
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
257
|
+
var buildListItems = function (inputList, itemCallback, startItems) {
|
258
|
+
var appendItems = function (values, output) {
|
259
|
+
output = output || [];
|
260
|
+
global$4.each(values, function (item) {
|
261
|
+
var menuItem = { text: item.text || item.title };
|
262
|
+
if (item.menu) {
|
263
|
+
menuItem.menu = appendItems(item.menu);
|
264
|
+
} else {
|
265
|
+
menuItem.value = item.value;
|
266
|
+
if (itemCallback) {
|
267
|
+
itemCallback(menuItem);
|
268
|
+
}
|
340
269
|
}
|
341
|
-
|
342
|
-
|
343
|
-
|
270
|
+
output.push(menuItem);
|
271
|
+
});
|
272
|
+
return output;
|
273
|
+
};
|
274
|
+
return appendItems(inputList, startItems || []);
|
275
|
+
};
|
276
|
+
var delayedConfirm = function (editor, message, callback) {
|
277
|
+
var rng = editor.selection.getRng();
|
278
|
+
global$5.setEditorTimeout(editor, function () {
|
279
|
+
editor.windowManager.confirm(message, function (state) {
|
280
|
+
editor.selection.setRng(rng);
|
281
|
+
callback(state);
|
282
|
+
});
|
344
283
|
});
|
345
|
-
if (meta.attach) {
|
346
|
-
attachState = {
|
347
|
-
href: this.value(),
|
348
|
-
attach: meta.attach
|
349
|
-
};
|
350
|
-
}
|
351
|
-
if (!meta.text) {
|
352
|
-
updateText.call(this);
|
353
|
-
}
|
354
284
|
};
|
355
|
-
var
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
data.target = $_4b6xsbfujm0ofzch.getDefaultLinkTarget(editor.settings);
|
366
|
-
}
|
367
|
-
if (value = dom.getAttrib(anchorElm, 'rel')) {
|
368
|
-
data.rel = value;
|
369
|
-
}
|
370
|
-
if (value = dom.getAttrib(anchorElm, 'class')) {
|
371
|
-
data.class = value;
|
372
|
-
}
|
373
|
-
if (value = dom.getAttrib(anchorElm, 'title')) {
|
374
|
-
data.title = value;
|
375
|
-
}
|
376
|
-
if (onlyText) {
|
377
|
-
textListCtrl = {
|
378
|
-
name: 'text',
|
379
|
-
type: 'textbox',
|
380
|
-
size: 40,
|
381
|
-
label: 'Text to display',
|
382
|
-
onchange: function () {
|
383
|
-
data.text = this.value();
|
285
|
+
var showDialog = function (editor, linkList) {
|
286
|
+
var data = {};
|
287
|
+
var selection = editor.selection;
|
288
|
+
var dom = editor.dom;
|
289
|
+
var anchorElm, initialText;
|
290
|
+
var win, onlyText, textListCtrl, linkListCtrl, relListCtrl, targetListCtrl, classListCtrl, linkTitleCtrl, value;
|
291
|
+
var linkListChangeHandler = function (e) {
|
292
|
+
var textCtrl = win.find('#text');
|
293
|
+
if (!textCtrl.value() || e.lastControl && textCtrl.value() === e.lastControl.text()) {
|
294
|
+
textCtrl.value(e.control.text());
|
384
295
|
}
|
296
|
+
win.find('#href').value(e.control.value());
|
385
297
|
};
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
298
|
+
var buildAnchorListControl = function (url) {
|
299
|
+
var anchorList = [];
|
300
|
+
global$4.each(editor.dom.select('a:not([href])'), function (anchor) {
|
301
|
+
var id = anchor.name || anchor.id;
|
302
|
+
if (id) {
|
303
|
+
anchorList.push({
|
304
|
+
text: id,
|
305
|
+
value: '#' + id,
|
306
|
+
selected: url.indexOf('#' + id) !== -1
|
307
|
+
});
|
308
|
+
}
|
309
|
+
});
|
310
|
+
if (anchorList.length) {
|
311
|
+
anchorList.unshift({
|
394
312
|
text: 'None',
|
395
313
|
value: ''
|
396
|
-
}
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
314
|
+
});
|
315
|
+
return {
|
316
|
+
name: 'anchor',
|
317
|
+
type: 'listbox',
|
318
|
+
label: 'Anchors',
|
319
|
+
values: anchorList,
|
320
|
+
onselect: linkListChangeHandler
|
321
|
+
};
|
401
322
|
}
|
402
323
|
};
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
{
|
408
|
-
text: 'None',
|
409
|
-
value: ''
|
410
|
-
},
|
411
|
-
{
|
412
|
-
text: 'New window',
|
413
|
-
value: '_blank'
|
414
|
-
}
|
415
|
-
]);
|
416
|
-
}
|
417
|
-
targetListCtrl = {
|
418
|
-
name: 'target',
|
419
|
-
type: 'listbox',
|
420
|
-
label: 'Target',
|
421
|
-
values: buildListItems($_4b6xsbfujm0ofzch.getTargetList(editor.settings))
|
422
|
-
};
|
423
|
-
}
|
424
|
-
if ($_4b6xsbfujm0ofzch.hasRelList(editor.settings)) {
|
425
|
-
relListCtrl = {
|
426
|
-
name: 'rel',
|
427
|
-
type: 'listbox',
|
428
|
-
label: 'Rel',
|
429
|
-
values: buildListItems($_4b6xsbfujm0ofzch.getRelList(editor.settings), function (item) {
|
430
|
-
if ($_4b6xsbfujm0ofzch.allowUnsafeLinkTarget(editor.settings) === false) {
|
431
|
-
item.value = $_d522tkfzjm0ofzda.toggleTargetRules(item.value, data.target === '_blank');
|
432
|
-
}
|
433
|
-
})
|
324
|
+
var updateText = function () {
|
325
|
+
if (!initialText && onlyText && !data.text) {
|
326
|
+
this.parent().parent().find('#text')[0].value(this.value());
|
327
|
+
}
|
434
328
|
};
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
if (
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
329
|
+
var urlChange = function (e) {
|
330
|
+
var meta = e.meta || {};
|
331
|
+
if (linkListCtrl) {
|
332
|
+
linkListCtrl.value(editor.convertURL(this.value(), 'href'));
|
333
|
+
}
|
334
|
+
global$4.each(e.meta, function (value, key) {
|
335
|
+
var inp = win.find('#' + key);
|
336
|
+
if (key === 'text') {
|
337
|
+
if (initialText.length === 0) {
|
338
|
+
inp.value(value);
|
339
|
+
data.text = value;
|
340
|
+
}
|
341
|
+
} else {
|
342
|
+
inp.value(value);
|
449
343
|
}
|
450
|
-
})
|
344
|
+
});
|
345
|
+
if (meta.attach) {
|
346
|
+
attachState = {
|
347
|
+
href: this.value(),
|
348
|
+
attach: meta.attach
|
349
|
+
};
|
350
|
+
}
|
351
|
+
if (!meta.text) {
|
352
|
+
updateText.call(this);
|
353
|
+
}
|
451
354
|
};
|
452
|
-
|
453
|
-
|
454
|
-
linkTitleCtrl = {
|
455
|
-
name: 'title',
|
456
|
-
type: 'textbox',
|
457
|
-
label: 'Title',
|
458
|
-
value: data.title
|
355
|
+
var onBeforeCall = function (e) {
|
356
|
+
e.meta = win.toJSON();
|
459
357
|
};
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
data:
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
358
|
+
onlyText = Utils.isOnlyTextSelected(selection.getContent());
|
359
|
+
anchorElm = Utils.getAnchorElement(editor);
|
360
|
+
data.text = initialText = Utils.getAnchorText(editor.selection, anchorElm);
|
361
|
+
data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : '';
|
362
|
+
if (anchorElm) {
|
363
|
+
data.target = dom.getAttrib(anchorElm, 'target');
|
364
|
+
} else if (Settings.hasDefaultLinkTarget(editor.settings)) {
|
365
|
+
data.target = Settings.getDefaultLinkTarget(editor.settings);
|
366
|
+
}
|
367
|
+
if (value = dom.getAttrib(anchorElm, 'rel')) {
|
368
|
+
data.rel = value;
|
369
|
+
}
|
370
|
+
if (value = dom.getAttrib(anchorElm, 'class')) {
|
371
|
+
data.class = value;
|
372
|
+
}
|
373
|
+
if (value = dom.getAttrib(anchorElm, 'title')) {
|
374
|
+
data.title = value;
|
375
|
+
}
|
376
|
+
if (onlyText) {
|
377
|
+
textListCtrl = {
|
378
|
+
name: 'text',
|
379
|
+
type: 'textbox',
|
469
380
|
size: 40,
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
381
|
+
label: 'Text to display',
|
382
|
+
onchange: function () {
|
383
|
+
data.text = this.value();
|
384
|
+
}
|
385
|
+
};
|
386
|
+
}
|
387
|
+
if (linkList) {
|
388
|
+
linkListCtrl = {
|
389
|
+
type: 'listbox',
|
390
|
+
label: 'Link list',
|
391
|
+
values: buildListItems(linkList, function (item) {
|
392
|
+
item.value = editor.convertURL(item.value || item.url, 'href');
|
393
|
+
}, [{
|
394
|
+
text: 'None',
|
395
|
+
value: ''
|
396
|
+
}]),
|
397
|
+
onselect: linkListChangeHandler,
|
398
|
+
value: editor.convertURL(data.href, 'href'),
|
399
|
+
onPostRender: function () {
|
400
|
+
linkListCtrl = this;
|
401
|
+
}
|
402
|
+
};
|
403
|
+
}
|
404
|
+
if (Settings.shouldShowTargetList(editor.settings)) {
|
405
|
+
if (Settings.getTargetList(editor.settings) === undefined) {
|
406
|
+
Settings.setTargetList(editor, [
|
407
|
+
{
|
408
|
+
text: 'None',
|
409
|
+
value: ''
|
410
|
+
},
|
411
|
+
{
|
412
|
+
text: 'New window',
|
413
|
+
value: '_blank'
|
502
414
|
}
|
503
|
-
|
504
|
-
});
|
505
|
-
return;
|
415
|
+
]);
|
506
416
|
}
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
417
|
+
targetListCtrl = {
|
418
|
+
name: 'target',
|
419
|
+
type: 'listbox',
|
420
|
+
label: 'Target',
|
421
|
+
values: buildListItems(Settings.getTargetList(editor.settings))
|
422
|
+
};
|
423
|
+
}
|
424
|
+
if (Settings.hasRelList(editor.settings)) {
|
425
|
+
relListCtrl = {
|
426
|
+
name: 'rel',
|
427
|
+
type: 'listbox',
|
428
|
+
label: 'Rel',
|
429
|
+
values: buildListItems(Settings.getRelList(editor.settings), function (item) {
|
430
|
+
if (Settings.allowUnsafeLinkTarget(editor.settings) === false) {
|
431
|
+
item.value = Utils.toggleTargetRules(item.value, data.target === '_blank');
|
511
432
|
}
|
512
|
-
|
513
|
-
|
514
|
-
return;
|
515
|
-
}
|
516
|
-
insertLink(resultData);
|
433
|
+
})
|
434
|
+
};
|
517
435
|
}
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
436
|
+
if (Settings.hasLinkClassList(editor.settings)) {
|
437
|
+
classListCtrl = {
|
438
|
+
name: 'class',
|
439
|
+
type: 'listbox',
|
440
|
+
label: 'Class',
|
441
|
+
values: buildListItems(Settings.getLinkClassList(editor.settings), function (item) {
|
442
|
+
if (item.value) {
|
443
|
+
item.textStyle = function () {
|
444
|
+
return editor.formatter.getCssText({
|
445
|
+
inline: 'a',
|
446
|
+
classes: [item.value]
|
447
|
+
});
|
448
|
+
};
|
449
|
+
}
|
450
|
+
})
|
451
|
+
};
|
452
|
+
}
|
453
|
+
if (Settings.shouldShowLinkTitle(editor.settings)) {
|
454
|
+
linkTitleCtrl = {
|
455
|
+
name: 'title',
|
456
|
+
type: 'textbox',
|
457
|
+
label: 'Title',
|
458
|
+
value: data.title
|
459
|
+
};
|
460
|
+
}
|
461
|
+
win = editor.windowManager.open({
|
462
|
+
title: 'Insert link',
|
463
|
+
data: data,
|
464
|
+
body: [
|
465
|
+
{
|
466
|
+
name: 'href',
|
467
|
+
type: 'filepicker',
|
468
|
+
filetype: 'file',
|
469
|
+
size: 40,
|
470
|
+
autofocus: true,
|
471
|
+
label: 'Url',
|
472
|
+
onchange: urlChange,
|
473
|
+
onkeyup: updateText,
|
474
|
+
onpaste: updateText,
|
475
|
+
onbeforecall: onBeforeCall
|
476
|
+
},
|
477
|
+
textListCtrl,
|
478
|
+
linkTitleCtrl,
|
479
|
+
buildAnchorListControl(data.href),
|
480
|
+
linkListCtrl,
|
481
|
+
relListCtrl,
|
482
|
+
targetListCtrl,
|
483
|
+
classListCtrl
|
484
|
+
],
|
485
|
+
onSubmit: function (e) {
|
486
|
+
var assumeExternalTargets = Settings.assumeExternalTargets(editor.settings);
|
487
|
+
var insertLink = Utils.link(editor, attachState);
|
488
|
+
var removeLink = Utils.unlink(editor);
|
489
|
+
var resultData = global$4.extend({}, data, e.data);
|
490
|
+
var href = resultData.href;
|
491
|
+
if (!href) {
|
492
|
+
removeLink();
|
493
|
+
return;
|
494
|
+
}
|
495
|
+
if (!onlyText || resultData.text === initialText) {
|
496
|
+
delete resultData.text;
|
497
|
+
}
|
498
|
+
if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf('mailto:') === -1) {
|
499
|
+
delayedConfirm(editor, 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?', function (state) {
|
500
|
+
if (state) {
|
501
|
+
resultData.href = 'mailto:' + href;
|
502
|
+
}
|
503
|
+
insertLink(resultData);
|
504
|
+
});
|
505
|
+
return;
|
506
|
+
}
|
507
|
+
if (assumeExternalTargets === true && !/^\w+:/i.test(href) || assumeExternalTargets === false && /^\s*www[\.|\d\.]/i.test(href)) {
|
508
|
+
delayedConfirm(editor, 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', function (state) {
|
509
|
+
if (state) {
|
510
|
+
resultData.href = 'http://' + href;
|
511
|
+
}
|
512
|
+
insertLink(resultData);
|
513
|
+
});
|
514
|
+
return;
|
515
|
+
}
|
516
|
+
insertLink(resultData);
|
517
|
+
}
|
518
|
+
});
|
519
|
+
};
|
520
|
+
var open$1 = function (editor) {
|
521
|
+
createLinkList(editor, showDialog);
|
522
|
+
};
|
523
|
+
var Dialog = { open: open$1 };
|
524
524
|
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
525
|
+
var getLink = function (editor, elm) {
|
526
|
+
return editor.dom.getParent(elm, 'a[href]');
|
527
|
+
};
|
528
|
+
var getSelectedLink = function (editor) {
|
529
|
+
return getLink(editor, editor.selection.getStart());
|
530
|
+
};
|
531
|
+
var getHref = function (elm) {
|
532
|
+
var href = elm.getAttribute('data-mce-href');
|
533
|
+
return href ? href : elm.getAttribute('href');
|
534
|
+
};
|
535
|
+
var isContextMenuVisible = function (editor) {
|
536
|
+
var contextmenu = editor.plugins.contextmenu;
|
537
|
+
return contextmenu ? contextmenu.isContextMenuVisible() : false;
|
538
|
+
};
|
539
|
+
var hasOnlyAltModifier = function (e) {
|
540
|
+
return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
|
541
|
+
};
|
542
|
+
var gotoLink = function (editor, a) {
|
543
|
+
if (a) {
|
544
|
+
var href = getHref(a);
|
545
|
+
if (/^#/.test(href)) {
|
546
|
+
var targetEl = editor.$(href);
|
547
|
+
if (targetEl.length) {
|
548
|
+
editor.selection.scrollIntoView(targetEl[0], true);
|
549
|
+
}
|
550
|
+
} else {
|
551
|
+
OpenUrl.open(a.href);
|
549
552
|
}
|
550
|
-
} else {
|
551
|
-
$_evd3tpfvjm0ofzck.open(a.href);
|
552
553
|
}
|
553
|
-
}
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
};
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
};
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
554
|
+
};
|
555
|
+
var openDialog = function (editor) {
|
556
|
+
return function () {
|
557
|
+
Dialog.open(editor);
|
558
|
+
};
|
559
|
+
};
|
560
|
+
var gotoSelectedLink = function (editor) {
|
561
|
+
return function () {
|
562
|
+
gotoLink(editor, getSelectedLink(editor));
|
563
|
+
};
|
564
|
+
};
|
565
|
+
var leftClickedOnAHref = function (editor) {
|
566
|
+
return function (elm) {
|
567
|
+
var sel, rng, node;
|
568
|
+
if (Settings.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && Utils.isLink(elm)) {
|
569
|
+
sel = editor.selection;
|
570
|
+
rng = sel.getRng();
|
571
|
+
node = rng.startContainer;
|
572
|
+
if (node.nodeType === 3 && sel.isCollapsed() && rng.startOffset > 0 && rng.startOffset < node.data.length) {
|
573
|
+
return true;
|
574
|
+
}
|
575
|
+
}
|
576
|
+
return false;
|
577
|
+
};
|
578
|
+
};
|
579
|
+
var setupGotoLinks = function (editor) {
|
580
|
+
editor.on('click', function (e) {
|
581
|
+
var link = getLink(editor, e.target);
|
582
|
+
if (link && global$1.metaKeyPressed(e)) {
|
583
|
+
e.preventDefault();
|
584
|
+
gotoLink(editor, link);
|
585
|
+
}
|
586
|
+
});
|
587
|
+
editor.on('keydown', function (e) {
|
588
|
+
var link = getSelectedLink(editor);
|
589
|
+
if (link && e.keyCode === 13 && hasOnlyAltModifier(e)) {
|
590
|
+
e.preventDefault();
|
591
|
+
gotoLink(editor, link);
|
574
592
|
}
|
575
|
-
}
|
576
|
-
return false;
|
577
|
-
};
|
578
|
-
};
|
579
|
-
var setupGotoLinks = function (editor) {
|
580
|
-
editor.on('click', function (e) {
|
581
|
-
var link = getLink(editor, e.target);
|
582
|
-
if (link && global$1.metaKeyPressed(e)) {
|
583
|
-
e.preventDefault();
|
584
|
-
gotoLink(editor, link);
|
585
|
-
}
|
586
|
-
});
|
587
|
-
editor.on('keydown', function (e) {
|
588
|
-
var link = getSelectedLink(editor);
|
589
|
-
if (link && e.keyCode === 13 && hasOnlyAltModifier(e)) {
|
590
|
-
e.preventDefault();
|
591
|
-
gotoLink(editor, link);
|
592
|
-
}
|
593
|
-
});
|
594
|
-
};
|
595
|
-
var toggleActiveState = function (editor) {
|
596
|
-
return function () {
|
597
|
-
var self = this;
|
598
|
-
editor.on('nodechange', function (e) {
|
599
|
-
self.active(!editor.readonly && !!$_d522tkfzjm0ofzda.getAnchorElement(editor, e.element));
|
600
593
|
});
|
601
594
|
};
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
595
|
+
var toggleActiveState = function (editor) {
|
596
|
+
return function () {
|
597
|
+
var self = this;
|
598
|
+
editor.on('nodechange', function (e) {
|
599
|
+
self.active(!editor.readonly && !!Utils.getAnchorElement(editor, e.element));
|
600
|
+
});
|
601
|
+
};
|
602
|
+
};
|
603
|
+
var toggleViewLinkState = function (editor) {
|
604
|
+
return function () {
|
605
|
+
var self = this;
|
606
|
+
var toggleVisibility = function (e) {
|
607
|
+
if (Utils.hasLinks(e.parents)) {
|
608
|
+
self.show();
|
609
|
+
} else {
|
610
|
+
self.hide();
|
611
|
+
}
|
612
|
+
};
|
613
|
+
if (!Utils.hasLinks(editor.dom.getParents(editor.selection.getStart()))) {
|
610
614
|
self.hide();
|
611
615
|
}
|
616
|
+
editor.on('nodechange', toggleVisibility);
|
617
|
+
self.on('remove', function () {
|
618
|
+
editor.off('nodechange', toggleVisibility);
|
619
|
+
});
|
612
620
|
};
|
613
|
-
if (!$_d522tkfzjm0ofzda.hasLinks(editor.dom.getParents(editor.selection.getStart()))) {
|
614
|
-
self.hide();
|
615
|
-
}
|
616
|
-
editor.on('nodechange', toggleVisibility);
|
617
|
-
self.on('remove', function () {
|
618
|
-
editor.off('nodechange', toggleVisibility);
|
619
|
-
});
|
620
621
|
};
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
};
|
622
|
+
var Actions = {
|
623
|
+
openDialog: openDialog,
|
624
|
+
gotoSelectedLink: gotoSelectedLink,
|
625
|
+
leftClickedOnAHref: leftClickedOnAHref,
|
626
|
+
setupGotoLinks: setupGotoLinks,
|
627
|
+
toggleActiveState: toggleActiveState,
|
628
|
+
toggleViewLinkState: toggleViewLinkState
|
629
|
+
};
|
630
630
|
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
631
|
+
var register = function (editor) {
|
632
|
+
editor.addCommand('mceLink', Actions.openDialog(editor));
|
633
|
+
};
|
634
|
+
var Commands = { register: register };
|
635
635
|
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
636
|
+
var setup = function (editor) {
|
637
|
+
editor.addShortcut('Meta+K', '', Actions.openDialog(editor));
|
638
|
+
};
|
639
|
+
var Keyboard = { setup: setup };
|
640
640
|
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
641
|
+
var setupButtons = function (editor) {
|
642
|
+
editor.addButton('link', {
|
643
|
+
active: false,
|
644
|
+
icon: 'link',
|
645
|
+
tooltip: 'Insert/edit link',
|
646
|
+
onclick: Actions.openDialog(editor),
|
647
|
+
onpostrender: Actions.toggleActiveState(editor)
|
648
|
+
});
|
649
|
+
editor.addButton('unlink', {
|
650
|
+
active: false,
|
651
|
+
icon: 'unlink',
|
652
|
+
tooltip: 'Remove link',
|
653
|
+
onclick: Utils.unlink(editor),
|
654
|
+
onpostrender: Actions.toggleActiveState(editor)
|
655
|
+
});
|
656
|
+
if (editor.addContextToolbar) {
|
657
|
+
editor.addButton('openlink', {
|
658
|
+
icon: 'newtab',
|
659
|
+
tooltip: 'Open link',
|
660
|
+
onclick: Actions.gotoSelectedLink(editor)
|
661
|
+
});
|
662
|
+
}
|
663
|
+
};
|
664
|
+
var setupMenuItems = function (editor) {
|
665
|
+
editor.addMenuItem('openlink', {
|
666
|
+
text: 'Open link',
|
658
667
|
icon: 'newtab',
|
659
|
-
|
660
|
-
|
668
|
+
onclick: Actions.gotoSelectedLink(editor),
|
669
|
+
onPostRender: Actions.toggleViewLinkState(editor),
|
670
|
+
prependToContext: true
|
661
671
|
});
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
672
|
+
editor.addMenuItem('link', {
|
673
|
+
icon: 'link',
|
674
|
+
text: 'Link',
|
675
|
+
shortcut: 'Meta+K',
|
676
|
+
onclick: Actions.openDialog(editor),
|
677
|
+
stateSelector: 'a[href]',
|
678
|
+
context: 'insert',
|
679
|
+
prependToContext: true
|
680
|
+
});
|
681
|
+
editor.addMenuItem('unlink', {
|
682
|
+
icon: 'unlink',
|
683
|
+
text: 'Remove link',
|
684
|
+
onclick: Utils.unlink(editor),
|
685
|
+
stateSelector: 'a[href]'
|
686
|
+
});
|
687
|
+
};
|
688
|
+
var setupContextToolbars = function (editor) {
|
689
|
+
if (editor.addContextToolbar) {
|
690
|
+
editor.addContextToolbar(Actions.leftClickedOnAHref(editor), 'openlink | link unlink');
|
691
|
+
}
|
692
|
+
};
|
693
|
+
var Controls = {
|
694
|
+
setupButtons: setupButtons,
|
695
|
+
setupMenuItems: setupMenuItems,
|
696
|
+
setupContextToolbars: setupContextToolbars
|
697
|
+
};
|
698
|
+
|
699
|
+
global.add('link', function (editor) {
|
700
|
+
Controls.setupButtons(editor);
|
701
|
+
Controls.setupMenuItems(editor);
|
702
|
+
Controls.setupContextToolbars(editor);
|
703
|
+
Actions.setupGotoLinks(editor);
|
704
|
+
Commands.register(editor);
|
705
|
+
Keyboard.setup(editor);
|
686
706
|
});
|
687
|
-
|
688
|
-
var setupContextToolbars = function (editor) {
|
689
|
-
if (editor.addContextToolbar) {
|
690
|
-
editor.addContextToolbar($_c3czoyfsjm0ofzcd.leftClickedOnAHref(editor), 'openlink | link unlink');
|
707
|
+
function Plugin () {
|
691
708
|
}
|
692
|
-
};
|
693
|
-
var $_5nmf4sg5jm0ofzdp = {
|
694
|
-
setupButtons: setupButtons,
|
695
|
-
setupMenuItems: setupMenuItems,
|
696
|
-
setupContextToolbars: setupContextToolbars
|
697
|
-
};
|
698
|
-
|
699
|
-
global.add('link', function (editor) {
|
700
|
-
$_5nmf4sg5jm0ofzdp.setupButtons(editor);
|
701
|
-
$_5nmf4sg5jm0ofzdp.setupMenuItems(editor);
|
702
|
-
$_5nmf4sg5jm0ofzdp.setupContextToolbars(editor);
|
703
|
-
$_c3czoyfsjm0ofzcd.setupGotoLinks(editor);
|
704
|
-
$_17rb7bfrjm0ofzcc.register(editor);
|
705
|
-
$_bygts2g4jm0ofzdn.setup(editor);
|
706
|
-
});
|
707
|
-
function Plugin () {
|
708
|
-
}
|
709
709
|
|
710
|
-
|
710
|
+
return Plugin;
|
711
711
|
|
712
712
|
}());
|
713
713
|
})();
|