Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/rev/768f11381153
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 00:13:03 2012
Кодировка:
allpy: 768f11381153

allpy

changeset 49:768f11381153

final. countdown of
author boris <bnagaev@gmail.com>
date Wed, 15 Sep 2010 22:46:09 +0400
parents e9cd32f12f87
children 89595ab730db
files work-time.C
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/work-time.C	Wed Sep 15 22:27:18 2010 +0400
     1.2 +++ b/work-time.C	Wed Sep 15 22:46:09 2010 +0400
     1.3 @@ -1,9 +1,7 @@
     1.4  
     1.5  #include "work-time.h"
     1.6 -#include "salt.h"
     1.7  #include <boost/lexical_cast.hpp>
     1.8  #include <Wt/WApplication>
     1.9 -#include <iostream>
    1.10  
    1.11  
    1.12  Worktime::Worktime(Wt::WContainerWidget *parent) : 
    1.13 @@ -31,10 +29,6 @@
    1.14  
    1.15  void Worktime::render()
    1.16  {
    1.17 -	setText(int2time(spent()));
    1.18 -	
    1.19 -	
    1.20 -	
    1.21  	if (!stoped)
    1.22  	{
    1.23  		doJavaScript("$('#" + id() + "').countdown({"
    1.24 @@ -43,6 +37,12 @@
    1.25  		"compact: true"
    1.26  		"});");
    1.27  	}
    1.28 +	else
    1.29 +	{
    1.30 +		doJavaScript("$('#" + id() + "').countdown('pause');");
    1.31 +	}
    1.32 +	
    1.33 +	setText(int2time(spent()));
    1.34  };
    1.35  
    1.36  posix::time_duration Worktime::spent()