summaryrefslogtreecommitdiff
path: root/assets/js/src/Board.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/src/Board.js')
-rw-r--r--assets/js/src/Board.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/assets/js/src/Board.js b/assets/js/src/Board.js
index 7015f1c6..3299b9d4 100644
--- a/assets/js/src/Board.js
+++ b/assets/js/src/Board.js
@@ -1,10 +1,9 @@
-function Board() {
- this.app = null;
+function Board(app) {
+ this.app = app;
this.checkInterval = null;
}
-Board.prototype.execute = function(app) {
- this.app = app;
+Board.prototype.execute = function() {
this.app.swimlane.refresh();
this.app.swimlane.listen();
this.poll();
@@ -33,7 +32,7 @@ Board.prototype.check = function() {
$.ajax({
cache: false,
- url: $("#board").attr("data-check-url"),
+ url: $("#board").data("check-url"),
statusCode: {
200: function(data) { self.refresh(data); },
304: function () { self.app.hideLoadingIcon(); }
@@ -47,7 +46,7 @@ Board.prototype.save = function(taskId, columnId, position, swimlaneId) {
$.ajax({
cache: false,
- url: $("#board").attr("data-save-url"),
+ url: $("#board").data("save-url"),
contentType: "application/json",
type: "POST",
processData: false,
@@ -65,7 +64,7 @@ Board.prototype.save = function(taskId, columnId, position, swimlaneId) {
Board.prototype.refresh = function(data) {
$("#board-container").replaceWith(data);
- this.app.listen();
+ this.app.refresh();
this.app.swimlane.refresh();
this.app.swimlane.listen();
this.resizeColumnHeight();