openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 8b66d57338fbfd302d71efd53e6ea0d58b8417e5
parent 54db670ad6c6cb879422be77ec21c4802b734757
Author: Jan Dankert <devnull@localhost>
Date:   Sun,  6 Nov 2011 21:37:29 +0100

Neu: Darstellung einer Workbench mit Perspektiven.

Diffstat:
action/TreeAction.class.php | 39++++++++++++++++++++-------------------
action/WorkbenchAction.class.php | 42++++++++++++++++++++++++++++++++++++++++++
action/WorkbenchAction.ini.php | 8++++++++
language/de.ini.php | 54+++++++++++++++++++++++++++++++++++-------------------
themes/default/css/layout.css | 556++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
themes/default/images/icon/window/maximize.gif | 0
themes/default/images/icon/window/menu.gif | 0
themes/default/images/icon/window/window.gif | 0
themes/default/include/html/button.inc.php | 6++++--
themes/default/include/html/link.inc.php | 15+++++++--------
themes/default/include/html/window-end.inc.php | 16++++++++++++++--
themes/default/include/html/window.inc.php | 11+++++++----
themes/default/js/openrat.js | 250+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
themes/default/layout/perspective/administration.ini.php | 25+++++++++++++++++++++++++
themes/default/layout/perspective/administration.php | 25+++++++++++++++++++++++++
themes/default/layout/perspective/header.php | 77+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/layout/perspective/login.ini.php | 9+++++++++
themes/default/layout/perspective/login.php | 10++++++++++
themes/default/layout/perspective/normal.ini.php | 26++++++++++++++++++++++++++
themes/default/layout/perspective/normal.php | 18++++++++++++++++++
themes/default/layout/perspective/start.ini.php | 9+++++++++
themes/default/layout/perspective/start.php | 10++++++++++
themes/default/templates/login/login.tpl.src.php | 5+++--
themes/default/templates/start/projectmenu.tpl.src.php | 2+-
themes/default/templates/title/show.tpl.src.php | 4++--
util/AdministrationTree.class.php | 12+++++++++++-
util/ProjectTree.class.php | 34+++++++++++++++++++++++++++++++---
util/TreeElement.class.php | 1+
28 files changed, 1121 insertions(+), 143 deletions(-)

