Embed input elements into labels.
This commit is contained in:
parent
419e8775dd
commit
e7af727fa9
@ -136,8 +136,9 @@ OV.ExportDialog = class
|
||||
for (let i = 0; i < exportFormat.formats.length; i++) {
|
||||
let format = exportFormat.formats[i];
|
||||
let formatDiv = $('<div>').addClass ('ov_dialog_row').appendTo (this.formatParameters.formatSettingsDiv);
|
||||
let formatInput = $('<input>').addClass ('ov_radio_button').attr ('type', 'radio').attr ('id', format.name).attr ('name', 'format').appendTo (formatDiv);
|
||||
$('<label>').attr ('for', format.name).html (format.name).appendTo (formatDiv);
|
||||
let formatLabel = $('<label>').attr ('for', format.name).appendTo (formatDiv);
|
||||
let formatInput = $('<input>').addClass ('ov_radio_button').attr ('type', 'radio').attr ('id', format.name).attr ('name', 'format').appendTo (formatLabel);
|
||||
$('<span>').html (format.name).appendTo (formatLabel);
|
||||
if (i === 0) {
|
||||
formatInput.prop ('checked', true);
|
||||
this.formatParameters.selectedFormat = format;
|
||||
|
||||
@ -117,8 +117,9 @@ OV.SettingsSidebarPanel = class extends OV.SidebarPanel
|
||||
function AddRadioButton (contentDiv, themeId, themeName, onChange)
|
||||
{
|
||||
let row = $('<div>').addClass ('ov_sidebar_settings_row').appendTo (contentDiv);
|
||||
let radio = $('<input>').addClass ('ov_radio_button').attr ('type', 'radio').attr ('id', themeId.toString ()).attr ('name', 'theme').appendTo (row);
|
||||
$('<label>').attr ('for', themeId.toString ()).html (themeName).appendTo (row);
|
||||
let label = $('<label>').attr ('for', themeId.toString ()).appendTo (row);
|
||||
let radio = $('<input>').addClass ('ov_radio_button').attr ('type', 'radio').attr ('id', themeId.toString ()).attr ('name', 'theme').appendTo (label);
|
||||
$('<span>').html (themeName).appendTo (label);
|
||||
radio.change (() => {
|
||||
onChange (themeId);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user