mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-03 04:18:51 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user