This commit is contained in:
tengfei
2018-05-25 14:55:44 +08:00
285 changed files with 2039 additions and 1761 deletions
+9
View File
@@ -78,6 +78,15 @@ rpm:
rpmbuild -ba ~/rpmbuild/SPECS/zentaopms.spec
cp ~/rpmbuild/RPMS/noarch/zentaopms-${VERSION}-1.noarch.rpm ./
rm -rf ~/rpmbuild
en:
unzip ZenTaoPMS.${VERSION}.zip
cd zentaopms/; grep -rl 'zentao.net'|xargs sed -i 's/zentao.net/zentao.pm/g';
zip -r -9 ZenTaoPMS.$(VERSION).int.zip zentaopms
rm -fr zentaopms
echo $(VERSION).int > VERSION
make deb
make rpm
echo $(VERSION) > VERSION
patchphpdoc:
sudo cp misc/doc/phpdoc/*.tpl /usr/share/php/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/phphtmllib/templates/
phpdoc:
+2 -2
View File
@@ -69,7 +69,7 @@ $lang->action->objectTypes['productplan'] = '计划';
$lang->action->objectTypes['release'] = '发布';
$lang->action->objectTypes['project'] = $lang->projectCommon;
$lang->action->objectTypes['task'] = '任务';
$lang->action->objectTypes['build'] = 'Build';
$lang->action->objectTypes['build'] = '版本';
$lang->action->objectTypes['bug'] = 'Bug';
$lang->action->objectTypes['case'] = '用例';
$lang->action->objectTypes['caseresult'] = '用例结果';
@@ -231,7 +231,7 @@ $lang->action->search->objectTypeList['user'] = '用户';
$lang->action->search->objectTypeList['doc'] = '文档';
$lang->action->search->objectTypeList['doclib'] = '文档库';
$lang->action->search->objectTypeList['todo'] = '待办';
$lang->action->search->objectTypeList['build'] = 'Build';
$lang->action->search->objectTypeList['build'] = '版本';
$lang->action->search->objectTypeList['release'] = '发布';
$lang->action->search->objectTypeList['productplan'] = '计划';
$lang->action->search->objectTypeList['branch'] = '分支';
+3 -2
View File
@@ -34,6 +34,7 @@ $lang->action->original = '原始格式';
$lang->action->confirmHideAll = '您確定要全部隱藏這些記錄嗎?';
$lang->action->needEdit = '要還原%s的名稱或代號已經存在,請編輯更改。';
$lang->action->historyEdit = '歷史記錄編輯不能為空。';
$lang->action->noDynamic = '暫無動態';
$lang->action->history = new stdclass();
$lang->action->history->action = '關聯日誌';
@@ -68,7 +69,7 @@ $lang->action->objectTypes['productplan'] = '計劃';
$lang->action->objectTypes['release'] = '發佈';
$lang->action->objectTypes['project'] = $lang->projectCommon;
$lang->action->objectTypes['task'] = '任務';
$lang->action->objectTypes['build'] = 'Build';
$lang->action->objectTypes['build'] = '版本';
$lang->action->objectTypes['bug'] = 'Bug';
$lang->action->objectTypes['case'] = '用例';
$lang->action->objectTypes['caseresult'] = '用例結果';
@@ -230,7 +231,7 @@ $lang->action->search->objectTypeList['user'] = '用戶';
$lang->action->search->objectTypeList['doc'] = '文檔';
$lang->action->search->objectTypeList['doclib'] = '文檔庫';
$lang->action->search->objectTypeList['todo'] = '待辦';
$lang->action->search->objectTypeList['build'] = 'Build';
$lang->action->search->objectTypeList['build'] = '版本';
$lang->action->search->objectTypeList['release'] = '發佈';
$lang->action->search->objectTypeList['productplan'] = '計劃';
$lang->action->search->objectTypeList['branch'] = '分支';
+9 -4
View File
@@ -21,8 +21,8 @@
</div>
</div>
<div id='mainContent' class='main-content'>
<div class='main-table'>
<div id='mainContent'>
<div class='main-table' data-ride='table'>
<table class='table has-sort-head'>
<?php $vars = "type=$type&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<thead>
@@ -38,13 +38,18 @@
<tbody>
<?php foreach($trashes as $action):?>
<?php $module = $action->objectType == 'case' ? 'testcase' : $action->objectType;?>
<tr class='text-center'>
<tr>
<td><?php echo zget($lang->action->objectTypes, $action->objectType, '');?></td>
<td><?php echo $action->objectID;?></td>
<td class='text-left'>
<?php
$methodName = $module == 'caselib' ? 'libview' : 'view';
$params = $action->objectType == 'user' ? "account={$action->objectName}" : "id={$action->objectID}";
$methodName = 'view';
if($module == 'caselib')
{
$methodName = 'libview';
$module = 'testsuite';
}
if($module == 'doclib' or $module == 'module')
{
echo $action->objectName;
+1 -1
View File
@@ -172,7 +172,7 @@ class admin extends control
{
$data = fixer::input('post')->get();
$this->loadModel('setting')->setItems('system.common.safe', $data);
die(js::reload('parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->view->title = $this->lang->admin->safe->common . $this->lang->colon . $this->lang->admin->safe->set;
$this->view->position[] = $this->lang->admin->safe->common;
+6 -8
View File
@@ -17,20 +17,19 @@
<?php common::printLink('admin', 'checkWeak', '', "<span class='text'>{$lang->admin->safe->checkWeak}</span>", '', "class='btn btn-link btn-active-text'");?></li>
</div>
</div>
<div id='mainContent' class='main-content'>
<div id='mainContent'>
<div class='main-table pd-0'>
<table class='table table-condensed table-hover table-striped table-fixed'>
<thead>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th><?php echo $lang->user->realname;?></th>
<th class='w-150px'><?php echo $lang->user->realname;?></th>
<th><?php echo $lang->user->account;?></th>
<th><?php echo $lang->user->phone;?></th>
<th><?php echo $lang->user->mobile;?></th>
<th><?php echo $lang->user->birthyear;?></th>
<th><?php echo $lang->admin->safe->reason;?></th>
<th class='w-150px'><?php echo $lang->user->phone;?></th>
<th class='w-150px'><?php echo $lang->user->mobile;?></th>
<th class='w-150px'><?php echo $lang->admin->safe->reason;?></th>
<th class='w-50px'><?php echo $lang->actions;?></th>
</thead>
<tbody class='text-center'>
<tbody>
<?php foreach($weakUsers as $user):?>
<tr>
<td class='text-right'><?php echo $user->id?></td>
@@ -38,7 +37,6 @@
<td class='text-left'><?php echo $user->account?></td>
<td><?php echo $user->phone?></td>
<td><?php echo $user->mobile?></td>
<td><?php echo $user->birthday?></td>
<td><?php echo $lang->admin->safe->reasonList[$user->weakReason];?></td>
<td class='c-actions'><?php common::printIcon('user', 'edit', "userID=$user->id", '', 'list');?></td>
</tr>
+3 -3
View File
@@ -19,7 +19,7 @@
</div>
<div id='mainContent' class='main-content'>
<div class='center-block mw-800px'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<table class='table table-form'>
<tr>
<th style='width:130px'><?php echo $lang->admin->safe->password?></th>
@@ -36,7 +36,7 @@
</tr>
<tr>
<th><?php echo $lang->admin->safe->weak?></th>
<td colspan='2'><?php echo html::textarea('weak', $config->safe->weak, "class='form-control' rows='4'")?></td>
<td colspan='2'><?php echo html::textarea('weak', $config->safe->weak, "class='form-control' style='height:100px'")?></td>
</tr>
<tr>
<th><?php echo $lang->admin->safe->changeWeak?></th>
@@ -47,7 +47,7 @@
<td colspan='2'><?php echo html::radio('modifyPasswordFirstLogin', $lang->admin->safe->modifyPasswordList, isset($config->safe->modifyPasswordFirstLogin) ? $config->safe->modifyPasswordFirstLogin : 0)?></td>
</tr>
<tr>
<td colspan='3' class='text-center'>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
</td>
+1 -1
View File
@@ -41,7 +41,7 @@
<td><?php echo html::input('key', $key, "class='form-control' autocomplete='off'");?></td>
</tr>
<tr>
<td colspan='2' class='text-center'>
<td colspan='2' class='text-center form-actions'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
</td>
+65 -65
View File
@@ -12,8 +12,8 @@
class block extends control
{
/**
* construct.
*
* construct.
*
* @access public
* @return void
*/
@@ -26,10 +26,10 @@ class block extends control
}
/**
* Block admin.
*
* @param int $id
* @param string $module
* Block admin.
*
* @param int $id
* @param string $module
* @access public
* @return void
*/
@@ -78,13 +78,13 @@ class block extends control
$this->display();
}
/**
* Set params when type is rss or html.
*
* @param int $id
* @param string $type
* @access public
* @return void
/**
* Set params when type is rss or html.
*
* @param int $id
* @param string $type
* @access public
* @return void
*/
public function set($id, $type, $source = '')
{
@@ -92,7 +92,7 @@ class block extends control
{
$source = isset($this->lang->block->moduleList[$source]) ? $source : '';
$this->block->save($id, $source, $type, $this->session->blockModule);
if(dao::isError()) die(js::error(dao::geterror()));
if(dao::isError()) die(js::error(dao::geterror()));
die(js::reload('parent'));
}
@@ -115,26 +115,26 @@ class block extends control
$this->view->type = $type;
$this->view->id = $id;
$this->view->block = ($block) ? $block : array();
$this->display();
$this->display();
}
/**
* Delete block
*
* @param int $id
* @param string $sys
* @param string $type
* Delete block
*
* @param int $id
* @param string $sys
* @param string $type
* @access public
* @return void
*/
public function delete($id, $module = 'my', $type = 'delete')
{
{
if($type == 'hidden')
{
{
$this->dao->update(TABLE_BLOCK)->set('hidden')->eq(1)->where('`id`')->eq($id)->andWhere('account')->eq($this->app->user->account)->andWhere('module')->eq($module)->exec();
}
else
{
{
$this->dao->delete()->from(TABLE_BLOCK)->where('`id`')->eq($id)->andWhere('account')->eq($this->app->user->account)->andWhere('module')->eq($module)->exec();
}
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
@@ -144,10 +144,10 @@ class block extends control
/**
* Sort block.
*
* @param string $oldOrder
* @param string $newOrder
* @param string $module
*
* @param string $oldOrder
* @param string $newOrder
* @param string $module
* @access public
* @return void
*/
@@ -155,7 +155,7 @@ class block extends control
{
$orders = explode(',', $orders);
$blockList = $this->block->getBlockList($module);
foreach ($orders as $order => $blockID)
{
$block = $blockList[$blockID];
@@ -199,8 +199,8 @@ class block extends control
/**
* Display dashboard for app.
*
* @param string $module
*
* @param string $module
* @access public
* @return void
*/
@@ -272,7 +272,7 @@ class block extends control
/**
* latest dynamic.
*
*
* @access public
* @return void
*/
@@ -285,7 +285,7 @@ class block extends control
/**
* Welcome block.
*
*
* @access public
* @return void
*/
@@ -317,9 +317,9 @@ class block extends control
}
/**
* Print block.
*
* @param int $id
* Print block.
*
* @param int $id
* @access public
* @return void
*/
@@ -361,13 +361,13 @@ class block extends control
{
$html = $this->fetch('block', 'welcome');
}
echo $html;
}
/**
* Main function.
*
*
* @access public
* @return void
*/
@@ -383,7 +383,7 @@ class block extends control
$mode = strtolower($this->get->mode);
if($mode == 'getblocklist')
{
{
$blocks = $this->block->getAvailableBlocks($module);
if(!$this->selfCall)
{
@@ -401,13 +401,13 @@ class block extends control
echo '<div class="col-sm-7">';
echo html::select('moduleBlock', $blockPairs, ($block and $block->source != '') ? $block->block : '', "class='form-control chosen'");
echo '</div></div>';
}
}
elseif($mode == 'getblockform')
{
{
$code = strtolower($this->get->blockid);
$func = 'get' . ucfirst($code) . 'Params';
echo $this->block->$func($module);
}
}
elseif($mode == 'getblockdata')
{
$code = strtolower($this->get->blockid);
@@ -417,7 +417,7 @@ class block extends control
if(!$this->selfCall)
{
$this->app->user = $this->dao->select('*')->from(TABLE_USER)->where('ranzhi')->eq($params->account)->fetch();
if(empty($this->app->user))
if(empty($this->app->user))
{
$this->app->user = new stdclass();
$this->app->user->account = 'guest';
@@ -475,7 +475,7 @@ class block extends control
/**
* Print List block.
*
*
* @access public
* @return void
*/
@@ -489,7 +489,7 @@ class block extends control
/**
* Print todo block.
*
*
* @access public
* @return void
*/
@@ -504,7 +504,7 @@ class block extends control
/**
* Print task block.
*
*
* @access public
* @return void
*/
@@ -518,7 +518,7 @@ class block extends control
/**
* Print bug block.
*
*
* @access public
* @return void
*/
@@ -531,7 +531,7 @@ class block extends control
/**
* Print case block.
*
*
* @access public
* @return void
*/
@@ -569,7 +569,7 @@ class block extends control
/**
* Print testtask block.
*
*
* @access public
* @return void
*/
@@ -595,7 +595,7 @@ class block extends control
/**
* Print story block.
*
*
* @access public
* @return void
*/
@@ -613,7 +613,7 @@ class block extends control
/**
* Print plan block.
*
*
* @access public
* @return void
*/
@@ -674,7 +674,7 @@ class block extends control
/**
* Print product block.
*
*
* @access public
* @return void
*/
@@ -701,8 +701,8 @@ class block extends control
/**
* Print statistic block.
*
* @param string $module
*
* @param string $module
* @access public
* @return void
*/
@@ -849,7 +849,7 @@ class block extends control
/**
* Print project statistic block.
*
*
* @access public
* @return void
*/
@@ -1013,7 +1013,7 @@ class block extends control
foreach($build->bugs as $bugID) $bugIDList[$bugID] = $bugID;
}
}
foreach($openedBugs as $buildBugs)
foreach($openedBugs as $buildBugs)
{
foreach($buildBugs as $bugID => $bug) $bugIDList[$bugID] = $bugID;
}
@@ -1047,7 +1047,7 @@ class block extends control
foreach($build->bugs as $key => $bugID)
{
if(!isset($bugs[$bugID])) continue;
$bug = $bugs[$bugID];
if($bug->assignedTo = $this->app->user->account) $build->assignedToMe++;
@@ -1056,7 +1056,7 @@ class block extends control
{
$build->unclosed++;
if($bug->status != 'resoloved')
if($bug->status != 'resoloved')
{
$build->unresolved++;
@@ -1069,7 +1069,7 @@ class block extends control
if(isset($confirmedBugs[$bugID])) $yesterdayConfirmed++;
$build->total++;
}
}
$build->assignedRate = $build->total ? round($build->assignedToMe / $build->total * 100, 2) : 0;
$build->unresolvedRate = $build->total ? round($build->unresolved / $build->total * 100, 2) : 0;
@@ -1098,7 +1098,7 @@ class block extends control
/**
* Print product overview block.
*
*
* @access public
* @return void
*/
@@ -1123,7 +1123,7 @@ class block extends control
/**
* Print project overview block.
*
*
* @access public
* @return void
*/
@@ -1183,7 +1183,7 @@ class block extends control
/**
* Print project block.
*
*
* @access public
* @return void
*/
@@ -1199,7 +1199,7 @@ class block extends control
/**
* Print assign to me block.
*
*
* @access public
* @return void
*/
@@ -1277,9 +1277,9 @@ class block extends control
}
/**
* Close block forever.
*
* @param int $blockID
* Close block forever.
*
* @param int $blockID
* @access public
* @return void
*/
+2 -2
View File
@@ -1,4 +1,4 @@
.block-statistic .nav-stacked {overflow: auto; max-height: 220px;}
.nav > li > .btn {padding: 0 5px; line-height: 24px; margin: 3px; color: #3C4353;}
.dashboard .panel-body {max-height: 400px;overflow: auto;}
.dashboard .panel-body {max-height: 400px; overflow: auto;}
.dashboard .panel.table-scrolled .table-header-fixed {border-bottom: 1px solid #ddd; box-shadow: 0 1px 1px rgba(0,0,0,.05), 0 2px 4px 0 rgba(0,0,0,0.025);}
+17 -5
View File
@@ -69,10 +69,10 @@ function resizeBlock(event)
*/
function initTableHeader()
{
$('#dashboard .panel-block').each(function()
$('#dashboard .table-fixed-head').each(function()
{
var $panel = $(this);
var $table = $panel.find('.table:first');
var $table = $(this);
var $panel = $table.closest('.panel');
if(!$table.length || !$table.children('thead').length || ($panel.find('#assigntomeBlock').length && $panel.find('#assigntomeBlock > div').length > 1)) return;
var isFixed = $panel.find('.panel-body').height() < $table.outerHeight();
@@ -87,7 +87,7 @@ function initTableHeader()
var tableWidth = $table.width();
if(!$header.length)
{
$header = $('<div class="table-header-fixed" style="position: absolute; left: 0; top: 0; right: 0;"><table class="table table-fixed"></table></div>').css('right', $panel.width() - tableWidth).css('min-width', tableWidth);
$header = $('<div class="table-header-fixed" style="position: absolute; left: 0; top: 0; right: 0; padding: 10px 10px 0; background: #fff;"><table class="table table-fixed no-margin"></table></div>').css('right', $panel.width() - tableWidth - 20).css('min-width', tableWidth);
var $oldTableHead = $table.find('thead');
$oldTableHead.find('th').each(function(idx)
{
@@ -123,6 +123,16 @@ function initTableHeader()
$fixedTh.eq(idx).width($(this).width());
});
}
var timeoutCall = null;
$table.parent().off('scroll.initTableHeader').on('scroll.initTableHeader', function()
{
clearTimeout(timeoutCall);
var $tableContainer = $(this);
timeoutCall = setTimeout(function() {
$panel.toggleClass('table-scrolled', $tableContainer.scrollTop() > 0);
}, 200);
});
});
}
@@ -182,5 +192,7 @@ $(function()
// // $dashboard.find('ul.dashboard-actions').addClass('hide').children('li').addClass('right').appendTo($('#modulemenu > .nav'));
// $dashboard.find('[data-toggle=tooltip]').tooltip({container: 'body'});
// initTableHeader();
initTableHeader();
});
+1 -1
View File
@@ -88,7 +88,7 @@ $lang->block->default['project']['1']['block'] = 'statistic';
$lang->block->default['project']['1']['grid'] = 8;
$lang->block->default['project']['1']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['1']['params']['type'] = 'noclosed';
$lang->block->default['project']['1']['params']['type'] = 'undone';
$lang->block->default['project']['1']['params']['num'] = 5;
$lang->block->default['project']['2']['title'] = $lang->projectCommon . ' Overview';
+2 -2
View File
@@ -50,7 +50,7 @@ $lang->block->editBlock = '编辑区块';
$lang->block->ordersSaved = '排序已保存';
$lang->block->confirmRemoveBlock = '确定移除区块吗?';
$lang->block->closeForever = '永久关闭';
$lang->block->confirmClose = '确定永久关闭该区块吗?闭后所有人都将无法使用该区块,可以在后台自定义中打开';
$lang->block->confirmClose = '确定永久关闭该区块吗?关闭后所有人都将无法使用该区块,可以在后台自定义中打开。';
$lang->block->remove = '移除';
$lang->block->refresh = '刷新';
$lang->block->hidden = '隐藏';
@@ -88,7 +88,7 @@ $lang->block->default['project']['1']['block'] = 'statistic';
$lang->block->default['project']['1']['grid'] = 8;
$lang->block->default['project']['1']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['1']['params']['type'] = 'noclosed';
$lang->block->default['project']['1']['params']['type'] = 'undone';
$lang->block->default['project']['1']['params']['num'] = 5;
$lang->block->default['project']['2']['title'] = $lang->projectCommon . '总览';
+2 -2
View File
@@ -50,7 +50,7 @@ $lang->block->editBlock = '編輯區塊';
$lang->block->ordersSaved = '排序已保存';
$lang->block->confirmRemoveBlock = '確定移除區塊嗎?';
$lang->block->closeForever = '永久關閉';
$lang->block->confirmClose = '確定永久關閉該區塊嗎?閉後所有人都將無法使用該區塊,可以在後台自定義中打開';
$lang->block->confirmClose = '確定永久關閉該區塊嗎?關閉後所有人都將無法使用該區塊,可以在後台自定義中打開。';
$lang->block->remove = '移除';
$lang->block->refresh = '刷新';
$lang->block->hidden = '隱藏';
@@ -88,7 +88,7 @@ $lang->block->default['project']['1']['block'] = 'statistic';
$lang->block->default['project']['1']['grid'] = 8;
$lang->block->default['project']['1']['params']['orderBy'] = 'id_desc';
$lang->block->default['project']['1']['params']['type'] = 'noclosed';
$lang->block->default['project']['1']['params']['type'] = 'undone';
$lang->block->default['project']['1']['params']['num'] = 5;
$lang->block->default['project']['2']['title'] = $lang->projectCommon . '總覽';
+6 -4
View File
@@ -12,7 +12,7 @@
?>
<style>
.block-bugs .c-id {width: 55px;}
.block-bugs .c-level {width: 50px;text-align: center;}
.block-bugs .c-level {width: 60px;text-align: center;}
.block-bugs .c-pri {width: 35px;text-align: center;}
.block-bugs .c-deadline {width: 95px;}
.block-bugs .c-status {width: 80px;}
@@ -21,7 +21,7 @@
.block-bugs.block-sm .c-status {text-align: center;}
</style>
<div class='panel-body has-table'>
<table class='table table-borderless table-fixed-head table-hover block-bugs <?php if(!$longBlock) echo 'block-sm'?>'>
<table class='table table-borderless table-fixed-head table-hover tablesorter block-bugs <?php if(!$longBlock) echo 'block-sm'?>'>
<thead>
<tr>
<th class='c-id-xs'><?php echo $lang->idAB?></th>
@@ -40,11 +40,13 @@
$viewLink = $this->createLink('bug', 'view', "bugID={$bug->id}");
?>
<tr data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<td class='c-id-xs'><?php echo $bug->id;?></td>
<td class='c-id-xs'><?php echo sprintf('%03d', $bug->id);?></td>
<?php if($longBlock):?>
<td class='c-pri'><span class='label-pri label-pri-<?php echo $bug->pri?>' title='<?php echo zget($lang->bug->priList, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri)?></span></td>
<?php endif;?>
<td class='c-severity'><span class='label-severity' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo zget($lang->bug->severityList, $bug->severity);?>'></span></td>
<td class='c-severity'>
<span class='label-severity' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo $bug->severity;?>'></span>
</td>
<td class='c-name' style='color: <?php echo $bug->color?>' title='<?php echo $bug->title?>'><?php echo $bug->title?></td>
<td class='c-status' title='<?php echo zget($lang->bug->statusList, $bug->status)?>'>
<span class="status-<?php echo $bug->status?>">
+2 -2
View File
@@ -11,7 +11,7 @@
*/
?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head block-builds'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-builds'>
<thead>
<tr>
<th class='w-id text-center'><?php echo $lang->idAB?></th>
@@ -29,7 +29,7 @@
$viewLink = $this->createLink('build', 'view', "buildID={$build->id}");
?>
<tr data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<td class='text-center'><?php echo $build->id;?></td>
<td class='text-center'><?php echo sprintf('%03d', $build->id);?></td>
<?php if($longBlock):?>
<td title='<?php echo $build->productName?>'><?php echo $build->productName?></td>
<?php endif;?>
+2 -2
View File
@@ -21,7 +21,7 @@
.case-status-investigate {color: #a6aab8;}
.case-status-investigate > .label-dot {background-color: #006af1;}
</style>
<table class='table table-borderless table-hover table-fixed-head block-cases <?php if(!$longBlock) echo 'block-sm';?>'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-cases <?php if(!$longBlock) echo 'block-sm';?>'>
<thead>
<tr class='text-center'>
<?php if($longBlock):?>
@@ -44,7 +44,7 @@
?>
<tr class='text-center' data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<?php if($longBlock):?>
<td class='c-id-xs'><?php echo $case->id;?></td>
<td class='c-id-xs'><?php echo sprintf('%03d', $case->id);?></td>
<?php endif;?>
<td class='c-pri'><span class='label-pri label-pri-<?php echo $case->pri?>' title='<?php echo zget($lang->case->priList, $case->pri, $case->pri);?>'><?php echo zget($lang->case->priList, $case->pri, $case->pri)?></span></td>
<td class='c-title text-left' style='color: <?php echo $case->color?>' title='<?php echo $case->title?>'><?php echo $case->title?></td>
+1 -1
View File
@@ -18,7 +18,7 @@ $useGuest = $this->app->user->account == 'guest';
?>
<?php include '../../common/view/tablesorter.html.php';?>
<div class='dashboard' id='dashboard' data-confirm-remove-block='<?php echo $lang->block->confirmRemoveBlock;?>'>
<div>
<div class="row">
<div class='col-md-8 col-main'>
<?php foreach($longBlocks as $index => $block):?>
<?php if(isset($config->block->closed) and strpos(",{$config->block->closed},", ",{$block->source}|{$block->block},") !== false) continue;?>
+1 -1
View File
@@ -11,7 +11,7 @@
*/
?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head block-plan'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-plan'>
<thead>
<tr>
<?php if($longBlock):?>
@@ -11,13 +11,22 @@
*/
?>
<div id='assigntomeBlock'>
<?php foreach($hasViewPriv as $type => $bool):?>
<div id="<?php echo $type?>">
<?php include "{$type}block.html.php";?>
<ul class="nav nav-secondary">
<?php foreach($hasViewPriv as $type => $bool):?>
<li<?php if($type === 'todo') echo ' class="active"';?>><a data-tab href='#assigntomeTab-<?php echo $type;?>'><?php echo $lang->block->availableBlocks->$type;?></a></li>
<?php endforeach;?>
</ul>
<div class="tab-content">
<?php foreach($hasViewPriv as $type => $bool):?>
<div class="tab-pane<?php if($type === 'todo') echo ' active';?>" id="assigntomeTab-<?php echo $type?>">
<?php include "{$type}block.html.php";?>
</div>
<?php endforeach;?>
</div>
<?php endforeach;?>
</div>
<style>
#assigntomeBlock #todo,
#assigntomeBlock #task {border-bottom: 1px solid #eee;}
#assigntomeBlock {position: relative;}
#assigntomeBlock .block-todoes {padding-top: 10px}
#assigntomeBlock > .nav {position: absolute; top: -41px; left: 120px;}
#assigntomeBlock .block-todoes .todoes-form{top: -55px;}
</style>
+4 -8
View File
@@ -11,24 +11,20 @@
*/
?>
<style>
.block-products .c-plans {width: 70px;color: #8e939a;text-align: center;}
.block-products .c-publishs {width: 70px;color: #8e939a;text-align: center;}
.block-products .c-stories {width: 80px;color: #8e939a;text-align: center;}
.block-products .c-bugs {width: 90px;color: #8e939a;text-align: center;}
.block-products.block-sm .c-project {display: none;}
</style>
<div class="panel-body has-table block-products">
<table class='table table-borderless table-hover table-fixed-head table-fixed'>
<table class='table table-borderless table-hover table-fixed-head tablesorter table-fixed'>
<thead>
<tr>
<th class='c-name'><?php echo $lang->product->name;?></th>
<?php if($longBlock):?>
<th class='c-name'><?php echo $lang->product->currentProject;?></th>
<th class='c-name .c-project'><?php echo $lang->product->currentProject;?></th>
<?php endif;?>
<th class='c-num'><?php echo $lang->product->plans;?></th>
<th class='c-num'><?php echo $lang->product->releases;?></th>
<th class='c-num'><?php echo $lang->story->statusList['active'] . $lang->story->common;?></th>
<th class='c-num'><?php echo $lang->bug->unResolved . $lang->bug->common;?></th>
<th class='c-num w-90px'><?php echo $lang->bug->unResolved . $lang->bug->common;?></th>
</tr>
</thead>
<tbody>
@@ -40,7 +36,7 @@
<tr class='text-center' data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<td class='c-name text-left' title='<?php echo $product->name?>'><?php echo $product->name?></td>
<?php if($longBlock):?>
<td class='c-name text-left'><?php echo zget($projects, $product->id, '');?></td>
<td class='c-name .c-project text-left'><?php echo zget($projects, $product->id, '');?></td>
<?php endif;?>
<td class="c-num"><?php echo $product->plans?></td>
<td class="c-num"><?php echo $product->releases?></td>
@@ -41,6 +41,11 @@
</style>
<div class="panel-body">
<div class="table-row">
<?php if(empty($products)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->product->noProduct;?></span> <?php common::printLink('product', 'create', '', "<i class='icon icon-plus'></i> " . $lang->product->create, '', "class='btn btn-info'");?></p>
</div>
<?php else:?>
<div class="col tab-content">
<?php foreach($products as $product):?>
<div class="tab-pane fade <?php if($product == reset($products)) echo 'active';?> in" id="tab<?php echo $product->code;?>">
@@ -160,5 +165,6 @@
<?php endforeach;?>
</ul>
</div>
<?php endif;?>
</div>
</div>
+1 -1
View File
@@ -11,7 +11,7 @@
*/
?>
<div class="panel-body has-table">
<table class='table table-borderless table-hover table-fixed-head block-projects'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-projects tablesorter'>
<thead>
<tr class='text-center'>
<th class='c-name text-left'><?php echo $lang->project->name;?></th>
@@ -29,6 +29,11 @@
</style>
<div class="panel-body">
<div class="table-row">
<?php if(empty($projects)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->project->noProject;?></span> <?php common::printLink('project', 'create', '', "<i class='icon icon-plus'></i> " . $lang->project->create, '', "class='btn btn-info'");?></p>
</div>
<?php else:?>
<div class="col tab-content">
<?php foreach($projects as $project):?>
<div class="tab-pane fade<?php if($project == reset($projects)) echo ' active in';?>" id="tab3Content<?php echo $project->id;?>">
@@ -115,5 +120,6 @@
<?php endforeach;?>
</ul>
</div>
<?php endif;?>
</div>
</div>
+1 -1
View File
@@ -17,6 +17,6 @@
<div class='form-group'>
<label for='grid' class='col-sm-3'><?php echo $lang->block->grid;?></label>
<div class='col-sm-7'>
<?php echo html::select('grid', $lang->block->gridOptions, $block ? $block->grid : 8, "class='form-control chosen chosen-simple'")?>
<?php echo html::select('grid', $lang->block->gridOptions, $block ? $block->grid : 8, "class='form-control chosen'")?>
</div>
</div>
+11 -10
View File
@@ -29,6 +29,7 @@
.block-statistic .nav-stacked {overflow: auto; max-height: 247px;}
.block-statistic .progress-pie .progress-info > strong {font-size: 24px;}
.block-statistic .chosen-single {font-size: 16px; font-weight: bold;}
.block-statistic .chosen-container-single .chosen-single div b {top: -2px}
</style>
<div class="panel-body">
<div class="table-row">
@@ -44,7 +45,7 @@
<?php endforeach;?>
</select>
<div class="input-group-cell">
<span class="text-muted small">开发已提交测试申请,<a href="<?php echo $this->createLink('testtask', 'browse', "productID={$product->id}");?>" class="text-primary">现在去测试 <i class="icon icon-right-circle icon-sm"></i></a></span>
<span class="text-muted small"><?php echo $lang->bug->hasSubmittedTest;?><a href="<?php echo $this->createLink('testtask', 'browse', "productID={$product->id}");?>" class="text-primary"><?php echo $lang->bug->nowToTest;?> <i class="icon icon-right-circle icon-sm"></i></a></span>
</div>
<?php endif;?>
</div>
@@ -54,25 +55,25 @@
<div class="progress-pie inline-block space progress-pie-100" data-value="<?php echo $build->assignedRate;?>" data-doughnut-size="80">
<canvas width="100" height="100" style="width: 100px; height: 100px;"></canvas>
<div class="progress-info">
<small>全部Bug</small>
<small><?php echo $lang->bug->allBugs . ' Bug';?></small>
<strong><span class="progress-value"><?php echo $build->total;?></span></strong>
</div>
</div>
<div class="text-center small with-padding">
<span class="label label-dot label-primary"></span> &nbsp; 指派给我 &nbsp; <strong><?php echo $build->assignedToMe;?></strong>
<span class="label label-dot label-primary"></span> &nbsp; <?php echo $lang->bug->assignToMe;?> &nbsp; <strong><?php echo $build->assignedToMe;?></strong>
</div>
</div>
<div class="col-7">
<div class="product-info">
<?php if($build->yesterdayResolved):?>
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted">昨日解决</span> <strong><?php echo $build->yesterdayResolved;?></strong></div>
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted"><?php echo $lang->bug->yesterdayResolved;?></span> <strong><?php echo $build->yesterdayResolved;?></strong></div>
<?php endif;?>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $build->unresovedRate;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $build->unresovedRate;?>%"></div>
</div>
<div class="type-info">
<div class="type-label">
<span>未解决</span>
<span><?php echo $lang->bug->unResolved;?></span>
</div>
<div class="type-value">
<strong><?php echo $build->unresolved;?></strong>
@@ -81,14 +82,14 @@
</div>
<div class="product-info">
<?php if($build->yesterdayConfirmed):?>
<div class="progress-info"><i class="icon icon-exclamation-sign text-danger icon-sm"></i> <span class="text-muted">昨日确认</span> <strong><?php echo $build->yesterdayConfirmed;?></strong></div>
<div class="progress-info"><i class="icon icon-exclamation-sign text-danger icon-sm"></i> <span class="text-muted"><?php echo $lang->bug->yesterdayConfirmed;?></span> <strong><?php echo $build->yesterdayConfirmed;?></strong></div>
<?php endif;?>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $build->unconfirmedRate;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $build->unconfirmedRate;?>%"></div>
</div>
<div class="type-info">
<div class="type-label">
<span>未确认</span>
<span><?php echo $lang->bug->unconfirmed;?></span>
</div>
<div class="type-value">
<strong><?php echo $build->unconfirmed;?></strong>
@@ -97,14 +98,14 @@
</div>
<div class="product-info">
<?php if($build->yesterdayClosed):?>
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted">昨日关闭</span> <strong><?php echo $build->yesterdayClosed;?></strong></div>
<div class="progress-info"><i class="icon icon-check-circle text-success icon-sm"></i> <span class="text-muted"><?php echo $lang->bug->yesterdayClosed;?></span> <strong><?php echo $build->yesterdayClosed;?></strong></div>
<?php endif;?>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="<?php echo $build->unclosedRate;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $build->unclosedRate;?>%"></div>
</div>
<div class="type-info">
<div class="type-label">
<span>未关闭</span>
<span><?php echo $lang->bug->unclosed;?></span>
</div>
<div class="type-value">
<strong><?php echo $build->unclosed;?></strong>
@@ -122,7 +123,7 @@
<ul class="nav nav-stacked nav-secondary">
<?php $index = 1;?>
<?php foreach($products as $product):?>
<li class="<?php if($index == 1) echo 'active';?>"><a href="###" data-target="#tabContent<?php echo $product->id;?>" data-toggle="tab"><?php echo $product->name;?></a></li>
<li class="<?php if($index == 1) echo 'active';?>"><a data-target="#tabContent<?php echo $product->id;?>" data-toggle="tab"><?php echo $product->name;?></a></li>
<?php $index++;?>
<?php endforeach;?>
</ul>
+2 -2
View File
@@ -11,7 +11,7 @@
*/
?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed block-release'>
<table class='table table-borderless table-hover table-fixed tablesorter block-release'>
<thead>
<tr>
<?php if($longBlock):?>
@@ -34,7 +34,7 @@
?>
<tr data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<?php if($longBlock):?>
<td class='text-center'><?php echo $release->id;?></td>
<td class='text-center'><?php echo sprintf('%03d', $release->id);?></td>
<td title='<?php echo $release->productName?>'><?php echo $release->productName?></td>
<?php endif;?>
<td title='<?php echo $release->name?>'><?php echo $release->name?></td>
+2 -2
View File
@@ -22,7 +22,7 @@
.block-stories.block-sm .c-status {text-align: center;}
</style>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head block-stories <?php if(!$longBlock) echo 'block-sm'?>'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-stories <?php if(!$longBlock) echo 'block-sm'?>'>
<thead>
<tr>
<?php if($longBlock):?>
@@ -47,7 +47,7 @@
?>
<tr data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<?php if($longBlock):?>
<td class="c-id-xs"><?php echo $story->id;?></td>
<td class="c-id-xs"><?php echo sprintf('%03d', $story->id);?></td>
<?php endif;?>
<td class="c-pri"><span class="label-pri label-pri-<?php echo $story->pri?>" title="<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>"><?php echo zget($lang->story->priList, $story->pri, $story->pri)?></span></td>
<td class="c-name" style='color: <?php echo $story->color?>' title='<?php echo $story->title?>'><?php echo $story->title?></td>
+3 -3
View File
@@ -13,7 +13,7 @@
<style>
.block-tasks .c-id {width: 55px;}
.block-tasks .c-pri {width: 45px;text-align: center;}
.block-tasks .c-estimate {width: 55px;}
.block-tasks .c-estimate {width: 60px;}
.block-tasks .c-deadline {width: 95px;}
.block-tasks .c-status {width: 80px;}
.block-tasks.block-sm .estimate,
@@ -22,7 +22,7 @@
.block-tasks.block-sm .c-status {text-align: center;}
</style>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head block-tasks <?php if(!$longBlock) echo 'block-sm';?>'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-tasks <?php if(!$longBlock) echo 'block-sm';?>'>
<thead>
<tr>
<th class='c-id-xs'><?php echo $lang->idAB;?></th>
@@ -42,7 +42,7 @@
$viewLink = $this->createLink('task', 'view', "taskID={$task->id}");
?>
<tr data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<td class='c-id-xs'><?php echo $task->id;?></td>
<td class='c-id-xs'><?php echo sprintf('%03d', $task->id);?></td>
<td class='c-pri'><span class='label-pri label-pri-<?php echo $task->pri;?>' title='<?php echo zget($lang->task->priList, $task->pri, $task->pri)?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri)?></span></td>
<td class='c-name' style='color: <?php echo $task->color?>' title='<?php echo $task->name?>'><?php echo $task->name?></td>
<?php if($longBlock):?>
+2 -2
View File
@@ -11,7 +11,7 @@
*/
?>
<div class='panel-body has-table'>
<table class='table table-borderless table-hover table-fixed-head block-testtask'>
<table class='table table-borderless table-hover table-fixed-head tablesorter block-testtask'>
<thead>
<tr class='text-center'>
<?php if($longBlock):?>
@@ -34,7 +34,7 @@
?>
<tr class='text-center' data-url='<?php echo empty($sso) ? $viewLink : $sso . $sign . 'referer=' . base64_encode($viewLink); ?>' <?php echo $appid?>>
<?php if($longBlock):?>
<td><?php echo $testtask->id;?></td>
<td><?php echo sprintf('%03d', $testtask->id);?></td>
<td class='text-left' title='<?php echo $testtask->productName?>'><?php echo $testtask->productName?></td>
<?php endif;?>
<td class='text-left' title='<?php echo $testtask->name?>'><?php echo $testtask->name?></td>
+4 -4
View File
@@ -11,13 +11,13 @@
*/
?>
<style>
.block-todoes .panel-body {position: relative; padding-top: 42px;}
.block-todoes .panel-body {position: relative; padding-top: 42px; overflow: visible;}
.block-todoes .todoes-input {position: absolute;top: 0;right: 0;left: 0;padding: 0 20px 20px 20px;}
.block-todoes .todoes-input .form-control::-webkit-input-placeholder {font-size: 12px;line-height: 20px;color: #a4a8b6;}
.block-todoes .todoes-input .form-control::-moz-placeholder {font-size: 12px;line-height: 20px;color: #a4a8b6;}
.block-todoes .todoes-input .form-control:-ms-input-placeholder {font-size: 12px;line-height: 20px;color: #a4a8b6;}
.block-todoes .todoes-input .form-control::placeholder {font-size: 12px;line-height: 20px;color: #a4a8b6;}
.block-todoes .todoes {padding-left: 0;margin: 0 -10px;}
.block-todoes .todoes {padding: 0 10px; margin: 0 -20px; max-height: 350px; overflow: auto;}
.block-todoes .todoes > li {position: relative;padding: 5px 10px 5px 35px;list-style: none;}
.block-todoes .todoes > li:hover {background-color: #e9f2fb;}
.block-todoes .todo-title {display: block;padding: 5px;}
@@ -59,13 +59,13 @@
<div class="form-group">
<label for="todoBegin" class="col-sm-2"><?php echo $lang->todo->beginAndEnd?></label>
<div class="col-sm-4">
<select name="begin" id="todoBegin" class="form-control chosen-simple">
<select name="begin" id="todoBegin" class="form-control">
<option value=""><?php echo $lang->todo->lblDisableDate;?></option>
</select>
</div>
<label class="col-sm-1 text-center hide-empty-begin" for="todoEnd"> ~ </label>
<div class="col-sm-4 hide-empty-begin">
<select name="end" id="todoEnd" class="form-control chosen-simple"></select>
<select name="end" id="todoEnd" class="form-control"></select>
</div>
</div>
<div class="form-group">
+1
View File
@@ -1598,6 +1598,7 @@ class bug extends control
$mailto = trim($mailto);
if(isset($users[$mailto])) $bug->mailto .= $users[$mailto] . ',';
}
$bug->mailto = rtrim($bug->mailto, ',');
unset($bug->caseVersion);
unset($bug->result);
File diff suppressed because one or more lines are too long
+2
View File
@@ -1 +1,3 @@
.chosen-container[id^="plan"] .chosen-drop {min-width: 300px; border-top: 1px solid #ddd!important}
.duplicate-input {border-left-width: 0; border-radius: 0 2px 2px 0; padding-left: 9px}
.duplicate-input:focus {border-left-width: 1px; padding-left: 8px}
-4
View File
@@ -27,13 +27,9 @@
#contactListGroup .input-group-btn > .btn {margin-left: -1px!important;}
#contactListGroup .chosen-container-single a {border-left-width: 0px;}
.chosen-container {max-width: 580px;}
.minw-80px {min-width: 80px;}
.colorpicker.input-group-btn > .btn {border-right: none}
#branch {border-left-width: 0;}
.input-group-addon.w-90px{min-width:90px;}
.input-group .input-group-btn .btn{padding: 6px 12px;}
+1 -7
View File
@@ -1,7 +1,6 @@
$(function()
{
if(browseType == 'bysearch') ajaxGetSearchForm();
if($('#bugList thead th.w-title').width() < 150) $('#bugList thead th.w-title').width(150);
if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150);
if(flow == 'onlyTest')
{
@@ -38,8 +37,3 @@ $(function()
})
}
});
function setQueryBar(queryID, title)
{
$('#bysearchTab').before("<li id='QUERY" + queryID + "Tab' class='active'><a href='" + createLink('bug', 'browse', "productID=" + productID + "&branch=" + branch + "&browseType=bysearch&param=" + queryID) + "'>" + title + "</a></li>");
}
+6 -14
View File
@@ -122,25 +122,17 @@ $(function()
var adjustBugTypeGroup = function()
{
var $group = $('#bugTypeInputGroup');
var width = $group.width(), addonWidth = 0;
var width = ($group.parent().width() - 10), addonWidth = 0;
var $controls = $group.find('.chosen-single');
$group.children('.input-group-addon').each(function()
{
addonWidth += $(this).outerWidth();
});
$controls.css('width', Math.floor((width - addonWidth)/$controls.length));
var bestWidth = Math.floor((width - addonWidth)/$controls.length);
$controls.css('width', bestWidth);
var lastWidth = width - addonWidth - bestWidth * ($controls.length - 1);
$controls.last().css('width', lastWidth);
};
adjustBugTypeGroup();
// adjust style for file box
var ajustFilebox = function()
{
applyCssStyle('.fileBox > tbody > tr > td:first-child {transition: none; width: ' + ($('#contactListGroup').width() - 2) + 'px}', 'filebox')
};
ajustFilebox();
$(window).resize(function()
{
ajustFilebox();
adjustBugTypeGroup();
});
$(window).on('resize', adjustBugTypeGroup);
});
+28 -24
View File
@@ -103,24 +103,26 @@ $lang->bug->copy = 'Copy';
$lang->bug->search = 'Search';
/* 查询条件列表。*/
$lang->bug->assignToMe = 'AssignedToMe';
$lang->bug->openedByMe = 'CreatedByMe';
$lang->bug->resolvedByMe = 'ResolvedByMe';
$lang->bug->closedByMe = 'ClosedByMe';
$lang->bug->assignToNull = 'Unassigned';
$lang->bug->unResolved = 'Unresolved';
$lang->bug->toClosed = 'ToBeClosed';
$lang->bug->unclosed = 'Active';
$lang->bug->unconfirmed = 'UnConfirmed';
$lang->bug->longLifeBugs = 'Pending';
$lang->bug->postponedBugs = 'Postponed';
$lang->bug->overdueBugs = 'Overdue';
$lang->bug->allBugs = 'All';
$lang->bug->byQuery = 'Search';
$lang->bug->needConfirm = 'StoryChanged';
$lang->bug->allProduct = 'All' . $lang->productCommon;
$lang->bug->my = 'My';
$lang->bug->yesterdayResolved = 'Resolved Yesterday ';
$lang->bug->assignToMe = 'AssignedToMe';
$lang->bug->openedByMe = 'CreatedByMe';
$lang->bug->resolvedByMe = 'ResolvedByMe';
$lang->bug->closedByMe = 'ClosedByMe';
$lang->bug->assignToNull = 'Unassigned';
$lang->bug->unResolved = 'Unresolved';
$lang->bug->toClosed = 'ToBeClosed';
$lang->bug->unclosed = 'Active';
$lang->bug->unconfirmed = 'UnConfirmed';
$lang->bug->longLifeBugs = 'Pending';
$lang->bug->postponedBugs = 'Postponed';
$lang->bug->overdueBugs = 'Overdue';
$lang->bug->allBugs = 'All';
$lang->bug->byQuery = 'Search';
$lang->bug->needConfirm = 'StoryChanged';
$lang->bug->allProduct = 'All' . $lang->productCommon;
$lang->bug->my = 'My';
$lang->bug->yesterdayResolved = 'Resolved Yesterday ';
$lang->bug->yesterdayConfirmed = 'Confirmed Yesterday ';
$lang->bug->yesterdayClosed = 'Closed Yesterday ';
$lang->bug->assignToMeAB = 'Assigned To Me';
$lang->bug->openedByMeAB = 'Created By Me';
@@ -165,6 +167,8 @@ $lang->bug->remindTask = 'This Bug has been converted to Task. Do you
$lang->bug->skipClose = 'Bug %s is not resolved. You cannot close it.';
$lang->bug->applyTemplate = 'Template';
$lang->bug->confirmDeleteTemplate = 'Do you want to delete this template?';
$lang->bug->hasSubmittedTest = 'Development has submitted test application,';
$lang->bug->nowToTest = 'Now to test';
/* 模板。*/
$lang->bug->tplStep = "<p>[Steps]</p>\n";
@@ -334,18 +338,18 @@ $lang->bug->report->bugsPerProject->graph->xAxisName = $lang->projectCommon;
$lang->bug->report->bugsPerBuild->graph->xAxisName = 'Build';
$lang->bug->report->bugsPerModule->graph->xAxisName = 'Module';
$lang->bug->report->openedBugsPerDay->type = 'bar';
$lang->bug->report->openedBugsPerDay->type = 'bar';
$lang->bug->report->openedBugsPerDay->graph->xAxisName = 'Date';
$lang->bug->report->resolvedBugsPerDay->type = 'bar';
$lang->bug->report->resolvedBugsPerDay->type = 'bar';
$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = 'Date';
$lang->bug->report->closedBugsPerDay->type = 'bar';
$lang->bug->report->closedBugsPerDay->type = 'bar';
$lang->bug->report->closedBugsPerDay->graph->xAxisName = 'Date';
$lang->bug->report->openedBugsPerUser->graph->xAxisName = 'User';
$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= 'User';
$lang->bug->report->closedBugsPerUser->graph->xAxisName = 'User';
$lang->bug->report->openedBugsPerUser->graph->xAxisName = 'User';
$lang->bug->report->resolvedBugsPerUser->graph->xAxisName = 'User';
$lang->bug->report->closedBugsPerUser->graph->xAxisName = 'User';
$lang->bug->report->bugsPerSeverity->graph->xAxisName = 'Priority';
$lang->bug->report->bugsPerResolution->graph->xAxisName = 'Solution';
+29 -25
View File
@@ -103,24 +103,26 @@ $lang->bug->copy = '复制Bug';
$lang->bug->search = '搜索';
/* 查询条件列表。*/
$lang->bug->assignToMe = '指派给我';
$lang->bug->openedByMe = '由我创建';
$lang->bug->resolvedByMe = '由我解决';
$lang->bug->closedByMe = '由我关闭';
$lang->bug->assignToNull = '未指派';
$lang->bug->unResolved = '未解决';
$lang->bug->toClosed = '待关闭';
$lang->bug->unclosed = '未关闭';
$lang->bug->unconfirmed = '未确认';
$lang->bug->longLifeBugs = '久未处理';
$lang->bug->postponedBugs = '被延期';
$lang->bug->overdueBugs = '过期Bug';
$lang->bug->allBugs = '所有';
$lang->bug->byQuery = '搜索';
$lang->bug->needConfirm = '需求变动';
$lang->bug->allProduct = '所有' . $lang->productCommon;
$lang->bug->my = '我的';
$lang->bug->yesterdayResolved = '昨天解决';
$lang->bug->assignToMe = '指派给我';
$lang->bug->openedByMe = '由我创建';
$lang->bug->resolvedByMe = '由我解决';
$lang->bug->closedByMe = '由我关闭';
$lang->bug->assignToNull = '未指派';
$lang->bug->unResolved = '未解决';
$lang->bug->toClosed = '待关闭';
$lang->bug->unclosed = '未关闭';
$lang->bug->unconfirmed = '未确认';
$lang->bug->longLifeBugs = '久未处理';
$lang->bug->postponedBugs = '被延期';
$lang->bug->overdueBugs = '过期Bug';
$lang->bug->allBugs = '所有';
$lang->bug->byQuery = '搜索';
$lang->bug->needConfirm = '需求变动';
$lang->bug->allProduct = '所有' . $lang->productCommon;
$lang->bug->my = '我的';
$lang->bug->yesterdayResolved = '昨天解决';
$lang->bug->yesterdayConfirmed = '昨天确认';
$lang->bug->yesterdayClosed = '昨天关闭';
$lang->bug->assignToMeAB = '指派给我';
$lang->bug->openedByMeAB = '由我创建';
@@ -129,7 +131,7 @@ $lang->bug->resolvedByMeAB = '由我解决';
$lang->bug->ditto = '同上';
$lang->bug->dittoNotice = '该bug与上一bug不属于同一产品!';
$lang->bug->noAssigned = '未指派';
$lang->bug->noBug = '暂时没有BUG,您现在可以';
$lang->bug->noBug = '暂时没有Bug,您现在可以';
$lang->bug->noModule = '<div>您现在还没有模块信息</div><div>请维护测试模块</div>';
/* 页面标签。*/
@@ -165,6 +167,8 @@ $lang->bug->remindTask = '该Bug已经转化为任务,是否更新
$lang->bug->skipClose = 'Bug %s 不是已解决状态,不能关闭。';
$lang->bug->applyTemplate = '应用模板';
$lang->bug->confirmDeleteTemplate = '您确认要删除该模板吗?';
$lang->bug->hasSubmittedTest = '开发已提交测试申请,';
$lang->bug->nowToTest = '现在去测试';
/* 模板。*/
$lang->bug->tplStep = "<p>[步骤]</p>";
@@ -334,18 +338,18 @@ $lang->bug->report->bugsPerProject->graph->xAxisName = $lang->projectCommon;
$lang->bug->report->bugsPerBuild->graph->xAxisName = '版本';
$lang->bug->report->bugsPerModule->graph->xAxisName = '模块';
$lang->bug->report->openedBugsPerDay->type = 'bar';
$lang->bug->report->openedBugsPerDay->type = 'bar';
$lang->bug->report->openedBugsPerDay->graph->xAxisName = '日期';
$lang->bug->report->resolvedBugsPerDay->type = 'bar';
$lang->bug->report->resolvedBugsPerDay->type = 'bar';
$lang->bug->report->resolvedBugsPerDay->graph->xAxisName = '日期';
$lang->bug->report->closedBugsPerDay->type = 'bar';
$lang->bug->report->closedBugsPerDay->type = 'bar';
$lang->bug->report->closedBugsPerDay->graph->xAxisName = '日期';
$lang->bug->report->openedBugsPerUser->graph->xAxisName = '用户';
$lang->bug->report->resolvedBugsPerUser->graph->xAxisName= '用户';
$lang->bug->report->closedBugsPerUser->graph->xAxisName = '用户';
$lang->bug->report->openedBugsPerUser->graph->xAxisName = '用户';
$lang->bug->report->resolvedBugsPerUser->graph->xAxisName = '用户';
$lang->bug->report->closedBugsPerUser->graph->xAxisName = '用户';
$lang->bug->report->bugsPerSeverity->graph->xAxisName = '严重程度';
$lang->bug->report->bugsPerResolution->graph->xAxisName = '解决方案';
+1 -1
View File
@@ -2537,7 +2537,7 @@ class bugModel extends model
if($bug->assignedTo == $account) $btnTextClass = 'text-red';
$btnClass = $assignedToText == 'closed' ? ' disabled' : '';
echo html::a(helper::createLink('bug', 'assignTo', "bugID=$bug->id", '', true), "<i class='icon icon-hand-right'></i> <span class='{$btnTextClass}'>{$assignedToText}</span>", '', "class='iframe btn btn-icon-left{$btnClass}'");
echo html::a(helper::createLink('bug', 'assignTo', "bugID=$bug->id", '', true), "<i class='icon icon-hand-right'></i> <span class='{$btnTextClass}'>{$assignedToText}</span>", '', "class='iframe btn btn-sm btn-icon-left{$btnClass}'");
break;
case 'assignedDate':
echo substr($bug->assignedDate, 5, 11);
+1 -1
View File
@@ -43,7 +43,7 @@ js::set('page', 'assignedto');
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<td colspan='3' class='text-center'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::linkButton($lang->goback, $this->server->http_referer, 'self', '', 'btn btn-wide');?></td>
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::linkButton($lang->goback, $this->server->http_referer, 'self', '', 'btn btn-wide');?></td>
</tr>
</table>
</form>
+2 -2
View File
@@ -11,7 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='mainContent' class='main-content'>
<div id='mainContent' class='main-content fade'>
<div class='main-header'>
<h2>
<?php echo $lang->bug->batchCreate;?>
@@ -161,7 +161,7 @@
</tbody>
<tfoot>
<tr>
<td colspan='<?php echo count($visibleFields) + 3?>' class='text-center'>
<td colspan='<?php echo count($visibleFields) + 3?>' class='text-center form-actions'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
</td>
+11 -6
View File
@@ -13,7 +13,7 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('dittoNotice', $this->lang->bug->dittoNotice);?>
<div id='mainContent' class='main-content'>
<div id='mainContent' class='main-content fade'>
<div class='main-header'>
<h2><?php echo $lang->bug->common . $lang->colon . $lang->bug->batchEdit;?></h2>
<div class="pull-right btn-toolbar">
@@ -62,7 +62,7 @@
<th class='w-100px<?php echo zget($visibleFields, 'browser', ' hidden') . zget($requiredFields, 'browser', '', ' required');?>'><?php echo $lang->bug->browser;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'keywords', ' hidden') . zget($requiredFields, 'keywords', '', ' required');?>'><?php echo $lang->bug->keywords;?></th>
<th class='w-120px<?php echo zget($visibleFields, 'resolvedBy', ' hidden')?>'><?php echo $lang->bug->resolvedByAB;?></th>
<th class='w-120px<?php echo zget($visibleFields, 'resolution', ' hidden')?>'><?php echo $lang->bug->resolutionAB;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'resolution', ' hidden')?>'><?php echo $lang->bug->resolutionAB;?></th>
</tr>
</thead>
<tbody>
@@ -125,11 +125,11 @@
<td <?php echo zget($visibleFields, 'keywords', "class='hidden'")?>><?php echo html::input("keywords[$bugID]", $bug->keywords, 'class=form-control');?></td>
<td class='<?php echo zget($visibleFields, 'resolvedBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("resolvedBys[$bugID]", $users, $bug->resolvedBy, "class='form-control chosen'");?></td>
<td <?php echo zget($visibleFields, 'resolution', "class='hidden'")?>>
<table class='table-borderless w-100px'>
<table class='table-borderless table no-margin'>
<tr>
<td class='pd-0'><?php echo html::select("resolutions[$bugID]", $resolutionList, $bug->resolution, "class=form-control onchange=setDuplicate(this.value,$bugID)");?></td>
<td class='pd-0'><?php echo html::select("resolutions[$bugID]", $resolutionList, $bug->resolution, "class='form-control' onchange=setDuplicate(this.value,$bugID)");?></td>
<td class='pd-0 w-p50' id='<?php echo 'duplicateBugBox' . $bugID;?>' <?php if($bug->resolution != 'duplicate') echo "style='display:none'";?>>
<?php echo html::input("duplicateBugs[$bugID]", '', "class=form-control placeholder='{$lang->bug->duplicateBug}'");?>
<?php echo html::input("duplicateBugs[$bugID]", '', "class='form-control duplicate-input' placeholder='{$lang->bug->duplicateBug}'");?>
</td>
</tr>
</table>
@@ -138,7 +138,12 @@
<?php endforeach;?>
</tbody>
<tfoot>
<tr><td colspan='<?php echo $branchProduct ? $columns : ($columns - 1);?>' class='text-center'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?></td></tr>
<tr>
<td colspan='<?php echo $branchProduct ? $columns : ($columns - 1);?>' class='text-center form-actions'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
</td>
</tr>
</tfoot>
</table>
</form>
+44 -27
View File
@@ -35,11 +35,11 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<li id='bysearchTab'><a href='#'><i class='icon-search icon'></i>&nbsp;<?php echo $lang->bug->byQuery;?></a></li>
<li class='right'>
<div class='btn-group' id='createActionMenu'>
<?php
<?php
$misc = common::hasPriv('bug', 'create') ? "class='btn btn-primary'" : "class='btn btn-primary disabled'";
$link = common::hasPriv('bug', 'create') ? $this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID") : '#';
echo html::a($link, "<i class='icon icon-plus'></i>" . $lang->bug->create, '', $misc);
$misc = common::hasPriv('bug', 'batchCreate') ? '' : "disabled";
$link = common::hasPriv('bug', 'batchCreate') ? $this->createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID") : '#';
?>
@@ -60,7 +60,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<span class='caret'></span>
</a>
<ul class='dropdown-menu' id='exportActionMenu'>
<?php
<?php
$misc = common::hasPriv('bug', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('bug', 'export') ? $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy") : '#';
echo "<li>" . html::a($link, $lang->bug->export, '', $misc) . "</li>";
@@ -84,7 +84,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
</div>
</div>
<div class="btn-toolbar pull-left">
<?php
<?php
$menus = customModel::getFeatureMenu($this->moduleName, $this->methodName);
$moreLabel = $lang->more;
$moreLabelActive = '';
@@ -101,14 +101,13 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
}
foreach($menus as $menuItem)
{
if(isset($menuItem->hidden)) continue;
if(isset($menuItem->hidden) and $menuItem->name != 'QUERY') continue;
if($this->config->global->flow == 'onlyTest' and $menuItem->name == 'needconfirm') continue;
$menuBrowseType = strpos($menuItem->name, 'QUERY') === 0 ? 'bySearch' : $menuItem->name;
$barParam = strpos($menuItem->name, 'QUERY') === 0 ? (int)substr($menuItem->name, 5) : 0;
$label = "<span class='text'>{$menuItem->text}</span>";
$label .= $menuBrowseType == $browseType ? "<span class='label label-light label-badge'>{$pager->recTotal}</span>" : '';
$active = $menuBrowseType == $browseType ? 'btn-active-text' : '';
$label = "<span class='text'>{$menuItem->text}</span>";
$label .= $menuBrowseType == $browseType ? "<span class='label label-light label-badge'>{$pager->recTotal}</span>" : '';
$active = $menuBrowseType == $browseType ? 'btn-active-text' : '';
if($menuItem->name == 'my')
{
@@ -118,10 +117,35 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
foreach($lang->bug->mySelects as $key => $value)
{
echo '<li' . ($key == $currentBrowseType ? " class='active'" : '') . '>';
echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$key&param=$barParam"), $value);
echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$key"), $value);
}
echo '</ul></li>';
}
elseif($menuItem->name == 'QUERY')
{
if(isset($lang->custom->queryList))
{
echo '<div class="btn-group" id="query">';
$active = '';
$current = $menuItem->text;
$dropdownHtml = "<ul class='dropdown-menu'>";
foreach($lang->custom->queryList as $queryID => $queryTitle)
{
if($browseType == 'bysearch' and $queryID == $param)
{
$active = 'btn-active-text';
$current = "<span class='text'>{$queryTitle}</span> <span class='label label-light label-badge'>{$pager->recTotal}</span>";
}
$dropdownHtml .= '<li' . ($param == $queryID ? " class='active'" : '') . '>';
$dropdownHtml .= html::a($this->inlink('browse', "productID=$productID&branch=$branch&browseType=bySearch&param=$queryID"), $queryTitle);
}
$dropdownHtml .= '</ul>';
echo html::a('javascript:;', $current . " <span class='caret'></span>", '', "data-toggle='dropdown' class='btn btn-link $active'");
echo $dropdownHtml;
echo '</div>';
}
}
else
{
if(strpos(',unconfirmed,assigntonull,longlifebugs,postponedbugs,overduebugs,needconfirm,', $menuItem->name) !== false)
@@ -131,12 +155,12 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
echo "<div class='btn-group'><a href='javascript:;' data-toggle='dropdown' class='btn btn-link {$moreLabelActive}'>{$moreLabel} <span class='caret'></span></a>";
echo "<ul class='dropdown-menu'>";
}
echo '<li>' . html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType&param=$barParam"), "<span class='text'>{$menuItem->text}</span>", '', "class='btn btn-link $active'") . '</li>';
echo '<li>' . html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType"), "<span class='text'>{$menuItem->text}</span>", '', "class='btn btn-link $active'") . '</li>';
if($menuItem->name == 'needconfirm') echo '</ul></div>';
}
else
{
echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType&param=$barParam"), $label, '', "class='btn btn-link $active'");
echo html::a($this->createLink('bug', 'browse', "productid=$productID&branch=$branch&browseType=$menuBrowseType"), $label, '', "class='btn btn-link $active'");
}
}
}
@@ -151,15 +175,15 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
<i class="icon icon-export muted"></i> <span class="text"> <?php echo $lang->export;?></span> <span class="caret"></span></button>
</button>
<ul class='dropdown-menu' id='exportActionMenu'>
<?php
<?php
$link = $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy");
echo "<li>" . html::a($link, $lang->bug->export, '', "class='export'") . "</li>";
?>
</ul>
</div>
<?php endif;?>
<?php
common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate, '', "class='btn btn-secondary'");
<?php endif;?>
<?php
common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate, '', "class='btn btn-secondary'");
if(commonModel::isTutorialMode())
{
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
@@ -167,7 +191,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
}
else
{
common::printLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'");
common::printLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'");
}
?>
</div>
@@ -380,23 +404,16 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
</div>
<?php elseif(common::hasPriv('bug', 'create')):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->bug->noBug;?></span> <?php common::printLink('bug', 'create', "productID={$productID}", "<i class='icon icon-plus'> </i>" . $lang->bug->create, '', "class='btn btn-info'");?></p>
<p><span class="text-muted"><?php echo $lang->bug->noBug;?></span> <?php common::printLink('bug', 'create', "productID={$productID}", "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-info'");?></p>
</div>
<?php endif;?>
</form>
</div>
</div>
<script>
$('#' + bugBrowseType + 'Tab').addClass('active');
$('#module' + moduleID).addClass('active');
$('#module' + moduleID).closest('li').addClass('active');
<?php if($browseType == 'bysearch'):?>
$shortcut = $('#QUERY<?php echo (int)$param;?>Tab');
if($shortcut.size() > 0)
{
$shortcut.addClass('active');
$('#bysearchTab').removeClass('active');
$('#querybox').removeClass('show');
}
if($('#query li.active').size() == 0) ajaxGetSearchForm();
<?php endif;?>
<?php $this->app->loadConfig('qa', '', false);?>
<?php if(isset($config->qa->homepage) and $config->qa->homepage != 'browse' and $config->global->flow == 'full'):?>
+1 -1
View File
@@ -31,7 +31,7 @@
<td><?php echo html::textarea('comment', '', "rows='6' class='w-p98'");?></td>
</tr>
<tr>
<td colspan='2' class='text-center'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::linkButton($lang->goback, $this->session->bugList, 'self', '', 'btn btn-wide');?></td>
<td colspan='2' class='text-center form-actions'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::linkButton($lang->goback, $this->session->bugList, 'self', '', 'btn btn-wide');?></td>
</tr>
</table>
</form>
+6 -4
View File
@@ -32,17 +32,19 @@ js::set('page', 'confirmbug');
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->bug->assignedTo;?></th>
<td class='w-p25-f'><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='select-2 chosen'");?></td>
<td class='w-p25-f'><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='form-control chosen'");?></td>
<td></td>
</tr>
</tr>
<tr>
<th><?php echo $lang->bug->type;?></th>
<td><?php echo html::select('type', $lang->bug->typeList, $bug->type, "class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->bug->pri;?></th>
<td><?php echo html::select('pri', $lang->bug->priList, $bug->pri, "class='form-control chosen'");?></td>
</tr>
<td></td>
</tr>
<tr>
<th><?php echo $lang->bug->mailto;?></th>
<td colspan='2'><?php echo html::select('mailto[]', $users, str_replace(' ' , '', $bug->mailto), 'class="form-control chosen" multiple');?></td>
@@ -52,7 +54,7 @@ js::set('page', 'confirmbug');
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='w-p94'");?></td>
</tr>
<tr>
<td class='text-center' colspan='3'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::linkButton($lang->goback, $this->server->http_referer, 'self', '', 'btn btn-wide');?></td>
<td class='text-center form-actions' colspan='3'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::linkButton($lang->goback, $this->server->http_referer, 'self', '', 'btn btn-wide');?></td>
</tr>
</table>
</form>
+1 -2
View File
@@ -39,7 +39,6 @@ js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
<div class='input-group'>
<?php echo html::select('product', $products, $productID, "onchange='loadAll(this.value);' class='form-control chosen control-product' autocomplete='off'");?>
<?php if($this->session->currentProductType != 'normal'):?>
<span class='input-group-addon'></span>
<?php echo html::select('branch', $branches, $branch, "onchange='loadBranch()' class='form-control chosen control-branch'");?>
<?php endif;?>
</div>
@@ -67,7 +66,7 @@ js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
<?php if($showProject):?>
<tr>
<th><?php echo $lang->bug->project;?></th>
<td><span id='projectIdBox'><?php echo html::select('project', $projects, $projectID, "class='form-control chosen' onchange='loadProjectRelated(this.value)' autocomplete='off'");?></span></td>
<td><div id='projectIdBox'><?php echo html::select('project', $projects, $projectID, "class='form-control chosen' onchange='loadProjectRelated(this.value)' autocomplete='off'");?></div></td>
</tr>
<?php endif;?>
<tr>
+2 -4
View File
@@ -70,7 +70,7 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
<div class='detail-content'><?php echo $this->fetch('file', 'buildform');?></div>
</div>
<div class='actions actions-form text-center'>
<div class='actions form-actions text-center'>
<?php
echo html::hidden('lastEditedDate', $bug->lastEditedDate);
echo html::submitButton('', '', 'btn btn-wide btn-primary');
@@ -177,10 +177,8 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
<tr>
<th><?php echo $lang->bug->mailto;?></th>
<td>
<div class='input-group'>
<?php echo html::select('mailto[]', $users, str_replace(' ', '', $bug->mailto), 'class="form-control chosen" multiple');?>
<div class='input-group-btn'><?php echo $this->fetch('my', 'buildContactLists');?></div>
</div>
<?php echo $this->fetch('my', 'buildContactLists');?>
</td>
</tr>
</tbody>
+1 -1
View File
@@ -82,7 +82,7 @@ js::set('productID' , $bug->product);
<td colspan='3'><?php echo html::textarea('comment', '', "rows='6' class='form-control'");?></td>
</tr>
<tr>
<td class='text-center' colspan='4'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::linkButton($lang->goback, $this->session->bugList, 'self', '', 'btn btn-wide');?></td>
<td class='text-center form-actions' colspan='4'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . html::linkButton($lang->goback, $this->session->bugList, 'self', '', 'btn btn-wide');?></td>
</tr>
</table>
</form>
-2
View File
@@ -336,8 +336,6 @@ $convertParams = "productID=$productID&branch=$bug->branch&moduleID=0&from=bug&b
common::printIcon('bug', 'create', $copyParams, $bug, 'button', 'copy');
common::printIcon('bug', 'delete', $params, $bug, 'button', '', 'hiddenwin');
?>
<?php else:?>
<?php common::printBack($browseLink);?>
<?php endif;?>
</div>
</div>
+1 -1
View File
@@ -73,7 +73,7 @@
<td colspan='2'><?php echo html::textarea('desc', '', "rows='10' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan="3" class="text-center">
<td colspan="3" class="text-center form-actions">
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
</td>
+1 -1
View File
@@ -67,7 +67,7 @@
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($build->desc), "rows='10' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<td colspan="3" class="text-center">
<td colspan="3" class="text-center form-actions">
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
<?php echo $this->config->global->flow != 'onlyTest' ? html::hidden('project', $build->project) : '';?>
+2 -2
View File
@@ -314,10 +314,10 @@ tbody tr td:first-child input{display:none;}
</tr>
<?php if($this->config->global->flow != 'onlyTest'):?>
<tr>
<th><?php echo $lang->build->desc;?></th>
<th style="vertical-align:top"><?php echo $lang->build->desc;?></th>
<td>
<?php if($build->desc):?>
<div class='article-content'><?php echo $build->desc;?></div>
<?php echo $build->desc;?>
<?php else:?>
<?php echo $lang->build->noData;?>
<?php endif;?>
+9 -5
View File
@@ -477,10 +477,14 @@ $lang->proVersion = "<a href='http://api.zentao.pm/goto.php?item=proversion&
$lang->downNotify = "Download Desktop Notification";
$lang->website = "http://www.zentao.pm";
$lang->suhosinInfo = "Warning! Data is reaching the limit. Please change <font color=red>sohusin.post.max_vars</font> and <font color=red>sohusin.request.max_vars</font> (set larger %s value) in php.ini, then save and restart Apache or php-fpm, or some data will not be saved.";
$lang->maxVarsInfo = "Warning! Data is reaching the limit. Please change <font color=red>max_input_vars</font> (set larger %s value) in php.ini, then save and restart Apache or php-fpm, or some data will not be saved.";
$lang->pasteTextInfo = "Paste text here. Each line will be the title of each record. ";
$lang->noticeImport = "<p style='font-size:14px'>Imported data contains data that has already existed in system. Please confirm you actions on the date </p><p><a href='javascript:submitForm(\"cover\")' class='btn btn-mini'>Override</a> <a href='javascript:submitForm(\"insert\")' class='btn btn-mini'>New Insertion</a></p>";
$lang->suhosinInfo = "Warning! Data is reaching the limit. Please change <font color=red>sohusin.post.max_vars</font> and <font color=red>sohusin.request.max_vars</font> (set larger %s value) in php.ini, then save and restart Apache or php-fpm, or some data will not be saved.";
$lang->maxVarsInfo = "Warning! Data is reaching the limit. Please change <font color=red>max_input_vars</font> (set larger %s value) in php.ini, then save and restart Apache or php-fpm, or some data will not be saved.";
$lang->pasteTextInfo = "Paste text here. Each line will be the title of each record. ";
$lang->noticeImport = "Imported data contains data that has already existed in system. Please confirm you actions on the date.";
$lang->importConfirm = "Import Confirm";
$lang->importAndCover = "Override";
$lang->importAndInsert = "New Insertion";
$lang->noResultsMatch = "No results match!";
$lang->searchMore = "More results:";
@@ -528,7 +532,7 @@ $lang->icons['product'] = 'cube';
$lang->icons['bug'] = 'bug';
$lang->icons['task'] = 'check-sign';
$lang->icons['tasks'] = 'tasks';
$lang->icons['project'] = 'folder-close-alt';
$lang->icons['project'] = 'stack';
$lang->icons['doc'] = 'file-text';
$lang->icons['doclib'] = 'folder-close';
$lang->icons['story'] = 'lightbulb';
+9 -5
View File
@@ -477,10 +477,14 @@ $lang->proVersion = "<a href='http://api.zentao.net/goto.php?item=proversion&fro
$lang->downNotify = "下载桌面提醒";
$lang->website = "http://www.zentao.net";
$lang->suhosinInfo = "警告:数据太多,请在php.ini中修改<font color=red>sohusin.post.max_vars</font>和<font color=red>sohusin.request.max_vars</font>(大于%s的数)。 保存并重新启动apache或php-fpm,否则会造成部分数据无法保存。";
$lang->maxVarsInfo = "警告:数据太多,请在php.ini中修改<font color=red>max_input_vars</font>(大于%s的数)。 保存并重新启动apache或php-fpm,否则会造成部分数据无法保存。";
$lang->pasteTextInfo = "粘贴文本到文本域中,每行文字作为一条数据的标题。";
$lang->noticeImport = "<p style='font-size:14px'>导入数据中,含有已经存在系统的数据,请确认这些数据要覆盖或者全新插入</p><p><a href='javascript:submitForm(\"cover\")' class='btn btn-mini'>覆盖</a> <a href='javascript:submitForm(\"insert\")' class='btn btn-mini'>全新插入</a></p>";
$lang->suhosinInfo = "警告:数据太多,请在php.ini中修改<font color=red>sohusin.post.max_vars</font>和<font color=red>sohusin.request.max_vars</font>(大于%s的数)。 保存并重新启动apache或php-fpm,否则会造成部分数据无法保存。";
$lang->maxVarsInfo = "警告:数据太多,请在php.ini中修改<font color=red>max_input_vars</font>(大于%s的数)。 保存并重新启动apache或php-fpm,否则会造成部分数据无法保存。";
$lang->pasteTextInfo = "粘贴文本到文本域中,每行文字作为一条数据的标题。";
$lang->noticeImport = "导入数据中,含有已经存在系统的数据,请确认这些数据要覆盖或者全新插入。";
$lang->importConfirm = "导入确认";
$lang->importAndCover = "覆盖";
$lang->importAndInsert = "全新插入";
$lang->noResultsMatch = "没有匹配结果";
$lang->searchMore = "搜索此关键字的更多结果:";
@@ -528,7 +532,7 @@ $lang->icons['product'] = 'cube';
$lang->icons['bug'] = 'bug';
$lang->icons['task'] = 'check-sign';
$lang->icons['tasks'] = 'tasks';
$lang->icons['project'] = 'folder-close-alt';
$lang->icons['project'] = 'stack';
$lang->icons['doc'] = 'file-text';
$lang->icons['doclib'] = 'folder-close';
$lang->icons['story'] = 'lightbulb';
+2 -1
View File
@@ -453,6 +453,7 @@ class commonModel extends model
/* The beginning of the menu. */
echo $isMobile ? '' : "<ul class='nav nav-default'>\n";
if(isset($lang->menugroup->$moduleName)) $moduleName = $lang->menugroup->$moduleName;
/* Cycling to print every sub menus. */
foreach($menu as $menuItem)
{
@@ -544,7 +545,7 @@ class commonModel extends model
if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows') !== false)
{
global $lang;
echo html::a(helper::createLink('misc', 'downNotify'), "<i class='icon-bell'></i>", '', "title='$lang->downNotify'") . ' &nbsp; ';
echo html::a(helper::createLink('misc', 'downNotify'), "<i class='icon-bell'></i>", '', "title='$lang->downNotify' class='text-primary'") . ' &nbsp; ';
}
}
+7 -15
View File
@@ -1,9 +1,9 @@
</div><?php /* end '.outer' in 'header.html.php'. */ ?>
<script>setTreeBox()</script>
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
</div><?php /* end '.outer' in 'header.html.php'. */ ?>
<script>setTreeBox()</script>
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
<div id='divider'></div>
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='debugwin hidden'></iframe>
<div id='divider'></div>
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='debugwin hidden'></iframe>
<?php if($onlybody != 'yes'):?>
</main><?php /* end '#wrap' in 'header.html.php'. */ ?>
@@ -11,7 +11,7 @@
<div class="container">
<?php commonModel::printBreadMenu($this->moduleName, isset($position) ? $position : ''); ?>
<div id='poweredBy'>
<a href='<?php echo $lang->website;?>' target='_blank' class='text-primary'><i class='icon-zentao'></i> <?php echo $lang->zentaoPMS . $config->version;?></a> &nbsp;
<a href='<?php echo $lang->website;?>' target='_blank'><i class='icon-zentao'></i> <?php echo $lang->zentaoPMS . $config->version;?></a> &nbsp;
<?php echo $lang->proVersion;?>
<?php commonModel::printNotifyLink();?>
</div>
@@ -38,7 +38,7 @@ $(function()
{
$.get(createLink('message', 'ajaxGetMessage', "windowBlur=" + (windowBlur ? '1' : '0')), function(data)
{
if(!windowBlur)
if(!windowBlur)
{
$('#noticeBox').append(data);
adjustNoticePosition();
@@ -55,14 +55,6 @@ $(function()
}, 60 * 1000);
})
<?php if(!isset($config->global->novice) and $this->loadModel('tutorial')->checkNovice() and $config->global->flow == 'full'):?>
novice = confirm('<?php echo $lang->tutorial->novice?>');
$.get(createLink('tutorial', 'ajaxSaveNovice', 'novice=' + (novice ? 'true' : 'false')), function()
{
if(novice) location.href=createLink('tutorial', 'index');
});
<?php endif;?>
<?php if(!empty($this->config->sso->redirect)):?>
<?php
$ranzhiAddr = $this->config->sso->addr;
+94 -59
View File
@@ -2,7 +2,6 @@
<?php
$module = $this->moduleName;
$method = $this->methodName;
js::set('themeRoot', $themeRoot);
if(!isset($config->$module->editor->$method)) return;
$editor = $config->$module->editor->$method;
$editor['id'] = explode(',', $editor['id']);
@@ -11,62 +10,71 @@ $editorLang = isset($editorLangs[$app->getClientLang()]) ? $editorLangs[$app->
/* set uid for upload. */
$uid = uniqid('');
js::set('kuid', $uid);
?>
<link rel="stylesheet" href="<?php echo $jsRoot;?>kindeditor/themes/default/default.css" />
<script src='<?php echo $jsRoot;?>kindeditor/kindeditor-min.js' type='text/javascript'></script>
<script src='<?php echo $jsRoot;?>kindeditor/lang/<?php echo $editorLang;?>.js' type='text/javascript'></script>
<script src='<?php echo $jsRoot;?>kindeditor/kindeditor-min.js'></script>
<script src='<?php echo $jsRoot;?>kindeditor/lang/<?php echo $editorLang;?>.js'></script>
<script>
var editor = <?php echo json_encode($editor);?>;
(function($) {
var kuid = '<?php echo $uid;?>';
var editor = <?php echo json_encode($editor);?>;
var K = KindEditor;
var bugTools =
[ 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic','underline', '|',
'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|',
'emoticons', 'image', 'code', 'link', '|', 'removeformat','undo', 'redo', 'fullscreen', 'source', 'about'];
var bugTools =
[ 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic','underline', '|',
'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|',
'emoticons', 'image', 'code', 'link', '|', 'removeformat','undo', 'redo', 'fullscreen', 'source', 'about'];
var simpleTools =
[ 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic','underline', '|',
'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|',
'emoticons', 'image', 'code', 'link', '|', 'removeformat','undo', 'redo', 'fullscreen', 'source', 'about'];
var fullTools =
[ 'formatblock', 'fontname', 'fontsize', 'lineheight', '|', 'forecolor', 'hilitecolor', '|', 'bold', 'italic','underline', 'strikethrough', '|',
'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', '|',
'insertorderedlist', 'insertunorderedlist', '|',
'emoticons', 'image', 'insertfile', 'hr', '|', 'link', 'unlink', '/',
'undo', 'redo', '|', 'selectall', 'cut', 'copy', 'paste', '|', 'plainpaste', 'wordpaste', '|', 'removeformat', 'clearhtml','quickformat', '|',
'indent', 'outdent', 'subscript', 'superscript', '|',
'table', 'code', '|', 'pagebreak', 'anchor', '|',
'fullscreen', 'source', 'preview', 'about'];
var editorToolsMap = {fullTools: fullTools, simpleTools: simpleTools, bugTools: bugTools};
var simpleTools =
[ 'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic','underline', '|',
'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|',
'emoticons', 'image', 'code', 'link', '|', 'removeformat','undo', 'redo', 'fullscreen', 'source', 'about'];
var fullTools =
[ 'formatblock', 'fontname', 'fontsize', 'lineheight', '|', 'forecolor', 'hilitecolor', '|', 'bold', 'italic','underline', 'strikethrough', '|',
'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', '|',
'insertorderedlist', 'insertunorderedlist', '|',
'emoticons', 'image', 'insertfile', 'hr', '|', 'link', 'unlink', '/',
'undo', 'redo', '|', 'selectall', 'cut', 'copy', 'paste', '|', 'plainpaste', 'wordpaste', '|', 'removeformat', 'clearhtml','quickformat', '|',
'indent', 'outdent', 'subscript', 'superscript', '|',
'table', 'code', '|', 'pagebreak', 'anchor', '|',
'fullscreen', 'source', 'preview', 'about'];
$(document).ready(initKindeditor);
function initKindeditor(afterInit)
{
$(':input[type=submit]').next('#uid').remove();
$(':input[type=submit]').after("<input type='hidden' id='uid' name='uid' value=" + kuid + ">");
var nextFormControl = 'input:not([type="hidden"]), textarea:not(.ke-edit-textarea), button[type="submit"], select';
$.each(editor.id, function(key, editorID)
// Kindeditor default options
var editorDefaults =
{
editorTool = simpleTools;
if(editor.tools == 'bugTools') editorTool = bugTools;
if(editor.tools == 'fullTools') editorTool = fullTools;
cssPath: [config.themeRoot + 'zui/css/min.css'],
width: '100%',
height: '200px',
filterMode: true,
bodyClass: 'article-content',
urlType: 'absolute',
uploadJson: createLink('file', 'ajaxUpload', 'uid=' + kuid),
allowFileManager: true,
langType: '<?php echo $editorLang?>',
};
var K = KindEditor, $editor = $('#' + editorID);
var placeholderText = $editor.attr('placeholder');
if(placeholderText == undefined) placeholderText = '';
var pasted;
var options =
window.editor = {};
var nextFormControl = 'input:not([type="hidden"]), textarea:not(.ke-edit-textarea), button[type="submit"], select';
// Init kindeditor
var setKindeditor = function(element, options)
{
var $editor = $(element);
var pasted = false;
options = $.extend({}, editorDefaults, $editor.data(), options);
var editorID = $editor.attr('id');
if(editorID === undefined)
{
cssPath:[themeRoot + 'zui/css/min.css'],
width:'100%',
height:'200px',
items:editorTool,
filterMode: true,
bodyClass:'article-content',
urlType:'absolute',
uploadJson: createLink('file', 'ajaxUpload', 'uid=' + kuid),
allowFileManager:true,
langType:'<?php echo $editorLang?>',
editorID = 'kindeditor-' + $.zui.uuid();
$editor.attr('id', editorID);
}
var editorTool = editorToolsMap[options.tools || editor.tools] || simpleTools;
var placeholder = $editor.attr('placeholder') || options.placeholder || '';
$.extend(options,
{
items: editorTool,
afterChange: function(){$editor.change().hide();},
afterCreate : function()
{
@@ -95,10 +103,10 @@ function initKindeditor(afterInit)
})
}, 10);
}
if(pasted && placeholderText.indexOf('<?php echo $this->lang->noticePasteImg?>') < 0)
if(pasted && placeholder.indexOf('<?php echo $this->lang->noticePasteImg?>') < 0)
{
if(placeholderText) placeholderText += '<br />';
placeholderText += ' <?php echo $this->lang->noticePasteImg?>';
if(placeholder) placeholder += '<br />';
placeholder += ' <?php echo $this->lang->noticePasteImg?>';
}
/* Paste in chrome.*/
@@ -161,7 +169,7 @@ function initKindeditor(afterInit)
/* Add for placeholder. */
$(this.edit.doc).find('body').after('<span class="kindeditor-ph" style="width:100%;color:#888; padding:5px 5px 5px 7px; background-color:transparent; position:absolute;z-index:10;top:2px;border:0;overflow:auto;resize:none; font-size:13px;"></span>');
var $placeholder = $(this.edit.doc).find('.kindeditor-ph');
$placeholder.html(placeholderText);
$placeholder.html(placeholder);
$placeholder.css('pointerEvents', 'none');
$placeholder.click(function(){frame.doc.body.focus()});
if(frame.html() != '') $placeholder.hide();
@@ -197,17 +205,44 @@ function initKindeditor(afterInit)
if(keditor) keditor.focus();
else if($next.hasClass('chosen')) $next.trigger('chosen:activate');
}
};
});
try
{
if(!window.editor) window.editor = {};
var keditor = K.create('#' + editorID, options);
window.editor['#'] = window.editor[editorID] = keditor;
$editor.data('keditor', keditor);
return keditor;
}
catch(e){}
});
catch(e){return false;}
};
if($.isFunction(afterInit)) afterInit();
}
// Init kindeditor with jquery way
$.fn.kindeditor = function(options)
{
return this.each(function()
{
setKindeditor(this, options);
});
};
// Init all kindeditor
var initKindeditor = function(afterInit)
{
var $submitBtn = $('form :input[type=submit]');
if($submitBtn.length)
{
$submitBtn.next('#uid').remove();
$submitBtn.after("<input type='hidden' id='uid' name='uid' value=" + kuid + ">");
}
if($.isFunction(afterInit)) afterInit();
$.each(editor.id, function(key, editorID)
{
setKindeditor('#' + editorID);
});
};
// Init all kindeditors when document is ready
$(initKindeditor);
}(jQuery));
</script>
+16 -13
View File
@@ -1,28 +1,31 @@
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal fade" id="importNoticeModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog w-600px">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<button type="button" class="close" data-dismiss="modal"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><?php echo $lang->importConfirm;?></h4>
</div>
<div class="modal-body">
<?php echo html::hidden('insert', '');?>
<div class='alert alert-info'><?php echo $lang->noticeImport;?></div>
<div class='alert with-icon'>
<i class="icon icon-exclamation-sign"></i>
<div class="content">
<?php echo $lang->noticeImport;?>
</div>
</div>
<div class="text-center form-actions">
<a href='javascript:submitForm("cover")' class='btn btn-danger btn-wide'><?php echo $lang->importAndCover;?></a>
<a href='javascript:submitForm("insert")' class='btn btn-primary btn-wide'><?php echo $lang->importAndInsert;?></a>
<button class="btn btn-wide" type="button" data-dismiss="modal"><?php echo $lang->goback;?></button>
</div>
</div>
</div>
</div>
</div>
<script>
$(function(){$("button[data-toggle='myModal']").click(function(){$('#myModal').modal('show')})});
function submitForm(type)
{
if(type == 'insert')
{
$('#insert').val('1');
}
else
{
$('#insert').val('0');
}
$("button[data-toggle='myModal']").closest('form').submit();
$('#insert').val(type == 'insert' ? 1 : 0);
$("button[data-target='#importNoticeModal']").closest('form').submit();
}
</script>
+5 -3
View File
@@ -4,9 +4,11 @@ js::import($jsRoot . 'jquery/tablesorter/min.js');
js::import($jsRoot . 'jquery/tablesorter/metadata.js');
?>
<style>
table.tablesorter tr.tablesorter-headerRow .header.tablesorter-headerUnSorted .tablesorter-header-inner:after{font-family: NewZenIcon; font-weight: normal; content: "\e6bd"; font-size: 14px;}
table.tablesorter tr.tablesorter-headerRow .header.headerSortUp .tablesorter-header-inner:after{font-family: NewZenIcon; font-weight: normal; content: "\e6b9"; font-size: 14px; color: #03C;}
table.tablesorter tr.tablesorter-headerRow .header.headerSortDown .tablesorter-header-inner:after{font-family: NewZenIcon; font-weight: normal; content: "\e6b8"; font-size: 14px; color: #03C;}
.tablesorter-header-inner {cursor: pointer;}
.tablesorter-header-inner:hover {color: #006af1;}
table.tablesorter tr.tablesorter-headerRow .header.tablesorter-headerUnSorted .tablesorter-header-inner:after {font-family: ZentaoIcon; font-weight: normal; content: "\f0dc"; font-size: 14px;}
table.tablesorter tr.tablesorter-headerRow .header.headerSortUp .tablesorter-header-inner:after{font-family: ZentaoIcon; font-weight: normal; content: "\f0d8"; color: #006af1;}
table.tablesorter tr.tablesorter-headerRow .header.headerSortDown .tablesorter-header-inner:after{font-family: ZentaoIcon; font-weight: normal; content: "\f0d7"; color: #006af1;}
table.tablesorter tr.tablesorter-headerRow .header.sorter-false .tablesorter-header-inner:after{content:"";}
</style>
<script>
+3 -3
View File
@@ -7,7 +7,7 @@
.dynamic-date > .date-label + .date-text {font-size: 14px; line-height: 14px;}
.dynamic-date > .date-label {margin-top: -8px;}
.dynamic-date > .btn {position: absolute; right: 10px; top: 15px;}
.dynamic .timeline {border: 2px solid #eee; border-radius: 4px; margin-bottom: 20px; padding: 10px 20px 10px 100px; max-height: 800px; transition: max-height .2s; overflow: hidden;}
.dynamic .timeline {border: 2px solid #eee; border-radius: 4px; margin-bottom: 20px; padding: 10px 20px 10px 100px; transition: max-height .2s; overflow: hidden;}
.dynamic .timeline-tag {left: -75px; font-size: 14px; color: #838A9D;}
.dynamic .timeline-text {color: #3C4353;}
.dynamic .text-muted {color: #838A9D;}
@@ -16,5 +16,5 @@
.dynamic.active .dynamic-date {border-color: #00a9fc;}
.dynamic.active .dynamic-date:before {background-color: #00a9fc;}
.dynamic.collapsed .timeline {max-height: 58px;}
.dynamic.collapsed .timeline > li + li:after {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d7';}
.dynamic.collapsed .timeline > li + li {display: none;}
.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d7'; }
+2 -2
View File
@@ -27,8 +27,8 @@ js::set('confirmDelete', $lang->user->confirmDelete);
</div>
<div class='btn-toolbar pull-right'>
<?php common::printIcon('group', 'create', '', '', 'button', '', '', 'iframe', true, "data-width='550px'");?>
<?php common::printLink('user', 'batchCreate', "dept={$deptID}", "<i class='icon icon-plus'> </i>" . $lang->user->batchCreate, '', "class='btn btn-secondary'");?>
<?php common::printLink('user', 'create', "dept={$deptID}", "<i class='icon icon-plus'> </i>" . $lang->user->create, '', "class='btn btn-primary'");?>
<?php common::printLink('user', 'batchCreate', "dept={$deptID}", "<i class='icon icon-plus'></i> " . $lang->user->batchCreate, '', "class='btn btn-secondary'");?>
<?php common::printLink('user', 'create', "dept={$deptID}", "<i class='icon icon-plus'></i> " . $lang->user->create, '', "class='btn btn-primary'");?>
</div>
</div>
<div id='mainContent' class='main-row'>
+1 -1
View File
@@ -37,7 +37,7 @@ $lang->cron->confirmDelete = '是否删除该计划任务?';
$lang->cron->confirmTurnon = '是否关闭计划任务?';
$lang->cron->introduction = <<<EOD
<p>计划任务功能可以定时执行诸如更新燃尽图、备份等操作,免除自己布置计划任务。</p>
<p>该功能还有待完善,所以默认关闭该功能</p>
<p>该功能还有待完善,所以默认关闭该功能。</p>
EOD;
$lang->cron->confirmOpen = <<<EOD
<p>是否开启该功能?<a href="%s" target='hiddenwin'><strong>打开计划任务</strong></a></p>
+12 -12
View File
@@ -119,29 +119,29 @@ class custom extends control
/* Invalid key. It should be numbers. (It includes severityList in bug module and priList in stroy, task, bug, testcasea, testtask and todo module.) */
if($field == 'priList' or $field == 'severityList')
{
if(!is_numeric($key) or $key > 255) die(js::alert($this->lang->custom->notice->invalidNumberKey));
if(!is_numeric($key) or $key > 255) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidNumberKey));
}
if(!empty($key) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) die(js::alert($this->lang->custom->notice->invalidStringKey));
if(!empty($key) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStringKey));
/* The length of roleList in user module and typeList in todo module is less than 10. check it when saved. */
if($field == 'roleList' or $module == 'todo' and $field == 'typeList')
{
if(strlen($key) > 10) die(js::alert($this->lang->custom->notice->invalidStrlen['ten']));
if(strlen($key) > 10) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['ten']));
}
/* The length of sourceList in story module and typeList in task module is less than 20, check it when saved. */
if($field == 'sourceList' or $module == 'task' and $field == 'typeList')
{
if(strlen($key) > 20) die(js::alert($this->lang->custom->notice->invalidStrlen['twenty']));
if(strlen($key) > 20) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['twenty']));
}
/* The length of stageList in testcase module is less than 255, check it when saved. */
if($module == 'testcase' and $field == 'stageList' and strlen($key) > 255) die(js::alert($this->lang->custom->notice->invalidStrlen['twoHundred']));
if($module == 'testcase' and $field == 'stageList' and strlen($key) > 255) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['twoHundred']));
/* The length of field that in bug and testcase module and reasonList in story and task module is less than 30, check it when saved. */
if($module == 'bug' or $field == 'reasonList' or $module == 'testcase')
{
if(strlen($key) > 30) die(js::alert($this->lang->custom->notice->invalidStrlen['thirty']));
if(strlen($key) > 30) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['thirty']));
}
}
@@ -156,8 +156,8 @@ class custom extends control
$this->custom->setItem("{$lang}.{$module}.{$field}.{$key}.{$system}", $value);
}
}
if(dao::isError()) die(js::error(dao::getError()));
die(js::locate($this->createLink('custom', 'set', "module=$module&field=$field&lang=" . str_replace('-', '_', $lang)), 'parent'));
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
/* Check whether the current language has been customized. */
@@ -237,7 +237,7 @@ class custom extends control
$this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$projectCommonList[$oldProjectIndex]}', '{$projectCommonList[$newProjectIndex]}')")->where('source')->eq('project')->exec();
}
die(js::reload('parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->view->title = $this->lang->custom->flow;
@@ -250,7 +250,7 @@ class custom extends control
if($_POST)
{
$this->loadModel('setting')->setItem('system.common.global.flow', $this->post->flow);
die(js::reload('parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->view->title = $this->lang->custom->working;
@@ -272,7 +272,7 @@ class custom extends control
if($_POST)
{
$this->custom->saveRequiredFields($moduleName);
die(js::reload('parent.parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
foreach($this->config->custom->requiredModules as $requiredModule) $this->app->loadLang($requiredModule);
@@ -306,7 +306,7 @@ class custom extends control
if($_POST)
{
$this->loadModel('setting')->setItem('system.common.global.scoreStatus', $this->post->score);
die(js::reload('parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->view->title = $this->lang->custom->score;
+5 -4
View File
@@ -341,11 +341,12 @@ class customModel extends model
global $lang, $app, $dbh;
if(!isset($lang->$module->featureBar[$method])) return;
$queryModule = $module == 'project' ? 'task' : ($module == 'product' ? 'story' : $module);
$shortcuts = $dbh->query('select id, title from ' . TABLE_USERQUERY . " where `account` = '{$app->user->account}' AND `module` = '{$queryModule}' order by id")->fetchAll();
foreach($shortcuts as $shortcut)
$shortcuts = $dbh->query('select id, title from ' . TABLE_USERQUERY . " where `account` = '{$app->user->account}' AND `module` = '{$queryModule}' AND `shortcut` = '1' order by id")->fetchAll();
if($shortcuts)
{
$shortcutID = 'QUERY' . $shortcut->id;
$lang->$module->featureBar[$method][$shortcutID] = $shortcut->title;
$lang->$module->featureBar[$method]['QUERY'] = $lang->custom->common;
foreach($shortcuts as $shortcut) $lang->custom->queryList[$shortcut->id] = $shortcut->title;
}
}
+1 -1
View File
@@ -14,7 +14,7 @@
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'></div>
<div class='main-col main-content'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->flow?></strong>
+2 -2
View File
@@ -26,7 +26,7 @@
</div>
</div>
<div class='main-col main-content'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->$moduleName->common?></strong>
@@ -54,7 +54,7 @@
</tr>
<?php endforeach;?>
<tr>
<td colspan='2' class='text-center'>
<td colspan='2' class='text-center form-actions'>
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
<?php if(common::hasPriv('custom', 'resetRequired')) echo html::a(inlink('resetRequired', "module=$moduleName"), $lang->custom->restore, 'hiddenwin', "class='btn btn-wide'");?>
</td>
+3 -3
View File
@@ -13,7 +13,7 @@
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'></div>
<div class='main-col main-content'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->score?></strong>
@@ -25,13 +25,13 @@
<td>
<?php $checkedKey = isset($config->global->scoreStatus) ? $config->global->scoreStatus : 0;?>
<?php foreach($lang->custom->scoreStatus as $key => $value):?>
<p><label class="radio-inline"><input type="radio" name="flow" value="<?php echo $key?>"<?php echo $key == $checkedKey ? " checked='checked'" : ''?> id="flow<?php echo $key;?>"><?php echo $value;?></label></p>
<p><label class="radio-inline"><input type="radio" name="score" value="<?php echo $key?>"<?php echo $key == $checkedKey ? " checked='checked'" : ''?> id="score<?php echo $key;?>"><?php echo $value;?></label></p>
<?php endforeach;?>
</td>
</tr>
<tr>
<th></th>
<td>
<td class='form-actions'>
<?php echo html::submitButton('', '', 'btn btn-primary btn-wide');?>
<?php common::printLink('score', 'reset', '', "<i class='icon-refresh'></i> " . $lang->custom->scoreReset, '', ' id="scoreRefresh" class="btn btn-wide iframe" data-width="480"', true, true);?>
</td>
+7 -7
View File
@@ -21,9 +21,9 @@ $itemRow = <<<EOT
<td>
<input type='text' class="form-control" autocomplete='off' value="" name="values[]">
</td>
<td class='text-left'>
<a href="javascript:void(0)" class='btn-icon' onclick="addItem(this)"><i class='icon-plus'></i></a>
<a href="javascript:void(0)" class='btn-icon' onclick="delItem(this)"><i class='icon-remove'></i></a>
<td class='c-actions'>
<a href="javascript:void(0)" class='btn btn-link' onclick="addItem(this)"><i class='icon-plus'></i></a>
<a href="javascript:void(0)" class='btn btn-link' onclick="delItem(this)"><i class='icon-trash'></i></a>
</td>
</tr>
EOT;
@@ -45,7 +45,7 @@ EOT;
</div>
</div>
<div class='main-col main-content'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->object[$module] . $lang->arrow . $lang->custom->$module->fields[$field]?></strong>
@@ -54,9 +54,9 @@ EOT;
<?php if(($module == 'story' or $module == 'testcase') and $field == 'review'):?>
<table class='table table-form mw-800px'>
<tr>
<th class='w-120px'><?php echo $lang->custom->storyReview;?></th>
<th class='w-80px'><?php echo $lang->custom->storyReview;?></th>
<td><?php echo html::radio('needReview', $lang->custom->reviewList, $needReview);?></td>
<td class='w-100px'></td>
<td></td>
</tr>
<tr <?php if($needReview and $module == 'testcase') echo "class='hidden'"?>>
<th><?php echo $lang->custom->forceReview;?></th>
@@ -147,7 +147,7 @@ EOT;
</tr>
<?php endforeach;?>
<tr>
<td colspan='<?php $canAdd ? print(3) : print(2);?>' class='text-center'>
<td colspan='<?php $canAdd ? print(3) : print(2);?>' class='text-center form-actions'>
<?php
$appliedTo = array($currentLang => $lang->custom->currentLang, 'all' => $lang->custom->allLang);
echo html::radio('lang', $appliedTo, $lang2Set);
+1 -1
View File
@@ -14,7 +14,7 @@
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'></div>
<div class='main-col main-content'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->working?></strong>
+4 -5
View File
@@ -78,9 +78,9 @@
</div>
<div class='form-actions text-left'>
<?php if(common::hasPriv('datatable', 'setGlobal')) echo html::checkbox('global', array(1 => $lang->datatable->setGlobal));?>
<button type='button' class='btn btn-primary btn-save' id='btnSaveCustom'><?php echo $lang->save ?></button>
<button type='button' class='btn' data-dismiss='modal'><?php echo $lang->close ?></button>
<button type='button' class='btn' id='resetBtn'><?php echo $lang->datatable->reset ?></button>
<button type='button' class='btn btn-wide btn-primary btn-save' id='btnSaveCustom'><?php echo $lang->save ?></button>
<button type='button' class='btn btn-wide' data-dismiss='modal'><?php echo $lang->close ?></button>
<button type='button' class='btn btn-wide' id='resetBtn'><?php echo $lang->datatable->reset ?></button>
</div>
</div>
</div>
@@ -194,8 +194,7 @@ $(function()
return sets;
}).get();
//window.saveDatatableConfig('<?php echo $mode == 'table' ? 'tablecols' : 'cols';?>', setting, true, $('#global1').prop('checked') ? 1 : 0);
window.saveDatatableConfig('<?php echo 'cols';?>', setting, true, $('#global1').prop('checked') ? 1 : 0);
window.saveDatatableConfig('<?php echo $mode == 'table' ? 'tablecols' : 'cols';?>', setting, true, $('#global1').prop('checked') ? 1 : 0);
});
$('#resetBtn').on("click", function()
+1
View File
@@ -7,3 +7,4 @@
#addChildModal form > .form-control {margin-bottom: 8px;}
#addChildModal .modal-dialog {max-width: 360px;}
#deptTree li {padding-left: 20px;}
+1 -1
View File
@@ -147,7 +147,7 @@ class deptModel extends model
$deptMenu[$dept->parent] .= "</li>\n";
}
$lastMenu = "<ul class='tree tree-lines'>" . @array_pop($deptMenu) . "</ul>\n";
$lastMenu = "<ul class='tree' data-ride='tree' data-name='tree-dept'>" . @array_pop($deptMenu) . "</ul>\n";
return $lastMenu;
}
+19 -12
View File
@@ -23,7 +23,7 @@
<div class='panel-title'><?php echo $title;?></div>
</div>
<div class='panel-body'>
<ul class='tree-lines' id='deptTree'></ul>
<ul data-name='tree-dept' id='deptTree'></ul>
</div>
</div>
</div>
@@ -64,7 +64,7 @@
</tr>
<tr>
<td></td>
<td>
<td class='form-actions'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
<?php echo html::hidden('maxOrder', $maxOrder);?>
@@ -85,10 +85,19 @@ $(function()
name: 'deptTree',
initialState: 'preserve',
data: data,
sortable:
{
lazy: true,
nested: true,
canMoveHere: function($ele, $target)
{
if($ele && $target && $ele.parent().closest('li').attr('data-id') !== $target.parent().closest('li').attr('data-id')) return false;
}
},
itemCreator: function($li, item)
{
var link = item.id !== undefined ? ('<a href="' + createLink('dept', 'browse', 'dept={0}'.format(item.id)) + '">' + item.name + '</a>') : ('<span class="tree-toggle">' + item.name + '</span>');
var $toggle = $('<span class="dept-name" data-id="' + item.id + '">' + link + '</span>');
var $toggle = $('<span class="dept-name module-name" data-id="' + item.id + '">' + link + '</span>');
if(item.manager)
{
$toggle.append('&nbsp; <span class="dept-manager text-muted"><i class="icon icon-user"></i> ' + item.managerName + '</span>');
@@ -101,19 +110,19 @@ $(function()
sort:
{
title: '<?php echo $lang->dept->dragAndSort ?>',
template: '<a class="sort-handler" data-toggle="tooltip" href="javascript:;"><?php echo $lang->sort;?></a>'
template: '<a class="sort-handler" href="javascript:;"><?php echo $lang->sort;?></a>'
},
edit:
{
linkTemplate: '<?php echo helper::createLink('dept', 'edit', "deptid={0}"); ?>',
title: '<?php echo $lang->dept->edit ?>',
template: '<a data-toggle="tooltip" href="javascript:;" data-width="600"><?php echo $lang->edit?></a>'
template: '<a href="javascript:;" data-width="600"><?php echo $lang->edit?></a>'
},
"delete":
{
linkTemplate: '<?php echo helper::createLink('dept', 'delete', "deptid={0}"); ?>',
title: '<?php echo $lang->dept->delete ?>',
template: '<a data-toggle="tooltip" href="javascript:;"><?php echo $lang->delete?></a>'
template: '<a href="javascript:;"><?php echo $lang->delete?></a>'
}
},
action: function(event)
@@ -121,11 +130,11 @@ $(function()
var action = event.action, $target = $(event.target), item = event.item;
if(action.type === 'edit')
{
$target.modalTrigger(
{
new $.zui.ModalTrigger({
type: 'ajax',
url: action.linkTemplate.format(item.id)
}).trigger('click');
url: action.linkTemplate.format(item.id),
keyboard: true
}).show();
}
else if(action.type === 'delete')
{
@@ -163,8 +172,6 @@ $(function()
$(this).addClass('hover');
e.stopPropagation();
});
$tree.find('[data-toggle="tooltip"]').tooltip();
});
</script>
<?php include '../../common/view/footer.html.php';?>
+29 -21
View File
@@ -15,24 +15,32 @@ $webRoot = $this->app->getWebRoot();
$jsRoot = $webRoot . "js/";
?>
<?php include '../../common/view/chosen.html.php';?>
<form action="<?php echo inlink('edit', 'deptID=' . $dept->id);?>" target='hiddenwin' method='post' class='mt-10px' id='dataform'>
<table class='table table-form' style='width:100%'>
<tr>
<th class='w-80px'><?php echo $lang->dept->parent;?></th>
<td><?php echo html::select('parent', $optionMenu, $dept->parent, "class='form-control chosen'");?></td>
</tr>
<tr>
<th class='w-80px'><?php echo $lang->dept->name;?></th>
<td><?php echo html::input('name', $dept->name, "class='form-control' autocomplete='off'");?></td>
</tr>
<tr>
<th class='w-80px'><?php echo $lang->dept->manager;?></th>
<td><?php echo html::select('manager', $users, $dept->manager, "class='form-control chosen'", true);?></td>
</tr>
<tr>
<td colspan='2' class='text-center'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
</td>
</tr>
</table>
</form>
<div class='modal-dialog w-500px'>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><i class="icon icon-close"></i></button>
<h4 class="modal-title"><strong><?php echo $lang->dept->edit;?></strong></h4>
</div>
<div class='modal-body'>
<form action="<?php echo inlink('edit', 'deptID=' . $dept->id);?>" target='hiddenwin' method='post' class='mt-10px' id='dataform'>
<table class='table table-form' style='width:100%'>
<tr>
<th class='w-80px'><?php echo $lang->dept->parent;?></th>
<td><?php echo html::select('parent', $optionMenu, $dept->parent, "class='form-control chosen'");?></td>
</tr>
<tr>
<th class='w-80px'><?php echo $lang->dept->name;?></th>
<td><?php echo html::input('name', $dept->name, "class='form-control' autocomplete='off'");?></td>
</tr>
<tr>
<th class='w-80px'><?php echo $lang->dept->manager;?></th>
<td><?php echo html::select('manager', $users, $dept->manager, "class='form-control chosen'", true);?></td>
</tr>
<tr>
<td colspan='2' class='text-center'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
</td>
</tr>
</table>
</form>
</div>
</div>
+17 -8
View File
@@ -13,7 +13,8 @@
.row-spliting .col-spliter:before,
.row-spliting .col-spliter:after {opacity: 1;}
@media (max-width: 720px) {
@media (max-width: 720px)
{
.split-row > .side-col,
.split-row > .main-col {width: 100%!important;}
}
@@ -28,19 +29,27 @@
.table-files .c-actions .btn > .icon.text-yellow,
.table-files tr:hover .c-actions .btn > .icon {opacity: 1;}
#main {opacity: 0; transition: opacity .4s;}
#main.in {opacity: 1;}
.files-grid .col {width: 167px; text-align: center; padding: 0; margin-bottom: 10px;}
.files-grid .actions {position: absolute; bottom: -30px; left: 0; right: 0; background: #E9F2FB; z-index: 10; opacity: 0; transition: opacity .2s; padding-bottom: 8px;}
.files-grid .actions {position: absolute; bottom: -38px; left: 0; right: 0; background: #E9F2FB; z-index: 10; opacity: 0; transition: opacity .2s; padding-bottom: 8px; border-radius: 0 0 3px 3px; padding-top: 8px;}
.files-grid .col:hover .actions {opacity: 1;}
.files-grid .file {padding: 10px; cursor: pointer; display: block; border-radius: 2px;}
.files-grid .file {padding: 10px; cursor: pointer; display: block; border-radius: 2px; transition: background-color .2s; border-radius: 3px 3px 0 0}
.files-grid .col:hover .file {background-color: #E9F2FB;}
.files-grid .file-icon {font-size: 54px; width: 64px; height: 64px; display: block; margin: 0 auto 8px; line-height: 64px;}
.files-grid .file-icon {font-size: 54px; width: 64px; height: 64px; display: block; margin: 0 auto 8px; line-height: 64px; color: #8E939A}
.files-grid .file-name,
.files-grid .file-info {text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}
.files-grid .file-info {text-overflow: ellipsis; white-space: nowrap; overflow: hidden; line-height: 20px;}
.files-grid .file-info {font-size: 12px; margin-top: 3px;}
.files-grid .icon-folder {background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1MnB4IiBoZWlnaHQ9IjQ2cHgiIHZpZXdCb3g9IjAgMCA1MiA0NiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5pY29uLWJpZy1mb2xkZXJpY29uLWJpZy1mb2xkZXI8L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJ3ZWItbWF4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTA5NS4wMDAwMDAsIC02OTUuMDAwMDAwKSI+ICAgICAgICAgICAgPGcgaWQ9Ijgt5paH5qGjIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDkwLjAwMDAwMCwgNTgzLjAwMDAwMCkiPiAgICAgICAgICAgICAgICA8ZyBpZD0iaWNvbi1iaWctZm9sZGVyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1LjAwMDAwMCwgMTEyLjAwMDAwMCkiPiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTIxLjA0NTY4OTEsNC4yNzAyMzU0MiBDMjEuOTYxODA1OSw1LjEwNzIwMzY1IDIzLjAyMjcwMDQsNS41NTc5NjY1OSAyNC4zNjg4OTQ0LDUuNTI1MDEyMTggTDI2LjE2MDIzOCw1LjUyNTAxMjE4IEwzMC44MTIxMDExLDUuNTI1MDEyMTggQzI5LjYwMDkxMDksNS41MjUwMTIxOCAyOC40Mzg1MTg2LDUuMDM1NzUxMTMgMjcuNTc3MDQ3LDQuMTg1ODk1OTMgTDI0LjY3ODE1NjYsMS4zMjY0MDI3MSBDMjMuODE2NTgwOCwwLjQ3NjU0NzUxMSAyMi42NTQyOTI3LDAgMjEuNDQzMTAyNSwwIEwxNS4xMTQ5MDQ2LDAgTDE1LDAgQzE2LjIyNjg2NzksMC4wMzk0MzcwODA1IDE3LjMwMjA1NTcsMC41NTY4NjUwODcgMTguMTYzNTI3MywxLjQwNjYxNjIyIEwyMS4wNDU2ODkxLDQuMjcwMjM1NDIgWiIgaWQ9IlNoYXBlLUNvcHktNyIgZmlsbD0iI0ZGQzg1QSI+PC9wYXRoPiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTQ5LjMxMDMyMDMsNS41MjAwMjkxOCBMMzguNTUxNzAzMSw1LjUyMDAyOTE4IEwzNi44MDY4NTk0LDUuNTIwMDI5MTggTDMyLjI3NTc1LDUuNTIwMDI5MTggTDMwLjUzMDkwNjMsNS41MjAwMjkxOCBMMjYsNS41MjAwMjkxOCBMMjQuMjU1MTU2Miw1LjUyMDAyOTE4IEMyMy4wNzU0MDYzLDUuNTIwMDI5MTggMjEuOTQzMTg3NSw1LjA0MjgxMzM1IDIxLjEwNDA3ODEsNC4xOTE3NjYzIEwxOC4yODA0Mzc1LDEuMzI4MjYyODggQzE3LjQ0MTIyNjYsMC40NzcyMTU4MjkgMTYuMzA5MTA5NCwwIDE1LjEyOTM1OTQsMCBMOC45NjU1MzEyNSwwIEwyLjY4OTY3OTY5LDAgQzEuMjA0MjI2NTYsNy40MDUxNTkyM2UtMTYgMCwxLjIzNTcxNjk5IDAsMi43NjAwMTQ1OSBMMCw4LjI4MDA0Mzc3IEwwLDkuMjAwMDgzMzcgTDAsNDMuMjM5OTg1NCBDMCw0NC43NjQyODMgMS4yMDQyMjY1Niw0NiAyLjY4OTY3OTY5LDQ2IEw0OS4zMTAzMjAzLDQ2IEM1MC43OTU3NzM0LDQ2IDUyLDQ0Ljc2NDI4MyA1Miw0My4yMzk5ODU0IEw1Miw4LjI4MDA0Mzc3IEM1Miw2Ljc1NTY0MTk1IDUwLjc5NTc3MzQsNS41MjAwMjkxOCA0OS4zMTAzMjAzLDUuNTIwMDI5MTggTDQ5LjMxMDMyMDMsNS41MjAwMjkxOCBaIiBpZD0iU2hhcGUtQ29weS04IiBmaWxsPSIjRkZFMDY2Ij48L3BhdGg+ICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICA8L2c+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4=) no-repeat center;}
.files-grid .icon-folder:before {display: none;}
.files-grid .img-holder {height: 64px; line-height: 64px; margin: 0 auto 8px; width: 100%; background-size: contain; background-repeat: no-repeat; background-position: center;}
.files-grid .img-holder > img {max-height: 64px; opacity: 0; width: 100%;}
.panel{padding-bottom: 40px;}
.panel .table-footer{position: absolute; bottom: 0; width: 100%;}
@keyframes flash-icon
{
0% {color: #666;}
100% {color: #fff;}
}
.main-col > .panel > .panel-body {padding-top: 20px;}
-6
View File
@@ -1,6 +0,0 @@
@keyframes flash-icon
{
0% {color: #666;}
100% {color: #fff;}
}
.lib-file > .file > a > .file-path{width: 64px; height: 64px; line-height: 64px; margin: 0 auto 10px;}
+8 -1
View File
@@ -168,5 +168,12 @@ $(document).ready(function()
$('.split-row').splitRow();
});
$('#main').addClass('in');
var $pageSetting = $('#pageSetting');
if($pageSetting.length)
{
$pageSetting.on('click', '.close-dropdown', function()
{
$pageSetting.parent().removeClass('open');
}).on('click', function(e){e.stopPropagation()});
}
});
+1
View File
@@ -142,6 +142,7 @@ $lang->doc->errorEmptyProject = "No {$lang->projectCommon}. It cannot be create
$lang->doc->errorMainSysLib = "This library cannot be deleted.";
$lang->doc->accessDenied = "Access denied!";
$lang->doc->versionNotFount = 'It does not exist in this build.';
$lang->doc->noDoc = 'It does not exist.';
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = 'Url';
+1
View File
@@ -142,6 +142,7 @@ $lang->doc->errorEmptyProject = "没有{$lang->projectCommon},无法创建文
$lang->doc->errorMainSysLib = "该系统文档库不能删除!";
$lang->doc->accessDenied = "您没有权限访问!";
$lang->doc->versionNotFount = '该版本文档不存在';
$lang->doc->noDoc = '文档不存在';
$lang->doc->placeholder = new stdclass();
$lang->doc->placeholder->url = '相应的链接地址';
+11 -5
View File
@@ -19,7 +19,7 @@ var browseType = '<?php echo $browseType;?>';
<?php js::set('libID', $libID);?>
<?php if($this->from != 'doc') js::set('type', 'doc');?>
<div class="main-row <?php if($this->from == 'doc') echo 'split-row';?>" id="mainRow">
<div class="main-row fade <?php if($this->from == 'doc') echo 'split-row';?>" id="mainRow">
<?php if($this->from == 'doc'):?>
<?php include './side.html.php';?>
<div class="col-spliter"></div>
@@ -40,15 +40,20 @@ var browseType = '<?php echo $browseType;?>';
</div>
<nav class="panel-actions btn-toolbar">
<div class="btn-group">
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon btn-gray text-primary'");?>
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon btn-gray'");?>
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon text-primary'");?>
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon'");?>
</div>
</nav>
</div>
<?php if(empty($docs)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->doc->noDoc;?></span></p>
</div>
<?php else:?>
<div class="panel-body has-table">
<table class="table table-borderless table-hover table-files">
<thead>
<tr class="muted">
<tr>
<th class="c-name"><?php echo $lang->doc->title;?></th>
<th class="c-num"><?php echo $lang->doc->size;?></th>
<th class="c-user"><?php echo $lang->doc->addedBy;?></th>
@@ -84,7 +89,7 @@ var browseType = '<?php echo $browseType;?>';
<td class="c-user"><?php echo zget($users, $doc->addedBy);?></td>
<td class="c-datetime"><?php echo formatTime($doc->addedDate, 'm-d h:i');?></td>
<td class="c-datetime"><?php echo formatTime($doc->editedDate, 'm-d h:i');?></td>
<td>
<td class="c-actions">
<?php common::printLink('doc', 'collect', "objectID=$doc->id&objectType=doc", "<i class='icon {$star}'></i>", 'hiddenwin', "title='{$collectTitle}' class='btn btn-link'")?>
<?php common::printLink('doc', 'edit', "docID=$doc->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link'")?>
<?php common::printLink('doc', 'delete', "docID=$doc->id", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
@@ -95,6 +100,7 @@ var browseType = '<?php echo $browseType;?>';
</table>
</div>
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
<?php endif;?>
</div>
</div>
<?php endif;?>
+8 -2
View File
@@ -4,11 +4,16 @@
<div class="panel-title font-normal"><i class="icon icon-folder-open-o text-muted"></i> <?php echo $title;?></div>
<nav class="panel-actions btn-toolbar">
<div class="btn-group">
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon btn-gray'");?>
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon btn-gray text-primary'");?>
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon'");?>
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon text-primary'");?>
</div>
</nav>
</div>
<?php if(empty($docs)):?>
<div class="table-empty-tip">
<p><span class="text-muted"><?php echo $lang->doc->noDoc;?></span></p>
</div>
<?php else:?>
<div class="panel-body">
<div class="row row-grid files-grid" data-size="300">
<?php foreach($modules as $module):?>
@@ -44,5 +49,6 @@
</div>
</div>
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
<?php endif;?>
</div>
</div>
+1 -1
View File
@@ -76,7 +76,7 @@
</td>
</tr>
<tr>
<td colspan='3' class='text-center'>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . ' ' . html::backButton('', '', 'btn btn-wide') . html::hidden('lib', $libID);?>
</td>
</tr>
+2 -2
View File
@@ -23,7 +23,7 @@
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->doc->libType?></th>
<td><?php echo html::select('libType', $libTypeList, $type, "class='form-control chosen-simple'")?></td>
<td><?php echo html::select('libType', $libTypeList, $type, "class='form-control'")?></td>
</tr>
<tr class='product'>
<th><?php echo $lang->doc->product?></th>
@@ -55,7 +55,7 @@
</td>
</tr>
<tr>
<td class='text-center' colspan='2'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?></td>
<td class='text-center form-actions' colspan='2'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?></td>
</tr>
</table>
</form>
+1 -1
View File
@@ -73,7 +73,7 @@
</td>
</tr>
<tr>
<td colspan='3' class='text-center'>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary') . ' ' . html::backButton('', '', 'btn btn-wide');?>
</td>
</tr>
+1 -1
View File
@@ -56,7 +56,7 @@
</td>
</tr>
<tr>
<td class='text-center' colspan='2'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?></td>
<td class='text-center form-actions' colspan='2'><?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?></td>
</tr>
</table>
</form>
+1 -1
View File
@@ -11,7 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div class='main-row split-row' id='mainRow'>
<div class='main-row split-row fade' id='mainRow'>
<?php include './side.html.php';?>
<div class="main-col" data-min-width="400">
<div class="row">
+1 -1
View File
@@ -39,7 +39,7 @@
<?php endforeach;?>
</div>
<div>
<?php echo html::submitButton($lang->save);?>
<?php echo html::submitButton($lang->save);?> &nbsp;
<?php echo html::commonButton($lang->cancel, '', "btn close-dropdown");?>
</div>
</form>
+11 -11
View File
@@ -11,7 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div class="main-row <?php if($this->from == 'doc') echo 'split-row';?>" id="mainRow">
<div class="main-row fade <?php if($this->from == 'doc') echo 'split-row';?>" id="mainRow">
<?php if($this->from == 'doc'):?>
<?php include './side.html.php';?>
<div class="col-spliter"></div>
@@ -41,8 +41,8 @@
</form>
</div>
<div class="btn-group">
<?php echo html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=list"), "<i class='icon icon-bars'></i>" , '', "title={$lang->doc->browseTypeList['list']} class='btn btn-icon text-primary'");?>
<?php echo html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=card"), "<i class='icon icon-cards-view'></i>", '', "title={$lang->doc->browseTypeList['grid']} class='btn btn-icon'");?>
<?php echo html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=list"), "<i class='icon icon-bars'></i>" , '', "title={$lang->doc->browseTypeList['list']} class='btn btn-icon" . ($viewType == 'list' ? ' text-primary' : '') . "'");?>
<?php echo html::a(inlink('showFiles', "type=$type&objectID=$objectID&viewType=card"), "<i class='icon icon-cards-view'></i>", '', "title={$lang->doc->browseTypeList['grid']} class='btn btn-icon" . ($viewType != 'list' ? ' text-primary' : '') . "'");?>
</div>
</nav>
</div>
@@ -51,7 +51,7 @@
<div class="panel-body has-table">
<table class="table table-borderless table-hover table-files">
<thead>
<tr class="muted">
<tr class="text-center">
<th class="w-80px"><?php echo $lang->doc->id;?></th>
<th><?php echo $lang->doc->fileTitle;?></th>
<th><?php echo $lang->doc->filePath;?></th>
@@ -66,16 +66,16 @@
<?php foreach($files as $file):?>
<?php if(empty($file->pathname)) continue;?>
<tr>
<td><?php echo $file->id;?></td>
<td>
<td class="text-center"><?php echo sprintf('%03d', $file->id);?></td>
<td class="c-url">
<a href='<?php echo $this->createLink($file->objectType, 'view', "objectID=$file->objectID");?>'><?php echo $file->title . ' [' . strtoupper($file->objectType) . ' #' . $file->objectID . ']';?></a>
</td>
<td> <?php echo $file->pathname;?> </td>
<td><?php echo $file->extension;?></td>
<td class="text-center"><?php echo $file->extension;?></td>
<td><?php echo number_format($file->size / 1024 , 1) . 'K';?></td>
<td><?php echo isset($file->addedBy) ? zget($users, $file->addedBy) : '';?></td>
<td><?php echo isset($file->addedDate) ? substr($file->addedDate, 0, 10) : '';?></td>
<td>
<td class="text-center"><?php echo isset($file->addedBy) ? zget($users, $file->addedBy) : '';?></td>
<td class="text-center"><?php echo isset($file->addedDate) ? substr($file->addedDate, 0, 10) : '';?></td>
<td class="c-actions">
<?php
common::printLink('file', 'download', "fileID=$file->id", $lang->doc->download, "data-toggle='modal'", '', true, false, $file);
common::printLink('file', 'delete', "fileID=$file->id", $lang->delete, 'hiddenwin', '', true, false, $file);
@@ -112,7 +112,7 @@
$downloadLink = $this->createLink('file', 'download', "fileID=$file->id&mouse=left");
if(in_array($file->extension, $config->file->imageExtensions))
{
echo "<div class='file-path'><img src='$file->webPath'/></div>";
echo "<div class='img-holder' style='background-image: url($file->webPath)'><img src='$file->webPath'/></div>";
}
else
{
+4
View File
@@ -23,6 +23,7 @@ $lang->file->applyTemplate = "應用模板";
$lang->file->tplTitle = "模板名稱";
$lang->file->setPublic = "設置公共模板";
$lang->file->exportFields = "要導出欄位";
$lang->file->exportRange = "要導出的數據";
$lang->file->defaultTPL = "預設模板";
$lang->file->setExportTPL = "設置";
$lang->file->preview = "預覽";
@@ -32,8 +33,11 @@ $lang->file->uploadSuccess = '上傳成功';
$lang->file->pathname = '路徑';
$lang->file->title = '標題';
$lang->file->fileName = '檔案名';
$lang->file->untitled = '未命名';
$lang->file->extension = '副檔名';
$lang->file->size = '大小';
$lang->file->encoding = '編碼';
$lang->file->addedBy = '由誰添加';
$lang->file->addedDate = '添加時間';
$lang->file->downloads = '下載次數';
+39 -34
View File
@@ -1,50 +1,55 @@
<?php include '../../common/view/header.lite.html.php';?>
<?php js::set('fileID', $file->id);?>
<style>
#imageFile{text-align: center;padding:10px;}
#imageFile{text-align: center; padding: 0; margin: 0 -10px;}
#imageFile img{max-width:100%;}
#txtFile{padding: 5px 10px;}
#txtFile div{overflow-x: auto;}
#txtFile {padding: 5px 0; margin: 0 -10px;}
#txtFile pre {margin: 0;}
#txtFile div {overflow-x: auto;}
#titlebar span{float: right; padding-right: 25px;}
.main-header .btn-toolbar{margin-left:8px;}
</style>
<div id='mainContent' class='main-content'>
<div class='main-header clearfix'>
<h2 class='pull-left'><?php echo $lang->file->preview;?></h2>
<?php if($fileType == 'txt'):?>
<div class='btn-toolbar pull-left w-120px'><?php echo html::select('charset', $config->file->charset, $charset, "onchange='setCharset(this.value)' class='form-control'");?></div>
<?php endif;?>
</div>
<?php if($fileType == 'image'):?>
<div id='imageFile'><?php echo html::image($this->createLink('file', 'read', "fileID=$file->id"));?></div>
<?php else:?>
<div id='txtFile'>
<?php
$fileContent = file_get_contents($file->realPath);
if($charset != $config->charset)
{
$fileContent = helper::convertEncoding($fileContent, $charset . "//IGNORE", $config->charset);
}
else
{
if(extension_loaded('mbstring'))
<main id="main">
<div class="container">
<div id='mainContent' class='main-content'>
<div class='main-header clearfix'>
<h2 class='pull-left'><?php echo $lang->file->preview;?></h2>
<?php if($fileType == 'txt'):?>
<div class='btn-toolbar pull-left w-120px'><?php echo html::select('charset', $config->file->charset, $charset, "onchange='setCharset(this.value)' class='form-control'");?></div>
<?php endif;?>
</div>
<?php if($fileType == 'image'):?>
<div id='imageFile'><?php echo html::image($this->createLink('file', 'read', "fileID=$file->id"));?></div>
<?php else:?>
<div id='txtFile'>
<?php
$fileContent = file_get_contents($file->realPath);
if($charset != $config->charset)
{
$encoding = mb_detect_encoding($fileContent, array('ASCII', 'UTF-8', 'GB2312', 'GBK', 'BIG5'));
if($encoding != 'UTF-8') $fileContent = helper::convertEncoding($fileContent, $encoding, $config->charset);
$fileContent = helper::convertEncoding($fileContent, $charset . "//IGNORE", $config->charset);
}
else
{
$encoding = 'UTF-8';
if($config->default->lang == 'zh-cn') $encoding = 'GBK';
if($config->default->lang == 'zh-tw') $encoding = 'BIG5';
$fileContent = helper::convertEncoding($fileContent, $encoding, $config->charset);
if(extension_loaded('mbstring'))
{
$encoding = mb_detect_encoding($fileContent, array('ASCII', 'UTF-8', 'GB2312', 'GBK', 'BIG5'));
if($encoding != 'UTF-8') $fileContent = helper::convertEncoding($fileContent, $encoding, $config->charset);
}
else
{
$encoding = 'UTF-8';
if($config->default->lang == 'zh-cn') $encoding = 'GBK';
if($config->default->lang == 'zh-tw') $encoding = 'BIG5';
$fileContent = helper::convertEncoding($fileContent, $encoding, $config->charset);
}
}
}
echo "<pre>" . htmlspecialchars($fileContent) . "</pre>";
?>
echo "<pre>" . htmlspecialchars($fileContent) . "</pre>";
?>
</div>
<?php endif;?>
</div>
</div>
<?php endif;?>
</div>
</main>
<script>
function setCharset(charset)
{
+22 -22
View File
@@ -11,10 +11,7 @@
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<style>
body{padding-bottom:0px}
</style>
<style>.main-form {margin: 15px -15px 0}</style>
<script>
function setFileName()
{
@@ -28,23 +25,26 @@ function closeWindow()
clearInterval(time);
}
</script>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2><?php echo $lang->file->inputFileName;?></h2>
<main id="main">
<div class="container">
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2><?php echo $lang->file->inputFileName;?></h2>
</div>
<form class='main-form' method='post' target='hiddenwin' onsubmit='setFileName();'>
<table class='table table-form'>
<tr>
<td>
<div class='input-group'>
<?php echo html::input('fileName', $file->title, "class='form-control' autocomplete='off'");?>
<strong class='input-group-addon'>.<?php echo $file->extension;?></strong>
</div>
</td>
<td class='w-80px'><?php echo html::submitButton('', '', 'btn btn-primary btn-block');?></td>
</tr>
</table>
</form>
</div>
</div>
<form class='main-form' method='post' target='hiddenwin' onsubmit='setFileName();'>
<table class='table table-form'>
<tr>
<td>
<div class='input-group'>
<?php echo html::input('fileName', $file->title, "class='form-control' autocomplete='off'");?>
<strong class='input-group-addon'>.<?php echo $file->extension;?></strong>
</div>
</td>
<td class='w-80px'><?php echo html::submitButton();?></td>
</tr>
</table>
</form>
</div>
</main>
<?php include '../../common/view/footer.lite.html.php';?>
+3 -3
View File
@@ -156,15 +156,15 @@ if($isCustomExport)
</tr>
<tr>
<th><?php echo $lang->file->extension;?></th>
<td><?php echo html::select('fileType', $lang->exportFileTypeList, '', 'onchange=switchEncode(this.value) class="form-control chosen-simple"');?></td>
<td><?php echo html::select('fileType', $lang->exportFileTypeList, '', 'onchange=switchEncode(this.value) class="form-control"');?></td>
</tr>
<tr>
<th><?php echo $lang->file->encoding;?></th>
<td><?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', key($lang->exportFileTypeList) == 'csv' ? "class='form-control chosen-simple'" : "class='form-control chosen-simple'");?></td>
<td><?php echo html::select('encode', $config->charsets[$this->cookie->lang], 'utf-8', key($lang->exportFileTypeList) == 'csv' ? "class='form-control'" : "class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->file->exportRange;?></th>
<td><?php echo html::select('exportType', $lang->exportTypeList, 'all', "class='form-control chosen-simple'");?></td>
<td><?php echo html::select('exportType', $lang->exportTypeList, 'all', "class='form-control'");?></td>
</tr>
<?php if($isCustomExport):?>
<tr>
+6 -10
View File
@@ -8,14 +8,10 @@ $sessionString .= session_name() . '=' . session_id();
<div class="detail-title"><?php echo $lang->file->common;?> <i class="icon icon-paper-clip icon-sm"></i></div>
<div class="detail-content">
<?php endif;?>
<style>
.files-list>li>a {display: inline;}
</style>
<style>
.files-list>li>a {display: inline;}
</style>
<script>
$(function(){
$(".edit").modalTrigger({width:350, type:'iframe'});
})
/* Delete a file. */
function deleteFile(fileID)
{
@@ -81,9 +77,9 @@ $sessionString .= session_name() . '=' . session_id();
echo html::a($this->createLink('file', 'download', "fileID=$file->id") . $sessionString, $fileTitle . " ({$fileSize})", '_blank', "onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth)\"");
echo "<span class='right-icon'>";
common::printLink('file', 'edit', "fileID=$file->id", "<i class='icon-pencil'></i>", '', "class='edit btn-icon' title='{$lang->file->edit}'");
if(common::hasPriv('file', 'delete')) echo html::a('###', "<i class='icon-trash'></i>", '', "class='btn-icon' onclick='deleteFile($file->id)' title='$lang->delete'");
echo "<span class='right-icon'>&nbsp; ";
common::printLink('file', 'edit', "fileID=$file->id", "<i class='icon-pencil'></i>", '', "data-width='400' class='edit iframe text-primary' title='{$lang->file->edit}'");
if(common::hasPriv('file', 'delete')) echo html::a('###', "<i class='icon-trash'></i>", '', "class='text-primary' onclick='deleteFile($file->id)' title='$lang->delete'");
echo '</span>';
echo '</li>';
}
+1 -1
View File
@@ -19,7 +19,7 @@ $lang->group->manageView = 'View';
$lang->group->managePriv = 'Batch Assign Privileges';
$lang->group->managePrivByGroup = 'Privilege';
$lang->group->managePrivByModule = 'Module Privileges';
$lang->group->byModuleTips = '<span class="tips">(Press shift/control to multi-select)</span>';
$lang->group->byModuleTips = '<span class="tips">(Press Shift/Ctrl to Multi-select)</span>';
$lang->group->manageMember = 'Member';
$lang->group->confirmDelete = 'Do you want to delete this User Group?';
$lang->group->successSaved = 'Saved!';
+1 -1
View File
@@ -19,7 +19,7 @@ $lang->group->manageView = '视图维护';
$lang->group->managePriv = '权限维护';
$lang->group->managePrivByGroup = '权限维护';
$lang->group->managePrivByModule = '按模块分配权限';
$lang->group->byModuleTips = '<span class="tips">(可以按住shift或者control键进行多选)</span>';
$lang->group->byModuleTips = '<span class="tips">(可以按住Shift或者Ctrl键进行多选)</span>';
$lang->group->manageMember = '成员维护';
$lang->group->confirmDelete = '您确定删除该用户分组吗?';
$lang->group->successSaved = '成功保存';
+1 -1
View File
@@ -19,7 +19,7 @@ $lang->group->manageView = '視圖維護';
$lang->group->managePriv = '權限維護';
$lang->group->managePrivByGroup = '權限維護';
$lang->group->managePrivByModule = '按模組分配權限';
$lang->group->byModuleTips = '<span class="tips">(可以按住shift或者control鍵進行多選)</span>';
$lang->group->byModuleTips = '<span class="tips">(可以按住Shift或者Control鍵進行多選)</span>';
$lang->group->manageMember = '成員維護';
$lang->group->confirmDelete = '您確定刪除該用戶分組嗎?';
$lang->group->successSaved = '成功保存';
+35 -35
View File
@@ -23,47 +23,47 @@
<?php endif;?>
</div>
</div>
<div id='mainContent' class='main-content'>
<div id='mainContent' class='main-table'>
<table class='table' id='groupList'>
<thead>
<tr>
<th class='w-id text-center'><?php echo $lang->group->id;?></th>
<th class='w-100px'><?php echo $lang->group->name;?></th>
<th class='w-300px'><?php echo $lang->group->desc;?></th>
<th><?php echo $lang->group->users;?></th>
<th class='c-actions text-center'><?php echo $lang->actions;?></th>
<th class='w-id text-center'><?php echo $lang->group->id;?></th>
<th class='w-130px'><?php echo $lang->group->name;?></th>
<th class='w-300px'><?php echo $lang->group->desc;?></th>
<th><?php echo $lang->group->users;?></th>
<th class='c-actions text-center'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($groups as $group):?>
<?php $users = implode(',', $groupUsers[$group->id]);?>
<tr>
<td class='text-center'><?php echo $group->id;?></td>
<td><?php echo $group->name;?></td>
<td title='<?php echo $group->desc?>'><?php echo $group->desc;?></td>
<td title='<?php echo $users;?>'><?php echo $users;?></td>
<td class='c-actions'>
<?php $lang->group->managepriv = $lang->group->managePrivByGroup;?>
<?php common::printIcon('group', 'manageView', "groupID=$group->id", $group, 'list', 'eye');?>
<?php common::printIcon('group', 'managepriv', "type=byGroup&param=$group->id", $group, 'list', 'lock');?>
<?php $lang->group->managemember = $lang->group->manageMember;?>
<?php common::printIcon('group', 'managemember', "groupID=$group->id", $group, 'list', 'persons', '', 'iframe', 'yes', "data-width='750'");?>
<?php common::printIcon('group', 'edit', "groupID=$group->id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?>
<?php common::printIcon('group', 'copy', "groupID=$group->id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?>
<?php
if(common::hasPriv('group', 'delete') and $group->role != 'limited')
{
$deleteURL = $this->createLink('group', 'delete', "groupID=$group->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete)", '<i class="icon icon-trash"></i>', '', "title='{$lang->group->delete}' class='btn'");
}
else
{
echo "<button class='btn disabled'><i class='icon icon-trash disabled' title='{$lang->group->delete}'></i></button>";
}
?>
</td>
</tr>
<?php endforeach;?>
<?php foreach($groups as $group):?>
<?php $users = implode(',', $groupUsers[$group->id]);?>
<tr>
<td class='text-center'><?php echo $group->id;?></td>
<td><?php echo $group->name;?></td>
<td title='<?php echo $group->desc?>'><?php echo $group->desc;?></td>
<td title='<?php echo $users;?>'><?php echo $users;?></td>
<td class='c-actions'>
<?php $lang->group->managepriv = $lang->group->managePrivByGroup;?>
<?php common::printIcon('group', 'manageView', "groupID=$group->id", $group, 'list', 'eye');?>
<?php common::printIcon('group', 'managepriv', "type=byGroup&param=$group->id", $group, 'list', 'lock');?>
<?php $lang->group->managemember = $lang->group->manageMember;?>
<?php common::printIcon('group', 'managemember', "groupID=$group->id", $group, 'list', 'persons', '', 'iframe', 'yes', "data-width='750'");?>
<?php common::printIcon('group', 'edit', "groupID=$group->id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?>
<?php common::printIcon('group', 'copy', "groupID=$group->id", $group, 'list', '', '', 'iframe', 'yes', "data-width='550'");?>
<?php
if(common::hasPriv('group', 'delete') and $group->role != 'limited')
{
$deleteURL = $this->createLink('group', 'delete', "groupID=$group->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"groupList\", confirmDelete)", '<i class="icon icon-trash"></i>', '', "title='{$lang->group->delete}' class='btn'");
}
else
{
echo "<button class='btn disabled'><i class='icon icon-trash disabled' title='{$lang->group->delete}'></i></button>";
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
+1 -1
View File
@@ -59,7 +59,7 @@
</td>
</tr>
<tr>
<td class='text-center' colspan='2'>
<td class='text-center form-actions' colspan='2'>
<?php
echo html::submitButton('', '', 'btn btn-wide btn-primary');
echo html::linkButton($lang->goback, $this->createLink('group', 'browse'));
+3 -3
View File
@@ -53,17 +53,17 @@
</tr>
<tr id='productBox' style='display:none'>
<th class='text-right'><?php echo $lang->group->productList?></th>
<td><?php echo html::select("actions[products][]", $products, isset($group->acl['products']) ? join(',', $group->acl['products']) : '', "class='chosen' multiple")?></td>
<td><?php echo html::select("actions[products][]", $products, isset($group->acl['products']) ? join(',', $group->acl['products']) : '', "class='form-control chosen' multiple")?></td>
<td><?php echo $lang->group->noticeVisit?></td>
</tr>
<tr id='projectBox' style='display:none'>
<th class='text-right'><?php echo $lang->group->projectList?></th>
<td><?php echo html::select("actions[projects][]", $projects, isset($group->acl['projects']) ? join(',', $group->acl['projects']) : '', "class='chosen' multiple")?></td>
<td><?php echo html::select("actions[projects][]", $projects, isset($group->acl['projects']) ? join(',', $group->acl['projects']) : '', "class='form-control chosen' multiple")?></td>
<td><?php echo $lang->group->noticeVisit?></td>
</tr>
<tr>
<th><span class='hidden'><?php echo html::selectAll('', 'checkbox')?></span></th>
<td colspan='2'>
<td colspan='2' class='form-actions'>
<?php echo html::submitButton('', "onclick='setNoChecked()'", 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
<?php echo html::hidden('foo'); // Just a hidden var, to make sure $_POST is not empty.?>

Some files were not shown because too many files have changed in this diff Show More