Merge branch 'master' into movecopy

pull/6145/head
PhilW 7 years ago
commit 4f1da97af2

@ -1,6 +1,9 @@
CHANGELOG Roundcube Webmail
===========================
- Improved Mailvelope integration
- Added private key listing and generating to identity settings
- Enable encrypt & sign option if Mailvelope supports it
- Update to jQuery-3.3.1
- vcard_attachments: Add possibility to send contact vCard from Contacts toolbar (#6080)
- Add More actions button in Contacts toolbar with Copy/Move actions (#6081)

@ -48,6 +48,7 @@ function rcube_webmail()
this.http_request_jobs = {};
this.menu_stack = [];
this.entity_selectors = [];
this.image_style = {};
// webmail client settings
this.dblclick_time = 500;
@ -347,6 +348,7 @@ function rcube_webmail()
}
else if (this.env.action == 'get') {
this.enable_command('download', true);
this.enable_command('image-scale', 'image-rotate', !!/^image\//.test(this.env.mimetype));
// Mozilla's PDF.js viewer does not allow printing from host page (#5125)
// to minimize user confusion we disable the Print button
@ -1018,6 +1020,10 @@ function rcube_webmail()
break;
case 'add-contact':
this.add_contact(props);
break;
case 'load-remote':
if (this.env.uid) {
if (props && this.env.sender) {
@ -3585,7 +3591,11 @@ function rcube_webmail()
ref.mailvelope_init(action, kr);
};
mailvelope.getKeyring(keyring).then(fn, function(err) {
mailvelope.getVersion().then(function(v) {
mailvelope.VERSION = v;
mailvelope.VERSION_MAJOR = Math.floor(parseFloat(v));
return mailvelope.getKeyring(keyring);
}).then(fn, function(err) {
// attempt to create a new keyring for this app/user
mailvelope.createKeyring(keyring).then(fn, function(err) {
console.error(err);
@ -3625,8 +3635,12 @@ function rcube_webmail()
else if (action == 'compose') {
this.env.compose_commands.push('compose-encrypted');
var sign_supported = mailvelope.VERSION_MAJOR >= 2;
var is_html = $('[name="_is_html"]').val() > 0;
if (sign_supported)
this.env.compose_commands.push('compose-encrypted-signed');
if (this.env.pgp_mime_message) {
// fetch PGP/Mime part and open load into Mailvelope editor
var lock = this.set_busy(true, this.get_label('loadingdata'));
@ -3637,6 +3651,8 @@ function rcube_webmail()
error: function(o, status, err) {
ref.http_error(o, status, err, lock);
ref.enable_command('compose-encrypted', !is_html);
if (sign_supported)
ref.enable_command('compose-encrypted-signed', !is_html);
},
success: function(data) {
ref.set_busy(false, null, lock);
@ -3648,24 +3664,38 @@ function rcube_webmail()
ref.compose_encrypted({ quotedMail: data });
ref.enable_command('compose-encrypted', true);
ref.enable_command('compose-encrypted-signed', false);
}
});
}
else {
// enable encrypted compose toggle
this.enable_command('compose-encrypted', !is_html);
if (sign_supported)
this.enable_command('compose-encrypted-signed', !is_html);
}
// make sure to disable encryption button after toggling editor into HTML mode
this.addEventListener('actionafter', function(args) {
if (args.ret && args.action == 'toggle-editor')
if (args.ret && args.action == 'toggle-editor') {
ref.enable_command('compose-encrypted', !args.props.html);
if (sign_supported)
ref.enable_command('compose-encrypted-signed', !args.props.html);
}
});
} else if (action == 'edit-identity') {
ref.mailvelope_identity_keygen();
}
};
// handler for the 'compose-encrypted-signed' command
this.compose_encrypted_signed = function(props)
{
props = props || {};
props.signMsg = true;
this.compose_encrypted(props);
};
// handler for the 'compose-encrypted' command
this.compose_encrypted = function(props)
{
@ -3698,6 +3728,10 @@ function rcube_webmail()
options = { predefinedText: $('#' + this.env.composebody).val() };
}
if (props.signMsg) {
options.signMsg = props.signMsg;
}
if (this.env.compose_mode == 'reply') {
options.quotedMailIndent = true;
options.quotedMailHeader = this.env.compose_reply_header;
@ -5443,8 +5477,6 @@ function rcube_webmail()
{
if (value)
this.http_post('addcontact', {_address: value, _reload: reload});
return true;
};
// send remote request to search mail or contacts
@ -5649,6 +5681,38 @@ function rcube_webmail()
this.env.is_sent = true;
};
this.image_rotate = function()
{
var curr = this.image_style ? (this.image_style.rotate || 0) : 0;
this.image_style.rotate = curr > 180 ? 0 : curr + 90;
this.apply_image_style();
};
this.image_scale = function(prop)
{
var curr = this.image_style ? (this.image_style.scale || 1) : 1;
this.image_style.scale = Math.max(0.1, curr + 0.1 * (prop == '-' ? -1 : 1));
this.apply_image_style();
};
this.apply_image_style = function()
{
var style = [],
head = $(this.gui_objects.messagepartframe).contents().find('head');
$('#image-style', head).remove();
$.each({scale: '', rotate: 'deg'}, function(i, v) {
var val = ref.image_style[i];
if (val)
style.push(i + '(' + val + v + ')');
});
if (style)
head.append($('<style id="image-style">').text('img { transform: ' + style.join(' ') + '}'));
};
/*********************************************************/
/********* keyboard live-search methods *********/
@ -6374,11 +6438,14 @@ function rcube_webmail()
{
var undelete = this.env.source && this.env.address_sources[this.env.source].undelete;
if (!undelete) {
cid = this.contact_list.get_selection();
if (undelete) {
this._with_selected_contacts('delete');
}
else {
var cid = this.contact_list.get_selection();
this.confirm_dialog(this.get_label('deletecontactconfirm'), 'delete', function() {
ref._with_selected_contacts('delete', {_cid: cid});
});
ref._with_selected_contacts('delete', {_cid: cid});
});
}
};

@ -56,6 +56,11 @@ class rcube_db_pgsql extends rcube_db
{
$dbh->query("SET NAMES 'utf8'");
$dbh->query("SET DATESTYLE TO ISO");
// if ?schema= is set in dsn, set the search_path
if ($dsn['schema']) {
$dbh->query("SET search_path TO " . $this->quote($dsn['schema']));
}
}
/**

@ -281,6 +281,7 @@ $labels['encryptmessage'] = 'Encrypt message';
$labels['encryptmessagemailvelope'] = 'Encrypt message with Mailvelope';
$labels['importpubkeys'] = 'Import public keys';
$labels['encryptedsendialog'] = 'Sending encrypted message';
$labels['encryptandsign'] = 'Encrypt and sign';
$labels['keyid'] = 'Key ID';
$labels['keylength'] = 'Bits';
$labels['keyexpired'] = 'Expired';
@ -352,6 +353,15 @@ $labels['receiptread'] = 'Return Receipt (read)';
$labels['yourmessage'] = 'This is a Return Receipt for your message';
$labels['receiptnote'] = 'Note: This receipt only acknowledges that the message was displayed on the recipient\'s computer. There is no guarantee that the recipient has read or understood the message contents.';
$labels['zoomin'] = 'Zoom In';
$labels['zoomout'] = 'Zoom Out';
$labels['rotate'] = 'Rotate';
$labels['increaseimage'] = 'Increase image size';
$labels['decreaseimage'] = 'Decrease image size';
$labels['rotateimage'] = 'Rotate image';
$labels['showtools'] = 'Show image tools';
$labels['hidetools'] = 'Hide image tools';
// address boook
$labels['name'] = 'Display Name';
$labels['firstname'] = 'First Name';
@ -718,6 +728,7 @@ $labels['arialabelresonseeditfrom'] = 'Response edit form';
$labels['arialabelsearchterms'] = 'Search terms';
$labels['arialabeldropactionmenu'] = 'Drag-n-Drop action menu';
$labels['arialabelheadersmenu'] = 'Recipient (header) adding menu';
$labels['arialabelimagetools'] = 'Image tools';
$labels['helplistnavigation'] = 'List keyboard navigation';
$labels['helplistkeyboardnavigation'] = "Arrows up/down: Move row focus/selection.

@ -665,7 +665,11 @@ enable_command: function(p)
}
else if (p.command == 'compose-encrypted') {
// show the toolbar button for Mailvelope
$('#messagetoolbar > a.encrypt').show();
$('#messagetoolbar a.encrypt').parent().show();
}
else if (p.command == 'compose-encrypted-signed') {
// enable selector for encrypt and sign
$('#encryptionmenulink').show();
}
},

@ -39,7 +39,10 @@
</span>
<roundcube:endif />
<a href="#responses" class="button responses" label="responses" title="<roundcube:label name='insertresponse' />" id="responsesmenulink" unselectable="on" onmousedown="return false" onclick="rcmail_ui.show_popup('responsesmenu');return false">&nbsp;</a>
<roundcube:button command="compose-encrypted" type="link" class="buttonPas encrypt disabled" classAct="button encrypt" classSel="button encrypt" title="encryptmessagemailvelope" content=" " style="display:none" />
<span class="dropbutton" style="display:none">
<roundcube:button command="compose-encrypted" type="link" class="buttonPas encrypt disabled" classAct="button encrypt" classSel="button encrypt" title="encryptmessagemailvelope" content=" " />
<span id="encryptionmenulink" onclick="rcmail_ui.show_popup('encryptionmenu');return false" style="display:none"></span>
</span>
<roundcube:container name="toolbar" id="compose-toolbar" />
<roundcube:button name="messageoptions" id="composemenulink" type="link" class="button messagemenu" title="messageoptions" onclick="rcmail_ui.show_popup('composemenu', true);return false" content=" " />
</div>
@ -228,6 +231,13 @@
</ul>
</div>
<div id="encryptionmenu" class="popupmenu">
<ul>
<roundcube:button command="compose-encrypted" type="link-menuitem" label="encryptmessage" classAct="active" />
<roundcube:button command="compose-encrypted-signed" type="link-menuitem" label="encryptandsign" classAct="active" />
</ul>
</div>
<script type="text/javascript">
rcube_init_mail_ui();
</script>

@ -1256,7 +1256,6 @@ div.message-partheaders .headers-table td.header {
#composebodycontainer.mailvelope > iframe[scrolling='no'] {
position: relative;
top: -12px;
}
#composebody {

@ -2063,6 +2063,7 @@ ul.proplist.simplelist li {
}
.toolbar a.button.encrypt {
min-width: 66px;
background-position: center -2025px;
}

@ -33,7 +33,10 @@
<roundcube:button name="addattachment" type="link" class="button attach" label="attach" title="addattachment" onclick="rcmail.upload_input('uploadform')" aria-haspopup="true" aria-expanded="false" tabindex="2" />
<roundcube:button command="insert-sig" type="link" class="button insertsig disabled" classAct="button insertsig" label="signature" title="insertsignature" tabindex="2" />
<a href="#responses" class="button responses" label="responses" title="<roundcube:label name='insertresponse' />" id="responsesmenulink" unselectable="on" onmousedown="return false" onclick="UI.toggle_popup('responsesmenu',event);return false" tabindex="2" aria-haspopup="true" aria-expanded="false" aria-owns="textresponsesmenu"><roundcube:label name="responses" /></a>
<roundcube:button command="compose-encrypted" type="link" class="button encrypt disabled" classAct="button encrypt" classSel="button encrypt selected" label="encrypt" title="encryptmessagemailvelope" tabindex="2" style="display:none" />
<span class="dropbutton" style="display:none">
<roundcube:button command="compose-encrypted" type="link" class="button encrypt disabled" classAct="button encrypt" classSel="button encrypt selected" label="encrypt" title="encryptmessagemailvelope" tabindex="2" />
<a href="#compose-encrypted" class="dropbuttontip" id="encryptionmenulink" onclick="UI.toggle_popup('encryptionmenu',event);return false" aria-haspopup="true" aria-expanded="false" tabindex="2" style="display:none"></a>
</span>
<roundcube:container name="toolbar" id="compose-toolbar" />
</div>
@ -223,6 +226,13 @@
</ul>
</div>
<div id="encryptionmenu" class="popupmenu" aria-hidden="true">
<ul class="toolbarmenu" role="menu">
<roundcube:button command="compose-encrypted" type="link-menuitem" label="encryptmessage" classAct="active" />
<roundcube:button command="compose-encrypted-signed" type="link-menuitem" label="encryptandsign" classAct="active" />
</ul>
</div>
<roundcube:include file="/includes/footer.html" />
</body>

@ -685,7 +685,11 @@ function rcube_mail_ui()
}
else if (p.command == 'compose-encrypted') {
// show the toolbar button for Mailvelope
$('a.button.encrypt').show();
$('a.button.encrypt').parent().show();
}
else if (p.command == 'compose-encrypted-signed') {
// enable selector for encrypt and sign
$('#encryptionmenulink').show();
}
}

Loading…
Cancel
Save