diff --git a/action/TreeAction.class.php b/action/TreeAction.class.php @@ -74,35 +74,36 @@ class TreeAction extends Action /** * Neues Laden des Baumes */ - function load() + private function load() { global $SESS; - $projectid = $this->getRequestVar('projectid'); + $project = Session::getProject(); + $projectid = $project->projectid; if ( $projectid == -1 ) { $this->tree = new AdministrationTree(); - Session::setProjectLanguage(null); - Session::setProjectModel(null); - Session::setProject(null); +// Session::setProjectLanguage(null); +// Session::setProjectModel(null); +// Session::setProject(null); } else { - $project = new Project($projectid); - $project->load(); - Session::setProject($project); +// $project = new Project($projectid); +// $project->load(); +// Session::setProject($project); $this->tree = new ProjectTree(); $this->tree->projectId = $projectid; - $language = new Language( Language::getDefaultId() ); - $language->load(); - Session::setProjectLanguage( $language ); - - $model = new Model( Model::getDefaultId() ); - $model->load(); - Session::setProjectModel( $model ); +// $language = new Language( Language::getDefaultId() ); +// $language->load(); +// Session::setProjectLanguage( $language ); +// +// $model = new Model( Model::getDefaultId() ); +// $model->load(); +// Session::setProjectModel( $model ); } Session::setTree( $this->tree ); @@ -220,10 +221,10 @@ class TreeAction extends Action /** * Anzeigen des Baumes */ - function show() + public function show() { - if ( $this->hasRequestVar('projectid') ) - $this->load(); + //if ( $this->hasRequestVar('projectid') ) + $this->load(); $project = Session::getProject(); if ( is_object($project) ) @@ -233,7 +234,7 @@ class TreeAction extends Action $this->tree = Session::getTree(); - if ( $this->getRequestVar('target')!='tree' ) + //if ( $this->getRequestVar('target')!='tree' ) $this->tree->refresh(); $var = array(); diff --git a/action/WorkbenchAction.class.php b/action/WorkbenchAction.class.php @@ -0,0 +1,41 @@ +<?php + +/** + * Action-Klasse zum Bearbeiten einer Datei + * @author Jan Dankert + * @package openrat.actions + */ +class WorkbenchAction extends Action +{ + var $defaultSubAction = 'show'; + + private $perspective; + + /** + * Konstruktor + */ + function WorkbenchAction() + { + $this->perspective = Session::get('perspective'); + if ( empty($this->perspective) ) + { + $this->perspective = 'login'; + Session::set('perspective',$this->perspective); + } + } + + + /** + * Ersetzt den Inhalt mit einer anderen Datei + */ + public function show() + { + global $viewconfig; + $viewconfig = parse_ini_file('themes/default/layout/perspective/'.$this->perspective.'.ini.php',true); + require_once('themes/default/layout/perspective/header.php'); + require_once('themes/default/layout/perspective/'.$this->perspective.'.php'); + // Ausgabe fertig. + } +} + +?>+ \ No newline at end of file diff --git a/action/WorkbenchAction.ini.php b/action/WorkbenchAction.ini.php @@ -0,0 +1,7 @@ + +[default] +goto=show + +[show] +guest=true +direct=true+ \ No newline at end of file diff --git a/language/de.ini.php b/language/de.ini.php @@ -382,6 +382,8 @@ GLOBAL_ALL_LANGUAGES = "Alle Sprachen" GLOBAL_ARCHIVE =Archiv GLOBAL_ARCHIVE_DESC = "Alle historischen Inhalte zu diesem Platzhalter." GLOBAL_CHANGE = "ändern" +GLOBAL_CHANGE_TO = "Wechseln" +GLOBAL_OPEN_ALL = "Alle öffnen" GLOBAL_CLEAN_AFTER_PUBLISH = "Zielverzeichnis anschließend aufräumen und alte Dateien entfernen." GLOBAL_CLIPBOARD = Ablage GLOBAL_COMMENT = Kommentar @@ -505,6 +507,7 @@ GLOBAL_TEMPLATES_DESC = "Bearbeiten Sie Vorlagen, mit welchen Seiten erzeugt wer GLOBAL_TEMPLATES = Vorlagen GLOBAL_TEMPLATE = Vorlage GLOBAL_TO = nach +GLOBAL_TREE = "Übersicht" GLOBAL_TRANSFER = "Transfer" GLOBAL_TYPE = Typ GLOBAL_UNDO = "Rückgängig" @@ -592,6 +595,8 @@ MENU_FILE_COMPRESS_DESC =Die Datei komprimieren MENU_FILE_COMPRESS =Komprimieren MENU_FILE_EDIT_DESC ="Diese Datei durch eine andere ersetzen." MENU_FILE_EDIT ="Ersetzen" +MENU_FILE_SHOW_DESC ="Diese Datei anzeigen" +MENU_FILE_SHOW ="Vorschau" MENU_FILE_EDITVALUE_DESC =Inhalt bearbeiten MENU_FILE_EDITVALUE =Inhalt bearbeiten MENU_FILE_EXTRACT =Auspacken @@ -602,7 +607,6 @@ MENU_FILE_PUB_DESC ="Datei veröffentlichen" MENU_FILE_PUB ="Veröffentlichen" MENU_FILE_REMOVE =Datei löschen MENU_FILE_REMOVE =Löschen -MENU_FILE_RIGHTS =Anzeigen MENU_FILE_RIGHTS =Berechtigungen MENU_FILE_RIGHTS_DESC =Rechte dieser Datei ansehen MENU_FILE_SHOWPROP_DESC = Informationen und Eigenschaften zu dieser Datei anzeigen @@ -634,7 +638,7 @@ MENU_FOLDER_PUB_DESC ="Ordner veröffentlichen" MENU_FOLDER_PUB ="Veröffentlichen" MENU_FOLDER_REMOVE_DESC =Diesen Ordner entfernen MENU_FOLDER_REMOVE =Entfernen -MENU_FOLDER_RIGHTS =Anzeigen +MENU_FOLDER_RIGHTS =Berechtigungen MENU_FOLDER_RIGHTS_DESC =Liste der Berechtigungen anzeigen MENU_FOLDER_SELECT ="Auswahl" MENU_FOLDER_SELECT_DESC ="Verzeichniseinträge zum Kopieren, verschieben oder löschen auswählen" @@ -667,24 +671,22 @@ MENU_HELP_DESC=Onlinehilfe MENU_HELP=Hilfe MENU_IMPORT_DESC ="Dateien aus lokalem Dateiordner des Servers in einen Projektordner kopieren" MENU_IMPORT =Import -MENU_INDEX_ADMINISTRATION ="Administration" -MENU_INDEX_ADMINISTRATION_DESC ="Projektverwaltung und Benutzerverwaltung" -MENU_INDEX_APPLICATIONS="Anwendungen" -MENU_INDEX_APPLICATIONS_DESC="Weitere Anwendungen starten" -MENU_INDEX_CHANGEPASSWORD_DESC ="Kennwort ändern" -MENU_INDEX_CHANGEPASSWORD ="Kennwort" -MENU_INDEX_LOGIN =Anmeldung +MENU_START_ADMINISTRATION ="Administration" +MENU_START_ADMINISTRATION_DESC ="Projektverwaltung und Benutzerverwaltung" +MENU_START_APPLICATIONS="Anwendungen" +MENU_START_APPLICATIONS_DESC="Weitere Anwendungen starten" +MENU_LOGIN_LOGIN =Anmeldung MENU_INDEX_LOGOUT ="Abmelden" MENU_INDEX_LOGOUT_DESC ="Von dieser Anwendung abmelden." MENU_INDEX_MENU =Projekt auswählen -MENU_INDEX_PASSWORD_DESC ="Wenn Sie hier Kennwort nicht mehr wissen, können Sie es sich zusenden lassen." -MENU_INDEX_PASSWORD ="Kennwort vergessen" -MENU_INDEX_PROJECTMENU_DESC ="Wählen Sie ein Projekt aus, das Sie bearbeiten möchten" -MENU_INDEX_PROJECTMENU ="Projekt auswählen" -MENU_INDEX_REGISTER_DESC ="Sie müssen registriert sein, um diese Anwendung nutzen zu können." -MENU_INDEX_REGISTER ="Registrieren" -MENU_INDEX_SHOWLOGIN =Anmelden -MENU_INDEX_SHOWLOGIN_DESC ="Um die Anwendung zu nutzen, muessen sich sich anmelden." +MENU_LOGIN_PASSWORD_DESC ="Wenn Sie hier Kennwort nicht mehr wissen, können Sie es sich zusenden lassen." +MENU_LOGIN_PASSWORD ="Kennwort vergessen" +MENU_START_PROJECTMENU_DESC ="Wählen Sie ein Projekt aus, das Sie bearbeiten möchten" +MENU_START_PROJECTMENU ="Projekt auswählen" +MENU_LOGIN_REGISTER_DESC ="Sie müssen registriert sein, um diese Anwendung nutzen zu können." +MENU_LOGIN_REGISTER ="Registrieren" +MENU_LOGIN_LOGIN =Anmelden +MENU_LOGIN_LOGIN_DESC ="Um die Anwendung zu nutzen, muessen sich sich anmelden." MENU_LANGUAGE_ADD_DESC =Sprache hinzufügen MENU_LANGUAGE_ADD =Hinzufügen MENU_LANGUAGE_ADVANCED_DESC=Eigenschaften der Sprache einzeln bearbeiten @@ -701,7 +703,7 @@ MENU_LINK_EDIT_DESC = "Ziel bearbeiten" MENU_LINK_EDIT =Ziel MENU_LINK_PROP_DESC =Eigenschaften der Verknüpfung bearbeiten MENU_LINK_PROP =Eigenschaften -MENU_LINK_RIGHTS =Anzeigen +MENU_LINK_RIGHTS =Berechtigungen MENU_LINK_RIGHTS_DESC =Rechte dieser Verknüpfung ansehen MENU_LINK_SHOWPROP_DESC =Informationen und Eigenschaften der Verknüpfung anzeigen MENU_LINK_SHOWPROP = Information @@ -747,7 +749,9 @@ MENU_PAGE_PROP_DESC =Eigenschaften der Seite bearbeiten MENU_PAGE_PROP =Eigenschaften MENU_PAGE_PUB_DESC ="Seite veröffentlichen" MENU_PAGE_PUB ="Veröffentlichen" -MENU_PAGE_RIGHTS =Anzeigen +MENU_PAGE_SHOW = Vorschau +MENU_PAGE_SHOW_DESC = "Die Vorschau zu dieser Seite anzeigen (sog. WYSIWYG)" +MENU_PAGE_RIGHTS = Berechtigungen MENU_PAGE_RIGHTS_DESC =Rechte dieser Seite ansehen MENU_PAGE_SHOWPROP_DESC = Informationen und Eigenschaften der Seite anzeigen MENU_PAGE_SHOWPROP = Informationen @@ -792,6 +796,12 @@ MENU_PW = Kennwort MENU_RIGHTS = Berechtigungen MENU_RIGHTS_DESC = "Berechtigungen anzeigen und bearbeiten" MENU_RIGHTS_KEY = X +MENU_SETTINGS = Einstellungen +MENU_SETTINGS_DESC = "Einstellungen bearbeiten" +MENU_SETTINGS_KEY = E +MENU_GROUPS = Gruppen +MENU_GROUPS_DESC = "Gruppen bearbeiten" +MENU_GROUPS_KEY = G MENU_SEARCH_CONTENT_DESC = "Nach einem Inhalt suchen" MENU_SEARCH_CONTENT = "Inhalt" MENU_SEARCH_PROP_DESC = "Nach einer Eigenschaft suchen" @@ -869,6 +879,8 @@ MENU_TITLE_USER_LISTING =Benutzerliste MENU_TITLE_USER_MEMBERSHIPS =Mitgliedschaften MENU_TITLE_USER_PW =Kennwort ändern MENU_TITLE_USER_RIGHTS="Berechtigungen" +MENU_TREE_CONTENT="Inhalt" +MENU_TREE_SETTINGS="Einstellungen" MENU_TREETITLE_ADMINISTRATION =Administration MENU_TREETITLE_ADMINISTRATION_DESC = "Wechsel zur Systemadministration" MENU_TREETITLE_PROJECTMENU_DESC = "Anderes Projekt zur Bearbeitung auswählen" @@ -1096,3 +1108,6 @@ USER_USERNAME_DESC = "Mit diesem Namen meldet sich der Benutzer am System an" USER_YOURPROFILE = "Persönliche Einstellungen" VALUE = Inhalt WEEK="Woche" +JAVASCRIPT_REQUIRED="Bitte Javascript aktivieren" +HISTORY=Verlauf +WINDOW_FULLSCREEN="Vollbild"+ \ No newline at end of file diff --git a/themes/default/css/layout.css b/themes/default/css/layout.css @@ -36,10 +36,9 @@ a img {border:none;} body { background-color:#E0E0D5; - height:100%; - min-height:100%; } + iframe { width:100%; @@ -52,20 +51,19 @@ div.breadcrumb, div.breadcrumb a, div.window > div.title { - height:20px; x-background-color:grey; xsopacity:0.7; color:white; font-weight:bold; } -/* Einzel-Views */ +/* H e a d e r */ div#header { - height:19px; overflow:hidden; - margin:0px; padding:5px; + margin:0px; + margin-bottom:20px; } div#header a, @@ -93,6 +91,8 @@ div#header div.history margin-left:24px; } +/* + div#tree { padding:5px; @@ -100,12 +100,60 @@ div#tree margin-left:0px; float:left; } +*/ + +/* H o e h e n */ +html,body +{ + height:100%; +} + +div#header +{ + height:23px; +} + +/* div#tree, div#content { + height:auto; +} +*/ + +/*div.window { + height:90%; +} +*/ + +div.window > div.title +{ + height:20px; +} + +/* +div.window > div.menu +{ + height:50px; +} +*/ + + +div.window div.content +{ + height:auto; +} +div.window div.status +{ + height:35px; +} +div.window div.content div.filler +{ height:70%; + overflow:auto; } +/* div#content { padding:5px; @@ -114,6 +162,7 @@ div#content margin-top:0px; } +*/ div.content a.action, div.content a.help, @@ -146,13 +195,18 @@ div.content a.action, div.content a.help, div.content input.ok, div#header, -div.dropdown, div.window { -webkit-box-shadow: 3px 2px 5px gray; -moz-box-shadow: 3px 2px 5px gray; box-shadow: 3px 2px 5px gray; } +div.dropdown +{ + -webkit-box-shadow: 3px 2px 10px gray; + -moz-box-shadow: 3px 2px 10px gray; + box-shadow: 3px 2px 10px gray; +} a.help { @@ -170,7 +224,6 @@ a.help } a.action:hover, -a.action_active:hover, a.help:hover, div.noaction:hover, input.ok:hover @@ -180,7 +233,6 @@ input.ok:hover } a.action:active, -a.action_active:active, a.help:active, div.noaction:active, input.ok:active @@ -195,15 +247,18 @@ a } + +/* D r o p d o w n - M e n u e s */ div.dropdown { + z-index:2; display:none; opacity:0.95; background-color:white; position: absolute; padding:10px; - border:1px solid grey; + border:2px solid grey; -moz-border-radius:5px; /* Mozilla */ -webkit-border-radius:5px; /* Webkit */ -khtml-border-radius:5px; /* Konqui */ @@ -602,7 +657,6 @@ label div.menu { float:none; - height:50px; xclear:left; } @@ -709,20 +763,35 @@ body > div { display:none; } -/* Menue-Reiter */ +/* T a b s */ + +div.window div.menu > div.icons +{ + float:right; +} + + +div.window div.menu +{ + padding-top:20px; + padding-left:5px; + padding-right:5px; + border-bottom:2px solid grey; +} -div.window ul.menu { /* general settings */ +div.window div.menu ul.views { /* general settings */ text-align: left; /* set to left, right or center */ -margin: 1em 0 1em 0; /* set margins as desired */ -xfont: bold 11px verdana, arial, sans-serif; /* set font as desired */ -border-bottom: 1px solid #6c6; /* set border COLOR as desired */ list-style-type: none; -padding: 3px 10px 3px 10px; /* THIRD number must change with respect to padding-top (X) below */ } -div.window ul.menu li a, -div.window ul.menu li div{ /* do not change */ +div.window ul.views li +{ + padding-top:4px; + padding-bottom:4px; + padding-left:8px; + padding-right:8px; + cursor:pointer; -moz-border-radius-topleft:5px; /* Mozilla */ -webkit-border-radius-topleft:5px; /* Webkit */ -khtml-border-top-radius-topleft:5px; /* Konqui */ @@ -731,85 +800,73 @@ div.window ul.menu li div{ /* do not change */ -webkit-border-radius-topright:5px; /* Webkit */ -khtml-border-top-radius-topright:5px; /* Konqui */ border-top-right-radius:5px; - border:1px solid gray; -} - -div.window ul.menu li { /* do not change */ - + border-top:1px solid gray; + border-left:1px solid gray; + border-right:1px solid gray; + margin-right:10px; display: inline; } -div.window ul.menu li.action_active { /* settings for selected tab */ -border-bottom: 1px solid #fff; /* set border color to page background color */ -background-color: #fff; /* set background color to match above border color */ -} - -div.window ul.menu li.action_active a { /* settings for selected tab link */ -background-color: #fff; /* set selected tab background color as desired */ -color: #000; /* set selected tab link color as desired */ -xposition: relative; -top: 1px; -padding-top: 4px; /* must change with respect to padding (X) above and below */ -} -div.window ul.menu li a, -div.window ul.menu li > span -{ /* settings for all tab links */ -padding: 3px 4px; /* set padding (tab size) as desired; FIRST number must change with respect to padding-top (X) above */ -border: 1px solid #6c6; /* set border COLOR as desired; usually matches border color specified in #tabnav */ -color: #666; /* set unselected tab link color as desired */ -margin-right: 0px; /* set additional spacing between tabs as desired */ -text-decoration: none; -border-bottom: none; +div.window ul.views > li.active { + background-color: grey; + color: white; } -div.window ul.menu a:hover { /* settings for hover effect */ -background: #fff; /* set desired hover color */ +div.window ul.views li:hover { + background: grey; + color: white; } +/* +div#workbench div.frame { + padding:3px; + border:1px solid grey; + + -moz-border-radius:3px; + -webkit-border-radius:3px; + -khtml-border-radius:3px; + border-radius:3px; +} +*/ - +/* div.window { padding:3px; border:1px solid grey; - -moz-border-radius:5px; /* Mozilla */ - -webkit-border-radius:5px; /* Webkit */ - -khtml-border-radius:5px; /* Konqui */ + -moz-border-radius:5px; + -webkit-border-radius:5px; + -khtml-border-radius:5px; border-radius:5px; - - height:auto; - } +*/ - -div.window div.content { - padding:3px; +div.window { + padding:0px; border:1px solid grey; -moz-border-radius:3px; /* Mozilla */ -webkit-border-radius:3px; /* Webkit */ -khtml-border-radius:3px; /* Konqui */ border-radius:3px; - - overflow:auto; - height:100%; } -div.content table +div.window div.content table { overflow:auto; border:2px silver; } + table tr.headline > td { background-color: silver; background: -moz-linear-gradient(top, gray, silver); @@ -860,15 +917,18 @@ div.content pre { } /* Hintergrund Fenster */ +/* + div.window { background-color: #3399FF; } +*/ /* Sonstiger Fensterhintergrund */ div#header, /* Titelleite-Hintergrund */ div.window div.content, /* Fensterinhalt-Hintergrund */ div.window ul.menu li a, /* Tabs */ -div.window ul.menu li > span /* Tabs */ +xdiv.window ul.menu li > span /* Tabs */ { background-color: gray; } @@ -878,7 +938,7 @@ div.window ul.menu li > span /* Tabs */ /* S t a t u s z e i l e */ div.window div.status { - height:35px; padding:10px; + padding:10px; } div.window div.status div.error { xborder:1px solid silver; @@ -901,3 +961,373 @@ div.window div.status div.loader { height:25px; background: url(../images/loader.gif) no-repeat; } + +/* V o l l b i l d */ +div.window.fullscreen +{ + display:block; + z-index:109; + + /*set the div in the top-left corner of the screen*/ + xposition:absolute; + position:fixed; + top:0; + left:0; + background-color:silver; + + /*set the width and height to 100% of the screen*/ + width:100%; + height:100%; +} + +.invisible +{ + visibility:hidden; +} + + + +/* + Variable Grid System (Fluid Version). + Learn more ~ http://www.spry-soft.com/grids/ + Based on 960 Grid System - http://960.gs/ & 960 Fluid - http://www.designinfluences.com/ + + Licensed under GPL and MIT. +*/ + + +/* Containers +----------------------------------------------------------------------------------------------------*/ +.container_12 { + width: 96%; + margin-left: 2%; + margin-right: 2%; +} + +/* Grid >> Global +----------------------------------------------------------------------------------------------------*/ + +.grid_1, +.grid_2, +.grid_3, +.grid_4, +.grid_5, +.grid_6, +.grid_7, +.grid_8, +.grid_9, +.grid_10, +.grid_11, +.grid_12 { + display:inline; + float: left; + position: relative; + margin-left: 1%; + margin-right: 1%; +} + +/* Grid >> Children (Alpha ~ First, Omega ~ Last) +----------------------------------------------------------------------------------------------------*/ + +.alpha { + margin-left: 0; +} + +.omega { + margin-right: 0; +} + +/* Grid >> 12 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_12 .grid_1 { + width:6.333%; +} + +.container_12 .grid_2 { + width:14.667%; +} + +.container_12 .grid_3 { + width:23.0%; +} + +.container_12 .grid_4 { + width:31.333%; +} + +.container_12 .grid_5 { + width:39.667%; +} + +.container_12 .grid_6 { + width:48.0%; +} + +.container_12 .grid_7 { + width:56.333%; +} + +.container_12 .grid_8 { + width:64.667%; +} + +.container_12 .grid_9 { + width:73.0%; +} + +.container_12 .grid_10 { + width:81.333%; +} + +.container_12 .grid_11 { + width:89.667%; +} + +.container_12 .grid_12 { + width:98.0%; +} + + + +/* Prefix Extra Space >> 12 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_12 .prefix_1 { + padding-left:8.333%; +} + +.container_12 .prefix_2 { + padding-left:16.667%; +} + +.container_12 .prefix_3 { + padding-left:25.0%; +} + +.container_12 .prefix_4 { + padding-left:33.333%; +} + +.container_12 .prefix_5 { + padding-left:41.667%; +} + +.container_12 .prefix_6 { + padding-left:50.0%; +} + +.container_12 .prefix_7 { + padding-left:58.333%; +} + +.container_12 .prefix_8 { + padding-left:66.667%; +} + +.container_12 .prefix_9 { + padding-left:75.0%; +} + +.container_12 .prefix_10 { + padding-left:83.333%; +} + +.container_12 .prefix_11 { + padding-left:91.667%; +} + + + +/* Suffix Extra Space >> 12 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_12 .suffix_1 { + padding-right:8.333%; +} + +.container_12 .suffix_2 { + padding-right:16.667%; +} + +.container_12 .suffix_3 { + padding-right:25.0%; +} + +.container_12 .suffix_4 { + padding-right:33.333%; +} + +.container_12 .suffix_5 { + padding-right:41.667%; +} + +.container_12 .suffix_6 { + padding-right:50.0%; +} + +.container_12 .suffix_7 { + padding-right:58.333%; +} + +.container_12 .suffix_8 { + padding-right:66.667%; +} + +.container_12 .suffix_9 { + padding-right:75.0%; +} + +.container_12 .suffix_10 { + padding-right:83.333%; +} + +.container_12 .suffix_11 { + padding-right:91.667%; +} + + + +/* Push Space >> 12 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_12 .push_1 { + left:8.333%; +} + +.container_12 .push_2 { + left:16.667%; +} + +.container_12 .push_3 { + left:25.0%; +} + +.container_12 .push_4 { + left:33.333%; +} + +.container_12 .push_5 { + left:41.667%; +} + +.container_12 .push_6 { + left:50.0%; +} + +.container_12 .push_7 { + left:58.333%; +} + +.container_12 .push_8 { + left:66.667%; +} + +.container_12 .push_9 { + left:75.0%; +} + +.container_12 .push_10 { + left:83.333%; +} + +.container_12 .push_11 { + left:91.667%; +} + + + +/* Pull Space >> 12 Columns +----------------------------------------------------------------------------------------------------*/ + + +.container_12 .pull_1 { + left:-8.333%; +} + +.container_12 .pull_2 { + left:-16.667%; +} + +.container_12 .pull_3 { + left:-25.0%; +} + +.container_12 .pull_4 { + left:-33.333%; +} + +.container_12 .pull_5 { + left:-41.667%; +} + +.container_12 .pull_6 { + left:-50.0%; +} + +.container_12 .pull_7 { + left:-58.333%; +} + +.container_12 .pull_8 { + left:-66.667%; +} + +.container_12 .pull_9 { + left:-75.0%; +} + +.container_12 .pull_10 { + left:-83.333%; +} + +.container_12 .pull_11 { + left:-91.667%; +} + + + + +/* Clear Floated Elements +----------------------------------------------------------------------------------------------------*/ + +/* http://sonspring.com/journal/clearing-floats */ + +.clear { + clear: both; + display: block; + overflow: hidden; + visibility: hidden; + width: 0; + height: 0; +} + +/* http://perishablepress.com/press/2008/02/05/lessons-learned-concerning-the-clearfix-css-hack */ + +.clearfix:after { + clear: both; + content: ' '; + display: block; + font-size: 0; + line-height: 0; + visibility: hidden; + width: 0; + height: 0; +} + +.clearfix { + display: inline-block; +} + +* html .clearfix { + height: 1%; +} + +.clearfix { + display: block; +} + diff --git a/themes/default/images/icon/window/maximize.gif b/themes/default/images/icon/window/maximize.gif Binary files differ. diff --git a/themes/default/images/icon/window/menu.gif b/themes/default/images/icon/window/menu.gif Binary files differ. diff --git a/themes/default/images/icon/window/window.gif b/themes/default/images/icon/window/window.gif Binary files differ. diff --git a/themes/default/include/html/button.inc.php b/themes/default/include/html/button.inc.php @@ -1,3 +1,4 @@ +<div class="invisible"> <?php #IF-ATTR-VALUE type:ok# if ($this->isEditable() && !$this->isEditMode() && !readonly() ) @@ -27,4 +28,5 @@ ?><a class="action" href="<?php echo Html::url($actionName,$subactionName,0,array('mode'=>'')) ?>"><span title="<?php echo lang('CANCEL_DESC') ?>"><?php echo langHtml('CANCEL') ?></span></a><?php } #END-IF -?>- \ No newline at end of file +?> +</div>+ \ No newline at end of file diff --git a/themes/default/include/html/link.inc.php b/themes/default/include/html/link.inc.php @@ -34,14 +34,13 @@ $attr_target = $view; #END-IF - #IF-ATTR action# - $tmp_url = Html::url($attr_action,$attr_subaction,!empty($attr_id)?$attr_id:$this->getRequestId(),$params); - #END-IF - #IF-ATTR url# - $tmp_url = $attr_url; - #END-IF + //$tmp_url = Html::url($attr_action,$attr_subaction,!empty($attr_id)?$attr_id:$this->getRequestId(),$params); + $json = new JSON(); + $tmp_data = $json->encode( array('action'=>!empty($attr_action)?$attr_action:$this->actionName,'subaction'=>!empty($attr_subaction)?$attr_subaction:$this->subActionName,'id'=>!empty($attr_id)?$attr_id:$this->getRequestId()) + +array(REQ_PARAM_TOKEN=>token()) + +$params ); if ( substr($tmp_url,0,10) != 'javascript' ) $tmp_url = "javascript:loadViewByName('".$attr_target."','".$tmp_url.(isset($attr_anchor)?'#'.$attr_anchor:'')."'); return false;"; -?><a target="<?php echo $attr_frame ?>"<?php if (isset($attr_name)) { ?> name="<?php echo $attr_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_url ?>"<?php } ?> class="<?php echo $attr_class ?>"<?php if (isset($attr_accesskey)) echo ' accesskey="'.$attr_accesskey.'"' ?> title="<?php echo encodeHtml($attr_title) ?>">- \ No newline at end of file +?><a target="<?php echo $attr_frame ?>"<?php if (isset($attr_name)) { ?> name="<?php echo $attr_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="linkSubmit('<?php echo str_replace("\n",'',str_replace('"','&quot;',$tmp_data)) ?>');" <?php } ?> class="<?php echo $attr_class ?>"<?php if (isset($attr_accesskey)) echo ' accesskey="'.$attr_accesskey.'"' ?> title="<?php echo encodeHtml($attr_title) ?>">+ \ No newline at end of file diff --git a/themes/default/include/html/window-end.inc.php b/themes/default/include/html/window-end.inc.php @@ -1,7 +1,17 @@ - +<?php if (false) { ?> +</div> </div> -<div class="status"></div> +<div class="bottom"> + + <div class="status"> + </div> + <div class="command"> + <input type="button" value="<?php echo lang('OK') ?>" onclick="formSubmit( $(this),'<?php echo $view ?>');" /> + <input type="cancel" value="<?php echo lang('CANCEL') ?>" /> + </div> + +</div> </div> @@ -12,3 +22,4 @@ <?php $dur = time()-START_TIME; echo floor($dur/60).':'.str_pad($dur%60,2,'0',STR_PAD_LEFT); ?></small></center> <?php } ?> +<?php } ?>+ \ No newline at end of file diff --git a/themes/default/include/html/window.inc.php b/themes/default/include/html/window.inc.php @@ -1,3 +1,4 @@ +<?php if (false) { ?> <div class="window"> <div class="title"> @@ -55,14 +56,14 @@ if ( $tmp_pos !== false ) $tmp_text = substr($tmp_text,0,max($tmp_pos,0)).'<span class="accesskey">'. substr($tmp_text,$tmp_pos,1).'</span>'.substr($tmp_text,$tmp_pos+1); - $liClass = (isset($menu['url'])?'':'no').'action'.($this->subActionName==$menu['subaction']?'_active':''); + $liClass = (isset($menu['url'])?'':'no').'action'.($this->subActionName==$menu['subaction']?' active':''); $icon_url = $image_dir.'icon/'.$menu['subaction'].'.png'; ?><li class="<?php echo $liClass?>"><?php if ( isset($menu['url']) ) { $link_url = Html::url($actionName,$menu['subaction'],$this->getRequestId() ); - ?><a href="javascript:void(0);" onclick="javascript:loadViewByName('<?php echo $view ?>','<?php echo $link_url ?>'); return false; " accesskey="<?php echo $tmp_key ?>" title="<?php echo langHtml($menu['text'].'_DESC') ?>"><img src="<?php echo $icon_url ?>" /><?php echo $tmp_text ?></a><?php + ?><a href="javascript:void(0);" onclick="javascript:loadSubaction(this,'<?php echo $actionName ?>','<?php echo $menu['subaction'] ?>','<?php echo $this->getRequestId() ?>'); return false; " accesskey="<?php echo $tmp_key ?>" title="<?php echo langHtml($menu['text'].'_DESC') ?>"><img src="<?php echo $icon_url ?>" /><?php echo $tmp_text ?></a><?php } else { @@ -105,4 +106,6 @@ <?php } ?> -<div class="content">- \ No newline at end of file +<div class="content"><div class="filler"> + +<?php } ?>+ \ No newline at end of file diff --git a/themes/default/js/openrat.js b/themes/default/js/openrat.js @@ -8,21 +8,92 @@ $(document).ready(function() }); + function refreshAll() { - // Initial die Views über AJAX befüllen. - $('div#header, div#content').each( function(index){ - loadView( $(this),'./dispatcher.php?target='+this.id ); - //$(this).fadeIn(); + + refreshHeader(); + refreshWorkbench(); +} + + +function refreshAllRefreshables() { + + // Default-Inhalte der einzelnen Views laden. + $('div#workbench div.refreshable li.active').each( function() { + var method = $(this).attr('data-method'); + var p = $(this).parent().parent().parent().parent().parent(); + var action = p.attr('data-action'); + var id = p.attr('data-id'); + //alert(method+' '+action); + + + //alert('go2'); + loadView( p.find('div.filler'),createUrl(action,method,id)); + }); + +} + + + +/** + * Lade die Workbench neu. + */ +function refreshWorkbench() +{ + // Workbench laden + $('div#workbench').empty().load(createUrl('workbench','show',0),null,function() { + + // Default-Inhalte der einzelnen Views laden. + $(this).fadeIn('fast').find('li.active').each( function() { + var method = $(this).attr('data-method'); + var p = $(this).parent().parent().parent().parent().parent(); + var action = p.attr('data-action'); + //alert(method+' '+action); + + + //alert('go2'); + loadView( p.find('div.filler'),createUrl(action,method,0)); + }); + + // OnClick-Handler für Klick auf einen Tab-Reiter. + $('ul.views > li.action').click( function() { + var method = $(this).attr('data-method'); + var p = $(this).parent().parent().parent().parent().parent(); + var action = p.attr('data-action'); + var id = p.attr('data-id'); + p.find('ul.views li.active').removeClass('active'); + $(this).addClass('active'); + loadView( p.find('div.filler'),createUrl(action,method,id)); + }); }); + //alert('go'); + - loadTree(); + loadTree(); // ?? // Modale Dialoge //$('form.login, form.profile').dialog( { modal:true, resizable:false, width:760, height:600, draggable: false } ); } +/** + * Laedt den Header neu. + */ +function refreshHeader() +{ + $('div#header').each( function(index){ + loadView( $(this),createUrl('title','show',0 ) ); + }); + + registerHeaderEvents(); + + // Modale Dialoge + //$('form.login, form.profile').dialog( { modal:true, resizable:false, width:760, height:600, draggable: false } ); +} + + + function loadViewByName(viewName, url ) { loadView( $('div#'+viewName),url ); @@ -30,6 +101,7 @@ function loadViewByName(viewName, url ) function loadView(jo, url ) { + //alert("Lade "+url + " in Objekt "+jo); // E d i t o r var editorConfig = { skin : 'v2', @@ -39,22 +111,34 @@ function loadView(jo, url ) filebrowserBrowseUrl:'./dispatcher.php?action=filebrowser&subaction=browse' }; - $(jo).fadeOut('fast').load(url,null, function() { + $(jo).fadeOut('fast').empty().load(url,function() { $(jo).fadeIn(100); var o=CKEDITOR.instances[ $('textarea.editor').attr('name') ]; if (o) o.destroy(); //alert("o ist "+o); //$('textarea.editor').ckeditor( function() { /*alert("editor ready");*/ /* callback code */ }, editorConfig ); - CKEDITOR.replace('text',{ - customConfig : 'config-openrat.js' - }); + //CKEDITOR.replace('text',{ + // customConfig : 'config-openrat.js' + //}); + if ( $(jo).find('form').length > 0 ) + $(jo).parent().parent().find('div.bottom > div.command > input').removeClass('invisible'); + else + $(jo).parent().parent().find('div.bottom > div.command > input').addClass('invisible'); + + }); - +} + + + +function registerHeaderEvents() +{ // S u c h e $('div.search input').blur( function(){ $('div.search input div.dropdown').fadeOut(); }); + $('div.search input').keyup( function(){ var val = $(this).val(); @@ -129,16 +213,23 @@ array('Source','-', 'ShowBlocks','Maximize') ); */ } +function fullscreen( element ) { + $(element).fadeOut('fast', function() + { + $(this).toggleClass('fullscreen').fadeIn('fast'); + } ); +} + function loadTree() { // Oberstes Tree-Element erzeugen - $('div#tree div.window div.content').html("&nbsp;"); + $('div#tree div.window div.content div.filler').html("&nbsp;"); //$('div#tree div.window div.content').append('<ul class="tree"><li class="root"><div>Baum</div></li></ul>'); // Wurzel des Baums laden //loadBranch( $('div#tree ul.tree > li'),'root',0); - loadBranch( $('div#tree div.content'),'root',0); - $('div#tree div.content > ul.tree > li > div.tree').delay(500).click(); + loadBranch( $('div#tree div.content div.filler'),'root',0); + $('div#tree div.content div.filler > ul.tree > li > div.tree').delay(500).click(); } @@ -168,14 +259,26 @@ function loadBranch(li,type,id) $(new_li).children('div.tree').click( {},function(e) {loadBranch( $(e.target).parent(),line.type,line.internalId) }); // Zweig öffnen } - if ( line.url ) + if ( line.action ) { - $(new_li).children('div.entry').click( function() { loadViewByName('content',line.url.replace(/&amp;/g,'&')); }); // Objekt laden + // Onclick-Handler für auswählbare Objekte setzen + $(new_li).children('div.entry').click( function() { + //loadViewByName('content',line.url.replace(/&amp;/g,'&')); + //var url = './dispatcher.php'; + //$.ajax( { 'type':'POST',url:url, data:{'action':'tree','subaction':'select','id':line.id,'type':line.type},success:function(data, textStatus, jqXHR) +// { +// doResponse(data,textStatus); +// } } ); + // Den Objekt-Typ und die Objekt-Id für alle Views setzen (die dies zulassen) + $('div#workbench div.refreshable').attr('data-action',line.action).attr('data-id',line.id); + // Alle refresh-fähigen Views mit dem neuen Objekt laden. + refreshAllRefreshables(); + }); } }); //$(ul).children('li:last-child').addClass('last'); - $(ul).fadeIn(600); // Einblenden + $(ul).fadeIn('fast'); // Einblenden }); $(li).children('div.tree').unbind('click'); @@ -202,6 +305,20 @@ function closeBranch(li,type,id) } +function linkSubmit(data) +{ + var params = jQuery.parseJSON( data ); + var url = './dispatcher.php'; + $.ajax( { 'type':'POST',url:url, data:params, success:function(data, textStatus, jqXHR) + { + $('div.window div.status div.loader').html('&nbsp;'); + doResponse(data,textStatus); + } } ); + +} + + + function formSubmit(form) { $('div.window div.status').html('<div class="loader" />'); @@ -225,7 +342,10 @@ function formSubmit(form) function doResponse(data,status) { if ( status != 'success' ) - alert('Error while saving the values: ' + status); + { + alert('Server error: ' + status); + return; + } // Hinweismeldungen in Statuszeile anzeigen $.each(data['notices'], function(idx,value) { @@ -335,3 +455,98 @@ else input.value = input.value.substr(0, pos) + aTag + insText + eTag + input.value.substr(pos); } } + + + +function loadSubaction( el, actionName, subactionName,id ) +{ + // E d i t o r + var editorConfig = { + skin : 'v2', + baseHref: OR_THEMES_EXT_DIR+'../editor/editor/', + customConfig : 'config-openrat.js', + filebrowserUploadUrl:'./dispatcher.php?action=filebrowser&subaction=directupload&name=upload', + filebrowserBrowseUrl:'./dispatcher.php?action=filebrowser&subaction=browse' + }; + + var main = $(el).parent().parent().parent('div.window').children('div.content').first(); + $(main).load(createUrl(actionName,subactionName,id)+' div.content',null, function() { + var o=CKEDITOR.instances[ $('textarea.editor').attr('name') ]; + if (o) o.destroy(); + + //alert("o ist "+o); + //$('textarea.editor').ckeditor( function() { /*alert("editor ready");*/ /* callback code */ }, editorConfig ); + CKEDITOR.replace('text',{ + customConfig : 'config-openrat.js' + }); + }); + + $(el).parent().parent().find('.active').removeClass('active'); + $(el).parent().addClass('active'); + + +} + + + +function loadWindow( el, actionName, subactionName ) +{ + + // Zeichnet das Fenster-Gerüst, erstmal ohne Inhalt. + $(el).html('<div class="window"><div class="title"></div><ul class="menu"></div><div class="content"></div><div class="status"></div></div>'); + + // Icon + $(el).find('div.title').html('<img src="'+image_dir+'icon_'+icon+'.'+IMG_ICON_EXT+'" align="left" />'); + + /* Pfad + <span class="path"><?php echo langHtml($actionName) ?></span>&nbsp;<strong>&rarr;</strong>&nbsp; + <a javascript:void(0);" onclick="javascript:loadViewByName('<?php echo $view ?>','<?php echo $url ?>'); return false; " title="<?php echo $title ?>" class="path"><?php echo (!empty($key)?langHtml($key):$name) ?></a> + &nbsp;&rarr;&nbsp; + <?php } ?> + <span class="title"><?php echo langHtml(@$windowTitle) ?></span> + */ + + + /* + * Menü + if ( !isset($windowMenu) || !is_array($windowMenu) ) $windowMenu = array(); + foreach( $windowMenu as $menu ) + { + $tmp_text = langHtml($menu['text']); + $tmp_key = strtoupper(langHtml($menu['key' ])); + $tmp_pos = strpos(strtolower($tmp_text),strtolower($tmp_key)); + if ( $tmp_pos !== false ) + $tmp_text = substr($tmp_text,0,max($tmp_pos,0)).'<span class="accesskey">'. substr($tmp_text,$tmp_pos,1).'</span>'.substr($tmp_text,$tmp_pos+1); + + $liClass = (isset($menu['url'])?'':'no').'action'.($this->subActionName==$menu['subaction']?'_active':''); + $icon_url = $image_dir.'icon/'.$menu['subaction'].'.png'; + + ?><li class="<?php echo $liClass?>"><?php + if ( isset($menu['url']) ) + { + $link_url = Html::url($actionName,$menu['subaction'],$this->getRequestId() ); + ?><a href="javascript:void(0);" onclick="javascript:loadViewByName('<?php echo $view ?>','<?php echo $link_url ?>'); return false; " accesskey="<?php echo $tmp_key ?>" title="<?php echo langHtml($menu['text'].'_DESC') ?>"><img src="<?php echo $icon_url ?>" /><?php echo $tmp_text ?></a><?php + } + else + { + ?><span><img src="<?php echo $icon_url ?>" /><?php echo $tmp_text ?></span><?php + } + } + ?></li><?php + */ + + /* + * Hilfe + * if ( false && @$conf['help']['enabled'] ) + { + ?><a class="help" href="<?php echo $conf['help']['url'].$actionName.'/'.$subActionName.@$conf['help']['suffix'] ?> " target="_new" title="<?php echo langHtml('MENU_HELP_DESC') ?>"><img src="<?php echo $image_dir.'icon/help.png' ?>" /><?php echo @$conf['help']['only_question_mark']?'?':langHtml('MENU_HELP') ?></a><?php + } + ?><?php + */ +} + + +function createUrl(action,subaction,id) +{ + return './dispatcher.php?action='+action+'&subaction='+subaction+'&id='+id; +}+ \ No newline at end of file diff --git a/themes/default/layout/perspective/administration.ini.php b/themes/default/layout/perspective/administration.ini.php @@ -0,0 +1,25 @@ +<?php ?> + + +[tree] + +views=show +default=show +action=tree +refreshable=false + + +[content] + +views=listing,prop,edit,memberships +action=project +refreshable=true +default=listing + + +[member] + +views=groups +action=project +refreshable=true +default=groups diff --git a/themes/default/layout/perspective/administration.php b/themes/default/layout/perspective/administration.php @@ -0,0 +1,24 @@ + +<div class="container_12"> + +<div class="grid_3"> +<?php +view_header('tree'); +?> +</div> + +<div class="grid_6"> +<?php +view_header('content'); +//view_header('extra'); +?> +</div> + +<div class="grid_3"> +<?php +view_header('member'); +//view_header('extra'); +?> +</div> + +</div>+ \ No newline at end of file diff --git a/themes/default/layout/perspective/header.php b/themes/default/layout/perspective/header.php @@ -0,0 +1,76 @@ +<?php + +function view_header( $name ) +{ + global $viewconfig; + $v = $viewconfig[$name]; + +?> + + +<div id="<?php echo $name ?>" data-action="<?php echo $v['action'] ?>" class="frame <?php echo ($v['refreshable']?' refreshable':'') ?>"> +<div class="window"> + +<div class="menu"> + +<div class="views"> +<ul class="views"> +<?php + + foreach( explode(',',$v['views']) as $vn ) + { + $tmp_text = langHtml('menu_'.$vn); + $liClass = 'action'.($vn==$v['default']?' active':''); + $icon_url = OR_THEMES_EXT_DIR.'default/images/icon/'.$vn.'.png'; + + ?><li data-method="<?php echo $vn ?>" class="<?php echo $liClass?>" title="<?php echo langHtml('menu_'.$vn.'_desc'); ?>"><?php + ?><span><img src="<?php echo $icon_url ?>" /><?php echo $tmp_text ?></span><?php + ?></li><?php + } + if ( /* Deaktiviert */ false && @$conf['help']['enabled'] ) + { + ?><a class="help" href="<?php echo $conf['help']['url'].$actionName.'/'.$subActionName.@$conf['help']['suffix'] ?> " target="_new" title="<?php echo langHtml('MENU_HELP_DESC') ?>"><img src="<?php echo $image_dir.'icon/help.png' ?>" /><?php echo @$conf['help']['only_question_mark']?'?':langHtml('MENU_HELP') ?></a><?php + } + ?><?php + + + + ?> +</ul> +</div> + +<div class="icons"> +<div class="icon"><a href="javascript:void(0);" class="fullscreen" onClick="javascript:fullscreen( $(this).parent().parent().parent().parent() );"><img src="<?php echo OR_THEMES_EXT_DIR.'default/images/icon/window/maximize.gif' ?>" title="<?php echo langHtml('window_fullscreen') ?>" /></a></div> +<!-- +<div><a href="javascript:void(0);" class="minimize" onClick="javascript:minimize($(this).parent().parent() );"><?php echo langHtml('fullscreen') ?></a></div> + --> +</div> + +</div> + +<?php /*echo langHtml( $v['title'] )*/ ?> + + +<!-- Hinweis-Meldungen --> + +<div class="content"> + <div class="filler"></div> +</div> + +<div class="bottom"> + + <div class="status"> + </div> + <div class="command"> + <input type="button" value="<?php echo lang('BUTTON_OK') ?>" onclick="formSubmit( $(this).parent().parent().parent().find('form') );" /> + <!-- + <input type="button" value="<?php echo lang('CANCEL') ?>" /> + --> + </div> + +</div> + +</div> +</div> + +<?php } ?>+ \ No newline at end of file diff --git a/themes/default/layout/perspective/login.ini.php b/themes/default/layout/perspective/login.ini.php @@ -0,0 +1,8 @@ +<?php ?> + +[content] + +views=login,password +action=login +refreshable=false +default=login+ \ No newline at end of file diff --git a/themes/default/layout/perspective/login.php b/themes/default/layout/perspective/login.php @@ -0,0 +1,10 @@ + +<div class="container_12"> + +<div class="prefix_4 grid_4 suffix_4"> +<?php +view_header('content'); +?> +</div> + +</div> diff --git a/themes/default/layout/perspective/normal.ini.php b/themes/default/layout/perspective/normal.ini.php @@ -0,0 +1,26 @@ + + +[tree] + +title=navigator +views=show,settings +default=show +action=tree +refreshable=false + + +[content] + +title= +default=show +views=listing,show,pub,prop,rights +action=folder +refreshable=true + +[extra] + +title= +default=prop +views=pub,el,prop,rights +action=folder +refreshable=true diff --git a/themes/default/layout/perspective/normal.php b/themes/default/layout/perspective/normal.php @@ -0,0 +1,17 @@ + +<div class="container_12"> + +<div class="grid_3"> +<?php +view_header('tree'); +?> +</div> + +<div class="grid_9"> +<?php +view_header('content'); +//view_header('extra'); +?> +</div> + +</div>+ \ No newline at end of file diff --git a/themes/default/layout/perspective/start.ini.php b/themes/default/layout/perspective/start.ini.php @@ -0,0 +1,8 @@ +<?php ?> + +[content] + +views=applications,projectmenu +action=start +refreshable=false +default=projectmenu+ \ No newline at end of file diff --git a/themes/default/layout/perspective/start.php b/themes/default/layout/perspective/start.php @@ -0,0 +1,10 @@ + +<div class="container_12"> + +<div class="prefix_4 grid_4 suffix_4"> +<?php +view_header('content'); +?> +</div> + +</div> diff --git a/themes/default/templates/login/login.tpl.src.php b/themes/default/templates/login/login.tpl.src.php @@ -1,6 +1,7 @@ dummy form action:login subaction:login target:_top - window title:GLOBAL_LOGIN name:login width:400px icon:user + #window title:GLOBAL_LOGIN name:login width:400px icon:user + dummy fieldset if present:config:login/logo/file @@ -79,7 +80,7 @@ dummy else hidden name:dbid default:var:actdbid button type:ok - insert script:screenwidth + #insert script:screenwidth hidden name:objectid hidden name:modelid diff --git a/themes/default/templates/start/projectmenu.tpl.src.php b/themes/default/templates/start/projectmenu.tpl.src.php @@ -9,7 +9,7 @@ dummy row cell colspan:2 fieldset title:var:name - link url:var:url title:message:TREE_CHOOSE_PROJECT + link id:var:id title:message:TREE_CHOOSE_PROJECT set var:project value:project image type:project text var:name maxlength:30 diff --git a/themes/default/templates/title/show.tpl.src.php b/themes/default/templates/title/show.tpl.src.php @@ -56,7 +56,7 @@ part class:user text key:profile if true:method:userIsAdmin - link class:entry action:tree subaction:content target:tree var1:projectid value1:-1 + link class:entry action:start subaction:administration target:tree id:-1 image icon:administration align:left text key:administration @@ -78,5 +78,5 @@ part class:projects part class:dropdown list list:projects key:id value:name image icon:project - link class:entry action:tree subaction:content var1:projectid value1:var:id target:tree + link class:entry action:start subaction:projectmenu id:var:id target:tree text var:name maxlength:20 diff --git a/util/AdministrationTree.class.php b/util/AdministrationTree.class.php @@ -55,9 +55,11 @@ class AdministrationTree extends AbstractTree $conf_config = $conf['interface']['config']; $treeElement = new TreeElement(); + $treeElement->id = 0; $treeElement->text = lang('GLOBAL_PROJECTS'); $treeElement->description = lang('GLOBAL_PROJECTS'); $treeElement->url = Html::url('project','listing',0,array(REQ_PARAM_TARGET=>'content')); + $treeElement->action = 'project'; $treeElement->icon = 'project_list'; $treeElement->type = 'projects'; $treeElement->target = 'cms_main'; @@ -112,6 +114,7 @@ class AdministrationTree extends AbstractTree $treeElement->text = lang('GLOBAL_USER'); $treeElement->description = lang('GLOBAL_USER'); $treeElement->url = Html::url('user','listing',0,array(REQ_PARAM_TARGET=>'content')); + $treeElement->action = 'user'; $treeElement->icon = 'user_list'; $treeElement->target = 'cms_main'; $treeElement->type = 'users'; @@ -122,6 +125,7 @@ class AdministrationTree extends AbstractTree $treeElement->text = lang('GLOBAL_GROUPS'); $treeElement->description = lang('GLOBAL_GROUPS'); $treeElement->url = Html::url('group','listing',0,array(REQ_PARAM_TARGET=>'content')); + $treeElement->action = 'group'; $treeElement->icon = 'user_list'; $treeElement->target = 'cms_main'; $treeElement->type = 'groups'; @@ -141,6 +145,7 @@ class AdministrationTree extends AbstractTree $treeElement->text = $name; $treeElement->url = Html::url('project','edit',$id,array(REQ_PARAM_TARGET=>'content')); $treeElement->icon = 'project'; + $treeElement->action = 'project'; $treeElement->description = ''; $treeElement->target = 'cms_main'; @@ -398,11 +403,12 @@ class AdministrationTree extends AbstractTree foreach( User::getAllUsers() as $user ) { $treeElement = new TreeElement(); - + $treeElement->id = $user->userid; $treeElement->internalId = $user->userid; $treeElement->text = $user->name; $treeElement->url = Html::url('user','edit', $user->userid,array(REQ_PARAM_TARGET=>'content') ); + $treeElement->action = 'user'; $treeElement->icon = 'user'; $desc = $user->fullname; @@ -432,6 +438,7 @@ class AdministrationTree extends AbstractTree $g = new Group( $id ); $g->load(); + $treeElement->id = $id; $treeElement->internalId = $id; $treeElement->text = $g->name; $treeElement->url = Html::url('group','edit',$id, @@ -440,6 +447,7 @@ class AdministrationTree extends AbstractTree $treeElement->description = lang('GLOBAL_GROUP').' '.$g->name.': '.implode(', ',$g->getUsers()); $treeElement->target = 'cms_main'; $treeElement->type = 'userofgroup'; + $treeElement->action = 'group'; $this->addTreeElement( $treeElement ); } @@ -456,9 +464,11 @@ class AdministrationTree extends AbstractTree $u = new User( $id ); $u->load(); + $treeElement->id = $u->userid; $treeElement->text = $u->name; $treeElement->url = Html::url('user','edit',$id,array(REQ_PARAM_TARGET=>'content')); $treeElement->icon = 'user'; + $treeElement->action = 'user'; $treeElement->description = $u->fullname; $treeElement->target = 'cms_main'; diff --git a/util/ProjectTree.class.php b/util/ProjectTree.class.php @@ -57,11 +57,13 @@ class ProjectTree extends AbstractTree if ( $element->isWritable() ) { $treeElement = new TreeElement(); + $treeElement->id = $elementid; $treeElement->text = $element->name; $treeElement->url = Html::url('pageelement','edit', $id, array('elementid'=>$elementid, REQ_PARAM_TARGETSUBACTION=>'edit',REQ_PARAM_TARGET=>'content')); + $treeElement->action = 'pageelement'; $treeElement->icon = 'el_'.$element->type; $treeElement->description = lang('EL_'.$element->type); @@ -102,14 +104,16 @@ class ProjectTree extends AbstractTree $object->load(); $treeElement = new TreeElement(); + $treeElement->id = $id; $treeElement->text = $object->name; if ( in_array($object->getType(),array('page','folder'))) { $treeElement->type = $object->getType(); $treeElement->internalId = $object->objectid; } - $treeElement->url = Html::url($object->getType(),'',$objectid,array(REQ_PARAM_TARGET=>'content')); - $treeElement->icon = $object->getType(); + $treeElement->url = Html::url($object->getType(),'',$objectid,array(REQ_PARAM_TARGET=>'content')); + $treeElement->action = $object->getType(); + $treeElement->icon = $object->getType(); $treeElement->description = lang('GLOBAL_'.$object->getType()); if ( $object->desc != '' ) @@ -135,6 +139,7 @@ class ProjectTree extends AbstractTree $o->load(); $treeElement = new TreeElement(); + $treeElement->id = $o->objectid; $treeElement->internalId = $o->objectid; $treeElement->target = 'content'; $treeElement->text = $o->name; @@ -146,6 +151,7 @@ class ProjectTree extends AbstractTree $treeElement->description .= ' - '.lang('GLOBAL_NO_DESCRIPTION_AVAILABLE'); $treeElement->url = Html::url($o->getType(),'',$o->objectid,array(REQ_PARAM_TARGET=>'content') ); + $treeElement->action = $o->getType(); $treeElement->icon = $o->getType(); // Besonderheiten fuer bestimmte Objekttypen @@ -182,6 +188,7 @@ class ProjectTree extends AbstractTree continue; $treeElement = new TreeElement(); + $treeElement->id = $o->objectid; $treeElement->internalId = $o->objectid; $treeElement->target = 'content'; $treeElement->text = $o->name; @@ -193,6 +200,7 @@ class ProjectTree extends AbstractTree $treeElement->description .= ' - '.lang('GLOBAL_NO_DESCRIPTION_AVAILABLE'); $treeElement->url = Html::url( $o->getType(),'',$o->objectid,array('readit'=>'__OID__'.$o->objectid.'__',REQ_PARAM_TARGET=>'content') ); + $treeElement->action = $o->getType(); $treeElement->icon = $o->getType(); // Besonderheiten fuer bestimmte Objekttypen @@ -253,10 +261,12 @@ class ProjectTree extends AbstractTree if ( $folder->hasRight( ACL_READ ) ) { $treeElement = new TreeElement(); -// $treeElement->text = $folder->name; + $treeElement->id = $folder->objectid; + // $treeElement->text = $folder->name; $treeElement->text = lang('FOLDER_ROOT'); $treeElement->description = lang('FOLDER_ROOT_DESC'); $treeElement->icon = 'folder'; + $treeElement->action = 'folder'; $treeElement->url = Html::url( 'folder','',$folder->objectid,array(REQ_PARAM_TARGET=>'content') ); $treeElement->target = 'content'; $treeElement->type = 'folder'; @@ -269,10 +279,12 @@ class ProjectTree extends AbstractTree { // Templates $treeElement = new TreeElement(); + $treeElement->id = 0; $treeElement->text = lang('GLOBAL_TEMPLATES'); $treeElement->url = Html::url('template','listing',0,array(REQ_PARAM_TARGETSUBACTION=>'listing',REQ_PARAM_TARGET=>'content')); $treeElement->description= lang('GLOBAL_TEMPLATES_DESC'); $treeElement->icon = 'template_list'; + $treeElement->action = 'template'; $treeElement->target = 'content'; $treeElement->type = 'templates'; $this->addTreeElement( $treeElement ); @@ -282,6 +294,7 @@ class ProjectTree extends AbstractTree // Sprachen $treeElement = new TreeElement(); $treeElement->description= ''; + $treeElement->id = 0; $treeElement->text = lang('GLOBAL_LANGUAGES'); $treeElement->url = Html::url('language','listing',0,array(REQ_PARAM_TARGETSUBACTION=>'listing',REQ_PARAM_TARGET=>'content')); $treeElement->icon = 'language_list'; @@ -303,6 +316,7 @@ class ProjectTree extends AbstractTree if ( $this->userIsProjectAdmin ) $treeElement->type = 'models'; + $treeElement->id = 0; $treeElement->description= lang('GLOBAL_MODELS_DESC'); $treeElement->text = lang('GLOBAL_MODELS'); $treeElement->url = Html::url('model','listing',0,array(REQ_PARAM_TARGETSUBACTION=>'listing',REQ_PARAM_TARGET=>'content')); @@ -321,8 +335,10 @@ class ProjectTree extends AbstractTree // Suche $treeElement = new TreeElement(); + $treeElement->id = 0; $treeElement->text = lang('GLOBAL_SEARCH'); $treeElement->url = Html::url('search','',0,array(REQ_PARAM_TARGET=>'content')); + $treeElement->action = 'search'; $treeElement->icon = 'search'; $treeElement->description = lang('GLOBAL_SEARCH_DESC'); $treeElement->target = 'content'; @@ -340,8 +356,10 @@ class ProjectTree extends AbstractTree $t = new Template( $id ); $t->load(); $treeElement->text = $t->name; + $treeElement->id = $id; $treeElement->url = Html::url('template','src',$id,array(REQ_PARAM_TARGETSUBACTION=>'src',REQ_PARAM_TARGET=>'content')); $treeElement->icon = 'template'; + $treeElement->action = 'template'; $treeElement->target = 'content'; $treeElement->internalId = $id; $treeElement->type = 'template'; @@ -369,9 +387,11 @@ class ProjectTree extends AbstractTree continue; $treeElement = new TreeElement(); + $treeElement->id = $elementid; $treeElement->text = $e->name; $treeElement->url = Html::url('element','',$elementid,array(REQ_PARAM_TARGET=>'content') ); $treeElement->icon = 'el_'.$e->type; + $treeElement->action = 'element'; if ( $e->desc == '' ) $desc = lang('GLOBAL_NO_DESCRIPTION_AVAILABLE'); @@ -397,10 +417,12 @@ class ProjectTree extends AbstractTree foreach( $languages as $languageid=>$name ) { $treeElement = new TreeElement(); + $treeElement->id = $languageid; $treeElement->text = $name; $treeElement->url = Html::url('language','edit',$languageid, array(REQ_PARAM_TARGETSUBACTION=>'edit',REQ_PARAM_TARGET=>'content') ); $treeElement->icon = 'language'; + $treeElement->action = 'language'; $treeElement->description = ''; $treeElement->target = 'content'; $this->addTreeElement( $treeElement ); @@ -418,6 +440,7 @@ class ProjectTree extends AbstractTree foreach( $models as $id=>$name ) { $treeElement = new TreeElement(); + $treeElement->id = $id; $treeElement->text = $name; $treeElement->url = Html::url('model','edit',$id, array(REQ_PARAM_TARGETSUBACTION=>'edit',REQ_PARAM_TARGET=>'content')); @@ -446,24 +469,29 @@ class ProjectTree extends AbstractTree // } $treeElement = new TreeElement(); + $treeElement->id = 0; $treeElement->text = lang('GLOBAL_SEARCH'); $treeElement->url = Html::url('search'); $treeElement->icon = 'search'; + $treeElement->action = 'search'; $treeElement->description = lang('GLOBAL_SEARCH_DESC'); $treeElement->target = 'content'; $this->addTreeElement( $treeElement ); $treeElement = new TreeElement(); + $treeElement->id = 0; $treeElement->text = lang('USER_YOURPROFILE'); $treeElement->url = Html::url('profile','edit',0,array(REQ_PARAM_TARGET=>'content')); $treeElement->icon = 'user'; + $treeElement->action = 'profile'; $treeElement->description = lang('USER_PROFILE_DESC'); $treeElement->target = 'content'; $this->addTreeElement( $treeElement ); $treeElement = new TreeElement(); + $treeElement->id = 0; $treeElement->text = lang('GLOBAL_PROJECTS'); $treeElement->url = Html::url('index','projectmenu',0,array(REQ_PARAM_TARGET=>'content')); $treeElement->icon = 'project'; diff --git a/util/TreeElement.class.php b/util/TreeElement.class.php @@ -47,6 +47,7 @@ class TreeElement var $url = ""; var $icon = ""; var $target = ""; + var $action = ""; /** * Unterelemente