Commit 8c64fe10 authored by Gabriel Monnerat's avatar Gabriel Monnerat Committed by Jérome Perrin

erp5_officejs_support_request_ui: Fix code to select the first element if only one

( Also, remove the usage of document.getElementById because we should search only inside the current gadget )
( Jérome: the getElementById thing was lost in rebase. It is not critical in my understanding )
parent 029e4f80
......@@ -66,6 +66,9 @@
for (j = 0; j < sp_list.length; j += 1) {
sp_select.options[j] = new Option(sp_list[j][0], sp_list[j][1]);
}
if (sp_select.options.length === 2) {
sp_select.selectedIndex = 1;
}
});
})
.onEvent('change', function (evt) {
......
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1607511772.31</float>
<float>1607511772.32</float>
<string>GMT+1</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment