mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
clean up
This commit is contained in:
parent
d2948e487a
commit
4b70802c00
10 changed files with 50 additions and 27 deletions
|
@ -6,19 +6,19 @@ nova:core # do not remove!
|
||||||
|
|
||||||
# nova:settings
|
# nova:settings
|
||||||
nova:users
|
nova:users
|
||||||
# nova:posts
|
nova:posts
|
||||||
# nova:comments
|
nova:comments
|
||||||
# nova:newsletter
|
nova:newsletter
|
||||||
# nova:search
|
nova:search
|
||||||
# nova:notifications
|
nova:notifications
|
||||||
# nova:getting-started
|
nova:getting-started
|
||||||
# nova:categories
|
nova:categories
|
||||||
# nova:voting
|
nova:voting
|
||||||
nova:forms
|
nova:forms
|
||||||
# nova:embedly
|
nova:embedly
|
||||||
# nova:api
|
nova:api
|
||||||
# nova:email
|
nova:email
|
||||||
# nova:rss
|
nova:rss
|
||||||
# nova:subscribe
|
# nova:subscribe
|
||||||
# nova:cloudinary
|
# nova:cloudinary
|
||||||
nova:routing
|
nova:routing
|
||||||
|
@ -29,7 +29,7 @@ nova:apollo # do not remove!
|
||||||
|
|
||||||
############ Customizable Packages ############
|
############ Customizable Packages ############
|
||||||
|
|
||||||
# nova:base-components # default ui components
|
nova:base-components # default ui components
|
||||||
nova:base-styles # default styling
|
nova:base-styles # default styling
|
||||||
|
|
||||||
# nova:email-templates # default email templates for notifications
|
# nova:email-templates # default email templates for notifications
|
||||||
|
|
|
@ -32,6 +32,7 @@ ecmascript@0.6.1
|
||||||
ecmascript-runtime@0.3.15
|
ecmascript-runtime@0.3.15
|
||||||
ejson@1.0.13
|
ejson@1.0.13
|
||||||
email@1.1.18
|
email@1.1.18
|
||||||
|
fortawesome:fontawesome@4.5.0
|
||||||
fourseven:scss@3.10.1
|
fourseven:scss@3.10.1
|
||||||
geojson-utils@1.0.10
|
geojson-utils@1.0.10
|
||||||
hot-code-push@1.0.4
|
hot-code-push@1.0.4
|
||||||
|
@ -54,6 +55,7 @@ meteorhacks:inject-data@2.0.1-nova-patch
|
||||||
meteorhacks:inject-initial@1.0.4
|
meteorhacks:inject-initial@1.0.4
|
||||||
meteorhacks:meteorx@1.4.1
|
meteorhacks:meteorx@1.4.1
|
||||||
meteorhacks:picker@1.0.3
|
meteorhacks:picker@1.0.3
|
||||||
|
meteorhacks:subs-manager@1.6.4
|
||||||
minifier-css@1.2.15
|
minifier-css@1.2.15
|
||||||
minifier-js@1.2.15
|
minifier-js@1.2.15
|
||||||
minimongo@1.0.19
|
minimongo@1.0.19
|
||||||
|
@ -61,16 +63,28 @@ modules@0.7.7
|
||||||
modules-runtime@0.7.7
|
modules-runtime@0.7.7
|
||||||
mongo@1.1.14
|
mongo@1.1.14
|
||||||
mongo-id@1.0.6
|
mongo-id@1.0.6
|
||||||
|
nova:api@0.27.4-nova
|
||||||
nova:apollo@0.27.4-nova
|
nova:apollo@0.27.4-nova
|
||||||
|
nova:base-components@0.27.4-nova
|
||||||
nova:base-styles@0.27.4-nova
|
nova:base-styles@0.27.4-nova
|
||||||
|
nova:categories@0.27.4-nova
|
||||||
|
nova:comments@0.27.4-nova
|
||||||
nova:core@0.27.4-nova
|
nova:core@0.27.4-nova
|
||||||
nova:email@0.27.4-nova
|
nova:email@0.27.4-nova
|
||||||
|
nova:embedly@0.27.4-nova
|
||||||
nova:events@0.27.4-nova
|
nova:events@0.27.4-nova
|
||||||
nova:forms@0.27.4-nova
|
nova:forms@0.27.4-nova
|
||||||
|
nova:getting-started@0.27.4-nova
|
||||||
nova:i18n-en-us@0.27.4-nova
|
nova:i18n-en-us@0.27.4-nova
|
||||||
nova:lib@0.27.4-nova
|
nova:lib@0.27.4-nova
|
||||||
|
nova:newsletter@0.27.4-nova
|
||||||
|
nova:notifications@0.27.4-nova
|
||||||
|
nova:posts@0.27.4-nova
|
||||||
nova:routing@0.27.4-nova
|
nova:routing@0.27.4-nova
|
||||||
|
nova:rss@0.27.4-nova
|
||||||
|
nova:search@0.27.4-nova
|
||||||
nova:users@0.27.4-nova
|
nova:users@0.27.4-nova
|
||||||
|
nova:voting@0.27.4-nova
|
||||||
npm-bcrypt@0.9.2
|
npm-bcrypt@0.9.2
|
||||||
npm-mongo@2.2.11_2
|
npm-mongo@2.2.11_2
|
||||||
observe-sequence@1.0.14
|
observe-sequence@1.0.14
|
||||||
|
@ -104,5 +118,6 @@ tracker@1.1.1
|
||||||
ui@1.0.12
|
ui@1.0.12
|
||||||
underscore@1.0.10
|
underscore@1.0.10
|
||||||
url@1.0.11
|
url@1.0.11
|
||||||
|
utilities:react-list-container@0.1.14
|
||||||
webapp@1.3.12
|
webapp@1.3.12
|
||||||
webapp-hashing@1.0.9
|
webapp-hashing@1.0.9
|
||||||
|
|
|
@ -9,10 +9,23 @@ const Movies = Telescope.createCollection({
|
||||||
|
|
||||||
typeName: 'Movie',
|
typeName: 'Movie',
|
||||||
|
|
||||||
|
// a SimpleSchema-compatible JSON schema
|
||||||
schema,
|
schema,
|
||||||
|
|
||||||
|
/*
|
||||||
|
Three resolvers are expected:
|
||||||
|
- list (e.g.: moviesList(terms: JSON, offset: Int, limit: Int) )
|
||||||
|
- single (e.g.: moviesSingle(_id: String) )
|
||||||
|
- listTotal (e.g.: moviesTotal )
|
||||||
|
*/
|
||||||
resolvers,
|
resolvers,
|
||||||
|
|
||||||
|
/*
|
||||||
|
Three mutations are expected:
|
||||||
|
- new (e.g.: moviesNew(document: moviesInput) : Movie )
|
||||||
|
- edit (e.g.: moviesEdit(documentId: String, set: moviesInput, unset: moviesUnset) : Movie )
|
||||||
|
- remove (e.g.: moviesRemove(documentId: String) : Movie )
|
||||||
|
*/
|
||||||
mutations,
|
mutations,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -29,7 +29,7 @@ class MoviesList extends Component {
|
||||||
title="Add Movie"
|
title="Add Movie"
|
||||||
component={<Button bsStyle="primary">Add Movie</Button>}
|
component={<Button bsStyle="primary">Add Movie</Button>}
|
||||||
>
|
>
|
||||||
<MoviesNewForm currentUser={this.props.currentUser}/>
|
<MoviesNewForm />
|
||||||
</ModalTrigger>
|
</ModalTrigger>
|
||||||
<hr/>
|
<hr/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,7 +45,7 @@ class MoviesList extends Component {
|
||||||
console.log("//MoviesList")
|
console.log("//MoviesList")
|
||||||
console.log(this)
|
console.log(this)
|
||||||
|
|
||||||
if (this.props.loading && !this.props.results) { // TODO: remove !this.props.results since it shouldn't be needed
|
if (this.props.loading) {
|
||||||
return <div className="movies"><p>Loading…</p></div>
|
return <div className="movies"><p>Loading…</p></div>
|
||||||
} else {
|
} else {
|
||||||
const hasMore = this.props.totalCount > this.props.results.length;
|
const hasMore = this.props.totalCount > this.props.results.length;
|
||||||
|
|
|
@ -13,7 +13,6 @@ const MoviesNewForm = (props, context) => {
|
||||||
return (
|
return (
|
||||||
<NovaForm
|
<NovaForm
|
||||||
collection={Movies}
|
collection={Movies}
|
||||||
currentUser={props.currentUser}
|
|
||||||
queryName="moviesListQuery"
|
queryName="moviesListQuery"
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,6 +4,6 @@ import './permissions.js';
|
||||||
import './routes.js';
|
import './routes.js';
|
||||||
import './schema.js';
|
import './schema.js';
|
||||||
|
|
||||||
import './components/App.jsx';
|
// import './components/App.jsx';
|
||||||
import './components/Icon.jsx';
|
// import './components/Icon.jsx';
|
||||||
import './components/Loading.jsx';
|
// import './components/Loading.jsx';
|
||||||
|
|
|
@ -17,7 +17,7 @@ const resolvers = {
|
||||||
|
|
||||||
name: 'moviesList',
|
name: 'moviesList',
|
||||||
|
|
||||||
resolver(root, {offset, limit}, context, info) {
|
resolver(root, {terms, offset, limit}, context, info) {
|
||||||
const options = {
|
const options = {
|
||||||
sort: {createdAt: -1},
|
sort: {createdAt: -1},
|
||||||
// protected limit
|
// protected limit
|
||||||
|
@ -35,7 +35,7 @@ const resolvers = {
|
||||||
|
|
||||||
name: 'moviesSingle',
|
name: 'moviesSingle',
|
||||||
|
|
||||||
resolver(root, args, context) {
|
resolver(root, {_id}, context) {
|
||||||
return context.Movies.findOne({_id: args._id}, { fields: context.getViewableFields(context.currentUser, context.Movies) });
|
return context.Movies.findOne({_id: args._id}, { fields: context.getViewableFields(context.currentUser, context.Movies) });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ Package.onUse(function (api) {
|
||||||
'nova:posts@0.27.4-nova',
|
'nova:posts@0.27.4-nova',
|
||||||
'nova:users@0.27.4-nova',
|
'nova:users@0.27.4-nova',
|
||||||
'nova:comments@0.27.4-nova',
|
'nova:comments@0.27.4-nova',
|
||||||
|
'nova:voting@0.27.4-nova',
|
||||||
|
|
||||||
// third-party packages
|
// third-party packages
|
||||||
'fortawesome:fontawesome@4.5.0',
|
'fortawesome:fontawesome@4.5.0',
|
||||||
|
|
|
@ -52,8 +52,6 @@ class FormWithMutations extends Component{
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
console.log("// FormWithMutations unmounting…")
|
|
||||||
console.log(this)
|
|
||||||
// note: patch to cancel closeCallback given by parent
|
// note: patch to cancel closeCallback given by parent
|
||||||
// we clean the event by hand
|
// we clean the event by hand
|
||||||
// example : the closeCallback is a function that closes a modal by calling setState, this modal being the parent of this NovaForm component
|
// example : the closeCallback is a function that closes a modal by calling setState, this modal being the parent of this NovaForm component
|
||||||
|
@ -315,10 +313,6 @@ class FormWithMutations extends Component{
|
||||||
|
|
||||||
mutationSuccessCallback(result) {
|
mutationSuccessCallback(result) {
|
||||||
|
|
||||||
console.log("//success!")
|
|
||||||
console.log(result)
|
|
||||||
console.log(this)
|
|
||||||
|
|
||||||
const document = result.data[Object.keys(result.data)[0]]; // document is always on first property
|
const document = result.data[Object.keys(result.data)[0]]; // document is always on first property
|
||||||
|
|
||||||
// run success callback if it exists
|
// run success callback if it exists
|
||||||
|
|
|
@ -2,6 +2,7 @@ import Telescope from 'meteor/nova:lib';
|
||||||
import Users from 'meteor/nova:users';
|
import Users from 'meteor/nova:users';
|
||||||
import marked from 'marked';
|
import marked from 'marked';
|
||||||
import mutations from './mutations.js';
|
import mutations from './mutations.js';
|
||||||
|
import Posts from './collection.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary Posts config namespace
|
* @summary Posts config namespace
|
||||||
|
|
Loading…
Add table
Reference in a new issue