Skip to content

Commit

Permalink
rm offline notificatino and make deadline list to be a scroll bar
Browse files Browse the repository at this point in the history
  • Loading branch information
plrthink committed Nov 20, 2013
1 parent efc120d commit 6f47892
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "coursera_alfred",
"version": "0.3.6",
"version": "0.3.7",
"dependencies": {
"jquery": "~1.9.1",
"angular": "~1.0.5",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Coursera Alfred",
"version": "0.3.6",
"version": "0.3.7",
"manifest_version": 2,
"description": "Your Coursera Helper",
"homepage_url": "http://www.xiuxiu.de/",
Expand Down
2 changes: 1 addition & 1 deletion src/bg/js/controllers/bgCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ app.controller('bgCtrl', function BgCtrl($scope, $timeout, courseService, alfred
chrome.cookies.onChanged.addListener(function(info){
console.log("cookies is changed", info);
$scope.$apply(function(){
// if and only if when cookie responsible for user was deleted reset the whole local storageif(info.cookie.name == "CAUTH" && info.removed == true)
// if and only if when cookie responsible for user was deleted, reset the whole local storage
if(info.cookie.name === "CAUTH" && info.removed === true)
alfredStorage.reset();
// wait a second for coursera responding to user's action
Expand Down
4 changes: 3 additions & 1 deletion src/browser_action/browser_action.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@
<div class="bar" style="width: 40%;"></div>
</div>
</div>
<!--
<div class="alert alert-info" ng-show="displayOffline">
<button class="close" data-dismiss="alert">&times;</button>
<p>
It seems you are offline, you'd better connect to the network for latest news.
</p>
</div>
-->

<div ng-show="displaySignIn">
<button class="btn btn-large btn-block btn-link signIn" type="button" ng-click="signIn()">
Expand All @@ -61,7 +63,7 @@
</li>
</ul>
</div>
<div class="tab-content">
<div class="tab-content deadline-space">
<div class="tab-pane active" id="todo">
<div
class="alert alert-success"
Expand Down
4 changes: 2 additions & 2 deletions src/browser_action/js/controllers/appCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ app.controller('appCtrl', function AlfredCtrl($scope, alfredStorage, courseServi

var isNew = alfredStorage.isNew();
var isSignedIn = alfredStorage.isSignedIn();
var isOnLine = navigator.onLine;
// var isOnLine = navigator.onLine;

$scope.displayLoading = isSignedIn && isNew && isOnLine;
$scope.displaySignIn = !isSignedIn && isOnLine;
$scope.displayOffline = !isOnLine;
// $scope.displayOffline = !isOnLine;
$scope.displayDeadlines = !isNew && isSignedIn;

var removedDeadlines = $scope.removedDeadlines = alfredStorage.getRemoved();
Expand Down
4 changes: 4 additions & 0 deletions src/browser_action/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ h4 {
margin-bottom: 10px;
}

.deadline-space {
height: 420px;
}


0 comments on commit 6f47892

Please sign in to comment.