Show the task creation form as a popover
This commit is contained in:
@@ -89,8 +89,9 @@ class Task extends Base
|
|||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$project = $this->getProject();
|
$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(),
|
'errors' => array(),
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'project_id' => $project['id'],
|
'project_id' => $project['id'],
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<?php foreach ($board as $column): ?>
|
<?php foreach ($board as $column): ?>
|
||||||
<th width="<?= $column_with ?>%">
|
<th width="<?= $column_with ?>%">
|
||||||
<div class="board-add-icon">
|
<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>
|
</div>
|
||||||
<?= Helper\escape($column['title']) ?>
|
<?= Helper\escape($column['title']) ?>
|
||||||
<?php if ($column['task_limit']): ?>
|
<?php if ($column['task_limit']): ?>
|
||||||
|
|||||||
@@ -191,6 +191,7 @@ Kanboard.Board = (function() {
|
|||||||
|
|
||||||
// Task edit popover
|
// Task edit popover
|
||||||
$(".task-edit-popover").click(on_popover);
|
$(".task-edit-popover").click(on_popover);
|
||||||
|
$(".task-creation-popover").click(on_popover);
|
||||||
|
|
||||||
// Description popover
|
// Description popover
|
||||||
$(".task-description-popover").click(on_popover);
|
$(".task-description-popover").click(on_popover);
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ Kanboard.Board = (function() {
|
|||||||
|
|
||||||
// Task edit popover
|
// Task edit popover
|
||||||
$(".task-edit-popover").click(on_popover);
|
$(".task-edit-popover").click(on_popover);
|
||||||
|
$(".task-creation-popover").click(on_popover);
|
||||||
|
|
||||||
// Description popover
|
// Description popover
|
||||||
$(".task-description-popover").click(on_popover);
|
$(".task-description-popover").click(on_popover);
|
||||||
|
|||||||
Reference in New Issue
Block a user