* fix bug #759.
This commit is contained in:
@@ -9,3 +9,8 @@
|
||||
.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}
|
||||
|
||||
.fix-menu {min-width: 150px; overflow: hidden}
|
||||
.fix-menu.with-search {padding-bottom: 35px;}
|
||||
.fix-menu > .fix-search {padding: 0; position: absolute; z-index: 0; bottom: 0; left: 0; right: 0}
|
||||
.fix-menu > .fix-search .input-group-addon {position: absolute; right: 10px; top: 0; z-index: 10; background: none; border: none; color: #666}
|
||||
|
||||
@@ -18,4 +18,19 @@ $(document).ready(function()
|
||||
$option.toggleClass('hide', $option.text().toString().toLowerCase().indexOf(val) < 0 && $option.data('key').toString().toLowerCase().indexOf(val) < 0);
|
||||
});
|
||||
});
|
||||
|
||||
$('.fix-search').click(function(e)
|
||||
{
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}).on('keyup change paste', 'input', function()
|
||||
{
|
||||
var val = $(this).val().toLowerCase();
|
||||
if(val == '') return $('.fix-menu > .option').removeClass('hide');
|
||||
$('.fix-menu > .option').each(function()
|
||||
{
|
||||
var $option = $(this);
|
||||
$option.toggleClass('hide', $option.text().toString().toLowerCase().indexOf(val) < 0 && $option.data('key').toString().toLowerCase().indexOf(val) < 0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -204,17 +204,19 @@ js::set('moduleID', $moduleID);
|
||||
$actionLink = $this->createLink('bug', 'batchResolve', "resolution=$key");
|
||||
if($key == 'fixed')
|
||||
{
|
||||
$withSearch = count($builds) > 4;
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $resolution, '', "id='fixedItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
echo "<ul class='dropdown-menu fix-menu" . ($withSearch ? ' with-search':'') . "'>";
|
||||
unset($builds['']);
|
||||
foreach($builds as $key => $build)
|
||||
{
|
||||
$actionLink = $this->createLink('bug', 'batchResolve', "resolution=fixed&resolvedBuild=$key");
|
||||
echo "<li>";
|
||||
echo "<li class='option' data-key='$key'>";
|
||||
echo html::a('javascript:;', $build, '', "onclick=\"setFormAction('$actionLink','hiddenwin')\"");
|
||||
echo "</li>";
|
||||
}
|
||||
if($withSearch) echo "<li class='fix-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></li>";
|
||||
echo '</ul></li>';
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user