浏览代码

HUE-213. Add ability to update the query string of the current path without reloading the window.

Fixing issue where the path being removed was not being removed because I was trying to remove the key instead of the value.
Aaron Newton 15 年之前
父节点
当前提交
701a784b5f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      desktop/core/static/js/Source/JFrameLinkers/CCS.JFrame.LivePath.js

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

@@ -46,6 +46,7 @@ script: CCS.JFrame.LivePath.js
 			var okToAdd = action == "toggle" || action == "add";
 			var okToAdd = action == "toggle" || action == "add";
 			for (path in paths){
 			for (path in paths){
 				var state = uri.getData(path);
 				var state = uri.getData(path);
+				if (window.paused) debugger;
 				if (!state) {
 				if (!state) {
 					uri.setData(path, paths[path]);
 					uri.setData(path, paths[path]);
 				} else if ($type(state) == "string") {
 				} else if ($type(state) == "string") {
@@ -54,7 +55,7 @@ script: CCS.JFrame.LivePath.js
 					else if (okToAdd)
 					else if (okToAdd)
 						uri.setData(path, [state, paths[path]]);
 						uri.setData(path, [state, paths[path]]);
 				} else if ($type(state) == "array") {
 				} else if ($type(state) == "array") {
-					if (state.contains(path) && okToRemove) state.erase(path);
+					if (state.contains(paths[path]) && okToRemove) state.erase(paths[path]);
 					else if (okToAdd) state.push(paths[path]);
 					else if (okToAdd) state.push(paths[path]);
 
 
 					if (state.length) uri.setData(path, state);
 					if (state.length) uri.setData(path, state);