Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<?php $datatableId = $this->moduleName . ucfirst($this->methodName);?>
|
||||
<style>
|
||||
#setShowModule {margin-left: 30px;}
|
||||
</style>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
@@ -13,7 +16,7 @@ $(function()
|
||||
<?php $mode = isset($this->config->datatable->$datatableId->mode) ? $this->config->datatable->$datatableId->mode : 'table';?>
|
||||
// $btnToolbar.append("<a href=\"javascript:saveDatatableConfig('mode', 'table', true);\" class='btn btn-link <?php echo $mode == 'table' ? 'btn-active-line' : '';?>'><?php echo $lang->datatable->table?></a>");
|
||||
// $btnToolbar.append("<a href=\"javascript:saveDatatableConfig('mode', 'datatable', true);\" class='btn btn-link <?php echo $mode == 'datatable' ? 'btn-active-line' : '';?>'><?php echo $lang->datatable->datatable?></a>");
|
||||
$btnToolbar.append("<a id='tableCustomBtn' class='btn btn-link' href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName)?>' data-toggle='modal' data-type='ajax'><i class='icon icon-cog'></i></a>");
|
||||
$btnToolbar.append("<a id='tableCustomBtn' class='btn btn-link' title='<?php echo $lang->datatable->custom?>' href='<?php echo $this->createLink('datatable', 'ajaxCustom', 'id=' . $this->moduleName . '&method=' . $this->methodName)?>' data-toggle='modal' data-type='ajax'><i class='icon icon-cog'></i></a>");
|
||||
$('#tableCustomBtn').modalTrigger();
|
||||
}
|
||||
|
||||
|
||||
@@ -195,8 +195,8 @@ class todo extends control
|
||||
if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title');
|
||||
if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
|
||||
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
|
||||
$todo->begin = str_replace(':', '', $todo->begin);
|
||||
$todo->end = str_replace(':', '', $todo->end);
|
||||
$todo->begin = $todo->begin ? str_replace(':', '', $todo->begin) : '2400';
|
||||
$todo->end = $todo->end ? str_replace(':', '', $todo->end) : '2400';
|
||||
}
|
||||
|
||||
/* Judge whether the edited todos is too large. */
|
||||
|
||||
@@ -13,19 +13,6 @@ function updateAction(date)
|
||||
location.href=link;
|
||||
}
|
||||
|
||||
function switchDateList(number)
|
||||
{
|
||||
if($('#switchDate' + number).attr('checked') == 'checked')
|
||||
{
|
||||
$('#begins' + number).attr('disabled', 'disabled').trigger('chosen:updated');
|
||||
$('#ends' + number).attr('disabled', 'disabled').trigger('chosen:updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#begins' + number).removeAttr('disabled').trigger('chosen:updated');
|
||||
$('#ends' + number).removeAttr('disabled').trigger('chosen:updated');
|
||||
}
|
||||
}
|
||||
$(function()
|
||||
{
|
||||
setBeginsAndEnds();
|
||||
|
||||
@@ -82,18 +82,36 @@ function setBeginsAndEnds(i, beginOrEnd)
|
||||
if(beginOrEnd == 'begin')
|
||||
{
|
||||
$("#ends" + i)[0].selectedIndex = $("#begins" + i)[0].selectedIndex + 3;
|
||||
$("#ends" + j).trigger('chosen:updated');
|
||||
$("#ends" + i).trigger('chosen:updated');
|
||||
}
|
||||
for(j = i+1; j < batchCreateNum; j++)
|
||||
|
||||
if(typeof batchCreateNum != 'undefined')
|
||||
{
|
||||
$("#begins" + j)[0].selectedIndex = $("#ends" + (j - 1))[0].selectedIndex;
|
||||
$("#ends" + j)[0].selectedIndex = $("#begins" + j)[0].selectedIndex + 3;
|
||||
$("#begins" + j).trigger('chosen:updated');
|
||||
$("#ends" + j).trigger('chosen:updated');
|
||||
for(j = i+1; j < batchCreateNum; j++)
|
||||
{
|
||||
$("#begins" + j)[0].selectedIndex = $("#ends" + (j - 1))[0].selectedIndex;
|
||||
$("#ends" + j)[0].selectedIndex = $("#begins" + j)[0].selectedIndex + 3;
|
||||
$("#begins" + j).trigger('chosen:updated');
|
||||
$("#ends" + j).trigger('chosen:updated');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function switchDateList(number)
|
||||
{
|
||||
if($('#switchDate' + number).prop('checked'))
|
||||
{
|
||||
$('#begins' + number).attr('disabled', 'disabled').trigger('chosen:updated');
|
||||
$('#ends' + number).attr('disabled', 'disabled').trigger('chosen:updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#begins' + number).removeAttr('disabled').trigger('chosen:updated');
|
||||
$('#ends' + number).removeAttr('disabled').trigger('chosen:updated');
|
||||
}
|
||||
}
|
||||
|
||||
function switchDateFeature(switcher)
|
||||
{
|
||||
if(switcher.checked)
|
||||
|
||||
@@ -220,8 +220,8 @@ class todoModel extends model
|
||||
$todo->pri = $data->pris[$todoID];
|
||||
$todo->status = $data->status[$todoID];
|
||||
$todo->name = ($todo->type == 'custom' or $todo->type == 'cycle') ? $data->names[$todoID] : '';
|
||||
$todo->begin = $data->begins[$todoID];
|
||||
$todo->end = $data->ends[$todoID];
|
||||
$todo->begin = isset($data->begins[$todoID]) ? $data->begins[$todoID] : 2400;
|
||||
$todo->end = isset($data->ends[$todoID]) ? $data->ends[$todoID] : 2400;
|
||||
if($todo->type == 'task') $todo->idvalue = isset($data->tasks[$todoID]) ? $data->tasks[$todoID] : 0;
|
||||
if($todo->type == 'bug') $todo->idvalue = isset($data->bugs[$todoID]) ? $data->bugs[$todoID] : 0;
|
||||
|
||||
|
||||
@@ -31,16 +31,16 @@
|
||||
$columns = count($visibleFields) + 4;
|
||||
?>
|
||||
<form method='post' target='hiddenwin' action='<?php echo $this->inlink('batchEdit', "from=todoBatchEdit");?>'>
|
||||
<table class='table table-form table-fixed with-border'>
|
||||
<table class='table table-form'>
|
||||
<thead>
|
||||
<tr>
|
||||
<tr class='text-center'>
|
||||
<th class='w-40px'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->todo->date;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->todo->type;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->todo->pri;?></th>
|
||||
<th><?php echo $lang->todo->name;?></th>
|
||||
<th <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo $lang->todo->desc;?></th>
|
||||
<th class='w-180px<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='w-300px<?php echo zget($visibleFields, 'beginAndEnd', ' hidden')?>'><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'status', ' hidden')?>'> <?php echo $lang->todo->status;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -77,10 +77,16 @@
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?> style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php
|
||||
echo html::select("begins[$todo->id]", $times, $todo->begin, "onchange=\"setBeginsAndEnds($todo->id, 'begin');\" class='form-control chosen control-time-begin'" . (isset($visibleFields['beginAndEnd']) ? '' : " disabled"));
|
||||
echo html::select("begins[$todo->id]", $times, $todo->begin, "onchange=\"setBeginsAndEnds($todo->id, 'begin');\" class='form-control chosen control-time-begin'" . ((isset($visibleFields['beginAndEnd']) && $todo->begin != '2400') ? '' : " disabled"));
|
||||
echo '<span class="input-group-addon fix-border fix-padding"></span>';
|
||||
echo html::select("ends[$todo->id]", $times, $todo->end, "onchange=\"setBeginsAndEnds($todo->id, 'end');\" class='form-control chosen control-time-end'" . (isset($visibleFields['beginAndEnd']) ? '' : " disabled"));
|
||||
echo html::select("ends[$todo->id]", $times, $todo->end, "onchange=\"setBeginsAndEnds($todo->id, 'end');\" class='form-control chosen control-time-end'" . ((isset($visibleFields['beginAndEnd']) && $todo->begin != '2400') ? '' : " disabled"));
|
||||
?>
|
||||
<span class="input-group-addon">
|
||||
<div class='checkbox-primary dateSwitcher'>
|
||||
<input type='checkbox' name="switchDate[<?php echo $todo->id;?>]" id="switchDate<?php echo $todo->id;?>" data-key="<?php echo $todo->id;?>" onclick='switchDateList(<?php echo $todo->id?>);' <?php if($todo->begin == '2400') echo "checked='checked'";?>>
|
||||
<label for='switchDate'><?php echo $lang->todo->periods['future'];?></label>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?> style='overflow:visible'><?php echo html::select("status[$todo->id]", $lang->todo->statusList, $todo->status, "class='form-control chosen'");?></td>
|
||||
@@ -88,7 +94,12 @@
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='<?php echo $columns?>' class='text-center'><?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?></td></tr>
|
||||
<tr>
|
||||
<td colspan='<?php echo $columns?>' class='text-center'>
|
||||
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
|
||||
<?php echo html::backButton('', '', 'btn btn-wide');?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->date;?></th>
|
||||
<td><?php echo $todo->date == '20300101' ? $lang->todo->periods['future'] : formatTime($todo->date);?></td>
|
||||
<td><?php echo $todo->date == '20300101' ? $lang->todo->periods['future'] : formatTime($todo->date, DT_DATE1);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->todo->beginAndEnd;?></th>
|
||||
|
||||
Reference in New Issue
Block a user