openrat-cms

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

commit dfd7713d80799d2d124458b97ac0177630938b9b
parent 562cd54aefb4d7e4514f1ecd7531fe5e98b2035c
Author: Jan Dankert <devnull@localhost>
Date:   Tue, 18 Sep 2012 00:51:05 +0200

Patch von Tobias in den Head übernommen.

Diffstat:
action/FilebrowserAction.class.php | 8++++----
action/FolderAction.class.php | 1+
action/GrouplistAction.class.php | 2+-
action/LanguageAction.class.php | 2+-
action/LanguagelistAction.class.php | 5++---
action/ModelAction.class.php | 2+-
action/ModellistAction.class.php | 3+--
action/PageelementAction.class.php | 18++++++++++++++----
action/ProjectlistAction.class.php | 1+
action/StartAction.class.php | 4++--
action/TemplateAction.class.php | 2+-
action/TemplatelistAction.class.php | 2+-
action/TitleAction.class.php | 2+-
action/UserlistAction.class.php | 5++---
action/WorkbenchAction.class.php | 2+-
config/applications.ini.php | 27---------------------------
config/cache.ini.php | 21---------------------
config/config-default.php | 1+
config/content.ini.php | 37-------------------------------------
config/convert.sh | 2+-
config/countries.ini.php | 144-------------------------------------------------------------------------------
config/database.ini.php | 203-------------------------------------------------------------------------------
config/date.ini.php | 29-----------------------------
config/dos2unix.sh | 1+
config/editor.ini.php | 144-------------------------------------------------------------------------------
config/filename.ini.php | 14--------------
config/ftp.ini.php | 3---
config/help.ini.php | 14--------------
config/html.ini.php | 10----------
config/i18n.ini.php | 21---------------------
config/image.ini.php | 4----
config/interface.ini.php | 152-------------------------------------------------------------------------------
config/ldap.ini.php | 68--------------------------------------------------------------------
config/log.ini.php | 31-------------------------------
config/login.ini.php | 19-------------------
config/mail.ini.php | 92-------------------------------------------------------------------------------
config/mime-types.ini.php | 269-------------------------------------------------------------------------------
config/publish.ini.php | 124-------------------------------------------------------------------------------
config/replace.ini.php | 11-----------
config/search.ini.php | 20--------------------
config/security.ini.php | 329-------------------------------------------------------------------------------
config/theme.ini.php | 28----------------------------
config/webdav.ini.php | 34----------------------------------
config/wiki.ini.php | 15---------------
dispatcher.php | 8+++++---
language/cn.ini.php | 6+++---
themes/default/css/layout.css | 520+++++++++++++++++--------------------------------------------------------------
themes/default/css/user/default.css | 111++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
themes/default/images/icon/backward_nav.gif | 0
themes/default/images/icon/close.gif | 0
themes/default/images/icon/forward_nav.gif | 0
themes/default/images/icon/inherit.gif | 0
themes/default/images/icon/tasks_tsk.gif | 0
themes/default/images/icon/window/maximize.gif | 0
themes/default/images/icon_config_folder.png | 0
themes/default/images/icon_configuration.png | 0
themes/default/images/icon_grouplist.png | 0
themes/default/images/icon_language_list.png | 0
themes/default/images/icon_languagelist.png | 0
themes/default/images/icon_model_list.png | 0
themes/default/images/icon_modellist.png | 0
themes/default/images/icon_project_list.png | 0
themes/default/images/icon_projectlist.png | 0
themes/default/images/icon_template_list.png | 0
themes/default/images/icon_templatelist.png | 0
themes/default/images/icon_user_list.png | 0
themes/default/images/icon_userlist.png | 0
themes/default/include/elements.ini.php | 6+++---
themes/default/include/html/cell.inc.php | 4++--
themes/default/include/html/form-end.inc.php | 9++++++++-
themes/default/include/html/form.inc.php | 2+-
themes/default/include/html/input.inc.php | 2+-
themes/default/include/html/link.inc.php | 2+-
themes/default/include/html/radio.inc.php | 2+-
themes/default/js/jquery.mjs.nestedSortable.js | 427+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/js/jquery.scrollTo.js | 217+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
themes/default/js/openrat.js | 231+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
themes/default/js/plugin/jquery-plugin-orHint.js | 22++++++++++++++++++++++
themes/default/js/plugin/jquery-plugin-orSearch.js | 38++++++++++++++++++++++++++++++++++++++
themes/default/layout/index.php | 10+++++++++-
themes/default/layout/perspective/administration.ini.php | 14+++++++++++---
themes/default/layout/perspective/administration.php | 16++++++----------
themes/default/layout/perspective/header.php | 20+++++++++++---------
themes/default/layout/perspective/login.ini.php | 18+++++++++++++++---
themes/default/layout/perspective/login.php | 12+++++++++---
themes/default/layout/perspective/normal.ini.php | 17++++++++++-------
themes/default/layout/perspective/normal.php | 31+++++++++++++++++++++++--------
themes/default/layout/perspective/profile.ini.php | 19++++++++++++++++++-
themes/default/layout/perspective/profile.php | 12+++++++++---
themes/default/layout/perspective/start.ini.php | 19++++++++++++++++---
themes/default/layout/perspective/start.php | 12+++++++++---
themes/default/pages/html/title/show.tpl.php | 128++++++++++++++++++++++++++++++-------------------------------------------------
themes/default/templates/configuration/show.tpl.src.xml | 1-
themes/default/templates/folder/show.tpl.src.xml | 35+++++++++++++++++++++++++++++------
themes/default/templates/grouplist/add.tpl.src.xml | 18++++++++++++++----
themes/default/templates/grouplist/show.tpl.src.xml | 12++++++------
themes/default/templates/language/edit.tpl.src.xml | 2+-
themes/default/templates/languagelist/add.tpl.src.xml | 14++++++++++++++
themes/default/templates/languagelist/show.tpl.src.xml | 23+++++++++++++++++------
themes/default/templates/modellist/show.tpl.src.xml | 25+++++++++++++++++--------
themes/default/templates/projectlist/add.tpl.src.xml | 6++----
themes/default/templates/projectlist/show.tpl.src.xml | 11+++++++++--
themes/default/templates/template.xsd | 11++++++++---
themes/default/templates/template/el.tpl.src.xml | 18+++++++++---------
themes/default/templates/templatelist/show.tpl.src.xml | 54+++++++++++++++++++++++++++++-------------------------
themes/default/templates/title/show.tpl.src.xml | 11++++-------
themes/default/templates/userlist/add.tpl.src.xml | 18++++++++++++++----
themes/default/templates/userlist/show.tpl.src.xml | 13++++++++++---
util/AdministrationTree.class.php | 20++++++++++----------
util/Preferences.class.php | 36++++++++++++++++++++++++++----------
util/ProjectTree.class.php | 10+++++-----
util/TemplateEngine.class.php | 2++
112 files changed, 1571 insertions(+), 2630 deletions(-)

