-
- {{> bigAbilities}}
-
Proficiency Bonus {{proficiencyBonus}}
@@ -14,11 +11,8 @@
{{> skills}}
-
- {{> characterStats}}
-
-
- {{> features}}
+
+ {{> textField character=this field="description"}}
\ No newline at end of file
diff --git a/rpg-docs/client/views/character/textField/textField.css b/rpg-docs/client/views/character/textField/textField.css
new file mode 100644
index 00000000..eb3eb2d5
--- /dev/null
+++ b/rpg-docs/client/views/character/textField/textField.css
@@ -0,0 +1,11 @@
+#textOutput.notEditing{
+ cursor: default;
+}
+
+#textInput {
+ width:100%;
+ height:100%;
+ box-sizing: border-box; /* For IE and modern versions of Chrome */
+ -moz-box-sizing: border-box; /* For Firefox */
+ -webkit-box-sizing: border-box;
+}
\ No newline at end of file
diff --git a/rpg-docs/client/views/character/textField/textField.html b/rpg-docs/client/views/character/textField/textField.html
new file mode 100644
index 00000000..abc51a61
--- /dev/null
+++ b/rpg-docs/client/views/character/textField/textField.html
@@ -0,0 +1,9 @@
+
+ {{#if editing}}
+ {{input}}
+ {{else}}
+
+ {{output}}
+
+ {{/if}}
+
\ No newline at end of file
diff --git a/rpg-docs/client/views/character/textField/textField.js b/rpg-docs/client/views/character/textField/textField.js
new file mode 100644
index 00000000..eeae2660
--- /dev/null
+++ b/rpg-docs/client/views/character/textField/textField.js
@@ -0,0 +1,42 @@
+Template.textField.created = function(){
+ Template.instance().editing = new ReactiveVar(false);
+ document.execCommand('defaultParagraphSeparator', false, 'div');
+}
+
+Template.textField.helpers({
+ editing: function(){
+ return Template.instance().editing.get();
+ },
+ input: function(){
+ var text = this.character.strings[this.field];
+ return Spacebars.SafeString(text);
+ },
+ output: function(){
+ var html = evaluateString(this.character, this.character.strings[this.field]);
+ return Spacebars.SafeString(html);
+ },
+ outputClass: function(){
+ if(Template.instance().editing.get()){
+ return "editing";
+ } else{
+ return "notEditing"
+ }
+ }
+})
+
+Template.textField.events({
+ "blur #textInput": function(){
+ Template.instance().editing.set(false);
+ var text = $("#textInput").html();
+ //TODO sanitise the html
+ var setter = {};
+ setter["strings."+this.field] = text;
+ Characters.update(this.character._id, {$set: setter});
+ },
+ "click #textOutput": function(){
+ Template.instance().editing.set(true);
+ Tracker.afterFlush(function(){
+ $("#textInput").focus();
+ });
+ }
+})
\ No newline at end of file
diff --git a/rpg-docs/nohup.out b/rpg-docs/nohup.out
new file mode 100644
index 00000000..f101dbc9
--- /dev/null
+++ b/rpg-docs/nohup.out
@@ -0,0 +1,20 @@
+[[[[[ ~/workspace/rpg-docs ]]]]]
+
+=> Started proxy.
+=> Started MongoDB.
+[34mI20141109-18:31:54.578(0)? [39m** You've set up some data subscriptions with Meteor.publish(), but
+[34mI20141109-18:31:54.660(0)? [39m** you still have autopublish turned on. Because autopublish is still
+[34mI20141109-18:31:54.660(0)? [39m** on, your Meteor.publish() calls won't have much effect. All data
+[34mI20141109-18:31:54.660(0)? [39m** will still be sent to all clients.
+[34mI20141109-18:31:54.660(0)? [39m**
+[34mI20141109-18:31:54.661(0)? [39m** Turn off autopublish by removing the autopublish package:
+[34mI20141109-18:31:54.661(0)? [39m**
+[34mI20141109-18:31:54.661(0)? [39m** $ meteor remove autopublish
+[34mI20141109-18:31:54.661(0)? [39m**
+[34mI20141109-18:31:54.661(0)? [39m** .. and make sure you have Meteor.publish() and Meteor.subscribe() calls
+[34mI20141109-18:31:54.661(0)? [39m** for each collection that you want clients to see.
+[34mI20141109-18:31:54.662(0)? [39m
+=> Started your app.
+
+=> App running at: http://localhost:3000/
+=> Client modified -- refreshing
\ No newline at end of file