Bugfixes for plugin installer

This commit is contained in:
Egil Moeller 2012-03-21 19:28:39 +01:00
parent 7304a9ef3f
commit 1ca12b24e6
2 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ exports.search = function(pattern, cb) {
if (er) return cb(er); if (er) return cb(er);
var res = {}; var res = {};
for (key in data) { for (key in data) {
if (/*key.indexOf(plugins.prefix) == 0 &&*/ key.indexOf(pattern) != -1) if (key.indexOf(plugins.prefix) == 0 && key.indexOf(pattern) != -1)
res[key] = data[key]; res[key] = data[key];
} }
cb(null, {results:res}); cb(null, {results:res});

View File

@ -60,22 +60,22 @@
var doUpdate = false; var doUpdate = false;
function updateHandlers() { function updateHandlers() {
$("#progress.dialog .close").click(function () { $("#progress.dialog .close").unbind('click').click(function () {
$("#progress.dialog").hide(); $("#progress.dialog").hide();
}); });
$("#do-search").click(function () { $("#do-search").unbind('click').click(function () {
if ($("#search-query")[0].value != "") if ($("#search-query")[0].value != "")
socket.emit("search", $("#search-query")[0].value); socket.emit("search", $("#search-query")[0].value);
}); });
$(".do-install").click(function (e) { $(".do-install").unbind('click').click(function (e) {
var row = $(e.target).closest("tr"); var row = $(e.target).closest("tr");
doUpdate = true; doUpdate = true;
socket.emit("install", row.find(".name").html()); socket.emit("install", row.find(".name").html());
}); });
$(".do-uninstall").click(function (e) { $(".do-uninstall").unbind('click').click(function (e) {
var row = $(e.target).closest("tr"); var row = $(e.target).closest("tr");
doUpdate = true; doUpdate = true;
socket.emit("uninstall", row.find(".name").html()); socket.emit("uninstall", row.find(".name").html());