diff --git a/.meteor/.finished-upgraders b/.meteor/.finished-upgraders new file mode 100644 index 0000000..47bce20 --- /dev/null +++ b/.meteor/.finished-upgraders @@ -0,0 +1,5 @@ +# This file contains information which helps Meteor properly upgrade your +# app when you run 'meteor update'. You should check it into version control +# with your project. + +notices-for-0.9.0 diff --git a/.meteor/.id b/.meteor/.id new file mode 100644 index 0000000..ad9de5a --- /dev/null +++ b/.meteor/.id @@ -0,0 +1,7 @@ +# This file contains a token that is unique to your project. +# Check it into your repository along with the rest of this directory. +# It can be used for purposes such as: +# - ensuring you don't accidentally deploy one app on top of another +# - providing package authors with aggregated statistics + +762i5q1rs9s2v1jmf92w diff --git a/.meteor/packages b/.meteor/packages index 2a4de04..a839a46 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -4,16 +4,12 @@ # but you can also edit it by hand. standard-app-packages -autopublish insecure - -simple-schema -collection2 -autoform -iron-router -roles -moment -less-fontawesome-4 -less-bootstrap-3 -iron-router-progress -blaze-layout \ No newline at end of file +cmather:iron-router +alanning:roles +aldeed:simple-schema +aldeed:collection2 +aldeed:autoform +manuelschoebel:less-fontawesome-4 +manuelschoebel:less-bootstrap-3 +mrt:bootstrap-3 diff --git a/.meteor/release b/.meteor/release index db5f2c7..cbef8b3 100644 --- a/.meteor/release +++ b/.meteor/release @@ -1 +1 @@ -0.8.1.3 +METEOR@0.9.0.1 diff --git a/.meteor/versions b/.meteor/versions new file mode 100644 index 0000000..baf1f97 --- /dev/null +++ b/.meteor/versions @@ -0,0 +1,56 @@ +accounts-base@1.0.0 +alanning:roles@1.2.12 +aldeed:autoform@0.17.1 +aldeed:collection2@0.4.6 +aldeed:simple-schema@0.7.0 +application-configuration@1.0.0 +autoupdate@1.0.5 +binary-heap@1.0.0 +blaze-tools@1.0.0 +blaze@1.0.3 +callback-hook@1.0.0 +check@1.0.0 +cmather:iron-core@0.2.0 +cmather:iron-dynamic-template@0.2.1 +cmather:iron-layout@0.2.0 +cmather:iron-router@0.8.2 +ctl-helper@1.0.2 +ctl@1.0.0 +deps@1.0.1 +ejson@1.0.0 +follower-livedata@1.0.0 +geojson-utils@1.0.0 +handlebars@1.0.0 +html-tools@1.0.0 +htmljs@1.0.0 +id-map@1.0.0 +insecure@1.0.0 +jquery@1.0.0 +json@1.0.0 +livedata@1.0.7 +localstorage@1.0.0 +logging@1.0.2 +manuelschoebel:less-bootstrap-3@0.0.2 +manuelschoebel:less-fontawesome-4@0.0.4 +meteor@1.0.2 +minifiers@1.0.2 +minimongo@1.0.1 +mongo-livedata@1.0.3 +mrt:bootstrap-3@0.3.8 +mrt:moment@2.6.0 +observe-sequence@1.0.1 +ordered-dict@1.0.0 +random@1.0.0 +reactive-dict@1.0.0 +reload@1.0.0 +retry@1.0.0 +routepolicy@1.0.0 +service-configuration@1.0.0 +session@1.0.0 +spacebars-compiler@1.0.1 +spacebars@1.0.0 +standard-app-packages@1.0.0 +templating@1.0.4 +ui@1.0.0 +underscore@1.0.0 +webapp@1.0.2 diff --git a/client/lib/autoform_hooks.js b/client/lib/autoform_hooks.js index 1bc993c..02023d5 100644 --- a/client/lib/autoform_hooks.js +++ b/client/lib/autoform_hooks.js @@ -1,7 +1,7 @@ // Autoform hooks AutoForm.hooks({ - myFormId: { + documentForm: { before: { insert: function(doc) {}, update: function(docId, modifier) {}, @@ -9,8 +9,8 @@ AutoForm.hooks({ "methodName": function(doc) {} }, after: { - insert: function(error, result, template) {}, - update: function(error, result, template) {}, + insert: function(error, result, template) { }, + update: function(error, result, template) { }, remove: function(error, result, template) {}, "methodName": function(error, result, template) {} }, @@ -18,7 +18,7 @@ AutoForm.hooks({ //called when any operation succeeds, where operation will be //"insert", "update", "remove", or the method name. - onSuccess: function(operation, result, template) {}, + onSuccess: function(operation, result, template) {}, //called when any operation fails, where operation will be //"validation", "insert", "update", "remove", or the method name. @@ -26,4 +26,4 @@ AutoForm.hooks({ formToDoc: function(doc) {}, docToForm: function(doc) {} } -}); \ No newline at end of file +}); diff --git a/client/routes/documents.js b/client/routes/documents.js index 2bde757..975a8fc 100644 --- a/client/routes/documents.js +++ b/client/routes/documents.js @@ -3,7 +3,7 @@ // *************************************************************** Router.map(function() { - + // DOCUMENTS INDEX // ------------------------------------------------------- this.route('documentsIndex', { @@ -14,22 +14,43 @@ Router.map(function() { }, data: { documents: function () { - return Documents.find({}, {sort: {title: 1}}); + return Documents.find({}, {sort: {createdAt: 1}}); } } - }); - + }); + + // DOCUMENT NEW + // ------------------------------------------------------- + this.route('documentNew', { + template: 'documentNew', + path: '/documents/new' + }); + + // DOCUMENT SHOW // ------------------------------------------------------- this.route('documentShow', { template: 'documentShow', path: '/documents/:_id', waitOn: function () { - return Meteor.subscribe('documentShow', this.params._id); + return Meteor.subscribe('document', this.params._id); }, - data: function () { - return Documents.findOne(this.params._id); + data: function () { + return Documents.findOne(this.params._id); } }); - -}); \ No newline at end of file + + // DOCUMENT EDIT + // ------------------------------------------------------- + this.route('documentEdit', { + template: 'documentEdit', + path: '/documents/:_id/edit', + waitOn: function () { + return Meteor.subscribe('document', this.params._id); + }, + data: function () { + return Documents.findOne(this.params._id); + } + }); + +}); diff --git a/client/views/documents/document_edit.html b/client/views/documents/document_edit.html new file mode 100644 index 0000000..4549ed5 --- /dev/null +++ b/client/views/documents/document_edit.html @@ -0,0 +1,4 @@ + diff --git a/client/views/documents/document_new.html b/client/views/documents/document_new.html new file mode 100644 index 0000000..f9a20bf --- /dev/null +++ b/client/views/documents/document_new.html @@ -0,0 +1,4 @@ + diff --git a/client/views/documents/document_show.html b/client/views/documents/document_show.html new file mode 100644 index 0000000..7611bbd --- /dev/null +++ b/client/views/documents/document_show.html @@ -0,0 +1,4 @@ + diff --git a/client/views/documents/documents_index.html b/client/views/documents/documents_index.html index 8c90384..1070804 100644 --- a/client/views/documents/documents_index.html +++ b/client/views/documents/documents_index.html @@ -1,19 +1,25 @@ \ No newline at end of file + diff --git a/client/views/pages/frontpage.html b/client/views/pages/frontpage.html index aa60aa0..d68640a 100644 --- a/client/views/pages/frontpage.html +++ b/client/views/pages/frontpage.html @@ -1,3 +1,13 @@ diff --git a/client/views/shared/footer.html b/client/views/shared/footer.html index 742140d..1ff2eda 100644 --- a/client/views/shared/footer.html +++ b/client/views/shared/footer.html @@ -1,3 +1,7 @@ \ No newline at end of file + + diff --git a/client/views/shared/header.html b/client/views/shared/header.html index 043eff9..914c060 100644 --- a/client/views/shared/header.html +++ b/client/views/shared/header.html @@ -1,3 +1,26 @@ \ No newline at end of file + + + diff --git a/lib/collections/documents.js b/lib/collections/documents.js index 9ff3202..78d543c 100644 --- a/lib/collections/documents.js +++ b/lib/collections/documents.js @@ -7,6 +7,11 @@ Documents = new Meteor.Collection('documents', { max: 120, optional: false }, + content: { + type: String, + label: "Content", + optional: true + }, createdAt: { type: Date, optional: true, diff --git a/server/fixtures/documents.js b/server/fixtures/documents.js index 1ceb1bc..63e905f 100644 --- a/server/fixtures/documents.js +++ b/server/fixtures/documents.js @@ -1,16 +1,19 @@ -// Fixture data +// Fixture data if (Documents.find().count() === 0) { - + Documents.insert({ - title: "Derp" + title: "Derp", + content: "Lorem ipsum, herp derp durr." }); Documents.insert({ - title: "Hurr" + title: "Hurr", + content: "Lorem ipsum, herp derp durr." }); Documents.insert({ - title: "Durr" + title: "Durr", + content: "Lorem ipsum, herp derp durr." }); -} \ No newline at end of file +} diff --git a/smart.json b/smart.json deleted file mode 100644 index e95c4e8..0000000 --- a/smart.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "packages": { - "iron-router": {}, - "roles": {}, - "simple-schema": {}, - "collection2": {}, - "autoform": {}, - "moment": {}, - "less-fontawesome-4": {}, - "less-bootstrap-3": {}, - "iron-router-progress": {} - } -} diff --git a/smart.lock b/smart.lock deleted file mode 100644 index d5897b6..0000000 --- a/smart.lock +++ /dev/null @@ -1,68 +0,0 @@ -{ - "meteor": {}, - "dependencies": { - "basePackages": { - "iron-router": {}, - "roles": {}, - "simple-schema": {}, - "collection2": {}, - "autoform": {}, - "moment": {}, - "less-fontawesome-4": {}, - "less-bootstrap-3": {}, - "iron-router-progress": {} - }, - "packages": { - "iron-router": { - "git": "https://github.com/EventedMind/iron-router.git", - "tag": "v0.7.1", - "commit": "d1ffb3f06ea4c112132b030f2eb1a70b81675ecb" - }, - "roles": { - "git": "https://github.com/alanning/meteor-roles.git", - "tag": "v1.2.9", - "commit": "969b17fac5dfec66b6b12bfce4e37471d1a241d4" - }, - "simple-schema": { - "git": "https://github.com/aldeed/meteor-simple-schema.git", - "tag": "v0.5.1", - "commit": "a29956b34d03a4591dbd0eaed9d37009ef48b8db" - }, - "collection2": { - "git": "https://github.com/aldeed/meteor-collection2.git", - "tag": "v0.4.1", - "commit": "a9ffc9b285c3af8ad631f9cda4851b0ffc30c5ce" - }, - "autoform": { - "git": "https://github.com/aldeed/meteor-autoform.git", - "tag": "v0.11.0", - "commit": "efdffcdf836a45c50c39696ede15399177ccb9fa" - }, - "moment": { - "git": "https://github.com/acreeger/meteor-moment.git", - "tag": "v2.6.0", - "commit": "26156df681750fd6e6ed77043eef32b6653ebbdf" - }, - "less-fontawesome-4": { - "git": "https://github.com/DerMambo/less-fontawesome-4.git", - "tag": "v0.0.1", - "commit": "f40d8d5e0794325aedddd4aeedd1e9cfb47ca133" - }, - "less-bootstrap-3": { - "git": "https://github.com/DerMambo/less-bootstrap-3.git", - "tag": "v0.0.1", - "commit": "1321ac0ebc809bc354186b96f4c28b7042e38507" - }, - "iron-router-progress": { - "git": "https://github.com/Multiply/iron-router-progress.git", - "tag": "v0.4.0", - "commit": "02f78bdaca4c13d59f548d5a0ce83408c34b56d1" - }, - "blaze-layout": { - "git": "https://github.com/EventedMind/blaze-layout.git", - "tag": "v0.2.4", - "commit": "b40e9b0612329288d75cf52ad14a7da64bb8618f" - } - } - } -}