forked from Archives/Athou_commafeed
handle read status
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
.css-treeview .selected {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.css-treeview a {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.accordion-heading .unread {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="vendor/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
|
||||
<link href="vendor/angular-ui/angular-ui.min.css" rel="stylesheet">
|
||||
<link href="vendor/csstreeview/css3-treeview.css" rel="stylesheet">
|
||||
<link href="css/app.css" rel="stylesheet">
|
||||
</head>
|
||||
@@ -11,8 +12,11 @@
|
||||
<ng:view></ng:view>
|
||||
</div>
|
||||
|
||||
<script src="vendor/jquery/jquery-1.9.1.min.js"></script>
|
||||
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="vendor/angular/angular.min.js"></script>
|
||||
<script src="vendor/angular-ui/angular-ui.min.js"></script>
|
||||
<script src="vendor/angular-ui-bootstrap/ui-bootstrap-tpls-0.2.0.min.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
<script src="js/controllers.js"></script>
|
||||
<script src="js/directives.js"></script>
|
||||
|
||||
@@ -45,12 +45,25 @@ module.controller('FeedListCtrl', function($scope, $routeParams, $http) {
|
||||
|
||||
$scope.entries = [ {
|
||||
id : '1',
|
||||
title : '',
|
||||
content : '',
|
||||
date : '',
|
||||
feed : '',
|
||||
url : '',
|
||||
title : 'my title',
|
||||
content : 'my content',
|
||||
date : 'my date',
|
||||
feed : 'my feed',
|
||||
url : 'my url',
|
||||
read : false,
|
||||
starred : false,
|
||||
}, {
|
||||
id : '1',
|
||||
title : 'my title',
|
||||
content : 'my content',
|
||||
date : 'my date',
|
||||
feed : 'my feed',
|
||||
url : 'my url',
|
||||
read : false,
|
||||
starred : false,
|
||||
} ];
|
||||
|
||||
$scope.markAsRead = function(entry) {
|
||||
entry.read = true;
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
var app = angular.module('commafeed', [ 'commafeed.directives',
|
||||
'commafeed.controllers' ]);
|
||||
var app = angular.module('commafeed', [ 'ui', 'ui.bootstrap', 'commafeed.directives', 'commafeed.controllers' ]);
|
||||
|
||||
app.config([ '$routeProvider', function($routeProvider) {
|
||||
$routeProvider.when('/feeds/view/:_type/:_id', {
|
||||
|
||||
@@ -9,6 +9,22 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span10" ng-controller="FeedListCtrl"></div>
|
||||
<div class="span10" ng-controller="FeedListCtrl">
|
||||
<div class="accordion" id="feed-accordion">
|
||||
<div class="accordion-group" ng-repeat="entry in entries">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" ng-click="markAsRead(entry)" ng-class="{unread: entry.read == false}"
|
||||
data-parent="#feed-accordion" href="{{'#feed-body' + $index}}">
|
||||
{{entry.title}}
|
||||
</a>
|
||||
</div>
|
||||
<div id="{{'feed-body' + $index}}" class="accordion-body collapse">
|
||||
<div class="accordion-inner">{{entry.content}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
1
src/main/webapp/vendor/angular-ui-bootstrap/ui-bootstrap-tpls-0.2.0.min.js
vendored
Normal file
1
src/main/webapp/vendor/angular-ui-bootstrap/ui-bootstrap-tpls-0.2.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
src/main/webapp/vendor/angular-ui/angular-ui.min.css
vendored
Normal file
1
src/main/webapp/vendor/angular-ui/angular-ui.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.ui-resetwrap{position:relative;display:inline-block}.ui-reset{position:absolute;top:0;right:0;z-index:2;display:none;height:100%;cursor:pointer}.ui-resetwrap:hover .ui-reset{display:block}.ui-currency-pos{color:green}.ui-currency-neg{color:red}.ui-currency-zero{color:blue}.ui-currency-pos.ui-bignum,.ui-currency-neg.ui-smallnum{font-size:110%}.ui-match{background:yellow}
|
||||
7
src/main/webapp/vendor/angular-ui/angular-ui.min.js
vendored
Normal file
7
src/main/webapp/vendor/angular-ui/angular-ui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
src/main/webapp/vendor/jquery/jquery-1.9.1.min.js
vendored
Normal file
5
src/main/webapp/vendor/jquery/jquery-1.9.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user