mirror of
https://github.com/unraid/webgui.git
synced 2026-04-26 12:20:42 -05:00
fix: improve label handling in Syslinux.page for better layout consistency
- Updated the label selection in the prepareMenu function to clone labels and remove input elements, ensuring cleaner text extraction. - This change enhances the layout consistency across the Syslinux configuration interface.
This commit is contained in:
@@ -48,8 +48,11 @@ function prepareMenu(form) {
|
||||
$('input[name="#arg[1]"]').val(form.boot.checked?1:0);
|
||||
if ($('div.basic').is(':visible')) {
|
||||
var label = [], area = [];
|
||||
$(form).find('span[id^=label]').each(function(){
|
||||
label.push($(this).text());
|
||||
$(form).find('label[id^=label]').each(function(){
|
||||
var $label = $(this).clone();
|
||||
$label.find('input').remove();
|
||||
var labelText = $label.text().replace(/\s+/g, ' ').trim();
|
||||
label.push(labelText);
|
||||
});
|
||||
$(form).find('textarea.menu').each(function(i){
|
||||
var start = $('#input-'+i).prop('checked') ? menu+'\n' : '';
|
||||
@@ -186,6 +189,7 @@ $(function(){
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/bootmode">
|
||||
<input type="hidden" name="#arg[1]" value="">
|
||||
<input type="hidden" name="text" value="">
|
||||
|
||||
<div markdown="1" class="basic">
|
||||
_(Syslinux configuration)_:
|
||||
: <?$i=0;
|
||||
|
||||
Reference in New Issue
Block a user