mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-25 23:09:29 +00:00
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:
@@ -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++;
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user