Skip to content
Open
Changes from all commits
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
11 changes: 5 additions & 6 deletions assets/js/grido.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@
*/
onSuccessEvent: function(params, url)
{
params.url = url;
params.grido = true;
window.history.pushState(params, document.title, url);
},

Expand All @@ -487,12 +489,9 @@
*/
onPopState: function(event)
{
var state = $.data(document, this.grido.name + '-query') || '',
query = window.location.search;

if (state !== query) {
var url = this.getRefreshGridHandlerUrl(this.grido.$element);
this.doRequest(url);
var state = event.originalEvent.state;
if (state.grido) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

staci, ked bude state = '' a query lubovolny string (teda niekde mimo grido niekto nastavi hash), tak grido robi request na refresh. Aspon ak si dobre pamatam, tak toto som riesil

this.doRequest(state.url);
}
},

Expand Down