Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
App is now working with ability to view and add new contacts. Going t…
…o add Edit and Delete options next
- Loading branch information
1 parent
89d416a
commit f6c5048
Showing
11 changed files
with
220 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
TBD: detail view for {{ contact.first_name + " " + contact.last_name }} | ||
TODO: detail view for {{ contact.first_name + " " + contact.last_name }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
app/assets/javascripts/app/partials/new-contact.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<div> | ||
<div> | ||
<h3>Add New Contact</h3> | ||
</div> | ||
<form id="contact_form" ng-submit="addContact()"> | ||
<input type="text" id="new_contact_first_name" name="newContactFirstName" ng-model="newFirstName" placeholder="First Name"></br> | ||
<input type="text" id="new_contact_last_name" name="newContactLastName" ng-model="newLastName" placeholder="Last Name"></br> | ||
<select id="salutation" name="salutation" ng-model="newSalutation"> | ||
<option value="">Pick a Salutation</option> | ||
<option value="mr">Mr</option> | ||
<option value="ms">Ms</option> | ||
<option value="ms">Miss</option> | ||
<option value="mrs">Mrs</option> | ||
<option value="dr">Dr</option> | ||
<option value="space_cowboy">Space Cowboy</option> | ||
<option value="gangster_of_love">Gangster of Love</option> | ||
</select></br> | ||
<input type="text" id="new_contact_phone" name="newContactPhone" ng-model="newPhoneNum" placeholder="Phone Number"></br> | ||
<select id="phone_type" name="state" ng-model="newPhoneType"> | ||
<option value="">Pick your Phone Type</option> | ||
<option value="home">Home</option> | ||
<option value="mobile">Mobile</option> | ||
<option value="work">Work</option> | ||
</select></br> | ||
<input type="text" id="new_contact_address1" name="newContactAddress1" ng-model="newAddress1" placeholder="Address 1"></br> | ||
<input type="text" id="new_contact_address2" name="newContactAddress2" ng-model="newAddress2" placeholder="Address 2"></br> | ||
<input type="text" id="new_contact_city" name="newContactCity" ng-model="newCity" placeholder="City"></br> | ||
<select id="state" name="state" ng-model="newState"> | ||
<option value="">Pick your state</option> | ||
<option value="AL">Alabama</option> | ||
<option value="AK">Alaska</option> | ||
<option value="AZ">Arizona</option> | ||
<option value="AR">Arkansas</option> | ||
<option value="CA">California</option> | ||
<option value="CO">Colorado</option> | ||
<option value="CT">Connecticut</option> | ||
<option value="DE">Delaware</option> | ||
<option value="DC">District of Columbia</option> | ||
<option value="FL">Florida</option> | ||
<option value="GA">Georgia</option> | ||
<option value="HI">Hawaii</option> | ||
<option value="ID">Idaho</option> | ||
<option value="IL">Illinois</option> | ||
<option value="IN">Indiana</option> | ||
<option value="IA">Iowa</option> | ||
<option value="KS">Kansas</option> | ||
<option value="KY">Kentucky</option> | ||
<option value="LA">Louisiana</option> | ||
<option value="ME">Maine</option> | ||
<option value="MD">Maryland</option> | ||
<option value="MA">Massachusetts</option> | ||
<option value="MI">Michigan</option> | ||
<option value="MN">Minnesota</option> | ||
<option value="MS">Mississippi</option> | ||
<option value="MO">Missouri</option> | ||
<option value="MT">Montana</option> | ||
<option value="NE">Nebraska</option> | ||
<option value="NV">Nevada</option> | ||
<option value="NH">New Hampshire</option> | ||
<option value="NJ">New Jersey</option> | ||
<option value="NM">New Mexico</option> | ||
<option value="NY">New York</option> | ||
<option value="NC">North Carolina</option> | ||
<option value="ND">North Dakota</option> | ||
<option value="OH">Ohio</option> | ||
<option value="OK">Oklahoma</option> | ||
<option value="OR">Oregon</option> | ||
<option value="PA">Pennsylvania</option> | ||
<option value="RI">Rhode Island</option> | ||
<option value="SC">South Carolina</option> | ||
<option value="SD">South Dakota</option> | ||
<option value="TN">Tennessee</option> | ||
<option value="TX">Texas</option> | ||
<option value="UT">Utah</option> | ||
<option value="VT">Vermont</option> | ||
<option value="VA">Virginia</option> | ||
<option value="WA">Washington</option> | ||
<option value="WV">West Virginia</option> | ||
<option value="WI">Wisconsin</option> | ||
<option value="WY">Wyoming</option> | ||
</select></br> | ||
<input type="text" id="new_contact_zipcode" name="newContactZipcode" ng-model="newZipcode" placeholder="Zip Code"></br> | ||
<input type="text" id="new_contact_email" name="newContactEmail" ng-model="newEmail" placeholder="Email Address"></br> | ||
<input type="button" id="contact_submit_btn" value="Add Contact" class="btn btn-primary"> | ||
<input type="button" id="test_btn" value="What's the value"/> | ||
</form> | ||
|
||
|
||
|
||
</div> | ||
|
||
<script type="text/javascript"> | ||
$(document).ready(function(){ | ||
|
||
|
||
|
||
//alert("loaded"); | ||
$("#contact_submit_btn").click(function(){ | ||
//alert("button clicked"); | ||
$("#contact_form").submit(); | ||
}); | ||
|
||
|
||
|
||
}); | ||
|
||
|
||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,13 @@ | |
*/ | ||
|
||
@import "bootstrap"; | ||
|
||
|
||
body { | ||
padding-top: 60px; | ||
padding-bottom: 40px; | ||
} | ||
|
||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
<h2>Contact Management</h2> | ||
<p>Select a contact below</p> | ||
<div class="navbar navbar-fixed-top"> | ||
<div class="navbar-inner"> | ||
<div class="container"> | ||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</a> | ||
<a class="brand" href="#">Project name</a> | ||
<div class="nav-collapse"> | ||
<ul class="nav"> | ||
<li class="active"><a href="/#/contacts">Contacts List</a></li> | ||
</ul> | ||
</div><!--/.nav-collapse --> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<div ng-view></div> | ||
<div ng-view></div> | ||
|