Skip to content

Commit 976d4ec

Browse files
committed
Push down demo.html and phoneItIn.js files and extract css file.
1 parent 2e5587f commit 976d4ec

6 files changed

Lines changed: 61 additions & 28 deletions

File tree

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,5 @@ number will look, whether there are any problems, and whether
2121
entry is complete. Upon leaving the input, the value is re-
2222
formatted to standard.
2323

24-
Note: This project is in early develpment and has just reached
25-
the point of starting to be useful in production. It currently
26-
works only with very modern browsers and it will be much
27-
firendlier once it can display an indication of when a complete
28-
phone number has been entered or when invalid or extra characters
29-
have been entered. These indications are coming very soon.
24+
Note that this code currently relies on features only present
25+
in up-to-date modern browsers.

SpecRunner.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<script type="text/javascript" src="lib/jasmine-1.3.1/jasmine-html.js"></script>
99

1010
<!-- include source files here... -->
11-
<script type="text/javascript" src="src/phoneItIn.js"></script>
11+
<script type="text/javascript" src="src/scripts/phoneItIn.js"></script>
1212

1313
<!-- include spec files here... -->
1414
<script type="text/javascript" src="spec/support/phoneItInDrivers/Browser.js"></script>

demo.html

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/demo.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<link rel="stylesheet" type="text/css" href="styles/phoneItIn.css">
5+
</head>
6+
<body>
7+
<label for='name'>Name</label><input id='name' type='text' /><br />
8+
<label for='phone'>Phone</label><input id='phone' type='tel' /><br />
9+
10+
<script type="text/javascript" src="scripts/phoneItIn.js"></script>
11+
<script>
12+
var phoneItInUI = new phoneItIn.UI();
13+
phoneItInUI.bindToInput( document.getElementById('phone') );
14+
</script>
15+
</body>
16+
</html>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
/****
2+
* Copyright (c) 2013 Steve Jorgensen
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining
5+
* a copy of this software and associated documentation files (the
6+
* "Software"), to deal in the Software without restriction, including
7+
* without limitation the rights to use, copy, modify, merge, publish,
8+
* distribute, sublicense, and/or sell copies of the Software, and to
9+
* permit persons to whom the Software is furnished to do so, subject to
10+
* the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be
13+
* included in all copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
****/
23+
24+
/****
25+
* See https://github.com/stevecj/phoneItIn for information and updates.
26+
****/
27+
128
var phoneItIn = phoneItIn || {};
229

330
phoneItIn.formatters = phoneItIn.formatters || {};

src/styles/phoneItIn.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#phin-help {
2+
padding: 3px
3+
}
4+
5+
#phin-help-inner {
6+
border: solid 1px #bbb; padding: 0.125em 0.25em; color: #666;
7+
}
8+
9+
.phin-invalid #phin-help-inner {
10+
background-color: #fbb; color: #844;
11+
}
12+
13+
.phin-complete #phin-help-inner {
14+
background-color: #bfb; color: #484;
15+
}

0 commit comments

Comments
 (0)