|  | @@ -94,10 +94,10 @@
 | 
	
		
			
				|  |  |                  template: obj.previewGenericTemplate,
 | 
	
		
			
				|  |  |                  showZoom: obj.fileActionSettings.showZoom,
 | 
	
		
			
				|  |  |                  showDrag: obj.fileActionSettings.showDrag,
 | 
	
		
			
				|  |  | -                getSize: function(size) {
 | 
	
		
			
				|  |  | +                getSize: function (size) {
 | 
	
		
			
				|  |  |                      return obj._getSize(size);
 | 
	
		
			
				|  |  |                  },
 | 
	
		
			
				|  |  | -                parseTemplate: function (cat, data, fname, ftype, pId, ftr, ind, size) {
 | 
	
		
			
				|  |  | +                parseTemplate: function (cat, data, fname, ftype, pId, ftr, ind) {
 | 
	
		
			
				|  |  |                      var fc = ' file-preview-initial';
 | 
	
		
			
				|  |  |                      return obj._generatePreviewTemplate(cat, data, fname, ftype, pId, false, null, fc, ftr, ind);
 | 
	
		
			
				|  |  |                  },
 | 
	
	
		
			
				|  | @@ -842,7 +842,7 @@
 | 
	
		
			
				|  |  |              return 'other';
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          _parseFilePreviewIcon: function (content, fname) {
 | 
	
		
			
				|  |  | -            var self = this, ext, icn = self.previewFileIcon;
 | 
	
		
			
				|  |  | +            var self = this, proceed, ext, icn = self.previewFileIcon;
 | 
	
		
			
				|  |  |              if (fname && fname.indexOf('.') > -1) {
 | 
	
		
			
				|  |  |                  ext = fname.split('.').pop();
 | 
	
		
			
				|  |  |                  if (self.previewFileIconSettings && self.previewFileIconSettings[ext]) {
 | 
	
	
		
			
				|  | @@ -854,6 +854,7 @@
 | 
	
		
			
				|  |  |                              icn = self.previewFileIconSettings[key];
 | 
	
		
			
				|  |  |                              return;
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  | +                        proceed = true;
 | 
	
		
			
				|  |  |                      });
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -1036,6 +1037,7 @@
 | 
	
		
			
				|  |  |              settings = {
 | 
	
		
			
				|  |  |                  handle: '.drag-handle-init',
 | 
	
		
			
				|  |  |                  dataIdAttr: 'data-preview-id',
 | 
	
		
			
				|  |  | +                draggable: '.file-preview-initial',
 | 
	
		
			
				|  |  |                  onSort: function (e) {
 | 
	
		
			
				|  |  |                      var oldIndex = e.oldIndex, newIndex = e.newIndex;
 | 
	
		
			
				|  |  |                      self.initialPreview = moveArray(self.initialPreview, oldIndex, newIndex);
 | 
	
	
		
			
				|  | @@ -1990,10 +1992,10 @@
 | 
	
		
			
				|  |  |                                  }
 | 
	
		
			
				|  |  |                              });
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  | -                        var filestack = self.getFileStack(true), len = filestack.length, chk = previewCache.count(
 | 
	
		
			
				|  |  | -                            self.id),
 | 
	
		
			
				|  |  | -                            hasThumb = self.showPreview && self.$preview.find('.file-preview-frame').length;
 | 
	
		
			
				|  |  |                          self._clearFileInput();
 | 
	
		
			
				|  |  | +                        var filestack = self.getFileStack(true), chk = previewCache.count(self.id),
 | 
	
		
			
				|  |  | +                            len = filestack.length,
 | 
	
		
			
				|  |  | +                            hasThumb = self.showPreview && self.$preview.find('.file-preview-frame').length;
 | 
	
		
			
				|  |  |                          if (len === 0 && chk === 0 && !hasThumb) {
 | 
	
		
			
				|  |  |                              self.reset();
 | 
	
		
			
				|  |  |                          } else {
 | 
	
	
		
			
				|  | @@ -2029,15 +2031,15 @@
 | 
	
		
			
				|  |  |              if (bytes === null || isNaN(size)) {
 | 
	
		
			
				|  |  |                  return '';
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            var self = this, i, tmplt = self._getLayoutTemplate('size'), func = self.fileSizeGetter, sizes, out;
 | 
	
		
			
				|  |  | +            var self = this, i, func = self.fileSizeGetter, sizes, out;
 | 
	
		
			
				|  |  |              if (typeof func === 'function') {
 | 
	
		
			
				|  |  |                  out = func(bytes);
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  |                  i = Math.floor(Math.log(size) / Math.log(1024));
 | 
	
		
			
				|  |  | -                sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
 | 
	
		
			
				|  |  | -                    out = (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i];
 | 
	
		
			
				|  |  | +                sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
 | 
	
		
			
				|  |  | +                out = (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i];
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            return tmplt.replace('{sizeText}', out);
 | 
	
		
			
				|  |  | +            return self._getLayoutTemplate('size').replace('{sizeText}', out);
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          _generatePreviewTemplate: function (cat, data, fname, ftype, previewId, isError, size, frameClass, foot, ind) {
 | 
	
		
			
				|  |  |              var self = this, tmplt = self._getPreviewTemplate(cat), content, sText, css = frameClass || '',
 |