mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-18 11:58:24 +01:00
Automatically send widget attribute changes made while processing an ajax submit.
(App code can return without calling exec() to avoid re-rendering the whole thing)
This commit is contained in:
parent
0c87bd63e7
commit
1e786ec974
@ -307,7 +307,11 @@ class etemplate_widget
|
|||||||
{
|
{
|
||||||
// Fall back to widget class, we can not ignore it, as the widget may contain other widgets
|
// Fall back to widget class, we can not ignore it, as the widget may contain other widgets
|
||||||
$class_name = 'etemplate_widget';
|
$class_name = 'etemplate_widget';
|
||||||
//trigger_error("Could not find a class for $type, using $class_name", E_USER_NOTICE);
|
// Don't warn about these known missing ones
|
||||||
|
if (!in_array($type, array('styles','menulist','tabs','tab','tabpanels','html')))
|
||||||
|
{
|
||||||
|
trigger_error("Could not find a class for $type, using $class_name", E_USER_NOTICE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -862,6 +866,16 @@ class etemplate_widget
|
|||||||
public function &setElementAttribute($name,$attr,$val)
|
public function &setElementAttribute($name,$attr,$val)
|
||||||
{
|
{
|
||||||
$ref =& self::$request->modifications[$name][$attr];
|
$ref =& self::$request->modifications[$name][$attr];
|
||||||
|
if(self::$request && self::$response && $val != $this->attrs[$attr])
|
||||||
|
{
|
||||||
|
// In an AJAX response - automatically add
|
||||||
|
self::$response->generic('assign',array(
|
||||||
|
'etemplate_exec_id' => self::$request->id(),
|
||||||
|
'id' => $name,
|
||||||
|
'key' => $attr,
|
||||||
|
'value' => $val
|
||||||
|
));
|
||||||
|
}
|
||||||
$this->attrs[$attr] = $val;
|
$this->attrs[$attr] = $val;
|
||||||
if (!is_null($val)) $ref = $val;
|
if (!is_null($val)) $ref = $val;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user