diff --git a/rpg-docs/client/views/character/stats/stats.js b/rpg-docs/client/views/character/stats/stats.js
index 4dbd1407..92507f5b 100644
--- a/rpg-docs/client/views/character/stats/stats.js
+++ b/rpg-docs/client/views/character/stats/stats.js
@@ -1,5 +1,7 @@
Template.stats.events({
"tap .statCard": function(event, instance){
+ //TODO reimplement this when the dialog is nice
+ return;
if(this.isSkill){
var charId = instance.data._id;
GlobalUI.setDetail({
@@ -10,6 +12,8 @@ Template.stats.events({
}
},
"tap .skillRow": function(event, instance){
+ //TODO reimplement this when the dialog is nice
+ return;
var skill = this.skill;
var charId = instance.data._id;
GlobalUI.setDetail({
diff --git a/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.html b/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.html
index 20903364..ad40f9a7 100644
--- a/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.html
+++ b/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.html
@@ -3,30 +3,7 @@
{{title}}
- {{#if showEdit}}
- {{#if editing}}
- {{#unless hideDelete}}
-
- {{/unless}}
- {{#unless hideColor}}
- {{> colorDropdown}}
- {{/unless}}
-
- {{else}}
-
- {{/if}}
- {{else}}
+ {{#if editing}}
{{#unless hideDelete}}
colorDropdown}}
{{/unless}}
+
+ {{else}}
+ {{#unless hideEdit}}
+
+ {{/unless}}
{{/if}}
- {{> UI.contentBlock}}
+ {{#unless editing}}
+ {{> UI.contentBlock}}
+ {{else}}
+ {{> UI.elseBlock}}
+ {{/unless}}
\ No newline at end of file
diff --git a/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.js b/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.js
index 63b3ac96..8d12bc0d 100644
--- a/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.js
+++ b/rpg-docs/client/views/paperTemplates/baseDialog/baseDialog.js
@@ -1,14 +1,26 @@
+Template.baseDialog.onCreated(function(){
+ this.editing = new ReactiveVar(!!this.data.startEditing);
+});
+
Template.baseDialog.onRendered(function(){
- updatePolymerInputs(this);
//after the dialog is built, open it
- if (!this.alreadyRendered){
- Session.set("global.ui.detailShow", true);
- this.alreadyRendered = true;
- }
+ Session.set("global.ui.detailShow", true);
+});
+
+Template.baseDialog.helpers({
+ editing: function(){
+ return Template.instance().editing.get();
+ },
});
Template.baseDialog.events({
"tap #backButton": function(){
GlobalUI.closeDetail();
- }
+ },
+ "tap #editButton": function(event, instance){
+ instance.editing.set(true);
+ },
+ "tap #doneEditingButton": function(event, instance){
+ instance.editing.set(false);
+ },
});