Bumping gemp JS version.
This commit is contained in:
@@ -95,16 +95,16 @@
|
|||||||
<script type="text/javascript" src="js/jquery/jquery.layout.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery.layout.js"></script>
|
||||||
<script type="text/javascript" src="js/jquery/jquery.touchSwipe.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery.touchSwipe.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="js/gemp-004/inheritance.js"></script>
|
<script type="text/javascript" src="js/gemp-005/inheritance.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/common.js"></script>
|
<script type="text/javascript" src="js/gemp-005/common.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/communication.js"></script>
|
<script type="text/javascript" src="js/gemp-005/communication.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/deliveryService.js"></script>
|
<script type="text/javascript" src="js/gemp-005/deliveryService.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/jCardGroup.js"></script>
|
<script type="text/javascript" src="js/gemp-005/jCardGroup.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/jCards.js"></script>
|
<script type="text/javascript" src="js/gemp-005/jCards.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/logging.js"></script>
|
<script type="text/javascript" src="js/gemp-005/logging.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/commonUi.js"></script>
|
<script type="text/javascript" src="js/gemp-005/commonUi.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/deckBuildingUi.js"></script>
|
<script type="text/javascript" src="js/gemp-005/deckBuildingUi.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/cardFilter.js"></script>
|
<script type="text/javascript" src="js/gemp-005/cardFilter.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|||||||
@@ -320,16 +320,16 @@ body {
|
|||||||
<script type="text/javascript" src="js/jquery/jquery.spinnercontrol.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery.spinnercontrol.js"></script>
|
||||||
<script type="text/javascript" src="js/jquery/jquery.touchSwipe.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery.touchSwipe.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="js/gemp-004/inheritance.js"></script>
|
<script type="text/javascript" src="js/gemp-005/inheritance.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/communication.js"></script>
|
<script type="text/javascript" src="js/gemp-005/communication.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/common.js"></script>
|
<script type="text/javascript" src="js/gemp-005/common.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/chat.js"></script>
|
<script type="text/javascript" src="js/gemp-005/chat.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/commonUi.js"></script>
|
<script type="text/javascript" src="js/gemp-005/commonUi.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/gameUi.js"></script>
|
<script type="text/javascript" src="js/gemp-005/gameUi.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/gameAnimations.js"></script>
|
<script type="text/javascript" src="js/gemp-005/gameAnimations.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/jCardGroup.js"></script>
|
<script type="text/javascript" src="js/gemp-005/jCardGroup.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/jCards.js"></script>
|
<script type="text/javascript" src="js/gemp-005/jCards.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/logging.js"></script>
|
<script type="text/javascript" src="js/gemp-005/logging.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var ui;
|
var ui;
|
||||||
|
|||||||
@@ -162,19 +162,19 @@
|
|||||||
<script type="text/javascript" src="js/jquery/jquery-1.6.2.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery-1.6.2.js"></script>
|
||||||
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.16.custom.min.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.16.custom.min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="js/gemp-004/inheritance.js"></script>
|
<script type="text/javascript" src="js/gemp-005/inheritance.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/common.js"></script>
|
<script type="text/javascript" src="js/gemp-005/common.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/logging.js"></script>
|
<script type="text/javascript" src="js/gemp-005/logging.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/chat.js"></script>
|
<script type="text/javascript" src="js/gemp-005/chat.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/commonUi.js"></script>
|
<script type="text/javascript" src="js/gemp-005/commonUi.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/hallUi.js"></script>
|
<script type="text/javascript" src="js/gemp-005/hallUi.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/leagueResultsUi.js"></script>
|
<script type="text/javascript" src="js/gemp-005/leagueResultsUi.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/gameHistoryUi.js"></script>
|
<script type="text/javascript" src="js/gemp-005/gameHistoryUi.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/communication.js"></script>
|
<script type="text/javascript" src="js/gemp-005/communication.js"></script>
|
||||||
<!-- This is needed for delivery -->
|
<!-- This is needed for delivery -->
|
||||||
<script type="text/javascript" src="js/gemp-004/deliveryService.js"></script>
|
<script type="text/javascript" src="js/gemp-005/deliveryService.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/jCardGroup.js"></script>
|
<script type="text/javascript" src="js/gemp-005/jCardGroup.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/jCards.js"></script>
|
<script type="text/javascript" src="js/gemp-005/jCards.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var chat;
|
var chat;
|
||||||
@@ -216,11 +216,11 @@
|
|||||||
|
|
||||||
var infoDialog = $("<div></div>")
|
var infoDialog = $("<div></div>")
|
||||||
.dialog({
|
.dialog({
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
title: "Card information"
|
title: "Card information"
|
||||||
});
|
});
|
||||||
|
|
||||||
$("body").click(
|
$("body").click(
|
||||||
function (event) {
|
function (event) {
|
||||||
|
|||||||
@@ -23,9 +23,9 @@
|
|||||||
<script type="text/javascript" src="js/jquery/jquery-1.6.2.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery-1.6.2.js"></script>
|
||||||
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.16.custom.min.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.16.custom.min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="js/gemp-004/inheritance.js"></script>
|
<script type="text/javascript" src="js/gemp-005/inheritance.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/logging.js"></script>
|
<script type="text/javascript" src="js/gemp-005/logging.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/communication.js"></script>
|
<script type="text/javascript" src="js/gemp-005/communication.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function getUrlParam(param) {
|
function getUrlParam(param) {
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ var ChatBoxUI = Class.extend({
|
|||||||
|
|
||||||
if (showHideSystemButton) {
|
if (showHideSystemButton) {
|
||||||
this.hideSystemButton = $("<button id='showSystemMessages'>Toggle system messages</button>").button(
|
this.hideSystemButton = $("<button id='showSystemMessages'>Toggle system messages</button>").button(
|
||||||
{icons: {
|
{icons: {
|
||||||
primary: "ui-icon-zoomin"
|
primary: "ui-icon-zoomin"
|
||||||
}, text: false});
|
}, text: false});
|
||||||
this.hideSystemButton.click(
|
this.hideSystemButton.click(
|
||||||
function() {
|
function() {
|
||||||
if (that.isShowingMessageClass("systemMessage")) {
|
if (that.isShowingMessageClass("systemMessage")) {
|
||||||
@@ -78,9 +78,9 @@ var ChatBoxUI = Class.extend({
|
|||||||
|
|
||||||
if (showLockButton) {
|
if (showLockButton) {
|
||||||
this.lockButton = $("<button id='lockChatButton'>Toggle lock chat</button>").button(
|
this.lockButton = $("<button id='lockChatButton'>Toggle lock chat</button>").button(
|
||||||
{icons: {
|
{icons: {
|
||||||
primary: "ui-icon-locked"
|
primary: "ui-icon-locked"
|
||||||
}, text: false});
|
}, text: false});
|
||||||
this.lockButton.click(
|
this.lockButton.click(
|
||||||
function() {
|
function() {
|
||||||
if (that.lockChat) {
|
if (that.lockChat) {
|
||||||
@@ -107,16 +107,16 @@ var ChatBoxUI = Class.extend({
|
|||||||
function(xml) {
|
function(xml) {
|
||||||
that.processMessages(xml, true);
|
that.processMessages(xml, true);
|
||||||
}, {
|
}, {
|
||||||
"401": function() {
|
"401": function() {
|
||||||
that.appendMessage("You are not logged in, go to the main page to log in.", "warningMessage");
|
that.appendMessage("You are not logged in, go to the main page to log in.", "warningMessage");
|
||||||
},
|
},
|
||||||
"403": function() {
|
"403": function() {
|
||||||
that.appendMessage("You have no permission to join this chat.", "warningMessage");
|
that.appendMessage("You have no permission to join this chat.", "warningMessage");
|
||||||
},
|
},
|
||||||
"404": function() {
|
"404": function() {
|
||||||
that.appendMessage("Chat room was closed, please go to the Game Hall.", "warningMessage");
|
that.appendMessage("Chat room was closed, please go to the Game Hall.", "warningMessage");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.chatTalkDiv.bind("keypress", function(e) {
|
this.chatTalkDiv.bind("keypress", function(e) {
|
||||||
var code = (e.keyCode ? e.keyCode : e.which);
|
var code = (e.keyCode ? e.keyCode : e.which);
|
||||||
@@ -145,10 +145,10 @@ var GempLotrDeckBuildingUI = Class.extend({
|
|||||||
if (confirm("Do you wish to save this deck?"))
|
if (confirm("Do you wish to save this deck?"))
|
||||||
that.saveDeck(false);
|
that.saveDeck(false);
|
||||||
}, {
|
}, {
|
||||||
"404": function() {
|
"404": function() {
|
||||||
alert("Couldn't find the deck to rename on the server.");
|
alert("Couldn't find the deck to rename on the server.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -244,11 +244,11 @@ var GempLotrDeckBuildingUI = Class.extend({
|
|||||||
|
|
||||||
this.infoDialog = $("<div></div>")
|
this.infoDialog = $("<div></div>")
|
||||||
.dialog({
|
.dialog({
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
title: "Card information"
|
title: "Card information"
|
||||||
});
|
});
|
||||||
|
|
||||||
var swipeOptions = {
|
var swipeOptions = {
|
||||||
threshold: 20,
|
threshold: 20,
|
||||||
@@ -296,14 +296,14 @@ var GempLotrDeckBuildingUI = Class.extend({
|
|||||||
if (that.deckListDialog == null) {
|
if (that.deckListDialog == null) {
|
||||||
that.deckListDialog = $("<div></div>")
|
that.deckListDialog = $("<div></div>")
|
||||||
.dialog({
|
.dialog({
|
||||||
title: "Your stored decks",
|
title: "Your stored decks",
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
resizable: true,
|
resizable: true,
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 400,
|
height: 400,
|
||||||
modal: true
|
modal: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
that.deckListDialog.html("");
|
that.deckListDialog.html("");
|
||||||
|
|
||||||
@@ -421,14 +421,14 @@ var GempLotrDeckBuildingUI = Class.extend({
|
|||||||
if (this.selectionDialog == null) {
|
if (this.selectionDialog == null) {
|
||||||
this.selectionDialog = $("<div></div>")
|
this.selectionDialog = $("<div></div>")
|
||||||
.dialog({
|
.dialog({
|
||||||
title: "Choose one",
|
title: "Choose one",
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
resizable: true,
|
resizable: true,
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 200,
|
height: 200,
|
||||||
modal: true
|
modal: true
|
||||||
});
|
});
|
||||||
|
|
||||||
this.selectionGroup = new NormalCardGroup(this.selectionDialog, function(card) {
|
this.selectionGroup = new NormalCardGroup(this.selectionDialog, function(card) {
|
||||||
return true;
|
return true;
|
||||||
@@ -667,10 +667,10 @@ var GempLotrDeckBuildingUI = Class.extend({
|
|||||||
that.checkDeckStatsDirty();
|
that.checkDeckStatsDirty();
|
||||||
}, that.checkDirtyInterval);
|
}, that.checkDirtyInterval);
|
||||||
}, {
|
}, {
|
||||||
"400": function() {
|
"400": function() {
|
||||||
alert("Invalid deck for getting stats.");
|
alert("Invalid deck for getting stats.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$("#deckStats").html("Deck has no Ring, Ring-bearer or all 9 sites");
|
$("#deckStats").html("Deck has no Ring, Ring-bearer or all 9 sites");
|
||||||
setTimeout(
|
setTimeout(
|
||||||
@@ -70,40 +70,40 @@ var GameAnimations = Class.extend({
|
|||||||
var cardWidth = card.getWidthForHeight(cardHeight);
|
var cardWidth = card.getWidthForHeight(cardHeight);
|
||||||
|
|
||||||
$(cardDiv).css(
|
$(cardDiv).css(
|
||||||
{
|
{
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
left: (gameWidth / 2 - cardWidth / 4),
|
left: (gameWidth / 2 - cardWidth / 4),
|
||||||
top: gameHeight * (3 / 8),
|
top: gameHeight * (3 / 8),
|
||||||
width: cardWidth / 2,
|
width: cardWidth / 2,
|
||||||
height: cardHeight / 2,
|
height: cardHeight / 2,
|
||||||
"z-index": 100,
|
"z-index": 100,
|
||||||
opacity: 0});
|
opacity: 0});
|
||||||
|
|
||||||
$(cardDiv).animate(
|
$(cardDiv).animate(
|
||||||
{
|
{
|
||||||
left: "-=" + cardWidth / 4,
|
left: "-=" + cardWidth / 4,
|
||||||
top: "-=" + (gameHeight / 8),
|
top: "-=" + (gameHeight / 8),
|
||||||
width: "+=" + (cardWidth / 2),
|
width: "+=" + (cardWidth / 2),
|
||||||
height: "+=" + (cardHeight / 2),
|
height: "+=" + (cardHeight / 2),
|
||||||
opacity: 1},
|
opacity: 1},
|
||||||
{
|
{
|
||||||
duration: that.getAnimationLength(that.playEventDuration / 8),
|
duration: that.getAnimationLength(that.playEventDuration / 8),
|
||||||
easing: "linear",
|
easing: "linear",
|
||||||
queue: false,
|
queue: false,
|
||||||
complete: next});
|
complete: next});
|
||||||
}).queue(
|
}).queue(
|
||||||
function(next) {
|
function(next) {
|
||||||
setTimeout(next, that.getAnimationLength(that.playEventDuration * (5 / 8)));
|
setTimeout(next, that.getAnimationLength(that.playEventDuration * (5 / 8)));
|
||||||
}).queue(
|
}).queue(
|
||||||
function(next) {
|
function(next) {
|
||||||
$(cardDiv).animate(
|
$(cardDiv).animate(
|
||||||
{
|
{
|
||||||
opacity: 0},
|
opacity: 0},
|
||||||
{
|
{
|
||||||
duration: that.getAnimationLength(that.playEventDuration / 4),
|
duration: that.getAnimationLength(that.playEventDuration / 4),
|
||||||
easing: "easeOutQuart",
|
easing: "easeOutQuart",
|
||||||
queue: false,
|
queue: false,
|
||||||
complete: next});
|
complete: next});
|
||||||
}).queue(
|
}).queue(
|
||||||
function(next) {
|
function(next) {
|
||||||
$(cardDiv).remove();
|
$(cardDiv).remove();
|
||||||
@@ -157,26 +157,26 @@ var GameAnimations = Class.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(cardDiv).css(
|
$(cardDiv).css(
|
||||||
{
|
{
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
left: shadowStartPosX,
|
left: shadowStartPosX,
|
||||||
top: shadowStartPosY,
|
top: shadowStartPosY,
|
||||||
width: shadowWidth,
|
width: shadowWidth,
|
||||||
height: shadowHeight,
|
height: shadowHeight,
|
||||||
"z-index": 100,
|
"z-index": 100,
|
||||||
opacity: 1});
|
opacity: 1});
|
||||||
$(cardDiv).animate(
|
$(cardDiv).animate(
|
||||||
{
|
{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
left: "-=" + (shadowWidth / 2),
|
left: "-=" + (shadowWidth / 2),
|
||||||
top: "-=" + (shadowHeight / 2),
|
top: "-=" + (shadowHeight / 2),
|
||||||
width: "+=" + shadowWidth,
|
width: "+=" + shadowWidth,
|
||||||
height: "+=" + shadowHeight},
|
height: "+=" + shadowHeight},
|
||||||
{
|
{
|
||||||
duration: that.getAnimationLength(that.cardAffectsCardDuration),
|
duration: that.getAnimationLength(that.cardAffectsCardDuration),
|
||||||
easing: "easeInQuart",
|
easing: "easeInQuart",
|
||||||
queue: false,
|
queue: false,
|
||||||
complete: null});
|
complete: null});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ var GameAnimations = Class.extend({
|
|||||||
$(this).remove();
|
$(this).remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -224,9 +224,9 @@ var GameAnimations = Class.extend({
|
|||||||
else if (zone == "DEAD")
|
else if (zone == "DEAD")
|
||||||
that.game.deadPileDialogs[participantId].append(cardDiv);
|
that.game.deadPileDialogs[participantId].append(cardDiv);
|
||||||
else if (zone == "ADVENTURE_DECK")
|
else if (zone == "ADVENTURE_DECK")
|
||||||
that.game.adventureDeckDialogs[participantId].append(cardDiv);
|
that.game.adventureDeckDialogs[participantId].append(cardDiv);
|
||||||
else
|
else
|
||||||
$("#main").append(cardDiv);
|
$("#main").append(cardDiv);
|
||||||
|
|
||||||
if (targetCardId != null) {
|
if (targetCardId != null) {
|
||||||
var targetCardData = $(".card:cardId(" + targetCardId + ")").data("card");
|
var targetCardData = $(".card:cardId(" + targetCardId + ")").data("card");
|
||||||
@@ -268,29 +268,29 @@ var GameAnimations = Class.extend({
|
|||||||
var cardWidth = card.getWidthForHeight(cardHeight);
|
var cardWidth = card.getWidthForHeight(cardHeight);
|
||||||
|
|
||||||
$(cardDiv).css(
|
$(cardDiv).css(
|
||||||
{
|
{
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
left: (gameWidth / 2 - cardWidth / 4),
|
left: (gameWidth / 2 - cardWidth / 4),
|
||||||
top: gameHeight * (3 / 8),
|
top: gameHeight * (3 / 8),
|
||||||
width: cardWidth / 2,
|
width: cardWidth / 2,
|
||||||
height: cardHeight / 2,
|
height: cardHeight / 2,
|
||||||
"z-index": 100,
|
"z-index": 100,
|
||||||
opacity: 0});
|
opacity: 0});
|
||||||
|
|
||||||
$(cardDiv).animate(
|
$(cardDiv).animate(
|
||||||
{
|
{
|
||||||
opacity: 1},
|
opacity: 1},
|
||||||
{
|
{
|
||||||
duration: that.getAnimationLength(that.putCardIntoPlayDuration / 8),
|
duration: that.getAnimationLength(that.putCardIntoPlayDuration / 8),
|
||||||
easing: "linear",
|
easing: "linear",
|
||||||
step: function(now, fx) {
|
step: function(now, fx) {
|
||||||
layoutCardElem(cardDiv,
|
layoutCardElem(cardDiv,
|
||||||
(gameWidth / 2 - cardWidth / 4) - now * (cardWidth / 4),
|
(gameWidth / 2 - cardWidth / 4) - now * (cardWidth / 4),
|
||||||
gameHeight * (3 / 8) - now * (gameHeight / 8),
|
gameHeight * (3 / 8) - now * (gameHeight / 8),
|
||||||
cardWidth / 2 + now * (cardWidth / 2),
|
cardWidth / 2 + now * (cardWidth / 2),
|
||||||
cardHeight / 2 + now * (cardHeight / 2), 100);
|
cardHeight / 2 + now * (cardHeight / 2), 100);
|
||||||
},
|
},
|
||||||
complete: next});
|
complete: next});
|
||||||
}).queue(
|
}).queue(
|
||||||
function(next) {
|
function(next) {
|
||||||
setTimeout(next, that.getAnimationLength(that.putCardIntoPlayDuration * (5 / 8)));
|
setTimeout(next, that.getAnimationLength(that.putCardIntoPlayDuration * (5 / 8)));
|
||||||
@@ -305,20 +305,20 @@ var GameAnimations = Class.extend({
|
|||||||
var startHeight = cardDiv.height();
|
var startHeight = cardDiv.height();
|
||||||
|
|
||||||
$(cardDiv).animate(
|
$(cardDiv).animate(
|
||||||
{
|
{
|
||||||
left: oldValues["left"]},
|
left: oldValues["left"]},
|
||||||
{
|
{
|
||||||
duration: that.getAnimationLength(that.putCardIntoPlayDuration / 4),
|
duration: that.getAnimationLength(that.putCardIntoPlayDuration / 4),
|
||||||
easing: "linear",
|
easing: "linear",
|
||||||
step: function(now, fx) {
|
step: function(now, fx) {
|
||||||
var state = fx.state;
|
var state = fx.state;
|
||||||
layoutCardElem(cardDiv,
|
layoutCardElem(cardDiv,
|
||||||
startLeft + (oldValues["left"] - startLeft) * state,
|
startLeft + (oldValues["left"] - startLeft) * state,
|
||||||
startTop + (oldValues["top"] - startTop) * state,
|
startTop + (oldValues["top"] - startTop) * state,
|
||||||
startWidth + (oldValues["width"] - startWidth) * state,
|
startWidth + (oldValues["width"] - startWidth) * state,
|
||||||
startHeight + (oldValues["height"] - startHeight) * state, 100);
|
startHeight + (oldValues["height"] - startHeight) * state, 100);
|
||||||
},
|
},
|
||||||
complete: next});
|
complete: next});
|
||||||
}).queue(
|
}).queue(
|
||||||
function(next) {
|
function(next) {
|
||||||
var cardDiv = $(".card:cardId(" + cardId + ")");
|
var cardDiv = $(".card:cardId(" + cardId + ")");
|
||||||
@@ -354,7 +354,7 @@ var GameAnimations = Class.extend({
|
|||||||
if (index != -1)
|
if (index != -1)
|
||||||
cardData.attachedCards.splice(index, 1);
|
cardData.attachedCards.splice(index, 1);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
var card = $(".card:cardId(" + cardId + ")");
|
var card = $(".card:cardId(" + cardId + ")");
|
||||||
var cardData = card.data("card");
|
var cardData = card.data("card");
|
||||||
@@ -390,12 +390,12 @@ var GameAnimations = Class.extend({
|
|||||||
function(next) {
|
function(next) {
|
||||||
$(".card:cardId(" + cardRemovedIds + ")")
|
$(".card:cardId(" + cardRemovedIds + ")")
|
||||||
.animate(
|
.animate(
|
||||||
{
|
{
|
||||||
opacity: 0},
|
opacity: 0},
|
||||||
{
|
{
|
||||||
duration: that.getAnimationLength(that.removeCardFromPlayDuration),
|
duration: that.getAnimationLength(that.removeCardFromPlayDuration),
|
||||||
easing: "easeOutQuart",
|
easing: "easeOutQuart",
|
||||||
queue: false});
|
queue: false});
|
||||||
setTimeout(next, that.getAnimationLength(that.removeCardFromPlayDuration));
|
setTimeout(next, that.getAnimationLength(that.removeCardFromPlayDuration));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -420,7 +420,7 @@ var GameAnimations = Class.extend({
|
|||||||
if (index != -1)
|
if (index != -1)
|
||||||
cardData.attachedCards.splice(index, 1);
|
cardData.attachedCards.splice(index, 1);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
card.remove();
|
card.remove();
|
||||||
@@ -659,21 +659,21 @@ var GempLotrGameUI = Class.extend({
|
|||||||
initializeDialogs: function() {
|
initializeDialogs: function() {
|
||||||
this.smallDialog = $("<div></div>")
|
this.smallDialog = $("<div></div>")
|
||||||
.dialog({
|
.dialog({
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
closeOnEscape: false,
|
closeOnEscape: false,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 200
|
height: 200
|
||||||
});
|
});
|
||||||
|
|
||||||
this.cardActionDialog = $("<div></div>")
|
this.cardActionDialog = $("<div></div>")
|
||||||
.dialog({
|
.dialog({
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
closeOnEscape: false,
|
closeOnEscape: false,
|
||||||
resizable: true,
|
resizable: true,
|
||||||
width: 600,
|
width: 600,
|
||||||
height: 300
|
height: 300
|
||||||
});
|
});
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
@@ -688,11 +688,11 @@ var GempLotrGameUI = Class.extend({
|
|||||||
|
|
||||||
this.infoDialog = $("<div></div>")
|
this.infoDialog = $("<div></div>")
|
||||||
.dialog({
|
.dialog({
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
title: "Card information"
|
title: "Card information"
|
||||||
});
|
});
|
||||||
|
|
||||||
var swipeOptions = {
|
var swipeOptions = {
|
||||||
threshold: 20,
|
threshold: 20,
|
||||||
@@ -1203,12 +1203,12 @@ var GempLotrGameUI = Class.extend({
|
|||||||
|
|
||||||
if (!this.replayMode) {
|
if (!this.replayMode) {
|
||||||
this.smallDialog.dialog("option", "buttons",
|
this.smallDialog.dialog("option", "buttons",
|
||||||
{
|
{
|
||||||
"OK": function() {
|
"OK": function() {
|
||||||
$(this).dialog("close");
|
$(this).dialog("close");
|
||||||
that.decisionFunction(id, $("#integerDecision").val());
|
that.decisionFunction(id, $("#integerDecision").val());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#integerDecision").SpinnerControl({ type: 'range',
|
$("#integerDecision").SpinnerControl({ type: 'range',
|
||||||
@@ -1246,12 +1246,12 @@ var GempLotrGameUI = Class.extend({
|
|||||||
|
|
||||||
if (!this.replayMode) {
|
if (!this.replayMode) {
|
||||||
this.smallDialog.dialog("option", "buttons",
|
this.smallDialog.dialog("option", "buttons",
|
||||||
{
|
{
|
||||||
"OK": function() {
|
"OK": function() {
|
||||||
that.smallDialog.dialog("close");
|
that.smallDialog.dialog("close");
|
||||||
that.decisionFunction(id, $("#multipleChoiceDecision").val());
|
that.decisionFunction(id, $("#multipleChoiceDecision").val());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.smallDialog.append("<br />");
|
this.smallDialog.append("<br />");
|
||||||
@@ -1644,8 +1644,8 @@ var GempLotrGameUI = Class.extend({
|
|||||||
$(div).find('LI.hover').removeClass('hover');
|
$(div).find('LI.hover').removeClass('hover');
|
||||||
$(this).parent().addClass('hover');
|
$(this).parent().addClass('hover');
|
||||||
}).mouseout(function() {
|
}).mouseout(function() {
|
||||||
$(div).find('LI.hover').removeClass('hover');
|
$(div).find('LI.hover').removeClass('hover');
|
||||||
});
|
});
|
||||||
|
|
||||||
var getRidOfContextMenu = function() {
|
var getRidOfContextMenu = function() {
|
||||||
$(div).remove();
|
$(div).remove();
|
||||||
@@ -25,24 +25,24 @@
|
|||||||
for (var name in prop) {
|
for (var name in prop) {
|
||||||
// Check if we're overwriting an existing function
|
// Check if we're overwriting an existing function
|
||||||
prototype[name] = typeof prop[name] == "function" &&
|
prototype[name] = typeof prop[name] == "function" &&
|
||||||
typeof _super[name] == "function" && fnTest.test(prop[name]) ?
|
typeof _super[name] == "function" && fnTest.test(prop[name]) ?
|
||||||
(function(name, fn) {
|
(function(name, fn) {
|
||||||
return function() {
|
return function() {
|
||||||
var tmp = this._super;
|
var tmp = this._super;
|
||||||
|
|
||||||
// Add a new ._super() method that is the same method
|
// Add a new ._super() method that is the same method
|
||||||
// but on the super-class
|
// but on the super-class
|
||||||
this._super = _super[name];
|
this._super = _super[name];
|
||||||
|
|
||||||
// The method only need to be bound temporarily, so we
|
// The method only need to be bound temporarily, so we
|
||||||
// remove it when we're done executing
|
// remove it when we're done executing
|
||||||
var ret = fn.apply(this, arguments);
|
var ret = fn.apply(this, arguments);
|
||||||
this._super = tmp;
|
this._super = tmp;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
})(name, prop[name]) :
|
})(name, prop[name]) :
|
||||||
prop[name];
|
prop[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
// The dummy class constructor
|
// The dummy class constructor
|
||||||
@@ -128,7 +128,7 @@ var AdvPathCardGroup = CardGroup.extend({
|
|||||||
function(first, second) {
|
function(first, second) {
|
||||||
return (first.data("card").siteNumber - second.data("card").siteNumber);
|
return (first.data("card").siteNumber - second.data("card").siteNumber);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
var cardCount = cardsToLayout.length;
|
var cardCount = cardsToLayout.length;
|
||||||
var totalHeight = 0;
|
var totalHeight = 0;
|
||||||
@@ -70,20 +70,20 @@ var GempLotrMerchantUI = Class.extend({
|
|||||||
|
|
||||||
this.infoDialog = $("<div></div>")
|
this.infoDialog = $("<div></div>")
|
||||||
.dialog({
|
.dialog({
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
title: "Card information"
|
title: "Card information"
|
||||||
});
|
});
|
||||||
|
|
||||||
this.questionDialog = $("<div></div>")
|
this.questionDialog = $("<div></div>")
|
||||||
.dialog({
|
.dialog({
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
modal: true,
|
modal: true,
|
||||||
title: "Merchant operation"
|
title: "Merchant operation"
|
||||||
});
|
});
|
||||||
|
|
||||||
var swipeOptions = {
|
var swipeOptions = {
|
||||||
threshold: 20,
|
threshold: 20,
|
||||||
@@ -34,14 +34,14 @@
|
|||||||
<script type="text/javascript" src="js/jquery/jquery.spinnercontrol.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery.spinnercontrol.js"></script>
|
||||||
<script type="text/javascript" src="js/jquery/jquery.touchSwipe.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery.touchSwipe.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="js/gemp-004/inheritance.js"></script>
|
<script type="text/javascript" src="js/gemp-005/inheritance.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/communication.js"></script>
|
<script type="text/javascript" src="js/gemp-005/communication.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/common.js"></script>
|
<script type="text/javascript" src="js/gemp-005/common.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/chat.js"></script>
|
<script type="text/javascript" src="js/gemp-005/chat.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/commonUi.js"></script>
|
<script type="text/javascript" src="js/gemp-005/commonUi.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/jCardGroup.js"></script>
|
<script type="text/javascript" src="js/gemp-005/jCardGroup.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/jCards.js"></script>
|
<script type="text/javascript" src="js/gemp-005/jCards.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/logging.js"></script>
|
<script type="text/javascript" src="js/gemp-005/logging.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function submitFormToAddress(url, formElem, success, error) {
|
function submitFormToAddress(url, formElem, success, error) {
|
||||||
var data = {};
|
var data = {};
|
||||||
|
|||||||
@@ -95,16 +95,16 @@
|
|||||||
<script type="text/javascript" src="js/jquery/jquery.layout.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery.layout.js"></script>
|
||||||
<script type="text/javascript" src="js/jquery/jquery.touchSwipe.js"></script>
|
<script type="text/javascript" src="js/jquery/jquery.touchSwipe.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="js/gemp-004/inheritance.js"></script>
|
<script type="text/javascript" src="js/gemp-005/inheritance.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/common.js"></script>
|
<script type="text/javascript" src="js/gemp-005/common.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/communication.js"></script>
|
<script type="text/javascript" src="js/gemp-005/communication.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/deliveryService.js"></script>
|
<script type="text/javascript" src="js/gemp-005/deliveryService.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/jCardGroup.js"></script>
|
<script type="text/javascript" src="js/gemp-005/jCardGroup.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/jCards.js"></script>
|
<script type="text/javascript" src="js/gemp-005/jCards.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/logging.js"></script>
|
<script type="text/javascript" src="js/gemp-005/logging.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/commonUi.js"></script>
|
<script type="text/javascript" src="js/gemp-005/commonUi.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/merchantUi.js"></script>
|
<script type="text/javascript" src="js/gemp-005/merchantUi.js"></script>
|
||||||
<script type="text/javascript" src="js/gemp-004/cardFilter.js"></script>
|
<script type="text/javascript" src="js/gemp-005/cardFilter.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user