Sha256: 2785b88db9d1341892aafe892a66c60ae4075fd8bc4799475b01d27cc5c3f13c

Contents?: true

Size: 1007 Bytes

Versions: 1

Compression:

Stored size: 1007 Bytes

Contents

$(function(){
  $('#fileupload').fileupload({
    fail: function(e, data) {
      $.each(data.files, function(i,f) {
        localStorage['failed_uploads'] =
          (localStorage['failed_uploads']||'<br>') +
          ('"' + f.name + '" - ' + data.errorThrown + '<br><br>');
      });
    },
    start: function() {
      $('#progress_modal').modal({keyboard: false, backdrop: 'static'});
    },
    stop: function() {
      var fuel = this;
      window.setTimeout(function() {
        $('#progress_modal').modal('hide');
        if(typeof fileupload_callback === 'function')
          fileupload_callback();
        else window.location.reload(true);
      }, 600);
    },
    progressall: function (e, data) {
      var progress = parseInt(data.loaded / data.total * 100, 10);
      $('#progress_bar .bar').css('width', progress + '%');
    }
  });
  if(localStorage['failed_uploads']) {
    ELFinder.sticky_warn(localStorage['failed_uploads']);
    localStorage.removeItem('failed_uploads');
  }
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
el-finder-0.1.0 assets/fileupload.js