# HG changeset patch
# User robcast
# Date 1296145781 -3600
# Node ID 09f61af0a6dd602b632832aaee3c963dffef8618
# Parent 215ef40435c88ca2fcb025ccb89a9e3082a25c72
re-created toggle for morebuttons (more = null)
diff -r 215ef40435c8 -r 09f61af0a6dd client/digitallibrary/jquery/jquery-test-full-rc.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/client/digitallibrary/jquery/jquery-test-full-rc.html Thu Jan 27 17:29:41 2011 +0100
@@ -0,0 +1,101 @@
+
+
+
+
+ Digilib jQuery Test: fullscreen
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 215ef40435c8 -r 09f61af0a6dd client/digitallibrary/jquery/jquery.digilib.js
--- a/client/digitallibrary/jquery/jquery.digilib.js Thu Jan 27 16:59:10 2011 +0100
+++ b/client/digitallibrary/jquery/jquery.digilib.js Thu Jan 27 17:29:41 2011 +0100
@@ -135,6 +135,11 @@
tooltip : "change image scale",
img : "original-size.png"
},
+ toggleoptions : {
+ onclick : "morebuttons",
+ tooltip : "more options",
+ img : "options.png"
+ },
moreoptions : {
onclick : ["morebuttons", "+1"],
tooltip : "more options",
@@ -194,14 +199,14 @@
'fullscreen' : {
// path to button images (must end with a slash)
'imagePath' : 'img/fullscreen/',
- 'standardSet' : ["reference","zoomin","zoomout","zoomarea","zoomfull","pagewidth","back","fwd","page","bird","SEP","help","reset","moreoptions"],
- 'specialSet' : ["mark","delmark","hmir","vmir","rot","brgt","cont","rgb","quality","size","calibrationx","scale","SEP","lessoptions"],
+ 'standardSet' : ["reference","zoomin","zoomout","zoomarea","zoomfull","pagewidth","back","fwd","page","bird","SEP","help","reset","toggleoptions"],
+ 'specialSet' : ["mark","delmark","hmir","vmir","rot","brgt","cont","rgb","quality","size","calibrationx","scale","SEP","toggleoptions"],
'buttonSets' : ['standardSet', 'specialSet']
},
'embedded' : {
'imagePath' : 'img/embedded/16/',
- 'standardSet' : ["reference","zoomin","zoomout","zoomarea","zoomfull","back","fwd","page","bird","SEP","help","reset","moreoptions"],
- 'specialSet' : ["hmir","vmir","rot","brgt","cont","rgb","quality","size","SEP","lessoptions"],
+ 'standardSet' : ["reference","zoomin","zoomout","zoomarea","zoomfull","back","fwd","page","bird","SEP","help","reset","toggleoptions"],
+ 'specialSet' : ["hmir","vmir","rot","brgt","cont","rgb","quality","size","SEP","toggleoptions"],
'buttonSets' : ['standardSet', 'specialSet']
}
},
@@ -435,6 +440,15 @@
// display more (or less) button sets
morebuttons : function (data, more) {
var settings = data.settings;
+ if (more == null) {
+ // toggle more or less
+ var maxbtns = settings.buttonSettings[settings.interactionMode].buttonSets.length;
+ if (settings.visibleButtonSets >= maxbtns) {
+ more = '-1';
+ } else {
+ more = '+1';
+ }
+ }
if (more === '-1') {
// remove set
var setIdx = settings.visibleButtonSets - 1;