mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
fixed a few errors in the etemplate editor
This commit is contained in:
parent
186d0ad967
commit
add5646e48
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* eGroupWare EditableTemplates - Business Objects
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||
* @copyright 2002-8 by RalfBecker@outdoor-training.de
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package etemplate
|
||||
* @subpackage api
|
||||
* @version $Id$
|
||||
*/
|
||||
* eGroupWare EditableTemplates - Business Objects
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||
* @copyright 2002-8 by RalfBecker@outdoor-training.de
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package etemplate
|
||||
* @subpackage api
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Business Object for eTemplates, extending the Storage Object
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,36 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* eGroupWare EditableTemplates - Storage Objects
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package etemplate
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||
* @version $Id$
|
||||
*/
|
||||
* eGroupWare EditableTemplates - Storage Objects
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||
* @copyright 2002-8 by RalfBecker@outdoor-training.de
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package etemplate
|
||||
* @subpackage api
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Storage Objects: Everything to store and retrive and eTemplate.
|
||||
*
|
||||
* eTemplates are stored in the db in table 'phpgw_etemplate' and gets distributed
|
||||
* through the file 'etemplates.inc.php' in the setup dir of each app. That file gets
|
||||
* automatically imported in the db, whenever you show a eTemplate of the app. For
|
||||
* performace reasons the timestamp of the file is stored in the db, so 'new'
|
||||
* eTemplates need to have a newer file. The distribution-file is generated with the
|
||||
* function dump, usually by pressing a button in the editor.
|
||||
* writeLangFile writes an lang-file with all Labels, incorporating an existing one.
|
||||
* Beside a name eTemplates use the following keys to find the most suitable template
|
||||
* for an user (in order of precedence):
|
||||
* 1) User-/Group-Id (not yet implemented)
|
||||
* 2) preferd languages of the user (templates for all langs have $lang='')
|
||||
* 3) selected template: verdilak, ... (the default is called '' in the db, not default)
|
||||
* 4) a version-number of the form, eg: '0.9.13.001' (filled up with 0 same size)
|
||||
*
|
||||
* @package etemplate
|
||||
* @subpackage api
|
||||
* @author RalfBecker-AT-outdoor-training.de
|
||||
* @license GPL
|
||||
*/
|
||||
* Storage Objects: Everything to store and retrive and eTemplate.
|
||||
*
|
||||
* eTemplates are stored in the db in table 'phpgw_etemplate' and gets distributed
|
||||
* through the file 'etemplates.inc.php' in the setup dir of each app. That file gets
|
||||
* automatically imported in the db, whenever you show a eTemplate of the app. For
|
||||
* performace reasons the timestamp of the file is stored in the db, so 'new'
|
||||
* eTemplates need to have a newer file. The distribution-file is generated with the
|
||||
* function dump, usually by pressing a button in the editor.
|
||||
* writeLangFile writes an lang-file with all Labels, incorporating an existing one.
|
||||
* Beside a name eTemplates use the following keys to find the most suitable template
|
||||
* for an user (in order of precedence):
|
||||
* 1) User-/Group-Id (not yet implemented)
|
||||
* 2) preferd languages of the user (templates for all langs have $lang='')
|
||||
* 3) selected template: verdilak, ... (the default is called '' in the db, not default)
|
||||
* 4) a version-number of the form, eg: '0.9.13.001' (filled up with 0 same size)
|
||||
*/
|
||||
class soetemplate
|
||||
{
|
||||
var $debug; // =1 show some debug-messages, = 'app.name' show messages only for eTemplate 'app.name'
|
||||
|
@ -81,6 +81,13 @@ class etemplate extends boetemplate
|
||||
* @var boolean
|
||||
*/
|
||||
var $sitemgr=false;
|
||||
/**
|
||||
* Javascript to be called, when a widget get's double-clicked (used only by the editor)
|
||||
* A '%p' gets replace with the colon ':' separated template-name, -version and path of the clicked widget.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $onclick_handler;
|
||||
|
||||
/**
|
||||
* constructor of etemplate class, reads an eTemplate if $name is given
|
||||
@ -955,7 +962,7 @@ class etemplate extends boetemplate
|
||||
{
|
||||
if ($this->debug && (is_int($this->debug) && $this->debug >= 3 || $this->debug == $cell['type']))
|
||||
{
|
||||
echo "<p>etemplate.show_cell($this->name,name='${cell['name']}',type='${cell['type']}',cname='$cname')</p>\n";
|
||||
echo "<p>etemplate.show_cell($this->name,name='${cell['name']}',type='${cell['type']}',cname='$cname',...,'$path')</p>\n";
|
||||
}
|
||||
list($span) = explode(',',$cell['span']); // evtl. overriten later for type template
|
||||
|
||||
@ -1742,7 +1749,7 @@ class etemplate extends boetemplate
|
||||
}
|
||||
// generate an extra div, if we have an onclick handler and NO children or it's an extension
|
||||
//echo "<p>$this->name($this->onclick_handler:$this->no_onclick:$this->onclick_proxy): $cell[type]/$cell[name]</p>\n";
|
||||
if ($this->onclick_handler && !isset($this->widgets_with_children[$cell['type']]))
|
||||
if ($this->onclick_handler && !isset(self::$widgets_with_children[$cell['type']]))
|
||||
{
|
||||
$handler = str_replace('%p',$this->no_onclick ? $this->onclick_proxy : $this->name.':'.$this->version.':'.$path,
|
||||
$this->onclick_handler);
|
||||
|
Loading…
Reference in New Issue
Block a user