Browse Source

HUE-266. Allow the user to choose their background as a preference.

* Fixing JSON encoding bug in session storage.
Aaron Newton 15 years ago
parent
commit
15ea7e24ec

+ 2 - 2
desktop/core/static/js/Source/CCS/CCS.Desktop.js

@@ -361,7 +361,7 @@ CCS.Desktop = {
 	//restores a state to the desktop
 	//states - (object) the state of all the open apps (returned by .serialize())
 	restore: function(states){
-		this.states = $H(JSON.decode(states));
+		this.states = $H(JSON.decode(unescape(states)));
 		var loaded_component;
 		if (this.states.getLength()) {
 			var hidden, msg;
@@ -462,7 +462,7 @@ CCS.Desktop = {
 	//stores the current desktop state
 	store: function(){
 		if (this.noSession) return;
-		var hashString = JSON.encode(this.serialize());
+		var hashString = escape(JSON.encode(this.serialize()));
 		var jsonRequest = new Request.JSON({
 				url: this.stateUrl,
 				method: "post",

+ 1 - 1
desktop/core/static/js/Source/CCS/CCS.JFrame.js

@@ -957,7 +957,7 @@ CCS.JFrame = new Class({
 
 		//if we're injecting into the main content body, cleanup and scrollto the top
 		if (!options.noScroll) this.scroller.toTop();
-                if (target == this.content) this._sweep(target);
+		if (target == this.content) this._sweep(target);
 
 
 		//if we're injecting into the main content body apply the view classes and remove the old one