1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- Accounts.ui.config({
- passwordSignupFields: "USERNAME_ONLY"
- });
- Template.website_list.helpers({
- websites: () => {
- return Websites.find({});
- }
- });
- Template.website_item.events({
- "click .js-upvote": function (event) {
-
-
- const websiteId = this._id;
- console.log("Up voting website with id " + websiteId);
-
-
- return false;
- },
- "click .js-downvote": function (event) {
-
-
- const websiteId = this._id;
- console.log("Down voting website with id " + websiteId);
-
-
- return false;
- }
- });
- Template.website_form.events({
- "click .js-toggle-website-form": function () {
- $("#website_form").toggle("slow");
- },
- "submit .js-save-website-form": function (event) {
-
- const url = event.target.url.value;
- console.log("The url they entered is: " + url);
-
-
- return false;
- }
- });
|