1
function HISTORY(callback) {
2
window.dhtmlHistory.create({
4
return Object.toJSON(o);
6
fromJSON: function(s) {
11
dhtmlHistory.initialize();
12
// dhtmlHistory.addListener(callback);
15
this.callback = callback;
16
dhtmlHistory.addListener(this.onHistoryEvent(this));
19
HISTORY.prototype.onHistoryEvent = function(self) {
20
return function(newLocation, historyData) {
21
if (newLocation == "__startup__") {
23
adeiReportError(translate("History is exhausted"));
26
return self.callback(newLocation, historyData);
30
HISTORY.prototype.GetProps = function() {
31
return dhtmlHistory.getCurrentLocation();
34
HISTORY.prototype.Add = function(page, cfg) {
36
dhtmlHistory.add("__startup__", cfg);
40
dhtmlHistory.add(page, cfg);
43
HISTORY.prototype.AddSynonim = function(old_page, new_page) {
44
var cfg = historyStorage.get(old_page);
47
if (historyStorage.hasKey(new_page))
48
historyStorage.remove(new_page);
50
historyStorage.put(new_page, cfg);