* [refac story #49398] Add space field.
This commit is contained in:
@@ -20,6 +20,7 @@ $config->doc->form->createlib['vision'] = array('type' => 'string', 'requir
|
||||
$config->doc->form->createlib['addedBy'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
$config->doc->form->createlib['addedDate'] = array('type' => 'datetime', 'required' => false, 'default' => $now);
|
||||
|
||||
$config->doc->form->editlib['space'] = array('type' => 'string', 'required' => true, 'default' => '');
|
||||
$config->doc->form->editlib['name'] = array('type' => 'string', 'required' => true, 'default' => '', 'filter' => 'trim');
|
||||
$config->doc->form->editlib['acl'] = array('type' => 'string', 'required' => false, 'default' => '');
|
||||
$config->doc->form->editlib['groups'] = array('type' => 'array', 'required' => false, 'default' => '', 'filter' => 'join');
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
window.changeSpace = function(e)
|
||||
{
|
||||
let targetSpace = e.target.value;
|
||||
if((targetSpace == 'mine' && space != 'mine') || (targetSpace != 'mine' && space == 'mine'))
|
||||
{
|
||||
loadModal($.createLink('doc', 'editLib', "libID=" + doclibID + "&targetSpace=" + targetSpace));
|
||||
}
|
||||
};
|
||||
|
||||
$(function()
|
||||
{
|
||||
toggleAcl('lib');
|
||||
|
||||
@@ -379,11 +379,13 @@ class docModel extends model
|
||||
$this->checkApiLibName($lib, $type, $libID);
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_DOCLIB)->data($lib)->autoCheck()
|
||||
$this->dao->update(TABLE_DOCLIB)->data($lib, 'space')->autoCheck()
|
||||
->batchCheck($this->config->doc->editlib->requiredFields, 'notempty')
|
||||
->where('id')->eq($libID)
|
||||
->exec();
|
||||
|
||||
$this->moveLib($libID, $lib);
|
||||
|
||||
if(dao::isError()) return false;
|
||||
return common::createChanges($oldLib, $lib);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user