From 3a81d8234ae0df5368f73e9e3e152cf0b97711d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Sun, 20 Feb 2005 14:41:52 +0000 Subject: [PATCH 001/111] add direct booking to acl --- resources/inc/class.bo_acl.inc.php | 14 +++++++++----- resources/inc/class.ui_acl.inc.php | 8 +++++--- resources/templates/default/acl.tpl | 6 ++++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/resources/inc/class.bo_acl.inc.php b/resources/inc/class.bo_acl.inc.php index 3edec3d9b5..0e7cbec264 100755 --- a/resources/inc/class.bo_acl.inc.php +++ b/resources/inc/class.bo_acl.inc.php @@ -10,8 +10,6 @@ * -------------------------------------------- * \**************************************************************************/ -/* $Id: */ - class bo_acl { /*! @var $permissions Holds alls permissions for resources of user */ @@ -30,6 +28,10 @@ function bo_acl($session=False) { + define('PHPGW_ACL_CAT_ADMIN',64); + define('PHPGW_ACL_DIRECT_BOOKING',128); +// define('PHPGW_ACL_CUSTOM_3',256); + $this->so = CreateObject('resources.so_acl'); $this->permissions = $this->so->get_permissions($GLOBALS['phpgw_info']['user']['account_id'],true); @@ -59,8 +61,8 @@ } /*! - @function get_readcats - @abstract get list of readable cats for current user + @function get_cats + @abstract get list of cats where current user has given rights @author Cornelius Weiß @param int $perm_type one of PHPGW_ACL_READ, PHPGW_ACL_ADD, PHPGW_ACL_EDIT, PHPGW_ACL_DELETE @return array cat_name => cat_id @@ -124,10 +126,11 @@ return $this->is_permitted($cat_id,PHPGW_ACL_ADD); } - function set_rights($cat_id,$read,$write) + function set_rights($cat_id,$read,$write,$book) { $readcat = $read ? $read : array(); $writecat = $write ? $write : array(); + $bookcat = $book ? $book : array(); $this->so->remove_location('L' . $cat_id); reset($this->accounts); @@ -138,6 +141,7 @@ $rights = in_array($account_id,$writecat) ? (PHPGW_ACL_READ | PHPGW_ACL_ADD | PHPGW_ACL_EDIT | PHPGW_ACL_DELETE) : (in_array($account_id,$readcat) ? PHPGW_ACL_READ : False); + $rights = in_array($account_id,$bookcat) ? ($rights | PHPGW_ACL_DIRECT_BOOKING) : $rights; if ($rights) { $GLOBALS['phpgw']->acl->add_repository('resources','L'.$cat_id,$account_id,$rights); diff --git a/resources/inc/class.ui_acl.inc.php b/resources/inc/class.ui_acl.inc.php index 44d08ff9df..38ea9d7f54 100755 --- a/resources/inc/class.ui_acl.inc.php +++ b/resources/inc/class.ui_acl.inc.php @@ -11,7 +11,7 @@ \**************************************************************************/ /* $Id$ */ - + class ui_acl { var $start = 0; @@ -57,7 +57,7 @@ { foreach($_POST['catids'] as $cat_id) { - $this->bo->set_rights($cat_id,$_POST['inputread'][$cat_id],$_POST['inputwrite'][$cat_id]); + $this->bo->set_rights($cat_id,$_POST['inputread'][$cat_id],$_POST['inputwrite'][$cat_id],$_POST['inputbook'][$cat_id]); } } @@ -71,6 +71,7 @@ 'lang_read' => lang('Read permissions'), 'lang_write' => lang('Write permissions'), 'lang_implies' => lang('implies read permission'), + 'lang_book' => lang('Direct booking permissions'), )); $left = $this->nextmatchs->left('/index.php',$this->start,$this->bo->catbo->total_records,'menuaction=resources.uiacl.acllist'); @@ -98,7 +99,8 @@ 'catname' => $cat['name'], 'catid' => $cat['id'], 'read' => $this->selectlist(PHPGW_ACL_READ), - 'write' => $this->selectlist(PHPGW_ACL_ADD) + 'write' => $this->selectlist(PHPGW_ACL_ADD), + 'book' =>$this->selectlist(PHPGW_ACL_DIRECT_BOOKING) )); $GLOBALS['phpgw']->template->parse('Cblock','cat_list',True); } diff --git a/resources/templates/default/acl.tpl b/resources/templates/default/acl.tpl index d41ecedb31..9c28948a8d 100755 --- a/resources/templates/default/acl.tpl +++ b/resources/templates/default/acl.tpl @@ -24,9 +24,10 @@
- + + @@ -36,10 +37,11 @@ + - From c0867b777e7173af6071daa26625d0b264dfcaad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Sun, 20 Feb 2005 17:10:48 +0000 Subject: [PATCH 002/111] work on acl --- resources/inc/class.bo_acl.inc.php | 68 ++++++++++++++++++----------- resources/inc/class.ui_acl.inc.php | 23 ++++++---- resources/templates/default/acl.tpl | 6 +-- 3 files changed, 60 insertions(+), 37 deletions(-) diff --git a/resources/inc/class.bo_acl.inc.php b/resources/inc/class.bo_acl.inc.php index 0e7cbec264..8a38d0bc74 100755 --- a/resources/inc/class.bo_acl.inc.php +++ b/resources/inc/class.bo_acl.inc.php @@ -34,12 +34,11 @@ $this->so = CreateObject('resources.so_acl'); $this->permissions = $this->so->get_permissions($GLOBALS['phpgw_info']['user']['account_id'],true); - $this->egw_cats = createobject('phpgwapi.categories'); - $this->accounts = $GLOBALS['phpgw']->accounts->get_list(); $this->debug = False; - //all this is only needed when called from uiacl. not from ui, + + //all this is only needed when called from uiacl. if($session) { $this->read_sessiondata(); @@ -64,7 +63,7 @@ @function get_cats @abstract get list of cats where current user has given rights @author Cornelius Weiß - @param int $perm_type one of PHPGW_ACL_READ, PHPGW_ACL_ADD, PHPGW_ACL_EDIT, PHPGW_ACL_DELETE + @param int $perm_type one of PHPGW_ACL_READ, PHPGW_ACL_ADD, PHPGW_ACL_EDIT, PHPGW_ACL_DELETE, PHPGW_ACL_DIRECT_BOOKING @return array cat_name => cat_id TODO mark subcats and so on! */ @@ -81,6 +80,43 @@ return $readcats; } + /*! + @function get_cat_admin + @abstract gets userid of admin for given category + @author Cornelius Weiß + @param int $cat_id + @return int userid of cat admin + */ + function get_cat_admin($cat_id) + { + return array_search (PHPGW_ACL_CAT_ADMIN, $this->get_rights($cat_id)); + } + + /*! + @function is_permitted + @abstract cheks one of the following rights for current user: + @abstract PHPGW_ACL_READ, PHPGW_ACL_ADD, PHPGW_ACL_EDIT, PHPGW_ACL_DELETE, PHPGW_ACL_DIRECT_BOOKING + @param int $cat_id + @param int $right + @return bool user is permitted or not for right + */ + function is_permitted($cat_id,$right) + { + return $this->permissions['L'.$cat_id] & $right; + } + + /*! + @function get_rights + @abstract gets all rights from all user for given cat + @param int $cat_id + @return array userid => right + */ + function get_rights($cat_id) + { + return $this->so->get_rights('L'.$cat_id); + } + +// privat functions from here on ------------------------------------------------------------------------- function save_sessiondata() { $data = array( @@ -106,31 +142,12 @@ $this->limit = $data['limit']; } - function get_rights($cat_id) - { - return $this->so->get_rights('L'.$cat_id); - } - - function is_permitted($cat_id,$right) - { - return $this->permissions['L'.$cat_id] & $right; - } - - function is_readable($cat_id) - { - return $this->is_permitted($cat_id,PHPGW_ACL_READ); - } - - function is_writeable($cat_id) - { - return $this->is_permitted($cat_id,PHPGW_ACL_ADD); - } - - function set_rights($cat_id,$read,$write,$book) + function set_rights($cat_id,$read,$write,$book,$admin) { $readcat = $read ? $read : array(); $writecat = $write ? $write : array(); $bookcat = $book ? $book : array(); + $admincat = $admin ? $admin : array(); $this->so->remove_location('L' . $cat_id); reset($this->accounts); @@ -142,6 +159,7 @@ (PHPGW_ACL_READ | PHPGW_ACL_ADD | PHPGW_ACL_EDIT | PHPGW_ACL_DELETE) : (in_array($account_id,$readcat) ? PHPGW_ACL_READ : False); $rights = in_array($account_id,$bookcat) ? ($rights | PHPGW_ACL_DIRECT_BOOKING) : $rights; + $rights = in_array($account_id,$admincat) ? ($rights | PHPGW_ACL_CAT_ADMIN) : $rights; if ($rights) { $GLOBALS['phpgw']->acl->add_repository('resources','L'.$cat_id,$account_id,$rights); diff --git a/resources/inc/class.ui_acl.inc.php b/resources/inc/class.ui_acl.inc.php index 38ea9d7f54..bc309772cf 100755 --- a/resources/inc/class.ui_acl.inc.php +++ b/resources/inc/class.ui_acl.inc.php @@ -57,7 +57,7 @@ { foreach($_POST['catids'] as $cat_id) { - $this->bo->set_rights($cat_id,$_POST['inputread'][$cat_id],$_POST['inputwrite'][$cat_id],$_POST['inputbook'][$cat_id]); + $this->bo->set_rights($cat_id,$_POST['inputread'][$cat_id],$_POST['inputwrite'][$cat_id],$_POST['inputbook'][$cat_id],$_POST['inputadmin'][$cat_id]); } } @@ -72,6 +72,7 @@ 'lang_write' => lang('Write permissions'), 'lang_implies' => lang('implies read permission'), 'lang_book' => lang('Direct booking permissions'), + 'lang_cat_admin' => lang('Categories admin') )); $left = $this->nextmatchs->left('/index.php',$this->start,$this->bo->catbo->total_records,'menuaction=resources.uiacl.acllist'); @@ -100,25 +101,29 @@ 'catid' => $cat['id'], 'read' => $this->selectlist(PHPGW_ACL_READ), 'write' => $this->selectlist(PHPGW_ACL_ADD), - 'book' =>$this->selectlist(PHPGW_ACL_DIRECT_BOOKING) + 'book' =>$this->selectlist(PHPGW_ACL_DIRECT_BOOKING), + 'admin' => ''.$this->selectlist(PHPGW_ACL_CAT_ADMIN,true) )); $GLOBALS['phpgw']->template->parse('Cblock','cat_list',True); } $GLOBALS['phpgw']->template->pfp('out','acl',True); } - function selectlist($right) + function selectlist($right,$users_only=false) { reset($this->bo->accounts); while (list($null,$account) = each($this->bo->accounts)) { - $selectlist .= '' . "\n"; + } } return $selectlist; } diff --git a/resources/templates/default/acl.tpl b/resources/templates/default/acl.tpl index 9c28948a8d..35de299fe5 100755 --- a/resources/templates/default/acl.tpl +++ b/resources/templates/default/acl.tpl @@ -24,7 +24,7 @@
{sort_cat}{sort_cat} {lang_read} {lang_write}
({lang_implies})
{lang_book}
+  
- + @@ -32,8 +32,8 @@ From a8f3dcc2d00a407da1ba8946bf99f79eec49c3f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Sun, 20 Feb 2005 17:50:39 +0000 Subject: [PATCH 003/111] make cat list nicer --- resources/TODO | 15 ++++----------- resources/inc/class.bo_acl.inc.php | 26 +++++++++++++++++++++----- resources/templates/default/acl.tpl | 11 ++++++----- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/resources/TODO b/resources/TODO index 57a626c315..f3a9722f85 100644 --- a/resources/TODO +++ b/resources/TODO @@ -1,6 +1,3 @@ - -/* $Id: */ - TODO: - configuration dialog for admin section don't use vfs @@ -25,14 +22,10 @@ TODO: add location functionality bug: loose html and picture on tab-switch (eTemplate bug --> Ralf) use eTemplates input validation + if only one cat is present --> chose it + bug: lang() returnmessages to often + make some returnmessages js dialogs - -acl : the acl realy sucks! it was copied from news_admin and persumaly needs to be rewritten... - use of class.db / or even better no dirct access to tables! - use of class.acl - use of class.eTemplate - define admin for each used cat - add right 'direct book' - + ---- if basics are working --> make it scheudable (meeting with ralf) \ No newline at end of file diff --git a/resources/inc/class.bo_acl.inc.php b/resources/inc/class.bo_acl.inc.php index 8a38d0bc74..9290a8d48b 100755 --- a/resources/inc/class.bo_acl.inc.php +++ b/resources/inc/class.bo_acl.inc.php @@ -10,6 +10,8 @@ * -------------------------------------------- * \**************************************************************************/ + /* $Id$ */ + class bo_acl { /*! @var $permissions Holds alls permissions for resources of user */ @@ -69,15 +71,28 @@ */ function get_cats($perm_type) { - foreach($this->permissions as $cat_id => $rights) + $cats = $this->egw_cats->return_sorted_array(0,False,'','','',!$type); + while (list(,$cat) = @each($cats)) { - if(strstr($cat_id,'L') && $rights & $perm_type) + if($this->is_permitted($cat['id'],$perm_type)) { - $cat_id = substr($cat_id,1); - $readcats[$cat_id] = $this->egw_cats->id2name($cat_id); + for ($j=0,$s=''; $j < $cat['level']; $j++) + { + $s .= ' '; + } + $s .= $GLOBALS['phpgw']->strip_html($cat['name']); + if ($cat['app_name'] == 'phpgw') + { + $s .= ' <' . lang('Global') . '>'; + } + if ($cat['owner'] == '-1') + { + $s .= ' <' . lang('Global') . ' ' . lang($cat['app_name']) . '>'; + } + $perm_cats[$cat['id']] = $s; } } - return $readcats; + return $perm_cats; } /*! @@ -116,6 +131,7 @@ return $this->so->get_rights('L'.$cat_id); } + // privat functions from here on ------------------------------------------------------------------------- function save_sessiondata() { diff --git a/resources/templates/default/acl.tpl b/resources/templates/default/acl.tpl index 35de299fe5..8386a5fb24 100755 --- a/resources/templates/default/acl.tpl +++ b/resources/templates/default/acl.tpl @@ -1,5 +1,5 @@
-
{sort_cat}{sort_cat}
{lang_cat_admin}
{lang_read} {lang_write}
({lang_implies})
{lang_book}
- {catname} - + {catname}
+
+
@@ -22,7 +22,7 @@
{title}
- +
@@ -41,9 +41,10 @@ -
{sort_cat}
{lang_cat_admin}
{lang_read}
-   - + +
+   +
From af54416695c967a15bd0ce651ae135887c8746ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20Wei=C3=9F?= Date: Sun, 20 Feb 2005 18:01:52 +0000 Subject: [PATCH 004/111] display admin for each cat --- resources/inc/class.bo_resources.inc.php | 1 + resources/setup/etemplates.inc.php | 28 ++++++++++-------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/resources/inc/class.bo_resources.inc.php b/resources/inc/class.bo_resources.inc.php index f6b60953a0..f8e34662bf 100755 --- a/resources/inc/class.bo_resources.inc.php +++ b/resources/inc/class.bo_resources.inc.php @@ -75,6 +75,7 @@ class bo_resources $readonlys["buyable[$resource[id]]"] = true; } $rows[$num]['picture_thumb'] = $this->get_picture($resource['id']); + $rows[$num]['admin'] = $this->acl->get_cat_admin($resource['cat_id']); } return $nr; } diff --git a/resources/setup/etemplates.inc.php b/resources/setup/etemplates.inc.php index 54af57e7c2..950b7d0b9c 100644 --- a/resources/setup/etemplates.inc.php +++ b/resources/setup/etemplates.inc.php @@ -1,31 +1,25 @@ 'resources.add','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:3:{i:0;a:0:{}i:1;a:1:{s:1:\"A\";a:2:{s:4:\"type\";s:8:\"template\";s:4:\"name\";s:19:\"resources.edit_tabs\";}}i:2;a:1:{s:1:\"A\";a:2:{s:4:\"type\";s:8:\"template\";s:4:\"name\";s:21:\"resources.add_buttons\";}}}s:4:\"rows\";i:2;s:4:\"cols\";i:1;s:4:\"size\";s:4:\"100%\";}}','size' => '100%','style' => '','modified' => '1094579218',); +$templ_version=1; -$templ_data[] = array('name' => 'resources.add_buttons','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:2:{i:0;a:1:{s:1:\"C\";s:4:\"100%\";}i:1;a:3:{s:1:\"A\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:4:\"Save\";s:4:\"name\";s:4:\"save\";s:4:\"help\";s:21:\"Saves entry and exits\";}s:1:\"B\";a:3:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Cancel\";s:4:\"name\";s:6:\"cancel\";}s:1:\"C\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"align\";s:5:\"right\";}}}s:4:\"rows\";i:1;s:4:\"cols\";i:3;s:4:\"size\";s:4:\"100%\";}}','size' => '100%','style' => '','modified' => '1094579498',); +$templ_data[] = array('name' => 'resources.edit','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:19:"resources.edit_tabs";}}i:3;a:1:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:22:"resources.edit_buttons";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1099310308',); -$templ_data[] = array('name' => 'resources.edit','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:4:{i:0;a:0:{}i:1;a:1:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:4:\"name\";s:3:\"msg\";}}i:2;a:1:{s:1:\"A\";a:2:{s:4:\"type\";s:8:\"template\";s:4:\"name\";s:19:\"resources.edit_tabs\";}}i:3;a:1:{s:1:\"A\";a:2:{s:4:\"type\";s:8:\"template\";s:4:\"name\";s:22:\"resources.edit_buttons\";}}}s:4:\"rows\";i:3;s:4:\"cols\";i:1;s:4:\"size\";s:4:\"100%\";}}','size' => '100%','style' => '','modified' => '1099310308',); +$templ_data[] = array('name' => 'resources.edit_buttons','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:1:"C";s:4:"100%";}i:1;a:3:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:21:"Saves entry and exits";}s:1:"B";a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";}s:1:"C";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:5:"align";s:5:"right";s:4:"name";s:6:"delete";}}}s:4:"rows";i:1;s:4:"cols";i:3;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1093597552',); -$templ_data[] = array('name' => 'resources.edit_buttons','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:2:{i:0;a:1:{s:1:\"C\";s:4:\"100%\";}i:1;a:3:{s:1:\"A\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:4:\"Save\";s:4:\"name\";s:4:\"save\";s:4:\"help\";s:21:\"Saves entry and exits\";}s:1:\"B\";a:3:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Cancel\";s:4:\"name\";s:6:\"cancel\";}s:1:\"C\";a:4:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:6:\"Delete\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:6:\"delete\";}}}s:4:\"rows\";i:1;s:4:\"cols\";i:3;s:4:\"size\";s:4:\"100%\";}}','size' => '100%','style' => '','modified' => '1093597552',); +$templ_data[] = array('name' => 'resources.edit_pictures','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:3:{s:2:"c1";s:3:"nmr";s:2:"c2";s:3:"nmr";s:2:"c3";s:3:"nmr";}i:1;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:26:"Use general resources icon";s:5:"align";s:5:"right";}s:1:"B";a:3:{s:4:"type";s:5:"radio";s:4:"size";s:7:"gen_src";s:4:"name";s:11:"picture_src";}s:1:"C";a:3:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"gen_src_list";}}i:2;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:23:"Use the category\'s icon";s:5:"align";s:5:"right";}s:1:"B";a:3:{s:4:"type";s:5:"radio";s:4:"size";s:7:"cat_src";s:4:"name";s:11:"picture_src";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:15:"Use own picture";s:5:"align";s:5:"right";}s:1:"B";a:3:{s:4:"type";s:5:"radio";s:4:"size";s:7:"own_src";s:4:"name";s:11:"picture_src";}s:1:"C";a:2:{s:4:"type";s:4:"file";s:4:"name";s:8:"own_file";}}}s:4:"rows";i:3;s:4:"cols";i:3;}}','size' => '','style' => '','modified' => '1108638846',); -$templ_data[] = array('name' => 'resources.edit_pictures','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:4:{i:0;a:3:{s:2:\"c1\";s:3:\"nmr\";s:2:\"c2\";s:3:\"nmr\";s:2:\"c3\";s:3:\"nmr\";}i:1;a:3:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:26:\"Use general resources icon\";s:5:\"align\";s:5:\"right\";}s:1:\"B\";a:3:{s:4:\"type\";s:5:\"radio\";s:4:\"size\";s:7:\"gen_src\";s:4:\"name\";s:11:\"picture_src\";}s:1:\"C\";a:3:{s:4:\"type\";s:6:\"select\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:12:\"gen_src_list\";}}i:2;a:3:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:23:\"Use the category\'s icon\";s:5:\"align\";s:5:\"right\";}s:1:\"B\";a:3:{s:4:\"type\";s:5:\"radio\";s:4:\"size\";s:7:\"cat_src\";s:4:\"name\";s:11:\"picture_src\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}}i:3;a:3:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:15:\"Use own picture\";s:5:\"align\";s:5:\"right\";}s:1:\"B\";a:3:{s:4:\"type\";s:5:\"radio\";s:4:\"size\";s:7:\"own_src\";s:4:\"name\";s:11:\"picture_src\";}s:1:\"C\";a:2:{s:4:\"type\";s:4:\"file\";s:4:\"name\";s:8:\"own_file\";}}}s:4:\"rows\";i:3;s:4:\"cols\";i:3;}}','size' => '','style' => '','modified' => '1108638846',); +$templ_data[] = array('name' => 'resources.edit_tabs','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:3:{s:1:"A";s:3:"250";s:2:"c1";s:6:"row_on";s:2:"c2";s:7:"row_off";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"text";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";s:4:"help";s:16:"Name of resource";}s:1:"B";a:6:{s:4:"type";s:6:"select";s:4:"size";s:10:"select one";s:5:"label";s:8:"Category";s:7:"no_lang";s:1:"1";s:4:"name";s:6:"cat_id";s:4:"help";s:44:"Which category does this resource belong to?";}}i:2;a:2:{s:1:"A";a:5:{s:4:"type";s:3:"tab";s:4:"span";s:3:"all";s:5:"label";s:60:"General|Accessories|Pictures|Page|Location|Prizeing|Calendar";s:4:"name";s:60:"general|accessories|pictures|page|location|prizeing|calendar";s:4:"help";s:194:"General informations about resource|Informations about the location of resource|Prizeing information for booking or buying|Web-Page of resource|Pictures or resource|The Calendar of this resource";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:3;s:4:"cols";i:2;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1107959809',); -$templ_data[] = array('name' => 'resources.edit_tabs','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:4:{i:0;a:3:{s:1:\"A\";s:3:\"250\";s:2:\"c1\";s:6:\"row_on\";s:2:\"c2\";s:7:\"row_off\";}i:1;a:2:{s:1:\"A\";a:4:{s:4:\"type\";s:4:\"text\";s:5:\"label\";s:4:\"Name\";s:4:\"name\";s:4:\"name\";s:4:\"help\";s:16:\"Name of resource\";}s:1:\"B\";a:6:{s:4:\"type\";s:6:\"select\";s:4:\"size\";s:10:\"select one\";s:5:\"label\";s:8:\"Category\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:6:\"cat_id\";s:4:\"help\";s:44:\"Which category does this resource belong to?\";}}i:2;a:2:{s:1:\"A\";a:5:{s:4:\"type\";s:3:\"tab\";s:4:\"span\";s:3:\"all\";s:5:\"label\";s:60:\"General|Accessories|Pictures|Page|Location|Prizeing|Calendar\";s:4:\"name\";s:60:\"general|accessories|pictures|page|location|prizeing|calendar\";s:4:\"help\";s:194:\"General informations about resource|Informations about the location of resource|Prizeing information for booking or buying|Web-Page of resource|Pictures or resource|The Calendar of this resource\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}i:3;a:2:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:4:\"span\";s:3:\"all\";}s:1:\"B\";a:1:{s:4:\"type\";s:5:\"label\";}}}s:4:\"rows\";i:3;s:4:\"cols\";i:2;s:4:\"size\";s:4:\"100%\";}}','size' => '100%','style' => '','modified' => '1107959809',); +$templ_data[] = array('name' => 'resources.edit_tabs.general','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:1:{s:1:"C";s:2:"10";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:19:"Description (short)";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:17:"short_description";s:4:"help";s:29:"Short description of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:29:"Short description of resource";}}i:2;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Location";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"50,100";s:4:"name";s:8:"location";s:4:"help";s:20:"Location of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:28:"Where to find this resource?";}}i:3;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Quantity";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:"5,10";s:4:"name";s:8:"quantity";s:4:"help";s:20:"Quantity of resource";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"Quantity of resource";}}i:4;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Useable";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:"5,10";s:4:"name";s:7:"useable";s:4:"help";s:29:"How many of them are useable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:38:"How many of the resources are useable?";}}i:5;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Bookable";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:8:"bookable";s:4:"help";s:21:"Is resource bookable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:26:"Is this resource bookable?";}}i:6;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Buyable";}s:1:"B";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:7:"buyable";s:4:"help";s:20:"Is resource buyable?";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:25:"Is this resource buyable?";}}}s:4:"rows";i:6;s:4:"cols";i:4;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1093597682',); -$templ_data[] = array('name' => 'resources.edit_tabs.general','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:7:{i:0;a:1:{s:1:\"C\";s:2:\"10\";}i:1;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:19:\"Description (short)\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:6:\"50,100\";s:4:\"name\";s:17:\"short_description\";s:4:\"help\";s:29:\"Short description of resource\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:29:\"Short description of resource\";}}i:2;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:8:\"Location\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:6:\"50,100\";s:4:\"name\";s:8:\"location\";s:4:\"help\";s:20:\"Location of resource\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:28:\"Where to find this resource?\";}}i:3;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:8:\"Quantity\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:4:\"5,10\";s:4:\"name\";s:8:\"quantity\";s:4:\"help\";s:20:\"Quantity of resource\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:20:\"Quantity of resource\";}}i:4;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Useable\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"text\";s:4:\"size\";s:4:\"5,10\";s:4:\"name\";s:7:\"useable\";s:4:\"help\";s:29:\"How many of them are useable?\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:38:\"How many of the resources are useable?\";}}i:5;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:8:\"Bookable\";}s:1:\"B\";a:3:{s:4:\"type\";s:8:\"checkbox\";s:4:\"name\";s:8:\"bookable\";s:4:\"help\";s:21:\"Is resource bookable?\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:26:\"Is this resource bookable?\";}}i:6;a:4:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:7:\"Buyable\";}s:1:\"B\";a:3:{s:4:\"type\";s:8:\"checkbox\";s:4:\"name\";s:7:\"buyable\";s:4:\"help\";s:20:\"Is resource buyable?\";}s:1:\"C\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"D\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:25:\"Is this resource buyable?\";}}}s:4:\"rows\";i:6;s:4:\"cols\";i:4;s:4:\"size\";s:4:\"100%\";}}','size' => '100%','style' => '','modified' => '1093597682',); +$templ_data[] = array('name' => 'resources.edit_tabs.page','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"htmlarea";s:4:"name";s:16:"long_description";s:4:"help";s:26:"Web-Site for this resource";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1093599237',); -$templ_data[] = array('name' => 'resources.edit_tabs.page','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:2:{i:0;a:0:{}i:1;a:1:{s:1:\"A\";a:3:{s:4:\"type\";s:8:\"htmlarea\";s:4:\"name\";s:16:\"long_description\";s:4:\"help\";s:26:\"Web-Site for this resource\";}}}s:4:\"rows\";i:1;s:4:\"cols\";i:1;s:4:\"size\";s:4:\"100%\";}}','size' => '100%','style' => '','modified' => '1093599237',); +$templ_data[] = array('name' => 'resources.edit_tabs.pictures','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"c1";s:4:",top";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:16:"resource_picture";}s:1:"B";a:5:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";s:5:"label";s:14:"picture source";i:1;a:1:{s:4:"type";s:5:"label";}i:2;a:2:{s:4:"type";s:8:"template";s:4:"name";s:23:"resources.edit_pictures";}}}}s:4:"rows";i:1;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1108543308',); -$templ_data[] = array('name' => 'resources.edit_tabs.pictures','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:2:{i:0;a:1:{s:2:\"c1\";s:4:\",top\";}i:1;a:2:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"image\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:16:\"resource_picture\";}s:1:\"B\";a:5:{s:4:\"type\";s:8:\"groupbox\";s:4:\"size\";s:1:\"2\";s:5:\"label\";s:14:\"picture source\";i:1;a:1:{s:4:\"type\";s:5:\"label\";}i:2;a:2:{s:4:\"type\";s:8:\"template\";s:4:\"name\";s:23:\"resources.edit_pictures\";}}}}s:4:\"rows\";i:1;s:4:\"cols\";i:2;}}','size' => '','style' => '','modified' => '1108543308',); +$templ_data[] = array('name' => 'resources.show','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:1:{s:1:"A";s:4:"100%";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:9:"nextmatch";s:4:"size";s:19:"resources.show.rows";s:7:"no_lang";s:1:"1";s:4:"name";s:2:"nm";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";}}}s:4:"rows";i:2;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1108479422',); -$templ_data[] = array('name' => 'resources.show','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:3:{i:0;a:1:{s:1:\"A\";s:4:\"100%\";}i:1;a:1:{s:1:\"A\";a:4:{s:4:\"type\";s:9:\"nextmatch\";s:4:\"size\";s:19:\"resources.show.rows\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:2:\"nm\";}}i:2;a:1:{s:1:\"A\";a:3:{s:4:\"type\";s:6:\"button\";s:5:\"label\";s:3:\"Add\";s:4:\"name\";s:3:\"add\";}}}s:4:\"rows\";i:2;s:4:\"cols\";i:1;}}','size' => '','style' => '','modified' => '1108479422',); - -$templ_data[] = array('name' => 'resources.show.actions','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:3:{i:0;a:3:{s:1:\"F\";s:2:\"3%\";s:2:\"c1\";s:3:\"nmh\";s:2:\"c2\";s:3:\"nmr\";}i:1;a:6:{s:1:\"A\";a:3:{s:4:\"type\";s:20:\"nextmatch-sortheader\";s:5:\"label\";s:4:\"Name\";s:4:\"name\";s:4:\"name\";}s:1:\"B\";a:3:{s:4:\"type\";s:20:\"nextmatch-sortheader\";s:5:\"label\";s:17:\"Short description\";s:4:\"name\";s:17:\"short_description\";}s:1:\"C\";a:3:{s:4:\"type\";s:20:\"nextmatch-sortheader\";s:5:\"label\";s:7:\"Useable\";s:4:\"name\";s:7:\"useable\";}s:1:\"D\";a:3:{s:4:\"type\";s:20:\"nextmatch-sortheader\";s:5:\"label\";s:8:\"Category\";s:4:\"name\";s:6:\"cat_id\";}s:1:\"E\";a:3:{s:4:\"type\";s:20:\"nextmatch-sortheader\";s:5:\"label\";s:8:\"Location\";s:4:\"name\";s:8:\"location\";}s:1:\"F\";a:3:{s:4:\"type\";s:8:\"template\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:29:\"resources.show.actions_header\";}}i:2;a:6:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:12:\"${row}[name]\";}s:1:\"B\";a:3:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:25:\"${row}[short_description]\";}s:1:\"C\";a:3:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:14:\"${row}[usable]\";}s:1:\"D\";a:3:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:16:\"${row}[category]\";}s:1:\"E\";a:3:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:16:\"${row}[location]\";}s:1:\"F\";a:3:{s:4:\"type\";s:6:\"button\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:20:\"lukas[$row_cont[id]]\";}}}s:4:\"rows\";i:2;s:4:\"cols\";i:6;s:4:\"size\";s:4:\"100%\";}}','size' => '100%','style' => '','modified' => '1098891355',); - -$templ_data[] = array('name' => 'resources.show.actions_header','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:2:{i:0;a:0:{}i:1;a:2:{s:1:\"A\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:6:\"Action\";}s:1:\"B\";a:3:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:9:\"check.png\";s:4:\"name\";s:30:\"javascript:check_all(\'select\')\";}}}s:4:\"rows\";i:1;s:4:\"cols\";i:2;}}','size' => '','style' => '','modified' => '1094025049',); - -$templ_data[] = array('name' => 'resources.show.rows','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:\"type\";s:4:\"grid\";s:4:\"data\";a:3:{i:0;a:6:{s:1:\"C\";s:2:\"3%\";s:1:\"F\";s:2:\"1%\";s:1:\"G\";s:2:\"1%\";s:1:\"H\";s:2:\"1%\";s:2:\"c1\";s:3:\"nmh\";s:2:\"c2\";s:7:\"nmr,top\";}i:1;a:8:{s:1:\"A\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";i:1;a:3:{s:4:\"type\";s:20:\"nextmatch-sortheader\";s:5:\"label\";s:4:\"Name\";s:4:\"name\";s:4:\"name\";}i:2;a:3:{s:4:\"type\";s:20:\"nextmatch-sortheader\";s:5:\"label\";s:17:\"Short description\";s:4:\"name\";s:17:\"short_description\";}}s:1:\"C\";a:4:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";i:1;a:4:{s:4:\"type\";s:20:\"nextmatch-sortheader\";s:5:\"label\";s:7:\"Useable\";s:4:\"name\";s:7:\"useable\";s:4:\"help\";s:36:\"How many of this resource are usable\";}i:2;a:4:{s:4:\"type\";s:20:\"nextmatch-sortheader\";s:5:\"label\";s:8:\"Quantity\";s:4:\"name\";s:8:\"quantity\";s:4:\"help\";s:32:\"How many of this resource exists\";}}s:1:\"D\";a:4:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";i:1;a:3:{s:4:\"type\";s:20:\"nextmatch-sortheader\";s:5:\"label\";s:8:\"Category\";s:4:\"name\";s:6:\"cat_id\";}i:2;a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:13:\"Administrator\";}}s:1:\"E\";a:4:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";i:1;a:3:{s:4:\"type\";s:20:\"nextmatch-sortheader\";s:5:\"label\";s:8:\"Location\";s:4:\"name\";s:8:\"location\";}i:2;a:2:{s:4:\"type\";s:5:\"label\";s:5:\"label\";s:18:\"Storage Inforation\";}}s:1:\"F\";a:1:{s:4:\"type\";s:5:\"label\";}s:1:\"G\";a:2:{s:4:\"type\";s:5:\"label\";s:5:\"align\";s:5:\"right\";}s:1:\"H\";a:3:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:9:\"check.png\";s:5:\"align\";s:6:\"center\";}}i:2;a:8:{s:1:\"A\";a:3:{s:4:\"type\";s:5:\"image\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:21:\"${row}[picture_thumb]\";}s:1:\"B\";a:4:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";i:1;a:3:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:12:\"${row}[name]\";}i:2;a:3:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:25:\"${row}[short_description]\";}}s:1:\"C\";a:5:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";s:5:\"align\";s:5:\"right\";i:1;a:4:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:15:\"${row}[useable]\";}i:2;a:4:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";s:5:\"align\";s:5:\"right\";s:4:\"name\";s:16:\"${row}[quantity]\";}}s:1:\"D\";a:4:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";i:1;a:4:{s:4:\"type\";s:10:\"select-cat\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:14:\"${row}[cat_id]\";s:8:\"readonly\";s:1:\"1\";}i:2;a:2:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";}}s:1:\"E\";a:4:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";i:1;a:3:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";s:4:\"name\";s:16:\"${row}[location]\";}i:2;a:2:{s:4:\"type\";s:5:\"label\";s:7:\"no_lang\";s:1:\"1\";}}s:1:\"F\";a:5:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";s:5:\"align\";s:6:\"center\";i:1;a:6:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:12:\"bookable.gif\";s:5:\"label\";s:18:\"Book this resource\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:23:\"bookable[$row_cont[id]]\";s:4:\"help\";s:18:\"Book this resource\";}i:2;a:6:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:11:\"buyable.gif\";s:5:\"label\";s:17:\"Buy this resource\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:22:\"buyable[$row_cont[id]]\";s:4:\"help\";s:17:\"Buy this resource\";}}s:1:\"G\";a:5:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";s:5:\"align\";s:6:\"center\";i:1;a:6:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:8:\"edit.gif\";s:5:\"label\";s:4:\"Edit\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:19:\"edit[$row_cont[id]]\";s:4:\"help\";s:15:\"Edit this entry\";}i:2;a:6:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:10:\"delete.gif\";s:5:\"label\";s:6:\"Delete\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:21:\"delete[$row_cont[id]]\";s:4:\"help\";s:17:\"Delete this entry\";}}s:1:\"H\";a:5:{s:4:\"type\";s:4:\"vbox\";s:4:\"size\";s:1:\"2\";s:5:\"align\";s:6:\"center\";i:1;a:6:{s:4:\"type\";s:6:\"button\";s:4:\"size\";s:8:\"view.gif\";s:5:\"label\";s:4:\"View\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:19:\"view[$row_cont[id]]\";s:4:\"help\";s:15:\"View this entry\";}i:2;a:3:{s:4:\"type\";s:8:\"checkbox\";s:5:\"align\";s:6:\"center\";s:4:\"name\";s:8:\"checkbox\";}}}}s:4:\"rows\";i:2;s:4:\"cols\";i:8;}}','size' => '','style' => '','modified' => '1108651959',); +$templ_data[] = array('name' => 'resources.show.rows','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:6:{s:1:"C";s:2:"3%";s:1:"F";s:2:"1%";s:1:"G";s:2:"1%";s:1:"H";s:2:"1%";s:2:"c1";s:3:"nmh";s:2:"c2";s:7:"nmr,top";}i:1;a:8:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Name";s:4:"name";s:4:"name";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:17:"Short description";s:4:"name";s:17:"short_description";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Useable";s:4:"name";s:7:"useable";s:4:"help";s:36:"How many of this resource are usable";}i:2;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:8:"quantity";s:4:"help";s:32:"How many of this resource exists";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Administrator";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Location";s:4:"name";s:8:"location";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:18:"Storage Inforation";}}s:1:"F";a:1:{s:4:"type";s:5:"label";}s:1:"G";a:2:{s:4:"type";s:5:"label";s:5:"align";s:5:"right";}s:1:"H";a:3:{s:4:"type";s:6:"button";s:4:"size";s:9:"check.png";s:5:"align";s:6:"center";}}i:2;a:8:{s:1:"A";a:3:{s:4:"type";s:5:"image";s:5:"align";s:6:"center";s:4:"name";s:21:"${row}[picture_thumb]";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:12:"${row}[name]";}i:2;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:25:"${row}[short_description]";}}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:15:"${row}[useable]";}i:2;a:4:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:16:"${row}[quantity]";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:10:"select-cat";s:7:"no_lang";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[admin]";s:8:"readonly";s:1:"1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[location]";}i:2;a:2:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";}}s:1:"F";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:5:"align";s:6:"center";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:12:"bookable.gif";s:5:"label";s:18:"Book this resource";s:5:"align";s:6:"center";s:4:"name";s:23:"bookable[$row_cont[id]]";s:4:"help";s:18:"Book this resource";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:11:"buyable.gif";s:5:"label";s:17:"Buy this resource";s:5:"align";s:6:"center";s:4:"name";s:22:"buyable[$row_cont[id]]";s:4:"help";s:17:"Buy this resource";}}s:1:"G";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:5:"align";s:6:"center";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"edit.gif";s:5:"label";s:4:"Edit";s:5:"align";s:6:"center";s:4:"name";s:19:"edit[$row_cont[id]]";s:4:"help";s:15:"Edit this entry";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:10:"delete.gif";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"help";s:17:"Delete this entry";}}s:1:"H";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";s:5:"align";s:6:"center";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:4:"View";s:5:"align";s:6:"center";s:4:"name";s:19:"view[$row_cont[id]]";s:4:"help";s:15:"View this entry";}i:2;a:3:{s:4:"type";s:8:"checkbox";s:5:"align";s:6:"center";s:4:"name";s:8:"checkbox";}}}}s:4:"rows";i:2;s:4:"cols";i:8;}}','size' => '','style' => '','modified' => '1108922292',); From 21c6ebd17ef1470352af6888eadfb79817c96b91 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 20 Feb 2005 21:45:24 +0000 Subject: [PATCH 005/111] next step to a new eTemplate editor: - new editor has now everything the old one had, beside editing of embeded stylesheets - new possibility to define a confirmation for buttons via javascript - finetuned the garbadge collection for php4 sessions --- etemplate/inc/class.boetemplate.inc.php | 6 +- etemplate/inc/class.editor.inc.php | 300 +++++++++++++++++++----- etemplate/inc/class.soetemplate.inc.php | 77 +++--- etemplate/inc/class.uietemplate.inc.php | 17 +- etemplate/inc/hook_sidebox_menu.inc.php | 7 + etemplate/setup/etemplates.inc.php | 23 +- etemplate/setup/phpgw_de.lang | 9 +- etemplate/setup/phpgw_en.lang | 9 +- 8 files changed, 326 insertions(+), 122 deletions(-) diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index 7cfd861bf0..22615dfa34 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -310,18 +310,18 @@ } $this->garbage_collection_done = true; - if (count($sessions) < 50) return $data; // we dont need to care + if (count($app_sessions) < 20) return $data; // we dont need to care list($msec,$sec) = explode(' ',microtime()); $now = 100 * $sec + (int)(100 * $msec); // gives precision of 1/100 sec - foreach($app_sessions as $id => $session_data) + foreach(array_keys($app_sessions) as $id) { list($app,$time) = explode(':',$id); if (!$time) continue; // other data, no session - //echo ++$n.') '.$id.': '.(($now-$time)/100.0)."secs old, used=".$session_used[$id].", size=".strlen($session_data)."
\n"; + //echo ++$n.') '.$id.': '.(($now-$time)/100.0)."secs old, used=".$session_used[$id].", size=".strlen($app_sessions[$id])."
\n"; if ($session_used[$id] == 1 && $time < $now - 10*6000 || // session used and older then 10min $time < $now - 60*6000) // session not used and older then 1h diff --git a/etemplate/inc/class.editor.inc.php b/etemplate/inc/class.editor.inc.php index 671000351a..ae09a12c13 100644 --- a/etemplate/inc/class.editor.inc.php +++ b/etemplate/inc/class.editor.inc.php @@ -75,14 +75,19 @@ 'scroll' => 'scroll', 'auto' => 'auto' ); + var $onclick_types = array( + '' => 'nothing', + 'confirm' => 'confirm', + 'custom' => 'custom', + ); var $extensions = ''; var $public_functions = array ( - 'edit' => True, + 'old_editor' => True, 'process_edit' => True, 'delete' => True, - 'show' => True, + 'edit' => True, 'widget' => True, ); @@ -90,12 +95,10 @@ { $this->etemplate = CreateObject('etemplate.etemplate'); - $this->editor = new etemplate('etemplate.editor'); - $this->extensions = $GLOBALS['phpgw']->session->appsession('extensions','etemplate'); } - function edit($msg = '',$xml='',$xml_label='') + function old_editor($msg = '',$xml='',$xml_label='') { if (isset($_GET['name']) && !$this->etemplate->read($_GET)) { @@ -202,8 +205,9 @@ { echo 'editor.edit: content ='; _debug_array($content); } + $editor =& new etemplate('etemplate.editor'); $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Editable Templates - Editor'); - $this->editor->exec('etemplate.editor.process_edit',$content, + $editor->exec('etemplate.editor.process_edit',$content, array( 'type' => array_merge($this->etemplate->types,$this->extensions), 'align' => $this->aligns, @@ -421,7 +425,7 @@ $result = $this->etemplate->search($content); if (count($result) > 1) { - return $this->list_result(array('result' => $result)); + return $this->list_result(array('result' => $result),'','old_editor'); } elseif (!count($result) || !$this->etemplate->read($result[0])) { @@ -440,7 +444,7 @@ } elseif ($content['delete']) { - $this->delete(); + $this->delete('','old_editor'); return; } elseif ($content['dump']) @@ -466,7 +470,7 @@ } elseif ($content['show']) { - $this->show(); + $this->edit(); return; } elseif ($content['langfile']) @@ -482,7 +486,7 @@ if ($name == 'etemplate') { $additional = $this->etemplate->types + $this->extensions + $this->aligns + $this->valigns + - $this->edit_menu + $this->box_menu + $this->row_menu + $this->column_menu; + $this->edit_menu + $this->box_menu + $this->row_menu + $this->column_menu + $this->onclick_types; } else // try to call the writeLangFile function of the app's ui-layer { @@ -521,7 +525,7 @@ ExecMethod('etemplate.db_tools.edit'); return; } - $this->edit($msg,$xml,$xml_label); + $this->old_editor($msg,$xml,$xml_label); } function export_xml(&$xml,&$xml_label) @@ -641,7 +645,7 @@ } else { - $this->edit($msg); + $this->$back(null,$msg); } return; } @@ -677,7 +681,7 @@ $content+$preserv,''); } - function list_result($cont='',$msg='') + function list_result($cont='',$msg='',$editor='edit') { if ($this->debug) { @@ -709,6 +713,10 @@ if ($sel) { $this->etemplate->read($result[$row-1]); + if (!$result[$row-1]['version'] && $this->etemplate->version) + { + $this->etemplate->version = ''; // otherwise the newest tmpl get's deleted and not the one without version + } $this->etemplate->delete(); ++$n; } @@ -725,14 +733,14 @@ { list($read) = each($cont['read']); $this->etemplate->read($result[$read-1]); - $this->edit(); + $this->$editor(); return; } if (isset($cont['view'])) { list($read) = each($cont['view']); $this->etemplate->read($result[$read-1]); - $this->show(); + $this->edit(); return; } if (!$msg) @@ -758,35 +766,49 @@ ),''); } - function show($post_vars='') + /** + * new eTemplate editor, which edits widgets in a popup + * + * @param array $content content from the process_exec call + * @param string $msg message to show + */ + function edit($content=null,$msg = '') { if ($this->debug) { - echo "

