#19914: Fixing history state management in IE9

Work Item: 19914
This commit is contained in:
Sebastien Ros
2013-07-18 11:46:09 -07:00
parent 53936d20f8
commit 2894a2d590
2 changed files with 6 additions and 6 deletions

View File

@@ -107,7 +107,7 @@
//<![CDATA[
$(function () {
function MediaPartViewModel(data) {
var self = this;
@@ -246,12 +246,12 @@
};
self.selectFolder = function (folderPath) {
window.history.pushState({ action: 'displayFolder', folderPath: folderPath }, '', '?folderPath=' + folderPath);
History.pushState({ action: 'displayFolder', folderPath: folderPath }, '', '?folderPath=' + folderPath);
self.displayFolder(folderPath);
};
self.selectRecent = function () {
window.history.pushState({ action: 'selectRecent' }, '', '?recent');
History.pushState({ action: 'selectRecent' }, '', '?recent');
self.results([]);
self.displayed(null);
@@ -363,13 +363,13 @@
@if (viewModel.FolderPath != null) {
<text>
viewModel.displayFolder('@HttpUtility.JavaScriptStringEncode(viewModel.FolderPath)');
window.history.pushState({ action: 'displayFolder', folderPath: '@HttpUtility.JavaScriptStringEncode(viewModel.FolderPath)' }, '', '?folderPath=@HttpUtility.UrlEncode(viewModel.FolderPath)');
History.pushState({ action: 'displayFolder', folderPath: '@HttpUtility.JavaScriptStringEncode(viewModel.FolderPath)' }, '', '?folderPath=@HttpUtility.UrlEncode(viewModel.FolderPath)');
</text>
}
else {
<text>
viewModel.selectRecent();
window.history.pushState({ action: 'selectRecent' }, '', '?recent');
History.pushState({ action: 'selectRecent' }, '', '?recent');
</text>
}