From bd622e3d2341a40b79e4205dcecbd706d015d91d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 16 Aug 2017 09:36:51 +0800 Subject: [PATCH] * finish task #3086. --- module/common/view/kindeditor.html.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/module/common/view/kindeditor.html.php b/module/common/view/kindeditor.html.php index 44a953d1cb..09cd0bca26 100755 --- a/module/common/view/kindeditor.html.php +++ b/module/common/view/kindeditor.html.php @@ -112,6 +112,9 @@ function initKindeditor(afterInit) var file = original.clipboardData.items[0].getAsFile(); if(file) { + $('#submit').attr('disabled', 'disabled'); + $("body").click(function(){$('#submit').removeAttr('disabled');}); + var reader = new FileReader(); reader.onload = function(evt) { @@ -121,13 +124,17 @@ function initKindeditor(afterInit) var contentType = arr[0].split(";")[0].split(":")[1]; html = ''; - $.post(createLink('file', 'ajaxPasteImage', 'uid=' + kuid), {editor: html}, function(data){cmd.inserthtml(data);}); + $.post(createLink('file', 'ajaxPasteImage', 'uid=' + kuid), {editor: html}, function(data) + { + cmd.inserthtml(data); + $('#submit').removeAttr('disabled'); + }); }; reader.readAsDataURL(file); } }); } - /* Paste in firefox and other firefox.*/ + /* Paste in firefox and other firefox. */ else { K(doc.body).bind('paste', function(ev) @@ -137,10 +144,13 @@ function initKindeditor(afterInit) var html = K(doc.body).html(); if(html.search(/'; frame.html(data); + $('#submit').removeAttr('disabled'); }); } }, 80);