* All apps: Add a counter indicator for selected entries in a list in mobile template

This commit is contained in:
Hadi Nategh 2016-07-27 11:33:46 +02:00
parent c4979ecd93
commit 01c0ea4c6b
4 changed files with 46 additions and 0 deletions

View File

@ -2457,6 +2457,9 @@ var et2_nextmatch_header_bar = (function(){ "use strict"; return et2_DOMWidget.e
.text(egw.lang(egw.app_name()))
.appendTo(this.search_box);
this.select_counter = jQuery(document.createElement('div'))
.addClass('nm_select_counter')
.prependTo(this.search_box);
// toggle header
// add new button
this.fav_span = jQuery(document.createElement('div'))

View File

@ -996,6 +996,19 @@
{
// Update action_header status (3dots)
_widget.header.action_header.toggle(typeof _widget.getSelection().ids != 'undefined' && _widget.getSelection().ids.length > 0);
// Update selection counter in nm header
if (_widget._type == 'nextmatch' && _widget.getSelection().ids.length > 0)
{
_widget.header.select_counter
.show()
.text(_widget.getSelection().ids.length);
}
else
{
_widget.header.select_counter.hide();
}
}
});

View File

@ -7581,6 +7581,21 @@ form[id^="tracker-"] .dialogHeadbar {
-webkit-filter: none!important;
background-color: white !important;
}
body .et2_nextmatch .nm-mob-header div.nm_select_counter {
background-position: center;
background-repeat: no-repeat;
margin-right: 5px;
border-left: 1px solid silver;
border: 0;
color: white;
width: 50px;
height: 50px;
display: block;
float: right;
text-align: center;
font-size: 20pt;
line-height: 40pt;
}
body .et2_nextmatch .nm-mob-header div.nm_favorites_div {
background-position: center;
background-repeat: no-repeat;

View File

@ -701,6 +701,21 @@
-webkit-filter: none!important;
background-color: white !important;
}
div.nm_select_counter {
background-position: center;
background-repeat: no-repeat;
margin-right: 5px;
border-left: 1px solid silver;
border: 0;
color: white;
width: 50px;
height: 50px;
display: block;
float: right;
text-align: center;
font-size: 20pt;
line-height: 40pt;
}
div.nm_favorites_div {
background-position: center;
background-repeat: no-repeat;