Skip to content

Commit

Permalink
Item14779: fixed eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Nov 1, 2018
1 parent 550f4f4 commit dc66255
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
,v
*.swp
*.jslint
pub/System/DropPlugin/*gz
pub/System/DropPlugin/drop.js
pub/System/DropPlugin/drop.css
Expand Down
20 changes: 11 additions & 9 deletions pub/System/DropPlugin/drop.uncompressed.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
As per the GPL, removal of this notice is prohibited.
*/
(function($) {
$(document).ready( function() {

/* global StrikeOne:false */

"use strict";
jQuery(function($) {
// Hack to remove the TopicInteractionPlugin dropzone from $("body")
// so our other dropzones fire when DropPlugin is active on the page.
$(".dropPluginForm").first().each(function() {
Expand All @@ -35,7 +38,7 @@ As per the GPL, removal of this notice is prohibited.
// Add/remove CSS when the drop target is dragged over
$(form).closest('.dropPluginZone').each(function() {
var $zone = $(this);
$zone.on('dragenter', function(e) {
$zone.on('dragenter', function() {
$('.dropPluginZone').not($zone).removeClass('hover');
$zone.addClass('hover');
});
Expand Down Expand Up @@ -66,7 +69,7 @@ As per the GPL, removal of this notice is prohibited.
var origName = data.files[0].name;
// Check if it's allowed to be dropped here
if (extensions.length > 0
&& !new RegExp("\.(" + extensions + ")$", "i").test(origName)) {
&& !new RegExp("\.(" + extensions + ")$", "i").test(origName)) { // eslint-disable-line no-useless-escape
$.pnotify({
text: "Cannot drop " + origName + ", file type mismatch",
type: "error" });
Expand All @@ -86,7 +89,7 @@ As per the GPL, removal of this notice is prohibited.
},
done: function(e, xhr) {
var data = xhr.result;

// Import the new nonce, if validation is enabled
if (this.validation_key && data.nonce)
this.validation_key.value = "?" + data.nonce;
Expand All @@ -111,10 +114,10 @@ As per the GPL, removal of this notice is prohibited.
$(this).attr(
'src',
$(this).attr('src') + '?t='+new Date());
});;
});
}
// Silent fail
})
});
});
},
always: function() {
Expand All @@ -123,5 +126,4 @@ As per the GPL, removal of this notice is prohibited.
}
});
});
});
})(jQuery);
});

0 comments on commit dc66255

Please sign in to comment.