rename /rpg-docs to /app
This commit is contained in:
43
app/client/views/feedback/feedback.html
Normal file
43
app/client/views/feedback/feedback.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<template name="feedback">
|
||||
<div class="fit layout vertical">
|
||||
<app-header-layout has-scrolling-region class="feedback flex">
|
||||
<app-header fixed effects="waterfall">
|
||||
<app-toolbar>
|
||||
<div main-title>Feedback</div>
|
||||
</app-toolbar>
|
||||
</app-header>
|
||||
<div class="form flex">
|
||||
<div>
|
||||
<paper-input id="feedbackTitle" label="Title" floatinglabel required></paper-input>
|
||||
</div>
|
||||
<div>
|
||||
<paper-dropdown-menu label="Type" class="typeMenu">
|
||||
<paper-listbox class="dropdown-content" selected="0">
|
||||
<paper-item label="General Feedback"> General Feedback </paper-item>
|
||||
<paper-item label="Bug"> Bug </paper-item>
|
||||
<paper-item label="Suggested Change"> Suggested Change </paper-item>
|
||||
<paper-item label="Feature Request"> Feature Request </paper-item>
|
||||
</paper-listbox>
|
||||
</paper-dropdown-menu>
|
||||
</div>
|
||||
<div class="layout horizontal">
|
||||
<div class="paper-font-caption">not important</div>
|
||||
<paper-slider id="severity" class="flex" max=10 min=1 value=5 snap></paper-slider>
|
||||
<div class="paper-font-caption">important</div>
|
||||
</div>
|
||||
<paper-textarea label="Description" id="feedbackDescription" required></paper-textarea>
|
||||
</div>
|
||||
</app-header-layout>
|
||||
<div class="buttons layout horizontal end-justified">
|
||||
<paper-button id="cancelButton"
|
||||
affirmative>
|
||||
Cancel
|
||||
</paper-button>
|
||||
<paper-button id="sendButton"
|
||||
affirmative
|
||||
disabled={{invalid}}>
|
||||
Send
|
||||
</paper-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
36
app/client/views/feedback/feedback.js
Normal file
36
app/client/views/feedback/feedback.js
Normal file
@@ -0,0 +1,36 @@
|
||||
Template.feedback.onCreated(function() {
|
||||
this.title = new ReactiveVar("");
|
||||
this.description = new ReactiveVar("");
|
||||
});
|
||||
|
||||
Template.feedback.helpers({
|
||||
invalid: function() {
|
||||
var inst = Template.instance();
|
||||
return !inst.title.get() ||
|
||||
!inst.description.get();
|
||||
}
|
||||
});
|
||||
|
||||
Template.feedback.events({
|
||||
"input #feedbackTitle": function(event, instance) {
|
||||
instance.title.set(instance.find("#feedbackTitle").value);
|
||||
},
|
||||
"input #feedbackDescription": function(event, instance) {
|
||||
instance.description.set(instance.find("#feedbackDescription").value);
|
||||
},
|
||||
"click #sendButton": function(event, instance) {
|
||||
var report = {};
|
||||
report.title = instance.find("#feedbackTitle").value;
|
||||
report.severity = instance.find("#severity").value;
|
||||
report.type = instance.find(".typeMenu").value;
|
||||
report.description = instance.find("#feedbackDescription").value;
|
||||
report.metaData = {
|
||||
url: window.location.href,
|
||||
session: _.pairs(Session.keys),
|
||||
};
|
||||
popDialogStack(report);
|
||||
},
|
||||
"click #cancelButton": function(event, template){
|
||||
popDialogStack();
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user