Mercurial > hg > digilib-old
changeset 914:1180d7a6aec1
added suppressParamNames for half-embedded mode.
author | robcast |
---|---|
date | Thu, 11 Aug 2011 15:27:09 +0200 |
parents | ad071f122164 |
children | ee3383f80cb0 |
files | webapp/src/main/webapp/jquery/jquery.digilib.js |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.js Wed Aug 10 21:17:16 2011 +0200 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.js Thu Aug 11 15:27:09 2011 +0200 @@ -228,6 +228,8 @@ 'clop' : '', // list of additional parameters (for page outside of digilib) 'additionalParamNames' : [], + // list of parameters to suppress when generating page URL + 'suppressParamNames' : null, // mode of operation: // fullscreen = take parameters from page URL, keep state in page URL // embedded = take parameters from Javascript options, keep state inside object @@ -773,6 +775,16 @@ packParams(data); var settings = data.settings; var paramList = settings.additionalParamNames.concat(settings.digilibParamNames); + if (settings.suppressParamNames != null) { + // eliminate suppressed parameters from list + paramList = $.map(paramList, function(e, idx) { + if ($.inArray(e, settings.suppressParamNames) >= 0) { + return null; + } else { + return e; + } + }); + } var queryString = getParamString(settings, paramList, defaults); // take url from current location var url = window.location.href;