rename /rpg-docs to /app
This commit is contained in:
12
app/client/views/paperTemplates/baseDialog/baseDialog.css
Normal file
12
app/client/views/paperTemplates/baseDialog/baseDialog.css
Normal file
@@ -0,0 +1,12 @@
|
||||
.base-dialog h1,
|
||||
.base-dialog h2,
|
||||
.base-dialog h3,
|
||||
.base-dialog h4,
|
||||
.base-dialog h5,
|
||||
.base-dialog h6{
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.base-dialog p{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
40
app/client/views/paperTemplates/baseDialog/baseDialog.html
Normal file
40
app/client/views/paperTemplates/baseDialog/baseDialog.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<template name="baseDialog">
|
||||
<div class="fit base-dialog layout vertical">
|
||||
<app-toolbar class={{class}}>
|
||||
<paper-icon-button id="backButton"
|
||||
icon="arrow-back">
|
||||
</paper-icon-button>
|
||||
<div main-title>{{title}}</div>
|
||||
{{#if editing}}
|
||||
{{#unless hideDelete}}
|
||||
<paper-icon-button id="deleteButton"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
icon="delete">
|
||||
</paper-icon-button>
|
||||
{{/unless}}
|
||||
{{#unless hideColor}}
|
||||
{{> colorDropdown}}
|
||||
{{/unless}}
|
||||
{{#unless editOnly}}
|
||||
<paper-icon-button id="doneEditingButton"
|
||||
icon="done">
|
||||
</paper-icon-button>
|
||||
{{/unless}}
|
||||
{{else}}
|
||||
{{#if showEdit}}
|
||||
<paper-icon-button id="editButton"
|
||||
icon="create">
|
||||
</paper-icon-button>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</app-toolbar>
|
||||
<div class="form flex scroll-y" style="position: relative;">
|
||||
{{#unless editing}}
|
||||
{{> UI.contentBlock}}
|
||||
{{else}}
|
||||
{{> UI.elseBlock}}
|
||||
{{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
28
app/client/views/paperTemplates/baseDialog/baseDialog.js
Normal file
28
app/client/views/paperTemplates/baseDialog/baseDialog.js
Normal file
@@ -0,0 +1,28 @@
|
||||
Template.baseDialog.onCreated(function(){
|
||||
this.editing = new ReactiveVar(!!this.data.startEditing);
|
||||
});
|
||||
|
||||
Template.baseDialog.helpers({
|
||||
editing: function(){
|
||||
if (!Template.parentData() || !Template.parentData().charId) return true;
|
||||
return Template.instance().editing.get() &&
|
||||
canEditCharacter(Template.parentData().charId);
|
||||
},
|
||||
showEdit: function() {
|
||||
if (this.hideEdit) return false;
|
||||
if (!Template.parentData() || !Template.parentData().charId) return true;
|
||||
return canEditCharacter(Template.parentData().charId);
|
||||
},
|
||||
});
|
||||
|
||||
Template.baseDialog.events({
|
||||
"tap #backButton": function(){
|
||||
popDialogStack();
|
||||
},
|
||||
"tap #editButton": function(event, instance){
|
||||
instance.editing.set(true);
|
||||
},
|
||||
"tap #doneEditingButton": function(event, instance){
|
||||
instance.editing.set(false);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user