You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/07/31 23:43:00 UTC
[10/51] [abbrv] futon commit: updated refs/heads/import-master to
53a86dd
add `uninstall()`, removed unneeded aplication:load() cruft
Project: http://git-wip-us.apache.org/repos/asf/couchdb-futon/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-futon/commit/5af2e1cf
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-futon/tree/5af2e1cf
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-futon/diff/5af2e1cf
Branch: refs/heads/import-master
Commit: 5af2e1cfa9f50798ec61ab979a6e07790d00cdc8
Parents: 4bfd2ff
Author: Jan Lehnardt <ja...@apache.org>
Authored: Fri Aug 2 22:06:02 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Thu Oct 3 16:08:36 2013 +0200
----------------------------------------------------------------------
plugins.html | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-futon/blob/5af2e1cf/plugins.html
----------------------------------------------------------------------
diff --git a/plugins.html b/plugins.html
index b42ed2e..e7ffc26 100644
--- a/plugins.html
+++ b/plugins.html
@@ -69,21 +69,24 @@ specific language governing permissions and limitations under the License.
$.get("/_config/plugins/" + name + "/", function(body, textStatus) {
body = JSON.parse(body);
if(body == version) {
- button.html("Already Installed");
+ button.html('Already Installed. Click to Uninstall');
+ button.data('delete', true);
} else {
- button.html("Other Version Installed: " + body);
+ button.html('Other Version Installed: ' + body);
+ button.attr('disabled', true);
}
- button.attr("disabled", true);
});
});
$('.install-plugin').click(function(event) {
var button = $(this);
+ var delete_plugin = button.data('delete') || false;
var plugin_spec = JSON.stringify({
name: button.data('name'),
url: button.data('url'),
version: button.data('version'),
- checksums: button.data('checksums')
+ checksums: button.data('checksums'),
+ "delete": delete_plugin
});
var url = '/_plugins'
$.ajax({
@@ -95,8 +98,9 @@ specific language governing permissions and limitations under the License.
processData: false, // keep our precious JSON
success: function(data, textStatus, jqXhr) {
if(textStatus == "success") {
- button.html("Sucessfully Installed");
- button.attr("disabled", true);
+ var action = delete_plugin ? 'Uninstalled' : 'Installed';
+ button.html('Sucessfully ' + action);
+ button.attr('disabled', true);
} else {
button.html(textStatus);
}