long text truncation
This commit is contained in:
parent
ff82283b3c
commit
ae5fb67f71
7 changed files with 24 additions and 11 deletions
|
|
@ -18,7 +18,7 @@
|
|||
</a>
|
||||
</span>
|
||||
|
||||
<p>
|
||||
<p class="collapsible">
|
||||
<%= text %>
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<p>
|
||||
<p class="collapsible">
|
||||
<%= root.text %>
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<p>
|
||||
<p class="collapsible">
|
||||
<%= text %>
|
||||
</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
<div class="right controls">
|
||||
<% if(author.id != current_user.id) { %>
|
||||
<img src="/images/icons/ignoreuser.png" alt="Ignoreuser" class="block_user control_icon" title= "<%= Diaspora.I18n.t('ignore') %>" />
|
||||
<a href="#" rel=nofollow>
|
||||
<img src="/images/icons/ignoreuser.png" alt="Ignoreuser" class="block_user control_icon" title= "<%= Diaspora.I18n.t('ignore') %>" />
|
||||
</a>
|
||||
<% } else { %>
|
||||
<img src="/images/deletelabel.png" class="delete control_icon remove_post" title="<%= Diaspora.I18n.t('delete') %>" />
|
||||
<a href="#" rel=nofollow>
|
||||
<img src="/images/deletelabel.png" class="delete control_icon remove_post" title="<%= Diaspora.I18n.t('delete') %>" />
|
||||
</a>
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -14,9 +14,5 @@ app.views.Comment = app.views.StreamObject.extend({
|
|||
$(this.el).attr("id", this.model.get("guid"));
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
postRenderTemplate : function(){
|
||||
this.$("time").timeago();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ app.views.Post = app.views.StreamObject.extend({
|
|||
postRenderTemplate : function() {
|
||||
this.renderPostContent()
|
||||
.initializeTooltips()
|
||||
.$(".details time")
|
||||
.timeago();
|
||||
.$("time").timeago();
|
||||
|
||||
return this;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,6 +5,20 @@ app.views.StreamObject = app.views.Base.extend({
|
|||
this.model.bind('change', this.render, this);
|
||||
},
|
||||
|
||||
postRenderTemplate : function(){
|
||||
// time
|
||||
this.$("time").timeago();
|
||||
|
||||
// collapse long posts
|
||||
this.$(".collapsible").expander({
|
||||
slicePoint: 400,
|
||||
widow: 12,
|
||||
expandText: Diaspora.I18n.t("show_more"),
|
||||
userCollapse: false
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
destroyModel: function(evt){
|
||||
if(evt){ evt.preventDefault(); }
|
||||
if(!confirm(Diaspora.I18n.t("confirm_dialog"))) { return }
|
||||
|
|
|
|||
Loading…
Reference in a new issue