timeline update;

This commit is contained in:
tmshv committed 2015-03-08 06:56:36 +03:00
1 parent 38e0a4dadd
commit e7c77e18c6
5 files changed
+21 -13

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
.timeline {
.post {
.timeline-record {
.user{
margin-top: 4px;
+2 -2
View File
@@ -16,7 +16,7 @@
}
}
.post{
.timeline-record{
position: relative;
display: flex;
@@ -124,7 +124,7 @@
padding: 0;
}
.post {
.timeline-record {
position: relative;
display: flex;
+12 -7
View File
@@ -39,20 +39,25 @@ module.exports = function(app) {
}
},
controller: function($scope, api){
$scope.recordClass = function (i) {
return i['type'];
};
api.news.feed()
.success(function (list) {
var feed = list.map(function (post) {
if(post.type == "instagram"){
var author_id = personByInstagram(team.team, post.data.user.username);
var name = author_id ? team.short(author_id) : post.data.user.username;
var author_id = personByInstagram(team.team, post.data.author);
var name = author_id ? team.short(author_id) : post.data.author;
return {
date: post.publishDate,
image: post.data.images.standard_resolution.url,
url: post.data.link,
date: post.date,
image: post.data.image.standard_resolution.url,
url: post.data.url,
username: name,
userpic: post.data.user.profile_picture,
text: postText(post),
//userpic: post.data.user.profile_picture,
text: post.body,
//text: postText(post),
type: post.type
};
}else{
+5 -2
View File
@@ -1,6 +1,9 @@
<div class="head">
<a name="{{post.uri}}"></a>
<p class="date"><a href="#{{post.uri}}">{{post.date | date : "dd.MM.yyyy"}}</a></p>
</div>
<div class="body" ng-bind-html="message"></div>
<div class="body">
<div><p class="date"><a href="#{{post.uri}}">{{post.date | date : "dd.MM.yyyy"}}</a></p></div>
<div class="message" ng-bind-html="message"></div>
</div>
+1 -1
View File
@@ -1,5 +1,5 @@
<div class="timeline">
<timeline-record class="post"
<timeline-record class="timeline-record {{recordClass(post)}}"
content="post"
ng-repeat="post in feed"
ng-class="{left: isEven($index), right: !isEven($index)}">