diff --git a/resources/views/catalog/deletereview.blade.php b/resources/views/catalog/deletereview.blade.php index 3d0f7cf..44afc44 100644 --- a/resources/views/catalog/deletereview.blade.php +++ b/resources/views/catalog/deletereview.blade.php @@ -44,20 +44,32 @@ var that = $(this); var tr = that.closest('tr'); - ['duplicate','remove'].forEach(function(item) { - var items = tr.find('input[name^="'+item+'\["]'); + try { + ['duplicate','remove'].forEach(function(item) { + var items = tr.find('input[name^="'+item+'\["]'); - if (items.length !== 2) { - alert('cannot swap'); - return false; - } + if (items.length !== 2) { + alert('cannot swap'); + throw new Error('CANNOT SWAP'); + } - var rotate = items[0].checked; - $(items[0]).prop('checked',items[1].checked); - $(items[1]).prop('checked',rotate); + var rotate = items[0].checked; + $(items[0]).prop('checked',items[1].checked); + $(items[1]).prop('checked',rotate); - that.removeData(); - }); + that.removeData(); + }); + + } catch (e) { + // NOOP + } + }); + + $('span.scroll').on('click',function() { + var next = $(this).closest('div.card').closest('tr').next(); + + if (next.length) + $('html,body').animate({scrollTop: next.offset().top},'fast'); }); }); diff --git a/resources/views/catalog/duplicatereview.blade.php b/resources/views/catalog/duplicatereview.blade.php index 6231882..a80b26c 100644 --- a/resources/views/catalog/duplicatereview.blade.php +++ b/resources/views/catalog/duplicatereview.blade.php @@ -35,4 +35,42 @@ NONE! @endif -@endsection \ No newline at end of file +@endsection + +@section('page-scripts') + +@append \ No newline at end of file diff --git a/resources/views/photo/widgets/thumbnail.blade.php b/resources/views/photo/widgets/thumbnail.blade.php index 5bf90c6..613f3a8 100644 --- a/resources/views/photo/widgets/thumbnail.blade.php +++ b/resources/views/photo/widgets/thumbnail.blade.php @@ -22,6 +22,7 @@
+ SWAP