diff --git a/resources/views/components/attribute/values.blade.php b/resources/views/components/attribute/values.blade.php index 72039be8..d5c99dd9 100644 --- a/resources/views/components/attribute/values.blade.php +++ b/resources/views/components/attribute/values.blade.php @@ -30,7 +30,7 @@ @endforeach @foreach(($x=$values->skip(config('pla.limit.values'))->filter()) as $key => $value) - + (! ($editable ?? FALSE) && ($o->dn))]) name="{{ $o->name_lc }}[{{ $langtag }}][]" value="{{ $value }}"> @endforeach @if($x->count()) diff --git a/resources/views/components/attribute/widget/options.blade.php b/resources/views/components/attribute/widget/options.blade.php index 5729aecd..dffba671 100644 --- a/resources/views/components/attribute/widget/options.blade.php +++ b/resources/views/components/attribute/widget/options.blade.php @@ -44,6 +44,10 @@ }); $('#page-modal').on('hide.bs.modal',function() { + // Only handle the close if the member-manage modal was the one open + if (! $(this).find('select#destination').length) + return; + var updated = modal_update(modal_attr,attribute_values('destination','select','option')); if (updated.length) diff --git a/resources/views/modals/member-manage.blade.php b/resources/views/modals/member-manage.blade.php index 4e5bcbe3..e70201d3 100644 --- a/resources/views/modals/member-manage.blade.php +++ b/resources/views/modals/member-manage.blade.php @@ -114,16 +114,19 @@ }); var filter = _.debounce(function(filter) { - $('select#source option').each(function() { - var option = $(this).text().toLowerCase(); + var select = $('select#source'); - $(this).toggle(option.indexOf(filter) > -1); - }); + // Restore options hidden by a previous filter run + select.append(select.data('filtered') || $()); - $('select#destination option').each(function() { - var option = $(this).text().toLowerCase(); + // Detach non-matching options - hiding