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
01885328
Unverified
Commit
01885328
authored
Oct 29, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using mini buttons for edit/delete
parent
3a7edb0d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
DeleteComponent.vue
Modules/Core/Assets/js/components/DeleteComponent.vue
+13
-13
EditButtonComponent.vue
Modules/Core/Assets/js/components/EditButtonComponent.vue
+3
-3
app.js
public/js/app.js
+2
-2
No files found.
Modules/Core/Assets/js/components/DeleteComponent.vue
View file @
01885328
<
template
>
<
template
>
<el-button
type=
"danger"
@
click=
"deleteRow"
size=
"
small
"
><i
class=
"fa fa-trash"
></i></el-button>
<el-button
type=
"danger"
@
click=
"deleteRow"
size=
"
mini
"
><i
class=
"fa fa-trash"
></i></el-button>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
rows
:
{
default
:
null
},
rows
:
{
default
:
null
},
scope
:
{
default
:
null
},
scope
:
{
default
:
null
},
},
},
data
()
{
data
()
{
return
{
return
{
deleteMessage
:
''
,
deleteMessage
:
''
,
deleteTitle
:
''
,
deleteTitle
:
''
,
}
}
;
},
},
methods
:
{
methods
:
{
deleteRow
(
event
)
{
deleteRow
(
event
)
{
...
@@ -22,35 +22,35 @@
...
@@ -22,35 +22,35 @@
type
:
'
warning
'
,
type
:
'
warning
'
,
confirmButtonClass
:
'
el-button--danger
'
,
confirmButtonClass
:
'
el-button--danger
'
,
}).
then
(()
=>
{
}).
then
(()
=>
{
le
t
vm
=
this
;
cons
t
vm
=
this
;
axios
.
delete
(
this
.
scope
.
row
.
urls
.
delete_url
)
axios
.
delete
(
this
.
scope
.
row
.
urls
.
delete_url
)
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
if
(
response
.
data
.
errors
===
false
)
{
if
(
response
.
data
.
errors
===
false
)
{
vm
.
$message
({
vm
.
$message
({
type
:
'
success
'
,
type
:
'
success
'
,
message
:
response
.
data
.
message
message
:
response
.
data
.
message
,
});
});
vm
.
rows
.
splice
(
vm
.
scope
.
$index
,
1
);
vm
.
rows
.
splice
(
vm
.
scope
.
$index
,
1
);
}
}
})
})
.
catch
(
error
=>
{
.
catch
(
(
error
)
=>
{
vm
.
$message
({
vm
.
$message
({
type
:
'
error
'
,
type
:
'
error
'
,
message
:
error
.
data
.
message
message
:
error
.
data
.
message
,
});
});
});
});
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
$message
({
this
.
$message
({
type
:
'
info
'
,
type
:
'
info
'
,
message
:
this
.
trans
(
'
core.delete cancelled
'
)
message
:
this
.
trans
(
'
core.delete cancelled
'
)
,
});
});
});
});
}
}
,
},
},
mounted
()
{
mounted
()
{
this
.
deleteMessage
=
this
.
trans
(
'
core.modal.confirmation-message
'
);
this
.
deleteMessage
=
this
.
trans
(
'
core.modal.confirmation-message
'
);
this
.
deleteTitle
=
this
.
trans
(
'
core.modal.title
'
);
this
.
deleteTitle
=
this
.
trans
(
'
core.modal.title
'
);
}
}
,
}
}
;
</
script
>
</
script
>
Modules/Core/Assets/js/components/EditButtonComponent.vue
View file @
01885328
<
template
>
<
template
>
<el-button
<el-button
size=
"
small
"
size=
"
mini
"
@
click
.
prevent=
"goToEditPage()"
>
@
click
.
prevent=
"goToEditPage()"
>
<i
class=
"fa fa-pencil"
></i>
<i
class=
"fa fa-pencil"
></i>
</el-button>
</el-button>
...
@@ -9,12 +9,12 @@
...
@@ -9,12 +9,12 @@
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
to
:
{
type
:
Object
,
required
:
true
}
to
:
{
type
:
Object
,
required
:
true
},
},
},
methods
:
{
methods
:
{
goToEditPage
()
{
goToEditPage
()
{
this
.
$router
.
push
(
this
.
to
);
this
.
$router
.
push
(
this
.
to
);
},
},
},
},
}
}
;
</
script
>
</
script
>
public/js/app.js
View file @
01885328
...
@@ -117157,7 +117157,7 @@ var render = function() {
...
@@ -117157,7 +117157,7 @@ var render = function() {
var _c = _vm._self._c || _h
var _c = _vm._self._c || _h
return _c(
return _c(
"el-button",
"el-button",
{ attrs: { type: "danger", size: "
small
" }, on: { click: _vm.deleteRow } },
{ attrs: { type: "danger", size: "
mini
" }, on: { click: _vm.deleteRow } },
[_c("i", { staticClass: "fa fa-trash" })]
[_c("i", { staticClass: "fa fa-trash" })]
)
)
}
}
...
@@ -117260,7 +117260,7 @@ var render = function() {
...
@@ -117260,7 +117260,7 @@ var render = function() {
return _c(
return _c(
"el-button",
"el-button",
{
{
attrs: { size: "
small
" },
attrs: { size: "
mini
" },
on: {
on: {
click: function($event) {
click: function($event) {
$event.preventDefault()
$event.preventDefault()
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