IDEMPIERE-1325 Custom iDempiere Home Page
|
@ -2,6 +2,7 @@
|
|||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/server"/>
|
||||
<classpathentry kind="src" path="src/main/servlet"/>
|
||||
<classpathentry kind="src" path="src/main/home"/>
|
||||
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/jardiff.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/jnlp-servlet.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
|
|
|
@ -97,6 +97,6 @@
|
|||
</user-data-constraint>
|
||||
</security-constraint>
|
||||
<welcome-file-list>
|
||||
<welcome-file>idempiere.html</welcome-file>
|
||||
<welcome-file>idempiere.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
</web-app>
|
||||
|
|
|
@ -27,10 +27,13 @@ bin.includes = META-INF/,\
|
|||
OSGI-INF/requestprocessorfactory.xml,\
|
||||
OSGI-INF/schedulerfactory.xml,\
|
||||
OSGI-INF/workflowprocessorfactory.xml,\
|
||||
OSGI-INF/
|
||||
OSGI-INF/,\
|
||||
resources/,\
|
||||
idempiere.jsp
|
||||
output.. = build/classes/
|
||||
source.. = src/main/server/,\
|
||||
src/main/servlet/
|
||||
src/main/servlet/,\
|
||||
src/main/home/
|
||||
bin.excludes = src/**,\
|
||||
.settings/**,\
|
||||
.classpath,\
|
||||
|
|
|
@ -0,0 +1,190 @@
|
|||
<%@ page import="org.bmlaurus.home.Prop" %>
|
||||
<!--
|
||||
Theme Name: iDempiere Theme
|
||||
Version: 2.0
|
||||
Description: iDempiere Theme
|
||||
Author: BMLaurus
|
||||
Author URI: http://www.bmlaurus.com
|
||||
-->
|
||||
<html>
|
||||
<% Prop.load(); %>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" href="<%=Prop.loadCss()%>">
|
||||
<script type="text/javascript" src="resources/jquery/jquery.js"></script>
|
||||
<% if(Prop.isRssOn()){
|
||||
out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"http://www.google.com/jsapi?key=ABQIAAAAFEyVt-pBJaTXzM__EKlCrBRyn6VRRdQGMLQqRPPw1fs6QDtVcBRGklOHzrf7hmoAX3qgxg4t5ImqRA\"></script>\n");
|
||||
out.write("<script type=\"text/javascript\" language=\"javascript\" src=\"resources/gfeedfetcher.js\"></script>");
|
||||
}
|
||||
%>
|
||||
<title><%=Prop.getProperty(Prop.TITLE) %></title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="body" class="body">
|
||||
<div id="toolBar" class="toolBar">
|
||||
<div id="toolBar-title" class="toolBar-title">
|
||||
<div id="credits" style="color:#336699;">
|
||||
<%=Prop.getProperty(Prop.CREDITS_TXT)%>
|
||||
</div>
|
||||
<div class="left_div" id="title">
|
||||
<p><%=Prop.getProperty(Prop.CLIENT_NAME)%></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toolBar-tools" class="toolBar-tools">
|
||||
<a href="<%=Prop.getProperty(Prop.OPTION_LINK)%>" target="_blank">
|
||||
<img name="img_option" src="<%=Prop.getImage("img_option.png")%>" border="0" title="<%=Prop.getProperty(Prop.OPTION_TEXT)%>"/>
|
||||
</a>
|
||||
<a id="felixConsole" href="<%=Prop.getProperty(Prop.FELIX_LINK)%>">
|
||||
<img name="img_felix" src="<%=Prop.getImage("img_felix.png")%>" border="0" title="<%=Prop.getProperty(Prop.FELIX_TEXT)%>"/>
|
||||
</a>
|
||||
<a id="ServerManagement" href="<%=Prop.getProperty(Prop.MONITOR_LINK)%>">
|
||||
<img name="img_idempiereMonitor" src="<%=Prop.getImage("img_idempiereMonitor.png")%>" border="0" title="<%=Prop.getProperty(Prop.MONITOR_TEXT)%>"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id ="main" class="main">
|
||||
<div id="main-content" class="main-content">
|
||||
<div id="main-topButtons">
|
||||
<div id="main-requestBtns" class="topBtnHeader">
|
||||
<div id ="main-requestBtns-btnReq" class="topBtn">
|
||||
<div class = "btnResoc-content">
|
||||
<a href="<%=Prop.getProperty(Prop.SUPPORT_LINK)%>" target="_blank">
|
||||
<img name="img_locsupport" src="<%=Prop.getImage("img_locsupport.png")%>" border="0" title="<%=Prop.getProperty(Prop.LOCAL_TEXT)%>"/>
|
||||
</a>
|
||||
<div class="main-txt-btn"><%=Prop.getProperty(Prop.LOCAL_TEXT)%></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id ="main-requestBtns-btnSendReq" class="topBtn">
|
||||
<div class = "btnResoc-content">
|
||||
<a href="<%=Prop.getProperty(Prop.RESOURCE_LINK)%>" target="_blank">
|
||||
<img name="img_resource" src="<%=Prop.getImage("img_resource.png")%>" border="0" title="<%=Prop.getProperty(Prop.RESOURCE_TEXT)%>"/>
|
||||
</a>
|
||||
<div class="main-txt-btn"><%=Prop.getProperty(Prop.RESOURCE_TEXT)%></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id ="main-requestBtns-btnLocSupp" class="topBtn">
|
||||
<div class = "btnResoc-content">
|
||||
<a href="<%=Prop.getProperty(Prop.WEBSTORE_LINK)%>" target="_blank">
|
||||
<img name="img_webstore" src="<%=Prop.getImage("img_webstore.png")%>" border="0" title="<%=Prop.getProperty(Prop.WEBSTORE_TEXT)%>"/>
|
||||
</a>
|
||||
<div class="main-txt-btn"><%=Prop.getProperty(Prop.WEBSTORE_TEXT)%></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id ="main-requestBtns-btnResoc" class="topBtn">
|
||||
<div class = "btnResoc-content">
|
||||
<a href="<%=Prop.getProperty(Prop.SENDREQUEST_LINK)%>" target="_blank">
|
||||
<img name="img_sendreq" src="<%=Prop.getImage("img_sendreq.png")%>" border="0" title="<%=Prop.getProperty(Prop.SENDREQUEST_TEXT)%>"/>
|
||||
</a>
|
||||
<div class="main-txt-btn"><%=Prop.getProperty(Prop.SENDREQUEST_TEXT)%></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main-rssContent">
|
||||
<div id="rssfeed-wrap">
|
||||
<script type="text/javascript">
|
||||
<% if(Prop.isRssOn()) {
|
||||
out.write("var newsfeed=new gfeedfetcher(\"rssfeeds\", \"rssfeedsclass\", \"_new\");\n");
|
||||
out.write("newsfeed.displayoptions(\"label datetime snippet\");\n");
|
||||
out.write("newsfeed.setentrycontainer(\"p\");\n");
|
||||
out.write("newsfeed.filterfeed(20, \"date\");\n");
|
||||
for(int i=1;i<=5;i++){
|
||||
if(Prop.getProperty(Prop.RSS+i)!=null&&Prop.getProperty(Prop.RSS+i).length()>0){
|
||||
out.write("newsfeed.addFeed(\""+Prop.getProperty(Prop.RSS+i+"Name")+"\",\""+Prop.getProperty(Prop.RSS+i)+"\");\n");
|
||||
}
|
||||
}
|
||||
out.write("newsfeed.init();\n");
|
||||
}
|
||||
%>
|
||||
</script>
|
||||
<% if(Prop.isRssOn())
|
||||
out.write("<p><a class=\"darklink\" href=\"javascript:newsfeed.init()\">"+Prop.getProperty(Prop.RSS_REFRESH)+"</a></p>");
|
||||
%>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main-login" class="main-login">
|
||||
<a href="<%=Prop.getProperty(Prop.WEBUI_LINK)%>" target="_self">
|
||||
<img name="img_webui" src="<%=Prop.getImage("img_webui.png")%>" border="0" />
|
||||
</a>
|
||||
</div>
|
||||
<div id="main-docuBtns">
|
||||
<div id="main-docuBtns" class="topBtnFooter">
|
||||
<div id ="main-docuBtns-btnIrc" class="bottomBtn">
|
||||
<div class = "btnDocu-content">
|
||||
<a href="<%=Prop.getProperty(Prop.IRC_LINK)%>" target="_blank">
|
||||
<img name="img_irc" src="<%=Prop.getImage("img_irc.png")%>" border="0" title="<%=Prop.getProperty(Prop.IRC_TEXT)%>"/>
|
||||
</a>
|
||||
<div class="main-txt-btn"><%=Prop.getProperty(Prop.IRC_TEXT)%></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id ="main-docuBtns-btnWiki" class="bottomBtn">
|
||||
<div class = "btnDocu-content">
|
||||
<a href="<%=Prop.getProperty(Prop.WIKI_LINK)%>" target="_blank">
|
||||
<img name="img_wiki" src="<%=Prop.getImage("img_wiki.png")%>" border="0" title="<%=Prop.getProperty(Prop.WIKI_TEXT)%>"/>
|
||||
</a>
|
||||
<div class="main-txt-btn"><%=Prop.getProperty(Prop.WIKI_TEXT)%></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id ="main-docuBtns-btnForum" class="bottomBtn">
|
||||
<div class = "btnDocu-content">
|
||||
<a href="<%=Prop.getProperty(Prop.FORUMS_LINK)%>" target="_blank">
|
||||
<img name="img_forum" src="<%=Prop.getImage("img_forum.png")%>" border="0" title="<%=Prop.getProperty(Prop.FORUMS_TEXT)%>"/>
|
||||
</a>
|
||||
<div class="main-txt-btn"><%=Prop.getProperty(Prop.FORUMS_TEXT)%></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id ="main-docuBtns-btnSuppReq" class="bottomBtn">
|
||||
<div class = "btnDocu-content">
|
||||
<a href="<%=Prop.getProperty(Prop.SUPPORTREQ_LINK)%>" target="_blank">
|
||||
<img name="img_supreq" src="<%=Prop.getImage("img_supreq.png")%>" border="0" title="<%=Prop.getProperty(Prop.SUPPORTREQUEST_TEXT)%>"/>
|
||||
</a>
|
||||
<div class="main-txt-btn"><%=Prop.getProperty(Prop.SUPPORTREQUEST_TEXT)%></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main-background">
|
||||
<img name="img_background" src="<%=Prop.getImage("img_back.png")%>" border="0"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="foot" class="foot">
|
||||
<div id="socialBar" class="socialBar">
|
||||
<%if(!Prop.getProperty(Prop.SOC_FACEBOOK).equals("") && !Prop.getProperty(Prop.SOC_FACEBOOK).equals("NONE")){%>
|
||||
<a id="facebook" href="<%=Prop.getProperty(Prop.SOC_FACEBOOK)%>" target="_blank">
|
||||
<img name="img_facebook" src="<%=Prop.getImage("img_facebook.png")%>" border="0"/>
|
||||
</a>
|
||||
<%} if(!Prop.getProperty(Prop.SOC_TWITTER).equals("") && !Prop.getProperty(Prop.SOC_TWITTER).equals("NONE")){%>
|
||||
<a id="twitter" href="<%=Prop.getProperty(Prop.SOC_TWITTER)%>" target="_blank">
|
||||
<img name="img_twitter" src="<%=Prop.getImage("img_twitter.png")%>" border="0"/>
|
||||
</a>
|
||||
<%} if(!Prop.getProperty(Prop.SOC_LINKEDIN).equals("") && !Prop.getProperty(Prop.SOC_LINKEDIN).equals("NONE")){%>
|
||||
<a id="linkedin" href="<%=Prop.getProperty(Prop.SOC_LINKEDIN)%>" target="_blank">
|
||||
<img name="img_linkedin" src="<%=Prop.getImage("img_linkedin.png")%>" border="0"/>
|
||||
</a>
|
||||
<%} if(!Prop.getProperty(Prop.SOC_GOOPLUS).equals("") && !Prop.getProperty(Prop.SOC_GOOPLUS).equals("NONE")){%>
|
||||
<a id="google+" href="<%=Prop.getProperty(Prop.SOC_GOOPLUS)%>" target="_blank">
|
||||
<img name="img_googleplus" src="<%=Prop.getImage("img_googleplus.png")%>" border="0"/>
|
||||
</a>
|
||||
<%} if(!Prop.getProperty(Prop.SOC_5).equals("") && !Prop.getProperty(Prop.SOC_5).equals("NONE")){%>
|
||||
<a id="soc5" href="<%=Prop.getProperty(Prop.SOC_LINKEDIN)%>" target="_blank">
|
||||
<img name="img_soc5" src="<%=Prop.getImage("img_soc5.png")%>" border="0"/>
|
||||
</a>
|
||||
<%} if(!Prop.getProperty(Prop.SOC_6).equals("") && !Prop.getProperty(Prop.SOC_6).equals("NONE")){%>
|
||||
<a id="soc6" href="<%=Prop.getProperty(Prop.SOC_LINKEDIN)%>" target="_blank">
|
||||
<img name="img_soc6" src="<%=Prop.getImage("img_soc6.png")%>" border="0"/>
|
||||
</a>
|
||||
<%} if(!Prop.getProperty(Prop.SOC_7).equals("") && !Prop.getProperty(Prop.SOC_7).equals("NONE")){%>
|
||||
<a id="soc7" href="<%=Prop.getProperty(Prop.SOC_LINKEDIN)%>" target="_blank">
|
||||
<img name="img_soc7" src="<%=Prop.getImage("img_soc7.png")%>" border="0"/>
|
||||
</a>
|
||||
<%}%>
|
||||
</div>
|
||||
<div id="footercopyright">
|
||||
© Copyright 2013-<%=Prop.getYear()%> iDempiere - All rights reserved - <a href="http://www.gnu.org/licenses/gpl-2.0.html" target="blank">iDempiere License is GPLv2</a>
|
||||
<%=Prop.getProperty(Prop.COPYRIGHT_TXT)%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -6,8 +6,8 @@
|
|||
</head>
|
||||
<body>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
document.location='idempiere.html';
|
||||
document.location='idempiere.jsp';
|
||||
</script>
|
||||
<p>Click <a href="idempiere.html">here</a> if not forwarded automatically</p>
|
||||
<p>Click <a href="idempiere.jsp">here</a> if not forwarded automatically</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
// -------------------------------------------------------------------
|
||||
// gAjax RSS Feeds Displayer- By Dynamic Drive, available at: http://www.dynamicdrive.com
|
||||
// Created: July 17th, 2007
|
||||
// Updated June 14th, 10': Fixed issue in IE where labels would sometimes be associated with the incorrect feed items
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
var gfeedfetcher_loading_image="resources/indicator.gif" //Full URL to "loading" image. No need to config after this line!!
|
||||
|
||||
google.load("feeds", "1") //Load Google Ajax Feed API (version 1)
|
||||
|
||||
function gfeedfetcher(divid, divClass, linktarget){
|
||||
this.linktarget=linktarget || "" //link target of RSS entries
|
||||
this.feedlabels=[] //array holding lables for each RSS feed
|
||||
this.feedurls=[]
|
||||
this.feeds=[] //array holding combined RSS feeds' entries from Feed API (result.feed.entries)
|
||||
this.feedsfetched=0 //number of feeds fetched
|
||||
this.feedlimit=5
|
||||
this.showoptions="" //Optional components of RSS entry to show (none by default)
|
||||
this.sortstring="date" //sort by "date" by default
|
||||
document.write('<div id="'+divid+'" class="'+divClass+'"></div>') //output div to contain RSS entries
|
||||
this.feedcontainer=document.getElementById(divid)
|
||||
this.itemcontainer="<li>" //default element wrapping around each RSS entry item
|
||||
}
|
||||
|
||||
gfeedfetcher.prototype.addFeed=function(label, url){
|
||||
this.feedlabels[this.feedlabels.length]=label
|
||||
this.feedurls[this.feedurls.length]=url
|
||||
}
|
||||
|
||||
gfeedfetcher.prototype.filterfeed=function(feedlimit, sortstr){
|
||||
this.feedlimit=feedlimit
|
||||
if (typeof sortstr!="undefined")
|
||||
this.sortstring=sortstr
|
||||
}
|
||||
|
||||
gfeedfetcher.prototype.displayoptions=function(parts){
|
||||
this.showoptions=parts //set RSS entry options to show ("date, datetime, time, snippet, label, description")
|
||||
}
|
||||
|
||||
gfeedfetcher.prototype.setentrycontainer=function(containerstr){ //set element that should wrap around each RSS entry item
|
||||
this.itemcontainer="<"+containerstr.toLowerCase()+">"
|
||||
}
|
||||
|
||||
gfeedfetcher.prototype.init=function(){
|
||||
this.feedsfetched=0 //reset number of feeds fetched to 0 (in case init() is called more than once)
|
||||
this.feeds=[] //reset feeds[] array to empty (in case init() is called more than once)
|
||||
this.feedcontainer.innerHTML='<p><img src="'+gfeedfetcher_loading_image+'" /> Retrieving RSS feed(s)</p>'
|
||||
var displayer=this
|
||||
for (var i=0; i<this.feedurls.length; i++){ //loop through the specified RSS feeds' URLs
|
||||
var feedpointer=new google.feeds.Feed(this.feedurls[i]) //create new instance of Google Ajax Feed API
|
||||
var items_to_show=(this.feedlimit<=this.feedurls.length)? 1 : Math.floor(this.feedlimit/this.feedurls.length) //Calculate # of entries to show for each RSS feed
|
||||
if (this.feedlimit%this.feedurls.length>0 && this.feedlimit>this.feedurls.length && i==this.feedurls.length-1) //If this is the last RSS feed, and feedlimit/feedurls.length yields a remainder
|
||||
items_to_show+=(this.feedlimit%this.feedurls.length) //Add that remainder to the number of entries to show for last RSS feed
|
||||
feedpointer.setNumEntries(items_to_show) //set number of items to display
|
||||
feedpointer.load(function(label){
|
||||
return function(r){
|
||||
displayer._fetch_data_as_array(r, label)
|
||||
}
|
||||
}(this.feedlabels[i])) //call Feed.load() to retrieve and output RSS feed.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gfeedfetcher._formatdate=function(datestr, showoptions){
|
||||
var itemdate=new Date(datestr)
|
||||
var parseddate=(showoptions.indexOf("datetime")!=-1)? itemdate.toLocaleString() : (showoptions.indexOf("date")!=-1)? itemdate.toLocaleDateString() : (showoptions.indexOf("time")!=-1)? itemdate.toLocaleTimeString() : ""
|
||||
return "<span class='datefield'>"+parseddate+"</span>"
|
||||
}
|
||||
|
||||
gfeedfetcher._sortarray=function(arr, sortstr){
|
||||
var sortstr=(sortstr=="label")? "ddlabel" : sortstr //change "label" string (if entered) to "ddlabel" instead, for internal use
|
||||
if (sortstr=="title" || sortstr=="ddlabel"){ //sort array by "title" or "ddlabel" property of RSS feed entries[]
|
||||
arr.sort(function(a,b){
|
||||
var fielda=a[sortstr].toLowerCase()
|
||||
var fieldb=b[sortstr].toLowerCase()
|
||||
return (fielda<fieldb)? -1 : (fielda>fieldb)? 1 : 0
|
||||
})
|
||||
}
|
||||
else{ //else, sort by "publishedDate" property (using error handling, as "publishedDate" may not be a valid date str if an error has occured while getting feed
|
||||
try{
|
||||
arr.sort(function(a,b){return new Date(b.publishedDate)-new Date(a.publishedDate)})
|
||||
}
|
||||
catch(err){}
|
||||
}
|
||||
}
|
||||
|
||||
gfeedfetcher.prototype._fetch_data_as_array=function(result, ddlabel){
|
||||
var thisfeed=(!result.error)? result.feed.entries : "" //get all feed entries as a JSON array or "" if failed
|
||||
if (thisfeed==""){ //if error has occured fetching feed
|
||||
alert("Some blog posts could not be loaded: "+result.error.message)
|
||||
}
|
||||
for (var i=0; i<thisfeed.length; i++){ //For each entry within feed
|
||||
result.feed.entries[i].ddlabel=ddlabel //extend it with a "ddlabel" property
|
||||
}
|
||||
this.feeds=this.feeds.concat(thisfeed) //add entry to array holding all feed entries
|
||||
this._signaldownloadcomplete() //signal the retrieval of this feed as complete (and move on to next one if defined)
|
||||
}
|
||||
|
||||
gfeedfetcher.prototype._signaldownloadcomplete=function(){
|
||||
this.feedsfetched+=1
|
||||
if (this.feedsfetched==this.feedurls.length) //if all feeds fetched
|
||||
this._displayresult(this.feeds) //display results
|
||||
}
|
||||
|
||||
|
||||
gfeedfetcher.prototype._displayresult=function(feeds){
|
||||
var rssoutput=(this.itemcontainer=="<li>")? "<ul>\n" : ""
|
||||
gfeedfetcher._sortarray(feeds, this.sortstring)
|
||||
for (var i=0; i<feeds.length; i++){
|
||||
var itemtitle="<a rel=\"nofollow\" href=\"" + feeds[i].link + "\" target=\"" + this.linktarget + "\" class=\"titlefield\">" + feeds[i].title + "</a>"
|
||||
var itemlabel=/label/i.test(this.showoptions)? '<span class="labelfield">['+this.feeds[i].ddlabel+']</span>' : " "
|
||||
var itemdate=gfeedfetcher._formatdate(feeds[i].publishedDate, this.showoptions)
|
||||
var itemdescription=/description/i.test(this.showoptions)? "<br />"+feeds[i].content : /snippet/i.test(this.showoptions)? "<br />"+feeds[i].contentSnippet : ""
|
||||
rssoutput+=this.itemcontainer + itemtitle + " " + itemlabel + " " + itemdate + "\n" + itemdescription + this.itemcontainer.replace("<", "</") + "\n\n"
|
||||
}
|
||||
rssoutput+=(this.itemcontainer=="<li>")? "</ul>" : ""
|
||||
this.feedcontainer.innerHTML=rssoutput
|
||||
}
|
||||
|
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 393 KiB |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 930 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 700 B |
After Width: | Height: | Size: 856 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 587 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 766 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 587 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1,351 @@
|
|||
/*
|
||||
Theme Name: iDempiere Theme
|
||||
Version: 2.0
|
||||
Description: Black Template
|
||||
Author: BMLaurus
|
||||
Author URI: http://www.bmlaurus.com
|
||||
*/
|
||||
body{
|
||||
background-color:#333333;
|
||||
font-family: verdana;
|
||||
color:#FFFFFF;
|
||||
}
|
||||
a{
|
||||
color: #336699;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.body{
|
||||
margin-top: 25px;
|
||||
width: 800px;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
position: relative;
|
||||
}
|
||||
.toolBar{
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
background-color:#000000;
|
||||
}
|
||||
.toolBar-title{
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
.toolBar-tools {
|
||||
bottom: 10px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
}
|
||||
.toolBar-tools img{
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
}
|
||||
.toolBar-tools img:hover{
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.main{
|
||||
padding-top: 60px;
|
||||
}
|
||||
#main-background{
|
||||
height: 95%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: -1000;
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
}
|
||||
#main-background img{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.topBtnHeader{
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top:50px;
|
||||
}
|
||||
.topBtnFooter{
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top:262px;
|
||||
}
|
||||
|
||||
.topBtn{
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
#main-requestBtns-btnReq{
|
||||
overflow: hidden;
|
||||
width: 70px;
|
||||
height:53px;
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
-ms-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
#main-requestBtns-btnReq:hover{
|
||||
width: 181px;
|
||||
height: 53px;
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#main-requestBtns-btnSendReq{
|
||||
overflow: hidden;
|
||||
width: 70px;
|
||||
height:53px;
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
-ms-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
#main-requestBtns-btnSendReq:hover{
|
||||
width: 181px;
|
||||
height: 53px;
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#main-requestBtns-btnLocSupp{
|
||||
overflow: hidden;
|
||||
width: 70px;
|
||||
height:53px;
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
-ms-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
#main-requestBtns-btnLocSupp:hover{
|
||||
width: 181px;
|
||||
height: 53px;
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#main-requestBtns-btnResoc{
|
||||
overflow: hidden;
|
||||
width: 70px;
|
||||
height:53px;
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
-ms-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
#main-requestBtns-btnResoc:hover{
|
||||
width: 181px;
|
||||
height: 53px;
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#main-docuBtns-btnIrc{
|
||||
overflow: hidden;
|
||||
width: 70px;
|
||||
height:53px;
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
-ms-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
#main-docuBtns-btnIrc:hover{
|
||||
width: 181px;
|
||||
height: 53px;
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#main-docuBtns-btnWiki{
|
||||
overflow: hidden;
|
||||
width: 70px;
|
||||
height:53px;
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
-ms-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
#main-docuBtns-btnWiki:hover{
|
||||
width: 181px;
|
||||
height: 53px;
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#main-docuBtns-btnForum{
|
||||
overflow: hidden;
|
||||
width: 70px;
|
||||
height:53px;
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
-ms-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
#main-docuBtns-btnForum:hover{
|
||||
width: 181px;
|
||||
height: 53px;
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#main-docuBtns-btnSuppReq{
|
||||
overflow: hidden;
|
||||
width: 70px;
|
||||
height:53px;
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
-webkit-transition: all 0.5s ease;
|
||||
-moz-transition: all 0.5s ease;
|
||||
-o-transition: all 0.5s ease;
|
||||
-ms-transition: all 0.5s ease;
|
||||
transition: all 0.5s ease;
|
||||
}
|
||||
#main-docuBtns-btnSuppReq:hover{
|
||||
width: 181px;
|
||||
height: 53px;
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
.btnDocu-content{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.btnResoc-content{
|
||||
position: relative;
|
||||
}
|
||||
.main-txt-btn{
|
||||
font-size: 9px;
|
||||
left: 90px;
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.main-content{
|
||||
position: relative;
|
||||
height: 550px;
|
||||
}
|
||||
.main-login{
|
||||
bottom: 25px;
|
||||
position: absolute;
|
||||
right: 150px;
|
||||
}
|
||||
.main-login img{
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
}
|
||||
.main-login img:hover{
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
#main-rssContent{
|
||||
position: absolute;
|
||||
right: 50px;
|
||||
top: 50px;
|
||||
}
|
||||
#credits{
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
#foot{
|
||||
background-color: #000000;
|
||||
height: 50px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
margin-top: -28px;
|
||||
}
|
||||
|
||||
#footercopyright{
|
||||
font-size: 60%;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 20px;
|
||||
}
|
||||
#socialBar{
|
||||
left: 10px;
|
||||
top: 10px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#socialBar img{
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
}
|
||||
#socialBar img:hover{
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/** RSS FEED **/
|
||||
.labelfield{
|
||||
color:gray;
|
||||
font-size: 50%; }
|
||||
.datefield{
|
||||
color:gray;
|
||||
font-size: 80%;}
|
||||
#rssfeeds a{
|
||||
color: #336699;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
font-size: 90%;
|
||||
}
|
||||
#rssfeeds p{
|
||||
margin-bottom: 2px;
|
||||
text-decoration: none;
|
||||
font-size: 90%;
|
||||
}
|
||||
code{
|
||||
color: red;
|
||||
}
|
||||
#blogoolafeed, #blogoolafeed a {
|
||||
color:white;
|
||||
}
|
||||
#blogoolafeed a:hover{
|
||||
color:#8E7BD3;
|
||||
}
|
||||
#blogoolafeed ul {
|
||||
margin-left:-15px
|
||||
}
|
||||
#rssfeed-wrap:hover {
|
||||
opacity: 0.9;
|
||||
filter:alpha(opacity=90);
|
||||
}
|
||||
#rssfeed-wrap {
|
||||
font-size: 80%;
|
||||
background-color: #CCCCCC;
|
||||
border-radius: 15px;
|
||||
color: #000000;
|
||||
height: 340px;
|
||||
opacity: 0.3;
|
||||
overflow: scroll;
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
width: 300px;
|
||||
filter:alpha(opacity=30);
|
||||
-moz-border-radius: 15px;
|
||||
}
|
After Width: | Height: | Size: 624 KiB |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 999 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 700 B |
After Width: | Height: | Size: 884 B |
After Width: | Height: | Size: 512 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 778 B |
After Width: | Height: | Size: 845 B |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 587 B |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 1.5 KiB |
|
@ -0,0 +1,224 @@
|
|||
/*
|
||||
Theme Name: iDempiere Theme
|
||||
Version: 2.0
|
||||
Description: White Template
|
||||
Author: BMLaurus
|
||||
Author URI: http://www.bmlaurus.com
|
||||
*/
|
||||
body{
|
||||
background-color:white;
|
||||
font-family: verdana;
|
||||
}
|
||||
a{
|
||||
color: #336699;
|
||||
text-decoration: none;
|
||||
}
|
||||
div.body{
|
||||
margin-top: 25px;
|
||||
width: 810px;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
position: relative;
|
||||
}
|
||||
.toolBar{
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
}
|
||||
.toolBar-title{
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
.toolBar-tools {
|
||||
bottom: 10px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
}
|
||||
.toolBar-tools img{
|
||||
filter:alpha(opacity=80);
|
||||
opacity: 0.8;
|
||||
}
|
||||
.toolBar-tools img:hover{
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
.main{
|
||||
padding-top: 70px;
|
||||
}
|
||||
#main-background{
|
||||
height: 396px;
|
||||
position: absolute;
|
||||
top: 71px;
|
||||
width: 810px;
|
||||
z-index: -1000;
|
||||
}
|
||||
#main-background img{
|
||||
height: 396px;
|
||||
width: 810px;
|
||||
}
|
||||
.topBtnHeader{
|
||||
overflow: hidden;
|
||||
}
|
||||
.topBtnFooter{
|
||||
margin-top: 50px;
|
||||
}
|
||||
.topBtn{
|
||||
border-top: 2px solid #59595B;
|
||||
border-right: 2px solid #59595B;
|
||||
float:left;
|
||||
width: 200px;
|
||||
height:70px;
|
||||
}
|
||||
.topBtn img{
|
||||
padding-top: 10px;
|
||||
width: 200px;
|
||||
height: 50px;
|
||||
filter:alpha(opacity=80);
|
||||
opacity: 0.8;
|
||||
}
|
||||
.bottomBtn{
|
||||
border-bottom: 2px solid #59595B;
|
||||
border-right: 2px solid #59595B;
|
||||
float:left;
|
||||
width: 200px;
|
||||
height:70px;
|
||||
}
|
||||
.bottomBtn img{
|
||||
padding-top: 10px;
|
||||
width: 200px;
|
||||
height: 50px;
|
||||
filter:alpha(opacity=80);
|
||||
opacity: 0.8;
|
||||
}
|
||||
.topBtn img:hover{
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
.main-content{
|
||||
position: relative;
|
||||
height: 550px;
|
||||
}
|
||||
.main-login{
|
||||
bottom: 150px;
|
||||
position: absolute;
|
||||
right: 100px;
|
||||
}
|
||||
.main-login img{
|
||||
filter:alpha(opacity=60);
|
||||
opacity: 0.6;
|
||||
}
|
||||
.main-login img:hover{
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
.btnDocu-content{
|
||||
position: relative;
|
||||
}
|
||||
.btnResoc-content{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.main-txt-btn{
|
||||
font-size: 11px;
|
||||
left: 90px;
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
cursor: pointer;
|
||||
z-index: -1000;
|
||||
}
|
||||
|
||||
#main-requestBtns-btnReq{
|
||||
-moz-border-top-left-radius: 15px;
|
||||
border-top-left-radius: 15px;
|
||||
border-left: 2px solid #59595B;
|
||||
}
|
||||
#main-requestBtns-btnResoc{
|
||||
-moz-border-top-right-radius: 15px;
|
||||
border-top-right-radius: 15px;
|
||||
border-right: 2px solid #59595B;
|
||||
}
|
||||
#main-docuBtns-btnIrc{
|
||||
-moz-border-bottom-left-radius: 15px;
|
||||
border-bottom-left-radius: 15px;
|
||||
border-left: 2px solid #59595B;
|
||||
}
|
||||
#main-docuBtns-btnSuppReq{
|
||||
-moz-border-bottom-right-radius: 15px;
|
||||
border-bottom-right-radius: 15px;
|
||||
border-right: 2px solid #59595B;
|
||||
}
|
||||
|
||||
|
||||
#main-rssContent{
|
||||
height: 320px;
|
||||
padding-left: 25px;
|
||||
padding-top: 25px;
|
||||
}
|
||||
#credits{
|
||||
font-size: 70%;
|
||||
}
|
||||
.foot{
|
||||
position: relative;
|
||||
}
|
||||
#footercopyright{
|
||||
bottom: 10px;
|
||||
font-size: 60%;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
}
|
||||
#socialBar{
|
||||
margin-left: 10px;
|
||||
}
|
||||
#socialBar img{
|
||||
filter:alpha(opacity=80);
|
||||
opacity: 0.8;
|
||||
}
|
||||
#socialBar img:hover{
|
||||
filter:alpha(opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/** RSS FEED **/
|
||||
.labelfield{
|
||||
color:gray;
|
||||
font-size: 50%; }
|
||||
.datefield{
|
||||
color:gray;
|
||||
font-size: 80%;}
|
||||
#rssfeeds a{
|
||||
color: #336699;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
font-size: 90%;
|
||||
}
|
||||
#rssfeeds p{
|
||||
margin-bottom: 2px;
|
||||
text-decoration: none;
|
||||
font-size: 90%;
|
||||
}
|
||||
code{
|
||||
color: red;
|
||||
}
|
||||
#blogoolafeed, #blogoolafeed a {
|
||||
color:white;
|
||||
}
|
||||
#blogoolafeed a:hover{
|
||||
color:#8E7BD3;
|
||||
}
|
||||
#blogoolafeed ul {
|
||||
margin-left:-15px
|
||||
}
|
||||
#rssfeed-wrap {
|
||||
font-size: 80%;
|
||||
height: 300px;
|
||||
overflow: scroll;
|
||||
text-align: left;
|
||||
width: 280px;
|
||||
background-color:white;
|
||||
filter:alpha(opacity=90);
|
||||
opacity:.9;
|
||||
-moz-border-radius: 15px;
|
||||
border-radius: 15px;
|
||||
padding: 10px;
|
||||
}
|
|
@ -0,0 +1,335 @@
|
|||
package org.bmlaurus.home;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.net.URL;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Ini;
|
||||
import org.compiere.util.SecureEngine;
|
||||
|
||||
import com.lowagie.text.pdf.codec.Base64;
|
||||
|
||||
public final class Prop implements Serializable {
|
||||
|
||||
/**
|
||||
* @author BMLaurus-acanaveral
|
||||
* @uri http://www.bmlaurus.com
|
||||
*/
|
||||
private static final long serialVersionUID = -3973931828485013352L;
|
||||
|
||||
/** File Property */
|
||||
public static final String HOME_PROPERTY_FILE = "home.properties";
|
||||
|
||||
/** Customizable Properties */
|
||||
private static final String TEMPLATE_PATH = "TemplatePath";
|
||||
private static final String TEMPLATE_NAME = "TemplateName";
|
||||
public static final String CLIENT_NAME = "ClientName";
|
||||
public static final String CREDITS_TXT = "Credits";
|
||||
public static final String COPYRIGHT_TXT = "Copyriright";
|
||||
public static final String CUSTOM_IMAGE_PATH = "CustomImagePath";
|
||||
|
||||
/** Customizable Links */
|
||||
public static final String WEBUI_LINK = "WebUiLink";
|
||||
public static final String WEBSTORE_LINK = "WebStoreLink";
|
||||
public static final String SENDREQUEST_LINK = "SendRequestLink";
|
||||
public static final String RESOURCE_LINK = "ResourceLink";
|
||||
public static final String SUPPORT_LINK = "SupportLink";
|
||||
public static final String IRC_LINK = "IrcLink";
|
||||
public static final String WIKI_LINK = "WikiLink";
|
||||
public static final String FORUMS_LINK = "ForumsLink";
|
||||
public static final String SUPPORTREQ_LINK = "SupportRequestLink";
|
||||
public static final String OPTION_LINK = "OptionLink";
|
||||
public static final String FELIX_LINK = "FelixLink";
|
||||
public static final String MONITOR_LINK = "iDempiereMonitorLink";
|
||||
|
||||
/** Custom Texts */
|
||||
public static final String OPTION_TEXT = "OptionText";
|
||||
public static final String FELIX_TEXT = "FelixText";
|
||||
public static final String LOCAL_TEXT = "LocalSupportText";
|
||||
public static final String MONITOR_TEXT = "iDempiereMonitorText";
|
||||
public static final String WEBUI_TEXT = "WebUiText";
|
||||
public static final String WEBSTORE_TEXT = "WebStoreText";
|
||||
public static final String SENDREQUEST_TEXT = "SendRequestText";
|
||||
public static final String RESOURCE_TEXT = "ResourceText";
|
||||
public static final String IRC_TEXT = "IrcText";
|
||||
public static final String WIKI_TEXT = "WikiText";
|
||||
public static final String FORUMS_TEXT = "ForumsText";
|
||||
public static final String SUPPORTREQUEST_TEXT = "SupportRequestText";
|
||||
|
||||
public static final String TITLE = "Title";
|
||||
|
||||
/** Default Links */
|
||||
private static final String DEF_FELIX_LINK = "osgi/system/console";
|
||||
private static final String DEF_MONITOR_LINK = "idempiereMonitor";
|
||||
private static final String DEF_WEBUI_LINK = "/webui/";
|
||||
private static final String DEF_WEBSTORE_LINK = "/wstore/index.jsp";
|
||||
private static final String DEF_SENDREQUEST_LINK= "/wstore/request.jsp";
|
||||
private static final String DEF_RESOURCE_LINK = "http://www.idempiere.org";
|
||||
private static final String DEF_SUPPORT_LINK = "#";
|
||||
private static final String DEF_IRC_LINK = "http://webchat.freenode.net/?channels=idempiere";
|
||||
private static final String DEF_WIKI_LINK = "http://wiki.idempiere.org/";
|
||||
private static final String DEF_FORUMS_LINK = "http://groups.google.com/group/idempiere";
|
||||
private static final String DEF_SUPPORTREQ_LINK = "http://jira.idempiere.com";
|
||||
|
||||
/**Social Network*/
|
||||
public static final String SOC_FACEBOOK = "Facebook";
|
||||
public static final String SOC_TWITTER = "Twitter";
|
||||
public static final String SOC_LINKEDIN = "LinkedIn";
|
||||
public static final String SOC_GOOPLUS = "Google+";
|
||||
public static final String SOC_5 = "Social5";
|
||||
public static final String SOC_6 = "Social6";
|
||||
public static final String SOC_7 = "Social7";
|
||||
|
||||
/** RSS Properties */
|
||||
public static final String RSS_ON = "rssOn";
|
||||
public static final String RSS = "rss";
|
||||
public static final String RSS_1_NAME = "rss1Name";
|
||||
public static final String RSS_1 = "rss1";
|
||||
public static final String RSS_2_NAME = "rss2Name";
|
||||
public static final String RSS_2 = "rss2";
|
||||
public static final String RSS_3_NAME = "rss3Name";
|
||||
public static final String RSS_3 = "rss3";
|
||||
public static final String RSS_4_NAME = "rss4Name";
|
||||
public static final String RSS_4 = "rss4";
|
||||
public static final String RSS_5_NAME = "rss5Name";
|
||||
public static final String RSS_5 = "rss5";
|
||||
public static final String RSS_REFRESH = "RssRefreshMessage";
|
||||
|
||||
/**Defaults*/
|
||||
private static final String CREDITS = "Welcome to the iDempiere (OSGi+ADempiere) 1.0b Page!";
|
||||
private static String LOGO_URL = null;
|
||||
|
||||
|
||||
/** Container for Properties */
|
||||
private volatile static Properties s_prop = new Properties();
|
||||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger(Prop.class);
|
||||
|
||||
|
||||
private static String IMAGE_PATH(){
|
||||
String path="resources/templates/";
|
||||
if(s_prop!=null){
|
||||
path = getProperty(TEMPLATE_PATH);
|
||||
if(getProperty(TEMPLATE_NAME)!=null && getProperty(TEMPLATE_NAME).length()>0)
|
||||
path = path+getProperty(TEMPLATE_NAME)+"/images/";
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
public static boolean loadProperties (String filename)
|
||||
{
|
||||
boolean loadOK = true;
|
||||
s_prop = new Properties();
|
||||
InputStream fis = null;
|
||||
try
|
||||
{
|
||||
fis = new FileInputStream(filename);
|
||||
s_prop.load(fis);
|
||||
fis.close();
|
||||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
log.warning(filename + " not found");
|
||||
log.warning("!!WARNING:Please locate yout custom home.properties on iDEMPIERE_HOME.");
|
||||
loadOK = false;
|
||||
try {
|
||||
fis = Prop.class.getResourceAsStream(HOME_PROPERTY_FILE);
|
||||
s_prop.load(fis);
|
||||
fis.close();
|
||||
loadOK = true;
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.log(Level.SEVERE, filename + " - " + e.toString());
|
||||
loadOK = false;
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
log.log(Level.SEVERE, filename + " - " + t.toString());
|
||||
loadOK = false;
|
||||
}
|
||||
|
||||
return loadOK;
|
||||
} // loadProperties
|
||||
|
||||
private static void setDefaults(){
|
||||
if(s_prop.getProperty(TEMPLATE_NAME)==null ||s_prop.getProperty(TEMPLATE_NAME).length()<=0)
|
||||
s_prop.setProperty(TEMPLATE_NAME, "white");
|
||||
if(s_prop.getProperty(CLIENT_NAME)==null||s_prop.getProperty(CLIENT_NAME).length()<=0)
|
||||
s_prop.setProperty(CLIENT_NAME, "iDempiere Server");
|
||||
if(s_prop.getProperty(CREDITS_TXT)==null||s_prop.getProperty(CREDITS_TXT).length()<=0)
|
||||
s_prop.setProperty(CREDITS_TXT, CREDITS);
|
||||
if(s_prop.getProperty(RSS_REFRESH)==null||s_prop.getProperty(RSS_REFRESH).length()<=0)
|
||||
s_prop.setProperty(RSS_REFRESH, "Refresh live blog posts");
|
||||
//LINKS
|
||||
if(s_prop.getProperty(FELIX_LINK)==null||s_prop.getProperty(FELIX_LINK).length()<=0)
|
||||
s_prop.setProperty(FELIX_LINK, DEF_FELIX_LINK);
|
||||
if(s_prop.getProperty(MONITOR_LINK)==null||s_prop.getProperty(MONITOR_LINK).length()<=0)
|
||||
s_prop.setProperty(MONITOR_LINK, DEF_MONITOR_LINK);
|
||||
if(s_prop.getProperty(WEBUI_LINK)==null||s_prop.getProperty(WEBUI_LINK).length()<=0)
|
||||
s_prop.setProperty(WEBUI_LINK, DEF_WEBUI_LINK);
|
||||
if(s_prop.getProperty(WEBSTORE_LINK)==null||s_prop.getProperty(WEBSTORE_LINK).length()<=0)
|
||||
s_prop.setProperty(WEBSTORE_LINK, DEF_WEBSTORE_LINK);
|
||||
if(s_prop.getProperty(SENDREQUEST_LINK)==null||s_prop.getProperty(SENDREQUEST_LINK).length()<=0)
|
||||
s_prop.setProperty(SENDREQUEST_LINK, DEF_SENDREQUEST_LINK);
|
||||
if(s_prop.getProperty(RESOURCE_LINK)==null||s_prop.getProperty(RESOURCE_LINK).length()<=0)
|
||||
s_prop.setProperty(RESOURCE_LINK, DEF_RESOURCE_LINK);
|
||||
if(s_prop.getProperty(SUPPORT_LINK)==null||s_prop.getProperty(SUPPORT_LINK).length()<=0)
|
||||
s_prop.setProperty(SUPPORT_LINK, DEF_SUPPORT_LINK);
|
||||
if(s_prop.getProperty(IRC_LINK)==null||s_prop.getProperty(IRC_LINK).length()<=0)
|
||||
s_prop.setProperty(IRC_LINK, DEF_IRC_LINK);
|
||||
if(s_prop.getProperty(WIKI_LINK)==null||s_prop.getProperty(WIKI_LINK).length()<=0)
|
||||
s_prop.setProperty(WIKI_LINK, DEF_WIKI_LINK);
|
||||
if(s_prop.getProperty(FORUMS_LINK)==null||s_prop.getProperty(FORUMS_LINK).length()<=0)
|
||||
s_prop.setProperty(FORUMS_LINK, DEF_FORUMS_LINK);
|
||||
if(s_prop.getProperty(SUPPORTREQ_LINK)==null||s_prop.getProperty(SUPPORTREQ_LINK).length()<=0)
|
||||
s_prop.setProperty(SUPPORTREQ_LINK, DEF_SUPPORTREQ_LINK);
|
||||
if(s_prop.getProperty(OPTION_LINK)==null||s_prop.getProperty(OPTION_LINK).length()<=0)
|
||||
s_prop.setProperty(OPTION_LINK, "#");
|
||||
}
|
||||
|
||||
public static String loadCss(){
|
||||
String retPath = null;
|
||||
if(getProperty(TEMPLATE_PATH).contains("://")){
|
||||
String ret="data:plain/text;base64,";
|
||||
URL fis = null;
|
||||
try {
|
||||
fis = new URL(getProperty(TEMPLATE_PATH)+getProperty(TEMPLATE_NAME)+"/styles/template.css");
|
||||
byte data[]=read(fis);
|
||||
ret+=Base64.encodeBytes(data);
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
retPath = ret;
|
||||
}else
|
||||
retPath = getProperty(TEMPLATE_PATH)+getProperty(TEMPLATE_NAME)+"/styles/template.css";
|
||||
return retPath;
|
||||
}
|
||||
|
||||
public static String getYear(){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
|
||||
return sdf.format(new Date());
|
||||
}
|
||||
|
||||
public static String getImage(String img){
|
||||
String retPath = null;
|
||||
if(getProperty(CUSTOM_IMAGE_PATH)!=null && getProperty(CUSTOM_IMAGE_PATH).length()>0
|
||||
&& !getProperty(CUSTOM_IMAGE_PATH).equals("NONE")){
|
||||
retPath = imageToData(getProperty(CUSTOM_IMAGE_PATH)+img);
|
||||
if(retPath==null){
|
||||
if(IMAGE_PATH().contains("://"))
|
||||
retPath = imageToData(IMAGE_PATH()+img);
|
||||
else
|
||||
retPath = IMAGE_PATH()+img;
|
||||
}
|
||||
}else{
|
||||
if(IMAGE_PATH().contains("://"))
|
||||
retPath = imageToData(IMAGE_PATH()+img);
|
||||
else
|
||||
retPath = IMAGE_PATH()+img;
|
||||
}
|
||||
return retPath;
|
||||
}
|
||||
|
||||
public static String getProperty (String key)
|
||||
{
|
||||
if (key == null)
|
||||
return "";
|
||||
String retStr = s_prop.getProperty(key, "");
|
||||
if (retStr == null || retStr.length() == 0)
|
||||
return "";
|
||||
String value = SecureEngine.decrypt(retStr, 0);
|
||||
if (value == null)
|
||||
return "";
|
||||
return value;
|
||||
}
|
||||
|
||||
public static String getFileName (boolean tryUserHome)
|
||||
{
|
||||
if (System.getProperty("PropertyHomeFile") != null)
|
||||
return System.getProperty("PropertyHomeFile");
|
||||
String base = null;
|
||||
if (tryUserHome && Ini.isClient())
|
||||
base = System.getProperty("user.home");
|
||||
if (!Ini.isClient() || base == null || base.length() == 0)
|
||||
{
|
||||
String home = Ini.getAdempiereHome();
|
||||
if (home != null)
|
||||
base = home;
|
||||
}
|
||||
if (base != null && !base.endsWith(File.separator))
|
||||
base += File.separator;
|
||||
if (base == null)
|
||||
base = "";
|
||||
return base + HOME_PROPERTY_FILE;
|
||||
}
|
||||
|
||||
public static String imageToData(String url){
|
||||
String ret="data:image/png;base64,";
|
||||
if(url.equals(LOGO_URL))
|
||||
return url;
|
||||
URL fis = null;
|
||||
try {
|
||||
fis = new URL(url);
|
||||
byte data[]=read(fis);
|
||||
if(data==null||data.length<=0)
|
||||
return null;
|
||||
ret+=Base64.encodeBytes(data);
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static byte[] read(URL url) throws IOException {
|
||||
ByteArrayOutputStream bais = new ByteArrayOutputStream();
|
||||
InputStream is = null;
|
||||
try {
|
||||
is = url.openStream();
|
||||
byte[] byteChunk = new byte[4096]; // Or whatever size you want to read in at a time.
|
||||
int n;
|
||||
|
||||
while ( (n = is.read(byteChunk)) > 0 ) {
|
||||
bais.write(byteChunk, 0, n);
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.err.println("Failed while reading bytes from %s: %s"+ url.toExternalForm()+ e.getMessage());
|
||||
}
|
||||
finally {
|
||||
if (is != null) { is.close(); }
|
||||
}
|
||||
return bais.toByteArray();
|
||||
}
|
||||
|
||||
public static boolean isRssOn(){
|
||||
boolean rss=false;
|
||||
if(getProperty(RSS_ON).toUpperCase().equals("TRUE")||
|
||||
getProperty(RSS_ON).toUpperCase().equals("YES")||
|
||||
getProperty(RSS_ON).toUpperCase().equals("Y"))
|
||||
rss=true;
|
||||
return rss;
|
||||
}
|
||||
|
||||
public static void load(){
|
||||
loadProperties(getFileName(false));
|
||||
setDefaults();
|
||||
LOGO_URL=IMAGE_PATH()+"logo.png";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
#iDempiere Custom-Home Properties file.
|
||||
|
||||
#Custom Default Links
|
||||
FelixLink = osgi/system/console
|
||||
iDempiereMonitorLink= idempiereMonitor
|
||||
WebUiLink = /webui/
|
||||
WebStoreLink = /wstore/index.jsp
|
||||
SendRequestLink = /wstore/request.jsp
|
||||
ResourceLink = http://www.idempiere.org
|
||||
IrcLink = http://webchat.freenode.net/?channels=idempiere
|
||||
WikiLink = http://wiki.idempiere.org/
|
||||
ForumsLink = http://groups.google.com/group/idempiere
|
||||
SupportRequestLink = http://jira.idempiere.com
|
||||
SupportLink = mailto:support@idempiere.com
|
||||
OptionLink = https://idempiere.atlassian.net
|
||||
|
||||
#Default Texts
|
||||
OptionText = Options
|
||||
FelixText = Plug-In Console
|
||||
iDempiereMonitorText= Idempiere Monitor
|
||||
LocalSupportText = Local Support
|
||||
WebUiText = WebUI App
|
||||
WebStoreText = Web Store
|
||||
SendRequestText = Send Request
|
||||
ResourceText = Resource
|
||||
IrcText = IRC Channel
|
||||
WikiText = Wiki
|
||||
ForumsText = Forums
|
||||
SupportRequestText = Support Request
|
||||
|
||||
#Social Networks. NONE to hide
|
||||
Facebook = https://www.facebook.com/IDempiere
|
||||
Twitter = https://twitter.com/iDempiere
|
||||
LinkedIn = NONE
|
||||
Google+ = https://groups.google.com/forum/#!forum/idempiere-dev
|
||||
Social5 = NONE
|
||||
Social6 = NONE
|
||||
Social7 = NONE
|
||||
|
||||
#Home Title
|
||||
Title = iDempiere Application Home
|
||||
|
||||
#Custom TemplateName (white or black)
|
||||
TemplateName = white
|
||||
|
||||
#file:///Linux/&Mac/resources/templates/ --- file://Windows/resources/templates/
|
||||
TemplatePath = resources/templates/
|
||||
#If want to customize just the images. EX: file:///u01/home/images/
|
||||
CustomImagePath = NONE
|
||||
|
||||
#Client Name & Logo file (format file://)
|
||||
ClientName = iDempiere Server
|
||||
|
||||
#Custom Credits & Copyright tail
|
||||
Credits = Welcome to the iDempiere (OSGi+ADempiere) 2.0 Page!
|
||||
Copyriright = || by <a href="http://www.company.com" target="blank">Company</a>
|
||||
|
||||
#Custom RSS (rss1 to rss5)
|
||||
rssOn = true
|
||||
RssRefreshMessage = Refresh
|
||||
rss1Name = iDempiere's Blog
|
||||
rss1 = https://groups.google.com/group/idempiere/feed/rss_v2_0_msgs.xml
|
||||
rss2Name = 2 nd Blog
|
||||
rss2 = https://groups.google.com/group/idempiere-es/feed/rss_v2_0_msgs.xml
|