Changeset 10596
- Timestamp:
- 2005-09-06T17:15:58+12:00 (18 years ago)
- Location:
- trunk/gsdl/macros
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/macros/base.dm
r10383 r10596 53 53 54 54 _imagecollection_ {_If_("_iconcollection_" ne "", 55 <a href="_httppageabout_"><img src="_iconcollection_" border= 0title="_collectionname_"></a>,55 <a href="_httppageabout_"><img src="_iconcollection_" border="0" title="_collectionname_"></a>, 56 56 _imagecollectionv_)} 57 57 _imagecollection_ [v=1] {_imagecollectionv_} … … 127 127 _optnavigationbar_{_navigationbar_} 128 128 129 _usability_ {}130 131 129 # all cgi args are set as _cgiargX_ macros - those I've put here 132 130 # are those that need to default to something … … 182 180 # 5. image alt text 183 181 _gsimage_ {<a href="_1_" onMouseover="roll('_4_',1);" onMouseOut="roll('_4_',0);"><img 184 name="_4_" src="_2_" onLoad="gbutton(this,'_3_');" border= 0alt="_5_" title="_5_"></a>}182 name="_4_" src="_2_" onLoad="gbutton(this,'_3_');" border="0" alt="_5_" title="_5_"></a>} 185 183 186 184 _gsimage_ [v=1] {<a href="_1_">_5_</a><br>} 187 188 _usabilityscript_ {}189 190 _usabshowscript_ {191 192 //this is for where something goes wrong and an error message has to be shown.193 function failnicely(message,usabwindow)\{194 var errhtml='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';195 errhtml+='<head><title>_greenstoneusabilitytext__texterror_</title><meta http-equiv="Content-Type" content="text/html; charset=_cgiargw_"></head><body bgcolor="#FFFFFF">';196 errhtml+='_usabbanner_';197 errhtml+=message;198 errhtml+='<p><form action=""><input type="button" value="_textclosewindow_" onClick="window.close();"></form>';199 errhtml+='</body></html>';200 usabwindow.document.write(errhtml);201 usabwindow.document.close();202 \}203 204 function usabilityfunction()\{205 206 checkusab=window.open("","checkusab","scrollbars=1,toolbars=0,height=600,width=420");207 208 //set up the window209 var winhtml='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';210 winhtml += '<html><head><title>_greenstoneusabilitytext_</title>';211 winhtml += '<script type="text/javascript">\\n';212 213 //this function is for getting the time when the complaint data is sent214 winhtml += 'function gettime()\\{\\n';215 winhtml += 'document.usabform.sendtime.value = (new Date()).toString();\\n'216 winhtml+='\\}\\n';217 218 //this function is to allow the user to track the usability report219 winhtml+='function viewdetails()\\{\\n';220 winhtml+='\\t alert(\\'_textunderdev_\\');\\}';221 222 //this function is to show the privacy/about data in a new window223 winhtml+='function infowindow(url)\\{ \\224 infowin = window.open(url,\\'infowin\\',\\'toolbars=0, height=600, width=600\\'); \\225 \\}';226 227 winhtml += '</script>';228 if(navigator.appName!="Netscape" || parseInt(navigator.appVersion)>=5)\{229 winhtml += '_usabstyle_';230 \}231 232 //need a character type for valid html233 winhtml+='<meta http-equiv="Content-Type" content="text/html; charset=_cgiargw_"></head><body bgcolor=\"#FFFFFF\">';234 235 //get the location of the cgi program236 cgiloc='_gwcgi_';237 if(cgiloc.lastIndexOf("/")<0)\{238 failnicely('_cannotfindcgierror_', checkusab);239 return;240 \}241 cgiloc=cgiloc.substring(0,(cgiloc.lastIndexOf("/")+1));242 cgiloc+='perl.cgi';243 244 //adds the banner with the koru-thing and the links to about and privacy245 //information246 winhtml+='_usabbanner_';247 winhtml+='_aboutprivacylinks_';248 249 250 // set up the form251 winhtml += '<form name="usabform" method="post" action="'+cgiloc+'" onSubmit="gettime();">';252 winhtml += '_usabinterface_';253 254 255 //get javascript environment variables256 257 // to replace &s in the URL with &s258 urlgs=new String(window.location);259 a=urlgs.split("&");260 urlgs=a.join("&");261 winhtml+=('<input type="hidden" name="URL" value="'+urlgs+'">');262 263 winhtml+=('<input type="hidden" name="resolution" value="'+window.screen.width+'x'+window.screen.height+'">');264 winhtml+=('<input type="hidden" name="screencolour" value="'+window.screen.color+'">');265 266 //colordepth and pixeldepth are NS and IE versions of the same thing.267 if(screen.colorDepth)\{268 winhtml+=('<input type="hidden" name="pixeldepth" value="'+window.screen.colorDepth+'">');269 \}270 else\{271 winhtml+=('<input type="hidden" name="pixeldepth" value="'+window.screen.pixelDepth+'">');272 \}273 274 winhtml+=('<input type="hidden" name="browser" value="'+navigator.platform+' ,'+navigator.appName+', '+navigator.appVersion+', '+navigator.appCodeName+', '+navigator.appUserAgent+'">');275 winhtml+=('<input type="hidden" name="language" value="'+navigator.language+'">');276 winhtml+=('<input type="hidden" name="opentime" value="'+(new Date()).toString()+'">');277 winhtml+=('<input type="hidden" name="sendtime" value="None">');278 winhtml+=('<input type="hidden" name="collection" value="_cgiargc_">');279 if(document.getElementsByTagName)\{280 //get interface variables281 if(document.getElementsByTagName("form"))\{282 docarray=document.getElementsByTagName("input");283 if(docarray.length>0)\{284 for(i=0; i<docarray.length; i++)\{285 //this leaves out uninteresting inputs, such as buttons286 //and unchecked checkboxes287 if(docarray[i].type!='reset' && docarray[i].type!='button' &&288 docarray[i].type!='image' && docarray[i].type!='submit'289 && !((docarray[i].type=='radio'|| docarray[i].type=='checkbox') &&290 !docarray[i].checked))\{291 winhtml+=('<input type="hidden" name="'+docarray[i].type+'-'+docarray[i].name+'" value="'+docarray[i].value+'">');292 \}293 \}294 \}295 docarray=document.getElementsByTagName("select")296 if(docarray.length>0)\{297 for(i=0; i<docarray.length; i++)\{298 winhtml+=('<input type="hidden" name="'+docarray[i].type+'-'+docarray[i].name+'" value="'+docarray[i].value+'">');299 \}300 \}301 docarray=document.getElementsByTagName("textarea")302 if(docarray.length>0)\{303 for(i=0; i<docarray.length; i++)\{304 winhtml+=('<input type="hidden" name="'+docarray[i].type+'-'+docarray[i].name+'" value="'+docarray[i].value+'">');305 \}306 \}307 \}308 \}309 //finish the form310 winhtml += '</form>';311 312 winhtml +='</body></html>'313 314 315 //write to the window316 checkusab.document.write(winhtml);317 checkusab.document.close();318 return;319 320 \}321 }322 323 #####################################################################324 #325 # These macros are for use by the usability logging (I'd like to326 # complain) functionality - they are to be included in a JavaScript327 # string, hence the \s328 #329 #####################################################################330 331 _usabinterface_{}332 333 #the banner to "brand" any boxes as part of the usability interface334 _usabbanner_{<table width=\"100%\"><tr><td><h1>_greenstoneusabilitytext_</h1></td><td align="right" width="135"><img src=\"_httpusabbanner_\" title=\"_textusabbanner_\" alt=\"_textusabbanner_\"></td></tr></table>}335 336 #the about and privacy lins separated by a mid dot.337 _aboutprivacylinks_ {<p class="label"><a href="javascript:infowindow(\\'http://nzdl2.cs.waikato.ac.nz/dana/gsdl/about.html\\')">_textabout_</a> • <a href="javascript:infowindow(\\'http://nzdl2.cs.waikato.ac.nz/dana/gsdl/privacy.html\\')">_textprivacy_</a>}338 339 #gives a text only interface with some guff about privacy340 _usabtextonly_{ \\341 _textwhy_\\342 _textprivacybasic_\\343 _textstillsend_\\344 _usabyesnosubmit_}345 346 _usabyesnosubmit_{<p><input type="submit" value="_textyes_"><input type="button" value="_textno_" onClick="window.close();">}347 348 #gives an interface with the privacy guff at the bottom, and349 #steps to describe the problem350 _usabstepwise_{\\351 <p>_textwhatdoing_<br> \\352 <textarea name="doingwhat" rows="3" cols="40"></textarea> \\353 <p>_textwhatexpected_<br> \\354 <textarea name="whatexpected" rows="6" cols="40"></textarea> \\355 <p>_textwhathappened_<br> \\356 <textarea name="whathappened" rows="6" cols="40"></textarea> \\357 _usabtextonly_}358 359 #gives a multipart interface allowing the user to fill out less or more.360 _usabmulti_{\\361 _textwhy__textextraforform_\\362 <h2>_textoptionally_:</h2>\\363 <p class="label">_textmoredetails_:<br>\\364 <textarea name="moredetails" rows="6" cols="45"></textarea>\\365 <table><tr><td>\\366 <p class="label">_textcharacterise_? </td>\\367 <td><select name="probtype">\\368 <option>\\369 <option>_textbadrender_\\370 <option>_textcontenterror_\\371 <option>_textstrangebehaviour_\\372 <option>_textunexpected_\\373 <option>_textfunctionality_\\374 <option>_textother_\\375 </select></td></tr>\\376 <tr><td><p class="label">_textseverity_? </td>\\377 <td><select name="severity">\\378 <option>\\379 <option>_textcritical_\\380 <option>_textmajor_\\381 <option>_textmedium_\\382 <option>_textminor_\\383 <option>_texttrivial_\\384 </select>\\385 </td></tr></table>\\386 _textprivacybasic__textstillsend_\\387 <table width="100%"><tr><td><a href="javascript:viewdetails()"><p class="label">_textviewdetails_</a></td><td align="right"><button type="button" onClick="window.close()"><b>_textdontsend_</b></button></td><td align="right"><button type="submit"><b>_textsend_</b></button></td></tr></table>\\388 }389 390 #style definitions to please NS 4.7391 _usabstyle_{\\392 <style type="text/css">\\393 \\394 table \{ width: 100% \} \\395 td.right \{ align:right \} \\396 \\397 h1 \{font-size:20px; font-family: sans-serif; vertical-align:middle\\} \\398 h2 \{font-size:14px; color: #009966; font-family: sans-serif; font-weight:bold \}\\399 p.label \{ font-family:sans-serif; \}\\400 </style>\\401 }402 403 185 404 186 … … 461 243 # the page. 462 244 463 _javalinks_ {_imagehome_ _imagehelp_ _imagepref_ _usability_}245 _javalinks_ {_imagehome_ _imagehelp_ _imagepref_} 464 246 _javalinks_ [v=1] { 465 247 _imagehome_<br> 466 248 _imagehelp_<br> 467 249 _imagepref_<br> 468 _usability_<br>469 250 } 470 251 … … 682 463 683 464 _iconnext_{<img src="_httpiconmore_" align=absbottom 684 width=_widthmore_ height=_heightmore_ border= 0alt="_texticonnext_" title="_texticonnext_">}465 width=_widthmore_ height=_heightmore_ border="0" alt="_texticonnext_" title="_texticonnext_">} 685 466 _iconnext_[v=1] {_texticonnext_} 686 467 687 468 _iconprev_{<img src="_httpiconless_" align=absbottom 688 width=_widthless_ height=_heightless_ border= 0alt="_texticonprev_" title="_texticonprev_">}469 width=_widthless_ height=_heightless_ border="0" alt="_texticonprev_" title="_texticonprev_">} 689 470 _iconprev_[v=1] {_texticonprev_} 690 471 691 472 _icontabsearchgreen_ {<img 692 src="_httpicontsrchgr_" width= _widthtsrchx_ border=0>}473 src="_httpicontsrchgr_" width="_widthtsrchx_" border="0">} 693 474 _icontabsearchgreen_[v=1] {_texticontabsearchgreen_} 694 475 … … 696 477 # Dublin Core Metadata Element Set, Version 1.1 697 478 698 _icontabTitlegreen_ {<img src="_httpiconttitlegr_" width= _widthttitlex_ border=0>}479 _icontabTitlegreen_ {<img src="_httpiconttitlegr_" width="_widthttitlex_" border="0">} 699 480 _icontabTitlegreen_[v=1] {_texticontabTitlegreen_} 700 481 701 _icontabCreatorgreen_ {<img src="_httpicontcreatgr_" width= _widthtcreatx_border=0>}482 _icontabCreatorgreen_ {<img src="_httpicontcreatgr_" width="_widthtcreatx_" border=0>} 702 483 _icontabCreatorgreen_[v=1] {_texticontabCreatorgreen_} 703 484 -
trunk/gsdl/macros/style.dm
r9333 r10596 145 145 _imagescript_ 146 146 _pagescriptextra_ 147 _usabilityscript_148 147 // --> 149 148 </script>
Note:
See TracChangeset
for help on using the changeset viewer.