Fixing migration from config.json to .jshintrc
Last move was unfinished Added .idea folder to gitignore Prevent adding of jetbrains IDEs configs Added a forgotten semi-colon Maybe something to do to declare globally undefined variable format Not needed comma Unused variable Unused variable Unused params Could be confusing Unused params Could be confusing JShint validation JSON dot notation + Strict compare between integers + Missing semi-colon + Unused variables + Unused params Fixing migration from config.json to .jshintrc Last move was unfinished Added .idea folder to gitignore Prevent adding of jetbrains IDEs configs Added a forgotten semi-colon Maybe something to do to declare globally undefined variable format Not needed comma Unused variable Unused variable Unused params Could be confusing Unused params Could be confusing
This commit is contained in:
Родитель
ad24184ff8
Коммит
8822905da3
|
@ -20,6 +20,7 @@ media/build_id.txt
|
||||||
media/manifest.appcache
|
media/manifest.appcache
|
||||||
media/external/*
|
media/external/*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.idea
|
||||||
/media/img/uploads
|
/media/img/uploads
|
||||||
*.js.tmp
|
*.js.tmp
|
||||||
*.css.tmp
|
*.css.tmp
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
// JSHint configurations for node-jshint.
|
// JSHint configurations for node-jshint.
|
||||||
// install with "npm install -g jshint"
|
// install with "npm install -g jshint"
|
||||||
// run with "jshint <file(s)> --config config.json"
|
// run with "jshint <file(s)> --config .jshintrc"
|
||||||
|
|
||||||
"asi" : false, // Semicolons required! we minify.
|
"asi" : false, // Semicolons required! we minify.
|
||||||
"undef" : false, // var early, var often
|
"undef" : false, // var early, var often
|
||||||
|
@ -15,4 +15,4 @@
|
||||||
"_",
|
"_",
|
||||||
"Highcharts"
|
"Highcharts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ var methods = {
|
||||||
oldVal = $elem.attr(attr),
|
oldVal = $elem.attr(attr),
|
||||||
newVal = oldVal.replace(options.prefix, newNum);
|
newVal = oldVal.replace(options.prefix, newNum);
|
||||||
$elem.attr(attr, newVal);
|
$elem.attr(attr, newVal);
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Insert new row
|
// Insert new row
|
||||||
|
|
|
@ -20,5 +20,5 @@ z.keys = {
|
||||||
'COMMAND_RIGHT': 93,
|
'COMMAND_RIGHT': 93,
|
||||||
'WINDOWS_LEFT_OPERA': 219,
|
'WINDOWS_LEFT_OPERA': 219,
|
||||||
'WINDOWS_RIGHT_OPERA': 220,
|
'WINDOWS_RIGHT_OPERA': 220,
|
||||||
'APPLE': 24,
|
'APPLE': 24
|
||||||
};
|
};
|
||||||
|
|
|
@ -45,7 +45,7 @@ $.fn.ratingwidget = function(classes) {
|
||||||
if (t.attr('data-stars')) {
|
if (t.attr('data-stars')) {
|
||||||
showStars(t.attr('data-stars'));
|
showStars(t.attr('data-stars'));
|
||||||
}
|
}
|
||||||
}).mouseout(function(evt) {
|
}).mouseout(function() {
|
||||||
showStars(rating || 0);
|
showStars(rating || 0);
|
||||||
}).bind('touchmove touchend', function(e) {
|
}).bind('touchmove touchend', function(e) {
|
||||||
var wid = $widget.width();
|
var wid = $widget.width();
|
||||||
|
|
|
@ -205,7 +205,7 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$upload_field.bind("upload_finished", function(e, file, results) {
|
$upload_field.bind("upload_finished", function() {
|
||||||
upload_box.removeClass("ajax-loading");
|
upload_box.removeClass("ajax-loading");
|
||||||
upload_status_cancel.remove();
|
upload_status_cancel.remove();
|
||||||
});
|
});
|
||||||
|
@ -282,7 +282,7 @@
|
||||||
success: function(r) {
|
success: function(r) {
|
||||||
$upload_field.trigger("upload_success_results", [file, r]);
|
$upload_field.trigger("upload_success_results", [file, r]);
|
||||||
},
|
},
|
||||||
error: function(xhr, textStatus, errorThrown) {
|
error: function(xhr) {
|
||||||
var errOb = parseErrorsFromJson(xhr.responseText);
|
var errOb = parseErrorsFromJson(xhr.responseText);
|
||||||
$upload_field.trigger("upload_errors", [file, errOb.errors, errOb.json]);
|
$upload_field.trigger("upload_errors", [file, errOb.errors, errOb.json]);
|
||||||
$upload_field.trigger("upload_finished", [file]);
|
$upload_field.trigger("upload_finished", [file]);
|
||||||
|
@ -404,7 +404,7 @@
|
||||||
results.platforms_to_exclude.length) {
|
results.platforms_to_exclude.length) {
|
||||||
// e.g. after uploading a Mobile add-on
|
// e.g. after uploading a Mobile add-on
|
||||||
var excluded = false;
|
var excluded = false;
|
||||||
$('input.platform').each(function(e) {
|
$('input.platform').each(function() {
|
||||||
var $input = $(this);
|
var $input = $(this);
|
||||||
if ($.inArray($input.val(),
|
if ($.inArray($input.val(),
|
||||||
results.platforms_to_exclude) !== -1) {
|
results.platforms_to_exclude) !== -1) {
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
* extended by addonUploader(). Eventually imageUploader() should as well */
|
* extended by addonUploader(). Eventually imageUploader() should as well */
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
var instance_id = 0,
|
|
||||||
boundary = "BoUnDaRyStRiNg";
|
|
||||||
|
|
||||||
function getErrors(results) {
|
function getErrors(results) {
|
||||||
return results.errors;
|
return results.errors;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +13,6 @@
|
||||||
return $(this).each(function(){
|
return $(this).each(function(){
|
||||||
var $upload_field = $(this),
|
var $upload_field = $(this),
|
||||||
formData = false,
|
formData = false,
|
||||||
$form = $upload_field.closest('form'),
|
|
||||||
errors = false,
|
errors = false,
|
||||||
aborted = false;
|
aborted = false;
|
||||||
|
|
||||||
|
@ -26,12 +22,12 @@
|
||||||
|
|
||||||
$upload_field.bind({"change": uploaderStart});
|
$upload_field.bind({"change": uploaderStart});
|
||||||
|
|
||||||
$(settings['cancel']).click(_pd(function(){
|
$(settings.cancel).click(_pd(function(){
|
||||||
$upload_field.trigger('upload_action_abort');
|
$upload_field.trigger('upload_action_abort');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
function uploaderStart(e) {
|
function uploaderStart() {
|
||||||
if($upload_field[0].files.length == 0) {
|
if($upload_field[0].files.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,12 +46,12 @@
|
||||||
/* Disable uploading while something is uploading */
|
/* Disable uploading while something is uploading */
|
||||||
$upload_field.attr('disabled', true);
|
$upload_field.attr('disabled', true);
|
||||||
$upload_field.parent().find('a').addClass("disabled");
|
$upload_field.parent().find('a').addClass("disabled");
|
||||||
$upload_field.bind("reenable_uploader", function(e) {
|
$upload_field.bind("reenable_uploader", function() {
|
||||||
$upload_field.attr('disabled', false);
|
$upload_field.attr('disabled', false);
|
||||||
$upload_field.parent().find('a').removeClass("disabled");
|
$upload_field.parent().find('a').removeClass("disabled");
|
||||||
});
|
});
|
||||||
|
|
||||||
var exts = new RegExp("\\\.("+settings['filetypes'].join('|')+")$", "i");
|
var exts = new RegExp("\\\.("+settings.filetypes.join('|')+")$", "i");
|
||||||
|
|
||||||
if(!file.name.match(exts)) {
|
if(!file.name.match(exts)) {
|
||||||
errors = [gettext("The filetype you uploaded isn't recognized.")];
|
errors = [gettext("The filetype you uploaded isn't recognized.")];
|
||||||
|
@ -92,7 +88,7 @@
|
||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
formData.xhr.onreadystatechange = function(e){
|
formData.xhr.onreadystatechange = function(){
|
||||||
$upload_field.trigger("upload_onreadystatechange",
|
$upload_field.trigger("upload_onreadystatechange",
|
||||||
[file, formData.xhr, aborted]);
|
[file, formData.xhr, aborted]);
|
||||||
};
|
};
|
||||||
|
@ -101,5 +97,5 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
|
@ -55,8 +55,7 @@ $.fn.objectUrl = function(offset) {
|
||||||
|
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
var instance_id = 0,
|
var instance_id = 0;
|
||||||
boundary = "BoUnDaRyStRiNg";
|
|
||||||
|
|
||||||
$.fn.imageUploader = function() {
|
$.fn.imageUploader = function() {
|
||||||
var $upload_field = this,
|
var $upload_field = this,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче