You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by ms...@apache.org on 2015/01/28 15:42:46 UTC
[11/14] portals-pluto git commit: Fixed problem with portlet hub
implementation history management
Fixed problem with portlet hub implementation history management
Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/419045cb
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/419045cb
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/419045cb
Branch: refs/heads/V3Prototype
Commit: 419045cb9549e2d9f0f14af7f9694e64a08a2676
Parents: e6cdc82
Author: Scott Nicklous <ms...@apache.org>
Authored: Wed Jan 28 12:55:41 2015 +0100
Committer: Scott Nicklous <ms...@apache.org>
Committed: Wed Jan 28 12:55:41 2015 +0100
----------------------------------------------------------------------
pluto-portal/src/main/webapp/portletHubImpl.js | 48 ++-------------------
1 file changed, 4 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/419045cb/pluto-portal/src/main/webapp/portletHubImpl.js
----------------------------------------------------------------------
diff --git a/pluto-portal/src/main/webapp/portletHubImpl.js b/pluto-portal/src/main/webapp/portletHubImpl.js
index ff27149..60eb8bf 100644
--- a/pluto-portal/src/main/webapp/portletHubImpl.js
+++ b/pluto-portal/src/main/webapp/portletHubImpl.js
@@ -525,28 +525,14 @@ var portlet = portlet || {};
if (pageState.prpMap[group].hasOwnProperty(tpid)) {
name = pageState.prpMap[group][tpid];
// only need to add parameter once, since it is shared
- if (!prpstrings.hasOwnProperty(name)) {
- prpstrings[name] = genParmString(tpid, name, PUBLIC_RENDER_PARAM, group);
- str += prpstrings[name];
+ if (!prpstrings.hasOwnProperty(group)) {
+ prpstrings[group] = genParmString(tpid, name, PUBLIC_RENDER_PARAM, group);
+ str += prpstrings[group];
}
}
}
}
}
-
-// for (tpid in pageState.portlets) {
-// if (pageState.portlets.hasOwnProperty(tpid)) {
-// names = pageState.portlets[tpid].pubParms;
-// for (ii=0; ii < names.length; ii++) {
-// name = names[ii];
-// // only need to add parameter once, since it is shared
-// if (!prpstrings.hasOwnProperty(name)) {
-// prpstrings[name] = genParmString(tpid, name, PUBLIC_RENDER_PARAM);
-// str += prpstrings[name];
-// }
-// }
-// }
-// }
url += str;
}
@@ -580,7 +566,7 @@ var portlet = portlet || {};
updateHistory = function (replace) {
if (doHistory) {
getUrl('RENDER', null, {}).then(function (url) {
- var token = JSON.stringify(pageState.portlets);
+ var token = JSON.stringify(pageState);
console.log("Updating history. URL =" + url + ", token length =" + token.length
+ ", token 30 chars =" + token.substring(0,30));
if (replace) {
@@ -622,32 +608,6 @@ var portlet = portlet || {};
}
}
-
- // process each portlet ID
-// pids = getIds();
-// for (ii = 0; ii < pids.length; ii++) {
-// tpid = pids[ii];
-//
-// // don't update for initiating portlet. that's done after the loop
-// if (tpid !== pid) {
-//
-// oldVal = getParmVal(tpid, prp);
-// prpNames = getPRPNames(tpid);
-//
-// // check for public parameter and if the value has changed
-// if ((prpNames.indexOf(prp) >= 0) &&
-// (_isParmEqual(oldVal, newVal) === false)) {
-//
-// if (newVal === undefined) {
-// delete pageState.portlets[tpid].state.parameters[prp];
-// } else {
-// pageState.portlets[tpid].state.parameters[prp] = newVal.slice(0);
-// }
-// upids.push(tpid);
-//
-// }
-// }
-// }
}
}