Skip to content

Commit

Permalink
fixed it..
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Jun 20, 2021
1 parent 94e8d35 commit 4912890
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 59 deletions.
6 changes: 5 additions & 1 deletion resources/views/common/notifications/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@
<script type="text/javascript">
var hash_split = location.hash.split('#');
if (hash_split[1] != undefined) {
if (hash_split[1] != undefined && document.getElementById(hash_split[1]) != null) {
document.getElementById(hash_split[1]).scrollIntoView({
behavior: 'smooth'
});
}
</script>
@endpush

@push('scripts_start')
<script src="{{ asset('public/vendor/bootstrap-notify/bootstrap-notify.min.js') }}"></script>
@endpush
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@
</div>
@endif
</div>
@endif

@push('scripts_start')
<script src="{{ asset('public/vendor/bootstrap-notify/bootstrap-notify.min.js') }}"></script>
@endpush

@push('body_js')
<script type="text/javascript">
Expand All @@ -103,3 +98,5 @@
});
</script>
@endpush

@endif
44 changes: 20 additions & 24 deletions resources/views/livewire/common/notifications/imports.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,24 @@
</div>
@endif
</div>
@endif

@push('scripts_start')
<script src="{{ asset('public/vendor/bootstrap-notify/bootstrap-notify.min.js') }}"></script>
@endpush

@push('body_js')
<script type="text/javascript">
window.addEventListener('mark-read', event => {
if (event.detail.type == 'import') {
$.notify(event.detail.message, {
type: 'success',
});
}
});
window.addEventListener('mark-read-all', event => {
if (event.detail.type == 'import') {
$.notify(event.detail.message, {
type: 'success',
});
}
});
</script>
@endpush
@push('body_js')
<script type="text/javascript">
window.addEventListener('mark-read', event => {
if (event.detail.type == 'import') {
$.notify(event.detail.message, {
type: 'success',
});
}
});
window.addEventListener('mark-read-all', event => {
if (event.detail.type == 'import') {
$.notify(event.detail.message, {
type: 'success',
});
}
});
</script>
@endpush
@endif
44 changes: 20 additions & 24 deletions resources/views/livewire/common/notifications/recurring.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,28 +222,24 @@
</div>
@endif
</div>
@endif

@push('scripts_start')
<script src="{{ asset('public/vendor/bootstrap-notify/bootstrap-notify.min.js') }}"></script>
@endpush

@push('body_js')
<script type="text/javascript">
window.addEventListener('mark-read', event => {
if (event.detail.type == 'recurring-{{ $type }}') {
$.notify(event.detail.message, {
type: 'success',
});
}
});
window.addEventListener('mark-read-all', event => {
if (event.detail.type == 'recurring-{{ $type }}') {
$.notify(event.detail.message, {
type: 'success',
});
}
});
</script>
@endpush
@push('body_js')
<script type="text/javascript">
window.addEventListener('mark-read', event => {
if (event.detail.type == 'recurring-{{ $type }}') {
$.notify(event.detail.message, {
type: 'success',
});
}
});
window.addEventListener('mark-read-all', event => {
if (event.detail.type == 'recurring-{{ $type }}') {
$.notify(event.detail.message, {
type: 'success',
});
}
});
</script>
@endpush
@endif
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@
</div>
@endif
</div>
@endif

@push('scripts_start')
<script src="{{ asset('public/vendor/bootstrap-notify/bootstrap-notify.min.js') }}"></script>
@endpush

@push('body_js')
<script type="text/javascript">
Expand All @@ -247,3 +242,5 @@
});
</script>
@endpush

@endif

0 comments on commit 4912890

Please sign in to comment.