move qrcode link to new contact actions menu

pull/6127/head
PhilW 7 years ago
parent 489da28dab
commit abbb832c6f

@ -5918,6 +5918,7 @@ function rcube_webmail()
this.enable_command('export-selected', 'copy', selected > 0);
this.enable_command('edit', id && writable);
this.enable_command('delete', 'move', selected && writable);
this.enable_command('qrcode', selected == 1);
return false;
};
@ -6876,7 +6877,7 @@ function rcube_webmail()
options = {button: false, cancel_button: 'close', width: 300, height: 300},
img = new Image(300, 300);
img.src = this.url('addressbook/qrcode', {_source: this.env.source, _cid: this.env.cid});
img.src = this.url('addressbook/qrcode', {_source: this.env.source, _cid: this.env.cid || this.contact_list.get_single_selection()});
return this.simple_dialog(img, title, null, options);
};

@ -131,7 +131,9 @@ $RCMAIL->register_action_map(array(
'search-delete' => 'search.inc',
));
// Disable qr-code if php-gd or Endroid's QrCode is not installed
$OUTPUT->set_env('qrcode', function_exists('imagecreate') && class_exists('Endroid\QrCode\QrCode'));
$OUTPUT->add_label('qrcode');
// instantiate a contacts object according to the given source
function rcmail_contact_source($source=null, $init_env=false, $writable=false)

@ -42,10 +42,6 @@ if ($cid && ($record = ($CONTACT_RECORD ?: $CONTACTS->get_record($cid, true))))
// get address book name (for display)
rcmail_set_sourcename($CONTACTS);
// Disable qr-code if php-gd or Endroid's QrCode is not installed
$OUTPUT->set_env('qrcode', function_exists('imagecreate') && class_exists('Endroid\QrCode\QrCode'));
$OUTPUT->add_label('qrcode');
$OUTPUT->add_handlers(array(
'contacthead' => 'rcmail_contact_head',
'contactdetails' => 'rcmail_contact_details',

@ -104,6 +104,11 @@
background-position: 7px 20px;
}
#contactmenu li a.qrcode
{
background-position: 7px -39px;
}
#contactmenu li a.assigngroup
{
background-position: 7px 0;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 929 B

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -59,6 +59,9 @@
<div id="contactmenu" class="popupmenu">
<ul class="toolbarmenu" id="contactmenumenu">
<roundcube:if condition="env:qrcode" />
<roundcube:button type="link-menuitem" class="qrcode" command="qrcode" label="qrcode" classAct="qrcode active" />
<roundcube:endif />
<roundcube:button type="link-menuitem" class="assigngroup" command="group-assign-selected" label="groupassign" classAct="assigngroup active" innerclass="folder-selector-link" />
<roundcube:button type="link-menuitem" class="removegroup" command="group-remove-selected" label="groupremove" classAct="removegroup active" />
<roundcube:if condition="env:writable_source &gt; 1" />

@ -21,9 +21,6 @@
</div>
<p>
<roundcube:button command="edit" type="input" class="button" label="editcontact" condition="!ENV:readonly" />
<roundcube:if condition="env:qrcode" />
<roundcube:button command="qrcode" type="input" class="button" label="qrcode" />
<roundcube:endif />
</p>
</div>
<script type="text/javascript">rcube_init_tabs('contacttabs')</script>

@ -404,6 +404,10 @@ a.deletebutton {
max-width: 50em;
}
ul.toolbarmenu li span.qrcode {
background-position: 0 -2408px;
}
ul.toolbarmenu li span.assigngroup {
background-position: 0 -2358px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 16 KiB

@ -39,6 +39,9 @@
<div id="contactmenu" class="popupmenu" aria-hidden="true">
<h3 id="aria-label-contactmenu" class="voice"><roundcube:label name="arialabelmorecontactactions" /></h3>
<ul id="contactmenu-menu" class="toolbarmenu iconized" role="menu" aria-labelledby="aria-label-contactmenu">
<roundcube:if condition="env:qrcode" />
<roundcube:button type="link-menuitem" command="qrcode" label="qrcode" class="icon" classAct="icon active" innerclass="icon qrcode" />
<roundcube:endif />
<roundcube:button type="link-menuitem" command="group-assign-selected" label="groupassign" class="icon" classAct="icon active" innerclass="icon assigngroup folder-selector-link" />
<roundcube:button type="link-menuitem" command="group-remove-selected" label="groupremove" class="icon" classAct="icon active" innerclass="icon removegroup" />
<roundcube:if condition="env:writable_source &gt; 1" />

@ -25,9 +25,6 @@
<div id="headerbuttons" class="formbuttons">
<roundcube:button command="edit" type="input" class="button mainaction" label="editcontact" condition="!ENV:readonly" />
<roundcube:if condition="env:qrcode" />
<roundcube:button command="qrcode" type="input" class="button" label="qrcode" />
<roundcube:endif />
</div>
<roundcube:include file="/includes/footer.html" />

Loading…
Cancel
Save