48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
/* Swtich to search module. */
|
|
function browseBySearch(active)
|
|
{
|
|
$('#querybox').removeClass('hidden');
|
|
$('.divider').addClass('hidden');
|
|
$('#' + active + 'Tab').removeClass('active');
|
|
$('#bysearchTab').addClass('active');
|
|
$('#bymoduleTab').removeClass('active');
|
|
}
|
|
|
|
/**
|
|
* Confirm batch delete cases.
|
|
*
|
|
* @param string $actionLink
|
|
* @access public
|
|
* @return void
|
|
*/
|
|
function confirmBatchDelete(actionLink)
|
|
{
|
|
if(confirm(batchDelete)) setFormAction(actionLink);
|
|
return false;
|
|
}
|
|
|
|
$(document).ready(function()
|
|
{
|
|
if(browseType == 'bysearch') ajaxGetSearchForm();
|
|
setTimeout(function(){fixedTfootAction('#batchForm')}, 100);
|
|
setTimeout(function(){fixedTheadOfList('#caseList')}, 100);
|
|
|
|
$('.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('.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);
|
|
});
|
|
});
|
|
|
|
setModal4List('runCase', 'caseList');
|
|
});
|