Project

General

Profile

« Previous | Next » 

Revision 3726

Added by Jing Tao almost 17 years ago

Change the relative path to use a function getServerName+getPortNumber+getContextPath. But there is still problem in default.js.

View differences:

lib/style/skins/default/default.js
82 82
//  exist unless it is resized smaller) . 
83 83
//  ( e.g. if you do not want a header to be included, set: HEADER_URL="";)
84 84
////////////////////////////////////////////////////////////////////////////////
85
var SERVER_URL_WITH_CONTEXT = "http://chico.dyndns.org/knb";
85 86

  
86

  
87 87
//  Location of the header that will be displayed at the top of the page
88 88
var HEADER_URL 
89
  = "./include_header.jsp";
89
  = SERVER_URL_WITH_CONTEXT+"/style/skins/default/include_header.jsp";
90 90

  
91 91
// Location of the search box that will be displayed above the  
92 92
//  results on the results page (optional)
93 93
var SEARCHBOX_URL 
94
  = "./include_searchbox.jsp";
94
  = SERVER_URL_WITH_CONTEXT+"/style/skins/default/include_searchbox.jsp";
95 95

  
96 96
// Location of the advanced search box
97 97
var ADVANCED_SEARCHBOX_URL 
98
  = "./include_advancedsearch.jsp";
98
  = SERVER_URL_WITH_CONTEXT+"/style/skins/default/include_advancedsearch.jsp";
99 99

  
100 100
var LOGINBOX_URL
101
  = "./include_login.jsp";
101
  = SERVER_URL_WITH_CONTEXT+"/style/skins/default/include_login.jsp";
102 102

  
103 103
var MAP_URL
104
  = "./include_map.jsp";
104
  = SERVER_URL_WITH_CONTEXT+"/style/skins/default/include_map.jsp";
105 105

  
106 106
//  Location of the header that will be displayed at the top of the page
107 107
var LEFTCOL_URL 
lib/style/skins/default/index.jsp
37 37
<head>
38 38
<title>Metacat Data Catalog </title>
39 39
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
40
	<link rel="stylesheet" type="text/css" href="./default.css">
41
	<script language="javascript" type="text/javascript" src="./default.js"></script>
42
	<script language="javascript" type="text/javascript" src="../../common/branding.js"></script>
40
	<link rel="stylesheet" type="text/css" href="<%=SERVER_URL_WITH_CONTEXT%>/style/skins/default/default.css">
41
	<script language="javascript" type="text/javascript" src="<%=SERVER_URL_WITH_CONTEXT%>/style/skins/default/default.js"></script>
42
	<script language="javascript" type="text/javascript" src="<%=SERVER_URL_WITH_CONTEXT%>/style/common/branding.js"></script>
43 43
</head>
44 44
<body>
45 45
  <script language="javascript">
lib/style/skins/default/default.xml
1 1
<?xml version="1.0"?>
2 2
<style-set name="default">
3 3
<!-- general login & search -->
4
  <default-style>../../common/ascii-treeview.xsl</default-style>
4
  <default-style>style/common/ascii-treeview.xsl</default-style>
5 5

  
6 6
  <doctype publicid="-//NCEAS//resultset//EN">
7
    <target publicid="-//W3C//HTML//EN">../../common/resultset.xsl</target>
7
    <target publicid="-//W3C//HTML//EN">style/common/resultset.xsl</target>
8 8
  </doctype>
9 9

  
10 10

  
11 11
<!-- eml-2.0.1 modules -->
12 12
  <doctype publicid="eml://ecoinformatics.org/eml-2.0.1">
13
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.1/eml.xsl</target>
13
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.1/eml.xsl</target>
14 14
  </doctype>
15 15

  
16 16
<!-- eml-2.0.0 modules -->
17 17
  <doctype publicid="eml://ecoinformatics.org/eml-2.0.0">
18
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.1/eml.xsl</target>
18
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.1/eml.xsl</target>
19 19
  </doctype>
20 20
  
21 21
<!-- eml-2.0.0beta6 modules -->
22 22
  <doctype publicid="-//ecoinformatics.org//eml-access-2.0.0beta6//EN">
23
    <target publicid="-//W3C//HTML//EN">../common/eml-2.0.0beta6/eml-access-2.0.0beta6.xsl</target>
