home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************\
- * *
- * KBDoc.jfm -- Knowledge Base Document Form *
- * *
- * KBDoc.jfm is part of the Knowledge Base solution application. It is used *
- * to display a single Knowledge Base document. The documentID number can *
- * be passed to this script. If no number is passed, the first document is *
- * displayed. *
- * *
- * Dependencies: knowbs31.gif *
- * homepg31.gif *
- * paper_22.gif *
- * database.cc *
- * apps\shared\controls.cc *
- * *
- * Links to: ibapps/index.htm *
- * svr/intrasrv.isv?apps/kbase_ib/kbsearch.jfm *
- * *
- * Updated 11/13/96 by IntraBuilder Samples Group *
- * $Revision: 1.22 $ *
- * *
- * Copyright (c) 1996, Borland International, Inc. All rights reserved. *
- * *
- \****************************************************************************/
- /*
- This header section is used to duplicate the normal
- process of opening the form. One additional line is
- added to store the arguments passed to the form.
- The code between the return and the class is never
- executed.
- */
- var f = new kbdocForm();
- f.argv = KBDOC.arguments;
- f.open();
- return;
- // {End Header} Do not remove this comment//
- // Generated on 11/13/96
- //
- var f = new kbdocForm();
- f.open();
- class kbdocForm extends Form {
- _sys.scripts.load(_sys.env.home() + "APPS\\SHARED\\CONTROLS.CC")
- _sys.scripts.load("DATABASE.CC")
- with (this) {
- onServerLoad = class::Form_onServerLoad;
- color = "ffffdb";
- height = 12.625;
- left = 0;
- top = 0;
- width = 73.25;
- title = "Knowledge Base Document";
- }
-
-
- with (this.ibapps1 = new KbaseDatabase()){
- left = 18;
- top = 2;
- active = true;
- }
-
-
- with (this.query1 = new Query()){
- left = 26;
- top = 2;
- database = parent.ibapps1;
- sql = "@kbase.sql";
- requestLive = false;
- active = true;
- }
-
-
- with (this.query1.rowset) {
-
- }
-
-
- with (this.rule1 = new Rule(this)){
- top = 4;
- size = 2;
- right = 76;
- pageno = 0;
- }
-
-
- with (this.rule2 = new Rule(this)){
- top = 8;
- size = 2;
- right = 76;
- }
-
-
- with (this.rule4 = new Rule(this)){
- top = 15.5;
- size = 2;
- right = 76;
- pageno = 0;
- }
-
-
- with (this.rule5 = new Rule(this)){
- top = 24;
- size = 2;
- right = 76;
- pageno = 0;
- }
-
-
- with (this.KnowledgeBaseLogo = new Image(this)){
- height = 3.4167;
- width = 10.25;
- dataSource = "filename KNOWBS31.GIF";
- alignment = 4;
- pageno = 0;
- }
-
-
- with (this.HeadingHTML = new HTML(this)){
- height = 2;
- left = 12;
- width = 64;
- color = "navy";
- text = {||'<H1><FONT SIZE="+4"><FONT COLOR="maroon">K</FONT></FONT>nowledge <FONT SIZE="+4"><FONT COLOR="maroon">B</FONT></FONT>ase <FONT SIZE="+4"><FONT COLOR="maroon">D</FONT></FONT>ocument <FONT SIZE="+2"><FONT COLOR="maroon">' + parseInt(this.parent.query1.rowset.fields["DocumentID"].value) + '</FONT></FONT></H1>'};
- pageno = 0;
- }
-
-
- with (this.TitleHTML = new HTML(this)){
- height = 0.75;
- top = 4.5;
- width = 14;
- color = "black";
- text = "Title";
- }
-
-
- with (this.TitleFieldHTML = new HTML(this)){
- height = 0.75;
- left = 14;
- top = 4.5;
- width = 62;
- color = "black";
- text = {||this.parent.query1.rowset.fields["Title"].value};
- }
-
-
- with (this.ProductHTML = new HTML(this)){
- height = 0.75;
- top = 5.25;
- width = 14;
- color = "black";
- text = "Product";
- }
-
-
- with (this.ProdDescriptFieldHTML = new HTML(this)){
- height = 0.75;
- left = 14;
- top = 5.25;
- width = 62;
- color = "black";
- text = {||this.parent.query1.rowset.fields["ProdDescript"].value};
- }
-
-
- with (this.CategoryHTML = new HTML(this)){
- height = 0.75;
- top = 6;
- width = 14;
- color = "black";
- text = "Category";
- }
-
-
- with (this.CatDescriptFieldHTML = new HTML(this)){
- height = 0.75;
- left = 14;
- top = 6;
- width = 62;
- color = "black";
- text = {||this.parent.query1.rowset.fields["CatDescript"].value};
- }
-
-
- with (this.DocumentFieldHTML = new HTML(this)){
- height = 6.5;
- top = 8.5;
- width = 76;
- fixed = true;
- color = "black";
- fontBold = false;
- text = {||((this.parent.query1.rowset.fields['reformat'].value == 1) ? "" : "<PRE>") + this.parent.query1.rowset.fields["Document"].value + ((this.parent.query1.rowset.fields['reformat'].value == 1) ? "" : "</PRE>")};
- }
-
-
- with (this.KeyWordsHTML = new HTML(this)){
- height = 0.75;
- top = 6.75;
- width = 14;
- color = "black";
- text = "Key Words: ";
- }
-
-
- with (this.KeyWordFieldHTML = new HTML(this)){
- height = 0.75;
- left = 14;
- top = 6.75;
- width = 62;
- color = "black";
- text = {||this.parent.query1.rowset.fields["Keyword"].value};
- }
-
-
- with (this.SearchLinkImage = new Image(this)){
- onImageClick = class::link_to_search_page;
- height = 3.4167;
- top = 16;
- width = 10.25;
- dataSource = "filename KNOWBS31.GIF";
- alignment = 4;
- pageno = 0;
- }
-
-
- with (this.SearchLinkHTML = new HTML(this)){
- height = 1;
- left = 12;
- top = 16;
- width = 64;
- color = "black";
- text = "<A HREF='/svr/intrasrv.isv?apps/kbase_ib/kbsearch.jfm'>Start a new search</A>";
- pageno = 0;
- }
-
-
- with (this.HomePageLinkImage = new Image(this)){
- onImageClick = class::link_to_home_page;
- height = 3.4167;
- top = 20;
- width = 10.25;
- dataSource = "filename HOMEPG31.GIF";
- alignment = 4;
- pageno = 0;
- }
-
-
- with (this.HomePageLinkHTML = new HTML(this)){
- height = 1;
- left = 12;
- top = 20;
- width = 64;
- color = "black";
- text = "<A HREF='/ibapps/index.htm'>Return to Home Page</A>";
- pageno = 0;
- }
-
-
- with (this.GeneratedHTML = new GeneratedHTML(this)){
- height = 1;
- top = 24.5;
- width = 76;
- pageno = 0;
- }
-
-
- with (this.NotFoundHTML = new HTML(this)){
- height = 3;
- top = 5;
- width = 76;
- color = "navy";
- text = "<H2>The requested document was not found. Please try again.</H2>";
- pageno = 2;
- }
-
- this.rowset = this.query1.rowset;
-
- function Form_onServerLoad()
- {
- // look for specific document
- if (form.argv.length == 1) {
- if (form.rowset.applyLocate("documentid=" + form.argv[0])) {
- // redisplay each of the HTML fields
- form.HeadingHTML.text = form.HeadingHTML.text;
- form.TitleFieldHTML.text = form.TitleFieldHTML.text;
- form.ProdDescriptFieldHTML.text = form.ProdDescriptFieldHTML.text;
- form.CatDescriptFieldHTML.text = form.CatDescriptFieldHTML.text;
- form.DocumentFieldHTML.text = form.DocumentFieldHTML.text;
- form.KeyWordFieldHTML.text = form.KeyWordFieldHTML.text;
- }
- else {
- form.HeadingHTML.text = '<H1><FONT SIZE="+4"><FONT COLOR="maroon">K</FONT></FONT>nowledge <FONT SIZE="+4"><FONT COLOR="maroon">B</FONT></FONT>ase <FONT SIZE="+4"><FONT COLOR="maroon">D</FONT></FONT>ocument</H1>';
- form.pageno = 2; // this has the document not found text
- }
- }
- }
-
- function link_to_home_page()
- {
- location.href="/ibapps/index.htm";
- }
-
- function link_to_search_page()
- {
- location.href="/svr/intrasrv.isv?apps/kbase_ib/kbsearch.jfm";
- }
-
- }
-