Fix bug #18847#18846 and add ditto for batchcreatecard.html.php.
This commit is contained in:
@@ -731,8 +731,13 @@ class kanban extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $backLink));
|
||||
}
|
||||
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
|
||||
$this->view->lanePairs = $this->kanban->getLanePairsByGroup($groupID);
|
||||
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
|
||||
$lanePairs = $this->kanban->getLanePairsByGroup($groupID);
|
||||
|
||||
$lanePairs['ditto'] = $this->lang->kanbancard->ditto;
|
||||
|
||||
$this->view->users = $users;
|
||||
$this->view->lanePairs = $lanePairs;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.c-date {width:150px;}
|
||||
@@ -0,0 +1,27 @@
|
||||
$(document).on('change', "[name^='begin'], [name^='end']", function()
|
||||
{
|
||||
toggleCheck($(this));
|
||||
})
|
||||
/**
|
||||
* Toggle checkbox.
|
||||
*
|
||||
* @param object $obj
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function toggleCheck(obj)
|
||||
{
|
||||
var $this = $(obj);
|
||||
var date = $this.val();
|
||||
var $ditto = $this.closest('div').find("input[type='checkBox']");
|
||||
if(date == '')
|
||||
{
|
||||
$ditto.attr('checked', true);
|
||||
$ditto.closest('.input-group-addon').show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$ditto.removeAttr('checked');
|
||||
$ditto.closest('.input-group-addon').hide();
|
||||
}
|
||||
}
|
||||
@@ -328,6 +328,7 @@ $lang->kanbancard->beginAB = 'Begin';
|
||||
$lang->kanbancard->to = '~';
|
||||
$lang->kanbancard->archived = 'Archived';
|
||||
$lang->kanbancard->empty = 'No Card';
|
||||
$lang->kanbancard->ditto = 'Ditto';
|
||||
|
||||
$lang->kanbancard->confirmArchive = 'Are you sure to archive this card? After archiving the card, it will be hidden from the column and you can view it in the Region - Archived.';
|
||||
$lang->kanbancard->confirmDelete = 'Are you sure to delete this card? After deleting the card, it will be deleted from the Kanban. You can only view it in the system recycle bin.';
|
||||
|
||||
@@ -328,6 +328,7 @@ $lang->kanbancard->beginAB = '开始';
|
||||
$lang->kanbancard->to = '~';
|
||||
$lang->kanbancard->archived = '已归档';
|
||||
$lang->kanbancard->empty = '暂时没有卡片';
|
||||
$lang->kanbancard->ditto = '同上';
|
||||
|
||||
$lang->kanbancard->confirmArchive = '您确认归档该卡片吗?归档卡片后,该卡片将从列中隐藏,您可以在区域-已归档中查看。';
|
||||
$lang->kanbancard->confirmDelete = '您确认删除该卡片吗?删除卡片后,该卡片将从看板中删除,您只能通过系统回收站查看。';
|
||||
|
||||
+10
-3
@@ -489,14 +489,21 @@ class kanbanModel extends model
|
||||
$now = helper::now();
|
||||
$data = array();
|
||||
$lanes = array();
|
||||
$lane = '';
|
||||
$begin = '0000-00-00';
|
||||
$end = '0000-00-00';
|
||||
|
||||
foreach($cards->name as $i => $name)
|
||||
{
|
||||
$lane = ($cards->lane[$i] == 'ditto') ? $lane : $cards->lane[$i];
|
||||
$begin = (isset($cards->beginDitto[$i])) ? $begin : $cards->begin[$i];
|
||||
$end = (isset($cards->endDitto[$i])) ? $end : $cards->end[$i];
|
||||
|
||||
if(empty($cards->name[$i])) continue;
|
||||
$data[$i] = new stdclass();
|
||||
$data[$i]->name = trim($cards->name[$i]);
|
||||
$data[$i]->begin = $cards->begin[$i];
|
||||
$data[$i]->end = $cards->end[$i];
|
||||
$data[$i]->begin = $begin;
|
||||
$data[$i]->end = $end;
|
||||
$data[$i]->assignedTo = $cards->assignedTo[$i];
|
||||
$data[$i]->desc = nl2br($cards->desc[$i]);
|
||||
$data[$i]->pri = $cards->pri[$i];
|
||||
@@ -509,7 +516,7 @@ class kanbanModel extends model
|
||||
$data[$i]->color = '#fff';
|
||||
$data[$i]->estimate = is_numeric($cards->estimate[$i]) ? (float)$cards->estimate[$i] : $cards->estimate[$i];
|
||||
|
||||
$lanes[$i] = $cards->lane[$i];
|
||||
$lanes[$i] = $lane;
|
||||
}
|
||||
|
||||
foreach($data as $i => $card)
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
<th><?php echo $lang->kanbancard->lane;?></th>
|
||||
<th><?php echo $lang->kanbancard->assignedTo;?></th>
|
||||
<th class='c-estimate'><?php echo $lang->kanbancard->estimate;?></th>
|
||||
<th><?php echo $lang->kanbancard->beginAndEnd;?></th>
|
||||
<th class='c-date'><?php echo $lang->kanbancard->begin;?></th>
|
||||
<th class='c-date'><?php echo $lang->kanbancard->end;?></th>
|
||||
<th><?php echo $lang->kanbancard->desc;?></th>
|
||||
<th class='c-pri w-120px'><?php echo $lang->kanbancard->pri;?></th>
|
||||
</tr>
|
||||
@@ -43,9 +44,18 @@
|
||||
<td><?php echo html::input("estimate[$i]", '', "class='form-control text-center'");?></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input("begin[$i]", '', "class='form-control form-date' placeholder='{$lang->kanbancard->begin}'");?>
|
||||
<span class='input-group-addon fix-border'>~</span>
|
||||
<?php echo html::input("end[$i]", '', "class='form-control form-date' placeholder='{$lang->kanbancard->end}'");?>
|
||||
<?php
|
||||
echo html::input("begin[$i]", '', "class='form-control form-date' onkeyup='toggleCheck(this)'");
|
||||
if($i != 0) echo "<span class='input-group-addon estStartedBox'><input type='checkbox' name='beginDitto[$i]' id='beginDitto$i' " . ($i> 0 ? "checked" : '') . " /> {$lang->kanbancard->ditto}</span>";
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::input("end[$i]", '', "class='form-control form-date' onkeyup='toggleCheck(this)'");
|
||||
if($i != 0) echo "<span class='input-group-addon deadlineBox'><input type='checkbox' name='endDitto[$i]' id='endDitto$i' " . ($i> 0 ? "checked" : '') . " /> {$lang->kanbancard->ditto}</span>";
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td ><?php echo html::textarea("desc[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
|
||||
Reference in New Issue
Block a user