mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
fix not applied blur on initial load and also disable optimization for CRM-view and the like
This commit is contained in:
parent
558ad6707d
commit
36816a89c1
@ -1282,8 +1282,9 @@ class infolog_bo
|
||||
unset($q['limit_modified_n_month']);
|
||||
for($n = 1; $n <= self::LIMIT_MODIFIED_RETRY; $n *= 2)
|
||||
{
|
||||
// apply modified limit only if requested AND we're sorting by modified AND NOT searching
|
||||
if (!empty($query['limit_modified_n_month']) && empty($query['search']) &&
|
||||
// apply modified limit only if requested AND we're sorting by modified AND NOT (searching, CRM-view, ...)
|
||||
if (!empty($query['limit_modified_n_month']) && empty($query['search']) && // no search
|
||||
empty($query['action']) && empty($query['action_id']) && empty($query['info_id']) && // no CRM view
|
||||
$query['order'] === 'info_datemodified' && $query['sort'] === 'DESC' &&
|
||||
isset($query['start']))
|
||||
{
|
||||
@ -1291,12 +1292,12 @@ class infolog_bo
|
||||
(new Api\DateTime((-$n*$query['limit_modified_n_month']).' month'))->format('server');
|
||||
}
|
||||
$ret = $this->so->search($q, $no_acl);
|
||||
$this->total = $q['total'];
|
||||
$this->total = $query['total'] = $q['total'];
|
||||
if (!isset($q['col_filter'][99]) || count($ret) >= $query['num_rows'])
|
||||
{
|
||||
if (isset($q['col_filter'][99]))
|
||||
{
|
||||
$this->total = self::LIMIT_MODIFIED_TOTAL;
|
||||
$this->total = $query['total'] = self::LIMIT_MODIFIED_TOTAL;
|
||||
}
|
||||
break; // --> no modified limit, or got enough rows
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ var InfologApp = /** @class */ (function (_super) {
|
||||
* @param {string} _name template name
|
||||
*/
|
||||
InfologApp.prototype.et2_ready = function (_et2, _name) {
|
||||
var _a;
|
||||
// call parent
|
||||
_super.prototype.et2_ready.call(this, _et2, _name);
|
||||
// CRM View
|
||||
@ -91,7 +92,7 @@ var InfologApp = /** @class */ (function (_super) {
|
||||
this._get_stylite(function () { this.mailvelopeAvailable(function () { var _a; (_a = app.stylite) === null || _a === void 0 ? void 0 : _a.decrypt_hover(nm); }); });
|
||||
}
|
||||
// blur count, if limit modified optimization used
|
||||
if ((nm === null || nm === void 0 ? void 0 : nm.getValue()).total == 9999) {
|
||||
if (((_a = nm.getController()) === null || _a === void 0 ? void 0 : _a.getTotalCount()) === 9999) {
|
||||
this.blurCount(true);
|
||||
}
|
||||
break;
|
||||
@ -737,7 +738,8 @@ var InfologApp = /** @class */ (function (_super) {
|
||||
* @param blur
|
||||
*/
|
||||
InfologApp.prototype.blurCount = function (blur) {
|
||||
document.querySelector('div#infolog-index_nm.et2_nextmatch .header_count').classList.toggle('blur_count', blur);
|
||||
var _a;
|
||||
(_a = document.querySelector('div#infolog-index_nm.et2_nextmatch .header_count')) === null || _a === void 0 ? void 0 : _a.classList.toggle('blur_count', blur);
|
||||
};
|
||||
return InfologApp;
|
||||
}(egw_app_1.EgwApp));
|
||||
|
@ -92,7 +92,7 @@ class InfologApp extends EgwApp
|
||||
this._get_stylite(function() {this.mailvelopeAvailable(function() {app.stylite?.decrypt_hover(nm);});});
|
||||
}
|
||||
// blur count, if limit modified optimization used
|
||||
if ((<any>nm?.getValue()).total == 9999)
|
||||
if (nm.getController()?.getTotalCount() === 9999)
|
||||
{
|
||||
this.blurCount(true);
|
||||
}
|
||||
@ -884,7 +884,7 @@ class InfologApp extends EgwApp
|
||||
*/
|
||||
blurCount(blur : boolean)
|
||||
{
|
||||
document.querySelector('div#infolog-index_nm.et2_nextmatch .header_count').classList.toggle('blur_count', blur);
|
||||
document.querySelector('div#infolog-index_nm.et2_nextmatch .header_count')?.classList.toggle('blur_count', blur);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user