From 0211a1f22620ea404d1e05fbc536d1c03ab3c97e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=90=E5=85=9C?= Date: Mon, 17 Dec 2018 21:55:10 +0800 Subject: [PATCH] edit config value in fullscreen --- .../src/main/resources/static/config.html | 2 + .../scripts/directive/item-modal-directive.js | 2 + .../jquery.textareafullscreen.js | 199 ++++++++++++++++++ .../jquery-plugin/textareafullscreen.css | 34 +++ .../static/views/component/item-modal.html | 2 +- 5 files changed, 238 insertions(+), 1 deletion(-) create mode 100755 apollo-portal/src/main/resources/static/vendor/jquery-plugin/jquery.textareafullscreen.js create mode 100755 apollo-portal/src/main/resources/static/vendor/jquery-plugin/textareafullscreen.css diff --git a/apollo-portal/src/main/resources/static/config.html b/apollo-portal/src/main/resources/static/config.html index a6eaeb857..9fb0b6ef6 100644 --- a/apollo-portal/src/main/resources/static/config.html +++ b/apollo-portal/src/main/resources/static/config.html @@ -8,6 +8,7 @@ + @@ -364,6 +365,7 @@ + diff --git a/apollo-portal/src/main/resources/static/scripts/directive/item-modal-directive.js b/apollo-portal/src/main/resources/static/scripts/directive/item-modal-directive.js index 9b73cd452..317fc5d8d 100644 --- a/apollo-portal/src/main/resources/static/scripts/directive/item-modal-directive.js +++ b/apollo-portal/src/main/resources/static/scripts/directive/item-modal-directive.js @@ -30,6 +30,8 @@ function itemModalDirective(toastr, $sce, AppUtil, EventManager, ConfigService) scope.valueWithHiddenChars = $sce.trustAsHtml(''); }); + $("#valueEditor").textareafullscreen(); + function doItem() { if (!scope.item.value) { diff --git a/apollo-portal/src/main/resources/static/vendor/jquery-plugin/jquery.textareafullscreen.js b/apollo-portal/src/main/resources/static/vendor/jquery-plugin/jquery.textareafullscreen.js new file mode 100755 index 000000000..60e5ad544 --- /dev/null +++ b/apollo-portal/src/main/resources/static/vendor/jquery-plugin/jquery.textareafullscreen.js @@ -0,0 +1,199 @@ +/* + + jQuery Textarea Fullscreen Editor v1.0 + Fullscreen text editor plugin for jQuery. + + :For more details visit http://github.com/CreoArt/jquery.textareafullscreen + + - CreoArt + - http://github.com/CreoArt + + Licensed under Apache - https://raw.githubusercontent.com/CreoArt/jquery.textareafullscreen/master/LICENSE + +*/ +(function($) { + "use strict"; + + var isFullscreen = false, + $el, + $wrapper, + $editor, + $icon, + $overlay, + transitionDuration = 300, + sourceWidth, + sourceHeight, + settings = { + overlay: true, + maxWidth: '', + maxHeight: '' + }; + var methods = { + + init: function(opts) { + + settings = settings || {}; + $.extend(true, settings, settings); + $.extend(true, settings, opts); + + $el = $(this); + if (!$el.is('textarea')) { + $.error( + 'Error initializing Textarea Fullscreen Editor Plugin. It can only work on -- GitLab