mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 08:18:50 +00:00
Fixing the Enter submission on the List item entry view
This commit is contained in:
parent
fe8f56654b
commit
051d2eeabc
2 changed files with 17 additions and 7 deletions
|
|
@ -30,5 +30,4 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -51,12 +51,23 @@ Template.listItemsForm.events({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'keypress #listItemInput' (event) {
|
'keydown #listItems' (event) {
|
||||||
event.preventDefault();
|
if (event.which === 13) {
|
||||||
|
let item = $("#listItems").val();
|
||||||
},
|
let listId = Session.get("listId");
|
||||||
'click .editListItem' (event) {
|
if (item == null || item == "") {
|
||||||
event.preventDefault();
|
Session.set("itemReqErr", true);
|
||||||
|
} else {
|
||||||
|
Meteor.call("add.listItem", item, listId, function(err, result) {
|
||||||
|
if (err) {
|
||||||
|
console.log(" ERROR adding item to list: " + err);
|
||||||
|
} else {
|
||||||
|
console.log(" SUCCESS adding item to list.");
|
||||||
|
$("#listItems").val("");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
'click #showReceivedItems' (event) {
|
'click #showReceivedItems' (event) {
|
||||||
if ($("#showReceivedItems").prop('checked') == true) {
|
if ($("#showReceivedItems").prop('checked') == true) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue