* Code for port.
This commit is contained in:
+10
-5
@@ -10,11 +10,11 @@ class port extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function export($model = '', $params = '', $rows = array())
|
||||
public function export($model = '')
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->port->export($model, $params, $rows);
|
||||
$this->port->export($model);
|
||||
$this->fetch('file', 'export2' . $_POST['fileType'], $_POST);
|
||||
}
|
||||
}
|
||||
@@ -75,11 +75,16 @@ class port extends control
|
||||
{
|
||||
if($_FILES)
|
||||
{
|
||||
$file = $this->loadModel('file')->getUpload('file');
|
||||
$file = $file[0];
|
||||
$file = $this->loadModel('file')->getUpload('file');
|
||||
$file = $file[0];
|
||||
$shortName = $this->file->getSaveName($file['pathname']);
|
||||
if(empty($shortName))
|
||||
{
|
||||
die(js::alert($this->lang->excel->emptyFileName));
|
||||
}
|
||||
$extension = $file['extension'];
|
||||
|
||||
$fileName = $this->file->savePath . $this->file->getSaveName($file['pathname']);
|
||||
$fileName = $this->file->savePath . $shortName;
|
||||
move_uploaded_file($file['tmpname'], $fileName);
|
||||
|
||||
$phpExcel = $this->app->loadClass('phpexcel');
|
||||
|
||||
@@ -1075,14 +1075,14 @@ class portModel extends model
|
||||
}
|
||||
|
||||
$table = zget($this->config->objectTables, $model);
|
||||
$this->dao->insert($table)->data($data)->autoCheck()->checkFlow()->exec();
|
||||
$this->dao->replace($table)->data($data)->autoCheck()->checkFlow()->exec();
|
||||
$objectID = $this->dao->lastInsertID();
|
||||
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
if(!empty($subDatas)) $this->saveSubTable($objectID, $subDatas);
|
||||
/* Create action*/
|
||||
$this->loadModel('action')->create($model, $objectID, 'Opened', '');
|
||||
if($this->post->insert) $this->loadModel('action')->create($model, $objectID, 'Opened', '');
|
||||
}
|
||||
|
||||
if($this->post->isEndPage)
|
||||
|
||||
@@ -2714,7 +2714,7 @@ class story extends control
|
||||
}
|
||||
|
||||
$this->view->fileName = $fileName;
|
||||
$this->view->allExportFields = $this->config->story->list->exportFields;
|
||||
$this->view->allExportFields = $this->config->story->exportFields;
|
||||
$this->view->customExport = true;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -51,11 +51,13 @@ $config->task->fieldList['mode']['control'] = 'hidden';
|
||||
|
||||
$config->task->fieldList['desc']['control'] = 'textarea';
|
||||
|
||||
$config->task->fieldList['assignedTo']['title'] = 'assignTo';
|
||||
$config->task->fieldList['assignedTo']['control'] = 'select';
|
||||
$config->task->fieldList['assignedTo']['dataSource'] = array('module' => 'user', 'method' => 'getTeamMemberPairs', 'params' => '$executionID&execution');
|
||||
$config->task->fieldList['assignedTo']['title'] = 'assignTo';
|
||||
|
||||
|
||||
$config->task->fieldList['estStarted']['control'] = 'date';
|
||||
|
||||
$config->task->fieldList['deadline']['control'] = 'date';
|
||||
|
||||
$config->task->fieldList['closedReason']['dataSource'] = array('lang' => 'reasonList');
|
||||
|
||||
Reference in New Issue
Block a user