diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index f077c8ff35..9d5287d982 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -453,7 +453,7 @@ $lang->action->label->testtask = '测试单|testtask|view|caseID=%s'; $lang->action->label->testsuite = '测试套件|testsuite|view|suiteID=%s'; $lang->action->label->caselib = '用例库|caselib|view|libID=%s'; $lang->action->label->todo = '待办|todo|view|todoID=%s'; -$lang->action->label->doclib = '文档库|doc|doclibbrowse|libID=%s'; +$lang->action->label->doclib = '文档库|doc|objectLibs|type=&objectID=&libID=%s'; $lang->action->label->doc = '文档|doc|view|docID=%s'; $lang->action->label->user = '用户|user|view|account=%s'; $lang->action->label->testreport = '报告|testreport|view|report=%s'; diff --git a/module/block/control.php b/module/block/control.php index 0b92e36133..bbf18325b2 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -853,6 +853,7 @@ class block extends control $this->loadModel('weekly'); $this->app->loadLang('task'); $this->app->loadLang('story'); + $this->app->loadLang('bug'); /* Set project status and count. */ $status = isset($this->params->type) ? $this->params->type : 'all'; diff --git a/module/block/lang/de.php b/module/block/lang/de.php index ea422bf89b..06ea79cfe3 100644 --- a/module/block/lang/de.php +++ b/module/block/lang/de.php @@ -18,12 +18,8 @@ $lang->block->grid = 'Gitter'; $lang->block->color = 'Farbe'; $lang->block->reset = 'Zurücksetzen'; $lang->block->story = 'Story'; -$lang->block->bug = 'Bug'; $lang->block->investment = 'Investment'; -$lang->block->left = 'Left'; $lang->block->estimate = 'Estimate'; -$lang->block->doneBugs = 'Done'; -$lang->block->leftBugs = 'Left'; $lang->block->last = 'Last'; $lang->block->account = 'Konto'; diff --git a/module/block/lang/en.php b/module/block/lang/en.php index 8987fdba98..4d8a968019 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -18,12 +18,8 @@ $lang->block->grid = 'Position'; $lang->block->color = 'Color'; $lang->block->reset = 'Reset Layout'; $lang->block->story = 'Story'; -$lang->block->bug = 'Bug'; $lang->block->investment = 'Investment'; -$lang->block->left = 'Left'; $lang->block->estimate = 'Estimate'; -$lang->block->doneBugs = 'Done'; -$lang->block->leftBugs = 'Left'; $lang->block->last = 'Last'; $lang->block->account = 'Account'; diff --git a/module/block/lang/fr.php b/module/block/lang/fr.php index ac152d4c1a..9a191bb6fd 100644 --- a/module/block/lang/fr.php +++ b/module/block/lang/fr.php @@ -18,12 +18,8 @@ $lang->block->grid = 'Position'; $lang->block->color = 'Couleur'; $lang->block->reset = 'Réinit'; $lang->block->story = 'Story'; -$lang->block->bug = 'Bug'; $lang->block->investment = 'Investment'; -$lang->block->left = 'Left'; $lang->block->estimate = 'Estimate'; -$lang->block->doneBugs = 'Done'; -$lang->block->leftBugs = 'Left'; $lang->block->last = 'Last'; $lang->block->account = 'Compte'; diff --git a/module/block/lang/vi.php b/module/block/lang/vi.php index cdb7db9880..38576d2bc6 100644 --- a/module/block/lang/vi.php +++ b/module/block/lang/vi.php @@ -18,12 +18,8 @@ $lang->block->grid = 'Vị trí'; $lang->block->color = 'Màu'; $lang->block->reset = 'Thiết lập lại giao diện'; $lang->block->story = 'Story'; -$lang->block->bug = 'Bug'; $lang->block->investment = 'Investment'; -$lang->block->left = 'Left'; $lang->block->estimate = 'Estimate'; -$lang->block->doneBugs = 'Done'; -$lang->block->leftBugs = 'Left'; $lang->block->last = 'Last'; $lang->block->account = 'Tài khoản'; diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index 735f418623..5be31c3d43 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -18,12 +18,8 @@ $lang->block->grid = '位置'; $lang->block->color = '颜色'; $lang->block->reset = '恢复默认'; $lang->block->story = '需求'; -$lang->block->bug = 'Bug'; $lang->block->investment = '投入'; -$lang->block->left = '剩余'; $lang->block->estimate = '预计工时'; -$lang->block->doneBugs = '已解决'; -$lang->block->leftBugs = '未解决'; $lang->block->last = '近期'; $lang->block->account = '所属用户'; diff --git a/module/block/view/projectstatisticblock.html.php b/module/block/view/projectstatisticblock.html.php index 23cbdc39f4..8ff0116819 100644 --- a/module/block/view/projectstatisticblock.html.php +++ b/module/block/view/projectstatisticblock.html.php @@ -147,7 +147,7 @@ $(function()
doneStories;?>
-
block->left . ":";?>
+
project->surplus . ":";?>
leftStories;?>
@@ -167,17 +167,17 @@ $(function()
-

block->bug;?>

+

bug->common;?>

block->totalBug . ":";?>
allBugs;?>
-
block->doneBugs . ":";?>
+
bug->statusList['resolved'] . ":";?>
doneBugs;?>
-
block->leftBugs . ":";?>
+
bug->unResolved . ":";?>
leftBugs;?>
diff --git a/module/common/lang/en.php b/module/common/lang/en.php index a236f17cb2..1aac0409b4 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -154,6 +154,7 @@ $lang->extension->common = 'Extension'; $lang->company->common = 'Company'; $lang->dept->common = 'Dept'; $lang->program->list = 'Program List'; +$lang->execution->list = "{$lang->executionCommon} List"; $lang->personnel->common = 'Member'; $lang->personnel->invest = 'Investment'; diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 7e96993882..701638fc27 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -226,7 +226,7 @@ $lang->scrum->menu->settings['subMenu']->group = array('link' => "{$lang-> /* Execution menu. */ $lang->execution->homeMenu = new stdclass(); if($config->systemMode == 'new') $lang->execution->homeMenu->index = "$lang->dashboard|execution|index|"; -$lang->execution->homeMenu->list = array('link' => "{$lang->executionCommon}列表|execution|all|", 'alias' => 'create,batchedit'); +$lang->execution->homeMenu->list = array('link' => "{$lang->execution->list}|execution|all|", 'alias' => 'create,batchedit'); $lang->execution->menu = new stdclass(); $lang->execution->menu->task = array('link' => "{$lang->task->common}|execution|task|executionID=%s", 'subModule' => 'task,tree', 'alias' => 'importtask,importbug'); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 4840a236c3..ad5b452a85 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -154,6 +154,7 @@ $lang->extension->common = '插件'; $lang->company->common = '公司'; $lang->dept->common = '部门'; $lang->program->list = '项目集列表'; +$lang->execution->list = "{$lang->executionCommon}列表"; $lang->personnel->common = '人员'; $lang->personnel->invest = '投入人员'; diff --git a/module/common/view/footer.lite.html.php b/module/common/view/footer.lite.html.php index d48816e360..a02b55b8ba 100755 --- a/module/common/view/footer.lite.html.php +++ b/module/common/view/footer.lite.html.php @@ -1,7 +1,5 @@ getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> -noHiddenwin)):?> - loadModel('cron')->runable()) js::execute('startCron()');?> - diff --git a/module/doc/control.php b/module/doc/control.php index e90b33ef34..939107f84b 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -780,31 +780,6 @@ class doc extends control die(js::locate('back')); } - /** - * Doc lib browse. - * - * @param int $libID - * @access public - * @return void - */ - public function doclibBrowse($libID = 0) - { - $doclib = $this->doc->getLibById($libID); - - $objecitID = 0; - if($doclib->type == 'product') - { - $objectID = $doclib->product; - } - elseif($doclib->type == 'project' or $doclib->type == 'execution') - { - $doclib->type = 'project'; - $objectID = $doclib->project; - } - - die(js::locate($this->createLink('doc', 'objectLibs', "type={$doclib->type}&objectID=$objectID&libID=$libID"))); - } - /** * Show libs for product or project. * @@ -818,6 +793,13 @@ class doc extends control */ public function objectLibs($type, $objectID = 0, $libID = 0, $docID = 0, $version = 0) { + if(empty($type)) + { + $doclib = $this->doc->getLibById($libID); + $type = $doclib->type == 'execution' ? 'project' : $doclib->type; + $objectID = $type == 'custom' or $type == 'book' ? 0 : $doclib->$type; + } + $this->session->set('docList', $this->app->getURI(true), $this->app->openApp); $objects = $this->doc->getOrderedObjects($type); diff --git a/module/doc/lang/de.php b/module/doc/lang/de.php index 1a34dfbd57..bc590436f5 100644 --- a/module/doc/lang/de.php +++ b/module/doc/lang/de.php @@ -70,15 +70,13 @@ $lang->doc->index = 'Home'; $lang->doc->create = 'Dokument hinzufügen'; $lang->doc->edit = 'Bearbeiten'; $lang->doc->delete = 'Löschen'; +$lang->doc->createBook = 'Create Book'; $lang->doc->browse = 'Liste'; $lang->doc->view = 'Details'; $lang->doc->diff = 'Diff'; $lang->doc->diffAction = 'Diff Document'; $lang->doc->sort = 'Sortierung'; $lang->doc->manageType = 'Kategorie verwalten'; -$lang->doc->createBook = 'Create Book'; -$lang->doc->manageBook = 'Manage Book'; -$lang->doc->editBook = 'Edit Book'; $lang->doc->editType = 'Bearbeiten'; $lang->doc->deleteType = 'Löschen'; $lang->doc->addType = 'Hinzufügen'; diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index c365e9ade4..bd75818948 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -71,15 +71,13 @@ $lang->doc->index = 'Document Home'; $lang->doc->create = 'Create Document'; $lang->doc->edit = 'Edit Document'; $lang->doc->delete = 'Delete Document'; +$lang->doc->createBook = 'Create Book'; $lang->doc->browse = 'Document List'; $lang->doc->view = 'Document Detail'; $lang->doc->diff = 'Diff'; $lang->doc->diffAction = 'Diff Document'; $lang->doc->sort = 'Rank Document'; $lang->doc->manageType = 'Manage Category'; -$lang->doc->createBook = 'Create Book'; -$lang->doc->manageBook = 'Manage Book'; -$lang->doc->editBook = 'Edit Book'; $lang->doc->editType = 'Edit'; $lang->doc->deleteType = 'Delete'; $lang->doc->addType = 'Add'; @@ -182,7 +180,7 @@ $lang->doc->noArticle = 'No articles.'; $lang->doc->noLib = 'No libraries. '; $lang->doc->noBook = 'The WIKI library has not created a manual, please create a new one :)'; $lang->doc->cannotCreateOffice = 'Sorry, %s can only be created in ZenTao Enterprise. Contact us at renee@easysoft.ltd to try ZenTao Enterprise.'; -$lang->doc->notSetOffice = "

To create a %s document, you need to configure office convert.

"; +$lang->doc->notSetOffice = "

To create a %s document, you need to configure office convert.

"; $lang->doc->noSearchedDoc = 'No documents found.'; $lang->doc->noEditedDoc = 'You have not edited any documents.'; $lang->doc->noOpenedDoc = 'You have not created any documents.'; diff --git a/module/doc/lang/fr.php b/module/doc/lang/fr.php index bf76667bbc..30aca919f7 100644 --- a/module/doc/lang/fr.php +++ b/module/doc/lang/fr.php @@ -70,15 +70,13 @@ $lang->doc->index = 'Accueil Documents'; $lang->doc->create = 'Ajouter Document'; $lang->doc->edit = 'Editer Document'; $lang->doc->delete = 'Supprimer Document'; +$lang->doc->createBook = 'Create Book'; $lang->doc->browse = 'Liste Documents'; $lang->doc->view = 'Détail Document'; $lang->doc->diff = 'Diff'; $lang->doc->diffAction = 'Document Diff'; $lang->doc->sort = 'Rang Document'; $lang->doc->manageType = 'Gérer Catégories'; -$lang->doc->createBook = 'Create Book'; -$lang->doc->manageBook = 'Manage Book'; -$lang->doc->editBook = 'Edit Book'; $lang->doc->editType = 'Editer'; $lang->doc->deleteType = 'Supprimer'; $lang->doc->addType = 'Ajouter'; diff --git a/module/doc/lang/vi.php b/module/doc/lang/vi.php index 7b52adc0f0..6a82a7cd24 100644 --- a/module/doc/lang/vi.php +++ b/module/doc/lang/vi.php @@ -70,15 +70,13 @@ $lang->doc->index = 'Document Home'; $lang->doc->create = 'Tạo tài liệu'; $lang->doc->edit = 'Sửa tài liệu'; $lang->doc->delete = 'Xóa tài liệu'; +$lang->doc->createBook = 'Create Book'; $lang->doc->browse = 'Document danh sách'; $lang->doc->view = 'Document Detail'; $lang->doc->diff = 'Diff'; $lang->doc->diffAction = 'Diff tài liệu'; $lang->doc->sort = 'Đánh giá tài liệu'; $lang->doc->manageType = 'Quản lý danh mục'; -$lang->doc->createBook = 'Create Book'; -$lang->doc->manageBook = 'Manage Book'; -$lang->doc->editBook = 'Edit Book'; $lang->doc->editType = 'Sửa'; $lang->doc->deleteType = 'Xóa'; $lang->doc->addType = 'Thêm'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index adf72ec989..9065012fd4 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -71,15 +71,13 @@ $lang->doc->index = '文档主页'; $lang->doc->create = '创建文档'; $lang->doc->edit = '编辑文档'; $lang->doc->delete = '删除文档'; +$lang->doc->createBook = '创建手册'; $lang->doc->browse = '文档列表'; $lang->doc->view = '文档详情'; $lang->doc->diff = '对比'; $lang->doc->diffAction = '对比文档'; $lang->doc->sort = '文档排序'; $lang->doc->manageType = '维护目录'; -$lang->doc->createBook = '创建手册'; -$lang->doc->manageBook = '维护手册'; -$lang->doc->editBook = '编辑手册'; $lang->doc->editType = '编辑目录'; $lang->doc->deleteType = '删除目录'; $lang->doc->addType = '增加目录'; @@ -182,7 +180,7 @@ $lang->doc->noArticle = '暂时没有文章。'; $lang->doc->noLib = '暂时没有文档库。'; $lang->doc->noBook = 'WIKI库还未创建手册,请新建 :)'; $lang->doc->cannotCreateOffice = '

对不起,企业版才能创建%s文档。

试用企业版,请联系我们:4006-8899-23   0532-86893032。

'; -$lang->doc->notSetOffice = "

创建%s文档,需要配置Office转换设置

"; +$lang->doc->notSetOffice = "

创建%s文档,需要配置Office转换设置

"; $lang->doc->noSearchedDoc = '没有搜索到任何文档。'; $lang->doc->noEditedDoc = '您还没有编辑任何文档。'; $lang->doc->noOpenedDoc = '您还没有创建任何文档。'; diff --git a/module/doc/model.php b/module/doc/model.php index 0178b75275..73904912a2 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1652,7 +1652,7 @@ class docModel extends model $actions .= "

'; @@ -1813,7 +1813,8 @@ EOF; $output .= "
"; foreach($objects as $key => $object) { - $output .= html::a(inlink('objectLibs', "type=$type&objectID=$key"), $object, '', "data-app='{$this->app->openApp}'"); + $selected = $key == $objectID ? 'selected' : ''; + $output .= html::a(inlink('objectLibs', "type=$type&objectID=$key"), $object, '', "class='$selected' data-app='{$this->app->openApp}'"); } $output .= "
"; } @@ -1825,7 +1826,8 @@ EOF; $output .= "
"; foreach($libs as $key => $lib) { - $output .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$key"), $lib->name, '', "data-app='{$this->app->openApp}'"); + $selected = $key == $libID ? 'selected' : ''; + $output .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$key"), $lib->name, '', "class='$selected' data-app='{$this->app->openApp}'"); } $output .= "
"; } diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index e1714b6908..811769429a 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -20,13 +20,7 @@ config->bizVersion)):?>
- doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice') : '###'); - if($isonlybody) $_GET['onlybody'] = 'yes'; - ?> + doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice') : '###');?>
doc->cannotCreateOffice, zget($lang->doc->typeList, $docType));?>
diff --git a/module/doc/view/index.html.php b/module/doc/view/index.html.php index cb6a9588dd..6931047237 100644 --- a/module/doc/view/index.html.php +++ b/module/doc/view/index.html.php @@ -21,7 +21,7 @@
doc->orderByEdit;?>
@@ -127,7 +127,7 @@
doc->myDoc;?>
@@ -159,7 +159,7 @@
doc->myCollection;?>
diff --git a/module/doc/view/objectlibs.html.php b/module/doc/view/objectlibs.html.php index b965e25560..80c98aeba6 100644 --- a/module/doc/view/objectlibs.html.php +++ b/module/doc/view/objectlibs.html.php @@ -38,4 +38,16 @@
+ diff --git a/module/doc/view/view.html.php b/module/doc/view/view.html.php index c3079d99d4..5e90c655d4 100644 --- a/module/doc/view/view.html.php +++ b/module/doc/view/view.html.php @@ -15,7 +15,7 @@ -session->docList ? $this->session->docList : inlink('browse', 'libID=0&browseTyp=byediteddate');?> +session->docList ? $this->session->docList : inlink('browse', 'libID=0&browseType=byediteddate');?> requestType == 'PATH_INFO' ? '?' : '&'; $sessionString .= session_name() . '=' . session_id(); diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index b3c8667bf8..d916e1db2c 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -194,7 +194,6 @@ $lang->execution->copy = "Copy {$lang->executionCommon}"; $lang->execution->delete = "Delete {$lang->executionCommon}"; $lang->execution->deleteAB = "Delete Execution"; $lang->execution->browse = "{$lang->executionCommon} List"; -$lang->execution->list = "{$lang->executionCommon} List"; $lang->execution->edit = "Edit {$lang->executionCommon}"; $lang->execution->editAction = "Edit Execution"; $lang->execution->batchEdit = "Edit"; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index cb14d2da43..c8f672cb9c 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -194,7 +194,6 @@ $lang->execution->copy = "复制{$lang->executionCommon}"; $lang->execution->delete = "删除{$lang->executionCommon}"; $lang->execution->deleteAB = "删除{$lang->execution->common}"; $lang->execution->browse = "浏览{$lang->execution->common}"; -$lang->execution->list = "{$lang->executionCommon}列表"; $lang->execution->edit = "编辑{$lang->executionCommon}"; $lang->execution->editAction = "编辑{$lang->execution->common}"; $lang->execution->batchEdit = "编辑"; diff --git a/module/index/view/index.html.php b/module/index/view/index.html.php index 028ac36b39..532aa11264 100644 --- a/module/index/view/index.html.php +++ b/module/index/view/index.html.php @@ -127,5 +127,9 @@ js::set('defaultOpen', $open); searchAB);?> searchObjects)) . ',');?> index->search);?> -noHiddenwin = true;?> - + + + + diff --git a/module/my/control.php b/module/my/control.php index 6592fe7285..21cc0589d0 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -125,14 +125,11 @@ class my extends control { /* Save session. */ $uri = $this->app->getURI(true); - if($this->app->viewType != 'json') - { - $this->session->set('todoList', $uri, 'my'); - $this->session->set('bugList', $uri, 'qa'); - $this->session->set('taskList', $uri, 'execution'); - $this->session->set('storyList', $uri, 'product'); - $this->session->set('testtaskList', $uri, 'qa'); - } + $this->session->set('todoList', $uri, 'my'); + $this->session->set('bugList', $uri, 'qa'); + $this->session->set('taskList', $uri, 'execution'); + $this->session->set('storyList', $uri, 'product'); + $this->session->set('testtaskList', $uri, 'qa'); /* Load pager. */ $this->app->loadClass('pager', $static = true); diff --git a/module/project/control.php b/module/project/control.php index f425d0f461..9936d7e077 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -612,7 +612,7 @@ class project extends control $this->session->set('caseList', $uri, 'qa'); $this->session->set('testtaskList', $uri, 'qa'); - if($this->config->maxVersion) + if(isset($this->config->maxVersion)) { $this->session->set('riskList', $uri, 'project'); $this->session->set('issueList', $uri, 'project'); diff --git a/module/story/control.php b/module/story/control.php index ac89ca8acf..2cfad68f07 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1513,6 +1513,7 @@ class story extends control public function zeroCase($productID = 0, $branchID = 0, $orderBy = 'id_desc') { $this->session->set('storyList', $this->app->getURI(true) . '#app=' . $this->app->openApp, 'product'); + $this->session->set('caseList', $this->app->getURI(true), $this->app->openApp); $this->loadModel('testcase'); if($this->app->openApp == 'project') diff --git a/module/task/control.php b/module/task/control.php index 8cb3656512..923fe34848 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -269,7 +269,7 @@ class task extends control $storyLink = $this->session->storyList ? $this->session->storyList : $this->createLink('execution', 'story', "executionID=$executionID"); /* Set menu. */ - $this->execution->setMenu($this->execution->getPairs(), $execution->id); + $this->execution->setMenu($execution->id); /* When common task are child tasks, query whether common task are consumed. */ $taskConsumed = 0; diff --git a/module/testtask/control.php b/module/testtask/control.php index 69c1a8d79f..b7077c65c6 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -146,6 +146,7 @@ class testtask extends control { /* Save session. */ $this->session->set('testtaskList', $this->app->getURI(true), 'qa'); + $this->session->set('caseList', $this->app->getURI(true), $this->app->openApp); $this->session->set('buildList', $this->app->getURI(true) . '#app=' . $this->app->openApp, 'execution'); $this->loadModel('testcase'); $this->app->loadLang('tree'); diff --git a/www/js/my.full.js b/www/js/my.full.js index 239cb04c0b..3726bfb444 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -835,16 +835,22 @@ function adjustMenuWidth() /** * Scroll to selected item in drop menu. * + * @param string $id * @access public * @return void */ -function scrollToSelected() +function scrollToSelected(id) { - $('#dropMenu .table-row .list-group').mouseout(function(){$(this).find('.active').removeClass('active')}); - if($('#dropMenu .table-row .col-left .list-group .selected').length > 0) + if(typeof(id) == 'undefined') id = '#dropMenu .table-col .list-group' + + $id = $(id); + $selected = $id.find('.selected'); + + $id.mouseout(function(){$(this).find('.active').removeClass('active')}); + if($selected.length > 0) { var offsetHeight = 75; - $('#dropMenu .table-row .col-left .list-group').scrollTop($('#dropMenu .table-row .col-left .list-group .selected').position().top - offsetHeight); + $id.scrollTop($selected.position().top - offsetHeight); } }