KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > magnolia > cms > gui > misc > Sources


1 /**
2  *
3  * Magnolia and its source-code is licensed under the LGPL.
4  * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5  * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6  * you are required to provide proper attribution to obinary.
7  * If you reproduce or distribute the document without making any substantive modifications to its content,
8  * please use the following attribution line:
9  *
10  * Copyright 1993-2005 obinary Ltd. (http://www.obinary.com) All rights reserved.
11  *
12  */

13 package info.magnolia.cms.gui.misc;
14
15 /**
16  * @author Vinzenz Wyser
17  * @version 2.0
18  */

19 public class Sources {
20
21     /**
22      * Attribute set in request when links are drawn by custom tags.
23      */

24     public static final String JavaDoc REQUEST_LINKS_DRAWN = "mgnl_links_drawn"; //$NON-NLS-1$
25

26     /**
27      * Context path for the current request.
28      */

29     private String JavaDoc contextPath;
30
31     /**
32      * Instantiate a new Source for a given context path.
33      * @param contextPath context path for the current request (request.getContextPath)
34      */

35     public Sources(String JavaDoc contextPath) {
36         this.contextPath = contextPath;
37     }
38
39     public String JavaDoc getHtmlJs() {
40         StringBuffer JavaDoc html = new StringBuffer JavaDoc();
41         html.append("<script type=\"text/javascript\" SRC=\""); //$NON-NLS-1$
42
html.append(contextPath);
43         html.append("/admintemplates/js/admincentral.jsp\"></script>"); //$NON-NLS-1$
44
html.append("<script type=\"text/javascript\" SRC=\""); //$NON-NLS-1$
45
html.append(contextPath);
46         html.append("/admintemplates/js/dialogs.jsp\"></script>"); //$NON-NLS-1$
47
return html.toString();
48     }
49
50     public String JavaDoc getHtmlCss() {
51         StringBuffer JavaDoc html = new StringBuffer JavaDoc();
52         html.append("<link rel=\"stylesheet\" type=\"text/css\" HREF=\""); //$NON-NLS-1$
53
html.append(contextPath);
54         html.append("/admindocroot/css/admin-all.css\" />"); //$NON-NLS-1$
55
return html.toString();
56     }
57
58     public String JavaDoc getHtmlRichEdit() {
59         StringBuffer JavaDoc html = new StringBuffer JavaDoc();
60         html.append("<link rel=\"stylesheet\" type=\"text/css\" HREF=\""); //$NON-NLS-1$
61
html.append(contextPath);
62         html.append("/admindocroot/richE/kupustyles.css\" />"); //$NON-NLS-1$
63
html.append("<link rel=\"stylesheet\" type=\"text/css\" HREF=\""); //$NON-NLS-1$
64
html.append(contextPath);
65         html.append("/admindocroot/richE/kupucustom.css\" />"); //$NON-NLS-1$
66
html.append("<script type=\"text/javascript\" SRC=\""); //$NON-NLS-1$
67
html.append(contextPath);
68         html.append("/admindocroot/richE/sarissa.js\"> </script>"); //$NON-NLS-1$
69
html.append("<script type=\"text/javascript\" SRC=\""); //$NON-NLS-1$
70
html.append(contextPath);
71         html.append("/admindocroot/richE/kupuhelpers.js\"> </script>"); //$NON-NLS-1$
72
html.append("<script type=\"text/javascript\" SRC=\""); //$NON-NLS-1$
73
html.append(contextPath);
74         html.append("/admindocroot/richE/kupueditor.js\"> </script>"); //$NON-NLS-1$
75
html.append("<script type=\"text/javascript\" SRC=\""); //$NON-NLS-1$
76
html.append(contextPath);
77         html.append("/admindocroot/richE/kupubasetools.js\"> </script>"); //$NON-NLS-1$
78
html.append("<script type=\"text/javascript\" SRC=\""); //$NON-NLS-1$
79
html.append(contextPath);
80         html.append("/admindocroot/richE/kupuloggers.js\"> </script>"); //$NON-NLS-1$
81
html.append("<script type=\"text/javascript\" SRC=\""); //$NON-NLS-1$
82
html.append(contextPath);
83         html.append("/admindocroot/richE/kupucontentfilters.js\"> </script>"); //$NON-NLS-1$
84
html.append("<script type=\"text/javascript\" SRC=\""); //$NON-NLS-1$
85
html.append(contextPath);
86         html.append("/admindocroot/richE/kupuinit.js\"> </script>"); //$NON-NLS-1$
87
return html.toString();
88     }
89
90 }
91
Popular Tags