From f9fa811e2e5a4ecff364fd9469229e906670f419 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 4 Jul 2018 16:43:53 +0200 Subject: [PATCH] Take nm response after initialization into account when trying to create emptyRow for placeholders action --- api/js/etemplate/et2_dataview_controller.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/api/js/etemplate/et2_dataview_controller.js b/api/js/etemplate/et2_dataview_controller.js index 5d84b7a377..cf1ab15c97 100644 --- a/api/js/etemplate/et2_dataview_controller.js +++ b/api/js/etemplate/et2_dataview_controller.js @@ -232,7 +232,7 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({ { // No rows, start with an empty this._selectionMgr.clear(); - this._emptyRow(); + this._emptyRow(this._grid._total); } }, @@ -898,20 +898,21 @@ var et2_dataview_controller = (function(){ "use strict"; return Class.extend({ /** * Insert an empty / placeholder row when there is no data to display */ - _emptyRow: function() + _emptyRow: function(_noRows) { + var noRows = _noRows || true; jQuery(".egwGridView_empty",this._grid.innerTbody).remove(); if(typeof this._grid._rowProvider != "undefined" && this._grid._rowProvider.getPrototype("empty")) { var placeholder = this._grid._rowProvider.getPrototype("empty"); if(jQuery("td",placeholder).length == 1) { - jQuery("td",placeholder).css("width",this._grid.outerCell.width() + "px") + jQuery("td",placeholder).css("width",this._grid.outerCell.width() + "px") } placeholder.appendTo(this._grid.innerTbody); // Register placeholder action only if no rows - if (this._grid._total == 0) + if (noRows) { // Get the action links if the links callback is set var links = null;