aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-10 06:28:00 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-10 06:28:00 -0400
commit78b40e6363d422727bb716f5e72983291c75d217 (patch)
tree8267b5452fb67e8a105d669a8c867a146f14d24b /view
parent45c19e365d8b73c8623f5d1c65b528cd628374a5 (diff)
downloadvolse-hubzilla-78b40e6363d422727bb716f5e72983291c75d217.tar.gz
volse-hubzilla-78b40e6363d422727bb716f5e72983291c75d217.tar.bz2
volse-hubzilla-78b40e6363d422727bb716f5e72983291c75d217.zip
Delete existing repo if the new one has a different URL. Fixed bug that could cause repeated installation.
Diffstat (limited to 'view')
-rwxr-xr-xview/tpl/admin_plugins.tpl12
1 files changed, 8 insertions, 4 deletions
diff --git a/view/tpl/admin_plugins.tpl b/view/tpl/admin_plugins.tpl
index 3265a534c..186cb052d 100755
--- a/view/tpl/admin_plugins.tpl
+++ b/view/tpl/admin_plugins.tpl
@@ -50,7 +50,12 @@
{{$newRepoModal}}
<script>
+ // TODO: Implement a simple interface controller that reconfigures the modal dialog
+ // for each action in a more organized way
+
function adminPluginsAddRepo() {
+ $("#generic-modal-ok-{{$newRepoModalID}}").removeClass('btn-success');
+ $("#generic-modal-ok-{{$newRepoModalID}}").addClass('btn-primary');
var repoURL = $('#id_repoURL').val();
var repoName = $('#id_repoName').val();
$('#chat-rotator').spin('tiny');
@@ -65,6 +70,7 @@
modalBody.append('<h4>Branches</h4><p>'+JSON.stringify(response.repo.branches)+'</p>');
modalBody.append('<h4>Remotes</h4><p>'+JSON.stringify(response.repo.remote)+'</p>');
$('.modal-dialog').width('80%');
+ $("#generic-modal-ok-{{$newRepoModalID}}").off('click');
$("#generic-modal-ok-{{$newRepoModalID}}").click(function () {
installAddonRepo();
});
@@ -78,7 +84,6 @@
}
function installAddonRepo() {
- // TODO: Link store/git/sys/reponame to /extend/addon/ and run util/add_addon_repo script
var repoURL = $('#id_repoURL').val();
var repoName = $('#id_repoName').val();
$.post(
@@ -93,6 +98,8 @@
$('.modal-dialog').width('80%');
//$("#generic-modal-cancel-{{$newRepoModalID}}").hide();
$("#generic-modal-ok-{{$newRepoModalID}}").html('OK');
+ $("#generic-modal-ok-{{$newRepoModalID}}").removeClass('btn-primary');
+ $("#generic-modal-ok-{{$newRepoModalID}}").addClass('btn-success');
$("#generic-modal-ok-{{$newRepoModalID}}").off('click');
$("#generic-modal-ok-{{$newRepoModalID}}").click(function () {
$('#generic-modal-{{$newRepoModalID}}').modal('hide');
@@ -111,8 +118,6 @@
'json');
}
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},
@@ -135,7 +140,6 @@
}
function removeAddonRepo(repoName) {
- window.console.log('removeAddonRepo: ' + repoName);
// TODO: Unlink the addons
if(confirm('Are you sure you want to remove the addon repo ' + repoName + '?')) {
$.post(