Merge branch 'seeddms-4.3.x' into seeddms-5.0.x

This commit is contained in:
Uwe Steinmann 2015-09-21 16:58:14 +02:00
commit 229d976113
35 changed files with 1245 additions and 39 deletions

View File

@ -2111,7 +2111,7 @@ class SeedDMS_Core_DMS {
* documents or used space per user, recent activity, etc. * documents or used space per user, recent activity, etc.
* *
* @param string $type type of statistic * @param string $type type of statistic
* @param array statistical data * @return array statistical data
*/ */
function getStatisticalData($type='') { /* {{{ */ function getStatisticalData($type='') { /* {{{ */
switch($type) { switch($type) {
@ -2179,6 +2179,38 @@ class SeedDMS_Core_DMS {
} }
} /* }}} */ } /* }}} */
/**
* Returns changes with a period of time
*
* This method returns a list of all changes happened in the database
* within a given period of time. It currently just checks for
* entries in the database tables tblDocumentContent, tblDocumentFiles,
* and tblDocumentStatusLog
*
* @param string $start start date
* @param string $end end date
* @return array list of changes
*/
function getTimeline($startts='', $endts='') { /* {{{ */
if(!$startts)
$startts = mktime(0, 0, 0);
if(!$endts)
$startts = mktime(24, 0, 0);
$timeline = array();
$queryStr = "SELECT document FROM tblDocumentContent WHERE date > ".$startts." AND date < ".$endts;
$resArr = $this->db->getResultArray($queryStr);
if (!$resArr)
return false;
$resArr = $this->db->getResultArray($queryStr);
foreach($resArr as $rec) {
$document = $this->getDocument($rec['document']);
$timeline = array_merge($timeline, $document->getTimeline());
}
return $timeline;
} /* }}} */
/** /**
* Set a callback function * Set a callback function
* *

View File

@ -2134,7 +2134,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
foreach ($resArr as $row) { foreach ($resArr as $row) {
$date = date('Y-m-d H:i:s', $row['date']); $date = date('Y-m-d H:i:s', $row['date']);
$timeline[] = array('date'=>$date, 'msg'=>'Added version '.$row['version'], 'type'=>'add_version', 'params'=>array($row['version'])); $timeline[] = array('date'=>$date, 'msg'=>'Added version '.$row['version'], 'type'=>'add_version', 'version'=>$row['version'], 'document'=>$this, 'params'=>array($row['version']));
} }
$queryStr = "SELECT * FROM tblDocumentFiles WHERE document = " . $this->_id; $queryStr = "SELECT * FROM tblDocumentFiles WHERE document = " . $this->_id;
@ -2144,7 +2144,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
foreach ($resArr as $row) { foreach ($resArr as $row) {
$date = date('Y-m-d H:i:s', $row['date']); $date = date('Y-m-d H:i:s', $row['date']);
$timeline[] = array('date'=>$date, 'msg'=>'Added attachment "'.$row['name'].'"', 'type'=>'add_file'); $timeline[] = array('date'=>$date, 'msg'=>'Added attachment "'.$row['name'].'"', 'document'=>$this, 'type'=>'add_file');
} }
$queryStr= $queryStr=
@ -2161,7 +2161,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
foreach ($resArr as $row) { foreach ($resArr as $row) {
$date = $row['date']; $date = $row['date'];
$timeline[] = array('date'=>$date, 'msg'=>'Version '.$row['version'].': Status change to '.$row['status'], 'type'=>'status_change', 'params'=>array($row['version'], $row['status'])); $timeline[] = array('date'=>$date, 'msg'=>'Version '.$row['version'].': Status change to '.$row['status'], 'type'=>'status_change', 'version'=>$row['version'], 'document'=>$this, 'status'=>$row['status'], 'params'=>array($row['version'], $row['status']));
} }
return $timeline; return $timeline;
} /* }}} */ } /* }}} */

View File

@ -1221,6 +1221,12 @@ URL: [url]',
'theme' => 'شكل', 'theme' => 'شكل',
'thursday' => 'الخميس', 'thursday' => 'الخميس',
'thursday_abbr' => 'خ', 'thursday_abbr' => 'خ',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'الى', 'to' => 'الى',
'toggle_manager' => 'رجح مدير', 'toggle_manager' => 'رجح مدير',
'to_before_from' => '', 'to_before_from' => '',

View File

@ -1086,6 +1086,12 @@ $text = array(
'theme' => 'Тема', 'theme' => 'Тема',
'thursday' => 'четвъртък', 'thursday' => 'четвъртък',
'thursday_abbr' => '', 'thursday_abbr' => '',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'към', 'to' => 'към',
'toggle_manager' => 'Превключи мениджър', 'toggle_manager' => 'Превключи мениджър',
'to_before_from' => '', 'to_before_from' => '',

View File

@ -1091,6 +1091,12 @@ URL: [url]',
'theme' => 'Tema gràfic', 'theme' => 'Tema gràfic',
'thursday' => 'Dijous', 'thursday' => 'Dijous',
'thursday_abbr' => '', 'thursday_abbr' => '',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'Fins', 'to' => 'Fins',
'toggle_manager' => 'Intercanviar manager', 'toggle_manager' => 'Intercanviar manager',
'to_before_from' => '', 'to_before_from' => '',

View File

@ -1230,6 +1230,12 @@ URL: [url]',
'theme' => 'Vzhled', 'theme' => 'Vzhled',
'thursday' => 'Čtvrtek', 'thursday' => 'Čtvrtek',
'thursday_abbr' => 'Čt', 'thursday_abbr' => 'Čt',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'Do', 'to' => 'Do',
'toggle_manager' => 'Přepnout správce', 'toggle_manager' => 'Přepnout správce',
'to_before_from' => 'Datum ukončení nesmí být před datem zahájení', 'to_before_from' => 'Datum ukončení nesmí být před datem zahájení',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// Translators: Admin (2112), dgrutsch (18) // Translators: Admin (2119), dgrutsch (18)
$text = array( $text = array(
'accept' => 'Übernehmen', 'accept' => 'Übernehmen',
@ -1252,6 +1252,9 @@ URL: [url]',
'thursday_abbr' => 'Do', 'thursday_abbr' => 'Do',
'timeline' => 'Verlauf', 'timeline' => 'Verlauf',
'timeline_add_version' => 'Neue Version [version]', 'timeline_add_version' => 'Neue Version [version]',
'timeline_full_add_file' => '[document]<br />Neuer Anhang',
'timeline_full_add_version' => '[document]<br />Neue Version [version]',
'timeline_full_status_change' => '[document]<br />Version [version]: [status]',
'timeline_status_change' => 'Version [version]: [status]', 'timeline_status_change' => 'Version [version]: [status]',
'to' => 'bis', 'to' => 'bis',
'toggle_manager' => 'Managerstatus wechseln', 'toggle_manager' => 'Managerstatus wechseln',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// Translators: Admin (1244), dgrutsch (3), netixw (14) // Translators: Admin (1251), dgrutsch (3), netixw (14)
$text = array( $text = array(
'accept' => 'Accept', 'accept' => 'Accept',
@ -1257,6 +1257,12 @@ URL: [url]',
'theme' => 'Theme', 'theme' => 'Theme',
'thursday' => 'Thursday', 'thursday' => 'Thursday',
'thursday_abbr' => 'Th', 'thursday_abbr' => 'Th',
'timeline' => 'Timeline',
'timeline_add_version' => 'New version [version]',
'timeline_full_add_file' => '[document]<br />New Attachment',
'timeline_full_add_version' => '[document]<br />New version [version]',
'timeline_full_status_change' => '[document]<br />Version [version]: [status]',
'timeline_status_change' => 'Version [version]: [status]',
'to' => 'To', 'to' => 'To',
'toggle_manager' => 'Toggle manager', 'toggle_manager' => 'Toggle manager',
'to_before_from' => 'End date may not be before start date', 'to_before_from' => 'End date may not be before start date',

View File

@ -1236,6 +1236,12 @@ URL: [url]',
'theme' => 'Tema gráfico', 'theme' => 'Tema gráfico',
'thursday' => 'Jueves', 'thursday' => 'Jueves',
'thursday_abbr' => 'J', 'thursday_abbr' => 'J',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'Hasta', 'to' => 'Hasta',
'toggle_manager' => 'Intercambiar mánager', 'toggle_manager' => 'Intercambiar mánager',
'to_before_from' => 'La fecha de finalización no debe ser anterior a la de inicio', 'to_before_from' => 'La fecha de finalización no debe ser anterior a la de inicio',

View File

@ -1212,6 +1212,12 @@ URL: [url]',
'theme' => 'Thème', 'theme' => 'Thème',
'thursday' => 'Jeudi', 'thursday' => 'Jeudi',
'thursday_abbr' => 'Jeu.', 'thursday_abbr' => 'Jeu.',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'Au', 'to' => 'Au',
'toggle_manager' => 'Basculer \'Responsable\'', 'toggle_manager' => 'Basculer \'Responsable\'',
'to_before_from' => '', 'to_before_from' => '',

View File

@ -1242,6 +1242,12 @@ Internet poveznica: [url]',
'theme' => 'Tema', 'theme' => 'Tema',
'thursday' => 'Četvrtak', 'thursday' => 'Četvrtak',
'thursday_abbr' => 'Če', 'thursday_abbr' => 'Če',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'Do', 'to' => 'Do',
'toggle_manager' => 'Zamjeni upravitelja', 'toggle_manager' => 'Zamjeni upravitelja',
'to_before_from' => 'Datum završetka ne može biti prije datuma početka', 'to_before_from' => 'Datum završetka ne može biti prije datuma početka',

View File

@ -1235,6 +1235,12 @@ URL: [url]',
'theme' => 'Téma', 'theme' => 'Téma',
'thursday' => 'Csütörtök', 'thursday' => 'Csütörtök',
'thursday_abbr' => 'Cs', 'thursday_abbr' => 'Cs',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'ig', 'to' => 'ig',
'toggle_manager' => 'Kulcs kezelő', 'toggle_manager' => 'Kulcs kezelő',
'to_before_from' => 'A lejárati dátum nem előzheti meg a kezdési dátumot', 'to_before_from' => 'A lejárati dátum nem előzheti meg a kezdési dátumot',

View File

@ -1259,6 +1259,12 @@ URL: [url]',
'theme' => 'Tema', 'theme' => 'Tema',
'thursday' => 'Giovedì', 'thursday' => 'Giovedì',
'thursday_abbr' => 'Gio', 'thursday_abbr' => 'Gio',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'A', 'to' => 'A',
'toggle_manager' => 'Gestore', 'toggle_manager' => 'Gestore',
'to_before_from' => 'La data di fine non può essere antecedente a quella di inizio', 'to_before_from' => 'La data di fine non può essere antecedente a quella di inizio',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// Translators: Admin (935), daivoc (359) // Translators: Admin (935), daivoc (364)
$text = array( $text = array(
'accept' => '동의', 'accept' => '동의',
@ -187,7 +187,7 @@ URL: [url]',
'cannot_retrieve_review_snapshot' => '이 문서의 버전에 대한 검토 상태의 스냅 샷을 확인 할 수 없습니다.', 'cannot_retrieve_review_snapshot' => '이 문서의 버전에 대한 검토 상태의 스냅 샷을 확인 할 수 없습니다.',
'cannot_rm_root' => '오류 : 루트 폴더를 삭제할 수 없습니다.', 'cannot_rm_root' => '오류 : 루트 폴더를 삭제할 수 없습니다.',
'categories' => '카테고리', 'categories' => '카테고리',
'categories_loading' => '', 'categories_loading' => '카테고리 목록을 가지고 오는 중 ...',
'category' => '카테고리', 'category' => '카테고리',
'category_exists' => '카테고리가 이미 존재합니다.', 'category_exists' => '카테고리가 이미 존재합니다.',
'category_filter' => '카테고리', 'category_filter' => '카테고리',
@ -411,7 +411,7 @@ URL: [url]',
'files' => '파일', 'files' => '파일',
'files_deletion' => '파일 삭제', 'files_deletion' => '파일 삭제',
'files_deletion_warning' => '이 옵션을 사용하면 전체 DMS 폴더의 모든 파일을 삭제할 수 있습니다. 버전 정보가 표시로 남을 것 입니다 files파일', 'files_deletion_warning' => '이 옵션을 사용하면 전체 DMS 폴더의 모든 파일을 삭제할 수 있습니다. 버전 정보가 표시로 남을 것 입니다 files파일',
'files_loading' => '', 'files_loading' => '파일 목록을 가지고 오는 중 ...',
'file_size' => '파일 크기', 'file_size' => '파일 크기',
'filter_for_documents' => '문서에 대한 추가 필터', 'filter_for_documents' => '문서에 대한 추가 필터',
'filter_for_folders' => '폴더에 대한 추가 필터', 'filter_for_folders' => '폴더에 대한 추가 필터',
@ -542,7 +542,7 @@ URL: [url]',
'keep' => '변경하지 마시오', 'keep' => '변경하지 마시오',
'keep_doc_status' => '문서 상태 유지', 'keep_doc_status' => '문서 상태 유지',
'keywords' => '키워드', 'keywords' => '키워드',
'keywords_loading' => '', 'keywords_loading' => '키워드 목록을 가지고 오는 중 ...',
'keyword_exists' => '키워드가 이미 존재', 'keyword_exists' => '키워드가 이미 존재',
'ko_KR' => '한국어', 'ko_KR' => '한국어',
'language' => '언어', 'language' => '언어',
@ -677,7 +677,7 @@ URL : [url]',
'no_update_cause_locked' => '이 문서를 업데이트 할 수 없습니다. 문서를 잠근 사용자 문의하시기 바랍니다..', 'no_update_cause_locked' => '이 문서를 업데이트 할 수 없습니다. 문서를 잠근 사용자 문의하시기 바랍니다..',
'no_user_image' => '이미지를 찾을 수 없습니다', 'no_user_image' => '이미지를 찾을 수 없습니다',
'no_version_check' => 'SeedDMS의 새 버전 확인을 실패 했습니다! 이것은 PHP 설정에서 allow_url_fopen 값이 0으로 설정 되면 발생할 수 있습니다.', 'no_version_check' => 'SeedDMS의 새 버전 확인을 실패 했습니다! 이것은 PHP 설정에서 allow_url_fopen 값이 0으로 설정 되면 발생할 수 있습니다.',
'no_version_modification' => '', 'no_version_modification' => '버전의 변동사항이 없습니다.',
'no_workflow_available' => '', 'no_workflow_available' => '',
'objectcheck' => '폴더 / 문서 확인', 'objectcheck' => '폴더 / 문서 확인',
'obsolete' => '폐기', 'obsolete' => '폐기',
@ -1250,6 +1250,12 @@ URL : [url]',
'theme' => '테마', 'theme' => '테마',
'thursday' => '목요일', 'thursday' => '목요일',
'thursday_abbr' => '목', 'thursday_abbr' => '목',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => '마감일', 'to' => '마감일',
'toggle_manager' => '전환 매니저', 'toggle_manager' => '전환 매니저',
'to_before_from' => '종료일은 시작일 전이 될수 없습니다', 'to_before_from' => '종료일은 시작일 전이 될수 없습니다',
@ -1271,7 +1277,7 @@ URL : [url]',
'transmittal_comment' => '코맨트', 'transmittal_comment' => '코맨트',
'transmittal_name' => '아름', 'transmittal_name' => '아름',
'transmittal_size' => '크기', 'transmittal_size' => '크기',
'tree_loading' => '', 'tree_loading' => '문서 구성을 가지고 오는 중 ...',
'trigger_workflow' => '워크플로우', 'trigger_workflow' => '워크플로우',
'tr_TR' => '터키어', 'tr_TR' => '터키어',
'tuesday' => '화요일', 'tuesday' => '화요일',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// Translators: Admin (705), pepijn (45), reinoutdijkstra@hotmail.com (270) // Translators: Admin (706), pepijn (45), reinoutdijkstra@hotmail.com (270)
$text = array( $text = array(
'accept' => 'Accept', 'accept' => 'Accept',
@ -1227,6 +1227,12 @@ URL: [url]',
'theme' => 'Thema', 'theme' => 'Thema',
'thursday' => 'Donderdag', 'thursday' => 'Donderdag',
'thursday_abbr' => 'Th', 'thursday_abbr' => 'Th',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'Aan', 'to' => 'Aan',
'toggle_manager' => 'Wijzig Beheerder', 'toggle_manager' => 'Wijzig Beheerder',
'to_before_from' => 'De einddatum mag niet voor de startdatum liggen', 'to_before_from' => 'De einddatum mag niet voor de startdatum liggen',
@ -1248,7 +1254,7 @@ URL: [url]',
'transmittal_comment' => '', 'transmittal_comment' => '',
'transmittal_name' => '', 'transmittal_name' => '',
'transmittal_size' => '', 'transmittal_size' => '',
'tree_loading' => '', 'tree_loading' => 'Directory boom wordt geladen ...',
'trigger_workflow' => 'Workflow', 'trigger_workflow' => 'Workflow',
'tr_TR' => 'Turks', 'tr_TR' => 'Turks',
'tuesday' => 'Dinsdag', 'tuesday' => 'Dinsdag',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// Translators: Admin (714), netixw (84), romi (93), uGn (112) // Translators: Admin (715), netixw (84), romi (93), uGn (112)
$text = array( $text = array(
'accept' => 'Akceptuj', 'accept' => 'Akceptuj',
@ -350,7 +350,7 @@ URL: [url]',
'dump_creation_warning' => 'Ta operacja utworzy plik będący zrzutem zawartości bazy danych. Po utworzeniu plik zrzutu będzie się znajdował w folderze danych na serwerze.', 'dump_creation_warning' => 'Ta operacja utworzy plik będący zrzutem zawartości bazy danych. Po utworzeniu plik zrzutu będzie się znajdował w folderze danych na serwerze.',
'dump_list' => 'Istniejące pliki zrzutu', 'dump_list' => 'Istniejące pliki zrzutu',
'dump_remove' => 'Usuń plik zrzutu', 'dump_remove' => 'Usuń plik zrzutu',
'duplicate_content' => '', 'duplicate_content' => 'Zduplikowana zawartość',
'edit' => 'Edytuj', 'edit' => 'Edytuj',
'edit_attributes' => 'Zmiana atrybutów', 'edit_attributes' => 'Zmiana atrybutów',
'edit_comment' => 'Edytuj komentarz', 'edit_comment' => 'Edytuj komentarz',
@ -1215,6 +1215,12 @@ URL: [url]',
'theme' => 'Wygląd', 'theme' => 'Wygląd',
'thursday' => 'Czwartek', 'thursday' => 'Czwartek',
'thursday_abbr' => 'Cz', 'thursday_abbr' => 'Cz',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'Do', 'to' => 'Do',
'toggle_manager' => 'Przełączanie zarządcy', 'toggle_manager' => 'Przełączanie zarządcy',
'to_before_from' => '', 'to_before_from' => '',

View File

@ -1233,6 +1233,12 @@ URL: [url]',
'theme' => 'Tema', 'theme' => 'Tema',
'thursday' => 'Thursday', 'thursday' => 'Thursday',
'thursday_abbr' => 'Th', 'thursday_abbr' => 'Th',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'To', 'to' => 'To',
'toggle_manager' => 'Toggle manager', 'toggle_manager' => 'Toggle manager',
'to_before_from' => 'A data de término não pode ser anterior a data de início', 'to_before_from' => 'A data de término não pode ser anterior a data de início',

View File

@ -1258,6 +1258,12 @@ URL: [url]',
'theme' => 'Temă', 'theme' => 'Temă',
'thursday' => 'Joi', 'thursday' => 'Joi',
'thursday_abbr' => 'Jo', 'thursday_abbr' => 'Jo',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'La', 'to' => 'La',
'toggle_manager' => 'Comută Manager', 'toggle_manager' => 'Comută Manager',
'to_before_from' => 'Data de încheiere nu poate fi înainte de data de începere', 'to_before_from' => 'Data de încheiere nu poate fi înainte de data de începere',

View File

@ -1226,6 +1226,12 @@ URL: [url]',
'theme' => 'Тема', 'theme' => 'Тема',
'thursday' => 'Четверг', 'thursday' => 'Четверг',
'thursday_abbr' => 'Чт', 'thursday_abbr' => 'Чт',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'До', 'to' => 'До',
'toggle_manager' => 'Изменить как менеджера', 'toggle_manager' => 'Изменить как менеджера',
'to_before_from' => '', 'to_before_from' => '',

View File

@ -1086,6 +1086,12 @@ $text = array(
'theme' => 'Vzhľad', 'theme' => 'Vzhľad',
'thursday' => 'Štvrtok', 'thursday' => 'Štvrtok',
'thursday_abbr' => '', 'thursday_abbr' => '',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'Do', 'to' => 'Do',
'toggle_manager' => 'Prepnúť stav manager', 'toggle_manager' => 'Prepnúť stav manager',
'to_before_from' => '', 'to_before_from' => '',

View File

@ -1221,6 +1221,12 @@ URL: [url]',
'theme' => 'Visningstema', 'theme' => 'Visningstema',
'thursday' => 'torsdag', 'thursday' => 'torsdag',
'thursday_abbr' => 'to', 'thursday_abbr' => 'to',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'till', 'to' => 'till',
'toggle_manager' => 'Byt manager', 'toggle_manager' => 'Byt manager',
'to_before_from' => 'Slutdatum får inte vara innan startdatum', 'to_before_from' => 'Slutdatum får inte vara innan startdatum',

View File

@ -1237,6 +1237,12 @@ URL: [url]',
'theme' => 'Tema', 'theme' => 'Tema',
'thursday' => 'Perşembe', 'thursday' => 'Perşembe',
'thursday_abbr' => 'Pe', 'thursday_abbr' => 'Pe',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'Kime', 'to' => 'Kime',
'toggle_manager' => 'Değişim yönetimi', 'toggle_manager' => 'Değişim yönetimi',
'to_before_from' => 'Bitiş tarihi başlama tarihinden önce olamaz', 'to_before_from' => 'Bitiş tarihi başlama tarihinden önce olamaz',

View File

@ -1248,6 +1248,12 @@ URL: [url]',
'theme' => 'Тема', 'theme' => 'Тема',
'thursday' => 'Четвер', 'thursday' => 'Четвер',
'thursday_abbr' => 'Чт', 'thursday_abbr' => 'Чт',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => 'До', 'to' => 'До',
'toggle_manager' => 'Змінити ознаку менеджера', 'toggle_manager' => 'Змінити ознаку менеджера',
'to_before_from' => 'Кінцева дата не може бути меншою початкової дати', 'to_before_from' => 'Кінцева дата не може бути меншою початкової дати',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// //
// Translators: Admin (589), fengjohn (5) // Translators: Admin (590), fengjohn (5)
$text = array( $text = array(
'accept' => '接受', 'accept' => '接受',
@ -1092,6 +1092,12 @@ URL: [url]',
'theme' => '主题', 'theme' => '主题',
'thursday' => 'Thursday', 'thursday' => 'Thursday',
'thursday_abbr' => '', 'thursday_abbr' => '',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => '到', 'to' => '到',
'toggle_manager' => '角色切换', 'toggle_manager' => '角色切换',
'to_before_from' => '', 'to_before_from' => '',
@ -1104,7 +1110,7 @@ URL: [url]',
'transmittal_comment' => '', 'transmittal_comment' => '',
'transmittal_name' => '', 'transmittal_name' => '',
'transmittal_size' => '', 'transmittal_size' => '',
'tree_loading' => '', 'tree_loading' => '文档结构尚未加载完成,请等待...',
'trigger_workflow' => '', 'trigger_workflow' => '',
'tr_TR' => '土耳其', 'tr_TR' => '土耳其',
'tuesday' => 'Tuesday', 'tuesday' => 'Tuesday',

View File

@ -1090,6 +1090,12 @@ URL: [url]',
'theme' => '主題', 'theme' => '主題',
'thursday' => 'Thursday', 'thursday' => 'Thursday',
'thursday_abbr' => '', 'thursday_abbr' => '',
'timeline' => '',
'timeline_add_version' => '',
'timeline_full_add_file' => '',
'timeline_full_add_version' => '',
'timeline_full_status_change' => '',
'timeline_status_change' => '',
'to' => '到', 'to' => '到',
'toggle_manager' => '角色切換', 'toggle_manager' => '角色切換',
'to_before_from' => '', 'to_before_from' => '',

51
out/out.Timeline.php Normal file
View File

@ -0,0 +1,51 @@
<?php
// MyDMS. Document Management System
// Copyright (C) 2010 Matteo Lucarelli
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include("../inc/inc.Settings.php");
include("../inc/inc.DBInit.php");
include("../inc/inc.Utils.php");
include("../inc/inc.Language.php");
include("../inc/inc.ClassUI.php");
include("../inc/inc.Authentication.php");
if (!$user->isAdmin()) {
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
}
$rootfolder = $dms->getFolder($settings->_rootFolderID);
if(!empty($_GET['fromdate'])) {
$from = makeTsFromLongDate($_GET['fromdate'].' 00:00:00');
} else {
$from = time()-7*86400;
}
if(!empty($_GET['todate'])) {
$to = makeTsFromLongDate($_GET['todate'].' 23:59:59');
} else {
$to = time();
}
$data = $dms->getTimeline($from, $to);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'rootfolder'=>$rootfolder, 'from'=>$from, 'to'=>$to, 'data'=>$data));
if($view) {
$view->show();
exit;
}
?>

View File

@ -132,10 +132,10 @@ div.help h3 {
#timeline { #timeline {
font-size: 12px; font-size: 12px;
line-height: 18px; line-height: 14px;
} }
div.timeline-event-content { div.timeline-event-content {
margin: 2px; margin: 3px 5px;
} }
div.timeline-frame { div.timeline-frame {
border-radius: 4px; border-radius: 4px;

View File

@ -0,0 +1,284 @@
if (typeof links === 'undefined') {
links = {};
links.locales = {};
} else if (typeof links.locales === 'undefined') {
links.locales = {};
}
// English ===================================================
links.locales['en'] = {
'MONTHS': ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
'MONTHS_SHORT': ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
'DAYS': ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
'DAYS_SHORT': ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
'ZOOM_IN': "Zoom in",
'ZOOM_OUT': "Zoom out",
'MOVE_LEFT': "Move left",
'MOVE_RIGHT': "Move right",
'NEW': "New",
'CREATE_NEW_EVENT': "Create new event"
};
links.locales['en_US'] = links.locales['en'];
links.locales['en_UK'] = links.locales['en'];
// French ===================================================
links.locales['fr'] = {
'MONTHS': ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"],
'MONTHS_SHORT': ["Jan", "Fev", "Mar", "Avr", "Mai", "Jun", "Jul", "Aou", "Sep", "Oct", "Nov", "Dec"],
'DAYS': ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"],
'DAYS_SHORT': ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"],
'ZOOM_IN': "Zoomer",
'ZOOM_OUT': "Dézoomer",
'MOVE_LEFT': "Déplacer à gauche",
'MOVE_RIGHT': "Déplacer à droite",
'NEW': "Nouveau",
'CREATE_NEW_EVENT': "Créer un nouvel évènement"
};
links.locales['fr_FR'] = links.locales['fr'];
links.locales['fr_BE'] = links.locales['fr'];
links.locales['fr_CA'] = links.locales['fr'];
// Catalan ===================================================
links.locales['ca'] = {
'MONTHS': ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Setembre", "Octubre", "Novembre", "Desembre"],
'MONTHS_SHORT': ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"],
'DAYS': ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"],
'DAYS_SHORT': ["Dm.", "Dl.", "Dm.", "Dc.", "Dj.", "Dv.", "Ds."],
'ZOOM_IN': "Augmentar zoom",
'ZOOM_OUT': "Disminuir zoom",
'MOVE_LEFT': "Moure esquerra",
'MOVE_RIGHT': "Moure dreta",
'NEW': "Nou",
'CREATE_NEW_EVENT': "Crear nou event"
};
links.locales['ca_ES'] = links.locales['ca'];
// German ===================================================
links.locales['de'] = {
'MONTHS': ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
'MONTHS_SHORT': ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
'DAYS': ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
'DAYS_SHORT': ["Son", "Mon", "Die", "Mit", "Don", "Fre", "Sam"],
'ZOOM_IN': "Vergrößern",
'ZOOM_OUT': "Verkleinern",
'MOVE_LEFT': "Nach links verschieben",
'MOVE_RIGHT': "Nach rechts verschieben",
'NEW': "Neu",
'CREATE_NEW_EVENT': "Neues Ereignis erzeugen"
};
links.locales['de_DE'] = links.locales['de'];
links.locales['de_CH'] = links.locales['de'];
// Danish ===================================================
links.locales['da'] = {
'MONTHS': ["januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"],
'MONTHS_SHORT': ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"],
'DAYS': ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"],
'DAYS_SHORT': ["søn", "man", "tir", "ons", "tor", "fre", "lør"],
'ZOOM_IN': "Zoom in",
'ZOOM_OUT': "Zoom out",
'MOVE_LEFT': "Move left",
'MOVE_RIGHT': "Move right",
'NEW': "New",
'CREATE_NEW_EVENT': "Create new event"
};
links.locales['da_DK'] = links.locales['da'];
// Russian ===================================================
links.locales['ru'] = {
'MONTHS': ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"],
'MONTHS_SHORT': ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"],
'DAYS': ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"],
'DAYS_SHORT': ["Вос", "Пон", "Втo", "Срe", "Чет", "Пят", "Суб"],
'ZOOM_IN': "Увeличить",
'ZOOM_OUT': "Умeньшить",
'MOVE_LEFT': "Сдвинуть налeво",
'MOVE_RIGHT': "Сдвинуть направо",
'NEW': "Новый",
'CREATE_NEW_EVENT': "Создать новоe событиe"
};
links.locales['ru_RU'] = links.locales['ru'];
// Spanish ===================================================
links.locales['es'] = {
'MONTHS': ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
'MONTHS_SHORT': ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"],
'DAYS': ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
'DAYS_SHORT': ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"],
'ZOOM_IN': "Aumentar zoom",
'ZOOM_OUT': "Disminuir zoom",
'MOVE_LEFT': "Mover izquierda",
'MOVE_RIGHT': "Mover derecha",
'NEW': "Nuevo",
'CREATE_NEW_EVENT': "Crear nuevo evento"
};
links.locales['es_ES'] = links.locales['es'];
// Dutch =====================================================
links.locales['nl'] = {
'MONTHS': ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"],
'MONTHS_SHORT': ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"],
'DAYS': ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"],
'DAYS_SHORT': ["zo", "ma", "di", "wo", "do", "vr", "za"],
'ZOOM_IN': "Inzoomen",
'ZOOM_OUT': "Uitzoomen",
'MOVE_LEFT': "Naar links",
'MOVE_RIGHT': "Naar rechts",
'NEW': "Nieuw",
'CREATE_NEW_EVENT': "Nieuwe gebeurtenis maken"
};
links.locales['nl_NL'] = links.locales['nl'];
links.locales['nl_BE'] = links.locales['nl'];
// Turkish ===================================================
links.locales['tr'] = {
'MONTHS': ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"],
'MONTHS_SHORT': ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"],
'DAYS': ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"],
'DAYS_SHORT': ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"],
'ZOOM_IN': "Büyült",
'ZOOM_OUT': "Küçült",
'MOVE_LEFT': "Sola Taşı",
'MOVE_RIGHT': "Sağa Taşı",
'NEW': "Yeni",
'CREATE_NEW_EVENT': "Yeni etkinlik oluştur"
};
links.locales['tr_TR'] = links.locales['tr'];
// Hungarian ===================================================
links.locales['hu'] = {
'MONTHS': ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"],
'MONTHS_SHORT': ["jan", "feb", "márc", "ápr", "máj", "jún", "júl", "aug", "szep", "okt", "nov", "dec"],
'DAYS': ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"],
'DAYS_SHORT': ["vas", "hét", "kedd", "sze", "csü", "pé", "szo"],
'ZOOM_IN': "Nagyítás",
'ZOOM_OUT': "Kicsinyítés",
'MOVE_LEFT': "Balra",
'MOVE_RIGHT': "Jobbra",
'NEW': "Új",
'CREATE_NEW_EVENT': "Új esemény készítése"
};
links.locales['hu_HU'] = links.locales['hu'];
// Brazilian Portuguese ===================================================
links.locales['pt'] = {
'MONTHS': ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
'MONTHS_SHORT': ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"],
'DAYS': ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"],
'DAYS_SHORT': ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
'ZOOM_IN': "Aproximar",
'ZOOM_OUT': "Afastar",
'MOVE_LEFT': "Mover para esquerda",
'MOVE_RIGHT': "Mover para direita",
'NEW': "Novo",
'CREATE_NEW_EVENT': "Criar novo evento"
};
links.locales['pt_BR'] = links.locales['pt'];
// Portuguese ===================================================
links.locales['pt'] = {
'MONTHS': ["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro", "Outubro", "Novembro", "Dezembro"],
'MONTHS_SHORT': ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"],
'DAYS': ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"],
'DAYS_SHORT': ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
'ZOOM_IN': "Mais Zoom",
'ZOOM_OUT': "Menos Zoom",
'MOVE_LEFT': "Esquerda",
'MOVE_RIGHT': "Direita",
'NEW': "Novo",
'CREATE_NEW_EVENT': "Criar novo evento"
};
links.locales['pt_PT'] = links.locales['pt'];
// Chinese ===================================================
links.locales['zh'] = {
'MONTHS': ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
'MONTHS_SHORT': ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
'DAYS': ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
'DAYS_SHORT': ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
'ZOOM_IN': "放大",
'ZOOM_OUT': "缩小",
'MOVE_LEFT': "左移",
'MOVE_RIGHT': "右移",
'NEW': "新建",
'CREATE_NEW_EVENT': "创建新的事件"
};
links.locales['zh_CN'] = links.locales['zh'];
links.locales['zh_TR'] = links.locales['zh'];
// Arabic ===================================================
links.locales['ar'] = {
'MONTHS': ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"],
'MONTHS_SHORT': ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"],
'DAYS': ["الأحد", "الأثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"],
'DAYS_SHORT': ["الأحد", "الأثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"],
'ZOOM_IN': "تكبير",
'ZOOM_OUT': "تصغير",
'MOVE_LEFT': "تحريك لليسار",
'MOVE_RIGHT': "تحريك لليمين",
'NEW': "جديد",
'CREATE_NEW_EVENT': "إنشاء حدث جديد"
};
links.locales['ar_AR'] = links.locales['ar'];
// Japanese ===================================================
links.locales['ja'] = {
'MONTHS': ["一月", "二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
'MONTHS_SHORT': ["一月", "二月", "三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
'DAYS': ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"],
'DAYS_SHORT': ["日", "月", "火", "水", "木", "金", "土"],
'ZOOM_IN': "拡大する",
'ZOOM_OUT': "縮小する",
'MOVE_LEFT': "左に移動",
'MOVE_RIGHT': "右に移動",
'NEW': "新しい",
'CREATE_NEW_EVENT': "新しいイベントの作成"
};
links.locales['ja_JA'] = links.locales['ja'];
// Korean ===================================================
links.locales['ko'] = {
'MONTHS': ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
'MONTHS_SHORT': ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
'DAYS': ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"],
'DAYS_SHORT': ["일", "월", "화", "수", "목", "금", "토"],
'ZOOM_IN': "줌 인",
'ZOOM_OUT': "줌 아웃",
'MOVE_LEFT': "왼쪽으로 이동",
'MOVE_RIGHT': "오른쪽으로 이동",
'NEW': "신규",
'CREATE_NEW_EVENT': "새 이벤트 생성"
};
links.locales['ko_KO'] = links.locales['ko'];
// Polish ===================================================
links.locales['pl'] = {
'MONTHS': ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"],
'MONTHS_SHORT': ["Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"],
'DAYS': ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"],
'DAYS_SHORT': ["niedz", "pon", "wt", "śr", "czw", "pt", "sob"],
'ZOOM_IN': "Powiększ",
'ZOOM_OUT': "Zmniejsz",
'MOVE_LEFT': "Przesuń w lewo",
'MOVE_RIGHT': "Przesuń w prawo",
'NEW': "Nowy",
'CREATE_NEW_EVENT': "Utwórz nowe wydarzenie"
};
links.locales['ko'] = links.locales['ko_KO'];

View File

@ -0,0 +1,218 @@
/*
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
Copyright (c) 2011-2015 Almende B.V.
@author Jos de Jong, <jos@almende.org>
@date 2015-03-04
@version 2.9.1
*/
typeof links==="undefined"&&(links={});typeof google==="undefined"&&(google=void 0);if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a){for(var b=0;b<this.length;b++)if(this[b]==a)return b;return-1};if(!Array.prototype.forEach)Array.prototype.forEach=function(a,b){for(var c=0,d=this.length;c<d;++c)a.call(b||this,this[c],c,this)};
links.Timeline=function(a,b){if(a){this.dom={};this.conversion={};this.eventParams={};this.groups=[];this.groupIndexes={};this.items=[];this.renderQueue={show:[],hide:[],update:[]};this.renderedItems=[];this.clusterGenerator=new links.Timeline.ClusterGenerator(this);this.currentClusters=[];this.selection=void 0;this.listeners={};this.size={actualHeight:0,axis:{characterMajorHeight:0,characterMajorWidth:0,characterMinorHeight:0,characterMinorWidth:0,height:0,labelMajorTop:0,labelMinorTop:0,line:0,
lineMajorWidth:0,lineMinorHeight:0,lineMinorTop:0,lineMinorWidth:0,top:0},contentHeight:0,contentLeft:0,contentWidth:0,frameHeight:0,frameWidth:0,groupsLeft:0,groupsWidth:0,items:{top:0}};this.dom.container=a;this.options={width:"100%",height:"auto",minHeight:0,groupMinHeight:0,autoHeight:!0,eventMargin:10,eventMarginAxis:20,dragAreaWidth:10,min:void 0,max:void 0,zoomMin:10,zoomMax:31536E10,moveable:!0,zoomable:!0,selectable:!0,unselectable:!0,editable:!1,snapEvents:!0,groupsChangeable:!0,timeChangeable:!0,
showCurrentTime:!0,showCustomTime:!1,showMajorLabels:!0,showMinorLabels:!0,showNavigation:!1,showButtonNew:!1,groupsOnRight:!1,groupsOrder:!0,axisOnTop:!1,stackEvents:!0,animate:!0,animateZoom:!0,cluster:!1,clusterMaxItems:5,style:"box",customStackOrder:!1,locale:"en",MONTHS:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),MONTHS_SHORT:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAYS:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
DAYS_SHORT:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),ZOOM_IN:"Zoom in",ZOOM_OUT:"Zoom out",MOVE_LEFT:"Move left",MOVE_RIGHT:"Move right",NEW:"New",CREATE_NEW_EVENT:"Create new event"};this.setOptions(b);this.clientTimeOffset=0;for(var c=this.dom;c.container.hasChildNodes();)c.container.removeChild(c.container.firstChild);this.step=new links.Timeline.StepDate;this.itemTypes={box:links.Timeline.ItemBox,range:links.Timeline.ItemRange,floatingRange:links.Timeline.ItemFloatingRange,dot:links.Timeline.ItemDot};
this.data=[];this.firstDraw=!0;this.setVisibleChartRange(void 0,void 0,!1);this.render();var d=this;setTimeout(function(){d.trigger("ready")},0)}};
links.Timeline.prototype.draw=function(a,b){b&&(console.log("WARNING: Passing options in draw() is deprecated. Pass options to the constructur or use setOptions() instead!"),this.setOptions(b));this.options.selectable&&links.Timeline.addClassName(this.dom.frame,"timeline-selectable");this.setData(a);this.firstDraw&&this.setVisibleChartRangeAuto();this.firstDraw=!1};
links.Timeline.prototype.setOptions=function(a){if(a){for(var b in a)a.hasOwnProperty(b)&&(this.options[b]=a[b]);if(typeof links.locales!=="undefined"&&this.options.locale!=="en"&&(b=links.locales[this.options.locale]))for(var c in b)b.hasOwnProperty(c)&&(this.options[c]=b[c]);if(a.showButtonAdd!=void 0)this.options.showButtonNew=a.showButtonAdd,console.log("WARNING: Option showButtonAdd is deprecated. Use showButtonNew instead");if(a.intervalMin!=void 0)this.options.zoomMin=a.intervalMin,console.log("WARNING: Option intervalMin is deprecated. Use zoomMin instead");
if(a.intervalMax!=void 0)this.options.zoomMax=a.intervalMax,console.log("WARNING: Option intervalMax is deprecated. Use zoomMax instead");a.scale&&a.step&&this.step.setScale(a.scale,a.step)}this.options.autoHeight=this.options.height==="auto"};links.Timeline.prototype.getOptions=function(){return this.options};links.Timeline.prototype.addItemType=function(a,b){this.itemTypes[a]=b};
links.Timeline.mapColumnIds=function(a){for(var b={},c=a.getNumberOfColumns(),d=!0,e=0;e<c;e++){var f=a.getColumnId(e)||a.getColumnLabel(e);b[f]=e;if(f=="start"||f=="end"||f=="content"||f=="group"||f=="className"||f=="editable"||f=="type")d=!1}if(d){b.start=0;b.end=1;b.content=2;if(c>3)b.group=3;if(c>4)b.className=4;if(c>5)b.editable=5;if(c>6)b.type=6}return b};
links.Timeline.prototype.setData=function(a){this.unselectItem();a||(a=[]);this.stackCancelAnimation();this.clearItems();this.data=a;var b=this.items;this.deleteGroups();if(google&&google.visualization&&a instanceof google.visualization.DataTable)for(var c=links.Timeline.mapColumnIds(a),d=0,e=a.getNumberOfRows();d<e;d++)b.push(this.createItem({start:c.start!=void 0?a.getValue(d,c.start):void 0,end:c.end!=void 0?a.getValue(d,c.end):void 0,content:c.content!=void 0?a.getValue(d,c.content):void 0,group:c.group!=
void 0?a.getValue(d,c.group):void 0,className:c.className!=void 0?a.getValue(d,c.className):void 0,editable:c.editable!=void 0?a.getValue(d,c.editable):void 0,type:c.type!=void 0?a.getValue(d,c.type):void 0}));else if(links.Timeline.isArray(a)){d=0;for(e=a.length;d<e;d++)c=this.createItem(a[d]),b.push(c)}else throw"Unknown data type. DataTable or Array expected.";this.options.cluster&&this.clusterGenerator.setData(this.items);this.render({animate:!1})};links.Timeline.prototype.getData=function(){return this.data};
links.Timeline.prototype.updateData=function(a,b){var c=this.data,d;if(google&&google.visualization&&c instanceof google.visualization.DataTable){var e=a+1-c.getNumberOfRows();e>0&&c.addRows(e);e=links.Timeline.mapColumnIds(c);for(d in b)if(b.hasOwnProperty(d)){var f=e[d];if(f==void 0){var f=b[d],g="string";typeof f=="number"?g="number":typeof f=="boolean"?g="boolean":f instanceof Date&&(g="datetime");f=c.addColumn(g,d)}c.setValue(a,f,b[d])}}else if(links.Timeline.isArray(c))for(d in e=c[a],e==void 0&&
(e={},c[a]=e),b)b.hasOwnProperty(d)&&(e[d]=b[d]);else throw"Cannot update data, unknown type of data";};links.Timeline.prototype.getItemIndex=function(a){for(var b=this.dom.items.frame,c=this.items,d=void 0;a.parentNode&&a.parentNode!==b;)a=a.parentNode;if(a.parentNode===b)for(var b=0,e=c.length;b<e;b++)if(c[b].dom===a){d=b;break}return d};
links.Timeline.prototype.getClusterIndex=function(a){var b=this.dom.items.frame,c=this.clusters,d=void 0;if(this.clusters){for(;a.parentNode&&a.parentNode!==b;)a=a.parentNode;if(a.parentNode===b)for(var b=0,e=c.length;b<e;b++)if(c[b].dom===a){d=b;break}}return d};links.Timeline.prototype.getVisibleItems=function(a,b){var c=this.items,d=[];if(c)for(var e=0,f=c.length;e<f;e++){var g=c[e];g.end?a<=g.start&&g.end<=b&&d.push({row:e}):a<=g.start&&g.start<=b&&d.push({row:e})}return d};
links.Timeline.prototype.setSize=function(a,b){if(a)this.options.width=a,this.dom.frame.style.width=a;if(b&&(this.options.height=b,this.options.autoHeight=this.options.height==="auto",b!=="auto"))this.dom.frame.style.height=b;this.render({animate:!1})};
links.Timeline.prototype.setVisibleChartRange=function(a,b,c){var d={};if(!a||!b)d=this.getDataRange(!0);if(!a)b?d.min&&d.min.valueOf()<b.valueOf()?a=d.min:(a=new Date(b.valueOf()),a.setDate(a.getDate()-7)):(a=new Date,a.setDate(a.getDate()-3));if(!b)d.max?b=d.max:(b=new Date(a.valueOf()),b.setDate(b.getDate()+7));b<=a&&(b=new Date(a.valueOf()),b.setDate(b.getDate()+7));d=this.options.min?this.options.min:void 0;d!=void 0&&a.valueOf()<d.valueOf()&&(a=new Date(d.valueOf()));d=this.options.max?this.options.max:
void 0;d!=void 0&&b.valueOf()>d.valueOf()&&(b=new Date(d.valueOf()));this.applyRange(a,b);c==void 0||c==!0?this.render({animate:!1}):this.recalcConversion()};links.Timeline.prototype.setVisibleChartRangeAuto=function(){var a=this.getDataRange(!0);this.setVisibleChartRange(a.min,a.max)};links.Timeline.prototype.setVisibleChartRangeNow=function(){var a=this.end.valueOf()-this.start.valueOf(),b=new Date((new Date).valueOf()-a/2);this.setVisibleChartRange(b,new Date(b.valueOf()+a))};
links.Timeline.prototype.getVisibleChartRange=function(){return{start:new Date(this.start.valueOf()),end:new Date(this.end.valueOf())}};
links.Timeline.prototype.getDataRange=function(a){var b=this.items,c=void 0,d=void 0;if(b)for(var e=0,f=b.length;e<f;e++){var g=b[e],h=g.start!=void 0?g.start.valueOf():void 0,g=g.end!=void 0?g.end.valueOf():h;h!=void 0&&(c=c!=void 0?Math.min(c.valueOf(),h.valueOf()):h);g!=void 0&&(d=d!=void 0?Math.max(d.valueOf(),g.valueOf()):g)}c&&d&&a&&(a=d-c,c-=a*0.05,d+=a*0.05);return{min:c!=void 0?new Date(c):void 0,max:d!=void 0?new Date(d):void 0}};
links.Timeline.prototype.render=function(a){this.reflowFrame();this.reflowAxis();this.reflowGroups();this.reflowItems();var b=this.options.animate;if(a&&a.animate!=void 0)b=a.animate;this.recalcConversion();this.clusterItems();this.filterItems();this.stackItems(b);this.recalcItems();this.repaint()&&(b=a?a.renderTimesLeft:void 0,b==void 0&&(b=5),b>0&&this.render({animate:a?a.animate:void 0,renderTimesLeft:b-1}))};
links.Timeline.prototype.repaint=function(){var a=this.repaintFrame(),b=this.repaintAxis(),c=this.repaintGroups(),d=this.repaintItems();this.repaintCurrentTime();this.repaintCustomTime();return a||b||c||d};links.Timeline.prototype.reflowFrame=function(){var a=this.dom,b=this.size,c=a.frame?a.frame.offsetWidth:0,d=a.frame?a.frame.clientHeight:0,a=(a=b.frameWidth!==c)||b.frameHeight!==d;b.frameWidth=c;b.frameHeight=d;return a};
links.Timeline.prototype.repaintFrame=function(){var a=!1,b=this.dom,c=this.options,d=this.size;if(!b.frame)b.frame=document.createElement("DIV"),b.frame.className="timeline-frame ui-widget ui-widget-content ui-corner-all",b.container.appendChild(b.frame),a=!0;var e=c.autoHeight?d.actualHeight+"px":c.height||"100%",c=c.width||"100%",a=(a=a||b.frame.style.height!=e)||b.frame.style.width!=c;b.frame.style.height=e;b.frame.style.width=c;if(!b.content){b.content=document.createElement("DIV");b.content.className=
"timeline-content";b.frame.appendChild(b.content);a=document.createElement("DIV");a.style.position="absolute";a.style.left="0px";a.style.top="0px";a.style.height="100%";a.style.width="0px";b.content.appendChild(a);b.contentTimelines=a;var a=this.eventParams,f=this;if(!a.onMouseDown)a.onMouseDown=function(a){f.onMouseDown(a)},links.Timeline.addEventListener(b.content,"mousedown",a.onMouseDown);if(!a.onTouchStart)a.onTouchStart=function(a){f.onTouchStart(a)},links.Timeline.addEventListener(b.content,
"touchstart",a.onTouchStart);if(!a.onMouseWheel)a.onMouseWheel=function(a){f.onMouseWheel(a)},links.Timeline.addEventListener(b.content,"mousewheel",a.onMouseWheel);if(!a.onDblClick)a.onDblClick=function(a){f.onDblClick(a)},links.Timeline.addEventListener(b.content,"dblclick",a.onDblClick);a=!0}b.content.style.left=d.contentLeft+"px";b.content.style.top="0px";b.content.style.width=d.contentWidth+"px";b.content.style.height=d.frameHeight+"px";this.repaintNavigation();return a};
links.Timeline.prototype.reflowAxis=function(){var a,b=this.options,c=this.size,d=this.dom.axis,e=d&&d.characterMinor?d.characterMinor.clientWidth:0,f=d&&d.characterMinor?d.characterMinor.clientHeight:0,g=d&&d.characterMajor?d.characterMajor.clientWidth:0,h=d&&d.characterMajor?d.characterMajor.clientHeight:0,i=(b.showMinorLabels?f:0)+(b.showMajorLabels?h:0),k=b.axisOnTop?0:c.frameHeight-i,m=b.axisOnTop?i:k;a=(a=(a=c.axis.top!==k)||c.axis.line!==m)||c.axis.height!==i;c.axis.top=k;c.axis.line=m;c.axis.height=
i;c.axis.labelMajorTop=b.axisOnTop?0:m+(b.showMinorLabels?f:0);c.axis.labelMinorTop=b.axisOnTop?b.showMajorLabels?h:0:m;c.axis.lineMinorTop=b.axisOnTop?c.axis.labelMinorTop:0;c.axis.lineMinorHeight=b.showMajorLabels?c.frameHeight-h:c.frameHeight;c.axis.lineMinorWidth=d&&d.minorLines&&d.minorLines.length?d.minorLines[0].offsetWidth:1;c.axis.lineMajorWidth=d&&d.majorLines&&d.majorLines.length?d.majorLines[0].offsetWidth:1;a=(a=(a=(a=a||c.axis.characterMinorWidth!==e)||c.axis.characterMinorHeight!==
f)||c.axis.characterMajorWidth!==g)||c.axis.characterMajorHeight!==h;c.axis.characterMinorWidth=e;c.axis.characterMinorHeight=f;c.axis.characterMajorWidth=g;c.axis.characterMajorHeight=h;d=Math.max(c.frameHeight-i,0);c.contentLeft=b.groupsOnRight?0:c.groupsWidth;c.contentWidth=Math.max(c.frameWidth-c.groupsWidth,0);c.contentHeight=d;return a};
links.Timeline.prototype.repaintAxis=function(){var a=!1,b=this.dom,c=this.options,d=this.size,e=this.step,f=b.axis;if(!f)f={},b.axis=f;if(!d.axis.properties)d.axis.properties={};if(!f.minorTexts)f.minorTexts=[];if(!f.minorLines)f.minorLines=[];if(!f.majorTexts)f.majorTexts=[];if(!f.majorLines)f.majorLines=[];if(!f.frame)f.frame=document.createElement("DIV"),f.frame.style.position="absolute",f.frame.style.left="0px",f.frame.style.top="0px",b.content.appendChild(f.frame);b.content.removeChild(f.frame);
f.frame.style.width=d.contentWidth+"px";f.frame.style.height=d.axis.height+"px";var g=this.screenToTime(0),h=this.screenToTime(d.contentWidth);if(d.axis.characterMinorWidth)this.minimumStep=this.screenToTime(d.axis.characterMinorWidth*6)-this.screenToTime(0),e.setRange(g,h,this.minimumStep);g=this.repaintAxisCharacters();a=a||g;this.repaintAxisStartOverwriting();e.start();g=void 0;for(h=0;!e.end()&&h<1E3;){h++;var i=this.timeToScreen(e.getCurrent()),k=e.isMajor();c.showMinorLabels&&this.repaintAxisMinorText(i,
e.getLabelMinor(c));k&&c.showMajorLabels?(i>0&&(g==void 0&&(g=i),this.repaintAxisMajorText(i,e.getLabelMajor(c))),this.repaintAxisMajorLine(i)):this.repaintAxisMinorLine(i);e.next()}c.showMajorLabels&&(e=this.screenToTime(0),c=this.step.getLabelMajor(c,e),d=c.length*d.axis.characterMajorWidth+10,(g==void 0||d<g)&&this.repaintAxisMajorText(0,c,e));this.repaintAxisEndOverwriting();this.repaintAxisHorizontal();b.content.insertBefore(f.frame,b.content.firstChild);return a};
links.Timeline.prototype.repaintAxisCharacters=function(){var a=!1,b=this.dom.axis;if(!b.characterMinor){var a=document.createTextNode("0"),c=document.createElement("DIV");c.className="timeline-axis-text timeline-axis-text-minor";c.appendChild(a);c.style.position="absolute";c.style.visibility="hidden";c.style.paddingLeft="0px";c.style.paddingRight="0px";b.frame.appendChild(c);b.characterMinor=c;a=!0}if(!b.characterMajor)a=document.createTextNode("0"),c=document.createElement("DIV"),c.className="timeline-axis-text timeline-axis-text-major",
c.appendChild(a),c.style.position="absolute",c.style.visibility="hidden",c.style.paddingLeft="0px",c.style.paddingRight="0px",b.frame.appendChild(c),b.characterMajor=c,a=!0;return a};links.Timeline.prototype.repaintAxisStartOverwriting=function(){var a=this.size.axis.properties;a.minorTextNum=0;a.minorLineNum=0;a.majorTextNum=0;a.majorLineNum=0};
links.Timeline.prototype.repaintAxisEndOverwriting=function(){var a=this.dom,b=this.size.axis.properties,c=this.dom.axis.frame,d,e=a.axis.minorTexts;for(d=b.minorTextNum;e.length>d;)c.removeChild(e[d]),e.splice(d,1);e=a.axis.minorLines;for(d=b.minorLineNum;e.length>d;)c.removeChild(e[d]),e.splice(d,1);e=a.axis.majorTexts;for(d=b.majorTextNum;e.length>d;)c.removeChild(e[d]),e.splice(d,1);a=a.axis.majorLines;for(d=b.majorLineNum;a.length>d;)c.removeChild(a[d]),a.splice(d,1)};
links.Timeline.prototype.repaintAxisHorizontal=function(){var a=this.dom.axis,b=this.size,c=this.options;if(c=c.showMinorLabels||c.showMajorLabels){if(!a.backgroundLine){var d=document.createElement("DIV");d.className="timeline-axis";d.style.position="absolute";d.style.left="0px";d.style.width="100%";d.style.border="none";a.frame.insertBefore(d,a.frame.firstChild);a.backgroundLine=d}if(a.backgroundLine)a.backgroundLine.style.top=b.axis.top+"px",a.backgroundLine.style.height=b.axis.height+"px"}else a.backgroundLine&&
(a.frame.removeChild(a.backgroundLine),delete a.backgroundLine);c?(a.line?(c=a.frame.removeChild(a.line),a.frame.appendChild(c)):(c=document.createElement("DIV"),c.className="timeline-axis",c.style.position="absolute",c.style.left="0px",c.style.width="100%",c.style.height="0px",a.frame.appendChild(c),a.line=c),a.line.style.top=b.axis.line+"px"):a.line&&a.line.parentElement&&(a.frame.removeChild(a.line),delete a.line)};
links.Timeline.prototype.repaintAxisMinorText=function(a,b){var c=this.size,d=this.dom,e=c.axis.properties,f=d.axis.frame,d=d.axis.minorTexts,g=e.minorTextNum;if(g<d.length)g=d[g];else{var h=document.createTextNode(""),g=document.createElement("DIV");g.appendChild(h);g.className="timeline-axis-text timeline-axis-text-minor";g.style.position="absolute";f.appendChild(g);d.push(g)}g.childNodes[0].nodeValue=b;g.style.left=a+"px";g.style.top=c.axis.labelMinorTop+"px";e.minorTextNum++};
links.Timeline.prototype.repaintAxisMinorLine=function(a){var b=this.size.axis,c=this.dom,d=b.properties,e=c.axis.frame,c=c.axis.minorLines,f=d.minorLineNum;f<c.length?f=c[f]:(f=document.createElement("DIV"),f.className="timeline-axis-grid timeline-axis-grid-minor",f.style.position="absolute",f.style.width="0px",e.appendChild(f),c.push(f));f.style.top=b.lineMinorTop+"px";f.style.height=b.lineMinorHeight+"px";f.style.left=a-b.lineMinorWidth/2+"px";d.minorLineNum++};
links.Timeline.prototype.repaintAxisMajorText=function(a,b){var c=this.size,d=c.axis.properties,e=this.dom.axis.frame,f=this.dom.axis.majorTexts,g=d.majorTextNum;if(g<f.length)g=f[g];else{var h=document.createTextNode(b),g=document.createElement("DIV");g.className="timeline-axis-text timeline-axis-text-major";g.appendChild(h);g.style.position="absolute";g.style.top="0px";e.appendChild(g);f.push(g)}g.childNodes[0].nodeValue=b;g.style.top=c.axis.labelMajorTop+"px";g.style.left=a+"px";d.majorTextNum++};
links.Timeline.prototype.repaintAxisMajorLine=function(a){var b=this.size,c=b.axis.properties,d=this.size.axis,e=this.dom.axis.frame,f=this.dom.axis.majorLines,g=c.majorLineNum;g<f.length?g=f[g]:(g=document.createElement("DIV"),g.className="timeline-axis-grid timeline-axis-grid-major",g.style.position="absolute",g.style.top="0px",g.style.width="0px",e.appendChild(g),f.push(g));g.style.left=a-d.lineMajorWidth/2+"px";g.style.height=b.frameHeight+"px";c.majorLineNum++};
links.Timeline.prototype.reflowItems=function(){var a=!1,b,c,d;b=this.groups;var e=this.renderedItems;b&&b.forEach(function(a){a.itemsHeight=a.labelHeight||0});for(b=0,c=e.length;b<c;b++){var f=e[b],g=f.dom;d=f.group;if(g){var h=g?g.clientWidth:0,g=g?g.clientHeight:0,a=(a=a||f.width!=h)||f.height!=g;f.width=h;f.height=g;f.reflow()}if(d)d.itemsHeight=Math.max(this.options.groupMinHeight,d.itemsHeight?Math.max(d.itemsHeight,f.height):f.height)}return a};
links.Timeline.prototype.recalcItems=function(){var a=!1,b,c,d,e,f;d=this.groups;var g=this.size,h=this.options;f=this.renderedItems;var i=0;if(d.length==0){if(h.autoHeight||h.cluster){var k=i=0;if(this.stack&&this.stack.finalItems){d=this.stack.finalItems;if((e=d[0])&&e.top)i=e.top,k=e.top+e.height;for(b=1,c=d.length;b<c;b++)e=d[b],i=Math.min(i,e.top),k=Math.max(k,e.top+e.height)}else{if((d=f[0])&&d.top)i=d.top,k=d.top+d.height;for(b=1,c=f.length;b<c;b++)d=f[b],d.top&&(i=Math.min(i,d.top),k=Math.max(k,
d.top+d.height))}i=k-i+2*h.eventMarginAxis+g.axis.height;if(i<h.minHeight)i=h.minHeight;if(g.actualHeight!=i&&h.autoHeight&&!h.axisOnTop)if(k=i-g.actualHeight,this.stack&&this.stack.finalItems){d=this.stack.finalItems;for(b=0,c=d.length;b<c;b++)d[b].top+=k,d[b].item.top+=k}else for(b=0,c=f.length;b<c;b++)f[b].top+=k}}else{i=g.axis.height+2*h.eventMarginAxis;for(b=0,c=d.length;b<c;b++)f=d[b],k=f.itemsHeight,a=a||k!=f.height,f.height=Math.max(k,h.groupMinHeight),i+=d[b].height+h.eventMargin;a=h.eventMargin;
k=h.axisOnTop?h.eventMarginAxis+a/2:g.contentHeight-h.eventMarginAxis+a/2;e=g.axis.height;for(b=0,c=d.length;b<c;b++)f=d[b],h.axisOnTop?(f.top=k+e,f.labelTop=k+e+(f.height-f.labelHeight)/2,f.lineTop=k+e+f.height+a/2,k+=f.height+a):(k-=f.height+a,f.top=k,f.labelTop=k+(f.height-f.labelHeight)/2,f.lineTop=k-a/2);a=!0}if(i<h.minHeight)i=h.minHeight;a=a||i!=g.actualHeight;g.actualHeight=i;return a};
links.Timeline.prototype.clearItems=function(){var a=this.renderQueue.hide;this.renderedItems.forEach(function(b){a.push(b)});this.clusterGenerator.clear();this.items=[]};
links.Timeline.prototype.repaintItems=function(){var a,b,c=!1,d=this.dom;a=this.size;var e=this,f=this.renderedItems;if(!d.items)d.items={};var g=d.items.frame;if(!g)g=document.createElement("DIV"),g.style.position="relative",d.content.appendChild(g),d.items.frame=g;g.style.left="0px";g.style.top=a.items.top+"px";g.style.height="0px";d.content.removeChild(g);for(var h=this.renderQueue,i=[],c=c||h.show.length>0||h.update.length>0||h.hide.length>0;a=h.show.shift();)a.showDOM(g),a.getImageUrls(i),f.push(a);
for(;a=h.update.shift();)a.updateDOM(g),a.getImageUrls(i),b=this.renderedItems.indexOf(a),b==-1&&f.push(a);for(;a=h.hide.shift();)a.hideDOM(g),b=this.renderedItems.indexOf(a),b!=-1&&f.splice(b,1);f.forEach(function(a){a.updatePosition(e)});this.repaintDeleteButton();this.repaintDragAreas();d.content.appendChild(g);i.length&&links.imageloader.loadAll(i,function(){e.render()},!1);return c};
links.Timeline.prototype.reflowGroups=function(){for(var a=!1,b=this.options,c=this.size,d=this.dom,e=0,f=this.groups,g=this.dom.groups?this.dom.groups.labels:[],h=0,i=f.length;h<i;h++){var k=f[h],m=g[h];k.labelWidth=m?m.clientWidth:0;k.labelHeight=m?m.clientHeight:0;k.width=k.labelWidth;e=Math.max(e,k.width)}b.groupsWidth!==void 0&&(e=d.groups&&d.groups.frame?d.groups.frame.clientWidth:0);e+=1;b=b.groupsOnRight?c.frameWidth-e:0;a=(a=a||c.groupsWidth!==e)||c.groupsLeft!==b;c.groupsWidth=e;c.groupsLeft=
b;return a};
links.Timeline.prototype.repaintGroups=function(){var a=this.dom,b=this,c=this.options,d=this.size,e=this.groups;if(a.groups===void 0)a.groups={};var f=a.groups.labels;if(!f)f=[],a.groups.labels=f;var g=a.groups.labelLines;if(!g)g=[],a.groups.labelLines=g;var h=a.groups.itemLines;if(!h)h=[],a.groups.itemLines=h;var i=a.groups.frame;if(!i)i=document.createElement("DIV"),i.className="timeline-groups-axis",i.style.position="absolute",i.style.overflow="hidden",i.style.top="0px",i.style.height="100%",
a.frame.appendChild(i),a.groups.frame=i;i.style.left=d.groupsLeft+"px";i.style.width=c.groupsWidth!==void 0?c.groupsWidth:d.groupsWidth+"px";i.style.display=e.length==0?"none":"";for(var k=f.length,m=e.length,l=0,s=Math.min(k,m);l<s;l++){var q=e[l],o=f[l];o.innerHTML=this.getGroupName(q);o.style.display=""}for(l=k;l<m;l++){q=e[l];o=document.createElement("DIV");o.className="timeline-groups-text";o.style.position="absolute";if(c.groupsWidth===void 0)o.style.whiteSpace="nowrap";o.innerHTML=this.getGroupName(q);
i.appendChild(o);f[l]=o;var p=document.createElement("DIV");p.className="timeline-axis-grid timeline-axis-grid-minor";p.style.position="absolute";p.style.left="0px";p.style.width="100%";p.style.height="0px";p.style.borderTopStyle="solid";i.appendChild(p);g[l]=p;var n=document.createElement("DIV");n.className="timeline-axis-grid timeline-axis-grid-minor";n.style.position="absolute";n.style.left="0px";n.style.width="100%";n.style.height="0px";n.style.borderTopStyle="solid";a.content.insertBefore(n,
a.content.firstChild);h[l]=n}for(l=m;l<k;l++)o=f[l],p=g[l],n=h[l],i.removeChild(o),i.removeChild(p),a.content.removeChild(n);f.splice(m,k-m);g.splice(m,k-m);h.splice(m,k-m);links.Timeline.addClassName(i,c.groupsOnRight?"timeline-groups-axis-onright":"timeline-groups-axis-onleft");l=0;for(s=e.length;l<s;l++)q=e[l],o=f[l],p=g[l],n=h[l],o.style.top=q.labelTop+"px",p.style.top=q.lineTop+"px",n.style.top=q.lineTop+"px",n.style.width=d.contentWidth+"px";if(!a.groups.background)c=document.createElement("DIV"),
c.className="timeline-axis",c.style.position="absolute",c.style.left="0px",c.style.width="100%",c.style.border="none",i.appendChild(c),a.groups.background=c;a.groups.background.style.top=d.axis.top+"px";a.groups.background.style.height=d.axis.height+"px";if(!a.groups.line)c=document.createElement("DIV"),c.className="timeline-axis",c.style.position="absolute",c.style.left="0px",c.style.width="100%",c.style.height="0px",i.appendChild(c),a.groups.line=c;a.groups.line.style.top=d.axis.line+"px";a.groups.frame&&
e.length&&(d=[],links.imageloader.filterImageUrls(a.groups.frame,d),d.length&&links.imageloader.loadAll(d,function(){b.render()},!1))};
links.Timeline.prototype.repaintCurrentTime=function(){var a=this.dom,b=this.size;if(this.options.showCurrentTime){if(!a.currentTime){var c=document.createElement("DIV");c.className="timeline-currenttime";c.style.position="absolute";c.style.top="0px";c.style.height="100%";a.contentTimelines.appendChild(c);a.currentTime=c}var c=new Date((new Date).valueOf()+this.clientTimeOffset),d=this.timeToScreen(c);a.currentTime.style.display=d>-b.contentWidth&&d<2*b.contentWidth?"":"none";a.currentTime.style.left=
d+"px";a.currentTime.title="Current time: "+c;this.currentTimeTimer!=void 0&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer);var e=this,a=1/this.conversion.factor/2;a<30&&(a=30);this.currentTimeTimer=setTimeout(function(){e.repaintCurrentTime()},a)}else a.currentTime&&(a.contentTimelines.removeChild(a.currentTime),delete a.currentTime)};
links.Timeline.prototype.repaintCustomTime=function(){var a=this.dom,b=this.size;if(this.options.showCustomTime){if(!a.customTime){var c=document.createElement("DIV");c.className="timeline-customtime";c.style.position="absolute";c.style.top="0px";c.style.height="100%";var d=document.createElement("DIV");d.style.position="relative";d.style.top="0px";d.style.left="-10px";d.style.height="100%";d.style.width="20px";c.appendChild(d);a.contentTimelines.appendChild(c);a.customTime=c;this.customTime=new Date}c=
this.timeToScreen(this.customTime);a.customTime.style.display=c>-b.contentWidth&&c<2*b.contentWidth?"":"none";a.customTime.style.left=c+"px";a.customTime.title="Time: "+this.customTime}else a.customTime&&(a.contentTimelines.removeChild(a.customTime),delete a.customTime)};
links.Timeline.prototype.repaintDeleteButton=function(){var a=this.dom,b=a.items.frame,c=a.items.deleteButton;if(!c)c=document.createElement("DIV"),c.className="timeline-navigation-delete",c.style.position="absolute",b.appendChild(c),a.items.deleteButton=c;var a=this.selection&&this.selection.index!==void 0?this.selection.index:-1,d=this.selection&&this.selection.index!==void 0?this.items[a]:void 0;d&&d.rendered&&this.isEditable(d)?(a=d.getRight(this),d=d.top,c.style.left=a+"px",c.style.top=d+"px",
c.style.display="",b.removeChild(c),b.appendChild(c)):c.style.display="none"};
links.Timeline.prototype.repaintDragAreas=function(){var a=this.options,b=this.dom,c=this.dom.items.frame,d=b.items.dragLeft;if(!d)d=document.createElement("DIV"),d.className="timeline-event-range-drag-left",d.style.position="absolute",c.appendChild(d),b.items.dragLeft=d;var e=b.items.dragRight;if(!e)e=document.createElement("DIV"),e.className="timeline-event-range-drag-right",e.style.position="absolute",c.appendChild(e),b.items.dragRight=e;var b=this.selection&&this.selection.index!==void 0?this.selection.index:
-1,f=this.selection&&this.selection.index!==void 0?this.items[b]:void 0;if(f&&f.rendered&&this.isEditable(f)&&(f instanceof links.Timeline.ItemRange||f instanceof links.Timeline.ItemFloatingRange)){var b=f.getLeft(this),g=f.getRight(this),h=f.top,f=f.height;d.style.left=b+"px";d.style.top=h+"px";d.style.width=a.dragAreaWidth+"px";d.style.height=f+"px";d.style.display="";c.removeChild(d);c.appendChild(d);e.style.left=g-a.dragAreaWidth+"px";e.style.top=h+"px";e.style.width=a.dragAreaWidth+"px";e.style.height=
f+"px";e.style.display="";c.removeChild(e);c.appendChild(e)}else d.style.display="none",e.style.display="none"};
links.Timeline.prototype.repaintNavigation=function(){var a=this,b=this.options,c=this.dom,d=c.frame,e=c.navBar;if(!e){var f=b.showButtonNew&&b.editable,g=b.showNavigation&&(b.zoomable||b.moveable);if(g||f)e=document.createElement("DIV"),e.style.position="absolute",e.className="timeline-navigation ui-widget ui-state-highlight ui-corner-all",b.groupsOnRight?e.style.left="10px":e.style.right="10px",b.axisOnTop?e.style.bottom="10px":e.style.top="10px",c.navBar=e,d.appendChild(e);if(f)e.addButton=document.createElement("DIV"),
e.addButton.className="timeline-navigation-new",e.addButton.title=b.CREATE_NEW_EVENT,c=document.createElement("SPAN"),c.className="ui-icon ui-icon-circle-plus",e.addButton.appendChild(c),links.Timeline.addEventListener(e.addButton,"mousedown",function(c){links.Timeline.preventDefault(c);links.Timeline.stopPropagation(c);c=a.screenToTime(a.size.contentWidth/2);b.snapEvents&&a.step.snap(c);a.addItem({start:c,content:b.NEW,group:a.groups.length?a.groups[0].content:void 0},!0);c=a.items.length-1;a.selectItem(c);
a.applyAdd=!0;a.trigger("add");a.applyAdd?(a.render({animate:!1}),a.selectItem(c)):a.deleteItem(c)}),e.appendChild(e.addButton);f&&g&&links.Timeline.addClassName(e.addButton,"timeline-navigation-new-line");if(g){if(b.zoomable)e.zoomInButton=document.createElement("DIV"),e.zoomInButton.className="timeline-navigation-zoom-in",e.zoomInButton.title=this.options.ZOOM_IN,f=document.createElement("SPAN"),f.className="ui-icon ui-icon-circle-zoomin",e.zoomInButton.appendChild(f),links.Timeline.addEventListener(e.zoomInButton,
"mousedown",function(b){links.Timeline.preventDefault(b);links.Timeline.stopPropagation(b);a.zoom(0.4);a.trigger("rangechange");a.trigger("rangechanged")}),e.appendChild(e.zoomInButton),e.zoomOutButton=document.createElement("DIV"),e.zoomOutButton.className="timeline-navigation-zoom-out",e.zoomOutButton.title=this.options.ZOOM_OUT,f=document.createElement("SPAN"),f.className="ui-icon ui-icon-circle-zoomout",e.zoomOutButton.appendChild(f),links.Timeline.addEventListener(e.zoomOutButton,"mousedown",
function(b){links.Timeline.preventDefault(b);links.Timeline.stopPropagation(b);a.zoom(-0.4);a.trigger("rangechange");a.trigger("rangechanged")}),e.appendChild(e.zoomOutButton);if(b.moveable)e.moveLeftButton=document.createElement("DIV"),e.moveLeftButton.className="timeline-navigation-move-left",e.moveLeftButton.title=this.options.MOVE_LEFT,f=document.createElement("SPAN"),f.className="ui-icon ui-icon-circle-arrow-w",e.moveLeftButton.appendChild(f),links.Timeline.addEventListener(e.moveLeftButton,
"mousedown",function(b){links.Timeline.preventDefault(b);links.Timeline.stopPropagation(b);a.move(-0.2);a.trigger("rangechange");a.trigger("rangechanged")}),e.appendChild(e.moveLeftButton),e.moveRightButton=document.createElement("DIV"),e.moveRightButton.className="timeline-navigation-move-right",e.moveRightButton.title=this.options.MOVE_RIGHT,f=document.createElement("SPAN"),f.className="ui-icon ui-icon-circle-arrow-e",e.moveRightButton.appendChild(f),links.Timeline.addEventListener(e.moveRightButton,
"mousedown",function(b){links.Timeline.preventDefault(b);links.Timeline.stopPropagation(b);a.move(0.2);a.trigger("rangechange");a.trigger("rangechanged")}),e.appendChild(e.moveRightButton)}}};links.Timeline.prototype.setCurrentTime=function(a){this.clientTimeOffset=a.valueOf()-(new Date).valueOf();this.repaintCurrentTime()};links.Timeline.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.clientTimeOffset)};
links.Timeline.prototype.setCustomTime=function(a){this.customTime=new Date(a.valueOf());this.repaintCustomTime()};links.Timeline.prototype.getCustomTime=function(){return new Date(this.customTime.valueOf())};links.Timeline.prototype.setScale=function(a,b){this.step.setScale(a,b);this.render()};links.Timeline.prototype.setAutoScale=function(a){this.step.setAutoScale(a);this.render()};links.Timeline.prototype.redraw=function(){this.setData(this.data)};links.Timeline.prototype.checkResize=function(){this.render()};
links.Timeline.prototype.isEditable=function(a){return a?a.editable!=void 0?a.editable:this.options.editable:!1};links.Timeline.prototype.recalcConversion=function(){this.conversion.offset=this.start.valueOf();this.conversion.factor=this.size.contentWidth/(this.end.valueOf()-this.start.valueOf())};links.Timeline.prototype.screenToTime=function(a){var b=this.conversion;return new Date(a/b.factor+b.offset)};
links.Timeline.prototype.timeToScreen=function(a){var b=this.conversion;return(a.valueOf()-b.offset)*b.factor};
links.Timeline.prototype.onTouchStart=function(a){var b=this.eventParams,c=this;if(!b.touchDown){b.touchDown=!0;b.zoomed=!1;this.onMouseDown(a);if(!b.onTouchMove)b.onTouchMove=function(a){c.onTouchMove(a)},links.Timeline.addEventListener(document,"touchmove",b.onTouchMove);if(!b.onTouchEnd)b.onTouchEnd=function(a){c.onTouchEnd(a)},links.Timeline.addEventListener(document,"touchend",b.onTouchEnd);var d=this.getItemIndex(links.Timeline.getTarget(a));b.doubleTapStartPrev=b.doubleTapStart;b.doubleTapStart=
(new Date).valueOf();b.doubleTapItemPrev=b.doubleTapItem;b.doubleTapItem=d;links.Timeline.preventDefault(a)}};links.Timeline.prototype.onTouchMove=function(a){var b=this.eventParams;if(a.scale&&a.scale!==1)b.zoomed=!0;if(b.zoomed){if(this.options.zoomable){b.zoomed=!0;var c=b.end.valueOf()-b.start.valueOf(),d=c/a.scale-c,c=new Date(parseInt(b.start.valueOf()-d/2)),b=new Date(parseInt(b.end.valueOf()+d/2));this.setVisibleChartRange(c,b);this.trigger("rangechange")}}else this.onMouseMove(a);links.Timeline.preventDefault(a)};
links.Timeline.prototype.onTouchEnd=function(a){var b=this.eventParams;b.touchDown=!1;b.zoomed&&this.trigger("rangechanged");b.onTouchMove&&(links.Timeline.removeEventListener(document,"touchmove",b.onTouchMove),delete b.onTouchMove);b.onTouchEnd&&(links.Timeline.removeEventListener(document,"touchend",b.onTouchEnd),delete b.onTouchEnd);this.onMouseUp(a);var c=(new Date).valueOf();this.getItemIndex(links.Timeline.getTarget(a));if(b.doubleTapStartPrev&&c-b.doubleTapStartPrev<500&&b.doubleTapItem==
b.doubleTapItemPrev)b.touchDown=!0,this.onDblClick(a),b.touchDown=!1;links.Timeline.preventDefault(a)};
links.Timeline.prototype.onMouseDown=function(a){var a=a||window.event,b=this.eventParams,c=this.options,d=this.dom;if((a.which?a.which==1:a.button==1)||b.touchDown){b.mouseX=links.Timeline.getPageX(a);b.mouseY=links.Timeline.getPageY(a);b.frameLeft=links.Timeline.getAbsoluteLeft(this.dom.content);b.frameTop=links.Timeline.getAbsoluteTop(this.dom.content);b.previousLeft=0;b.previousOffset=0;b.moved=!1;b.start=new Date(this.start.valueOf());b.end=new Date(this.end.valueOf());b.target=links.Timeline.getTarget(a);
var e=d.items&&d.items.dragRight?d.items.dragRight:void 0;b.itemDragLeft=b.target===(d.items&&d.items.dragLeft?d.items.dragLeft:void 0);b.itemDragRight=b.target===e;b.itemDragLeft||b.itemDragRight?(b.itemIndex=this.selection&&this.selection.index!==void 0?this.selection.index:void 0,delete b.clusterIndex):(b.itemIndex=this.getItemIndex(b.target),b.clusterIndex=this.getClusterIndex(b.target));b.customTime=b.target===d.customTime||b.target.parentNode===d.customTime?this.customTime:void 0;b.addItem=
c.editable&&a.ctrlKey;if(b.addItem){var f=b.mouseY-b.frameTop,d=this.screenToTime(b.mouseX-b.frameLeft);c.snapEvents&&this.step.snap(d);e=new Date(d.valueOf());c=c.NEW;f=this.getGroupFromHeight(f);this.addItem({start:d,end:e,content:c,group:this.getGroupName(f)});b.itemIndex=this.items.length-1;delete b.clusterIndex;this.selectItem(b.itemIndex);b.itemDragRight=!0}c=this.items[b.itemIndex];d=this.isSelected(b.itemIndex);b.editItem=d&&this.isEditable(c);b.editItem?(b.itemStart=c.start,b.itemEnd=c.end,
b.itemGroup=c.group,b.itemLeft=c.getLeft(this),b.itemRight=c.getRight(this)):this.dom.frame.style.cursor="move";if(!b.touchDown){var g=this;if(!b.onMouseMove)b.onMouseMove=function(a){g.onMouseMove(a)},links.Timeline.addEventListener(document,"mousemove",b.onMouseMove);if(!b.onMouseUp)b.onMouseUp=function(a){g.onMouseUp(a)},links.Timeline.addEventListener(document,"mouseup",b.onMouseUp);links.Timeline.preventDefault(a)}}};
links.Timeline.prototype.onMouseMove=function(a){var a=a||window.event,b=this.eventParams,c=this.size,d=this.dom,e=this.options,f=links.Timeline.getPageX(a),g=links.Timeline.getPageY(a);if(b.mouseX==void 0)b.mouseX=f;if(b.mouseY==void 0)b.mouseY=g;f-=b.mouseX;if(Math.abs(f)>=1)b.moved=!0;if(b.customTime)this.customTime=this.screenToTime(this.timeToScreen(b.customTime)+f),this.repaintCustomTime(),this.trigger("timechange");else if(b.editItem){var d=this.items[b.itemIndex],h,i;if(b.itemDragLeft&&e.timeChangeable){h=
b.itemLeft+f;i=b.itemRight;d.start=this.screenToTime(h);e.snapEvents&&(this.step.snap(d.start),h=this.timeToScreen(d.start));if(h>i)h=i,d.start=this.screenToTime(h);this.trigger("change")}else if(b.itemDragRight&&e.timeChangeable){h=b.itemLeft;i=b.itemRight+f;d.end=this.screenToTime(i);e.snapEvents&&(this.step.snap(d.end),i=this.timeToScreen(d.end));if(i<h)i=h,d.end=this.screenToTime(i);this.trigger("change")}else if(e.timeChangeable){h=b.itemLeft+f;d.start=this.screenToTime(h);e.snapEvents&&(this.step.snap(d.start),
h=this.timeToScreen(d.start));if(d.end)i=h+(b.itemRight-b.itemLeft),d.end=this.screenToTime(i);this.trigger("change")}d.setPosition(h,i);c=b.itemDragLeft||b.itemDragRight;this.groups.length&&!c?(b=this.getGroupFromHeight(g-b.frameTop),e.groupsChangeable&&d.group!==b?this.changeItem(this.items.indexOf(d),{group:this.getGroupName(b)}):(this.repaintDeleteButton(),this.repaintDragAreas())):this.render()}else if(e.moveable)e=b.end.valueOf()-b.start.valueOf(),g=Math.round(-f/c.contentWidth*e),f=new Date(b.start.valueOf()+
g),this.applyRange(f,new Date(b.end.valueOf()+g)),(f=this.start.valueOf()-f.valueOf())&&(g+=f),this.recalcConversion(),f=b.previousLeft||0,h=parseFloat(d.items.frame.style.left)||0,f=(b.previousOffset||0)+(h-f),c=-g/e*c.contentWidth+f,d.items.frame.style.left=c+"px",b.previousOffset=f,b.previousLeft=parseFloat(d.items.frame.style.left)||c,this.repaintCurrentTime(),this.repaintCustomTime(),this.repaintAxis(),this.trigger("rangechange");links.Timeline.preventDefault(a)};
links.Timeline.prototype.onMouseUp=function(){var a=this.eventParams,b=this.options;this.dom.frame.style.cursor="auto";a.onMouseMove&&(links.Timeline.removeEventListener(document,"mousemove",a.onMouseMove),delete a.onMouseMove);a.onMouseUp&&(links.Timeline.removeEventListener(document,"mouseup",a.onMouseUp),delete a.onMouseUp);if(a.customTime)this.trigger("timechanged");else if(a.editItem){if(b=this.items[a.itemIndex],a.moved||a.addItem)this.applyAdd=this.applyChange=!0,this.updateData(a.itemIndex,
{start:b.start,end:b.end}),this.trigger(a.addItem?"add":"changed"),b=this.items[a.itemIndex],a.addItem?this.applyAdd?this.updateData(a.itemIndex,{start:b.start,end:b.end,content:b.content,group:this.getGroupName(b.group)}):this.deleteItem(a.itemIndex):this.applyChange?this.updateData(a.itemIndex,{start:b.start,end:b.end}):(delete this.applyChange,delete this.applyAdd,b=this.items[a.itemIndex],b.start=a.itemStart,b.end=a.itemEnd,b.group=a.itemGroup,b.setPosition(a.itemLeft,a.itemRight),this.updateData(a.itemIndex,
{start:a.itemStart,end:a.itemEnd})),this.options.cluster&&this.clusterGenerator.updateData(),this.render()}else!a.moved&&!a.zoomed?a.target===this.dom.items.deleteButton?this.selection&&this.selection.index!==void 0&&this.confirmDeleteItem(this.selection.index):b.selectable&&(a.itemIndex!=void 0?this.isSelected(a.itemIndex)||(this.selectItem(a.itemIndex),this.trigger("select")):a.clusterIndex!=void 0?(this.selectCluster(a.clusterIndex),this.trigger("select")):b.unselectable&&(this.unselectItem(),
this.trigger("select"))):(this.render(),(a.moved&&b.moveable||a.zoomed&&b.zoomable)&&this.trigger("rangechanged"))};
links.Timeline.prototype.onDblClick=function(a){var b=this.eventParams,c=this.options,d=this.dom,a=a||window.event;if(b.itemIndex!=void 0)(b=this.items[b.itemIndex])&&this.isEditable(b)&&this.trigger("edit");else if(c.editable){b.mouseX=links.Timeline.getPageX(a);b.mouseY=links.Timeline.getPageY(a);var e=b.mouseX-links.Timeline.getAbsoluteLeft(d.content),d=b.mouseY-links.Timeline.getAbsoluteTop(d.content),e=this.screenToTime(e);c.snapEvents&&this.step.snap(e);c=c.NEW;d=this.getGroupFromHeight(d);
this.addItem({start:e,content:c,group:this.getGroupName(d)},!0);b.itemIndex=this.items.length-1;this.selectItem(b.itemIndex);this.applyAdd=!0;this.trigger("add");this.applyAdd?(this.render({animate:!1}),this.selectItem(b.itemIndex)):this.deleteItem(b.itemIndex)}links.Timeline.preventDefault(a)};
links.Timeline.prototype.onMouseWheel=function(a){if(this.options.zoomable){if(!a)a=window.event;var b=0;a.wheelDelta?b=a.wheelDelta/120:a.detail&&(b=-a.detail/3);if(b){var c=this,d=function(){var d=b/5,f=links.Timeline.getAbsoluteLeft(c.dom.content),g=links.Timeline.getPageX(a),f=g!=void 0&&f!=void 0?c.screenToTime(g-f):void 0;c.zoom(d,f);c.trigger("rangechange");c.trigger("rangechanged")};a.shiftKey?(c.move(b*-0.2),c.trigger("rangechange"),c.trigger("rangechanged")):d()}links.Timeline.preventDefault(a)}};
links.Timeline.prototype.zoom=function(a,b){b==void 0&&(b=new Date((this.start.valueOf()+this.end.valueOf())/2));a>=1&&(a=0.9);a<=-1&&(a=-0.9);a<0&&(a/=1+a);var c=new Date(this.start.valueOf()-(this.start.valueOf()-b)*a),d=new Date(this.end.valueOf()-(this.end.valueOf()-b)*a),e=d.valueOf()-c.valueOf(),f=Number(this.options.zoomMin)||10;f<10&&(f=10);e>=f&&(this.applyRange(c,d,b),this.render({animate:this.options.animate&&this.options.animateZoom}))};
links.Timeline.prototype.move=function(a){var b=this.end.valueOf()-this.start.valueOf();this.applyRange(new Date(this.start.valueOf()+b*a),new Date(this.end.valueOf()+b*a));this.render()};
links.Timeline.prototype.applyRange=function(a,b,c){var a=a.valueOf(),b=b.valueOf(),d=b-a,e=this.options,f=Number(e.zoomMin)||10;f<10&&(f=10);var g=Number(e.zoomMax)||31536E10;g>31536E10&&(g=31536E10);g<f&&(g=f);var h=e.min?e.min.valueOf():void 0,e=e.max?e.max.valueOf():void 0;h!=void 0&&e!=void 0&&(h>=e&&(e=h+864E5),g>e-h&&(g=e-h),f>e-h&&(f=e-h));a>=b&&(b+=864E5);if(d<f){f-=d;var i=c?(c.valueOf()-a)/d:0.5;a-=Math.round(f*i);b+=Math.round(f*(1-i))}d>g&&(f=d-g,i=c?(c.valueOf()-a)/d:0.5,a+=Math.round(f*
i),b-=Math.round(f*(1-i)));h!=void 0&&(f=a-h,f<0&&(a-=f,b-=f));e!=void 0&&(f=e-b,f<0&&(a+=f,b+=f));this.start=new Date(a);this.end=new Date(b)};links.Timeline.prototype.confirmDeleteItem=function(a){this.applyDelete=!0;this.isSelected(a)||this.selectItem(a);this.trigger("delete");this.applyDelete&&this.deleteItem(a);delete this.applyDelete};
links.Timeline.prototype.deleteItem=function(a,b){if(a>=this.items.length)throw"Cannot delete row, index out of range";this.selection&&this.selection.index!==void 0&&(this.selection.index==a?this.unselectItem():this.selection.index>a&&this.selection.index--);this.renderQueue.hide.push(this.items.splice(a,1)[0]);if(this.data)if(google&&google.visualization&&this.data instanceof google.visualization.DataTable)this.data.removeRow(a);else if(links.Timeline.isArray(this.data))this.data.splice(a,1);else throw"Cannot delete row from data, unknown data type";
this.options.cluster&&this.clusterGenerator.updateData();b||this.render()};
links.Timeline.prototype.deleteAllItems=function(){this.unselectItem();this.clearItems();this.deleteGroups();if(this.data)if(google&&google.visualization&&this.data instanceof google.visualization.DataTable)this.data.removeRows(0,this.data.getNumberOfRows());else if(links.Timeline.isArray(this.data))this.data.splice(0,this.data.length);else throw"Cannot delete row from data, unknown data type";this.options.cluster&&this.clusterGenerator.updateData();this.render()};
links.Timeline.prototype.getGroupFromHeight=function(a){var b,c,d=this.groups;if(d.length){if(this.options.axisOnTop)for(b=d.length-1;b>=0;b--){if(c=d[b],a>c.top)break}else for(b=0;b<d.length;b++)if(c=d[b],a>c.top)break;return c}};
links.Timeline.Item=function(a,b){if(a)this.start=a.start,this.end=a.end,this.content=a.content,this.className=a.className,this.editable=a.editable,this.group=a.group,this.type=a.type;this.dotHeight=this.dotWidth=this.lineWidth=this.height=this.width=this.left=this.top=0;this.rendered=!1;if(b)for(var c in b)b.hasOwnProperty(c)&&(this[c]=b[c])};links.Timeline.Item.prototype.reflow=function(){return!1};
links.Timeline.Item.prototype.getImageUrls=function(a){this.dom&&links.imageloader.filterImageUrls(this.dom,a)};links.Timeline.Item.prototype.select=function(){};links.Timeline.Item.prototype.unselect=function(){};links.Timeline.Item.prototype.createDOM=function(){};links.Timeline.Item.prototype.showDOM=function(){};links.Timeline.Item.prototype.hideDOM=function(){};links.Timeline.Item.prototype.updateDOM=function(){};links.Timeline.Item.prototype.updatePosition=function(){};
links.Timeline.Item.prototype.isRendered=function(){return this.rendered};links.Timeline.Item.prototype.isVisible=function(){return!1};links.Timeline.Item.prototype.setPosition=function(){};links.Timeline.Item.prototype.getLeft=function(){return 0};links.Timeline.Item.prototype.getRight=function(){return 0};links.Timeline.Item.prototype.getWidth=function(){return this.width||0};links.Timeline.ItemBox=function(a,b){links.Timeline.Item.call(this,a,b)};links.Timeline.ItemBox.prototype=new links.Timeline.Item;
links.Timeline.ItemBox.prototype.reflow=function(){var a=this.dom,b=a.dot.offsetHeight,c=a.dot.offsetWidth,a=a.line.offsetWidth,d=this.dotHeight!=b||this.dotWidth!=c||this.lineWidth!=a;this.dotHeight=b;this.dotWidth=c;this.lineWidth=a;return d};links.Timeline.ItemBox.prototype.select=function(){var a=this.dom;links.Timeline.addClassName(a,"timeline-event-selected ui-state-active");links.Timeline.addClassName(a.line,"timeline-event-selected ui-state-active");links.Timeline.addClassName(a.dot,"timeline-event-selected ui-state-active")};
links.Timeline.ItemBox.prototype.unselect=function(){var a=this.dom;links.Timeline.removeClassName(a,"timeline-event-selected ui-state-active");links.Timeline.removeClassName(a.line,"timeline-event-selected ui-state-active");links.Timeline.removeClassName(a.dot,"timeline-event-selected ui-state-active")};
links.Timeline.ItemBox.prototype.createDOM=function(){var a=document.createElement("DIV");a.style.position="absolute";a.style.left=this.left+"px";a.style.top=this.top+"px";var b=document.createElement("DIV");b.className="timeline-event-content";b.innerHTML=this.content;a.appendChild(b);b=document.createElement("DIV");b.style.position="absolute";b.style.width="0px";a.line=b;b=document.createElement("DIV");b.style.position="absolute";b.style.width="0px";b.style.height="0px";a.dot=b;this.dom=a;this.updateDOM();
return a};links.Timeline.ItemBox.prototype.showDOM=function(a){var b=this.dom;b||(b=this.createDOM());if(b.parentNode!=a)b.parentNode&&this.hideDOM(),a.appendChild(b),a.insertBefore(b.line,a.firstChild),a.appendChild(b.dot),this.rendered=!0};links.Timeline.ItemBox.prototype.hideDOM=function(){var a=this.dom;if(a)a.parentNode&&a.parentNode.removeChild(a),a.line&&a.line.parentNode&&a.line.parentNode.removeChild(a.line),a.dot&&a.dot.parentNode&&a.dot.parentNode.removeChild(a.dot),this.rendered=!1};
links.Timeline.ItemBox.prototype.updateDOM=function(){var a=this.dom;if(a){var b=a.line,c=a.dot;a.firstChild.innerHTML=this.content;a.className="timeline-event timeline-event-box ui-widget ui-state-default";b.className="timeline-event timeline-event-line ui-widget ui-state-default";c.className="timeline-event timeline-event-dot ui-widget ui-state-default";this.isCluster&&(links.Timeline.addClassName(a,"timeline-event-cluster ui-widget-header"),links.Timeline.addClassName(b,"timeline-event-cluster ui-widget-header"),
links.Timeline.addClassName(c,"timeline-event-cluster ui-widget-header"));this.className&&(links.Timeline.addClassName(a,this.className),links.Timeline.addClassName(b,this.className),links.Timeline.addClassName(c,this.className))}};
links.Timeline.ItemBox.prototype.updatePosition=function(a){var b=this.dom;if(b){var c=a.timeToScreen(this.start),d=a.options.axisOnTop,e=a.size.axis.top,f=a.size.axis.height,a=a.options.box&&a.options.box.align?a.options.box.align:void 0;b.style.top=this.top+"px";b.style.left=a=="right"?c-this.width+"px":a=="left"?c+"px":c-this.width/2+"px";a=b.line;b=b.dot;a.style.left=c-this.lineWidth/2+"px";b.style.left=c-this.dotWidth/2+"px";d?(a.style.top=f+"px",a.style.height=Math.max(this.top-f,0)+"px",b.style.top=
f-this.dotHeight/2+"px"):(a.style.top=this.top+this.height+"px",a.style.height=Math.max(e-this.top-this.height,0)+"px",b.style.top=e-this.dotHeight/2+"px")}};links.Timeline.ItemBox.prototype.isVisible=function(a,b){return this.cluster?!1:this.start>a&&this.start<b};
links.Timeline.ItemBox.prototype.setPosition=function(a){var b=this.dom;b.style.left=a-this.width/2+"px";b.line.style.left=a-this.lineWidth/2+"px";b.dot.style.left=a-this.dotWidth/2+"px";if(this.group)this.top=this.group.top,b.style.top=this.top+"px"};links.Timeline.ItemBox.prototype.getLeft=function(a){var b=a.options.box&&a.options.box.align?a.options.box.align:void 0,a=a.timeToScreen(this.start);a-=b=="right"?width:this.width/2;return a};
links.Timeline.ItemBox.prototype.getRight=function(a){var b=a.options.box&&a.options.box.align?a.options.box.align:void 0,a=a.timeToScreen(this.start);return b=="right"?a:b=="left"?a+this.width:a+this.width/2};links.Timeline.ItemRange=function(a,b){links.Timeline.Item.call(this,a,b)};links.Timeline.ItemRange.prototype=new links.Timeline.Item;links.Timeline.ItemRange.prototype.select=function(){links.Timeline.addClassName(this.dom,"timeline-event-selected ui-state-active")};
links.Timeline.ItemRange.prototype.unselect=function(){links.Timeline.removeClassName(this.dom,"timeline-event-selected ui-state-active")};links.Timeline.ItemRange.prototype.createDOM=function(){var a=document.createElement("DIV");a.style.position="absolute";var b=document.createElement("DIV");b.className="timeline-event-content";a.appendChild(b);this.dom=a;this.updateDOM();return a};
links.Timeline.ItemRange.prototype.showDOM=function(a){var b=this.dom;b||(b=this.createDOM());if(b.parentNode!=a)b.parentNode&&this.hideDOM(),a.appendChild(b),this.rendered=!0};links.Timeline.ItemRange.prototype.hideDOM=function(){var a=this.dom;if(a)a.parentNode&&a.parentNode.removeChild(a),this.rendered=!1};
links.Timeline.ItemRange.prototype.updateDOM=function(){var a=this.dom;if(a)a.firstChild.innerHTML=this.content,a.className="timeline-event timeline-event-range ui-widget ui-state-default",this.isCluster&&links.Timeline.addClassName(a,"timeline-event-cluster ui-widget-header"),this.className&&links.Timeline.addClassName(a,this.className)};
links.Timeline.ItemRange.prototype.updatePosition=function(a){var b=this.dom;if(b){var c=a.size.contentWidth,d=a.timeToScreen(this.start),a=a.timeToScreen(this.end);d<-c&&(d=-c);a>2*c&&(a=2*c);b.style.top=this.top+"px";b.style.left=d+"px";b.style.width=Math.max(a-d,1)+"px"}};links.Timeline.ItemRange.prototype.isVisible=function(a,b){return this.cluster?!1:this.end>a&&this.start<b};
links.Timeline.ItemRange.prototype.setPosition=function(a,b){var c=this.dom;c.style.left=a+"px";c.style.width=b-a+"px";if(this.group)this.top=this.group.top,c.style.top=this.top+"px"};links.Timeline.ItemRange.prototype.getLeft=function(a){return a.timeToScreen(this.start)};links.Timeline.ItemRange.prototype.getRight=function(a){return a.timeToScreen(this.end)};links.Timeline.ItemRange.prototype.getWidth=function(a){return a.timeToScreen(this.end)-a.timeToScreen(this.start)};
links.Timeline.ItemFloatingRange=function(a,b){links.Timeline.Item.call(this,a,b)};links.Timeline.ItemFloatingRange.prototype=new links.Timeline.Item;links.Timeline.ItemFloatingRange.prototype.select=function(){links.Timeline.addClassName(this.dom,"timeline-event-selected ui-state-active")};links.Timeline.ItemFloatingRange.prototype.unselect=function(){links.Timeline.removeClassName(this.dom,"timeline-event-selected ui-state-active")};
links.Timeline.ItemFloatingRange.prototype.createDOM=function(){var a=document.createElement("DIV");a.style.position="absolute";var b=document.createElement("DIV");b.className="timeline-event-content";a.appendChild(b);this.dom=a;this.updateDOM();return a};links.Timeline.ItemFloatingRange.prototype.showDOM=function(a){var b=this.dom;b||(b=this.createDOM());if(b.parentNode!=a)b.parentNode&&this.hideDOM(),a.appendChild(b),this.rendered=!0};
links.Timeline.ItemFloatingRange.prototype.hideDOM=function(){var a=this.dom;if(a)a.parentNode&&a.parentNode.removeChild(a),this.rendered=!1};links.Timeline.ItemFloatingRange.prototype.updateDOM=function(){var a=this.dom;if(a)a.firstChild.innerHTML=this.content,a.className="timeline-event timeline-event-range ui-widget ui-state-default",this.isCluster&&links.Timeline.addClassName(a,"timeline-event-cluster ui-widget-header"),this.className&&links.Timeline.addClassName(a,this.className)};
links.Timeline.ItemFloatingRange.prototype.updatePosition=function(a){var b=this.dom;if(b){var c=a.size.contentWidth,d=this.getLeft(a),a=this.getRight(a);d<-c&&(d=-c);a>2*c&&(a=2*c);b.style.top=this.top+"px";b.style.left=d+"px";b.style.width=Math.max(a-d,1)+"px"}};links.Timeline.ItemFloatingRange.prototype.isVisible=function(a,b){return this.cluster?!1:this.end&&this.start?this.end>a&&this.start<b:this.start?this.start<b:this.end?this.end>a:!0};
links.Timeline.ItemFloatingRange.prototype.setPosition=function(a,b){var c=this.dom;c.style.left=a+"px";c.style.width=b-a+"px";if(this.group)this.top=this.group.top,c.style.top=this.top+"px"};links.Timeline.ItemFloatingRange.prototype.getLeft=function(a){return this.start?a.timeToScreen(this.start):0};links.Timeline.ItemFloatingRange.prototype.getRight=function(a){return this.end?a.timeToScreen(this.end):a.size.contentWidth};
links.Timeline.ItemFloatingRange.prototype.getWidth=function(a){return this.getRight(a)-this.getLeft(a)};links.Timeline.ItemDot=function(a,b){links.Timeline.Item.call(this,a,b)};links.Timeline.ItemDot.prototype=new links.Timeline.Item;links.Timeline.ItemDot.prototype.reflow=function(){var a=this.dom,b=a.dot.offsetHeight,c=a.dot.offsetWidth,a=a.content.offsetHeight,d=this.dotHeight!=b||this.dotWidth!=c||this.contentHeight!=a;this.dotHeight=b;this.dotWidth=c;this.contentHeight=a;return d};
links.Timeline.ItemDot.prototype.select=function(){links.Timeline.addClassName(this.dom,"timeline-event-selected ui-state-active")};links.Timeline.ItemDot.prototype.unselect=function(){links.Timeline.removeClassName(this.dom,"timeline-event-selected ui-state-active")};
links.Timeline.ItemDot.prototype.createDOM=function(){var a=document.createElement("DIV");a.style.position="absolute";var b=document.createElement("DIV");b.className="timeline-event-content";a.appendChild(b);var c=document.createElement("DIV");c.style.position="absolute";c.style.width="0px";c.style.height="0px";a.appendChild(c);a.content=b;a.dot=c;this.dom=a;this.updateDOM();return a};
links.Timeline.ItemDot.prototype.showDOM=function(a){var b=this.dom;b||(b=this.createDOM());if(b.parentNode!=a)b.parentNode&&this.hideDOM(),a.appendChild(b),this.rendered=!0};links.Timeline.ItemDot.prototype.hideDOM=function(){var a=this.dom;if(a)a.parentNode&&a.parentNode.removeChild(a),this.rendered=!1};
links.Timeline.ItemDot.prototype.updateDOM=function(){if(this.dom){var a=this.dom,b=a.dot;a.firstChild.innerHTML=this.content;a.className="timeline-event-dot-container";b.className="timeline-event timeline-event-dot ui-widget ui-state-default";this.isCluster&&(links.Timeline.addClassName(a,"timeline-event-cluster ui-widget-header"),links.Timeline.addClassName(b,"timeline-event-cluster ui-widget-header"));this.className&&(links.Timeline.addClassName(a,this.className),links.Timeline.addClassName(b,
this.className))}};links.Timeline.ItemDot.prototype.updatePosition=function(a){var b=this.dom;if(b)a=a.timeToScreen(this.start),b.style.top=this.top+"px",b.style.left=a-this.dotWidth/2+"px",b.content.style.marginLeft=1.5*this.dotWidth+"px",b.dot.style.top=(this.height-this.dotHeight)/2+"px"};links.Timeline.ItemDot.prototype.isVisible=function(a,b){return this.cluster?!1:this.start>a&&this.start<b};
links.Timeline.ItemDot.prototype.setPosition=function(a){var b=this.dom;b.style.left=a-this.dotWidth/2+"px";if(this.group)this.top=this.group.top,b.style.top=this.top+"px"};links.Timeline.ItemDot.prototype.getLeft=function(a){return a.timeToScreen(this.start)};links.Timeline.ItemDot.prototype.getRight=function(a){return a.timeToScreen(this.start)+this.width};
links.Timeline.prototype.getItem=function(a){if(a>=this.items.length)throw"Cannot get item, index out of range";var b=this.data;if(google&&google.visualization&&b instanceof google.visualization.DataTable){var c=links.Timeline.mapColumnIds(b),b={},d;for(d in c)c.hasOwnProperty(d)&&(b[d]=this.data.getValue(a,c[d]))}else if(links.Timeline.isArray(this.data))b=links.Timeline.clone(this.data[a]);else throw"Unknown data type. DataTable or Array expected.";a=this.items[a];b.start=new Date(a.start.valueOf());
if(a.end)b.end=new Date(a.end.valueOf());b.content=a.content;if(a.group)b.group=this.getGroupName(a.group);if(a.className)b.className=a.className;if(typeof a.editable!=="undefined")b.editable=a.editable;if(a.type)b.type=a.type;return b};
links.Timeline.prototype.getCluster=function(a){if(a>=this.clusters.length)throw"Cannot get cluster, index out of range";var b={},c=this.clusters[a],a=c.items;b.start=new Date(c.start.valueOf());if(c.type)b.type=c.type;b.items=[];for(c=0;c<a.length;c++)for(var d=0;d<this.items.length;d++)if(this.items[d]==a[c]){b.items.push(this.getItem(d));break}return b};links.Timeline.prototype.addItem=function(a,b){this.addItems([a],b)};
links.Timeline.prototype.addItems=function(a,b){var c=this,d=this.items;a.forEach(function(a){var b=d.length;d.push(c.createItem(a));c.updateData(b,a)});this.options.cluster&&this.clusterGenerator.updateData();b||this.render({animate:!1})};
links.Timeline.prototype.createItem=function(a){var b=a.type||(a.end?"range":this.options.style),c=links.Timeline.clone(a);c.type=b;c.group=this.getGroup(a.group);a=this.options;a=a.axisOnTop?this.size.axis.height+a.eventMarginAxis+a.eventMargin/2:this.size.contentHeight-a.eventMarginAxis-a.eventMargin/2;if(b in this.itemTypes)return new this.itemTypes[b](c,{top:a});console.log('ERROR: Unknown event type "'+b+'"');return new links.Timeline.Item(c,{top:a})};
links.Timeline.prototype.changeItem=function(a,b,c){var d=this.items[a];if(!d)throw"Cannot change item, index out of range";var e=this.createItem({start:b.hasOwnProperty("start")?b.start:d.start,end:b.hasOwnProperty("end")?b.end:d.end,content:b.hasOwnProperty("content")?b.content:d.content,group:b.hasOwnProperty("group")?b.group:this.getGroupName(d.group),className:b.hasOwnProperty("className")?b.className:d.className,editable:b.hasOwnProperty("editable")?b.editable:d.editable,type:b.hasOwnProperty("type")?
b.type:d.type});this.items[a]=e;this.renderQueue.hide.push(d);this.renderQueue.show.push(e);this.updateData(a,b);this.options.cluster&&this.clusterGenerator.updateData();c||(this.render({animate:!1}),this.selection&&this.selection.index==a&&e.select())};links.Timeline.prototype.deleteGroups=function(){this.groups=[];this.groupIndexes={}};
links.Timeline.prototype.getGroup=function(a){var b=this.groups,c=this.groupIndexes,d=void 0,d=c[a];if(d==void 0&&a!=void 0){d={content:a,labelTop:0,lineTop:0};b.push(d);this.options.groupsOrder==!0?b=b.sort(function(a,b){return a.content>b.content?1:a.content<b.content?-1:0}):typeof this.options.groupsOrder=="function"&&(b=b.sort(this.options.groupsOrder));for(var a=0,e=b.length;a<e;a++)c[b[a].content]=a}else d=b[d];return d};links.Timeline.prototype.getGroupName=function(a){return a?a.content:void 0};
links.Timeline.prototype.cancelChange=function(){this.applyChange=!1};links.Timeline.prototype.cancelDelete=function(){this.applyDelete=!1};links.Timeline.prototype.cancelAdd=function(){this.applyAdd=!1};
links.Timeline.prototype.setSelection=function(a){if(a!=void 0&&a.length>0){if(a[0].row!=void 0){var b=a[0].row;if(this.items[b])return a=this.items[b],this.selectItem(b),b=a.start,a=a.end,a=a!=void 0?(a.valueOf()+b.valueOf())/2:b.valueOf(),b=this.end.valueOf()-this.start.valueOf(),this.setVisibleChartRange(new Date(a-b/2),new Date(a+b/2)),!0}}else this.unselectItem();return!1};
links.Timeline.prototype.getSelection=function(){var a=[];this.selection&&(this.selection.index!==void 0?a.push({row:this.selection.index}):a.push({cluster:this.selection.cluster}));return a};links.Timeline.prototype.selectItem=function(a){this.unselectItem();this.selection=void 0;if(this.items[a]!=void 0){var b=this.items[a];this.selection={index:a};if(b&&b.dom){if(this.isEditable(b))b.dom.style.cursor="move";b.select()}this.repaintDeleteButton();this.repaintDragAreas()}};
links.Timeline.prototype.selectCluster=function(a){this.unselectItem();this.selection=void 0;if(this.clusters[a]!=void 0)this.selection={cluster:a},this.repaintDeleteButton(),this.repaintDragAreas()};links.Timeline.prototype.isSelected=function(a){return this.selection&&this.selection.index==a};
links.Timeline.prototype.unselectItem=function(){if(this.selection&&this.selection.index!==void 0){var a=this.items[this.selection.index];if(a&&a.dom)a.dom.style.cursor="",a.unselect();this.selection=void 0;this.repaintDeleteButton();this.repaintDragAreas()}};
links.Timeline.prototype.stackItems=function(a){a==void 0&&(a=!1);var b=this.stack;if(!b)this.stack=b={};b.sortedItems=this.stackOrder(this.renderedItems);b.finalItems=this.stackCalculateFinal(b.sortedItems);if(a||b.timer){var c=this,d=function(){var a=c.stackMoveOneStep(b.sortedItems,b.finalItems);c.repaint();a?delete b.timer:b.timer=setTimeout(d,30)};if(!b.timer)b.timer=setTimeout(d,30)}else this.stackMoveToFinal(b.sortedItems,b.finalItems)};
links.Timeline.prototype.stackCancelAnimation=function(){this.stack&&this.stack.timer&&(clearTimeout(this.stack.timer),delete this.stack.timer)};links.Timeline.prototype.getItemsByGroup=function(a){for(var b={},c=0;c<a.length;++c){var d=a[c],e="undefined";d.group&&(e=d.group.content?d.group.content:d.group);b[e]||(b[e]=[]);b[e].push(d)}return b};
links.Timeline.prototype.stackOrder=function(a){a=a.concat([]);a.sort(this.options.customStackOrder&&typeof this.options.customStackOrder==="function"?this.options.customStackOrder:function(a,c){return(a instanceof links.Timeline.ItemRange||a instanceof links.Timeline.ItemFloatingRange)&&!(c instanceof links.Timeline.ItemRange||c instanceof links.Timeline.ItemFloatingRange)?-1:!(a instanceof links.Timeline.ItemRange||a instanceof links.Timeline.ItemFloatingRange)&&(c instanceof links.Timeline.ItemRange||
c instanceof links.Timeline.ItemFloatingRange)?1:a.left-c.left});return a};
links.Timeline.prototype.stackCalculateFinal=function(a){var b=this.size,c=this.options,d=c.axisOnTop,e=c.eventMargin,f=c.eventMarginAxis,b=d?b.axis.height+f+e/2:b.contentHeight-f-e/2,g=[],a=this.getItemsByGroup(a);for(j=0;j<this.groups.length;++j){var h=this.groups[j];a[h.content]?(f=this.finalItemsPosition(a[h.content],b,h),f.forEach(function(a){g.push(a)}),d?b+=h.itemsHeight+e:b-=h.itemsHeight+e):d?b+=c.groupMinHeight+e:b-=c.groupMinHeight+e}a.undefined&&(f=this.finalItemsPosition(a.undefined,
b),f.forEach(function(a){g.push(a)}));return g};
links.Timeline.prototype.finalItemsPosition=function(a,b,c){var d,e=this.options,f=e.axisOnTop,e=e.eventMargin,g;g=this.initialItemsPosition(a,b);for(a=0,d=g.length;a<d;a++){var h=g[a],i=null;if(this.options.stackEvents){do if(i=this.stackItemsCheckOverlap(g,a,0,a-1),i!=null)h.top=f?i.top+i.height+e:i.top-h.height-e,h.bottom=h.top+h.height;while(i)}if(c)c.itemsHeight=f?c.itemsHeight?Math.max(c.itemsHeight,h.bottom-b):h.height+e:c.itemsHeight?Math.max(c.itemsHeight,b-h.top):h.height+e}return g};
links.Timeline.prototype.initialItemsPosition=function(a,b){for(var c=this.options.axisOnTop,d=[],e=0,f=a.length;e<f;++e){var g=a[e],h,i=g.height;h=g.getWidth(this);var k=g.getRight(this),m=k-h;h=c?b:b-i;d.push({left:m,top:h,right:k,bottom:h+i,height:i,item:g})}return d};
links.Timeline.prototype.stackMoveOneStep=function(a,b){for(var c=!0,d=0,e=b.length;d<e;d++){var f=b[d],g=f.item,h=parseInt(g.top),i=parseInt(f.top),k=i-h;if(k){var m=i==h?0:i>h?1:-1;Math.abs(k)>4&&(m=k/4);h=parseInt(h+m);h!=i&&(c=!1);g.top=h;g.bottom=g.top+g.height}else g.top=f.top,g.bottom=f.bottom;g.left=f.left;g.right=f.right}return c};
links.Timeline.prototype.stackMoveToFinal=function(a,b){for(var c=0,d=b.length;c<d;c++){var e=b[c],f=e.item;f.left=e.left;f.top=e.top;f.right=e.right;f.bottom=e.bottom}};links.Timeline.prototype.stackItemsCheckOverlap=function(a,b,c,d){for(var e=this.options.eventMargin,f=this.collision,g=a[b];d>=c;d--){var h=a[d];if(f(g,h,e)&&d!=b)return h}};links.Timeline.prototype.collision=function(a,b,c){c==void 0&&(c=0);return a.left-c<b.right&&a.right+c>b.left&&a.top-c<b.bottom&&a.bottom+c>b.top};
links.Timeline.prototype.trigger=function(a){var b=null;switch(a){case "rangechange":case "rangechanged":b={start:new Date(this.start.valueOf()),end:new Date(this.end.valueOf())};break;case "timechange":case "timechanged":b={time:new Date(this.customTime.valueOf())}}links.events.trigger(this,a,b);google&&google.visualization&&google.visualization.events.trigger(this,a,b)};
links.Timeline.prototype.clusterItems=function(){if(this.options.cluster){var a=this.clusterGenerator.getClusters(this.conversion.factor,this.options.clusterMaxItems);if(this.clusters!=a){var b=this.renderQueue;this.clusters&&this.clusters.forEach(function(a){b.hide.push(a);a.items.forEach(function(a){a.cluster=void 0})});a.forEach(function(a){a.items.forEach(function(b){b.cluster=a})});this.clusters=a}}};
links.Timeline.prototype.filterItems=function(){function a(a){a.forEach(function(a){var c=a.rendered,f=a.isVisible(d,e);c!=f&&(c&&b.hide.push(a),f&&b.show.indexOf(a)==-1&&b.show.push(a))})}var b=this.renderQueue,c=this.end-this.start,d=new Date(this.start.valueOf()-c),e=new Date(this.end.valueOf()+c);a(this.items);this.clusters&&a(this.clusters)};links.Timeline.ClusterGenerator=function(a){this.timeline=a;this.clear()};
links.Timeline.ClusterGenerator.prototype.clear=function(){this.items=[];this.groups={};this.clearCache()};links.Timeline.ClusterGenerator.prototype.clearCache=function(){this.cache={};this.cacheLevel=-1;this.cache[this.cacheLevel]=[]};links.Timeline.ClusterGenerator.prototype.setData=function(a,b){this.items=a||[];this.applyOnChangedLevel=this.dataChanged=!0;if(b&&b.applyOnChangedLevel)this.applyOnChangedLevel=b.applyOnChangedLevel};
links.Timeline.ClusterGenerator.prototype.updateData=function(){this.dataChanged=!0;this.applyOnChangedLevel=!1};links.Timeline.ClusterGenerator.prototype.filterData=function(){var a=this.items||[],b={};this.groups=b;a.forEach(function(a){var c=a.group?a.group.content:"",f=b[c];f||(f=[],b[c]=f);f.push(a);if(a.start)a.center=a.end?(a.start.valueOf()+a.end.valueOf())/2:a.start.valueOf()});for(var c in b)b.hasOwnProperty(c)&&b[c].sort(function(a,b){return a.center-b.center});this.dataChanged=!1};
links.Timeline.ClusterGenerator.prototype.getClusters=function(a,b){var c=-1,d=0;a>0&&(c=Math.round(Math.log(100/a)/Math.log(2)),d=Math.pow(2,c));if(this.dataChanged){var e=c!=this.cacheLevel;if(this.applyOnChangedLevel?e:1)this.clearCache(),this.filterData()}this.cacheLevel=c;e=this.cache[c];if(!e){var e=[],f;for(f in this.groups)if(this.groups.hasOwnProperty(f))for(var g=this.groups[f],h=g.length,i=0;i<h;){for(var k=g[i],m=1,l=i-1;l>=0&&k.center-g[l].center<d/2;)g[l].cluster||m++,l--;for(l=i+1;l<
g.length&&g[l].center-k.center<d/2;)m++,l++;for(l=e.length-1;l>=0&&k.center-e[l].center<d/2;)k.group==e[l].group&&m++,l--;if(m>b){for(var m=m-b+1,l=[],s=void 0,q=void 0,o=void 0,p=!1,n=0,u=i;l.length<m&&u<g.length;){var r=g[u],v=r.start.valueOf(),w=r.end?r.end.valueOf():r.start.valueOf();l.push(r);s=n?n/(n+1)*s+1/(n+1)*r.center:r.center;q=q!=void 0?Math.min(q,v):v;o=o!=void 0?Math.max(o,w):w;p=p||r instanceof links.Timeline.ItemRange||r instanceof links.Timeline.ItemFloatingRange;n++;u++}var t,n=
'<div title="'+("Cluster containing "+n+" events. Zoom in to see the individual events.")+'">'+n+" events</div>",k=k.group?k.group.content:void 0;t=p?this.timeline.createItem({start:new Date(q),end:new Date(o),content:n,group:k}):this.timeline.createItem({start:new Date(s),content:n,group:k});t.isCluster=!0;t.items=l;t.items.forEach(function(a){a.cluster=t});e.push(t);i+=m}else delete k.cluster,i+=1}this.cache[c]=e}return e};
links.events=links.events||{listeners:[],indexOf:function(a){for(var b=this.listeners,c=0,d=this.listeners.length;c<d;c++){var e=b[c];if(e&&e.object==a)return c}return-1},addListener:function(a,b,c){var d=this.listeners[this.indexOf(a)];d||(d={object:a,events:{}},this.listeners.push(d));a=d.events[b];a||(a=[],d.events[b]=a);a.indexOf(c)==-1&&a.push(c)},removeListener:function(a,b,c){var a=this.indexOf(a),d=this.listeners[a];if(d){var e=d.events[b];e&&(a=e.indexOf(c),a!=-1&&e.splice(a,1),e.length==
0&&delete d.events[b]);var b=0,c=d.events,f;for(f in c)c.hasOwnProperty(f)&&b++;b==0&&delete this.listeners[a]}},removeAllListeners:function(){this.listeners=[]},trigger:function(a,b,c){if(a=this.listeners[this.indexOf(a)])if(b=a.events[b])for(var a=0,d=b.length;a<d;a++)b[a](c)}};links.Timeline.StepDate=function(a,b,c){this.current=new Date;this._start=new Date;this._end=new Date;this.autoScale=!0;this.scale=links.Timeline.StepDate.SCALE.DAY;this.step=1;this.setRange(a,b,c)};
links.Timeline.StepDate.SCALE={MILLISECOND:1,SECOND:2,MINUTE:3,HOUR:4,DAY:5,WEEKDAY:6,MONTH:7,YEAR:8};links.Timeline.StepDate.prototype.setRange=function(a,b,c){if(a instanceof Date&&b instanceof Date)this._start=a!=void 0?new Date(a.valueOf()):new Date,this._end=b!=void 0?new Date(b.valueOf()):new Date,this.autoScale&&this.setMinimumStep(c)};links.Timeline.StepDate.prototype.start=function(){this.current=new Date(this._start.valueOf());this.roundToMinor()};
links.Timeline.StepDate.prototype.roundToMinor=function(){switch(this.scale){case links.Timeline.StepDate.SCALE.YEAR:this.current.setFullYear(this.step*Math.floor(this.current.getFullYear()/this.step)),this.current.setMonth(0);case links.Timeline.StepDate.SCALE.MONTH:this.current.setDate(1);case links.Timeline.StepDate.SCALE.DAY:case links.Timeline.StepDate.SCALE.WEEKDAY:this.current.setHours(0);case links.Timeline.StepDate.SCALE.HOUR:this.current.setMinutes(0);case links.Timeline.StepDate.SCALE.MINUTE:this.current.setSeconds(0);
case links.Timeline.StepDate.SCALE.SECOND:this.current.setMilliseconds(0)}if(this.step!=1)switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:this.current.setMilliseconds(this.current.getMilliseconds()-this.current.getMilliseconds()%this.step);break;case links.Timeline.StepDate.SCALE.SECOND:this.current.setSeconds(this.current.getSeconds()-this.current.getSeconds()%this.step);break;case links.Timeline.StepDate.SCALE.MINUTE:this.current.setMinutes(this.current.getMinutes()-this.current.getMinutes()%
this.step);break;case links.Timeline.StepDate.SCALE.HOUR:this.current.setHours(this.current.getHours()-this.current.getHours()%this.step);break;case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:this.current.setDate(this.current.getDate()-1-(this.current.getDate()-1)%this.step+1);break;case links.Timeline.StepDate.SCALE.MONTH:this.current.setMonth(this.current.getMonth()-this.current.getMonth()%this.step);break;case links.Timeline.StepDate.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()-
this.current.getFullYear()%this.step)}};links.Timeline.StepDate.prototype.end=function(){return this.current.valueOf()>this._end.valueOf()};
links.Timeline.StepDate.prototype.next=function(){var a=this.current.valueOf();if(this.current.getMonth()<6)switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:this.current=new Date(this.current.valueOf()+this.step);break;case links.Timeline.StepDate.SCALE.SECOND:this.current=new Date(this.current.valueOf()+this.step*1E3);break;case links.Timeline.StepDate.SCALE.MINUTE:this.current=new Date(this.current.valueOf()+this.step*6E4);break;case links.Timeline.StepDate.SCALE.HOUR:this.current=
new Date(this.current.valueOf()+this.step*36E5);var b=this.current.getHours();this.current.setHours(b-b%this.step);break;case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:this.current.setDate(this.current.getDate()+this.step);break;case links.Timeline.StepDate.SCALE.MONTH:this.current.setMonth(this.current.getMonth()+this.step);break;case links.Timeline.StepDate.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()+this.step)}else switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:this.current=
new Date(this.current.valueOf()+this.step);break;case links.Timeline.StepDate.SCALE.SECOND:this.current.setSeconds(this.current.getSeconds()+this.step);break;case links.Timeline.StepDate.SCALE.MINUTE:this.current.setMinutes(this.current.getMinutes()+this.step);break;case links.Timeline.StepDate.SCALE.HOUR:this.current.setHours(this.current.getHours()+this.step);break;case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:this.current.setDate(this.current.getDate()+this.step);
break;case links.Timeline.StepDate.SCALE.MONTH:this.current.setMonth(this.current.getMonth()+this.step);break;case links.Timeline.StepDate.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()+this.step)}if(this.step!=1)switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:this.current.getMilliseconds()<this.step&&this.current.setMilliseconds(0);break;case links.Timeline.StepDate.SCALE.SECOND:this.current.getSeconds()<this.step&&this.current.setSeconds(0);break;case links.Timeline.StepDate.SCALE.MINUTE:this.current.getMinutes()<
this.step&&this.current.setMinutes(0);break;case links.Timeline.StepDate.SCALE.HOUR:this.current.getHours()<this.step&&this.current.setHours(0);break;case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:this.current.getDate()<this.step+1&&this.current.setDate(1);break;case links.Timeline.StepDate.SCALE.MONTH:this.current.getMonth()<this.step&&this.current.setMonth(0)}if(this.current.valueOf()==a)this.current=new Date(this._end.valueOf())};
links.Timeline.StepDate.prototype.getCurrent=function(){return this.current};links.Timeline.StepDate.prototype.setScale=function(a,b){this.scale=a;if(b>0)this.step=b;this.autoScale=!1};links.Timeline.StepDate.prototype.setAutoScale=function(a){this.autoScale=a};
links.Timeline.StepDate.prototype.setMinimumStep=function(a){if(a!=void 0){if(31104E9>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=1E3;if(15552E9>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=500;if(31104E8>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=100;if(15552E8>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=50;if(31104E7>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=10;if(15552E7>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=
5;if(31104E6>a)this.scale=links.Timeline.StepDate.SCALE.YEAR,this.step=1;if(7776E6>a)this.scale=links.Timeline.StepDate.SCALE.MONTH,this.step=3;if(2592E6>a)this.scale=links.Timeline.StepDate.SCALE.MONTH,this.step=1;if(432E6>a)this.scale=links.Timeline.StepDate.SCALE.DAY,this.step=5;if(1728E5>a)this.scale=links.Timeline.StepDate.SCALE.DAY,this.step=2;if(864E5>a)this.scale=links.Timeline.StepDate.SCALE.DAY,this.step=1;if(432E5>a)this.scale=links.Timeline.StepDate.SCALE.WEEKDAY,this.step=1;if(144E5>
a)this.scale=links.Timeline.StepDate.SCALE.HOUR,this.step=4;if(36E5>a)this.scale=links.Timeline.StepDate.SCALE.HOUR,this.step=1;if(9E5>a)this.scale=links.Timeline.StepDate.SCALE.MINUTE,this.step=15;if(6E5>a)this.scale=links.Timeline.StepDate.SCALE.MINUTE,this.step=10;if(3E5>a)this.scale=links.Timeline.StepDate.SCALE.MINUTE,this.step=5;if(6E4>a)this.scale=links.Timeline.StepDate.SCALE.MINUTE,this.step=1;if(15E3>a)this.scale=links.Timeline.StepDate.SCALE.SECOND,this.step=15;if(1E4>a)this.scale=links.Timeline.StepDate.SCALE.SECOND,
this.step=10;if(5E3>a)this.scale=links.Timeline.StepDate.SCALE.SECOND,this.step=5;if(1E3>a)this.scale=links.Timeline.StepDate.SCALE.SECOND,this.step=1;if(200>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,this.step=200;if(100>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,this.step=100;if(50>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,this.step=50;if(10>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,this.step=10;if(5>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,
this.step=5;if(1>a)this.scale=links.Timeline.StepDate.SCALE.MILLISECOND,this.step=1}};
links.Timeline.StepDate.prototype.snap=function(a){if(this.scale==links.Timeline.StepDate.SCALE.YEAR){var b=a.getFullYear()+Math.round(a.getMonth()/12);a.setFullYear(Math.round(b/this.step)*this.step);a.setMonth(0);a.setDate(0);a.setHours(0);a.setMinutes(0);a.setSeconds(0);a.setMilliseconds(0)}else if(this.scale==links.Timeline.StepDate.SCALE.MONTH)a.getDate()>15?(a.setDate(1),a.setMonth(a.getMonth()+1)):a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0);else if(this.scale==
links.Timeline.StepDate.SCALE.DAY||this.scale==links.Timeline.StepDate.SCALE.WEEKDAY){switch(this.step){case 5:case 2:a.setHours(Math.round(a.getHours()/24)*24);break;default:a.setHours(Math.round(a.getHours()/12)*12)}a.setMinutes(0);a.setSeconds(0);a.setMilliseconds(0)}else if(this.scale==links.Timeline.StepDate.SCALE.HOUR){switch(this.step){case 4:a.setMinutes(Math.round(a.getMinutes()/60)*60);break;default:a.setMinutes(Math.round(a.getMinutes()/30)*30)}a.setSeconds(0);a.setMilliseconds(0)}else if(this.scale==
links.Timeline.StepDate.SCALE.MINUTE){switch(this.step){case 15:case 10:a.setMinutes(Math.round(a.getMinutes()/5)*5);a.setSeconds(0);break;case 5:a.setSeconds(Math.round(a.getSeconds()/60)*60);break;default:a.setSeconds(Math.round(a.getSeconds()/30)*30)}a.setMilliseconds(0)}else if(this.scale==links.Timeline.StepDate.SCALE.SECOND)switch(this.step){case 15:case 10:a.setSeconds(Math.round(a.getSeconds()/5)*5);a.setMilliseconds(0);break;case 5:a.setMilliseconds(Math.round(a.getMilliseconds()/1E3)*1E3);
break;default:a.setMilliseconds(Math.round(a.getMilliseconds()/500)*500)}else this.scale==links.Timeline.StepDate.SCALE.MILLISECOND&&(b=this.step>5?this.step/2:1,a.setMilliseconds(Math.round(a.getMilliseconds()/b)*b))};
links.Timeline.StepDate.prototype.isMajor=function(){switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:return this.current.getMilliseconds()==0;case links.Timeline.StepDate.SCALE.SECOND:return this.current.getSeconds()==0;case links.Timeline.StepDate.SCALE.MINUTE:return this.current.getHours()==0&&this.current.getMinutes()==0;case links.Timeline.StepDate.SCALE.HOUR:return this.current.getHours()==0;case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:return this.current.getDate()==
1;case links.Timeline.StepDate.SCALE.MONTH:return this.current.getMonth()==0;case links.Timeline.StepDate.SCALE.YEAR:return!1;default:return!1}};
links.Timeline.StepDate.prototype.getLabelMinor=function(a,b){if(b==void 0)b=this.current;switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:return String(b.getMilliseconds());case links.Timeline.StepDate.SCALE.SECOND:return String(b.getSeconds());case links.Timeline.StepDate.SCALE.MINUTE:return this.addZeros(b.getHours(),2)+":"+this.addZeros(b.getMinutes(),2);case links.Timeline.StepDate.SCALE.HOUR:return this.addZeros(b.getHours(),2)+":"+this.addZeros(b.getMinutes(),2);case links.Timeline.StepDate.SCALE.WEEKDAY:return a.DAYS_SHORT[b.getDay()]+
" "+b.getDate();case links.Timeline.StepDate.SCALE.DAY:return String(b.getDate());case links.Timeline.StepDate.SCALE.MONTH:return a.MONTHS_SHORT[b.getMonth()];case links.Timeline.StepDate.SCALE.YEAR:return String(b.getFullYear());default:return""}};
links.Timeline.StepDate.prototype.getLabelMajor=function(a,b){if(b==void 0)b=this.current;switch(this.scale){case links.Timeline.StepDate.SCALE.MILLISECOND:return this.addZeros(b.getHours(),2)+":"+this.addZeros(b.getMinutes(),2)+":"+this.addZeros(b.getSeconds(),2);case links.Timeline.StepDate.SCALE.SECOND:return b.getDate()+" "+a.MONTHS[b.getMonth()]+" "+this.addZeros(b.getHours(),2)+":"+this.addZeros(b.getMinutes(),2);case links.Timeline.StepDate.SCALE.MINUTE:return a.DAYS[b.getDay()]+" "+b.getDate()+
" "+a.MONTHS[b.getMonth()]+" "+b.getFullYear();case links.Timeline.StepDate.SCALE.HOUR:return a.DAYS[b.getDay()]+" "+b.getDate()+" "+a.MONTHS[b.getMonth()]+" "+b.getFullYear();case links.Timeline.StepDate.SCALE.WEEKDAY:case links.Timeline.StepDate.SCALE.DAY:return a.MONTHS[b.getMonth()]+" "+b.getFullYear();case links.Timeline.StepDate.SCALE.MONTH:return String(b.getFullYear());default:return""}};links.Timeline.StepDate.prototype.addZeros=function(a,b){for(var c=""+a;c.length<b;)c="0"+c;return c};
links.imageloader=function(){function a(a){if(e[a]==!0)return!0;var b=new Image;b.src=a;return b.complete?!0:!1}function b(a){return f[a]!=void 0}function c(c,d,i){i==void 0&&(i=!0);if(a(c))i&&d(c);else if(!b(c)||i){var k=f[c];if(!k)i=new Image,i.src=c,k=[],f[c]=k,i.onload=function(){e[c]=!0;delete f[c];for(var a=0;a<k.length;a++)k[a](c)};k.indexOf(d)==-1&&k.push(d)}}function d(a,b){for(var c=a.firstChild;c;){if(c.tagName=="IMG"){var e=c.src;b.indexOf(e)==-1&&b.push(e)}d(c,b);c=c.nextSibling}}var e=
{},f={};return{isLoaded:a,isLoading:b,load:c,loadAll:function(b,d,e){var f=[];b.forEach(function(b){a(b)||f.push(b)});if(f.length){var m=f.length;f.forEach(function(a){c(a,function(){m--;m==0&&d()},e)})}else e&&d()},filterImageUrls:d}}();links.Timeline.addEventListener=function(a,b,c,d){a.addEventListener?(d===void 0&&(d=!1),b==="mousewheel"&&navigator.userAgent.indexOf("Firefox")>=0&&(b="DOMMouseScroll"),a.addEventListener(b,c,d)):a.attachEvent("on"+b,c)};
links.Timeline.removeEventListener=function(a,b,c,d){a.removeEventListener?(d===void 0&&(d=!1),b==="mousewheel"&&navigator.userAgent.indexOf("Firefox")>=0&&(b="DOMMouseScroll"),a.removeEventListener(b,c,d)):a.detachEvent("on"+b,c)};links.Timeline.getTarget=function(a){if(!a)a=window.event;var b;if(a.target)b=a.target;else if(a.srcElement)b=a.srcElement;if(b.nodeType!=void 0&&b.nodeType==3)b=b.parentNode;return b};
links.Timeline.stopPropagation=function(a){if(!a)a=window.event;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0};links.Timeline.preventDefault=function(a){if(!a)a=window.event;a.preventDefault?a.preventDefault():a.returnValue=!1};links.Timeline.getAbsoluteLeft=function(a){for(var b=document.documentElement,c=document.body,d=a.offsetLeft,a=a.offsetParent;a!=null&&a!=c&&a!=b;)d+=a.offsetLeft,d-=a.scrollLeft,a=a.offsetParent;return d};
links.Timeline.getAbsoluteTop=function(a){for(var b=document.documentElement,c=document.body,d=a.offsetTop,a=a.offsetParent;a!=null&&a!=c&&a!=b;)d+=a.offsetTop,d-=a.scrollTop,a=a.offsetParent;return d};links.Timeline.getPageY=function(a){"targetTouches"in a&&a.targetTouches.length&&(a=a.targetTouches[0]);if("pageY"in a)return a.pageY;var b=document.documentElement,c=document.body;return a.clientY+(b&&b.scrollTop||c&&c.scrollTop||0)-(b&&b.clientTop||c&&c.clientTop||0)};
links.Timeline.getPageX=function(a){"targetTouches"in a&&a.targetTouches.length&&(a=a.targetTouches[0]);if("pageX"in a)return a.pageX;var b=document.documentElement,c=document.body;return a.clientX+(b&&b.scrollLeft||c&&c.scrollLeft||0)-(b&&b.clientLeft||c&&c.clientLeft||0)};links.Timeline.addClassName=function(a,b){for(var c=a.className.split(" "),d=b.split(" "),e=!1,f=0;f<d.length;f++)c.indexOf(d[f])==-1&&(c.push(d[f]),e=!0);if(e)a.className=c.join(" ")};
links.Timeline.removeClassName=function(a,b){for(var c=a.className.split(" "),d=b.split(" "),e=!1,f=0;f<d.length;f++){var g=c.indexOf(d[f]);g!=-1&&(c.splice(g,1),e=!0)}if(e)a.className=c.join(" ")};links.Timeline.isArray=function(a){return a instanceof Array?!0:Object.prototype.toString.call(a)==="[object Array]"};links.Timeline.clone=function(a){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b};
links.Timeline.parseJSONDate=function(a){if(a!=void 0){if(a instanceof Date)return a;var b=a.match(/\/Date\((-?\d+)([-\+]?\d{2})?(\d{2})?\)\//i);return b?(a=b[2]?36E5*b[2]+6E4*b[3]*(b[2]/Math.abs(b[2])):0,new Date(1*b[1]+a)):Date.parse(a)}};

View File

@ -0,0 +1,157 @@
div.timeline-frame {
position: relative;
overflow: hidden;
}
div.timeline-content {
position: relative;
overflow: hidden;
}
div.timeline-axis {
filter: alpha(opacity = 60);
-khtml-opacity: 0.6;
-moz-opacity: 0.6;
opacity: 0.6;
border-width: 1px;
border-top-style: solid;
}
div.timeline-axis-grid {
border-left-style: solid;
border-width: 1px;
}
div.timeline-axis-grid-minor {
filter: alpha(opacity = 30);
-khtml-opacity: 0.3;
-moz-opacity: 0.3;
opacity: 0.3;
}
div.timeline-axis-grid-major {
filter: alpha(opacity = 50);
-khtml-opacity: 0.5;
-moz-opacity: 0.5;
opacity: 0.5;
}
div.timeline-axis-text {
padding: 3px;
white-space: nowrap;
}
div.timeline-event {
display: inline-block;
}
div.timeline-event-selected {
z-index: 999;
}
div.timeline-event.timeline-event-box {
text-align: center;
border-style: solid;
border-width: 1px;
border-radius: 5px;
-moz-border-radius: 5px; /* For Firefox 3.6 and older */
}
div.timeline-event.timeline-event-dot {
border-style: solid;
border-width: 5px;
border-radius: 5px;
-moz-border-radius: 5px; /* For Firefox 3.6 and older */
}
div.timeline-event.timeline-event-range {
border-style: solid;
border-width: 1px;
border-radius: 2px;
-moz-border-radius: 2px; /* For Firefox 3.6 and older */
}
div.timeline-frame div.timeline-event-dot-container {
border: none;
}
div.timeline-event-range-drag-left {
cursor: w-resize;
z-index: 1000;
}
div.timeline-event-range-drag-right {
cursor: e-resize;
z-index: 1000;
}
div.timeline-event-line {
border-left-width: 1px;
border-left-style: solid;
}
div.timeline-event-content {
margin: 5px;
white-space: nowrap;
overflow: hidden;
}
div.timeline-groups-axis {
border-width: 1px;
}
div.timeline-groups-axis-onleft {
border-style: none groove none none;
}
div.timeline-groups-axis-onright {
border-style: none none none groove;
}
div.timeline-groups-text {
padding-left: 10px;
padding-right: 10px;
}
div.timeline-currenttime {
background-color: #FF7F6E;
width: 2px;
}
div.timeline-customtime {
background-color: #6E94FF;
width: 2px;
cursor: move;
}
div.timeline-navigation-new, div.timeline-navigation-delete,
div.timeline-navigation-zoom-in, div.timeline-navigation-zoom-out,
div.timeline-navigation-move-left, div.timeline-navigation-move-right {
cursor: pointer;
float: left;
padding: 5px;
text-decoration: none;
}
div.timeline-navigation-new-line {
border-right: dotted 1px;
}
div.timeline-navigation-delete {
padding: 0 0 0 5px;
background: url('img/deleteEvent.png') no-repeat center;
width: 13px;
height: 13px;
}
div.timeline-selectable div.timeline-event {
cursor: pointer;
}
div.timeline-selectable div.timeline-event-content {
cursor: pointer;
}
div.timeline-event-selected div.timeline-event-content {
cursor: move;
}

View File

@ -0,0 +1,211 @@
div.timeline-frame {
-moz-box-sizing: border-box;
border: 1px solid #bebebe;
box-sizing: border-box;
overflow: hidden;
position: relative;
}
div.timeline-content {
overflow: hidden;
position: relative;
}
div.timeline-axis {
-moz-box-sizing: border-box;
border-color: #bebebe;
border-top-style: solid;
border-width: 1px;
box-sizing: border-box;
}
div.timeline-axis-grid {
-moz-box-sizing: border-box;
border-left-style: solid;
border-width: 1px;
box-sizing: border-box;
}
div.timeline-axis-grid-minor {
border-color: #e5e5e5;
}
div.timeline-axis-grid-major {
border-color: #bfbfbf;
}
div.timeline-axis-text {
color: #4d4d4d;
padding: 3px;
white-space: nowrap;
}
div.timeline-axis-text-minor {
}
div.timeline-axis-text-major {
}
div.timeline-event {
-moz-box-sizing: border-box;
background-color: #d5ddf6;
border-color: #97b0f8;
box-sizing: border-box;
color: #1a1a1a;
display: inline-block;
}
div.timeline-event-selected {
background-color: #fff785;
border-color: #ffc200;
z-index: 999;
}
/* TODO: use another color or pattern? */
div.timeline-event-cluster {
background: url('img/cluster_bg.png') #97b0f8;
color: #ffffff;
}
div.timeline-event-cluster div.timeline-event-dot {
border-color: #d5ddf6;
}
div.timeline-event-box {
-moz-border-radius: 5px; /* For Firefox 3.6 and older */
border-radius: 5px;
border-style: solid;
border-width: 1px;
text-align: center;
}
div.timeline-event-dot {
-moz-border-radius: 5px; /* For Firefox 3.6 and older */
border-radius: 5px;
border-style: solid;
border-width: 5px;
}
div.timeline-event-range {
-moz-border-radius: 2px; /* For Firefox 3.6 and older */
border-radius: 2px;
border-style: solid;
border-width: 1px;
}
div.timeline-event-range-drag-left {
cursor: w-resize;
z-index: 1000;
}
div.timeline-event-range-drag-right {
cursor: e-resize;
z-index: 1000;
}
div.timeline-event-line {
-moz-box-sizing: border-box;
border-left-style: solid;
border-left-width: 1px;
box-sizing: border-box;
}
div.timeline-event-content {
margin: 5px;
overflow: hidden;
white-space: nowrap;
}
div.timeline-groups-axis {
-moz-box-sizing: border-box;
border-color: #bebebe;
border-width: 1px;
box-sizing: border-box;
}
div.timeline-groups-axis-onleft {
border-style: none solid none none;
}
div.timeline-groups-axis-onright {
border-style: none none none solid;
}
div.timeline-groups-text {
color: #4d4d4d;
padding-left: 10px;
padding-right: 10px;
}
div.timeline-currenttime {
-moz-box-sizing: border-box;
background-color: #ff7f6e;
box-sizing: border-box;
width: 2px;
}
div.timeline-customtime {
-moz-box-sizing: border-box;
background-color: #6e94ff;
box-sizing: border-box;
cursor: move;
width: 2px;
}
div.timeline-navigation {
-moz-border-radius: 2px; /* For Firefox 3.6 and older */
-moz-box-sizing: border-box;
background-color: #f5f5f5;
border: 1px solid #bebebe;
border-radius: 2px;
box-sizing: border-box;
color: #808080;
font-family: arial;
font-size: 20px;
font-weight: bold;
}
div.timeline-navigation-new,
div.timeline-navigation-delete,
div.timeline-navigation-zoom-in,
div.timeline-navigation-zoom-out,
div.timeline-navigation-move-left,
div.timeline-navigation-move-right {
-moz-box-sizing: border-box;
box-sizing: border-box;
cursor: pointer;
float: left;
height: 36px;
padding: 10px;
text-decoration: none;
width: 36px;
}
div.timeline-navigation-new {
background: url('img/16/new.png') no-repeat center;
}
/* separator between new and navigation buttons */
div.timeline-navigation-new-line {
border-right: 1px solid #bebebe;
}
div.timeline-navigation-delete {
background: url('img/16/delete.png') no-repeat center;
}
div.timeline-navigation-zoom-in {
background: url('img/16/zoomin.png') no-repeat center;
}
div.timeline-navigation-zoom-out {
background: url('img/16/zoomout.png') no-repeat center;
}
div.timeline-navigation-move-left {
background: url('img/16/moveleft.png') no-repeat center;
}
div.timeline-navigation-move-right {
background: url('img/16/moveright.png') no-repeat center;
}

View File

@ -85,11 +85,12 @@ class SeedDMS_View_AdminTools extends SeedDMS_Bootstrap_Style {
<a href="../out/out.Statistic.php" class="span3 btn btn-medium"><i class="icon-tasks"></i><br /><?php echo getMLText("folders_and_documents_statistic")?></a> <a href="../out/out.Statistic.php" class="span3 btn btn-medium"><i class="icon-tasks"></i><br /><?php echo getMLText("folders_and_documents_statistic")?></a>
<a href="../out/out.Charts.php" class="span3 btn btn-medium"><i class="icon-bar-chart"></i><br /><?php echo getMLText("charts")?></a> <a href="../out/out.Charts.php" class="span3 btn btn-medium"><i class="icon-bar-chart"></i><br /><?php echo getMLText("charts")?></a>
<a href="../out/out.ObjectCheck.php" class="span3 btn btn-medium"><i class="icon-check"></i><br /><?php echo getMLText("objectcheck")?></a> <a href="../out/out.ObjectCheck.php" class="span3 btn btn-medium"><i class="icon-check"></i><br /><?php echo getMLText("objectcheck")?></a>
<a href="../out/out.Info.php" class="span3 btn btn-medium"><i class="icon-info-sign"></i><br /><?php echo getMLText("version_info")?></a> <a href="../out/out.Timeline.php" class="span3 btn btn-medium"><i class="icon-time"></i><br /><?php echo getMLText("timeline")?></a>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<a href="../out/out.Settings.php" class="span3 btn btn-medium"><i class="icon-wrench"></i><br /><?php echo getMLText("settings")?></a> <a href="../out/out.Settings.php" class="span3 btn btn-medium"><i class="icon-wrench"></i><br /><?php echo getMLText("settings")?></a>
<a href="../out/out.ExtensionMgr.php" class="span3 btn btn-medium"><i class="icon-cogs"></i><br /><?php echo getMLText("extension_manager")?></a> <a href="../out/out.ExtensionMgr.php" class="span3 btn btn-medium"><i class="icon-cogs"></i><br /><?php echo getMLText("extension_manager")?></a>
<a href="../out/out.Info.php" class="span3 btn btn-medium"><i class="icon-info-sign"></i><br /><?php echo getMLText("version_info")?></a>
</div> </div>
</div> </div>
<?php <?php

View File

@ -2110,8 +2110,7 @@ mayscript>
* *
* @param object $document document * @param object $document document
*/ */
protected function printTimeline($document) { /* {{{ */ protected function printTimeline($timeline, $height=300) { /* {{{ */
$timeline = $document->getTimeline();
?> ?>
<script type="text/javascript"> <script type="text/javascript">
var timeline; var timeline;
@ -2120,20 +2119,7 @@ mayscript>
data = [ data = [
<?php <?php
foreach($timeline as $item) { foreach($timeline as $item) {
switch($item['type']) { echo "{'start': new Date('".$item['date']."'), 'content': '".$item['msg']."'},";
case 'add_version':
$msg = getMLText('timeline_'.$item['type'], array('version'=> $item['params'][0]));
break;
case 'add_file':
$msg = getMLText('timeline_'.$item['type']);
break;
case 'status_change':
$msg = getMLText('timeline_'.$item['type'], array('version'=> $item['params'][0], 'status'=> getOverallStatusText($item['params'][1])));
break;
default:
$msg = '???';
}
echo "{'start': new Date('".$item['date']."'), 'content': '".$msg."'},";
} }
?> ?>
{ {
@ -2145,7 +2131,7 @@ mayscript>
// specify options // specify options
var options = { var options = {
'width': '100%', 'width': '100%',
'height': '300px', 'height': '<?= $height ?>px',
'editable': false, // enable dragging and editing events 'editable': false, // enable dragging and editing events
'style': 'box', 'style': 'box',
'locale': 'de_DE' 'locale': 'de_DE'

View File

@ -0,0 +1,114 @@
<?php
/**
* Implementation of Timeline view
*
* @category DMS
* @package SeedDMS
* @license GPL 2
* @version @version@
* @author Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010-2012 Uwe Steinmann
* @version Release: @package_version@
*/
/**
* Include parent class
*/
require_once("class.Bootstrap.php");
/**
* Class which outputs the html page for Timeline view
*
* @category DMS
* @package SeedDMS
* @author Markus Westphal, Malcolm Cowe, Uwe Steinmann <uwe@steinmann.cx>
* @copyright Copyright (C) 2002-2005 Markus Westphal,
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
* 2010-2012 Uwe Steinmann
* @version Release: @package_version@
*/
class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style {
var $dms;
var $folder_count;
var $document_count;
var $file_count;
var $storage_size;
function show() { /* {{{ */
$this->dms = $this->params['dms'];
$user = $this->params['user'];
$data = $this->params['data'];
$from = $this->params['from'];
$to = $this->params['to'];
$this->htmlAddHeader('<link href="../styles/'.$this->theme.'/timeline/timeline.css" rel="stylesheet">'."\n", 'css');
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/timeline/timeline-min.js"></script>'."\n", 'js');
$this->htmlAddHeader('<script type="text/javascript" src="../styles/'.$this->theme.'/timeline/timeline-locales.js"></script>'."\n", 'js');
$this->htmlStartPage(getMLText("timeline"));
$this->globalNavigation();
$this->contentStart();
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
?>
<?php
echo "<div class=\"row-fluid\">\n";
echo "<div class=\"span3\">\n";
$this->contentHeading(getMLText("timeline"));
echo "<div class=\"well\">\n";
?>
<form action="../out/out.Timeline.php" class="form form-inline" name="form1">
<div class="control-group">
<label class="control-label" for="startdate"><?= getMLText('date') ?></label>
<div class="controls">
<span class="input-append date" style="display: inline;" id="fromdate" data-date="<?php echo date('Y-m-d', $from); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input type="text" class="input-small" name="fromdate" value="<?php echo date('Y-m-d', $from); ?>"/>
<span class="add-on"><i class="icon-calendar"></i></span>
</span> -
<span class="input-append date" style="display: inline;" id="todate" data-date="<?php echo date('Y-m-d', $to); ?>" data-date-format="yyyy-mm-dd" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input type="text" class="input-small" name="todate" value="<?php echo date('Y-m-d', $to); ?>"/>
<span class="add-on"><i class="icon-calendar"></i></span>
</span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="enddate"></label>
<div class="controls">
<button type="submit" class="btn"><i class="icon-search"></i> <?php printMLText("action"); ?></button>
</div>
</div>
</form>
<?php
echo "</div>\n";
echo "</div>\n";
echo "<div class=\"span9\">\n";
$this->contentHeading(getMLText("timeline"));
foreach($data as &$item) {
switch($item['type']) {
case 'add_version':
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version']));
break;
case 'add_file':
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName())));
break;
case 'status_change':
$msg = getMLText('timeline_full_'.$item['type'], array('document'=>htmlspecialchars($item['document']->getName()), 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
break;
default:
$msg = '???';
}
$item['msg'] = $msg;
}
$this->printTimeline($data, 500);
echo "</div>\n";
echo "</div>\n";
$this->contentContainerEnd();
$this->htmlEndPage();
} /* }}} */
}
?>

View File

@ -1182,7 +1182,24 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
<?php <?php
if($user->isAdmin()) { if($user->isAdmin()) {
$this->contentHeading(getMLText("timeline")); $this->contentHeading(getMLText("timeline"));
$this->printTimeline($document); $timeline = $document->getTimeline();
foreach($timeline as &$item) {
switch($item['type']) {
case 'add_version':
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document'], 'version'=> $item['version']));
break;
case 'add_file':
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document']));
break;
case 'status_change':
$msg = getMLText('timeline_'.$item['type'], array('document'=>$item['document'], 'version'=> $item['version'], 'status'=> getOverallStatusText($item['status'])));
break;
default:
$msg = '???';
}
$item['msg'] = $msg;
}
$this->printTimeline($timeline);
} }
?> ?>
</div> </div>