This commit is contained in:
Zixaphir 2014-01-14 01:32:05 -07:00
parent 9e995aee57
commit e8a19736d3
3 changed files with 14 additions and 9 deletions

View File

@ -13337,13 +13337,16 @@
}
if (name = mascots["Mascot"]) {
MascotTools.parse(mascot);
} else {
message = "" + name + " successfully imported!";
} else if (mascots.length) {
for (_i = 0, _len = mascots.length; _i < _len; _i++) {
mascot = mascots[_i];
MascotTools.parse(mascot);
}
message = "Mascots imported!";
} else {
return new Notice('warning', "Failed to import mascot. Is file a properly formatted JSON file?", 5);
}
message = mascots.length ? "Mascots imported!" : "" + name + " successfully imported!";
new Notice('info', message, 10);
$.rm($("#mascotContainer", d.body));
return Settings.open('Mascots');

View File

@ -13326,13 +13326,16 @@
}
if (name = mascots["Mascot"]) {
MascotTools.parse(mascot);
} else {
message = "" + name + " successfully imported!";
} else if (mascots.length) {
for (_i = 0, _len = mascots.length; _i < _len; _i++) {
mascot = mascots[_i];
MascotTools.parse(mascot);
}
message = "Mascots imported!";
} else {
return new Notice('warning', "Failed to import mascot. Is file a properly formatted JSON file?", 5);
}
message = mascots.length ? "Mascots imported!" : "" + name + " successfully imported!";
new Notice('info', message, 10);
$.rm($("#mascotContainer", d.body));
return Settings.open('Mascots');

View File

@ -346,13 +346,12 @@ MascotTools =
if name = mascots["Mascot"]
MascotTools.parse mascot
else
message = "#{name} successfully imported!"
else if mascots.length
MascotTools.parse mascot for mascot in mascots
message = if mascots.length
"Mascots imported!"
message = "Mascots imported!"
else
"#{name} successfully imported!"
return new Notice 'warning', "Failed to import mascot. Is file a properly formatted JSON file?", 5
new Notice 'info', message, 10