mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
* Mail/Admin: Fix upload picture into mail signature from editor image browser does not work.
This commit is contained in:
parent
500674bf3a
commit
594bd63181
@ -318,7 +318,20 @@ jQuery.extend(et2_htmlarea,
|
||||
buildVfsSelectForCKEditor: function(_data)
|
||||
{
|
||||
if (!_data) return;
|
||||
var et2 = app[egw(window).app_name()].et2;
|
||||
|
||||
// Don't rely only on app_name to fetch et2 object as app_name may not
|
||||
// always represent current app of the window, e.g.: mail admin account.
|
||||
// Try to fetch et2 from its template name.
|
||||
var etemplate = jQuery('form').data('etemplate');
|
||||
var et2 = {};
|
||||
if (etemplate && etemplate.name && !app[egw(window).app_name()])
|
||||
{
|
||||
et2 = etemplate2.getByTemplate(etemplate.name)[0]['widgetContainer'];
|
||||
}
|
||||
else
|
||||
{
|
||||
et2 = app[egw(window).app_name()].et2;
|
||||
}
|
||||
|
||||
var vfsSelect = et2_createWidget('vfs-select', {
|
||||
id:'upload',
|
||||
|
@ -1064,10 +1064,25 @@ var et2_vfsSelect = (function(){ "use strict"; return et2_inputWidget.extend(
|
||||
resizable: false
|
||||
}, et2_dialog._create_parent('api'));
|
||||
this.dialog.template.uniqueId = 'api.vfsSelectUI';
|
||||
|
||||
// Don't rely only on app_name to fetch et2 object as app_name may not
|
||||
// always represent current app of the window, e.g.: mail admin account.
|
||||
// Try to fetch et2 from its template name.
|
||||
var etemplate = jQuery('form').data('etemplate');
|
||||
var et2 = {};
|
||||
if (etemplate && etemplate.name && !app[egw(window).app_name()])
|
||||
{
|
||||
et2 = etemplate2.getByTemplate(etemplate.name)[0]
|
||||
}
|
||||
else
|
||||
{
|
||||
et2 = etemplate2.getByApplication(egw(window).app_name())[0];
|
||||
}
|
||||
// we need an etemplate_exec_id for better handling serverside parts of
|
||||
// widgets and since we can not have a etemplate_exec_id specifically
|
||||
// for dialog template our best shot is to inherit its parent etemplate_exec_id.
|
||||
this.dialog.template.etemplate_exec_id = etemplate2.getByApplication(egw(window).app_name())[0].etemplate_exec_id;
|
||||
this.dialog.template.etemplate_exec_id = et2.etemplate_exec_id;
|
||||
|
||||
app.vfsSelectUI.et2 = this.dialog.template.widgetContainer;
|
||||
// Keep the dialog always at the top, seems CKEDITOR dialogs have very
|
||||
// high z-index set.
|
||||
|
@ -259,8 +259,9 @@ class CkEditorConfig
|
||||
private static function get_filebrowserBrowseUrl($start_path = '')
|
||||
{
|
||||
// Still need to treat old etemplate app to use filemanager_select.
|
||||
// *Admin: admin app also still have some old etmplate apps like login_message.
|
||||
// @TODO: this should be removed when we don't have any old etemplate app anymore.
|
||||
if (in_array($GLOBALS['app'], array('phpbrain', 'sitemgr')))
|
||||
if (in_array($GLOBALS['app'], array('phpbrain', 'sitemgr', 'admin')))
|
||||
{
|
||||
return $GLOBALS['egw_info']['server']['webserver_url'].'/index.php?menuaction=filemanager.filemanager_select.select&mode=open&method=ckeditor_return'
|
||||
.($start_path != '' ? '&path='.$start_path : '');
|
||||
|
Loading…
Reference in New Issue
Block a user