From a71cb01c85a85e488b1b55a9451d559d7ff055c8 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 16 Dec 2015 07:14:04 +0100 Subject: [PATCH] ??? --- out/out.Charts.php | 2 +- out/out.LogManagement.php | 2 +- out/out.Statistic.php | 2 +- views/bootstrap/class.BackupTools.php | 2 + views/bootstrap/class.Charts.php | 113 ++++++++++++------------ views/bootstrap/class.LogManagement.php | 6 +- views/bootstrap/class.Statistic.php | 14 --- views/bootstrap/class.Timeline.php | 78 ++++++++-------- 8 files changed, 103 insertions(+), 116 deletions(-) diff --git a/out/out.Charts.php b/out/out.Charts.php index 4c7b09534..0e9844164 100644 --- a/out/out.Charts.php +++ b/out/out.Charts.php @@ -44,7 +44,7 @@ switch($type) { $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'rootfolder'=>$rootfolder, 'type'=>$type, 'data'=>$data)); if($view) { - $view->show(); + $view($_GET); exit; } diff --git a/out/out.LogManagement.php b/out/out.LogManagement.php index 9375b9258..5e7e74d89 100644 --- a/out/out.LogManagement.php +++ b/out/out.LogManagement.php @@ -36,7 +36,7 @@ else $mode='web'; $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'logname'=>$logname, 'mode'=>$mode, 'contentdir'=>$settings->_contentDir)); if($view) { - $view->show(); + $view($_GET); exit; } diff --git a/out/out.Statistic.php b/out/out.Statistic.php index 6b0d8510d..8a81151e1 100644 --- a/out/out.Statistic.php +++ b/out/out.Statistic.php @@ -31,7 +31,7 @@ $rootfolder = $dms->getFolder($settings->_rootFolderID); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'rootfolder'=>$rootfolder)); if($view) { - $view->show(); + $view($_GET); exit; } diff --git a/views/bootstrap/class.BackupTools.php b/views/bootstrap/class.BackupTools.php index 9dbc5a1b1..252b2cb22 100644 --- a/views/bootstrap/class.BackupTools.php +++ b/views/bootstrap/class.BackupTools.php @@ -32,6 +32,8 @@ require_once("class.Bootstrap.php"); class SeedDMS_View_BackupTools extends SeedDMS_Bootstrap_Style { function js() { /* {{{ */ + header('Content-Type: application/json'); + $this->printFolderChooserJs("form1"); $this->printFolderChooserJs("form2"); $this->printFolderChooserJs("form3"); diff --git a/views/bootstrap/class.Charts.php b/views/bootstrap/class.Charts.php index 101348018..9ca2b287c 100644 --- a/views/bootstrap/class.Charts.php +++ b/views/bootstrap/class.Charts.php @@ -30,68 +30,14 @@ require_once("class.Bootstrap.php"); * @version Release: @package_version@ */ class SeedDMS_View_Charts 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']; - $rootfolder = $this->params['rootfolder']; + function js() { /* {{{ */ $data = $this->params['data']; $type = $this->params['type']; - $this->htmlAddHeader( - ''."\n". - ''."\n". - ''."\n". - ''."\n"); - - $this->htmlStartPage(getMLText("folders_and_documents_statistic")); - $this->globalNavigation(); - $this->contentStart(); - $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + header('Content-Type: application/json'); ?> - -\n"; - -echo "
\n"; -$this->contentHeading(getMLText("chart_selection")); -echo "
\n"; -foreach(array('docsperuser', 'sizeperuser', 'docspermimetype', 'docspercategory', 'docsperstatus', 'docspermonth', 'docsaccumulated') as $atype) { - echo "
".getMLText('chart_'.$atype.'_title')."
\n"; -} -echo "
\n"; -echo "
\n"; - -if(in_array($type, array('docspermonth', 'docsaccumulated'))) { - echo "
\n"; -} else { - echo "
\n"; -} -$this->contentHeading(getMLText('chart_'.$type.'_title')); -echo "
\n"; -?> -
-\n"; -echo "
\n"; - -if(!in_array($type, array('docspermonth', 'docsaccumulated'))) { - echo "
\n"; - $this->contentHeading(getMLText('legend')); - echo "
\n"; - echo "
\n"; - echo "
\n"; -} - -echo "
\n"; -?> -'."\n". + ''."\n". + ''."\n". + ''."\n"); + + $this->htmlStartPage(getMLText("folders_and_documents_statistic")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation(getMLText("admin_tools"), "admin_tools"); + ?> - + \n"; + +echo "
\n"; +$this->contentHeading(getMLText("chart_selection")); +echo "
\n"; +foreach(array('docsperuser', 'sizeperuser', 'docspermimetype', 'docspercategory', 'docsperstatus', 'docspermonth', 'docsaccumulated') as $atype) { + echo "
".getMLText('chart_'.$atype.'_title')."
\n"; +} +echo "
\n"; +echo "
\n"; + +if(in_array($type, array('docspermonth', 'docsaccumulated'))) { + echo "
\n"; +} else { + echo "
\n"; +} +$this->contentHeading(getMLText('chart_'.$type.'_title')); +echo "
\n"; +?> +
+\n"; +echo "
\n"; + +if(!in_array($type, array('docspermonth', 'docsaccumulated'))) { + echo "
\n"; + $this->contentHeading(getMLText('legend')); + echo "
\n"; + echo "
\n"; + echo "
\n"; +} + +echo "
\n"; $this->contentContainerEnd(); $this->htmlEndPage(); diff --git a/views/bootstrap/class.LogManagement.php b/views/bootstrap/class.LogManagement.php index 9e5800c55..c9547f96b 100644 --- a/views/bootstrap/class.LogManagement.php +++ b/views/bootstrap/class.LogManagement.php @@ -67,7 +67,10 @@ class SeedDMS_View_LogManagement extends SeedDMS_Bootstrap_Style { if ($print_header) printMLText("empty_notify_list"); else print "\n"; - echo "\n"; } /* }}} */ function show() { /* {{{ */ diff --git a/views/bootstrap/class.Statistic.php b/views/bootstrap/class.Statistic.php index 36b69dbb7..783ddbae1 100644 --- a/views/bootstrap/class.Statistic.php +++ b/views/bootstrap/class.Statistic.php @@ -175,20 +175,6 @@ class SeedDMS_View_Statistic extends SeedDMS_Bootstrap_Style { } - - contentHeading(getMLText("folders_and_documents_statistic")); diff --git a/views/bootstrap/class.Timeline.php b/views/bootstrap/class.Timeline.php index 940b6f354..764e38cb9 100644 --- a/views/bootstrap/class.Timeline.php +++ b/views/bootstrap/class.Timeline.php @@ -30,11 +30,6 @@ require_once("class.Bootstrap.php"); * @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 iteminfo() { /* {{{ */ $dms = $this->params['dms']; @@ -130,6 +125,30 @@ class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style { echo json_encode($jsondata); } /* }}} */ + function js() { /* {{{ */ + header('Content-Type: application/json'); +?> +$(document).ready(function () { + $('#update').click(function(ev){ + ev.preventDefault(); + $.getJSON( + 'out.Timeline.php?action=data&' + $('#form1').serialize(), + function(data) { + $.each( data, function( key, val ) { + val.start = new Date(val.start); + }); + timeline.setData(data); + timeline.redraw(); +// timeline.setVisibleChartRange(0,0); + } + ); + }); +}); +$skip))); + $this->printTimelineJs($timelineurl, 550, ''/*date('Y-m-d', $from)*/, ''/*date('Y-m-d', $to+1)*/, $skip); + } /* }}} */ + function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; @@ -160,11 +179,11 @@ class SeedDMS_View_Timeline extends SeedDMS_Bootstrap_Style { ?> \n"; + echo "
\n"; -echo "
\n"; -$this->contentHeading(getMLText("timeline")); -echo "
\n"; + echo "
\n"; + $this->contentHeading(getMLText("timeline")); + echo "
\n"; ?>
@@ -200,39 +219,18 @@ echo "
\n";
$skip))); -?> - -\n"; -echo "
"; -echo "
\n"; + echo "
\n"; + echo "
"; + echo "
\n"; -echo "
\n"; -$this->contentHeading(getMLText("timeline")); -$this->printTimeline($timelineurl, 550, ''/*date('Y-m-d', $from)*/, ''/*date('Y-m-d', $to+1)*/, $skip); -echo "
\n"; -echo "
\n"; + echo "
\n"; + $this->contentHeading(getMLText("timeline")); + $this->printTimelineHtml(550); + echo "
\n"; + echo "
\n"; -$this->contentContainerEnd(); -$this->htmlEndPage(); + $this->contentContainerEnd(); + $this->htmlEndPage(); } /* }}} */ } ?>