More UX and UI fixes
This commit is contained in:
@@ -216,7 +216,9 @@ $(function () {
|
|||||||
$('input[name=remove_banner]').val('1');
|
$('input[name=remove_banner]').val('1');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.group-name').on('click', function () {
|
$('.group-name').on('click', function (event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
|
||||||
$this.find('.group-toggle').toggleClass('ion-ios-minus-outline').toggleClass('ion-ios-plus-outline');
|
$this.find('.group-toggle').toggleClass('ion-ios-minus-outline').toggleClass('ion-ios-plus-outline');
|
||||||
@@ -224,20 +226,16 @@ $(function () {
|
|||||||
$this.next('.group-items').toggleClass('hide');
|
$this.next('.group-items').toggleClass('hide');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.select-group').on('click', function () {
|
$('.select-group').on('click', function (event) {
|
||||||
var $parentGroup = $(this).closest('ul.list-group');
|
var $parentGroup = $(this).closest('ul.list-group');
|
||||||
$parentGroup.find('input[type=checkbox]').prop('checked', true);
|
$parentGroup.find('input[type=checkbox]').prop('checked', true);
|
||||||
$parentGroup.find('.group-items').removeClass('hide')
|
|
||||||
$parentGroup.find('.group-toggle').addClass('ion-ios-minus-outline').removeClass('ion-ios-plus-outline');
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.deselect-group').on('click', function () {
|
$('.deselect-group').on('click', function (event) {
|
||||||
var $parentGroup = $(this).closest('ul.list-group');
|
var $parentGroup = $(this).closest('ul.list-group');
|
||||||
$parentGroup.find('input[type=checkbox]').prop('checked', false);
|
$parentGroup.find('input[type=checkbox]').prop('checked', false);
|
||||||
$parentGroup.find('.group-items').addClass('hide');
|
|
||||||
$parentGroup.find('.group-toggle').removeClass('ion-ios-minus-outline').addClass('ion-ios-plus-outline');
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -41,9 +41,14 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
@if($ungroupedComponents->isNotEmpty())
|
@if($ungroupedComponents->isNotEmpty())
|
||||||
<ul class="list-group components">
|
<ul class="list-group">
|
||||||
<div class="list-group-item group-name">
|
<div class="list-group-item group-name">
|
||||||
<strong>{{ trans('cachet.components.group.other') }}</strong>
|
<strong>{{ trans('cachet.components.group.other') }}</strong>
|
||||||
|
<div class="pull-right text-muted small">
|
||||||
|
<a href="javascript: void(0);" class="select-group" id="select-all-{{$componentGroup->id}}">{{ trans('cachet.components.select_all') }}</a>
|
||||||
|
|
|
||||||
|
<a href="javascript: void(0);" class="deselect-group" id="deselect-all-{{$componentGroup->id}}">{{ trans('cachet.components.deselect_all') }}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@foreach($ungroupedComponents as $component)
|
@foreach($ungroupedComponents as $component)
|
||||||
@include('partials.component_input', compact($component))
|
@include('partials.component_input', compact($component))
|
||||||
|
|||||||
Reference in New Issue
Block a user