Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion js/evolugrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"fixedHeader": false,
"rowClick": false,
"noResultsMessage": "> No results are available <",
"noMoreResultsMessage": "> No more results <",
"chevronUpClass" : "icon-chevron-up glyphicon glyphicon-chevron-up",
"chevronDownClass" : "icon-chevron-down glyphicon glyphicon-chevron-down",
"loadOnInitPage":0
Expand Down Expand Up @@ -746,7 +747,7 @@

if (init) {
//construct no more results
var noMoreResultsDiv = $('<div>').html("> No more results <").addClass("noMoreResults").css({'display':'none', 'font-style':'italic', 'text-align':'center', 'margin-top':20, 'margin-bottom':20});
var noMoreResultsDiv = $('<div>').html(descriptor.noMoreResultsMessage).addClass("noMoreResults").css({'display':'none', 'font-style':'italic', 'text-align':'center', 'margin-top':20, 'margin-bottom':20});
$this.append(noMoreResultsDiv);

if (descriptor.fixedHeader) {
Expand Down
26 changes: 26 additions & 0 deletions src/Mouf/Html/Widgets/EvoluGrid/EvoluGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ class EvoluGrid implements HtmlElementInterface
*/
private $noResultsMessage;

/**
* Message to display if no more results are shown.
*
* @var ValueInterface|string
*/
private $noMoreResultsMessage = "> No more results <";

/**
* The selector name for the DOM element that will receive the number of results.
*
Expand Down Expand Up @@ -454,6 +461,24 @@ public function setNoResultsMessage($noResultsMessage)
$this->noResultsMessage = $noResultsMessage;
}

/**
* @return ValueInterface|string
*/
public function getNoMoreResultsMessage()
{
return $this->noMoreResultsMessage;
}

/**
* If not set, message to display if no more results are shown will be '> No more results <'
*
* @param ValueInterface|string $noMoreResultsMessage
*/
public function setNoMoreResultsMessage($noMoreResultsMessage): void
{
$this->noMoreResultsMessage = $noMoreResultsMessage;
}

/**
* @return bool
*/
Expand Down Expand Up @@ -514,6 +539,7 @@ public function toHtml()
$descriptor->searchHistoryAutoFillForm = $this->searchHistoryAutoFillForm;
$descriptor->rowCssClass = $this->rowCssClass;
$descriptor->noResultsMessage = ValueUtils::val($this->noResultsMessage);
$descriptor->noMoreResultsMessage = ValueUtils::val($this->noMoreResultsMessage);
$descriptor->countTarget = $this->countTarget;
if ($this->chevronUpClass) {
$descriptor->chevronUpClass = $this->chevronUpClass;
Expand Down