summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Controller/Task.php3
-rw-r--r--app/Template/board/show.php2
-rw-r--r--assets/js/app.js1
-rw-r--r--assets/js/board.js1
4 files changed, 5 insertions, 2 deletions
diff --git a/app/Controller/Task.php b/app/Controller/Task.php
index b826a305..907c42cc 100644
--- a/app/Controller/Task.php
+++ b/app/Controller/Task.php
@@ -89,8 +89,9 @@ class Task extends Base
public function create()
{
$project = $this->getProject();
+ $method = $this->request->isAjax() ? 'load' : 'layout';
- $this->response->html($this->template->layout('task_new', array(
+ $this->response->html($this->template->$method('task_new', array(
'errors' => array(),
'values' => array(
'project_id' => $project['id'],
diff --git a/app/Template/board/show.php b/app/Template/board/show.php
index 66e8b46d..142969c9 100644
--- a/app/Template/board/show.php
+++ b/app/Template/board/show.php
@@ -9,7 +9,7 @@
<?php foreach ($board as $column): ?>
<th width="<?= $column_with ?>%">
<div class="board-add-icon">
- <?= Helper\a('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id']), false, '', t('Add a new task')) ?>
+ <?= Helper\a('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id']), false, 'task-creation-popover', t('Add a new task')) ?>
</div>
<?= Helper\escape($column['title']) ?>
<?php if ($column['task_limit']): ?>
diff --git a/assets/js/app.js b/assets/js/app.js
index 4c39bf97..65cc824a 100644
--- a/assets/js/app.js
+++ b/assets/js/app.js
@@ -191,6 +191,7 @@ Kanboard.Board = (function() {
// Task edit popover
$(".task-edit-popover").click(on_popover);
+ $(".task-creation-popover").click(on_popover);
// Description popover
$(".task-description-popover").click(on_popover);
diff --git a/assets/js/board.js b/assets/js/board.js
index beea6160..e02ec7f0 100644
--- a/assets/js/board.js
+++ b/assets/js/board.js
@@ -34,6 +34,7 @@ Kanboard.Board = (function() {
// Task edit popover
$(".task-edit-popover").click(on_popover);
+ $(".task-creation-popover").click(on_popover);
// Description popover
$(".task-description-popover").click(on_popover);