diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2016-09-15 06:44:59 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2016-09-15 06:44:59 +0300 |
commit | 16208fb629e2ab15245ef67771fff4c1a2011298 (patch) | |
tree | 692477feed700d97929addcead210634b8fb1743 /plugins/CoreHome/javascripts/broadcast.js | |
parent | 783e3f544a71e48b3bc4740420904021404f422a (diff) |
add possibility to update search and hash separately
Diffstat (limited to 'plugins/CoreHome/javascripts/broadcast.js')
-rw-r--r-- | plugins/CoreHome/javascripts/broadcast.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js index c4152b197f..ba953e84ec 100644 --- a/plugins/CoreHome/javascripts/broadcast.js +++ b/plugins/CoreHome/javascripts/broadcast.js @@ -247,9 +247,10 @@ var broadcast = { * * @param {string} str url with parameters to be updated * @param {boolean} [showAjaxLoading] whether to show the ajax loading gif or not. + * @param {string} strHash additional parameters that should be updated on the hash * @return {void} */ - propagateNewPage: function (str, showAjaxLoading) { + propagateNewPage: function (str, showAjaxLoading, strHash) { // abort all existing ajax requests globalAjaxQueue.abort(); @@ -273,6 +274,13 @@ var broadcast = { } } + if (strHash && currentHashStr.length != 0) { + var params_hash_vals = strHash.split("&"); + for (var i = 0; i < params_hash_vals.length; i++) { + currentHashStr = broadcast.updateParamValue(params_hash_vals[i], currentHashStr); + } + } + // Now load the new page. var newUrl = currentSearchStr + currentHashStr; |