diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-014/hallUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-014/hallUi.js index 2e8d5ca36..a302db3aa 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-014/hallUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gemp-014/hallUi.js @@ -67,17 +67,17 @@ var GempLotrHallUI = Class.extend({ this.createTableButton = $(""); $(this.createTableButton).button().click( - function () { - that.supportedFormatsSelect.hide(); - that.decksSelect.hide(); - that.createTableButton.hide(); - var format = that.supportedFormatsSelect.val(); - var deck = that.decksSelect.val(); - if (deck != null) - that.comm.createTable(format, deck, function (xml) { - that.processResponse(xml); - }); - }); + function () { + that.supportedFormatsSelect.hide(); + that.decksSelect.hide(); + that.createTableButton.hide(); + var format = that.supportedFormatsSelect.val(); + var deck = that.decksSelect.val(); + if (deck != null) + that.comm.createTable(format, deck, function (xml) { + that.processResponse(xml); + }); + }); this.createTableButton.hide(); this.decksSelect = $(""); @@ -89,10 +89,10 @@ var GempLotrHallUI = Class.extend({ this.leaveTableButton = $(""); $(this.leaveTableButton).button().click( - function () { - that.leaveTableButton.hide(); - that.comm.leaveTable(); - }); + function () { + that.leaveTableButton.hide(); + that.comm.leaveTable(); + }); this.leaveTableButton.hide(); this.buttonsDiv.append(this.leaveTableButton); @@ -116,13 +116,13 @@ var GempLotrHallUI = Class.extend({ }); toggleContent.css({width: "13px", height: "15px"}); toggleContent.click( - function() { - if (toggleContent.button("option", "icons")["primary"] == "ui-icon-circlesmall-minus") - toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-plus"}); - else - toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-minus"}); - content.toggle("blind", {}, 200); - }); + function() { + if (toggleContent.button("option", "icons")["primary"] == "ui-icon-circlesmall-minus") + toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-plus"}); + else + toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-minus"}); + content.toggle("blind", {}, 200); + }); header.append(toggleContent); header.append(" Tournament queues"); @@ -147,13 +147,13 @@ var GempLotrHallUI = Class.extend({ }); toggleContent.css({width: "13px", height: "15px"}); toggleContent.click( - function() { - if (toggleContent.button("option", "icons")["primary"] == "ui-icon-circlesmall-minus") - toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-plus"}); - else - toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-minus"}); - content.toggle("blind", {}, 200); - }); + function() { + if (toggleContent.button("option", "icons")["primary"] == "ui-icon-circlesmall-minus") + toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-plus"}); + else + toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-minus"}); + content.toggle("blind", {}, 200); + }); header.append(toggleContent); header.append(" Waiting tables"); @@ -178,13 +178,13 @@ var GempLotrHallUI = Class.extend({ }); toggleContent.css({width: "13px", height: "15px"}); toggleContent.click( - function() { - if (toggleContent.button("option", "icons")["primary"] == "ui-icon-circlesmall-minus") - toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-plus"}); - else - toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-minus"}); - content.toggle("blind", {}, 200); - }); + function() { + if (toggleContent.button("option", "icons")["primary"] == "ui-icon-circlesmall-minus") + toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-plus"}); + else + toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-minus"}); + content.toggle("blind", {}, 200); + }); header.append(toggleContent); header.append(" Playing tables"); @@ -209,13 +209,13 @@ var GempLotrHallUI = Class.extend({ }); toggleContent.css({width: "13px", height: "15px"}); toggleContent.click( - function() { - if (toggleContent.button("option", "icons")["primary"] == "ui-icon-circlesmall-minus") - toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-plus"}); - else - toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-minus"}); - content.toggle("blind", {}, 200); - }); + function() { + if (toggleContent.button("option", "icons")["primary"] == "ui-icon-circlesmall-minus") + toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-plus"}); + else + toggleContent.button("option", "icons", {primary: "ui-icon-circlesmall-minus"}); + content.toggle("blind", {}, 200); + }); header.append(toggleContent); header.append(" Finished tables"); @@ -244,17 +244,17 @@ var GempLotrHallUI = Class.extend({ var that = this; this.comm.updateHall( - function (xml) { - that.processHall(xml); - }, this.hallChannelId, - { - "409":function() { - that.chat.appendMessage("You have accessed Game Hall in another browser, press F5 (refresh) to regain access in this window"); - }, - "410":function() { - that.chat.appendMessage("You have been inactive for too long, press F5 (refresh) to enter Game Hall again"); - } - }); + function (xml) { + that.processHall(xml); + }, this.hallChannelId, + { + "409":function() { + that.chat.appendMessage("You have accessed Game Hall in another browser, press F5 (refresh) to regain access in this window"); + }, + "410":function() { + that.chat.appendMessage("You have been inactive for too long, press F5 (refresh) to enter Game Hall again"); + } + }); }, updateDecks:function () { @@ -319,45 +319,45 @@ var GempLotrHallUI = Class.extend({ if (joined != "true") { var but = $(""); $(but).button().click(( - function(queueId) { - return function () { - var deck = that.decksSelect.val(); - if (deck != null) - that.comm.joinQueue(queueId, deck, function (xml) { - that.processResponse(xml); - }); - }; - } - )(id)); + function(queueId) { + return function () { + var deck = that.decksSelect.val(); + if (deck != null) + that.comm.joinQueue(queueId, deck, function (xml) { + that.processResponse(xml); + }); + }; + } + )(id)); actionsField.append(but); } else { var but = $(""); $(but).button().click(( - function(queueId) { - var deck = that.decksSelect.val(); - if (deck != null) - that.comm.leaveQueue(id, deck, function (xml) { - that.processResponse(xml); - }); - })(id)); + function(queueId) { + var deck = that.decksSelect.val(); + if (deck != null) + that.comm.leaveQueue(id, deck, function (xml) { + that.processResponse(xml); + }); + })(id)); actionsField.append(but); } var row = $("