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({
|
const app = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
|
|
||||||
mixins: [
|
mixins: [
|
||||||
Global
|
Global
|
||||||
],
|
],
|
||||||
|
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
form: new Form('form-app')
|
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: {
|
methods: {
|
||||||
|
onChangeCategory(category) {
|
||||||
|
let path = document.getElementById('category_page').value;
|
||||||
|
|
||||||
|
if (category) {
|
||||||
|
path += '/' + encodeURIComponent(category);
|
||||||
|
} else {
|
||||||
|
path = app_home;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = path;
|
||||||
|
},
|
||||||
|
|
||||||
onGetReviews (path, page) {
|
onGetReviews (path, page) {
|
||||||
axios.post(url + '/apps/' + app_slug + '/reviews', {
|
axios.post(url + '/apps/' + app_slug + '/reviews', {
|
||||||
patth: path,
|
patth: path,
|
||||||
|
@ -36,3 +36,7 @@
|
|||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
@push('scripts_start')
|
||||||
|
<script src="{{ asset('public/js/modules/apps.js?v=' . version('short')) }}"></script>
|
||||||
|
@endpush
|
||||||
|
@ -40,3 +40,8 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@endsection
|
@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="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-9">
|
<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.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>
|
<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"><!--
|
<script type="text/javascript"><!--
|
||||||
var url = '{{ url("/") }}';
|
var url = '{{ url("/") }}';
|
||||||
|
var app_home = '{{ url("apps/categories") }}';
|
||||||
var app_url = '{{ env("APP_URL") }}';
|
var app_url = '{{ env("APP_URL") }}';
|
||||||
//--></script>
|
//--></script>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user