mirror of
https://github.com/vale981/Vulcan
synced 2025-03-08 19:11:38 -05:00
12 lines
No EOL
316 B
JavaScript
12 lines
No EOL
316 B
JavaScript
Template.category_item.events({
|
|
'click .edit-link': function(e, instance){
|
|
e.preventDefault();
|
|
var categoryId=instance.data._id;
|
|
var name= $('#name_'+categoryId).val();
|
|
if(name){
|
|
Categories.update(categoryId,{ $set: {name: name}});
|
|
}else{
|
|
Categories.remove(categoryId);
|
|
}
|
|
}
|
|
}) |