Browse Source

move qrcode link to new contact actions menu

pull/6127/head
PhilW 8 years ago
parent
commit
abbb832c6f
  1. 3
      program/js/app.js
  2. 4
      program/steps/addressbook/func.inc
  3. 4
      program/steps/addressbook/show.inc
  4. 5
      skins/classic/addressbook.css
  5. BIN
      skins/classic/images/contactactions.png
  6. 3
      skins/classic/templates/addressbook.html
  7. 3
      skins/classic/templates/contact.html
  8. 4
      skins/larry/addressbook.css
  9. BIN
      skins/larry/images/listicons.png
  10. 3
      skins/larry/templates/addressbook.html
  11. 3
      skins/larry/templates/contact.html

3
program/js/app.js

@ -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);
};

4
program/steps/addressbook/func.inc

@ -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)

4
program/steps/addressbook/show.inc

@ -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',

5
skins/classic/addressbook.css

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

BIN
skins/classic/images/contactactions.png

Before

Width: 18  |  Height: 40  |  Size: 929 B

After

Width: 18  |  Height: 60  |  Size: 1.1 KiB

3
skins/classic/templates/addressbook.html

@ -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" />

3
skins/classic/templates/contact.html

@ -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>

4
skins/larry/addressbook.css

@ -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;
}

BIN
skins/larry/images/listicons.png

Before

Width: 48  |  Height: 2422  |  Size: 15 KiB

After

Width: 48  |  Height: 2442  |  Size: 16 KiB

3
skins/larry/templates/addressbook.html

@ -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" />

3
skins/larry/templates/contact.html

@ -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