From b40094017fc8a642bbdf1797387ed4db3040d616 Mon Sep 17 00:00:00 2001 From: Thaum Date: Fri, 27 Feb 2015 10:50:28 +0000 Subject: [PATCH] Added Basic character list view --- rpg-docs/Model/Character/Characters.js | 7 +++--- rpg-docs/client/globalHelpers/mongol.js | 21 ----------------- .../effectsEditList/effectsEditList.js | 2 +- .../views/character/persona/persona.html | 6 ++--- .../client/views/character/persona/persona.js | 10 ++++---- .../client/views/character/spells/spells.js | 3 +-- rpg-docs/client/views/home/home.html | 23 ++++++++++++++----- rpg-docs/client/views/home/home.js | 21 ++++++++++++++--- rpg-docs/client/views/layout/layout.html | 5 ++-- rpg-docs/client/views/layout/layout.js | 5 ++++ 10 files changed, 56 insertions(+), 47 deletions(-) delete mode 100644 rpg-docs/client/globalHelpers/mongol.js create mode 100644 rpg-docs/client/views/layout/layout.js diff --git a/rpg-docs/Model/Character/Characters.js b/rpg-docs/Model/Character/Characters.js index cb55cfe0..7358cf6b 100644 --- a/rpg-docs/Model/Character/Characters.js +++ b/rpg-docs/Model/Character/Characters.js @@ -187,9 +187,9 @@ Schemas.Character = new SimpleSchema({ initiativeRoll: { type: Number, min: 0, max: 1, decimal: true, defaultValue: 0}, //permissions - owner: { type: String, regEx: SimpleSchema.RegEx.Id }, - readers: { type: [String], regEx: SimpleSchema.RegEx.Id }, - writers: { type: [String], regEx: SimpleSchema.RegEx.Id }, + owner: { type: String, regEx: SimpleSchema.RegEx.Id, optional: true }, + readers: { type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: [] }, + writers: { type: [String], regEx: SimpleSchema.RegEx.Id, defaultValue: [] }, color: {type: String, allowedValues: _.pluck(colorOptions, "key"), defaultValue: "q"}, //TODO add per-character settings "settings.experiencesInc": {type: Number, defaultValue: 20}, @@ -219,6 +219,7 @@ Characters.attachSchema(Schemas.Character); }, {type: "inate", name: "Resistance doesn't stack", operation: "min", value: 0.5}, {type: "inate", name: "Vulnerability doesn't stack", operation: "max", value: 2} + {stat: "armor", name: "Natural Armor", value: 10, operation: "base", type: "inate"}} */ var attributeBase = function(charId, statName){ diff --git a/rpg-docs/client/globalHelpers/mongol.js b/rpg-docs/client/globalHelpers/mongol.js deleted file mode 100644 index 95ec5790..00000000 --- a/rpg-docs/client/globalHelpers/mongol.js +++ /dev/null @@ -1,21 +0,0 @@ -Session.set("Mongol", { - 'collections': [ - "Characters", - "Actions", - "Attacks", - "Classes", - "Containers", - "Effects", - "Experiences", - "Features", - "Items", - "Levels", - "Notes", - "Spells", - "SpellLists" - ], - 'display': false, - 'opacity_normal': ".7", - 'opacity_expand': ".9", - 'disable_warning': 'false', -}); \ No newline at end of file diff --git a/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.js b/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.js index cbd8861c..d3097547 100644 --- a/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.js +++ b/rpg-docs/client/views/character/effects/effectsEditList/effectsEditList.js @@ -1,6 +1,6 @@ Template.effectsEditList.helpers({ effects: function(){ - var cursor = Effects.find({sourceId: this.sourceId}); + var cursor = Effects.find({sourceId: this.sourceId, type: this.type}); return cursor; } }); diff --git a/rpg-docs/client/views/character/persona/persona.html b/rpg-docs/client/views/character/persona/persona.html index 7772d639..b67e2153 100644 --- a/rpg-docs/client/views/character/persona/persona.html +++ b/rpg-docs/client/views/character/persona/persona.html @@ -22,9 +22,9 @@