Changeset 23523 for main/branches/64_bit_Greenstone/greenstone2
- Timestamp:
- 2011-01-05T09:18:04+13:00 (13 years ago)
- Location:
- main/branches/64_bit_Greenstone/greenstone2
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
main/branches/64_bit_Greenstone/greenstone2
- Property svn:mergeinfo changed
/main/trunk/greenstone2 (added) merged: 23514-23522
- Property svn:mergeinfo changed
-
main/branches/64_bit_Greenstone/greenstone2/cgi-bin/talkback-progressbar.pl
r23183 r23523 230 230 my $jar_dir= &util::filename_cat($gsdl_home, "bin", "java"); 231 231 my $java_classpath = &util::filename_cat($jar_dir,"GLIServer.jar"); 232 233 if (!-f $java_classpath) { 234 my $progname = $0; 235 $progname =~ s/^.*[\/\\]//; 236 my $mess = "$progname:\nFailed to find $java_classpath\n"; 237 $gsdl_cgi->generate_error($mess); 238 } 232 239 233 240 my $java_args = "\"$zip_filename\" \"$import_dir\""; … … 428 435 429 436 my $wait_dots = inc_wait_dots(); 430 my $ html = "$wait_dots<br>";437 my $dots_html = "Waiting for transfer: $wait_dots<br>"; 431 438 432 439 my $filename = $gsdl_cgi->param('uploadedfile'); 433 440 441 my $inner_html; 442 434 443 if ((defined $filename) && ($filename ne "")) { 435 $ html .= check_status_single_file($filename);444 $inner_html = check_status_single_file($filename); 436 445 } 437 446 else { 438 $html .= check_status_all(); 439 } 447 $inner_html = check_status_all(); 448 } 449 450 my $html = ($inner_html ne "") ? $inner_html : $dots_html; 440 451 441 452 return $html; -
main/branches/64_bit_Greenstone/greenstone2/cgi-bin/talkback-transfer.pl
r23482 r23523 93 93 my $java_classpath = &util::filename_cat($jar_dir,"GLIServer.jar"); 94 94 95 if (!-f $java_classpath) { 96 my $progname = $0; 97 $progname =~ s/^.*[\/\\]//; 98 my $mess = "$progname:\nFailed to find $java_classpath\n"; 99 $gsdl_cgi->generate_error($mess); 100 } 101 95 102 my $zip_file = "$collect-$timestamp.zip"; 96 103 my $zip_file_path = &util::filename_cat($archive_dir,$zip_file); -
main/branches/64_bit_Greenstone/greenstone2/macros/authen.dm
r22560 r23523 11 11 _content_ { 12 12 <br><br><br><br> 13 <form name="login" method="post" action="_gwcgi_"> 13 _If_("_activateweb20_" eq "1", 14 <form name="login" method="get" action="_gwcgi_"> 15 , 16 <form name="login" method="post" action="_gwcgi_"> 17 ) 14 18 <input type=hidden name="e" value="_If_(_cgiarger_,_cgiarger_,_decodedcompressedoptions_)"> 15 19 _hiddenargs_ -
main/branches/64_bit_Greenstone/greenstone2/macros/english.dm
r22051 r23523 75 75 _textdescrhelp_ {Help page} 76 76 _textdescrpref_ {Preferences page} 77 _textdescrlogin_ {Login page} 78 _textdescrlogout_ {Logout as _cgiargun_} 79 77 80 _textdescrgreenstone_ {Greenstone Digital Library Software} 78 81 _textdescrusab_ {What did you find hard to use?} … … 211 214 _linktextHELP_ {HELP} 212 215 _linktextPREFERENCES_ {PREFERENCES} 216 _linktextLOGIN_ {LOGIN} 217 _linktextLOGGEDIN_ {(logged in as _cgiargun_)} 218 _linktextLOGOUT_ {LOGOUT} 213 219 214 220 -
main/branches/64_bit_Greenstone/greenstone2/macros/nav_css.dm
r20611 r23523 14 14 ####################################################################### 15 15 16 _globallinks_ {_If_("_cgiargu_" ne "1",_homelink_) _helplink_ _preflink_} 17 _homelink_ {_navtaborig_(_httppagehome_,_linktextHOME_,_textdescrhome_)} 18 _helplink_ {_navtaborig_(_httppagehelp_,_linktextHELP_,_textdescrhelp_)} 19 _preflink_ {_navtaborig_(_httppagepref_,_linktextPREFERENCES_,_textdescrpref_)} 16 _globallinks_ {_If_("_cgiargu_" ne "1",_homelink_) _helplink_ _preflink__optloginlink_} 17 _homelink_ {_navtaborig_(_httppagehome_,_linktextHOME_,_textdescrhome_)} 18 _helplink_ {_navtaborig_(_httppagehelp_,_linktextHELP_,_textdescrhelp_)} 19 _preflink_ {_navtaborig_(_httppagepref_,_linktextPREFERENCES_,_textdescrpref_)} 20 21 _optloginlink_ { 22 _If_("_activateweb20_" >= "1",_If_("x_cgiargun__cgiarguan_" ne "x1",_loginlink_)) 23 } 24 25 _loginlink_ { 26 27 _If_(_cgiargun_, 28 _navtablogoutorig_(_linktextLOGOUT_,_textdescrlogout_) _linktextLOGGEDIN_ 29 <script type="text/javascript"> 30 appendUsernameArgs("logout","uan=&un=") 31 </script> 32 , 33 _navtabloginorig_(_linktextLOGIN_,_textdescrlogin_) 34 <script type="text/javascript"> 35 appendUsernameArgs("login","uan=1") 36 </script> 37 ) 38 } 20 39 21 40 … … 41 60 # 4. optional "selected" or not if it is the current tab 42 61 _navtaborig_ {<a _If_("_4_" eq "selected",class="navlink_sel">_2_,class="navlink" href="_1_" title="_3_">_2_)</a>} 62 63 # same sa above, but without _1_ as there is no hyperlink to go to (want to say on the same page) 64 _navtabloginorig_ {<a _If_("_3_" eq "selected",class="navlink_sel postit">_1_,class="navlink postit" id="login" href="" title="_2_">_1_)</a>} 65 66 # same sa above, but without _1_ as there is no hyperlink to go to (want to say on the same page) 67 _navtablogoutorig_ {<a _If_("_3_" eq "selected",class="navlink_sel postit">_1_,class="navlink postit" id="logout" href="" title="_2_">_1_)</a>} 43 68 44 69 # parameters are -
main/branches/64_bit_Greenstone/greenstone2/macros/seaweed.dm
r23502 r23523 1 1 package Global 2 2 3 _seaweed _ {3 _seaweedscript_ { 4 4 5 5 … … 27 27 28 28 <script type="text/javascript" src="_httpscript_/seaweed.js"></script> 29 <script type="text/javascript" src="_httpscript_/gsajaxapi.js"></script>30 29 31 30 … … 126 125 127 126 window.onload=function()\{ 128 //try \{127 try \{ 129 128 de.init(); 130 129 if (window.addEventListener) \{ … … 141 140 \}); 142 141 143 /*\}142 \} 144 143 catch(err) \{ 145 144 alert("SeaWeed failed to initialise: " + err.message); 146 145 \} 147 */148 146 \} 149 147 … … 197 195 198 196 197 198 function seaweedReindexCollection() \{ 199 var arc = document.getElementById("seaweedRC"); 200 arc.innerHTML = "reindexing ..."; 201 gsapi.reindexCollection("incremental",seaweedReindexCallback); 202 \} 203 204 function seaweedReindexCallback(xmlHttp) \{ 205 var arc = document.getElementById("seaweedRC"); 206 arc.innerHTML = "reindexing done."; 207 \} 208 209 199 210 </script> 200 211 201 202 212 } 213 214 _first-metadata-spanwrap_ {<span metapos="0" metaname="_1_" docoid="_2_" class="editable-metadata">} 215 _/first-metadata-spanwrap_ {</span>} 216 217 _first-metadata-divwrap_ {<div metapos="0" metaname="_1_" docoid="_2_" class="editable-metadata">} 218 _/first-metadata-divwrap_ {</div>} -
main/branches/64_bit_Greenstone/greenstone2/macros/style.dm
r23501 r23523 151 151 <div class="bannerextra">_pagebannerextra_</div> 152 152 <!-- end of page banner --> 153 _If_("_cgiargtalkback_" eq "1",_talkback:uploadForm_) 153 _If_("_activateweb20_" eq "2", 154 _If_("_activatetalkback_" eq "1",_talkback:uploadForm_) 155 ) 154 156 } 155 157 … … 162 164 <p> 163 165 <!-- end of page banner --> 164 _If_("_cgiargtalkback_" eq "1",_talkback:uploadForm_) 166 _If_("_activateweb20_" eq "2", 167 _If_("_activatetalkback_" eq "1",_talkback:uploadForm_) 168 ) 165 169 } 166 170 … … 191 195 } 192 196 197 _loginscript_ { 198 function appendUsernameArgs(id,addOn) 199 \{ 200 var a=document.getElementById(id); 201 var url = a.getAttribute("href"); 202 if (url == "") \{ 203 url = document.location.toString(); 204 \} 205 206 //alert("url before = " + url); 207 208 // clear out any earlier user name/authentication values 209 url = url.replace(/(&|\\\\?)uan=\\d\{0,1\}/g,""); 210 url = url.replace(/(&|\\\\?)un=[a-z0-9:\\-]*/g,""); 211 url = url.replace(/(&|\\\\?)pw=[a-z0-9:\\-]*/g,""); 212 213 //alert("url after = " + url); 214 215 var gwcgi = "_gwcgi_"; 216 217 var tailUrl = url.substr(url.length-gwcgi.length); 218 219 url += (tailUrl == "_gwcgi_") ? "?" : "&"; 220 url += addOn; 221 222 //alert("url with add on = " + url); 223 224 a.setAttribute("href",url); 225 \} 226 } 227 228 193 229 # imagescript only used in nav_ns4.dm 194 230 _globalscripts_{ 195 196 _If_("_activateseaweed_" eq "1",_seaweed_) 231 _If_("_activateweb20_" eq "2", 232 <script type="text/javascript" src="_httpscript_/gsajaxapi.js"></script> 233 _If_("_activateseaweed_" eq "1",_seaweedscript_) 234 _If_("_activatetalkback_" eq "1",_talkbackscript_) 235 ) 197 236 _If_(_pagescriptfileextra_,_pagescriptfileextra_) 198 237 <script language="javascript" type="text/javascript"> 238 _loginscript_ 199 239 _If_(_pagescriptextra_,_pagescriptextra_) 200 240 _collectionspecificscript_ … … 205 245 206 246 _globalscripts_ [v=1] { 247 _If_("_activateweb20_" eq "2", 248 <script type="text/javascript" src="_httpscript_/gsajaxapi.js"></script> 249 _If_("_activateseaweed_" eq "1",_seaweedscript_) 250 _If_("_activatetalkback_" eq "1",_talkbackscript_) 251 ) 252 _If_(_pagescriptfileextra_,_pagescriptfileextra_) 207 253 <script language="javascript" type="text/javascript"> 208 254 <!-- 255 _loginscript_ 209 256 _If_(_cgiargx_,_scriptdetach_) 210 _ pagescriptextra_257 _If_(_pagescriptextra_,_pagescriptextra_) 211 258 _collectionspecificscript_ 212 259 // --> -
main/branches/64_bit_Greenstone/greenstone2/macros/talkback.dm
r23187 r23523 1 package Global 2 3 # Currently nothing in talkbackscript 4 _talkbackscript_ { 5 } 6 7 1 8 package talkback 2 9 3 # The following values are typically set in <gsdlhome>/macro/extra.dm 4 _talkfromcgi_ {} 5 _talktocgi_ {} 10 # The following values are typically set in <gsdlhome>/macro/zextra.dm 11 # They are left commented out here so the error log does not get swamped 12 # with 'redefined' warning 13 #_talkfromcgi_ {} 14 #_talktocgi_ {} 6 15 7 16 _talktoCollect_ {} … … 14 23 _talktoLibrary_ {_talktocgi_/library.cgi} 15 24 _talktoUpload_ {_talktocgi_/talkback-progressbar.pl} 25 16 26 17 27 … … 31 41 </form> 32 42 43 <div id="talktoProgressBar" style="display: block;"> 44 <iframe style="float: top;" width="600" height="100" frameborder="0" 45 src="_talktoUpload_"> 46 </iframe> 47 </div> 48 49 33 50 <script type="text/javascript"> 51 52 53 function talktoProgressBarHide(oid) 54 \{ 55 56 var ttpb = document.getElementById("talktoProgressBar"); 57 ttpb.style.display = "none"; 58 \} 59 34 60 35 61 function talkbackUploadSubmit(oid) 36 62 \{ 63 var ttpb = document.getElementById("talktoProgressBar"); 64 ttpb.style.display = "block"; 65 66 //if (window.addEventListener) \{ 67 // window.addEventListener('beforeunload',talktoProgressBarHide,true); 68 //\} 69 //else \{ 70 // window.attachEvent('onbeforeunload',talktoProgressBarHide); 71 //\} 72 73 //alert("away to submit"); 74 37 75 var uploadForm = document.uploadForm; 38 76 uploadForm.oid.value = oid; -
main/branches/64_bit_Greenstone/greenstone2/perllib/unicode.pm
r23387 r23523 633 633 if ((defined $and_numeric_entities) && ($and_numeric_entities)) { 634 634 $text =~ s/\&\#x([0-9A-F]+);/pack('C', hex($1))/ige; 635 $text =~ s/\&\# ([0-9]+);/pack('C', $1)/ige;635 $text =~ s/\&\#u?([0-9]+);/pack('C', $1)/ige; 636 636 } 637 637 … … 764 764 = map { $_ > 255 ? # Needs to be represent in entity form 765 765 sprintf("&#x%X;",$_) : 766 $_ > 128? # Representable in %XX form766 $_>128 || $_==ord("%") ? # Representable in %XX form 767 767 sprintf("%%%2X", $_) : 768 768 chr($_) # otherwise, Ascii char -
main/branches/64_bit_Greenstone/greenstone2/runtime-src/src/recpt/formattools.cpp
r23305 r23523 33 33 #include <assert.h> 34 34 35 static bool metadata_spanwrap = false; 35 static bool metadata_wrap = false; 36 static text_t metadata_wrap_type = ""; 36 37 37 38 // a few function prototypes … … 694 695 formatlistptr->command = comEndMetadataSpanWrap; 695 696 697 else if (meta == "metadata-divwrap") 698 formatlistptr->command = comMetadataDivWrap; 699 700 else if (meta == "/metadata-divwrap") 701 formatlistptr->command = comEndMetadataDivWrap; 702 696 703 else if (meta == "Summary") 697 704 formatlistptr->command = comSummary; … … 980 987 981 988 982 static text_t spanwrap_metatext(const text_t& metatext, const text_t& OID,989 static text_t wrap_metatext(const text_t& metatext, const text_t& OID, 983 990 const text_t metaname, int metapos=-1) 984 991 { 985 992 986 text_t tag_type = (metaname == "Text") ? "div" : "span";993 text_t tag_type = metadata_wrap_type; 987 994 text_t editable_type = (metaname == "Text") ? "text" : "metadata"; 988 995 … … 1092 1099 } 1093 1100 1094 if (metadata_ spanwrap) {1095 fresh_metatext = spanwrap_metatext(fresh_metatext,OID,meta.metaname,i);1101 if (metadata_wrap) { 1102 fresh_metatext = wrap_metatext(fresh_metatext,OID,meta.metaname,i); 1096 1103 } 1097 1104 formatted_metatext += fresh_metatext; … … 1171 1178 } 1172 1179 1173 if (metadata_ spanwrap) {1174 fresh_metatext = spanwrap_metatext(fresh_metatext,OID,meta.metaname,position);1180 if (metadata_wrap) { 1181 fresh_metatext = wrap_metatext(fresh_metatext,OID,meta.metaname,position); 1175 1182 } 1176 1183 … … 1388 1395 while (orptr != NULL) { 1389 1396 1390 if (metadata_ spanwrap) {1397 if (metadata_wrap) { 1391 1398 // need to be a bit more careful about this 1392 // => test for it *without* spanwrap , and if defined, then1393 // got back and generate it again, this time with spanwrap on1394 1395 metadata_ spanwrap = false;1399 // => test for it *without* spanwrap or divwrap, and if defined, then 1400 // got back and generate it again, this time with spanwrap/divwrap on 1401 1402 metadata_wrap = false; 1396 1403 text_t test_tmp = format_string (collection,collectproto,docinfo, disp, orptr, 1397 1404 options, logout); 1398 metadata_ spanwrap = true;1405 metadata_wrap = true; 1399 1406 if (!test_tmp.empty()) { 1400 1407 … … 1665 1672 if (decision.command == dMeta) { 1666 1673 1667 bool store_metadata_ spanwrap = metadata_spanwrap;1668 metadata_ spanwrap = 0;1669 1670 // temporarily suspend metadata- spanwrap (if on) so can test if metadata item really exits or not1674 bool store_metadata_wrap = metadata_wrap; 1675 metadata_wrap = 0; 1676 1677 // temporarily suspend metadata-XXXwrap (if on) so can test if metadata item really exits or not 1671 1678 bool metadata_exists 1672 1679 = (get_meta (collection,collectproto,docinfo,disp,decision.meta,options, 1673 1680 logout) != ""); 1674 1681 1675 metadata_ spanwrap = store_metadata_spanwrap;1682 metadata_wrap = store_metadata_wrap; 1676 1683 1677 1684 if (metadata_exists) { … … 1897 1904 break; 1898 1905 case comMetadataSpanWrap: 1899 metadata_ spanwrap=true;return "";1906 metadata_wrap=true; metadata_wrap_type="span"; return ""; 1900 1907 break; 1901 1908 case comEndMetadataSpanWrap: 1902 metadata_spanwrap=false; return ""; 1909 metadata_wrap=false; metadata_wrap_type=""; return ""; 1910 break; 1911 case comMetadataDivWrap: 1912 metadata_wrap=true; metadata_wrap_type="div"; return ""; 1913 break; 1914 case comEndMetadataDivWrap: 1915 metadata_wrap=false; metadata_wrap_type=""; return ""; 1903 1916 break; 1904 1917 case comIf: … … 1960 1973 } 1961 1974 1962 if (metadata_ spanwrap) {1963 text = spanwrap_metatext(text,docinfo.OID,"Text");1975 if (metadata_wrap) { 1976 text = wrap_metatext(text,docinfo.OID,"Text"); 1964 1977 } 1965 1978 … … 2012 2025 summary.replace("\n","
"); 2013 2026 2014 if (metadata_ spanwrap) {2015 summary = spanwrap_metatext(summary,docinfo.OID,"Summary");2027 if (metadata_wrap) { 2028 summary = wrap_metatext(summary,docinfo.OID,"Summary"); 2016 2029 } 2017 2030 -
main/branches/64_bit_Greenstone/greenstone2/runtime-src/src/recpt/formattools.h
r22650 r23523 35 35 comDoc, comHighlight, comEndHighlight, 36 36 comMetadataSpanWrap, comEndMetadataSpanWrap, 37 comMetadataDivWrap, comEndMetadataDivWrap, 37 38 comRel, comHref, comSummary, 38 39 comTOC, comImage, comDocumentButtonDetach, comDocumentButtonHighlight,
Note:
See TracChangeset
for help on using the changeset viewer.