Updated persona tab to Polymer 1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template name="textDialog">
|
||||
{{#baseDialog title=title class=colorClass hideColor="true" hideDelete="true" startEditing=startEditing}}
|
||||
{{#baseDialog title=title class=colorClass hideColor="true" hideDelete="true"}}
|
||||
<div>{{#markdown}}{{evaluateString charId value}}{{/markdown}}</div>
|
||||
{{else}}
|
||||
{{> textDialogEdit}}
|
||||
@@ -7,9 +7,6 @@
|
||||
</template>
|
||||
|
||||
<template name="textDialogEdit">
|
||||
<paper-input-decorator label={{title}} floatinglabel layout vertical>
|
||||
<paper-autogrow-textarea>
|
||||
<textarea id="textInput" placeholder value={{value}}></textarea>
|
||||
</paper-autogrow-textarea>
|
||||
</paper-input-decorator>
|
||||
<paper-textarea label={{title}} id="textInput" value={{value}}>
|
||||
</paper-textarea>
|
||||
</template>
|
||||
|
||||
@@ -7,10 +7,6 @@ Template.textDialog.helpers({
|
||||
}
|
||||
});
|
||||
|
||||
Template.textDialogEdit.onRendered(function(){
|
||||
updatePolymerInputs(this);
|
||||
});
|
||||
|
||||
Template.textDialogEdit.helpers({
|
||||
value: function(){
|
||||
var fieldSelector = {fields: {}};
|
||||
@@ -21,10 +17,13 @@ Template.textDialogEdit.helpers({
|
||||
});
|
||||
|
||||
Template.textDialogEdit.events({
|
||||
"change #textInput": function(event){
|
||||
"input #textInput": _.debounce(function(event){
|
||||
var input = event.currentTarget.value;
|
||||
var setter = {$set: {}};
|
||||
setter.$set[this.field] = input;
|
||||
Characters.update(this.charId, setter);
|
||||
}
|
||||
Characters.update(this.charId, {
|
||||
$set: {[this.field]: input}
|
||||
}, {
|
||||
removeEmptyStrings: false,
|
||||
trimStrings: false,
|
||||
});
|
||||
}, 300),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user