diff --git a/js/popup.js b/js/popup.js index 0c77f25fc..34de91485 100644 --- a/js/popup.js +++ b/js/popup.js @@ -59,8 +59,12 @@ registerOnLoadFunction(function() { fillMessages(); }); fillMessages(); + $('.my-number').text(storage.getUnencrypted("number_id").split(".")[0]); storage.putUnencrypted("unreadCount", 0); chrome.browserAction.setBadgeText({text: ""}); + $("#me").click(function() { + $('#popup_send_numbers').val($('.my-number').text()); + }); $("#popup_send_button").click(function() { var numbers = []; diff --git a/popup.css b/popup.css new file mode 100644 index 000000000..6ac8fec7b --- /dev/null +++ b/popup.css @@ -0,0 +1,91 @@ +.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; } +.clearfix:after { clear: both; } +.clearfix { zoom: 1; } + +body { + margin: 0; + min-width: 300px; + min-height: 500px; + font-family: sans-serif; + color: #333; +} + +.container { + max-width: 960px; + margin: auto; + padding: 0 1em; +} + +header { + background-color: ccc; + padding: 5px 0; +} + +form.compose { + position: relative; +} + +label { + float: left; + margin-right: 1em; +} + +input[type=text], textarea { + display: block; + padding: 0.5em; + margin: 0.5em 0; + border-radius: 4px; + border: 1px solid #ddf; +} + +textarea { + resize: vertical; + width: 100%; + min-height: 100px; + box-sizing: border-box; + font-family: Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 18px; +} + +#send input[type=submit] { + float: right; +} + +#popup_send_numbers { + margin-bottom: 0; +} + +#popup_send_numbers:focus + .contacts, +.contacts:hover { + display: block; +} + +.contacts { + display: none; + position: absolute; + left: 10px; +} + +.contact { + border: solid 1px #ccc; + background: #fff; + font-size: 88%; + padding-right: 5px; + cursor: pointer; +} + +.contact .pic { + display: block; + float: left; + width: 30px; + height: 30px; + background: #ddd; +} + +.contact .name, .contact .number { + line-height: 30px; + margin-left: 5px; +} + + diff --git a/popup.html b/popup.html index e028ea13d..e25051564 100644 --- a/popup.html +++ b/popup.html @@ -1,22 +1,35 @@ + -
-
- - Inbox - Send -
- -
-