Book Image

PhoneGap 3.x Mobile Application Development HOTSHOT

By : Kerri Shotts
Book Image

PhoneGap 3.x Mobile Application Development HOTSHOT

By: Kerri Shotts

Overview of this book

<p>PhoneGap allows you to use your existing knowledge of HTML, CSS, and JavaScript to create useful and exciting mobile applications.<br /><br />This book will present you with 12 exciting projects that will introduce you to the dynamic world of app development in PhoneGap. Starting with their design and following through to their completion, you will develop real-world mobile applications. Each app uses a combination of core PhoneGap technologies, plugins, and various frameworks covering the necessary concepts you can use to create many more great apps for mobile devices.</p>
Table of Contents (21 chapters)
PhoneGap 3.x Mobile Application Development HOTSHOT
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Implementing the text note edit view


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.

Getting on with it

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...