From 496cc81371f98508f5d9e80b60e0ae74d40c50d2 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Wed, 14 Sep 2011 19:52:49 +0000 Subject: [PATCH] Couple of UI fixes. --- .../gemp-lotr-web/src/main/webapp/js/gameUi.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js index 8e89b0761..9910aa057 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js @@ -177,9 +177,7 @@ var GempLotrGameUI = Class.extend({ var that = this; this.dialogInstance.bind("dialogresize", function() { - var width = $(this).width() + 20; - var height = $(this).height() + 20; - that.specialGroup.setBounds(that.padding, that.padding, width - 2 * that.padding, height - 2 * that.padding); + that.arbitraryDialogResize(); }); $(".ui-dialog-titlebar-close").hide(); @@ -774,10 +772,9 @@ var GempLotrGameUI = Class.extend({ this.attachSelectionFunctions(selectableCardIds); - this.specialGroup.setBounds(10, 10, 547, 188); - $(".ui-dialog-titlebar").show(); this.dialogInstance.dialog("open"); + this.arbitraryDialogResize(); }, cardActionChoiceDecision: function (decision) { @@ -1075,6 +1072,11 @@ var GempLotrGameUI = Class.extend({ $(".selectableCard").removeClass("selectableCard").data("action", null); $(".selectedCard").removeClass("selectedCard"); this.selectionFunction = null; - } + }, + arbitraryDialogResize: function() { + var width = this.dialogInstance.width() + 20; + var height = this.dialogInstance.height() + 20; + this.specialGroup.setBounds(this.padding, this.padding, width - 2 * this.padding, height - 2 * this.padding); + } });