23
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.0beta6/eml-access-2.0.0beta6.xsl</target>
24 24
  </doctype>
25 25
  <doctype publicid="-//ecoinformatics.org//eml-attribute-2.0.0beta6//EN">
26
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.0beta6/eml-attribute-2.0.0beta6.xsl</target>
26
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.0beta6/eml-attribute-2.0.0beta6.xsl</target>
27 27
  </doctype>
28 28
  <doctype publicid="-//ecoinformatics.org//eml-constraint-2.0.0beta6//EN">
29
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.0beta6/eml-constraint-2.0.0beta6.xsl</target>
29
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.0beta6/eml-constraint-2.0.0beta6.xsl</target>
30 30
  </doctype>
31 31
  <doctype publicid="-//ecoinformatics.org//eml-coverage-2.0.0beta6//EN">
32
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.0beta6/eml-coverage-2.0.0beta6.xsl</target>
32
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.0beta6/eml-coverage-2.0.0beta6.xsl</target>
33 33
  </doctype>
34 34
  <doctype publicid="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN">
35
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.0beta6/eml-dataset-2.0.0beta6.xsl</target>
35
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.0beta6/eml-dataset-2.0.0beta6.xsl</target>
36 36
  </doctype>
37 37
  <doctype publicid="-//ecoinformatics.org//eml-entity-2.0.0beta6//EN">
38
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.0beta6/eml-entity-2.0.0beta6.xsl</target>
38
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.0beta6/eml-entity-2.0.0beta6.xsl</target>
39 39
  </doctype>
40 40
  <doctype publicid="-//ecoinformatics.org//eml-literature-2.0.0beta6//EN">
41
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.0beta6/eml-literature-2.0.0beta6.xsl</target>
41
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.0beta6/eml-literature-2.0.0beta6.xsl</target>
42 42
  </doctype>
43 43
  <doctype publicid="-//ecoinformatics.org//eml-physical-2.0.0beta6//EN">
44
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.0beta6/eml-physical-2.0.0beta6.xsl</target>
44
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.0beta6/eml-physical-2.0.0beta6.xsl</target>
45 45
  </doctype>
46 46
  <doctype publicid="-//ecoinformatics.org//eml-project-2.0.0beta6//EN">
47
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.0beta6/eml-project-2.0.0beta6.xsl</target>
47
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.0beta6/eml-project-2.0.0beta6.xsl</target>
48 48
  </doctype>
49 49
  <doctype publicid="-//ecoinformatics.org//eml-protocol-2.0.0beta6//EN">
50
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.0beta6/eml-protocol-2.0.0beta6.xsl</target>
50
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.0beta6/eml-protocol-2.0.0beta6.xsl</target>
51 51
  </doctype>
52 52
  <doctype publicid="-//ecoinformatics.org//eml-software-2.0.0beta6//EN">
53
    <target publicid="-//W3C//HTML//EN">../../common/eml-2.0.0beta6/eml-software-2.0.0beta6.xsl</target>
53
    <target publicid="-//W3C//HTML//EN">style/common/eml-2.0.0beta6/eml-software-2.0.0beta6.xsl</target>
54 54
  </doctype>
55 55
  
56 56
</style-set>
lib/style/skins/default/settings.jsp
29 29
<%
30 30

  
31 31
// GLOBAL CONSTANTS FOR KNB PORTAL PAGE /////////////////////////////////////
32
   
33
   // CONTEXT NAME of metacat installed:
34
	String      CONTEXT_NAME          = request.getContextPath();
35
	
36
	// URL of SERVER with context
37
	String     SERVER_URL_WITH_CONTEXT =  request.getScheme()+"://"+request.getServerName()+CONTEXT_NAME;
32 38

  
33 39
	// URL of metacat to be used for login & searching:
34
	String      METACAT_URL           = request.getContextPath() + "/metacat";
40
	String      METACAT_URL           =  SERVER_URL_WITH_CONTEXT+ "/metacat";
35 41

  
36
	// CONTEXT NAME of metacat installed:
37
	String      CONTEXT_NAME          = request.getContextPath();
38

  
39 42
	// label for logout form button when user *is* logged in:
40 43
	String      LOGOUT_LABEL          = "Logout";
41 44

  

Also available in: Unified diff