aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/admin_plugins.tpl
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-03 06:30:46 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-03 06:30:46 -0400
commit9619d02be988a5af7746fa5524b17e645f99d40d (patch)
tree1bf4cdeb30789e7eeae7e8701b7ad230557d5601 /view/tpl/admin_plugins.tpl
parent4ed5d6573c69157721d484ba0ce506788fcc8024 (diff)
downloadvolse-hubzilla-9619d02be988a5af7746fa5524b17e645f99d40d.tar.gz
volse-hubzilla-9619d02be988a5af7746fa5524b17e645f99d40d.tar.bz2
volse-hubzilla-9619d02be988a5af7746fa5524b17e645f99d40d.zip
AJAX and spinner for add repo form submission. Repo info will be displayed below the form.
Diffstat (limited to 'view/tpl/admin_plugins.tpl')
-rwxr-xr-xview/tpl/admin_plugins.tpl26
1 files changed, 25 insertions, 1 deletions
diff --git a/view/tpl/admin_plugins.tpl b/view/tpl/admin_plugins.tpl
index 3747a59f9..e10cde81d 100755
--- a/view/tpl/admin_plugins.tpl
+++ b/view/tpl/admin_plugins.tpl
@@ -10,6 +10,11 @@
{{$form}}
</div>
<div class="clear"></div>
+ <div id="chat-rotator-wrapper" class="center-block">
+ <div id="chat-rotator"></div>
+ </div>
+ <div class="clear"></div>
+ <div id="new-repo-info" class="section-content-wrapper"></div>
<div class="section-content-wrapper-np">
{{foreach $plugins as $p}}
<div class="section-content-tools-wrapper" id="pluginslist">
@@ -28,4 +33,23 @@
{{/foreach}}
</div>
-</div> \ No newline at end of file
+</div>
+
+<script>
+ function adminPluginsAddRepo() {
+ var repoURL = $('#id_repoURL').val();
+ $('#chat-rotator').spin('tiny');
+ $.post(
+ "/admin/plugins/addrepo", {repoURL: repoURL},
+ function(response) {
+ $('#chat-rotator').spin(false);
+ if (response.success) {
+ $('#new-repo-info').html('<h3>Repo Info</h3><p>The repo was cloned to<br>' + response.message + '</p>');
+ } else {
+ window.console.log('Error adding repo :' + response['message']);
+ }
+ return false;
+ },
+ 'json');
+ }
+</script> \ No newline at end of file