* Change the upload file control to uploader.

This commit is contained in:
hufangzhou
2022-08-04 10:24:26 +08:00
parent c5eb6c53d9
commit 7ffe013d41
9 changed files with 134 additions and 50 deletions
+2 -13
View File
@@ -319,19 +319,8 @@ class doc extends control
if($this->viewType == 'json') return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $docID));
$objectID = zget($lib, $lib->type, 0);
$params = "type={$lib->type}&objectID=$objectID&libID={$lib->id}&docID=" . $docResult['id'];
$link = isonlybody() ? 'parent' : $this->createLink('doc', 'objectLibs', $params, 'html') . '#app=' . $this->app->tab;
$response = array('result' => 'success', 'message' => $this->lang->saveSuccess);
if(isonlybody() and $docResult['docType'] == 'text')
{
$link = helper::createLink('doc', 'edit', "docID=$docID&comment=false&objectType=$objectType&objectID=$objectID&libID={$docResult['libID']}");
$response['callback'] = "redirect2Edit($docID, \"$objectType\", $objectID, {$docResult['libID']})";
}
else
{
$response['locate'] = "$link";
}
$link = isonlybody() ? 'parent' : $this->createLink('doc', 'objectLibs', $params) . '#app=' . $this->app->tab;
$response = array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link);
return $this->send($response);
}