From 17de99d55eae92ff71efc1d4a02a3b7132dd3e69 Mon Sep 17 00:00:00 2001 From: chenfeiCF Date: Mon, 2 May 2016 12:14:04 +0800 Subject: [PATCH] * add custom for batch edit todo. --- module/todo/config.php | 2 ++ module/todo/control.php | 5 +++++ module/todo/view/batchedit.html.php | 34 ++++++++++++++++++++--------- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/module/todo/config.php b/module/todo/config.php index 9f9fad9670..6ee664628b 100644 --- a/module/todo/config.php +++ b/module/todo/config.php @@ -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'; diff --git a/module/todo/control.php b/module/todo/control.php index a223cee816..462e3c1997 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -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); diff --git a/module/todo/view/batchedit.html.php b/module/todo/view/batchedit.html.php index c632ffc367..8450040bfa 100644 --- a/module/todo/view/batchedit.html.php +++ b/module/todo/view/batchedit.html.php @@ -16,28 +16,39 @@
icons['todo']);?> icons['batchEdit']);?> todo->common . $lang->colon . $lang->todo->batchEdit;?> +
+ +
- +
'> - - + + - - + + + - - + + - + - + - +
idAB;?> todo->date;?> todo->type;?> todo->pri;?>'> todo->type;?>'> todo->pri;?> todo->name;?> todo->beginAndEnd;?> todo->status;?>>todo->desc;?>'>todo->beginAndEnd;?>'> todo->status;?>
id . html::hidden("todoIDList[$todo->id]", $todo->id);?> id]", $todo->date, "class='form-control form-date'");?>id]", $lang->todo->typeList, $todo->type, "onchange=loadList(this.value,$todo->id) class='form-control'");?>id]", $lang->todo->priList, $todo->pri, 'class=form-control');?>>id]", $lang->todo->typeList, $todo->type, "onchange=loadList(this.value,$todo->id) class='form-control'");?>>id]", $lang->todo->priList, $todo->pri, 'class=form-control');?>
@@ -57,20 +68,23 @@ ?>
+ >id]", $todo->descs, "rows='1' class='form-control'");?>>
id]", $times, $todo->begin, 'class="form-control" style="width: 50%"') . html::select("ends[$todo->id]", $times, $todo->end, 'class="form-control" style="width: 50%"');?>
id]", $lang->todo->statusList, $todo->status, "class='form-control'");?>>id]", $lang->todo->statusList, $todo->status, "class='form-control'");?>
fdsafsdf
+createLink('custom', 'ajaxSaveCustom', 'module=todo§ion=custom&key=batchEditFields')?> +