mirror of
https://github.com/unraid/webgui.git
synced 2026-01-21 09:00:19 -06:00
Plugin manager handle edge case when plugin is already installed
This commit is contained in:
@@ -44,11 +44,12 @@ function loadlist(id) {
|
||||
$.get('/plugins/dynamix.plugin.manager/include/ShowPlugins.php',{audit:id},function(data) {
|
||||
if (id) {
|
||||
var tmp = id.split(':');
|
||||
var list = $('#plugin_list');
|
||||
var tr = 'tr#'+tmp[0].replace(/[\. _]/g,'');
|
||||
switch (tmp[1]) {
|
||||
case 'remove' : $('#plugin_list').find(tr).remove(); break;
|
||||
case 'update' : $('#plugin_list').find(tr).remove();
|
||||
case 'install': $('#plugin_list').append(data).trigger('update'); break;
|
||||
case 'remove' : list.find(tr).remove(); break;
|
||||
case 'update' : list.find(tr).remove();
|
||||
case 'install': if (!list.find(tr).length) list.append(data).trigger('update'); break;
|
||||
}
|
||||
} else {
|
||||
$('#plugin_list').html(data);
|
||||
|
||||
Reference in New Issue
Block a user