Somehow the most important file didn't get checked in
This commit is contained in:
@@ -107,6 +107,14 @@ var GempLotrDeckBuildingUI = Class.extend({
|
||||
that.setMapVisibility(false);
|
||||
}
|
||||
|
||||
//PC format or Anything Goes
|
||||
if(formatCode.includes("pc") || formatCode == "rev_tow_sta") {
|
||||
$("#convertErrataBut").button("option", "disabled", false);
|
||||
}
|
||||
else {
|
||||
$("#convertErrataBut").button("option", "disabled", true);
|
||||
}
|
||||
|
||||
that.cardFilter.updateFormat(formatCode, that.formats[formatCode].blockFilters);
|
||||
});
|
||||
|
||||
@@ -128,6 +136,8 @@ var GempLotrDeckBuildingUI = Class.extend({
|
||||
|
||||
var deckListBut = $("#deckListBut").button();
|
||||
|
||||
var convertErrataBut = $("#convertErrataBut").button();
|
||||
|
||||
var notesBut = $("#notesBut").button();
|
||||
|
||||
if(this.autoZoom.autoZoomToggle != null) {
|
||||
@@ -181,6 +191,11 @@ var GempLotrDeckBuildingUI = Class.extend({
|
||||
that.loadDeckList();
|
||||
});
|
||||
|
||||
convertErrataBut.click(
|
||||
function () {
|
||||
that.convertErrata();
|
||||
});
|
||||
|
||||
libraryListBut.click(
|
||||
function () {
|
||||
that.loadLibraryList();
|
||||
@@ -372,6 +387,22 @@ var GempLotrDeckBuildingUI = Class.extend({
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
convertErrata:function() {
|
||||
var that = this;
|
||||
var deckContents = this.getDeckContents();
|
||||
this.comm.convertErrata(that.formatSelect.val(), deckContents, function (xml) {
|
||||
that.setupDeck(xml, that.deckName);
|
||||
that.deckModified(true);
|
||||
$("#convertErrataBut").button("option", "disabled", true);
|
||||
}, {
|
||||
"400":function () {
|
||||
$("#convertErrataBut").button("option", "disabled", false);
|
||||
alert("Error processing errata conversion.");
|
||||
}
|
||||
});
|
||||
//target format, current decklist, function that takes new decklist and replaces it
|
||||
},
|
||||
|
||||
getCollectionType:function () {
|
||||
return $("#collectionSelect option:selected").prop("value");
|
||||
|
||||
Reference in New Issue
Block a user