@@ -90,7 +90,7 @@ qq.Templating = function(spec) {
9090 log ,
9191 isEditElementsExist ,
9292 isRetryElementExist ,
93- templateHtml ,
93+ templateDom ,
9494 container ,
9595 fileList ,
9696 showThumbnails ,
@@ -341,7 +341,7 @@ qq.Templating = function(spec) {
341341 scriptHtml ,
342342 fileListNode ,
343343 tempTemplateEl ,
344- fileListHtml ,
344+ fileListEl ,
345345 defaultButton ,
346346 dropArea ,
347347 thumbnail ,
@@ -452,7 +452,7 @@ qq.Templating = function(spec) {
452452 throw new Error ( "Could not find the file list container in the template!" ) ;
453453 }
454454
455- fileListHtml = fileListNode . innerHTML ;
455+ fileListEl = fileListNode . children [ 0 ] . cloneNode ( true ) ;
456456 fileListNode . innerHTML = "" ;
457457
458458 // We must call `createElement` in IE8 in order to target and hide any <dialog> via CSS
@@ -463,8 +463,8 @@ qq.Templating = function(spec) {
463463 log ( "Template parsing complete" ) ;
464464
465465 return {
466- template : qq . trimStr ( tempTemplateEl . innerHTML ) ,
467- fileTemplate : qq . trimStr ( fileListHtml )
466+ template : tempTemplateEl ,
467+ fileTemplate : fileListEl
468468 } ;
469469 } ,
470470
@@ -625,7 +625,7 @@ qq.Templating = function(spec) {
625625
626626 container = options . containerEl ;
627627 showThumbnails = options . imageGenerator !== undefined ;
628- templateHtml = parseAndGetTemplate ( ) ;
628+ templateDom = parseAndGetTemplate ( ) ;
629629
630630 cacheThumbnailPlaceholders ( ) ;
631631
@@ -635,7 +635,7 @@ qq.Templating = function(spec) {
635635
636636 generatedThumbnails = 0 ;
637637
638- container . innerHTML = templateHtml . template ;
638+ container . appendChild ( templateDom . template . cloneNode ( true ) ) ;
639639 hide ( getDropProcessing ( ) ) ;
640640 this . hideTotalProgress ( ) ;
641641 fileList = options . fileContainerEl || getTemplateEl ( container , selectorClasses . list ) ;
@@ -662,7 +662,7 @@ qq.Templating = function(spec) {
662662 } ,
663663
664664 addFile : function ( id , name , prependInfo , hideForever , batch ) {
665- var fileEl = qq . toElement ( templateHtml . fileTemplate ) ,
665+ var fileEl = templateDom . fileTemplate . cloneNode ( true ) ,
666666 fileNameEl = getTemplateEl ( fileEl , selectorClasses . file ) ,
667667 uploaderEl = getTemplateEl ( container , selectorClasses . uploader ) ,
668668 fileContainer = batch ? fileBatch . content : fileList ,
0 commit comments