summaryrefslogtreecommitdiff
path: root/src/static/js/admin
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2013-03-26 18:39:46 +0100
committerMarcel Klehr <mklehr@gmx.net>2013-03-26 18:39:46 +0100
commitf75a839cd093480684f2a0790b67dd9bd7324197 (patch)
treedcb1a8ec6974b2f6a2fa2f177fa59461aebee72a /src/static/js/admin
parent7edfff75743a876d94411e9a1313a8f19777502c (diff)
downloadetherpad-lite-f75a839cd093480684f2a0790b67dd9bd7324197.zip
Remove plugin prefix in pluin lists and make links to plugins more clear
Diffstat (limited to 'src/static/js/admin')
-rw-r--r--src/static/js/admin/plugins.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/static/js/admin/plugins.js b/src/static/js/admin/plugins.js
index f640ed83..21edee6b 100644
--- a/src/static/js/admin/plugins.js
+++ b/src/static/js/admin/plugins.js
@@ -51,13 +51,14 @@ $(document).ready(function () {
for (attr in plugin) {
if(attr == "name"){ // Hack to rewrite URLS into name
- row.find(".name").html("<a target='_blank' href='https://npmjs.org/package/"+plugin['name']+"'>"+plugin['name']+"</a>");
+ row.find(".name").html("<a target='_blank' href='https://npmjs.org/package/"+plugin['name']+"'>"+plugin['name'].substr(3)+"</a>"); // remove 'ep_'
}else{
row.find("." + attr).html(plugin[attr]);
}
}
row.find(".version").html( plugin.version );
row.addClass(plugin.name)
+ row.data('plugin', plugin.name)
container.append(row);
})
updateHandlers();
@@ -83,7 +84,7 @@ $(document).ready(function () {
// update & install
$(".do-install, .do-update").unbind('click').click(function (e) {
var $row = $(e.target).closest("tr")
- , plugin = $row.find(".name").text();
+ , plugin = $row.data('plugin');
$row.remove().appendTo('#installed-plugins')
socket.emit("install", plugin);
installed.progress.show(plugin, 'Installing')
@@ -93,7 +94,7 @@ $(document).ready(function () {
// uninstall
$(".do-uninstall").unbind('click').click(function (e) {
var $row = $(e.target).closest("tr")
- , pluginName = $row.find(".name").text();
+ , pluginName = $row.data('plugin');
socket.emit("uninstall", pluginName);
installed.progress.show(pluginName, 'Uninstalling')
installed.list = installed.list.filter(function(plugin) {