Skip to content

Commit

Permalink
Merge pull request #1592 from mdomba/1584-enableHistory-with-pathUrl
Browse files Browse the repository at this point in the history
Fixes #1584 CGridView enableHistory with "path" urlFormat
[ci skip]
  • Loading branch information
mdomba committed Oct 22, 2012
2 parents 8bad9a5 + 276ce63 commit 2abc593
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Version 1.1.13 work in progress
- Bug #1485 CSort does not quote table alias when using CDbCriteria (undsoft)
- Bug #1499: Fixed CVarDumper highlighting "\" (antoncpu)
- Bug #1552: Fixed potential vulnerability in CJavaScript::encode(): $safe parameter didn't used to be passed to the recursive method calls (resurtm)
- Bug #1584: Fixed CGridView urls when enableHistory was used with "path" urlFormat (mdomba)
- Bug: Table schema is refreshed on Gii model generation when schemaCachingDuration is used (SonkoDmitry)
- Bug: CDbCommand::setFetchMode wasn't accepting additional arguments needed for PDO::FETCH_CLASS (samdark)
- Enh #84: Log route categories are now accepted in form of array. Added CLogRoute::except and parameter to CLogRoute::getLogs that allows you to exclude specific categories (paystey)
Expand Down
6 changes: 3 additions & 3 deletions framework/zii/widgets/assets/gridview/jquery.yiigridview.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@
// 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'),
params = $.deparam.querystring(url);
var url = $(this).attr('href').split('?'),
params = $.deparam.querystring('?'+url[1]);

delete params[settings.ajaxVar];
window.History.pushState(null, document.title, decodeURIComponent($.param.querystring(url.substr(0, url.indexOf('?')), params)));
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 2abc593

Please sign in to comment.