etemplate.editor.show: content="; _debug_array($post_vars); + echo "

etemplate.editor.show: content="; _debug_array($content); } - if (!is_array($post_vars)) - { - $post_vars = array(); - } - if (!is_array($this->extensions)) - { - $this->scan_for_extensions(); - } - if (isset($_GET['name']) && !$this->etemplate->read($_GET) || - isset($post_vars['name']) && !$this->etemplate->read($post_vars)) - { - $msg = lang('Error: Template not found !!!'); + if (!is_array($content)) $content = array(); + $preserv = array(); - if (isset($post_vars['name'])) + if ($content['import_xml']) + { + $msg .= $this->import_xml($content['file']['tmp_name'],$xml); + //$this->etemplate->echo_tmpl(); + $xml_label = $content['file']['name']; + $preserv['import'] = $this->etemplate->as_array(1); + } + elseif (is_array($content['import']) && !$content['read']) // imported not yet saved tmpl + { + $this->etemplate->init($content['import']); + $preserv['import'] = $content['import']; + } + elseif (isset($_GET['name']) && !$this->etemplate->read($_GET) || + $content['save'] && !$this->etemplate->read($content['old_keys']) || + !$content['save'] && isset($content['name']) && !$this->etemplate->read($content)) + { + $msg .= lang('Error: Template not found !!!'); + + if (isset($content['name'])) { - $post_vars['version'] = ''; // trying it without version - if ($this->etemplate->read($post_vars)) + $content['version'] = ''; // trying it without version + if ($this->etemplate->read($content)) { $msg = lang('only an other Version found !!!'); } else { - $result = $this->etemplate->search($post_vars); + $result = $this->etemplate->search($content); if (count($result) > 1) { return $this->list_result(array('result' => $result)); @@ -795,73 +817,153 @@ { $msg = lang('Error: Template not found !!!'); } - elseif ($post_vars['name'] == $result[0]['name']) + elseif ($content['name'] == $result[0]['name']) { $msg = lang('only an other Version found !!!'); } } } } - if (!$msg && isset($post_vars['delete'])) + if (!is_array($this->extensions)) { - $this->delete(array(),'show'); - return; - } - if (isset($post_vars['edit'])) - { - $this->edit(); - return; + if (($extensions = $this->scan_for_extensions())) + { + $msg .= lang('Extensions loaded:') . ' ' . $extensions; + $msg_ext_loaded = True; + } } list($app) = explode('.',$this->etemplate->name); if ($app && $app != 'etemplate') { $GLOBALS['phpgw']->translation->add_app($app); // load translations for app - $this->scan_for_extensions($app); - } - $content = $this->etemplate->as_array() + array('msg' => $msg); - $show =& new etemplate('etemplate.editor.show'); - if (!$msg && isset($post_vars['values']) && !isset($post_vars['vals'])) + if (($extensions = $this->scan_for_extensions($app))) + { + $msg .= (!$msg_ext_loaded?lang('Extensions loaded:').' ':', ') . $extensions; + } + } + if (!$msg && $content['delete']) { - $cont = $post_vars['cont']; - for ($r = 1; list($key,$val) = @each($cont); ++$r) + if (!$content['version'] && $this->etemplate->version) + { + $this->etemplate->version = ''; // else the newest would get deleted and not the one without version + } + $ok = $this->etemplate->delete(); + $msg = $ok ? lang('Template deleted') : lang('Error: Template not found !!!'); + $preserv['import'] = $this->etemplate->as_array(1); // that way the content can be saved again + } + elseif ($content['dump']) + { + if (empty($app) || !@is_dir(PHPGW_SERVER_ROOT.'/'.$app)) + { + $msg .= lang('Application name needed to write a langfile or dump the eTemplates !!!'); + } + else + { + $msg .= $this->etemplate->dump4setup($app); + } + } + elseif ($content['save'] && !$msg) + { + if (!$this->etemplate->modified_set || !$this->etemplate->modified) + { + $this->etemplate->modified = time(); + } + $ok = $this->etemplate->save(trim($content['name']),trim($content['template']),trim($content['lang']),(int) $content['group'],trim($content['version'])); + $msg = $ok ? lang('Template saved') : lang('Error: while saveing !!!'); + if ($ok) unset($preserv['import']); + } + elseif ($content['langfile']) + { + if (empty($app) || !@is_dir(PHPGW_SERVER_ROOT.'/'.$app)) + { + $msg = lang('Application name needed to write a langfile or dump the eTemplates !!!'); + } + else + { + $additional = array(); + if ($app == 'etemplate') + { + $additional = $this->etemplate->types + $this->extensions + $this->aligns + $this->valigns + + $this->edit_menu + $this->box_menu + $this->row_menu + $this->column_menu + $this->onclick_types; + } + else // try to call the writeLangFile function of the app's ui-layer + { + $ui = @CreateObject($app.'.'.($class = 'ui'.$app)); + if (!is_object($ui)) + { + $ui = @CreateObject($app.'.'.($class = 'ui')); + } + if (!is_object($ui)) + { + $ui = @CreateObject($app.'.'.($class = $app)); + } + if (is_object($ui) && @$ui->public_functions['writeLangFile']) + { + $msg = "$class::writeLangFile: ".$ui->writeLangFile(); + } + unset($ui); + } + if (empty($msg)) + { + $msg = $this->etemplate->writeLangFile($app,'en',$additional); + } + } + } + elseif ($content['export_xml']) + { + $msg .= $this->export_xml($xml,$xml_label); + } + $new_content = $this->etemplate->as_array() + array( + 'msg' => $msg, + 'xml_label' => $xml_label, + 'xml' => $xml ? '

