* UpDate it.

This commit is contained in:
shiyangyangwork@yahoo.cn
2011-04-12 09:03:44 +00:00
parent 4ce74e5b52
commit a101d36dd5
5 changed files with 10 additions and 4 deletions
+2 -2
View File
@@ -321,12 +321,12 @@ class doc extends control
$changes = $this->doc->update($docID);
if(dao::isError()) die(js::error(dao::getError()));
$files = $this->loadModel('file')->saveUpload('doc', $docID);
if(!empty($changes) or !empty($files))
if($this->post->comment != '' or !empty($changes) or !empty($files))
{
$action = !empty($changes) ? 'Edited' : 'Commented';
$fileAction = '';
if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ;
$actionID = $this->action->create('doc', $docID, $action, $fileAction);
$actionID = $this->action->create('doc', $docID, $action, $fileAction . $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
die(js::locate($this->createLink('doc', 'view', "docID=$docID"), 'parent'));
+1
View File
@@ -18,6 +18,7 @@ $lang->doc->lib = 'Library';
$lang->doc->module = 'Module';
$lang->doc->title = 'Title';
$lang->doc->digest = 'Digest';
$lang->doc->comment = 'Comment';
$lang->doc->type = 'Type';
$lang->doc->content = 'Content';
$lang->doc->keywords = 'Keywords';
+1
View File
@@ -18,6 +18,7 @@ $lang->doc->lib = '所属文档库';
$lang->doc->module = '所属分类';
$lang->doc->title = '文档标题';
$lang->doc->digest = '文档摘要';
$lang->doc->comment = '文档备注';
$lang->doc->type = '文档类型';
$lang->doc->content = '文档正文';
$lang->doc->keywords = '关键字';
+1 -1
View File
@@ -204,7 +204,7 @@ class docModel extends model
->setDefault('module', 0)
->specialChars('title, digest, keywords')
->encodeURL('url')
->remove('files, labels')
->remove('comment,files, labels')
->add('editedBy', $this->app->user->account)
->add('editedDate', $now)
->get();
+5 -1
View File
@@ -45,10 +45,14 @@ $(document).ready(function()
<th class='rowhead'><?php echo $lang->doc->content;?></th>
<td><?php echo html::textarea('content', htmlspecialchars($doc->content), "class='text-1' rows='8' style='width:90%; height:200px'");?></td>
</tr>
<tr>
<tr>
<th class='rowhead'><?php echo $lang->doc->digest;?></th>
<td><?php echo html::textarea('digest', $doc->digest, "class='text-1' rows=3");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->doc->comment;?></th>
<td><?php echo html::textarea('comment', $doc->comment, "class='text-1' rows=3");?></td>
</tr>
<tr id='fileBox' class='hidden'>
<th class='rowhead'><?php echo $lang->doc->files;?></th>
<td><?php echo $this->fetch('file', 'buildform', 'fileCount=2');?></td>