Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
19bb55d3
Unverified
Commit
19bb55d3
authored
Sep 15, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing server side order+search+pagination mixes
Enabling server side component by default
parent
d41cadcb
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48396 additions
and
48499 deletions
+48396
-48499
PageRoutes.js
Modules/Page/Assets/js/PageRoutes.js
+1
-1
PageTableServerSide.vue
Modules/Page/Assets/js/components/PageTableServerSide.vue
+9
-6
app.js
public/js/app.js
+48386
-48492
No files found.
Modules/Page/Assets/js/PageRoutes.js
View file @
19bb55d3
...
...
@@ -9,7 +9,7 @@ export default [
{
path
:
'
/page/pages
'
,
name
:
'
admin.page.page.index
'
,
component
:
PageTable
,
component
:
PageTable
ServerSide
,
props
:
{
translations
}
...
...
Modules/Page/Assets/js/components/PageTableServerSide.vue
View file @
19bb55d3
...
...
@@ -4,14 +4,14 @@
<div
class=
"box box-primary"
>
<div
class=
"box-body"
>
<div
class=
"sc-table"
>
<div
class=
"tool-bar el-row"
>
<div
class=
"tool-bar el-row"
style=
"padding-bottom: 20px;"
>
<div
class=
"actions el-col el-col-5"
>
<router-link
:to=
"
{name: 'admin.page.page.create'}">
<el-button
type=
"primary"
><i
class=
"el-icon-edit"
></i>
{{
translate
(
'
page
'
,
'
create page
'
)
}}
</el-button>
</router-link>
</div>
<div
class=
"search el-col el-col-5"
>
<el-input
icon=
"search"
@
change=
"performSearch"
>
<el-input
icon=
"search"
@
change=
"performSearch"
v-model=
"searchQuery"
>
</el-input>
</div>
</div>
...
...
@@ -39,7 +39,7 @@
</
template
>
</el-table-column>
</el-table>
<div
class=
"pagination-wrap"
>
<div
class=
"pagination-wrap"
style=
"text-align: center; padding-top: 20px;"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
...
@@ -72,6 +72,7 @@
meta
:
{},
order_meta
:
{},
links
:
{},
searchQuery
:
''
,
}
},
methods
:
{
...
...
@@ -107,6 +108,7 @@
per_page
:
this
.
meta
.
per_page
,
order_by
:
this
.
order_meta
.
order_by
,
order
:
this
.
order_meta
.
order
,
search
:
this
.
searchQuery
,
}))
.
then
(
response
=>
{
this
.
data
=
response
.
data
.
data
;
...
...
@@ -118,10 +120,11 @@
console
.
log
(
'
sorting
'
,
event
);
axios
.
get
(
route
(
'
api.page.page.indexServerSide
'
,
{
//
page: this.meta.current_page,
//
per_page: this.meta.per_page,
page
:
this
.
meta
.
current_page
,
per_page
:
this
.
meta
.
per_page
,
order_by
:
event
.
prop
,
order
:
event
.
order
,
search
:
this
.
searchQuery
,
}))
.
then
(
response
=>
{
this
.
data
=
response
.
data
.
data
;
...
...
@@ -135,7 +138,7 @@
performSearch
(
query
)
{
console
.
log
(
'
searching:
'
+
query
);
axios
.
get
(
route
(
'
api.page.page.indexServerSide
'
,
{
'
search
'
:
query
search
:
query
,
}))
.
then
(
response
=>
{
this
.
data
=
response
.
data
.
data
;
...
...
public/js/app.js
View file @
19bb55d3
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment