mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Merge pull request #74 from gruppe-adler/server-clone
add button to clone server configuration
This commit is contained in:
commit
a7126bce86
@ -16,13 +16,21 @@ define(function (require) {
|
||||
template: template,
|
||||
|
||||
events: {
|
||||
"click .delete": "delete"
|
||||
"click .clone": "clone",
|
||||
"click .delete": "delete",
|
||||
},
|
||||
|
||||
modelEvents: {
|
||||
"change": "serverUpdated",
|
||||
},
|
||||
|
||||
clone: function (e) {
|
||||
var title = this.model.get('title') + ' Clone';
|
||||
var clone = this.model.clone();
|
||||
clone.set({id: null, title: title});
|
||||
clone.save();
|
||||
},
|
||||
|
||||
delete: function (event) {
|
||||
var self = this;
|
||||
sweetAlert({
|
||||
|
@ -17,6 +17,7 @@ define(function (require) {
|
||||
events: {
|
||||
"click button.delete": "delete",
|
||||
"change input#parameter": "changed",
|
||||
"click button.clone": "clone",
|
||||
},
|
||||
|
||||
changed: function (e) {
|
||||
|
@ -5,6 +5,7 @@
|
||||
<th>Port</th>
|
||||
<th>Title</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
@ -13,6 +13,11 @@
|
||||
<td style="width: 100%;">
|
||||
<a href='#servers/<%-id%>'><%-title%></a>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-success btn-xs clone pull-right">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span> Clone
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-danger btn-xs delete pull-right">
|
||||
<span class="glyphicon glyphicon-trash"></span> Delete
|
||||
|
Loading…
Reference in New Issue
Block a user