From 76a6b8061c6c4f07a51266c0310b91f684490270 Mon Sep 17 00:00:00 2001 From: longpanda Date: Tue, 11 Jan 2022 09:39:01 +0800 Subject: [PATCH] fix plugson page language issue --- Plugson/www/plugson_auto_install.html | 13 +++++++++---- Plugson/www/plugson_control.html | 2 +- Plugson/www/plugson_image_list.html | 2 +- Plugson/www/plugson_persistence.html | 7 +++++-- Plugson/www/plugson_theme.html | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Plugson/www/plugson_auto_install.html b/Plugson/www/plugson_auto_install.html index ec5410b9..4b3066c0 100644 --- a/Plugson/www/plugson_auto_install.html +++ b/Plugson/www/plugson_auto_install.html @@ -107,8 +107,8 @@ var id = $(this).attr('id'); var value = $(this).val(); var intval; - - if (id.length <= 16) { + + if (typeof(id) == 'undefined' || id.length <= 16) { return; } @@ -146,7 +146,7 @@ var id = $(this).attr('id'); var checked = $(this).is(':checked'); - if (id.length <= 14) { + if (typeof(id) == 'undefined' || id.length <= 14) { return; } @@ -279,7 +279,9 @@ $('input[type=text]').each(function (){ var id = $(this).attr('id'); - + if (typeof(id) == 'undefined') { + return; + } if (id.startsWith('id_text_timeout_') || id.startsWith('id_text_autosel_')) { $(this).change(OnInputTextChange); } @@ -287,6 +289,9 @@ $('input[type=checkbox]').each(function (){ var id = $(this).attr('id'); + if (typeof(id) == 'undefined') { + return; + } if (id.startsWith('id_timeout_en_') || id.startsWith('id_autosel_en_')) { $(this).click(OnCheckBoxChange); } diff --git a/Plugson/www/plugson_control.html b/Plugson/www/plugson_control.html index 60c8fc75..b6864556 100644 --- a/Plugson/www/plugson_control.html +++ b/Plugson/www/plugson_control.html @@ -1182,7 +1182,7 @@ $('input[type=radio]').each(function(){ var id = $(this).attr('id'); - if (id.startsWith('id_ctrl')) { + if (typeof(id) != 'undefined' && id.startsWith('id_ctrl')) { $(this).change(VtoySaveCurrentPage); } }); diff --git a/Plugson/www/plugson_image_list.html b/Plugson/www/plugson_image_list.html index 4fc770fe..ff538ba1 100644 --- a/Plugson/www/plugson_image_list.html +++ b/Plugson/www/plugson_image_list.html @@ -176,7 +176,7 @@ $('input[type=radio]').each(function(){ var id = $(this).attr('id'); - if (id.startsWith('id_image_list_type')) { + if (typeof(id) != 'undefined' && id.startsWith('id_image_list_type')) { $(this).change(VtoySaveCurrentPage); } }); diff --git a/Plugson/www/plugson_persistence.html b/Plugson/www/plugson_persistence.html index 03d5bea6..60e01348 100644 --- a/Plugson/www/plugson_persistence.html +++ b/Plugson/www/plugson_persistence.html @@ -108,7 +108,7 @@ var value = $(this).val(); var intval; - if (id.length <= 16) { + if (typeof(id) == 'undefined' || id.length <= 16) { return; } @@ -146,7 +146,7 @@ var id = $(this).attr('id'); var checked = $(this).is(':checked'); - if (id.length <= 14) { + if (typeof(id) == 'undefined' || id.length <= 14) { return; } @@ -280,6 +280,9 @@ $('input[type=text]').each(function (){ var id = $(this).attr('id'); + if (typeof(id) == 'undefined') { + retunrn; + } if (id.startsWith('id_text_timeout_') || id.startsWith('id_text_autosel_')) { $(this).change(OnInputTextChange); diff --git a/Plugson/www/plugson_theme.html b/Plugson/www/plugson_theme.html index 16bc9733..b30d19a0 100644 --- a/Plugson/www/plugson_theme.html +++ b/Plugson/www/plugson_theme.html @@ -299,7 +299,7 @@ $('input[type=radio]').each(function(){ var id = $(this).attr('id'); - if (id.startsWith('id_theme_file')) { + if (typeof(id) != 'undefined' && id.startsWith('id_theme_file')) { $(this).change(function() { m_data_theme[current_tab_index].default_file =parseInt(id.substr(id.length - 1)); VtoySaveCurrentPage();