vendor/assets/javascripts/jquery.ezdz.js in ezdz-rails-0.5.0 vs vendor/assets/javascripts/jquery.ezdz.js in ezdz-rails-0.5.1

- old
+ new

@@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- // Ezdz [izy-dizy] - // v0.5.0 - released 2016-04-30 17:30 + // v0.5.1 - released 2016-05-10 14:52 // Licensed under the MIT license. // https://github.com/jaysalvat/ezdz // ---------------------------------------------------------------------------- // Copyright (C) 2016 Jay Salvat // http://jaysalvat.com/ @@ -197,12 +197,12 @@ $ezdz.removeClass(settings.classes.reject + ' ' + settings.classes.accept); // If the Mime-Type is not accepted if (accepted !== true) { $input.val(''); - $ezdz.addClass(settings.classes.reject); + self.preview(null); // Trigger the reject callback if ($.isFunction(settings.reject)) { settings.reject.apply($input, [ file, errors ]); } @@ -282,11 +282,11 @@ settings.accept.apply($input, [ file ]); } // The file is invalidated, so rejected } else { $input.val(''); - $ezdz.addClass(settings.classes.reject); + self.preview(null); // Trigger the reject callback if ($.isFunction(settings.reject)) { settings.reject.apply($input, [ file, errors ]); }