Better.
This commit is contained in:
parent
9e995aee57
commit
e8a19736d3
@ -13337,13 +13337,16 @@
|
|||||||
}
|
}
|
||||||
if (name = mascots["Mascot"]) {
|
if (name = mascots["Mascot"]) {
|
||||||
MascotTools.parse(mascot);
|
MascotTools.parse(mascot);
|
||||||
} else {
|
message = "" + name + " successfully imported!";
|
||||||
|
} else if (mascots.length) {
|
||||||
for (_i = 0, _len = mascots.length; _i < _len; _i++) {
|
for (_i = 0, _len = mascots.length; _i < _len; _i++) {
|
||||||
mascot = mascots[_i];
|
mascot = mascots[_i];
|
||||||
MascotTools.parse(mascot);
|
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);
|
new Notice('info', message, 10);
|
||||||
$.rm($("#mascotContainer", d.body));
|
$.rm($("#mascotContainer", d.body));
|
||||||
return Settings.open('Mascots');
|
return Settings.open('Mascots');
|
||||||
|
|||||||
@ -13326,13 +13326,16 @@
|
|||||||
}
|
}
|
||||||
if (name = mascots["Mascot"]) {
|
if (name = mascots["Mascot"]) {
|
||||||
MascotTools.parse(mascot);
|
MascotTools.parse(mascot);
|
||||||
} else {
|
message = "" + name + " successfully imported!";
|
||||||
|
} else if (mascots.length) {
|
||||||
for (_i = 0, _len = mascots.length; _i < _len; _i++) {
|
for (_i = 0, _len = mascots.length; _i < _len; _i++) {
|
||||||
mascot = mascots[_i];
|
mascot = mascots[_i];
|
||||||
MascotTools.parse(mascot);
|
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);
|
new Notice('info', message, 10);
|
||||||
$.rm($("#mascotContainer", d.body));
|
$.rm($("#mascotContainer", d.body));
|
||||||
return Settings.open('Mascots');
|
return Settings.open('Mascots');
|
||||||
|
|||||||
@ -346,13 +346,12 @@ MascotTools =
|
|||||||
|
|
||||||
if name = mascots["Mascot"]
|
if name = mascots["Mascot"]
|
||||||
MascotTools.parse mascot
|
MascotTools.parse mascot
|
||||||
else
|
message = "#{name} successfully imported!"
|
||||||
|
else if mascots.length
|
||||||
MascotTools.parse mascot for mascot in mascots
|
MascotTools.parse mascot for mascot in mascots
|
||||||
|
message = "Mascots imported!"
|
||||||
message = if mascots.length
|
|
||||||
"Mascots imported!"
|
|
||||||
else
|
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
|
new Notice 'info', message, 10
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user