mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Set the action default for dropdown actions
This commit is contained in:
parent
5129750d2e
commit
1ad841f9d8
@ -245,10 +245,20 @@ var et2_toolbar = et2_DOMWidget.extend([et2_IInput],
|
||||
var dropdown = et2_createWidget("dropdown_button", {
|
||||
id: action.id
|
||||
},this);
|
||||
|
||||
|
||||
dropdown.set_select_options(children);
|
||||
dropdown.set_label (action.caption);
|
||||
|
||||
//Set default selected action
|
||||
if (typeof action.children !='undefined')
|
||||
{
|
||||
for (var child in action.children)
|
||||
{
|
||||
if(action.children[child].default)
|
||||
{
|
||||
dropdown.set_label(action.children[child].caption);
|
||||
}
|
||||
}
|
||||
}
|
||||
dropdown.set_image (action.iconUrl||'');
|
||||
dropdown.onchange = jQuery.proxy(function(selected, dropdown)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user