mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Added a delete confirmation modal to all views.
This commit is contained in:
parent
4d9d2acff6
commit
29ddc544e5
27 changed files with 117 additions and 127 deletions
|
|
@ -30,9 +30,9 @@ Template.listMgmtForm.events({
|
|||
} else {
|
||||
Meteor.call('add.list', listName, shared, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR adding list name: " + err);
|
||||
// console.log(" ERROR adding list name: " + err);
|
||||
} else {
|
||||
console.log(" SUCCESS adding list name.");
|
||||
// console.log(" SUCCESS adding list name.");
|
||||
$("#listNameInp").val("");
|
||||
$("#isShared").prop("checked", false);
|
||||
}
|
||||
|
|
@ -51,9 +51,9 @@ Template.listMgmtForm.events({
|
|||
} else {
|
||||
Meteor.call('edit.list', listId, listName, shared, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR editing list name: " + err);
|
||||
// console.log(" ERROR editing list name: " + err);
|
||||
} else {
|
||||
console.log(" SUCCESS editing list name.");
|
||||
// console.log(" SUCCESS editing list name.");
|
||||
$("#listNameInp").val("");
|
||||
$("#isShared").prop("checked", false);
|
||||
Session.set("listNameEditMode", false);
|
||||
|
|
@ -75,9 +75,9 @@ Template.listMgmtForm.events({
|
|||
if (editMode == false) {
|
||||
Meteor.call('add.list', listName, shared, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR adding list name: " + err);
|
||||
// console.log(" ERROR adding list name: " + err);
|
||||
} else {
|
||||
console.log(" SUCCESS adding list name.");
|
||||
// console.log(" SUCCESS adding list name.");
|
||||
$("#listNameInp").val("");
|
||||
$("#isShared").prop("checked", false);
|
||||
}
|
||||
|
|
@ -85,9 +85,9 @@ Template.listMgmtForm.events({
|
|||
} else {
|
||||
Meteor.call('edit.list', listId, listName, shared, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR editing list name: " + err);
|
||||
// console.log(" ERROR editing list name: " + err);
|
||||
} else {
|
||||
console.log(" SUCCESS editing list name.");
|
||||
// console.log(" SUCCESS editing list name.");
|
||||
$("#listNameInp").val("");
|
||||
$("#isShared").prop("checked", false);
|
||||
Session.set("listNameEditMode", false);
|
||||
|
|
|
|||
|
|
@ -13,4 +13,5 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{> deleteConfirmationModal}}
|
||||
</template>
|
||||
|
|
@ -19,14 +19,12 @@ Template.listMgmtTbl.helpers({
|
|||
Template.listMgmtTbl.events({
|
||||
'click .deleteListName' (event) {
|
||||
event.preventDefault();
|
||||
Session.set("deleteId", this._id);
|
||||
Session.set("method", "delete.list");
|
||||
Session.set("item", this.listName);
|
||||
Session.set("view", "Lists");
|
||||
$('#modalDelete').modal('open');
|
||||
let listId = this._id;
|
||||
Meteor.call('delete.list', listId, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR deleting list: " + err);
|
||||
} else {
|
||||
console.log(" SUCCESS deleting list.");
|
||||
}
|
||||
});
|
||||
},
|
||||
'click .editListName' (event) {
|
||||
event.preventDefault();
|
||||
|
|
@ -47,9 +45,9 @@ Template.listMgmtTbl.events({
|
|||
let listId = this._id;
|
||||
Meteor.call('mark.complete', listId, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR marking complete: " + err);
|
||||
// console.log(" ERROR marking complete: " + err);
|
||||
} else {
|
||||
console.log(" SUCCESS marking complete.");
|
||||
// console.log(" SUCCESS marking complete.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue