From 32bc40e2c35ab55b9941146b2cdb85f5e3433dd7 Mon Sep 17 00:00:00 2001 From: C Robert Date: Wed, 23 Sep 2009 18:45:16 +0000 Subject: [PATCH] Fixed UIxCalendarProperties's size Monotone-Parent: 08fe2e0d718a36dd26351f18227b786dbec8f520 Monotone-Revision: 205804a9bd292606338821a772967d790803a9d7 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-23T18:45:16 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/SchedulerUI.js | 20 ++++++++++++++----- .../UIxCalendarProperties.js | 3 --- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 0f99a5c2a..4d6e6ba74 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -1860,12 +1860,22 @@ function onCalendarModify(event) { var calendarID = selected.getAttribute("id"); var url = ApplicationBaseURL + calendarID + "/properties"; var windowID = sanitizeWindowName(calendarID + " properties"); + var width = 310; + var height = 270; + if (UserSettings['Calendar'] + && UserSettings['Calendar']['WebCalendars']) { + var webCalendars = UserSettings['Calendar']['WebCalendars']; + var realID = calendarID.substr (1, calendarID.length - 1); + if (webCalendars[realID]) { + width = 500; + height = 360; + } + } if (calendarID == "/personal") - var properties = window.open(url, windowID, - "width=310,height=250,resizable=0"); - else - var properties = window.open(url, windowID, - "width=310,height=270,resizable=0"); + height = 250; + + var properties = window.open(url, windowID, + "width="+width+",height="+height+",resizable=0"); properties.focus(); } diff --git a/UI/WebServerResources/UIxCalendarProperties.js b/UI/WebServerResources/UIxCalendarProperties.js index 3ba81e106..cd681ab97 100644 --- a/UI/WebServerResources/UIxCalendarProperties.js +++ b/UI/WebServerResources/UIxCalendarProperties.js @@ -1,9 +1,6 @@ /* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ function onLoadCalendarProperties() { - if ($("webCalendarUrl")) - window.resizeTo(500,360); - var colorButton = $("colorButton"); var calendarColor = $("calendarColor"); colorButton.setStyle({ "backgroundColor": calendarColor.value, display: "inline" });