mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-17 10:51:38 +01:00
* Mail: Fix mail display and compose open in full height
-commits r49335, r49336, r49339, and r49340.
This commit is contained in:
parent
e24bf5ed50
commit
ca2b56979c
@ -77,26 +77,23 @@ class mail_hooks
|
|||||||
'menuaction' => 'mail.mail_ui.displayMessage',
|
'menuaction' => 'mail.mail_ui.displayMessage',
|
||||||
),
|
),
|
||||||
'view_id' => 'id',
|
'view_id' => 'id',
|
||||||
'view_popup' => '870xegw_getWindowOuterHeight()',
|
'view_popup' => '870xavailHeight',
|
||||||
//'view_popup' => '870x800',
|
|
||||||
'view_list' => 'mail.mail_ui.index',
|
'view_list' => 'mail.mail_ui.index',
|
||||||
'add' => array(
|
'add' => array(
|
||||||
'menuaction' => 'mail.mail_compose.compose',
|
'menuaction' => 'mail.mail_compose.compose',
|
||||||
),
|
),
|
||||||
//'add_popup' => '870xegw_getWindowOuterHeight()',
|
'add_popup' => '870xavailHeight',
|
||||||
'add_popup' => '870x800',
|
|
||||||
'edit' => array(
|
'edit' => array(
|
||||||
'menuaction' => 'mail.mail_compose.compose',
|
'menuaction' => 'mail.mail_compose.compose',
|
||||||
),
|
),
|
||||||
'edit_id' => 'id',
|
'edit_id' => 'id',
|
||||||
//'edit_popup' => '870xegw_getWindowOuterHeight()',
|
'edit_popup' => '870xavailHeight',
|
||||||
'edit_popup' => '870x800',
|
|
||||||
// register mail as handler for .eml files
|
// register mail as handler for .eml files
|
||||||
'mime' => array(
|
'mime' => array(
|
||||||
'message/rfc822' => array(
|
'message/rfc822' => array(
|
||||||
'menuaction' => 'mail.mail_ui.importMessageFromVFS2DraftAndDisplay',
|
'menuaction' => 'mail.mail_ui.importMessageFromVFS2DraftAndDisplay',
|
||||||
'mime_url' => 'formData[file]',
|
'mime_url' => 'formData[file]',
|
||||||
'mime_popup' => '870xegw_getWindowOuterHeight()',
|
'mime_popup' => '870xavailHeight',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'entry' => 'Mail',
|
'entry' => 'Mail',
|
||||||
|
@ -164,23 +164,9 @@ app.classes.mail = AppJS.extend(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'mail.display':
|
case 'mail.display':
|
||||||
var subject = this.et2.getWidgetById('mail_displaysubject');
|
|
||||||
var body = this.et2.getWidgetById('mailDisplayBodySrc');
|
|
||||||
this.mail_isMainWindow = false;
|
this.mail_isMainWindow = false;
|
||||||
this.mail_display();
|
this.mail_display();
|
||||||
body.node.parentNode.style.top=subject.node.offsetTop+40+'px';
|
|
||||||
var app_registry = egw.link_get_registry('mail');
|
|
||||||
var w=870;
|
|
||||||
if (typeof app_registry['view'] != 'undefined' && typeof app_registry['view_popup'] != 'undefined' )
|
|
||||||
{
|
|
||||||
var w_h =app_registry['view_popup'].split('x');
|
|
||||||
if (w_h[1] == 'egw_getWindowOuterHeight()')
|
|
||||||
{
|
|
||||||
w_h[1] = (screen.availHeight>egw_getWindowOuterHeight()?screen.availHeight:egw_getWindowOuterHeight());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
window.resizeTo((w_h[0]?w_h[0]:870),(w_h[1]?w_h[1]:(screen.availHeight>egw_getWindowOuterHeight()?screen.availHeight:egw_getWindowOuterHeight())));
|
|
||||||
|
|
||||||
// Register attachments for drag
|
// Register attachments for drag
|
||||||
this.register_for_drag(
|
this.register_for_drag(
|
||||||
this.et2.getArrayMgr("content").getEntry('mail_id'),
|
this.et2.getArrayMgr("content").getEntry('mail_id'),
|
||||||
|
@ -521,7 +521,7 @@ div.mail-compose_fileselector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#mail-display, #mail-compose {
|
#mail-display, #mail-compose {
|
||||||
min-height: 500px;
|
min-height: 768px;
|
||||||
}
|
}
|
||||||
.mailDisplayContainer, .mailDisplayAttachments {
|
.mailDisplayContainer, .mailDisplayAttachments {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -521,7 +521,7 @@ div.mail-compose_fileselector {
|
|||||||
}
|
}
|
||||||
#mail-display,
|
#mail-display,
|
||||||
#mail-compose {
|
#mail-compose {
|
||||||
min-height: 500px;
|
min-height: 768px;
|
||||||
}
|
}
|
||||||
.mailDisplayContainer,
|
.mailDisplayContainer,
|
||||||
.mailDisplayAttachments {
|
.mailDisplayAttachments {
|
||||||
@ -976,7 +976,7 @@ div#mail-index div#mail-index_mailPreview div#mail-index_mailPreviewHeadersSubje
|
|||||||
}
|
}
|
||||||
#mail-compose {
|
#mail-compose {
|
||||||
width: 870px;
|
width: 870px;
|
||||||
min-height: 500px;
|
min-height: 768px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
/*// ###############################################################################*/
|
/*// ###############################################################################*/
|
||||||
/*// Mail Header*/
|
/*// Mail Header*/
|
||||||
@ -1470,7 +1470,7 @@ div#mail-index div#mail-index_mailPreview div#mail-index_mailPreviewHeadersSubje
|
|||||||
*/
|
*/
|
||||||
#mail-display {
|
#mail-display {
|
||||||
width: 870px;
|
width: 870px;
|
||||||
min-height: 500px;
|
min-height: 768px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
/*.mailDisplayHeaderSection{*/
|
/*.mailDisplayHeaderSection{*/
|
||||||
/*top: 0;*/
|
/*top: 0;*/
|
||||||
|
@ -332,7 +332,7 @@ div#mail-index{
|
|||||||
#mail-compose{
|
#mail-compose{
|
||||||
// gesamtbreite
|
// gesamtbreite
|
||||||
width: 870px;
|
width: 870px;
|
||||||
min-height: 500px;
|
min-height: 768px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
|
||||||
|
|
||||||
@ -667,7 +667,7 @@ div#mail-index{
|
|||||||
#mail-display{
|
#mail-display{
|
||||||
// gesamtbreite
|
// gesamtbreite
|
||||||
width: 870px;
|
width: 870px;
|
||||||
min-height: 500px;
|
min-height: 768px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
|
||||||
/*.mailDisplayHeaderSection{*/
|
/*.mailDisplayHeaderSection{*/
|
||||||
|
@ -235,6 +235,10 @@
|
|||||||
// to take padding/margin into account
|
// to take padding/margin into account
|
||||||
var delta_width = w.width - ($et2.outerWidth(true) + ($main_div.outerWidth(true) - $main_div.width()));
|
var delta_width = w.width - ($et2.outerWidth(true) + ($main_div.outerWidth(true) - $main_div.width()));
|
||||||
var delta_height = w.height - ($et2.outerHeight(true) + ($main_div.outerHeight(true) - $main_div.height()));
|
var delta_height = w.height - ($et2.outerHeight(true) + ($main_div.outerHeight(true) - $main_div.height()));
|
||||||
|
if (delta_height && egw_getWindowOuterHeight() >= egw.availHeight())
|
||||||
|
{
|
||||||
|
delta_height = 0;
|
||||||
|
}
|
||||||
if(delta_width != 0 || delta_height != 0)
|
if(delta_width != 0 || delta_height != 0)
|
||||||
{
|
{
|
||||||
window.resizeTo(egw_getWindowOuterWidth() - delta_width,egw_getWindowOuterHeight() - delta_height);
|
window.resizeTo(egw_getWindowOuterWidth() - delta_width,egw_getWindowOuterHeight() - delta_height);
|
||||||
|
@ -279,7 +279,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
|
|||||||
if (_popup)
|
if (_popup)
|
||||||
{
|
{
|
||||||
var w_h = _popup.split('x');
|
var w_h = _popup.split('x');
|
||||||
if (w_h[1] == 'egw_getWindowOuterHeight()') w_h[1] = egw_getWindowOuterHeight();
|
if (w_h[1] == 'availHeight') w_h[1] = this.availHeight();
|
||||||
var popup_window = _wnd.egw_openWindowCentered2(url, _target || '_blank', w_h[0], w_h[1], false, _target_app, true);
|
var popup_window = _wnd.egw_openWindowCentered2(url, _target || '_blank', w_h[0], w_h[1], false, _target_app, true);
|
||||||
|
|
||||||
// Remember which windows are open
|
// Remember which windows are open
|
||||||
@ -303,6 +303,14 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get available height of screen
|
||||||
|
*/
|
||||||
|
availHeight: function()
|
||||||
|
{
|
||||||
|
return screen.availHeight < screen.height ? screen.availHeight : screen.height - 100;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use frameworks (framed template) link handler to open a url
|
* Use frameworks (framed template) link handler to open a url
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user