Skip to content

Commit

Permalink
Added check for the existence of a link href attribute pager
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Dutchak committed Mar 24, 2014
1 parent eebc131 commit cd22778
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions framework/zii/widgets/assets/gridview/jquery.yiigridview.js
Expand Up @@ -91,11 +91,14 @@
// Check to see if History.js is enabled for our Browser
if (settings.enableHistory && window.History.enabled) {
// Ajaxify this link
var url = $(this).attr('href').split('?'),
params = $.deparam.querystring('?'+ (url[1] || ''));
var href = $(this).attr('href');
if(href){
var url = href.split('?'),
params = $.deparam.querystring('?'+ (url[1] || ''));

delete params[settings.ajaxVar];
window.History.pushState(null, document.title, decodeURIComponent($.param.querystring(url[0], params)));
delete params[settings.ajaxVar];
window.History.pushState(null, document.title, decodeURIComponent($.param.querystring(url[0], params)));
}
} else {
$('#' + id).yiiGridView('update', {url: $(this).attr('href')});
}
Expand Down

0 comments on commit cd22778

Please sign in to comment.