'use strict';
/*globals $:false */

Dropzone.options.newThread = {
  init: function() {
    var self = this;
    // config
    self.options.addRemoveLinks = true;
    self.options.dictRemoveFile = 'Delete';

    // bind events

    //New file added
    self.on('addedfile', function(file) {
      console.log('new file added ', file);
    });

    // Send file starts
    self.on('sending', function(file) {
      console.log('upload started', file);
      $('.meter').show();
    });

    // File upload Progress
    self.on('totaluploadprogress', function(progress) {
      console.log('progress ', progress);
      $('.roller').width(progress + '%');
    });

    self.on('queuecomplete', function(progress) {
      $('.meter').delay(999).slideUp(999);
    });

    self.on('complete', function(file) {
      dom.addThreadDom(file.xhr.response, file);
      console.log('complete upload');
    });

    // On removing file
    self.on('removedfile', function(file) {
      console.log(file);
      $.ajax({
        url: '/uploaded/files/' + file.name,
        type: 'DELETE',
        success: function(result) {
          console.log(result);
        }
      });
    });

  }
};

@@ -106,134 +106,17 @@
 is;%0A
-    // config%0A    self.options.addRemoveLinks = true;%0A    self.options.dictRemoveFile = 'Delete';%0A%0A    // bind events%0A%0A    //N
+%0A    // n
 ew f
@@ -231,9 +231,9 @@
  // 
-S
+s
 end 
@@ -335,716 +335,160 @@
     
-  $('.meter').show();%0A    %7D);%0A%0A    // File upload Progress%0A    self.on('totaluploadprogress', function(progress) %7B%0A      console.log('progress ', progress);%0A      $('.roller').width(progress + '%25');%0A    %7D);%0A%0A    self.on('queuecomplete', function(progress) %7B%0A      $('.meter').delay(999).slideUp(999);%0A    %7D);%0A%0A    self.on('complete', function(file) %7B%0A      dom.addThreadDom(file.xhr.response, file);%0A      console.log('complete upload');%0A    %7D);%0A%0A    // On removing file%0A    self.on('removedfile', function(file) %7B%0A      console.log(file);%0A      $.ajax(%7B%0A        url: '/uploaded/files/' + file.name,%0A        type: 'DELETE',%0A        success: function(result) %7B%0A          console.log(result);%0A        %7D%0A      %7D
+%7D);%0A%0A    // file completed%0A    self.on('complete', function(file) %7B%0A      dom.addThreadDom(file.xhr.response, file);%0A      console.log('complete upload'
 );%0A 

Remove Delete Stuff