mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 03:41:53 +02: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
db60d3cfa9
commit
b81f663ec4
@ -152,6 +152,16 @@ var et2_widget = (function(){ "use strict"; return ClassWithAttributes.extend(
|
|||||||
*/
|
*/
|
||||||
"readonly": {
|
"readonly": {
|
||||||
"ignore": true
|
"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 = {};
|
_attrs = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_attrs.attributes)
|
||||||
|
{
|
||||||
|
jQuery.extend(_attrs, _attrs.attributes);
|
||||||
|
}
|
||||||
// Initialize all important parameters
|
// Initialize all important parameters
|
||||||
this._mgrs = {};
|
this._mgrs = {};
|
||||||
this._inst = null;
|
this._inst = null;
|
||||||
|
@ -410,7 +410,14 @@ class mail_hooks
|
|||||||
'label' => 'Toggled on actions',
|
'label' => 'Toggled on actions',
|
||||||
'help' => 'List of actions to be switched/activated on by default',
|
'help' => 'List of actions to be switched/activated on by default',
|
||||||
'name' => 'toggledOnActions',
|
'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']);
|
if (!$GLOBALS['egw_info']['apps']['stylite']) unset($settingsArray['attachVCardAtCompose']);
|
||||||
|
@ -451,6 +451,7 @@ class preferences_settings
|
|||||||
'help' => lang($setting['help']), // is html
|
'help' => lang($setting['help']), // is html
|
||||||
'default' => (string)$default !== '' ? lang('Default').': '.$default : null,
|
'default' => (string)$default !== '' ? lang('Default').': '.$default : null,
|
||||||
'onchange' => $setting['onchange'],
|
'onchange' => $setting['onchange'],
|
||||||
|
'attributes' => $setting['attributes']
|
||||||
);
|
);
|
||||||
//error_log("appname=$appname, attribute=$attribute, setting=".array2string($setting));
|
//error_log("appname=$appname, attribute=$attribute, setting=".array2string($setting));
|
||||||
$content[$tab][$setting['name']] = $GLOBALS['egw']->preferences->{$attribute}[$appname][$setting['name']];
|
$content[$tab][$setting['name']] = $GLOBALS['egw']->preferences->{$attribute}[$appname][$setting['name']];
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<description for="@${row}[name]" id="${row}[label]"/>
|
<description for="@${row}[name]" id="${row}[label]"/>
|
||||||
</box>
|
</box>
|
||||||
<box class="prefValueColumn">
|
<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"/>
|
<description id="${row}[default]" no_lang="1" class="prefDefault"/>
|
||||||
</box>
|
</box>
|
||||||
<box class="prefHelpColumn">
|
<box class="prefHelpColumn">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user