Changeset 1305 for trunk/gsdl/macros/build.dm
- Timestamp:
- 2000-07-25T14:19:51+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/macros/build.dm
r1291 r1305 72 72 _bcargaboutdesc_ {} 73 73 _bcargsrcformat_ {TEXT} 74 _bcargfileorurl_ {file}75 74 _bcarginputdir_ {} 76 75 _bcargcopydir_ {yes} … … 98 97 args += "&bc1aboutdesc=" + escape(form.bc1aboutdesc.value); 99 98 args += "&bc1srcformat=" + escape(form.bc1srcformat.value); 100 args += "&bc1fileorurl=" + escape(form.bc1fileorurl.value);101 99 args += "&bc1inputdir=" + escape(form.bc1inputdir.value); 102 100 args += "&bc1copydir=" + escape(form.bc1copydir.value); … … 115 113 simulate_get_action("_httpbuild_&bca=newcol"); 116 114 \} 117 }118 119 _wizardbarforu_ {120 _wizardlink_(:archiveopts,Archive options)121 115 } 122 116 … … 181 175 _wizardlink_(textinfo,Textual information) 182 176 _wizardlink_(:source,Source data) 183 _If_("_bcargfileorurl_" eq "file", _wizardbarforu_) 184 _wizardlink_(:metadata,Metadata) 185 <td> 186 <font color="#006666"> 187 Save 188 </font> 189 </td> 177 _wizardlink_(:archiveopts,Archive options) 178 _wizardlink_(:definished,Save) 190 179 </tr> 191 180 </table> … … 274 263 275 264 <input type=hidden name="bc1srcformat" value="_bcargsrcformat_"> 276 <input type=hidden name="bc1fileorurl" value="_bcargfileorurl_">277 265 <input type=hidden name="bc1inputdir" value="_bcarginputdir_"> 278 266 <input type=hidden name="bc1copydir" value="_bcargcopydir_"> … … 359 347 _headmesssource_ { New collection wizard: source data } 360 348 361 _fileortextinput_ {362 _If_("_bcarginputdir_" eq "",363 <input type="file" name="bc1inputdir" size=42>,364 <input type="text" name="bc1inputdir" value="_bcarginputdir_" size=50>)365 }366 367 349 _contentsource_ { 368 350 … … 378 360 if (form.bc1inputdir.value.match(/^\\s*$/)) 379 361 \{ 380 if (form.bc1fileorurl.value == "file") 381 \{ 382 alert("Directory for source files needs to be specified"); 383 \} 384 else 385 \{ 386 alert("At least one URL for source files needs to be specified"); 387 \} 388 362 alert("Directory for source files needs to be specified"); 389 363 form.bc1inputdir.focus(); 390 364 return; … … 392 366 393 367 // work out the next newcol "wizard" page 394 if (form.bc1fileorurl.value == "file") 368 var prefix_re 369 = new RegExp(form.gsdlhome.value + "/collect/([^/]+)/(import|archive)"); 370 371 if (form.bc1inputdir.value.match(prefix_re)) 372 \{ 373 form.bc1ingsdlarea.value = "yes"; 374 if (form.bc1inputdir.value != "_bcarginputdir_") 375 \{ 376 // input dir has been changed 377 form.bc1copydir.value = "no"; 378 \} 379 \} 380 else 395 381 \{ 396 var prefix_re 397 = new RegExp(form.gsdlhome.value + "/collect/([^/]+)/(import|archive)"); 398 399 if (form.bc1inputdir.value.match(prefix_re)) 400 \{ 401 form.bc1ingsdlarea.value = "yes"; 402 if (form.bc1inputdir.value != "_bcarginputdir_") 403 \{ 404 // input dir has been changed 405 form.bc1copydir.value = "no"; 406 \} 407 \} 408 else 409 \{ 410 form.bc1ingsdlarea.value = "no"; 411 \} 412 form.wizard.value += ":archiveopts"; 382 form.bc1ingsdlarea.value = "no"; 413 383 \} 414 else 415 \{ 416 form.bc1ingsdlarea.value = "no"; 417 form.bc1copydir.value = "yes"; 418 form.wizard.value += ":metadata"; 419 \} 384 form.wizard.value += ":archiveopts"; 420 385 421 386 simulate_get_action("_httpbuild_&bca=newcol"); … … 430 395 \} 431 396 432 function datasource_changed() \{433 var form = document.form;434 var fou_index = form.bc1fileorurlmenu.selectedIndex;435 var fou_choice = form.bc1fileorurlmenu.options[fou_index].value;436 form.bc1fileorurl.value = fou_choice;437 438 var inputdir = form.bc1inputdir.value;439 if (fou_choice == "url")440 \{441 if (!inputdir.match(/^file:/i))442 \{443 form.bc1inputdir.value = "file:"+inputdir;444 \}445 \}446 else447 \{448 var first_line_index = inputdir.indexOf("\\n",0);449 var first_line450 = (first_line_index>0) ? inputdir.substring(0,first_line_index-1) : inputdir;451 if (first_line.match(/^file:/))452 \{453 var file = first_line.substring(5,inputdir.length);454 form.bc1inputdir.value = file;455 \}456 \}457 simulate_get_action("_httpbuild_&bca=newcol");458 \}459 397 // end hiding --> 460 461 398 462 399 </script> … … 501 438 </td> 502 439 </tr> 503 <tr> 504 <td>Source location:</td>440 441 <tr> 505 442 <td> 506 <input type="hidden" name="bc1fileorurl" value="_bcargfileorurl_"> 507 <select name="bc1fileorurlmenu" onChange=datasource_changed()> 508 <option value="file" _If_("_bcargfileorurl_" eq "file",selected)>Local disk 509 <option value="url" _If_("_bcargfileorurl_" eq "url",selected)>The Internet 510 </select> 511 </td> 512 </tr> 443 Input directory: 444 </td> 445 446 <td colspan=3> 447 <input type=text name="bc1inputdir" value="_bcarginputdir_" size=40> 448 </td> 449 </td> 450 </tr> 451 513 452 <tr> 514 453 <td></td> 515 454 <td colspan=3> 516 455 <font color="#909090"> 517 The source data used to build a collection can be on either the local disk518 or externally accessible over the Web. Use this pull-down menu to519 control this setting. On selecting an item from the menu this page will520 automatically reconfigure itself so the request for input (below) will be521 a local directory or a URL as appropriate.522 523 _If_('"_bcargfileorurl_" eq "url"',524 <p> When entering a URL it is important to distinguish between a directory525 and a file. A directory must end with <tt>/</tt>526 )527 528 </font>529 </td>530 </tr>531 532 <tr>533 <td>534 _If_('"_bcargfileorurl_" eq "file"',535 Input directory:,Input URL/URLS)536 </td>537 538 <td colspan=3>539 _If_('"_bcargfileorurl_" eq "file"',540 _fileortextinput_,541 <textarea name="bc1inputdir" cols=50 rows=3542 wrap=physical>_bcarginputdir_</textarea>543 )544 </td>545 </td>546 </tr>547 548 <tr>549 <td></td>550 <td colspan=3>551 <font color="#909090">552 _If_('"_bcargfileorurl_" eq "file"',553 456 The input directory specifies where on the local disk the source data is 554 457 located. 555 ,556 Any URL specified here is downloaded and any links within that page that557 refer to further documents at that site\, contained within the same directory558 structure are recursively copied. At least one URL needs to be specified.559 )560 458 </font> 561 459 </td> … … 590 488 var form = document.form; 591 489 592 form.wizard.value += ": metadata";490 form.wizard.value += ":definished"; 593 491 594 492 simulate_get_action("_httpbuild_&bca=newcol"); … … 618 516 <input type=hidden name="bc1aboutdesc" value="_bcargaboutdesc_")> 619 517 <input type=hidden name="bc1srcformat" value="_bcargsrcformat_"> 620 <input type=hidden name="bc1fileorurl" value="_bcargfileorurl_">621 518 <input type=hidden name="bc1inputdir" value="_bcarginputdir_"> 622 519 <input type=hidden name="bc1ingsdlarea" value="_bcargingsdlarea_"> … … 671 568 } 672 569 673 674 570 #---------------------------------------------------------------------------# 675 571 676 _headmess metadata_ { New collection wizard: metadata}677 678 _content metadata_ {572 _headmessdefinished_ { New collection wizard: data entry finished } 573 574 _contentdefinished_ { 679 575 680 576 … … 693 589 \} 694 590 695 form.wizard.value += ":definished"; //*****591 form.wizard.value += ":definished"; 696 592 697 593 var cgi_prefix = "webpage_mkcol.pl"; … … 717 613 <input type=hidden name="bc1aboutdesc" value="_bcargaboutdesc_")> 718 614 <input type=hidden name="bc1srcformat" value="_bcargsrcformat_"> 719 <input type=hidden name="bc1fileorurl" value="_bcargfileorurl_">720 <input type=hidden name="bc1inputdir" value="_bcarginputdir_">721 <input type=hidden name="bc1copydir" value="_bcargcopydir_">722 <input type=hidden name="bc1ingsdlarea" value="_bcargingsdlarea_">723 <input type=hidden name="bc1refine" value="_bcargrefine_">724 725 <table border=0>726 <tr>727 <td>728 Extract acronyms:729 </td>730 <td colspan=3>731 <input type=hidden name="bc1acronyms" value="_bcargacronyms_">732 <input type=radio name="bc1acronymsradio" value="on"733 onClick=document.form.bc1acronyms.value="on"734 _If_('"_bcargacronyms_" eq "on"', checked)> on735 736 <input type=radio name="bc1acronymsradio" value="off"737 onClick=document.form.bc1acronyms.value="off"738 _If_('"_bcargacronyms_" eq "off"', checked)> off739 </td>740 </tr>741 <tr>742 <td></td>743 <td colspan=3>744 <font color="#909090">745 Switch this option on if you want acronyms in the746 text extracted as metadata.747 </font>748 </td>749 </tr>750 751 <tr><td><p> </td></tr>752 <tr><td colspan=4 align=middle>753 <a href="javascript:save()">Save_iconwizardnext_</a>754 </table>755 </form>756 </td></tr></table></center>757 758 _wizardbar_759 }760 761 762 #---------------------------------------------------------------------------#763 764 _headmessdefinished_ { New collection wizard: data entry finished }765 766 _contentdefinished_ {767 768 769 <script language="javascript">770 771 <!-- Hide code from non-js browsers772 _commonjavascript_773 //********** page never used!!!774 // end hiding -->775 776 777 </script>778 779 <center><table><tr><td>780 <form name="form" method="post" action="_gwcgi_">781 <input type=hidden name="gsdlhome" value="_gsdlhome_">782 <input type=hidden name="a" value="bc">783 <input type=hidden name="bc" value="newcol">784 _hiddenargs_785 786 <input type=hidden name="bc1fullname" value="_bcargfullname_")>787 <input type=hidden name="bc1contactemail" value="_bcargcontactemail_")>788 <input type=hidden name="bc1aboutdesc" value="_bcargaboutdesc_")>789 <input type=hidden name="bc1srcformat" value="_bcargsrcformat_">790 <input type=hidden name="bc1fileorurl" value="_bcargfileorurl_">791 615 <input type=hidden name="bc1inputdir" value="_bcarginputdir_"> 792 616 <input type=hidden name="bc1copydir" value="_bcargcopydir_"> … … 798 622 <tr> 799 623 <td> 800 This concludes the data entry required to build a new collection. 801 802 803 Away to (download) and then create config file 804 805 possible want to re-edit 806 build stuff 624 This concludes the data entry required to create a new collection. 625 626 <p>Select "finish" to save your collection info and create the 627 collection or select from the wizard bar to go back and change 628 any of your previous selections. 629 807 630 </td> 808 631 </tr> … … 810 633 <tr><td><p> </td></tr> 811 634 <tr><td align=middle> 812 <a href="javascript: next_page();">Create new collection_iconwizardnext_</a>635 <a href="javascript:save();">finish_iconwizardnext_</a> 813 636 </table> 814 637 </form> 815 638 </td></tr></table></center> 816 639 640 _wizardbar_ 817 641 } 818 642 … … 858 682 if (do_save) 859 683 \{ 860 var cgi_prefix = "webpage_editcol.pl"; 861 cgi_prefix += "?httpbuild=" + escape("_httpbuild_"); 862 cgi_prefix += "&bc1cfgfile=" + escape(form.bc1cfgfile.value); 863 864 simulate_get_action(cgi_prefix); 684 // var cgi_prefix = "webpage_editcol.pl"; 685 // cgi_prefix += "?httpbuild=" + escape("_httpbuild_"); 686 // cgi_prefix += "&bc1cfgfile=" + escape(form.bc1cfgfile.value); 687 688 // simulate_get_action(cgi_prefix); 689 690 // need to do it this way so POST method is used (as IE can't 691 // handle large config files sent in URL) 692 form.action = "webpage_editcol.pl"; 693 form.submit(); 694 865 695 \} 866 696 \} … … 887 717 <input type=hidden name="a" value="bc"> 888 718 <input type=hidden name="bc" value="editcol"> 719 <input type=hidden name="httpbuild" value="_httpbuild_"> 889 720 _hiddenargs_ 890 721 … … 1061 892 <td colspan=4> 1062 893 Building a collection is a multi-staged process. After selecting the 1063 collection you wish to be built, you must specify with stages of 1064 the building process you want executed. 894 collection you wish to be built, you must specify which stages of 895 the building process you want executed. 896 _If_(_win32_, 897 <p><font color="#B00000"> 898 <blockquote>It is recommended that you close all other windows and applications 899 while building a collection as they may interfere with the building 900 process. 901 </blockquote></font>) 902 <br> 1065 903 </td> 1066 904 </tr> … … 1158 996 _headmessbuildframe_ { Executing build commands } 1159 997 1160 1161 # not sure why we need 3 frames here when one appears to always be blank1162 # - Stefan1163 #_contentbuildframe_ {1164 1165 #<frameset rows="*,150,*" border=0>1166 # <noframes><body bgcolor="#ffffff">1167 # <p>You must have a frame enabled browser to view this.</p>1168 # </body>1169 # </noframes>1170 # <frame src="_httpbuild_&bca=buildcol&wizard=buildexec&bc1dirname=_bcargdirname_&bc1tmpname=_bcargtmpname_" name=infoframe>1171 # <frame src="_httpbuild_&bca=buildstatus&bc1tmpname=_bcargtmpname_" name=execframe>1172 # <frame src="_httpbuild_&bca=blankpage" name=blankframe>1173 #</frameset>1174 #}1175 1176 998 _contentbuildframe_ { 1177 999 1178 <frameset rows="2 00,150" border=0>1000 <frameset rows="2*,150,*" border=0> 1179 1001 <noframes><body bgcolor="#ffffff"> 1180 1002 <p>You must have a frame enabled browser to view this.</p> … … 1183 1005 <frame src="_httpbuild_&bca=buildcol&wizard=buildexec&bc1dirname=_bcargdirname_&bc1tmpname=_bcargtmpname_" name=infoframe> 1184 1006 <frame src="_httpbuild_&bca=buildstatus&bc1tmpname=_bcargtmpname_" name=execframe> 1007 <frame src="_httpbuild_&bca=blankpage" name=blankframe> 1185 1008 </frameset> 1186 1009 } 1187 1188 1010 1189 1011 #---------------------------------------------------------------------------# … … 1471 1293 1472 1294 1473 1295 _headmesscollog_ { Collection Build Log } 1296 1297 1298 _contentcollog_ { 1299 <pre> 1300 _bldfile_ 1301 </pre> 1302 } 1474 1303 1475 1304 … … 1542 1371 <li><a href="_httppageabout_&c=_build:bcargdirname_" target="_top">Access 1543 1372 the newly built collection_build:iconwizardnext_</a> 1373 <li><a href="_httpbuild_&bca=collog&bc1dirname=_build:bcargdirname_">View 1374 the build log for this collection_build:iconwizardnext_</a> 1544 1375 <li><a href="_httpbuild_&bca=newcol">Make a new 1545 1376 collection_build:iconwizardnext_</a>
Note:
See TracChangeset
for help on using the changeset viewer.