'.$this->etemplate->html->htmlspecialchars($xml)."
\n" : '', + ); + + $editor =& new etemplate('etemplate.editor.new'); + if (!$msg && isset($content['values']) && !isset($content['vals'])) + { + $r = 1; + foreach($content['cont'] as $key => $val) { $vals["@$r"] = $key; $vals["A$r"] = is_array($val) ? htmlspecialchars(serialize($val)).'#SeR#' : $val; + ++$r; } - $show->data[$show->rows]['A']['name'] = 'etemplate.editor.values'; - $show->data[$show->rows]['A']['size'] = 'vals'; - $content['vals'] = $vals; + $editor->data[$editor->rows]['A']['name'] = 'etemplate.editor.values'; + $editor->data[$editor->rows]['A']['size'] = 'vals'; + $new_content['olds'] = $vals; } else { // set onclick handler $this->etemplate->onclick_handler = "edit_widget('%p');"; // setting the javascript via the content, allows looping too - $content['onclick'] = ' + $new_content['onclick'] = ' '; - $show->data[$show->rows]['A']['obj'] = &$this->etemplate; - $vals = $post_vars['vals']; - $olds = $post_vars['olds']; + $editor->data[$editor->rows]['A']['obj'] = &$this->etemplate; + $vals = $content['vals']; + $olds = $content['olds']; for ($r = 1; isset($vals["A$r"]); ++$r) { - $content['cont'][$olds["@$r"]] = substr($vals["A$r"],-5)=='#SeR#' ? + $new_content['cont'][$olds["@$r"]] = substr($vals["A$r"],-5)=='#SeR#' ? unserialize(substr($vals["A$r"],0,-5)) : $vals["A$r"]; } } + $preserv['olds'] = $vals; + $preserv['old_keys'] = $this->etemplate->as_array(-1); // in case we do a save as + $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Editable Templates - Show Template'); - $show->exec('etemplate.editor.show',$content,array(),'',array( - 'olds' => $vals, - ),''); + $editor->exec('etemplate.editor.edit',$new_content,array(),'',$preserv,''); } /** @@ -880,6 +982,19 @@ if (!isset($this->etemplate->widgets_with_children[$widget['type']]) || $old_had_children && ($old_type == 'grid') == ($widget['type'] == 'grid')) { + if ($this->etemplate->widgets_with_children[$widget['type']] == 3) // box + { + if ((int) $widget['size'] < 1) // min. 1 child + { + list(,$options) = explode(',',$widget['size'],2); + $widget['size'] = '1'.($options ? ','.$options : ''); + } + // create the needed cells, if they dont exist + for ($n = 1; $n <= (int) $widget['size']; ++$n) + { + if (!is_array($widget[$n])) $widget[$n] = soetemplate::empty_cell(); + } + } return; // no change necessary, eg. between different box-types } if ($widget['type'] == 'grid') @@ -908,7 +1023,15 @@ if ($old_type == 'grid') { - if ($widget['type'] == 'hbox') // 1 row --> hbox + if (preg_match('/,(vertical|horizontal)/',$widget['size'],$matches)) + { + $orient = $matches[1]; + } + else + { + $orient = $widget['type'] == 'hbox' ? 'horizontal' : 'vertical'; + } + if ($orient == 'horizontal') // ==> use first row { $row =& $old['data'][1]; for ($n = 1; $n <= $old['cols']; ++$n) @@ -920,7 +1043,7 @@ while ($span-- > 1) ++$n; } } - else + else // vertical ==> use 1 column { for ($n = 1; $n <= $old['rows']; ++$n) { @@ -1320,6 +1443,49 @@ return ''; } + /** + * converts onclick selectbox and onclick text to one javascript call + * + * @param array &$widget reference into the widget-tree + * @param array &$cell_content cell array in content + * @param boolean $widget2content=true copy from widget to content or other direction + */ + function fix_set_onclick(&$widget,&$cell_content,$widget2content=true) + { + if ($widget2content) + { + if (preg_match('/^return confirm\(["\']{1}?(.*)["\']{1}\);$/',$widget['onclick'],$matches)) + { + $cell_content['onclick'] = $matches[1]; + $cell_content['onclick_type'] = 'confirm'; + } + else + { + $cell_content['onclick_type'] = !$widget['onclick'] ? '' : 'custom'; + } + } + else // content --> widget + { + if (preg_match('/^return confirm\(["\']{1}?(.*)["\']{1}\);$/',$cell_content['onclick'],$matches) || + $cell_content['onclick_type'] != 'custom' && $cell_content['onclick']) + { + $cell_content['onclick_type'] = 'confirm'; + $cell_content['onclick'] = is_array($matches) && $matches[1] ? $matches[1] : $cell_content['onclick']; + $widget['onclick'] = "return confirm('".$cell_content['onclick']."');"; + } + elseif ($cell_content['onclick']) + { + $wiget['onclick'] = $cell_content['onclick']; + $cell_content['onclick_type'] = 'custom'; + } + else + { + $cell_content['onclick_type'] = ''; + } + unset($widget['onclick_type']); + } + } + /** * edit dialog for a widget * @@ -1408,6 +1574,10 @@ case 'save': case 'apply': $widget = $content['cell']; + if ($content['cell']['onclick_type'] || $content['cell']['onclick']) + { + $this->fix_set_onclick($widget,$content['cell'],false); + } // row- and column-attr for a grid if ($parent['type'] == 'grid' && preg_match('/^([0-9]+)([A-Z]+)$/',$child_id,$matches)) { @@ -1435,7 +1605,7 @@ $content['opener']['version'] = $content['version']; } $js = "opener.location.href='".$GLOBALS['phpgw']->link('/index.php',array( - 'menuaction' => 'etemplate.editor.show', + 'menuaction' => 'etemplate.editor.edit', )+$content['opener'])."';"; if ($action == 'apply' || $action == 'apply-no-merge') break; // fall through @@ -1456,6 +1626,7 @@ $content = $this->etemplate->as_array(-1); $content['cell'] = $widget; + $this->fix_set_onclick($widget,$content['cell'],true); foreach($this->etemplate->db_key_cols as $var) { @@ -1516,6 +1687,7 @@ 'box_menu' => $this->box_menu, 'row_menu' => $this->row_menu, 'column_menu'=> $this->column_menu, + 'onclick_type'=> $this->onclick_types, ),'',$this->etemplate->as_array()+array( 'path' => $content['path'], 'old_version' => $this->etemplate->version, diff --git a/etemplate/inc/class.soetemplate.inc.php b/etemplate/inc/class.soetemplate.inc.php index 54d3fa4bce..acb84d28f3 100644 --- a/etemplate/inc/class.soetemplate.inc.php +++ b/etemplate/inc/class.soetemplate.inc.php @@ -46,7 +46,7 @@ var $children; // array with children var $data; // depricated: first grid of the children var $size; // depricated: witdh,height,border of first grid - var $db,$db_name = 'phpgw_etemplate'; // DB name + var $db,$table_name = 'phpgw_etemplate'; // name of table var $db_key_cols = array( 'et_name' => 'name', 'et_template' => 'template', @@ -61,14 +61,18 @@ 'et_modified' => 'modified' ); var $db_cols; - var $widgets_with_children = array( // widgets that contain other widgets, for tree_walk method - 'box' => true, - 'vbox' => true, - 'hbox' => true, - 'groupbox' => true, - 'deck' => true, - 'grid' => true, - 'template' => true, + /** + * @var array $widgets_with_children widgets that contain other widgets, eg. for tree_walk method + * widget-type is the key, the value specifys how the children are stored: 1=template, 2=grid, 3=box + */ + var $widgets_with_children = array( + 'template' => 1, + 'grid' => 2, + 'box' => 3, + 'vbox' => 3, + 'hbox' => 3, + 'groupbox' => 3, + 'deck' => 3, ); /** @@ -362,7 +366,7 @@ $pref_lang = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang']; $pref_templ = $GLOBALS['phpgw_info']['server']['template_set']; - $sql = "SELECT * FROM $this->db_name WHERE et_name='".$this->db->db_addslashes($this->name)."' AND "; + $sql = "SELECT * FROM $this->table_name WHERE et_name='".$this->db->db_addslashes($this->name)."' AND "; if (is_array($name)) { $template = $name['template']; @@ -515,7 +519,7 @@ $version = $name['version']; $name = $name['name']; } - $sql = "SELECT et_name,et_template,et_lang,et_group,et_version FROM $this->db_name WHERE et_name LIKE '".$this->db->db_addslashes($name)."%'"; + $sql = "SELECT et_name,et_template,et_lang,et_group,et_version FROM $this->table_name WHERE et_name LIKE '".$this->db->db_addslashes($name)."%'"; if ($template != '' && $template != 'default') { @@ -675,28 +679,41 @@ * * the returned array ($data_too > 0) can be used with init to recreate the template * - * @param int $data_too -1 = only keys, 0 = no data array, 1 = data array too, 2 = serialize data array + * @param int $data_too -1 = only keys, 0 = no data array, 1 = data array too, 2 = serialize data array, + * 3 = only data values and data serialized + * @param boolean $db_keys use db-column-names or internal names, default false=internal names * @return array with template-data */ - function as_array($data_too=0) + function as_array($data_too=0,$db_keys=false) { $arr = array(); - foreach($data_too == -1 ? $this->db_key_cols : $this->db_cols as $db_col => $col) + switch($data_too) + { + case -1: + $cols = $this->db_key_cols; + break; + case 3: + $cols = $this->db_data_cols; + break; + default: + $cols = $this->db_cols; + } + foreach($cols as $db_col => $col) { if ($col == 'data') { - if ($data_too) + if ($data_too > 0) { - $arr['data'] = $data_too != 2 ? $this->children : + $arr[$db_keys ? $db_col : $col] = $data_too < 2 ? $this->children : serialize($this->compress_array($this->children)); } } else { - $arr[$col] = $this->$col; + $arr[$db_keys ? $db_col : $col] = $this->$col; } } - if ($data_too != -1 && $this->tpls_in_file) + if ($data_too != -1 && $this->tpls_in_file && !$db_keys) { $arr['tpls_in_file'] = $this->tpls_in_file; } @@ -751,8 +768,6 @@ { echo "

