Moved views out of private folder
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
.noteDialog .colorDropdown {
|
||||
top: 0;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<template name="noteDialog">
|
||||
{{#with note}}
|
||||
{{#baseDialog title=name class=colorClass startEditing=../startEditing}}
|
||||
<div>{{#markdown}}{{description}}{{/markdown}}</div>
|
||||
{{else}}
|
||||
{{> noteDialogEdit}}
|
||||
{{/baseDialog}}
|
||||
{{/with}}
|
||||
</template>
|
||||
|
||||
<template name="noteDialogEdit">
|
||||
<!--Name-->
|
||||
<div horizontal layout>
|
||||
<paper-input id="noteNameInput"
|
||||
label="Name"
|
||||
floatinglabel
|
||||
value={{name}}
|
||||
flex>
|
||||
</paper-input>
|
||||
</div>
|
||||
<!--Description, formatting this nicely breaks it, leave it as is-->
|
||||
<paper-input-decorator label="Description"
|
||||
floatinglabel
|
||||
layout vertical>
|
||||
<paper-autogrow-textarea>
|
||||
<textarea id="noteDescriptionInput"
|
||||
value={{description}}></textarea>
|
||||
</paper-autogrow-textarea>
|
||||
</paper-input-decorator>
|
||||
</template>
|
||||
@@ -0,0 +1,31 @@
|
||||
Template.noteDialog.helpers({
|
||||
note: function(){
|
||||
return Notes.findOne(this.noteId);
|
||||
}
|
||||
});
|
||||
|
||||
Template.noteDialog.events({
|
||||
"color-change": function(event, instance){
|
||||
Notes.update(instance.data.noteId, {$set: {color: event.color}});
|
||||
},
|
||||
"tap #deleteButton": function(event, instance){
|
||||
Notes.softRemove(instance.data.noteId);
|
||||
GlobalUI.deletedToast(instance.data.noteId, "Notes", "Note");
|
||||
GlobalUI.closeDetail();
|
||||
},
|
||||
});
|
||||
|
||||
Template.noteDialogEdit.onRendered(function(){
|
||||
updatePolymerInputs(this);
|
||||
});
|
||||
|
||||
Template.noteDialogEdit.events({
|
||||
"change #noteNameInput, input #noteNameInput": function(event){
|
||||
var value = event.currentTarget.value;
|
||||
Notes.update(this._id, {$set: {name: value}});
|
||||
},
|
||||
"change #noteDescriptionInput": function(event){
|
||||
var value = event.currentTarget.value;
|
||||
Notes.update(this._id, {$set: {description: value}});
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user