mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-18 19:48:53 +00:00
See ChangeLog.
Monotone-Parent: b31a7aa3d154368df1ba1525deed0dd5867b42f0 Monotone-Revision: 9ecab283bcceea3e4446b4445d65cffeae83252c Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-03-13T21:13:31
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2012-03-13 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/UIxFilterEditor.js (savePreferences):
|
||||
only save the filters if there's at least one rule and one action defined.
|
||||
|
||||
* UI/WebServerResources/ContactsUI.js (configureDraggables):
|
||||
increased the delay before starting drag and drop.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
( /* the toolbar groups -*-cperl-*- */
|
||||
( { link = "#";
|
||||
label = "Save and Close";
|
||||
onclick = "return savePreferences();";
|
||||
onclick = "return savePreferences(event);";
|
||||
image = "tb-compose-save-flat-24x24.png"; },
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
|
||||
@@ -783,13 +783,28 @@ function onActionDeleteClick(event) {
|
||||
event.stop();
|
||||
}
|
||||
|
||||
function savePreferences() {
|
||||
var inputs = $$("DIV#filterRules input");
|
||||
function savePreferences(event) {
|
||||
var valid = true;
|
||||
inputs.each(function(input) {
|
||||
if (input.hasClassName("_invalid"))
|
||||
valid = false;
|
||||
});
|
||||
|
||||
var rules = $$("DIV#filterRules DIV.rule");
|
||||
if (rules.length == 0) {
|
||||
onRuleAddClick(event);
|
||||
valid = false;
|
||||
}
|
||||
|
||||
var actions = $$("DIV#filterActions DIV.action");
|
||||
if (actions.length == 0) {
|
||||
onActionAddClick(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) {
|
||||
|
||||
Reference in New Issue
Block a user