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>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<p>
|
<p class="collapsible">
|
||||||
<%= text %>
|
<%= text %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<p>
|
<p class="collapsible">
|
||||||
<%= root.text %>
|
<%= root.text %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<p>
|
<p class="collapsible">
|
||||||
<%= text %>
|
<%= text %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
<div class="right controls">
|
<div class="right controls">
|
||||||
<% if(author.id != current_user.id) { %>
|
<% if(author.id != current_user.id) { %>
|
||||||
|
<a href="#" rel=nofollow>
|
||||||
<img src="/images/icons/ignoreuser.png" alt="Ignoreuser" class="block_user control_icon" title= "<%= Diaspora.I18n.t('ignore') %>" />
|
<img src="/images/icons/ignoreuser.png" alt="Ignoreuser" class="block_user control_icon" title= "<%= Diaspora.I18n.t('ignore') %>" />
|
||||||
|
</a>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
<a href="#" rel=nofollow>
|
||||||
<img src="/images/deletelabel.png" class="delete control_icon remove_post" title="<%= Diaspora.I18n.t('delete') %>" />
|
<img src="/images/deletelabel.png" class="delete control_icon remove_post" title="<%= Diaspora.I18n.t('delete') %>" />
|
||||||
|
</a>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,5 @@ app.views.Comment = app.views.StreamObject.extend({
|
||||||
$(this.el).attr("id", this.model.get("guid"));
|
$(this.el).attr("id", this.model.get("guid"));
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
|
||||||
|
|
||||||
postRenderTemplate : function(){
|
|
||||||
this.$("time").timeago();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,7 @@ app.views.Post = app.views.StreamObject.extend({
|
||||||
postRenderTemplate : function() {
|
postRenderTemplate : function() {
|
||||||
this.renderPostContent()
|
this.renderPostContent()
|
||||||
.initializeTooltips()
|
.initializeTooltips()
|
||||||
.$(".details time")
|
.$("time").timeago();
|
||||||
.timeago();
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,20 @@ app.views.StreamObject = app.views.Base.extend({
|
||||||
this.model.bind('change', this.render, this);
|
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){
|
destroyModel: function(evt){
|
||||||
if(evt){ evt.preventDefault(); }
|
if(evt){ evt.preventDefault(); }
|
||||||
if(!confirm(Diaspora.I18n.t("confirm_dialog"))) { return }
|
if(!confirm(Diaspora.I18n.t("confirm_dialog"))) { return }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue