* add custom for batch edit todo.
This commit is contained in:
@@ -20,6 +20,8 @@ $config->todo->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->todo->list = new stdclass();
|
||||
$config->todo->list->exportFields = 'id, account, date, begin, end, type, idvalue, pri, name, desc, status, private';
|
||||
$config->todo->list->customBatchCreateFields = 'type,pri,desc,beginAndEnd';
|
||||
$config->todo->list->customBatchEditFields = 'type,pri,desc,beginAndEnd,status';
|
||||
|
||||
$config->todo->custom = new stdclass();
|
||||
$config->todo->custom->batchCreateFields = 'type,pri,desc,beginAndEnd';
|
||||
$config->todo->custom->batchEditFields = 'type,pri,beginAndEnd,status';
|
||||
|
||||
@@ -192,6 +192,11 @@ class todo extends control
|
||||
/* Set the sessions. */
|
||||
$this->app->session->set('showSuhosinInfo', $showSuhosinInfo);
|
||||
|
||||
/* Set Custom*/
|
||||
foreach(explode(',', $this->config->todo->list->customBatchEditFields) as $field) $customFields[$field] = $this->lang->todo->$field;
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->todo->custom->batchEditFields;
|
||||
|
||||
/* Assign. */
|
||||
$title = $this->lang->todo->common . $this->lang->colon . $this->lang->todo->batchEdit;
|
||||
$position[] = html::a($this->createLink('my', 'todo'), $this->lang->my->todo);
|
||||
|
||||
@@ -16,28 +16,39 @@
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['todo']);?></span>
|
||||
<strong><small class='text-muted'><?php echo html::icon($lang->icons['batchEdit']);?></small> <?php echo $lang->todo->common . $lang->colon . $lang->todo->batchEdit;?></strong>
|
||||
<div class='actions'>
|
||||
<button type="button" class="btn btn-default" data-toggle="customModal"><i class='icon icon-cog'></i> </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
{
|
||||
if($field)$visibleFields[$field] = '';
|
||||
}
|
||||
$columns = count($visibleFields) + 3;
|
||||
?>
|
||||
<form class='form-condensed' method='post' target='hiddenwin' action='<?php echo $this->inlink('batchEdit', "from=todoBatchEdit");?>'>
|
||||
<table class='table table-form table-fixed with-border'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-40px'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->todo->date;?></th>
|
||||
<th class='w-120px'> <?php echo $lang->todo->type;?></th>
|
||||
<th class='w-80px'> <?php echo $lang->todo->pri;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'type', ' hidden')?>'> <?php echo $lang->todo->type;?></th>
|
||||
<th class='w-80px<?php echo zget($visibleFields, 'pri', ' hidden')?>'> <?php echo $lang->todo->pri;?></th>
|
||||
<th class='red'><?php echo $lang->todo->name;?></th>
|
||||
<th class='w-180px'> <?php echo $lang->todo->beginAndEnd;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->todo->status;?></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-100px<?php echo zget($visibleFields, 'status', ' hidden')?>'> <?php echo $lang->todo->status;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach($editedTodos as $todo):?>
|
||||
<tr class='text-center'>
|
||||
<td><?php echo $todo->id . html::hidden("todoIDList[$todo->id]", $todo->id);?></td>
|
||||
<td><?php echo html::input("dates[$todo->id]", $todo->date, "class='form-control form-date'");?></td>
|
||||
<td><?php echo html::select("types[$todo->id]", $lang->todo->typeList, $todo->type, "onchange=loadList(this.value,$todo->id) class='form-control'");?></td>
|
||||
<td><?php echo html::select("pris[$todo->id]", $lang->todo->priList, $todo->pri, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'type', "class='hidden'")?>><?php echo html::select("types[$todo->id]", $lang->todo->typeList, $todo->type, "onchange=loadList(this.value,$todo->id) class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$todo->id]", $lang->todo->priList, $todo->pri, 'class=form-control');?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div id='<?php echo "nameBox" . $todo->id;?>' class='hidden'><? echo html::input("names[$todo->id]", '', "class='text-left form-control hiddenwin'"); ?></div>
|
||||
<div class='<?php echo "nameBox" . $todo->id;?> text-left'>
|
||||
@@ -57,20 +68,23 @@
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<td <?php echo zget($visibleFields, 'desc', "class='hidden'")?>><?php echo html::textarea("descs[$todo->id]", $todo->descs, "rows='1' class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'beginAndEnd', "class='hidden'")?>>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("begins[$todo->id]", $times, $todo->begin, 'class="form-control" style="width: 50%"') . html::select("ends[$todo->id]", $times, $todo->end, 'class="form-control" style="width: 50%"');?>
|
||||
</div>
|
||||
</td>
|
||||
<td><?php echo html::select("status[$todo->id]", $lang->todo->statusList, $todo->status, "class='form-control'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?>><?php echo html::select("status[$todo->id]", $lang->todo->statusList, $todo->status, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php if(isset($suhosinInfo)):?>
|
||||
<tr><td colspan='7'><div class='text-left text-info'><?php echo $suhosinInfo;?>fdsafsdf</div></td></tr>
|
||||
<?php endif;?>
|
||||
<tfoot>
|
||||
<tr><td colspan='7'><?php echo html::submitButton();?></td></tr>
|
||||
<tr><td colspan='<?php echo $columns?>'><?php echo html::submitButton();?></td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustom', 'module=todo§ion=custom&key=batchEditFields')?>
|
||||
<?php include '../../common/view/customfield.html.php';?>
|
||||
<?php include './footer.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user