Mercurial > hg > digilib-old
changeset 716:6b9b8e1401d8 jquery
goto page works now (with window.prompt)
author | robcast |
---|---|
date | Sun, 30 Jan 2011 18:52:19 +0100 |
parents | c1b1c463bc44 |
children | b3cd640b4b71 |
files | client/digitallibrary/jquery/jquery-test-full-rc.html client/digitallibrary/jquery/jquery.digilib.js |
diffstat | 2 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery-test-full-rc.html Sun Jan 30 18:32:40 2011 +0100 +++ b/client/digitallibrary/jquery/jquery-test-full-rc.html Sun Jan 30 18:52:19 2011 +0100 @@ -10,8 +10,6 @@ } div.digilib { - float: left; - padding: 10px; } div.buttons { @@ -19,7 +17,8 @@ right: 5px; top: 5px; padding: 3px; - background-color: silver; + background-color: transparent; + z-index: 20; } img.button:hover { @@ -44,7 +43,7 @@ position: absolute; /* border: 2px solid #ffa060; */ border: 2px solid #ff0000; - z-index: 200; + z-index: 100; } div.birdview { @@ -70,6 +69,11 @@ display: none; z-index: 1000; } + + div.bgDrag { + background-color: grey; + z-index: 0; + } </style>
--- a/client/digitallibrary/jquery/jquery.digilib.js Sun Jan 30 18:32:40 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Sun Jan 30 18:52:19 2011 +0100 @@ -77,8 +77,8 @@ img : "fwd.png" }, page : { - onclick : "javascript:gotoPageWin()", - tooltip : "specify image", + onclick : "gotoPage", + tooltip : "goto image number", img : "page.png" }, bird : { @@ -344,6 +344,9 @@ gotoPage : function (data, pageNr) { var settings = data.settings; var oldpn = settings.pn; + if (pageNr == null) { + pageNr = window.prompt("Goto page number", oldpn); + } var pn = setNumValue(settings, "pn", pageNr); if (pn == null) return false; // nothing happened if (pn < 1) { @@ -1367,6 +1370,7 @@ // sets a key to a value (relative values with +/- if relative=true) var setNumValue = function(settings, key, value) { + if (value == null) return null; if (isNumber(value)) { settings[key] = value; return value;