Skip to content

Commit

Permalink
Contacts API
Browse files Browse the repository at this point in the history
  • Loading branch information
강경희 committed Aug 9, 2013
1 parent c350719 commit bd4d2aa
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Contacts/contact_create.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Contacts</title>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="js/app.js"></script>
Expand All @@ -16,7 +16,7 @@
</head>
<body role="application">

<section role="region">
<section role="region">
<header class="fixed">
<a href="#" id="btnBackOnContactCreate"><span
class="icon icon-back">back</span></a>
Expand Down Expand Up @@ -47,7 +47,7 @@ <h1>create</h1>
</div>
</form>
</div>
</section>
</section>

</body>
</html>
4 changes: 2 additions & 2 deletions Contacts/contact_read.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Contacts</title>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="js/app.js"></script>
Expand Down Expand Up @@ -37,7 +37,7 @@ <h1>Contacts</h1>
<legend>Tel</legend>
<section>
<p>
<input type="tel" id="tel" required>
<input type="tel" id="tel" required>
<input type="hidden" id="id">
<button type="reset">Clear</button>
</p>
Expand Down
8 changes: 4 additions & 4 deletions Contacts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<body role="application">

<section role="region">

<header class="fixed">
<menu type="toolbar">
<button id="btnCreateOnContactsRead">
Expand All @@ -30,13 +30,13 @@ <h1>Contacts</h1>
<div class="contacts_read">
<section data-type="list">
<ul id="contactsList">

</ul>
</section>
</div>
</article>

</section>

</body>
</html>
6 changes: 1 addition & 5 deletions Contacts/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var app = function(){
}
return document.getElementById(id);
},

addEvent: function(id, event, callBack){
var obj = $(id);
if (obj.addEventListener) {
Expand All @@ -20,11 +19,9 @@ var app = function(){
obj.attachEvent('on'+event, callBack, false);
}
},

getURLParameter: function(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
},

back: function(){
document.location = "index.html";
},
Expand Down Expand Up @@ -77,6 +74,7 @@ var app = function(){
* contact create
*/
contactCreate: function(event){

event.preventDefault ? event.preventDefault() : event.returnValue = false;

var name = $('name').value;
Expand Down Expand Up @@ -208,10 +206,8 @@ var app = function(){
removeSearch.onerror = function() {
console.warn("Uh! Something goes wrong, no result found!");
}

}
}

} //-- return
}();

Expand Down

0 comments on commit bd4d2aa

Please sign in to comment.