mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Adding more methods and views, updated dashboards a bit. Still not ready
This commit is contained in:
parent
266dbd0856
commit
42643a37f5
23 changed files with 374 additions and 32 deletions
47
client/AdminMgmt/ListMgmt/listMgmtTbl.js
Normal file
47
client/AdminMgmt/ListMgmt/listMgmtTbl.js
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
import { Lists } from '../../../imports/api/lists.js';
|
||||
|
||||
Template.listMgmtTbl.onCreated(function() {
|
||||
this.subscribe("myLists");
|
||||
});
|
||||
|
||||
Template.listMgmtTbl.onRendered(function() {
|
||||
$('.tooltipped').tooltip();
|
||||
});
|
||||
|
||||
Template.listMgmtTbl.helpers({
|
||||
lists: function() {
|
||||
return Lists.find({});
|
||||
}
|
||||
});
|
||||
|
||||
Template.listMgmtTbl.events({
|
||||
'click .deleteListName' (event) {
|
||||
event.preventDefault();
|
||||
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();
|
||||
let listName = Lists.findOne({ _id: this._id }).listName;
|
||||
$("#listNameInp").val(listName);
|
||||
Session.set("listNameEditMode", true);
|
||||
Session.set("listItemId", this._id);
|
||||
},
|
||||
'click .markListComplete' (event) {
|
||||
event.preventDefault();
|
||||
let listId = this._id;
|
||||
Meteor.call('mark.complete', listId, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR marking complete: " + err);
|
||||
} else {
|
||||
console.log(" SUCCESS marking complete.");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue