Removing extra actions in replay.

This commit is contained in:
marcins78@gmail.com
2012-02-08 23:49:16 +00:00
parent f05b8ea8df
commit ada99d6821

View File

@@ -651,21 +651,21 @@ var GempLotrGameUI = Class.extend({
initializeDialogs: function() {
this.smallDialog = $("<div></div>")
.dialog({
autoOpen: false,
closeOnEscape: false,
resizable: false,
width: 400,
height: 200
});
autoOpen: false,
closeOnEscape: false,
resizable: false,
width: 400,
height: 200
});
this.cardActionDialog = $("<div></div>")
.dialog({
autoOpen: false,
closeOnEscape: false,
resizable: true,
width: 600,
height: 300
});
autoOpen: false,
closeOnEscape: false,
resizable: true,
width: 600,
height: 300
});
var that = this;
@@ -680,11 +680,11 @@ var GempLotrGameUI = Class.extend({
this.infoDialog = $("<div></div>")
.dialog({
autoOpen: false,
closeOnEscape: true,
resizable: false,
title: "Card information"
});
autoOpen: false,
closeOnEscape: true,
resizable: false,
title: "Card information"
});
var swipeOptions = {
threshold: 20,
@@ -1133,6 +1133,13 @@ var GempLotrGameUI = Class.extend({
this.alertText.html("");
if (this.alertButtons != null)
this.alertButtons.html("");
$(".card").each(
function() {
var card = $(this).data("card");
if (card.zone == "EXTRA")
$(this).remove();
});
this.extraActionsGroup.layoutCards();
},
integerDecision: function(decision) {
@@ -1157,12 +1164,12 @@ var GempLotrGameUI = Class.extend({
if (!this.replayMode) {
this.smallDialog.dialog("option", "buttons",
{
"OK": function() {
$(this).dialog("close");
that.decisionFunction(id, $("#integerDecision").val());
}
});
{
"OK": function() {
$(this).dialog("close");
that.decisionFunction(id, $("#integerDecision").val());
}
});
}
$("#integerDecision").SpinnerControl({ type: 'range',
@@ -1200,12 +1207,12 @@ var GempLotrGameUI = Class.extend({
if (!this.replayMode) {
this.smallDialog.dialog("option", "buttons",
{
"OK": function() {
that.smallDialog.dialog("close");
that.decisionFunction(id, $("#multipleChoiceDecision").val());
}
});
{
"OK": function() {
that.smallDialog.dialog("close");
that.decisionFunction(id, $("#multipleChoiceDecision").val());
}
});
}
} else {
this.smallDialog.append("<br />");
@@ -1566,6 +1573,8 @@ var GempLotrGameUI = Class.extend({
allowSelection();
if (!this.replayMode)
processButtons();
$(':button').blur();
},
createActionChoiceContextMenu: function(actions, event, selectActionFunction) {
@@ -1590,8 +1599,8 @@ var GempLotrGameUI = Class.extend({
$(div).find('LI.hover').removeClass('hover');
$(this).parent().addClass('hover');
}).mouseout(function() {
$(div).find('LI.hover').removeClass('hover');
});
$(div).find('LI.hover').removeClass('hover');
});
var getRidOfContextMenu = function() {
$(div).remove();