浏览代码

Image upload inside CKEditor (via drag and drop) seems to be desactivated on IE9.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4315 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 8 年之前
父节点
当前提交
adca81fd4f
共有 1 个文件被更改,包括 9 次插入6 次删除
  1. 9 6
      core/inlineimage.class.inc.php

+ 9 - 6
core/inlineimage.class.inc.php

@@ -473,12 +473,15 @@ EOF
 							}
 					});
 				}
-				oEditor.widgets.registered.uploadimage.onUploaded = function( upload ) {
-				var oData = JSON.parse(upload.xhr.responseText);
-			    	this.replaceWith( '<img src="' + upload.url + '" ' +
-			    		'width="' + oData.width + '" ' +
-						'height="' + oData.height + '">' );
-			    }
+				if (oEditor.widgets.registered.uploadimage)
+				{
+					oEditor.widgets.registered.uploadimage.onUploaded = function( upload ) {
+					var oData = JSON.parse(upload.xhr.responseText);
+				    	this.replaceWith( '<img src="' + upload.url + '" ' +
+				    		'width="' + oData.width + '" ' +
+							'height="' + oData.height + '">' );
+				    }
+				}
 			});
 		});
 EOF