Skip to content

Commit 7a03909

Browse files
committed
Merge branch 'release-2.3' into release-2.2
2 parents b27c214 + f6a415e commit 7a03909

File tree

10 files changed

+43
-20
lines changed

10 files changed

+43
-20
lines changed

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Roundcube Webmail ContextMenu
22
=============================
33

4+
Version 2.3 (2017-06-14, rc-1.3)
5+
=================================================
6+
* Remove special handling for group-create/rename (requires roundcube rev ec98aa5)
7+
* "Flattened" the larry theme: fresher look by removing shadows and gradients
8+
* Fix handling of folder names containing special chars
9+
410
Version 2.2 (2017-01-02, rc-1.3)
511
=================================================
612
* Use new 'Mark all as read' function from core (requires 1.3)

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "http://github.com/JohnDoh/Roundcube-Plugin-Context-Menu/",
66
"license": "GPL-3.0",
77
"type": "roundcube-plugin",
8-
"version": "2.2",
8+
"version": "2.3",
99
"authors": [
1010
{
1111
"name": "Philip Weir",
@@ -25,7 +25,7 @@
2525
},
2626
"extra": {
2727
"roundcube": {
28-
"min-version": "1.3-beta"
28+
"min-version": "1.3"
2929
}
3030
}
3131
}

contextmenu.js

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ rcube_webmail.prototype.context_menu_commands = new Array();
2121
rcube_webmail.prototype.context_menu_popup_menus = new Array();
2222
rcube_webmail.prototype.context_menu_popup_commands = {};
2323

24-
rcube_webmail.prototype.context_menu_command_pattern = /rcmail\.command\(\'([^\']+)\',\s?\'([^\']*)\'/;
24+
rcube_webmail.prototype.context_menu_command_pattern = /rcmail\.command\(\'([^\']+)\',\s?\'((?:\\\'|[^\'])*)\'/;
2525

2626
function rcm_listmenu_init(row, props, events) {
2727
if (!events)
@@ -122,8 +122,8 @@ function rcm_foldermenu_init(el, props, events) {
122122
// remove focus (and keyboard nav highlighting) from A
123123
source.blur();
124124

125-
if (source.attr('onclick') && source.attr('onclick').match(rcmail.context_menu_command_pattern)) {
126-
rcm_show_menu(e, this, RegExp.$2, menu);
125+
if (source.attr('rel') && source.attr('onclick') && source.attr('onclick').match(rcmail.context_menu_command_pattern)) {
126+
rcm_show_menu(e, this, source.attr('rel'), menu);
127127
}
128128
});
129129
}
@@ -188,20 +188,6 @@ function rcm_abookmenu_init(el, props, events) {
188188
rcmail.enable_command(p.command, true);
189189

190190
switch (p.command) {
191-
case 'group-create':
192-
case 'group-rename':
193-
result = rcmail.command(p.command, p.args, p.el);
194-
195-
// callback requires target is selected
196-
var prev_command_list = rcmail.commands['listgroup'];
197-
rcmail.enable_command('listgroup', true);
198-
rcmail.env.source = prev_source
199-
rcmail.env.group = prev_group;
200-
rcmail.command('listgroup', {'source': cur_source, 'id': cur_id}, p.el, p.evt);
201-
prev_source = cur_source;
202-
prev_group = cur_id;
203-
rcmail.enable_command('listgroup', prev_command_list);
204-
break;
205191
case 'search-delete':
206192
var result = false;
207193

localization/es_AR.inc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
/* Author: Sergio Loyola */
3+
4+
$labels = array();
5+
$labels['markreadfolder'] = 'Marcar todo como leído';
6+
$labels['collapseall'] = 'Compactar todas las carpetas';
7+
$labels['expandall'] = 'Expandir todas las carpetas';
8+
$labels['assigngroup'] = 'Asignar contactos seleccionados al grupo ...';
9+
10+
$messages = array();
11+
12+
?>

skins/classic/contextmenu.css

100755100644
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ div.contextmenu ul.iconized li a.cmd_add-recipient span.icon
191191
background-position: 8px -236px;
192192
}
193193

194+
div.contextmenu ul.iconized li a.vcard span.icon
195+
{
196+
background-position: 7px -546px;
197+
}
198+
194199
div.contextmenu ul.iconized li a.cmd_group-create span.icon,
195200
div.contextmenu ul.iconized li a.assigngroup span.icon
196201
{

skins/classic/functions.js

100755100644
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ rcube_webmail.prototype.context_menu_popup_pattern = /rcmail_ui\.show_popup\(\'(
1919
rcube_webmail.prototype.context_menu_button_active_class = new Array('active', 'button');
2020
rcube_webmail.prototype.context_menu_button_disabled_class = new Array('disabled', 'buttonPas');
2121

22+
function add_menu_text(p) {
23+
if ($(p.item).children('a').hasClass('vcard')) {
24+
$(p.item).children('a').children('span').text($('#abookactions a.vcard').attr('title'));
25+
}
26+
}
27+
2228
function reorder_contact_menu(p) {
2329
// put export link last
2430
var ul = p.ref.container.find('ul:first');
@@ -37,7 +43,7 @@ $(document).ready(function() {
3743
rcmail.add_onload("rcm_foldermenu_init('#mailboxlist li', {'menu_source': ['#rcmFolderMenu', '#mailboxoptionsmenu ul']})");
3844
}
3945
else if (rcmail.env.task == 'mail' && rcmail.env.action == 'compose') {
40-
rcmail.addEventListener('insertrow', function(props) { rcm_listmenu_init(props.row.id, {'menu_name': 'composeto', 'menu_source': '#abookactions', 'list_object': rcmail.contact_list}); } );
46+
rcmail.addEventListener('insertrow', function(props) { rcm_listmenu_init(props.row.id, {'menu_name': 'composeto', 'menu_source': '#abookactions', 'list_object': rcmail.contact_list}, {'insertitem': function(p) { add_menu_text(p); }}); } );
4147
}
4248
else if (rcmail.env.task == 'addressbook' && rcmail.env.action == '') {
4349
rcmail.addEventListener('contextmenu_init', function(menu) {

skins/classic/images/contexticons.png

100755100644
465 Bytes
Loading

skins/larry/contextmenu.css

100755100644
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ div.contextmenu ul.iconized li a.addbcc span.icon
151151
background-position: 0 -281px;
152152
}
153153

154+
div.contextmenu ul.iconized li a.vcard span.icon
155+
{
156+
background-position: 0 -738px;
157+
}
158+
154159
div.contextmenu ul.iconized li a.movecontact span.icon
155160
{
156161
background-position: 0 -632px;

skins/larry/functions.js

100755100644
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ function add_menu_text(menu, p) {
3030
else if ($(p.item).children('a').hasClass('addbcc')) {
3131
$(p.item).children('a').children('span').text($('#compose-contacts div.boxfooter a.addbcc').attr('title'));
3232
}
33+
else if ($(p.item).children('a').hasClass('vcard')) {
34+
$(p.item).children('a').children('span').text($('#compose-contacts div.boxfooter a.vcard').attr('title'));
35+
}
3336
}
3437
else if (menu == 'contactlist') {
3538
if ($(p.item).children('a').hasClass('delete')) {

skins/larry/images/contexticons.png

100755100644
-5.98 KB
Loading

0 commit comments

Comments
 (0)