* fix #parent dropdown not hide when #root chosen dropdown show.
This commit is contained in:
@@ -23,7 +23,7 @@ js::set('type', $type);
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<form action="<?php echo inlink('edit', 'module=' . $module->id .'&type=' .$type);?>" target='hiddenwin' method='post' class='mt-10px' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<table class='table table-form'>
|
||||
<?php if($showProduct):?>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->tree->product;?></th>
|
||||
@@ -51,12 +51,12 @@ js::set('type', $type);
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->tree->owner;?></th>
|
||||
<td><?php echo html::select('owner', $users, $module->owner, "class='form-control chosen'", true);?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->tree->short;?></th>
|
||||
<td><?php echo html::input('short', $module->short, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'>
|
||||
<?php echo html::submitButton();?>
|
||||
@@ -96,13 +96,20 @@ $(function()
|
||||
})
|
||||
function loadDocModule(libID)
|
||||
{
|
||||
link = createLink('doc', 'ajaxGetChild', 'libID=' + libID + '&type=parent');
|
||||
var link = createLink('doc', 'ajaxGetChild', 'libID=' + libID + '&type=parent');
|
||||
$.post(link, function(data)
|
||||
{
|
||||
$('#parent').replaceWith(data);
|
||||
$('#parent_chosen').remove();
|
||||
$('#parent').chosen();
|
||||
})
|
||||
{
|
||||
$('#parent').empty().append($(data).children()).trigger('chosen:updated');
|
||||
});
|
||||
}
|
||||
$(function(){$('.chosen').chosen();})
|
||||
</script>
|
||||
$(function()
|
||||
{
|
||||
$('#dataform .chosen').chosen();
|
||||
|
||||
// hide #parent chosen dropdown on root dropdown show
|
||||
$('#root').on('chosen:showing_dropdown', function()
|
||||
{
|
||||
$('#parent').trigger('chosen:close');
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user