Update for web client
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 1017 B After Width: | Height: | Size: 766 B |
|
@ -0,0 +1,157 @@
|
|||
<!--
|
||||
Title: Tigra Calendar
|
||||
URL: http://www.softcomplex.com/products/tigra_calendar/
|
||||
Version: 3.2
|
||||
Date: 05/18/2006
|
||||
Feedback: feedback@softcomplex.com (specify product title in the subject)
|
||||
Note: Permission given to use this script in ANY kind of applications if
|
||||
header lines are left unchanged.
|
||||
Note: Script consists of two files: calendar?.js and calendar.html
|
||||
About us: Our company provides offshore IT consulting services.
|
||||
Contact us at sales@softcomplex.com if you have any programming task you
|
||||
want to be handled by professionals. Our typical hourly rate is $20.
|
||||
-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Select Date, Please.</title>
|
||||
<style>
|
||||
td {font-family: Tahoma, Verdana, sans-serif; font-size: 12px;}
|
||||
</style>
|
||||
<script language="JavaScript">
|
||||
|
||||
// months as they appear in the calendar's title
|
||||
var ARR_MONTHS = ["January", "February", "March", "April", "May", "June",
|
||||
"July", "August", "September", "October", "November", "December"];
|
||||
// week day titles as they appear on the calendar
|
||||
var ARR_WEEKDAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
||||
// day week starts from (normally 0-Su or 1-Mo)
|
||||
var NUM_WEEKSTART = 1;
|
||||
// path to the directory where calendar images are stored. trailing slash req.
|
||||
var STR_ICONPATH = 'img/';
|
||||
|
||||
var re_url = new RegExp('datetime=(\\-?\\d+)');
|
||||
var dt_current = (re_url.exec(String(window.location))
|
||||
? new Date(new Number(RegExp.$1)) : new Date());
|
||||
var re_id = new RegExp('id=(\\d+)');
|
||||
var num_id = (re_id.exec(String(window.location))
|
||||
? new Number(RegExp.$1) : 0);
|
||||
var obj_caller = (window.opener ? window.opener.calendars[num_id] : null);
|
||||
|
||||
if (obj_caller && obj_caller.year_scroll) {
|
||||
// get same date in the previous year
|
||||
var dt_prev_year = new Date(dt_current);
|
||||
dt_prev_year.setFullYear(dt_prev_year.getFullYear() - 1);
|
||||
if (dt_prev_year.getDate() != dt_current.getDate())
|
||||
dt_prev_year.setDate(0);
|
||||
|
||||
// get same date in the next year
|
||||
var dt_next_year = new Date(dt_current);
|
||||
dt_next_year.setFullYear(dt_next_year.getFullYear() + 1);
|
||||
if (dt_next_year.getDate() != dt_current.getDate())
|
||||
dt_next_year.setDate(0);
|
||||
}
|
||||
|
||||
// get same date in the previous month
|
||||
var dt_prev_month = new Date(dt_current);
|
||||
dt_prev_month.setMonth(dt_prev_month.getMonth() - 1);
|
||||
if (dt_prev_month.getDate() != dt_current.getDate())
|
||||
dt_prev_month.setDate(0);
|
||||
|
||||
// get same date in the next month
|
||||
var dt_next_month = new Date(dt_current);
|
||||
dt_next_month.setMonth(dt_next_month.getMonth() + 1);
|
||||
if (dt_next_month.getDate() != dt_current.getDate())
|
||||
dt_next_month.setDate(0);
|
||||
|
||||
// get first day to display in the grid for current month
|
||||
var dt_firstday = new Date(dt_current);
|
||||
dt_firstday.setDate(1);
|
||||
dt_firstday.setDate(1 - (7 + dt_firstday.getDay() - NUM_WEEKSTART) % 7);
|
||||
|
||||
// function passing selected date to calling window
|
||||
function set_datetime(n_datetime, b_close) {
|
||||
if (!obj_caller) return;
|
||||
|
||||
var dt_datetime = obj_caller.prs_time(
|
||||
(document.cal ? document.cal.time.value : ''),
|
||||
new Date(n_datetime)
|
||||
);
|
||||
|
||||
if (!dt_datetime) return;
|
||||
if (b_close) {
|
||||
|
||||
obj_caller.target.value = (document.cal
|
||||
? obj_caller.gen_tsmp(dt_datetime)
|
||||
: obj_caller.gen_date(dt_datetime)
|
||||
);window.close();
|
||||
}
|
||||
else obj_caller.popup(dt_datetime.valueOf());
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" marginheight="5" marginwidth="5" topmargin="5" leftmargin="5" rightmargin="5">
|
||||
<table class="clsOTable" cellspacing="0" border="0" width="100%">
|
||||
<tr><td bgcolor="#4682B4">
|
||||
<table cellspacing="1" cellpadding="3" border="0" width="100%">
|
||||
<tr><td colspan="7"><table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<script language="JavaScript">
|
||||
document.write(
|
||||
'<td>'+(obj_caller&&obj_caller.year_scroll?'<a href="javascript:set_datetime('+dt_prev_year.valueOf()+')"><img src="'+STR_ICONPATH+'prev_year.gif" width="16" height="16" border="0" alt="previous year"></a> ':'')+'<a href="javascript:set_datetime('+dt_prev_month.valueOf()+')"><img src="'+STR_ICONPATH+'prev.gif" width="16" height="16" border="0" alt="previous month"></a></td>'+
|
||||
'<td align="center" width="100%"><font color="#ffffff">'+ARR_MONTHS[dt_current.getMonth()]+' '+dt_current.getFullYear() + '</font></td>'+
|
||||
'<td><a href="javascript:set_datetime('+dt_next_month.valueOf()+')"><img src="'+STR_ICONPATH+'next.gif" width="16" height="16" border="0" alt="next month"></a>'+(obj_caller && obj_caller.year_scroll?' <a href="javascript:set_datetime('+dt_next_year.valueOf()+')"><img src="'+STR_ICONPATH+'next_year.gif" width="16" height="16" border="0" alt="next year"></a>':'')+'</td>'
|
||||
);
|
||||
</script>
|
||||
</tr>
|
||||
</table></td></tr>
|
||||
<tr>
|
||||
<script language="JavaScript">
|
||||
|
||||
// print weekdays titles
|
||||
for (var n=0; n<7; n++)
|
||||
document.write('<td bgcolor="#87cefa" align="center"><font color="#ffffff">'+ARR_WEEKDAYS[(NUM_WEEKSTART+n)%7]+'</font></td>');
|
||||
document.write('</tr>');
|
||||
|
||||
// print calendar table
|
||||
var dt_current_day = new Date(dt_firstday);
|
||||
while (dt_current_day.getMonth() == dt_current.getMonth() ||
|
||||
dt_current_day.getMonth() == dt_firstday.getMonth()) {
|
||||
// print row heder
|
||||
document.write('<tr>');
|
||||
for (var n_current_wday=0; n_current_wday<7; n_current_wday++) {
|
||||
if (dt_current_day.getDate() == dt_current.getDate() &&
|
||||
dt_current_day.getMonth() == dt_current.getMonth())
|
||||
// print current date
|
||||
document.write('<td bgcolor="#ffb6c1" align="center" width="14%">');
|
||||
else if (dt_current_day.getDay() == 0 || dt_current_day.getDay() == 6)
|
||||
// weekend days
|
||||
document.write('<td bgcolor="#dbeaf5" align="center" width="14%">');
|
||||
else
|
||||
// print working days of current month
|
||||
document.write('<td bgcolor="#ffffff" align="center" width="14%">');
|
||||
|
||||
document.write('<a href="javascript:set_datetime('+dt_current_day.valueOf() +', true);">');
|
||||
|
||||
if (dt_current_day.getMonth() == this.dt_current.getMonth())
|
||||
// print days of current month
|
||||
document.write('<font color="#000000">');
|
||||
else
|
||||
// print days of other months
|
||||
document.write('<font color="#606060">');
|
||||
|
||||
document.write(dt_current_day.getDate()+'</font></a></td>');
|
||||
dt_current_day.setDate(dt_current_day.getDate()+1);
|
||||
}
|
||||
// print row footer
|
||||
document.write('</tr>');
|
||||
}
|
||||
if (obj_caller && obj_caller.time_comp)
|
||||
document.write('<form onsubmit="javascript:set_datetime('+dt_current.valueOf()+', true)" name="cal"><tr><td colspan="7" bgcolor="#87CEFA"><font color="White" face="tahoma, verdana" size="2">Time: <input type="text" name="time" value="'+obj_caller.gen_time(this.dt_current)+'" size="8" maxlength="8"></font></td></tr></form>');
|
||||
</script>
|
||||
</table></tr></td>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,232 @@
|
|||
/* The main calendar widget. DIV containing a table. */
|
||||
|
||||
div.calendar { position: relative; }
|
||||
|
||||
.calendar, .calendar table {
|
||||
border: 1px solid #556;
|
||||
font-size: 11px;
|
||||
color: #000;
|
||||
cursor: default;
|
||||
background: #eef;
|
||||
font-family: tahoma,verdana,sans-serif;
|
||||
}
|
||||
|
||||
/* Header part -- contains navigation buttons and day names. */
|
||||
|
||||
.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
|
||||
text-align: center; /* They are the navigation buttons */
|
||||
padding: 2px; /* Make the buttons seem like they're pressing */
|
||||
}
|
||||
|
||||
.calendar .nav {
|
||||
background: #778 url(/adempiere/images/menuarrow.gif) no-repeat 100% 100%;
|
||||
}
|
||||
|
||||
.calendar thead .title { /* This holds the current "month, year" */
|
||||
font-weight: bold; /* Pressing it will take you to the current date */
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.calendar thead .headrow { /* Row <TR> containing navigation buttons */
|
||||
background: #778;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.calendar thead .daynames { /* Row <TR> containing the day names */
|
||||
background: #bdf;
|
||||
}
|
||||
|
||||
.calendar thead .name { /* Cells <TD> containing the day names */
|
||||
border-bottom: 1px solid #556;
|
||||
padding: 2px;
|
||||
text-align: center;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.calendar thead .weekend { /* How a weekend day name shows in header */
|
||||
color: #a66;
|
||||
}
|
||||
|
||||
.calendar thead .hilite { /* How do the buttons in header appear when hover */
|
||||
background-color: #aaf;
|
||||
color: #000;
|
||||
border: 1px solid #04f;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.calendar thead .active { /* Active (pressed) buttons in header */
|
||||
background-color: #77c;
|
||||
padding: 2px 0px 0px 2px;
|
||||
}
|
||||
|
||||
/* The body part -- contains all the days in month. */
|
||||
|
||||
.calendar tbody .day { /* Cells <TD> containing month days dates */
|
||||
width: 2em;
|
||||
color: #456;
|
||||
text-align: right;
|
||||
padding: 2px 4px 2px 2px;
|
||||
}
|
||||
.calendar tbody .day.othermonth {
|
||||
font-size: 80%;
|
||||
color: #bbb;
|
||||
}
|
||||
.calendar tbody .day.othermonth.oweekend {
|
||||
color: #fbb;
|
||||
}
|
||||
|
||||
.calendar table .wn {
|
||||
padding: 2px 3px 2px 2px;
|
||||
border-right: 1px solid #000;
|
||||
background: #bdf;
|
||||
}
|
||||
|
||||
.calendar tbody .rowhilite td {
|
||||
background: #def;
|
||||
}
|
||||
|
||||
.calendar tbody .rowhilite td.wn {
|
||||
background: #eef;
|
||||
}
|
||||
|
||||
.calendar tbody td.hilite { /* Hovered cells <TD> */
|
||||
background: #def;
|
||||
padding: 1px 3px 1px 1px;
|
||||
border: 1px solid #bbb;
|
||||
}
|
||||
|
||||
.calendar tbody td.active { /* Active (pressed) cells <TD> */
|
||||
background: #cde;
|
||||
padding: 2px 2px 0px 2px;
|
||||
}
|
||||
|
||||
.calendar tbody td.selected { /* Cell showing today date */
|
||||
font-weight: bold;
|
||||
border: 1px solid #000;
|
||||
padding: 1px 3px 1px 1px;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.calendar tbody td.weekend { /* Cells showing weekend days */
|
||||
color: #a66;
|
||||
}
|
||||
|
||||
.calendar tbody td.today { /* Cell showing selected date */
|
||||
font-weight: bold;
|
||||
color: #00f;
|
||||
}
|
||||
|
||||
.calendar tbody .disabled { color: #999; }
|
||||
|
||||
.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* The footer part -- status bar and "Close" button */
|
||||
|
||||
.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
|
||||
text-align: center;
|
||||
background: #556;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
|
||||
background: #fff;
|
||||
color: #445;
|
||||
border-top: 1px solid #556;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.calendar tfoot .hilite { /* Hover style for buttons in footer */
|
||||
background: #aaf;
|
||||
border: 1px solid #04f;
|
||||
color: #000;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
|
||||
background: #77c;
|
||||
padding: 2px 0px 0px 2px;
|
||||
}
|
||||
|
||||
/* Combo boxes (menus that display months/years for direct selection) */
|
||||
|
||||
.calendar .combo {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 4em;
|
||||
cursor: default;
|
||||
border: 1px solid #655;
|
||||
background: #def;
|
||||
color: #000;
|
||||
font-size: 90%;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.calendar .combo .label,
|
||||
.calendar .combo .label-IEfix {
|
||||
text-align: center;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.calendar .combo .label-IEfix {
|
||||
width: 4em;
|
||||
}
|
||||
|
||||
.calendar .combo .hilite {
|
||||
background: #acf;
|
||||
}
|
||||
|
||||
.calendar .combo .active {
|
||||
border-top: 1px solid #46a;
|
||||
border-bottom: 1px solid #46a;
|
||||
background: #eef;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.calendar td.time {
|
||||
border-top: 1px solid #000;
|
||||
padding: 1px 0px;
|
||||
text-align: center;
|
||||
background-color: #f4f0e8;
|
||||
}
|
||||
|
||||
.calendar td.time .hour,
|
||||
.calendar td.time .minute,
|
||||
.calendar td.time .ampm {
|
||||
padding: 0px 3px 0px 4px;
|
||||
border: 1px solid #889;
|
||||
font-weight: bold;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.calendar td.time .ampm {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.calendar td.time .colon {
|
||||
padding: 0px 2px 0px 3px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.calendar td.time span.hilite {
|
||||
border-color: #000;
|
||||
background-color: #667;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.calendar td.time span.active {
|
||||
border-color: #f00;
|
||||
background-color: #000;
|
||||
color: #0f0;
|
||||
}
|
|
@ -1,53 +1,54 @@
|
|||
/* Adempiere (c) JJanke Modified by moyses */
|
||||
/* Compiere (c) Jorg Janke */
|
||||
/* $Id: menu.css,v 1.1 2006/04/21 18:03:35 jjanke Exp $ */
|
||||
|
||||
body {
|
||||
background-color: #fbf8f1;
|
||||
/* Manu #F4FCFF; */
|
||||
background-color: #FFFFFF;
|
||||
color: #000000;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
cite {
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
padding-bottom: 0px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
li {
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
margin-left: 0px;
|
||||
padding-left: 5px;
|
||||
cursor: pointer;
|
||||
li{
|
||||
margin-left:10px;
|
||||
padding-left:5px;
|
||||
}
|
||||
|
||||
ul{
|
||||
padding: 0;
|
||||
margin: 0 0 0 5px;
|
||||
text-indent: -10px;
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-left:15px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.menuTable {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
margin: 0px;
|
||||
padding: 2px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.menuHeader {
|
||||
border-top: none;
|
||||
background-color : #C9D9F5;
|
||||
padding:10px 10px 10px 10px;
|
||||
border-bottom: 0px solid #000000;
|
||||
}
|
||||
|
||||
.menuCenter {
|
||||
border-bottom: 1px solid #000000;
|
||||
border-top: 1px solid #000000;
|
||||
width: 100%;
|
||||
background-color : #FFFFFF;
|
||||
border: none;
|
||||
padding:0px 0px 0px 15px;
|
||||
border-top: 1px solid #003FAF;
|
||||
border-bottom: 1px solid #003FAF;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.menuFooter {
|
||||
border-bottom: none;
|
||||
background-color : #C9D9F5;
|
||||
padding:5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
|
||||
|
@ -73,6 +74,6 @@ ul {
|
|||
|
||||
.menuSummary {
|
||||
font-weight: bold; /* Menu Closed */
|
||||
list-style-image: url(images/mClosed.gif);
|
||||
list-style-image: url(/adempiere/images/mClosed.gif);
|
||||
list-style-type: square;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
/* Put this inside a @media qualifier so Netscape 4 ignores it */
|
||||
@media screen, print {
|
||||
/* Turn off list bullets */
|
||||
ul.mktree li { list-style: none; }
|
||||
/* Control how "spaced out" the tree is */
|
||||
ul.mktree, ul.mktree ul , ul.mktree li { margin-left:10px; padding:0px; }
|
||||
/* Provide space for our own "bullet" inside the LI */
|
||||
ul.mktree li .bullet { padding-left: 15px; }
|
||||
/* Show "bullets" in the links, depending on the class of the LI that the link's in */
|
||||
ul.mktree li.liOpen .bullet { cursor: pointer; background: url(minus.gif) center left no-repeat; }
|
||||
ul.mktree li.liClosed .bullet { cursor: pointer; background: url(plus.gif) center left no-repeat; }
|
||||
ul.mktree li.liBullet .bullet { cursor: default; background: url(bullet.gif) center left no-repeat; }
|
||||
/* Sublists are visible or not based on class of parent LI */
|
||||
ul.mktree li.liOpen ul { display: block; }
|
||||
ul.mktree li.liClosed ul { display: none; }
|
||||
|
||||
/* Format menu items differently depending on what level of the tree they are in */
|
||||
/* Uncomment this if you want your fonts to decrease in size the deeper they are in the tree */
|
||||
/*
|
||||
ul.mktree li ul li { font-size: 90% }
|
||||
*/
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
/* Compiere HTML UI (c) Jorg Janke */
|
||||
/* $Id: popup.css,v 1.1 2006/04/21 18:03:35 jjanke Exp $ */
|
||||
h1 {
|
||||
color: #003FAF;
|
||||
font-size: 16px !important;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
th {
|
||||
font-size: 10px;
|
||||
background-color: #D7E2F8;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
|
||||
.Cerror{
|
||||
background: #FF4A4A;
|
||||
}
|
||||
|
||||
.Cmandatory{
|
||||
background: #9DFFFF;
|
||||
}
|
||||
|
||||
.popupTable {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
margin: 0px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.popupHeader {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.popupCenter {
|
||||
border-bottom: 1px solid #000000;
|
||||
border-top: 1px solid #000000;
|
||||
}
|
||||
|
||||
.popupFooter {
|
||||
border-bottom: none;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* Adempiere HTML UI (c) Jorg Janke */
|
||||
/* Compiere HTML UI (c) Jorg Janke */
|
||||
/* $Id: standard.css,v 1.1 2006/04/21 18:03:35 jjanke Exp $ */
|
||||
|
||||
a {
|
||||
|
@ -11,14 +11,24 @@ a:hover {
|
|||
}
|
||||
|
||||
body {
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
margin-top:0px;
|
||||
margin-right:0px;
|
||||
margin-left:0px;
|
||||
margin-bottom:0px;
|
||||
padding-top: 0px;
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
padding-bottom: 0px;
|
||||
font-family: Arial, verdana;
|
||||
font-size: 8pt;
|
||||
font-weight: normal;
|
||||
COLOR: #000000;
|
||||
background-color : white;
|
||||
;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #FF0000;
|
||||
color: #003FAF;
|
||||
font-size: 16px !important;
|
||||
margin-bottom: 10px;
|
||||
margin-top: 0;
|
||||
|
@ -61,9 +71,19 @@ hr {
|
|||
padding-top: 0;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #E6E6FA;
|
||||
text-align: left;
|
||||
|
||||
th {
|
||||
font-size: 10px;
|
||||
background-color: #C9D9F5;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 10px;
|
||||
color: black;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
p {
|
|
@ -0,0 +1,134 @@
|
|||
|
||||
/* Striping */
|
||||
tr.alternate {
|
||||
background-color:#E3ECFC;;
|
||||
}
|
||||
|
||||
/* Sorting */
|
||||
th.table-sortable {
|
||||
cursor:pointer;
|
||||
background-image:url("/adempiere/images/01_unsorted.gif");
|
||||
background-position:center left;
|
||||
background-repeat:no-repeat;
|
||||
padding-left:12px;
|
||||
}
|
||||
th.table-sorted-asc {
|
||||
background-image:url("/adempiere/images/01_ascending.gif");
|
||||
background-position:center left;
|
||||
background-repeat:no-repeat;
|
||||
}
|
||||
th.table-sorted-desc {
|
||||
background-image:url("/adempiere/images/01_descending.gif");
|
||||
background-position:center left;
|
||||
background-repeat:no-repeat;
|
||||
}
|
||||
th.table-filtered {
|
||||
background-image:url("/adempiere/filter.gif");
|
||||
background-position:center left;
|
||||
background-repeat:no-repeat;
|
||||
}
|
||||
select.table-autofilter {
|
||||
font-size:smaller;
|
||||
}
|
||||
|
||||
/* Examples which stray from the default */
|
||||
table.altstripe tr.alternate2 {
|
||||
background-color:#ccffff;
|
||||
}
|
||||
|
||||
/* Sort Icon Styles */
|
||||
table.sort01 th.table-sortable { background-image:url("01_unsorted.gif"); }
|
||||
table.sort01 th.table-sorted-asc { background-image:url("01_ascending.gif"); }
|
||||
table.sort01 th.table-sorted-desc { background-image:url("01_descending.gif"); }
|
||||
|
||||
table.sort02 th.table-sortable { background-image:none; padding-left:16px; }
|
||||
table.sort02 th.table-sorted-asc { background-image:url("02_ascending.gif"); }
|
||||
table.sort02 th.table-sorted-desc { background-image:url("02_descending.gif"); }
|
||||
|
||||
table.sort03 th.table-sortable { background-image:none; }
|
||||
table.sort03 th.table-sorted-asc { background-image:url("03_ascending.gif"); }
|
||||
table.sort03 th.table-sorted-desc { background-image:url("03_descending.gif"); }
|
||||
|
||||
table.sort04 th.table-sortable { background-image:none; }
|
||||
table.sort04 th.table-sorted-asc { background-image:url("04_ascending.gif"); }
|
||||
table.sort04 th.table-sorted-desc { background-image:url("04_descending.gif"); }
|
||||
|
||||
table.sort05 th.table-sortable { background-image:url("05_unsorted.gif"); padding-left:16px;}
|
||||
table.sort05 th.table-sorted-asc { background-image:url("05_ascending.gif"); }
|
||||
table.sort05 th.table-sorted-desc { background-image:url("05_descending.gif"); }
|
||||
|
||||
table.sort06 th.table-sortable { background-image:none; padding-left:16px;}
|
||||
table.sort06 th.table-sorted-asc { background-image:url("06_ascending.gif"); }
|
||||
table.sort06 th.table-sorted-desc { background-image:url("06_descending.gif"); }
|
||||
|
||||
table.sort07 th.table-sortable { background-image:none; }
|
||||
table.sort07 th.table-sorted-asc { background-image:url("07_ascending.gif"); }
|
||||
table.sort07 th.table-sorted-desc { background-image:url("07_descending.gif"); }
|
||||
|
||||
table.sort08 th.table-sortable { background-image:none; }
|
||||
table.sort08 th.table-sorted-asc { background-image:url("08_ascending.gif"); }
|
||||
table.sort08 th.table-sorted-desc { background-image:url("08_descending.gif"); }
|
||||
|
||||
table.sort09 th.table-sortable { background-image:none; padding-left:30px;}
|
||||
table.sort09 th.table-sorted-asc { background-image:url("09_ascending.gif"); }
|
||||
table.sort09 th.table-sorted-desc { background-image:url("09_descending.gif"); }
|
||||
|
||||
table.sort10 th.table-sortable { background-image:url("10_unsorted.gif"); }
|
||||
table.sort10 th.table-sorted-asc { background-image:url("10_ascending.gif"); }
|
||||
table.sort10 th.table-sorted-desc { background-image:url("10_descending.gif"); }
|
||||
|
||||
table.sort11 th.table-sortable { background-image:url("11_unsorted.gif");padding-left:24px; }
|
||||
table.sort11 th.table-sorted-asc { background-image:url("11_ascending.gif"); }
|
||||
table.sort11 th.table-sorted-desc { background-image:url("11_descending.gif"); }
|
||||
|
||||
table.sort12 th.table-sortable { background-image:none; }
|
||||
table.sort12 th.table-sorted-asc { background-image:url("12_ascending.gif"); }
|
||||
table.sort12 th.table-sorted-desc { background-image:url("12_descending.gif"); }
|
||||
|
||||
table.sort13 th.table-sortable { background-image:none; }
|
||||
table.sort13 th.table-sorted-asc { background-image:url("13_ascending.gif"); }
|
||||
table.sort13 th.table-sorted-desc { background-image:url("13_descending.gif"); }
|
||||
|
||||
table.sort14 th.table-sortable { background-image:none; }
|
||||
table.sort14 th.table-sorted-asc { background-image:url("14_ascending.gif"); }
|
||||
table.sort14 th.table-sorted-desc { background-image:url("14_descending.gif"); }
|
||||
|
||||
table.sort15 th.table-sortable { background-image:none; }
|
||||
table.sort15 th.table-sorted-asc { background-image:url("15_ascending.gif"); }
|
||||
table.sort15 th.table-sorted-desc { background-image:url("15_descending.gif"); }
|
||||
|
||||
table.sort16 th.table-sortable { background-image:none; }
|
||||
table.sort16 th.table-sorted-asc { background-image:url("16_ascending.gif"); }
|
||||
table.sort16 th.table-sorted-desc { background-image:url("16_descending.gif"); }
|
||||
|
||||
table.sort17 th.table-sortable { background-image:none; }
|
||||
table.sort17 th.table-sorted-asc { background-image:url("17_ascending.gif"); }
|
||||
table.sort17 th.table-sorted-desc { background-image:url("17_descending.gif"); }
|
||||
|
||||
table.sort18 th.table-sortable { background-image:url("18_unsorted.gif"); }
|
||||
table.sort18 th.table-sorted-asc { background-image:url("18_ascending.gif"); }
|
||||
table.sort18 th.table-sorted-desc { background-image:url("18_descending.gif"); }
|
||||
|
||||
table.sort19 th.table-sortable { background-image:url("19_unsorted.gif");padding-left:24px; }
|
||||
table.sort19 th.table-sorted-asc { background-image:url("19_ascending.gif"); }
|
||||
table.sort19 th.table-sorted-desc { background-image:url("19_descending.gif"); }
|
||||
|
||||
/* Icons box */
|
||||
.iconset {
|
||||
margin:5px;
|
||||
border:1px solid #cccccc;
|
||||
border-color:#cccccc #666666 #666666 #cccccc;
|
||||
text-align:center;
|
||||
cursor:pointer;
|
||||
width:100px;
|
||||
}
|
||||
.iconset img {
|
||||
margin:3px;
|
||||
}
|
||||
|
||||
/* Documentation */
|
||||
tr.doc_section {
|
||||
font-weight:bold;
|
||||
text-align:center;
|
||||
background-color:#dddddd;
|
||||
}
|
|
@ -0,0 +1,236 @@
|
|||
/* Distributed as part of The Coolest DHTML Calendar
|
||||
Author: Mihai Bazon, www.bazon.net/mishoo
|
||||
Copyright Dynarch.com 2005, www.dynarch.com
|
||||
*/
|
||||
|
||||
/* The main calendar widget. DIV containing a table. */
|
||||
|
||||
div.calendar { position: relative; }
|
||||
|
||||
.calendar, .calendar table {
|
||||
border: 1px solid #bdb2bf;
|
||||
font-size: 11px;
|
||||
color: #000;
|
||||
cursor: default;
|
||||
background: url("/adempiere/images/normal-bg.gif");
|
||||
font-family: "trebuchet ms",verdana,tahoma,sans-serif;
|
||||
}
|
||||
|
||||
.calendar {
|
||||
border-color: #797979;
|
||||
}
|
||||
|
||||
/* Header part -- contains navigation buttons and day names. */
|
||||
|
||||
.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
|
||||
text-align: center; /* They are the navigation buttons */
|
||||
padding: 2px; /* Make the buttons seem like they're pressing */
|
||||
background: url("/adempiere/images/title-bg.gif") repeat-x 0 100%; color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.calendar .nav {
|
||||
font-family: verdana,tahoma,sans-serif;
|
||||
}
|
||||
|
||||
.calendar .nav div {
|
||||
background: transparent url("/adempiere/images/menuarrow.gif") no-repeat 100% 100%;
|
||||
}
|
||||
|
||||
.calendar thead tr { background: url("/adempiere/images/title-bg.gif") repeat-x 0 100%; color: #000; }
|
||||
|
||||
.calendar thead .title { /* This holds the current "month, year" */
|
||||
font-weight: bold; /* Pressing it will take you to the current date */
|
||||
text-align: center;
|
||||
padding: 2px;
|
||||
background: url("/adempiere/images/title-bg.gif") repeat-x 0 100%; color: #000;
|
||||
}
|
||||
|
||||
.calendar thead .headrow { /* Row <TR> containing navigation buttons */
|
||||
}
|
||||
|
||||
.calendar thead .name { /* Cells <TD> containing the day names */
|
||||
border-bottom: 1px solid #797979;
|
||||
padding: 2px;
|
||||
text-align: center;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.calendar thead .weekend { /* How a weekend day name shows in header */
|
||||
color: #c44;
|
||||
}
|
||||
|
||||
.calendar thead .hilite { /* How do the buttons in header appear when hover */
|
||||
background: url("/adempiere/images/hover-bg.gif");
|
||||
border-bottom: 1px solid #797979;
|
||||
padding: 2px 2px 1px 2px;
|
||||
}
|
||||
|
||||
.calendar thead .active { /* Active (pressed) buttons in header */
|
||||
background: url("/adempiere/images/active-bg.gif"); color: #fff;
|
||||
padding: 3px 1px 0px 3px;
|
||||
border-bottom: 1px solid #797979;
|
||||
}
|
||||
|
||||
.calendar thead .daynames { /* Row <TR> containing the day names */
|
||||
background: url("/adempiere/images/dark-bg.gif");
|
||||
}
|
||||
|
||||
/* The body part -- contains all the days in month. */
|
||||
|
||||
.calendar tbody .day { /* Cells <TD> containing month days dates */
|
||||
font-family: verdana,tahoma,sans-serif;
|
||||
width: 2em;
|
||||
color: #000;
|
||||
text-align: right;
|
||||
padding: 2px 4px 2px 2px;
|
||||
}
|
||||
.calendar tbody .day.othermonth {
|
||||
font-size: 80%;
|
||||
color: #999;
|
||||
}
|
||||
.calendar tbody .day.othermonth.oweekend {
|
||||
color: #f99;
|
||||
}
|
||||
|
||||
.calendar table .wn {
|
||||
padding: 2px 3px 2px 2px;
|
||||
border-right: 1px solid #797979;
|
||||
background: url("/adempiere/images/dark-bg.gif");
|
||||
}
|
||||
|
||||
.calendar tbody .rowhilite td,
|
||||
.calendar tbody .rowhilite td.wn {
|
||||
background: url("/adempiere/images/rowhover-bg.gif");
|
||||
}
|
||||
|
||||
.calendar tbody td.today { font-weight: bold; /* background: url("/adempiere/images/today-bg.gif") no-repeat 70% 50%; */ }
|
||||
|
||||
.calendar tbody td.hilite { /* Hovered cells <TD> */
|
||||
background: url("/adempiere/images/hover-bg.gif");
|
||||
padding: 1px 3px 1px 1px;
|
||||
border: 1px solid #bbb;
|
||||
}
|
||||
|
||||
.calendar tbody td.active { /* Active (pressed) cells <TD> */
|
||||
padding: 2px 2px 0px 2px;
|
||||
}
|
||||
|
||||
.calendar tbody td.weekend { /* Cells showing weekend days */
|
||||
color: #c44;
|
||||
}
|
||||
|
||||
.calendar tbody td.selected { /* Cell showing selected date */
|
||||
font-weight: bold;
|
||||
border: 1px solid #797979;
|
||||
padding: 1px 3px 1px 1px;
|
||||
background: url("/adempiere/images/active-bg.gif"); color: #fff;
|
||||
}
|
||||
|
||||
.calendar tbody .disabled { color: #999; }
|
||||
|
||||
.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* The footer part -- status bar and "Close" button */
|
||||
|
||||
.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
|
||||
text-align: center;
|
||||
background: #565;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
|
||||
padding: 2px;
|
||||
background: url("/adempiere/images/status-bg.gif") repeat-x 0 0; color: #000;
|
||||
}
|
||||
|
||||
.calendar tfoot .hilite { /* Hover style for buttons in footer */
|
||||
background: #afa;
|
||||
border: 1px solid #084;
|
||||
color: #000;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
|
||||
background: #7c7;
|
||||
padding: 2px 0px 0px 2px;
|
||||
}
|
||||
|
||||
/* Combo boxes (menus that display months/years for direct selection) */
|
||||
|
||||
.calendar .combo {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 4em;
|
||||
cursor: default;
|
||||
border-width: 0 1px 1px 1px;
|
||||
border-style: solid;
|
||||
border-color: #797979;
|
||||
background: url("/adempiere/images/normal-bg.gif"); color: #000;
|
||||
z-index: 100;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
.calendar .combo .label,
|
||||
.calendar .combo .label-IEfix {
|
||||
text-align: center;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.calendar .combo .label-IEfix {
|
||||
width: 4em;
|
||||
}
|
||||
|
||||
.calendar .combo .hilite {
|
||||
background: url("/adempiere/images/hover-bg.gif"); color: #000;
|
||||
}
|
||||
|
||||
.calendar .combo .active {
|
||||
background: url("/adempiere/images/active-bg.gif"); color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.calendar td.time {
|
||||
border-top: 1px solid #797979;
|
||||
padding: 1px 0px;
|
||||
text-align: center;
|
||||
background: url("/adempiere/images/dark-bg.gif");
|
||||
}
|
||||
|
||||
.calendar td.time .hour,
|
||||
.calendar td.time .minute,
|
||||
.calendar td.time .ampm {
|
||||
padding: 0px 5px 0px 6px;
|
||||
font-weight: bold;
|
||||
background: url("/adempiere/images/normal-bg.gif"); color: #000;
|
||||
}
|
||||
|
||||
.calendar td.time .hour,
|
||||
.calendar td.time .minute {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.calendar td.time .ampm {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.calendar td.time .colon {
|
||||
padding: 0px 2px 0px 3px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.calendar td.time span.hilite {
|
||||
background: url("/adempiere/images/hover-bg.gif"); color: #000;
|
||||
}
|
||||
|
||||
.calendar td.time span.active {
|
||||
background: url("/adempiere/images/active-bg.gif"); color: #fff;
|
||||
}
|
|
@ -0,0 +1,184 @@
|
|||
/* Compiere HTML UI (c) Jorg Janke */
|
||||
/* $Id: window.css,v 1.1 2006/04/21 18:03:35 jjanke Exp $ */
|
||||
|
||||
|
||||
body {
|
||||
/* Manu #F4FCFF; */
|
||||
background-color: #FFFFFF;
|
||||
color: #000000;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
input {
|
||||
background-color: #FFFFFF;
|
||||
font-size: 8pt;
|
||||
font-family: verdana, arial;
|
||||
border: solid gray 1px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
background: #FFFFFF;
|
||||
font-size: 8pt;
|
||||
font-family: verdana, arial;
|
||||
border: solid gray 1px;
|
||||
}
|
||||
|
||||
select {
|
||||
background: #FFFFFF;
|
||||
font-size: 8pt;
|
||||
font-family: verdana, arial;
|
||||
border-bottom-style: groove;
|
||||
border-bottom-color: Gray;
|
||||
border-bottom-width: thin;
|
||||
border-left-color: Gray;
|
||||
border-left-style: groove;
|
||||
border-left-width: thin;
|
||||
border-right-color: Gray;
|
||||
border-right-style: groove;
|
||||
border-right-width: thin;
|
||||
border-top-color: Gray;
|
||||
border-top-style: groove;
|
||||
border-top-width: thin;
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.loginbtn {
|
||||
width: 75px;
|
||||
cursor:pointer;
|
||||
margin-top:5px;
|
||||
border:outset 2px #ccc;
|
||||
background:url(/adempiere/images/Ok16.gif) no-repeat left;
|
||||
background-color:#ffffff;
|
||||
}
|
||||
|
||||
.cancelbtn {
|
||||
width: 75px;
|
||||
cursor:pointer;
|
||||
margin-top:5px;
|
||||
border:outset 2px #ccc;
|
||||
background:url(/adempiere/images/Cancel16.gif) no-repeat left;
|
||||
background-color:#ffffff;
|
||||
}
|
||||
.submitbtn {
|
||||
cursor:pointer;
|
||||
margin-top:5px;
|
||||
border:outset 2px #ccc;
|
||||
background:url(/adempiere/images/Ok16.gif) no-repeat left;
|
||||
background-color:#ffffff;
|
||||
}
|
||||
.closebtn {
|
||||
cursor:pointer;
|
||||
margin-top:5px;
|
||||
border:outset 2px #ccc;
|
||||
background:url(/adempiere/images/Cancel16.gif) no-repeat left;
|
||||
background-color:#ffffff;
|
||||
}
|
||||
.processbtn {
|
||||
cursor:pointer;
|
||||
margin-top:5px;
|
||||
border:outset 2px #ccc;
|
||||
background:url(/adempiere/images/Process16.gif) no-repeat left;
|
||||
background-color:#ffffff;
|
||||
|
||||
}
|
||||
.resetbtn {
|
||||
cursor:pointer;
|
||||
margin-top:5px;
|
||||
border:outset 2px #ccc;
|
||||
background:url(/adempiere/images/Ignore16.gif) no-repeat left;
|
||||
background-color:#ffffff;
|
||||
|
||||
}
|
||||
|
||||
.Cerror {
|
||||
background: #FF4A4A;
|
||||
}
|
||||
|
||||
.Cmandatory {
|
||||
background: #fdf5dd;
|
||||
}
|
||||
|
||||
#tab {
|
||||
float:left;
|
||||
/*background:url(/adempiere/images/tab-left-selected.gif) no-repeat left top;*/
|
||||
margin:0;
|
||||
font-size: 11px;
|
||||
padding:0px 0px 0px 9px;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
#tab span {
|
||||
float:left;
|
||||
display:block;
|
||||
/*background:url(/adempiere/images/tab-right-selected.gif) no-repeat right top;*/
|
||||
padding:5px 9px 5px 0px;
|
||||
font-size: 11px;
|
||||
font-weight:bold;
|
||||
color:black;
|
||||
}
|
||||
|
||||
#tab a:hover span {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#tabSelected {
|
||||
float:left;
|
||||
/*background:url(/adempiere/images/tab-left.gif) no-repeat left top;*/
|
||||
margin:0;
|
||||
font-size: 11px;
|
||||
padding:0px 0px 0px 9px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
#tabSelected span {
|
||||
float:left;
|
||||
display:block;
|
||||
/*background:url(/adempiere/images/tab-right.gif) no-repeat right top;*/
|
||||
padding:5px 9px 5px 0px;
|
||||
font-size: 11px;
|
||||
font-weight:bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
|
||||
td.toolbar {
|
||||
border : 0px solid #000000;
|
||||
padding:5px 5px 5px 5px;
|
||||
background-color : #85A6E3;
|
||||
border-top: 1px solid #003FAF;
|
||||
border-bottom: 1px solid #003FAF;
|
||||
text-align: left;
|
||||
text-indent : 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.windowHeader {
|
||||
background-color : #C9D9F5;
|
||||
padding:5px 5px 0px 5px;
|
||||
border-bottom: 0px solid #000000;
|
||||
|
||||
}
|
||||
|
||||
.windowCenter {
|
||||
background-color : #FFFFFF;
|
||||
border: 0px solid #000000;
|
||||
padding:5px 5px 0px 0px;
|
||||
}
|
||||
|
||||
.centerTable {
|
||||
width: 100%;
|
||||
background-color : #E3ECFC;
|
||||
border: none;
|
||||
padding:5px 5px 5px 5px;
|
||||
border-top: 1px solid #003FAF;
|
||||
border-bottom: 1px solid #003FAF;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
.windowFooter {
|
||||
border-bottom: 1px solid #000000;
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 389 B |
After Width: | Height: | Size: 25 KiB |
|
@ -0,0 +1,469 @@
|
|||
// ===================================================================
|
||||
// Author: Matt Kruse <matt@mattkruse.com>
|
||||
// WWW: http://www.mattkruse.com/
|
||||
//
|
||||
// NOTICE: You may use this code for any purpose, commercial or
|
||||
// private, without any further permission from the author. You may
|
||||
// remove this notice from your final code if you wish, however it is
|
||||
// appreciated by the author if at least my web site address is kept.
|
||||
//
|
||||
// You may *NOT* re-distribute this code in any way except through its
|
||||
// use. That means, you can include it in your product, or your web
|
||||
// site, or any other form where the code is actually being used. You
|
||||
// may not put the plain javascript up on your site for download or
|
||||
// include it in your javascript libraries for download.
|
||||
// If you wish to share this code with others, please just point them
|
||||
// to the URL instead.
|
||||
// Please DO NOT link directly to my .js files from your site. Copy
|
||||
// the files to your server and use them there. Thank you.
|
||||
// ===================================================================
|
||||
|
||||
|
||||
/* SOURCE FILE: AnchorPosition.js */
|
||||
|
||||
/*
|
||||
AnchorPosition.js
|
||||
Author: Matt Kruse
|
||||
Last modified: 10/11/02
|
||||
|
||||
DESCRIPTION: These functions find the position of an <A> tag in a document,
|
||||
so other elements can be positioned relative to it.
|
||||
|
||||
COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
|
||||
positioning errors - usually with Window positioning - occur on the
|
||||
Macintosh platform.
|
||||
|
||||
FUNCTIONS:
|
||||
getAnchorPosition(anchorname)
|
||||
Returns an Object() having .x and .y properties of the pixel coordinates
|
||||
of the upper-left corner of the anchor. Position is relative to the PAGE.
|
||||
|
||||
getAnchorWindowPosition(anchorname)
|
||||
Returns an Object() having .x and .y properties of the pixel coordinates
|
||||
of the upper-left corner of the anchor, relative to the WHOLE SCREEN.
|
||||
|
||||
NOTES:
|
||||
|
||||
1) For popping up separate browser windows, use getAnchorWindowPosition.
|
||||
Otherwise, use getAnchorPosition
|
||||
|
||||
2) Your anchor tag MUST contain both NAME and ID attributes which are the
|
||||
same. For example:
|
||||
<A NAME="test" ID="test"> </A>
|
||||
|
||||
3) There must be at least a space between <A> </A> for IE5.5 to see the
|
||||
anchor tag correctly. Do not do <A></A> with no space.
|
||||
*/
|
||||
|
||||
// getAnchorPosition(anchorname)
|
||||
// This function returns an object having .x and .y properties which are the coordinates
|
||||
// of the named anchor, relative to the page.
|
||||
function getAnchorPosition(anchorname) {
|
||||
// This function will return an Object with x and y properties
|
||||
var useWindow=false;
|
||||
var coordinates=new Object();
|
||||
var x=0,y=0;
|
||||
// Browser capability sniffing
|
||||
var use_gebi=false, use_css=false, use_layers=false;
|
||||
if (document.getElementById) { use_gebi=true; }
|
||||
else if (document.all) { use_css=true; }
|
||||
else if (document.layers) { use_layers=true; }
|
||||
// Logic to find position
|
||||
if (use_gebi && document.all) {
|
||||
x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
|
||||
y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
|
||||
}
|
||||
else if (use_gebi) {
|
||||
var o=document.getElementById(anchorname);
|
||||
x=AnchorPosition_getPageOffsetLeft(o);
|
||||
y=AnchorPosition_getPageOffsetTop(o);
|
||||
}
|
||||
else if (use_css) {
|
||||
x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
|
||||
y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
|
||||
}
|
||||
else if (use_layers) {
|
||||
var found=0;
|
||||
for (var i=0; i<document.anchors.length; i++) {
|
||||
if (document.anchors[i].name==anchorname) { found=1; break; }
|
||||
}
|
||||
if (found==0) {
|
||||
coordinates.x=0; coordinates.y=0; return coordinates;
|
||||
}
|
||||
x=document.anchors[i].x;
|
||||
y=document.anchors[i].y;
|
||||
}
|
||||
else {
|
||||
coordinates.x=0; coordinates.y=0; return coordinates;
|
||||
}
|
||||
coordinates.x=x;
|
||||
coordinates.y=y;
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
// getAnchorWindowPosition(anchorname)
|
||||
// This function returns an object having .x and .y properties which are the coordinates
|
||||
// of the named anchor, relative to the window
|
||||
function getAnchorWindowPosition(anchorname) {
|
||||
var coordinates=getAnchorPosition(anchorname);
|
||||
var x=0;
|
||||
var y=0;
|
||||
if (document.getElementById) {
|
||||
if (isNaN(window.screenX)) {
|
||||
x=coordinates.x-document.body.scrollLeft+window.screenLeft;
|
||||
y=coordinates.y-document.body.scrollTop+window.screenTop;
|
||||
}
|
||||
else {
|
||||
x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
|
||||
y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
|
||||
}
|
||||
}
|
||||
else if (document.all) {
|
||||
x=coordinates.x-document.body.scrollLeft+window.screenLeft;
|
||||
y=coordinates.y-document.body.scrollTop+window.screenTop;
|
||||
}
|
||||
else if (document.layers) {
|
||||
x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
|
||||
y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
|
||||
}
|
||||
coordinates.x=x;
|
||||
coordinates.y=y;
|
||||
return coordinates;
|
||||
}
|
||||
|
||||
// Functions for IE to get position of an object
|
||||
function AnchorPosition_getPageOffsetLeft (el) {
|
||||
var ol=el.offsetLeft;
|
||||
while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
|
||||
return ol;
|
||||
}
|
||||
function AnchorPosition_getWindowOffsetLeft (el) {
|
||||
return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
|
||||
}
|
||||
function AnchorPosition_getPageOffsetTop (el) {
|
||||
var ot=el.offsetTop;
|
||||
while((el=el.offsetParent) != null) { ot += el.offsetTop; }
|
||||
return ot;
|
||||
}
|
||||
function AnchorPosition_getWindowOffsetTop (el) {
|
||||
return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
|
||||
}
|
||||
|
||||
/* SOURCE FILE: PopupWindow.js */
|
||||
|
||||
/*
|
||||
PopupWindow.js
|
||||
Author: Matt Kruse
|
||||
Last modified: 02/16/04
|
||||
|
||||
DESCRIPTION: This object allows you to easily and quickly popup a window
|
||||
in a certain place. The window can either be a DIV or a separate browser
|
||||
window.
|
||||
|
||||
COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small
|
||||
positioning errors - usually with Window positioning - occur on the
|
||||
Macintosh platform. Due to bugs in Netscape 4.x, populating the popup
|
||||
window with <STYLE> tags may cause errors.
|
||||
|
||||
USAGE:
|
||||
// Create an object for a WINDOW popup
|
||||
var win = new PopupWindow();
|
||||
|
||||
// Create an object for a DIV window using the DIV named 'mydiv'
|
||||
var win = new PopupWindow('mydiv');
|
||||
|
||||
// Set the window to automatically hide itself when the user clicks
|
||||
// anywhere else on the page except the popup
|
||||
win.autoHide();
|
||||
|
||||
// Show the window relative to the anchor name passed in
|
||||
win.showPopup(anchorname);
|
||||
|
||||
// Hide the popup
|
||||
win.hidePopup();
|
||||
|
||||
// Set the size of the popup window (only applies to WINDOW popups
|
||||
win.setSize(width,height);
|
||||
|
||||
// Populate the contents of the popup window that will be shown. If you
|
||||
// change the contents while it is displayed, you will need to refresh()
|
||||
win.populate(string);
|
||||
|
||||
// set the URL of the window, rather than populating its contents
|
||||
// manually
|
||||
win.setUrl("http://www.site.com/");
|
||||
|
||||
// Refresh the contents of the popup
|
||||
win.refresh();
|
||||
|
||||
// Specify how many pixels to the right of the anchor the popup will appear
|
||||
win.offsetX = 50;
|
||||
|
||||
// Specify how many pixels below the anchor the popup will appear
|
||||
win.offsetY = 100;
|
||||
|
||||
NOTES:
|
||||
1) Requires the functions in AnchorPosition.js
|
||||
|
||||
2) Your anchor tag MUST contain both NAME and ID attributes which are the
|
||||
same. For example:
|
||||
<A NAME="test" ID="test"> </A>
|
||||
|
||||
3) There must be at least a space between <A> </A> for IE5.5 to see the
|
||||
anchor tag correctly. Do not do <A></A> with no space.
|
||||
|
||||
4) When a PopupWindow object is created, a handler for 'onmouseup' is
|
||||
attached to any event handler you may have already defined. Do NOT define
|
||||
an event handler for 'onmouseup' after you define a PopupWindow object or
|
||||
the autoHide() will not work correctly.
|
||||
*/
|
||||
|
||||
// Set the position of the popup window based on the anchor
|
||||
function PopupWindow_getXYPosition(anchorname) {
|
||||
var coordinates;
|
||||
if (this.type == "WINDOW") {
|
||||
coordinates = getAnchorWindowPosition(anchorname);
|
||||
}
|
||||
else {
|
||||
coordinates = getAnchorPosition(anchorname);
|
||||
}
|
||||
this.x = coordinates.x;
|
||||
this.y = coordinates.y;
|
||||
}
|
||||
// Set width/height of DIV/popup window
|
||||
function PopupWindow_setSize(width,height) {
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
// Fill the window with contents
|
||||
function PopupWindow_populate(contents) {
|
||||
this.contents = contents;
|
||||
this.populated = false;
|
||||
}
|
||||
// Set the URL to go to
|
||||
function PopupWindow_setUrl(url) {
|
||||
this.url = url;
|
||||
}
|
||||
// Set the window popup properties
|
||||
function PopupWindow_setWindowProperties(props) {
|
||||
this.windowProperties = props;
|
||||
}
|
||||
// Refresh the displayed contents of the popup
|
||||
function PopupWindow_refresh() {
|
||||
if (this.divName != null) {
|
||||
// refresh the DIV object
|
||||
if (this.use_gebi) {
|
||||
document.getElementById(this.divName).innerHTML = this.contents;
|
||||
}
|
||||
else if (this.use_css) {
|
||||
document.all[this.divName].innerHTML = this.contents;
|
||||
}
|
||||
else if (this.use_layers) {
|
||||
var d = document.layers[this.divName];
|
||||
d.document.open();
|
||||
d.document.writeln(this.contents);
|
||||
d.document.close();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (this.popupWindow != null && !this.popupWindow.closed) {
|
||||
if (this.url!="") {
|
||||
this.popupWindow.location.href=this.url;
|
||||
}
|
||||
else {
|
||||
this.popupWindow.document.open();
|
||||
this.popupWindow.document.writeln(this.contents);
|
||||
this.popupWindow.document.close();
|
||||
}
|
||||
this.popupWindow.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
// Position and show the popup, relative to an anchor object
|
||||
function PopupWindow_showPopup(anchorname) {
|
||||
this.getXYPosition(anchorname);
|
||||
this.x += this.offsetX;
|
||||
this.y += this.offsetY;
|
||||
if (!this.populated && (this.contents != "")) {
|
||||
this.populated = true;
|
||||
this.refresh();
|
||||
}
|
||||
if (this.divName != null) {
|
||||
// Show the DIV object
|
||||
if (this.use_gebi) {
|
||||
document.getElementById(this.divName).style.left = this.x + "px";
|
||||
document.getElementById(this.divName).style.top = this.y + "px";
|
||||
document.getElementById(this.divName).style.visibility = "visible";
|
||||
}
|
||||
else if (this.use_css) {
|
||||
document.all[this.divName].style.left = this.x;
|
||||
document.all[this.divName].style.top = this.y;
|
||||
document.all[this.divName].style.visibility = "visible";
|
||||
}
|
||||
else if (this.use_layers) {
|
||||
document.layers[this.divName].left = this.x;
|
||||
document.layers[this.divName].top = this.y;
|
||||
document.layers[this.divName].visibility = "visible";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (this.popupWindow == null || this.popupWindow.closed) {
|
||||
// If the popup window will go off-screen, move it so it doesn't
|
||||
if (this.x<0) { this.x=0; }
|
||||
if (this.y<0) { this.y=0; }
|
||||
if (screen && screen.availHeight) {
|
||||
if ((this.y + this.height) > screen.availHeight) {
|
||||
this.y = screen.availHeight - this.height;
|
||||
}
|
||||
}
|
||||
if (screen && screen.availWidth) {
|
||||
if ((this.x + this.width) > screen.availWidth) {
|
||||
this.x = screen.availWidth - this.width;
|
||||
}
|
||||
}
|
||||
var avoidAboutBlank = window.opera || ( document.layers && !navigator.mimeTypes['*'] ) || navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled );
|
||||
this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");
|
||||
}
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
// Hide the popup
|
||||
function PopupWindow_hidePopup() {
|
||||
if (this.divName != null) {
|
||||
if (this.use_gebi) {
|
||||
document.getElementById(this.divName).style.visibility = "hidden";
|
||||
}
|
||||
else if (this.use_css) {
|
||||
document.all[this.divName].style.visibility = "hidden";
|
||||
}
|
||||
else if (this.use_layers) {
|
||||
document.layers[this.divName].visibility = "hidden";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (this.popupWindow && !this.popupWindow.closed) {
|
||||
this.popupWindow.close();
|
||||
this.popupWindow = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Pass an event and return whether or not it was the popup DIV that was clicked
|
||||
function PopupWindow_isClicked(e) {
|
||||
if (this.divName != null) {
|
||||
if (this.use_layers) {
|
||||
var clickX = e.pageX;
|
||||
var clickY = e.pageY;
|
||||
var t = document.layers[this.divName];
|
||||
if ((clickX > t.left) && (clickX < t.left+t.clip.width) && (clickY > t.top) && (clickY < t.top+t.clip.height)) {
|
||||
return true;
|
||||
}
|
||||
else { return false; }
|
||||
}
|
||||
else if (document.all) { // Need to hard-code this to trap IE for error-handling
|
||||
var t = window.event.srcElement;
|
||||
while (t.parentElement != null) {
|
||||
if (t.id==this.divName) {
|
||||
return true;
|
||||
}
|
||||
t = t.parentElement;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if (this.use_gebi && e) {
|
||||
var t = e.originalTarget;
|
||||
while (t.parentNode != null) {
|
||||
if (t.id==this.divName) {
|
||||
return true;
|
||||
}
|
||||
t = t.parentNode;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check an onMouseDown event to see if we should hide
|
||||
function PopupWindow_hideIfNotClicked(e) {
|
||||
if (this.autoHideEnabled && !this.isClicked(e)) {
|
||||
this.hidePopup();
|
||||
}
|
||||
}
|
||||
// Call this to make the DIV disable automatically when mouse is clicked outside it
|
||||
function PopupWindow_autoHide() {
|
||||
this.autoHideEnabled = true;
|
||||
}
|
||||
// This global function checks all PopupWindow objects onmouseup to see if they should be hidden
|
||||
function PopupWindow_hidePopupWindows(e) {
|
||||
for (var i=0; i<popupWindowObjects.length; i++) {
|
||||
if (popupWindowObjects[i] != null) {
|
||||
var p = popupWindowObjects[i];
|
||||
p.hideIfNotClicked(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Run this immediately to attach the event listener
|
||||
function PopupWindow_attachListener() {
|
||||
if (document.layers) {
|
||||
document.captureEvents(Event.MOUSEUP);
|
||||
}
|
||||
window.popupWindowOldEventListener = document.onmouseup;
|
||||
if (window.popupWindowOldEventListener != null) {
|
||||
document.onmouseup = new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");
|
||||
}
|
||||
else {
|
||||
document.onmouseup = PopupWindow_hidePopupWindows;
|
||||
}
|
||||
}
|
||||
// CONSTRUCTOR for the PopupWindow object
|
||||
// Pass it a DIV name to use a DHTML popup, otherwise will default to window popup
|
||||
function PopupWindow() {
|
||||
if (!window.popupWindowIndex) { window.popupWindowIndex = 0; }
|
||||
if (!window.popupWindowObjects) { window.popupWindowObjects = new Array(); }
|
||||
if (!window.listenerAttached) {
|
||||
window.listenerAttached = true;
|
||||
PopupWindow_attachListener();
|
||||
}
|
||||
this.index = popupWindowIndex++;
|
||||
popupWindowObjects[this.index] = this;
|
||||
this.divName = null;
|
||||
this.popupWindow = null;
|
||||
this.width=0;
|
||||
this.height=0;
|
||||
this.populated = false;
|
||||
this.visible = false;
|
||||
this.autoHideEnabled = false;
|
||||
|
||||
this.contents = "";
|
||||
this.url="";
|
||||
this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
|
||||
if (arguments.length>0) {
|
||||
this.type="DIV";
|
||||
this.divName = arguments[0];
|
||||
}
|
||||
else {
|
||||
this.type="WINDOW";
|
||||
}
|
||||
this.use_gebi = false;
|
||||
this.use_css = false;
|
||||
this.use_layers = false;
|
||||
if (document.getElementById) { this.use_gebi = true; }
|
||||
else if (document.all) { this.use_css = true; }
|
||||
else if (document.layers) { this.use_layers = true; }
|
||||
else { this.type = "WINDOW"; }
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
// Method mappings
|
||||
this.getXYPosition = PopupWindow_getXYPosition;
|
||||
this.populate = PopupWindow_populate;
|
||||
this.setUrl = PopupWindow_setUrl;
|
||||
this.setWindowProperties = PopupWindow_setWindowProperties;
|
||||
this.refresh = PopupWindow_refresh;
|
||||
this.showPopup = PopupWindow_showPopup;
|
||||
this.hidePopup = PopupWindow_hidePopup;
|
||||
this.setSize = PopupWindow_setSize;
|
||||
this.isClicked = PopupWindow_isClicked;
|
||||
this.autoHide = PopupWindow_autoHide;
|
||||
this.hideIfNotClicked = PopupWindow_hideIfNotClicked;
|
||||
}
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 68 B |
|
@ -15,7 +15,7 @@ alert ('function');
|
|||
|
||||
<body>
|
||||
<form action="http://www.yahoo.com" method="get" name="form1" target="_blank">
|
||||
<a href="/adempiere/" target="popup"><img src="LogoSmall.gif" width="64" height="32" border="1"></a>
|
||||
<a href="/compiere/" target="popup"><img src="LogoSmall.gif" width="64" height="32" border="1"></a>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 71 B |
After Width: | Height: | Size: 71 B |
After Width: | Height: | Size: 63 B |
Before Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 334 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 220 B |
After Width: | Height: | Size: 92 B |
After Width: | Height: | Size: 362 B |
|
@ -0,0 +1,212 @@
|
|||
/******************************************************************************
|
||||
* Product: Compiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.compiere.images;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.image.*;
|
||||
import java.net.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.*;
|
||||
import org.compiere.plaf.*;
|
||||
import java.util.logging.*;
|
||||
import org.compiere.util.*;
|
||||
|
||||
/**
|
||||
* Icon Factory based on Metal Color Schema (Themes are automatically considered)
|
||||
*
|
||||
* @author Jorg Janke
|
||||
* @version $Id: ImageFactory.java,v 1.2 2006/07/30 00:53:21 jjanke Exp $
|
||||
*/
|
||||
public class ImageFactory
|
||||
{
|
||||
/**
|
||||
* Get Image Icon or null if not exists
|
||||
* @param name file name in org.compiere.images
|
||||
* @return image
|
||||
*/
|
||||
public static ImageIcon getImageIcon (String name)
|
||||
{
|
||||
URL url = org.compiere.Compiere.class.getResource("images/" + name);
|
||||
if (url == null)
|
||||
{
|
||||
log.log(Level.SEVERE, "ImageFactory.getImageIcon - not found: " + name);
|
||||
return null;
|
||||
}
|
||||
return new ImageIcon(url);
|
||||
} // getImageIcon
|
||||
|
||||
/** Home Icon ************************************************************/
|
||||
private static Icon s_HomeIcon = null;
|
||||
/** Logger */
|
||||
private static CLogger log = CLogger.getCLogger(ImageFactory.class);
|
||||
|
||||
/**
|
||||
* Get Home Icon (little house) 18*18
|
||||
* @return image
|
||||
*/
|
||||
public static Icon getHomeIcon()
|
||||
{
|
||||
if (s_HomeIcon == null)
|
||||
s_HomeIcon = new HomeIcon();
|
||||
return s_HomeIcon;
|
||||
} // getHomeIcon
|
||||
|
||||
/**
|
||||
* 18*18 Home Icon
|
||||
*/
|
||||
private static class HomeIcon implements Icon, UIResource
|
||||
{
|
||||
public void paintIcon(Component c, Graphics g, int x, int y)
|
||||
{
|
||||
g.translate(x, y);
|
||||
// Draw outside edge of house
|
||||
g.setColor(CompiereLookAndFeel.getControlInfo()); // black
|
||||
g.drawLine(8,1, 1,8); // left edge of roof
|
||||
g.drawLine(8,1, 15,8); // right edge of roof
|
||||
g.drawLine(11,2, 11,3); // left edge of chimney
|
||||
g.drawLine(12,2, 12,4); // right edge of chimney
|
||||
g.drawLine(3,7, 3,15); // left edge of house
|
||||
g.drawLine(13,7, 13,15); // right edge of house
|
||||
g.drawLine(4,15, 12,15); // bottom edge of house
|
||||
// Draw door frame
|
||||
// same color as edge of house
|
||||
g.drawLine( 6,9, 6,14); // left
|
||||
g.drawLine(10,9, 10,14); // right
|
||||
g.drawLine( 7,9, 9, 9); // top
|
||||
// Draw roof body
|
||||
g.setColor(CompiereLookAndFeel.getControlDarkShadow()); // secondary1
|
||||
g.fillRect(8,2, 1,1); //top toward bottom
|
||||
g.fillRect(7,3, 3,1);
|
||||
g.fillRect(6,4, 5,1);
|
||||
g.fillRect(5,5, 7,1);
|
||||
g.fillRect(4,6, 9,2);
|
||||
// Draw doornob
|
||||
// same color as roof body
|
||||
g.drawLine(9,12, 9,12);
|
||||
// Paint the house
|
||||
g.setColor(CompiereLookAndFeel.getPrimaryControl()); // primary3
|
||||
g.drawLine(4,8, 12,8); // above door
|
||||
g.fillRect(4,9, 2,6); // left of door
|
||||
g.fillRect(11,9, 2,6); // right of door
|
||||
g.translate(-x, -y);
|
||||
}
|
||||
public int getIconWidth()
|
||||
{
|
||||
return 18;
|
||||
}
|
||||
public int getIconHeight()
|
||||
{
|
||||
return 18;
|
||||
}
|
||||
} // HomeIcon
|
||||
|
||||
/** Folder Icon **********************************************************/
|
||||
private static Icon s_FolderIcon = null;
|
||||
/** 16*16 dimension */
|
||||
private static final Dimension s_icon16Size = new Dimension(16, 16);
|
||||
|
||||
/**
|
||||
* Folder Icon
|
||||
* @return icon
|
||||
*/
|
||||
public static Icon getFolderIcon()
|
||||
{
|
||||
if (s_FolderIcon == null)
|
||||
s_FolderIcon = new FolderIcon();
|
||||
return s_FolderIcon;
|
||||
} // getFolderIcon
|
||||
|
||||
/**
|
||||
* FolderIcon usable for Tree (18*16) spacing
|
||||
*/
|
||||
private static class FolderIcon extends FolderIcon16
|
||||
{
|
||||
public int getShift()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
public int getAdditionalHeight()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
} // FolderIcon
|
||||
|
||||
/**
|
||||
* Scaleable 16*16 Folder Icon
|
||||
*/
|
||||
public static class FolderIcon16 implements Icon
|
||||
{
|
||||
transient Image image;
|
||||
|
||||
public void paintIcon (Component c, Graphics g, int x, int y)
|
||||
{
|
||||
if (image == null)
|
||||
{
|
||||
image = new BufferedImage(getIconWidth(), getIconHeight(),
|
||||
BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics imageG = image.getGraphics();
|
||||
paintMe (c,imageG);
|
||||
imageG.dispose();
|
||||
}
|
||||
g.drawImage(image, x, y+getShift(), null);
|
||||
}
|
||||
private void paintMe(Component c, Graphics g)
|
||||
{
|
||||
int right = s_icon16Size.width - 1;
|
||||
int bottom = s_icon16Size.height - 1;
|
||||
// Draw tab top
|
||||
g.setColor(CompiereLookAndFeel.getPrimaryControlDarkShadow()); // primary1
|
||||
g.drawLine(right - 5, 3, right, 3);
|
||||
g.drawLine(right - 6, 4, right, 4);
|
||||
// Draw folder front
|
||||
g.setColor(CompiereLookAndFeel.getPrimaryControl()); // primary3
|
||||
g.fillRect(2, 7, 13, 8);
|
||||
// Draw tab bottom
|
||||
g.setColor(CompiereLookAndFeel.getPrimaryControlShadow()); // primary2
|
||||
g.drawLine(right - 6, 5, right - 1, 5);
|
||||
// Draw outline
|
||||
g.setColor(CompiereLookAndFeel.getPrimaryControlInfo()); // black
|
||||
g.drawLine(0, 6, 0, bottom); // left side
|
||||
g.drawLine(1, 5, right - 7, 5); // first part of top
|
||||
g.drawLine(right - 6, 6, right - 1, 6); // second part of top
|
||||
g.drawLine(right, 5, right, bottom); // right side
|
||||
g.drawLine(0, bottom, right, bottom); // bottom
|
||||
// Draw highlight
|
||||
g.setColor(CompiereLookAndFeel.getPrimaryControlHighlight()); // white
|
||||
g.drawLine(1, 6, 1, bottom - 1);
|
||||
g.drawLine(1, 6, right - 7, 6);
|
||||
g.drawLine(right - 6, 7, right - 1, 7);
|
||||
}
|
||||
public int getShift()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
public int getAdditionalHeight()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
public int getIconWidth()
|
||||
{
|
||||
return s_icon16Size.width;
|
||||
}
|
||||
public int getIconHeight()
|
||||
{
|
||||
return s_icon16Size.height + getAdditionalHeight();
|
||||
}
|
||||
} // FolderIcon16
|
||||
|
||||
} // ImageFactory
|
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 112 B |
After Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 482 B After Width: | Height: | Size: 345 B |
After Width: | Height: | Size: 185 B |
After Width: | Height: | Size: 184 B |
After Width: | Height: | Size: 182 B |
After Width: | Height: | Size: 89 B |
After Width: | Height: | Size: 85 B |
After Width: | Height: | Size: 89 B |
After Width: | Height: | Size: 49 B |
After Width: | Height: | Size: 110 B |
After Width: | Height: | Size: 110 B |
After Width: | Height: | Size: 116 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 116 B |
After Width: | Height: | Size: 1.1 KiB |
|
@ -1,18 +1,32 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Adempiere ERP+CRM Reach Client</title>
|
||||
<title>ADempiere ERP+CRM Reach Client</title>
|
||||
<script language="JavaScript" src="calendar2.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
//Start of Calendar
|
||||
|
||||
function resizeFrame(value){
|
||||
var frame = top.document;
|
||||
var frameset = frame.getElementById("framesetMenuWindow");
|
||||
if (!frameset) return false;
|
||||
|
||||
if (frameset.cols.substring(0,1)=="0") frameset.cols = "260,*";
|
||||
else frameset.cols = "0,*";
|
||||
return true;
|
||||
}
|
||||
|
||||
</script>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="pragma" content="no-cache">
|
||||
</head>
|
||||
<frameset id="framesetOuter" cols="*" rows="0,*" title="© Adempiere">
|
||||
<frameset id="framesetOuter" cols="*" rows="0,*" title="© Compiere">
|
||||
<frame src="cmd.html" name="WCmd">
|
||||
<frameset id="framesetMenuWindow" cols="220,*" rows="*">
|
||||
<frame src="menu.html" name="WMenu">
|
||||
<frameset id="framesetWindow" cols="*" rows="0,*">
|
||||
<frame src="popup.html" name="WPopUp">
|
||||
<frame src="window.html" name="WWindow">
|
||||
</frameset>
|
||||
<frameset id="framesetMenuWindow" cols="0,*" rows="*">
|
||||
<frame src="menu.html" name="WMenu">
|
||||
<frame src="window.html" name="WWindow">
|
||||
</frameset>
|
||||
</frameset>
|
||||
<noframes>
|
||||
|
|
|
@ -0,0 +1,200 @@
|
|||
/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/
|
||||
* ---------------------------------------------------------------------------
|
||||
*
|
||||
* The DHTML Calendar
|
||||
*
|
||||
* Details and latest version at:
|
||||
* http://dynarch.com/mishoo/calendar.epl
|
||||
*
|
||||
* This script is distributed under the GNU Lesser General Public License.
|
||||
* Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
|
||||
*
|
||||
* This file defines helper functions for setting up the calendar. They are
|
||||
* intended to help non-programmers get a working calendar on their site
|
||||
* quickly. This script should not be seen as part of the calendar. It just
|
||||
* shows you what one can do with the calendar, while in the same time
|
||||
* providing a quick and simple method for setting it up. If you need
|
||||
* exhaustive customization of the calendar creation process feel free to
|
||||
* modify this code to suit your needs (this is recommended and much better
|
||||
* than modifying calendar.js itself).
|
||||
*/
|
||||
|
||||
// $Id: calendar-setup.js,v 1.25 2005/03/07 09:51:33 mishoo Exp $
|
||||
|
||||
/**
|
||||
* This function "patches" an input field (or other element) to use a calendar
|
||||
* widget for date selection.
|
||||
*
|
||||
* The "params" is a single object that can have the following properties:
|
||||
*
|
||||
* prop. name | description
|
||||
* -------------------------------------------------------------------------------------------------
|
||||
* inputField | the ID of an input field to store the date
|
||||
* displayArea | the ID of a DIV or other element to show the date
|
||||
* button | ID of a button or other element that will trigger the calendar
|
||||
* eventName | event that will trigger the calendar, without the "on" prefix (default: "click")
|
||||
* ifFormat | date format that will be stored in the input field
|
||||
* daFormat | the date format that will be used to display the date in displayArea
|
||||
* singleClick | (true/false) wether the calendar is in single click mode or not (default: true)
|
||||
* firstDay | numeric: 0 to 6. "0" means display Sunday first, "1" means display Monday first, etc.
|
||||
* align | alignment (default: "Br"); if you don't know what's this see the calendar documentation
|
||||
* range | array with 2 elements. Default: [1900, 2999] -- the range of years available
|
||||
* weekNumbers | (true/false) if it's true (default) the calendar will display week numbers
|
||||
* flat | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
|
||||
* flatCallback | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
|
||||
* disableFunc | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
|
||||
* onSelect | function that gets called when a date is selected. You don't _have_ to supply this (the default is generally okay)
|
||||
* onClose | function that gets called when the calendar is closed. [default]
|
||||
* onUpdate | function that gets called after the date is updated in the input field. Receives a reference to the calendar.
|
||||
* date | the date that the calendar will be initially displayed to
|
||||
* showsTime | default: false; if true the calendar will include a time selector
|
||||
* timeFormat | the time format; can be "12" or "24", default is "12"
|
||||
* electric | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
|
||||
* step | configures the step of the years in drop-down boxes; default: 2
|
||||
* position | configures the calendar absolute position; default: null
|
||||
* cache | if "true" (but default: "false") it will reuse the same calendar object, where possible
|
||||
* showOthers | if "true" (but default: "false") it will show days from other months too
|
||||
*
|
||||
* None of them is required, they all have default values. However, if you
|
||||
* pass none of "inputField", "displayArea" or "button" you'll get a warning
|
||||
* saying "nothing to setup".
|
||||
*/
|
||||
Calendar.setup = function (params) {
|
||||
function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };
|
||||
|
||||
param_default("inputField", null);
|
||||
param_default("displayArea", null);
|
||||
param_default("button", null);
|
||||
param_default("eventName", "click");
|
||||
param_default("ifFormat", "%Y/%m/%d");
|
||||
param_default("daFormat", "%Y/%m/%d");
|
||||
param_default("singleClick", true);
|
||||
param_default("disableFunc", null);
|
||||
param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined
|
||||
param_default("dateText", null);
|
||||
param_default("firstDay", null);
|
||||
param_default("align", "Br");
|
||||
param_default("range", [1900, 2999]);
|
||||
param_default("weekNumbers", true);
|
||||
param_default("flat", null);
|
||||
param_default("flatCallback", null);
|
||||
param_default("onSelect", null);
|
||||
param_default("onClose", null);
|
||||
param_default("onUpdate", null);
|
||||
param_default("date", null);
|
||||
param_default("showsTime", false);
|
||||
param_default("timeFormat", "24");
|
||||
param_default("electric", true);
|
||||
param_default("step", 2);
|
||||
param_default("position", null);
|
||||
param_default("cache", false);
|
||||
param_default("showOthers", false);
|
||||
param_default("multiple", null);
|
||||
|
||||
var tmp = ["inputField", "displayArea", "button"];
|
||||
for (var i in tmp) {
|
||||
if (typeof params[tmp[i]] == "string") {
|
||||
params[tmp[i]] = document.getElementById(params[tmp[i]]);
|
||||
}
|
||||
}
|
||||
if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) {
|
||||
alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code");
|
||||
return false;
|
||||
}
|
||||
|
||||
function onSelect(cal) {
|
||||
var p = cal.params;
|
||||
var update = (cal.dateClicked || p.electric);
|
||||
if (update && p.inputField) {
|
||||
p.inputField.value = cal.date.print(p.ifFormat);
|
||||
if (typeof p.inputField.onchange == "function")
|
||||
p.inputField.onchange();
|
||||
}
|
||||
if (update && p.displayArea)
|
||||
p.displayArea.innerHTML = cal.date.print(p.daFormat);
|
||||
if (update && typeof p.onUpdate == "function")
|
||||
p.onUpdate(cal);
|
||||
if (update && p.flat) {
|
||||
if (typeof p.flatCallback == "function")
|
||||
p.flatCallback(cal);
|
||||
}
|
||||
if (update && p.singleClick && cal.dateClicked)
|
||||
cal.callCloseHandler();
|
||||
};
|
||||
|
||||
if (params.flat != null) {
|
||||
if (typeof params.flat == "string")
|
||||
params.flat = document.getElementById(params.flat);
|
||||
if (!params.flat) {
|
||||
alert("Calendar.setup:\n Flat specified but can't find parent.");
|
||||
return false;
|
||||
}
|
||||
var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
|
||||
cal.showsOtherMonths = params.showOthers;
|
||||
cal.showsTime = params.showsTime;
|
||||
cal.time24 = (params.timeFormat == "24");
|
||||
cal.params = params;
|
||||
cal.weekNumbers = params.weekNumbers;
|
||||
cal.setRange(params.range[0], params.range[1]);
|
||||
cal.setDateStatusHandler(params.dateStatusFunc);
|
||||
cal.getDateText = params.dateText;
|
||||
if (params.ifFormat) {
|
||||
cal.setDateFormat(params.ifFormat);
|
||||
}
|
||||
if (params.inputField && typeof params.inputField.value == "string") {
|
||||
cal.parseDate(params.inputField.value);
|
||||
}
|
||||
cal.create(params.flat);
|
||||
cal.show();
|
||||
return false;
|
||||
}
|
||||
|
||||
var triggerEl = params.button || params.displayArea || params.inputField;
|
||||
triggerEl["on" + params.eventName] = function() {
|
||||
var dateEl = params.inputField || params.displayArea;
|
||||
var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
|
||||
var mustCreate = false;
|
||||
var cal = window.calendar;
|
||||
if (dateEl)
|
||||
params.date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt);
|
||||
if (!(cal && params.cache)) {
|
||||
window.calendar = cal = new Calendar(params.firstDay,
|
||||
params.date,
|
||||
params.onSelect || onSelect,
|
||||
params.onClose || function(cal) { cal.hide(); });
|
||||
cal.showsTime = params.showsTime;
|
||||
cal.time24 = (params.timeFormat == "24");
|
||||
cal.weekNumbers = params.weekNumbers;
|
||||
mustCreate = true;
|
||||
} else {
|
||||
if (params.date)
|
||||
cal.setDate(params.date);
|
||||
cal.hide();
|
||||
}
|
||||
if (params.multiple) {
|
||||
cal.multiple = {};
|
||||
for (var i = params.multiple.length; --i >= 0;) {
|
||||
var d = params.multiple[i];
|
||||
var ds = d.print("%Y%m%d");
|
||||
cal.multiple[ds] = d;
|
||||
}
|
||||
}
|
||||
cal.showsOtherMonths = params.showOthers;
|
||||
cal.yearStep = params.step;
|
||||
cal.setRange(params.range[0], params.range[1]);
|
||||
cal.params = params;
|
||||
cal.setDateStatusHandler(params.dateStatusFunc);
|
||||
cal.getDateText = params.dateText;
|
||||
cal.setDateFormat(dateFmt);
|
||||
if (mustCreate)
|
||||
cal.create();
|
||||
cal.refresh();
|
||||
if (!params.position)
|
||||
cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
|
||||
else
|
||||
cal.showAt(params.position[0], params.position[1]);
|
||||
return false;
|
||||
};
|
||||
|
||||
return cal;
|
||||
};
|
|
@ -1,7 +1,7 @@
|
|||
var isIE = (navigator.userAgent.indexOf("MSIE") != -1);
|
||||
|
||||
/****************************************************************************
|
||||
* Adempiere (c) Jorg Janke - All rights reseverd
|
||||
* Compiere (c) Jorg Janke - All rights reseverd
|
||||
* $Id: menu.js,v 1.1 2006/04/21 18:03:35 jjanke Exp $
|
||||
*
|
||||
* Menu - show/hide sub-menues - tested in IE 6 end Mozila 1.7
|
|
@ -0,0 +1,168 @@
|
|||
/**
|
||||
* Copyright (c)2005-2007 Matt Kruse (javascripttoolbox.com)
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* This basically means you can use this code however you want for
|
||||
* free, but don't claim to have written it yourself!
|
||||
* Donations always accepted: http://www.JavascriptToolbox.com/donate/
|
||||
*
|
||||
* Please do not link to the .js files on javascripttoolbox.com from
|
||||
* your site. Copy the files locally to your server instead.
|
||||
*
|
||||
*/
|
||||
/*
|
||||
This code is inspired by and extended from Stuart Langridge's aqlist code:
|
||||
http://www.kryogenix.org/code/browser/aqlists/
|
||||
Stuart Langridge, November 2002
|
||||
sil@kryogenix.org
|
||||
Inspired by Aaron's labels.js (http://youngpup.net/demos/labels/)
|
||||
and Dave Lindquist's menuDropDown.js (http://www.gazingus.org/dhtml/?id=109)
|
||||
*/
|
||||
|
||||
// Automatically attach a listener to the window onload, to convert the trees
|
||||
addEvent(window,"load",convertTrees);
|
||||
|
||||
// Utility function to add an event listener
|
||||
function addEvent(o,e,f){
|
||||
if (o.addEventListener){ o.addEventListener(e,f,false); return true; }
|
||||
else if (o.attachEvent){ return o.attachEvent("on"+e,f); }
|
||||
else { return false; }
|
||||
}
|
||||
|
||||
// utility function to set a global variable if it is not already set
|
||||
function setDefault(name,val) {
|
||||
if (typeof(window[name])=="undefined" || window[name]==null) {
|
||||
window[name]=val;
|
||||
}
|
||||
}
|
||||
|
||||
// Full expands a tree with a given ID
|
||||
function expandTree(treeId) {
|
||||
var ul = document.getElementById(treeId);
|
||||
if (ul == null) { return false; }
|
||||
expandCollapseList(ul,nodeOpenClass);
|
||||
}
|
||||
|
||||
// Fully collapses a tree with a given ID
|
||||
function collapseTree(treeId) {
|
||||
var ul = document.getElementById(treeId);
|
||||
if (ul == null) { return false; }
|
||||
expandCollapseList(ul,nodeClosedClass);
|
||||
}
|
||||
|
||||
// Expands enough nodes to expose an LI with a given ID
|
||||
function expandToItem(treeId,itemId) {
|
||||
var ul = document.getElementById(treeId);
|
||||
if (ul == null) { return false; }
|
||||
var ret = expandCollapseList(ul,nodeOpenClass,itemId);
|
||||
if (ret) {
|
||||
var o = document.getElementById(itemId);
|
||||
if (o.scrollIntoView) {
|
||||
o.scrollIntoView(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Performs 3 functions:
|
||||
// a) Expand all nodes
|
||||
// b) Collapse all nodes
|
||||
// c) Expand all nodes to reach a certain ID
|
||||
function expandCollapseList(ul,cName,itemId) {
|
||||
if (!ul.childNodes || ul.childNodes.length==0) { return false; }
|
||||
// Iterate LIs
|
||||
for (var itemi=0;itemi<ul.childNodes.length;itemi++) {
|
||||
var item = ul.childNodes[itemi];
|
||||
if (itemId!=null && item.id==itemId) { return true; }
|
||||
if (item.nodeName == "LI") {
|
||||
// Iterate things in this LI
|
||||
var subLists = false;
|
||||
for (var sitemi=0;sitemi<item.childNodes.length;sitemi++) {
|
||||
var sitem = item.childNodes[sitemi];
|
||||
if (sitem.nodeName=="UL") {
|
||||
subLists = true;
|
||||
var ret = expandCollapseList(sitem,cName,itemId);
|
||||
if (itemId!=null && ret) {
|
||||
item.className=cName;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (subLists && itemId==null) {
|
||||
item.className = cName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Search the document for UL elements with the correct CLASS name, then process them
|
||||
function convertTrees() {
|
||||
setDefault("treeClass","mktree");
|
||||
setDefault("nodeClosedClass","liClosed");
|
||||
setDefault("nodeOpenClass","liOpen");
|
||||
setDefault("nodeBulletClass","liBullet");
|
||||
setDefault("nodeLinkClass","bullet");
|
||||
setDefault("preProcessTrees",true);
|
||||
if (preProcessTrees) {
|
||||
if (!document.createElement) { return; } // Without createElement, we can't do anything
|
||||
var uls = document.getElementsByTagName("ul");
|
||||
if (uls==null) { return; }
|
||||
var uls_length = uls.length;
|
||||
for (var uli=0;uli<uls_length;uli++) {
|
||||
var ul=uls[uli];
|
||||
if (ul.nodeName=="UL" && ul.className==treeClass) {
|
||||
processList(ul);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function treeNodeOnclick() {
|
||||
this.parentNode.className = (this.parentNode.className==nodeOpenClass) ? nodeClosedClass : nodeOpenClass;
|
||||
return false;
|
||||
}
|
||||
function retFalse() {
|
||||
return false;
|
||||
}
|
||||
// Process a UL tag and all its children, to convert to a tree
|
||||
function processList(ul) {
|
||||
if (!ul.childNodes || ul.childNodes.length==0) { return; }
|
||||
// Iterate LIs
|
||||
var childNodesLength = ul.childNodes.length;
|
||||
for (var itemi=0;itemi<childNodesLength;itemi++) {
|
||||
var item = ul.childNodes[itemi];
|
||||
if (item.nodeName == "LI") {
|
||||
// Iterate things in this LI
|
||||
var subLists = false;
|
||||
var itemChildNodesLength = item.childNodes.length;
|
||||
for (var sitemi=0;sitemi<itemChildNodesLength;sitemi++) {
|
||||
var sitem = item.childNodes[sitemi];
|
||||
if (sitem.nodeName=="UL") {
|
||||
subLists = true;
|
||||
processList(sitem);
|
||||
}
|
||||
}
|
||||
var s= document.createElement("SPAN");
|
||||
var t= '\u00A0'; //
|
||||
s.className = nodeLinkClass;
|
||||
if (subLists) {
|
||||
// This LI has UL's in it, so it's a +/- node
|
||||
if (item.className==null || item.className=="") {
|
||||
item.className = nodeClosedClass;
|
||||
}
|
||||
// If it's just text, make the text work as the link also
|
||||
if (item.firstChild.nodeName=="#text") {
|
||||
t = t+item.firstChild.nodeValue;
|
||||
item.removeChild(item.firstChild);
|
||||
}
|
||||
s.onclick = treeNodeOnclick;
|
||||
}
|
||||
else {
|
||||
// No sublists, so it's just a bullet node
|
||||
item.className = nodeBulletClass;
|
||||
s.onclick = retFalse;
|
||||
}
|
||||
s.appendChild(document.createTextNode(t));
|
||||
item.insertBefore(s,item.firstChild);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* Adempiere (c) Jorg Janke - All rights reseverd
|
||||
* Compiere (c) Jorg Janke - All rights reseverd
|
||||
* $Id: standard.js,v 1.1 2006/04/21 18:03:35 jjanke Exp $
|
||||
*
|
||||
* General Header Script shared by Web UI and WebStore
|
||||
|
@ -214,6 +214,7 @@ function showLoadingWindow (base)
|
|||
//
|
||||
function showLoadingMenu(base)
|
||||
{
|
||||
parent.resizeFrame('5,*');
|
||||
var d = parent.WMenu.document;
|
||||
d.open();
|
||||
// Content
|
||||
|
@ -226,7 +227,7 @@ function showLoadingMenu(base)
|
|||
d.write('info += "</h1>"; tickNo++; setOuterHTML(getElementById(\'ticker\'), info); }');
|
||||
d.write('setInterval("tick();", 1500); </script>');
|
||||
// Fini
|
||||
d.close();
|
||||
d.close();
|
||||
return true; // follow the link
|
||||
} // showLoadingMenu
|
||||
|
|
@ -0,0 +1,361 @@
|
|||
/****************************************************************************
|
||||
* Compiere (c) Jorg Janke - All rights reseverd
|
||||
* $Id: window.js,v 1.1 2006/04/21 18:03:35 jjanke Exp $
|
||||
*
|
||||
* Web UI Window Utilities
|
||||
***************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Text constants
|
||||
*/
|
||||
var deleteText = "ConfirmDelete";
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Field Update
|
||||
***************************************************************************/
|
||||
function fieldUpdate(e)
|
||||
{
|
||||
if (!top.WCmd) // no cmd frame
|
||||
return;
|
||||
|
||||
if (!e) e = window.event;
|
||||
// alert('FieldUpdate ' + e.name + '=' + e.value);
|
||||
|
||||
// update info and submit
|
||||
top.WCmd.document.fieldUpdate.formName.value = e.form.name; //e.document.forms[0].name;
|
||||
top.WCmd.document.fieldUpdate.fieldName.value = e.name;
|
||||
top.WCmd.document.fieldUpdate.fieldValue.value = e.value;
|
||||
top.WCmd.document.fieldUpdate.submit();
|
||||
} // fieldUpdate
|
||||
|
||||
/**
|
||||
* Create Initial Command Window
|
||||
*/
|
||||
function createWCmd()
|
||||
{
|
||||
if (!top.WCmd) // no cmd frame
|
||||
return;
|
||||
// write to the command window.
|
||||
var d = top.WCmd.document;
|
||||
d.open();
|
||||
d.writeln('<form name="fieldUpdate" method="post" action="/adempiere/WFieldUpdate">');
|
||||
d.writeln('<input type="hidden" name="formName" value="x">');
|
||||
d.writeln('<input type="hidden" name="fieldName" value="x">');
|
||||
d.writeln('<input type="hidden" name="fieldValue" value="x">');
|
||||
d.writeln('</form>');
|
||||
d.close();
|
||||
} // createWCmd
|
||||
// Execute it
|
||||
createWCmd();
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Dynamic Display
|
||||
* - for form: WForm
|
||||
* - changing field should have onChange="dynDisplay" to trigger evaluation
|
||||
* - changed field should have document.WForm.field.displayLogic='expression'
|
||||
*/
|
||||
function dynDisplay()
|
||||
{
|
||||
var el = document.WForm.elements;
|
||||
var info = "dynDisplay:";
|
||||
// for all fields
|
||||
for (var i = 0; i < el.length; i++)
|
||||
{
|
||||
// do we have displayLogic ?
|
||||
var dLogic = el[i].displayLogic;
|
||||
if (typeof dLogic == "string" && dLogic.length > 0)
|
||||
{
|
||||
fieldName = el[i].name;
|
||||
if (evaluate(dLogic))
|
||||
{
|
||||
show(fieldName+"L");
|
||||
show(fieldName+"F");
|
||||
show(fieldName+"B");
|
||||
info += " show:" + fieldName;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide(fieldName+"L");
|
||||
hide(fieldName+"F");
|
||||
hide(fieldName+"B");
|
||||
info += " hide:" + fieldName;
|
||||
}
|
||||
} // we have displayLogic
|
||||
} // for all fields
|
||||
window.status = info;
|
||||
} // dynDisplay
|
||||
|
||||
/**
|
||||
* Evaluate Display Logic
|
||||
* >> |& <<
|
||||
*/
|
||||
function evaluate (dLogic)
|
||||
{
|
||||
var pos1 = dLogic.indexOf('&');
|
||||
var pos2 = dLogic.indexOf('|');
|
||||
|
||||
// only a tuple
|
||||
if (pos1 == pos2)
|
||||
{
|
||||
return evaluateTuple(dLogic);
|
||||
}
|
||||
|
||||
// and: &
|
||||
else if (pos1 > pos2)
|
||||
{
|
||||
tuples = dLogic.split('&');
|
||||
return evaluateTuple(tuples[0]) && evaluate(dLogic.substring(pos1+1));
|
||||
}
|
||||
|
||||
// or: |
|
||||
else
|
||||
{
|
||||
tuples = dLogic.split('|');
|
||||
return evaluateTuple(tuples[0]) || evaluate(dLogic.substring(pos2+1));
|
||||
}
|
||||
} // evaluate
|
||||
|
||||
/**
|
||||
* evaluate tuple 'x = y' or x ^ y or x ! y
|
||||
* >> =!^ <<
|
||||
*/
|
||||
function evaluateTuple(myValue)
|
||||
{
|
||||
// Equals
|
||||
var tuples = myValue.split('=');
|
||||
if (tuples.length == 2)
|
||||
return getRealValue(tuples[0]) == getRealValue(tuples[1]);
|
||||
// Not Equals
|
||||
tuples = myValue.split('^');
|
||||
if (tuples.length == 2)
|
||||
return getRealValue(tuples[0]) != getRealValue(tuples[1]);
|
||||
tuples = myValue.split('!');
|
||||
if (tuples.length == 2)
|
||||
return getRealValue(tuples[0]) != getRealValue(tuples[1]);
|
||||
//
|
||||
alert ('Error: evaluateTuple="' + myValue + '" invalid.');
|
||||
return false;
|
||||
} // evaluateTuple
|
||||
|
||||
/**
|
||||
* get (variable) value
|
||||
*/
|
||||
function getRealValue (myValue)
|
||||
{
|
||||
var pos1 = myValue.indexOf('@');
|
||||
var pos2 = myValue.indexOf('@', pos1+1);
|
||||
|
||||
// Constant - remove blanks an '"
|
||||
if (pos1 == pos2)
|
||||
return myValue.replace(/['" ]/g, "");
|
||||
|
||||
// Variable
|
||||
var variable = myValue.substring(pos1+1, pos2);
|
||||
for (var i = 0; i < document.WForm.elements.length; i++)
|
||||
{
|
||||
if (document.WForm.elements[i].name == variable)
|
||||
return document.WForm.elements[i].value;
|
||||
}
|
||||
// Nothing found
|
||||
return "";
|
||||
} // getRealValue
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Open PopUp with Attachment Info
|
||||
*/
|
||||
function popUp(URL) {
|
||||
day = new Date();
|
||||
id = day.getTime();
|
||||
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=300,left = 212,top = 234');");
|
||||
}
|
||||
|
||||
function startPopup (targetCmd)
|
||||
{
|
||||
var url = targetCmd;
|
||||
return popUp(url);
|
||||
} // startPopup
|
||||
|
||||
/**
|
||||
* Close PopUp
|
||||
*/
|
||||
function closePopup ()
|
||||
{
|
||||
parent.document.getElementById("framesetWindow").rows="0,*";
|
||||
return true; // do submit page
|
||||
} // closePopUp
|
||||
/**
|
||||
* Lookup - get FormName and ColumnName and submit to WLookup
|
||||
*/
|
||||
function startLookup (columnName, processid)
|
||||
{
|
||||
var url = "WLookup?ColumnName=" + columnName+"&AD_Process_ID="+processid;
|
||||
return popUp(url);
|
||||
} // startLookup
|
||||
/**
|
||||
* Lookup - get FormName and ColumnName and submit to WLookup
|
||||
*/
|
||||
function startZoom (TableID, RecordID)
|
||||
{
|
||||
var url = "WWindow?AD_Table_ID=" + TableID+"&AD_Record_ID="+RecordID;
|
||||
parent.WWindow.location = '/adempiere/' + url;
|
||||
return false; // do not submit page
|
||||
|
||||
} // startZoom
|
||||
/**
|
||||
* Account - get FormName and ColumnName and submit to WAccount
|
||||
*/
|
||||
function startAccount (columnName)
|
||||
{
|
||||
var url = "WAccount?ColumnName=" + columnName;
|
||||
return popUp(url);
|
||||
} // startAccount
|
||||
|
||||
/**
|
||||
* Location - get FormName and ColumnName and submit to WLocation
|
||||
*/
|
||||
function startLocation (columnName)
|
||||
{
|
||||
var url = "WLocation?ColumnName=" + columnName;
|
||||
return popUp(url);
|
||||
} // startLocation
|
||||
|
||||
/****************************************************************************
|
||||
* Field Updated - submit
|
||||
*/
|
||||
function startUpdate (column)
|
||||
{
|
||||
column.form.ChangedColumn.value=column.name;
|
||||
column.form.submit();
|
||||
} // startUpdate
|
||||
|
||||
/****************************************************************************
|
||||
* Lookup Field Updated - submit
|
||||
*/
|
||||
function startLookUpdate(column, name1, value1, name2, value2)
|
||||
{
|
||||
|
||||
window.close();
|
||||
opener.document.getElementById(name1).value =value1;
|
||||
opener.document.getElementById(name2).value =value2;
|
||||
} // startUpdate
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Process Button
|
||||
*/
|
||||
function startButton (processID, windowID, recordID, tableID, columnName)
|
||||
{
|
||||
var url = "WProcess?AD_Process_ID=" + processID + "&AD_Window_ID="+windowID+
|
||||
"&AD_Record_ID="+recordID+"&AD_Table_ID="+tableID+"&columnName="+columnName;
|
||||
return popUp(url);
|
||||
|
||||
} // startButton
|
||||
|
||||
/****************************************************************************
|
||||
* Process Toolbar Button
|
||||
*/
|
||||
function SubmitForm(pValue, pAction, pType)
|
||||
{
|
||||
Form = document.forms[0];
|
||||
if (pType=='toolbar')
|
||||
{
|
||||
document.WForm.PCommand.value= pValue;
|
||||
if (pAction == 'reset')
|
||||
Form.reset();
|
||||
else if (pValue== 'Delete'){
|
||||
if(confirm('Do you want to delete the record?')){
|
||||
Form.submit();
|
||||
}
|
||||
}
|
||||
else
|
||||
Form.submit();
|
||||
}
|
||||
if (pType=='tab')
|
||||
{
|
||||
document.WForm.PTab.value= pValue;
|
||||
Form.submit();
|
||||
}
|
||||
}
|
||||
/****************************************************************************
|
||||
* Process Calendar
|
||||
*/
|
||||
|
||||
var oldLink = null;
|
||||
// code to change the active stylesheet
|
||||
function setActiveStyleSheet(link, title) {
|
||||
var i, a, main;
|
||||
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
|
||||
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
|
||||
a.disabled = true;
|
||||
if(a.getAttribute("title") == title) a.disabled = false;
|
||||
}
|
||||
}
|
||||
if (oldLink) oldLink.style.fontWeight = 'normal';
|
||||
oldLink = link;
|
||||
link.style.fontWeight = 'bold';
|
||||
return false;
|
||||
}
|
||||
|
||||
// This function gets called when the end-user clicks on some date.
|
||||
function selected(cal, date) {
|
||||
cal.sel.value = date; // just update the date in the input field.
|
||||
if (cal.dateClicked && (cal.sel.id == "sel1" || cal.sel.id == "sel3"))
|
||||
// if we add this call we close the calendar on single-click.
|
||||
// just to exemplify both cases, we are using this only for the 1st
|
||||
// and the 3rd field, while 2nd and 4th will still require double-click.
|
||||
cal.callCloseHandler();
|
||||
}
|
||||
|
||||
// And this gets called when the end-user clicks on the _selected_ date,
|
||||
// or clicks on the "Close" button. It just hides the calendar without
|
||||
// destroying it.
|
||||
function closeHandler(cal) {
|
||||
cal.hide(); // hide the calendar
|
||||
// cal.destroy();
|
||||
_dynarch_popupCalendar = null;
|
||||
}
|
||||
|
||||
// This function shows the calendar under the element having the given id.
|
||||
// It takes care of catching "mousedown" signals on document and hiding the
|
||||
// calendar if the click was outside.
|
||||
function showCalendar(id, format, showsTime, showsOtherMonths) {
|
||||
var el = document.getElementById(id);
|
||||
if (_dynarch_popupCalendar != null) {
|
||||
// we already have some calendar created
|
||||
_dynarch_popupCalendar.hide(); // so we hide it first.
|
||||
} else {
|
||||
// first-time call, create the calendar.
|
||||
var cal = new Calendar(1, null, selected, closeHandler);
|
||||
// uncomment the following line to hide the week numbers
|
||||
// cal.weekNumbers = false;
|
||||
|
||||
if (typeof showsTime == "string") {
|
||||
cal.showsTime = true;
|
||||
cal.time24 = (showsTime == "24");
|
||||
}
|
||||
if (showsOtherMonths) {
|
||||
cal.showsOtherMonths = true;
|
||||
}
|
||||
_dynarch_popupCalendar = cal; // remember it in the global var
|
||||
cal.setRange(1900, 2070); // min/max year allowed.
|
||||
cal.create();
|
||||
}
|
||||
_dynarch_popupCalendar.setDateFormat(format); // set the specified date format
|
||||
_dynarch_popupCalendar.parseDate(el.value); // try to parse the text in field
|
||||
_dynarch_popupCalendar.sel = el; // inform it what input field we use
|
||||
|
||||
// the reference element that we pass to showAtElement is the button that
|
||||
// triggers the calendar. In this example we align the calendar bottom-right
|
||||
// to the button.
|
||||
_dynarch_popupCalendar.showAtElement(el, "Br"); // show the calendar
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var MINUTE = 60 * 1000;
|
||||
var HOUR = 60 * MINUTE;
|
||||
var DAY = 24 * HOUR;
|
||||
var WEEK = 7 * DAY;
|
|
@ -0,0 +1,127 @@
|
|||
// ** I18N
|
||||
|
||||
// Calendar EN language
|
||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
||||
// Encoding: any
|
||||
// Distributed under the same terms as the calendar itself.
|
||||
|
||||
// For translators: please use UTF-8 if possible. We strongly believe that
|
||||
// Unicode is the answer to a real internationalized world. Also please
|
||||
// include your contact information in the header, as can be seen above.
|
||||
|
||||
// full day names
|
||||
Calendar._DN = new Array
|
||||
("Sunday",
|
||||
"Monday",
|
||||
"Tuesday",
|
||||
"Wednesday",
|
||||
"Thursday",
|
||||
"Friday",
|
||||
"Saturday",
|
||||
"Sunday");
|
||||
|
||||
// Please note that the following array of short day names (and the same goes
|
||||
// for short month names, _SMN) isn't absolutely necessary. We give it here
|
||||
// for exemplification on how one can customize the short day names, but if
|
||||
// they are simply the first N letters of the full name you can simply say:
|
||||
//
|
||||
// Calendar._SDN_len = N; // short day name length
|
||||
// Calendar._SMN_len = N; // short month name length
|
||||
//
|
||||
// If N = 3 then this is not needed either since we assume a value of 3 if not
|
||||
// present, to be compatible with translation files that were written before
|
||||
// this feature.
|
||||
|
||||
// short day names
|
||||
Calendar._SDN = new Array
|
||||
("Sun",
|
||||
"Mon",
|
||||
"Tue",
|
||||
"Wed",
|
||||
"Thu",
|
||||
"Fri",
|
||||
"Sat",
|
||||
"Sun");
|
||||
|
||||
// First day of the week. "0" means display Sunday first, "1" means display
|
||||
// Monday first, etc.
|
||||
Calendar._FD = 0;
|
||||
|
||||
// full month names
|
||||
Calendar._MN = new Array
|
||||
("January",
|
||||
"February",
|
||||
"March",
|
||||
"April",
|
||||
"May",
|
||||
"June",
|
||||
"July",
|
||||
"August",
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December");
|
||||
|
||||
// short month names
|
||||
Calendar._SMN = new Array
|
||||
("Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec");
|
||||
|
||||
// tooltips
|
||||
Calendar._TT = {};
|
||||
Calendar._TT["INFO"] = "About the calendar";
|
||||
|
||||
Calendar._TT["ABOUT"] =
|
||||
"DHTML Date/Time Selector\n" +
|
||||
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
|
||||
"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
|
||||
"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." +
|
||||
"\n\n" +
|
||||
"Date selection:\n" +
|
||||
"- Use the \xab, \xbb buttons to select year\n" +
|
||||
"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
|
||||
"- Hold mouse button on any of the above buttons for faster selection.";
|
||||
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
||||
"Time selection:\n" +
|
||||
"- Click on any of the time parts to increase it\n" +
|
||||
"- or Shift-click to decrease it\n" +
|
||||
"- or click and drag for faster selection.";
|
||||
|
||||
Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
|
||||
Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
|
||||
Calendar._TT["GO_TODAY"] = "Go Today";
|
||||
Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
|
||||
Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
|
||||
Calendar._TT["SEL_DATE"] = "Select date";
|
||||
Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
|
||||
Calendar._TT["PART_TODAY"] = " (today)";
|
||||
|
||||
// the following is to inform that "%s" is to be the first day of week
|
||||
// %s will be replaced with the day name.
|
||||
Calendar._TT["DAY_FIRST"] = "Display %s first";
|
||||
|
||||
// This may be locale-dependent. It specifies the week-end days, as an array
|
||||
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
|
||||
// means Monday, etc.
|
||||
Calendar._TT["WEEKEND"] = "0,6";
|
||||
|
||||
Calendar._TT["CLOSE"] = "Close";
|
||||
Calendar._TT["TODAY"] = "Today";
|
||||
Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
|
||||
|
||||
// date formats
|
||||
Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
|
||||
Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
|
||||
|
||||
Calendar._TT["WK"] = "wk";
|
||||
Calendar._TT["TIME"] = "Time:";
|
|
@ -3,8 +3,8 @@
|
|||
<title>Menu</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<base target="WWindow">
|
||||
<link href="standard.css" rel="stylesheet" type="text/css">
|
||||
<link href="menu.css" rel="stylesheet" type="text/css">
|
||||
<link href="/css/standard.css" rel="stylesheet" type="text/css">
|
||||
<link href="/css/menu.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/* Adempiere HTML UI (c) Jorg Janke */
|
||||
/* $Id: popup.css,v 1.1 2006/04/21 18:03:35 jjanke Exp $ */
|
||||
|
||||
body {
|
||||
background-color: #fbf8f1;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.Cerror{
|
||||
background: #dcf1cb;
|
||||
}
|
||||
|
||||
.Cmandatory{
|
||||
background: #e9eef5;
|
||||
}
|
||||
|
||||
.popupTable {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
margin: 0px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.popupHeader {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.popupCenter {
|
||||
border-bottom: 1px solid #000000;
|
||||
border-top: 1px solid #000000;
|
||||
}
|
||||
|
||||
.popupFooter {
|
||||
border-bottom: none;
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
<title>Popup</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<base target="window">
|
||||
<link href="standard.css" rel="stylesheet" type="text/css">
|
||||
<link href="/css/standard.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
/* Adempiere HTML UI (c) Jorg Janke */
|
||||
/* $Id: window.css,v 1.1 2006/04/21 18:03:35 jjanke Exp $ */
|
||||
|
||||
|
||||
body {
|
||||
/* Manu #F4FCFF; */
|
||||
background-color: #fbf8f1;
|
||||
color: #000000;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
big {
|
||||
cursor: pointer; /* used for tab */
|
||||
}
|
||||
|
||||
td {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.Cerror {
|
||||
background: #dcf1cb;
|
||||
}
|
||||
|
||||
.Cmandatory {
|
||||
background: #e9eef5;
|
||||
}
|
||||
|
||||
#imgButton {
|
||||
border-style: outset;
|
||||
}
|
||||
|
||||
#imgButtonPressed {
|
||||
border-style: inset;
|
||||
}
|
||||
|
||||
#tab {
|
||||
background: #E6E6FA; /* Window Tabs */
|
||||
border-style: outset;
|
||||
color: #0000CC;
|
||||
cursor: pointer;
|
||||
margin-right: 5px;
|
||||
margin-top: 20px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#tabSelected {
|
||||
background: #E6E6FA; /* Selected Window Tabs */
|
||||
border-style: inset;
|
||||
color: #000066;
|
||||
cursor: pointer;
|
||||
margin-right: 5px;
|
||||
margin-top: 20px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.windowTable {
|
||||
margin: 0px;
|
||||
padding: 2px;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.windowHeader {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.windowCenter {
|
||||
border-bottom: 1px solid #000000;
|
||||
border-top: 1px solid #000000;
|
||||
}
|
||||
|
||||
.windowFooter {
|
||||
border-bottom: none;
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Adempiere Window - Performs compliance test</title>
|
||||
<title>Compiere Window - Performs compliance test</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link href="standard.css" rel="stylesheet" type="text/css">
|
||||
<link href="window.css" rel="stylesheet" type="text/css">
|
||||
<link href="/css/standard.css" rel="stylesheet" type="text/css">
|
||||
<link href="/css/window.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<p><img src="Logo.gif"></p>
|
||||
|
|
|
@ -1,232 +0,0 @@
|
|||
/****************************************************************************
|
||||
* Adempiere (c) Jorg Janke - All rights reseverd
|
||||
* $Id: window.js,v 1.1 2006/04/21 18:03:35 jjanke Exp $
|
||||
*
|
||||
* Web UI Window Utilities
|
||||
***************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Text constants
|
||||
*/
|
||||
var deleteText = "ConfirmDelete";
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Field Update
|
||||
***************************************************************************/
|
||||
function fieldUpdate(e)
|
||||
{
|
||||
if (!top.WCmd) // no cmd frame
|
||||
return;
|
||||
|
||||
if (!e) e = window.event;
|
||||
// alert('FieldUpdate ' + e.name + '=' + e.value);
|
||||
|
||||
// update info and submit
|
||||
top.WCmd.document.fieldUpdate.formName.value = e.form.name; //e.document.forms[0].name;
|
||||
top.WCmd.document.fieldUpdate.fieldName.value = e.name;
|
||||
top.WCmd.document.fieldUpdate.fieldValue.value = e.value;
|
||||
top.WCmd.document.fieldUpdate.submit();
|
||||
} // fieldUpdate
|
||||
|
||||
/**
|
||||
* Create Initial Command Window
|
||||
*/
|
||||
function createWCmd()
|
||||
{
|
||||
if (!top.WCmd) // no cmd frame
|
||||
return;
|
||||
// write to the command window.
|
||||
var d = top.WCmd.document;
|
||||
d.open();
|
||||
d.writeln('<form name="fieldUpdate" method="post" action="/adempiere/WFieldUpdate">');
|
||||
d.writeln('<input type="hidden" name="formName" value="x">');
|
||||
d.writeln('<input type="hidden" name="fieldName" value="x">');
|
||||
d.writeln('<input type="hidden" name="fieldValue" value="x">');
|
||||
d.writeln('</form>');
|
||||
d.close();
|
||||
} // createWCmd
|
||||
// Execute it
|
||||
createWCmd();
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Dynamic Display
|
||||
* - for form: WForm
|
||||
* - changing field should have onChange="dynDisplay" to trigger evaluation
|
||||
* - changed field should have document.WForm.field.displayLogic='expression'
|
||||
*/
|
||||
function dynDisplay()
|
||||
{
|
||||
var el = document.WForm.elements;
|
||||
var info = "dynDisplay:";
|
||||
// for all fields
|
||||
for (var i = 0; i < el.length; i++)
|
||||
{
|
||||
// do we have displayLogic ?
|
||||
var dLogic = el[i].displayLogic;
|
||||
if (typeof dLogic == "string" && dLogic.length > 0)
|
||||
{
|
||||
fieldName = el[i].name;
|
||||
if (evaluate(dLogic))
|
||||
{
|
||||
show(fieldName+"L");
|
||||
show(fieldName+"F");
|
||||
show(fieldName+"B");
|
||||
info += " show:" + fieldName;
|
||||
}
|
||||
else
|
||||
{
|
||||
hide(fieldName+"L");
|
||||
hide(fieldName+"F");
|
||||
hide(fieldName+"B");
|
||||
info += " hide:" + fieldName;
|
||||
}
|
||||
} // we have displayLogic
|
||||
} // for all fields
|
||||
window.status = info;
|
||||
} // dynDisplay
|
||||
|
||||
/**
|
||||
* Evaluate Display Logic
|
||||
* >> |& <<
|
||||
*/
|
||||
function evaluate (dLogic)
|
||||
{
|
||||
var pos1 = dLogic.indexOf('&');
|
||||
var pos2 = dLogic.indexOf('|');
|
||||
|
||||
// only a tuple
|
||||
if (pos1 == pos2)
|
||||
{
|
||||
return evaluateTuple(dLogic);
|
||||
}
|
||||
|
||||
// and: &
|
||||
else if (pos1 > pos2)
|
||||
{
|
||||
tuples = dLogic.split('&');
|
||||
return evaluateTuple(tuples[0]) && evaluate(dLogic.substring(pos1+1));
|
||||
}
|
||||
|
||||
// or: |
|
||||
else
|
||||
{
|
||||
tuples = dLogic.split('|');
|
||||
return evaluateTuple(tuples[0]) || evaluate(dLogic.substring(pos2+1));
|
||||
}
|
||||
} // evaluate
|
||||
|
||||
/**
|
||||
* evaluate tuple 'x = y' or x ^ y or x ! y
|
||||
* >> =!^ <<
|
||||
*/
|
||||
function evaluateTuple(myValue)
|
||||
{
|
||||
// Equals
|
||||
var tuples = myValue.split('=');
|
||||
if (tuples.length == 2)
|
||||
return getRealValue(tuples[0]) == getRealValue(tuples[1]);
|
||||
// Not Equals
|
||||
tuples = myValue.split('^');
|
||||
if (tuples.length == 2)
|
||||
return getRealValue(tuples[0]) != getRealValue(tuples[1]);
|
||||
tuples = myValue.split('!');
|
||||
if (tuples.length == 2)
|
||||
return getRealValue(tuples[0]) != getRealValue(tuples[1]);
|
||||
//
|
||||
alert ('Error: evaluateTuple="' + myValue + '" invalid.');
|
||||
return false;
|
||||
} // evaluateTuple
|
||||
|
||||
/**
|
||||
* get (variable) value
|
||||
*/
|
||||
function getRealValue (myValue)
|
||||
{
|
||||
var pos1 = myValue.indexOf('@');
|
||||
var pos2 = myValue.indexOf('@', pos1+1);
|
||||
|
||||
// Constant - remove blanks an '"
|
||||
if (pos1 == pos2)
|
||||
return myValue.replace(/['" ]/g, "");
|
||||
|
||||
// Variable
|
||||
var variable = myValue.substring(pos1+1, pos2);
|
||||
for (var i = 0; i < document.WForm.elements.length; i++)
|
||||
{
|
||||
if (document.WForm.elements[i].name == variable)
|
||||
return document.WForm.elements[i].value;
|
||||
}
|
||||
// Nothing found
|
||||
return "";
|
||||
} // getRealValue
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Open PopUp with Attachment Info
|
||||
*/
|
||||
function startPopup (targetCmd)
|
||||
{
|
||||
parent.document.getElementById("framesetWindow").rows="300,*";
|
||||
parent.WPopUp.location = '/adempiere/' + targetCmd;
|
||||
return false; // do not submit page
|
||||
} // startPopup
|
||||
|
||||
/**
|
||||
* Close PopUp
|
||||
*/
|
||||
function closePopup ()
|
||||
{
|
||||
parent.document.getElementById("framesetWindow").rows="0,*";
|
||||
return true; // do submit page
|
||||
} // closePopUp
|
||||
|
||||
/**
|
||||
* Lookup - get FormName and ColumnName and submit to WLookup
|
||||
*/
|
||||
function startLookup (columnName)
|
||||
{
|
||||
var url = "WLookup?ColumnName=" + columnName;
|
||||
// alert (url);
|
||||
return startPopup(url);
|
||||
} // startLookup
|
||||
|
||||
/**
|
||||
* Account - get FormName and ColumnName and submit to WAccount
|
||||
*/
|
||||
function startAccount (columnName)
|
||||
{
|
||||
var url = "WAccount?ColumnName=" + columnName;
|
||||
// alert (url);
|
||||
return startPopup(url);
|
||||
} // startAccount
|
||||
|
||||
/**
|
||||
* Location - get FormName and ColumnName and submit to WLocation
|
||||
*/
|
||||
function startLocation (columnName)
|
||||
{
|
||||
var url = "WLocation?ColumnName=" + columnName;
|
||||
// alert (url);
|
||||
return startPopup(url);
|
||||
} // startLocation
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Field Updated - submit
|
||||
*/
|
||||
function startUpdate (column)
|
||||
{
|
||||
column.form.ChangedColumn.value=column.name;
|
||||
column.form.submit();
|
||||
} // startUpdate
|
||||
|
||||
/****************************************************************************
|
||||
* Process Button
|
||||
*/
|
||||
function startButton (column)
|
||||
{
|
||||
column.form.ChangedColumn.value=column.name;
|
||||
column.form.submit();
|
||||
} // startButton
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<a:clrMap xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/>
|
|
@ -0,0 +1,6 @@
|
|||
<xml xmlns:o="urn:schemas-microsoft-com:office:office">
|
||||
<o:MainFile HRef="../window.html"/>
|
||||
<o:File HRef="themedata.thmx"/>
|
||||
<o:File HRef="colorschememapping.xml"/>
|
||||
<o:File HRef="filelist.xml"/>
|
||||
</xml>
|
|
@ -1,5 +1,5 @@
|
|||
/****************************************************************************
|
||||
* Adempiere (c) Jorg Janke - All rights reseverd
|
||||
* Compiere (c) Jorg Janke - All rights reseverd
|
||||
* $Id: wstore.js,v 1.5 2006/05/23 22:39:03 mdeaelfweald Exp $
|
||||
*
|
||||
* Web Store Scripts
|
||||
|
|