Changeset 10596


Ignore:
Timestamp:
2005-09-06T17:15:58+12:00 (19 years ago)
Author:
jrm21
Message:

remove usability stuff from the default macro files

Location:
trunk/gsdl/macros
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/macros/base.dm

    r10383 r10596  
    5353
    5454_imagecollection_ {_If_("_iconcollection_" ne "",
    55 <a href="_httppageabout_"><img src="_iconcollection_" border=0 title="_collectionname_"></a>,
     55<a href="_httppageabout_"><img src="_iconcollection_" border="0" title="_collectionname_"></a>,
    5656_imagecollectionv_)}
    5757_imagecollection_ [v=1] {_imagecollectionv_}
     
    127127_optnavigationbar_{_navigationbar_}
    128128
    129 _usability_ {}
    130 
    131129# all cgi args are set as _cgiargX_ macros - those I've put here
    132130# are those that need to default to something
     
    182180# 5. image alt text
    183181_gsimage_ {<a href="_1_" onMouseover="roll('_4_',1);" onMouseOut="roll('_4_',0);"><img
    184 name="_4_" src="_2_" onLoad="gbutton(this,'_3_');" border=0 alt="_5_" title="_5_"></a>}
     182name="_4_" src="_2_" onLoad="gbutton(this,'_3_');" border="0" alt="_5_" title="_5_"></a>}
    185183
    186184_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 window
    209   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 sent
    214   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 report   
    219   winhtml+='function viewdetails()\\{\\n';
    220   winhtml+='\\t alert(\\'_textunderdev_\\');\\}';   
    221 
    222   //this function is to show the privacy/about data in a new window
    223   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 html
    233   winhtml+='<meta http-equiv="Content-Type" content="text/html; charset=_cgiargw_"></head><body bgcolor=\"#FFFFFF\">';
    234 
    235   //get the location of the cgi program
    236   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 privacy
    245   //information
    246   winhtml+='_usabbanner_';
    247   winhtml+='_aboutprivacylinks_';
    248    
    249 
    250   // set up the form   
    251   winhtml += '<form name="usabform" method="post" action="'+cgiloc+'" onSubmit="gettime();">';
    252   winhtml += '_usabinterface_';
    253 
    254 
    255   //get javascript environment variables
    256 
    257   // to replace &s in the URL with &amp;s
    258   urlgs=new String(window.location);
    259   a=urlgs.split("&");
    260   urlgs=a.join("&amp;");
    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 variables
    281    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 buttons
    286       //and unchecked checkboxes
    287          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 form
    310   winhtml += '</form>';
    311  
    312   winhtml +='</body></html>'
    313 
    314    
    315   //write to the window
    316   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 to
    326 #  complain)  functionality - they are to be included in a JavaScript
    327 #  string, hence the \s
    328 #
    329 #####################################################################
    330 
    331 _usabinterface_{}
    332 
    333 #the banner to "brand" any boxes as part of the usability interface
    334 _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> &#8226; <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 privacy
    340 _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, and
    349 #steps to describe the problem
    350 _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.7
    391 _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 
    403185
    404186
     
    461243# the page.
    462244
    463 _javalinks_ {_imagehome_ _imagehelp_ _imagepref_ _usability_}
     245_javalinks_ {_imagehome_ _imagehelp_ _imagepref_}
    464246_javalinks_ [v=1] {
    465247_imagehome_<br>
    466248_imagehelp_<br>
    467249_imagepref_<br>
    468 _usability_<br>
    469250}
    470251
     
    682463
    683464_iconnext_{<img src="_httpiconmore_" align=absbottom
    684 width=_widthmore_ height=_heightmore_ border=0 alt="_texticonnext_" title="_texticonnext_">}
     465width=_widthmore_ height=_heightmore_ border="0" alt="_texticonnext_" title="_texticonnext_">}
    685466_iconnext_[v=1] {_texticonnext_}
    686467
    687468_iconprev_{<img src="_httpiconless_" align=absbottom
    688 width=_widthless_ height=_heightless_ border=0 alt="_texticonprev_" title="_texticonprev_">}
     469width=_widthless_ height=_heightless_ border="0" alt="_texticonprev_" title="_texticonprev_">}
    689470_iconprev_[v=1] {_texticonprev_}
    690471
    691472_icontabsearchgreen_ {<img
    692 src="_httpicontsrchgr_" width=_widthtsrchx_ border=0>}
     473src="_httpicontsrchgr_" width="_widthtsrchx_" border="0">}
    693474_icontabsearchgreen_[v=1] {_texticontabsearchgreen_}
    694475
     
    696477# Dublin Core Metadata Element Set, Version 1.1
    697478
    698 _icontabTitlegreen_ {<img src="_httpiconttitlegr_" width=_widthttitlex_ border=0>}
     479_icontabTitlegreen_ {<img src="_httpiconttitlegr_" width="_widthttitlex_" border="0">}
    699480_icontabTitlegreen_[v=1] {_texticontabTitlegreen_}
    700481
    701 _icontabCreatorgreen_ {<img src="_httpicontcreatgr_" width=_widthtcreatx_ border=0>}
     482_icontabCreatorgreen_ {<img src="_httpicontcreatgr_" width="_widthtcreatx_" border=0>}
    702483_icontabCreatorgreen_[v=1] {_texticontabCreatorgreen_}
    703484
  • trunk/gsdl/macros/style.dm

    r9333 r10596  
    145145_imagescript_
    146146_pagescriptextra_
    147 _usabilityscript_
    148147// -->
    149148</script>
Note: See TracChangeset for help on using the changeset viewer.