From c1b1453108cf9921130f5f140654cb442c55e5db Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 5 Oct 2006 08:49:09 +0000 Subject: [PATCH] - for extensions also trying an extension-specific template-name - fixed not correct set template after a type change --- etemplate/inc/class.editor.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.editor.inc.php b/etemplate/inc/class.editor.inc.php index e856c1d508..7ce58f20ef 100644 --- a/etemplate/inc/class.editor.inc.php +++ b/etemplate/inc/class.editor.inc.php @@ -1189,6 +1189,10 @@ $msg .= $this->column_actions($action,$parent,$child_id); break; + case '': // reload, eg. by changing the type + $widget = $content['cell']; + break; + default: // all menu's are (only) working on the parent, referencing widget is unnecessary // and gives unexpected results, if parent is changed (eg. content gets copied) @@ -1310,7 +1314,10 @@ $editor =& new etemplate('etemplate.editor.widget'); $type_tmpl =& new etemplate; - if ($type_tmpl->read('etemplate.editor.widget.'.$widget['type'])) + + list($ext_type) = explode('-',$widget['type']); + if ($type_tmpl->read('etemplate.editor.widget.'.$widget['type']) || + $type_tmpl->read('etemplate.editor.widget.'.$ext_type)) { $editor->set_cell_attribute('etemplate.editor.widget.generic','obj',$type_tmpl); }