Prevented user-created dependency loops when setting effects as calclations

This commit is contained in:
Thaum
2014-11-20 12:55:42 +00:00
parent ca7a625534
commit 252d0f989b
7 changed files with 146 additions and 111 deletions

View File

@@ -2,7 +2,7 @@
<h2>Saving Throws</h2>
<table class="skillTable">
{{#each saveList}}
<tr title={{effectList skill ..}}>
<tr>
<td><div class="profIcon" style="background-image: url(/png/profIcons/{{profIcon skill}})"></div></td>
{{#if failSkill}}
<td class="fail">fail</td>
@@ -16,7 +16,7 @@
<h2>Skills</h2>
<table class="skillTable">
{{#each skillList}}
<tr title={{effectList skill ..}}>
<tr>
<td><div class="profIcon" style="background-image: url(/png/profIcons/{{profIcon skill}})"></div></td>
{{#if failSkill}}
<td class="fail">fail</td>

View File

@@ -34,14 +34,13 @@ Template.textField.events({
//TODO sanitise the html
var setter = {};
setter[this.field] = text;
Characters.update(this.character._id, {$set: setter}, function(error, result) {
if(error) console.log(error);
});
Characters.update(this.character._id, {$set: setter}, {removeEmptyStrings: false});
},
"click #textOutput": function(){
Template.instance().editing.set(true);
Tracker.afterFlush(function(){
$("#textInput").focus();
placeCaretAtEnd($("#textInput"));
});
}
})