mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-24 04:45:24 +00:00
Monotone-Parent: 4c641cc8cb0c4617186e4139ce2c11f856fbbbf7
Monotone-Revision: 77e860b2862bbbc9e902e0772f16dcae73745484 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-04-21T23:04:26 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
function onLoadCalendarProperties() {
|
||||
var colorButton = $("colorButton");
|
||||
var calendarColor = $("calendarColor");
|
||||
colorButton.setStyle({ "backgroundColor": calendarColor.value, display: "inline" });
|
||||
colorButton.observe("click", onColorClick);
|
||||
|
||||
var cancelButton = $("cancelButton");
|
||||
cancelButton.observe("click", onCancelClick);
|
||||
|
||||
var okButton = $("okButton");
|
||||
okButton.observe("click", onOKClick);
|
||||
}
|
||||
|
||||
function onCancelClick(event) {
|
||||
window.close();
|
||||
}
|
||||
|
||||
function onOKClick(event) {
|
||||
var calendarName = $("calendarName");
|
||||
var calendarColor = $("calendarColor");
|
||||
var calendarID = $("calendarID");
|
||||
|
||||
window.opener.updateCalendarProperties(calendarID.value,
|
||||
calendarName.value,
|
||||
calendarColor.value);
|
||||
}
|
||||
|
||||
function onColorClick(event) {
|
||||
var cPicker = window.open(ApplicationBaseURL + "colorPicker", "colorPicker",
|
||||
"width=250,height=200,resizable=0,scrollbars=0"
|
||||
+ "toolbar=0,location=0,directories=0,status=0,"
|
||||
+ "menubar=0,copyhistory=0", "test"
|
||||
);
|
||||
cPicker.focus();
|
||||
|
||||
preventDefault(event);
|
||||
}
|
||||
|
||||
function onColorPickerChoice(newColor) {
|
||||
var colorButton = $("colorButton");
|
||||
colorButton.setStyle({ "backgroundColor": newColor });
|
||||
var calendarColor = $("calendarColor");
|
||||
calendarColor.value = newColor;
|
||||
}
|
||||
|
||||
FastInit.addOnLoad(onLoadCalendarProperties);
|
||||
Reference in New Issue
Block a user