mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Updated Tasks and the delete confirmation modal for new materialize version.
This commit is contained in:
parent
e44ef98be4
commit
3d060e2eef
11 changed files with 76 additions and 41 deletions
|
|
@ -5,13 +5,22 @@
|
|||
{{#each lists}}
|
||||
<li class="collection-item">
|
||||
<span class="{{#if $eq listShared true}}green-text{{/if}}">{{listName}}</span>
|
||||
<i class="material-icons clickable deleteListName tooltipped right" data-position="top" data-tooltip="Delete This List">delete</i>
|
||||
<i class="material-icons clickable editListName tooltipped right" data-position="top" data-tooltip="Edit This List">edit</i>
|
||||
<i class="material-icons clickable markListComplete tooltipped right" data-position="top" data-tooltip="Mark Complete">check</i>
|
||||
<i class="material-icons clickable deleteListName tooltipped right modal-trigger" data-position="top" data-tooltip-id="deleteListIcon" data-target="modalDelete">delete</i>
|
||||
<i class="material-icons clickable editListName tooltipped right" data-position="top" data-tooltip-id="editThisListIcon">edit</i>
|
||||
<i class="material-icons clickable markListComplete tooltipped right" data-position="top" data-tooltip-id="markCompleteIcon">check</i>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
<div id="deleteListIcon" style="display: none;">
|
||||
Delete this list
|
||||
</div>
|
||||
<div id="editThisListIcon" style="display: none;">
|
||||
Edit this list
|
||||
</div>
|
||||
<div id="markCompleteIcon" style="display: none;">
|
||||
Mark list complete
|
||||
</div>
|
||||
</div>
|
||||
{{> deleteConfirmationModal}}
|
||||
</template>
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
import { Lists } from '../../../imports/api/lists.js';
|
||||
import { M } from '../../lib/assets/materialize.js';
|
||||
|
||||
Template.listMgmtTbl.onCreated(function() {
|
||||
this.subscribe("myLists");
|
||||
});
|
||||
|
||||
Template.listMgmtTbl.onRendered(function() {
|
||||
Meteor.setTimeout(function() {
|
||||
$('.tooltipped').tooltip();
|
||||
}, 150);
|
||||
var elems = document.querySelectorAll('.tooltipped');
|
||||
var instances = M.Tooltip.init(elems, {});
|
||||
var elemm = document.querySelectorAll('.modal');
|
||||
var instancem = M.Modal.init(elemm, {});
|
||||
});
|
||||
|
||||
Template.listMgmtTbl.helpers({
|
||||
|
|
@ -23,7 +25,6 @@ Template.listMgmtTbl.events({
|
|||
Session.set("method", "delete.list");
|
||||
Session.set("item", this.listName);
|
||||
Session.set("view", "Lists");
|
||||
$('#modalDelete').modal('open');
|
||||
let listId = this._id;
|
||||
},
|
||||
'click .editListName' (event) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue