From d9a5b11c9a1b5e400e83130306bd375b22887201 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Thu, 26 Jan 2017 21:20:15 -0500 Subject: Fixed numerous bugs with the addon repo management GUI. Only show Manage Repos button if webserver has write permission on extend/addon/. --- view/tpl/admin_plugins.tpl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'view') diff --git a/view/tpl/admin_plugins.tpl b/view/tpl/admin_plugins.tpl index 993a4dea2..4360aa30c 100755 --- a/view/tpl/admin_plugins.tpl +++ b/view/tpl/admin_plugins.tpl @@ -1,8 +1,10 @@
+ {{if $allowManageRepos}}
+ {{/if}}

{{$title}} - {{$page}}

@@ -18,7 +20,7 @@ {{foreach $addonrepos as $repo}} - {{$repo.name}} + {{$repo.name}} @@ -139,10 +141,20 @@ function(response) { if (response.success) { window.console.log('Addon repo '+repoName+' successfully updated :' + response['message']); - alert('Addon repo updated.'); + //alert('Addon repo updated.'); + $('#update-message-' + repoName).css('background-color', 'yellow'); + $('#update-message-' + repoName).html('Repo updated!'); + setTimeout(function () { + $('#update-message-' + repoName).html(''); + }, 60000); } else { window.console.log('Error updating repo :' + response['message']); - alert('Error updating addon repo!'); + //alert('Error updating addon repo!'); + $('#update-message-' + repoName).css('background-color', 'red'); + $('#update-message-' + repoName).html('Error updating repo!'); + setTimeout(function () { + $('#update-message-' + repoName).html(''); + }, 60000); } return false; }, -- cgit v1.2.3