From 012e59468de9f067623359a2e1bf9d86330babbe Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 4 Jun 2012 19:47:36 +0000 Subject: [PATCH] See ChangeLog. Monotone-Parent: ae85556f790a11b8a40593a88822bee09e847d96 Monotone-Revision: aa6dd506e01700aaff3aa383fbe31691b0d8c795 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-06-04T19:47:36 --- ChangeLog | 4 ++++ UI/WebServerResources/UIxFilterEditor.js | 26 +++++++++++++----------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index afa0d0fab..4476ecaea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-06-04 Francis Lachapelle + * UI/WebServerResources/UIxFilterEditor.js (savePreferences): + don't validate filters if they are not visible (when matching all + incoming messages). + * SoObjects/Appointments/SOGoAppointmentFolder.m (-_appendCycleException:firstInstanceCalendarDateRange:fromRow:forRange:withTimeZone:toArray:): adjust recurrence id according to timezone when dealing with a diff --git a/UI/WebServerResources/UIxFilterEditor.js b/UI/WebServerResources/UIxFilterEditor.js index acaaefbce..929f859d5 100644 --- a/UI/WebServerResources/UIxFilterEditor.js +++ b/UI/WebServerResources/UIxFilterEditor.js @@ -786,10 +786,20 @@ function onActionDeleteClick(event) { function savePreferences(event) { var valid = true; - var rules = $$("DIV#filterRules DIV.rule"); - if (rules.length == 0) { - onRuleAddClick(event); - valid = false; + var container = $('filterRulesContainer'); + if (container.visible()) { + var rules = container.select("DIV#filterRules DIV.rule"); + if (rules.length == 0) { + onRuleAddClick(event); + valid = false; + } + else { + var inputs = $$("DIV#filterRules input"); + inputs.each(function(input) { + if (input.hasClassName("_invalid")) + valid = false; + }); + } } var actions = $$("DIV#filterActions DIV.action"); @@ -798,14 +808,6 @@ function savePreferences(event) { valid = false; } - if (valid) { - var inputs = $$("DIV#filterRules input"); - inputs.each(function(input) { - if (input.hasClassName("_invalid")) - valid = false; - }); - } - if (valid) { if (window.opener) { window.opener.updateFilterFromEditor(filterId, Object.toJSON(filter));