Permalink
Browse files

Fix indentation, improve comments around PR #169 and #170.

  • Loading branch information...
1 parent b56b5ac commit 4563f40587b3ecd1c41bf22972799d5019531645 @goncalossilva goncalossilva committed Mar 6, 2012
Showing with 15 additions and 19 deletions.
  1. +8 −6 public/js/presenter.js
  2. +7 −13 public/js/showoff.js
View
14 public/js/presenter.js
@@ -3,10 +3,12 @@ var w = null;
$(function(){
w = window.open('/' + window.location.search);
+
// Give the slide window a handle to the presenter view window.
// This will let either window be made fullscreen and
// still process slide advance/rewinds correctly.
w.presenterView = window;
+
// side menu accordian crap
$("#preso").bind("showoff:loaded", function (event) {
$(".menu > ul ul").hide()
@@ -20,7 +22,8 @@ $(function(){
}
return false
}).next().hide()
- })
+ });
+
$("#minStop").hide()
$("#startTimer").click(function() { toggleTimer() })
$("#stopTimer").click(function() { toggleTimer() })
@@ -35,11 +38,10 @@ function presPrevStep()
function presNextStep()
{
- // TODO: figure out why these two lines are
- // necessary. Something in the presenter view isn't correctly
- // setting these variabls related to incremental slide display.
- incrCurr = w.incrCurr
- incrSteps = w.incrSteps
+ // read the variables set by our spawner
+ incrCurr = w.incrCurr
+ incrSteps = w.incrSteps
+
nextStep()
w.nextStep()
postSlide()
View
20 public/js/showoff.js
@@ -223,24 +223,18 @@ function showSlide(back_step) {
var currentContent = $(currentSlide).find(".content")
currentContent.trigger("showoff:show");
- var ret = getCurrentNotes()
- // If we have a presenterView attribute, that means this window was
- // opened by a presenter view, and we should poke it to make
- // it be on the same slide as us and show the correct notes.
- //
- // TODO: we do this in such a hacky way to avoid ever
- // assigning to the presenterView variable here. If we do
- // that, we can clobber the value sent in by the parent
- // presentation view and break the feature. Is there a better
- // way to do this?
+ var ret = getCurrentNotes();
+
+ // Update presenter view, if we spawned one
if ('presenterView' in window) {
- var pv = window.presenterView;
+ var pv = window.presenterView;
pv.slidenum = slidenum;
- pv.incrCurr = incrCurr
- pv.incrSteps = incrSteps
+ pv.incrCurr = incrCurr
+ pv.incrSteps = incrSteps
pv.showSlide(true);
pv.postSlide();
}
+
return ret;
}

0 comments on commit 4563f40

Please sign in to comment.