diff --git a/module/project/control.php b/module/project/control.php index 3e44b663b6..ed1add9919 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -187,6 +187,7 @@ class project extends control $this->view->projectID = $projectID; $this->view->project = $project; $this->view->productID = $productID; + $this->view->modules = $this->tree->getTaskOptionMenu($projectID); $this->view->moduleID = $moduleID; $this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID = 0, $startModuleID = 0, array('treeModel', 'createTaskLink')); $this->view->projectTree = $this->project->tree(); diff --git a/module/project/css/task.css b/module/project/css/task.css index bfcb1cbae2..ec7a57e4c8 100644 --- a/module/project/css/task.css +++ b/module/project/css/task.css @@ -5,7 +5,8 @@ #hideButton span{padding:2px 10px; background:url(theme/default/images/main/zt-icons.png) -100px -161px;} #featurebar .f-right .icon-green-task-import {padding:2px 8px; background:url(theme/default/images/main/zt-icons.png) 0px -82px;} -.assign-menu {min-width: 150px; overflow: hidden; max-height: 305px} -.assign-menu.with-search {padding-bottom: 34px;} -.assign-menu > .assign-search {padding: 0; position: absolute; z-index: 0; bottom: 0; left: 0; right: 0} -.assign-menu > .assign-search .input-group-addon {position: absolute; right: 10px; top: 0; z-index: 10; background: none; border: none; color: #666} +.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} +.pl-5px{padding-left:5px;} diff --git a/module/project/js/task.js b/module/project/js/task.js index 92b2d6cd38..4a1401749a 100644 --- a/module/project/js/task.js +++ b/module/project/js/task.js @@ -5,15 +5,16 @@ $(function() setTimeout(function(){fixedTfootAction('#projectTaskForm')}, 100); setTimeout(function(){fixedTheadOfList('#taskList')}, 100); - $('.assign-search').click(function(e) + $('.dropdown-menu .with-search .menu-search').click(function(e) { e.stopPropagation(); return false; }).on('keyup change paste', 'input', function() { var val = $(this).val().toLowerCase(); - if(val == '') return $('.assign-menu > .option').removeClass('hide'); - $('.assign-menu > .option').each(function() + 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/project/view/task.html.php b/module/project/view/task.html.php index b32862018f..11347ed787 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -52,9 +52,10 @@ js::set('browseType', $browseType);
" . html::a('#', $lang->close, '', $misc) . ""; + if($canBatchChangeModule) + { + $withSearch = count($modules) > 10; + echo "'; + } + else + { + echo '
  • ' . html::a('javascript:;', $lang->task->moduleAB, '', $class) . '
  • '; + } + /* Batch assign. */ if($canBatchAssignTo) { @@ -78,13 +98,13 @@ js::set('browseType', $browseType); echo html::select('assignedTo', $memberPairs, '', 'class="hidden"'); echo "