see changelog

Monotone-Parent: 0f4484bf642d11bc96f9672226ec495c99e2301f
Monotone-Revision: b7b4b1f3f729de477db90d41fee55b91ea781b02

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2008-01-14T13:57:28
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2008-01-14 13:57:28 +00:00
parent 79267d40ce
commit 2d2fcffec5
20 changed files with 1282 additions and 254 deletions

View File

@@ -236,6 +236,44 @@ Element.addMethods({
radioValue = input.value;
});
return radioValue;
},
setRadioValue: function(element, radioName, value) {
element = $(element);
var i = 0;
Form.getInputs(element, 'radio', radioName).each(function(input) {
if (i == value)
input.checked = 1;
i++;
});
},
getCheckBoxListValues: function(element, checkboxName) {
element = $(element);
var values = new Array();
var i = 0;
Form.getInputs(element, 'checkbox', checkboxName).each(function(input) {
if (input.checked)
values.push(i+1);
i++;
});
return values.join(",");
},
setCheckBoxListValues: function(element, checkboxName, values) {
element = $(element);
var v = values.split(',');
var i = 1;
Form.getInputs(element, 'checkbox', checkboxName).each(function(input) {
if ($(v).indexOf(i+"") != -1)
input.checked = 1;
i++;
});
}
});