Skip to content

Commit d340d40

Browse files
committed
getRenderedCell to get the table cell of a tile
1 parent 6c55f57 commit d340d40

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

gameon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def get(self):
223223
else:
224224
User.buyFor(self.current_user.id)
225225
##TODOFIX
226-
self.redirect("/campaign")
226+
self.redirect("/play")
227227

228228

229229
class SaveVolumeHandler(BaseHandler):

static/js/gameon.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,9 @@ window.gameon = new (function () {
495495
tile.getRenderedTile = function () {
496496
return boardSelf.getRenderedTile(this.yPos, this.xPos)
497497
};
498+
tile.getRenderedCell = function () {
499+
return boardSelf.getRenderedCell(this.yPos, this.xPos)
500+
};
498501
};
499502

500503
boardSelf.getY = function (i) {
@@ -582,6 +585,10 @@ window.gameon = new (function () {
582585
return $('[data-yx="' + boardSelf.name + '-' + y + '-' + x + '"]');
583586
};
584587

588+
boardSelf.getRenderedCell = function (y, x) {
589+
return boardSelf.getRenderedTile(y,x).parent('td');
590+
};
591+
585592
boardSelf.click = function (elm) {
586593
var yx = $(elm).attr('data-yx').split('-');
587594
var y = +yx[1];

0 commit comments

Comments
 (0)