Comments

yce’s picture

StatusFileSize
new5.05 KB

Attaching patch.

yce’s picture

StatusFileSize
new5.05 KB

Fixed comment typo.

yce’s picture

Version: 6.x-1.1 » 7.x-1.0
Issue summary: View changes
StatusFileSize
new5.31 KB

Created a patch for the Drupal 7 version too.

boobaa’s picture

Assigned: boobaa » yce
Status: Needs review » Needs work

Looks good; please remove the console.log() call (and debug cruft alike), and please add some comments describing how does this new approach work.

yce’s picture

I've removed the console.log call, sorry about that.

This approach will still update the clock in every second but instead of incrementing a value per secound, it calculates the elapsed time between the two counter() function calls. This is needed because the JS itself not always run in each second, sometimes it is stopped for more than one second.

The elapsed time itself is stored in the elapsedSeconds variable.

yce’s picture

Fixed the d6 JS patch, it is now no longer looses the edited time.

boobaa’s picture

Please add some more comments where indicated.

yce’s picture

Added comments where you indicated.

  • Boobaa committed 188a94d on 7.x-1.x
    Issue #2016889 by yce: Calculate elapsed time more accurately
    
boobaa’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Assigned: yce » Unassigned
Status: Needs work » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.