Hide SPV controls unless authenticated
* cleaned and removed dead code refs diaspora/diaspora#4711
This commit is contained in:
parent
f23fb6b6cb
commit
dec7ef667e
3 changed files with 31 additions and 35 deletions
|
|
@ -4,7 +4,6 @@ app.views.Feedback = app.views.Base.extend({
|
|||
className : "info",
|
||||
|
||||
events: {
|
||||
"click *[rel='auth-required']" : "requireAuth",
|
||||
"click .like" : "toggleLike",
|
||||
"click .reshare" : "resharePost",
|
||||
"click .post_report" : "report"
|
||||
|
|
@ -39,11 +38,5 @@ app.views.Feedback = app.views.Base.extend({
|
|||
if(evt) { evt.preventDefault(); }
|
||||
if(!window.confirm(Diaspora.I18n.t("reshares.post", {name: this.model.reshareAuthor().name}))) { return }
|
||||
this.model.interactions.reshare();
|
||||
},
|
||||
|
||||
requireAuth : function(evt) {
|
||||
if( app.currentUser.authenticated() ) { return }
|
||||
alert("you must be logged in to do that!")
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,14 +7,16 @@
|
|||
|
||||
<div class="bd">
|
||||
<div class="controls">
|
||||
{{#if canRemove}}
|
||||
<a href="#" class="delete comment_delete" title="{{t "delete"}}">
|
||||
<div alt="Deletelabel" class="icons-deletelabel" />
|
||||
<a/>
|
||||
{{else}}
|
||||
<a href="#" data-type="comment" class="comment_report" title="{{t "report.name"}}">
|
||||
<div class="icons-report"/>
|
||||
</a>
|
||||
{{#if loggedIn}}
|
||||
{{#if canRemove}}
|
||||
<a href="#" class="delete comment_delete" title="{{t "delete"}}">
|
||||
<div alt="Deletelabel" class="icons-deletelabel" />
|
||||
<a/>
|
||||
{{else}}
|
||||
<a href="#" data-type="comment" class="comment_report" title="{{t "report.name"}}">
|
||||
<div class="icons-report"/>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,30 +1,31 @@
|
|||
<div class='pull-right'>
|
||||
<a href="#" rel="auth-required" class="like" title="{{#if userLike}} {{t "viewer.unlike"}} {{else}} {{t "viewer.like"}} {{/if}}">
|
||||
{{#if userLike}}
|
||||
<i class="entypo heart red large"></i>
|
||||
{{else}}
|
||||
<i class="entypo heart gray large"></i>
|
||||
{{/if}}
|
||||
{{#if loggedIn}}
|
||||
<a href="#" class="like" title="{{#if userLike}} {{t "viewer.unlike"}} {{else}} {{t "viewer.like"}} {{/if}}">
|
||||
{{#if userLike}}
|
||||
<i class="entypo heart red large"></i>
|
||||
{{else}}
|
||||
<i class="entypo heart gray large"></i>
|
||||
{{/if}}
|
||||
</a>
|
||||
|
||||
<a href="#" rel="auth-required" class="focus-comment" title="{{t "viewer.comment"}}">
|
||||
<a href="#" class="focus-comment" title="{{t "viewer.comment"}}">
|
||||
<i class="entypo comment gray large"></i>
|
||||
</a>
|
||||
|
||||
{{#if userCanReshare}}
|
||||
<a href="#" rel="auth-required" class="reshare" title="{{t "viewer.reshare"}}">
|
||||
<i class="entypo retweet gray large"></i>
|
||||
</a>
|
||||
<a href="#" class="reshare" title="{{t "viewer.reshare"}}">
|
||||
<i class="entypo retweet gray large"></i>
|
||||
</a>
|
||||
{{else}}
|
||||
{{#if userReshare}}
|
||||
<a href="#" rel="auth-required" class="reshare-viewonly" title="{{t "viewer.reshared"}}">
|
||||
<i class="entypo retweet blue large"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if userReshare}}
|
||||
<a href="#" class="reshare-viewonly" title="{{t "viewer.reshared"}}">
|
||||
<i class="entypo retweet blue large"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<a href="#" rel="auth-required" data-type="post" class="post_report" title="{{t "report.name"}}">
|
||||
<a href="#" data-type="post" class="post_report" title="{{t "report.name"}}">
|
||||
<i class="entypo gray large">!</i>
|
||||
</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue