* @singleton\r
*/\r
Ext.History = (function () {\r
- var iframe, hiddenField,\r
- ready = false,\r
- currentToken,\r
- ignoreNext = false;\r
+ var iframe, hiddenField;\r
+ var ready = false;\r
+ var currentToken;\r
\r
function getHash() {\r
var href = top.location.href, i = href.indexOf("#");\r
\r
function handleStateChange(token) {\r
currentToken = token;\r
- if(!(token == ignoreNext)){\r
- Ext.History.fireEvent('change', token);\r
- }\r
- ignoreNext = false;\r
+ Ext.History.fireEvent('change', token);\r
}\r
\r
function updateIFrame (token) {\r
return;\r
}\r
\r
- var doc = iframe.contentWindow.document,\r
- elem = doc.getElementById("state"),\r
- token = elem ? elem.innerText : null,\r
- hash = getHash();\r
+ var doc = iframe.contentWindow.document;\r
+ var elem = doc.getElementById("state");\r
+ var token = elem ? elem.innerText : null;\r
+\r
+ var hash = getHash();\r
\r
setInterval(function () {\r
\r
doc = iframe.contentWindow.document;\r
elem = doc.getElementById("state");\r
\r
- var newtoken = elem ? elem.innerText : null,\r
- newHash = getHash();\r
+ var newtoken = elem ? elem.innerText : null;\r
+\r
+ var newHash = getHash();\r
\r
if (newtoken !== token) {\r
token = newtoken;\r
* it will not save a new history step. Set to false if the same state can be saved more than once\r
* at the same history stack location (defaults to true).\r
*/\r
- add: function (token, preventDup, suppressEvent) {\r
+ add: function (token, preventDup) {\r
if(preventDup !== false){\r
if(this.getToken() == token){\r
return true;\r
}\r
}\r
- if(suppressEvent){\r
- ignoreNext = token;\r
- }\r
if (Ext.isIE) {\r
return updateIFrame(token);\r
} else {\r