diff --git a/module/bug/control.php b/module/bug/control.php index 5ba5198478..f627ec747c 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -755,6 +755,7 @@ class bug extends control } } if($type == 'product') die(js::locate($this->createLink('bug', 'browse', "productID=$projectID"))); + if($type == 'my') die(js::locate($this->createLink('my', 'bug'))); die(js::locate($this->createLink('project', 'bug', "projectID=$projectID"))); } diff --git a/module/my/control.php b/module/my/control.php index 7a5ac879e2..daef531402 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -194,17 +194,18 @@ class my extends control $this->session->set('bugIDs', $bugIDs . ','); /* assign. */ - $this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->bug; - $this->view->position[] = $this->lang->my->bug; - $this->view->bugs = $bugs; - $this->view->users = $this->user->getPairs('noletter'); - $this->view->tabID = 'bug'; - $this->view->type = $type; - $this->view->recTotal = $recTotal; - $this->view->recPerPage = $recPerPage; - $this->view->pageID = $pageID; - $this->view->orderBy = $orderBy; - $this->view->pager = $pager; + $this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->bug; + $this->view->position[] = $this->lang->my->bug; + $this->view->bugs = $bugs; + $this->view->users = $this->user->getPairs('noletter'); + $this->view->memberPairs = $this->user->getPairs('noletter|nodeleted'); + $this->view->tabID = 'bug'; + $this->view->type = $type; + $this->view->recTotal = $recTotal; + $this->view->recPerPage = $recPerPage; + $this->view->pageID = $pageID; + $this->view->orderBy = $orderBy; + $this->view->pager = $pager; $this->display(); } diff --git a/module/my/css/common.css b/module/my/css/common.css index e69de29bb2..0b1dda3c8f 100644 --- a/module/my/css/common.css +++ b/module/my/css/common.css @@ -0,0 +1,4 @@ +.dropdown-menu.with-search {padding-bottom: 34px; min-width: 150px; overflow: hidden; max-height: 305px} +.dropdown-menu > .menu-search {padding: 0; position: absolute; z-index: 0; bottom: 0; left: 0; right: 0} +.dropdown-menu > .menu-search .input-group {width:100%;} +.dropdown-menu > .menu-search .input-group-addon {position: absolute; right: 10px; top: 0; z-index: 10; background: none; border: none; color: #666} diff --git a/module/my/js/common.js b/module/my/js/common.js index 2fb252ba4b..a79e8f6c74 100644 --- a/module/my/js/common.js +++ b/module/my/js/common.js @@ -9,4 +9,20 @@ $(function() if($('table.tablesorter').closest('form').size() > 0) fixedTfootAction($('table.tablesorter').closest('form')); /* Fixed table header */ if($('table.tablesorter').size() > 0) fixedTheadOfList($('table.tablesorter:first')); + + $('.dropdown-menu .with-search .menu-search').click(function(e) + { + e.stopPropagation(); + return false; + }).on('keyup change paste', 'input', function() + { + var val = $(this).val().toLowerCase(); + var $options = $(this).closest('ul.dropdown-menu.with-search').find('.option'); + if(val == '') return $options.removeClass('hide'); + $options.each(function() + { + var $option = $(this); + $option.toggleClass('hide', $option.text().toString().toLowerCase().indexOf(val) < 0 && $option.data('key').toString().toLowerCase().indexOf(val) < 0); + }); + }); }); diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index e68cccebcb..6027fae3f7 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -70,15 +70,54 @@ +
- +
+ createLink('bug', 'batchEdit'); - echo html::selectButton() . html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\""); - } - ?> + $misc = common::hasPriv('bug', 'batchEdit') ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'"; + echo html::commonButton($lang->edit, $misc); + ?> + + +
+ show();?>