diff --git a/dialogs/image/image.js b/dialogs/image/image.js index b6222df1..5af39ca8 100755 --- a/dialogs/image/image.js +++ b/dialogs/image/image.js @@ -138,13 +138,16 @@ * */ var Upload = { showCount: 0, - uploadTpl: '
' + - '' + - '
' + - '' + - '
' + + createUpForm: function(i) { + var me = this; - '
', + return '
' + + '' + + '
' + + '' + + '
' + + '
' + }, init: function (editor, $w) { var me = this; @@ -169,7 +172,7 @@ render: function (sel, t) { var me = this; - $(sel, me.dialog).append($(me.uploadTpl.replace(/%%/g, t))); + $(sel, me.dialog).append($(me.createUpForm(t))); return me; }, @@ -196,7 +199,7 @@ submit: function (callback) { var me = this, - input = $( ''), + input = $( ''), input = input[0]; $(me.dialog).delegate( ".edui-image-file", "change", function ( e ) {