diff --git a/etemplate/inc/class.bo_tracking.inc.php b/etemplate/inc/class.bo_tracking.inc.php index e78372b4eb..f93ae883a3 100644 --- a/etemplate/inc/class.bo_tracking.inc.php +++ b/etemplate/inc/class.bo_tracking.inc.php @@ -640,7 +640,7 @@ abstract class bo_tracking $notification = new notifications(); $notification->set_receivers(array($receiver)); $notification->set_message($this->get_body(false,$data,$old,false,$receiver)); // set message as plaintext - $notification->set_message($this->get_body(true,$data,$old,false,$receiver)); // and html + $notification->set_message($this->get_body(true,$data,$old,true,$receiver)); // and html $notification->set_sender($this->get_sender($data,$old,true,$receiver)); $notification->set_subject($this->get_subject($data,$old,$deleted,$receiver)); $notification->set_links(array($this->get_notification_link($data,$old,$receiver))); diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 79c426db69..fa025ba8bf 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -25,7 +25,12 @@ * * etemplate or uietemplate extends boetemplate, all vars and public functions are inherited */ -class etemplate extends boetemplate +//* +//$GLOBALS['egw_info']['flags']['js_link_registry'] = true; +class etemplate extends etemplate_new{} +class etemplate_old extends boetemplate +//*/ +//class etemplate extends boetemplate { /** * integer debug-level or template-name or cell-type or '' = off diff --git a/etemplate/inc/class.etemplate_new.inc.php b/etemplate/inc/class.etemplate_new.inc.php index 5e85c13287..f03f8794ae 100644 --- a/etemplate/inc/class.etemplate_new.inc.php +++ b/etemplate/inc/class.etemplate_new.inc.php @@ -135,6 +135,8 @@ class etemplate_new extends etemplate_widget_template // not sure if we want to handle it this way, thought otherwise we will have a few ajax request for each dialog fetching predefined selectboxes $template = etemplate_widget_template::instance($this->name, $this->template_set, $this->version, $this->laod_via); $template->run('beforeSendToClient'); +error_log('-------------'); +error_log(array2string($sel_options)); $data = array( 'etemplate_exec_id' => self::$request->id(), diff --git a/etemplate/inc/class.etemplate_widget_customfields.inc.php b/etemplate/inc/class.etemplate_widget_customfields.inc.php index 3116a59283..bc4f81c333 100644 --- a/etemplate/inc/class.etemplate_widget_customfields.inc.php +++ b/etemplate/inc/class.etemplate_widget_customfields.inc.php @@ -136,7 +136,7 @@ class etemplate_widget_customfields extends etemplate_widget_transformer } } // check if name refers to a single custom field --> show only that - if (($pos=strpos($form_name,$this->prefix)) !== false && // allow the prefixed name to be an array index too + if (($pos=strpos($form_name,self::$prefix)) !== false && // allow the prefixed name to be an array index too preg_match("/$this->prefix([^\]]+)/",$form_name,$matches) && isset($fields[$name=$matches[1]])) { $fields = array($name => $fields[$name]); @@ -145,6 +145,7 @@ class etemplate_widget_customfields extends etemplate_widget_transformer $form_name = substr($form_name,0,-strlen("[$this->prefix$name]")); } + if(!is_array($fields)) $fields = array(); switch($type = $this->type) { case 'customfields-types': diff --git a/etemplate/inc/class.etemplate_widget_tree.inc.php b/etemplate/inc/class.etemplate_widget_tree.inc.php index 4234a5350d..dcf7b13251 100644 --- a/etemplate/inc/class.etemplate_widget_tree.inc.php +++ b/etemplate/inc/class.etemplate_widget_tree.inc.php @@ -76,7 +76,7 @@ class etemplate_widget_tree extends etemplate_widget } $valid =& self::get_array($validated, $form_name, true); $valid = $value; - error_log(__METHOD__."() $form_name: ".array2string($value_in).' --> '.array2string($value).', allowed='.array2string($allowed)); + //error_log(__METHOD__."() $form_name: ".array2string($value_in).' --> '.array2string($value).', allowed='.array2string($allowed)); } } @@ -203,7 +203,7 @@ class etemplate_widget_tree extends etemplate_widget $cat2path[$cat['id']] = $path = ($cat['parent'] ? $cat2path[$cat['parent']].'/' : '').(string)$cat['id']; // 1D array - $options[$cat['id']] = $cat + array('text' => $cat['name'], 'path' => $path); + $options[$cat['id']] = $cat + array('text' => $s, 'path' => $path); // Tree in array //$options[$cat['parent']][] = $cat; diff --git a/etemplate/js/et2_widget_button.js b/etemplate/js/et2_widget_button.js index 1773941773..c7a1d5c33f 100644 --- a/etemplate/js/et2_widget_button.js +++ b/etemplate/js/et2_widget_button.js @@ -202,7 +202,12 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], { { this.options.onclick = _values["onclick"]; } + var type = this._type + var attrs = jQuery.extend(_values, this.options); + var parent = this._parent; jQuery(this.getDOMNode()).bind("click.et2_baseWidget", this, function(e) { + var widget = et2_createWidget(type,attrs,parent); + e.data = widget; e.data.set_id(_values["id"]); return e.data.click.call(e.data,e); }); diff --git a/etemplate/js/test/test_xml.html b/etemplate/js/test/test_xml.html index 9981e2500f..567f6885f3 100644 --- a/etemplate/js/test/test_xml.html +++ b/etemplate/js/test/test_xml.html @@ -2,6 +2,33 @@ ET2 - Test + @@ -136,9 +163,10 @@
[Just here to test the dynheight component...]