').html("> No more results <").addClass("noMoreResults").css({'display':'none', 'font-style':'italic', 'text-align':'center', 'margin-top':20, 'margin-bottom':20});
+ var noMoreResultsDiv = $('
').html(descriptor.noMoreResultsMessage).addClass("noMoreResults");
$this.append(noMoreResultsDiv);
if (descriptor.fixedHeader) {
@@ -880,4 +881,4 @@
o.find('thead.header-copy> tr > th:eq('+i+')').width(w)
});
};
-})(jQuery);
\ No newline at end of file
+})(jQuery);
diff --git a/src/Mouf/Html/Widgets/EvoluGrid/EvoluGrid.php b/src/Mouf/Html/Widgets/EvoluGrid/EvoluGrid.php
index 95eed9d..124fbf0 100644
--- a/src/Mouf/Html/Widgets/EvoluGrid/EvoluGrid.php
+++ b/src/Mouf/Html/Widgets/EvoluGrid/EvoluGrid.php
@@ -62,7 +62,7 @@ class EvoluGrid implements HtmlElementInterface
/**
* Replaces the pagination by an infinite scroll.
- *
+ *
* @var bool
*/
private $infiniteScroll = false;
@@ -77,7 +77,7 @@ class EvoluGrid implements HtmlElementInterface
/**
* Fixed the header of the evolugrid table.
- *
+ *
* @var bool
*/
private $fixedHeader = false;
@@ -93,8 +93,8 @@ class EvoluGrid implements HtmlElementInterface
/**
* The search form that will be displayed just before the grid.
* If you want to put the search form somewhere else, you do not have to use this property.
- * You can instead use the formSelector to point to a form anywhere on your page.
- *
+ * You can instead use the formSelector to point to a form anywhere on your page.
+ *
* @var HtmlElementInterface
*/
private $searchForm;
@@ -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.
*
@@ -219,7 +226,7 @@ public function setLimit($limit)
/**
* The id of the evolugrid.
- *
+ *
* @param string $id
*/
public function setId($id)
@@ -229,7 +236,7 @@ public function setId($id)
/**
* The class of the evolugrid.
- *
+ *
* @param string $class
*/
public function setClass($class)
@@ -239,7 +246,7 @@ public function setClass($class)
/**
* Export the grid to CSV format.
- *
+ *
* @param bool $exportCSV
*/
public function setExportCSV($exportCSV)
@@ -260,7 +267,7 @@ public function setInfiniteScroll($infiniteScroll)
/**
* The position of the row which will launch the ajax call for infinite scroll when scrolling (start by the end).
* if empty, the default value is 5.
- *
+ *
* @param int $infiniteScroll_ElementPosition
*/
public function setInfiniteScrollElementPosition($infiniteScroll_ElementPosition)
@@ -281,7 +288,7 @@ public function setFixedHeader($fixedHeader)
/**
* CSS selector of the nav bar (to fix the evolugrid header just below).
* If empty, the header is fixed to the top of the window.
- *
+ *
* @param string $fixedHeader_NavBarSelector
*/
public function setFixedHeaderNavBarSelector($fixedHeader_NavBarSelector)
@@ -310,7 +317,7 @@ public function setCountTarget($countTarget)
/**
* Enable the search history when the user click on the previous page button.
- *
+ *
* @param bool $searchHistory
*/
public function setSearchHistory($searchHistory)
@@ -411,7 +418,7 @@ public function setCustomLoader($customLoader) {
$this->customLoader = $customLoader;
return $this;
}
-
+
/**
* @param string $onResultShown
*/
@@ -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
*/
@@ -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;
@@ -565,7 +591,7 @@ public function toHtml()
echo '

';
}
}
- echo '