add some selection options to contacts list

pull/6595/head
PhilW 6 years ago
parent 99ad249f6d
commit e5f5e6576d

@ -1116,16 +1116,17 @@ function rcube_webmail()
case 'select-all': case 'select-all':
this.select_all_mode = props ? false : true; this.select_all_mode = props ? false : true;
this.dummy_select = true; // prevent msg opening if there's only one msg on the list this.dummy_select = true; // prevent msg opening if there's only one msg on the list
var list = this.task == 'addressbook' ? 'contact_list' : 'message_list';
if (props == 'invert') if (props == 'invert')
this.message_list.invert_selection(); this[list].invert_selection();
else else
this.message_list.select_all(props == 'page' ? '' : props); this[list].select_all(props == 'page' ? '' : props);
this.dummy_select = null; this.dummy_select = null;
break; break;
case 'select-none': case 'select-none':
this.select_all_mode = false; this.select_all_mode = false;
this.message_list.clear_selection(); this[this.task == 'addressbook' ? 'contact_list' : 'message_list'].clear_selection();
break; break;
case 'expand-all': case 'expand-all':
@ -9216,7 +9217,7 @@ function rcube_webmail()
var list = this.contact_list, var list = this.contact_list,
uid = this.env.list_uid; uid = this.env.list_uid;
this.enable_command('export', (list && list.rowcount > 0)); this.enable_command('export', 'select-all', 'select-none', (list && list.rowcount > 0));
if (response.action == 'list' || response.action == 'search') { if (response.action == 'list' || response.action == 'search') {
this.enable_command('search-create', this.env.source == ''); this.enable_command('search-create', this.env.source == '');

@ -24,6 +24,10 @@
<a class="button icon menu-button" href="#menu"><span class="inner"><roundcube:label name="menu" /></span></a> <a class="button icon menu-button" href="#menu"><span class="inner"><roundcube:label name="menu" /></span></a>
<a class="button icon back-sidebar-button folders" href="#sidebar"><span class="inner"><roundcube:label name="groups" /></span></a> <a class="button icon back-sidebar-button folders" href="#sidebar"><span class="inner"><roundcube:label name="groups" /></span></a>
<roundcube:object name="addresslisttitle" label="contacts" tag="span" class="header-title" /> <roundcube:object name="addresslisttitle" label="contacts" tag="span" class="header-title" />
<div class="toolbar" role="toolbar">
<a href="#select" class="button select disabled" data-popup="listselect-menu" data-toggle-button="list-toggle-button" title="<roundcube:label name="select" />"><span class="inner"><roundcube:label name="select" /></span></a>
<roundcube:container name="listcontrols" id="listcontrols" />
</div>
<a class="button icon toolbar-menu-button" href="#list-menu"><span class="inner"><roundcube:label name="menu" /></span></a> <a class="button icon toolbar-menu-button" href="#list-menu"><span class="inner"><roundcube:label name="menu" /></span></a>
</div> </div>
<roundcube:object name="searchform" id="searchform" wrapper="searchbar toolbar" <roundcube:object name="searchform" id="searchform" wrapper="searchbar toolbar"
@ -118,6 +122,18 @@
</ul> </ul>
</div> </div>
<div id="listselect-menu" class="popupmenu">
<h3 id="aria-label-listselect-menu" class="voice"><roundcube:label name="arialabellistselectmenu" /></h3>
<ul class="toolbarmenu listing" role="menu" aria-labelledby="aria-label-listselect-menu">
<roundcube:button type="link-menuitem" label="selection" class="selection" classAct="selection active"
name="list-toggle-button" id="list-toggle-button"
onclick="if ($(this).is('.active')) $('#contacts-table').toggleClass('withselection');" />
<roundcube:button command="select-all" type="link-menuitem" prop="page" label="currpage" class="select page" classAct="select page active" />
<roundcube:button command="select-all" type="link-menuitem" prop="invert" label="invert" class="select invert" classAct="select invert active" />
<roundcube:button command="select-none" type="link-menuitem" label="none" class="select none" classAct="select none active" />
</ul>
</div>
<div id="dragcontact-menu" class="popupmenu"> <div id="dragcontact-menu" class="popupmenu">
<h3 id="aria-label-dragcontact-menu" class="voice"><roundcube:label name="arialabeldropactionmenu" /></h3> <h3 id="aria-label-dragcontact-menu" class="voice"><roundcube:label name="arialabeldropactionmenu" /></h3>
<ul class="toolbarmenu listing" role="menu" aria-labelledby="aria-label-dragcontact-menu"> <ul class="toolbarmenu listing" role="menu" aria-labelledby="aria-label-dragcontact-menu">

Loading…
Cancel
Save