Mercurial > hg > digilib
comparison client/digitallibrary/oldskin/dlMenu.html @ 445:bd9e35b0b17c
a little nicer implementation of back/next page in oldskin
author | robcast |
---|---|
date | Mon, 16 Jan 2006 20:53:44 +0100 |
parents | cb1ffdff2333 |
children |
comparison
equal
deleted
inserted
replaced
444:cb1ffdff2333 | 445:bd9e35b0b17c |
---|---|
20 } | 20 } |
21 | 21 |
22 /** | 22 /** |
23 * overriding 'page' in navigation.js | 23 * overriding 'page' in navigation.js |
24 */ | 24 */ |
25 function page(page, details) { | 25 function page(page, keep) { |
26 | 26 |
27 var pn = parseInt(parent.mainFrame.getParameter("pn")); | 27 parent.mainFrame.gotoPage(page, keep); |
28 var pt = parseInt(parent.mainFrame.getParameter("pt")); | 28 if (parent.pageFrame.show) { |
29 | 29 parent.pageFrame.show(); |
30 if ( details == null ) { | 30 } else { |
31 details = 35; // fn, pn, ws, mo + pt | 31 parent.pageFrame.location.reload(); |
32 } | |
33 | |
34 if ( page && page.indexOf('-') == 0 ) { | |
35 if ( pn > 1 ) { | |
36 page = Math.max(pn - parseInt(page.slice(1)), 1); | |
37 parent.mainFrame.setParameter("pn", page); | |
38 display(details); | |
39 } else { | |
40 alert("You are already on the first page!"); | |
41 } | |
42 } else if ( page && page.indexOf('+') == 0 ) { | |
43 if ( pn < pt ) { | |
44 page = Math.min(pn + parseInt(page.slice(1)), pt); | |
45 parent.mainFrame.setParameter("pn", page); | |
46 display(details); | |
47 } else { | |
48 alert("You are already on the last page!"); | |
49 } | |
50 } else if ( page && page == parseInt(page) ) { | |
51 if ( (page > 0) && (page <= pt) ) { | |
52 parent.mainFrame.setParameter("pn", page); | |
53 display(details); | |
54 } else { | |
55 alert ("Illegal page number (should be 1 - " + pt + ")!"); | |
56 } | |
57 } | 32 } |
58 } | 33 } |
59 | 34 |
60 /* | 35 /* |
61 * new display function to refresh the pagesTotal frame | 36 * new display function to refresh the pagesTotal frame |
105 // change in the menuitem its original mark | 80 // change in the menuitem its original mark |
106 var showHelp = false; | 81 var showHelp = false; |
107 | 82 |
108 // variable to tell if while changing to another page it should keep the area | 83 // variable to tell if while changing to another page it should keep the area |
109 // change in the menuitem its original mark | 84 // change in the menuitem its original mark |
110 var keepArea = 35; // fn, pn, ws, mo + pt | 85 var keepArea = false; |
111 | 86 |
112 | 87 |
113 // variable that store the texts for contexthelp | 88 // variable that store the texts for contexthelp |
114 var helpText = new Array(); | 89 var helpText = new Array(); |
115 | 90 |
156 <div id="menu25" class="item2" style="top:441"><center><a href="#" class="text" onClick="hideMenu(); setSize(2.5); return false;" onmouseover="overItem(25)" onmouseout="awayItem(25)">2.5</a></center></div> | 131 <div id="menu25" class="item2" style="top:441"><center><a href="#" class="text" onClick="hideMenu(); setSize(2.5); return false;" onmouseover="overItem(25)" onmouseout="awayItem(25)">2.5</a></center></div> |
157 <div id="menu26" class="item2" style="top:456"><center><a href="#" class="text" onClick="hideMenu(); setSize(3.0); return false;" onmouseover="overItem(26)" onmouseout="awayItem(26)">3.0</a></center></div> | 132 <div id="menu26" class="item2" style="top:456"><center><a href="#" class="text" onClick="hideMenu(); setSize(3.0); return false;" onmouseover="overItem(26)" onmouseout="awayItem(26)">3.0</a></center></div> |
158 | 133 |
159 <div id="menu3" class="menu" style="top:430; left:1; width:84; height:33; clip:rect(0,84,33,0)"></div> | 134 <div id="menu3" class="menu" style="top:430; left:1; width:84; height:33; clip:rect(0,84,33,0)"></div> |
160 <div id="menu31" class="item3" style="top:432"><center><a href="#" class="text" onclick="changeMark(31); hideMenu(); changeHelp(); return false;" onmouseover="overItem(31)" onmouseout="awayItem(31)"><img id="mark31" src="buttons/nomark.gif" border="0">Contexthelp</a></center></div> | 135 <div id="menu31" class="item3" style="top:432"><center><a href="#" class="text" onclick="changeMark(31); hideMenu(); changeHelp(); return false;" onmouseover="overItem(31)" onmouseout="awayItem(31)"><img id="mark31" src="buttons/nomark.gif" border="0">Contexthelp</a></center></div> |
161 <div id="menu32" class="item3" style="top:447"><center><a href="#" class="text" onclick="changeMark(32); keepArea = (keepArea == 47) ? 35 : 47; return false;" onmouseover="overItem(32)" onmouseout="awayItem(32)"><img id="mark32" src="buttons/nomark.gif" border="0">Keep area</a></center></div> | 136 <div id="menu32" class="item3" style="top:447"><center><a href="#" class="text" onclick="changeMark(32); keepArea = (keepArea) ? false : true; return false;" onmouseover="overItem(32)" onmouseout="awayItem(32)"><img id="mark32" src="buttons/nomark.gif" border="0">Keep area</a></center></div> |
162 <!-- <div id="logo" class="logo"> | 137 <!-- <div id="logo" class="logo"> |
163 <a href="http://digilib.berlios.de" target="_blank" > | 138 <a href="http://digilib.berlios.de" target="_blank" > |
164 <img border="0" src="../img/digilib-logo-text1.png" title="digilib"></img> | 139 <img border="0" src="../img/digilib-logo-text1.png" title="digilib"></img> |
165 </a> | 140 </a> |
166 </div> --> | 141 </div> --> |