+ add the feature of shortcut.

This commit is contained in:
wangchunsheng
2010-04-06 13:09:07 +00:00
parent d01eccbe71
commit 2ec4f5be0f
4 changed files with 25 additions and 0 deletions
+5
View File
@@ -147,6 +147,11 @@ EOT;
echo "<li $active><nobr><a href='$link'>$menuLabel</a></nobr></li>\n";
}
}
echo "<li id='searchbox'>";
echo html::select('searchType', $lang->searchObjects);
echo html::input('searchQuery', '', "class='text-2'");
echo html::submitButton($lang->go, 'onclick="shortcut()"');
echo "</li>";
echo "</ul>\n";
}
+7
View File
@@ -57,6 +57,7 @@ $lang->addFiles = '上传了附件 ';
$lang->files = '附件 ';
$lang->workingHour= '工时';
$lang->showHelp = '显示帮助';
$lang->go = 'GO!';
/* 主导航菜单。*/
$lang->menu->index = '首页|index|index';
@@ -67,6 +68,12 @@ $lang->menu->qa = 'QA视图|qa|index';
$lang->menu->company = '组织视图|company|index';
$lang->menu->admin = '后台管理|admin|index';
/* 查询条中可以选择的对象列表。*/
$lang->searchObjects['story'] = '需求';
$lang->searchObjects['task'] = '任务';
$lang->searchObjects['bug'] = 'Bug';
$lang->searchObjects['testcase']= '用例';
/* 首页菜单设置。*/
$lang->index->menu->product = '浏览产品|product|browse';
$lang->index->menu->project = '浏览项目|project|browse';
+11
View File
@@ -50,6 +50,17 @@ function createLink(moduleName, methodName, vars, viewType)
return link;
}
/* 快速跳转到某一个模块的某一个id。*/
function shortcut()
{
objectType = $('#searchType').attr('value');
objectValue = $('#searchQuery').attr('value');
if(objectType && objectValue)
{
location.href=createLink(objectType, 'view', "id=" + objectValue);
}
}
/* 自动设置所有属性为nobr的title。*/
function setNowrapObjTitle()
{
+2
View File
@@ -189,6 +189,8 @@ caption {border:1px solid #e4e4e4; background:#efefef; margin:0; padding:5
#mainmenu a {color:black;}
#mainmenu .active {color:#FFF; background-color:#00008B;}
#mainmenu .active a {color:white}
#mainmenu #searchbox{float:right; border:none}
#mainmenu #searchbox .text-2{width:80px}
/* 模块的菜单。*/
#modulemenu {color:white; margin-bottom:10px; font-weight:normal; font-size:normal}