From 180731c162b12f62a0065bc9ce8d537a95c98ed6 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Mon, 9 May 2016 21:17:47 -0400 Subject: copy-paste error --- view/tpl/admin_plugins.tpl | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'view') diff --git a/view/tpl/admin_plugins.tpl b/view/tpl/admin_plugins.tpl index 8ed5fd556..876681f9f 100755 --- a/view/tpl/admin_plugins.tpl +++ b/view/tpl/admin_plugins.tpl @@ -14,18 +14,19 @@
-
-

Installed Addon Repositories

+
@@ -110,6 +111,20 @@ function updateAddonRepo(repoName) { window.console.log('updateAddonRep:; ' + repoName); // TODO: Update an existing repo + if(confirm('Are you sure you want to update the addon repo ' + repoName + '?')) { + $.post( + "/admin/plugins/updaterepo", {repoName: repoName}, + function(response) { + if (response.success) { + window.console.log('Addon repo'+repoName+'successfully updated :' + response['message']); + alert('Repo updated'); + } else { + window.console.log('Error installing repo :' + response['message']); + } + return false; + }, + 'json'); + } } function switchAddonRepoBranch(repoName) { window.console.log('switchAddonRepoBranch: ' + repoName); @@ -117,20 +132,20 @@ } function removeAddonRepo(repoName) { window.console.log('removeAddonRepo: ' + repoName); - // TODO: Unlink the addons and delete the addon repo + // TODO: Unlink the addons if(confirm('Are you sure you want to remove the addon repo ' + repoName + '?')) { $.post( "/admin/plugins/removerepo", {repoName: repoName}, function(response) { if (response.success) { window.console.log('Addon repo'+repoName+'successfully removed :' + response['message']); + alert('Repo deleted'); } else { window.console.log('Error installing repo :' + response['message']); } return false; }, 'json'); - //alert('Deleted'); } } -- cgit v1.2.3