Fix component editor for document URL

Monotone-Parent: 6b27e776287f9677560ff81cbb45e7471959c9e0
Monotone-Revision: eca223304213a13e4a7b9e29e6e5cc41c3b1cdb3

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-06-30T01:41:27
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle 2009-06-30 01:41:27 +00:00
parent deda9f6511
commit 6209543ce0
4 changed files with 55 additions and 16 deletions

View file

@ -54,19 +54,10 @@ SELECT
{ margin-left: 1px; }
LABEL#commentArea
{ height: 15em; }
{ height: 17em; }
LABEL#commentArea textarea
{ padding-bottom: 0em;
top: 0px;
left: 8em;
width: 380px;
height: 15em;
vertical-align: bottom;
position: absolute;
padding: 0px;
margin: 0px;
margin-left: 1px; }
{ height: 15.5em; }
SPAN.checkBoxList#participantsCB
{ height: 7em; }
@ -80,7 +71,7 @@ DIV#participants UL.contactList
SPAN.checkBoxList SPAN.content LABEL
{ display: inline; }
SPAN.content
n0SPAN.content
{ position: absolute;
line-height: 2em;
top: -.25em;

View file

@ -9,3 +9,32 @@ SPAN.datePicker INPUT.textField
SPAN.timeDateControl A.button
{ border: 0; }
SPAN.content
{ position: absolute;
line-height: 2em;
top: -.25em;
left: 8em;
right: 1em; }
SPAN.content > INPUT.textField,
LABEL#commentArea textarea
{ width: 380px; }
LABEL, SPAN.checkBoxList
{ display: block;
position: relative;
line-height: 1.5em;
height: 1.5em;
margin-left: 0px;
margin-bottom: .5em;
width: 100%; }
LABEL#commentArea textarea
{ padding-bottom: 0em;
top: 0px;
left: 8em;
position: absolute;
padding: 0px;
margin: 0px;
margin-left: 1px; }

View file

@ -43,6 +43,7 @@ function onPopupUrlWindow(event) {
}
urlInput.value = newUrl;
}
onWindowResize(event);
return false;
}
@ -134,10 +135,31 @@ function onComponentEditorLoad(event) {
$("repeatList").observe("change", onPopupRecurrenceWindow);
$("reminderHref").observe("click", onPopupReminderWindow);
$("reminderList").observe("change", onPopupReminderWindow);
Event.observe(window, "resize", onWindowResize);
onPopupRecurrenceWindow(null);
onPopupReminderWindow(null);
}
function onWindowResize(event) {
var document = $("documentLabel");
var comment = $("commentArea");
var area = comment.select("textarea").first();
var offset = 6;
var height;
height = window.height() - comment.cumulativeOffset().top - offset;
if (document.visible())
height -= $("changeUrlButton").getHeight();
area.setStyle({ height: (height - offset*2) + "px" });
comment.setStyle({ height: (height - offset) + "px" });
return true;
}
function onPopupRecurrenceWindow(event) {
if (event)
preventDefault(event);

View file

@ -25,10 +25,7 @@ LABEL#commentArea
{ height: 15em; }
LABEL#commentArea textarea
{ padding: 0;
margin: 0;
width: 380px;
height: 15em; }
{ height: 15em; }
SPAN.checkBoxList#participantsCB
{ height: 7em; }