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
4decbe65
Unverified
Commit
4decbe65
authored
Sep 12, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Passing the translations to the child delete component.
parent
6e1de80e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
PageTable.vue
Modules/Page/Assets/js/components/PageTable.vue
+1
-1
app.js
public/js/app.js
+19
-5
No files found.
Modules/Page/Assets/js/components/PageTable.vue
View file @
4decbe65
...
...
@@ -12,7 +12,7 @@
<template
scope=
"scope"
>
<a
class=
"btn btn-default btn-flat"
@
click
.
prevent=
"goToEdit(scope)"
><i
class=
"fa fa-pencil"
></i></a>
<delete-button
:scope=
"scope"
:rows=
"data"
>
<delete-button
:scope=
"scope"
:rows=
"data"
:translations=
"translations"
>
</delete-button>
</
template
>
</el-table-column>
...
...
public/js/app.js
View file @
4decbe65
...
...
@@ -69077,25 +69077,33 @@ module.exports = Component.exports
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Core_Assets_js_mixins_Translate__ = __webpack_require__(121);
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
mixins: [__WEBPACK_IMPORTED_MODULE_0__Core_Assets_js_mixins_Translate__["a" /* default */]],
props: {
deleteMessage: { default: "Are you sure you want to delete this record?" },
deleteTitle: { default: "Confirmation" },
rows: { default: null },
scope: { default: null }
},
data: function data() {
return {
deleteMessage: '',
deleteTitle: ''
};
},
methods: {
deleteRow: function deleteRow(event) {
var _this = this;
this.$confirm(this.deleteMessage, this.deleteTitle, {
confirmButtonText:
'OK'
,
cancelButtonText:
'Cancel'
,
confirmButtonText:
this.translate('core', 'button.delete')
,
cancelButtonText:
this.translate('core', 'button.cancel')
,
type: 'warning'
}).then(function () {
var vm = _this;
...
...
@@ -69115,12 +69123,17 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
});
});
}).catch(function () {
console.log('asdasd');
_this.$message({
type: 'info',
message: 'Delete canceled'
});
});
}
},
mounted: function mounted() {
this.deleteMessage = this.translate('core', 'modal.confirmation-message');
this.deleteTitle = this.translate('core', 'modal.title');
}
});
...
...
@@ -69307,7 +69320,8 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
})]), _vm._v(" "), _c('delete-button', {
attrs: {
"scope": scope,
"rows": _vm.data
"rows": _vm.data,
"translations": _vm.translations
}
})]
}
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