updated autoform

This commit is contained in:
Sacha Greif 2014-12-29 18:24:26 +09:00
parent 03922286e1
commit b70cee68b8
5 changed files with 7 additions and 9 deletions

View file

@ -25,7 +25,7 @@ meteorhacks:fast-render
meteorhacks:subs-manager
meteorhacks:npm
aldeed:autoform@4.0.0-rc1
aldeed:autoform
aldeed:collection2
aldeed:simple-schema

View file

@ -5,7 +5,7 @@ accounts-password@1.0.5
accounts-twitter@1.0.3
accounts-ui@1.1.4
accounts-ui-unstyled@1.1.5
aldeed:autoform@4.2.1
aldeed:autoform@4.2.2
aldeed:collection2@2.3.0
aldeed:simple-schema@1.2.0
application-configuration@1.0.4

View file

@ -375,18 +375,17 @@ submitPost = function (post) {
// -------------------------------- Insert ------------------------------- //
// console.log(post)
post._id = Posts.insert(post);
// --------------------- Server-Side Async Callbacks --------------------- //
if (Meteor.isServer) {
Meteor.setTimeout(function () { // use setTimeout to avoid holding up client
Meteor.defer(function () { // use defer to avoid holding up client
// run all post submit server callbacks on post object successively
post = postAfterSubmitMethodCallbacks.reduce(function(result, currentFunction) {
return currentFunction(result);
}, post);
}, 1);
});
}
return post;
@ -401,7 +400,7 @@ postViews = [];
Meteor.methods({
submitPost: function(post, modifier, id){
submitPost: function(post){
// required properties:
// title

View file

@ -7,7 +7,7 @@ Package.describe({
Package.onUse(function(api) {
api.use('templating@1.0.0');
api.use('blaze@2.0.0');
api.use('aldeed:autoform@4.0.0');
api.use('aldeed:autoform');
api.use('fourseven:scss');
// api.use('jquery');
// api.use('tsega:bootstrap3-datetimepicker');

View file

@ -1,7 +1,6 @@
<template name="feedItem">
<div class="grid-small grid-module">
<!-- {{> quickForm collection="Feeds" id=formId type="update" doc=this label-class="control-label" input-col-class="controls" template="telescope"}} -->
<p>{{url}}</p>
{{> quickForm collection="Feeds" id=formId type="update" doc=this label-class="control-label" input-col-class="controls" template="telescope"}}
<a href="#" class="delete-link">Delete</a>
</div>
</template>