diff options
| author | Teddy Wing | 2015-01-24 10:41:07 -0500 | 
|---|---|---|
| committer | Teddy Wing | 2015-01-24 10:41:07 -0500 | 
| commit | 154fb936beb820d5e8db616899a6a95bc8d1c080 (patch) | |
| tree | c45eab082b4e1ef37320a6608f6850c9871e6c1c /app/views | |
| parent | 384167b6122e44971aac7f98a0131f8cad1ef47f (diff) | |
| download | Notes-angular-demo-154fb936beb820d5e8db616899a6a95bc8d1c080.tar.bz2 | |
main view: Create & update work
Add hooks to create new notes and save existing notes from the
interface.
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/home/main.html.erb | 19 | 
1 files changed, 16 insertions, 3 deletions
| diff --git a/app/views/home/main.html.erb b/app/views/home/main.html.erb index 7d34ad2..610d86f 100644 --- a/app/views/home/main.html.erb +++ b/app/views/home/main.html.erb @@ -3,10 +3,21 @@  	<div class="position-relative">  		<div class="right-section"> +			<span class="display-inline-block margin-top--15" +				ng-show="noteService.show_create"> +				<input type="text" class="form-field" ng-model="noteService.new_note_title" /> +				<button type="button" class="button" +					ng-click="noteService.create()">Create</button> +				<button type="button" class="button" +					ng-click="noteService.show_create = false">Cancel</button> +			</span> +			  			<a href="#" class="button" -				ng-click="">New</a> +				ng-show="!noteService.show_create" +				ng-click="noteService.show_create = true">New</a>  			<a href="#" class="button margin-left-8" +				ng-show="noteService.current_note"  				ng-click="noteService.save()">Save</a>  		</div>  	</div> @@ -22,6 +33,8 @@  		</div>  	</div> -	<div class="note-editor" contenteditable -		ng-bind="noteService.current_note.body"></div> +	<div class="note-editor"> +		<textarea class="border-none outline-none width-100% font-size-16" +			ng-model="noteService.current_note.body"></textarea> +	</div>  </div> | 
