mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
Add new attributes into core widget in order to be able to set widget->type attributes in preferences
This commit is contained in:
parent
b64d96f3de
commit
36726c7400
@ -152,6 +152,16 @@ var et2_widget = (function(){ "use strict"; return ClassWithAttributes.extend(
|
||||
*/
|
||||
"readonly": {
|
||||
"ignore": true
|
||||
},
|
||||
|
||||
/**
|
||||
* Widget's attributes
|
||||
*/
|
||||
attributes: {
|
||||
"name": "Widget attributes",
|
||||
"type": "any",
|
||||
"ignore": true,
|
||||
"description": "Object of widget attributes"
|
||||
}
|
||||
},
|
||||
|
||||
@ -188,6 +198,10 @@ var et2_widget = (function(){ "use strict"; return ClassWithAttributes.extend(
|
||||
_attrs = {};
|
||||
}
|
||||
|
||||
if (_attrs.attributes)
|
||||
{
|
||||
jQuery.extend(_attrs, _attrs.attributes);
|
||||
}
|
||||
// Initialize all important parameters
|
||||
this._mgrs = {};
|
||||
this._inst = null;
|
||||
|
@ -411,7 +411,14 @@ class mail_hooks
|
||||
'label' => 'Toggled on actions',
|
||||
'help' => 'List of actions to be switched/activated on by default',
|
||||
'name' => 'toggledOnActions',
|
||||
'values' => $toggledOnActions
|
||||
'values' => '',
|
||||
'attributes' => array(
|
||||
'allowFreeEntries' => false,
|
||||
//'multiple' => 'toggle',
|
||||
'editModeEnabled' => false,
|
||||
'autocomplete_url' => ' ',
|
||||
'select_options' => $toggledOnActions
|
||||
)
|
||||
)
|
||||
);
|
||||
if (!$GLOBALS['egw_info']['apps']['stylite']) unset($settingsArray['attachVCardAtCompose']);
|
||||
|
@ -451,6 +451,7 @@ class preferences_settings
|
||||
'help' => lang($setting['help']), // is html
|
||||
'default' => (string)$default !== '' ? lang('Default').': '.$default : null,
|
||||
'onchange' => $setting['onchange'],
|
||||
'attributes' => $setting['attributes']
|
||||
);
|
||||
//error_log("appname=$appname, attribute=$attribute, setting=".array2string($setting));
|
||||
$content[$tab][$setting['name']] = $GLOBALS['egw']->preferences->{$attribute}[$appname][$setting['name']];
|
||||
|
@ -15,7 +15,7 @@
|
||||
<description for="@${row}[name]" id="${row}[label]"/>
|
||||
</box>
|
||||
<box class="prefValueColumn">
|
||||
<widget type="@${row}[type]" id="@${row}[name]" onchange="@${row}[onchange]" no_lang="1" class="prefValue"/>
|
||||
<widget type="@${row}[type]" id="@${row}[name]" onchange="@${row}[onchange]" no_lang="1" class="prefValue" attributes="@${row}[attributes]"/>
|
||||
<description id="${row}[default]" no_lang="1" class="prefDefault"/>
|
||||
</box>
|
||||
<box class="prefHelpColumn">
|
||||
|
Loading…
Reference in New Issue
Block a user