forked from extern/egroupware
next (little) step for sharing files
This commit is contained in:
parent
f7610cd6d6
commit
03ea6d9294
@ -176,13 +176,6 @@ class mail_compose
|
||||
unset($_GET['part_id']);
|
||||
unset($_GET['id']);
|
||||
unset($_GET['mode']);
|
||||
if (is_array($_content['attachments']))
|
||||
{
|
||||
foreach ($_content['attachments'] as $i => &$upload)
|
||||
{
|
||||
if (is_numeric($upload['size'])) $upload['size'] = mail_bo::show_readable_size($upload['size']);
|
||||
}
|
||||
}
|
||||
//error_log(__METHOD__.__LINE__.array2string($_content));
|
||||
}
|
||||
|
||||
@ -242,7 +235,6 @@ class mail_compose
|
||||
error_log(__METHOD__.__LINE__." ". $e->getMessage());
|
||||
}
|
||||
$upload['file'] = $upload['tmp_name'] = $tmp_filename;
|
||||
$upload['size'] = mail_bo::show_readable_size($upload['size']);
|
||||
}
|
||||
}
|
||||
// check if someone did hit delete on the attachments list
|
||||
|
@ -179,6 +179,7 @@ app.classes.mail = AppJS.extend(
|
||||
var that = this;
|
||||
this.mail_isMainWindow = false;
|
||||
this.compose_fieldExpander_init();
|
||||
this.check_sharing_filemode();
|
||||
|
||||
// Set autosaving interval to 2 minutes for compose message
|
||||
window.setInterval(function (){
|
||||
@ -200,7 +201,7 @@ app.classes.mail = AppJS.extend(
|
||||
jQuery(window).on ('resize',function() {
|
||||
that.compose_resizeHandler();
|
||||
});
|
||||
|
||||
|
||||
this.compose_fieldExpander();
|
||||
|
||||
//Call drag_n_drop initialization for emails on compose
|
||||
@ -3911,7 +3912,7 @@ app.classes.mail = AppJS.extend(
|
||||
{
|
||||
var mainIframe = jQuery('#mail-display_mailDisplayBodySrc');
|
||||
var tmpPrintDiv = jQuery('#tempPrintDiv');
|
||||
|
||||
|
||||
if (tmpPrintDiv.length == 0 && tmpPrintDiv.children())
|
||||
{
|
||||
tmpPrintDiv = jQuery(document.createElement('div'))
|
||||
@ -3919,7 +3920,7 @@ app.classes.mail = AppJS.extend(
|
||||
.addClass('tmpPrintDiv');
|
||||
var notAttached = true;
|
||||
}
|
||||
|
||||
|
||||
if (mainIframe)
|
||||
{
|
||||
tmpPrintDiv[0].innerHTML = mainIframe.contents().find('body').html();
|
||||
@ -3929,7 +3930,7 @@ app.classes.mail = AppJS.extend(
|
||||
tmpPrintDiv.find('#divAppboxHeader').remove();
|
||||
|
||||
this.egw.message('Printing....');
|
||||
|
||||
|
||||
// Make sure the print happens after the content is loaded. Seems Firefox and IE can't handle timing for print command correctly
|
||||
setTimeout(function(){
|
||||
egw(window).window.print();
|
||||
@ -4113,5 +4114,26 @@ app.classes.mail = AppJS.extend(
|
||||
}
|
||||
return true;
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Check sharing mode and disable not available options
|
||||
*
|
||||
* @param {DOMNode} _node
|
||||
* @param {et2_widget} _widget
|
||||
*/
|
||||
check_sharing_filemode: function(_node, _widget)
|
||||
{
|
||||
if (!_widget) _widget = this.et2.getWidgetById('filemode');
|
||||
|
||||
var extended_settings = _widget.get_value() != 'attach' && this.egw.app('stylite');
|
||||
this.et2.getWidgetById('share_expiration').set_readonly(!extended_settings);
|
||||
this.et2.getWidgetById('share_password').set_readonly(!extended_settings);
|
||||
|
||||
if (_widget.get_value() == 'share_rw' && !this.egw.app('stylite'))
|
||||
{
|
||||
this.egw.message(this.egw.lang('Writable sharing required EPL version!'), 'info');
|
||||
_widget.setValue('share_ro');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -368,18 +368,23 @@ div.mailUploadSection {
|
||||
border-top: 1px solid silver;
|
||||
margin-top: 16px;
|
||||
}
|
||||
div.mailUploadSection > label {
|
||||
margin-top: -10px;
|
||||
padding-left: 4px;
|
||||
padding-right: 12px;
|
||||
background-color: white;
|
||||
display: table-caption;
|
||||
white-space: nowrap;
|
||||
margin-left: 6px;
|
||||
div.mailUploadSection > div.et2_hbox {
|
||||
margin-top: -10px;
|
||||
margin-left: 6px;
|
||||
margin-right: -12px;
|
||||
background-color: white;
|
||||
display: table-caption;
|
||||
}
|
||||
div.mailUploadSection > div.et2_hbox > label {
|
||||
padding-left: 4px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#mail-compose_filemode {
|
||||
margin-left: 6px;
|
||||
}
|
||||
#mail-compose_share_expiration > input {
|
||||
min-width: 15ex;
|
||||
}
|
||||
#mail-compose_selectFromVFSForCompose{
|
||||
width:20px;
|
||||
float:none;
|
||||
|
@ -112,7 +112,11 @@
|
||||
<textbox multiline="true" rows="40" cols="120" width="100%" span="all" no_lang="1" name="mail_plaintext" id="mail_plaintext"/>
|
||||
</hbox>
|
||||
<vbox class="et2_file mailUploadSection" disabled="@no_griddata">
|
||||
<select id="filemode" label="Send files as"/>
|
||||
<hbox>
|
||||
<select id="filemode" label="Send files as" onchange="app.mail.check_sharing_filemode"/>
|
||||
<date id="share_expiration" label="Expiration"/>
|
||||
<passwd id="share_password" blur="password protect"/>
|
||||
</hbox>
|
||||
<grid id="attachments" width="100%" maxheight="165" class="egwGridView_grid">
|
||||
<columns>
|
||||
<column disabled="!@showtempname" width="10%"/>
|
||||
@ -124,7 +128,7 @@
|
||||
<row class="row attachmentRow">
|
||||
<description id="${row}[tmp_name]"/>
|
||||
<description class="useEllipsis et2_link" id="${row}[name]" no_lang="1" onclick="app.mail.displayUploadedFile"/>
|
||||
<description align="right" id="${row}[size]" />
|
||||
<vfs-size align="right" id="${row}[size]" />
|
||||
<button id="delete[$row_cont[tmp_name]]" value="Delete" image="delete"/>
|
||||
</row>
|
||||
</rows>
|
||||
|
@ -365,18 +365,23 @@ div.mailUploadSection {
|
||||
border-top: 1px solid silver;
|
||||
margin-top: 16px;
|
||||
}
|
||||
div.mailUploadSection > label {
|
||||
div.mailUploadSection > div.et2_hbox {
|
||||
margin-top: -10px;
|
||||
padding-left: 4px;
|
||||
padding-right: 12px;
|
||||
margin-left: 6px;
|
||||
margin-right: -12px;
|
||||
background-color: white;
|
||||
display: table-caption;
|
||||
}
|
||||
div.mailUploadSection > div.et2_hbox > label {
|
||||
padding-left: 4px;
|
||||
white-space: nowrap;
|
||||
margin-left: 6px;
|
||||
}
|
||||
#mail-compose_filemode {
|
||||
margin-left: 6px;
|
||||
}
|
||||
#mail-compose_share_expiration > input {
|
||||
min-width: 15ex;
|
||||
}
|
||||
#mail-compose_selectFromVFSForCompose {
|
||||
width: 20px;
|
||||
float: none;
|
||||
|
Loading…
Reference in New Issue
Block a user