diff --git a/action/FilebrowserAction.class.php b/action/FilebrowserAction.class.php @@ -81,7 +81,7 @@ class FilebrowserAction extends ObjectAction * Datei-Upload. * */ - function directupload() + public function directuploadPost() { $upload = new Upload( $this->getRequestVar('name','abc') ); @@ -111,7 +111,7 @@ class FilebrowserAction extends ObjectAction } - function browse() + public function browseView() { global $conf_php; $funcNum = $this->getRequestVar('CKEditorFuncNum',OR_FILTER_NUMBER); @@ -176,7 +176,7 @@ class FilebrowserAction extends ObjectAction } - function addfolder() + public function addfolderPost() { $filename = $this->getRequestVar('name'); @@ -208,7 +208,7 @@ class FilebrowserAction extends ObjectAction - function upload() + public function uploadPost() { if ( $this->hasRequestVar('name') ) $name = $this->getRequestVar('name','abc'); diff --git a/action/FolderAction.class.php b/action/FolderAction.class.php @@ -998,6 +998,7 @@ class FolderAction extends ObjectAction $list[$id]['desc'] = $list[$id]['desc'].' - '.lang('IMAGE').' '.$id; $list[$id]['type'] = $o->getType(); + $list[$id]['id' ] = $id; $list[$id]['icon' ] = $o->getType(); $list[$id]['class'] = $o->getType(); diff --git a/action/GrouplistAction.class.php b/action/GrouplistAction.class.php @@ -47,7 +47,7 @@ class GrouplistAction extends Action foreach( Group::getAll() as $id=>$name ) { $list[$id] = array(); - $list[$id]['url' ] = Html::url('main','group',$id,array(REQ_PARAM_TARGETSUBACTION=>'edit')); + $list[$id]['id' ] = $id; $list[$id]['name'] = $name; } diff --git a/action/LanguageAction.class.php b/action/LanguageAction.class.php @@ -94,7 +94,7 @@ class LanguageAction extends Action * Diese Sprache wird benutzt beim Ausw?hlen des Projektes sowie * als Default-Sprache bei mehrsprachigen Webseiten ("content-negotiation") */ - function setdefault() + function setdefaultPost() { $this->language->setDefault(); } diff --git a/action/LanguagelistAction.class.php b/action/LanguagelistAction.class.php @@ -1,4 +1,4 @@ -<?php +O<?php // --------------------------------------------------------------------------- // $Id$ // --------------------------------------------------------------------------- @@ -98,8 +98,7 @@ class LanguagelistAction extends Action if ( $this->userIsAdmin() ) { - $list[$id]['url' ] = Html::url('language','edit',$id, - array() ); + $list[$id]['id' ] = $id; if ( ! $l->isDefault ) $list[$id]['default_url'] = Html::url( 'language','setdefault',$id ); diff --git a/action/ModelAction.class.php b/action/ModelAction.class.php @@ -128,7 +128,7 @@ class ModelAction extends Action } - function setdefault() + function setdefaultPost() { if ( !$this->userIsAdmin() ) exit(); diff --git a/action/ModellistAction.class.php b/action/ModellistAction.class.php @@ -53,8 +53,7 @@ class ModellistAction extends Action $list[$id]['name'] = $m->name; if ( $this->userIsAdmin() ) - $list[$id]['url' ] = Html::url('model','edit',$id, - array() ); + $list[$id]['id' ] = $id; if ( ! $m->isDefault && $this->userIsAdmin() ) $list[$id]['default_url'] = Html::url('model','setdefault',$id); diff --git a/action/PageelementAction.class.php b/action/PageelementAction.class.php @@ -63,9 +63,19 @@ class PageelementAction extends Action $this->page = Session::getObject(); - if ( $this->getRequestId() != 0 ) + $id = $this->getRequestVar('id'); + $ids = explode('_',$id); + if ( count($ids) > 1 ) + list($pageid,$elementid)= $ids; + else + { + $pageid = $this->getRequestId(); + $elementid = $this->getRequestVar('elementid'); + } + + if ( $pageid != 0 ) { - $this->page = new Page( $this->getRequestId() ); + $this->page = new Page( $pageid ); $this->page->load(); Session::setObject( $this->page ); } @@ -74,9 +84,9 @@ class PageelementAction extends Action $this->page = Session::getObject(); } - if ( $this->hasRequestVar('elementid') ) + if ( $elementid != 0 ) { - $this->element = new Element( $this->getRequestVar('elementid',OR_FILTER_NUMBER) ); + $this->element = new Element( $elementid ); Session::setElement( $this->element ); } else diff --git a/action/ProjectlistAction.class.php b/action/ProjectlistAction.class.php @@ -51,6 +51,7 @@ class ProjectlistAction extends Action { $list[$id] = array(); $list[$id]['url' ] = Html::url('project','edit',$id); + $list[$id]['id' ] = $id; $list[$id]['use_url' ] = Html::url('tree' ,'load',0 ,array('projectid'=>$id,'target'=>'tree')); $list[$id]['name' ] = $name; } diff --git a/action/StartAction.class.php b/action/StartAction.class.php @@ -944,7 +944,7 @@ class StartAction extends Action } - function language() + function languagePost() { $user = Session::getUser(); if ( ! is_object($user) ) @@ -957,7 +957,7 @@ class StartAction extends Action } - function model() + function modelPost() { $user = Session::getUser(); if ( ! is_object($user) ) diff --git a/action/TemplateAction.class.php b/action/TemplateAction.class.php @@ -513,7 +513,7 @@ class TemplateAction extends Action $element->load(); $list[$elid] = array(); - $list[$elid]['url' ] = Html::url('element','name',$elid); + $list[$elid]['id' ] = $elid; $list[$elid]['name'] = $element->name; $list[$elid]['desc'] = $element->desc; $list[$elid]['type'] = $element->type; diff --git a/action/TemplatelistAction.class.php b/action/TemplatelistAction.class.php @@ -52,7 +52,7 @@ class TemplatelistAction extends Action { $list[$id] = array(); $list[$id]['name'] = $name; - $list[$id]['url' ] = Html::url('template','el',$id,array()); + $list[$id]['id' ] = $id; } // $var['templatemodelid'] = htmlentities( $id ); diff --git a/action/TitleAction.class.php b/action/TitleAction.class.php @@ -85,7 +85,7 @@ class TitleAction extends Action } - public function ping() + public function pingView() { $this->setTemplateVar('ping',true ); $this->setTemplateVar('time',date('r') ); diff --git a/action/UserlistAction.class.php b/action/UserlistAction.class.php @@ -40,9 +40,8 @@ class UserlistAction extends Action foreach( User::getAllUsers() as $user ) { - $list[$user->userid] = $user->getProperties(); - $list[$user->userid]['url' ] = Html::url('main','user',$user->userid, - array(REQ_PARAM_TARGETSUBACTION=>'edit') ); + $list[$user->userid] = $user->getProperties(); + $list[$user->userid]['id' ] = $user->userid; } $this->setTemplateVar('el',$list); } diff --git a/action/WorkbenchAction.class.php b/action/WorkbenchAction.class.php @@ -33,7 +33,7 @@ class WorkbenchAction extends Action 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'); + require_once('themes/default/layout/perspective/normal.php'); // Ausgabe fertig. } } diff --git a/config/applications.ini.php b/config/applications.ini.php @@ -1,27 +0,0 @@ -; <?php exit('direct access denied') ?> - - -; Start other applications out of OpenRat. -; -; Other applications are able to authenticate the user with an ticket id (Single Signon) - -; Insert a new section for every application here -;[phpmyadmin] - -; The Name of the application -;name=PHPYourAdmin - -; URL -;url="https://example.com/anotherapplication/index.cgi" - -; Name of the HTTP-Parameter for the Ticket-Id. -; OpenRat puts the session-id into this parameter. -;param="ticketidforopenrat" - -; Groups -; Only User, who are in this group, may see the application -; (optional) -;group= - -; A brief description of this application. -description="Your database administration" diff --git a/config/cache.ini.php b/config/cache.ini.php @@ -1,21 +0,0 @@ -; <?php exit('direct access denied') ?> - -; Conditional-GET enables the "304 not modified" HTTP-Header -; This is much faster, but sometimes caching is unwanted -; if you have caching problems, set this to 'false'. Default: 'true' -conditional_get=true - - - -; Pages and files are cached in a temporary directory. -; 'false' means generate each page again and again -; 'true' will cache a page's content. This will improve -; the performance, but has some side effects, -; f.e. no dynamic content will be updated. -enable_cache=false - - - -; Directory for temporary files. -; Default=blank (OpenRat uses the system temporary dir) -tmp_dir="" diff --git a/config/config-default.php b/config/config-default.php @@ -18,6 +18,7 @@ $conf['config'] = array(); $conf['config']['per_host_configuration']= true; $conf['config']['per_host_configuration_dir']= "./config/virtual"; $conf['config']['auto_reload']= true; +$conf['config']['session_destroy_on_config_reload']= true; $conf['content'] = array(); $conf['content']['file'] = array(); $conf['content']['file']['max_file_size']='1500'; diff --git a/config/content.ini.php b/config/content.ini.php @@ -1,37 +0,0 @@ -; <?php exit('direct access denied') ?> - - -[file] - -; Maximum file size for uploads in KB -; 0,-1 = not restricted -max_file_size=1500 - - - -[revision-limit] - -; This is your delete-strategy of old content. - -; Values are deleted, if -; a) max-age and min-revisions are reached OR -; b) max-revisions and min-age are reached - -enabled = false - -; max age of values (days) -max-age = 120 -; min age of values (days) -min-age = 1 - -; number of revisions -max-revisions = 100 -min-revisions = 3 - - - -[language] - -; If a text is empty, try using the default language -; Default: true -use_default_language = true diff --git a/config/convert.sh b/config/convert.sh @@ -10,7 +10,7 @@ # - save standardout to a file named config.new # - rename config.ini.php to config.ini.orig.php # - rename config.new to config.ini.php or config-<domain>.ini.php -# - Edit the file: replace '.ini.php.' with '.# +# - Edit the file: replace '.ini.php.' with '.' # - Edit the file: replace '].' with '.' (sorry about that) # # Alternative: Do not use this script and start a new configuration diff --git a/config/countries.ini.php b/config/countries.ini.php @@ -1,144 +0,0 @@ -; <?php exit('direct access denied') ?> - -; These countries are used while inserting a new language model into a project. - -; ISO 639: 2-letter codes -; see http://www.w3.org/WAI/ER/IG/ert/iso639.htm -; -; $Id$ - -AA = Afar -AB = Abkhazian -AF = Afrikaans -AM = Amharic -AR = Arabic -AS = Assamese -AY = Aymara -AZ = Azerbaijani -BA = Bashkir -BE = Byelorussian -BG = Bulgarian -BH = Bihari -BI = Bislama -BN = Bengali -BO = Tibetan -BR = Breton -CA = Catalan -CO = Corsican -CS = Czech -CY = Welsh -DA = Danish -DE = German -DZ = Bhutani -EL = Greek -EN = English -EO = Esperanto -ES = Spanish -ET = Estonian -EU = Basque -FA = Persian -FI = Finnish -FJ = Fiji -FO = Faeroese -FR = French -FY = Frisian -GA = Irish -GD = Gaelic -GL = Galician -GN = Guarani -GU = Gujarati -HA = Hausa -HI = Hindi -HR = Croatian -HU = Hungarian -HY = Armenian -IA = Interlingua -IE = Interlingue -IK = Inupiak -IN = Indonesian -IS = Icelandic -IT = Italian -IW = Hebrew -JA = Japanese -JI = Yiddish -JW = Javanese -KA = Georgian -KK = Kazakh -KL = Greenlandic -KM = Cambodian -KN = Kannada -KO = Korean -KS = Kashmiri -KU = Kurdish -KY = Kirghiz -LA = Latin -LN = Lingala -LO = Laothian -LT = Lithuanian -LV = Latvian -MG = Malagasy -MI = Maori -MK = Macedonian -ML = Malayalam -MN = Mongolian -MO = Moldavian -MR = Marathi -MS = Malay -MT = Maltese -MY = Burmese -NA = Nauru -NE = Nepali -NL = Dutch -_NO = Norwegian -OC = Occitan -OM = Oromo -OR = Oriya -PA = Punjabi -PL = Polish -PS = Pashto -PT = Portuguese -QU = Quechua -RM = Rhaeto-Romance -RN = Kirundi -RO = Romanian -RU = Russian -RW = Kinyarwanda -SA = Sanskrit -SD = Sindhi -SG = Sangro -SH = Serbo-Croatian -SI = Singhalese -SK = Slovak -SL = Slovenian -SM = Samoan -SN = Shona -SO = Somali -SQ = Albanian -SR = Serbian -SS = Siswati -ST = Sesotho -SU = Sudanese -SV = Swedish -SW = Swahili -TA = Tamil -TE = Tegulu -TG = Tajik -TH = Thai -TI = Tigrinya -TK = Turkmen -TL = Tagalog -TN = Setswana -TO = Tonga -TR = Turkish -TS = Tsonga -TT = Tatar -TW = Twi -UK = Ukrainian -UR = Urdu -UZ = Uzbek -VI = Vietnamese -VO = Volapuk -WO = Wolof -XH = Xhosa -YO = Yoruba -ZH = Chinese diff --git a/config/database.ini.php b/config/database.ini.php @@ -1,203 +0,0 @@ -; <?php exit('direct access denied') ?> - -; Database configuration file -; You have to have at least one database connection which has 'enabled=true'. -; -; Supported RDBMS-types: -; - 'mysql' the old PHP-mysql-driver -; - 'mysqli' PHP-mysql-driver with support for prepared statements (EXPERIMENTAL) (since PHP 5.0) -; - 'postgresql' Postgresql -; - 'sqlite' SQ-Lite 2.x-databases (since PHP 5.1) -; - 'sqlite3' SQ-Lite 3.x-databases (EXPERIMENTAL) (since PHP 5.3) -; - 'pdo' A common PHP database abstraction layer for a lot of DBs. (since PHP 5.1) - - - -; Default Database -; This database will be selected by default. -; There has to exist a section with this name. -default=sample_db_mysql - - - -[sample_db_mysql] - -; This is a sample database connection. -; If you want to use it, just fill out the login data and set 'enabled' to 'true' - -enabled = false ; set this to 'true' for using this connection -comment = "DB MySQL" ; comment of this database - -type = mysql ; -user = dbuser ; database user -password = dbpass ; database password -host = localhost ; database hostname -;port ; database TCP/IP-Port (optional) -database = cms ; database name - -base64 = false ; store binary as BASE64 -prefix = or_ ; table praefix -persistent = yes ; use persistent connections (try this, it's faster) -;charset = UTF-8 - -; SQL-Statement which is executed after opening the connection -; connection_sql = "SET NAMES 'UTF8';" ; using UTF-8 as database charset -connection_sql = "" - -; System command for executing before connecting to the database. -; Maybe for installing an SSH-Tunnel. -; For background programs, you have to redirect stdin and stdout! (maybe to /dev/null) -; Example: "sudo -u u123 /usr/local/bin/sshtunnel-example.sh" -; Default: blank. -cmd = "" - -; Using prepared statements. -; The 'old' mysql-interface in PHP does not support prepared statements -prepare = false - -; Using transactions. Set to 'true' when you are using 'InnoDB'-tables. -; If so, maybe you need to set 'SET AUTOCOMMIT=0' as connection_sql above. -; Default: false -transaction = false - -; Readonly tables. Set to 'true' during maintainance activitys. -; If 'true', OpenRat will disable all writing operations. -readonly = false - - - -[sample_db_postgresql] - -; This is a sample database connection. -; If you want to use it, just fill out the login data and set 'enabled' to 'true' - -enabled = false ; set this to 'true' for using this connection -comment = "DB-PostgreSQL" ; comment of this database - -type = postgresql ; -user = dbuser ; database user -password = dbpass ; database password -host = localhost ; database hostname -;port ; database TCP/IP-Port (optional) -database = cms ; database name - -base64 = false ; store binary as BASE64 (in postgresql 7.x set this to 'true') -prefix = or_ ; table praefix -persistent = yes ; use persistent connections (try this, it's faster) -;charset = UTF-8 - -; SQL-Statement which is executed after opening the connection -;connection_sql = "" - -; System command for executing before connecting to the database. -; Maybe for installing an SSH-Tunnel. -; For background programs, you have to redirect stdin and stdout! (maybe to /dev/null) -; Example: "sudo -u u123 /usr/local/bin/sshtunnel-example.sh" -; Default: blank. -cmd = "" - -; Using prepared statements. -; This is EXPERIMENTAL, do not use in production environments -prepare = false - -; Using transactions. Set this to true, if the MySQL table engine supports transactions -transaction = false - - - -; SQ-Lite is an embedded, 'mostly-ANSI-SQL-supporting' database system. -; for using SQLite, please check for the PHP module -; f.e. on ubuntu 'sudo apt-get install php5-sqlite' -[sample_db_sqlite] - -enabled = false ; set this to 'true' for using this connection -comment = "DB-SQLite" ; comment of this database - -type = sqlite ; - -; Filename of your SQlite database -filename = "/local/path/to/your/sqlite/openrat.db" - -base64 = false ; store binary as BASE64 (in postgresql=true) -prefix = or_ ; table praefix -persistent = yes ; use persistent connections (try this, it's faster) -;charset = UTF-8 - -; per default SQlite uses table-prefixed column names when using JOINs which MUST BE off. -connection_sql = "pragma short_column_names=true;" - -; System command for executing before connecting to the database. -cmd = "" - -prepare = false - -; Set this to true, if you want to use transactions. -transaction = false - - - -; PDO (means PHP Data Objects) is an abstract database interface -[sample_pdo_sqlite] - -enabled = false ; set this to 'true' for using this connection -comment = "DB-PDO" ; comment of this database - -type = pdo ; - -; The DSN-Url for your database -dsn = "" -; Examples: -; MySql -;dsn = "mysql:dbname=testdb;host=127.0.0.1" -; PostgreSQL -;dsn = "pgsql:host=localhost port=5432 dbname=mydb user=dbuser password=dbpass" -; SQLite -;dsn = "sqlite:/path/to/mydb.db" -; JDBC-Url when using OpenRat in Quercus -;dsn = "java:comp/env/jdbc/mydb" - -; If not part of the DSN this is the right place for username/password -;user = "dbuser" -;password = "dbpass" - -base64 = false ; store binary as BASE64 (in postgresql=true) -prefix = or_ ; table praefix -persistent = yes ; use persistent connections (try this, it's faster) -;charset = UTF-8 - -; SQL-Statement which is executed after opening the connection -connection_sql = "" -; Examples: -; per default SQlite uses table-prefixed column names when using JOINs which MUST BE off. -;connection_sql = "pragma short_column_names=true;" -; set default schema for Oracle -;connection_sql = "alter session set current_schema=myschema;" - -; System command for executing before connecting to the database. -cmd = "" - -prepare = false - -; Set this to true, if you want to use transactions. -transaction = false - -readonly = false - - -; The database results MUST contain lowercase column names. -; if using Oracle, set this to 'true', default is 'false'. -convert_to_lowercase = false - -; PDO driver-specific options -; key 'option_a' means option 'a'. -;option_myoption_a -;option_myoption_b - - - -; Add here more sections with other database connections. -;[another_db] -; type=... -; comment="My production DB ..." -; ... - diff --git a/config/date.ini.php b/config/date.ini.php @@ -1,29 +0,0 @@ -; <?php die('no access'); ?> - -; date formats -; see http://www.php.net/manual/en/function.date.php for details -[format] - -SHORT = "" -ISO8601SHORT = "Ymd" -ISO8601 = "Y-m-d" -ISO8601BAS = "Ymd\THis" -ISO8601EXT = "Y-m-d\TH:i:s" -ISO8601FULL = "Y-m-d\TH:i:sO" -ISO8601WEEK = "Y\WW" -GER1 = "d\.m\.Y" -GER2 = "d\.m\.Y\, H:i" -GER3 = "d\.m\.Y\, H:i:s" -GER4 = "d\. F Y\, H:i:s" -ENGLONG = "l dS of F Y h:i:s A" -GMDATE = "D, d M Y H:i:s \G\M\T" -RFC822 = "r" -UNIX = "U" -LONG = "F j, Y, g:i a" - - -[timezone] --6="New York" -0="UTC (GMT)" -60="MET (Middle European Time)" -120="MEST (Middle European Summertime)" diff --git a/config/dos2unix.sh b/config/dos2unix.sh @@ -1,5 +1,6 @@ #!/bin/bash # +# Kill windows line endings # for fn in *.ini.php; do tr -d '\015' < $fn > $fn.new diff --git a/config/editor.ini.php b/config/editor.ini.php @@ -1,144 +0,0 @@ -; <?php exit('direct access denied') ?> - -; Settings for Text Formatting Rules -[text-markup] - -; Strong/important text (mostly "bold") -strong-begin = "*" -strong-end = "*" - -; Emphatic text (mostly "italic") -emphatic-begin = "_" -emphatic-end = "_" - -; Image -image-begin = "{" -image-end = "}" - -; Speech -speech-begin = QUOTE -speech-end = QUOTE - -; text with same width -code-begin = "=" -code-end = "=" - -; footnotes -footnote-begin = "[" -footnote-end = "]" - -; pre-formatted Text -pre-begin = "=" -pre-end = "=" - -; Inserted Text -insert-begin = "++" -insert-end = "++" - -; Removed text -remove-begin = "--" -remove-end = "--" - -; Separator for a definition item -definition-sep = "::" - -; Indenting headline -headline = "+" - -; Underlining of headline level 1 -headline_level1_underline = "=" - -; Underlining of headline level 2 -headline_level2_underline = "-" - -; Underlining of headline level 3 -headline_level3_underline = "." - -; Unnumbered Listentry -list-unnumbered = "-" - -; Numbered Listentry -list-numbered = "#" - -; Table of content -table-of-content= "##TOC##" - -; Link to -linkto = "->" - -; Table cell separator -table-cell-sep = "|" - -style-begin = "'" -style-end = "'" - -; Quote Text -quote = ">" -quote-line-begin = ">" -quote-line-end = ">" - -; Makro -macro-begin = "<<" -macro-end = ">>" -macro-attribute-quote = "'" -macro-attribute-value-seperator = "=" - -[html] - -; Which HTML-Tag to use for cites -tag_strong = "strong" - -; Which HTML-Tag to use for emphatic text -tag_emphatic = "em" - -; Which HTML-Tag to use for teletyped text -tag_teletype = "tt" - -; Which HTML-Tag to use for cites -tag_speech = "cite" - -; OpenRat tries to use a good speech tag. You may override this. -override_speech = false -override_speech_open = "&laquo;" -override_speech_close = "&raquo;" - -; HTML-Rendermode -; explains how to handle emtpy elements. -; 'xml' => <br />, <image src="..." /> -; 'sgml' => <br>, <image src="..."> -rendermode=sgml -;rendermode=xml - -replace = "EUR:&euro; (c):&copy; (r):&reg; ^1:&sup1; ^2:&sup2; ^3:&sup3; 1/4:&frac14; 1/2:&frac12; 3/4:&frac34;" - - - -[wiki] - -convert_html=true -convert_bbcode=true - - - -; Settings for text/plain-documents -[text] - -; maximum line length -linelength=70 - - - -; Calendar settings -[calendar] - -; Weekday-Offset: Ho many days a week begins after Sunday. -; 0 = Week begins with Sunday (America, Australia, Islam) -; 1 = Week begins with Monday (ISO-8601, Europe) -weekday_offset=1 - - -[text] -linelength=70 - -[macro] -show_errors=false diff --git a/config/filename.ini.php b/config/filename.ini.php @@ -1,14 +0,0 @@ -; <?php die('no access'); ?> - -edit = true ; Allow editing of filenames (true|false) -default = index ; filename of index file. Default: 'index'. - -;style = ss ; poor imitation of story server urls -;style = id ; simply use the object id for the url -;style = longid ; use a more longer id in the url -style = short ; use a url which is as short as possible -; hint: If edit=true, then the stored filename will be used. -; If no filename stored, or if edit=false, then the defined style is used. - -url=relative ; how the target url is referenced (relative|absolute), 'relative' is always a good choice. - diff --git a/config/ftp.ini.php b/config/ftp.ini.php @@ -1,3 +0,0 @@ -; <?php exit('direct access denied') ?> - -ascii = html,htm,php ; file extensions to use FTP ascii mode for diff --git a/config/help.ini.php b/config/help.ini.php @@ -1,14 +0,0 @@ -; <?php exit('direct access denied') ?> - -; Enable online help -enabled=true - -; URL to the documents -url=help/html/ -;url=http://help.openrat.de/ - -; file extension of the help documents -suffix=.html - -; show only a question mark instead of "help" -only_question_mark=false diff --git a/config/html.ini.php b/config/html.ini.php @@ -1,10 +0,0 @@ -; <?php exit('direct access denied') ?> - -; *** this page is outdated and will be removed in a future version *** - -tag_teletype = tt -tag_emphatic = em -tag_strong = strong -tag_speech = cite -speech_open = "&bdquo;" -speech_close = "&rdquo;" diff --git a/config/i18n.ini.php b/config/i18n.ini.php @@ -1,21 +0,0 @@ -; <?php exit('direct access denied') ?> - -; Search for language in HTTP header -; This is a useful setting. The Browser says, which language will be taken. -use_http=true - - -; Default language -default=de - - -; Available Languages. -; A comma seperated list with language codes. -available=de,en,es,fr,it,ru,cn - - - -; Mappings from the language to installed locales -[locale] -de="de_DE.utf8" -en="en_US.utf8" diff --git a/config/image.ini.php b/config/image.ini.php @@ -1,4 +0,0 @@ -; <?php exit('direct access denied') ?> - -; Say 'true' if GD2 is available, otherwise 'false' -truecolor=true diff --git a/config/interface.ini.php b/config/interface.ini.php @@ -1,152 +0,0 @@ -; <?php exit('direct access denied') ?> - -; In Application-Mode all window-borders and window-titles are disabled. -; This is useful, if you are using something like "Mozilla Prism" and -; want OpenRat to look more like a native application. -; Default=false -application_mode=false - - -; width of navigation frame (tree) -; (actually outdated!) -tree_width = "25%" - - -; The seperator char between directory names -file_separator = " &raquo; " - - -; be aware: if 'true' you need special rewrite rules in a .htaccess file! -; If unsure, say "false" here. -nice_urls = false - - -; In most environments this setting is "false" -url_sessionid = false - - -; Theme -; At the moment, der is only "default" available. -theme = "default" - - -; Show request duration on every page. Only useful for developers. -show_duration = false - - -; Request timeout in seconds (blank=system default) -; This sets the PHP time limit for an Request. -timeout = - - -; Replace the default title (Program name+version) with this text -; If blank, the default is "OpenRat {Version}". -override_title = - - -; Minimal Width of the browser window. If smaller, then tree is initally disabled. -min_width = 950 - - -; Use redirects before going to view (actually in testing) -; If unsure, say "false" here. -redirect = false - - -; Use of human date format -; looks like "3 years ago", or "7 months ago" -human_date_format = false - - - -; Settings for colors and fonts. -[style] - -; The default style which is used, when no user is logged in. -; 'default' is the classic Openrat style. -default=default - -; 'system' uses system colors from the client (nice choice) -;default=system - - - -; Settings for preferences (under "Administration") -[config] - -; If you have an online editor for editing the .ini-files you can put the URL here. -; Security belongs to the 3rd-party editor! Openrat only creates a link to this url! -; Set to '' (blank) for disabling this. -file_manager_url="" - -; Enable "preferences"-menu -enable=true - -; show system settings (operating system, system time, ...) -show_system=true - -; show PHP settings -show_interpreter=true - -; show a list of PHP extensions (without any details) -show_extensions=true - - - -; Frameset settings -[frames] - -; Logical name of top-frame. Change this, if you want Openrat running in another parent frameset -top=_top - - -; Manipulating the URL of Openrat. -[url] - -; faking urls -; for faking urls you HAVE TO create a url rewriting rule! -; If unsure, set to "false" -fake_url = false - -; If the entry filename is the index file of the directory, set this to true. -; This enables urls like "path/to/openrat/?a=1&b=2" and hides PHP. -; only useful, if fake_url=false -; if unsure, set to 'false' (default) -index = false - -; abc,xyz.1 -;url_format= "%s,%s.%i" - -; looks like Jakarta Struts: abc,xyz,1.do -url_format= "%s,%s,%d.do" - -; You can create funny urls which look like asp,jsp,jsf and other crap :) -; Hint: Hiding the PHP interpreter *can* increase security. -; But remember, Security by obscurity is lame :) - -; add the session ID as an URL-Parameter. -; useful, if you do not want cookies and trans_sid is not installed. -; if unsure, set to "false" -add_sessionid = false - - - -; Use gravatar images -; see www.gravator.com for details -[gravatar] - -enable=true -size=80 -;default=404 -;rating=g - - - -; Session-related settings -[session] - -; auto-extend the session while the browser is still open. -; if 'true', the title frame will be refreshed automatically -; 1 minute before the session times out. -; Because this is maybe unsecure, the default setting is 'false'. -auto_extend=false diff --git a/config/ldap.ini.php b/config/ldap.ini.php @@ -1,68 +0,0 @@ -; <?php exit('direct access denied') ?> - -; Openrat is able to check passwords against a LDAP-based directory. -; see file "security.ini.php" for relating infos. - -; Hostname of your LDAP server. -host="localhost" - -; TCP-Port of your LDAP server. -port="389" - -; Protocol-Version -; Set this to '2' or '3'. -protocol="2" - -; The format of the DN -; If blank, the DN is automatically searched in the LDAP tree (see section "search"). -; for using LDAP authentication, /security/auth/type has to be set to "ldap"! -;dn = "uid={user},ou=users,dc=example,dc=com" -dn = ""; - -; Settings for authentication against a LDAP directory -; This is only activated, if the setting '/security/auth/type' is 'ldap'. -[search] - -; use of anonymous bind ('true' or 'false') -; if 'true', the following user and password settings are ignored. -anonymous = true - -; if 'anonymous' is 'false': DN of technical user for searching the real user DN -user = "uid=openrat,ou=users,dc=example,dc=com" - -; if 'anonymous' is 'false': password of technical user -password = "verysecret" - -; Base-DN of the subtree where the search begins -basedn = "dc=example,dc=com" - -; Filter setting for searching the user objects. -; The string {user} will be replaced by the user name. -filter = "(uid={user})" - -; Aliases are dereferenced ('true' or 'false') -aliases = true - -; Timeout in seconds -timeout = 30 - -; If the user is found in the LDAP tree, but is not yet stored in the internal database. -; 'true' the user will be logged in and automatically inserted in the internal database. -; 'false' login will be rejected, all users must exist in the internal database. -add = true - - - -; The user-group-relation can be read out of the LDAP tree. -; For using this, /security/authorize/type must be "ldap". -[authorize] - -; Search filter for reading the groups a user belongs to. -group_filter="(memberUid={dn})" - -; LDAP attribute name of the name of the group -group_name="cn" - -; Add groups found in LDAP (but not known in the internal database) automatically into database? -; If 'false', the LDAP groups cannot be used! -auto_add = true diff --git a/config/log.ini.php b/config/log.ini.php @@ -1,31 +0,0 @@ -; <?php exit('direct access denied') ?> - - -; Logfile settings - - -; filename of logfile. Every log entry will be appended to this file. -; This file must be writable by the webserver. -; If blank (default), no logging will be done. -file = "" - -; loglevel are one of 'trace','debug','info','warn','error' -level = "warn" - -; date format (for variable %time, see 'format'. This format is used by PHPs date()-function. -; See http://www.php.net/date -date_format = "M j H:i:s" - -; lookup hostname of client-IP -; this may increase performance, if 'true'. Be careful! -dns_lookup = false - -; output format -; the following variables are replaced: -; %time by the current time of the log entry. -; %level the logging level -; %host client ip ore hostname (see 'dns_lookup' entry above) -; %user username, who is logged in, ore '-' if not logged in. -; %action what is happening now -; %text reason of the log entry -format = "%time %level %host %user %action %text" diff --git a/config/login.ini.php b/config/login.ini.php @@ -1,19 +0,0 @@ -; <?php exit('direct access denied') ?> - -motd="" ; Message of the day, shown in login mask -nologin=false ; Disable Login (for maintanance jobs) -register=false -send_password=false - -[gpl] -url="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html" - -[logo] -file="./themes/default/images/logo.jpg" ; logo (url to image) in login mask -url="http://www.openrat.de" ; linked url in login mask - - -[start] -; After Login, start with the last changed object. -; If 'true', the project menu is not displayed. -start_lastchanged_object=true diff --git a/config/mail.ini.php b/config/mail.ini.php @@ -1,92 +0,0 @@ -; <?php exit('direct access denied') ?> - -; E-Mail Settings - -; Does your server send e-mails? -; 'true' or 'false' -enabled=true - -; The "from"-Adress. Creates a "From: "-Header. -; This is not neccecary. Hint: Most MTAs require a valid email adress. -;from="OpenRat <user@example.com>" - -; This signature is appended at the end of a mail. Use ';' for line-breaks. -; A useful information is maybe the URL of your OpenRat installation. -signature="http://www.openrat.de" - -; Copy Recipient -;cc= - -; Blind Copy recipient -;bcc= - -; Priority of the mail (creates an "X-Priority"-Header) -; 1=Highest, 2=High, 3=Normal, 4=Low, 5=Lowest -; Hint: Most MUAs ignore this header. -priority=3 - - -; Non-7-bit-chars are not allowed in Mailheaders (see RFC 822, 2045, 2047) -; and must be encoded. Openrat supports 3 types of encoding: -; 'Quoted-printable' (default), -; 'Base64' -; '' (blank) no encoding. -header_encoding="Quoted-printable" - - -; Which SMTP client you want to use. -; 'php' : Internal PHP function mail(). -; 'smtp': OpenRat internal SMTP-client -; If unsure, use the builtin PHP function. -;client=smtp -client=php - - -; Whitelist -; A comma-seperated list of domains names -whitelist = "" - -; Blacklist -; A comma-seperated list of domain names -blacklist = "" - - - -; Settings for the internal SMTP client. -; If client='php', you have no need to change anything in this section. -[smtp] - -; Relay host -; It is useful, to have your own relay host, as servers doing greylisting -; *will* deny our smtp try. -; If this is blank, the mail is delivered directly to the destination MX host. -; I repeat, it is better to always use a relay host! -;host="mail.yourdomain.example" -host="locahost" - -; SMTP-Port is '25' in most environments -port="25" - -; SMTP Authentication -; (only needed if using a relay host) -; (FYI: The client makes use of the SMTP "AUTH LOGIN" method. -auth_username="your.user@something.example" -auth_password="notsecret" - -; Timeout in seconds -timeout="45" - -; Your fully-qualified hostname (FQDN) -; if empty, Openrat will use your simple hostname -localhost= -;localhost="your.fully.qualified.hostname.example" - -; Use TLS -; The client will send a "STARTTLS" command after HELO. -; TLS is not tested, use at your own risk! -tls=false - -; Use SSL -; The client will connection using the SSL-protocol. -; This is not tested, use at your own risk! -ssl=false diff --git a/config/mime-types.ini.php b/config/mime-types.ini.php @@ -1,269 +0,0 @@ -; $Id$ - - -ez = application/andrew-inset -csm = application/cu-seeme -cu = application/cu-seeme -tsp = application/dsptype -spl = application/futuresplash -cpt = application/mac-compactpro -hqx = application/mac-binhex40 -nb = application/mathematica -mdb = application/msaccess -doc = application/msword -dot = application/msword -bin = application/octet-stream -oda = application/oda -pdf = application/pdf -pgp = application/pgp-signature -ps = application/postscript -ai = application/postscript -eps = application/postscript -rtf = application/rtf -smi = application/smil -smil = application/smil -xls = application/vnd.ms-excel -xlb = application/vnd.ms-excel -ppt = application/vnd.ms-powerpoint -pps = application/vnd.ms-powerpoint -pot = application/vnd.ms-powerpoint -sdw = application/vnd.stardivision.writer -sgl = application/vnd.stardivision.writer-global -vor = application/vnd.stardivision.writer -sdc = application/vnd.stardivision.calc -sda = application/vnd.stardivision.draw -sdd = application/vnd.stardivision.impress -sdp = application/vnd.stardivision.impress-packed -smf = application/vnd.stardivision.math -sds = application/vnd.stardivision.chart -smd = application/vnd.stardivision.mail -wbxml = application/vnd.wap.wbxml -wmlc = application/vnd.wap.wmlc -wmlsc = application/vnd.wap.wmlscriptc -wp5 = application/wordperfect5.1 -zip = application/zip -wk = application/x-123 -bcpio = application/x-bcpio -vcd = application/x-cdlink -pgn = application/x-chess-pgn -cpio = application/x-cpio -csh = application/x-csh -deb = application/x-debian-package -dcr = application/x-director -dir = application/x-director -dxr = application/x-director -wad = application/x-doom -dms = application/x-dms -dvi = application/x-dvi -pfa = application/x-font -pfb = application/x-font -gsf = application/x-font -pcf = application/x-font -pcf.Z = application/x-font -spl = application/x-futuresplash -gnumeric = application/x-gnumeric -gtar = application/x-gtar -tgz = application/x-gtar -taz = application/x-gtar -hdf = application/x-hdf -phtml = text/html -pht = text/html -php = text/html -phps = text/html -php3 = text/html -php3p = text/html -php4 = text/html -docbook = application/docbook+xml -ica = application/x-ica -jar = application/x-java-archive -jnlp = application/x-java-jnlp-file -ser = application/x-java-serialized-object -class = application/x-java-vm -js = application/x-javascript -chrt = application/x-kchart -kil = application/x-killustrator -kpr = application/x-kpresenter -kpt = application/x-kpresenter -skp = application/x-koan -skd = application/x-koan -skt = application/x-koan -skm = application/x-koan -ksp = application/x-kspread -kwd = application/x-kword - kwt = application/x-kword -latex = application/x-latex -lha = application/x-lha -lzh = application/x-lzh -lzx = application/x-lzx -frm = fbdocapplication/x-maker -maker = fbdocapplication/x-maker -frame = fbdocapplication/x-maker -fm = fbdocapplication/x-maker -fb = fbdocapplication/x-maker -book = fbdocapplication/x-maker -mif = application/x-mif -com = application/x-msdos-program -exe = application/x-msdos-program -bat = application/x-msdos-program -dll = application/x-msdos-program -msi = application/x-msi -nc = application/x-netcdf -cdf = application/x-netcdf -pac = application/x-ns-proxy-autoconfig -o = application/x-object -ogg = application/x-ogg -oza = application/x-oz-application -pl = application/x-perl -pm = application/x-perl -crl = application/x-pkcs7-crl -rpm = application/x-redhat-package-manager -shar = application/x-shar -swf = application/x-shockwave-flash -swfl = application/x-shockwave-flash -sh = application/x-sh -sit = application/x-stuffit -sv4cpio = application/x-sv4cpio -sv4crc = application/x-sv4crc -tar = application/x-tar -tcl = application/x-tcl -tex = application/x-tex -gf = application/x-tex-gf -pk = application/x-tex-pk -texinfo = application/x-texinfo -texi = application/x-texinfo -; "~" = application/x-trash -;"%" = application/x-trash -bak = application/x-trash -old = application/x-trash -sik = application/x-trash -t = application/x-troff -tr = application/x-troff -roff = application/x-troff -man = application/x-troff-man -me = application/x-troff-me -ms = application/x-troff-ms -ustar = application/x-ustar -src = application/x-wais-source -wz = application/x-wingz -crt = application/x-x509-ca-cert -fig = application/x-xfig -au = audio/basic -snd = audio/basic -mid = audio/midi -midi = audio/midi -kar = audio/midi -mpga = audio/mpeg -mpega = audio/mpeg -mp2 = audio/mpeg -mp3 = audio/mpeg -m3u = audio/mpegurl -sid = audio/prs.sid -aif = audio/x-aiff -aiff = audio/x-aiff -aifc = audio/x-aiff -gsm = audio/x-gsm -m3u = audio/x-mpegurl -rpm = audio/x-pn-realaudio-plugin -ra = audio/x-pn-realaudio -rm = audio/x-pn-realaudio -ram = audio/x-pn-realaudio -ra = audio/x-realaudio -pls = audio/x-scpls -wav = audio/x-wav -pdb = chemical/x-pdb -xyz = chemical/x-xyz -bmp = image/bmp -gif = image/gif -ief = image/ief -jpeg = image/jpeg -jpg = image/jpeg -jpe = image/jpeg -pcx = image/pcx -png = image/png -svg = image/svg+xml -svgz = image/svg+xml -tiff = image/tiff -tif = image/tiff -wbmp = image/vnd.wap.wbmp -ras = image/x-cmu-raster -cdr = image/x-coreldraw -pat = image/x-coreldrawpattern -cdt = image/x-coreldrawtemplate -cpt = image/x-corelphotopaint -djvu = image/x-djvu -djv = image/x-djvu -jng = image/x-jng -bmp = image/x-ms-bmp -pnm = image/x-portable-anymap -pbm = image/x-portable-bitmap -pgm = image/x-portable-graymap -ppm = image/x-portable-pixmap -rgb = image/x-rgb -xbm = image/x-xbitmap -xpm = image/x-xpixmap -xwd = image/x-xwindowdump -igs = model/iges -iges = model/iges -msh = model/mesh -mesh = model/mesh -silo = model/mesh -wrl = model/vrml -vrml = model/vrml -csv = text/comma-separated-values -css = text/css -htm = text/html -html = text/html -xhtml = text/html -mml = text/mathml -asc = text/plain -txt = text/plain -text = text/plain -diff = text/plain -rtx = text/richtext -rtf = text/rtf -tsv = text/tab-separated-values -wml = text/vnd.wap.wml -wmls = text/vnd.wap.wmlscript -xml = text/xml -xsl = text/xml -hpp = text/x-c++hdr -hxx = text/x-c++hdr -hh = text/x-c++hdr -cpp = text/x-c++src -cxx = text/x-c++src -cc = text/x-c++src -h = text/x-chdr -csh = text/x-csh -c = text/x-csrc -java = text/x-java -moc = text/x-moc -p = text/x-pascal -pas = text/x-pascal -etx = text/x-setext -sh = text/x-sh -tcl = text/x-tcl -tk = text/x-tcl -tex = text/x-tex -ltx = text/x-tex -sty = text/x-tex -cls = text/x-tex -vcs = text/x-vcalendar -vcf = text/x-vcard -dl = video/dl -fli = video/fli -gl = video/gl -mpeg = video/mpeg -mpg = video/mpeg -mpe = video/mpeg -qt = video/quicktime -mov = video/quicktime -mxu = video/vnd.mpegurl -mng = video/x-mng -asf = video/x-ms-asf -asx = video/x-ms-asf -avi = video/x-msvideo -movie = video/x-sgi-movie -ice = x-conference/x-cooltalk -vrm = x-world/x-vrml -vrml = x-world/x-vrml -wrl = x-world/x-vrml diff --git a/config/publish.ini.php b/config/publish.ini.php @@ -1,124 +0,0 @@ -; <?php exit('direct access denied') ?> - -; Allow editing of file names. -; 'true' : Author is allowed to edit the file names of his files and pages. -; 'false': File names are generated by OpenRat only. -edit=true - - -; filename for the first object in a folder. -; Default is 'index'. -default=index - - -; File naming conventions -; See http://httpd.apache.org/docs/2.0/content-negotiation.html#naming -; '{filename}{language_sep}{language}{type_sep}{type}' means 'foo.en.html' -format = "{filename}{language_sep}{language}{type_sep}{type}" - - -; Seperators, mostly you will use '.' -language_sep = "." -type_sep = "." - - -; 'always': language name is always appended to the filename -; 'auto' : language is appended if there are at least 2 languages -filename_language = auto - - -; 'always': type is always appended to the filename -; 'auto' : type is appended if there are at least 2 project models -filename_type = always - - -; Filename Mode. Only used, if edit=false or no filename is set for an object. -; 'ss' : nice hack for lamers which like storyserver urls like '0,1513,453556,00.html' -; 'id' : simply use the object id. -; 'longid': use a unique and long number. -; 'short' : use a unique name which is as short as possible. -style="id" - - -; Mode of generated URLs. -; 'relative': (Default) Generates URLs like '../../path/to/example.html'. -; 'absolute': Generates URLs like '/path/to/example.html'. -url=relative -;url=absolute - -; Should PHP code in page source be interpreted -; 'false': page source is never interpreted as PHP -; 'auto' : interpreted, if page extension = '.php' -; 'true' : always interpret PHP in page source -enable_php_in_page_content=false - -; Should PHP code in file content be interpreted -; 'false': file content is never interpreted as PHP -; 'auto' : interpreted, if file extension = '.php' -; 'true' : always interpret PHP in file content -enable_php_in_file_content=false - -; Escape all non-ascii characters to HTML entities. -; Normally this is not necessary, if there is a correct charset in the meta-section of your HTML-head. -; 'true' : Escape all non-ascii-characters -; 'false': Do nothing (default) -escape_8bit_characters=false - - - -; Content-Negotiation as defined in RFC 2295. -; These settings are only considered, if the project setting "use content negotiation" is switched on. -[negotiation] - -; if 'true', then the mime-type is omitted in the URL for page links. -page_negotiate_type = true - -; if 'true', then the language is omitted in the URL for page links. -page_negotiate_language = true - -; if 'true', then the mime type is omitted in the URL for file links -file_negotiate_type = true - - - -[project] -; Default publish directory. The edited target directory is appended. -publish_dir="/var/www/" - -; Allow paths in target directory -; 'false': only the base name is taken -; 'true' : user input is taken with full path -override_publish_dir=true - -; Default system command. -; Vars: {name} = project name, -; {dir} = Target directory, -; {dirbase} = Target directory basename -;system_command="sudo -u xyz /usr/local/bin/mirror.sh {dirbase}" -system_command= - -; Input overrides the default system command. -; 'true' or 'false' -override_system_command=true - - - -[ftp] -; 'true' : (Default) FTP is enabled -; 'false': FTP is disabled, f.e. if FTP is not compiled with PHP. -enable=true - -; Default FTP-Port -; Default: '21' -port=21 - -; Default hostname -;host="ftp.example.com" - -; Default path -;path="/path/to/site" - -; Login data -; If not specified (default), anonymous login will be used. -;user=agent_smith -;pass=smith diff --git a/config/replace.ini.php b/config/replace.ini.php @@ -1,11 +0,0 @@ -; <!-- $Id$ --> -; <?php exit('direct access denied') ?> - -; *** This part is deprecated and will be moved/removed in one of the next versions. - -; THIS FILE IS OUTDATED AND NOT USED ANY MORE!!! -; -; See file editor.ini.php section "html", setting "replace". -; -euro = "EUR,&euro;" -copy = "(c),&copy;" diff --git a/config/search.ini.php b/config/search.ini.php @@ -1,20 +0,0 @@ - - -; Settings for the quicksearch field -; -[quicksearch] - -; Show submit button for quicksearch. Not needed for modern browsers -show_button=false - -; Search in the name of objects -search_name=true - -; search in the filename of objects -search_filename=true - -; search in the description of objects -search_description=true - -; Search in all text content (slow on big databases!) -search_content=false diff --git a/config/security.ini.php b/config/security.ini.php @@ -1,329 +0,0 @@ - ; <?php exit('direct access denied') ?> - -; Security settings for Openrat - be careful :) - - - -; All is readonly (for maintanance jobs) -; true|false, default:false -readonly=false - -; Disable publishing -nopublish=false - -; Unix-UMask for all created files -; Default: none (uses system default) -; Example: '0022' (means '-rw-r--r--') -; Example: '0002' (means '-rw-rw-r--') -umask= - -; CHMOD for created files -; Default: none -; Example: '0644' (means '-rw-r--r--') -; Example: '0755' (means '-rwxr-xr-x') -chmod= - -; CHMOD for created directories -; Default: none -; Example: '0755' (means 'drwxr-xr-x') -; Example: '0770' (means 'drwxrwx---') -chmod_dir= - -; You may disable dynamic code. -; dynamic code ("CODE"-Elements in templates) are dangerous, because they may -; interact with the file system (and much more!). -; -; Hint: only admin users are allowed to save dynamic code. -; Enable, if admin users are trustful. -; Disable, if admin users are anonym (f.e. demo-installations). -; Default: true (for secure default installation). -disable_dynamic_code = true - - -; Enable or disable the displaying of system information -show_system_info = true - - -; Useful against CSRF-attacks, this adds a token to all POST request. -use_post_token=true - -; Creates a new Session on login. -; Useful against session fixation attacks. -renew_session_login=false - -; Creates a new Session on logout. -; Useful against session fixation attacks. -renew_session_logout=false - - - -; Default Login -; These values are used for the login form. -[default] - -; default: '' -username= - -; default: '' -password= - - - -; Guest Login -; if enabled, a named guest user is automatically logged in. -[guest] - -; enable auto-login for a guest user. -enable=false - -; Name of the guest user, who is automatically logged in. -; This user must exist in your user database. -user=guest - - - -[login] -; Type of authorization. -; 'http' uses the HTTP Basic Authrization. -; Only available if PHP is used in the module version. -; Not available, if PHP is used via the CGI way. -; Only the default database is available (because there is no way to select another one) -; 'form' shows a login form via a HTML page (default). - -type=form -;type=http - - - -[auth] -; this is the backend where the passwords are checked against. -; 'database' uses the internal database table as password store. -; 'authdb' uses an external database table as password store, see section [authdb] which has to exist. -; 'ldap' uses an external LDAP directory for password checking, see file "ldap.ini.php". -; 'http' uses an HTTP-Auth Server for password checking -type=database - -; per-user setting of the LDAP DN. -; 'true' users which have there LDAP-DN explicitly stored are authenticated against LDAP. -; 'false' no LDAP-DN storage per user. -userdn=false - - - -[authorize] -; A user belongs to certain groups. This information can be stored in 2 ways. -; 'database' uses the internal database for the user-group-relation. (default) -; 'ldap' reads the user-group-relations in a LDAP-Directory -; (in this case, /security/auth/type has to be set to "ldap", too!) -; (see /ldap/authorize!) -type=database -;type=ldap - - - -; password settings -[password] - -; length of automatic generated password -random_length=8 - -; minimum passwort length -min_length=5 - -; Password "salt" -; '' : no salt (default) -; 'id' : salt the password with userid -; 'username': salt the password with username -; 'custom' : use the 'salt_text'-setting -salt = "" - -salt_text = "somerandomtext" - - - -; this section is needed if the setting "auth/type" is 'http'. -; passwords are checked against another HTTP-Server with Basic Authorization. -[http] - -; The URL where an HTTP basic authorization ist required. -url = "http://example.net/restricted-area" - - - -; this section is needed if the setting "auth/type" is 'authdb'. -; passwords are stored against an external database table. -; This is quite useful, if you have another software running (f.e. a forum system) -; and so the user must only remember 1 password. -[authdb] - -; 'mysql', 'postgresql' or 'sqlite' -type = postgresql - -user = dbuser -password = dbpassword -host = 127.0.0.1 -database = dbname -persistent = false - -; the sql which is executed while checking the password. -; the variables {username} and {password} are replaced. -sql = "select 1 from table where user={username} and password=md5({password})" - -; if the user exists in the external database, should it -; automatically be inserted into the openrat internal table? -add = true - - - -; SSL Client certificate Authentication -[ssl] - -; The environment variable name which has the username out of the certificate. -; See modssl-configuration for more infos: -; http://httpd.apache.org/docs/2.0/mod/mod_ssl.html.en#envvars -; if blank, ssl client auth is unused (default) -user_var= -;user_var="REMOTE_USER" -;user_var="SSL_CLIENT_S_DN" -;user_var="SSL_CLIENT_S_DN_CN" - -; if 'true', you trust the client certificate fully, this is a passwordless login! -; take care tto have an useful webserver configuration where you only trust CA-signed certificates. -; if 'true', the 'user_var' is needed. -trust=false - - - -; Open-ID -; see http://openid.net/ for specifications and more informations. -[openid] - -; Enable Open-ID -; default=false -enable=false - -; Should authenticated users, which are not in your user database, automatically be added? -; default=false -add=false - -; Open-Id Logo -; The specification recommends the original Open-Id logo. -;logo_url= -logo_url="http://openid.net/login-bg.gif" - -; Trust-Root -; URL-Prefix in which your OpenRat installations are running. -; default=<empty> (OpenRat tries to use its own server name) -;trust_root=http://your.server.example/openrat/ -trust_root= - -; Trustful servers -; Default='' (all) -;trusted_server=openid1.example.com,openid2.example.com -trusted_server= - -; Should Users fullname and e-mail updated from the OpenId-Server? -update_user=true - -; Using User-Identitys? -user_identity=true - -; List of OpenId-Provider to use -; Special name "identity" for user defined identitys -;provider=example -provider=google - -; location of the providers Yadis-document (XRDS-file) -provider.example.xrds_uri=http://google.com/accounts -; which attribute is used for mappin to the internal database -;provider.example.map_attribute=email -; which attribut of internal user database is used -; valid values are 'mail', 'username' -;provider.example.map_internal=mail - -; Google supports Open-Id 2.0 -provider.google.xrds_uri=http://google.com/accounts/o8/id -provider.google.map_attribute=email -provider.google.name=Google -provider.google.map_internal=mail - -; Yahoo -provider.yahoo.xrds_uri=http://?????? -provider.yahoo.map_attribute=usename -provider.yahoo.map_internal=mail - - - -; Single Sign-on -; These settings are an example for checking login against "PhpMyAdmin". -; PhpMyAdmin must include a link to Openrat with the authid which includes the serialized cookies. -; Example: Include this in the file .../phpmyadmin/main.php: -; <a href="https://example.com/openrat/?authid=<?php echo urlencode(serialize($_COOKIE)) ?>">OpenRat</a> -[sso] - -; use single sign-on? Set to 'true' or 'false'. -enable=false - -; the url against the auth-id will be checked. -;url="http://localhost/check.php?phpsessid={id}&check=true" -url="https://www.example.com/phpmyadmin/main.php?server=1" - -; the name of the parameter, where OpenRat will receive the Id, which will then be checked. -auth_param_name=authid - -; is the auth-id serialized? -auth_param_serialized=true - -; the auth-id will be used as a cookie -cookie=true - -; if the auth-id is no array, use this cookie-name. -cookie_name= - -force=true - -; leave this blank. -expect= - -; this is a regular expression which checks, if the login at the third-party-system is ok. -expect_regexp="/running on/" - -; regular expression for find out the username -; this example is used for "PhpMyAdmin" -username_regexp="/running on localhost as ([a-z]+)@localhost/" - - - -; Settings for a new user -[newuser] - -; These groups are automatically added while a new user is inserted. -groups=YourGroup,AnotherGroup - - - -; Logout settings -[logout] - -; Redirect to this URL after logout -; <blank>= Show Login. -; Default: "" -;redirect_url="http://your.intranet.example/" -redirect_url= - - - -[user] - -; Show E-Mail-Adress in Administration-Interface. -; Default=true. If admin users should not know the mail adresses, set this to false. -; Useful for Demo-Installations where a lot of users may have administration rights. -show_admin_mail=true - -; Show users e-mail-address to other users. -; Default=true. -show_mail=true - -; Users are able to send mesages to another users via e-mail -; (not yet implemented) -send_message=true diff --git a/config/theme.ini.php b/config/theme.ini.php @@ -1,28 +0,0 @@ -; <?php exit('direct access denied') ?> - -; Theme compiler. -; These settings are only useful for developers! -[compiler] - -; Enable the Template Compiler -; files under themes/default/pages must be writable. -; default=false -enable=false - -; Only compile, if the file under themes/default/templates is changed. -; default=true -cache=true - -; Do a CHMOD on a written file. -; default= -chmod= - -; Compile ALL templates at logout -; (only useful while developing) -; default=false -compile_at_logout=true - -; Compile ALL templates to temporary directory -; only useful while developing! Not for production use. -; default:false -compile_to_tmp_dir=false diff --git a/config/webdav.ini.php b/config/webdav.ini.php @@ -1,34 +0,0 @@ -; <!-- $Id$ --> -; <?php exit('direct access denied') ?> - -; WEBDAV-settings - -enable=false - -; Creation of new folders, files. -create=true - -; Maximum filesize for uploaded files (in kB) -max_file_size=1000 - -; Readonly-Access. -readonly=true - -; Set "X-powered-by"-Header? -expose_openrat = true - -; Redirecting from "http://server/path/webdav.php" -; to "http://server/<prefix><session-id>/webdav.php" -; This is a must-have for clients who do not use cookies. -; If 'true', a rewriting rule (.htaccess) is needed. -session_in_uri = false - -; the prefix before the session id. -session_in_uri_prefix = ors - -; Make some Microsoft-specific stuff (they cannot read RFCs): -; - Set "MS-Author-Via:"-Header -; Set to 'true', if you want to use lame clients like MS-Office, MS-IE, ... -; Set to 'false' for strict WEBDAV, but no MS-clients are doing the job... -; -compliant_to_redmond = true diff --git a/config/wiki.ini.php b/config/wiki.ini.php @@ -1,15 +0,0 @@ -; <?php exit('direct access denied') ?> - -; *** This part is deprecated and will be removed in one of the next versions. - -; convert simple HTML-tags to wiki-markup (if HTML is disabled) -convert_html = true - -; convert a few BB-code tags to wiki-markup -convert_bbcode = true - -; how strong text is marked -tag_strong = "*" - -; how emphatic text is marked -tag_emphatic = "_" diff --git a/dispatcher.php b/dispatcher.php @@ -50,12 +50,14 @@ require_once( OR_SERVICECLASSES_DIR."Session.class.".PHP_EXT ); // Vorhandene Konfiguration aus der Sitzung lesen. $conf = Session::getConfig(); -// Wenn Konfiguration noch nicht in Session vorhanden, dann -// aus Datei lesen. +// Konfiguration lesen. +// Wenn Konfiguration noch nicht in Session vorhanden oder die Konfiguration geändert wurde (erkennbar anhand des Datei-Datums) +// dann die Konfiguration neu einlesen. if ( !is_array( $conf ) || $conf['config']['auto_reload'] && Preferences::lastModificationTime()>$conf['config']['last_modification'] ) { // Da die Konfiguration neu eingelesen wird, sollten wir auch die Sitzung komplett leeren. - session_unset(); + if ( is_array($conf) && $conf['config']['session_destroy_on_config_reload'] ) + session_unset(); $conf = Preferences::load(); #echo "<code><tt>"; diff --git a/language/cn.ini.php b/language/cn.ini.php @@ -194,8 +194,8 @@ EL_INFODATE_DATE_PUBLISHED = "Date/Time of Publishing" EL_INFODATE_DATE_SAVED = "Date/Time of last save" EL_INFODATE_DESC = "The Infodate contains an automatic generated date" EL_INFODATE = "Infodate" -EL_INFO_DB_ID = "Database: ID" -EL_INFO_DB_NAME = "Database: Name" +EL_INFO_DB_ID = "数据库" +EL_INFO_DB_NAME = "数据库:产品名称" EL_INFO_DESC = "This Info field contains automatic content" EL_INFO_EDIT_FULLURL = "Url for Login (complete)" EL_INFO_EDIT_URL = "Url for login (relative)" @@ -1108,7 +1108,7 @@ USER_YOURPROFILE = "My settings" VALUE = Content WEEK="Week" -EL_LINKINFO_FILENAME = "Filename (without extension)" +EL_LINKINFO_FILENAME = "ファイル名(拡張子なし)" EL_LINKINFO_FULL_FILENAME = "Complete filename with path" EL_LINKINFO_ID = "ID of linked object" EL_LINKINFO_NAME = "Name of linked object" diff --git a/themes/default/css/layout.css b/themes/default/css/layout.css @@ -59,7 +59,8 @@ div#title overflow:hidden; padding:5px; margin:0px; - margin-bottom:20px; + margin-bottom:10px; + height:25px; } @@ -134,14 +135,6 @@ html,body height:100%; } -div#title -{ - height:23px; -} -ul#history -{ - height:23px; -} /* @@ -169,21 +162,13 @@ div.window > div.menu */ -div.window div.content -{ - height:auto; -} div.window div.status { height:35px; } -div.window div.content div.filler +div.window > div.content { - height:auto; - /* - height:30%; - overflow:auto; - */ + xxoverflow-x:auto; } @@ -229,22 +214,10 @@ div.content a.help, div.content input.ok, div.command > input.submit { - float:left; + /*float:left;*/ } -/* S c h a t t e n */ -div.content a.action, -div.content a.help, -div.content input.ok, -div#title, -div.window, -div#noticebar -{ - -webkit-box-shadow: 3px 2px 5px gray; - -moz-box-shadow: 3px 2px 5px gray; - box-shadow: 3px 2px 5px gray; -} a.help { @@ -393,14 +366,6 @@ a.editorlink:visited text-decoration:none; } -/* Voreingestellte Schriftart */ -body, -body th, -body td -{ - font-family:Arial; - font-size:13px; -} /* Hauptfenster */ body.main @@ -801,12 +766,6 @@ div.tree.closed background: url(../images/tree_plus.png) no-repeat; } -div#tree div.content, -ul.tree li.last, -ul.tree li:last-child -{ - background-color:white; -} body > div { @@ -830,21 +789,33 @@ body > div div.window div.menu > div.icons { - float:right; + /*float:right;*/ } +div.backward_link +{ + float:left; +} +div.forward_link +{ + float:right; +} -div.window div.menu +div.window > div.menu { padding-top:20px; - padding-left:5px; - padding-right:5px; + padding-left:0px; + padding-right:0px; border-bottom:2px solid grey; } -div.window div.menu ul.views { /* general settings */ -text-align: left; /* set to left, right or center */ -list-style-type: none; + +div.window div.menu ul.views +{ + text-align: left; /* set to left, right or center */ + list-style-type: none; + overflow: hidden; /* Gescrollt wird hier mit JavaScript */ + white-space:nowrap; } div.window ul.views li @@ -871,15 +842,6 @@ div.window ul.views li } -div.window ul.views > li.active { - background-color: grey; - color: white; -} - -div.window ul.views li:hover { - background: grey; - color: white; -} @@ -914,13 +876,8 @@ div.window { div.window { + margin:3px; padding:0px; - border:1px solid grey; - - -moz-border-radius:3px; /* Mozilla */ - -webkit-border-radius:3px; /* Webkit */ - -khtml-border-radius:3px; /* Konqui */ - border-radius:3px; } div.window div.content table @@ -974,10 +931,6 @@ ul.tree div cursor:pointer; } -table tr.data, -div.content pre { - background-color: white; -} /* Hintergrund Fenster */ /* @@ -987,14 +940,6 @@ div.window { } */ -/* Sonstiger Fensterhintergrund */ -div#header, /* Titelleite-Hintergrund */ -div.window ul.menu li a, /* Tabs */ -xdiv.window ul.menu li > span, /* Tabs */ -div.window div.header /* Fenster-Header */ -{ - background-color: gray; -} @@ -1032,21 +977,26 @@ div.progress /* V o l l b i l d */ -div.window.fullscreen +div#workbench div.bar > div.frame > 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; + margin:0px; /*set the width and height to 100% of the screen*/ - width:100%; - height:100%; + width:100% !important; + height:100% !important; +} +div#workbench div.bar > div.frame > div.window.fullscreen > div.content +{ + width:100% !important; + height:100% !important; } .invisible @@ -1055,357 +1005,90 @@ div.window.fullscreen } - -/* - 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%; +div#workbench +{ + width:100%; } - - -/* Pull Space >> 12 Columns -----------------------------------------------------------------------------------------------------*/ - - -.container_12 .pull_1 { - left:-8.333%; +body +{ + overflow:hidden; } -.container_12 .pull_2 { - left:-16.667%; +div#workbench > div.bar +{ + float:left; } -.container_12 .pull_3 { - left:-25.0%; +div#workbench > div.bar +{ } -.container_12 .pull_4 { - left:-33.333%; -} -.container_12 .pull_5 { - left:-41.667%; -} -.container_12 .pull_6 { - left:-50.0%; +div#workbench > div.bar > div.frame > div.window > div.content +{ + overflow:auto; } -.container_12 .pull_7 { - left:-58.333%; -} -.container_12 .pull_8 { - left:-66.667%; -} - -.container_12 .pull_9 { - left:-75.0%; +/* + * Formular-Button-Leiste + */ +div.window { + position:relative; } - -.container_12 .pull_10 { - left:-83.333%; +div.content div.bottom +{ + height:30px; + width:200px; + position:absolute; + bottom:30px; + right:0px; + opacity:0.7; } - -.container_12 .pull_11 { - left:-91.667%; +div.content > form +{ + padding-bottom:45px; } - - -/* Clear Floated Elements -----------------------------------------------------------------------------------------------------*/ - -/* http://sonspring.com/journal/clearing-floats */ - -.clear { - clear: both; - display: block; - overflow: hidden; +/* Pfeile nur anzeigen, wenn Maus über der Titelleiste */ +div.views > div.backward_link, +div.views > div.forward_link +{ 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; +div.views:HOVER > div.backward_link, +div.views:HOVER > div.forward_link +{ + visibility: visible; } -.clearfix { - display: inline-block; -} -* html .clearfix { - height: 1%; +div#shortcuts { + height:24px; + margin-left:10px; } - -.clearfix { - display: block; +div#shortcuts > div.shortcut { + width:24px; + height:24px; + margin-left:5px; + float:left; + opacity:0.8; } - - - - - - +div#shortcuts > div.shortcut:HOVER { + + xborder: 1px solid gray; + x-moz-border-radius:2px; /* Mozilla */ + x-webkit-border-radius:2px; /* Webkit */ + x-khtml-border-radius:2px; /* Konqui */ + opacity:1.0; + position:relative; + bottom:3px; + +} @@ -1472,9 +1155,10 @@ div.window.fullscreen body > div#header { display:block; } + ul#history > li { - display:inline; + xdisplay:inline; margin:5px; padding:5px; border:1px solid gray; @@ -1483,7 +1167,7 @@ ul#history > li { } ul#history > li.active { - display:inline; + xdisplay:inline; margin:5px; padding:5px; border:1px solid black; @@ -1491,6 +1175,11 @@ ul#history > li.active { color:black; } +ul#history { + display:none; +} + + table td.readonly { font-style: italic; font-weight: normal; @@ -1502,4 +1191,9 @@ table td.default { table td.changed { font-style: normal; font-weight: bold; -}- \ No newline at end of file +} + + +/* Modale Dialoge */ +#simplemodal-overlay {background-color:#000;} +#simplemodal-container {background-color:#333; border:8px solid #444; padding:12px;}+ \ No newline at end of file diff --git a/themes/default/css/user/default.css b/themes/default/css/user/default.css @@ -1,4 +1,8 @@ +/* Voreingestellte Schriftart */ +body +{ +} /* Formulare */ @@ -58,6 +62,31 @@ label div.description } +div.inputholder +{ + background-color:white; + border:1px solid grey; + margin:0px; + padding:4px; + -moz-border-radius:5px; + -webkit-border-radius:5px; + -khtml-border-radius:5px; + border-radius:5px; +} + + +input +{ + border:0px; + border-bottom:1px solid silver; + padding:2px; + margin:0px; +} +input.error, +.error +{ + border-bottom:1px dotted red !important; +} /* Zwischen-Ueberschriften */ @@ -181,27 +210,87 @@ dl.notice > dd border-bottom: 1px silver solid; } -input.error, -.error + +/* R a h m e n */ +div.windowx { - border:2px dotted red !important; + border:1px solid grey; + + -moz-border-radius:5px; /* Mozilla */ + -webkit-border-radius:5px; /* Webkit */ + -khtml-border-radius:5px; /* Konqui */ + border-radius:5px; } +/* S c h a t t e n */ +div.content a.action, +div.content a.help, +div.content input.ok, +div#title, +div.xwindow, +div#noticebar +{ + -webkit-box-shadow: 3px 2px 5px gray; + -moz-box-shadow: 3px 2px 5px gray; + box-shadow: 3px 2px 5px gray; +} + + + +/* F a r b e n */ + +/* Gesamt-Hintergrund */ body { - background-color:#E0E0D5; - - /* Hintergrundbild */ - background-image: url('http://127.0.0.1/~dankert/cms-test/cms09/themes/default/images/wallpaper-kachel.png'); - background-repeat: repeat; + background-color:#c9c9c9; } -div.window +/* Fenster-Hintergrund */ +div#header, /* Titelleite-Hintergrund */ +div.window > div.menu > div.icons, +div.window > div.content, +div.window > div.menu ul.menu li a, /* Tabs */ +xdiv.window ul.menu li > span, /* Tabs */ +div.window div.header, /* Fenster-Header */ +div.window ul.views > li.active, +div.window ul.views > li.active:hover { - background-color:#E0E0D5; + background-color: gray; + color: white; + font-family:Arial; + font-size:13px; +} + +/* Reiter */ +div.window ul.views li { + font-family:Arial; + font-size:13px; + background-color: #dddddd; + color: blue; } +div.window ul.views li:hover { + background-color: #bbbbbb; + color: blue; +} + + + + +div#tree div.content, +ul.tree li.last, +ul.tree li:last-child, +table tr.data, +div.content pre, +div.dropdown, +div.dropdown a +{ + background-color:white; + color:blue; + font-family: Trebuchet MS, Helvetica, Arial, sans-serif; + font-size: 1.0em; +} /* D r o p d o w n - M e n u e s */ @@ -213,7 +302,6 @@ div.dropdown box-shadow: 3px 2px 10px gray; opacity:0.95; - background-color:white; border:2px solid grey; -moz-border-radius:5px; /* Mozilla */ @@ -228,7 +316,6 @@ div.dropdown font-style:normal; font-weight:normal; text-decoration:none; - color:black; } diff --git a/themes/default/images/icon/backward_nav.gif b/themes/default/images/icon/backward_nav.gif Binary files differ. diff --git a/themes/default/images/icon/close.gif b/themes/default/images/icon/close.gif Binary files differ. diff --git a/themes/default/images/icon/forward_nav.gif b/themes/default/images/icon/forward_nav.gif Binary files differ. diff --git a/themes/default/images/icon/inherit.gif b/themes/default/images/icon/inherit.gif Binary files differ. diff --git a/themes/default/images/icon/tasks_tsk.gif b/themes/default/images/icon/tasks_tsk.gif Binary files differ. 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_config_folder.png b/themes/default/images/icon_config_folder.png Binary files differ. diff --git a/themes/default/images/icon_configuration.png b/themes/default/images/icon_configuration.png Binary files differ. diff --git a/themes/default/images/icon_grouplist.png b/themes/default/images/icon_grouplist.png Binary files differ. diff --git a/themes/default/images/icon_language_list.png b/themes/default/images/icon_language_list.png Binary files differ. diff --git a/themes/default/images/icon_languagelist.png b/themes/default/images/icon_languagelist.png Binary files differ. diff --git a/themes/default/images/icon_model_list.png b/themes/default/images/icon_model_list.png Binary files differ. diff --git a/themes/default/images/icon_modellist.png b/themes/default/images/icon_modellist.png Binary files differ. diff --git a/themes/default/images/icon_project_list.png b/themes/default/images/icon_project_list.png Binary files differ. diff --git a/themes/default/images/icon_projectlist.png b/themes/default/images/icon_projectlist.png Binary files differ. diff --git a/themes/default/images/icon_template_list.png b/themes/default/images/icon_template_list.png Binary files differ. diff --git a/themes/default/images/icon_templatelist.png b/themes/default/images/icon_templatelist.png Binary files differ. diff --git a/themes/default/images/icon_user_list.png b/themes/default/images/icon_user_list.png Binary files differ. diff --git a/themes/default/images/icon_userlist.png b/themes/default/images/icon_userlist.png Binary files differ. diff --git a/themes/default/include/elements.ini.php b/themes/default/include/elements.ini.php @@ -5,7 +5,7 @@ output = button = type:submit,src,class:ok,value:ok,text:button_ok -cell = width,style,class,colspan,rowspan,header:false,title,url +cell = width,style,class,colspan,rowspan,header:false,title,url,action,id,name char = type:* checkbox = default:false,readonly:false,name:* date = date @@ -22,11 +22,11 @@ editor = name:*,type:* else = if = equals,value,not,empty,present,contains,greaterthan,lessthan,true,false image = config,file,url,icon,align:left,type,elementtype,fileext,tree,notice,size,title -input = class:text,default:,type:text,index,name:*,prefix,value,size:,maxlength:256,onchange:,readonly:false +input = class:text,default:,type:text,index,name:*,prefix,value,size:,maxlength:256,onchange:,readonly:false,hint:,icon: inputarea= name,rows:10,cols:40,value,index,onchange,prefix,class:inputarea,default: insert = file,script,inline:false,url,name,function label = for,value,key -link = title:,config,type:,target,var,url,class:,action,subaction,id,var1,value1,var2,value2,var3,value3,var4,value4,var5,value5,accesskey,name,anchor,frame:_self +link = title:,config,type:,target,var,url,class:,action,subaction,id,var1,value1,var2,value2,var3,value3,var4,value4,var5,value5,accesskey,name,anchor,frame:_self,modal:false list = list:*,extract:false,key:list_key,value:list_value logo = name:* newline = diff --git a/themes/default/include/html/cell.inc.php b/themes/default/include/html/cell.inc.php @@ -26,7 +26,7 @@ title="%title%" #END-IF# -#IF-ATTR url# - onclick="javascript:loadViewByName('<?php echo $view ?>','<?php echo $attr_url ?>'); " +#IF-ATTR id# + onclick="javascript:openNewAction('<?php echo $attr_name ?>','<?php echo $attr_action ?>','<?php echo $attr_id ?>'); " #END-IF# > \ No newline at end of file diff --git a/themes/default/include/html/form-end.inc.php b/themes/default/include/html/form-end.inc.php @@ -1,2 +1,9 @@ -</form> +<div class="bottom"> + <div class="command"> + <input type="button" class="submit" value="<?php echo lang('BUTTON_OK') ?>" onclick="$(this).closest('div.window').find('form').submit();" /> + <input type="button" class="submit" value="<?php echo lang('CANCEL') ?>" onclick="$('ul#history li.active').click();" /> + </div> +</div> + +</form> diff --git a/themes/default/include/html/form.inc.php b/themes/default/include/html/form.inc.php @@ -38,7 +38,7 @@ target="<?php echo $attr_target ?>" action="<?php echo Html::url( $attr_action,$attr_subaction,$attr_id ) ?>" method="<?php echo $attr_method ?>" - enctype="<?php echo $attr_enctype ?>" style="margin:0px;padding:0px;" + enctype="<?php echo $attr_enctype ?>" class="<?php echo $attr_action ?>" onSubmit="<?php echo $attr_tmp_submitFunction ?>"><input type="submit" class="invisible" /> diff --git a/themes/default/include/html/input.inc.php b/themes/default/include/html/input.inc.php @@ -6,7 +6,7 @@ ?><?php if (!$attr_readonly || $attr_type=='hidden') { /* Feld editieren */ -?><input<?php if ($attr_readonly) echo ' disabled="true"' ?> id="id_<?php echo $attr_name ?><?php if ($attr_readonly) echo '_disabled' ?>" name="<?php echo $attr_name ?><?php if ($attr_readonly) echo '_disabled' ?>" type="<?php echo $attr_type ?>" maxlength="<?php echo $attr_maxlength ?>" class="<?php echo str_replace(',',' ',$attr_class) ?>" value="<?php echo $tmp_value ?>" <?php if (in_array($attr_name,$errors)) echo 'style="border:2px dashed red;"' ?> /><?php +?><div class="inputholder"><input<?php if ($attr_readonly) echo ' disabled="true"' ?><?php if ($attr_hint) echo ' data-hint="'.$attr_hint.'"'; ?> id="id_<?php echo $attr_name ?><?php if ($attr_readonly) echo '_disabled' ?>" name="<?php echo $attr_name ?><?php if ($attr_readonly) echo '_disabled' ?>" type="<?php echo $attr_type ?>" maxlength="<?php echo $attr_maxlength ?>" class="<?php echo str_replace(',',' ',$attr_class) ?>" value="<?php echo $tmp_value ?>" <?php if (in_array($attr_name,$errors)) echo 'style="border:2px dashed red;"' ?> /><?php if ($attr_icon) echo '<img class="icon" src="'.$image_dir.'icon_'.$attr_icon.IMG_ICON_EXT.'" width="16" height="16" />'; ?></div><?php if ($attr_readonly) { /* Nur anzeigen */ ?><input type="hidden" id="id_<?php echo $attr_name ?>" name="<?php echo $attr_name ?>" value="<?php echo $tmp_value ?>" /><?php diff --git a/themes/default/include/html/link.inc.php b/themes/default/include/html/link.inc.php @@ -63,7 +63,7 @@ break; default: - $tmp_function_call = "alert('TODO');"; + $tmp_function_call = "alert('Link-attribute type required');"; } // if ( substr($tmp_url,0,10) != 'javascript' ) diff --git a/themes/default/include/html/radio.inc.php b/themes/default/include/html/radio.inc.php @@ -8,7 +8,7 @@ else $attr_tmp_default = ''; - ?><input onclick="" class="radio" type="radio" id="id_<?php echo $attr_name.'_'.$attr_value ?>" name="<?php echo $attr_prefix.$attr_name ?>"<?php if ( $attr_readonly ) echo ' disabled="disabled"' ?> value="<?php echo $attr_value ?>" <?php if($attr_value==$attr_tmp_default) echo 'checked="checked"' ?><?php if (in_array($attr_name,$errors)) echo ' style="borderx:2px dashed red; background-color:red;"' ?> /> + ?><input onclick="" class="radio" type="radio" id="id_<?php echo $attr_name.'_'.$attr_value ?>" name="<?php echo $attr_prefix.$attr_name ?>"<?php if ( $attr_readonly ) echo ' disabled="disabled"' ?> value="<?php echo $attr_value ?>"<?php if($attr_value==$attr_tmp_default||@$attr_checked) echo ' checked="checked"' ?><?php if (in_array($attr_name,$errors)) echo ' style="borderx:2px dashed red; background-color:red;"' ?> /> <?php /* #IF-ATTR deactivated-children# */ ?> <script name="Javascript" type="text/javascript"> diff --git a/themes/default/js/jquery.mjs.nestedSortable.js b/themes/default/js/jquery.mjs.nestedSortable.js @@ -0,0 +1,426 @@ +/* + * jQuery UI Nested Sortable + * v 1.3.5 / 21 jun 2012 + * http://mjsarfatti.com/code/nestedSortable + * + * Depends on: + * jquery.ui.sortable.js 1.8+ + * + * Copyright (c) 2010-2012 Manuele J Sarfatti + * Licensed under the MIT License + * http://www.opensource.org/licenses/mit-license.php + */ + +(function($) { + + $.widget("mjs.nestedSortable", $.extend({}, $.ui.sortable.prototype, { + + options: { + tabSize: 20, + disableNesting: 'mjs-nestedSortable-no-nesting', + errorClass: 'mjs-nestedSortable-error', + listType: 'ol', + maxLevels: 0, + protectRoot: false, + rootID: null, + rtl: false, + isAllowed: function(item, parent) { return true; } + }, + + _create: function() { + this.element.data('sortable', this.element.data('nestedSortable')); + + if (!this.element.is(this.options.listType)) + throw new Error('nestedSortable: Please check the listType option is set to your actual list type'); + + return $.ui.sortable.prototype._create.apply(this, arguments); + }, + + destroy: function() { + this.element + .removeData("nestedSortable") + .unbind(".nestedSortable"); + return $.ui.sortable.prototype.destroy.apply(this, arguments); + }, + + _mouseDrag: function(event) { + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + if (!this.lastPositionAbs) { + this.lastPositionAbs = this.positionAbs; + } + + //Do scrolling + if(this.options.scroll) { + var o = this.options, scrolled = false; + if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') { + + if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; + else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; + + if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; + else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; + + } else { + + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(this, event); + } + + //Regenerate the absolute position used for position checks + this.positionAbs = this._convertPositionTo("absolute"); + + // Find the top offset before rearrangement, + var previousTopOffset = this.placeholder.offset().top; + + //Set the helper position + if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; + if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; + + //Rearrange + for (var i = this.items.length - 1; i >= 0; i--) { + + //Cache variables and intersection, continue if no intersection + var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item); + if (!intersection) continue; + + if(itemElement != this.currentItem[0] //cannot intersect with itself + && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before + && !$.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked + && (this.options.type == 'semi-dynamic' ? !$.contains(this.element[0], itemElement) : true) + //&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container + ) { + + $(itemElement).mouseenter(); + + this.direction = intersection == 1 ? "down" : "up"; + + if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) { + $(itemElement).mouseleave(); + this._rearrange(event, item); + } else { + break; + } + + // Clear emtpy ul's/ol's + this._clearEmpty(itemElement); + + this._trigger("change", event, this._uiHash()); + break; + } + } + + var parentItem = (this.placeholder[0].parentNode.parentNode && + $(this.placeholder[0].parentNode.parentNode).closest('.ui-sortable').length) + ? $(this.placeholder[0].parentNode.parentNode) + : null, + level = this._getLevel(this.placeholder), + childLevels = this._getChildLevels(this.helper); + + // To find the previous sibling in the list, keep backtracking until we hit a valid list item. + var previousItem = this.placeholder[0].previousSibling ? $(this.placeholder[0].previousSibling) : null; + if (previousItem != null) { + while (previousItem[0].nodeName.toLowerCase() != 'li' || previousItem[0] == this.currentItem[0] || previousItem[0] == this.helper[0]) { + if (previousItem[0].previousSibling) { + previousItem = $(previousItem[0].previousSibling); + } else { + previousItem = null; + break; + } + } + } + + // To find the next sibling in the list, keep stepping forward until we hit a valid list item. + var nextItem = this.placeholder[0].nextSibling ? $(this.placeholder[0].nextSibling) : null; + if (nextItem != null) { + while (nextItem[0].nodeName.toLowerCase() != 'li' || nextItem[0] == this.currentItem[0] || nextItem[0] == this.helper[0]) { + if (nextItem[0].nextSibling) { + nextItem = $(nextItem[0].nextSibling); + } else { + nextItem = null; + break; + } + } + } + + var newList = document.createElement(o.listType); + + this.beyondMaxLevels = 0; + + // If the item is moved to the left, send it to its parent's level unless there are siblings below it. + if (parentItem != null && nextItem == null && + (o.rtl && (this.positionAbs.left + this.helper.outerWidth() > parentItem.offset().left + parentItem.outerWidth()) || + !o.rtl && (this.positionAbs.left < parentItem.offset().left))) { + parentItem.after(this.placeholder[0]); + this._clearEmpty(parentItem[0]); + this._trigger("change", event, this._uiHash()); + } + // If the item is below a sibling and is moved to the right, make it a child of that sibling. + else if (previousItem != null && + (o.rtl && (this.positionAbs.left + this.helper.outerWidth() < previousItem.offset().left + previousItem.outerWidth() - o.tabSize) || + !o.rtl && (this.positionAbs.left > previousItem.offset().left + o.tabSize))) { + this._isAllowed(previousItem, level, level+childLevels+1); + if (!previousItem.children(o.listType).length) { + previousItem[0].appendChild(newList); + } + // If this item is being moved from the top, add it to the top of the list. + if (previousTopOffset && (previousTopOffset <= previousItem.offset().top)) { + previousItem.children(o.listType).prepend(this.placeholder); + } + // Otherwise, add it to the bottom of the list. + else { + previousItem.children(o.listType)[0].appendChild(this.placeholder[0]); + } + this._trigger("change", event, this._uiHash()); + } + else { + this._isAllowed(parentItem, level, level+childLevels); + } + + //Post events to containers + this._contactContainers(event); + + //Interconnect with droppables + if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); + + //Call callbacks + this._trigger('sort', event, this._uiHash()); + + this.lastPositionAbs = this.positionAbs; + return false; + + }, + + _mouseStop: function(event, noPropagation) { + + // If the item is in a position not allowed, send it back + if (this.beyondMaxLevels) { + + this.placeholder.removeClass(this.options.errorClass); + + if (this.domPosition.prev) { + $(this.domPosition.prev).after(this.placeholder); + } else { + $(this.domPosition.parent).prepend(this.placeholder); + } + + this._trigger("revert", event, this._uiHash()); + + } + + // Clean last empty ul/ol + for (var i = this.items.length - 1; i >= 0; i--) { + var item = this.items[i].item[0]; + this._clearEmpty(item); + } + + $.ui.sortable.prototype._mouseStop.apply(this, arguments); + + }, + + serialize: function(options) { + + var o = $.extend({}, this.options, options), + items = this._getItemsAsjQuery(o && o.connected), + str = []; + + $(items).each(function() { + var res = ($(o.item || this).attr(o.attribute || 'id') || '') + .match(o.expression || (/(.+)[-=_](.+)/)), + pid = ($(o.item || this).parent(o.listType) + .parent(o.items) + .attr(o.attribute || 'id') || '') + .match(o.expression || (/(.+)[-=_](.+)/)); + + if (res) { + str.push(((o.key || res[1]) + '[' + (o.key && o.expression ? res[1] : res[2]) + ']') + + '=' + + (pid ? (o.key && o.expression ? pid[1] : pid[2]) : o.rootID)); + } + }); + + if(!str.length && o.key) { + str.push(o.key + '='); + } + + return str.join('&'); + + }, + + toHierarchy: function(options) { + + var o = $.extend({}, this.options, options), + sDepth = o.startDepthCount || 0, + ret = []; + + $(this.element).children(o.items).each(function () { + var level = _recursiveItems(this); + ret.push(level); + }); + + return ret; + + function _recursiveItems(item) { + var id = ($(item).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/)); + if (id) { + var currentItem = {"id" : id[2]}; + if ($(item).children(o.listType).children(o.items).length > 0) { + currentItem.children = []; + $(item).children(o.listType).children(o.items).each(function() { + var level = _recursiveItems(this); + currentItem.children.push(level); + }); + } + return currentItem; + } + } + }, + + toArray: function(options) { + + var o = $.extend({}, this.options, options), + sDepth = o.startDepthCount || 0, + ret = [], + left = 2; + + ret.push({ + "item_id": o.rootID, + "parent_id": 'none', + "depth": sDepth, + "left": '1', + "right": ($(o.items, this.element).length + 1) * 2 + }); + + $(this.element).children(o.items).each(function () { + left = _recursiveArray(this, sDepth + 1, left); + }); + + ret = ret.sort(function(a,b){ return (a.left - b.left); }); + + return ret; + + function _recursiveArray(item, depth, left) { + + var right = left + 1, + id, + pid; + + if ($(item).children(o.listType).children(o.items).length > 0) { + depth ++; + $(item).children(o.listType).children(o.items).each(function () { + right = _recursiveArray($(this), depth, right); + }); + depth --; + } + + id = ($(item).attr(o.attribute || 'id')).match(o.expression || (/(.+)[-=_](.+)/)); + + if (depth === sDepth + 1) { + pid = o.rootID; + } else { + var parentItem = ($(item).parent(o.listType) + .parent(o.items) + .attr(o.attribute || 'id')) + .match(o.expression || (/(.+)[-=_](.+)/)); + pid = parentItem[2]; + } + + if (id) { + ret.push({"item_id": id[2], "parent_id": pid, "depth": depth, "left": left, "right": right}); + } + + left = right + 1; + return left; + } + + }, + + _clearEmpty: function(item) { + + var emptyList = $(item).children(this.options.listType); + if (emptyList.length && !emptyList.children().length) { + emptyList.remove(); + } + + }, + + _getLevel: function(item) { + + var level = 1; + + if (this.options.listType) { + var list = item.closest(this.options.listType); + while (list && list.length > 0 && + !list.is('.ui-sortable')) { + level++; + list = list.parent().closest(this.options.listType); + } + } + + return level; + }, + + _getChildLevels: function(parent, depth) { + var self = this, + o = this.options, + result = 0; + depth = depth || 0; + + $(parent).children(o.listType).children(o.items).each(function (index, child) { + result = Math.max(self._getChildLevels(child, depth + 1), result); + }); + + return depth ? result + 1 : result; + }, + + _isAllowed: function(parentItem, level, levels) { + var o = this.options, + isRoot = $(this.domPosition.parent).hasClass('ui-sortable') ? true : false, + maxLevels = this.placeholder.closest('.ui-sortable').nestedSortable('option', 'maxLevels'); // this takes into account the maxLevels set to the recipient list + + // Is the root protected? + // Are we trying to nest under a no-nest? + // Are we nesting too deep? + if (!o.isAllowed(parentItem, this.placeholder) || + parentItem && parentItem.hasClass(o.disableNesting) || + o.protectRoot && (parentItem == null && !isRoot || isRoot && level > 1)) { + this.placeholder.addClass(o.errorClass); + if (maxLevels < levels && maxLevels != 0) { + this.beyondMaxLevels = levels - maxLevels; + } else { + this.beyondMaxLevels = 1; + } + } else { + if (maxLevels < levels && maxLevels != 0) { + this.placeholder.addClass(o.errorClass); + this.beyondMaxLevels = levels - maxLevels; + } else { + this.placeholder.removeClass(o.errorClass); + this.beyondMaxLevels = 0; + } + } + } + + })); + + $.mjs.nestedSortable.prototype.options = $.extend({}, $.ui.sortable.prototype.options, $.mjs.nestedSortable.prototype.options); +})(jQuery);+ \ No newline at end of file diff --git a/themes/default/js/jquery.scrollTo.js b/themes/default/js/jquery.scrollTo.js @@ -0,0 +1,216 @@ +/*! + * jQuery.ScrollTo + * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com + * Dual licensed under MIT and GPL. + * Date: 06/05/2009 + * + * @projectDescription Easy element scrolling using jQuery. + * http://flesler.blogspot.com/2007/10/jqueryscrollto.html + * Works with jQuery +1.2.6. Tested on FF 2/3, IE 6/7/8, Opera 9.5/6, Safari 3, Chrome 1 on WinXP. + * + * @author Ariel Flesler + * @version 1.4.2 + * + * @id jQuery.scrollTo + * @id jQuery.fn.scrollTo + * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements. + * The different options for target are: + * - A number position (will be applied to all axes). + * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes + * - A jQuery/DOM element ( logically, child of the element to scroll ) + * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc ) + * - A hash { top:x, left:y }, x and y can be any kind of number/string like above. + * - A percentage of the container's dimension/s, for example: 50% to go to the middle. + * - The string 'max' for go-to-end. + * @param {Number, Function} duration The OVERALL length of the animation, this argument can be the settings object instead. + * @param {Object,Function} settings Optional set of settings or the onAfter callback. + * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'. + * @option {Number, Function} duration The OVERALL length of the animation. + * @option {String} easing The easing method for the animation. + * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position. + * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }. + * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes. + * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends. + * @option {Function} onAfter Function to be called after the scrolling ends. + * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends. + * @return {jQuery} Returns the same jQuery object, for chaining. + * + * @desc Scroll to a fixed position + * @example $('div').scrollTo( 340 ); + * + * @desc Scroll relatively to the actual position + * @example $('div').scrollTo( '+=340px', { axis:'y' } ); + * + * @desc Scroll using a selector (relative to the scrolled element) + * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } ); + * + * @desc Scroll to a DOM element (same for jQuery object) + * @example var second_child = document.getElementById('container').firstChild.nextSibling; + * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){ + * alert('scrolled!!'); + * }}); + * + * @desc Scroll on both axes, to different values + * @example $('div').scrollTo( { top: 300, left:'+=200' }, { axis:'xy', offset:-20 } ); + */ + +;(function( $ ){ + + var $scrollTo = $.scrollTo = function( target, duration, settings ){ + $(window).scrollTo( target, duration, settings ); + }; + + $scrollTo.defaults = { + axis:'xy', + duration: parseFloat($.fn.jquery) >= 1.3 ? 0 : 1, + limit:true + }; + + // Returns the element that needs to be animated to scroll the window. + // Kept for backwards compatibility (specially for localScroll & serialScroll) + $scrollTo.window = function( scope ){ + return $(window)._scrollable(); + }; + + // Hack, hack, hack :) + // Returns the real elements to scroll (supports window/iframes, documents and regular nodes) + $.fn._scrollable = function(){ + return this.map(function(){ + var elem = this, + isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1; + + if( !isWin ) + return elem; + + var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem; + + return $.browser.safari || doc.compatMode == 'BackCompat' ? + doc.body : + doc.documentElement; + }); + }; + + $.fn.scrollTo = function( target, duration, settings ){ + if( typeof duration == 'object' ){ + settings = duration; + duration = 0; + } + if( typeof settings == 'function' ) + settings = { onAfter:settings }; + + if( target == 'max' ) + target = 9e9; + + settings = $.extend( {}, $scrollTo.defaults, settings ); + // Speed is still recognized for backwards compatibility + duration = duration || settings.duration; + // Make sure the settings are given right + settings.queue = settings.queue && settings.axis.length > 1; + + if( settings.queue ) + // Let's keep the overall duration + duration /= 2; + settings.offset = both( settings.offset ); + settings.over = both( settings.over ); + + return this._scrollable().each(function(){ + var elem = this, + $elem = $(elem), + targ = target, toff, attr = {}, + win = $elem.is('html,body'); + + switch( typeof targ ){ + // A number will pass the regex + case 'number': + case 'string': + if( /^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ) ){ + targ = both( targ ); + // We are done + break; + } + // Relative selector, no break! + targ = $(targ,this); + case 'object': + // DOMElement / jQuery + if( targ.is || targ.style ) + // Get the real position of the target + toff = (targ = $(targ)).offset(); + } + $.each( settings.axis.split(''), function( i, axis ){ + var Pos = axis == 'x' ? 'Left' : 'Top', + pos = Pos.toLowerCase(), + key = 'scroll' + Pos, + old = elem[key], + max = $scrollTo.max(elem, axis); + + if( toff ){// jQuery / DOMElement + attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] ); + + // If it's a dom element, reduce the margin + if( settings.margin ){ + attr[key] -= parseInt(targ.css('margin'+Pos)) || 0; + attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0; + } + + attr[key] += settings.offset[pos] || 0; + + if( settings.over[pos] ) + // Scroll to a fraction of its width/height + attr[key] += targ[axis=='x'?'width':'height']() * settings.over[pos]; + }else{ + var val = targ[pos]; + // Handle percentage values + attr[key] = val.slice && val.slice(-1) == '%' ? + parseFloat(val) / 100 * max + : val; + } + + // Number or 'number' + if( settings.limit && /^\d+$/.test(attr[key]) ) + // Check the limits + attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max ); + + // Queueing axes + if( !i && settings.queue ){ + // Don't waste time animating, if there's no need. + if( old != attr[key] ) + // Intermediate animation + animate( settings.onAfterFirst ); + // Don't animate this axis again in the next iteration. + delete attr[key]; + } + }); + + animate( settings.onAfter ); + + function animate( callback ){ + $elem.animate( attr, duration, settings.easing, callback && function(){ + callback.call(this, target, settings); + }); + }; + + }).end(); + }; + + // Max scrolling position, works on quirks mode + // It only fails (not too badly) on IE, quirks mode. + $scrollTo.max = function( elem, axis ){ + var Dim = axis == 'x' ? 'Width' : 'Height', + scroll = 'scroll'+Dim; + + if( !$(elem).is('html,body') ) + return elem[scroll] - $(elem)[Dim.toLowerCase()](); + + var size = 'client' + Dim, + html = elem.ownerDocument.documentElement, + body = elem.ownerDocument.body; + + return Math.max( html[scroll], body[scroll] ) + - Math.min( html[size] , body[size] ); + }; + + function both( val ){ + return typeof val == 'object' ? val : { top:val, left:val }; + }; + +})( jQuery );+ \ No newline at end of file diff --git a/themes/default/js/openrat.js b/themes/default/js/openrat.js @@ -1,17 +1,35 @@ +// Default-Subaction +var DEFAULT_CONTENT_ACTION = 'edit'; + $(document).ready(function() { - + refreshAll(); + // Alle 5 Minuten pingen. + window.setInterval( "ping()", 300000 ); }); +/** + * Ping den Server. Führt keine Aktion aus, aber sorgt dafür, dass die Sitzung erhalten bleibt. + * + * "Geben Sie mir ein Ping, Vasily. Und bitte nur ein einziges Ping!" (aus: Jagd auf Roter Oktober) + */ +function ping() +{ + $.ajax( createUrl('title','ping',0) ); + console.log("Session-Ping"); +} + + + function refreshAll() { - $('ul#history').sortable(); + //$('ul#history').sortable(); refreshTitleBar(); refreshWorkbench(); @@ -30,9 +48,7 @@ function refreshAllRefreshables() { var extraid = p.attr('data-extra'); //alert(method+' '+action); - - //alert('go2'); - loadView( p.find('div.filler'),createUrl(action,method,id,extraid)); + loadView( p.find('div.content'),createUrl(action,method,id,extraid)); }); } @@ -50,7 +66,7 @@ function refreshActualView(element) { //alert(method+' '+action); - loadView( p.find('div.filler'),createUrl(action,method,id)); + loadView( p.find('div.content'),createUrl(action,method,id)); }); } @@ -75,18 +91,36 @@ function refreshWorkbench() //alert('go2'); - loadView( p.find('div.filler'),createUrl(action,method,0)); + loadView( p.find('div.content'),createUrl(action,method,0)); }); + + // OnClick-Handler zum Scrollen der Tabs + $('div.backward_link').click( function() { + var $views = $(this).closest('div.views').find('ul.views'); + //$views.scrollTo( -50 ); + var $prev = $views.find('li.action.active').prev(); + $views.scrollTo( $prev,500,{"axis":"x"} ); + $prev.click(); + } + ); + $('div.forward_link').click( function() { + var $views = $(this).closest('div.views').find('ul.views'); + var $next = $views.find('li.action.active').next(); + $views.scrollTo( $next,500,{"axis":"x"} ); + $next.click(); + } + ); // OnClick-Handler für Klick auf einen Tab-Reiter. $('ul.views > li.action').click( function() { + //alert("klicke auf "+$(this).html() ); var method = $(this).attr('data-method'); var p = $(this).closest('div.frame'); 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)); + loadView( p.find('div.content'),createUrl(action,method,id)); }); // Drag n Drop für Views @@ -111,6 +145,13 @@ function refreshWorkbench() // Modale Dialoge //$('form.login, form.profile').dialog( { modal:true, resizable:false, width:760, height:600, draggable: false } ); + + // View-Größe initial berechnen. + resizeWorkbench(); + + $(window).resize( function() { + resizeWorkbench(); + } ); } @@ -119,6 +160,7 @@ function refreshWorkbench() */ function refreshTitleBar() { + console.debug("Reloading Titlebar"); $('div#title').load( createUrl('title','show',0 ),function() { $(this).fadeIn('slow'); registerHeaderEvents(); @@ -138,6 +180,8 @@ function loadViewByName(viewName, url ) function loadView(jo, url ) { + console.debug("Loading "+url); + //alert("Lade "+url + " in Objekt "+jo); // E d i t o r var editorConfig = { @@ -149,14 +193,29 @@ function loadView(jo, url ) }; /* - if ( $(jo).find('textarea#pageelement_edit_editor').length > 0 ) + if ( $(jo).find('textarea#pageelement_edit_editor').size() > 0 ) { var o=CKEDITOR.instances[ $('textarea.editor').attr('name') ]; if (o) o.destroy(); } */ + + // Untermenü ermitteln. + var submenu = ""; + var action = $(jo).closest("div.frame").attr("data-action"); + var method = $(jo).closest("div.frame").find("li.active").attr("data-method"); + + /* + * + var menuEntries = menus[action]; + if ( menuEntries != null ) + { + } + */ + + //alert(action+"_"+method); - $(jo).empty().html('<div class="loader" />').load(url,function(response, status, xhr) { + $(jo).empty().html('<div class="loader" />'+submenu).load(url,function(response, status, xhr) { $(jo).slideDown('fast'); if ( status == "error" ) @@ -175,10 +234,13 @@ function loadView(jo, url ) //CKEDITOR.replace('text',{ // customConfig : 'config-openrat.js' //}); - if ( $(jo).find('form').length > 0 ) - $(jo).closest('div.frame').find('div.bottom > div.command > input').removeClass('invisible'); + + var $formVorhanden = $(jo).find('form').size() > 0; + var $formInput = $(jo).closest('div.frame').find('div.bottom > div.command > input') + if ( $formVorhanden ) + $formInput.removeClass('invisible'); else - $(jo).closest('div.frame').find('div.bottom > div.command > input').addClass('invisible'); + $formInput.addClass('invisible'); if ( $('div.window form input[type=password]').length>0 ) { @@ -218,9 +280,7 @@ function loadView(jo, url ) } }); - /* - * - if ( $(jo).find('textarea#pageelement_edit_editor').length > 0 ) + if ( $(jo).find('textarea#pageelement_edit_editor').size() > 0 ) { var instance = CKEDITOR.instances['pageelement_edit_editor']; if(instance) @@ -229,7 +289,6 @@ function loadView(jo, url ) } CKEDITOR.replace( 'pageelement_edit_editor',{customConfig:'config-openrat.js'} ); } - */ // Wiki-Editor var markitupSettings = { markupSet: [ @@ -270,7 +329,8 @@ function loadView(jo, url ) {'name': 'Preview', 'title': 'Preview', 'css': 'wym_tools_preview'} ] }; - $(jo).find('.htmleditor').wymeditor(wymSettings); + //$(jo).find('.htmleditor').wymeditor(wymSettings); + resizeWorkbench(); }); } @@ -282,35 +342,13 @@ function registerHeaderEvents() $('div.search input').blur( function(){ $('div.search input div.dropdown').fadeOut(); }); - - - $('div.search input').keyup( function(){ - var val = $(this).val(); - if ( val.length > 3 ) - { - $('div.search div.dropdown').html(''); - $.ajax( { 'type':'GET',url:'./dispatcher.php?action=search&subaction=quicksearch&search='+val, data:null, success:function(data, textStatus, jqXHR) - { - for( id in data.result ) - { - var result = data.result[id]; - - //$('div.search input div.dropdown').append('Hallo '+result); - // Suchergebnis-Zeile in das Ergebnis schreiben. - $('div.search div.dropdown').append('<div title="'+result.desc+'"><a href="javascript:loadViewByName(\'content\',\''+result.url+'\');"><img src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+result.type+'.png" />'+result.name+'</a></div>'); - } - } } ); - $('div.search div.dropdown').fadeIn(); - - - } - else - { - $('div.search input div.dropdown').fadeOut(); - } - }); + // Hints... + $('div.search input').orHint(); + + $('div.search input').orSearch( { dropdown:'div.search div.dropdown' } ); + // V e r l a u f $('div#header div.history').hover( function(){ $('div#header div.history div.dropdown').html(''); @@ -367,13 +405,13 @@ function fullscreen( element ) { function loadTree() { // Oberstes Tree-Element erzeugen - $('div#tree div.window div.content div.filler').html("&nbsp;"); + $('div#tree div.window div.content').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 div.filler'),'root',0); - $('div#tree div.content div.filler > ul.tree > li > div.tree').delay(500).click(); + loadBranch( $('div#tree div.content'),'root',0); + $('div#tree div.content > ul.tree > li > div.tree').delay(500).click(); } @@ -477,7 +515,27 @@ function startView( element,view ) var action = $(element).closest('div.frame').attr('data-action'); var id = $(element).closest('div.frame').attr('data-id' ); var url = createUrl(action, view, id); - loadView( $(element).closest('div.filler'), url ); + loadView( $(element).closest('div.content'), url ); + + // Alle refresh-fähigen Views mit dem neuen Objekt laden. + // refreshAllRefreshables(); +} + + +/** + * Setzt neue modale View und aktualisiert alle Fenster. + * @param element + * @param action Action + * @param id Id + */ +function modalView( element,view ) +{ + //alert( "startView: "+$(element).html() ); + var action = $(element).closest('div.frame').attr('data-action'); + var id = $(element).closest('div.frame').attr('data-id' ); + var url = createUrl(action, view, id); + $(element).closest('div.content').modal( { "overlayClose":"true","xxxonClose":function(){alert("close)");} } ); + loadView( $(element).closest('div.content'), url ); // Alle refresh-fähigen Views mit dem neuen Objekt laden. // refreshAllRefreshables(); @@ -515,9 +573,47 @@ function openNewAction( name,action,id,extraId ) setNewAction(action,id,extraId); } ); } + + // Andere Tabs auf inaktiv setzen + $('div#content > div.window > div.menu > div.views > ul.views li.active').removeClass('active'); - setNewAction( action,id,extraId ); + // Tab schon vorhanden? + if ( $('div#content > div.window > div.menu > div.views > ul.views li.'+action+'.id'+id).length > 0 ) + { + // Ja, Tab schon vorhanden + // Gewünschtes Tab aktiv setzen + $('div#content > div.window > div.menu > div.views > ul.views li.'+action+'.id'+id).addClass('active'); + } + else + { + // Neuen Tab in Hauptfenster anlegen + $('div#content > div.window > div.menu > div.views > ul.views li.active').removeClass('active'); + $('div#content > div.window > div.menu > div.views > ul.views').append('<li class="action active '+action+' id'+id+'" data-method="'+DEFAULT_CONTENT_ACTION+'"><span><img src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+action+'.png" title="" />'+name+'<img class="close" src="'+OR_THEMES_EXT_DIR+'default/images/icon/close.gif" title="" /></span></li>'); + $('div#content > div.window > div.menu > div.views > ul.views').scrollLeft(9999); + $('div#content > div.window > div.menu > div.views > ul.views img.close').click( function() + { + // Schließen + $(this).parent().parent().parent().parent().parent().parent().find('div.content').html(''); // Inhalt entfernen + $(this).parent().parent().remove(); // Tab entfernen + } ); + $('div#content > div.window > div.menu > div.views > ul.views li.active').click( function() + { + // Action-Tab wurde angeklickt + $('div#content > div.window > div.menu > div.views > ul.views li.active').removeClass('active'); // Andere Tabs auf inaktiv setzen + $(this).addClass('active'); // Angeklicktes Tab auf aktiv setzen + + // Zum angeklickten Tab scrollen + //$('div#content > div.window > div.menu > div.views > ul.views').scrollTo(this); + + setNewAction(action,id,extraId); + } ); + + } + + // Zum angeklickten Tab scrollen + //$('div#content > div.window > div.menu > div.views > ul.views').scrollTo(this); + setNewAction( action,id,extraId ); } @@ -689,7 +785,7 @@ function doResponse(data,status,element) // Nächste View aufrufen if ( data.control.next_view ) - startView( $(element).closest('div.filler'),data.control.next_view ); + startView( $(element).closest('div.content'),data.control.next_view ); } @@ -890,4 +986,34 @@ function createUrl(action,subaction,id,extraid) } return url; -}- \ No newline at end of file +} + + +/** + * Fenstergröße wurde verändert, nun die Größe der DIVs neu berechnen. + */ +function resizeWorkbench() +{ + // Größe des Anzeige-Bereiches im Browser ermitteln. + var viewportWidth = $(window).width(); + var viewportHeight = $(window).height(); + + // OpenRat-spezifische Ermittlung der einzelnen DIV-Größen + var titleBarHeight = 80; // Title:35px + var viewBorder = 37; // Padding 2x6px, View-Kopf:20px + var singleHeight = viewportHeight - titleBarHeight - viewBorder; + var upperHeight = Math.ceil((viewportHeight - titleBarHeight - viewBorder)*(2/3)); + var lowerHeight = viewportHeight - upperHeight - titleBarHeight - (2*viewBorder); + + var outerWidth = Math.ceil((viewportWidth)*(1/4)); + var innerWidth = viewportWidth-(3*6)-(2*outerWidth); + $('div#workbench > div#navigationbar > div.frame > div.window').css('width',outerWidth+'px'); + $('div#workbench > div#contentbar > div.frame > div.window').css('width',innerWidth+'px'); + $('div#workbench > div#sidebar > div.frame > div.window').css('width',outerWidth+'px'); + $('div#workbench > div#bottombar > div.frame > div.window').css('width',(outerWidth+innerWidth+6)+'px'); + + $('div#workbench > div#navigationbar > div.frame > div.window > div.content').css('height',singleHeight+'px'); + $('div#workbench > div#contentbar > div.frame > div.window > div.content').css('height',upperHeight +'px'); + $('div#workbench > div#sidebar > div.frame > div.window > div.content').css('height',upperHeight +'px'); + $('div#workbench > div#bottombar > div.frame > div.window > div.content').css('height',lowerHeight +'px'); +} diff --git a/themes/default/js/plugin/jquery-plugin-orHint.js b/themes/default/js/plugin/jquery-plugin-orHint.js @@ -0,0 +1,21 @@ +/** + * Input-Hints + */ +jQuery.fn.orHint = function() +{ + + $(this).each(function(i) + { + $(this).val($(this).attr('data-hint')).addClass('hint'); + }); + + return $(this).focus(function() + { + if ($(this).val() == $(this).attr('data-hint')) + $(this).val('').removeClass('hint'); + }).blur(function() + { + if ($(this).val() == '') + $(this).val($(this).attr('data-hint')).addClass('hint'); + }); +};+ \ No newline at end of file diff --git a/themes/default/js/plugin/jquery-plugin-orSearch.js b/themes/default/js/plugin/jquery-plugin-orSearch.js @@ -0,0 +1,37 @@ +/** + * Suche mit Dropdown + */ +jQuery.fn.orSearch = function( options ) +{ + // Create some defaults, extending them with any options that were provided + var settings = $.extend( { + 'dropdown': 'unknown' + }, options); + + + return $(this).keyup( function() + { + var val = $(this).val(); + if ( val.length > 3 ) + { + $(settings.dropdown).html(''); + $.ajax( { 'type':'GET',url:'./dispatcher.php?action=search&subaction=quicksearch&search='+val, data:null, success:function(data, textStatus, jqXHR) + { + for( id in data.result ) + { + var result = data.result[id]; + + // Suchergebnis-Zeile in das Ergebnis schreiben. + $(settings.dropdown).append('<div title="'+result.desc+'"><a href="javascript:openNewAction(\''+result.name+'\',\''+result.type+'\','+id+',0);"><img src="'+OR_THEMES_EXT_DIR+'default/images/icon_'+result.type+'.png" />'+result.name+'</a></div>'); + } + } } ); + $(settings.dropdown).fadeIn(); + + + } + else + { + $(settings.dropdown).fadeOut(); + } + }); +};+ \ No newline at end of file diff --git a/themes/default/layout/index.php b/themes/default/layout/index.php @@ -29,12 +29,20 @@ <link rel="stylesheet" type="text/css" href="<?php echo OR_THEMES_EXT_DIR ?>../editor/markitup/markitup/sets/default/style.css" /> <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery-1.6.2.min.js"></script> <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery-ui/js/jquery-ui-1.8.16.custom.min.js"></script> + <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery.scrollTo.js"></script> + <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery.simplemodal.1.4.2.min.js"></script> + <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery.mjs.nestedSortable.js"></script> + + <!-- OpenRat internal JS --> <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/openrat.js"></script> + <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orHint.js"></script> + <script src="<?php echo OR_THEMES_EXT_DIR ?>default/js/plugin/jquery-plugin-orSearch.js"></script> + <script src="<?php echo OR_THEMES_EXT_DIR ?>../editor/wymeditor/wymeditor/jquery.wymeditor.min.js"></script> <script src="<?php echo OR_THEMES_EXT_DIR ?>../editor/markitup/markitup/jquery.markitup.js"></script> - <!-- <script src="<?php echo OR_THEMES_EXT_DIR ?>../editor/editor/ckeditor.js"></script> <script src="<?php echo OR_THEMES_EXT_DIR ?>../editor/editor/adapters/jquery.js"></script> + <!-- <script src="/~dankert/cms-test/cms09/themes/default/js/jquery-ui/js/jquery-ui-1.8.9.custom.min.js"></script> <script src="/~dankert/cms/themes/default/js/xxxxxxxxxxxjquery-plugin-orSearchBox.js"></script> <link rel="stylesheet" type="text/css" href="<?php echo OR_THEMES_EXT_DIR ?>default/js/jquery-ui/css/pepper-grinder/jquery-ui-1.8.9.custom.css" > diff --git a/themes/default/layout/perspective/administration.ini.php b/themes/default/layout/perspective/administration.ini.php @@ -1,5 +1,6 @@ <?php ?> +icons=projectlist,userlist,grouplist,configuration [tree] @@ -11,15 +12,22 @@ refreshable=false [content] -views=edit,pw,rights -action=projectlist +views= +action= refreshable=true default=edit -[member] +[side] views=memberships,info action=project refreshable=true default=memberships + +[bottom] + +views=info,pw,rights +action=project +refreshable=true +default=info diff --git a/themes/default/layout/perspective/administration.php b/themes/default/layout/perspective/administration.php @@ -1,24 +1,21 @@ - -<div class="container_12"> - -<div class="grid_3"> +<div class="bar" id="navigationbar"> <?php view_header('tree'); ?> </div> -<div class="grid_6"> +<div class="bar" id="contentbar"> <?php view_header('content'); -//view_header('extra'); ?> </div> -<div class="grid_3"> +<div class="bar" id="sidebar"> <?php view_header('member'); -//view_header('extra'); +?> +<?php +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 @@ -14,10 +14,15 @@ function view_header( $name ) <div class="menu"> <div class="views"> +<div class="backward_link"><img src="<?php echo OR_THEMES_EXT_DIR ?>default/images/icon/backward_nav.gif"/></div> +<div class="forward_link"><img src="<?php echo OR_THEMES_EXT_DIR ?>default/images/icon/forward_nav.gif"/></div> <ul class="views"> <?php - foreach( explode(',',$v['views']) as $vn ) + $viewlist = explode(',',$v['views']); + if ( empty($viewlist[0])) $viewlist = array(); + + foreach( $viewlist as $vn ) { $tmp_text = langHtml('menu_'.$vn); $liClass = 'action'.($vn==$v['default']?' active':''); @@ -54,25 +59,22 @@ function view_header( $name ) <!-- Hinweis-Meldungen --> <div class="content"> - <div class="filler"> - <div class="loader"> - </div> - </div> + <div class="empty" /> </div> +<!-- <div class="bottom"> - <div class="status"> </div> <div class="command"> <input type="button" class="submit" value="<?php echo lang('BUTTON_OK') ?>" onclick="$(this).closest('div.window').find('form').submit();" /> - <!-- + <!- <input type="button" value="<?php echo lang('CANCEL') ?>" /> - --> + -> </div> - </div> + --> </div> </div> diff --git a/themes/default/layout/perspective/login.ini.php b/themes/default/layout/perspective/login.ini.php @@ -1,8 +1,21 @@ <?php ?> +[tree] +views= + [content] -views=login,openid,register,license +views=login,openid,register +action=login +refreshable=false +default=login + +[side] +views=license action=login refreshable=false -default=login- \ No newline at end of file +default=license + + +[bottom] +views= diff --git a/themes/default/layout/perspective/login.php b/themes/default/layout/perspective/login.php @@ -1,10 +1,15 @@ -<div class="container_12"> -<div class="prefix_4 grid_4 suffix_4"> +<div class="bar" id="navigationbar"> + <div class="frame">&nbsp;</div> +</div> + +<div class="bar" id="contentbar"> <?php view_header('content'); ?> </div> -</div> +<div class="bar" id="sidebar"> + <div class="frame">&nbsp;</div> +</div>+ \ No newline at end of file diff --git a/themes/default/layout/perspective/normal.ini.php b/themes/default/layout/perspective/normal.ini.php @@ -1,4 +1,6 @@ +icons=templatelist,languagelist + [tree] @@ -13,21 +15,22 @@ refreshable=false title= default=show -views=show,edit,prop,rights -action=folder +views= +action= refreshable=true -[extra] +[side] title= -default=pub -views=pub +default=prop +views=prop,pub action=folder refreshable=true -[extra2] +[bottom] title= default=structure -views=structure,info +views=structure,info,archive,rights refreshable=true + diff --git a/themes/default/layout/perspective/normal.php b/themes/default/layout/perspective/normal.php @@ -1,25 +1,41 @@ -<div class="container_12"> +<!-- +<div id="shortcuts"> +<?php +$icons = @$viewconfig['icons']; +if (false&&!empty($icons)) +{ + foreach( explode(',',$icons) as $name ) + { + echo "<div class=\"shortcut\" title=\"".lang('ACTION_'.$name)."\" onClick=\"javascript:openNewAction('".lang('ACTION_'.$name)."','$name','','');\"><img src=\"".OR_THEMES_EXT_DIR.'/default/images/icon_'.$name.'.png'."\" /></div>"; + } +} +?> + +</div> + --> -<div class="grid_3"> +<div class="bar" id="navigationbar"> <?php view_header('tree'); ?> </div> -<div class="grid_6"> +<div class="bar" id="contentbar"> <?php view_header('content'); ?> </div> -<div class="grid_3"> +<div class="bar" id="sidebar"> <?php -view_header('extra'); +view_header('side'); ?> +</div> + +<div class="bar" id="bottombar"> <?php -view_header('extra2'); +view_header('bottom'); ?> </div> -</div>- \ No newline at end of file diff --git a/themes/default/layout/perspective/profile.ini.php b/themes/default/layout/perspective/profile.ini.php @@ -1,8 +1,25 @@ <?php ?> + +[tree] +views= + [content] -views = edit,settings,pw,memberships +views = edit,pw,memberships action = profile refreshable = false default = edit + + +[side] +views = settings +action = profile +refreshable = false +default = settings + +[bottom] +views = memberships +default = memberships +action = profile +refreshable = false diff --git a/themes/default/layout/perspective/profile.php b/themes/default/layout/perspective/profile.php @@ -1,10 +1,15 @@ -<div class="container_12"> -<div class="prefix_3 grid_6 suffix_3"> +<div class="bar" id="navigationbar"> + <div class="frame">&nbsp;</div> +</div> + +<div class="bar" id="contentbar"> <?php view_header('content'); ?> </div> -</div> +<div class="bar" id="sidebar"> + <div class="frame">&nbsp;</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 @@ -1,8 +1,22 @@ <?php ?> +[tree] +views= + [content] -views=applications,projectmenu +views=projectmenu action=start refreshable=false -default=projectmenu- \ No newline at end of file +default=projectmenu + + +[side] +views=applications +action=start +refreshable=false +default=applications + + +[bottom] +views= diff --git a/themes/default/layout/perspective/start.php b/themes/default/layout/perspective/start.php @@ -1,10 +1,15 @@ -<div class="container_12"> -<div class="prefix_4 grid_4 suffix_4"> +<div class="bar" id="navigationbar"> + <div class="frame">&nbsp;</div> +</div> + +<div class="bar" id="contentbar"> <?php view_header('content'); ?> </div> -</div> +<div class="bar" id="sidebar"> + <div class="frame">&nbsp;</div> +</div>+ \ No newline at end of file diff --git a/themes/default/pages/html/title/show.tpl.php b/themes/default/pages/html/title/show.tpl.php @@ -34,69 +34,24 @@ $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a3_title,$a3_class,$a3_var,$a3_escape,$a3_cut) ?></div><?php $a2_class='search'; ?><div class="<?php echo $a2_class ?>"><?php unset($a2_class) ?><?php $a3_name='';$a3_target='_self';$a3_method='post';$a3_enctype='application/x-www-form-urlencoded';$a3_type=''; ?><?php - $a3_action = $actionName; - $a3_subaction = $targetSubActionName; - $a3_id = $this->getRequestId(); - if ($this->isEditable()) - { - if ($this->isEditMode()) - { - $a3_method = 'POST'; - } - else - { - $a3_method = 'GET'; - $a3_subaction = $subActionName; - } - } - switch( $a3_type ) - { - case 'upload': - $a3_tmp_submitFunction = ''; - break; - default: - $a3_tmp_submitFunction = 'formSubmit( $(this) ); return false;'; - } -?><form name="<?php echo $a3_name ?>" - target="<?php echo $a3_target ?>" - action="<?php echo Html::url( $a3_action,$a3_subaction,$a3_id ) ?>" - method="<?php echo $a3_method ?>" - enctype="<?php echo $a3_enctype ?>" style="margin:0px;padding:0px;" - class="<?php echo $a3_action ?>" - onSubmit="<?php echo $a3_tmp_submitFunction ?>"><input type="submit" class="invisible" /> -<?php if ($this->isEditable() && !$this->isEditMode()) { ?> -<input type="hidden" name="mode" value="edit" /> -<?php } ?> -<input type="hidden" name="<?php echo REQ_PARAM_TOKEN ?>" value="<?php echo token() ?>" /> -<input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo $this->actionName ?>" /> -<input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo $this->subActionName ?>" /> -<input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo $this->getRequestId() ?>" /><?php - if ( $conf['interface']['url_sessionid'] ) - echo '<input type="hidden" name="'.session_name().'" value="'.session_id().'" />'."\n"; -?><?php unset($a3_name,$a3_target,$a3_method,$a3_enctype,$a3_type) ?><?php $a4_icon='search';$a4_align='left'; ?><?php - $a4_tmp_image_file = $image_dir.'icon_'.$a4_icon.IMG_ICON_EXT; - $a4_size = '16x16'; - $a4_tmp_title = basename($a4_tmp_image_file); -?><img alt="<?php echo $a4_tmp_title; if (isset($a4_size)) { echo ' ('; list($a4_tmp_width,$a4_tmp_height)=explode('x',$a4_size);echo $a4_tmp_width.'x'.$a4_tmp_height; echo')';} ?>" src="<?php echo $a4_tmp_image_file ?>" border="0"<?php if(isset($a4_align)) echo ' align="'.$a4_align.'"' ?><?php if (isset($a4_size)) { list($a4_tmp_width,$a4_tmp_height)=explode('x',$a4_size);echo ' width="'.$a4_tmp_width.'" height="'.$a4_tmp_height.'"';} ?> /><?php unset($a4_icon,$a4_align) ?><?php $a4_class='text';$a4_default='';$a4_type='text';$a4_name='text';$a4_value=lang('search');$a4_size='';$a4_maxlength='256';$a4_onchange='';$a4_readonly=false; ?><?php if ($this->isEditable() && !$this->isEditMode()) $a4_readonly=true; - if ($a4_readonly && empty($$a4_name)) $$a4_name = '- '.lang('EMPTY').' -'; - if(!isset($a4_default)) $a4_default=''; - $tmp_value = Text::encodeHtml(isset($$a4_name)?$$a4_name:$a4_default); -?><?php if (!$a4_readonly || $a4_type=='hidden') { -?><input<?php if ($a4_readonly) echo ' disabled="true"' ?> id="id_<?php echo $a4_name ?><?php if ($a4_readonly) echo '_disabled' ?>" name="<?php echo $a4_name ?><?php if ($a4_readonly) echo '_disabled' ?>" type="<?php echo $a4_type ?>" maxlength="<?php echo $a4_maxlength ?>" class="<?php echo str_replace(',',' ',$a4_class) ?>" value="<?php echo $tmp_value ?>" <?php if (in_array($a4_name,$errors)) echo 'style="border:2px dashed red;"' ?> /><?php -if ($a4_readonly) { -?><input type="hidden" id="id_<?php echo $a4_name ?>" name="<?php echo $a4_name ?>" value="<?php echo $tmp_value ?>" /><?php - } } else { ?><a title="<?php echo langHtml('EDIT') ?>" href="<?php echo Html::url($actionName,$subactionName,0,array('mode'=>'edit')) ?>"><span class="<?php echo $a4_class ?>"><?php echo $tmp_value ?></span></a><?php } ?><?php unset($a4_class,$a4_default,$a4_type,$a4_name,$a4_value,$a4_size,$a4_maxlength,$a4_onchange,$a4_readonly) ?><?php $a4_class='dropdown'; ?><div class="<?php echo $a4_class ?>"><?php unset($a4_class) ?><?php $a5_class='text';$a5_raw='';$a5_escape=true;$a5_cut='both'; ?><?php - $a5_title = ''; +?></<?php echo $tmp_tag ?>><?php unset($a3_title,$a3_class,$a3_var,$a3_escape,$a3_cut) ?></div><?php $a2_class='search'; ?><div class="<?php echo $a2_class ?>"><?php unset($a2_class) ?><?php $a3_class='text';$a3_default='';$a3_type='text';$a3_name='text';$a3_size='';$a3_maxlength='256';$a3_onchange='';$a3_readonly=false;$a3_hint=lang('search');$a3_icon='search'; ?><?php if ($this->isEditable() && !$this->isEditMode()) $a3_readonly=true; + if ($a3_readonly && empty($$a3_name)) $$a3_name = '- '.lang('EMPTY').' -'; + if(!isset($a3_default)) $a3_default=''; + $tmp_value = Text::encodeHtml(isset($$a3_name)?$$a3_name:$a3_default); +?><?php if (!$a3_readonly || $a3_type=='hidden') { +?><div class="inputholder"><input<?php if ($a3_readonly) echo ' disabled="true"' ?><?php if ($a3_hint) echo ' data-hint="'.$a3_hint.'"'; ?> id="id_<?php echo $a3_name ?><?php if ($a3_readonly) echo '_disabled' ?>" name="<?php echo $a3_name ?><?php if ($a3_readonly) echo '_disabled' ?>" type="<?php echo $a3_type ?>" maxlength="<?php echo $a3_maxlength ?>" class="<?php echo str_replace(',',' ',$a3_class) ?>" value="<?php echo $tmp_value ?>" <?php if (in_array($a3_name,$errors)) echo 'style="border:2px dashed red;"' ?> /><?php if ($a3_icon) echo '<img class="icon" src="'.$image_dir.'icon_'.$a3_icon.IMG_ICON_EXT.'" width="16" height="16" />'; ?></div><?php +if ($a3_readonly) { +?><input type="hidden" id="id_<?php echo $a3_name ?>" name="<?php echo $a3_name ?>" value="<?php echo $tmp_value ?>" /><?php + } } else { ?><a title="<?php echo langHtml('EDIT') ?>" href="<?php echo Html::url($actionName,$subactionName,0,array('mode'=>'edit')) ?>"><span class="<?php echo $a3_class ?>"><?php echo $tmp_value ?></span></a><?php } ?><?php unset($a3_class,$a3_default,$a3_type,$a3_name,$a3_size,$a3_maxlength,$a3_onchange,$a3_readonly,$a3_hint,$a3_icon) ?><?php $a3_class='dropdown'; ?><div class="<?php echo $a3_class ?>"><?php unset($a3_class) ?><?php $a4_class='text';$a4_raw='';$a4_escape=true;$a4_cut='both'; ?><?php + $a4_title = ''; $tmp_tag = 'span'; -?><<?php echo $tmp_tag ?> class="<?php echo $a5_class ?>" title="<?php echo $a5_title ?>"><?php - $langF = $a5_escape?'langHtml':'lang'; - $tmp_text = str_replace('_','&nbsp;',$a5_raw); +?><<?php echo $tmp_tag ?> class="<?php echo $a4_class ?>" title="<?php echo $a4_title ?>"><?php + $langF = $a4_escape?'langHtml':'lang'; + $tmp_text = str_replace('_','&nbsp;',$a4_raw); $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a5_class,$a5_raw,$a5_escape,$a5_cut) ?></div></form> -</div><?php $a2_class='user'; ?><div class="<?php echo $a2_class ?>"><?php unset($a2_class) ?><?php $a3_icon='user';$a3_align='left'; ?><?php +?></<?php echo $tmp_tag ?>><?php unset($a4_class,$a4_raw,$a4_escape,$a4_cut) ?></div></div><?php $a2_class='user'; ?><div class="<?php echo $a2_class ?>"><?php unset($a2_class) ?><?php $a3_icon='user';$a3_align='left'; ?><?php $a3_tmp_image_file = $image_dir.'icon_'.$a3_icon.IMG_ICON_EXT; $a3_size = '16x16'; $a3_tmp_title = basename($a3_tmp_image_file); @@ -110,7 +65,7 @@ if ($a4_readonly) { $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a3_class,$a3_var,$a3_maxlength,$a3_escape,$a3_cut) ?><?php $a3_class='dropdown'; ?><div class="<?php echo $a3_class ?>"><?php unset($a3_class) ?><?php $a4_title=lang('USER_PROFILE_DESC');$a4_type='post';$a4_class='';$a4_action='start';$a4_subaction='profile';$a4_frame='_self'; ?><?php +?></<?php echo $tmp_tag ?>><?php unset($a3_class,$a3_var,$a3_maxlength,$a3_escape,$a3_cut) ?><?php $a3_class='dropdown'; ?><div class="<?php echo $a3_class ?>"><?php unset($a3_class) ?><?php $a4_title=lang('USER_PROFILE_DESC');$a4_type='post';$a4_class='';$a4_action='start';$a4_subaction='profile';$a4_frame='_self';$a4_modal=false; ?><?php $params = array(); $tmp_url = ''; $a4_target = $view; @@ -126,7 +81,10 @@ if ($a4_readonly) { case 'view': $tmp_function_call = "startView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');"; break; - case 'url': + case 'modal': + $tmp_function_call = "modalView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');"; + break; + case 'url': $tmp_function_call = "submitUrl(this,'".($a4_url)."');"; break; case 'external': @@ -136,9 +94,9 @@ if ($a4_readonly) { $tmp_function_call = "window.open('".$a4_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');"; break; default: - $tmp_function_call = "alert('TODO');"; + $tmp_function_call = "alert('Link-attribute type required');"; } -?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame) ?><?php $a5_icon='user';$a5_align='left'; ?><?php +?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame,$a4_modal) ?><?php $a5_icon='user';$a5_align='left'; ?><?php $a5_tmp_image_file = $image_dir.'icon_'.$a5_icon.IMG_ICON_EXT; $a5_size = '16x16'; $a5_tmp_title = basename($a5_tmp_image_file); @@ -151,7 +109,7 @@ if ($a4_readonly) { $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a5_class,$a5_key,$a5_escape,$a5_cut) ?></a><?php $a4_title=lang('start');$a4_type='post';$a4_class='';$a4_action='start';$a4_subaction='start';$a4_frame='_self'; ?><?php +?></<?php echo $tmp_tag ?>><?php unset($a5_class,$a5_key,$a5_escape,$a5_cut) ?></a><?php $a4_title=lang('start');$a4_type='post';$a4_class='';$a4_action='start';$a4_subaction='start';$a4_frame='_self';$a4_modal=false; ?><?php $params = array(); $tmp_url = ''; $a4_target = $view; @@ -167,7 +125,10 @@ if ($a4_readonly) { case 'view': $tmp_function_call = "startView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');"; break; - case 'url': + case 'modal': + $tmp_function_call = "modalView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');"; + break; + case 'url': $tmp_function_call = "submitUrl(this,'".($a4_url)."');"; break; case 'external': @@ -177,9 +138,9 @@ if ($a4_readonly) { $tmp_function_call = "window.open('".$a4_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');"; break; default: - $tmp_function_call = "alert('TODO');"; + $tmp_function_call = "alert('Link-attribute type required');"; } -?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame) ?><?php $a5_icon='start';$a5_align='left'; ?><?php +?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame,$a4_modal) ?><?php $a5_icon='start';$a5_align='left'; ?><?php $a5_tmp_image_file = $image_dir.'icon_'.$a5_icon.IMG_ICON_EXT; $a5_size = '16x16'; $a5_tmp_title = basename($a5_tmp_image_file); @@ -201,7 +162,7 @@ if ($a4_readonly) { if ( $a4_tmp_exec ) { ?> -<?php unset($a4_true) ?><?php $a5_title='';$a5_type='post';$a5_target='tree';$a5_class='entry';$a5_action='start';$a5_subaction='administration';$a5_id='-1';$a5_frame='_self'; ?><?php +<?php unset($a4_true) ?><?php $a5_title='';$a5_type='post';$a5_target='tree';$a5_class='entry';$a5_action='start';$a5_subaction='administration';$a5_id='-1';$a5_frame='_self';$a5_modal=false; ?><?php $params = array(); $tmp_url = ''; $params[REQ_PARAM_TARGET] = $a5_target; @@ -217,7 +178,10 @@ if ($a4_readonly) { case 'view': $tmp_function_call = "startView(this,'".(!empty($a5_subaction)?$a5_subaction:$this->subActionName)."');"; break; - case 'url': + case 'modal': + $tmp_function_call = "modalView(this,'".(!empty($a5_subaction)?$a5_subaction:$this->subActionName)."');"; + break; + case 'url': $tmp_function_call = "submitUrl(this,'".($a5_url)."');"; break; case 'external': @@ -227,9 +191,9 @@ if ($a4_readonly) { $tmp_function_call = "window.open('".$a5_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');"; break; default: - $tmp_function_call = "alert('TODO');"; + $tmp_function_call = "alert('Link-attribute type required');"; } -?><a target="<?php echo $a5_frame ?>"<?php if (isset($a5_name)) { ?> name="<?php echo $a5_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a5_class ?>"<?php if (isset($a5_accesskey)) echo ' accesskey="'.$a5_accesskey.'"' ?> title="<?php echo encodeHtml($a5_title) ?>"><?php unset($a5_title,$a5_type,$a5_target,$a5_class,$a5_action,$a5_subaction,$a5_id,$a5_frame) ?><?php $a6_icon='administration';$a6_align='left'; ?><?php +?><a target="<?php echo $a5_frame ?>"<?php if (isset($a5_name)) { ?> name="<?php echo $a5_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a5_class ?>"<?php if (isset($a5_accesskey)) echo ' accesskey="'.$a5_accesskey.'"' ?> title="<?php echo encodeHtml($a5_title) ?>"><?php unset($a5_title,$a5_type,$a5_target,$a5_class,$a5_action,$a5_subaction,$a5_id,$a5_frame,$a5_modal) ?><?php $a6_icon='administration';$a6_align='left'; ?><?php $a6_tmp_image_file = $image_dir.'icon_'.$a6_icon.IMG_ICON_EXT; $a6_size = '16x16'; $a6_tmp_title = basename($a6_tmp_image_file); @@ -242,7 +206,7 @@ if ($a4_readonly) { $tmp_text = nl2br($tmp_text); echo $tmp_text; unset($tmp_text); -?></<?php echo $tmp_tag ?>><?php unset($a6_class,$a6_key,$a6_escape,$a6_cut) ?></a><?php } ?><?php $a4_title=lang('USER_LOGOUT_DESC');$a4_type='post';$a4_class='entry';$a4_action='login';$a4_subaction='logout';$a4_frame='_self'; ?><?php +?></<?php echo $tmp_tag ?>><?php unset($a6_class,$a6_key,$a6_escape,$a6_cut) ?></a><?php } ?><?php $a4_title=lang('USER_LOGOUT_DESC');$a4_type='post';$a4_class='entry';$a4_action='login';$a4_subaction='logout';$a4_frame='_self';$a4_modal=false; ?><?php $params = array(); $tmp_url = ''; $a4_target = $view; @@ -258,7 +222,10 @@ if ($a4_readonly) { case 'view': $tmp_function_call = "startView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');"; break; - case 'url': + case 'modal': + $tmp_function_call = "modalView(this,'".(!empty($a4_subaction)?$a4_subaction:$this->subActionName)."');"; + break; + case 'url': $tmp_function_call = "submitUrl(this,'".($a4_url)."');"; break; case 'external': @@ -268,9 +235,9 @@ if ($a4_readonly) { $tmp_function_call = "window.open('".$a4_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');"; break; default: - $tmp_function_call = "alert('TODO');"; + $tmp_function_call = "alert('Link-attribute type required');"; } -?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame) ?><?php $a5_icon='close';$a5_align='left'; ?><?php +?><a target="<?php echo $a4_frame ?>"<?php if (isset($a4_name)) { ?> name="<?php echo $a4_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a4_class ?>"<?php if (isset($a4_accesskey)) echo ' accesskey="'.$a4_accesskey.'"' ?> title="<?php echo encodeHtml($a4_title) ?>"><?php unset($a4_title,$a4_type,$a4_class,$a4_action,$a4_subaction,$a4_frame,$a4_modal) ?><?php $a5_icon='close';$a5_align='left'; ?><?php $a5_tmp_image_file = $image_dir.'icon_'.$a5_icon.IMG_ICON_EXT; $a5_size = '16x16'; $a5_tmp_title = basename($a5_tmp_image_file); @@ -319,7 +286,7 @@ if ($a4_readonly) { $a5_tmp_image_file = $image_dir.'icon_'.$a5_icon.IMG_ICON_EXT; $a5_size = '16x16'; $a5_tmp_title = basename($a5_tmp_image_file); -?><img alt="<?php echo $a5_tmp_title; if (isset($a5_size)) { echo ' ('; list($a5_tmp_width,$a5_tmp_height)=explode('x',$a5_size);echo $a5_tmp_width.'x'.$a5_tmp_height; echo')';} ?>" src="<?php echo $a5_tmp_image_file ?>" border="0"<?php if(isset($a5_align)) echo ' align="'.$a5_align.'"' ?><?php if (isset($a5_size)) { list($a5_tmp_width,$a5_tmp_height)=explode('x',$a5_size);echo ' width="'.$a5_tmp_width.'" height="'.$a5_tmp_height.'"';} ?> /><?php unset($a5_icon,$a5_align) ?><?php $a5_title='';$a5_type='post';$a5_class='entry';$a5_action='start';$a5_subaction='projectmenu';$a5_id=$id;$a5_frame='_self'; ?><?php +?><img alt="<?php echo $a5_tmp_title; if (isset($a5_size)) { echo ' ('; list($a5_tmp_width,$a5_tmp_height)=explode('x',$a5_size);echo $a5_tmp_width.'x'.$a5_tmp_height; echo')';} ?>" src="<?php echo $a5_tmp_image_file ?>" border="0"<?php if(isset($a5_align)) echo ' align="'.$a5_align.'"' ?><?php if (isset($a5_size)) { list($a5_tmp_width,$a5_tmp_height)=explode('x',$a5_size);echo ' width="'.$a5_tmp_width.'" height="'.$a5_tmp_height.'"';} ?> /><?php unset($a5_icon,$a5_align) ?><?php $a5_title='';$a5_type='post';$a5_class='entry';$a5_action='start';$a5_subaction='projectmenu';$a5_id=$id;$a5_frame='_self';$a5_modal=false; ?><?php $params = array(); $tmp_url = ''; $a5_target = $view; @@ -335,7 +302,10 @@ if ($a4_readonly) { case 'view': $tmp_function_call = "startView(this,'".(!empty($a5_subaction)?$a5_subaction:$this->subActionName)."');"; break; - case 'url': + case 'modal': + $tmp_function_call = "modalView(this,'".(!empty($a5_subaction)?$a5_subaction:$this->subActionName)."');"; + break; + case 'url': $tmp_function_call = "submitUrl(this,'".($a5_url)."');"; break; case 'external': @@ -345,9 +315,9 @@ if ($a4_readonly) { $tmp_function_call = "window.open('".$a5_url."', 'Popup', 'location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes');"; break; default: - $tmp_function_call = "alert('TODO');"; + $tmp_function_call = "alert('Link-attribute type required');"; } -?><a target="<?php echo $a5_frame ?>"<?php if (isset($a5_name)) { ?> name="<?php echo $a5_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a5_class ?>"<?php if (isset($a5_accesskey)) echo ' accesskey="'.$a5_accesskey.'"' ?> title="<?php echo encodeHtml($a5_title) ?>"><?php unset($a5_title,$a5_type,$a5_class,$a5_action,$a5_subaction,$a5_id,$a5_frame) ?><?php $a6_class='text';$a6_var='name';$a6_maxlength='45';$a6_escape=true;$a6_cut='both'; ?><?php +?><a target="<?php echo $a5_frame ?>"<?php if (isset($a5_name)) { ?> name="<?php echo $a5_name ?>"<?php }else{ ?> href="javascript:void(0);" onclick="<?php echo $tmp_function_call ?>" <?php } ?> class="<?php echo $a5_class ?>"<?php if (isset($a5_accesskey)) echo ' accesskey="'.$a5_accesskey.'"' ?> title="<?php echo encodeHtml($a5_title) ?>"><?php unset($a5_title,$a5_type,$a5_class,$a5_action,$a5_subaction,$a5_id,$a5_frame,$a5_modal) ?><?php $a6_class='text';$a6_var='name';$a6_maxlength='45';$a6_escape=true;$a6_cut='both'; ?><?php $a6_title = ''; $tmp_tag = 'span'; ?><<?php echo $tmp_tag ?> class="<?php echo $a6_class ?>" title="<?php echo $a6_title ?>"><?php diff --git a/themes/default/templates/configuration/show.tpl.src.xml b/themes/default/templates/configuration/show.tpl.src.xml @@ -1,6 +1,5 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <header views="create"></header> <table> <row class="headline"> <cell class="help"> diff --git a/themes/default/templates/folder/show.tpl.src.xml b/themes/default/templates/folder/show.tpl.src.xml @@ -1,6 +1,5 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <header views="create"></header> <table> <row class="headline"> <cell class="help"> @@ -25,7 +24,7 @@ </if> <list list="object" extract="true"> <row class="data"> - <cell url="var:url" title="var:desc" class="var:class"> + <cell id="var:id" name="var:name" action="var:type" title="var:desc" class="var:class"> <image type="var:icon"></image> <text var="name"></text> <text raw="_"></text> @@ -42,11 +41,35 @@ </cell> </row> </if> - <row> - <cell> - <link type="view" class="action" action="folder" subaction="create"> + <row class="data"> + <cell colspan="2"> + <link type="view" action="folder" subaction="createfolder"> <image file="icon/create"></image> - <text key="menu_folder_create"></text> + <text key="menu_folder_createfolder"></text> + </link> + </cell> + </row> + <row class="data"> + <cell colspan="2"> + <link type="view" action="folder" subaction="createpage"> + <image file="icon/create"></image> + <text key="menu_folder_createpage"></text> + </link> + </cell> + </row> + <row class="data"> + <cell colspan="2"> + <link type="view" action="folder" subaction="createfile"> + <image file="icon/create"></image> + <text key="menu_folder_createfile"></text> + </link> + </cell> + </row> + <row class="data"> + <cell colspan="2"> + <link type="view" action="folder" subaction="createlink"> + <image file="icon/create"></image> + <text key="menu_folder_createlink"></text> </link> </cell> </row> diff --git a/themes/default/templates/grouplist/add.tpl.src.xml b/themes/default/templates/grouplist/add.tpl.src.xml @@ -1,3 +1,13 @@ -<output xmlns="http://www.openrat.de/template" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><header back="true"><form><part class="line"><part class="label"><label for="name" key="name"></label></part><part class="input"><input name="name" class="focus"></input></part></part></form></header></output>- \ No newline at end of file +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form> + <part class="line"> + <part class="label"> + <label for="name" key="name"></label> + </part> + <part class="input"> + <input name="name" class="focus"></input> + </part> + </part> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/grouplist/show.tpl.src.xml b/themes/default/templates/grouplist/show.tpl.src.xml @@ -1,6 +1,5 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <header views="add" /> <table> <row class="headline"> <cell> @@ -9,16 +8,17 @@ </row> <list list="el" extract="true"> <row class="data"> - <cell url="var:url"> + <cell id="var:id" name="var:name" action="group">> <image file="icon_group"></image> <text var="name"></text> </cell> </row> </list> - <row> - <cell> - <link class="action" action="group" subaction="add"> - <text key="menu_group_add"></text> + <row class="data"> + <cell colspan="2"> + <link type="view" subaction="add"> + <image icon="add"/> + <text text="new"/> </link> </cell> </row> diff --git a/themes/default/templates/language/edit.tpl.src.xml b/themes/default/templates/language/edit.tpl.src.xml @@ -1,6 +1,6 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <header views="add,advanced,remove"></header> + <header views="advanced,remove"></header> <form method="post"> <part class="line"> diff --git a/themes/default/templates/languagelist/add.tpl.src.xml b/themes/default/templates/languagelist/add.tpl.src.xml @@ -0,0 +1,13 @@ +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form method="post"> + <part class="line"> + <part class="label"> + <text text="LANGUAGE_ISOCODE"></text> + </part> + <part class="input"> + <selectbox list="isocodes" name="isocode"></selectbox> + </part> + </part> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/languagelist/show.tpl.src.xml b/themes/default/templates/languagelist/show.tpl.src.xml @@ -1,6 +1,5 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <header views="add"></header> <table> <row class="headline"> <cell> @@ -18,7 +17,7 @@ </row> <list list="el" extract="true"> <row class="data"> - <cell url="var:url"> + <cell id="var:id" name="var:name" action="language"> <image file="icon_language"></image> <text var="name" maxlength="25"></text> </cell> @@ -26,8 +25,10 @@ <text var="isocode"></text> </cell> <if present="default_url"> - <cell url="var:default_url"> - <text text="GLOBAL_make_default"></text> + <cell> + <link type="post" action="language" subaction="setdefault" id="var:id"> + <text text="GLOBAL_make_default"></text> + </link> </cell> </if> <else> @@ -36,8 +37,10 @@ </cell> </else> <if present="select_url"> - <cell url="var:select_url"> - <text text="GLOBAL_select"></text> + <cell> + <link type="post" action="start" subaction="language" id="var:id"> + <text text="GLOBAL_select"></text> + </link> </cell> </if> <else> @@ -49,5 +52,13 @@ <set var="select_url"></set> <set var="default_url"></set> </list> + <row class="data"> + <cell colspan="4"> + <link type="view" subaction="add"> + <image icon="add"/> + <text text="new"/> + </link> + </cell> + </row> </table> </output> \ No newline at end of file diff --git a/themes/default/templates/modellist/show.tpl.src.xml b/themes/default/templates/modellist/show.tpl.src.xml @@ -1,6 +1,5 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <header views="add"></header> <table> <row class="headline"> <cell> @@ -15,16 +14,16 @@ </row> <list list="el" extract="true"> <row class="data"> - <cell url="var:url"> - <link target="cms_main"> + <cell id="var:id" name="var:name" action="model"> <image file="icon_model"></image> <text var="name" maxlength="25"></text> - </link> </cell> <if present="default_url"> - <cell url="var:default_url"> - <text text="GLOBAL_make_default"></text> + <cell> + <link type="post" action="model" subaction="setdefault" id="var:id"> + <text text="GLOBAL_make_default"></text> + </link> </cell> </if> <else> @@ -35,8 +34,10 @@ <if present="select_url"> - <cell url="var:select_url"> - <text text="GLOBAL_select"></text> + <cell> + <link type="post" action="start" subaction="model" id="var:id"> + <text text="GLOBAL_select"></text> + </link> </cell> </if> <else> @@ -48,5 +49,13 @@ <set var="select_url"></set> <set var="default_url"></set> </list> + <row class="data"> + <cell colspan="3"> + <link type="view" subaction="add"> + <image icon="add"/> + <text text="new"/> + </link> + </cell> + </row> </table> </output> \ No newline at end of file diff --git a/themes/default/templates/projectlist/add.tpl.src.xml b/themes/default/templates/projectlist/add.tpl.src.xml @@ -1,6 +1,5 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <header back="true"></header> <form method="post"> <part class="line"> <part class="label"> @@ -8,13 +7,13 @@ </part> <part class="input"> - <input name="name"></input> + <input name="name" class="focus"></input> </part> </part> <fieldset title="message:options"> <part class="line"> <part class="label"> - <radio name="type" value="empty"></radio> + <radio name="type" value="empty" checked="true"></radio> <label for="type_empty"> <text key="empty"></text> </label> @@ -29,5 +28,4 @@ </part> </fieldset> </form> - <focus field="name"></focus> </output> \ No newline at end of file diff --git a/themes/default/templates/projectlist/show.tpl.src.xml b/themes/default/templates/projectlist/show.tpl.src.xml @@ -1,6 +1,5 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <header views="add" /> <table> <row class="headline"> <cell> @@ -12,7 +11,7 @@ </row> <list list="el" extract="true"> <row class="data"> - <cell url="var:url"> + <cell id="var:id" name="var:name" action="project"> <image file="icon_project"></image> <text value="var:name" maxlength="30"></text> </cell> @@ -21,5 +20,13 @@ </cell> </row> </list> + <row class="data"> + <cell colspan="2"> + <link type="view" subaction="add"> + <image icon="add"/> + <text text="new"/> + </link> + </cell> + </row> </table> </output> \ No newline at end of file diff --git a/themes/default/templates/template.xsd b/themes/default/templates/template.xsd @@ -29,11 +29,14 @@ </xsd:complexType> <xsd:complexType name="cellType"> <xsd:choice maxOccurs="unbounded" minOccurs="0"> - <xsd:element ref="part" maxOccurs="unbounded" minOccurs="0"> + <xsd:element ref="part" maxOccurs="unbounded" + minOccurs="0"> </xsd:element> - <xsd:element ref="image" maxOccurs="unbounded" minOccurs="0"> + <xsd:element ref="image" maxOccurs="unbounded" + minOccurs="0"> </xsd:element> - <xsd:element ref="text" maxOccurs="unbounded" minOccurs="0"> + <xsd:element ref="text" maxOccurs="unbounded" + minOccurs="0"> </xsd:element> <xsd:element ref="fieldset" maxOccurs="unbounded" minOccurs="0"> @@ -41,6 +44,7 @@ <xsd:element ref="button" maxOccurs="unbounded" minOccurs="0"> </xsd:element> + <xsd:element ref="link" maxOccurs="unbounded" minOccurs="0"></xsd:element> </xsd:choice> <xsd:attribute name="width" type="xsd:int" /> <xsd:attributeGroup ref="universal"></xsd:attributeGroup> @@ -335,6 +339,7 @@ <xsd:attribute name="name" type="xsd:string"></xsd:attribute> <xsd:attributeGroup ref="universal"></xsd:attributeGroup> <xsd:attribute name="value" type="xsd:string"></xsd:attribute> + <xsd:attribute name="checked" type="xsd:boolean"></xsd:attribute> </xsd:complexType> <xsd:element name="inputarea" type="inputareaType"></xsd:element> diff --git a/themes/default/templates/template/el.tpl.src.xml b/themes/default/templates/template/el.tpl.src.xml @@ -1,6 +1,5 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <header back="true"></header> <table> <row class="headline"> <cell> @@ -12,7 +11,7 @@ </row> <list list="el" extract="true"> <row class="data"> - <cell url="var:url"> + <cell id="var:id" name="var:name" action="element"> <image elementtype="var:type"></image> <text var="name"></text> </cell> @@ -21,13 +20,6 @@ </cell> </row> </list> - <row> - <cell class="data"> - <link class="action" action="template" subaction="addel"> - <text key="menu_template_addel"></text> - </link> - </cell> - </row> <if empty="el"> <row> <cell colspan="2"> @@ -35,5 +27,13 @@ </cell> </row> </if> + <row class="data"> + <cell colspan="2"> + <link type="view" subaction="addel"> + <image icon="add"/> + <text key="menu_template_addel"></text> + </link> + </cell> + </row> </table> </output> \ No newline at end of file diff --git a/themes/default/templates/templatelist/show.tpl.src.xml b/themes/default/templates/templatelist/show.tpl.src.xml @@ -1,28 +1,32 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <header views="add"></header> - <dummy> - <window name="GLOBAL_TEMPLATES"> - <table> - <row class="headline"> - <cell> - <text key="name"></text> - </cell> - </row> - <list list="templates" extract="true"> - <row class="data"> - <cell url="var:url"> - <text var="name"></text> - </cell> - </row> - </list> - </table> - <if empty="templates"> - <text text="GLOBAL_NO_TEMPLATES_AVAILABLE_DESC"></text> - </if> - <link class="action" action="template" subaction="add"> - <text key="menu_template_add"></text> - </link> - </window> - </dummy> + <table> + <row class="headline"> + <cell> + <text key="name"></text> + </cell> + </row> + <list list="templates" extract="true"> + <row class="data"> + <cell id="var:id" name="var:name" action="template"> + <text var="name"></text> + </cell> + </row> + </list> + + <row class="data"> + <cell colspan="1"> + <link type="view" subaction="add"> + <image icon="add"/> + <text text="new"/> + </link> + </cell> + </row> + </table> + <if empty="templates"> + <text text="GLOBAL_NO_TEMPLATES_AVAILABLE_DESC"></text> + </if> + <link class="action" action="template" subaction="add"> + <text key="menu_template_add"></text> + </link> </output> \ No newline at end of file diff --git a/themes/default/templates/title/show.tpl.src.xml b/themes/default/templates/title/show.tpl.src.xml @@ -11,13 +11,10 @@ </part> <part class="search"> - <form> - <image icon="search"></image> - <input name="text" value="message:search"></input> - <part class="dropdown"> - <text raw=""></text> - </part> - </form> + <input name="text" hint="message:search" icon="search"></input> + <part class="dropdown"> + <text raw=""></text> + </part> </part> <part class="user"> <image icon="user" align="left"></image> diff --git a/themes/default/templates/userlist/add.tpl.src.xml b/themes/default/templates/userlist/add.tpl.src.xml @@ -1,3 +1,13 @@ -<output xmlns="http://www.openrat.de/template" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"><header back="true"><form method="post"><part class="line"><part class="label"><label for="name" key="user_username"></label></part><part class="input"><input name="name" class="focus"></input></part></part></form></header></output>- \ No newline at end of file +<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> + <form method="post"> + <part class="line"> + <part class="label"> + <label for="name" key="user_username"></label> + </part> + <part class="input"> + <input name="name" class="focus"></input> + </part> + </part> + </form> +</output>+ \ No newline at end of file diff --git a/themes/default/templates/userlist/show.tpl.src.xml b/themes/default/templates/userlist/show.tpl.src.xml @@ -1,6 +1,5 @@ <output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../template.xsd"> - <header views="add" /> <table> <row class="headline"> <cell> @@ -16,11 +15,11 @@ </row> <list list="el" extract="true"> <row class="data"> - <cell url="var:url"> + <cell id="var:id" name="var:name" action="user"> <image type="user"></image> <text var="name"></text> </cell> - <cell url="var:url"> + <cell id="var:id" name="var:name" action="user"> <text value="var:fullname"></text> <if true="var:isAdmin"> <text raw="_("></text> @@ -35,5 +34,13 @@ </cell> </row> </list> + <row class="data"> + <cell colspan="3"> + <link type="view" subaction="add"> + <image icon="add"/> + <text text="new"/> + </link> + </cell> + </row> </table> </output> \ No newline at end of file diff --git a/util/AdministrationTree.class.php b/util/AdministrationTree.class.php @@ -60,7 +60,7 @@ class AdministrationTree extends AbstractTree $treeElement->description = lang('GLOBAL_PROJECTS'); $treeElement->url = Html::url('projectlist','show',0,array(REQ_PARAM_TARGET=>'content')); $treeElement->action = 'projectlist'; - $treeElement->icon = 'project_list'; + $treeElement->icon = 'projectlist'; $treeElement->type = 'projects'; $treeElement->target = 'cms_main'; @@ -70,7 +70,7 @@ class AdministrationTree extends AbstractTree $treeElement = new TreeElement(); $treeElement->text = lang('USER_AND_GROUPS'); $treeElement->description = lang('USER_AND_GROUPS'); - $treeElement->icon = 'user_list'; + $treeElement->icon = 'userlist'; $treeElement->type = 'userandgroups'; $this->addTreeElement( $treeElement ); @@ -81,7 +81,7 @@ class AdministrationTree extends AbstractTree $treeElement = new TreeElement(); $treeElement->text = lang('PREFERENCES'); $treeElement->description = lang('PREFERENCES'); - $treeElement->icon = 'config_folder'; + $treeElement->icon = 'configuration'; //$treeElement->type = 'prefs'; $treeElement->action = 'configuration'; @@ -116,7 +116,7 @@ class AdministrationTree extends AbstractTree $treeElement->description = lang('GLOBAL_USER'); $treeElement->url = Html::url('user','listing',0,array(REQ_PARAM_TARGET=>'content')); $treeElement->action = 'userlist'; - $treeElement->icon = 'user_list'; + $treeElement->icon = 'userlist'; $treeElement->target = 'cms_main'; $treeElement->type = 'users'; @@ -127,7 +127,7 @@ class AdministrationTree extends AbstractTree $treeElement->description = lang('GLOBAL_GROUPS'); $treeElement->url = Html::url('group','listing',0,array(REQ_PARAM_TARGET=>'content')); $treeElement->action = 'grouplist'; - $treeElement->icon = 'user_list'; + $treeElement->icon = 'userlist'; $treeElement->target = 'cms_main'; $treeElement->type = 'groups'; @@ -274,7 +274,7 @@ class AdministrationTree extends AbstractTree $treeElement->internalId = -1; $treeElement->text = 'OpenRat'; - $treeElement->icon = 'config_folder'; + $treeElement->icon = 'configuration'; if ( !empty($conf_config['file_manager_url']) ) $treeElement->url = $conf_config['file_manager_url']; @@ -291,7 +291,7 @@ class AdministrationTree extends AbstractTree $treeElement->internalId = 0; $treeElement->text = lang('GLOBAL_SYSTEM'); - $treeElement->icon = 'config_folder'; + $treeElement->icon = 'configuration'; $treeElement->description = ''; $treeElement->target = 'cms_main'; @@ -306,7 +306,7 @@ class AdministrationTree extends AbstractTree $treeElement->internalId = 0; $treeElement->text = lang('GLOBAL_PHP'); - $treeElement->icon = 'config_folder'; + $treeElement->icon = 'configuration'; $treeElement->description = ''; $treeElement->target = 'cms_main'; @@ -321,7 +321,7 @@ class AdministrationTree extends AbstractTree $treeElement->internalId = 0; $treeElement->text = lang('GLOBAL_EXTENSIONS'); - $treeElement->icon = 'config_folder'; + $treeElement->icon = 'configuration'; $treeElement->description = ''; $treeElement->target = 'cms_main'; @@ -357,7 +357,7 @@ class AdministrationTree extends AbstractTree $treeElement->text = $key; // if ( $id == 0 ) // $treeElement->url = Html::url('main','prefs',0,array('conf'=>$key)); - $treeElement->icon = 'config_folder'; + $treeElement->icon = 'configuration'; $treeElement->description = count($value).' '.lang('SETTINGS'); $treeElement->target = 'cms_main'; diff --git a/util/Preferences.class.php b/util/Preferences.class.php @@ -1,16 +1,17 @@ <?php /** - * Bereitstellen von Methoden fuer das Lesen von Einstellungen + * Hilfsmethoden fuer das Lesen von Einstellungen. * - * @author $Author$ - * @version $Revision$ - * @package openrat.services + * @author Jan Dankert + * @package openrat.util */ class Preferences { /** * Ermittelt den Zeitpunkt der letzten Änderung der Konfigurationsdatei. + * + * @return Zeitpunkt der letzten Änderung als Unix-Timestamp */ public static function lastModificationTime() { @@ -24,19 +25,26 @@ class Preferences */ public static function configurationFile() { + // Falls Umgebungsvariable OPENRAT_CONFIG_FILE gesetzt ist, + // dann diesen Dateinamen verwenden. if ( !empty($_SERVER['OPENRAT_CONFIG_FILE']) ) { $config_filename = $_SERVER['OPENRAT_CONFIG_FILE']; } else { + // Falls Umgebungsvariable OPENRAT_CONFIG_DIR gesetzt ist, dann + // die Datei in diesem Ordner suchen. if ( !empty($_SERVER['OPENRAT_CONFIG_DIR']) ) $dir = $_SERVER['OPENRAT_CONFIG_DIR']; else $dir = './config/'; - + + if ( !empty($_SERVER['HTTP_HOST']) ) { + // Falls es eine Datei config-<hostname>.ini.php gibt, dann diese + // vor der Datei config.ini.php bevorzugen. $vhost_config_file = slashify($dir).'config-'.$_SERVER['HTTP_HOST'].'.ini.php'; if ( is_file($vhost_config_file) ) @@ -44,6 +52,10 @@ class Preferences else $config_filename = slashify($dir).'config.ini.php'; } + else + { + $config_filename = slashify($dir).'config.ini.php'; + } } if ( ! is_file($config_filename)) @@ -66,12 +78,12 @@ class Preferences */ public static function load() { + // Fest eingebaute Standard-Konfiguration laden. require('./config/config-default.php'); - //echo "default: "; print_r($conf); - $ini_values = parse_ini_file( Preferences::configurationFile(),false ); + $filename = Preferences::configurationFile(); + $ini_values = parse_ini_file( $filename,false ); - //echo "loading ".$config_filename; foreach ( $ini_values as $key=>$value ) { $parts = explode('.',$key); @@ -88,8 +100,12 @@ class Preferences elseif ( count($parts)==6) $conf[$parts[0]][$parts[1]][$parts[2]][$parts[3]][$parts[4]][$parts[5]] = $value; } - - $conf['config']['last_modification'] = Preferences::lastModificationTime(); + + // Den Dateinamen der Konfigurationsdatei in die Konfiguration schreiben. + $conf['config']['filename' ] = $filename; + $conf['config']['last_modification'] = filemtime($filename); + $conf['config']['file_modification'] = date('r',filemtime($filename)); + $conf['config']['read' ] = date('r'); return $conf; } diff --git a/util/ProjectTree.class.php b/util/ProjectTree.class.php @@ -57,11 +57,11 @@ class ProjectTree extends AbstractTree if ( $element->isWritable() ) { $treeElement = new TreeElement(); - $treeElement->id = $id; + $treeElement->id = $id.'_'.$elementid; $treeElement->extraId['elementid'] = $elementid; $treeElement->text = $element->name; $treeElement->url = Html::url('pageelement','edit', - $id, + $id.'_'.$elementid, array('elementid'=>$elementid, REQ_PARAM_TARGETSUBACTION=>'edit',REQ_PARAM_TARGET=>'content')); $treeElement->action = 'pageelement'; @@ -284,7 +284,7 @@ class ProjectTree extends AbstractTree $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->icon = 'templatelist'; $treeElement->action = 'templatelist'; $treeElement->target = 'content'; $treeElement->type = 'templates'; @@ -299,7 +299,7 @@ class ProjectTree extends AbstractTree $treeElement->action = 'languagelist'; $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'; + $treeElement->icon = 'languagelist'; $treeElement->description= lang('GLOBAL_LANGUAGES_DESC'); $treeElement->target = 'content'; @@ -323,7 +323,7 @@ class ProjectTree extends AbstractTree $treeElement->text = lang('GLOBAL_MODELS'); $treeElement->url = Html::url('model','listing',0,array(REQ_PARAM_TARGETSUBACTION=>'listing',REQ_PARAM_TARGET=>'content')); $treeElement->action = 'modellist'; - $treeElement->icon = 'model_list'; + $treeElement->icon = 'modellist'; $treeElement->target = 'content'; $this->addTreeElement( $treeElement ); diff --git a/util/TemplateEngine.class.php b/util/TemplateEngine.class.php @@ -194,6 +194,8 @@ class TemplateEngine else // macht aus "text1{var}text2" => "text1".$var."text2" return "'".preg_replace('/{(\w+)\}/','\'.$\\1.\'',$value)."'"; + case 'function': + return $invert.$value.'()'; case 'method': return $invert.'$this->'.$value.'()'; case 'size':