mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-07 01:15:09 +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:
@@ -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