Last change
on this file since 263 was
256,
checked in by hendrikvanantwerpen, 13 years ago
|
Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).
|
File size:
974 bytes
|
Line | |
---|
1 | /* |
---|
2 | ApplicationState is an object that represents the application state. |
---|
3 | It will be given to dojo.undo.browser to represent the current application state. |
---|
4 | */ |
---|
5 | ApplicationState = function(stateData, outputDivId, backForwardOutputDivId, bookmarkValue){ |
---|
6 | this.stateData = stateData; |
---|
7 | this.outputDivId = outputDivId; |
---|
8 | this.backForwardOutputDivId = backForwardOutputDivId; |
---|
9 | this.changeUrl = bookmarkValue; |
---|
10 | }; |
---|
11 | |
---|
12 | ApplicationState.prototype.back = function(){ |
---|
13 | this.showBackForwardMessage("BACK for State Data: " + this.stateData); |
---|
14 | this.showStateData(); |
---|
15 | }; |
---|
16 | |
---|
17 | ApplicationState.prototype.forward = function(){ |
---|
18 | this.showBackForwardMessage("FORWARD for State Data: " + this.stateData); |
---|
19 | this.showStateData(); |
---|
20 | }; |
---|
21 | |
---|
22 | ApplicationState.prototype.showStateData = function(){ |
---|
23 | dojo.byId(this.outputDivId).innerHTML += this.stateData + '<br />'; |
---|
24 | }; |
---|
25 | |
---|
26 | ApplicationState.prototype.showBackForwardMessage = function(message){ |
---|
27 | dojo.byId(this.backForwardOutputDivId).innerHTML += message + '<br />'; |
---|
28 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.