Преглед изворни кода

Minor - changing clock div id

Julio Montoya пре 12 година
родитељ
комит
b1a395fb7a

+ 2 - 11
main/exercice/exercise.class.php

@@ -1663,16 +1663,7 @@ class Exercise {
 				var expired_time = current_time + (time_left*1000);
 				var expired_date = get_expired_date_string(expired_time);
                 
-                /*
-	       		$('#text-content').epiclock({
-	         		mode: EC_COUNTDOWN,
-	         		format: 'x{ : } i{ : } s{}',
-	         		target: expired_date,
-	         		onTimer: function(){ onExpiredTimeExercise(); }
-	       		}).clocks(EC_RUN);
-                */
-                
-                $('#text-content').epiclock({
+                $('#exercise_clock_warning').epiclock({
                     mode: $.epiclock.modes.countdown,
                     offset: {seconds: time_left}, 
                     format: 'x:i:s', 
@@ -3640,7 +3631,7 @@ class Exercise {
     }
     
     function return_time_left_div() {       
-        return '<div id="text-content" class="well count_down"></div>';
+        return '<div id="exercise_clock_warning" class="well count_down"></div>';
     }
 }
 endif;

+ 2 - 3
main/inc/lib/javascript/epiclock/renderers/minute/epiclock.minute.js

@@ -25,7 +25,7 @@
         //Sets the value to the clock very important!
         element.text(value);
         
-        var div_clock = $('#text-content');
+        var div_clock = $('#exercise_clock_warning');
         
         // 60000 = 60 seconds
         if (dist <= 180000) {  //3min
@@ -38,8 +38,7 @@
             div_clock.removeClass('time_warning_two');
             if (!(div_clock.hasClass('time_warning_one'))) {                
                 div_clock.addClass('time_warning_one');
-            }
-            
+            }            
         }
     },
     function ()