wax_theme 0.1.0.beta → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -0
- data/README.md +79 -30
- data/_includes/collection_gallery.html +58 -0
- data/_includes/{wax/footer.html → footer.html} +2 -4
- data/_includes/head.html +13 -0
- data/_includes/{wax/header.html → header.html} +1 -2
- data/_includes/{wax/inline_image.html → inline_image.html} +1 -1
- data/_includes/{wax/collection/interactive_metadata.html → interactive_metadata_table.html} +38 -21
- data/_includes/item_metadata.html +26 -0
- data/_includes/{wax/item/pagination.html → item_pagination.html} +0 -0
- data/_includes/osd_iiif_image_viewer.html +22 -0
- data/_includes/{wax/parallax.html → parallax_image.html} +10 -6
- data/_includes/search_box.html +31 -0
- data/_includes/{wax/image_viewer/simple.html → simple_image_viewer.html} +0 -0
- data/_layouts/default.html +25 -0
- data/_layouts/{wax/exhibit.html → exhibit.html} +1 -1
- data/_layouts/{wax/collection_item.html → generic_collection_item.html} +8 -8
- data/_layouts/page.html +8 -0
- data/_layouts/qatar_item.html +24 -0
- data/_sass/_wax.scss +234 -165
- data/assets/bootstrap/bootstrap.min.js +7 -0
- data/assets/bootstrap/bootstrap.min.js.map +1 -0
- data/assets/{css → datatables}/datatables.css +0 -0
- data/assets/{js → datatables}/datatables.min.js +0 -0
- data/assets/{js/elasticlunr.min.js → elasticlunr.min.js} +0 -0
- data/assets/{js/jquery-3.2.1.min.js → jquery-3.2.1.min.js} +0 -0
- data/assets/openseadragon/alt-buttons/fullpage_grouphover.png +0 -0
- data/assets/openseadragon/alt-buttons/fullpage_hover.png +0 -0
- data/assets/openseadragon/alt-buttons/fullpage_pressed.png +0 -0
- data/assets/openseadragon/alt-buttons/fullpage_rest.png +0 -0
- data/assets/openseadragon/alt-buttons/home_grouphover.png +0 -0
- data/assets/openseadragon/alt-buttons/home_hover.png +0 -0
- data/assets/openseadragon/alt-buttons/home_pressed.png +0 -0
- data/assets/openseadragon/alt-buttons/home_rest.png +0 -0
- data/assets/openseadragon/alt-buttons/next_grouphover.png +0 -0
- data/assets/openseadragon/alt-buttons/next_hover.png +0 -0
- data/assets/openseadragon/alt-buttons/next_pressed.png +0 -0
- data/assets/openseadragon/alt-buttons/next_rest.png +0 -0
- data/assets/openseadragon/alt-buttons/previous_grouphover.png +0 -0
- data/assets/openseadragon/alt-buttons/previous_hover.png +0 -0
- data/assets/openseadragon/alt-buttons/previous_pressed.png +0 -0
- data/assets/openseadragon/alt-buttons/previous_rest.png +0 -0
- data/assets/openseadragon/alt-buttons/rotateleft_grouphover.png +0 -0
- data/assets/openseadragon/alt-buttons/rotateleft_hover.png +0 -0
- data/assets/openseadragon/alt-buttons/rotateleft_pressed.png +0 -0
- data/assets/openseadragon/alt-buttons/rotateleft_rest.png +0 -0
- data/assets/openseadragon/alt-buttons/rotateright_grouphover.png +0 -0
- data/assets/openseadragon/alt-buttons/rotateright_hover.png +0 -0
- data/assets/openseadragon/alt-buttons/rotateright_pressed.png +0 -0
- data/assets/openseadragon/alt-buttons/rotateright_rest.png +0 -0
- data/assets/openseadragon/alt-buttons/zoomin_grouphover.png +0 -0
- data/assets/openseadragon/alt-buttons/zoomin_hover.png +0 -0
- data/assets/openseadragon/alt-buttons/zoomin_pressed.png +0 -0
- data/assets/openseadragon/alt-buttons/zoomin_rest.png +0 -0
- data/assets/openseadragon/alt-buttons/zoomout_grouphover.png +0 -0
- data/assets/openseadragon/alt-buttons/zoomout_hover.png +0 -0
- data/assets/openseadragon/alt-buttons/zoomout_pressed.png +0 -0
- data/assets/openseadragon/alt-buttons/zoomout_rest.png +0 -0
- data/assets/openseadragon/images/button_grouphover.png +0 -0
- data/assets/openseadragon/images/button_hover.png +0 -0
- data/assets/openseadragon/images/button_pressed.png +0 -0
- data/assets/openseadragon/images/button_rest.png +0 -0
- data/assets/openseadragon/images/flip_grouphover.png +0 -0
- data/assets/openseadragon/images/flip_hover.png +0 -0
- data/assets/openseadragon/images/flip_pressed.png +0 -0
- data/assets/openseadragon/images/flip_rest.png +0 -0
- data/assets/openseadragon/images/fullpage_grouphover.png +0 -0
- data/assets/openseadragon/images/fullpage_hover.png +0 -0
- data/assets/openseadragon/images/fullpage_pressed.png +0 -0
- data/assets/openseadragon/images/fullpage_rest.png +0 -0
- data/assets/openseadragon/images/home_grouphover.png +0 -0
- data/assets/openseadragon/images/home_hover.png +0 -0
- data/assets/openseadragon/images/home_pressed.png +0 -0
- data/assets/openseadragon/images/home_rest.png +0 -0
- data/assets/openseadragon/images/next_grouphover.png +0 -0
- data/assets/openseadragon/images/next_hover.png +0 -0
- data/assets/openseadragon/images/next_pressed.png +0 -0
- data/assets/openseadragon/images/next_rest.png +0 -0
- data/assets/openseadragon/images/previous_grouphover.png +0 -0
- data/assets/openseadragon/images/previous_hover.png +0 -0
- data/assets/openseadragon/images/previous_pressed.png +0 -0
- data/assets/openseadragon/images/previous_rest.png +0 -0
- data/assets/openseadragon/images/rotateleft_grouphover.png +0 -0
- data/assets/openseadragon/images/rotateleft_hover.png +0 -0
- data/assets/openseadragon/images/rotateleft_pressed.png +0 -0
- data/assets/openseadragon/images/rotateleft_rest.png +0 -0
- data/assets/openseadragon/images/rotateright_grouphover.png +0 -0
- data/assets/openseadragon/images/rotateright_hover.png +0 -0
- data/assets/openseadragon/images/rotateright_pressed.png +0 -0
- data/assets/openseadragon/images/rotateright_rest.png +0 -0
- data/assets/openseadragon/images/zoomin_grouphover.png +0 -0
- data/assets/openseadragon/images/zoomin_hover.png +0 -0
- data/assets/openseadragon/images/zoomin_pressed.png +0 -0
- data/assets/openseadragon/images/zoomin_rest.png +0 -0
- data/assets/openseadragon/images/zoomout_grouphover.png +0 -0
- data/assets/openseadragon/images/zoomout_hover.png +0 -0
- data/assets/openseadragon/images/zoomout_pressed.png +0 -0
- data/assets/openseadragon/images/zoomout_rest.png +0 -0
- data/assets/openseadragon/openseadragon.min.js +9 -0
- data/assets/openseadragon/openseadragon.min.js.map +1 -0
- data/assets/{js/popper.min.js → popper.min.js} +0 -1
- data/assets/search-ui.js +63 -0
- data/assets/styles.scss +20 -20
- metadata +130 -249
- data/_includes/wax/collection/gallery.html +0 -33
- data/_includes/wax/head.html +0 -16
- data/_includes/wax/image_viewer/leaflet.html +0 -11
- data/_includes/wax/image_viewer/mirador.html +0 -8
- data/_includes/wax/item/metadata.html +0 -23
- data/_includes/wax/mirador_compare.html +0 -11
- data/_includes/wax/search.html +0 -12
- data/_layouts/wax/default.html +0 -20
- data/_layouts/wax/page.html +0 -13
- data/_layouts/wax/reuse_page.html +0 -7
- data/_sass/_syntax.scss +0 -129
- data/assets/css/leaflet.css +0 -636
- data/assets/js/bootstrap.min.js +0 -7
- data/assets/js/leaflet-iiif.min.js +0 -8
- data/assets/js/leaflet.js +0 -5
- data/assets/js/wax.js +0 -91
- data/assets/logo.png +0 -0
- data/assets/mirador/css/mirador-combined.css +0 -4107
- data/assets/mirador/fonts/FontAwesome.otf +0 -0
- data/assets/mirador/fonts/MaterialIcons-Regular.eot +0 -0
- data/assets/mirador/fonts/MaterialIcons-Regular.ijmap +0 -1
- data/assets/mirador/fonts/MaterialIcons-Regular.svg +0 -2373
- data/assets/mirador/fonts/MaterialIcons-Regular.ttf +0 -0
- data/assets/mirador/fonts/MaterialIcons-Regular.woff +0 -0
- data/assets/mirador/fonts/MaterialIcons-Regular.woff2 +0 -0
- data/assets/mirador/fonts/fontawesome-webfont.eot +0 -0
- data/assets/mirador/fonts/fontawesome-webfont.svg +0 -2671
- data/assets/mirador/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/mirador/fonts/fontawesome-webfont.woff +0 -0
- data/assets/mirador/fonts/fontawesome-webfont.woff2 +0 -0
- data/assets/mirador/images/border_type_1.png +0 -0
- data/assets/mirador/images/border_type_2.png +0 -0
- data/assets/mirador/images/border_type_3.png +0 -0
- data/assets/mirador/images/border_type_4.png +0 -0
- data/assets/mirador/images/border_type_5.png +0 -0
- data/assets/mirador/images/debut_dark.png +0 -0
- data/assets/mirador/locales/ar/translation.json +0 -42
- data/assets/mirador/locales/de/translation.json +0 -103
- data/assets/mirador/locales/en/translation.json +0 -106
- data/assets/mirador/locales/es/translation.json +0 -86
- data/assets/mirador/locales/fr/translation.json +0 -103
- data/assets/mirador/locales/ga/translation.json +0 -97
- data/assets/mirador/locales/ja/translation.json +0 -82
- data/assets/mirador/locales/ko/translation.json +0 -83
- data/assets/mirador/locales/nl/translation.json +0 -39
- data/assets/mirador/locales/zh-CN/translation.json +0 -76
- data/assets/mirador/locales/zh-TW/translation.json +0 -76
- data/assets/mirador/locales/zh/translation.json +0 -74
- data/assets/mirador/mirador.js +0 -49145
- data/assets/mirador/plugins/advlist/index.js +0 -7
- data/assets/mirador/plugins/advlist/plugin.js +0 -160
- data/assets/mirador/plugins/advlist/plugin.min.js +0 -1
- data/assets/mirador/plugins/anchor/index.js +0 -7
- data/assets/mirador/plugins/anchor/plugin.js +0 -118
- data/assets/mirador/plugins/anchor/plugin.min.js +0 -1
- data/assets/mirador/plugins/autolink/index.js +0 -7
- data/assets/mirador/plugins/autolink/plugin.js +0 -180
- data/assets/mirador/plugins/autolink/plugin.min.js +0 -1
- data/assets/mirador/plugins/autoresize/index.js +0 -7
- data/assets/mirador/plugins/autoresize/plugin.js +0 -169
- data/assets/mirador/plugins/autoresize/plugin.min.js +0 -1
- data/assets/mirador/plugins/autosave/index.js +0 -7
- data/assets/mirador/plugins/autosave/plugin.js +0 -226
- data/assets/mirador/plugins/autosave/plugin.min.js +0 -1
- data/assets/mirador/plugins/bbcode/index.js +0 -7
- data/assets/mirador/plugins/bbcode/plugin.js +0 -101
- data/assets/mirador/plugins/bbcode/plugin.min.js +0 -1
- data/assets/mirador/plugins/charmap/index.js +0 -7
- data/assets/mirador/plugins/charmap/plugin.js +0 -1275
- data/assets/mirador/plugins/charmap/plugin.min.js +0 -1
- data/assets/mirador/plugins/code/index.js +0 -7
- data/assets/mirador/plugins/code/plugin.js +0 -94
- data/assets/mirador/plugins/code/plugin.min.js +0 -1
- data/assets/mirador/plugins/codesample/css/prism.css +0 -138
- data/assets/mirador/plugins/codesample/index.js +0 -7
- data/assets/mirador/plugins/codesample/plugin.js +0 -967
- data/assets/mirador/plugins/codesample/plugin.min.js +0 -1
- data/assets/mirador/plugins/colorpicker/index.js +0 -7
- data/assets/mirador/plugins/colorpicker/plugin.js +0 -126
- data/assets/mirador/plugins/colorpicker/plugin.min.js +0 -1
- data/assets/mirador/plugins/contextmenu/index.js +0 -7
- data/assets/mirador/plugins/contextmenu/plugin.js +0 -168
- data/assets/mirador/plugins/contextmenu/plugin.min.js +0 -1
- data/assets/mirador/plugins/directionality/index.js +0 -7
- data/assets/mirador/plugins/directionality/plugin.js +0 -66
- data/assets/mirador/plugins/directionality/plugin.min.js +0 -1
- data/assets/mirador/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/assets/mirador/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/assets/mirador/plugins/emoticons/index.js +0 -7
- data/assets/mirador/plugins/emoticons/plugin.js +0 -87
- data/assets/mirador/plugins/emoticons/plugin.min.js +0 -1
- data/assets/mirador/plugins/fullpage/index.js +0 -7
- data/assets/mirador/plugins/fullpage/plugin.js +0 -519
- data/assets/mirador/plugins/fullpage/plugin.min.js +0 -1
- data/assets/mirador/plugins/fullscreen/index.js +0 -7
- data/assets/mirador/plugins/fullscreen/plugin.js +0 -177
- data/assets/mirador/plugins/fullscreen/plugin.min.js +0 -1
- data/assets/mirador/plugins/help/img/logo.png +0 -0
- data/assets/mirador/plugins/help/index.js +0 -7
- data/assets/mirador/plugins/help/plugin.js +0 -727
- data/assets/mirador/plugins/help/plugin.min.js +0 -1
- data/assets/mirador/plugins/hr/index.js +0 -7
- data/assets/mirador/plugins/hr/plugin.js +0 -39
- data/assets/mirador/plugins/hr/plugin.min.js +0 -1
- data/assets/mirador/plugins/image/index.js +0 -7
- data/assets/mirador/plugins/image/plugin.js +0 -1211
- data/assets/mirador/plugins/image/plugin.min.js +0 -1
- data/assets/mirador/plugins/imagetools/index.js +0 -7
- data/assets/mirador/plugins/imagetools/plugin.js +0 -3684
- data/assets/mirador/plugins/imagetools/plugin.min.js +0 -1
- data/assets/mirador/plugins/importcss/index.js +0 -7
- data/assets/mirador/plugins/importcss/plugin.js +0 -264
- data/assets/mirador/plugins/importcss/plugin.min.js +0 -1
- data/assets/mirador/plugins/insertdatetime/index.js +0 -7
- data/assets/mirador/plugins/insertdatetime/plugin.js +0 -173
- data/assets/mirador/plugins/insertdatetime/plugin.min.js +0 -1
- data/assets/mirador/plugins/legacyoutput/index.js +0 -7
- data/assets/mirador/plugins/legacyoutput/plugin.js +0 -220
- data/assets/mirador/plugins/legacyoutput/plugin.min.js +0 -1
- data/assets/mirador/plugins/link/index.js +0 -7
- data/assets/mirador/plugins/link/plugin.js +0 -713
- data/assets/mirador/plugins/link/plugin.min.js +0 -1
- data/assets/mirador/plugins/lists/index.js +0 -7
- data/assets/mirador/plugins/lists/plugin.js +0 -1115
- data/assets/mirador/plugins/lists/plugin.min.js +0 -1
- data/assets/mirador/plugins/media/index.js +0 -7
- data/assets/mirador/plugins/media/plugin.js +0 -1166
- data/assets/mirador/plugins/media/plugin.min.js +0 -1
- data/assets/mirador/plugins/nonbreaking/index.js +0 -7
- data/assets/mirador/plugins/nonbreaking/plugin.js +0 -85
- data/assets/mirador/plugins/nonbreaking/plugin.min.js +0 -1
- data/assets/mirador/plugins/noneditable/index.js +0 -7
- data/assets/mirador/plugins/noneditable/plugin.js +0 -118
- data/assets/mirador/plugins/noneditable/plugin.min.js +0 -1
- data/assets/mirador/plugins/pagebreak/index.js +0 -7
- data/assets/mirador/plugins/pagebreak/plugin.js +0 -109
- data/assets/mirador/plugins/pagebreak/plugin.min.js +0 -1
- data/assets/mirador/plugins/paste/index.js +0 -7
- data/assets/mirador/plugins/paste/plugin.js +0 -1497
- data/assets/mirador/plugins/paste/plugin.min.js +0 -1
- data/assets/mirador/plugins/preview/index.js +0 -7
- data/assets/mirador/plugins/preview/plugin.js +0 -123
- data/assets/mirador/plugins/preview/plugin.min.js +0 -1
- data/assets/mirador/plugins/print/index.js +0 -7
- data/assets/mirador/plugins/print/plugin.js +0 -38
- data/assets/mirador/plugins/print/plugin.min.js +0 -1
- data/assets/mirador/plugins/save/index.js +0 -7
- data/assets/mirador/plugins/save/plugin.js +0 -120
- data/assets/mirador/plugins/save/plugin.min.js +0 -1
- data/assets/mirador/plugins/searchreplace/index.js +0 -7
- data/assets/mirador/plugins/searchreplace/plugin.js +0 -603
- data/assets/mirador/plugins/searchreplace/plugin.min.js +0 -1
- data/assets/mirador/plugins/spellchecker/index.js +0 -7
- data/assets/mirador/plugins/spellchecker/plugin.js +0 -757
- data/assets/mirador/plugins/spellchecker/plugin.min.js +0 -1
- data/assets/mirador/plugins/tabfocus/index.js +0 -7
- data/assets/mirador/plugins/tabfocus/plugin.js +0 -124
- data/assets/mirador/plugins/tabfocus/plugin.min.js +0 -1
- data/assets/mirador/plugins/table/index.js +0 -7
- data/assets/mirador/plugins/table/plugin.js +0 -10144
- data/assets/mirador/plugins/table/plugin.min.js +0 -1
- data/assets/mirador/plugins/template/index.js +0 -7
- data/assets/mirador/plugins/template/plugin.js +0 -345
- data/assets/mirador/plugins/template/plugin.min.js +0 -1
- data/assets/mirador/plugins/textcolor/index.js +0 -7
- data/assets/mirador/plugins/textcolor/plugin.js +0 -346
- data/assets/mirador/plugins/textcolor/plugin.min.js +0 -1
- data/assets/mirador/plugins/textpattern/index.js +0 -7
- data/assets/mirador/plugins/textpattern/plugin.js +0 -370
- data/assets/mirador/plugins/textpattern/plugin.min.js +0 -1
- data/assets/mirador/plugins/toc/index.js +0 -7
- data/assets/mirador/plugins/toc/plugin.js +0 -228
- data/assets/mirador/plugins/toc/plugin.min.js +0 -1
- data/assets/mirador/plugins/visualblocks/css/visualblocks.css +0 -154
- data/assets/mirador/plugins/visualblocks/index.js +0 -7
- data/assets/mirador/plugins/visualblocks/plugin.js +0 -135
- data/assets/mirador/plugins/visualblocks/plugin.min.js +0 -1
- data/assets/mirador/plugins/visualchars/index.js +0 -7
- data/assets/mirador/plugins/visualchars/plugin.js +0 -505
- data/assets/mirador/plugins/visualchars/plugin.min.js +0 -1
- data/assets/mirador/plugins/wordcount/index.js +0 -7
- data/assets/mirador/plugins/wordcount/plugin.js +0 -343
- data/assets/mirador/plugins/wordcount/plugin.min.js +0 -1
- data/assets/mirador/skins/lightgray/content.inline.min.css +0 -1
- data/assets/mirador/skins/lightgray/content.min.css +0 -1
- data/assets/mirador/skins/lightgray/content.mobile.min.css +0 -1
- data/assets/mirador/skins/lightgray/fonts/tinymce-mobile.woff +0 -0
- data/assets/mirador/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/assets/mirador/skins/lightgray/fonts/tinymce-small.svg +0 -63
- data/assets/mirador/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/assets/mirador/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/assets/mirador/skins/lightgray/fonts/tinymce.eot +0 -0
- data/assets/mirador/skins/lightgray/fonts/tinymce.svg +0 -131
- data/assets/mirador/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/assets/mirador/skins/lightgray/fonts/tinymce.woff +0 -0
- data/assets/mirador/skins/lightgray/img/anchor.gif +0 -0
- data/assets/mirador/skins/lightgray/img/loader.gif +0 -0
- data/assets/mirador/skins/lightgray/img/object.gif +0 -0
- data/assets/mirador/skins/lightgray/img/trans.gif +0 -0
- data/assets/mirador/skins/lightgray/skin.min.css +0 -1
- data/assets/mirador/skins/lightgray/skin.mobile.min.css +0 -2
- data/assets/mirador/themes/inlite/index.js +0 -7
- data/assets/mirador/themes/inlite/theme.js +0 -10235
- data/assets/mirador/themes/inlite/theme.min.js +0 -1
- data/assets/mirador/themes/mobile/index.js +0 -7
- data/assets/mirador/themes/mobile/theme.js +0 -13546
- data/assets/mirador/themes/mobile/theme.min.js +0 -1
- data/assets/mirador/themes/modern/index.js +0 -7
- data/assets/mirador/themes/modern/theme.js +0 -10041
- data/assets/mirador/themes/modern/theme.min.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},a=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},i=n,o=a,u=function(e){var t=a(e);return 0<t.length?t[0]:n(e)},m=function(e){return e.getParam("insertdatetime_element",!1)},c="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),d="January February March April May June July August September October November December".split(" "),p=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},f=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",p(n.getMonth()+1,2))).replace("%d",p(n.getDate(),2))).replace("%H",""+p(n.getHours(),2))).replace("%M",""+p(n.getMinutes(),2))).replace("%S",""+p(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(d[n.getMonth()]))).replace("%b",""+e.translate(s[n.getMonth()]))).replace("%A",""+e.translate(l[n.getDay()]))).replace("%a",""+e.translate(c[n.getDay()]))).replace("%%","%")},g=function(e,t){if(m(e)){var n=f(e,t),r=void 0;r=/%[HMSIp]/.test(t)?f(e,"%Y-%m-%dT%H:%M"):f(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?(o=a,u=r,c=n,l=(i=e).dom.create("time",{datetime:u},c),o.parentNode.insertBefore(l,o),i.dom.remove(o),i.selection.select(l,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(f(e,t));var i,o,u,c,l},y=f,M=function(e){e.addCommand("mceInsertDate",function(){g(e,t(e))}),e.addCommand("mceInsertTime",function(){g(e,i(e))})},v=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(t,n){var r,a,e,i=(a=n,e=o(r=t),v.map(e,function(e){return{text:y(r,e),onclick:function(){a.set(e),g(r,e)}}}));t.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",menu:i,onclick:function(){var e=n.get();g(t,e||u(t))}}),t.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:i,context:"insert"})};e.add("insertdatetime",function(e){var t=r(null);M(e),S(e,t)})}();
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
(function () {
|
|
2
|
-
var legacyoutput = (function () {
|
|
3
|
-
'use strict';
|
|
4
|
-
|
|
5
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
6
|
-
|
|
7
|
-
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
8
|
-
|
|
9
|
-
var overrideFormats = function (editor) {
|
|
10
|
-
var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', fontSizes = global$1.explode(editor.settings.font_size_style_values), schema = editor.schema;
|
|
11
|
-
editor.formatter.register({
|
|
12
|
-
alignleft: {
|
|
13
|
-
selector: alignElements,
|
|
14
|
-
attributes: { align: 'left' }
|
|
15
|
-
},
|
|
16
|
-
aligncenter: {
|
|
17
|
-
selector: alignElements,
|
|
18
|
-
attributes: { align: 'center' }
|
|
19
|
-
},
|
|
20
|
-
alignright: {
|
|
21
|
-
selector: alignElements,
|
|
22
|
-
attributes: { align: 'right' }
|
|
23
|
-
},
|
|
24
|
-
alignjustify: {
|
|
25
|
-
selector: alignElements,
|
|
26
|
-
attributes: { align: 'justify' }
|
|
27
|
-
},
|
|
28
|
-
bold: [
|
|
29
|
-
{
|
|
30
|
-
inline: 'b',
|
|
31
|
-
remove: 'all'
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
inline: 'strong',
|
|
35
|
-
remove: 'all'
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
inline: 'span',
|
|
39
|
-
styles: { fontWeight: 'bold' }
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
italic: [
|
|
43
|
-
{
|
|
44
|
-
inline: 'i',
|
|
45
|
-
remove: 'all'
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
inline: 'em',
|
|
49
|
-
remove: 'all'
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
inline: 'span',
|
|
53
|
-
styles: { fontStyle: 'italic' }
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
underline: [
|
|
57
|
-
{
|
|
58
|
-
inline: 'u',
|
|
59
|
-
remove: 'all'
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
inline: 'span',
|
|
63
|
-
styles: { textDecoration: 'underline' },
|
|
64
|
-
exact: true
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
strikethrough: [
|
|
68
|
-
{
|
|
69
|
-
inline: 'strike',
|
|
70
|
-
remove: 'all'
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
inline: 'span',
|
|
74
|
-
styles: { textDecoration: 'line-through' },
|
|
75
|
-
exact: true
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
fontname: {
|
|
79
|
-
inline: 'font',
|
|
80
|
-
attributes: { face: '%value' }
|
|
81
|
-
},
|
|
82
|
-
fontsize: {
|
|
83
|
-
inline: 'font',
|
|
84
|
-
attributes: {
|
|
85
|
-
size: function (vars) {
|
|
86
|
-
return global$1.inArray(fontSizes, vars.value) + 1;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
forecolor: {
|
|
91
|
-
inline: 'font',
|
|
92
|
-
attributes: { color: '%value' }
|
|
93
|
-
},
|
|
94
|
-
hilitecolor: {
|
|
95
|
-
inline: 'font',
|
|
96
|
-
styles: { backgroundColor: '%value' }
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
global$1.each('b,i,u,strike'.split(','), function (name) {
|
|
100
|
-
schema.addValidElements(name + '[*]');
|
|
101
|
-
});
|
|
102
|
-
if (!schema.getElementRule('font')) {
|
|
103
|
-
schema.addValidElements('font[face|size|color|style]');
|
|
104
|
-
}
|
|
105
|
-
global$1.each(alignElements.split(','), function (name) {
|
|
106
|
-
var rule = schema.getElementRule(name);
|
|
107
|
-
if (rule) {
|
|
108
|
-
if (!rule.attributes.align) {
|
|
109
|
-
rule.attributes.align = {};
|
|
110
|
-
rule.attributesOrder.push('align');
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
};
|
|
115
|
-
var setup = function (editor) {
|
|
116
|
-
editor.settings.inline_styles = false;
|
|
117
|
-
editor.on('init', function () {
|
|
118
|
-
overrideFormats(editor);
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
var $_4rx0kefmjm0ofzbu = { setup: setup };
|
|
122
|
-
|
|
123
|
-
var register = function (editor) {
|
|
124
|
-
editor.addButton('fontsizeselect', function () {
|
|
125
|
-
var items = [], defaultFontsizeFormats = '8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7';
|
|
126
|
-
var fontsizeFormats = editor.settings.fontsizeFormats || defaultFontsizeFormats;
|
|
127
|
-
editor.$.each(fontsizeFormats.split(' '), function (i, item) {
|
|
128
|
-
var text = item, value = item;
|
|
129
|
-
var values = item.split('=');
|
|
130
|
-
if (values.length > 1) {
|
|
131
|
-
text = values[0];
|
|
132
|
-
value = values[1];
|
|
133
|
-
}
|
|
134
|
-
items.push({
|
|
135
|
-
text: text,
|
|
136
|
-
value: value
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
return {
|
|
140
|
-
type: 'listbox',
|
|
141
|
-
text: 'Font Sizes',
|
|
142
|
-
tooltip: 'Font Sizes',
|
|
143
|
-
values: items,
|
|
144
|
-
fixedWidth: true,
|
|
145
|
-
onPostRender: function () {
|
|
146
|
-
var self = this;
|
|
147
|
-
editor.on('NodeChange', function () {
|
|
148
|
-
var fontElm;
|
|
149
|
-
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
|
150
|
-
if (fontElm) {
|
|
151
|
-
self.value(fontElm.size);
|
|
152
|
-
} else {
|
|
153
|
-
self.value('');
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
},
|
|
157
|
-
onclick: function (e) {
|
|
158
|
-
if (e.control.settings.value) {
|
|
159
|
-
editor.execCommand('FontSize', false, e.control.settings.value);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
});
|
|
164
|
-
editor.addButton('fontselect', function () {
|
|
165
|
-
function createFormats(formats) {
|
|
166
|
-
formats = formats.replace(/;$/, '').split(';');
|
|
167
|
-
var i = formats.length;
|
|
168
|
-
while (i--) {
|
|
169
|
-
formats[i] = formats[i].split('=');
|
|
170
|
-
}
|
|
171
|
-
return formats;
|
|
172
|
-
}
|
|
173
|
-
var defaultFontsFormats = 'Andale Mono=andale mono,monospace;' + 'Arial=arial,helvetica,sans-serif;' + 'Arial Black=arial black,sans-serif;' + 'Book Antiqua=book antiqua,palatino,serif;' + 'Comic Sans MS=comic sans ms,sans-serif;' + 'Courier New=courier new,courier,monospace;' + 'Georgia=georgia,palatino,serif;' + 'Helvetica=helvetica,arial,sans-serif;' + 'Impact=impact,sans-serif;' + 'Symbol=symbol;' + 'Tahoma=tahoma,arial,helvetica,sans-serif;' + 'Terminal=terminal,monaco,monospace;' + 'Times New Roman=times new roman,times,serif;' + 'Trebuchet MS=trebuchet ms,geneva,sans-serif;' + 'Verdana=verdana,geneva,sans-serif;' + 'Webdings=webdings;' + 'Wingdings=wingdings,zapf dingbats';
|
|
174
|
-
var items = [], fonts = createFormats(editor.settings.font_formats || defaultFontsFormats);
|
|
175
|
-
editor.$.each(fonts, function (i, font) {
|
|
176
|
-
items.push({
|
|
177
|
-
text: { raw: font[0] },
|
|
178
|
-
value: font[1],
|
|
179
|
-
textStyle: font[1].indexOf('dings') === -1 ? 'font-family:' + font[1] : ''
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
return {
|
|
183
|
-
type: 'listbox',
|
|
184
|
-
text: 'Font Family',
|
|
185
|
-
tooltip: 'Font Family',
|
|
186
|
-
values: items,
|
|
187
|
-
fixedWidth: true,
|
|
188
|
-
onPostRender: function () {
|
|
189
|
-
var self = this;
|
|
190
|
-
editor.on('NodeChange', function () {
|
|
191
|
-
var fontElm;
|
|
192
|
-
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
|
193
|
-
if (fontElm) {
|
|
194
|
-
self.value(fontElm.face);
|
|
195
|
-
} else {
|
|
196
|
-
self.value('');
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
},
|
|
200
|
-
onselect: function (e) {
|
|
201
|
-
if (e.control.settings.value) {
|
|
202
|
-
editor.execCommand('FontName', false, e.control.settings.value);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
});
|
|
207
|
-
};
|
|
208
|
-
var $_4p2pdifojm0ofzbx = { register: register };
|
|
209
|
-
|
|
210
|
-
global.add('legacyoutput', function (editor) {
|
|
211
|
-
$_4rx0kefmjm0ofzbu.setup(editor);
|
|
212
|
-
$_4p2pdifojm0ofzbx.register(editor);
|
|
213
|
-
});
|
|
214
|
-
function Plugin () {
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
return Plugin;
|
|
218
|
-
|
|
219
|
-
}());
|
|
220
|
-
})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(a){a.settings.inline_styles=!1,a.on("init",function(){var e,t,n,i;e=a,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",n=o.explode(e.settings.font_size_style_values),i=e.schema,e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(e){return o.inArray(n,e.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),o.each("b,i,u,strike".split(","),function(e){i.addValidElements(e+"[*]")}),i.getElementRule("font")||i.addValidElements("font[face|size|color|style]"),o.each(t.split(","),function(e){var t=i.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})},n=function(i){i.addButton("fontsizeselect",function(){var o=[],e=i.settings.fontsizeFormats||"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7";return i.$.each(e.split(" "),function(e,t){var n=t,i=t,a=t.split("=");1<a.length&&(n=a[0],i=a[1]),o.push({text:n,value:i})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:o,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.size):t.value("")})},onclick:function(e){e.control.settings.value&&i.execCommand("FontSize",!1,e.control.settings.value)}}}),i.addButton("fontselect",function(){var n=[],e=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(i.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats");return i.$.each(e,function(e,t){n.push({text:{raw:t[0]},value:t[1],textStyle:-1===t[1].indexOf("dings")?"font-family:"+t[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:n,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.face):t.value("")})},onselect:function(e){e.control.settings.value&&i.execCommand("FontName",!1,e.control.settings.value)}}})};e.add("legacyoutput",function(e){t(e),n(e)})}();
|
|
@@ -1,713 +0,0 @@
|
|
|
1
|
-
(function () {
|
|
2
|
-
var link = (function () {
|
|
3
|
-
'use strict';
|
|
4
|
-
|
|
5
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
6
|
-
|
|
7
|
-
var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
|
|
8
|
-
|
|
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 $_4b6xsbfujm0ofzch = {
|
|
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
|
-
|
|
68
|
-
var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
|
69
|
-
|
|
70
|
-
var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
71
|
-
|
|
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
|
-
}
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
var $_evd3tpfvjm0ofzck = { open: open$$1 };
|
|
98
|
-
|
|
99
|
-
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
100
|
-
|
|
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;
|
|
118
|
-
};
|
|
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 (!$_4b6xsbfujm0ofzch.hasRelList(editor.settings) && $_4b6xsbfujm0ofzch.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)));
|
|
185
|
-
} else {
|
|
186
|
-
editor.execCommand('mceInsertLink', false, linkAttrs);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
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);
|
|
198
|
-
} else {
|
|
199
|
-
editor.execCommand('unlink');
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
};
|
|
203
|
-
};
|
|
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);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
};
|
|
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);
|
|
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
|
-
};
|
|
234
|
-
|
|
235
|
-
var global$5 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
|
236
|
-
|
|
237
|
-
var global$6 = tinymce.util.Tools.resolve('tinymce.util.XHR');
|
|
238
|
-
|
|
239
|
-
var attachState = {};
|
|
240
|
-
var createLinkList = function (editor, callback) {
|
|
241
|
-
var linkList = $_4b6xsbfujm0ofzch.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));
|
|
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);
|
|
268
|
-
}
|
|
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
|
-
});
|
|
315
|
-
return {
|
|
316
|
-
name: 'anchor',
|
|
317
|
-
type: 'listbox',
|
|
318
|
-
label: 'Anchors',
|
|
319
|
-
values: anchorList,
|
|
320
|
-
onselect: linkListChangeHandler
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
};
|
|
324
|
-
var updateText = function () {
|
|
325
|
-
if (!initialText && onlyText && !data.text) {
|
|
326
|
-
this.parent().parent().find('#text')[0].value(this.value());
|
|
327
|
-
}
|
|
328
|
-
};
|
|
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);
|
|
343
|
-
}
|
|
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
|
-
}
|
|
354
|
-
};
|
|
355
|
-
var onBeforeCall = function (e) {
|
|
356
|
-
e.meta = win.toJSON();
|
|
357
|
-
};
|
|
358
|
-
onlyText = $_d522tkfzjm0ofzda.isOnlyTextSelected(selection.getContent());
|
|
359
|
-
anchorElm = $_d522tkfzjm0ofzda.getAnchorElement(editor);
|
|
360
|
-
data.text = initialText = $_d522tkfzjm0ofzda.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 ($_4b6xsbfujm0ofzch.hasDefaultLinkTarget(editor.settings)) {
|
|
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();
|
|
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 ($_4b6xsbfujm0ofzch.shouldShowTargetList(editor.settings)) {
|
|
405
|
-
if ($_4b6xsbfujm0ofzch.getTargetList(editor.settings) === undefined) {
|
|
406
|
-
$_4b6xsbfujm0ofzch.setTargetList(editor, [
|
|
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
|
-
})
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
if ($_4b6xsbfujm0ofzch.hasLinkClassList(editor.settings)) {
|
|
437
|
-
classListCtrl = {
|
|
438
|
-
name: 'class',
|
|
439
|
-
type: 'listbox',
|
|
440
|
-
label: 'Class',
|
|
441
|
-
values: buildListItems($_4b6xsbfujm0ofzch.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 ($_4b6xsbfujm0ofzch.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 = $_4b6xsbfujm0ofzch.assumeExternalTargets(editor.settings);
|
|
487
|
-
var insertLink = $_d522tkfzjm0ofzda.link(editor, attachState);
|
|
488
|
-
var removeLink = $_d522tkfzjm0ofzda.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 $_8kb7qsg1jm0ofzdg = { open: open$1 };
|
|
524
|
-
|
|
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
|
-
$_evd3tpfvjm0ofzck.open(a.href);
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
var openDialog = function (editor) {
|
|
556
|
-
return function () {
|
|
557
|
-
$_8kb7qsg1jm0ofzdg.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 ($_4b6xsbfujm0ofzch.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && $_d522tkfzjm0ofzda.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);
|
|
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
|
-
});
|
|
601
|
-
};
|
|
602
|
-
};
|
|
603
|
-
var toggleViewLinkState = function (editor) {
|
|
604
|
-
return function () {
|
|
605
|
-
var self = this;
|
|
606
|
-
var toggleVisibility = function (e) {
|
|
607
|
-
if ($_d522tkfzjm0ofzda.hasLinks(e.parents)) {
|
|
608
|
-
self.show();
|
|
609
|
-
} else {
|
|
610
|
-
self.hide();
|
|
611
|
-
}
|
|
612
|
-
};
|
|
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
|
-
};
|
|
622
|
-
var $_c3czoyfsjm0ofzcd = {
|
|
623
|
-
openDialog: openDialog,
|
|
624
|
-
gotoSelectedLink: gotoSelectedLink,
|
|
625
|
-
leftClickedOnAHref: leftClickedOnAHref,
|
|
626
|
-
setupGotoLinks: setupGotoLinks,
|
|
627
|
-
toggleActiveState: toggleActiveState,
|
|
628
|
-
toggleViewLinkState: toggleViewLinkState
|
|
629
|
-
};
|
|
630
|
-
|
|
631
|
-
var register = function (editor) {
|
|
632
|
-
editor.addCommand('mceLink', $_c3czoyfsjm0ofzcd.openDialog(editor));
|
|
633
|
-
};
|
|
634
|
-
var $_17rb7bfrjm0ofzcc = { register: register };
|
|
635
|
-
|
|
636
|
-
var setup = function (editor) {
|
|
637
|
-
editor.addShortcut('Meta+K', '', $_c3czoyfsjm0ofzcd.openDialog(editor));
|
|
638
|
-
};
|
|
639
|
-
var $_bygts2g4jm0ofzdn = { setup: setup };
|
|
640
|
-
|
|
641
|
-
var setupButtons = function (editor) {
|
|
642
|
-
editor.addButton('link', {
|
|
643
|
-
active: false,
|
|
644
|
-
icon: 'link',
|
|
645
|
-
tooltip: 'Insert/edit link',
|
|
646
|
-
onclick: $_c3czoyfsjm0ofzcd.openDialog(editor),
|
|
647
|
-
onpostrender: $_c3czoyfsjm0ofzcd.toggleActiveState(editor)
|
|
648
|
-
});
|
|
649
|
-
editor.addButton('unlink', {
|
|
650
|
-
active: false,
|
|
651
|
-
icon: 'unlink',
|
|
652
|
-
tooltip: 'Remove link',
|
|
653
|
-
onclick: $_d522tkfzjm0ofzda.unlink(editor),
|
|
654
|
-
onpostrender: $_c3czoyfsjm0ofzcd.toggleActiveState(editor)
|
|
655
|
-
});
|
|
656
|
-
if (editor.addContextToolbar) {
|
|
657
|
-
editor.addButton('openlink', {
|
|
658
|
-
icon: 'newtab',
|
|
659
|
-
tooltip: 'Open link',
|
|
660
|
-
onclick: $_c3czoyfsjm0ofzcd.gotoSelectedLink(editor)
|
|
661
|
-
});
|
|
662
|
-
}
|
|
663
|
-
};
|
|
664
|
-
var setupMenuItems = function (editor) {
|
|
665
|
-
editor.addMenuItem('openlink', {
|
|
666
|
-
text: 'Open link',
|
|
667
|
-
icon: 'newtab',
|
|
668
|
-
onclick: $_c3czoyfsjm0ofzcd.gotoSelectedLink(editor),
|
|
669
|
-
onPostRender: $_c3czoyfsjm0ofzcd.toggleViewLinkState(editor),
|
|
670
|
-
prependToContext: true
|
|
671
|
-
});
|
|
672
|
-
editor.addMenuItem('link', {
|
|
673
|
-
icon: 'link',
|
|
674
|
-
text: 'Link',
|
|
675
|
-
shortcut: 'Meta+K',
|
|
676
|
-
onclick: $_c3czoyfsjm0ofzcd.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: $_d522tkfzjm0ofzda.unlink(editor),
|
|
685
|
-
stateSelector: 'a[href]'
|
|
686
|
-
});
|
|
687
|
-
};
|
|
688
|
-
var setupContextToolbars = function (editor) {
|
|
689
|
-
if (editor.addContextToolbar) {
|
|
690
|
-
editor.addContextToolbar($_c3czoyfsjm0ofzcd.leftClickedOnAHref(editor), 'openlink | link unlink');
|
|
691
|
-
}
|
|
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
|
-
|
|
710
|
-
return Plugin;
|
|
711
|
-
|
|
712
|
-
}());
|
|
713
|
-
})();
|