Author: jleroux
Date: Wed Apr 7 12:32:11 2010
New Revision: 931523
URL: http://svn.apache.org/viewvc?rev=931523&view=rev
Log:
A patch from Ankit Jain related to 'Allow to open a layered calendar from a
layer lookup' https://issues.apache.org/jira/browse/OFBIZ-3580 - OFBIZ-3580
This patch mostly solves this issues and it's clearly a progress: it's
operationnal with some drawbacks, so I don't close the issue for now
here are the issues:
* some parts of the calendar are hidden (see screenshots in Jira issue)
* if you 1st click on the button the position is OK (just below) but if you
scroll before and then click the position is to low (seems to follow the scroll)
Modified:
ofbiz/trunk/framework/images/webapp/images/calendarDateSelect/calendar_date_select.js
ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/legacy.css
ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css
ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css
ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css
ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css
Modified:
ofbiz/trunk/framework/images/webapp/images/calendarDateSelect/calendar_date_select.js
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/calendarDateSelect/calendar_date_select.js?rev=931523&r1=931522&r2=931523&view=diff
==============================================================================
---
ofbiz/trunk/framework/images/webapp/images/calendarDateSelect/calendar_date_select.js
(original)
+++
ofbiz/trunk/framework/images/webapp/images/calendarDateSelect/calendar_date_select.js
Wed Apr 7 12:32:11 2010
@@ -116,10 +116,10 @@ CalendarDateSelect.prototype = {
var above = false;
var c_pos = this.calendar_div.cumulativeOffset(), c_left = c_pos[0], c_top
= c_pos[1], c_dim = this.calendar_div.getDimensions(), c_height = c_dim.height,
c_width = c_dim.width;
var w_top = window.f_scrollTop(), w_height = window.f_height();
- var e_dim = $(this.options.get("popup_by")).cumulativeOffset(), e_top =
e_dim[1], e_left = e_dim[0], e_height =
$(this.options.get("popup_by")).getDimensions().height, e_bottom = e_top +
e_height;
+ var e_dim = $(this.options.get("popup_by")).positionedOffset(), e_top =
e_dim[1], e_left = e_dim[0], e_height =
$(this.options.get("popup_by")).getDimensions().height, e_bottom = e_top +
e_height;
if ( (( e_bottom + c_height ) > (w_top + w_height)) && ( e_bottom -
c_height > w_top )) above = true;
- var left_px = e_left.toString() + "px", top_px = (above ? (e_top -
c_height ) : ( e_top + e_height )).toString() + "px";
+ var left_px = e_left.toString() + "px", top_px = (above ? (e_top -
c_height ) : ( e_bottom )).toString() + "px";
this.calendar_div.style.left = left_px; this.calendar_div.style.top =
top_px;
@@ -136,7 +136,7 @@ CalendarDateSelect.prototype = {
var parent = document.body
var style = { position:"absolute", visibility: "hidden", left:0, top:0 }
}
- this.calendar_div = $(parent).build('div', {className:
"calendar_date_select"}, style);
+ this.calendar_div = this.target_element.up().build('div', {className:
"calendar_date_select"}, style);
var that = this;
// create the divs
Modified: ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/legacy.css
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/legacy.css?rev=931523&r1=931522&r2=931523&view=diff
==============================================================================
--- ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/legacy.css
(original)
+++ ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/legacy.css Wed Apr
7 12:32:11 2010
@@ -621,6 +621,7 @@ height:16px;
text-decoration: none;
font-size: 14px;
color: #000 !important;
+ background: none;
}
.calendar_date_select .cds_header a.prev {
@@ -647,6 +648,8 @@ height:16px;
.calendar_date_select .cds_buttons a {
color: #ccc;
font-size: 11px;
+ background: none;
+ display: inline !important;
}
.calendar_date_select td {
Modified: ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css?rev=931523&r1=931522&r2=931523&view=diff
==============================================================================
--- ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css (original)
+++ ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css Wed Apr 7 12:32:11
2010
@@ -1991,6 +1991,7 @@ iframe.ie6_blocker {
text-decoration: none;
font-size: 14px;
color: #000 !important;
+ background: none;
}
.calendar_date_select .cds_header a.prev {
@@ -2017,6 +2018,8 @@ iframe.ie6_blocker {
.calendar_date_select .cds_buttons a {
color: #fff;
font-size: 9px;
+ background: none;
+ display: inline !important;
}
.calendar_date_select td {
Modified: ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css?rev=931523&r1=931522&r2=931523&view=diff
==============================================================================
--- ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css
(original)
+++ ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css Wed
Apr 7 12:32:11 2010
@@ -1980,6 +1980,7 @@ height: 20px;
text-decoration: none;
font-size: 14px;
color: #000 !important;
+background: none;
}
.calendar_date_select .cds_header a.prev {
@@ -2006,6 +2007,8 @@ width: 61px;
.calendar_date_select .cds_buttons a {
color: #fff;
font-size: 9px;
+background: none;
+display: inline !important;
}
.calendar_date_select td {
Modified: ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css?rev=931523&r1=931522&r2=931523&view=diff
==============================================================================
--- ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css (original)
+++ ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css Wed Apr 7 12:32:11
2010
@@ -2026,6 +2026,7 @@ iframe.ie6_blocker {
text-decoration: none;
font-size:14px;
color: #000 !important;
+ background: none;
}
.calendar_date_select .cds_header a.prev {
@@ -2050,6 +2051,8 @@ iframe.ie6_blocker {
.calendar_date_select .cds_buttons a {
color: #fff;
font-size: 9px;
+ background: none;
+ display: inline !important;
}
.calendar_date_select td {
font-size:12px;
Modified: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css?rev=931523&r1=931522&r2=931523&view=diff
==============================================================================
--- ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css (original)
+++ ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css Wed Apr 7
12:32:11 2010
@@ -2167,6 +2167,7 @@ height: 20px;
text-decoration: none;
font-size: 14px;
color: #fff !important;
+background: none !important;
}
.calendar_date_select .cds_header a.prev {
@@ -2193,6 +2194,8 @@ width: 61px;
.calendar_date_select .cds_buttons a {
color: #fff;
font-size: 9px;
+background: none !important;
+display: inline !important;
}
.calendar_date_select td {