make sneaky passive by default. this fixes the bug where a user would like something when the interaction pane is active and the sneaky would show up when the feedback view was re-rendered.

This commit is contained in:
danielgrippi 2012-02-24 22:36:37 -08:00
parent 73f224e690
commit 2ee329d786
4 changed files with 14 additions and 6 deletions

View file

@ -35,7 +35,7 @@ app.pages.PostViewer = app.views.Base.extend({
}, },
prepIdleHooks : function () { prepIdleHooks : function () {
$.idleTimer(2000); $.idleTimer(3000);
$(document).bind("idle.idleTimer", function(){ $(document).bind("idle.idleTimer", function(){
$("body").addClass('idle'); $("body").addClass('idle');

View file

@ -33,7 +33,7 @@
</a> </a>
<!-- this acts as a dock underlay --> <!-- this acts as a dock underlay -->
<div id="post-info-sneaky"> <div id="post-info-sneaky" class="passive">
<a href="#" rel="invoke-interaction-pane"> <a href="#" rel="invoke-interaction-pane">
<div id="post-info-container-sneaky"> <div id="post-info-container-sneaky">
<img src="/images/up-tick-inset.png" class="info-tick"/> <img src="/images/up-tick-inset.png" class="info-tick"/>

View file

@ -16,6 +16,16 @@ app.views.PostViewerFeedback = app.views.Feedback.extend({
tooltipSelector : ".label", tooltipSelector : ".label",
postRenderTemplate : function() {
this.sneakyVisiblity()
},
sneakyVisiblity : function() {
if(!$("#post-info").is(":visible")) {
this.$("#post-info-sneaky").removeClass('passive')
}
},
invokePane : function(evt){ this.trigger("invokePane") }, invokePane : function(evt){ this.trigger("invokePane") },
hidePane : function(evt){ this.trigger("hidePane") } hidePane : function(evt){ this.trigger("hidePane") }

View file

@ -34,13 +34,11 @@ app.views.PostViewerInteractions = app.views.Base.extend({
this.removeTooltips() this.removeTooltips()
}, },
invokePane : function(evt) { invokePane : function() {
if(evt) { evt.preventDefault() }
if(!this.$("#post-info").is(":visible")) { this.togglePane() } if(!this.$("#post-info").is(":visible")) { this.togglePane() }
}, },
hidePane : function(evt) { hidePane : function() {
if(evt) { evt.preventDefault() }
if(this.$("#post-info").is(":visible")) { this.togglePane() } if(this.$("#post-info").is(":visible")) { this.togglePane() }
} }
}) })