App Store category filter fixed.
This commit is contained in:
parent
771d73f0d1
commit
e4422a22d7
16
resources/assets/js/views/modules/apps.js
vendored
16
resources/assets/js/views/modules/apps.js
vendored
@ -14,12 +14,28 @@ import Form from './../../plugins/form';
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
form: new Form('form-app')
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChangeCategory(category) {
|
||||
let path = document.getElementById('category_page').value;
|
||||
|
||||
if (category) {
|
||||
path += '/' + encodeURIComponent(category);
|
||||
} else {
|
||||
path = app_home;
|
||||
}
|
||||
|
||||
location = path;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
12
resources/assets/js/views/modules/item.js
vendored
12
resources/assets/js/views/modules/item.js
vendored
@ -47,6 +47,18 @@ const app = new Vue({
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChangeCategory(category) {
|
||||
let path = document.getElementById('category_page').value;
|
||||
|
||||
if (category) {
|
||||
path += '/' + encodeURIComponent(category);
|
||||
} else {
|
||||
path = app_home;
|
||||
}
|
||||
|
||||
location = path;
|
||||
},
|
||||
|
||||
onGetReviews (path, page) {
|
||||
axios.post(url + '/apps/' + app_slug + '/reviews', {
|
||||
patth: path,
|
||||
|
@ -36,3 +36,7 @@
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/modules/apps.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
@ -40,3 +40,8 @@
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/modules/apps.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
|
||||
|
@ -4,7 +4,16 @@
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-9">
|
||||
{!! Form::select('category', $categories, request('category'), ['class' => 'form-control form-control-sm table-header-search mt-0']) !!}
|
||||
<akaunting-select
|
||||
class="form-control-sm table-header-search mt-0"
|
||||
:placeholder="'{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}'"
|
||||
:name="'category'"
|
||||
:icon="'folder'"
|
||||
:options="{{ json_encode($categories) }}"
|
||||
:value="'{{ request('category') }}'"
|
||||
@change="onChangeCategory($event)"
|
||||
></akaunting-select>
|
||||
{{ Form::hidden('category_page', url("apps/categories"), ['id' => 'category_page']) }}
|
||||
|
||||
<a href="{{ route('apps.paid') }}" class="btn btn-sm btn-white card-buttons filter-button ml-2">{{ trans('modules.top_paid') }}</a>
|
||||
<a href="{{ route('apps.new') }}" class="btn btn-sm btn-white card-buttons filter-button">{{ trans('modules.new') }}</a>
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
var url = '{{ url("/") }}';
|
||||
var app_home = '{{ url("apps/categories") }}';
|
||||
var app_url = '{{ env("APP_URL") }}';
|
||||
//--></script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user