Mercurial > hg > digilib-old
changeset 696:e05c60578bff jquery
add toggle for last buttonset
author | hertzhaft |
---|---|
date | Thu, 27 Jan 2011 15:37:39 +0100 |
parents | 5c39f5dd6296 |
children | 215ef40435c8 |
files | client/digitallibrary/jquery/jquery-test-embedded.html client/digitallibrary/jquery/jquery.digilib.js |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery-test-embedded.html Thu Jan 27 02:14:32 2011 +0100 +++ b/client/digitallibrary/jquery/jquery-test-embedded.html Thu Jan 27 15:37:39 2011 +0100 @@ -18,6 +18,8 @@ margin-left: 184px; top: 0px; padding: 2px; + background-color: grey; + opacity: 0.4; } div.button {
--- a/client/digitallibrary/jquery/jquery.digilib.js Thu Jan 27 02:14:32 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Thu Jan 27 15:37:39 2011 +0100 @@ -431,7 +431,10 @@ // display more (or less) button sets morebuttons : function (data, more) { - if (more === '-1') { + var settings = data.settings; + // toggle if all buffersets are shown + totalButtonSets = settings.buttonSettings[settings.interactionMode].buttonSets.length; + if (more === '-1' || data.visibleButtonSets === totalButtonSets) { // remove set var setIdx = data.visibleButtonSets - 1; var $lastSet = data.$buttonSets[setIdx];