We need to implement our last view, the text note edit view. It should be defined in /www/js/app/views/textNoteEditView.js
. The associated template should be defined in /www/html/textNoteEditView.html
.
First, we define the template (in /www/html/textNoteEditView.html
):
<html> <body> <div class="ui-navigation-bar"> <div class="ui-title" contenteditable="true">%NOTE_NAME%</div> <div class="ui-bar-button-group ui-align-left"> <div class="ui-bar-button ui-tint-color ui-back-button">%BACK%</div> </div> <div class="ui-bar-button-group ui-align-right"> <div class="ui-bar-button ui-destructive-color">%DELETE_NOTE%</div> </div> </div> <div class="ui-scroll-container ui-avoid-navigation-bar"> <textarea class="ui-text-box" >%NOTE_CONTENTS%</textarea> </div> </body> </html>
Note that the title has the contenteditable
attribute set...