mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
check if application of template has a app.js file
--> load it
This commit is contained in:
parent
28618da875
commit
dcce79d92a
@ -499,6 +499,11 @@ class editor
|
||||
{
|
||||
$new_content['onclick'] .= html::style('@import url('.$GLOBALS['egw_info']['server']['webserver_url'].'/'.$app.'/templates/default/app.css);');
|
||||
}
|
||||
// check if application of template has a app.js file --> load it
|
||||
if (file_exists(EGW_SERVER_ROOT.'/'.$app.'/js/app.js'))
|
||||
{
|
||||
$GLOBALS['egw']->js->validate_file('.','app',$app,false);
|
||||
}
|
||||
$editor->data[$editor->rows]['A']['obj'] = &$this->etemplate;
|
||||
$vals = $content['vals'];
|
||||
$olds = $content['olds'];
|
||||
|
@ -211,6 +211,12 @@ class etemplate extends boetemplate
|
||||
{
|
||||
$GLOBALS['egw']->translation->add_app('etemplate'); // some extensions have own texts
|
||||
}
|
||||
// check if application of template has a app.js file --> load it
|
||||
list($app) = explode('.',$this->name);
|
||||
if (file_exists(EGW_SERVER_ROOT.'/'.$app.'/js/app.js'))
|
||||
{
|
||||
$GLOBALS['egw']->js->validate_file('.','app',$app,false);
|
||||
}
|
||||
// use different form-names to allows multiple eTemplates in one page, eg. addressbook-view
|
||||
self::$name_form = 'eTemplate';
|
||||
if (in_array(self::$name_form,self::$name_forms))
|
||||
|
Loading…
Reference in New Issue
Block a user