$c->common->addScriptRef(APP_URL . 'files/jquery-effects.js'); switch ($c->getMode()) { /* --------------------------------------------------------------------------------------------------------- */ case 'show': default: // We create the toolbar $t = new Toolbar(); $c->register($t); // If there are chunks to process, we display a button. if (count($chunks) > 0) { $t->addAction('Process ' . count($chunks) . ' tracks', "doConfirm('This action may take a long time and make the browser\\nto timeout. Are you sure you want to do this?','process')", 'go-jump'); } // We retrieve all the tracks we have stored in a pretty table. $mtrx = $db->qSelect("select t.id, t.name, t.pid, from_unixtime(t.offset/1000) as t_start, round(max(e.t)/1000,1) as t_duration " . "from track as t, event as e where t.id=e.track_id and t.processed=1 group by e.track_id;"); $tab = new Table($mtrx); $tab->setProperty('highlight', true); $tab->setProperty('numbering', true); $tab->setProperty('id', 'id'); $tab->setColumnProperty('id', 'visible', false); $tab->setColumnProperty('name', 'label', 'Project'); $tab->setColumnProperty('pid', 'label', 'Ppt. ID'); $tab->setColumnProperty('t_start', 'label', 'Tracking start'); $tab->setColumnProperty('t_duration', 'label', 'Duration [s]'); $tab->addClickableIconColumn('Forget', 'trackid', 'edit-clear', 'forget'); $tab->addClickableIconColumn('Download', 'trackid', 'document-save', 'down'); $tab->addClickableIconColumn('Replay', 'trackid', 'media-playback-start', 'play'); // We register the table. $c->register($tab); break; /* --------------------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------------------- */