Widget:TimerTest2: Difference between revisions

Jump to navigation Jump to search
Matt Pijoan (talk | contribs)
No edit summary
Matt Pijoan (talk | contribs)
No edit summary
Line 27: Line 27:
         this.Timer = $.timer(updateTimer, incrementTime, true);
         this.Timer = $.timer(updateTimer, incrementTime, true);
     };
     };
     this.pause = function(){
     this.extPause = function(){
         if(this.Timer.isActive){
         if(this.Timer.isActive){
         this.pause().once();
         this.pause().once();
         }
         }
}
}
     this.play = function(){
     this.extPlay = function(){
         if(!this.isActive){
         if(!this.isActive){
         this.play().once();
         this.play().once();
Line 47: Line 47:
         currentTime -=incrementTime;
         currentTime -=incrementTime;
         if(currentTime === 100){
         if(currentTime === 100){
             window.Obj1.Timer.pause();
             window.Obj1.extPause();
             alert("Click OK to continue accruing CME Time");
             alert("Click OK to continue accruing CME Time");
             window.Obj2.Timer.pause().once();
             window.Obj2.extPause().once();
             currentTime = 30000;
             currentTime = 30000;
         }
         }
Line 57: Line 57:
         this.Timer = $.timer(updateTimer, incrementTime, true);
         this.Timer = $.timer(updateTimer, incrementTime, true);
     };
     };
     this.play = function(){
     this.extPlay = function(){
         if(!this.isActive){
         if(!this.isActive){
         this.play().once();
         this.play().once();
Line 65: Line 65:
         currentTime = 30000;
         currentTime = 30000;
         if(!this.isActive){
         if(!this.isActive){
         this.play().once();
         this.extPlay().once();
         }
         }
         window.Obj1.play();
         window.Obj1.extPlay();
     }
     }
$(init);
$(init);

Revision as of 18:33, 22 April 2014