diff --git a/archive/NerdTools-2023.03.11-x86_64-1.txz b/archive/NerdTools-2023.03.11-x86_64-1.txz new file mode 100644 index 0000000..4a9aaa9 Binary files /dev/null and b/archive/NerdTools-2023.03.11-x86_64-1.txz differ diff --git a/plugin/NerdTools.plg b/plugin/NerdTools.plg index 28c556f..d1099e1 100644 --- a/plugin/NerdTools.plg +++ b/plugin/NerdTools.plg @@ -3,8 +3,8 @@ - - + + @@ -17,8 +17,10 @@ ##&name; +###2023.03.11 +- Fixed: dependency improvements ###2023.03.06 -- Fixed: fixed PHP deprecated: +- Fixed: fixed PHP deprecated ###2023.03.05b - Initial 6.12 compatibility - Fixed: added some missing package descriptions diff --git a/source/NerdTools/usr/local/emhttp/plugins/NerdTools/include/CheckDepends.php b/source/NerdTools/usr/local/emhttp/plugins/NerdTools/include/CheckDepends.php new file mode 100644 index 0000000..cdada72 --- /dev/null +++ b/source/NerdTools/usr/local/emhttp/plugins/NerdTools/include/CheckDepends.php @@ -0,0 +1,20 @@ + diff --git a/source/NerdTools/usr/local/emhttp/plugins/NerdTools/js/jquery.NerdTools.js b/source/NerdTools/usr/local/emhttp/plugins/NerdTools/js/jquery.NerdTools.js index 5a3b42e..272f9ba 100644 --- a/source/NerdTools/usr/local/emhttp/plugins/NerdTools/js/jquery.NerdTools.js +++ b/source/NerdTools/usr/local/emhttp/plugins/NerdTools/js/jquery.NerdTools.js @@ -136,80 +136,24 @@ function Apply() { function checkDepends() { try { - - if ($('#tmux')[0].checked) { - $('#ncurses-terminfo').switchButton({ checked: true }); - $('#ncurses-terminfo', '.pkgvalue').val('yes'); - } - } catch (error) { - console.error('Error checkDepends' + error); - } - try { - if ($('#expect')[0].checked) { - $('#tcl').switchButton({ checked: true }); - $('#tcl', '.pkgvalue').val('yes'); - } - } catch (error) { - console.error('Error checkDepends' + error); - } - try { - if ($('#iotop')[0].checked) { - $('#python2').switchButton({ checked: true }); - $('#python2', '.pkgvalue').val('yes'); - $('#libffi').switchButton({ checked: true }); - $('#libffi', '.pkgvalue').val('yes'); - } - } catch (error) { - console.error('Error checkDepends' + error); - } - try { - if ($('#vim')[0].checked) { - $('#libsodium').switchButton({ checked: true }); - $('#libsodium', '.pkgvalue').val('yes'); - } - } catch (error) { - console.error('Error checkDepends' + error); - } - try { - if ($('#borgbackup')[0].checked) { - $('#python3').switchButton({ checked: true }); - $('#python3', '.pkgvalue').val('yes'); - $('#python-setuptools').switchButton({ checked: true }); - $('#python-setuptools', '.pkgvalue').val('yes'); - $('#llfuse').switchButton({ checked: true }); - $('#llfuse', '.pkgvalue').val('yes'); - } - } catch (error) { - console.error('Error checkDepends' + error); - } - try { - if ($('#irssi')[0].checked) { - $('#utf8proc').switchButton({ checked: true }); - $('#utf8proc', '.pkgvalue').val('yes'); - } - } catch (error) { - console.error('Error checkDepends' + error); - } - try { - if ($('#mediainfo')[0].checked) { - $('#libzen').switchButton({ checked: true }); - $('#libzen', '.pkgvalue').val('yes'); - $('#libmediainfo').switchButton({ checked: true }); - $('#libmediainfo', '.pkgvalue').val('yes'); - } - } catch (error) { - console.error('Error checkDepends' + error); - } - try { - if ($('#wget2')[0].checked) { - $('#gpgme').switchButton({ checked: true }); - $('#gpgme', '.pkgvalue').val('yes'); - $('#lzlib').switchButton({ checked: true }); - $('#lzlib', '.pkgvalue').val('yes'); - $('#libassuan').switchButton({ checked: true }); - $('#libassuan', '.pkgvalue').val('yes'); - } + $.getJSON('/plugins/NerdTools/include/CheckDepends.php', function(data) { + console.log(data) + $.each(data,function(index, value){ + if ($('#'+index)[0]){ + value.split(",").forEach(function (item) { + if (item && $('#'+index)[0].checked) { + $('#' + item).switchButton({ checked: true }); + $('#' + item, '.pkgvalue').val('yes'); + } + }); + } + }); + }); + } catch (error) { console.error('Error checkDepends' + error); } + + return "" + } \ No newline at end of file