Browse Source

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 years ago
parent
commit
adca81fd4f
1 changed files with 9 additions and 6 deletions
  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