soetemplate::save('$this->name','$this->template','$this->lang',$this->group,'$this->version')

\n"; } - $this->delete(); // so we have always a new insert - if ($this->name[0] != '.' && is_array($this->data)) // correct old messed up templates { reset($this->data); each($this->data); @@ -775,19 +790,7 @@ { $this->modified = time(); } - $data = $this->as_array(2); - - $sql = "INSERT INTO $this->db_name ("; - foreach ($this->db_cols as $db_col => $col) - { - $sql .= $db_col . ','; - $vals .= $db_col == 'et_group' ? intval($data[$col]).',' : "'" . $this->db->db_addslashes($data[$col]) . "',"; - } - $sql[strlen($sql)-1] = ')'; - $sql .= " VALUES ($vals"; - $sql[strlen($sql)-1] = ')'; - - $this->db->query($sql,__LINE__,__FILE__); + $this->db->insert($this->table_name,$this->as_array(3,true),$this->as_array(-1,true),__LINE__,__FILE__); $rows = $this->db->affected_rows(); @@ -807,11 +810,7 @@ */ function delete() { - foreach ($this->db_key_cols as $db_col => $col) - { - $vals .= ($vals ? ' AND ' : '') . $db_col . '=' . ($db_col == 'et_group' ? intval($this->$col) : "'".$this->$col."'"); - } - $this->db->query("DELETE FROM $this->db_name WHERE $vals",__LINE__,__FILE__); + $this->db->delete($this->table_name,$this->as_array(-1,true),__LINE__,__FILE__); return $this->db->affected_rows(); } @@ -826,7 +825,7 @@ { list($app) = explode('.',$app); - $this->db->query("SELECT * FROM $this->db_name WHERE et_name LIKE '$app%'"); + $this->db->query("SELECT * FROM $this->table_name WHERE et_name LIKE '$app%'"); $dir = PHPGW_SERVER_ROOT . "/$app/setup"; if (!is_writeable($dir)) diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index 8f2beb4d6e..e2bd1f28b4 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -316,6 +316,8 @@ { $readonlys = array(); } + if (++$this->already_showed > 1) return ''; // prefens infinit self-inclusion + if (is_int($this->debug) && $this->debug >= 1 || $this->name && $this->debug == $this->name) { echo "

etemplate.show($this->name): $cname =\n"; _debug_array($content); @@ -569,7 +571,7 @@ */ function show_cell($cell,$content,$sel_options,$readonlys,$cname,$show_c,$show_row,&$span,&$class,$path='') { - if (is_int($this->debug) && $this->debug >= 3 || $this->debug == $cell['type']) + if ($this->debug && (is_int($this->debug) && $this->debug >= 3 || $this->debug == $cell['type'])) { echo "

etemplate.show_cell($this->name,name='${cell['name']}',type='${cell['type']}',cname='$cname')

\n"; } @@ -792,9 +794,14 @@ list($app) = explode('.',$this->name); list($img,$ro_img) = explode(',',$cell_options); $title = strlen($label) <= 1 || $cell['no_lang'] ? $label : lang($label); + if (($onclick = $cell['onclick']) && preg_match('/^return confirm\(["\']{1}?(.*)["\']{1}\);$/',$cell['onclick'],$matches)) + { + $onclick = "return confirm('".str_replace('\'','\\\'',$this->html->htmlspecialchars(lang($matches[1])))."');"; + } if ($this->java_script() && ($cell['onchange'] != '' || $img && !$readonly) && !$cell['needed']) // use a link instead of a button { - $onclick = ($cell['onchange'] == 1 || $img) ? "return submitit(document.eTemplate,'$form_name');" : $cell['onchange'].'; return false;'; + $onclick = ($onclick ? preg_replace('/^return(.*);?/','if (\\1) ',$onclick) : ''). + (($cell['onchange'] == 1 || $img) ? "return submitit(document.eTemplate,'$form_name');" : $cell['onchange'].'; return false;'); if (!$this->html->netscape4 && substr($img,-1) == '%' && is_numeric($percent = substr($img,0,-1))) { $html .= $this->html->progressbar($percent,$title,'onclick="'.$onclick.'" '.$options); @@ -811,7 +818,11 @@ { $options .= ' title="'.$title.'"'; } - $html .= !$readonly ? $this->html->submit_button($form_name,$label,$cell['onchange'], + if ($cell['onchange'] && $cell['onchange'] != 1) + { + $onclick = ($onclick ? preg_replace('/^return(.*);?/','if (\\1) ',$onclick) : '').$cell['onchange']; + } + $html .= !$readonly ? $this->html->submit_button($form_name,$label,$onclick, strlen($label) <= 1 || $cell['no_lang'],$options,$img,$app) : $this->html->image($app,$ro_img); } diff --git a/etemplate/inc/hook_sidebox_menu.inc.php b/etemplate/inc/hook_sidebox_menu.inc.php index 9d8537a95b..bd9e70f892 100644 --- a/etemplate/inc/hook_sidebox_menu.inc.php +++ b/etemplate/inc/hook_sidebox_menu.inc.php @@ -15,6 +15,7 @@ $menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu'); $file = Array( 'eTemplate Editor' => $GLOBALS['phpgw']->link('/index.php','menuaction=etemplate.editor.edit'), + 'old Editor' => $GLOBALS['phpgw']->link('/index.php','menuaction=etemplate.editor.old_editor'), 'DB-Tools' => $GLOBALS['phpgw']->link('/index.php','menuaction=etemplate.db_tools.edit'), ); if (@$GLOBALS['phpgw_info']['user']['apps']['developer_tools']) @@ -45,5 +46,11 @@ 'link' => $GLOBALS['phpgw_info']['server']['webserver_url'].'/phpgwapi/doc/', 'target' => 'docs' ), + array( + 'text' => 'CSS properties', + 'link' => 'http://www.w3.org/TR/REC-CSS2/propidx.html', + 'target' => 'docs' + ), + ); display_sidebox($appname,$menu_title,$file); diff --git a/etemplate/setup/etemplates.inc.php b/etemplate/setup/etemplates.inc.php index 1c6e087ff3..b58ff8d4b9 100644 --- a/etemplate/setup/etemplates.inc.php +++ b/etemplate/setup/etemplates.inc.php @@ -1,5 +1,5 @@ 'etemplate.nextmatch_widget.header_only','templa $templ_data[] = array('name' => 'etemplate.validation-test','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"text";s:4:"size";s:15:"10,10,/^[A-Z]+/";s:5:"label";s:52:"Text (<= 10 chars, has to start with capital letter)";s:4:"name";s:4:"text";}}i:2;a:1:{s:1:"A";a:5:{s:4:"type";s:3:"int";s:4:"size";s:5:"-15,5";s:5:"label";s:23:"Integer (-15 <= x <= 5)";s:4:"name";s:7:"integer";s:6:"needed";s:1:"1";}}i:3;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"float";s:4:"size";s:8:"-1.5,3.5";s:5:"label";s:32:"Floatingpoint (-1.5 <= x <= 3.5)";s:4:"name";s:5:"float";}}i:4;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";}i:2;a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";}}}}s:4:"rows";i:4;s:4:"cols";i:1;s:4:"size";s:8:",,0,,0,0";}}','size' => ',,0,,0,0','style' => '','modified' => '1081128620',); -$templ_data[] = array('name' => 'etemplate.tab_widget.test','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:3:{s:1:"A";s:3:"120";s:2:"c1";s:6:"row_on";s:2:"c2";s:7:"row_off";}i:1;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Surname";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"name";s:7:"surname";s:4:"help";s:7:"Surname";}s:1:"C";a:4:{s:4:"type";s:4:"text";s:5:"label";s:10:"Familyname";s:4:"name";s:10:"familyname";s:4:"help";s:10:"Familyname";}}i:2;a:3:{s:1:"A";a:5:{s:4:"type";s:3:"tab";s:4:"span";s:3:"all";s:5:"label";s:16:"Privat|Work|Note";s:4:"name";s:16:"privat|work|note";s:4:"help";s:42:"privat address|work address|free note-text";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:12:"Save changes";}s:1:"B";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";s:4:"help";s:26:"Cancel, discarding changes";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:3;}}','size' => '','style' => '','modified' => '1108424730',); - $templ_data[] = array('name' => 'etemplate.datefield','template' => '','lang' => '','group' => '0','version' => '0.9.15.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:3:{s:1:"A";a:4:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,31";s:4:"name";s:1:"d";s:4:"help";s:3:"Day";}s:1:"B";a:4:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,12";s:4:"name";s:1:"m";s:4:"help";s:5:"Month";}s:1:"C";a:4:{s:4:"type";s:3:"int";s:4:"size";s:4:"1900";s:4:"name";s:1:"Y";s:4:"help";s:4:"Year";}}}s:4:"rows";i:1;s:4:"cols";i:3;}}','size' => '','style' => '','modified' => '1032907904',); $templ_data[] = array('name' => 'etemplate.datefield','template' => '','lang' => '','group' => '0','version' => '0.9.15.002','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:5:{s:1:"A";a:4:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,,6";s:4:"name";s:2:"f1";s:4:"help";s:5:"@help";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:4:"size";s:1:"b";s:4:"name";s:3:"sep";}s:1:"C";a:4:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,,6";s:4:"name";s:2:"f2";s:4:"help";s:5:"@help";}s:1:"D";a:3:{s:4:"type";s:5:"label";s:4:"size";s:1:"b";s:4:"name";s:3:"sep";}s:1:"E";a:4:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,,6";s:4:"name";s:2:"f3";s:4:"help";s:5:"@help";}}}s:4:"rows";i:1;s:4:"cols";i:5;s:4:"size";s:5:",,,,0";}}','size' => ',,,,0','style' => '','modified' => '1032907904',); @@ -26,8 +24,6 @@ $templ_data[] = array('name' => 'etemplate.editor.show','template' => '','lang' .clickWidgetToEdit { cursor: pointer; cursor: hand; } .clickWidgetToEdit:hover { background-color: pink; }','modified' => '1108413455',); -$templ_data[] = array('name' => 'etemplate.editor.widget.generic','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:4:{s:2:"c1";s:3:"row";s:2:"c2";s:3:"row";s:2:"c3";s:3:"row";s:2:"c4";s:3:"row";}i:1;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,type";s:5:"label";s:4:"Type";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:4:"name";s:4:"type";s:8:"onchange";s:1:"1";s:4:"help";s:57:"type of the field (select Label if field should be empty)";}s:1:"C";a:4:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,size";s:5:"label";s:7:"Options";s:5:"align";s:6:"center";}s:1:"D";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:4:"name";s:4:"size";s:4:"help";s:187:"Label:[bold][italic] Text:[len][,max] Numbers:[min][,[max][,len]] T.area:[rows][,cols] Radiob.:value H.Rule:[width] Templ.:[IndexInContent] Select:[multiselect] Date:[values: eg. \'Y-m-d\']";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,span";s:5:"label";s:11:"Span, Class";s:5:"align";s:6:"center";}s:1:"F";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:4:"name";s:4:"span";s:4:"help";s:111:"number of colums the field/cell should span or \'all\' for the remaining columns, CSS-class name (for the TD tag)";}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,label";s:5:"label";s:5:"Label";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"name";s:5:"label";s:4:"help";s:118:"displayed in front of input or input is inserted for a \'%s\' in the label (label of the Submitbutton or Image-filename)";}s:1:"C";a:6:{s:4:"type";s:8:"checkbox";s:4:"span";s:1:"2";s:5:"label";s:16:"%s NoTranslation";s:5:"align";s:6:"center";s:4:"name";s:7:"no_lang";s:4:"help";s:82:"select if content of field should not be translated (label gets always translated)";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:3:{s:4:"type";s:5:"label";s:5:"label";s:5:"Align";s:5:"align";s:6:"center";}s:1:"F";a:3:{s:4:"type";s:6:"select";s:4:"name";s:5:"align";s:4:"help";s:48:"alignment of label and input-field in table-cell";}}i:3;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,name";s:5:"label";s:4:"Name";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:4:"help";s:78:"index/name of returned content (name of the Template, Link / Method for Image)";}s:1:"C";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";s:4:"span";s:1:"4";i:1;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:9:"%s needed";s:5:"align";s:6:"center";s:4:"name";s:6:"needed";s:4:"help";s:39:"check if field has to be filled by user";}i:2;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:11:"%s readonly";s:5:"align";s:6:"center";s:4:"name";s:8:"readonly";s:4:"help";s:94:"check if content should only be displayed but not altered (the content is not send back then!)";}i:3;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:11:"%s disabled";s:5:"align";s:6:"center";s:4:"name";s:8:"disabled";s:4:"help";s:96:"if field is disabled an empty table-cell is displayed, for (temporal) removement of a field/cell";}i:4;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:11:"%s onChange";s:5:"align";s:6:"center";s:4:"name";s:8:"onchange";s:4:"help";s:33:"enable JavaScript onChange submit";}}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:4;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,help";s:5:"label";s:4:"Help";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"45";s:4:"span";s:1:"3";s:4:"name";s:4:"help";s:4:"help";s:60:"displayed in statusline of browser if input-field gets focus";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,blur";s:5:"label";s:8:"blurText";s:5:"align";s:6:"center";}s:1:"F";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:4:"name";s:4:"blur";s:4:"help";s:76:"this text gets displayed if the input-field is empty and has no focus (blur)";}}}s:4:"rows";i:4;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1108415433',); - $templ_data[] = array('name' => 'etemplate.editor','template' => '','lang' => '','group' => '0','version' => '0.9.15.003','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:9:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"size";s:2:"bi";s:5:"label";s:27:"Editable Templates - Editor";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}s:1:"B";a:5:{s:4:"type";s:6:"button";s:5:"label";s:8:"DB-Tools";s:5:"align";s:5:"right";s:4:"name";s:8:"db_tools";s:4:"help";s:21:"to start the DB-Tools";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:4:"name";s:21:"etemplate.editor.keys";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:4:"name";s:29:"etemplate.editor.edit-buttons";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:7:"options";s:4:"span";s:3:"all";s:4:"name";s:24:"etemplate.editor.options";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:4:"name";s:21:"etemplate.editor.edit";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:7;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:10:"CSS-styles";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:8;a:2:{s:1:"A";a:5:{s:4:"type";s:8:"textarea";s:4:"size";s:5:"10,80";s:4:"span";s:3:"all";s:4:"name";s:5:"style";s:4:"help";s:155:"embeded CSS styles, eg. \'.red { background: red; }\' (note the \'.\' before the class-name) or \'@import url(...)\' (class names are global for the whole page!)";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:8;s:4:"cols";i:2;s:4:"size";s:9:"100%,100%";}}','size' => '100%,100%','style' => '','modified' => '1033317410',); $templ_data[] = array('name' => 'etemplate.editor','template' => '','lang' => '','group' => '0','version' => '0.9.15.004','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:9:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"size";s:2:"bi";s:5:"label";s:27:"Editable Templates - Editor";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}s:1:"B";a:5:{s:4:"type";s:6:"button";s:5:"label";s:8:"DB-Tools";s:5:"align";s:5:"right";s:4:"name";s:8:"db_tools";s:4:"help";s:21:"to start the DB-Tools";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:4:"name";s:21:"etemplate.editor.keys";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:12:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"9";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Read";s:4:"name";s:4:"read";s:4:"help";s:49:"read eTemplate from database (for the keys above)";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Show";s:4:"name";s:4:"show";s:4:"help";s:61:"shows/displays eTemplate for testing, does NOT save it before";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:77:"save the eTemplate under the above keys (name, ...), change them for a SaveAs";}i:4;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:6:"delete";s:4:"help";s:33:"deletes the eTemplate spez. above";}i:5;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Dump4Setup";s:4:"name";s:4:"dump";s:4:"help";s:88:"writes a \'etemplates.inc.php\' file (for application in Name) in the setup-dir of the app";}i:6;a:4:{s:4:"type";s:6:"button";s:5:"label";s:14:"Write Langfile";s:4:"name";s:8:"langfile";s:4:"help";s:85:"creates an english (\'en\') langfile from label and helptexts (for application in Name)";}i:7;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Export XML";s:4:"name";s:10:"export_xml";s:4:"help";s:43:"export the loaded eTemplate into a xml-file";}i:8;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Import XML";s:4:"name";s:10:"import_xml";s:4:"help";s:35:"import an eTemplate from a xml-file";}i:9;a:3:{s:4:"type";s:4:"file";s:4:"name";s:4:"file";s:4:"help";s:18:"xml-file to import";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:7:"options";s:4:"span";s:3:"all";s:4:"name";s:24:"etemplate.editor.options";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:4:"name";s:21:"etemplate.editor.edit";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:7;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:10:"CSS-styles";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:8;a:2:{s:1:"A";a:5:{s:4:"type";s:8:"textarea";s:4:"size";s:5:"10,80";s:4:"span";s:3:"all";s:4:"name";s:5:"style";s:4:"help";s:155:"embeded CSS styles, eg. \'.red { background: red; }\' (note the \'.\' before the class-name) or \'@import url(...)\' (class names are global for the whole page!)";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:8;s:4:"cols";i:2;s:4:"size";s:9:"100%,100%";}}','size' => '100%,100%','style' => '','modified' => '1035854216',); @@ -62,8 +58,6 @@ $templ_data[] = array('name' => 'etemplate.editor.row_header','template' => '',' $templ_data[] = array('name' => 'etemplate.editor.row_header','template' => '','lang' => '','group' => '0','version' => '0.9.15.004','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:5:{s:4:"type";s:6:"button";s:5:"label";s:1:"+";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"insert_row[0]";s:4:"help";s:37:"insert new row in front of first Line";}i:2;a:5:{s:4:"type";s:6:"button";s:5:"label";s:1:"X";s:7:"no_lang";s:1:"1";s:4:"name";s:19:"exchange_row[$row_]";s:4:"help";s:36:"exchange this row with the one above";}}s:1:"B";a:3:{s:4:"type";s:5:"label";s:5:"label";s:16:"Height, Disabled";s:5:"align";s:6:"center";}}i:2;a:2:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"size";s:1:"b";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";s:4:"name";s:4:".row";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:1:"6";s:5:"align";s:6:"center";s:4:"name";s:14:"height[h$row_]";s:4:"help";s:123:"height of row (in % or pixel), disable row: [! = not][=] eg: \'!@data\' disable row if content of data is empty";}}i:3;a:2:{s:1:"A";a:6:{s:4:"type";s:6:"button";s:5:"label";s:1:"-";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";s:4:"name";s:17:"delete_row[$row_]";s:4:"help";s:33:"remove Row (can NOT be undone!!!)";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:5:"label";s:13:"class, Valign";s:5:"align";s:6:"center";}}i:4;a:2:{s:1:"A";a:6:{s:4:"type";s:6:"button";s:5:"label";s:1:"+";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";s:4:"name";s:17:"insert_row[$row_]";s:4:"help";s:29:"insert new row after this one";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:1:"6";s:5:"align";s:6:"center";s:4:"name";s:13:"class[c$row_]";s:4:"help";s:112:"CSS-class name for this row, preset: \'nmh\' = NextMatch header, \'nmr\' = alternating NM row, \'nmr0\'+\'nmr1\' NM rows";}}}s:4:"rows";i:4;s:4:"cols";i:2;s:4:"size";s:5:",100%";}}','size' => ',100%','style' => '','modified' => '1034428465',); -$templ_data[] = array('name' => 'etemplate.editor.show','template' => '','lang' => '','group' => '0','version' => '0.9.15.002','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:1:{s:1:"A";s:4:"1000";}i:1;a:2:{s:1:"A";a:6:{s:4:"type";s:5:"label";s:4:"size";s:2:"bi";s:4:"span";s:3:"all";s:5:"label";s:34:"Editable Templates - Show Template";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:4:"name";s:21:"etemplate.editor.keys";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:4:"name";s:29:"etemplate.editor.show-buttons";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"size";s:4:"cont";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:6;s:4:"cols";i:2;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '','modified' => '1033832038',); - $templ_data[] = array('name' => 'etemplate.editor.show-buttons','template' => '','lang' => '','group' => '0','version' => '0.9.15.002','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:4:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Read";s:4:"name";s:4:"read";s:4:"help";s:49:"read eTemplate from database (for the keys above)";}s:1:"B";a:4:{s:4:"type";s:6:"button";s:5:"label";s:11:"Show Values";s:4:"name";s:6:"values";s:4:"help";s:65:"shows / allows you to enter values into the eTemplate for testing";}s:1:"C";a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Edit";s:4:"name";s:4:"edit";s:4:"help";s:30:"edit the eTemplate spez. above";}s:1:"D";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:6:"delete";s:4:"help";s:33:"deletes the eTemplate spez. above";}}}s:4:"rows";i:1;s:4:"cols";i:4;}}','size' => '','style' => '','modified' => '1032907904',); $templ_data[] = array('name' => 'etemplate.editor.values','template' => '','lang' => '','group' => '0','version' => '0.9.13.001','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:3:"nmh";s:2:"c2";s:3:"nmr";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"Key";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Value";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:4:"text";s:4:"name";s:8:"$col$row";s:8:"readonly";s:1:"1";}s:1:"B";a:2:{s:4:"type";s:4:"text";s:4:"name";s:8:"$col$row";}}}s:4:"rows";i:2;s:4:"cols";i:2;s:4:"size";s:3:",,1";}}','size' => ',,1','style' => '','modified' => '1032907904',); @@ -167,12 +161,19 @@ $templ_data[] = array('name' => 'etemplate.editor.show','template' => '','lang' $templ_data[] = array('name' => 'etemplate.editor.list_result','template' => '','lang' => '','group' => '0','version' => '1.0.0.001','data' => 'a:1:{i:0;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:2;a:1:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"name";s:21:"etemplate.editor.keys";}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:4:"name";s:33:"etemplate.editor.list_result.list";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:4:"100%";}}','size' => '100%','style' => '.redItalic { color:red; font-style:italic;}','modified' => '1107711996',); -$templ_data[] = array('name' => 'etemplate.editor.widget','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:3:{s:2:"h2";s:6:",!@msg";s:2:"h4";s:2:",1";s:2:"c1";s:2:"th";}i:1;a:2:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:4:"span";s:3:"all";i:1;a:5:{s:4:"type";s:6:"select";s:4:"size";s:4:"edit";s:4:"name";s:4:"edit";s:8:"onchange";s:1:"1";s:4:"help";s:49:"delete and cut operations will save the template!";}i:2;a:5:{s:4:"type";s:6:"select";s:4:"size";s:3:"box";s:4:"name";s:3:"box";s:8:"onchange";s:1:"1";s:4:"help";s:50:"insert and swap operations will save the template!";}i:3;a:4:{s:4:"type";s:6:"select";s:4:"size";s:4:"grid";s:4:"name";s:4:"grid";s:8:"onchange";s:1:"1";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:4:"html";s:5:"label";s:4:"Name";s:4:"name";s:11:"java_script";}s:1:"B";a:8:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"6";i:1;a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:4:"text";s:4:"name";s:8:"template";s:8:"readonly";s:1:"1";}i:3;a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"lang";s:8:"readonly";s:1:"1";}i:4;a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"20";s:5:"label";s:7:"Version";s:4:"name";s:7:"version";s:4:"help";s:56:"increment version to not overwrite the existing template";}i:5;a:5:{s:4:"type";s:5:"label";s:4:"span";s:5:",gray";s:5:"label";s:4:"Path";s:7:"no_lang";s:1:"1";s:4:"name";s:4:"path";}i:6;a:4:{s:4:"type";s:5:"label";s:4:"span";s:5:",gray";s:5:"label";s:6:"Parent";s:4:"name";s:11:"parent_type";}}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:4:"name";s:10:"cell[type]";s:8:"onchange";s:1:"1";s:4:"help";s:57:"type of the field (select Label if field should be empty)";}}i:5;a:2:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:4:"cell";s:4:"span";s:3:"all";s:4:"name";s:31:"etemplate.editor.widget.generic";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:66:"saves the template with given version number and closes the window";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:5:"apply";s:4:"help";s:56:"applies the changes to the given version of the template";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";s:4:"help";s:44:"closes the window without saving the changes";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:6;s:4:"cols";i:2;}}','size' => '','style' => '.redItalic { color: red; font-style: italic; } -.gray { color: gray; }','modified' => '1108500820',); - -$templ_data[] = array('name' => 'etemplate.editor.widget','template' => '','lang' => '','group' => '0','version' => '1.0.1.002','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:9:{i:0;a:2:{s:2:"h2";s:6:",!@msg";s:2:"c1";s:2:"th";}i:1;a:2:{s:1:"A";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";s:4:"span";s:3:"all";i:1;a:5:{s:4:"type";s:6:"select";s:4:"size";s:7:"Edit...";s:4:"name";s:9:"edit_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"delete and cut save the template!";}i:2;a:5:{s:4:"type";s:6:"select";s:4:"size";s:6:"Box...";s:4:"name";s:8:"box_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"all operations save the template!";}i:3;a:5:{s:4:"type";s:6:"select";s:4:"size";s:6:"Row...";s:4:"name";s:8:"row_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"all operations save the template!";}i:4;a:5:{s:4:"type";s:6:"select";s:4:"size";s:9:"Column...";s:4:"name";s:11:"column_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"all operations save the template!";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:4:"html";s:5:"label";s:4:"Name";s:4:"name";s:11:"java_script";}s:1:"B";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"5";i:1;a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:4:"text";s:4:"name";s:8:"template";s:8:"readonly";s:1:"1";}i:3;a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"lang";s:8:"readonly";s:1:"1";}i:4;a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"20";s:5:"label";s:7:"Version";s:4:"name";s:7:"version";s:4:"help";s:56:"increment version to not overwrite the existing template";}i:5;a:5:{s:4:"type";s:5:"label";s:4:"span";s:5:",gray";s:5:"label";s:4:"Path";s:7:"no_lang";s:1:"1";s:4:"name";s:4:"path";}}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Path";}s:1:"B";a:3:{s:4:"type";s:4:"path";s:4:"name";s:4:"goto";s:4:"help";s:29:"click to edit a parent widget";}}i:5;a:2:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:4:"cell";s:4:"span";s:3:"all";s:4:"name";s:31:"etemplate.editor.widget.generic";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:6:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";s:5:"label";s:19:"Grid row attributes";s:4:"span";s:3:"all";i:1;a:1:{s:4:"type";s:5:"label";}i:2;a:1:{s:4:"type";s:5:"label";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:7;a:2:{s:1:"A";a:6:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";s:5:"label";s:22:"Grid column attributes";s:4:"span";s:3:"all";i:1;a:1:{s:4:"type";s:5:"label";}i:2;a:1:{s:4:"type";s:5:"label";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:8;a:2:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:66:"saves the template with given version number and closes the window";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:5:"apply";s:4:"help";s:56:"applies the changes to the given version of the template";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";s:4:"help";s:44:"closes the window without saving the changes";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:8;s:4:"cols";i:2;}}','size' => '','style' => '.redItalic { color: red; font-style: italic; }.gray { color: gray; }','modified' => '1108727831',); +$templ_data[] = array('name' => 'etemplate.editor.widget.generic','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:6:{s:2:"c1";s:3:"row";s:2:"c2";s:3:"row";s:2:"c3";s:3:"row";s:2:"c4";s:3:"row";s:2:"c5";s:3:"row";s:2:"h5";s:14:",!@type=button";}i:1;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,type";s:5:"label";s:4:"Type";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:4:"name";s:4:"type";s:8:"onchange";s:1:"1";s:4:"help";s:57:"type of the field (select Label if field should be empty)";}s:1:"C";a:4:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,size";s:5:"label";s:7:"Options";s:5:"align";s:6:"center";}s:1:"D";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:4:"name";s:4:"size";s:4:"help";s:187:"Label:[bold][italic] Text:[len][,max] Numbers:[min][,[max][,len]] T.area:[rows][,cols] Radiob.:value H.Rule:[width] Templ.:[IndexInContent] Select:[multiselect] Date:[values: eg. \'Y-m-d\']";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,span";s:5:"label";s:11:"Span, Class";s:5:"align";s:6:"center";}s:1:"F";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:4:"name";s:4:"span";s:4:"help";s:111:"number of colums the field/cell should span or \'all\' for the remaining columns, CSS-class name (for the TD tag)";}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,label";s:5:"label";s:5:"Label";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"name";s:5:"label";s:4:"help";s:118:"displayed in front of input or input is inserted for a \'%s\' in the label (label of the Submitbutton or Image-filename)";}s:1:"C";a:6:{s:4:"type";s:8:"checkbox";s:4:"span";s:1:"2";s:5:"label";s:16:"%s NoTranslation";s:5:"align";s:6:"center";s:4:"name";s:7:"no_lang";s:4:"help";s:82:"select if content of field should not be translated (label gets always translated)";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:3:{s:4:"type";s:5:"label";s:5:"label";s:5:"Align";s:5:"align";s:6:"center";}s:1:"F";a:3:{s:4:"type";s:6:"select";s:4:"name";s:5:"align";s:4:"help";s:48:"alignment of label and input-field in table-cell";}}i:3;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,name";s:5:"label";s:4:"Name";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:4:"help";s:78:"index/name of returned content (name of the Template, Link / Method for Image)";}s:1:"C";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";s:4:"span";s:1:"4";i:1;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:9:"%s needed";s:5:"align";s:6:"center";s:4:"name";s:6:"needed";s:4:"help";s:39:"check if field has to be filled by user";}i:2;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:11:"%s readonly";s:5:"align";s:6:"center";s:4:"name";s:8:"readonly";s:4:"help";s:94:"check if content should only be displayed but not altered (the content is not send back then!)";}i:3;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:11:"%s disabled";s:5:"align";s:6:"center";s:4:"name";s:8:"disabled";s:4:"help";s:96:"if field is disabled an empty table-cell is displayed, for (temporal) removement of a field/cell";}i:4;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:11:"%s onChange";s:5:"align";s:6:"center";s:4:"name";s:8:"onchange";s:4:"help";s:33:"enable JavaScript onChange submit";}}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:4;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,help";s:5:"label";s:4:"Help";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"45";s:4:"span";s:1:"3";s:4:"name";s:4:"help";s:4:"help";s:60:"displayed in statusline of browser if input-field gets focus";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"size";s:7:",,,blur";s:5:"label";s:8:"blurText";s:5:"align";s:6:"center";}s:1:"F";a:4:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:4:"name";s:4:"blur";s:4:"help";s:76:"this text gets displayed if the input-field is empty and has no focus (blur)";}}i:5;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:7:"onclick";s:5:"label";s:7:"onClick";}s:1:"B";a:3:{s:4:"type";s:6:"select";s:4:"name";s:12:"onclick_type";s:4:"help";s:43:"confirmation necesary or custom java-script";}s:1:"C";a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"45";s:4:"span";s:3:"all";s:4:"name";s:7:"onclick";s:4:"help";s:67:"confirmation message or custom javascript (returning true or false)";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:5;s:4:"cols";i:6;}}','size' => '','style' => '','modified' => '1108415433',); $templ_data[] = array('name' => 'etemplate.editor.widget','template' => '','lang' => '','group' => '0','version' => '1.0.1.003','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:9:{i:0;a:4:{s:2:"h2";s:6:",!@msg";s:2:"c1";s:2:"th";s:2:"h6";s:11:",!@grid_row";s:2:"h7";s:14:",!@grid_column";}i:1;a:2:{s:1:"A";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";s:4:"span";s:3:"all";i:1;a:5:{s:4:"type";s:6:"select";s:4:"size";s:7:"Edit...";s:4:"name";s:9:"edit_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"delete and cut save the template!";}i:2;a:5:{s:4:"type";s:6:"select";s:4:"size";s:6:"Box...";s:4:"name";s:8:"box_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"all operations save the template!";}i:3;a:5:{s:4:"type";s:6:"select";s:4:"size";s:6:"Row...";s:4:"name";s:8:"row_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"all operations save the template!";}i:4;a:5:{s:4:"type";s:6:"select";s:4:"size";s:9:"Column...";s:4:"name";s:11:"column_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"all operations save the template!";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:4:"html";s:5:"label";s:4:"Name";s:4:"name";s:11:"java_script";}s:1:"B";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"5";i:1;a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:4:"text";s:4:"name";s:8:"template";s:8:"readonly";s:1:"1";}i:3;a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"lang";s:8:"readonly";s:1:"1";}i:4;a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"20";s:5:"label";s:7:"Version";s:4:"name";s:7:"version";s:4:"help";s:56:"increment version to not overwrite the existing template";}i:5;a:5:{s:4:"type";s:5:"label";s:4:"span";s:5:",gray";s:5:"label";s:4:"Path";s:7:"no_lang";s:1:"1";s:4:"name";s:4:"path";}}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Parents";}s:1:"B";a:3:{s:4:"type";s:4:"path";s:4:"name";s:4:"goto";s:4:"help";s:29:"click to edit a parent widget";}}i:5;a:2:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:4:"cell";s:4:"span";s:3:"all";s:4:"name";s:31:"etemplate.editor.widget.generic";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:8:{s:4:"type";s:8:"groupbox";s:4:"size";s:12:"4,horizontal";s:5:"label";s:19:"Grid row attributes";s:4:"span";s:3:"all";i:1;a:5:{s:4:"type";s:4:"text";s:5:"label";s:6:"Height";s:4:"name";s:16:"grid_row[height]";s:4:"help";s:29:"height of row (in % or pixel)";s:4:"size";s:1:"5";}i:2;a:5:{s:4:"type";s:4:"text";s:5:"label";s:8:"Disabled";s:4:"name";s:18:"grid_row[disabled]";s:4:"help";s:88:"to disable: [! = not][=] eg: \'!@data\' disables if content of data is empty";s:4:"size";s:2:"10";}i:3;a:5:{s:4:"type";s:4:"text";s:4:"name";s:15:"grid_row[class]";s:4:"size";s:2:"10";s:5:"label";s:5:"Class";s:4:"help";s:100:"CSS-class name for this row, preset: \'th\' = header, \'row\' = alternating row, \'row_off\'+\'row_on\' rows";}i:4;a:4:{s:4:"type";s:6:"select";s:4:"name";s:16:"grid_row[valign]";s:5:"label";s:6:"Valign";s:4:"help";s:25:"vertical alignment of row";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:7;a:2:{s:1:"A";a:6:{s:4:"type";s:8:"groupbox";s:4:"size";s:12:"2,horizontal";s:5:"label";s:22:"Grid column attributes";s:4:"span";s:3:"all";i:1;a:5:{s:4:"type";s:4:"text";s:5:"label";s:5:"Width";s:4:"name";s:18:"grid_column[width]";s:4:"help";s:31:"width of column (in % or pixel)";s:4:"size";s:1:"5";}i:2;a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:5:"label";s:8:"Disabled";s:4:"name";s:21:"grid_column[disabled]";s:4:"help";s:88:"to disable: [! = not][=] eg: \'!@data\' disables if content of data is empty";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:8;a:2:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:66:"saves the template with given version number and closes the window";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:5:"apply";s:4:"help";s:56:"applies the changes to the given version of the template";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";s:4:"help";s:44:"closes the window without saving the changes";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:8;s:4:"cols";i:2;}}','size' => '','style' => '.redItalic { color: red; font-style: italic; }.gray { color: gray; }','modified' => '1108727772',); $templ_data[] = array('name' => 'etemplate.editor.widget','template' => '','lang' => '','group' => '0','version' => '1.0.1.004','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:9:{i:0;a:4:{s:2:"h2";s:6:",!@msg";s:2:"h6";s:11:",!@grid_row";s:2:"h7";s:14:",!@grid_column";s:2:"c1";s:2:"th";}i:1;a:2:{s:1:"A";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"4";s:4:"span";s:3:"all";i:1;a:5:{s:4:"type";s:6:"select";s:4:"size";s:7:"Edit...";s:4:"name";s:9:"edit_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"delete and cut save the template!";}i:2;a:5:{s:4:"type";s:6:"select";s:4:"size";s:6:"Box...";s:4:"name";s:8:"box_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"all operations save the template!";}i:3;a:5:{s:4:"type";s:6:"select";s:4:"size";s:6:"Row...";s:4:"name";s:8:"row_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"all operations save the template!";}i:4;a:5:{s:4:"type";s:6:"select";s:4:"size";s:9:"Column...";s:4:"name";s:11:"column_menu";s:8:"onchange";s:1:"1";s:4:"help";s:33:"all operations save the template!";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:4:"html";s:5:"label";s:4:"Name";s:4:"name";s:11:"java_script";}s:1:"B";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"5";i:1;a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"name";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:4:"text";s:4:"name";s:8:"template";s:8:"readonly";s:1:"1";}i:3;a:3:{s:4:"type";s:4:"text";s:4:"name";s:4:"lang";s:8:"readonly";s:1:"1";}i:4;a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"20";s:5:"label";s:7:"Version";s:4:"name";s:7:"version";s:4:"help";s:56:"increment version to not overwrite the existing template";}i:5;a:5:{s:4:"type";s:5:"label";s:4:"span";s:5:",gray";s:5:"label";s:4:"Path";s:7:"no_lang";s:1:"1";s:4:"name";s:4:"path";}}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Path";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:4:"path";s:4:"name";s:4:"goto";s:4:"help";s:25:"switch to a parent widget";}i:2;a:6:{s:4:"type";s:4:"path";s:4:"size";s:1:" ";s:4:"name";s:5:"goto2";s:4:"help";s:44:"switch to an other widgets of that container";s:7:"no_lang";s:1:"1";s:5:"label";s:1:" ";}}}i:5;a:2:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:4:"cell";s:4:"span";s:3:"all";s:4:"name";s:31:"etemplate.editor.widget.generic";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:8:{s:4:"type";s:8:"groupbox";s:4:"size";s:12:"4,horizontal";s:5:"label";s:19:"Grid row attributes";s:4:"span";s:3:"all";i:1;a:5:{s:4:"type";s:4:"text";s:4:"size";s:1:"5";s:5:"label";s:6:"Height";s:4:"name";s:16:"grid_row[height]";s:4:"help";s:29:"height of row (in % or pixel)";}i:2;a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:5:"label";s:8:"Disabled";s:4:"name";s:18:"grid_row[disabled]";s:4:"help";s:88:"to disable: [! = not][=] eg: \'!@data\' disables if content of data is empty";}i:3;a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:5:"label";s:5:"Class";s:4:"name";s:15:"grid_row[class]";s:4:"help";s:100:"CSS-class name for this row, preset: \'th\' = header, \'row\' = alternating row, \'row_off\'+\'row_on\' rows";}i:4;a:4:{s:4:"type";s:6:"select";s:5:"label";s:6:"Valign";s:4:"name";s:16:"grid_row[valign]";s:4:"help";s:25:"vertical alignment of row";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:7;a:2:{s:1:"A";a:6:{s:4:"type";s:8:"groupbox";s:4:"size";s:12:"2,horizontal";s:5:"label";s:22:"Grid column attributes";s:4:"span";s:3:"all";i:1;a:5:{s:4:"type";s:4:"text";s:4:"size";s:1:"5";s:5:"label";s:5:"Width";s:4:"name";s:18:"grid_column[width]";s:4:"help";s:31:"width of column (in % or pixel)";}i:2;a:5:{s:4:"type";s:4:"text";s:4:"size";s:2:"10";s:5:"label";s:8:"Disabled";s:4:"name";s:21:"grid_column[disabled]";s:4:"help";s:88:"to disable: [! = not][=] eg: \'!@data\' disables if content of data is empty";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:8;a:2:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:66:"saves the template with given version number and closes the window";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:5:"apply";s:4:"help";s:56:"applies the changes to the given version of the template";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";s:4:"help";s:44:"closes the window without saving the changes";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:8;s:4:"cols";i:2;}}','size' => '','style' => '.redItalic { color: red; font-style: italic; }.gray { color: gray; }','modified' => '1108739783',); +$templ_data[] = array('name' => 'etemplate.editor.new','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:2:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:6:",!@xml";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:2;a:2:{s:1:"A";a:6:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";s:5:"label";s:10:"Export XML";s:4:"span";s:3:"all";i:1;a:2:{s:4:"type";s:4:"html";s:4:"name";s:3:"xml";}i:2;a:1:{s:4:"type";s:5:"label";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:4:"name";s:21:"etemplate.editor.keys";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:12:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"9";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Read";s:4:"name";s:4:"read";s:4:"help";s:49:"read eTemplate from database (for the keys above)";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:11:"Show values";s:4:"name";s:6:"values";s:4:"help";s:65:"shows / allows you to enter values into the eTemplate for testing";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:77:"save the eTemplate under the above keys (name, ...), change them for a SaveAs";}i:4;a:5:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:6:"delete";s:4:"help";s:36:"Delete the eTemplate spezified above";s:7:"onclick";s:55:"return confirm(\'Delete the eTemplate spezified above\');";}i:5;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Dump4Setup";s:4:"name";s:4:"dump";s:4:"help";s:88:"writes a \'etemplates.inc.php\' file (for application in Name) in the setup-dir of the app";}i:6;a:4:{s:4:"type";s:6:"button";s:5:"label";s:14:"Write Langfile";s:4:"name";s:8:"langfile";s:4:"help";s:85:"creates an english (\'en\') langfile from label and helptexts (for application in Name)";}i:7;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Export XML";s:4:"name";s:10:"export_xml";s:4:"help";s:43:"export the loaded eTemplate into a xml-file";}i:8;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Import XML";s:4:"name";s:10:"import_xml";s:4:"help";s:35:"import an eTemplate from a xml-file";}i:9;a:3:{s:4:"type";s:4:"file";s:4:"name";s:4:"file";s:4:"help";s:18:"xml-file to import";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:4:"html";s:4:"span";s:3:"all";s:4:"name";s:7:"onclick";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:7;a:2:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"size";s:4:"cont";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:7;s:4:"cols";i:2;}}','size' => '','style' => '.redItalic { color: red; font-style: italic; } +.clickWidgetToEdit { cursor: pointer; cursor: hand; } +.clickWidgetToEdit:hover { background-color: pink; }','modified' => '1108912021',); + +$templ_data[] = array('name' => 'etemplate.tab_widget.test','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:3:{s:1:"A";s:3:"120";s:2:"c1";s:6:"row_on";s:2:"c2";s:7:"row_off";}i:1;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Surname";s:4:"size";s:10:",,,surname";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"name";s:7:"surname";s:4:"help";s:7:"Surname";}s:1:"C";a:4:{s:4:"type";s:4:"text";s:5:"label";s:10:"Familyname";s:4:"name";s:10:"familyname";s:4:"help";s:10:"Familyname";}}i:2;a:3:{s:1:"A";a:5:{s:4:"type";s:3:"tab";s:4:"span";s:3:"all";s:5:"label";s:16:"Privat|Work|Note";s:4:"name";s:16:"privat|work|note";s:4:"help";s:42:"privat address|work address|free note-text";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:12:"Save changes";}s:1:"B";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:6:"cancel";s:4:"help";s:26:"Cancel, discarding changes";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:3;}}','size' => '','style' => '','modified' => '1108424730',); + +$templ_data[] = array('name' => 'etemplate.editor.new','template' => '','lang' => '','group' => '0','version' => '1.0.1.002','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:2:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:6:",!@xml";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:2;a:2:{s:1:"A";a:6:{s:4:"type";s:8:"groupbox";s:4:"size";s:1:"2";s:5:"label";s:10:"Export XML";s:4:"span";s:3:"all";i:1;a:2:{s:4:"type";s:4:"html";s:4:"name";s:3:"xml";}i:2;a:1:{s:4:"type";s:5:"label";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:8:"template";s:4:"span";s:3:"all";s:4:"name";s:21:"etemplate.editor.keys";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:12:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"9";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Read";s:4:"name";s:4:"read";s:4:"help";s:49:"read eTemplate from database (for the keys above)";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:11:"Show values";s:4:"name";s:6:"values";s:4:"help";s:65:"shows / allows you to enter values into the eTemplate for testing";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:4:"save";s:4:"help";s:77:"save the eTemplate under the above keys (name, ...), change them for a SaveAs";}i:4;a:5:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:6:"delete";s:4:"help";s:36:"Delete the eTemplate spezified above";s:7:"onclick";s:55:"return confirm(\'Delete the eTemplate spezified above\');";}i:5;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Dump4Setup";s:4:"name";s:4:"dump";s:4:"help";s:88:"writes a \'etemplates.inc.php\' file (for application in Name) in the setup-dir of the app";}i:6;a:4:{s:4:"type";s:6:"button";s:5:"label";s:14:"Write Langfile";s:4:"name";s:8:"langfile";s:4:"help";s:85:"creates an english (\'en\') langfile from label and helptexts (for application in Name)";}i:7;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Export XML";s:4:"name";s:10:"export_xml";s:4:"help";s:43:"export the loaded eTemplate into a xml-file";}i:8;a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"Import XML";s:4:"name";s:10:"import_xml";s:4:"help";s:35:"import an eTemplate from a xml-file";}i:9;a:3:{s:4:"type";s:4:"file";s:4:"name";s:4:"file";s:4:"help";s:18:"xml-file to import";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:5;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"hrule";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:3:{s:4:"type";s:4:"html";s:4:"span";s:3:"all";s:4:"name";s:7:"onclick";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:7;a:2:{s:1:"A";a:2:{s:4:"type";s:8:"template";s:4:"size";s:4:"cont";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:7;s:4:"cols";i:2;}}','size' => '','style' => '.redItalic { color: red; font-style: italic; } +.clickWidgetToEdit { cursor: pointer; cursor: hand; } +.clickWidgetToEdit:hover { background-color: pink; }','modified' => '1108912126',); + diff --git a/etemplate/setup/phpgw_de.lang b/etemplate/setup/phpgw_de.lang index c1e6885521..a6091968c8 100644 --- a/etemplate/setup/phpgw_de.lang +++ b/etemplate/setup/phpgw_de.lang @@ -63,12 +63,17 @@ closes the window without saving the changes etemplate de schlie column... etemplate de Spalte... columnname etemplate de Spaltenname comment etemplate de Kommentar +confirm etemplate de bestätigen +confirmation message or custom javascript (returning true or false) etemplate de Bestätigungsmeldung oder spezielles Javascript (true oder false zurücklieferned) +confirmation necesary or custom java-script etemplate de Bestätigung notwendig oder spezielles Javascript create a new table for the application etemplate de Neue Tabelle für die Anwendung anlegen creates an english ('en') langfile from label and helptexts (for application in name) etemplate de erzeugt eine englische ('en') Sprachdatei aus den Beschriftungen und Hilfetexten (für die Anwendung in Name) css class for the table-tag etemplate de CSS class der Tabelle +css properties etemplate de CSS Attribute css-class name for this row, preset: 'nmh' = nextmatch header, 'nmr' = alternating nm row, 'nmr0'+'nmr1' nm rows etemplate de Name der CSS class dieser Zeile, vorbelegt sind: 'th' = Kopfzeile, 'row' = zeilenweise wechselnde Farbe bzw. 'row_on', 'row_off' css-class name for this row, preset: 'th' = header, 'row' = alternating row, 'row_off'+'row_on' rows etemplate de Name der CSS class dieser Zeile, vorbelegt sind: 'th' = Kopfzeile, 'row' = zeilenweise wechselnde Farbe bzw. 'row_on', 'row_off' css-styles etemplate de CSS Stile +custom etemplate de speziell cut etemplate de Ausschneiden date+time etemplate de Datum+Uhrzeit datum etemplate de Datum @@ -214,12 +219,14 @@ no file etemplate de keine Datei no filename given or selected via browse... etemplate de kein Dateiname angegeben oder mit [Browse...] ausgewählt no row to swap with !!! etemplate de Keine Zeile um damit zu tauschen !!! not null etemplate de NOT NULL +nothing etemplate de nichts nothing found - try again !!! etemplate de Nichts gefunden - nochmal versuchen !!! nothing in clipboard to paste !!! etemplate de Zwischenablage leer - nichts zum einfügen !!! nothing matched search criteria !!! etemplate de Nicht gefunden bei diesem Suchkriterium !!! number of colums the field/cell should span or 'all' for the remaining columns, css-class name (for the td tag) etemplate de Anzahl der Spalten die ein Feld überspannt oder 'all' für die übrigen Spalten, CSS class Name (für das TD-tag) number of rows/cols in a v/hbox, cellpadding, cellspacing etemplate de Anzahl Zeilen/Spalten der V/HBox, Innenabstand (Cellpadding), Zellenabstand (Cellspacing) of etemplate de von +onclick etemplate de onClick only an other version found !!! etemplate de nur eine andere Version gefunden !!! optional note about the link etemplate de optionale Notiz zur Verknüpfung options etemplate de Optionen @@ -319,7 +326,7 @@ unlink etemplate de L update a single entry by passing the fields. etemplate de Aktualisert einen einzelnen Eintrag über seine Felder. update from version '%s' to etemplate de Update von Version '%s' auf upload etemplate de Hochladen -valign etemplate de Valing +valign etemplate de vAlign value etemplate de Wert value has to be at least '%1' !!! etemplate de Der Wert muss mindestens '%1' betragen !!! value has to be at maximum '%1' !!! etemplate de Der Wert darf höchstens '%1' betragen !!! diff --git a/etemplate/setup/phpgw_en.lang b/etemplate/setup/phpgw_en.lang index 05d8af8b74..077e0a119d 100644 --- a/etemplate/setup/phpgw_en.lang +++ b/etemplate/setup/phpgw_en.lang @@ -63,12 +63,17 @@ closes the window without saving the changes etemplate en closes the window with column... etemplate en Column... columnname etemplate en ColumnName comment etemplate en Comment +confirm etemplate en confirm +confirmation message or custom javascript (returning true or false) etemplate en confirmation message or custom javascript (returning true or false) +confirmation necesary or custom java-script etemplate en confirmation necesary or custom java-script create a new table for the application etemplate en Create a new table for the application creates an english ('en') langfile from label and helptexts (for application in name) etemplate en creates an english ('en') langfile from label and helptexts (for application in Name) css class for the table-tag etemplate en CSS class for the table-tag +css properties etemplate en CSS properties css-class name for this row, preset: 'nmh' = nextmatch header, 'nmr' = alternating nm row, 'nmr0'+'nmr1' nm rows etemplate en CSS-class name for this row, preset: 'nmh' = NextMatch header, 'nmr' = alternating NM row, 'nmr0'+'nmr1' NM rows css-class name for this row, preset: 'th' = header, 'row' = alternating row, 'row_off'+'row_on' rows etemplate en CSS-class name for this row, preset: 'th' = header, 'row' = alternating row, 'row_off'+'row_on' rows css-styles etemplate en CSS-styles +custom etemplate en custom cut etemplate en Cut date+time etemplate en Date+Time datum etemplate en Datum @@ -214,12 +219,14 @@ no file etemplate en no file no filename given or selected via browse... etemplate en no filename given or selected via Browse... no row to swap with !!! etemplate en no row to swap with !!! not null etemplate en NOT NULL +nothing etemplate en nothing nothing found - try again !!! etemplate en Nothing found - try again !!! nothing in clipboard to paste !!! etemplate en nothing in clipboard to paste !!! nothing matched search criteria !!! etemplate en Nothing matched search criteria !!! number of colums the field/cell should span or 'all' for the remaining columns, css-class name (for the td tag) etemplate en number of colums the field/cell should span or 'all' for the remaining columns, CSS-class name (for the TD tag) number of rows/cols in a v/hbox, cellpadding, cellspacing etemplate en number of rows/cols in a V/HBox, Cellpadding, Cellspacing of etemplate en of +onclick etemplate en onClick only an other version found !!! etemplate en only an other Version found !!! optional note about the link etemplate en optional note about the Link options etemplate en Options @@ -319,7 +326,7 @@ unlink etemplate en Unlink update a single entry by passing the fields. etemplate en Update a single entry by passing the fields. update from version '%s' to etemplate en Update from Version '%s' to upload etemplate en Upload -valign etemplate en Valign +valign etemplate en vAlign value etemplate en Value value has to be at least '%1' !!! etemplate en Value has to be at least '%1' !!! value has to be at maximum '%1' !!! etemplate en Value has to be at maximum '%1' !!! From c0bed5e88ef85f49bc1332fa60faaf781cde8c80 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 20 Feb 2005 21:47:14 +0000 Subject: [PATCH 006/111] added escaping of onclick for buttons --- phpgwapi/inc/class.html.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index f3549f1f96..059168c3a0 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -554,8 +554,8 @@ htmlareaConfig_'.$id.'.editorURL = '."'$this->phpgwapi_js_url/htmlarea/';"; $accesskey = ''; $label_u = $label; } - if ($onClick) $options .= " onclick=\"$onClick\""; - + if ($onClick) $options .= ' onclick="'.str_replace('"','\\"',$onClick).'"'; + //