Skip to content

Commit

Permalink
Always use our templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Stinner committed Apr 11, 2017
1 parent 0f3463d commit 433c3d2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
1 change: 0 additions & 1 deletion Asset/js/BoardDragAndDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Kanboard.BoardDragAndDrop.prototype.dragAndDrop = function() {
task.removeClass("draggable-item-selected");

if (newColumnId != taskColumnId || newSwimlaneId != taskSwimlaneId || newPosition != taskPosition) {
console.log("Saving to " + saveURL + " [" + boardId+"]");
self.changeTaskState(taskId);
self.save(saveURL, boardId, taskId, taskColumnId, newColumnId, newPosition, newSwimlaneId);
}
Expand Down
8 changes: 6 additions & 2 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ class Plugin extends Base
public function initialize()
{
$this->template->hook->attach('template:project-list:menu:before', 'bigboard:Bigboard');
$this->template->setTemplateOverride('board/table_container','bigboard:board/table_container');
$this->template->setTemplateOverride('board/table_tasks','bigboard:board/table_tasks');
$this->template->setTemplateOverride('board/table_private','bigboard:board/table_private');
$this->hook->on('template:layout:js', array('template' => 'plugins/Bigboard/Asset/js/BoardDragAndDrop.js'));
$this->hook->on('template:layout:js', array('template' => 'plugins/Bigboard/Asset/js/BoardPolling.js'));
$this->hook->on('template:layout:js', array('template' => 'plugins/Bigboard/Asset/js/BoardPolling.js'));
}

public function getClasses()
Expand All @@ -23,7 +26,8 @@ public function getClasses()
'UserSession'
),
'Plugin\Bigboard\Controller' => array(
'Bigboard'
'Bigboard',
'BoardAjaxController'
)
);
}
Expand Down
10 changes: 5 additions & 5 deletions Template/board/table_container.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
class="board-project-<?= $project['id'] ?>"
data-project-id="<?= $project['id'] ?>"
data-check-interval="<?= $board_private_refresh_interval ?>"
data-save-url="<?= $this->url->href('BoardAjaxController', 'save', array('project_id' => $project['id'])) ?>"
data-reload-url="<?= $this->url->href('BoardAjaxController', 'reload', array('project_id' => $project['id'])) ?>"
data-check-url="<?= $this->url->href('BoardAjaxController', 'check', array('project_id' => $project['id'], 'timestamp' => time())) ?>"
data-task-creation-url="<?= $this->url->href('TaskCreationController', 'show', array('project_id' => $project['id'])) ?>"
data-save-url="<?= $this->url->href('BoardAjaxController', 'save', array('plugin' => "Bigboard", 'project_id' => $project['id'])) ?>"
data-reload-url="<?= $this->url->href('BoardAjaxController', 'reload', array('plugin' => "Bigboard", 'project_id' => $project['id'])) ?>"
data-check-url="<?= $this->url->href('BoardAjaxController', 'check', array('plugin' => "Bigboard", 'project_id' => $project['id'], 'timestamp' => time())) ?>"
data-task-creation-url="<?= $this->url->href('TaskCreationController', 'show', array('plugin' => "Bigboard", 'project_id' => $project['id'])) ?>"
>
<?php endif ?>

Expand Down Expand Up @@ -42,7 +42,7 @@ class="board-project-<?= $project['id'] ?>"
)) ?>
<?php endif ?>

<?= $this->render('board/table_tasks', array(
<?= $this->render('bigboard:board/table_tasks', array(
'project' => $project,
'swimlane' => $swimlane,
'not_editable' => isset($not_editable),
Expand Down

0 comments on commit 433c3d2

Please sign in to comment.