Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
iamazhi
2013-08-08 15:51:04 +08:00
80 changed files with 989 additions and 440 deletions
+2
View File
@@ -134,6 +134,7 @@ define('TABLE_FILE', '`' . $config->db->prefix . 'file`');
define('TABLE_HISTORY', '`' . $config->db->prefix . 'history`');
define('TABLE_EXTENSION', '`' . $config->db->prefix . 'extension`');
define('TABLE_WEBAPP', '`' . $config->db->prefix . 'webapp`');
define('TABLE_CUSTOM', '`' . $config->db->prefix . 'custom`');
$config->objectTables['product'] = TABLE_PRODUCT;
$config->objectTables['story'] = TABLE_STORY;
@@ -150,6 +151,7 @@ $config->objectTables['user'] = TABLE_USER;
$config->objectTables['doc'] = TABLE_DOC;
$config->objectTables['doclib'] = TABLE_DOCLIB;
$config->objectTables['todo'] = TABLE_TODO;
$config->objectTables['custom'] = TABLE_CUSTOM;
/* Include extension config files. */
$extConfigFiles = glob($configRoot . 'ext/*.php');
+12 -7
View File
@@ -1,7 +1,12 @@
REATE TABLE `demoTTT`.`zt_customLang` (
`id` MEDIUMINT( 8 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`lang` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`module` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`key` VARCHAR( 60 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`value` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL
) ENGINE = MYISAM;
CREATE TABLE IF NOT EXISTS `zt_custom` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`lang` varchar(30) NOT NULL,
`module` varchar(30) NOT NULL,
`section` varchar(30) NOT NULL,
`key` varchar(60) NOT NULL,
`value` text NOT NULL,
`system` enum('0','1') NOT NULL default '1',
PRIMARY KEY (`id`),
UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+14
View File
@@ -1218,6 +1218,7 @@ class router
/* If the not strict mode, the keys of passed params and defaaul params msut be the same. */
if(!isset($this->config->strictParams) or $this->config->strictParams == false)
{
unset($passedParams['onlybody']);
$passedParams = array_values($passedParams);
$i = 0;
foreach($defaultParams as $key => $defaultValue)
@@ -1463,6 +1464,19 @@ class router
$loadedLangs[] = $langFile;
}
/* Merge from the db lang. */
if($moduleName != 'common' and isset($lang->db->custom[$moduleName]))
{
foreach($lang->db->custom[$moduleName] as $section => $fields)
{
foreach($fields as $key => $value)
{
unset($lang->{$moduleName}->{$section}[$key]);
$lang->{$moduleName}->{$section}[$key] = $value;
}
}
}
$this->lang = $lang;
return $lang;
}
+56 -16
View File
@@ -61,7 +61,7 @@ class bug extends control
* @access public
* @return void
*/
public function browse($productID = 0, $browseType = 'byModule', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($productID = 0, $browseType = 'all', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Set browseType, productID, moduleID and queryID. */
$browseType = strtolower($browseType);
@@ -148,21 +148,21 @@ class bug extends control
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
$position[] = $this->lang->bug->common;
$this->view->title = $title;
$this->view->position = $position;
$this->view->productID = $productID;
$this->view->productName = $this->products[$productID];
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'));
$this->view->browseType = $browseType;
$this->view->bugs = $bugs;
$this->view->users = $users;
$this->view->pager = $pager;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->moduleID = $moduleID;
$this->view->customed = $customed;
$this->view->customFields= explode(',', str_replace(' ', '', trim($customFields)));
$this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
$this->view->title = $title;
$this->view->position = $position;
$this->view->productID = $productID;
$this->view->productName = $this->products[$productID];
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID);
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $startModuleID = 0, array('treeModel', 'createBugLink'));
$this->view->browseType = $browseType;
$this->view->bugs = $bugs;
$this->view->users = $users;
$this->view->pager = $pager;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->moduleID = $moduleID;
$this->view->customed = $customed;
$this->view->customFields = explode(',', str_replace(' ', '', trim($customFields)));
$this->display();
}
@@ -668,6 +668,25 @@ class bug extends control
$this->view->actions = $this->action->getList('bug', $bugID);
$this->display();
}
/**
* Batch confirm bugs.
*
* @access public
* @return void
*/
public function batchConfirm()
{
$bugIDList = $this->post->bugIDList ? $this->post->bugIDList : die(js::locate($this->session->bugList, 'parent'));
$this->bug->batchConfirm($bugIDList);
if(dao::isError()) die(js::error(dao::getError()));
foreach($bugIDList as $bugID)
{
$actionID = $this->action->create('bug', $bugID, 'bugConfirmed');
$this->sendmail($bugID, $actionID);
}
die(js::locate($this->session->bugList, 'parent'));
}
/**
* Resolve a bug.
@@ -711,6 +730,27 @@ class bug extends control
$this->display();
}
/**
* Batch resolve bugs.
*
* @param string $resolution
* @param string $resolvedBuild
* @access public
* @return void
*/
public function batchResolve($resolution, $resolvedBuild = '')
{
$bugIDList = $this->post->bugIDList ? $this->post->bugIDList : die(js::locate($this->session->bugList, 'parent'));
$this->bug->batchResolve($bugIDList, $resolution, $resolvedBuild);
if(dao::isError()) die(js::error(dao::getError()));
foreach($bugIDList as $bugID)
{
$actionID = $this->action->create('bug', $bugID, 'Resolved', '', $resolution);
$this->sendmail($bugID, $actionID);
}
die(js::locate($this->session->bugList, 'parent'));
}
/**
* Activate a bug.
*
-10
View File
@@ -1,13 +1,3 @@
/* Browse by module. */
function browseByModule(active)
{
$('#treebox').removeClass('hidden');
$('.divider').removeClass('hidden');
$('#bymoduleTab').addClass('active');
$('#querybox').addClass('hidden');
$('#' + active + 'Tab').removeClass('active');
}
$(document).ready(function()
{
$("a.customFields").colorbox({width:540, height:340, iframe:true, transition:'none'});
+2
View File
@@ -73,12 +73,14 @@ $lang->bug->index = 'Index';
$lang->bug->create = 'Create Bug';
$lang->bug->batchCreate = 'Batch create';
$lang->bug->confirmBug = 'Confirm Bug';
$lang->bug->batchConfirm = 'Batch confirm';
$lang->bug->edit = 'Edit Bug';
$lang->bug->batchEdit = 'Batch edit';
$lang->bug->assignTo = 'Assign';
$lang->bug->browse = 'Browse Bug';
$lang->bug->view = 'Bug Info';
$lang->bug->resolve = 'Resolve';
$lang->bug->barchResolve = 'batchResolve';
$lang->bug->close = 'Close';
$lang->bug->activate = 'Activate';
$lang->bug->reportChart = 'Report';
+3 -1
View File
@@ -73,16 +73,18 @@ $lang->bug->index = '首页';
$lang->bug->create = '提Bug';
$lang->bug->batchCreate = '批量添加';
$lang->bug->confirmBug = '确认';
$lang->bug->batchConfirm = '批量确认';
$lang->bug->edit = '编辑';
$lang->bug->batchEdit = '批量编辑';
$lang->bug->assignTo = '指派';
$lang->bug->browse = 'Bug列表';
$lang->bug->view = 'Bug详情';
$lang->bug->resolve = '解决';
$lang->bug->batchResolve = '批量解决';
$lang->bug->close = '关闭';
$lang->bug->activate = '激活';
$lang->bug->reportChart = '报表统计';
$lang->bug->export = '导出';
$lang->bug->export = '导出数据';
$lang->bug->delete = '删除';
$lang->bug->saveTemplate = '保存模板';
$lang->bug->deleteTemplate = '删除模板';
+57
View File
@@ -393,6 +393,31 @@ class bugModel extends model
$this->dao->update(TABLE_BUG)->data($bug)->where('id')->eq($bugID)->exec();
}
/**
* Batch confirm bugs.
*
* @param array $bugIDList
* @access public
* @return void
*/
public function batchConfirm($bugIDList)
{
$now = helper::now();
foreach($bugIDList as $bugID)
{
$oldBug = $this->getById($bugID);
if($oldBug->confirmed) continue;
$bug = new stdclass();
$bug->assignedTo = $this->app->user->account;
$bug->lastEditedBy = $this->app->user->account;
$bug->lastEditedDate = $now;
$bug->confirmed = 1;
$this->dao->update(TABLE_BUG)->data($bug)->where('id')->eq($bugID)->exec();
}
}
/**
* Resolve a bug.
*
@@ -426,6 +451,38 @@ class bugModel extends model
->exec();
}
/**
* Batch resolve bugs.
*
* @param array $bugIDList
* @param string $resolution
* @param string $resolvedBuild
* @access public
* @return void
*/
public function batchResolve($bugIDList, $resolution, $resolvedBuild)
{
$now = helper::now();
foreach($bugIDList as $bugID)
{
$oldBug = $this->getById($bugID);
if($oldBug->status != 'active') continue;
$bug = new stdClass();
$bug->resolution = $resolution;
$bug->resolvedBuild = $resolution == 'fixed' ? $resolvedBuild : '';
$bug->resolvedBy = $this->app->user->account;
$bug->resolvedDate = $now;
$bug->status = 'resolved';
$bug->confirmed = 1;
$bug->assignedTo = $oldBug->openedBy;
$bug->assignedDate = $now;
$bug->lastEditedBy = $this->app->user->account;
$bug->lastEditedDate = $now;
$this->dao->update(TABLE_BUG)->data($bug)->where('id')->eq($bugID)->exec();
}
}
/**
* Activate a bug.
*
+86 -12
View File
@@ -14,6 +14,7 @@
include '../../common/view/header.html.php';
include '../../common/view/treeview.html.php';
include '../../common/view/colorize.html.php';
include '../../common/view/dropmenu.html.php';
js::set('browseType', $browseType);
js::set('moduleID', $moduleID);
js::set('customed', $customed);
@@ -22,7 +23,7 @@ js::set('customed', $customed);
<div id='featurebar'>
<div class='f-left'>
<?php
echo "<span id='bymoduleTab' onclick=\"browseByModule('$browseType')\"><a href='#'>" . $lang->bug->moduleBugs . "</a></span> ";
echo "<span id='allTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all&param=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . "</span>";
echo "<span id='assigntomeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToMe&param=0"), $lang->bug->assignToMe) . "</span>";
echo "<span id='openedbymeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=openedByMe&param=0"), $lang->bug->openedByMe) . "</span>";
echo "<span id='resolvedbymeTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=resolvedByMe&param=0"), $lang->bug->resolvedByMe) . "</span>";
@@ -31,21 +32,35 @@ js::set('customed', $customed);
echo "<span id='unclosedTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=unclosed&param=0"), $lang->bug->unclosed) . "</span>";
echo "<span id='longlifebugsTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=longLifeBugs&param=0"), $lang->bug->longLifeBugs) . "</span>";
echo "<span id='postponedbugsTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=postponedBugs&param=0"), $lang->bug->postponedBugs) . "</span>";
echo "<span id='allTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all&param=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . "</span>";
echo "<span id='needconfirmTab'>" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=needconfirm&param=0"), $lang->bug->needConfirm) . "</span>";
echo "<span id='bysearchTab'><a href='#'><span class='icon-search'></span>{$lang->bug->byQuery}</a></span> ";
?>
</div>
<div class='f-right'>
<?php
echo '<span class="link-button dropButton">';
echo html::a("#", "&nbsp;", '', "id='exportAction' class='icon-green-common-export' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo html::a("#", $lang->export, '', "id='exportAction' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo '</span>';
common::printIcon('bug', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID");
if($browseType != 'needconfirm') common::printIcon('bug', 'export', "productID=$productID&orderBy=$orderBy");
common::printIcon('bug', 'customFields');
common::printIcon('bug', 'batchCreate', "productID=$productID&projectID=0&moduleID=$moduleID");
common::printIcon('bug', 'create', "productID=$productID&extra=moduleID=$moduleID");
?>
</div>
</div>
<div id='exportActionMenu' class='listMenu hidden'>
<ul>
<?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>";
?>
</ul>
</div>
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'></div>
<?php
@@ -58,10 +73,10 @@ js::set('customed', $customed);
?>
<div class='treeSlider'><span>&nbsp;</span></div>
<form method='post' action='<?php echo inLink('batchEdit', "productID=$productID");?>'>
<form method='post'>
<table class='cont-lt1'>
<tr valign='top'>
<td class='side <?php echo $treeClass;?>' id='treebox'>
<td class='side' id='treebox'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'>
<?php echo $moduleTree;?>
@@ -71,7 +86,7 @@ js::set('customed', $customed);
</div>
</div>
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td class='divider'></td>
<td>
<table class='table-1 fixed colored tablesorter datatable' id='bugList'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
@@ -110,14 +125,11 @@ js::set('customed', $customed);
</tr>
</thead>
<tbody>
<?php $canBatchEdit = common::hasPriv('bug', 'batchEdit');?>
<?php foreach($bugs as $bug):?>
<?php $bugLink = inlink('view', "bugID=$bug->id");?>
<tr class='a-center'>
<td class='<?php echo $bug->status;?>' style="font-weight:bold">
<?php if($canBatchEdit):?>
<input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>'/>
<?php endif;?>
<?php echo html::a($bugLink, sprintf('%03d', $bug->id));?>
</td>
<td><span class='<?php echo 'severity' . $bug->severity;?>'><?php echo $bug->severity;?></span></td>
@@ -170,11 +182,19 @@ js::set('customed', $customed);
if($browseType == 'needconfirm') $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 7 : 6;
?>
<td colspan='<?php echo $columns;?>'>
<?php if(!empty($bugs) and $canBatchEdit):?>
<?php if(!empty($bugs)):?>
<div class='f-left'>
<?php
echo html::selectAll() . html::selectReverse();
echo html::submitButton($lang->edit);
echo "<div class='groupButton'>";
echo html::selectAll() . html::selectReverse();
echo "</div>";
$actionLink = $this->createLink('bug', 'batchEdit', "productID=$productID");
$misc = common::hasPriv('bug', 'batchEdit') ? "onclick=setFormAction('$actionLink')" : "disabled='disabled'";
echo "<div class='groupButton dropButton'>";
echo html::commonButton($lang->edit, $misc);
echo "<button id='moreAction' type='button' onclick=\"toggleSubMenu(this.id, 'top', 0)\"><span class='caret'></span></button>";
echo "</div>";
?>
</div>
<?php endif?>
@@ -187,4 +207,58 @@ js::set('customed', $customed);
</tr>
</table>
</form>
<div id='moreActionMenu' class='listMenu hidden'>
<ul>
<?php
$class = "class='disabled'";
$actionLink = $this->createLink('bug', 'batchConfirm');
$misc = common::hasPriv('bug', 'batchConfirm') ? "onclick=setFormAction('$actionLink','hiddenwin')" : "class='disabled'";
echo "<li>" . html::a('#', $lang->bug->confirmBug, '', $misc) . "</li>";
$misc = common::hasPriv('bug', 'batchResolve') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='resolveItem'" : $class;
echo "<li>" . html::a('#', $lang->bug->resolve, '', $misc) . "</li>";
?>
</ul>
</div>
<div id='resolveItemMenu' class='hidden listMenu'>
<ul>
<?php
unset($lang->bug->resolutionList['']);
unset($lang->bug->resolutionList['duplicate']);
foreach($lang->bug->resolutionList as $key => $resolution)
{
$actionLink = $this->createLink('bug', 'batchResolve', "resolution=$key");
echo "<li>";
if($key == 'fixed')
{
echo html::a('#', $resolution, '', "onmouseover=toggleSubMenu(this.id,'right',2) id='fixedItem'");
}
else
{
echo html::a('#', $resolution, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
}
echo "</li>";
}
?>
</ul>
</div>
<div id='fixedItemMenu' class='hidden listMenu'>
<ul>
<?php
unset($builds['']);
foreach($builds as $key => $build)
{
$actionLink = $this->createLink('bug', 'batchResolve', "resolution=fixed&resolvedBuild=$key");
echo "<li>";
echo html::a('#', $build, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
echo "</li>";
}
?>
</ul>
</div>
<?php include '../../common/view/footer.html.php';?>
+3 -3
View File
@@ -22,11 +22,11 @@ js::set('page', 'confirmbug');
<caption><?php echo $bug->title;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->bug->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='text-3'");?></td>
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='select-2'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->bug->severity;?></th>
<td><?php echo html::select('severity', $lang->bug->severityList, $bug->severity, 'class=select-2');?></td>
<th class='rowhead'><?php echo $lang->bug->pri;?></th>
<td><?php echo html::select('pri', $lang->bug->priList, $bug->pri, 'class=select-2');?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->bug->mailto;?></td>
+4
View File
@@ -42,6 +42,10 @@ class build extends control
$orderBy = 'status_asc, stage_asc, id_desc';
$stories = $this->story->getProjectStories($projectID, $orderBy);
$bugs = $this->bug->getProjectBugs($projectID);
foreach($bugs as $key => $bug)
{
if($bug->status == 'closed') unset($bugs[$key]);
}
/* Assign. */
$project = $this->loadModel('project')->getById($projectID);
+3 -2
View File
@@ -125,8 +125,9 @@ class buildModel extends model
$this->dao->insert(TABLE_BUILD)->data($build)->autoCheck()->batchCheck($this->config->build->create->requiredFields, 'notempty')->check('name', 'unique', "product = {$build->product}")->exec();
if(!dao::isError())
{
$buildID = $this->dao->lastInsertID();
$this->updateLinkedBug($build);
return $this->dao->lastInsertID();
return $buildID;
}
}
@@ -186,7 +187,7 @@ class buildModel extends model
if(!$bugs) return false;
foreach($bugs as $bug)
{
if($bug->status == 'resolved') continue;
if($bug->status == 'resolved' or $bug->status == 'closed') continue;
$bug->resolvedBy = $resolvedPairs[$bug->id];
$bug->resolvedDate = $now;
+1 -1
View File
@@ -86,7 +86,7 @@
</td>
<td class='a-left nobr'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
<td class='w-80px'><?php echo $lang->bug->statusList[$bug->status];?></td>
<td class='w-80px'><?php echo $bug->status == 'resolved' ? $bug->resolvedBy : html::select('resolvedBy[]', $users, $this->app->user->account, "class='w-70px'");?></td>
<td class='w-80px'><?php echo $bug->status == 'resolved' ? substr($users[$bug->resolvedBy], 2) : html::select('resolvedBy[]', $users, $this->app->user->account, "class='w-70px'");?></td>
</tr>
<?php endforeach;?>
</table>
+1 -1
View File
@@ -105,7 +105,7 @@
<td class='w-id a-left' id='bug'><input type='checkbox' name='bugs[]' value="<?php echo $bug->id;?>" <?php if(strpos(',' . $build->bugs . ',', ',' . $bug->id . ',') !== false) echo 'checked';?>> <?php echo sprintf('%03d', $bug->id);?></td>
<td class='a-left nobr'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
<td class='w-80px'><?php echo $lang->bug->statusList[$bug->status];?></td>
<td class='w-80px'><?php echo $bug->status == 'resolved' ? $bug->resolvedBy : html::select('resolvedBy[]', $users, $this->app->user->account, "class='w-70px'");?></td>
<td class='w-80px'><?php echo ($bug->status == 'resolved' or $bug->status == 'closed') ? substr($users[$bug->resolvedBy], 2) : html::select('resolvedBy[]', $users, $this->app->user->account, "class='w-70px'");?></td>
</tr>
<?php endforeach;?>
</table>
+11 -8
View File
@@ -25,6 +25,7 @@ class common extends control
$this->common->setCompany();
$this->common->setUser();
$this->common->loadConfigFromDB();
$this->common->loadCustomFromDB();
if($this->app->getViewType() == 'mhtml') $this->common->setMobileMenu();
$this->app->loadLang('company');
}
@@ -163,18 +164,20 @@ class common extends control
if(empty($method)) $method = $app->getMethodName();
$className = 'header';
if(strpos($orderBy, $fieldName) !== false)
$order = explode('_', $orderBy);
$order[0] = trim($order[0], '`');
if($order[0] == $fieldName)
{
if(stripos($orderBy, 'desc') !== false)
if(isset($order[1]) and $order[1] == 'asc')
{
$orderBy = str_ireplace('desc', 'asc', $orderBy);
$className = 'headerSortUp';
}
elseif(stripos($orderBy, 'asc') !== false)
{
$orderBy = str_ireplace('asc', 'desc', $orderBy);
$orderBy = "`{$order[0]}`_desc";
$className = 'headerSortDown';
}
else
{
$orderBy = "`{$order[0]}`_asc";
$className = 'headerSortUp';
}
}
else
{
+24 -24
View File
@@ -270,32 +270,32 @@ $lang->user->menu = $lang->company->menu;
/* Admin menu. */
$lang->admin = new stdclass();
$lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => 'Index|admin|index');
$lang->admin->menu->extension = array('link' => 'Extension|extension|browse', 'subModule' => 'extension,editor');
$lang->admin->menu->customlang = array('link' => 'Custom lang|customlang|index', 'subModule' => 'customlang');
$lang->admin->menu->mail = array('link' => 'Email|mail|index', 'subModule' => 'mail');
$lang->admin->menu->clearData = array('link' => 'Clear data|admin|cleardata');
$lang->admin->menu->convert = array('link' => 'Import|convert|index', 'subModule' => 'convert');
$lang->admin->menu->trashes = array('link' => 'Trash|action|trash', 'subModule' => 'action');
$lang->admin->menu->sso = array('link' => 'SSO|sso|browse', 'subModule' => 'sso');
$lang->admin->menu->index = array('link' => 'Index|admin|index');
$lang->admin->menu->extension = array('link' => 'Extension|extension|browse', 'subModule' => 'extension,editor');
$lang->admin->menu->custom = array('link' => 'Custom|custom|index', 'subModule' => 'custom');
$lang->admin->menu->mail = array('link' => 'Email|mail|index', 'subModule' => 'mail');
$lang->admin->menu->clearData = array('link' => 'Clear data|admin|cleardata');
$lang->admin->menu->convert = array('link' => 'Import|convert|index', 'subModule' => 'convert');
$lang->admin->menu->trashes = array('link' => 'Trash|action|trash', 'subModule' => 'action');
$lang->admin->menu->sso = array('link' => 'SSO|sso|browse', 'subModule' => 'sso');
$lang->convert = new stdclass();
$lang->upgrade = new stdclass();
$lang->action = new stdclass();
$lang->extension = new stdclass();
$lang->customlang = new stdclass();
$lang->editor = new stdclass();
$lang->mail = new stdclass();
$lang->sso = new stdclass();
$lang->convert = new stdclass();
$lang->upgrade = new stdclass();
$lang->action = new stdclass();
$lang->extension = new stdclass();
$lang->custom = new stdclass();
$lang->editor = new stdclass();
$lang->mail = new stdclass();
$lang->sso = new stdclass();
$lang->convert->menu = $lang->admin->menu;
$lang->upgrade->menu = $lang->admin->menu;
$lang->action->menu = $lang->admin->menu;
$lang->extension->menu = $lang->admin->menu;
$lang->customlang->menu = $lang->admin->menu;
$lang->editor->menu = $lang->admin->menu;
$lang->mail->menu = $lang->admin->menu;
$lang->sso->menu = $lang->admin->menu;
$lang->convert->menu = $lang->admin->menu;
$lang->upgrade->menu = $lang->admin->menu;
$lang->action->menu = $lang->admin->menu;
$lang->extension->menu = $lang->admin->menu;
$lang->custom->menu = $lang->admin->menu;
$lang->editor->menu = $lang->admin->menu;
$lang->mail->menu = $lang->admin->menu;
$lang->sso->menu = $lang->admin->menu;
/* Groups. */
$lang->menugroup = new stdclass();
+14 -12
View File
@@ -108,17 +108,19 @@ $lang->user->menuOrder = $lang->company->menuOrder;
/* admin menu order. */
$lang->admin->menuOrder[5] = 'index';
$lang->admin->menuOrder[10] = 'extension';
$lang->admin->menuOrder[15] = 'customlang';
$lang->admin->menuOrder[15] = 'custom';
$lang->admin->menuOrder[20] = 'editor';
$lang->admin->menuOrder[25] = 'mail';
$lang->admin->menuOrder[30] = 'sso';
$lang->admin->menuOrder[35] = 'convert';
$lang->admin->menuOrder[40] = 'trashes';
$lang->convert->menuOrder = $lang->admin->menuOrder;
$lang->upgrade->menuOrder = $lang->admin->menuOrder;
$lang->action->menuOrder = $lang->admin->menuOrder;
$lang->extension->menuOrder = $lang->admin->menuOrder;
$lang->customlang->menuOrder = $lang->admin->menuOrder;
$lang->editor->menuOrder = $lang->admin->menuOrder;
$lang->mail->menuOrder = $lang->admin->menuOrder;
$lang->sso->menuOrder = $lang->admin->menuOrder;
$lang->admin->menuOrder[30] = 'custom';
$lang->admin->menuOrder[35] = 'sso';
$lang->admin->menuOrder[40] = 'convert';
$lang->admin->menuOrder[45] = 'trashes';
$lang->convert->menuOrder = $lang->admin->menuOrder;
$lang->upgrade->menuOrder = $lang->admin->menuOrder;
$lang->action->menuOrder = $lang->admin->menuOrder;
$lang->extension->menuOrder = $lang->admin->menuOrder;
$lang->custom->menuOrder = $lang->admin->menuOrder;
$lang->editor->menuOrder = $lang->admin->menuOrder;
$lang->mail->menuOrder = $lang->admin->menuOrder;
$lang->custom->menuOrder = $lang->admin->menuOrder;
$lang->sso->menuOrder = $lang->admin->menuOrder;
+18 -17
View File
@@ -270,32 +270,32 @@ $lang->user->menu = $lang->company->menu;
/* 后台管理菜单设置。*/
$lang->admin = new stdclass();
$lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => '首页|admin|index');
$lang->admin->menu->extension = array('link' => '扩展|extension|browse', 'subModule' => 'extension,editor');
$lang->admin->menu->customlang = array('link' => '语言配置|customlang|index', 'subModule' => 'customlang');
$lang->admin->menu->mail = array('link' => '发信|mail|index', 'subModule' => 'mail');
$lang->admin->menu->clearData = array('link' => '清除数据|admin|cleardata');
$lang->admin->menu->convert = array('link' => '导入|convert|index', 'subModule' => 'convert');
$lang->admin->menu->trashes = array('link' => '回收站|action|trash', 'subModule' => 'action');
$lang->admin->menu->sso = array('link' => '单点登录|sso|browse', 'subModule' => 'sso');
$lang->admin->menu->index = array('link' => '首页|admin|index');
$lang->admin->menu->extension = array('link' => '扩展|extension|browse', 'subModule' => 'extension,editor');
$lang->admin->menu->custom = array('link' => '自定义|custom|index', 'subModule' => 'custom');
$lang->admin->menu->mail = array('link' => '发信|mail|index', 'subModule' => 'mail');
$lang->admin->menu->clearData = array('link' => '清除数据|admin|cleardata');
$lang->admin->menu->convert = array('link' => '导入|convert|index', 'subModule' => 'convert');
$lang->admin->menu->trashes = array('link' => '回收站|action|trash', 'subModule' => 'action');
$lang->admin->menu->sso = array('link' => '单点登录|sso|browse', 'subModule' => 'sso');
$lang->convert = new stdclass();
$lang->upgrade = new stdclass();
$lang->action = new stdclass();
$lang->extension = new stdclass();
$lang->customlang = new stdclass();
$lang->custom = new stdclass();
$lang->editor = new stdclass();
$lang->mail = new stdclass();
$lang->sso = new stdclass();
$lang->convert->menu = $lang->admin->menu;
$lang->upgrade->menu = $lang->admin->menu;
$lang->action->menu = $lang->admin->menu;
$lang->extension->menu = $lang->admin->menu;
$lang->customlang->menu = $lang->admin->menu;
$lang->editor->menu = $lang->admin->menu;
$lang->mail->menu = $lang->admin->menu;
$lang->sso->menu = $lang->admin->menu;
$lang->convert->menu = $lang->admin->menu;
$lang->upgrade->menu = $lang->admin->menu;
$lang->action->menu = $lang->admin->menu;
$lang->extension->menu = $lang->admin->menu;
$lang->custom->menu = $lang->admin->menu;
$lang->editor->menu = $lang->admin->menu;
$lang->mail->menu = $lang->admin->menu;
$lang->sso->menu = $lang->admin->menu;
/* 菜单分组。*/
$lang->menugroup = new stdclass();
@@ -316,6 +316,7 @@ $lang->menugroup->dept = 'company';
$lang->menugroup->todo = 'my';
$lang->menugroup->action = 'admin';
$lang->menugroup->extension = 'admin';
$lang->menugroup->custom = 'admin';
$lang->menugroup->editor = 'admin';
$lang->menugroup->mail = 'admin';
$lang->menugroup->sso = 'admin';
+15
View File
@@ -118,6 +118,21 @@ class commonModel extends model
}
}
/**
* Load custom lang from db.
*
* @access public
* @return void
*/
public function loadCustomFromDB()
{
if(!$this->config->db->name) return;
$records = $this->loadModel('custom')->getAll();
if(!$records) return;
$this->lang->db = new stdclass();
$this->lang->db->custom = $records;
}
/**
* Juage a method of one module is open or not?
*
+3 -4
View File
@@ -132,14 +132,14 @@ $(function(){
<?php $this->action->printAction($action);?>
<?php if(!empty($action->history)) echo "<span id='switchButton$i' class='hand change-show' onclick=switchChange($i)>&nbsp;</span>";?>
</span>
<?php if($canEditComment):?>
<span class='link-button f-right comment<?php echo $action->id;?>'><?php echo html::a('#lastCommentBox', '&nbsp;', '', "class='icon-green-common-edit' onclick='toggleComment($action->id)'")?></span>
<?php endif;?>
<?php if(!empty($action->comment) or !empty($action->history)):?>
<?php if(!empty($action->comment)) echo "<div class='history'>";?>
<div class='changes hidden' id='changeBox<?php echo $i;?>'>
<?php echo $this->action->printChanges($action->objectType, $action->history);?>
</div>
<?php if($canEditComment):?>
<span class='link-button f-right comment<?php echo $action->id;?>'><?php echo html::a('#lastCommentBox', '&nbsp;', '', "class='icon-green-common-edit' onclick='toggleComment($action->id)'")?></span>
<?php endif;?>
<?php
if($action->comment)
{
@@ -148,7 +148,6 @@ $(function(){
echo "</div>";
}
?>
<?php if($canEditComment):?>
<div class='hidden' id='lastCommentBox'>
<form method='post' action='<?php echo $this->createLink('action', 'editComment', "actionID=$action->id")?>'>
+52
View File
@@ -0,0 +1,52 @@
<?php
$config->custom = new stdClass();
$config->custom->story = new stdClass();
$config->custom->story->fields['priList'] = '优先级';
$config->custom->story->fields['sourceList'] = '来源';
$config->custom->story->fields['reasonList'] = '关闭原因';
$config->custom->story->fields['reviewResultList'] = '评审结果';
$config->custom->story->fields['stageList'] = '阶段';
$config->custom->story->fields['statusList'] = '状态';
$config->custom->story->canAdd = 'reasonList,reviewResultList,sourceList,priList';
$config->custom->task = new stdClass();
$config->custom->task->fields['priList'] = '优先级';
$config->custom->task->fields['typeList'] = '类型';
$config->custom->task->fields['reasonList'] = '关闭原因';
$config->custom->task->fields['statusList'] = '状态';
$config->custom->task->canAdd = 'priList,typeList';
$config->custom->bug = new stdClass();
$config->custom->bug->fields['priList'] = '优先级';
$config->custom->bug->fields['severityList'] = '严重程度';
$config->custom->bug->fields['osList'] = '操作系统';
$config->custom->bug->fields['browserList'] = '浏览器';
$config->custom->bug->fields['typeList'] = '类型';
$config->custom->bug->fields['resolutionList'] = '解决方案';
$config->custom->bug->fields['statusList'] = '状态';
$config->custom->bug->canAdd = 'priList,severityList,osList,browserList,typeList,resolutionList';
$config->custom->testcase = new stdClass();
$config->custom->testcase->fields['priList'] = '优先级';
$config->custom->testcase->fields['typeList'] = '类型';
$config->custom->testcase->fields['stageList'] = '阶段';
$config->custom->testcase->fields['resultList'] = '执行结果';
$config->custom->testcase->fields['statusList'] = '状态';
$config->custom->testcase->canAdd = 'priList,typeList,stageList';
$config->custom->testtask = new stdClass();
$config->custom->testtask->fields['priList'] = '优先级';
$config->custom->testtask->fields['statusList'] = '状态';
$config->custom->testtask->canAdd = 'priList';
$config->custom->todo = new stdClass();
$config->custom->todo->fields['priList'] = '优先级';
$config->custom->todo->fields['typeList'] = '类型';
$config->custom->todo->fields['statusList'] = '状态';
$config->custom->todo->canAdd = 'priList,typeList';
$config->custom->user = new stdClass();
$config->custom->user->fields['roleList'] = '角色';
$config->custom->user->fields['statusList'] = '状态';
$config->custom->user->canAdd = 'roleList';
+88
View File
@@ -0,0 +1,88 @@
<?php
/**
* The control file of custom of ZenTaoPMS.
*
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package custom
* @version $Id$
* @link http://www.zentao.net
*/
class custom extends control
{
/**
* Index
*
* @access public
* @return void
*/
public function index()
{
die(js::locate(inlink('set')));
}
/**
* Custom
*
* @param string $module
* @param string $field
* @access public
* @return void
*/
public function set($module = 'story', $field = 'priList')
{
if($module == 'user' and $field == 'priList') $field = 'roleList';
$currentLang = $this->app->getClientLang();
$this->app->loadLang($module);
$fieldList = $this->lang->$module->$field;
if(!empty($_POST))
{
$lang = $_POST['lang'];
$this->custom->deleteItems("lang=$lang&module=$module&section=$field");
foreach($_POST['keys'] as $index => $key)
{
$value = $_POST['values'][$index];
if(!$value or !$key) continue;
$system = $_POST['systems'][$index];
$this->custom->setItem("{$lang}.{$module}.{$field}.{$key}.{$system}", $value);
}
if(dao::isError()) die(js::error(dao::getError()));
die(js::reload('parent'));
}
$this->view->title = $this->lang->custom->common . $this->lang->colon . $this->lang->custom->story;
$this->view->position[] = $this->lang->custom->common;
$this->view->position[] = $this->lang->custom->$module;
$this->view->fieldList = $fieldList;
$this->view->dbFields = $this->custom->getItems("lang=$currentLang,all&module=$module&section=$field");
$this->view->field = $field;
$this->view->module = $module;
$this->view->currentLang = $currentLang;
$this->view->canAdd = strpos($this->config->custom->$module->canAdd, $field) !== false;
$this->display();
}
/**
* Restore the default lang. Delete the related items.
*
* @param string $module
* @param string $field
* @param string $confirm
* @access public
* @return void
*/
public function restore($module, $field, $confirm = 'no')
{
if($confirm == 'no')
{
die(js::confirm($this->lang->custom->confirmRestore, inlink('restore', "module=$module&field=$field&confirm=yes")));
}
$this->custom->deleteItems("module=$module&section=$field");
die(js::reload('parent'));
}
}
+1
View File
@@ -0,0 +1 @@
input[type='text'] {border:1px solid #ccc; padding:3px 0px}
+16
View File
@@ -0,0 +1,16 @@
function addItem(clickedButton)
{
$(clickedButton).parent().parent().after(itemRow);
}
function delItem(clickedButton)
{
$(clickedButton).parent().parent().remove();
}
$(function()
{
$('#' + module + 'Tab').addClass('active');
$('#' + field + 'Tab').addClass('active');
})
+20
View File
@@ -0,0 +1,20 @@
<?php
$lang->custom->common = 'Custom';
$lang->custom->index = 'Index';
$lang->custom->set = 'Set custom';
$lang->custom->restore = 'restore';
$lang->custom->key = 'Key';
$lang->custom->value = 'Value';
$lang->custom->story = 'Story';
$lang->custom->task = 'Task';
$lang->custom->bug = 'Bug';
$lang->custom->testcase = 'Test case';
$lang->custom->testtask = 'Test task';
$lang->custom->todo = 'Todo';
$lang->custom->user = 'User';
$lang->custom->currentLang = 'For current language';
$lang->custom->allLang = 'For all language';
$lang->custom->confirmRestore = 'Are you sure to restore the default lang setting?';
+20
View File
@@ -0,0 +1,20 @@
<?php
$lang->custom->common = '自定义';
$lang->custom->index = '首页';
$lang->custom->set = '自定义配置';
$lang->custom->restore = '恢复默认';
$lang->custom->key = '键';
$lang->custom->value = '值';
$lang->custom->story = '需求';
$lang->custom->task = '任务';
$lang->custom->bug = 'Bug';
$lang->custom->testcase = '测试用例';
$lang->custom->testtask = '测试任务';
$lang->custom->todo = '待办';
$lang->custom->user = '用户';
$lang->custom->currentLang = '适用当前语言';
$lang->custom->allLang = '适用所有语言';
$lang->custom->confirmRestore = '是否要恢复默认语言配置?';
+125
View File
@@ -0,0 +1,125 @@
<?php
/**
* The model file of custom module of ZenTaoCMS.
*
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Congzhi Chen <congzhi@cnezsoft.com>
* @package custom
* @version $Id$
* @link http://www.zentao.net
*/
class customModel extends model
{
/**
* Get all custom lang.
*
* @access public
* @return array
*/
public function getAll()
{
$allCustomLang = $this->dao->select('*')->from(TABLE_CUSTOM)->orderBy('lang,id')->fetchAll('id');
$currentLang = $this->app->getClientLang();
$processedLang = array();
foreach($allCustomLang as $id => $customLang)
{
if($customLang->lang != $currentLang and $customLang->lang != 'all') continue;
$processedLang[$customLang->module][$customLang->section][$customLang->key] = $customLang->value;
}
return $processedLang;
}
/**
* Set value of an item.
*
* @param string $path zh-cn.story.soucreList.customer.1
* @param string $value
* @access public
* @return void
*/
public function setItem($path, $value = '')
{
$level = substr_count($path, '.');
$section = '';
$system = 1;
if($level <= 1) return false;
if($level == 2) list($lang, $module, $key) = explode('.', $path);
if($level == 3) list($lang, $module, $section, $key) = explode('.', $path);
if($level == 4) list($lang, $module, $section, $key, $system) = explode('.', $path);
$item = new stdclass();
$item->lang = $lang;
$item->module = $module;
$item->section = $section;
$item->key = $key;
$item->value = $value;
$item->system = $system;
$this->dao->replace(TABLE_CUSTOM)->data($item)->exec();
}
/**
* Get some items
*
* @param string $paramString see parseItemParam();
* @access public
* @return void
*/
public function getItems($paramString)
{
return $this->createDAO($this->parseItemParam($paramString), 'select')->orderBy('lang,id')->fetchAll('key');
}
/**
* Delete items.
*
* @param string $paramString see parseItemParam();
* @access public
* @return void
*/
public function deleteItems($paramString)
{
$this->createDAO($this->parseItemParam($paramString), 'delete')->exec();
}
/**
* Parse the param string for select or delete items.
*
* @param string $paramString lang=xxx&module=story&section=sourceList&key=customer and so on.
* @access public
* @return array
*/
public function parseItemParam($paramString)
{
/* Parse the param string into array. */
parse_str($paramString, $params);
/* Init fields not set in the param string. */
$fields = 'lang,module,section,key';
$fields = explode(',', $fields);
foreach($fields as $field) if(!isset($params[$field])) $params[$field] = '';
return $params;
}
/**
* Create a DAO object to select or delete one or more records.
*
* @param array $params the params parsed by parseItemParam() method.
* @param string $method select|delete.
* @access public
* @return object
*/
public function createDAO($params, $method = 'select')
{
return $this->dao->$method('*')->from(TABLE_CUSTOM)->where('1 = 1')
->beginIF($params['lang'])->andWhere('lang')->in($params['lang'])->fi()
->beginIF($params['module'])->andWhere('module')->in($params['module'])->fi()
->beginIF($params['section'])->andWhere('section')->in($params['section'])->fi()
->beginIF($params['key'])->andWhere('`key`')->in($params['key'])->fi();
}
}
+105
View File
@@ -0,0 +1,105 @@
<?php
/**
* The set view file of custom module of ZenTaoPMS.
*
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Congzhi Chen <congzhi@cnezsoft.com>
* @package custom
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/treeview.html.php';?>
<?php
$itemRow = <<<EOT
<tr class='a-center'>
<td>
<input type='text' class="text-1" value="" name="keys[]">
<input type='hidden' value="0" name="systems[]">
</td>
<td>
<input type='text' class="w-p98" value="" name="values[]">
</td>
<td class='a-left'>
<input type='button' onclick='addItem(this)' class='icon-add' value='&nbsp;'></input>
<input type='button' onclick='delItem(this)' class='icon-delete' value='&nbsp;'></input>
</td>
</tr>
EOT;
?>
<?php js::set('itemRow', $itemRow)?>
<?php js::set('module', $module)?>
<?php js::set('field', $field)?>
<div id='featurebar'>
<div class='f-left'>
<?php
echo "<span id='storyTab'>"; common::printLink('custom', 'set', "module=story", $lang->custom->story); echo '</span>';
echo "<span id='taskTab'>"; common::printLink('custom', 'set', "module=task", $lang->custom->task); echo '</span>';
echo "<span id='bugTab'>"; common::printLink('custom', 'set', "module=bug", $lang->custom->bug); echo '</span>';
echo "<span id='testcaseTab'>"; common::printLink('custom', 'set', "module=testcase", $lang->custom->testcase); echo '</span>';
echo "<span id='testtaskTab'>"; common::printLink('custom', 'set', "module=testtask", $lang->custom->testtask); echo '</span>';
echo "<span id='todoTab'>"; common::printLink('custom', 'set', "module=todo", $lang->custom->todo); echo '</span>' ;
echo "<span id='userTab'>"; common::printLink('custom', 'set', "module=user", $lang->custom->user); echo '</span>';
?>
</div>
</div>
<table class='cont-lt2'>
<tr valign='top'>
<td class='side'>
<div class='box-title'><?php echo $lang->custom->$module?></div>
<div class='box-content'>
<ul class='tree'>
<?php
foreach($config->custom->{$module}->fields as $key => $value)
{
echo "<li><span id='{$key}Tab'>" . html::a(inlink('set', "module=$module&field=$key"), $value) . "</span></li>";
}
?>
</ul>
</div>
</td>
<td class='divider'></td>
<td>
<form method='post'>
<table class='table-1'>
<caption><?echo $lang->custom->$module . ' >> ' . $config->custom->$module->fields[$field]?></caption>
<tr>
<th class='w-100px'><?php echo $lang->custom->key;?></th>
<th><?php echo $lang->custom->value;?></th>
<?php if($canAdd):?><th class='w-40px'></th><?php endif;?>
</tr>
<?php foreach($fieldList as $key => $value):?>
<tr class='a-center'>
<?php $system = isset($dbFields[$key]) ? $dbFields[$key]->system : 1;?>
<td><?php echo $key === '' ? 'NULL' : $key; echo html::hidden('keys[]', $key) . html::hidden('systems[]', $system);?></td>
<td>
<?php echo html::input("values[]", $value, "class='w-p98'");?>
</td>
<?php if($canAdd):?>
<td class='a-left'>
<input type='button' onclick='addItem(this)' class='icon-add' value='&nbsp;'></input>
<?php if(!$system):?><input type='button' onclick='delItem(this)' class='icon-delete' value='&nbsp;'></input><?php endif;?>
</td>
<?php endif;?>
</tr>
<?php endforeach;?>
<tfoot>
<tr>
<td colspan='<?php $canAdd ? print(3) : print(2);?>' class='a-center'>
<?php
$appliedTo = array($currentLang => $lang->custom->currentLang, 'all' => $lang->custom->allLang);
echo html::radio('lang', $appliedTo, 'all');
echo html::submitButton();
if(common::hasPriv('custom', 'restore')) echo html::linkButton($lang->custom->restore, inlink('restore', "module=$module&field=$field"), 'hiddenwin');
?>
</td>
</tr>
<tfoot>
</table>
</form>
</td>
</tr>
</table>
<?php include '../../common/view/footer.html.php';?>
-8
View File
@@ -1,8 +0,0 @@
<?php
$config->lang->custom->story = '';
$config->lang->custom->task = '';
$config->lang->custom->bug = '';
$config->lang->custom->testcase = '';
$config->lang->custom->testtask = '';
$config->lang->custom->todo = '';
$config->lang->custom->user = '';
-24
View File
@@ -1,24 +0,0 @@
<?php
/**
* The control file of xxx of ZenTaoPMS.
*
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package xxx
* @version $Id$
* @link http://www.zentao.net
*/
class customlang extends control
{
public function __construct()
{
parent::__construct();
}
public function index()
{
$this->display();
}
}
-8
View File
@@ -1,8 +0,0 @@
<?php
$lang->customlang->story = 'Story';
$lang->customlang->task = 'Task';
$lang->customlang->bug = 'Bug';
$lang->customlang->testcase = 'Test case';
$lang->customlang->testtask = 'Test task';
$lang->customlang->todo = 'Todo';
$lang->customlang->user = 'User';
-8
View File
@@ -1,8 +0,0 @@
<?php
$lang->customlang->story = '需求';
$lang->customlang->task = '任务';
$lang->customlang->bug = 'Bug';
$lang->customlang->testcase = '测试用例';
$lang->customlang->testtask = '测试任务';
$lang->customlang->todo = '待办';
$lang->customlang->user = '用户';
-15
View File
@@ -1,15 +0,0 @@
<?php
/**
* The model file of xxx module of ZenTaoCMS.
*
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package xxx
* @version $Id$
* @link http://www.zentao.net
*/
class customlangModel extends model
{
}
-15
View File
@@ -1,15 +0,0 @@
<?php include '../../common/view/header.html.php';?>
<div id='featurebar'>
<div class='f-left'>
<?php
echo "<span id='storyTab'>"; common::printLink('lang', 'story', "", $lang->customlang->story); echo '</span>';
echo "<span id='taskTab'>"; common::printLink('lang', 'task', "", $lang->customlang->task); echo '</span>';
echo "<span id='bugTab'>"; common::printLink('lang', 'bug', "", $lang->customlang->bug); echo '</span>';
echo "<span id='testcaseTab'>"; common::printLink('lang', 'testcase', "", $lang->customlang->testcase); echo '</span>';
echo "<span id='testtaskTab'>"; common::printLink('lang', 'testtask', "", $lang->customlang->testtask); echo '</span>';
echo "<span id='todoTab'>"; common::printLink('lang', 'todo', "", $lang->customlang->todo); echo '</span>' ;
echo "<span id='userTab'>"; common::printLink('lang', 'user', "", $lang->customlang->user); echo '</span>';
echo "<script>$('#{$this->methodName}Tab').addClass('active')</script>";
?>
</div>
</div>
-14
View File
@@ -1,14 +0,0 @@
<?php
/**
* The xxx view file of xxx module of ZenTaoPMS.
*
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package xxx
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include './header.html.php';?>
<?php include '../../common/view/footer.html.php';?>
+40 -26
View File
@@ -39,20 +39,20 @@ $lang->moduleOrder[95] = 'user';
$lang->moduleOrder[100] = 'admin';
$lang->moduleOrder[105] = 'extension';
$lang->moduleOrder[105] = 'extension';
$lang->moduleOrder[110] = 'editor';
$lang->moduleOrder[115] = 'convert';
$lang->moduleOrder[120] = 'action';
$lang->moduleOrder[110] = 'custom';
$lang->moduleOrder[115] = 'editor';
$lang->moduleOrder[120] = 'convert';
$lang->moduleOrder[125] = 'action';
$lang->moduleOrder[125] = 'mail';
$lang->moduleOrder[130] = 'svn';
$lang->moduleOrder[135] = 'search';
$lang->moduleOrder[140] = 'tree';
$lang->moduleOrder[145] = 'api';
$lang->moduleOrder[150] = 'file';
$lang->moduleOrder[155] = 'misc';
$lang->moduleOrder[160] = 'sso';
$lang->moduleOrder[165] = 'webapp';
$lang->moduleOrder[130] = 'mail';
$lang->moduleOrder[135] = 'svn';
$lang->moduleOrder[140] = 'search';
$lang->moduleOrder[145] = 'tree';
$lang->moduleOrder[150] = 'api';
$lang->moduleOrder[155] = 'file';
$lang->moduleOrder[160] = 'misc';
$lang->moduleOrder[165] = 'sso';
$lang->moduleOrder[170] = 'webapp';
$lang->resource = new stdclass();
@@ -355,11 +355,13 @@ $lang->resource->bug->browse = 'browse';
$lang->resource->bug->create = 'create';
$lang->resource->bug->batchCreate = 'batchCreate';
$lang->resource->bug->confirmBug = 'confirmBug';
$lang->resource->bug->batchConfirm = 'batchConfirm';
$lang->resource->bug->view = 'view';
$lang->resource->bug->edit = 'edit';
$lang->resource->bug->batchEdit = 'batchEdit';
$lang->resource->bug->assignTo = 'assignTo';
$lang->resource->bug->resolve = 'resolve';
$lang->resource->bug->batchResolve = 'batchResolve';
$lang->resource->bug->activate = 'activate';
$lang->resource->bug->close = 'close';
$lang->resource->bug->report = 'reportChart';
@@ -375,19 +377,21 @@ $lang->bug->methodOrder[5] = 'browse';
$lang->bug->methodOrder[10] = 'create';
$lang->bug->methodOrder[15] = 'batchCreate';
$lang->bug->methodOrder[20] = 'confirmBug';
$lang->bug->methodOrder[25] = 'view';
$lang->bug->methodOrder[30] = 'edit';
$lang->bug->methodOrder[35] = 'assignTo';
$lang->bug->methodOrder[40] = 'resolve';
$lang->bug->methodOrder[45] = 'activate';
$lang->bug->methodOrder[50] = 'close';
$lang->bug->methodOrder[55] = 'report';
$lang->bug->methodOrder[60] = 'export';
$lang->bug->methodOrder[65] = 'confirmStoryChange';
$lang->bug->methodOrder[70] = 'delete';
$lang->bug->methodOrder[75] = 'saveTemplate';
$lang->bug->methodOrder[80] = 'deleteTemplate';
$lang->bug->methodOrder[85] = 'customFields';
$lang->bug->methodOrder[25] = 'batchConfirm';
$lang->bug->methodOrder[30] = 'view';
$lang->bug->methodOrder[35] = 'edit';
$lang->bug->methodOrder[40] = 'assignTo';
$lang->bug->methodOrder[45] = 'resolve';
$lang->bug->methodOrder[50] = 'batchResolve';
$lang->bug->methodOrder[55] = 'activate';
$lang->bug->methodOrder[60] = 'close';
$lang->bug->methodOrder[65] = 'report';
$lang->bug->methodOrder[70] = 'export';
$lang->bug->methodOrder[75] = 'confirmStoryChange';
$lang->bug->methodOrder[80] = 'delete';
$lang->bug->methodOrder[85] = 'saveTemplate';
$lang->bug->methodOrder[90] = 'deleteTemplate';
$lang->bug->methodOrder[95] = 'customFields';
/* Test case. */
$lang->resource->testcase = new stdclass();
@@ -489,6 +493,16 @@ $lang->mail->methodOrder[20] = 'save';
$lang->mail->methodOrder[25] = 'test';
$lang->mail->methodOrder[30] = 'reset';
/* custom. */
$lang->resource->custom = new stdclass();
$lang->resource->custom->index = 'index';
$lang->resource->custom->set = 'set';
$lang->resource->custom->restore = 'restore';
$lang->custom->methodOrder[5] = 'index';
$lang->custom->methodOrder[10] = 'set';
$lang->custom->methodOrder[15] = 'restore';
/* Subversion. */
$lang->resource->svn = new stdclass();
$lang->resource->svn->diff = 'diff';
-6
View File
@@ -2,9 +2,3 @@ $(function()
{
if(typeof(listName) != 'undefined') setModal4List('iframe', listName, function(){$(".colorbox").colorbox({width:960, height:550, iframe:true, transition:'none'});});
});
function changeAction(formName, actionName, actionLink)
{
if(formName =='myTaskForm' && actionName == 'batchClose') $('#' + formName).attr('target', 'hiddenwin');
$('#' + formName).attr('action', actionLink).submit();
}
-15
View File
@@ -5,19 +5,4 @@ function changeDate(date)
location.href=link;
}
/**
* Change form action.
*
* @param formName $formName
* @param actionName $actionName
* @param actionLink $actionLink
* @access public
* @return void
*/
function changeAction(formName, actionName, actionLink)
{
if(actionName == 'batchFinish') $('#' + formName).attr('target', 'hiddenwin');
$('#' + formName).attr('action', actionLink).submit();
}
$(".colorbox").colorbox({width:960, height:550, iframe:true, transition:'none'});
+2 -2
View File
@@ -85,12 +85,12 @@
if($canBatchEdit)
{
$actionLink = $this->createLink('story', 'batchEdit');
echo html::commonButton($lang->edit, "onclick=\"changeAction('myStoryForm', 'batchEdit', '$actionLink')\"");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('story', 'batchClose');
echo html::commonButton($lang->close, "onclick=\"changeAction('myStoryForm', 'batchClose', '$actionLink')\"");
echo html::commonButton($lang->close, "onclick=\"setFormAction('$actionLink')\"");
}
}
?>
+2 -2
View File
@@ -83,12 +83,12 @@
if($canBatchEdit)
{
$actionLink = $this->createLink('task', 'batchEdit', "projectID=0&orderBy=$orderBy");
echo html::commonButton($lang->edit, "onclick=\"changeAction('myTaskForm', 'batchEdit', '$actionLink')\"");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('task', 'batchClose');
echo html::commonButton($lang->close, "onclick=\"changeAction('myTaskForm', 'batchClose', '$actionLink')\"");
echo html::commonButton($lang->close, "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
}
?>
</div>
+2 -2
View File
@@ -89,12 +89,12 @@
if($canBatchEdit)
{
$actionLink = $this->createLink('testcase', 'batchEdit');
echo html::submitButton($lang->edit, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')");
echo html::submitButton($lang->edit, "onclick=setFormAction('$actionLink')");
}
if($canBatchRun)
{
$actionLink = $this->createLink('testtask', 'batchRun', "productID=0&orderBy=$orderBy&from=testcase");
echo html::submitButton($lang->testtask->runCase, "onclick=changeAction('myCaseForm','batchEdit','$actionLink')");
echo html::submitButton($lang->testtask->runCase, "onclick=setFormAction('$actionLink')");
}
?>
</div>
+3 -3
View File
@@ -104,19 +104,19 @@
if(common::hasPriv('todo', 'batchEdit'))
{
$actionLink = $this->createLink('todo', 'batchEdit', "from=myTodo&type=$type&account=$account&status=$status");
echo html::commonButton($lang->edit, "onclick=\"changeAction('todoform', 'batchEdit', '$actionLink')\"");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if(common::hasPriv('todo', 'batchFinish'))
{
$actionLink = $this->createLink('todo', 'batchFinish');
echo html::commonButton($lang->todo->finish, "onclick=\"changeAction('todoform', 'batchFinish', '$actionLink')\"");
echo html::commonButton($lang->todo->finish, "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
}
if(common::hasPriv('todo', 'import2Today') and $importFuture)
{
$actionLink = $this->createLink('todo', 'import2Today');
echo html::commonButton($lang->todo->import, "onclick=\"changeAction('todoform', 'import2Today', '$actionLink')\"");
echo html::commonButton($lang->todo->import, "onclick=\"setFormAction('$actionLink')\"");
echo html::input('date', date('Y-m-d'), "class='date w-80px'");
}
?>
+1 -2
View File
@@ -93,7 +93,7 @@ class product extends control
* @access public
* @return void
*/
public function browse($productID = 0, $browseType = 'byModule', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($productID = 0, $browseType = 'allStory', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Lower browse type. */
$browseType = strtolower($browseType);
@@ -162,7 +162,6 @@ class product extends control
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->moduleID = $moduleID;
$this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
$this->display();
}
-24
View File
@@ -1,27 +1,3 @@
/* Browse by module. */
function browseByModule()
{
$('#treebox').removeClass('hidden');
$('.divider').removeClass('hidden');
$('#querybox').addClass('hidden');
$('#featurebar .active').removeClass('active');
$('#bymoduleTab').addClass('active');
}
/**
* Change form action.
*
* @param url $actionLink
* @param bool $hiddenwin
* @access public
* @return void
*/
function changeAction(actionLink, hiddenwin)
{
if(hiddenwin) $('form').attr('target', 'hiddenwin');
$('form').attr('action', actionLink).submit();
}
$(function()
{
if(browseType == 'bysearch') ajaxGetSearchForm();
+30 -18
View File
@@ -14,12 +14,10 @@
<?php include '../../common/view/treeview.html.php';?>
<?php include '../../common/view/colorize.html.php';?>
<?php include '../../common/view/dropmenu.html.php';?>
<script language='Javascript'>
var browseType = '<?php echo $browseType;?>';
</script>
<?php js::set('browseType', $browseType);?>
<div id='featurebar'>
<div class='f-left'>
<span id='bymoduleTab' onclick='browseByModule()'><?php echo html::a($this->inlink('browse',"productID=$productID"), $lang->product->moduleStory);?></span>
<span id='allstoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=allStory"), $lang->product->allStory);?></span>
<span id='assignedtomeTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=assignedtome"), $lang->product->assignedToMe);?></span>
<span id='openedbymeTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=openedByMe"), $lang->product->openedByMe);?></span>
<span id='reviewedbymeTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=reviewedByMe"), $lang->product->reviewedByMe);?></span>
@@ -28,23 +26,37 @@ var browseType = '<?php echo $browseType;?>';
<span id='activestoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=activeStory"), $lang->product->activeStory);?></span>
<span id='changedstoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=changedStory"), $lang->product->changedStory);?></span>
<span id='closedstoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=closedStory"), $lang->product->closedStory);?></span>
<span id='allstoryTab'> <?php echo html::a($this->inlink('browse', "productID=$productID&browseType=allStory"), $lang->product->allStory);?></span>
<span id='bysearchTab' ><a href='#'><span class='icon-search'></span><?php echo $lang->product->searchStory;?></a></span>
</div>
<div class='f-right'>
<?php common::printIcon('story', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID");?>
<?php common::printIcon('story', 'export', "productID=$productID&orderBy=$orderBy");?>
<?php common::printIcon('story', 'batchCreate', "productID=$productID&moduleID=$moduleID");?>
<?php common::printIcon('story', 'create', "productID=$productID&moduleID=$moduleID"); ?>
<?php
echo '<span class="link-button dropButton">';
echo html::a("#", "&nbsp;", '', "id='exportAction' class='icon-green-common-export' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo html::a("#", $lang->export, '', "id='exportAction' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo '</span>';
common::printIcon('story', 'report', "productID=$productID&browseType=$browseType&moduleID=$moduleID");
common::printIcon('story', 'batchCreate', "productID=$productID&moduleID=$moduleID");
common::printIcon('story', 'create', "productID=$productID&moduleID=$moduleID");
?>
</div>
</div>
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'></div>
<div id='exportActionMenu' class='listMenu hidden'>
<ul>
<?php
$misc = common::hasPriv('story', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy") : '#';
echo "<li>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
?>
</ul>
</div>
<div id='querybox' class='<?php if($browseType !='bysearch') echo 'hidden';?>'></div>
<div class='treeSlider'><span>&nbsp;</span></div>
<form method='post' id='productStoryForm'>
<table class='cont-lt1'>
<tr valign='top'>
<td class='side <?php echo $treeClass;?>' id='treebox'>
<td class='side' id='treebox'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'>
<?php echo $moduleTree;?>
@@ -54,7 +66,7 @@ var browseType = '<?php echo $browseType;?>';
</div>
</div>
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td class='divider'></td>
<td>
<table class='table-1 fixed colored tablesorter datatable' id='storyList'>
<thead>
@@ -122,7 +134,7 @@ var browseType = '<?php echo $browseType;?>';
$actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0");
echo "<div class='groupButton dropButton'>";
echo html::commonButton($lang->edit, "onclick=\"changeAction('$actionLink')\" $disabled");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\" $disabled");
echo "<button id='moreAction' type='button' onclick=\"toggleSubMenu(this.id, 'top', 0)\"><span class='caret'></span></button>";
echo "</div>";
}
@@ -143,7 +155,7 @@ var browseType = '<?php echo $browseType;?>';
$canBatchClose = common::hasPriv('story', 'batchClose') and strtolower($browseType) != 'closedbyme' and strtolower($browseType) != 'closedstory';
$actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0");
$misc = $canBatchClose ? "onclick=changeAction('$actionLink')" : $class;
$misc = $canBatchClose ? "onclick=setFormAction('$actionLink')" : $class;
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
$misc = common::hasPriv('story', 'batchReview') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='reviewItem'" : $class;
@@ -173,7 +185,7 @@ var browseType = '<?php echo $browseType;?>';
}
else
{
echo html::a('#', $result, '', "onclick=\"changeAction('$actionLink',true)\"");
echo html::a('#', $result, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
}
echo "</li>";
}
@@ -192,7 +204,7 @@ var browseType = '<?php echo $browseType;?>';
{
$actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key");
echo "<li>";
echo html::a('#', $reason, '', "onclick=\"changeAction('$actionLink',true)\"");
echo html::a('#', $reason, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
echo "</li>";
}
?>
@@ -207,7 +219,7 @@ var browseType = '<?php echo $browseType;?>';
foreach($plans as $planID => $plan)
{
$actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID");
echo "<li>" . html::a('#', $plan, '', "onclick=\"changeAction('$actionLink',true)\"") . "</li>";
echo "<li>" . html::a('#', $plan, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "</li>";
}
?>
</ul>
@@ -220,7 +232,7 @@ var browseType = '<?php echo $browseType;?>';
foreach($lang->story->stageList as $key => $stage)
{
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
echo "<li>" . html::a('#', $stage, '', "onclick=\"changeAction('$actionLink',true)\"") . "</li>";
echo "<li>" . html::a('#', $stage, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "</li>";
}
?>
</ul>
+10 -1
View File
@@ -45,9 +45,18 @@ class productplan extends control
$this->commonAction($product);
$lastPlan = $this->productplan->getLast($product);
if($lastPlan)
{
$timestamp = strtotime($lastPlan->end);
$weekday = date('w', $timestamp);
$delta = 1;
if($weekday == '5' or $weekday == '6') $delta = 8 - $weekday;
$begin = date('Y-m-d', strtotime("+$delta days", $timestamp));
}
$this->view->begin = $lastPlan ? $begin : '';
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->productplan->create;
$this->view->begin = $lastPlan ? $lastPlan->end : '';
$this->display();
}
-14
View File
@@ -2,17 +2,3 @@ $(document).ready(function()
{
$("a.iframe").colorbox({width:640, height:480, iframe:true, transition:'none'});
});
/**
* Change form action.
*
* @param formName $formName
* @param actionName $actionName
* @param actionLink $actionLink
* @access public
* @return void
*/
function changeAction(formName, actionName, actionLink)
{
$('#' + formName).attr('action', actionLink).submit();
}
-5
View File
@@ -4,10 +4,5 @@ $(function()
if(browseType == 'bysearch') ajaxGetSearchForm();
});
function changeAction(formName, actionName, actionLink)
{
if(actionName == 'batchClose') $('#' + formName).attr('target', 'hiddenwin');
$('#' + formName).attr('action', actionLink).submit();
}
$('#module' + moduleID).addClass('active');
$('#product' + productID).addClass('active');
+5 -3
View File
@@ -940,7 +940,8 @@ class projectModel extends model
$BugToTasks = fixer::input('post')->get();
foreach($BugToTasks->import as $key => $value)
{
$bug = $this->bug->getById($key);
$bug = $this->bug->getById($key);
$task = new stdClass();
$task->project = $projectID;
$task->story = $bug->story;
$task->storyVersion = $bug->story;
@@ -975,13 +976,14 @@ class projectModel extends model
$taskID = $this->dao->lastInsertID();
if($task->story != false) $this->story->setStage($task->story);
$actionID = $this->loadModel('action')->create('task', $taskID, 'Opened', '');
$mails[$key] = new stdClass();
$mails[$key]->taskID = $taskID;
$mails[$key]->actionID = $actionID;
$this->action->create('bug', $key, 'Totask', '', $taskID);
$this->dao->update(TABLE_BUG)->set('toTask')->eq($taskID)->where('id')->eq($key)->exec();
if($task->assignedTo and $task->assignedTo != $bug->assignedTo)
if(isset($task->assignedTo) and $task->assignedTo and $task->assignedTo != $bug->assignedTo)
{
$newBug = new stdClass();
$newBug->lastEditedBy = $this->app->user->account;
@@ -1439,7 +1441,7 @@ class projectModel extends model
* @access public
* @return bool
*/
public function isClickable($project, $action)
public static function isClickable($project, $action)
{
$action = strtolower($action);
+2 -2
View File
@@ -106,12 +106,12 @@
if($canBatchEdit)
{
$actionLink = $this->createLink('story', 'batchEdit', "productID=0&projectID=$project->id");
echo html::commonButton($lang->edit, "onclick=\"changeAction('projectStoryForm', 'batchEdit', '$actionLink')\"");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('story', 'batchClose', "productID=0&projectID=$project->id");
echo html::commonButton($lang->close, "onclick=\"changeAction('projectStoryForm', 'batchClose', '$actionLink')\"");
echo html::commonButton($lang->close, "onclick=\"setFormAction('$actionLink')\"");
}
}
echo $summary;
+4 -4
View File
@@ -150,13 +150,13 @@ var browseType = '<?php echo $browseType;?>';
echo "</div>";
$actionLink = $this->createLink('task', 'batchEdit', "projectID=$projectID");
$misc = $canBatchEdit ? "onclick=changeAction('$actionLink')" : "disabled='disabled'";
$misc = $canBatchEdit ? "onclick=setFormAction('$actionLink')" : "disabled='disabled'";
echo "<div class='groupButton dropButton'>";
echo html::commonButton($lang->edit, "onclick=\"changeAction('projectTaskForm', 'batchEdit', '$actionLink')\" $misc");
echo html::commonButton($lang->edit, $misc);
echo "<button id='moreAction' type='button' onclick=\"toggleSubMenu(this.id, 'top', 0)\"><span class='caret'></span></button>";
echo "</div>";
}
echo $summary;
echo "<span class='f-12px'>" . $summary . "</span>";
?>
</div>
<?php $pager->show();?>
@@ -173,7 +173,7 @@ var browseType = '<?php echo $browseType;?>';
<ul>
<?php
$actionLink = $this->createLink('task', 'batchClose');
$misc = $canBatchClose ? "onclick=changeAction('projectTaskForm','batchClose','$actionLink')" : "class='disabled'";
$misc = $canBatchClose ? "onclick=setFormAction('$actionLink','hiddenwin')" : "class='disabled'";
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
?>
</ul>
+22 -3
View File
@@ -22,7 +22,11 @@
if(!isset($browseType)) $browseType = '';
if(!isset($orderBy)) $orderBy = '';
common::printIcon('task', 'report', "project=$projectID&browseType=$browseType");
if($browseType != 'needconfirm') common::printIcon('task', 'export', "projectID=$projectID&orderBy=$orderBy");
echo '<span class="link-button dropButton">';
echo html::a("#", "&nbsp;", '', "id='exportAction' class='icon-green-common-export' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo html::a("#", $lang->export, '', "id='exportAction' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo '</span>';
echo '<span class="link-button dropButton">';
echo html::a("#", "&nbsp;", '', "id='importAction' class='icon-green-task-import' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->import}'");
@@ -35,11 +39,26 @@
</div>
</div>
<div id='exportActionMenu' class='listMenu hidden'>
<ul>
<?php
$misc = common::hasPriv('task', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy") : '#';
echo "<li>" . html::a($link, $lang->task->export, '', $misc) . "</li>";
?>
</ul>
</div>
<div id='importActionMenu' class='listMenu hidden'>
<ul>
<?php
echo "<li>" . html::a($this->createLink('project', 'importTask', "project=$project->id"), $lang->project->importTask) . "</li>";
echo "<li>" . html::a($this->createLink('project', 'importBug', "projectID=$project->id"), $lang->project->importBug) . "</li>";
$misc = common::hasPriv('project', 'importTask') ? '' : "class=disabled";
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
$misc = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
?>
</ul>
</div>
+1 -1
View File
@@ -121,7 +121,7 @@ $(function ()
series: {lines:{show: true, lineWidth: 2}, points: {show: true},hoverable: true},
legend: {noColumns: 1},
grid: { hoverable: true, clickable: true },
xaxis: { ticks:ticks, tickFormatter: function(val) {tick = new Date(dateList[val]);;if(dateList[val] != undefined){return (tick.getMonth() + 1) + '-' + tick.getDate()}else{return ''}}},
xaxis: { ticks:ticks, tickFormatter: function(val) {tick = new Date(dateList[val]);;if(dateList[val] != undefined){return tick.getDate() + '/' + (tick.getMonth() + 1)}else{return ''}}},
yaxis: {mode: null, min: 0, minTickSize: [1, "day"]}};
var placeholder = $("#placeholder");
+1 -1
View File
@@ -805,7 +805,7 @@ class story extends control
$moduleID = $this->tree->getAllChildID($moduleID);
}
$stories = $this->story->getProductStoryPairs($productID, $moduleID);
$select = html::select('story' . $index, $stories, $storyID, "class=''");
$select = html::select('story', $stories, $storyID, "class=''");
/* If only need options, remove select wrap. */
if($onlyOption == 'true') die(substr($select, strpos($select, '>') + 1, -10));
+1 -1
View File
@@ -28,7 +28,7 @@ $lang->story->tasks = "Tasks";
$lang->story->taskCount = 'Tasks count';
$lang->story->bugs = "Bug";
$lang->story->linkStory = 'Related story';
$lang->story->export = "Export";
$lang->story->export = "Export data";
$lang->story->reportChart = "Report";
$lang->story->batchChangePlan = "Batch change plan";
$lang->story->batchChangeStage = "Batch change stage";
+1 -1
View File
@@ -28,7 +28,7 @@ $lang->story->tasks = "相关任务";
$lang->story->taskCount = '任务数';
$lang->story->bugs = "Bug";
$lang->story->linkStory = '关联需求';
$lang->story->export = "导出";
$lang->story->export = "导出数据";
$lang->story->reportChart = "统计报表";
$lang->story->batchChangePlan = "批量修改计划";
$lang->story->batchChangeStage = "批量修改阶段";
+1 -1
View File
@@ -25,7 +25,7 @@ $lang->task->close = "Close";
$lang->task->batchClose = "Batch close";
$lang->task->cancel = "Cancel";
$lang->task->activate = "Activate";
$lang->task->export = "Export";
$lang->task->export = "Export data";
$lang->task->reportChart = "Report chart";
$lang->task->fromBug = 'From Bug';
$lang->task->confirmStoryChange = "Confirm story change";
+1 -1
View File
@@ -25,7 +25,7 @@ $lang->task->close = "关闭";
$lang->task->batchClose = "批量关闭";
$lang->task->cancel = "取消";
$lang->task->activate = "激活";
$lang->task->export = "导出";
$lang->task->export = "导出数据";
$lang->task->reportChart = "报表统计";
$lang->task->fromBug = '来源Bug';
$lang->task->confirmStoryChange = "确认需求变动";
+2 -1
View File
@@ -72,7 +72,8 @@
</td></tr>
<?php endif;?>
<tr><td colspan='<?php echo $this->config->task->batchEdit->columns + 1;?>' class='a-center'>
<?php $colspan = (!isset($project) or (isset($project) and $project->type != 'sprint')) ? $this->config->task->batchEdit->columns + 1 : $this->config->task->batchEdit->columns;?>
<tr><td colspan='<?php echo $colspan;?>' class='a-center'>
<?php echo html::submitButton();?>
</td></tr>
</table>
+1 -2
View File
@@ -52,7 +52,7 @@ class testcase extends control
* @access public
* @return void
*/
public function browse($productID = 0, $browseType = 'byModule', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function browse($productID = 0, $browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Set browseType, productID, moduleID and queryID. */
$browseType = strtolower($browseType);
@@ -154,7 +154,6 @@ class testcase extends control
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
$this->display();
}
+1
View File
@@ -1 +1,2 @@
.w-340px {width:340px}
.chosen {z-index:99}
+4
View File
@@ -0,0 +1,4 @@
$(function()
{
$(".chosen").chosen({no_results_text:noResultsMatch});
})
-16
View File
@@ -1,14 +1,3 @@
/* Switch to module browse. */
function browseByModule(active)
{
$('.side').removeClass('hidden');
$('.divider').removeClass('hidden');
$('#bymoduleTab').addClass('active');
$('#' + active + 'Tab').removeClass('active');
$('#bysearchTab').removeClass('active');
$('#querybox').addClass('hidden');
}
/* Swtich to search module. */
function browseBySearch(active)
{
@@ -20,11 +9,6 @@ function browseBySearch(active)
$('#bymoduleTab').removeClass('active');
}
function changeAction(url)
{
$('#batchForm').attr('action', url);
}
$(document).ready(function()
{
setModal4List('runCase', 'caseList', function(){$(".results").colorbox({width:900, height:550, iframe:true, transition:'none'});});
+1 -8
View File
@@ -65,7 +65,7 @@ $lang->testcase->import = "Import";
$lang->testcase->importID = "Linenum";
$lang->testcase->showImport = "Show import";
$lang->testcase->exportTemplet = "Export templet";
$lang->testcase->export = "Export";
$lang->testcase->export = "Export data";
$lang->testcase->confirmChange = 'Confirm case change';
$lang->testcase->confirmStoryChange = 'Confirm story change';
@@ -135,13 +135,6 @@ $lang->testcase->stageList['system'] = 'System testing';
$lang->testcase->stageList['smoke'] = 'Smoking testing';
$lang->testcase->stageList['bvt'] = 'BVT testing';
$lang->testcase->stageListAB['unittest'] = 'Unit';
$lang->testcase->stageListAB['feature'] = 'Feature';
$lang->testcase->stageListAB['intergrate'] = 'Integrate';
$lang->testcase->stageListAB['system'] = 'System';
$lang->testcase->stageListAB['smoke'] = 'Smoking';
$lang->testcase->stageListAB['bvt'] = 'BVT';
$lang->testcase->statusList[''] = '';
$lang->testcase->statusList['normal'] = 'Normal';
$lang->testcase->statusList['blocked'] = 'Blocked';
+1 -8
View File
@@ -65,7 +65,7 @@ $lang->testcase->import = "导入";
$lang->testcase->importID = "行号";
$lang->testcase->showImport = "显示导入内容";
$lang->testcase->exportTemplet = "导出模板";
$lang->testcase->export = "导出";
$lang->testcase->export = "导出数据";
$lang->testcase->confirmChange = '确认用例变动';
$lang->testcase->confirmStoryChange = '确认需求变动';
@@ -135,13 +135,6 @@ $lang->testcase->stageList['system'] = '系统测试阶段';
$lang->testcase->stageList['smoke'] = '冒烟测试阶段';
$lang->testcase->stageList['bvt'] = '版本验证阶段';
$lang->testcase->stageListAB['unittest'] = '单元';
$lang->testcase->stageListAB['feature'] = '功能';
$lang->testcase->stageListAB['intergrate'] = '集成';
$lang->testcase->stageListAB['system'] = '系统';
$lang->testcase->stageListAB['smoke'] = '冒烟';
$lang->testcase->stageListAB['bvt'] = '版本';
$lang->testcase->statusList[''] = '';
$lang->testcase->statusList['normal'] = '正常';
$lang->testcase->statusList['blocked'] = '被阻塞';
+1 -1
View File
@@ -381,7 +381,7 @@ class testcaseModel extends model
* @access public
* @return void
*/
public function isClickable($case, $action)
public static function isClickable($case, $action)
{
$action = strtolower($action);
+1 -15
View File
@@ -32,21 +32,7 @@
<td><?php echo html::select("modules[$caseID]", $moduleOptionMenu, $cases[$caseID]->module, "class='select-1'");?></span></td>
<td><?php echo html::input("titles[$caseID]", $cases[$caseID]->title, 'class=text-1'); echo "<span class='star'>*</span>";?></td>
<td><?php echo html::select("types[$caseID]", $lang->testcase->typeList, $cases[$caseID]->type, 'class=select-1');?></td>
<td>
<?php
foreach($lang->testcase->stageListAB as $key => $stage)
{
if(in_array($key, explode(',', $cases[$caseID]->stage)))
{
echo "<input type='checkbox' name='stages[$caseID][$key]' checked='checked' value='$key'/>$stage ";
}
else
{
echo "<input type='checkbox' name='stages[$caseID][$key]' value='$key'/>$stage ";
}
}
?>
</td>
<td class='a-left' style='overflow:visible'><?php echo html::select("stages[$caseID][]", $lang->testcase->stageList, $cases[$caseID]->stage, "class='select-1 chosen' multiple data-placeholder='{$lang->testcase->stage}'");?></td>
</tr>
<?php endforeach;?>
<?php if(isset($suhosinInfo)):?>
+47 -17
View File
@@ -15,6 +15,7 @@ include '../../common/view/header.html.php';
include '../../common/view/datepicker.html.php';
include '../../common/view/treeview.html.php';
include '../../common/view/colorize.html.php';
include '../../common/view/dropmenu.html.php';
js::set('browseType', $browseType);
js::set('moduleID' , $moduleID);
js::set('confirmDelete', $lang->testcase->confirmDelete);
@@ -23,26 +24,45 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
<div id='featurebar'>
<div class='f-left'>
<?php
echo "<span id='bymoduleTab' onclick=\"browseByModule('$browseType')\"><a href='#'>" . $lang->testcase->moduleCases . "</a></span> ";
echo "<span id='allTab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&browseType=all&param=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->testcase->allCases) . "</span>";
echo "<span id='needconfirmTab'>" . html::a($this->createLink('testcase', 'browse', "productid=$productID&browseType=needconfirm&param=0"), $lang->testcase->needConfirm) . "</span>";
echo "<span id='bysearchTab' onclick=\"browseBySearch('$browseType')\"><a href='#'><span class='icon-search'></span>{$lang->testcase->bySearch}</a></span> ";
?>
</div>
<div class='f-right'>
<?php common::printIcon('testcase', 'import', "productID=$productID", '', 'button', '', '', 'export');?>
<?php common::printIcon('testcase', 'exportTemplet', "productID=$productID", '', 'button', 'export', '', 'export');?>
<?php if($browseType != 'needconfirm') common::printIcon('testcase', 'export', "productID=$productID&orderBy=$orderBy"); ?>
<?php common::printIcon('testcase', 'batchCreate', "productID=$productID&moduleID=$moduleID");?>
<?php common::printIcon('testcase', 'create', "productID=$productID&moduleID=$moduleID"); ?>
<?php
common::printIcon('testcase', 'import', "productID=$productID", '', 'button', '', '', 'export');
echo '<span class="link-button dropButton">';
echo html::a("#", "&nbsp;", '', "id='exportAction' class='icon-green-common-export' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo html::a("#", $lang->export, '', "id='exportAction' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->export}'");
echo '</span>';
common::printIcon('testcase', 'batchCreate', "productID=$productID&moduleID=$moduleID");
common::printIcon('testcase', 'create', "productID=$productID&moduleID=$moduleID");
?>
</div>
</div>
<div id='exportActionMenu' class='listMenu hidden'>
<ul>
<?php
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy") : '#';
echo "<li>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID") : '#';
echo "<li>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
?>
</ul>
</div>
<div id='querybox' class='<?php if($browseType != 'bysearch') echo 'hidden';?>'></div>
<div class='treeSlider'><span>&nbsp;</span></div>
<form id='batchForm' method='post'>
<table class='cont-lt1'>
<tr valign='top'>
<td class='side <?php echo $treeClass;?>'>
<td class='side'>
<div class='box-title'><?php echo $productName;?></div>
<div class='box-content'>
<?php echo $moduleTree;?>
@@ -52,7 +72,7 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
</div>
</div>
</td>
<td class='divider <?php echo $treeClass;?>'></td>
<td class='divider'></td>
<td>
<table class='table-1 colored tablesorter datatable fixed' id='caseList'>
<?php $vars = "productID=$productID&browseType=$browseType&param=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
@@ -74,17 +94,11 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
<th class='w-150px {sorter:false}'><?php echo $lang->actions;?></th>
<?php endif;?>
</tr>
<?php
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
$canBatchRun = common::hasPriv('testtask', 'batchRun');
?>
<?php foreach($cases as $case):?>
<tr class='a-center'>
<?php $viewLink = inlink('view', "caseID=$case->id");?>
<td>
<?php if($canBatchEdit or $canBatchRun):?>
<input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/>
<?php endif;?>
<?php echo html::a($viewLink, sprintf('%03d', $case->id));?>
</td>
<td><span class='<?php echo 'pri' . $case->pri?>'><?php echo $case->pri?></span></td>
@@ -123,9 +137,14 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
<?php if($cases):?>
<div class='f-left'>
<?php
if($canBatchEdit or $canBatchRun) echo html::selectAll() . html::selectReverse();
if($canBatchEdit) echo html::submitButton($lang->edit, "onclick='changeAction(\"" . inLink('batchEdit', "productID=$productID") . "\")'");
if($canBatchRun) echo html::submitButton($lang->testtask->runCase, "onclick='changeAction(\"" . $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy") . "\")'");
echo "<div class='groupButton'>" . html::selectAll() . html::selectReverse() . "</div>";
$actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID");
$misc = common::hasPriv('testcase', 'batchEdit') ? "onclick=setFormAction('$actionLink')" : "disabled='disabled'";
echo "<div class='groupButton dropButton'>";
echo html::commonButton($lang->edit, $misc);
echo "<button id='moreAction' type='button' onclick=\"toggleSubMenu(this.id, 'top', 0)\"><span class='caret'></span></button>";
echo "</div>";
?>
</div>
<?php endif?>
@@ -138,4 +157,15 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
</tr>
</table>
</form>
<div id='moreActionMenu' class='listMenu hidden'>
<ul>
<?php
$actionLink = $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy");
$misc = common::hasPriv('testtask', 'batchRun') ? "onclick=setFormAction('$actionLink')" : "class='disabled'";
echo "<li>" . html::a('#', $lang->testtask->runCase, '', $misc) . "</li>";
?>
</ul>
</div>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -1,7 +1,7 @@
<?php include '../../common/view/header.lite.html.php';?>
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table class='table-1 mt-10px'>
<caption><?php echo $lang->testcase->importCase?></caption>
<caption><?php echo $lang->testcase->import?></caption>
<tr>
<td align='center'>
<input type='file' name='file'/>
-5
View File
@@ -18,11 +18,6 @@ function browseBySearch(active)
$('#bymoduleTab').removeClass('active');
}
function changeAction(url)
{
$('#batchForm').attr('action', url);
}
$(document).ready(function()
{
setModal4List('runCase', 'caseList', function(){$(".results").colorbox({width:900, height:550, iframe:true, transition:'none'});});
+1 -1
View File
@@ -483,7 +483,7 @@ class testtaskModel extends model
* @access public
* @return void
*/
public function isClickable($testtask, $action)
public static function isClickable($testtask, $action)
{
$action = strtolower($action);
+19 -14
View File
@@ -106,20 +106,25 @@ var moduleID = '<?php echo $moduleID;?>';
<?php if($runs):?>
<div class='f-left'>
<?php if($canBatchEdit or $canBatchAssign or $canBatchRun) echo html::selectAll() . html::selectReverse(); ?>
<?php if($canBatchEdit):?>
<input class='button-s' value="<?php echo $lang->edit; ?>" type="button" onclick="casesform.action='<?php echo $this->createLink('testcase', 'batchEdit', "from=testtaskCases&productID=$productID");?>';casesform.submit();">
<?php endif;?>
<?php if($canBatchAssign):?>
<?php echo html::select('assignedTo', $users);?>
<input class='button-s' value="<?php echo $lang->testtask->assign; ?>" type="button" onclick="casesform.action='<?php echo inLink('batchAssign', "taskID=$task->id");?>';casesform.submit();">
<?php endif;?>
<?php if($canBatchRun):?>
<input class='button-s' value="<?php echo $lang->testtask->runCase; ?>" type="button" onclick="casesform.action='<?php echo inLink('batchRUN', "productID=$productID&orderBy=id_desc&from=testtask");?>';casesform.submit();">
<?php endif;?>
<?php
if($canBatchEdit or $canBatchAssign or $canBatchRun) echo html::selectAll() . html::selectReverse();
if($canBatchEdit)
{
$actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchAssign)
{
$actionLink = inLink('batchAssign', "taskID=$task->id");
echo html::select('assignedTo', $users);
echo html::commonButton($lang->testtask->assign, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchRun)
{
$actionLink = inLink('batchRUN', "productID=$productID&orderBy=id_desc&from=testtask");
echo html::commonButton($lang->testtask->runCase, "onclick=\"setFormAction('$actionLink')\"");
}
?>
</div>
<?php endif;?>
+1 -1
View File
@@ -333,7 +333,7 @@ class todoModel extends model
* @access public
* @return bool
*/
public function isClickable($todo, $action)
public static function isClickable($todo, $action)
{
$action = strtolower($action);
+1
View File
@@ -883,6 +883,7 @@ class treeModel extends model
/* The new modules. */
if(is_numeric($moduleID))
{
$module = new stdClass();
$module->root = $rootID;
$module->name = strip_tags($moduleName);
$module->parent = $parentModuleID;
+1 -1
View File
@@ -27,7 +27,7 @@
?>
</div>
</div>
<table class='table-1 colored tablesorter'>
<table class='table-1 colored tablesorter fixed'>
<thead>
<tr class='colhead'>
<th class='w-150px'><?php echo $lang->action->date;?></th>
+1
View File
@@ -57,6 +57,7 @@ class webapp extends control
if($type == 'bysearch') $param = helper::safe64Encode($this->post->key);
/* Get results from the api. */
$recPerPage = $this->cookie->pagerWebappObtain ? $this->cookie->pagerWebappObtain : $recPerPage;
$results = $this->webapp->getAppsByAPI($type, $param, $recTotal, $recPerPage, $pageID);
if($results)
{
+2
View File
@@ -21,6 +21,7 @@ $jsFiles[] = $jqueryRoot . 'datepicker/date.js';
$jsFiles[] = $jqueryRoot . 'datepicker/min.js';
$jsFiles[] = $jqueryRoot . 'alert/min.js';
$jsFiles[] = $jqueryRoot . 'colorize/min.js';
$jsFiles[] = $jqueryRoot . 'dropmenu/dropmenu.js';
/* Combine these js files. */
$allJSFile = $jsRoot . 'all.js';
@@ -70,6 +71,7 @@ foreach($langs as $lang)
$cssCode .= file_get_contents($themeRoot . 'default/treeview.css');
$cssCode .= file_get_contents($themeRoot . 'default/datepicker.css');
$cssCode .= file_get_contents($themeRoot . 'default/alert.css');
$cssCode .= file_get_contents($themeRoot . 'default/dropmenu.css');
/* Css file for current lang and current them. */
$cssCode .= file_get_contents($themeRoot . "lang/$lang.css");
+14
View File
@@ -464,6 +464,20 @@ function setForm()
});
}
/**
* Set form action and submit.
*
* @param url $actionLink
* @param string $hiddenwin 'hiddenwin'
* @access public
* @return void
*/
function setFormAction(actionLink, hiddenwin)
{
if(hiddenwin) $('form').attr('target', hiddenwin);
$('form').attr('action', actionLink).submit();
}
/**
* Set the max with of image.
*
+3
View File
@@ -5,6 +5,9 @@
border: 1px solid rgba(0,0,0,0.2);
border-radius: 6px 6px 6px 6px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
max-height:400px;
overflow:auto;
overflow-x:hidden;
}
.listMenu ul
+1 -1
View File
@@ -37,7 +37,7 @@ $app->setDebug();
/* Check the installed version is the latest or not. */
$config->installedVersion = $common->loadModel('setting')->getVersion();
if(version_compare($config->version, $config->installedVersion) <= 0) die(header('location: index.php'));
if(!$_SERVER['HTTP_X_REQUESTED_WITH'] and version_compare($config->version, $config->installedVersion) <= 0) die(header('location: index.php'));
/* Run it. */
$app->parseRequest();