Permalink
Browse files

running notifications on a schedule

  • Loading branch information...
1 parent 79ee326 commit 0751c72d4235a6c8ecda5760fd3c099f60f5167a @nitindhar7 committed Apr 20, 2012
Showing with 8 additions and 50 deletions.
  1. +1 −1 README.md
  2. +3 −44 src/css/login_view.css
  3. +4 −1 src/js/controller/base_controller.js
  4. +0 −4 src/login_view.html
View
2 README.md
@@ -67,8 +67,8 @@ A simple data access object which saves the authentication token to local storag
- Instant reply to notification
- Tweet notification
- Option to load latest post every XX seconds
-- Reply button
- Number of notifications in Rangr browser icon
+- Reply button
* * *
View
47 src/css/login_view.css
@@ -12,7 +12,7 @@
margin: 5px;
padding: 10px;
width: 470px;
- height: 270px;
+ height: 210px;
background: #F5F5F5;
-webkit-border-radius: 3px;
}
@@ -79,7 +79,7 @@
#content {
width: 470px;
- height: 200px;
+ height: 140px;
}
#byline {
@@ -97,7 +97,7 @@
#login-form {
width: 470px;
- height: 175px;
+ height: 115px;
display: none;
}
@@ -130,47 +130,6 @@
clear: right;
}
-#login-form .check {
- margin-left: 140px;
- width: 25px;
- height: 25px;
- float: left;
- clear: left;
-}
-
-#login-form .check-label {
- margin-left: 5px;
- width: 300px;
- height: 25px;
- line-height: 25px;
- font-size: 12px;
- color: #999;
- float: left;
- clear: right;
- text-shadow: white 1px 1px 0px;
-}
-
-#login-form .note-label {
- margin-left: 170px;
- width: 40px;
- height: 25px;
- font-weight: bold;
- color: #666;
- float: left;
- clear: left;
- text-shadow: white 1px 1px 0px;
-}
-
-#login-form .note-content {
- width: 260px;
- height: 42px;
- font-style: italic;
- color: #999;
- float: left;
- clear: right;
- text-shadow: white 1px 1px 0px;
-}
-
#login-form .submit {
margin-left: 140px;
width: 58px;
View
5 src/js/controller/base_controller.js
@@ -1,12 +1,15 @@
chrome.extension.onRequest.addListener(requestHandler);
+var NOTIFICATION_TIMEOUT_MILLIS = 1000 * 60 * 15;
+
var notifications = [];
var notificationsCount = 0;
function requestHandler(request, sender, sendResponse) {
if(request.type == "auth") {
actionNotify();
+ self.setInterval("actionNotify()", NOTIFICATION_TIMEOUT_MILLIS);
}
}
@@ -54,7 +57,7 @@ function actionNotify() {
}
else {
// FIXME: handle more gracefully
- alert("not logged in!");
+ alert("You are not logged in!");
}
}
View
4 src/login_view.html
@@ -25,10 +25,6 @@
<input type="text" class="box"/>
<div class="title">Password</div>
<input type="password" class="box"/>
- <input type="checkbox" class="check"/>
- <div class="check-label">Remember me</div>
- <div class="note-label">NOTE:</div>
- <div class="note-content">Storing your passwords may allow others to access your Rangr account when using the browser</div>
<input type="submit" value="Sign in" class="submit"/>
<div id="message"></div>
</div>

0 comments on commit 0751c72

Please sign in to comment.