Files
orbit4-5/app/assets/javascripts/file-upload/drop-zone.js
T
harrybomrah a72d5fbb48 change in parser and new template for 4.5
Conflicts:
	app/controllers/admin/dashboards_controller.rb
	config/application.rb
2014-05-02 18:26:21 +08:00

19 lines
491 B
JavaScript

$(document).bind('dragover', function (e) {
var dropZone = $('#dropzone'),
timeout = window.dropZoneTimeout;
if (!timeout) {
dropZone.removeAttr('style').addClass('in');
} else {
clearTimeout(timeout);
};
if (e.target === dropZone[0]) {
dropZone.addClass('hover');
} else {
dropZone.removeClass('hover');
};
window.dropZoneTimeout = setTimeout(function () {
window.dropZoneTimeout = null;
dropZone.removeClass('in hover');
$('.files').checkListLength();
}, 100);
});