* Format Code for port.
This commit is contained in:
@@ -21,7 +21,7 @@ $lang->caselib->createCase = 'Create Case';
|
||||
$lang->caselib->delete = "Delete Suite";
|
||||
$lang->caselib->linkVersion = "Version";
|
||||
$lang->caselib->deleted = 'Deleted';
|
||||
$lang->caselib->exportTemplate = 'Export Template';
|
||||
$lang->caselib->exportTemplate = 'Export Template';
|
||||
$lang->caselib->batchCreateCase = 'Batch Create';
|
||||
$lang->caselib->import = 'Import';
|
||||
$lang->caselib->showImport = 'Imported Data';
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->caselib->createCase = 'Créer CasTest';
|
||||
$lang->caselib->delete = "Supprimer Suite";
|
||||
$lang->caselib->linkVersion = "Version";
|
||||
$lang->caselib->deleted = 'Supprimé';
|
||||
$lang->caselib->exportTemplate = 'Exporter Modèle';
|
||||
$lang->caselib->exportTemplate = 'Exporter Modèle';
|
||||
$lang->caselib->batchCreateCase = 'Créer par lot';
|
||||
$lang->caselib->import = 'Importer';
|
||||
$lang->caselib->showImport = 'Données Importées';
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->caselib->createCase = 'Tạo tình huống';
|
||||
$lang->caselib->delete = "Xóa Suite";
|
||||
$lang->caselib->linkVersion = "Phiên bản";
|
||||
$lang->caselib->deleted = 'Đã xóa';
|
||||
$lang->caselib->exportTemplate = 'Xuất mẫu';
|
||||
$lang->caselib->exportTemplate = 'Xuất mẫu';
|
||||
$lang->caselib->batchCreateCase = 'Tạo hàng loạt';
|
||||
$lang->caselib->import = 'Nhập';
|
||||
$lang->caselib->importAction = 'Nhập tình huống';
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->caselib->createCase = '创建用例';
|
||||
$lang->caselib->delete = "删除";
|
||||
$lang->caselib->linkVersion = "版本";
|
||||
$lang->caselib->deleted = '已删除';
|
||||
$lang->caselib->exportTemplate = '导出模板';
|
||||
$lang->caselib->exportTemplate = '导出模板';
|
||||
$lang->caselib->batchCreateCase = '批量创建用例';
|
||||
$lang->caselib->import = '导入';
|
||||
$lang->caselib->showImport = '显示导入数据';
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->caselib->createCase = '創建用例';
|
||||
$lang->caselib->delete = "刪除";
|
||||
$lang->caselib->linkVersion = "版本";
|
||||
$lang->caselib->deleted = '已刪除';
|
||||
$lang->caselib->exportTemplate = '導出模板';
|
||||
$lang->caselib->exportTemplate = '導出模板';
|
||||
$lang->caselib->batchCreateCase = '批量創建用例';
|
||||
$lang->caselib->import = '導入';
|
||||
$lang->caselib->showImport = '顯示導入數據';
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php
|
||||
$requiredFields = $datas->requiredFields;
|
||||
$allCount = $datas->allCount;
|
||||
$allPager = $datas->allPager;
|
||||
$pagerID = $datas->pagerID;
|
||||
$isEndPage = $datas->isEndPage;
|
||||
$maxImport = $datas->maxImport;
|
||||
$dataInsert = $datas->dataInsert;
|
||||
$fields = $datas->fields;
|
||||
$suhosinInfo = $datas->suhosinInfo;
|
||||
$model = $datas->model;
|
||||
$datas = $datas->datas;
|
||||
$requiredFields = $datas->requiredFields;
|
||||
$allCount = $datas->allCount;
|
||||
$allPager = $datas->allPager;
|
||||
$pagerID = $datas->pagerID;
|
||||
$isEndPage = $datas->isEndPage;
|
||||
$maxImport = $datas->maxImport;
|
||||
$dataInsert = $datas->dataInsert;
|
||||
$fields = $datas->fields;
|
||||
$suhosinInfo = $datas->suhosinInfo;
|
||||
$model = $datas->model;
|
||||
$datas = $datas->datas;
|
||||
?>
|
||||
<style>
|
||||
form{overflow-x: scroll}
|
||||
@@ -25,7 +25,7 @@ form{overflow-x: scroll}
|
||||
<?php elseif(empty($maxImport) and $allCount > $this->config->file->maxImport):?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->task->import;?></h2>
|
||||
<h2><?php echo $lang->port->import;?></h2>
|
||||
</div>
|
||||
<p><?php echo sprintf($lang->file->importSummary, $allCount, html::input('maxImport', $config->file->maxImport, "style='width:50px'"), ceil($allCount / $config->file->maxImport));?></p>
|
||||
<p><?php echo html::commonButton($lang->import, "id='import'", 'btn btn-primary');?></p>
|
||||
@@ -44,13 +44,13 @@ $(function()
|
||||
<?php js::set('requiredFields', $requiredFields);?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="main-header clearfix">
|
||||
<h2><?php echo $lang->task->import;?></h2>
|
||||
<h2><?php echo $lang->port->import;?></h2>
|
||||
</div>
|
||||
<form class='main-form' target='hiddenwin' method='post'>
|
||||
<table class='table table-form' id='showData'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-70px'> <?php echo $lang->task->id?></th>
|
||||
<th class='w-70px'> <?php echo $lang->port->id?></th>
|
||||
|
||||
<?php foreach($fields as $key => $value):?>
|
||||
|
||||
@@ -102,7 +102,7 @@ $(function()
|
||||
}
|
||||
else
|
||||
{
|
||||
$sub = (strpos($object->title, '>') === 0) ? " <sub style='vertical-align:sub;color:red'>{$lang->port->children}</sub>" : " <sub style='vertical-align:sub;color:gray'>{$lang->task->new}</sub>";
|
||||
$sub = (strpos($object->title, '>') === 0) ? " <sub style='vertical-align:sub;color:red'>{$lang->port->children}</sub>" : " <sub style='vertical-align:sub;color:gray'>{$lang->port->new}</sub>";
|
||||
echo $addID++ . $sub;
|
||||
}
|
||||
echo html::hidden("lib[$key]", $libID);
|
||||
@@ -177,7 +177,7 @@ $(function()
|
||||
foreach($appendFields as $field)
|
||||
{
|
||||
if(!$field->show) continue;
|
||||
$value = $field->defaultValue ? $field->defaultValue : zget($task, $field->field, '');
|
||||
$value = $field->defaultValue ? $field->defaultValue : zget($datas, $field->field, '');
|
||||
echo '<td>' . $this->flow->buildControl($field, $value, "$field->field[$key]", true) . '</td>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -981,7 +981,7 @@ $lang->resource->testcase->batchEdit = 'batchEdit';
|
||||
$lang->resource->testcase->delete = 'deleteAction';
|
||||
$lang->resource->testcase->batchDelete = 'batchDelete';
|
||||
$lang->resource->testcase->export = 'exportAction';
|
||||
$lang->resource->testcase->exportTemplate = 'exportTemplate';
|
||||
$lang->resource->testcase->exportTemplate = 'exportTemplate';
|
||||
$lang->resource->testcase->import = 'importAction';
|
||||
$lang->resource->testcase->showImport = 'showImport';
|
||||
$lang->resource->testcase->confirmChange = 'confirmChange';
|
||||
@@ -1118,7 +1118,7 @@ $lang->resource->caselib->delete = 'deleteAction';
|
||||
$lang->resource->caselib->view = 'view';
|
||||
$lang->resource->caselib->createCase = 'createCase';
|
||||
$lang->resource->caselib->batchCreateCase = 'batchCreateCase';
|
||||
$lang->resource->caselib->exportTemplate = 'exportTemplate';
|
||||
$lang->resource->caselib->exportTemplate = 'exportTemplate';
|
||||
$lang->resource->caselib->import = 'importAction';
|
||||
$lang->resource->caselib->showImport = 'showImport';
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ class port extends control
|
||||
/**
|
||||
* Export Template.
|
||||
*
|
||||
* @param int $model
|
||||
* @param string $params
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -91,6 +93,8 @@ class port extends control
|
||||
/**
|
||||
* Import.
|
||||
*
|
||||
* @param int $model
|
||||
* @param string $locate
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -135,6 +139,7 @@ class port extends control
|
||||
* Ajax get Tbody .
|
||||
*
|
||||
* @param string $model
|
||||
* @param int $lastID
|
||||
* @param int $pagerID
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -162,7 +167,7 @@ class port extends control
|
||||
* @param string $model
|
||||
* @param string $field
|
||||
* @param string $value
|
||||
* @param string $id
|
||||
* @param string $index
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
+7
-24
@@ -141,7 +141,7 @@ class portModel extends model
|
||||
{
|
||||
if(file_exists($filePath))
|
||||
{
|
||||
$tmpPath = $this->app->getAppRoot() . 'tmp/import/excel';
|
||||
$tmpPath = $this->app->getAppRoot() . 'tmp/import/excel' . $this->app->user->account . time();
|
||||
$this->app->loadClass('pclzip', true);
|
||||
$zip = new pclzip($filePath);
|
||||
$zip->extract(PCLZIP_OPT_PATH, $tmpPath);
|
||||
@@ -171,30 +171,11 @@ class portModel extends model
|
||||
}
|
||||
|
||||
$result = $zip->create($tmpPath,PCLZIP_OPT_REMOVE_PATH,$tmpPath);
|
||||
$this->deleteDir($tmpPath);
|
||||
$zfile = $this->app->loadClass('zfile');
|
||||
$zfile->removeDir($tmpPath);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete directory.
|
||||
*
|
||||
* @param string $dir
|
||||
*/
|
||||
public function deleteDir($dir)
|
||||
{
|
||||
foreach (scandir($dir) as $file) {
|
||||
if ($file === '.' || $file === '..') {
|
||||
continue;
|
||||
} elseif (is_file($dir . '/' . $file)) {
|
||||
unlink($dir . '/' . $file);
|
||||
} elseif (is_dir($dir . '/' . $file)) {
|
||||
$this->deleteDir($dir . '/' . $file);
|
||||
}
|
||||
}
|
||||
|
||||
rmdir($dir);
|
||||
}
|
||||
|
||||
/**
|
||||
* export
|
||||
*
|
||||
@@ -225,6 +206,7 @@ class portModel extends model
|
||||
/**
|
||||
* Init postFields.
|
||||
*
|
||||
* @param string $model
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -412,7 +394,7 @@ class portModel extends model
|
||||
* Init system datafields list.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function initSysDataFields()
|
||||
{
|
||||
@@ -478,7 +460,7 @@ class portModel extends model
|
||||
* @param string $model
|
||||
* @param string $filter
|
||||
* @access public
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function format($model = '', $filter = '')
|
||||
{
|
||||
@@ -903,6 +885,7 @@ class portModel extends model
|
||||
/**
|
||||
* Get datas by file.
|
||||
*
|
||||
* @param int $file
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<?php
|
||||
$requiredFields = $datas->requiredFields;
|
||||
$allCount = $datas->allCount;
|
||||
$allPager = $datas->allPager;
|
||||
$pagerID = $datas->pagerID;
|
||||
$isEndPage = $datas->isEndPage;
|
||||
$maxImport = $datas->maxImport;
|
||||
$dataInsert = $datas->dataInsert;
|
||||
$fields = $datas->fields;
|
||||
$suhosinInfo = $datas->suhosinInfo;
|
||||
$model = $datas->model;
|
||||
$datas = $datas->datas;
|
||||
$appendFields = $this->session->appendFields;
|
||||
$notEmptyRule = $this->session->notEmptyRule;
|
||||
$insert = $this->session->insert;
|
||||
$requiredFields = $datas->requiredFields;
|
||||
$allCount = $datas->allCount;
|
||||
$allPager = $datas->allPager;
|
||||
$pagerID = $datas->pagerID;
|
||||
$isEndPage = $datas->isEndPage;
|
||||
$maxImport = $datas->maxImport;
|
||||
$dataInsert = $datas->dataInsert;
|
||||
$fields = $datas->fields;
|
||||
$suhosinInfo = $datas->suhosinInfo;
|
||||
$model = $datas->model;
|
||||
$datas = $datas->datas;
|
||||
$appendFields = $this->session->appendFields;
|
||||
$notEmptyRule = $this->session->notEmptyRule;
|
||||
$insert = $this->session->insert;
|
||||
?>
|
||||
<style>
|
||||
form{overflow-x: scroll}
|
||||
@@ -28,7 +28,7 @@ form{overflow-x: scroll}
|
||||
<?php elseif(empty($maxImport) and $allCount > $this->config->file->maxImport):?>
|
||||
<div id="mainContent" class="main-content">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->task->import;?></h2>
|
||||
<h2><?php echo $lang->port->import;?></h2>
|
||||
</div>
|
||||
<p><?php echo sprintf($lang->file->importSummary, $allCount, html::input('maxImport', $config->file->maxImport, "style='width:50px'"), ceil($allCount / $config->file->maxImport));?></p>
|
||||
<p><?php echo html::commonButton($lang->import, "id='import'", 'btn btn-primary');?></p>
|
||||
|
||||
Reference in New Issue
Block a user