Changeset 1419 for trunk


Ignore:
Timestamp:
2000-08-17T17:07:43+12:00 (24 years ago)
Author:
sjboddie
Message:

Added collector action - also changed the javascript required by all the
rollover buttons

Location:
trunk/gsdl
Files:
31 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/lib/fileutil.cpp

    r1310 r1419  
    147147#include <windows.h>
    148148
    149 bool read_dir (const text_t &dirname, text_tarray &filelist) {
     149bool directory_exists (const text_t &dirname) {
    150150 
    151151  WIN32_FIND_DATA FileData; 
     
    155155 
    156156  hSearch = FindFirstFile(dirpath, &FileData);
    157   if (hSearch == INVALID_HANDLE_VALUE) return false;
     157  delete dirpath;
     158
     159  if (hSearch == INVALID_HANDLE_VALUE) {
     160    return false;
     161  }
     162  return true;
     163}
     164
     165bool read_dir (const text_t &dirname, text_tarray &filelist) {
     166 
     167  WIN32_FIND_DATA FileData; 
     168  HANDLE hSearch;
     169  char *dirpath = dirname.getcstr();
     170  strcat (dirpath, "\\*");
     171 
     172  hSearch = FindFirstFile(dirpath, &FileData);
     173  delete dirpath;
     174
     175  if (hSearch == INVALID_HANDLE_VALUE) {
     176    return false;
     177  }
    158178 
    159179  text_t filename = FileData.cFileName;
     
    176196
    177197#include <dirent.h>
     198
     199bool directory_exists (const text_t &dirname) {
     200
     201  char *tmp = dirname.getcstr();
     202  DIR *dirin = opendir (tmp);
     203  delete tmp;
     204 
     205  if (dirin == NULL) return false;
     206  closedir (dirin);
     207  return true;
     208}
    178209
    179210bool read_dir (const text_t &dirname, text_tarray &filelist) {
  • trunk/gsdl/lib/fileutil.h

    r1310 r1419  
    4444bool file_writable (const text_t &filename);
    4545
     46// returns true if directory exists
     47bool directory_exists (const text_t &dirname);
     48
    4649bool read_dir (const text_t &dirname, text_tarray &filelist);
    4750
  • trunk/gsdl/macros/base.dm

    r1416 r1419  
    7171
    7272_navigationbar_ {}
    73 _javaimagesnavbar_ {}
    74 _javaimagescontent_ {}
    7573_widthtspace_ {2}
    7674
     
    8684#granularity selection for mgpp
    8785_gselection_ {}
     86
     87#######################################################################
     88# flashy rollover image macro
     89#
     90#######################################################################
     91
     92# imagescript should always be included in html header if there are
     93# flashy images on the page
     94_imagescript_ {
     95var loaded = new Array();
     96function gbutton (image, onimage) \{
     97  if (image && image.src && (image.out == null || typeof(image.out) == typeof(void(0)))) \{
     98    s = image.src;
     99    image.out = new Image();
     100    image.out.src = s;
     101    image.over = new Image();
     102    image.over.src = onimage;
     103    loaded[image.name] = image;
     104  \}
     105\}
     106
     107function roll (imagename, over) \{
     108  if (document.images) \{
     109    if (over) i = "over";
     110    else i = "out";
     111    image = loaded[imagename];
     112    if (image) image.src = eval("image."+i+".src");
     113  \}
     114\}
     115}
     116
     117# gsimage should be used to define an instance of a flashy image
     118# parameters are:
     119# 1. the url to go to when the button is clicked
     120# 2. the url of the "off" image
     121# 3. the url of the "on" image
     122# 4. the name of the image (must be unique)
     123# 5. image alt text
     124_gsimage_ {<a href="_1_" onMouseover="roll('_4_',1);" onMouseOut="roll('_4_',0);"><img
     125name="_4_" src="_2_" onLoad="gbutton(this,'_3_');" border=0 alt="_5_"></a>}
     126
     127_gsimage_ [v=1] {<a href="_1_">_5_</a><br>}
     128
    88129#######################################################################
    89130# navigation bar images
     
    99140# image macros for all the classifications currently supported by
    100141# this receptionist.
    101 #
    102 # image macros for to and from added by gwp on 2000 june 13
    103 
    104 _imagesearch_ {<a href="_httpquery_"
    105     onMouseover = "img\_on('search')"
    106     onMouseout = "img\_off('search')"><img name="search"
    107         src="_httpicontsrchof_" width="_widthtsrchx_" height="_heighttsrchx_"
    108         border="0" alt="_textimagesearch_"></a>}
    109 _imagesearch_[v=1] {<a href="_httpquery_">_textimagesearch_</a><br>
    110 }
    111 
    112 _imageTitle_ {<a href="_httpbrowseTitle_"
    113     onMouseover = "img\_on('titles')"
    114     onMouseout = "img\_off('titles')"><img name="titles"
    115         src="_httpiconttitlof_" width=_widthttitlx_ height=_heightttitlx_
    116         border=0 alt="_textimageTitle_"></a>}
    117 _imageTitle_[v=1] {<a href="_httpbrowseTitle_">_textimageTitle_</a><br>
    118 }
    119 
    120 _imageCreator_ {<a href="_httpbrowseCreator_"
    121     onMouseover = "img\_on('authors')"
    122     onMouseout = "img\_off('authors')"><img name="authors"
    123         src="_httpicontauthof_" width=_widthtauthx_ height=_heighttauthx_
    124         border=0 alt="_textimageCreator_"></a>}
    125 _imageCreator_[v=1] {<a href="_httpbrowseCreator_">_textimageCreator_</a><br>
    126 }
    127 
    128 _imageSeries_ {<a href="_httpbrowseSeries_"
    129     onMouseover = "img\_on('series')"
    130     onMouseout = "img\_off('series')"><img name="series"
    131         src="_httpicontserof_" width="_widthtserx_" height="_heighttserx_"
    132         border="0" alt="_textimageSeries_"></a>}
    133 _imageSeries_[v=1] {<a href="_httpbrowseSeries_">_textimageSeries_</a><br>
    134 }
    135 
    136 _imageDate_ {<a href="_httpbrowseDate_"
    137     onMouseover = "img\_on('dates')"
    138     onMouseout = "img\_off('dates')"><img name="dates"
    139         src="_httpicontdateof_" width="_widthtdatex_" height="_heighttdatex_"
    140         border="0" alt="_textimageDate_"></a>}
    141 _imageDate_[v=1] {<a href="_httpbrowseDate_">_textimageDate_</a><br>
    142 }
    143 
    144 _imageSubject_ {<a href="_httpbrowseSubject_"
    145     onMouseover = "img\_on('subjects')"
    146     onMouseout = "img\_off('subjects')"><img name="subjects"
    147         src="_httpicontsubjof_" width="_widthtsubjx_" height="_heighttsubjx_"
    148         border="0" alt="_textimageSubject_"></a>}
    149 _imageSubject_[v=1] {<a href="_httpbrowseSubject_">_textimageSubject_</a><br>
    150 }
    151 
    152 _imageTo_ {<a href="_httpbrowseTo_"
    153     onMouseover = "img\_on('to')"
    154     onMouseout = "img\_off('to')"><img name="to"
    155         src="_httpiconttoof_" width="_widthttox_" height="_heightttox_"
    156         border="0" alt="_textimageTo_"></a>}
    157 _imageTo_[v=1] {<a href="_httpbrowseTo_">_textimageTo_</a><br>
    158 }
    159 
    160 _imageFrom_ {<a href="_httpbrowseFrom_"
    161     onMouseover = "img\_on('from')"
    162     onMouseout = "img\_off('from')"><img name="from"
    163         src="_httpicontfromof_" width="_widthtfromx_" height="_heighttfromx_"
    164         border="0" alt="_textimageFrom_"></a>}
    165 _imageFrom_[v=1] {<a href="_httpbrowseFrom_">_textimageFrom_</a><br>
    166 }
    167 
    168 _imageOrganization_ {<a href="_httpbrowseOrganization_"
    169     onMouseover = "img\_on('org')"
    170     onMouseout = "img\_off('org')"><img name="org"
    171         src="_httpicontorgof_" width="_widthtorgx_" height="_heighttorgx_"
    172         border="0" alt="_textimageOrganization_"></a>}
    173 _imageOrganization_[v=1] {<a href="_httpbrowseOrganization_">_textimageOrganization_</a><br>
    174 }
    175 
    176 _imageHowto_ {<a href="_httpbrowseHowto_"
    177     onMouseover = "img\_on('how')"
    178     onMouseout = "img\_off('how')"><img name="how"
    179         src="_httpiconthowof_" width="_widththowx_" height="_heightthowx_"
    180         border="0" alt="_textimageHowto_"></a>}
    181 _imageHowto_[v=1] {<a href="_httpbrowseHowto_">_textimageHowto_</a><br>
    182 }
    183 
    184 _imageTopic_ {<a href="_httpbrowseTopic_"
    185     onMouseover = "img\_on('topic')"
    186     onMouseout = "img\_off('topic')"><img name="topic"
    187         src="_httpiconttopicof_" width="_widthttopicx_" height="_heightttopicx_"
    188         border="0" alt="_textimageTopic_"></a>}
    189 _imageTopic_[v=1] {<a href="_httpbrowseTopic_">_textimageTopic_</a><br>
    190 }
    191 
    192 _imageBrowse_ {<a href="_httpbrowseBrowse_"
    193     onMouseover = "img\_on('browse')"
    194     onMouseout = "img\_off('browse')"><img name="browse"
    195         src="_httpicontbrwseof_" width="_widthtbrwsex_" height="_heighttbrwsex_"
    196         border="0" alt="_textimageBrowse_"></a>}
    197 _imageBrowse_[v=1] {<a href="_httpbrowseBrowse_">_textimageBrowse_</a><br>
    198 }
    199 
    200 _imagePeople_ {<a href="_httpbrowsePeople_"
    201     onMouseover = "img\_on('People')"
    202     onMouseout = "img\_off('People')"><img name="People"
    203         src="_httpicontpeopof_" width=_widthtpeopx_ height=_heighttpeopx_
    204         border=0 alt="_textimagePeople_"></a>}
    205 _imagePeople_[v=1] {<a href="_httpbrowsePeople_">_textimagePeople_</a><br>
    206 }
    207 
    208 _imageLanguage_ {<a href="_httpbrowseLanguage_"
    209     onMouseover = "img\_on('Language')"
    210     onMouseout = "img\_off('Language')"><img name="Language"
    211         src="_httpicontlangof_" width=_widthtlangx_ height=_heighttlangx_
    212         border=0 alt="_textimageLanguage_"></a>}
    213 _imageLanguage_[v=1] {<a href="_httpbrowseLanguage_">_textimageLanguage_</a><br>
    214 }
    215 
    216 _imageAcronym_ {<a href="_httpbrowseAcronym_"
    217     onMouseover = "img\_on('Acronym')"
    218     onMouseout = "img\_off('Acronym')"><img name="Acronym"
    219         src="_httpicontacroof_" width=_widthtacrox_ height=_heighttacrox_
    220         border=0 alt="_textimageAcronym_"></a>}
    221 _imageAcronym_[v=1] {<a href="_httpbrowseAcronym_">_textimageAcronym_</a><br>
    222 }
     142
     143_imagesearch_ {_gsimage_(_httpquery_,_httpicontsrchof_,_httpicontsrchon_,srch,_textimagesearch_)}
     144_imageTitle_ {_gsimage_(_httpbrowseTitle_,_httpiconttitlof_,_httpiconttitlon_,titles,_textimageTitle_)}
     145_imageCreator_ {_gsimage_(_httpbrowseCreator_,_httpicontauthof_,_httpicontauthon_,authors,_textimageCreator_)}
     146_imageSeries_ {_gsimage_(_httpbrowseSeries_,_httpicontserof_,_httpicontseron_,series,_textimageSeries_)}
     147_imageDate_ {_gsimage_(_httpbrowseDate_,_httpicontdateof_,_httpicontdateon_,dates,_textimageDate_)}
     148_imageSubject_ {_gsimage_(_httpbrowseSubject_,_httpicontsubjof_,_httpicontsubjon_,subjects,_textimageSubject_)}
     149_imageTo_ {_gsimage_(_httpbrowseTo_,_httpiconttoof_,_httpiconttoon_,to,_textimageTo_)}
     150_imageFrom_ {_gsimage_(_httpbrowseFrom_,_httpicontfromof_,_httpicontfromon_,from,_textimageFrom_)}
     151_imageOrganization_ {_gsimage_(_httpbrowseOrganization_,_httpicontorgof_,_httpicontorgon_,org,_textimageOrganization_)}
     152_imageHowto_ {_gsimage_(_httpbrowseHowto_,_httpiconthowof_,_httpiconthowon_,how,_textimageHowto_)}
     153_imageTopic_ {_gsimage_(_httpbrowseTopic_,_httpiconttopicof_,_httpiconttopicon_,topic,_textimageTopic_)}
     154_imageBrowse_ {_gsimage_(_httpbrowseBrowse_,_httpicontbrwseof_,_httpicontbrwseon_,browse,_textimageBrowse_)}
     155_imagePeople_ {_gsimage_(_httpbrowsePeople_,_httpicontpeopof_,_httpicontpeopon_,people,_textimagePeople_)}
     156_imageLanguage_ {_gsimage_(_httpbrowseLanguage_,_httpicontlangof_,_httpicontlangon_,language,_textimageLanguage_)}
     157_imageAcronym_ {_gsimage_(_httpbrowseAcronym_,_httpicontacroof_,_httpicontacroon_,acronym,_textimageAcronym_)}
    223158
    224159
     
    235170_imagehelp_<br>
    236171_imagepref_<br>
    237 }
    238 
    239 # the javaimages macros contain the javascript code required
    240 # by each flashy javascript image. _javaimagesheader_ contains those
    241 # images at the top right of the page, _javaimagesnavbar_ (set
    242 # from within the server) contains those images in the navigation bar,
    243 # and _javaimagescontent_ (also set in server) contains any other
    244 # javascript images that occur in the page.
    245 # the javaimages macros should contain _javaX_ macros for each javascript
    246 # image link within the page.
    247 
    248 _javaimagesheader_ {_javahome__javahelp__javapref_}
    249 _javaimagesheader_ [v=1] {}
    250 
    251 _javaabout_ {
    252     about\_on = new Image(_widthcabtx_, _heightcabtx_);
    253     about\_on.src = "_httpiconcabton_";
    254     about\_off = new Image(_widthcabtx_, _heightcabtx_);
    255     about\_off.src = "_httpiconcabtof_";
    256 }
    257 
    258 _javahome_ {
    259     home\_on = new Image(_widthchomex_, _heightchomex_);         
    260     home\_on.src = "_httpiconchomeon_";             
    261     home\_off = new Image(_widthchomex_, _heightchomex_);         
    262     home\_off.src = "_httpiconchomeof_";             
    263 }
    264 
    265 _javahelp_ {
    266     help\_on = new Image(_widthchelpx_, _heightchelpx_);
    267     help\_on.src = "_httpiconchelpon_";
    268     help\_off = new Image(_widthchelpx_, _heightchelpx_);
    269     help\_off.src = "_httpiconchelpof_";
    270 }
    271 
    272 _javapref_ {
    273     pref\_on = new Image(_widthcprefx_, _heightcprefx_);         
    274     pref\_on.src = "_httpiconcprefon_";
    275     pref\_off = new Image(_widthcprefx_, _heightcprefx_);
    276     pref\_off.src = "_httpiconcprefof_";
    277 }
    278 
    279 _javasearch_ {
    280     search\_on = new Image(_widthtsrchx_, _heighttsrchx_);         
    281     search\_on.src = "_httpicontsrchon_";
    282     search\_off = new Image(_widthtsrchx_, _heighttsrchx_);         
    283     search\_off.src = "_httpicontsrchof_";
    284 }
    285 
    286 _javaTitle_ {
    287     titles\_on = new Image(_widthttitlx_, _heightttitlx_);
    288     titles\_on.src = "_httpiconttitlon_";
    289     titles\_off = new Image(_widthttitlx_, _heightttitlx_);
    290     titles\_off.src = "_httpiconttitlof_";
    291 }
    292 
    293 _javaList_ {
    294     list\_on = new Image(_widthtlistx_, _heighttlistx_);
    295     list\_on.src = "_httpicontliston_";
    296     list\_off = new Image(_widthtlistx_, _heighttlistx_);
    297     list\_off.src = "_httpicontlistof_";
    298 }
    299 
    300 _javaCreator_ {
    301     authors\_on = new Image(_widthtauthx_, _heighttauthx_);
    302     authors\_on.src = "_httpicontauthon_";
    303     authors\_off = new Image(_widthtauthx_, _heighttauthx_);
    304     authors\_off.src = "_httpicontauthof_";
    305 }
    306 
    307 _javaSeries_ {
    308     series\_on = new Image(_widthtserx_, _heighttserx_);         
    309     series\_on.src = "_httpicontseron_";
    310     series\_off = new Image(_widthtserx_, _heighttserx_);         
    311     series\_off.src = "_httpicontserof_";
    312 }
    313 
    314 _javaDate_ {
    315     dates\_on = new Image(_widthtdatex_, _heighttdatex_);         
    316     dates\_on.src = "_httpicontdateon_";
    317     dates\_off = new Image(_widthtdatex_, _heighttdatex_);         
    318     dates\_off.src = "_httpicontdateof_";           
    319 }
    320 
    321 _javaSubject_ {
    322     subjects\_on = new Image(_widthtsubjx_, _heighttsubjx_);         
    323     subjects\_on.src = "_httpicontsubjon_";
    324     subjects\_off = new Image(_widthtsubjx_, _heighttsubjx_);         
    325     subjects\_off.src = "_httpicontsubjof_";           
    326 }
    327 
    328 _javaTo_ {
    329     to\_on = new Image(_widthttox_, _heightttox_);         
    330     to\_on.src = "_httpiconttoon_";
    331     to\_off = new Image(_widthttox_, _heightttox_);         
    332     to\_off.src = "_httpiconttoof_";           
    333 }
    334 
    335 _javaFrom_ {
    336     from\_on = new Image(_widthtfromx_, _heighttfromx_);         
    337     from\_on.src = "_httpicontfromon_";
    338     from\_off = new Image(_widthtfromx_, _heighttfromx_);         
    339     from\_off.src = "_httpicontfromof_";           
    340 }
    341 
    342 _javaHowto_ {
    343     how\_on = new Image(_widththowx_, _heightthowx_);         
    344     how\_on.src = "_httpiconthowon_";
    345     how\_off = new Image(_widththowx_, _heightthowx_);         
    346     how\_off.src = "_httpiconthowof_";         
    347 }
    348 
    349 _javaOrganization_ {
    350     org\_on = new Image(_widthtorgx_, _heighttorgx_);         
    351     org\_on.src = "_httpicontorgon_";
    352     org\_off = new Image(_widthtorgx_, _heighttorgx_);         
    353     org\_off.src = "_httpicontorgof_";         
    354 }
    355 
    356 _javaTopic_ {
    357     topic\_on = new Image(_widthttopicx_, _heightttopicx_);         
    358     topic\_on.src = "_httpiconttopicon_";
    359     topic\_off = new Image(_widthttopicx_, _heightttopicx_);         
    360     topic\_off.src = "_httpiconttopicof_";         
    361 }
    362 
    363 _javaBrowse_ {
    364     browse\_on = new Image(_widthtbrwsex_, _heighttbrwsex_);         
    365     browse\_on.src = "_httpicontbrwseon_";
    366     browse\_off = new Image(_widthtbrwsex_, _heighttbrwsex_);         
    367     browse\_off.src = "_httpicontbrwseof_";         
    368 }
    369 
    370 _javaPeople_ {
    371         People\_on = new Image(_widthtpeopx_, _heighttpeopx_);
    372         People\_on.src = "_httpicontpeopon_";
    373         People\_off = new Image(_widthtpeopx_, _heighttpeopx_);
    374         People\_off.src = "_httpicontpeopof_";
    375 }
    376 
    377 _javaLanguage_ {
    378         Language\_on = new Image(_widthtlangx_, _heighttlangx_);
    379         Language\_on.src = "_httpicontlangon_";
    380         Language\_off = new Image(_widthtlangx_, _heighttlangx_);
    381         Language\_off.src = "_httpicontlangof_";
    382 }
    383 
    384 _javaAcronym_ {
    385         Acronym\_on = new Image(_widthtacrox_, _heighttacrox_);
    386         Acronym\_on.src = "_httpicontacroon_";
    387         Acronym\_off = new Image(_widthtacrox_, _heighttacrox_);
    388         Acronym\_off.src = "_httpicontacroof_";
    389172}
    390173
     
    658441#######################################################################
    659442
    660 
    661 _imageabout_ {<a href="_httppageabout_"
    662     onMouseover = "img\_on('about')"
    663     onMouseout = "img\_off('about')"><img name="about"
    664         src="_httpiconcabtof_" width=_widthcabtx_ height=_heightcabtx_
    665         border=0 alt="_textimageabout_"></a>}
    666 
    667 _imageabout_[v=1] {
    668 <a href="_httppageabout_">_textimageabout_</a>
    669 }
    670 
    671 _imagehome_ {<a href="_httppagehome_"
    672     onMouseover = "img\_on('home')"
    673     onMouseout = "img\_off('home')"><img name="home"
    674         src="_httpiconchomeof_" width="_widthchomex_" height="_heightchomex_"
    675         border="0" alt="_textimagehome_"></a>}
    676 
    677 _imagehome_[v=1] {
    678 <a href="_httppagehome_">_textimagehome_</a>
    679 }
    680 
    681 
    682 _imagehelp_ {<a href="_httppagehelp_"
    683     onMouseover = "img\_on('help')"
    684     onMouseout = "img\_off('help')"><img name="help"
    685         src="_httpiconchelpof_" width="_widthchelpx_" height="_heightchelpx_"
    686         border="0" alt="_textimagehelp_"></a>}
    687 
    688 _imagehelp_[v=1] {
    689 <a href="_httppagehelp_">_textimagehelp_</a>
    690 }
    691 
    692 
    693 _imagepref_ {<a href="_httppagepref_"
    694     onMouseover = "img\_on('pref')"
    695     onMouseout = "img\_off('pref')"><img name="pref"
    696         src="_httpiconcprefof_" width="_widthcprefx_" height="_heightcprefx_" border="0" alt="_textimagepref_"></a>}
    697 
    698 _imagepref_[v=1] {
    699 <a href="_httppagepref_">_textimagepref_</a>
    700 }
     443_imagehome_ {_gsimage_(_httppagehome_,_httpiconchomeof_,_httpiconchomeon_,homer,_textimagehome_)}
     444
     445_imagehelp_ {_gsimage_(_httppagehelp_,_httpiconchelpof_,_httpiconchelpon_,help,_textimagehelp_)}
     446
     447_imagepref_ {_gsimage_(_httppagepref_,_httpiconcprefof_,_httpiconcprefon_,pref,_textimagepref_)}
    701448
    702449_imagegreenstone_ {<img src="_httpicongsdl_" width="_widthgsdl_" height="_heightgsdl_" border="0" alt="_textimagegreenstone_" hspace=0>}
    703 
    704450_imagegreenstone_[v=1] {_textimagegreenstone_}
  • trunk/gsdl/macros/document.dm

    r1406 r1419  
    2121_classificationlinks_
    2222</center>
    23 }
    24 
    25 
    26 #######################################################################
    27 # javascript macros
    28 #
    29 # there should be one of these for each flashy javascript button
    30 # that may appear within a document page
    31 #######################################################################
    32 
    33 # javaextras allows specific collections to include extra java macros
    34 # without having to override their document action
    35 _javaextras_ {}
    36 
    37 _javadetach_ {
    38     detach\_on = new Image(_widthedtchx_, _heightedtchx_);
    39     detach\_on.src = "_httpiconedtchon_";
    40     detach\_off = new Image(_widthedtchx_, _heightedtchx_);
    41     detach\_off.src = "_httpiconedtchof_";
    42 }
    43 
    44 _javaexpandcontents_ {
    45     expcon\_on = new Image(_widtheexpcx_, _heighteexpcx_);
    46     expcon\_on.src = "_httpiconeexpcon_";
    47     expcon\_off = new Image(_widtheexpcx_, _heighteexpcx_);
    48     expcon\_off.src = "_httpiconeexpcof_";
    49 }
    50 
    51 _javacontractcontents_ {
    52     concon\_on = new Image(_widtheconcx_, _heighteconcx_);
    53     concon\_on.src = "_httpiconeconcon_";
    54     concon\_off = new Image(_widtheconcx_, _heighteconcx_);
    55     concon\_off.src = "_httpiconeconcof_";
    56 }
    57 
    58 _javaexpandtext_ {
    59     alltext\_on = new Image(_widthealltx_, _heightealltx_);
    60     alltext\_on.src = "_httpiconeallton_";
    61     alltext\_off = new Image(_widthealltx_, _heightealltx_);
    62     alltext\_off.src = "_httpiconealltof_";
    63 }
    64 
    65 _javacontracttext_ {
    66     thissec\_on = new Image(_widthetsecx_, _heightetsecx_);
    67     thissec\_on.src = "_httpiconetsecon_";
    68     thissec\_off = new Image(_widthetsecx_, _heightetsecx_);
    69     thissec\_off.src = "_httpiconetsecof_";
    70 }
    71 
    72 _javahighlighting_ {
    73     hl\_on = new Image(_widthehlx_, _heightehlx_);
    74     hl\_on.src = "_httpiconehlon_";
    75     hl\_off = new Image(_widthehlx_, _heightehlx_);
    76     hl\_off.src = "_httpiconehlof_";
    77 }
    78 
    79 _javanohighlighting_ {
    80     nhl\_on = new Image(_widthenhlx_, _heightenhlx_);
    81     nhl\_on.src = "_httpiconenhlon_";
    82     nhl\_off = new Image(_widthenhlx_, _heightenhlx_);
    83     nhl\_off.src = "_httpiconenhlof_";
    84 }
    85 
    86 _javacontinue_ {
    87     cont\_on = new Image(_widthcontx_, _heightcontx_);
    88     cont\_on.src = "_httpiconconton_";
    89     cont\_off = new Image(_widthcontx_, _heightcontx_);
    90     cont\_off.src = "_httpiconcontoff_";
    9123}
    9224
     
    245177_tab_ {<td>_icontab_</td>}
    246178
    247 _iconcontracttoc_ {<img name="concon" src="_httpiconeconcof_" width=_widtheconcx_ height=_heighteconcx_ alt="_texticoncontracttoc_" border=0>}
    248 _iconcontracttoc_[v=1] {_texticoncontracttoc_}
    249 
    250 _iconexpandtoc_ {<img name="expcon" src="_httpiconeexpcof_" width=_widtheexpcx_ height=_heighteexpcx_ alt="_texticonexpandtoc_" border=0>}
    251 _iconexpandtoc_[v=1] {_texticonexpandtoc_}
    252 
    253 _iconcontracttext_ {<img name="thissec" src="_httpiconetsecof_" width=_widthetsecx_ height=_heightetsecx_ alt="_texticoncontracttext_" border=0>}
    254 _iconcontracttext_[v=1] {_texticoncontracttext_}
    255 
    256 _iconexpandtext_ {<img name="alltext" src="_httpiconealltof_" width=_widthealltx_ height=_heightealltx_ alt="_texticonexpandtext_" border=0>}
    257 _iconexpandtext_[v=1] {_texticonexpandtext_}
    258 
    259 _icondetach_ {<img name="detach" src="_httpiconedtchof_" width=_widthedtchx_ height=_heightedtchx_ alt="_texticondetach_" border=0>}
    260 _icondetach_[v=1] {_texticondetach_}
    261 
    262 _iconhighlight_ {<img name="hl" src="_httpiconehlof_" width=_widthehlx_ height=_heightehlx_ alt="_texticonhighlight_" border=0>}
    263 _iconhighlight_ [v=1] {_texticonhighlight_}
    264 
    265 _iconnohighlight_ {<img name="nhl" src="_httpiconenhlof_" width=_widthenhlx_ height=_heightenhlx_ alt="_texticonnohighlight_" border=0>}
    266 _iconnohighlight_ [v=1] {_texticonnohighlight_}
    267 
    268179_iconwarning_ {<img src="_httpiconwarning_" width=_widthwarning_ height=_heightwarning_ border=0 align=left>}
    269180_iconwarning_ [v=1] {_texticonwarning_}
    270181
    271 _iconcont_ {<img name="cont" src="_httpiconcontoff_" width=_widthcontx_ height=_heightcontx_ border=0>}
    272 _iconcont_ [v=1] {_texticoncont_}
    273 
    274182
    275183#######################################################################
     
    277185#######################################################################
    278186
    279 _imagedetach_ {<a href="_httpcurrentdocument_&x=1" target=\_blank onMouseover = "img\_on('detach')"
    280 onMouseout = "img\_off('detach')">_icondetach_</a>}
    281 _imagedetach_[v=1] {<a href="_httpcurrentdocument_&x=1" target=\_blank>_texticondetach_</a><br>}
    282 
    283 _imagehighlight_ {<a href="_httpcurrentdocument_&hl=1&gc=_cgiarggc_&amp;gt=_cgiarggt_" onMouseover = "img\_on('hl')"
    284 onMouseout = "img\_off('hl')">_iconhighlight_</a>}
    285 _imagehighlight_ [v=1] {<a href="_httpcurrentdocument_&hl=1&gc=_cgiarggc_&amp;gt=_cgiarggt_">_texticonhighlight_</a><br>}
    286 
    287 _imagenohighlight_ {<a href="_httpcurrentdocument_&hl=0&gc=_cgiarggc_&amp;gt=_cgiarggt_" onMouseover = "img\_on('nhl')"
    288 onMouseout = "img\_off('nhl')">_iconnohighlight_</a>}
    289 _imagenohighlight_ [v=1] {<a href="_httpcurrentdocument_&hl=0&gc=_cgiarggc_&amp;gt=_cgiarggt_">_texticonnohighlight_</a><br>}
    290 
    291 _imagecontracttoc_ {<a href="_httpcurrentdocument_&gc=0" onMouseover = "img\_on('concon')"
    292 onMouseout = "img\_off('concon')">_iconcontracttoc_</a>}
    293 _imagecontracttoc_[v=1] {"<a href="_httpcurrentdocument_&gc=0">_texticoncontracttoc_</a><br>}
    294 
    295 _imageexpandtoc_ {<a href="_httpcurrentdocument_&gc=1" onMouseover = "img\_on('expcon')"
    296 onMouseout = "img\_off('expcon')">_iconexpandtoc_</a>}
    297 _imageexpandtoc_ [v=1] {"<a href="_httpcurrentdocument_&gc=1">_texticonexpandtoc_</a><br>}
    298 
    299 _imagecontracttext_ {<a href="_httpcurrentdocument_&amp;gt=0" onMouseover = "img\_on('thissec')"
    300 onMouseout = "img\_off('thissec')">_iconcontracttext_</a>}
    301 _imagecontracttext_[v=1] {<a href="_httpcurrentdocument_&amp;gt=0">display only current section</a><br>}
    302 
    303 _imageexpandtext_ {<a href="_httpcurrentdocument_&amp;gt=1" onMouseover = "img\_on('alltext')"
    304 onMouseout = "img\_off('alltext')">_iconexpandtext_</a>}
    305 _imageexpandtext_[v=1] {<a href="_httpcurrentdocument_&amp;gt=1">display all text</a><br>}
    306 
    307 _imagecont_ {<a href="_httpcurrentdocument_&amp;gt=2" onMouseover = "img\_on('cont')"
    308 onMouseout = "img\_off('cont')">_iconcont_</a>}
    309 _imagecont_[v=1] {<a href="_httpcurrentdocument&amp;gt=2">_texticoncont_</a><br>}
     187# can't use _gsimage_ macro for detach button as we need to include target
     188_imagedetach_ {<a href="_httpcurrentdocument_&x=1" target=\_blank onMouseover="roll('detach',1);" onMouseOut="roll('detach',0);"><img
     189name="detach" src="_httpiconedtchof_" onLoad="gbutton(this,'_httpiconedtchon_');" border=0 alt="_texticondetach_"></a>}
     190_imagedetach_ [v=1] {<a href="_httpcurrentdocument_&x=1" target=\_blank>_texticondetach_</a><br>}
     191
     192_imagehighlight_ {_gsimage_(_httpcurrentdocument_&hl=1&gc=_cgiarggc_&amp;gt=_cgiarggt_,_document:httpiconehlof_,_document:httpiconehlon_,hl,_document:texticonhighlight_)}
     193
     194_imagenohighlight_ {_gsimage_(_httpcurrentdocument_&hl=0&gc=_cgiarggc_&amp;gt=_cgiarggt_,_document:httpiconenhlof_,_document:httpiconenhlon_,nhl,_document:texticonnohighlight_)}
     195
     196_imagecontracttoc_ {_gsimage_(_httpcurrentdocument_&gc=0,_document:httpiconeconcof_,_document:httpiconeconcon_,concon,_document:texticoncontracttoc_)}
     197
     198_imageexpandtoc_ {_gsimage_(_httpcurrentdocument_&gc=1,_document:httpiconeexpcof_,_document:httpiconeexpcon_,expcon,_document:texticonexpandtoc_)}
     199
     200_imagecontracttext_ {_gsimage_(_httpcurrentdocument_&amp;gt=0,_document:httpiconetsecof_,_document:httpiconetsecon_,thissec,_document:texticoncontracttext_)}
     201
     202_imageexpandtext_ {_gsimage_(_httpcurrentdocument_&amp;gt=1,_document:httpiconealltof_,_document:httpiconeallton_,alltext,_document:texticonexpandtext_)}
     203
     204_imagecont_ {_gsimage_(_httpcurrentdocument_&amp;gt=2,_document:httpiconcontoff_,_document:httpiconconton_,cont,_document:texticoncont_)}
    310205
    311206
  • trunk/gsdl/macros/style.dm

    r1289 r1419  
    130130<script>
    131131<!--
    132     function img\_on(imgName) \{
    133         if (version == "n3") \{
    134             imgOn = eval(imgName + "\_on.src");
    135             document [imgName].src = imgOn;
    136         \}
    137     \}
    138 
    139     function img\_off(imgName) \{
    140         if (version == "n3") \{
    141             imgOff = eval(imgName + "\_off.src");
    142             document [imgName].src = imgOff;
    143         \}
    144     \}
    145     _If_(_cgiargx_,_scriptdetach_)
    146     browserName = navigator.appName;         
    147     browserVer = parseInt(navigator.appVersion);
    148     if ((browserName == "Netscape" || browserName == "Microsoft Internet Explorer")
    149         && browserVer >= 3) version = "n3";
    150     else version = "n2";
    151              
    152     if (version == "n3") \{
    153     _javaimagesheader_
    154     _javaimagesnavbar_
    155     _javaimagescontent_
    156     \}
    157     _pagescriptextra_
     132_imagescript_
     133_pagescriptextra_
    158134// -->
    159135</script>
  • trunk/gsdl/src/recpt/Makefile.in

    r1385 r1419  
    7878                userdb.h usersaction.h vlistbrowserclass.h hlistbrowserclass.h \
    7979        datelistbrowserclass.h invbrowserclass.h pagedbrowserclass.h \
    80         htmlbrowserclass.h delhistoryaction.h historydb.h
     80        htmlbrowserclass.h delhistoryaction.h historydb.h collectoraction.h
    8181
    8282RECEPTHEADERS =
     
    9595        vlistbrowserclass.cpp hlistbrowserclass.cpp datelistbrowserclass.cpp \
    9696        invbrowserclass.cpp pagedbrowserclass.cpp htmlbrowserclass.cpp \
    97         delhistoryaction.cpp historydb.cpp
     97        delhistoryaction.cpp historydb.cpp collectoraction.cpp
    9898
    9999
     
    115115        hlistbrowserclass.o datelistbrowserclass.o invbrowserclass.o \
    116116        pagedbrowserclass.o htmlbrowserclass.o delhistoryaction.o \
    117         historydb.o parse.yy.o
     117        historydb.o parse.yy.o collectoraction.o
    118118
    119119RECPTOBJECTS = recptmain.o
  • trunk/gsdl/src/recpt/documentaction.cpp

    r1348 r1419  
    256256}
    257257
    258 // set_navbarmacros sets _navigationbar_, _javaimagesnavbar_ and _httpbrowseXXX_ macros
     258// set_navbarmacros sets _navigationbar_ and _httpbrowseXXX_ macros
    259259// reponse contains 1 metadata field (Title)
    260260void documentaction::set_navbarmacros (displayclass &disp, FilterResponse_t &response,
    261261                       cgiargsclass &args) {
    262262
    263   text_t javaimagesnavbar, topparent;
     263  text_t topparent;
    264264  text_t &arg_d = args["d"];
    265265  text_t navigationbar = "<!-- Navigation Bar -->\n";
     
    275275  } else {
    276276    navigationbar += "_imagesearch_";
    277     javaimagesnavbar = "_javasearch_";
    278277  }
    279278 
     
    307306      }
    308307    }
    309     if (!unknown) javaimagesnavbar += "_java" + title + "_";
    310308    dochere ++;
    311309  }
     
    313311  navigationbar += "<!-- End of Navigation Bar -->\n";
    314312  disp.setmacro ("navigationbar", "Global", navigationbar);
    315   if (args.getintarg("v") == 0)
    316     disp.setmacro ("javaimagesnavbar", "Global", javaimagesnavbar);
    317313}
    318314
     
    333329  //                     are Title and Creator classifications _httpbrowseTitle_
    334330  //                     and _httpbrowseCreator_ will be set
    335 
    336   // _javaimagesnavbar_  this is the javascript code to shove in to make the
    337   //                     flashy images used by _navigationbar_ work
    338331
    339332  // _widthtspace_       the width of the spacers between buttons in navigation
     
    414407    if (args.getintarg("v") == 0) set_spacemacro (disp, response);
    415408
    416     // set _navigationbar_ and _javaimagesnavbar_ macros
     409    // set _navigationbar_ macro
    417410    set_navbarmacros (disp, response, args);
    418411   
     
    511504}
    512505
    513 void documentaction::set_java_macros (cgiargsclass &args, displayclass &disp) {
    514 
    515   text_t javaimagescontent = "_javaextras_";
    516    
    517   int arg_gt = args.getintarg("gt");
    518   int arg_gc = args.getintarg("gc");
    519   int arg_hl = args.getintarg("hl");
    520 
    521   text_tarray::const_iterator button_here = formatinfo.DocumentButtons.begin();
    522   text_tarray::const_iterator button_end = formatinfo.DocumentButtons.end();
    523 
    524   while (button_here != button_end) {
    525     if (*button_here == "Detach")
    526       javaimagescontent += "_javadetach_";
    527     else if (*button_here == "Expand Text") {
    528       if (arg_gt == 1)
    529     javaimagescontent += "_javacontracttext__javacontinue_";
    530       else if (arg_gt == 2)
    531     javaimagescontent += "_javacontracttext_";
    532       else
    533     javaimagescontent += "_javaexpandtext_";
    534     } else if (*button_here == "Expand Contents") {
    535       if (arg_gc == 1)
    536     javaimagescontent += "_javacontractcontents_";
    537       else
    538     javaimagescontent += "_javaexpandcontents_";
    539     } else if (*button_here == "Highlight") {
    540       if (arg_hl == 1)
    541     javaimagescontent += "_javanohighlighting_";
    542       else
    543     javaimagescontent += "_javahighlighting_";
    544     }
    545     button_here ++;
    546   }
    547   disp.setmacro ("javaimagescontent", "document", javaimagescontent);
    548 }
    549 
    550506
    551507// define all the macros which are related to pages generated
     
    566522  // _header_               the header macro is overridden if we're not at a top level
    567523  //                        classification to remove the title block
    568 
    569   // _javaimagescontent_    this is the javascript code to shove in to make the
    570   //                        flashy buttons work
    571524
    572525  // _thisOID_              the OID (directory) of the current document - this corresponds
     
    645598    disp.setmacro ("thisOID", "Global", dm_safe(thisOID));
    646599      }
    647      
    648       if (args["u"] != "1")
    649     set_java_macros (args, disp);
    650 
    651600    }
    652601  } else {
  • trunk/gsdl/src/recpt/documentaction.h

    r1285 r1419  
    4848  void set_navbarmacros (displayclass &disp, FilterResponse_t &response,
    4949             cgiargsclass &args);
    50 
    51   virtual void set_java_macros (cgiargsclass &args, displayclass &disp);
    5250
    5351  void get_classificationlinks (const text_t &arg_cl, const text_t &collection,
  • trunk/gsdl/src/recpt/librarymain.cpp

    r1391 r1419  
    5353#include "delhistoryaction.h"
    5454#include "tipaction.h"
     55#include "collectoraction.h"
    5556
    5657#include "browserclass.h"
     
    264265  recpt.add_action(&adelhistoryaction);
    265266
     267  collectoraction acollectoraction;
     268  acollectoraction.set_receptionist (&recpt);
     269  recpt.add_action(&acollectoraction);
     270
    266271  // list of browsers
    267272  vlistbrowserclass avlistbrowserclass;
Note: See TracChangeset for help on using the changeset viewer.