Implement to select own_src radio-button option automatically when upload a file in resources edit popup

This commit is contained in:
Hadi Nategh 2014-03-18 13:38:38 +00:00
parent 77579f364f
commit 76f84c4378
2 changed files with 14 additions and 1 deletions

View File

@ -111,5 +111,18 @@ app.classes.resources = AppJS.extend(
this.egw.open_link('calendar.calendar_uiforms.edit&participants=r'+res_ids.join(',r'),'_blank','700x700'); this.egw.open_link('calendar.calendar_uiforms.edit&participants=r'+res_ids.join(',r'),'_blank','700x700');
}, },
/**
* set the picture_src to own_src by uploding own file
*
*/
select_picture_src: function ()
{
var rBtn = this.et2.getWidgetById('picture_src');
if (typeof rBtn != 'undefined')
{
rBtn.set_value('own_src');
}
},
}); });

View File

@ -61,7 +61,7 @@
</row> </row>
<row> <row>
<description/> <description/>
<file id="own_file" class="resources_pictureFile et2_fullWidth"/> <file id="own_file" class="resources_pictureFile et2_fullWidth" onchange="app.resources.select_picture_src"/>
</row> </row>
</rows> </rows>
</grid> </grid>