This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template.ProjectForm.events({ | |
'click .save':function(evt, tmpl) { | |
var name = tmpl.find('.name').value; | |
var client = tmpl.find('.client').value; | |
alert(name + ' ' + client); | |
}, | |
'click .cancel': function(evt, tmpl) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template.ProjectForm.events({ | |
'click .save':function(evt, tmpl) { | |
var name = tmpl.find('.name').value; | |
var client = tmpl.find('.client').value; | |
addProject(name, client); | |
Session.set('showProjectDialog', false); | |
}, | |
'click .cancel': function(evt, tmpl) { | |
Session.set('showProjectDialog', false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template name="ProjectForm"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
<h4 class="modal-title">Modal title</h4> | |
</div> | |
<div class="modal-body"> | |
<p> | |
<label for="name">Name:</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* /server/utility.js */ | |
Meteor.startup(function () { | |
Meteor.methods({ | |
removeAllProjects:function() { | |
Projects.remove({}); | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template.ProjectRow.events({ | |
'dblclick .projectRow':function(evt,tmpl) { | |
alert(tmpl.data._id); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Session.setDefault('showProjectDialog', false); | |
Session.setDefault('editing_project', null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* i removed form events from this page to close modal as they should have been on project_form.js file */ | |
Template.Projects.projectList = function() { | |
return Projects.find(); | |
}; | |
Template.Projects.showProjectDialog = function() { | |
return Session.get('showProjectDialog'); | |
}; | |
Template.Projects.events({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template.ProjectForm.events({ | |
'click .save':function(evt, tmpl) { | |
var name = tmpl.find('.name').value; | |
var client = tmpl.find('.client').value; | |
var status = tmpl.find('.status').value; | |
addProject(name, client, status); | |
Session.set('showProjectDialog', false); | |
Session.set('editing_project', null); | |
}, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template name="ProjectForm"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
{{#if editing_project}} | |
<h4 class="modal-title">Update Project</h4> | |
{{else}} | |
<h4 class="modal-title">Add Project</h4> | |
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template name="ProjectForm"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
{{#if editing_project}} | |
<h4 class="modal-title">Update Project</h4> | |
{{else}} | |
<h4 class="modal-title">Add Project</h4> | |
{{/if}} |