Browse Source

Releases v1.4.4

master v1.4.4
pandao 10 years ago
parent
commit
7e5a1e9f9e
  1. 3
      CHANGE.md
  2. 15
      plugins/image-dialog/image-dialog.js

3
CHANGE.md

@ -452,4 +452,5 @@ v1.2.0 主要更新:
####v1.4.4
- 修复 Bug [#81](https://github.com/pandao/editor.md/issues/81),即不支持 `:+1:` 的问题;
- 修复 Bug [#85](https://github.com/pandao/editor.md/issues/85),即图片上传返回结果不支持 `Content-Type=application/json` 的问题;
- 修复 Bug [#85](https://github.com/pandao/editor.md/issues/85),即图片上传返回结果不支持 `Content-Type=application/json` 的问题;
- 修复图片上传无法显示 loading 的问题;

15
plugins/image-dialog/image-dialog.js

@ -3,7 +3,7 @@
*
* @file image-dialog.js
* @author pandao
* @version 1.3.1
* @version 1.3.2
* @updateTime 2015-05-09
* {@link https://github.com/pandao/editor.md}
* @license MIT
@ -31,6 +31,11 @@
cm.focus();
var loading = function(show) {
var _loading = dialog.find("." + classPrefix + "dialog-mask");
_loading[(show) ? "show" : "hide"]();
};
if (editor.find("." + dialogName).length < 1)
{
var guid = (new Date).getTime();
@ -136,18 +141,14 @@
}
else
{
if (typeof (dialog.loading) == "function") {
dialog.loading(true);
}
loading(true);
var submitHandler = function() {
var uploadIframe = document.getElementById(iframeName);
uploadIframe.onload = function() {
if (typeof (dialog.loading) == "function") {
dialog.loading(false);
}
loading(false);
var json = uploadIframe.contentWindow.document.body.innerText;
json = (typeof JSON.parse !== "undefined") ? JSON.parse(json) : eval("(" + json + ")");

Loading…
Cancel
Save