From 0b7120239ea41072bca3915e2b8f112e9cde8a3f Mon Sep 17 00:00:00 2001 From: steinm Date: Wed, 19 Oct 2011 08:56:15 +0000 Subject: [PATCH] - use themes from dir themes if available - fixed error in javascript to show attributes of file in Jumploader - lots of vim folding --- inc/inc.ClassUI.php | 164 ++++++++++++++++++++++++-------------------- 1 file changed, 88 insertions(+), 76 deletions(-) diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index adc273e03..300575b29 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -96,8 +96,8 @@ $icons["mml"] = "ooo_formula.png"; $icons["default"] = "default.png"; class UI { - function getStyles() { - GLOBAL $settings; + function getStyles() { /* {{{ */ + global $settings; $themes = array(); $path = $settings->_rootDir . "styles/"; @@ -111,30 +111,38 @@ class UI { } closedir($handle); return $themes; - } + } /* }}} */ - function htmlStartPage($title="", $bodyClass="") { + function htmlStartPage($title="", $bodyClass="") { /* {{{ */ global $theme, $settings; - echo "\n"; - echo "\n\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "".(strlen($settings->_siteName)>0 ? $settings->_siteName : "LetoDMS").(strlen($title)>0 ? ": " : "").$title."\n"; - echo "\n"; - echo "0 ? " class=\"".$bodyClass."\"" : "").">\n"; - } + if(file_exists("../themes/".$theme."/HTMLHead.html")) { + include("../themes/".$theme."/HTMLHead.html"); + } else { + echo "\n"; + echo "\n\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "".(strlen($settings->_siteName)>0 ? $settings->_siteName : "LetoDMS").(strlen($title)>0 ? ": " : "").$title."\n"; + echo "\n"; + echo "0 ? " class=\"".$bodyClass."\"" : "").">\n"; + } + } /* }}} */ - function htmlEndPage() { + function htmlEndPage() { /* {{{ */ UI::footNote(); - echo "\n\n"; - } + if(file_exists("../themes/".$theme."/HTMLFoot.html")) { + include("../themes/".$theme."/HTMLFoot.html"); + } else { + echo "\n\n"; + } + } /* }}} */ - function footNote() { + function footNote() { /* {{{ */ global $settings; if ($settings->_printDisclaimer){ @@ -146,9 +154,9 @@ class UI { } return; - } + } /* }}} */ - function globalBanner() { + function globalBanner() { /* {{{ */ global $settings; echo "
\n"; @@ -160,9 +168,9 @@ class UI { echo "
 
\n". "
\n"; return; - } + } /* }}} */ - function globalNavigation($folder=null) { + function globalNavigation($folder=null) { /* {{{ */ global $settings, $user; @@ -201,9 +209,9 @@ class UI { echo "
 
\n". "\n"; return; - } + } /* }}} */ - function pageNavigation($pageTitle, $pageType=null, $extra=null) { + function pageNavigation($pageTitle, $pageType=null, $extra=null) { /* {{{ */ global $settings, $user; echo "
\n"; @@ -239,9 +247,9 @@ class UI { } return; - } + } /* }}} */ - function folderNavigationBar($folder) { + function folderNavigationBar($folder) { /* {{{ */ global $user, $settings, $theme; @@ -272,9 +280,9 @@ class UI { } echo "\n"; return; - } + } /* }}} */ - function documentNavigationBar() { + function documentNavigationBar() { /* {{{ */ global $user, $settings, $document; @@ -309,9 +317,9 @@ class UI { } echo "\n"; return; - } + } /* }}} */ - function accountNavigationBar() { + function accountNavigationBar() { /* {{{ */ global $settings,$user; @@ -329,9 +337,9 @@ class UI { } echo "\n"; return; - } + } /* }}} */ - function myDocumentsNavigationBar() { + function myDocumentsNavigationBar() { /* {{{ */ echo "\n"; return; - } + } /* }}} */ - function adminToolsNavigationBar() { + function adminToolsNavigationBar() { /* {{{ */ global $settings; @@ -355,9 +363,9 @@ class UI { echo "
  • ".getMLText("global_default_keywords")."
  • \n"; echo "\n"; return; - } + } /* }}} */ - function calendarNavigationBar($d){ + function calendarNavigationBar($d){ /* {{{ */ global $settings,$user; @@ -371,9 +379,9 @@ class UI { echo "\n"; return; - } + } /* }}} */ - function pageList($pageNumber, $totalPages, $baseURI, $params) { + function pageList($pageNumber, $totalPages, $baseURI, $params) { /* {{{ */ if (!is_numeric($pageNumber) || !is_numeric($totalPages) || $totalPages<2) { return; @@ -414,42 +422,44 @@ class UI { echo "
    "; return; - } - - function contentContainer($content) { + } /* }}} */ + function contentContainer($content) { /* {{{ */ echo "
    \n"; echo "
    \n"; echo "
    \n"; echo $content; echo "
    \n
    \n
    \n"; return; - } - function contentContainerStart() { + } /* }}} */ + + function contentContainerStart() { /* {{{ */ echo "
    \n"; echo "
    \n"; echo "
    \n"; return; - } - function contentContainerEnd() { + } /* }}} */ + + function contentContainerEnd() { /* {{{ */ echo "
    \n
    \n
    \n"; return; - } + } /* }}} */ - function contentHeading($heading) { + function contentHeading($heading) { /* {{{ */ echo "
    ".$heading."
    \n"; return; - } - function contentSubHeading($heading, $first=false) { + } /* }}} */ + + function contentSubHeading($heading, $first=false) { /* {{{ */ echo "
    ".$heading."
    \n"; return; - } + } /* }}} */ - function getMimeIcon($fileType) { + function getMimeIcon($fileType) { /* {{{ */ global $icons; $ext = strtolower(substr($fileType, 1)); @@ -459,9 +469,9 @@ class UI { else { return $icons["default"]; } - } + } /* }}} */ - function printDateChooser($defDate = -1, $varName) { + function printDateChooser($defDate = -1, $varName) { /* {{{ */ if ($defDate == -1) $defDate = mktime(); @@ -496,9 +506,9 @@ class UI { print ">" . $i . "\n"; } print ""; - } + } /* }}} */ - function printSequenceChooser($objArr, $keepID = -1) { + function printSequenceChooser($objArr, $keepID = -1) { /* {{{ */ if (count($objArr) > 0) { $max = $objArr[count($objArr)-1]->getSequence() + 1; $min = $objArr[0]->getSequence() - 1; @@ -522,9 +532,9 @@ class UI { print "