Difference between revisions of "General guidelines about Portlet StyleSheets"

From Gcube Wiki
Jump to: navigation, search
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''Homogenizing the DILIGENT interface'''
+
[[Category:TO BE REMOVED]]
==Pre-development Actions==
+
===Downloading Gridpshere===
+
The official DILIGENT gridsphere version is: '''''2.2.7'''''.<br>
+
All the portlet developers must use this version.
+
To download it click [http://www.gridsphere.org/download/pub/gridsphere/gridsphere-2.2.7-src.tgz here].
+
  
===Preparing the environment===
+
'''Homogenizing the D4Science interface'''
#Unzip / Untar the file
+
#Add a new environmental variable: <span style="color:green;">export GRIDSPHERE_HOME=&lt;grdsphere-folder&gt;</span>
+
  
===Patching Gridpshere Home===
 
In order to be able to use DILIGENT header themes, you should first patch gridsphere.
 
The needed steps are:
 
#Download the patch from [http://ddwiki.di.uoa.gr/mediawiki/images/a/a8/Diligent-theme-patch.tgz here]
 
#Unzip / Untar the file
 
#Execute: <span style="color:green;">cd &lt;patch-folder&gt;; ./patch.sh $GRIDSPHERE_HOME</span>
 
 
'''! Important Info 1:'''<br>
 
This patch also contains the changes needed on Gridsphere so as to consume GWT applications.<br>
 
'''! Important Info 2:'''<br>
 
If you want to use credentials you also have to patch gridpshere for credentials. You can find the needed info [[Using credentials in Portlets/Servlets|here]]<br>
 
 
===Installing GridSphere===
 
*Execute: <span style="color:green;">cd $GRIDSPHERE_HOME; ant install</span>
 
*The server url is: ''<nowiki>http://localhost:port/diligent/gcube</nowiki>''
 
  
 
==StyleSheet Classes==
 
==StyleSheet Classes==
 
===Header===
 
===Header===
 
For using the diligent-header class, you should add in your html tag the following code:<br>
 
For using the diligent-header class, you should add in your html tag the following code:<br>
<span style="color:navy;">class="diligent-header"</span><br>
+
<span style="color:navy;">class="d4science-header"</span><br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
In order to have the following result:<br>
 
In order to have the following result:<br>
Line 35: Line 13:
 
You must write:
 
You must write:
 
<pre><table>
 
<pre><table>
     <tr class="diligent-header">
+
     <tr class="d4science-header">
 
         <td><img src="browse.png"></td>
 
         <td><img src="browse.png"></td>
 
         <td>Browse</td>
 
         <td>Browse</td>
Line 50: Line 28:
 
#In doView() method of your portlet, you write: <span style="color:navy;">response.addProperty("CSS_HREF", request.getContextPath() + "/html/'''''&lt;css-filename&gt;'''''.css");</span>
 
#In doView() method of your portlet, you write: <span style="color:navy;">response.addProperty("CSS_HREF", request.getContextPath() + "/html/'''''&lt;css-filename&gt;'''''.css");</span>
 
#Directly in the jsp page: <span style="color:navy;">&lt;link rel="stylesheet" href="&lt;%= request.getContextPath()%&gt;/html/'''''&lt;css-filename&gt;'''''.css" type="text/css"&gt;</span>
 
#Directly in the jsp page: <span style="color:navy;">&lt;link rel="stylesheet" href="&lt;%= request.getContextPath()%&gt;/html/'''''&lt;css-filename&gt;'''''.css" type="text/css"&gt;</span>
 
+
<br><br>
 
----
 
----
  
 
----
 
----
 
--[[User:Valia|Valia]] 19:22, 25 May 2007 (EEST)
 
--[[User:Valia|Valia]] 19:22, 25 May 2007 (EEST)

Latest revision as of 19:15, 6 July 2016


Homogenizing the D4Science interface


StyleSheet Classes

Header

For using the diligent-header class, you should add in your html tag the following code:
class="d4science-header"
Example:
In order to have the following result:
Diligent-header.PNG
You must write:

<table>
    <tr class="d4science-header">
        <td><img src="browse.png"></td>
        <td>Browse</td>
    </tr>
</table>

Body

For the body you should you the css class named "portlet-section-body"
Diligent-body.PNG

Importing Custom-made CSS files

There are two ways to import a custom-made css file:

  1. In doView() method of your portlet, you write: response.addProperty("CSS_HREF", request.getContextPath() + "/html/<css-filename>.css");
  2. Directly in the jsp page: <link rel="stylesheet" href="<%= request.getContextPath()%>/html/<css-filename>.css" type="text/css">





--Valia 19:22, 25 May 2007 (EEST)