diff --git a/db/update4.3.sql b/db/update4.3.sql index 5c74da0efd..743ee51395 100644 --- a/db/update4.3.sql +++ b/db/update4.3.sql @@ -5,6 +5,8 @@ CREATE TABLE IF NOT EXISTS `zt_custom` ( `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; + diff --git a/framework/router.class.php b/framework/router.class.php index 249c752779..e2fde411c1 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -1465,15 +1465,14 @@ class router } /* Merge from the db lang. */ - if($moduleName != 'common' and isset($lang->db->custom)) + if($moduleName != 'common' and isset($lang->db->custom[$moduleName])) { - foreach($lang->db->custom as $record) + foreach($lang->db->custom[$moduleName] as $section => $fields) { - if($moduleName == $record->module) + foreach($fields as $key => $value) { - if(!$record->key) continue; - unset($lang->{$record->module}->{$record->section}[$record->key]); - $lang->{$record->module}->{$record->section}[$record->key] = $record->value; + unset($lang->{$moduleName}->{$section}[$key]); + $lang->{$moduleName}->{$section}[$key] = $value; } } } diff --git a/module/bug/control.php b/module/bug/control.php index a11d47db41..17a0f4d7d5 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -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(); } @@ -670,6 +670,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. @@ -713,6 +732,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. * diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js index 55f6788f5d..f2938ef993 100644 --- a/module/bug/js/browse.js +++ b/module/bug/js/browse.js @@ -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'}); diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index c35cfa613a..3c1cb69661 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -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'; diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 2c0a2c4f11..d89714dc2f 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -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 = '删除模板'; diff --git a/module/bug/model.php b/module/bug/model.php index c2b54c6153..ea6a08c3fb 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -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. * diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index b0ef9656cd..e7a25d3d58 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -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);
" . $lang->bug->moduleBugs . " "; + echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . ""; echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=assignToMe¶m=0"), $lang->bug->assignToMe) . ""; echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=openedByMe¶m=0"), $lang->bug->openedByMe) . ""; echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=resolvedByMe¶m=0"), $lang->bug->resolvedByMe) . ""; @@ -31,21 +32,35 @@ js::set('customed', $customed); echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=unclosed¶m=0"), $lang->bug->unclosed) . ""; echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=longLifeBugs¶m=0"), $lang->bug->longLifeBugs) . ""; echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=postponedBugs¶m=0"), $lang->bug->postponedBugs) . ""; - echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->bug->allBugs) . ""; echo "" . html::a($this->createLink('bug', 'browse', "productid=$productID&browseType=needconfirm¶m=0"), $lang->bug->needConfirm) . ""; echo "{$lang->bug->byQuery} "; ?>
'; + echo html::a("#", " ", '', "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 ''; + 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"); ?>
+ +
'>
 
-
'> + - - + - +
+
@@ -71,7 +86,7 @@ js::set('customed', $customed);
recTotal}&recPerPage={$pager->recPerPage}"; ?> @@ -110,14 +125,11 @@ js::set('customed', $customed); - id");?> @@ -170,11 +182,19 @@ js::set('customed', $customed); if($browseType == 'needconfirm') $columns = $this->cookie->windowWidth >= $this->config->wideSize ? 7 : 6; ?>
- - id));?> severity;?>'>severity;?> - +
edit); + echo "
"; + echo html::selectAll() . html::selectReverse(); + echo "
"; + + $actionLink = $this->createLink('bug', 'batchEdit', "productID=$productID"); + $misc = common::hasPriv('bug', 'batchEdit') ? "onclick=setFormAction('$actionLink')" : "disabled='disabled'"; + echo "
"; + echo html::commonButton($lang->edit, $misc); + echo ""; + echo "
"; ?>
@@ -187,4 +207,58 @@ js::set('customed', $customed);
+ + + + + + + diff --git a/module/build/control.php b/module/build/control.php index 22fcb512f9..a7fee06533 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -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); diff --git a/module/build/model.php b/module/build/model.php index 5dd7e87928..1bf874f7b4 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -138,8 +138,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; } } @@ -199,7 +200,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; diff --git a/module/build/view/edit.html.php b/module/build/view/edit.html.php index 8f845383a6..2c5ec6b3a3 100644 --- a/module/build/view/edit.html.php +++ b/module/build/view/edit.html.php @@ -105,7 +105,7 @@
bugs . ',', ',' . $bug->id . ',') !== false) echo 'checked';?>> id);?> title, '', "class='preview'");?> bug->statusList[$bug->status];?>status == 'resolved' ? substr($users[$bug->resolvedBy], 2) : html::select('resolvedBy[]', $users, $this->app->user->account, "class='w-70px'");?>status == 'resolved' or $bug->status == 'closed') ? substr($users[$bug->resolvedBy], 2) : html::select('resolvedBy[]', $users, $this->app->user->account, "class='w-70px'");?>
diff --git a/module/common/model.php b/module/common/model.php index a7f63644cc..a9bd1fa173 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -129,6 +129,7 @@ class commonModel extends model if(!$this->config->db->name) return; $records = $this->loadModel('custom')->getAll(); if(!$records) return; + $this->lang->db = new stdclass(); $this->lang->db->custom = $records; } diff --git a/module/common/view/action.html.php b/module/common/view/action.html.php index 36500a98bf..cd2f2c0e57 100755 --- a/module/common/view/action.html.php +++ b/module/common/view/action.html.php @@ -132,14 +132,14 @@ $(function(){ action->printAction($action);?> history)) echo " ";?> - - id)'")?> - comment) or !empty($action->history)):?> comment)) echo "
";?> + + id)'")?> + comment) { @@ -148,7 +148,6 @@ $(function(){ echo "
"; } ?> - @@ -54,7 +54,7 @@ EOT; custom->{$module}->fields as $key => $value) { - echo "
  • " . html::a(inlink('setCustom', "module=$module&field=$key"), $value) . "
  • "; + echo "
  • " . html::a(inlink('set', "module=$module&field=$key"), $value) . "
  • "; } ?> @@ -63,7 +63,7 @@ EOT; - +
    @@ -85,7 +85,18 @@ EOT; - + + + + +
    custom->$module . ' >> ' . $config->custom->$module->fields[$field]?>
    custom->key;?>
    custom->restore, inlink('restore', "module=$module&field=$field"), 'hiddenwin')?>
    + $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'); + ?> +
    diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 611087db2a..0c2efc9fcf 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -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(); @@ -491,12 +495,12 @@ $lang->mail->methodOrder[30] = 'reset'; /* custom. */ $lang->resource->custom = new stdclass(); -$lang->resource->custom->index = 'index'; -$lang->resource->custom->setCustom = 'setCustom'; -$lang->resource->custom->restore = 'restore'; +$lang->resource->custom->index = 'index'; +$lang->resource->custom->set = 'set'; +$lang->resource->custom->restore = 'restore'; $lang->custom->methodOrder[5] = 'index'; -$lang->custom->methodOrder[10] = 'setCustom'; +$lang->custom->methodOrder[10] = 'set'; $lang->custom->methodOrder[15] = 'restore'; /* Subversion. */ diff --git a/module/my/js/common.js b/module/my/js/common.js index 5be5272b2d..65ecb791b2 100644 --- a/module/my/js/common.js +++ b/module/my/js/common.js @@ -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(); -} diff --git a/module/my/js/todo.js b/module/my/js/todo.js index a3a789eb21..560727ea2b 100644 --- a/module/my/js/todo.js +++ b/module/my/js/todo.js @@ -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'}); diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index 2375a5e64b..22e49befd8 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -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')\""); } } ?> diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index 06b02715a9..c208ab29da 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -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')\""); } ?> diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index ca7a21ee59..e80d2736a2 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -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')"); } ?> diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index 20b7f9dfd7..d218a8aa13 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -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'"); } ?> diff --git a/module/product/control.php b/module/product/control.php index 6863eee4e9..9ba407d28c 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -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(); } diff --git a/module/product/js/browse.js b/module/product/js/browse.js index 5fe0cf9db2..55a80528c5 100644 --- a/module/product/js/browse.js +++ b/module/product/js/browse.js @@ -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(); diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index a615f6926b..c3f600b5c0 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -14,12 +14,10 @@ - +
    - inlink('browse',"productID=$productID"), $lang->product->moduleStory);?> + inlink('browse', "productID=$productID&browseType=allStory"), $lang->product->allStory);?> inlink('browse', "productID=$productID&browseType=assignedtome"), $lang->product->assignedToMe);?> inlink('browse', "productID=$productID&browseType=openedByMe"), $lang->product->openedByMe);?> inlink('browse', "productID=$productID&browseType=reviewedByMe"), $lang->product->reviewedByMe);?> @@ -28,23 +26,37 @@ var browseType = ''; inlink('browse', "productID=$productID&browseType=activeStory"), $lang->product->activeStory);?> inlink('browse', "productID=$productID&browseType=changedStory"), $lang->product->changedStory);?> inlink('browse', "productID=$productID&browseType=closedStory"), $lang->product->closedStory);?> - inlink('browse', "productID=$productID&browseType=allStory"), $lang->product->allStory);?> product->searchStory;?>
    - - - - + '; + echo html::a("#", " ", '', "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 ''; + + 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"); + ?>
    -
    '>
    + +
    '>
     
    - - +
    +
    @@ -54,7 +66,7 @@ var browseType = '';
    @@ -122,7 +134,7 @@ var browseType = ''; $actionLink = $this->createLink('story', 'batchEdit', "productID=$productID&projectID=0"); echo "
    "; - echo html::commonButton($lang->edit, "onclick=\"changeAction('$actionLink')\" $disabled"); + echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\" $disabled"); echo ""; echo "
    "; } @@ -143,7 +155,7 @@ var 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 "
  • " . html::a('#', $lang->close, '', $misc) . "
  • "; $misc = common::hasPriv('story', 'batchReview') ? "onmouseover='toggleSubMenu(this.id)' onmouseout='toggleSubMenu(this.id)' id='reviewItem'" : $class; @@ -173,7 +185,7 @@ var browseType = ''; } else { - echo html::a('#', $result, '', "onclick=\"changeAction('$actionLink',true)\""); + echo html::a('#', $result, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\""); } echo ""; } @@ -192,7 +204,7 @@ var browseType = ''; { $actionLink = $this->createLink('story', 'batchReview', "result=reject&reason=$key"); echo "
  • "; - echo html::a('#', $reason, '', "onclick=\"changeAction('$actionLink',true)\""); + echo html::a('#', $reason, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\""); echo "
  • "; } ?> @@ -207,7 +219,7 @@ var browseType = ''; foreach($plans as $planID => $plan) { $actionLink = $this->createLink('story', 'batchChangePlan', "planID=$planID"); - echo "
  • " . html::a('#', $plan, '', "onclick=\"changeAction('$actionLink',true)\"") . "
  • "; + echo "
  • " . html::a('#', $plan, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "
  • "; } ?> @@ -220,7 +232,7 @@ var browseType = ''; foreach($lang->story->stageList as $key => $stage) { $actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key"); - echo "
  • " . html::a('#', $stage, '', "onclick=\"changeAction('$actionLink',true)\"") . "
  • "; + echo "
  • " . html::a('#', $stage, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"") . "
  • "; } ?> diff --git a/module/project/js/story.js b/module/project/js/story.js index 3eee9acf9b..bf4d0687b5 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -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(); -} diff --git a/module/project/js/task.js b/module/project/js/task.js index f2cb074c39..b0367af308 100644 --- a/module/project/js/task.js +++ b/module/project/js/task.js @@ -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'); diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index 01d8ba966f..8543bc77c5 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -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; diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index 1738d1b12c..4ab8f9512e 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -149,13 +149,13 @@ var browseType = ''; echo ""; $actionLink = $this->createLink('task', 'batchEdit', "projectID=$projectID"); - $misc = $canBatchEdit ? "onclick=changeAction('$actionLink')" : "disabled='disabled'"; + $misc = $canBatchEdit ? "onclick=setFormAction('$actionLink')" : "disabled='disabled'"; echo "
    "; - echo html::commonButton($lang->edit, "onclick=\"changeAction('projectTaskForm', 'batchEdit', '$actionLink')\" $misc"); + echo html::commonButton($lang->edit, $misc); echo ""; echo "
    "; } - echo $summary; + echo "" . $summary . ""; ?> show();?> @@ -172,7 +172,7 @@ var browseType = '';
      createLink('task', 'batchClose'); - $misc = $canBatchClose ? "onclick=changeAction('projectTaskForm','batchClose','$actionLink')" : "class='disabled'"; + $misc = $canBatchClose ? "onclick=setFormAction('$actionLink','hiddenwin')" : "class='disabled'"; echo "
    • " . html::a('#', $lang->close, '', $misc) . "
    • "; ?>
    diff --git a/module/project/view/taskheader.html.php b/module/project/view/taskheader.html.php index 826209656c..b5190ad469 100644 --- a/module/project/view/taskheader.html.php +++ b/module/project/view/taskheader.html.php @@ -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 ''; + echo html::a("#", " ", '', "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 ''; echo ''; echo html::a("#", " ", '', "id='importAction' class='icon-green-task-import' onclick=toggleSubMenu(this.id,'bottom',0) title='{$lang->import}'"); @@ -35,11 +39,26 @@ + + diff --git a/module/story/lang/en.php b/module/story/lang/en.php index 7efd42928b..c8adc9fc71 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -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"; diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index 0a0728d689..00df06d663 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -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 = "批量修改阶段"; diff --git a/module/task/lang/en.php b/module/task/lang/en.php index 2c3885ae64..c605ae0175 100644 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -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"; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 3f33fb0d34..07f4ba8d20 100644 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -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 = "确认需求变动"; diff --git a/module/testcase/control.php b/module/testcase/control.php index c472c3d706..b9cddebc7b 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -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(); } diff --git a/module/testcase/js/browse.js b/module/testcase/js/browse.js index 4501bab2e9..747583cee2 100644 --- a/module/testcase/js/browse.js +++ b/module/testcase/js/browse.js @@ -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'});}); diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php index 78d1723562..3c943d2679 100644 --- a/module/testcase/lang/en.php +++ b/module/testcase/lang/en.php @@ -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'; diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php index 70ae7811fd..39c17a6ae9 100644 --- a/module/testcase/lang/zh-cn.php +++ b/module/testcase/lang/zh-cn.php @@ -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 = '确认需求变动'; diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index 6f380c7568..27ea34a6a3 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -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);
    " . $lang->testcase->moduleCases . " "; echo "" . html::a($this->createLink('testcase', 'browse', "productid=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->testcase->allCases) . ""; echo "" . html::a($this->createLink('testcase', 'browse', "productid=$productID&browseType=needconfirm¶m=0"), $lang->testcase->needConfirm) . ""; echo "{$lang->testcase->bySearch} "; ?>
    - - - - - + '; + echo html::a("#", " ", '', "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 ''; + + common::printIcon('testcase', 'batchCreate', "productID=$productID&moduleID=$moduleID"); + common::printIcon('testcase', 'create', "productID=$productID&moduleID=$moduleID"); + ?>
    + +
    '>
     
    - - +
    +
    @@ -52,7 +72,7 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
    recTotal}&recPerPage={$pager->recPerPage}"; ?> @@ -74,17 +94,11 @@ js::set('confirmDelete', $lang->testcase->confirmDelete); - id");?> @@ -123,9 +137,14 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
    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 "
    " . html::selectAll() . html::selectReverse() . "
    "; + + $actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID"); + $misc = common::hasPriv('testcase', 'batchEdit') ? "onclick=setFormAction('$actionLink')" : "disabled='disabled'"; + echo "
    "; + echo html::commonButton($lang->edit, $misc); + echo ""; + echo "
    "; ?>
    @@ -138,4 +157,15 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
    actions;?>
    - - id));?> pri?>'>pri?>
    + + + diff --git a/module/testtask/js/cases.js b/module/testtask/js/cases.js index c7ee62f297..de106f2099 100644 --- a/module/testtask/js/cases.js +++ b/module/testtask/js/cases.js @@ -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'});}); diff --git a/module/testtask/view/cases.html.php b/module/testtask/view/cases.html.php index 9c09ab0691..433f42a846 100644 --- a/module/testtask/view/cases.html.php +++ b/module/testtask/view/cases.html.php @@ -106,20 +106,25 @@ var moduleID = '';
    - - - - ';casesform.submit();"> - - - - - id");?>';casesform.submit();"> - - - - ';casesform.submit();"> - + 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')\""); + } + ?>
    diff --git a/module/webapp/control.php b/module/webapp/control.php index 9bca1db02d..d6932ed716 100644 --- a/module/webapp/control.php +++ b/module/webapp/control.php @@ -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) { diff --git a/www/js/my.full.js b/www/js/my.full.js index 19193fc2bb..7c102ff032 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -300,12 +300,14 @@ function toggleTreeBox() function() { $('.side').hide() + $('.divider').hide() $('.treeSlider span').css("border-right", "0 none"); $('.treeSlider span').css("border-left", "4px solid #000000"); }, function() { $('.side').show() + $('.divider').show() $('.treeSlider span').css("border-right", "4px solid #000000"); $('.treeSlider span').css("border-left", "0 none"); } @@ -462,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. * diff --git a/www/theme/default/dropmenu.css b/www/theme/default/dropmenu.css index 13cea56999..9e3b3e32b6 100644 --- a/www/theme/default/dropmenu.css +++ b/www/theme/default/dropmenu.css @@ -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