From 09c69b5bb9f1dc6035758c79cf73e0568285b916 Mon Sep 17 00:00:00 2001 From: devilrep Date: Tue, 20 Oct 2015 12:12:19 +0300 Subject: [PATCH] Block UI until content loaded on url paste widget: changed control buttons while loading preview --- public/assets/css/style.css | 4 ++++ public/js/vendor/ckeditor/contents.css | 12 ++++++------ .../ckeditor/plugins/linkwithpreview/dialogs/main.js | 10 ++++++++++ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 9ddf308..d424f4c 100755 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -1640,6 +1640,10 @@ div .fa-05 { display: block; } +a.cke_dialog_ui_button_readonly { + background-image: linear-gradient(to bottom,#ffa166,#ffa166) !important; +} + /* |------------------------------------------------------------------------------ | Roles diff --git a/public/js/vendor/ckeditor/contents.css b/public/js/vendor/ckeditor/contents.css index b0c46e7..d2b79e4 100644 --- a/public/js/vendor/ckeditor/contents.css +++ b/public/js/vendor/ckeditor/contents.css @@ -35,12 +35,12 @@ blockquote border-width: 0; } - blockquote .author { - font-style: normal; - font-weight: bold; - margin-bottom: 0.7em; - display: inline-block; - } +blockquote .author { + font-style: normal; + font-weight: bold; + margin-bottom: 0.7em; + display: inline-block; +} .cke_contents_ltr blockquote { diff --git a/public/js/vendor/ckeditor/plugins/linkwithpreview/dialogs/main.js b/public/js/vendor/ckeditor/plugins/linkwithpreview/dialogs/main.js index a74c810..b882bfb 100644 --- a/public/js/vendor/ckeditor/plugins/linkwithpreview/dialogs/main.js +++ b/public/js/vendor/ckeditor/plugins/linkwithpreview/dialogs/main.js @@ -120,6 +120,12 @@ CKEDITOR.dialog.add('linkWithPreviewDialog', function (editor) { this.setupContent(this.element, this.definition); }, onOk: function () { + if ( + this.parts.footer.$.getElementsByTagName('a')[0] + .classList.contains('cke_dialog_ui_button_readonly') + ) { + return false; + } this.commitContent(this.element); if (this.insertMode) { @@ -175,10 +181,14 @@ CKEDITOR.dialog.add('linkWithPreviewDialog', function (editor) { ); this.dialog.preview.style.display = 'block'; this.dialog.preview.classList.add('preload'); + this.dialog.parts.footer.$.getElementsByTagName('a')[0] + .classList.add('cke_dialog_ui_button_readonly'); }, preloadHide: function (image) { this.dialog.preview.setAttribute('src', image); this.dialog.preview.classList.remove('preload'); + this.dialog.parts.footer.$.getElementsByTagName('a')[0] + .classList.remove('cke_dialog_ui_button_readonly'); } }; });