Merge pull request #1379 from ether/more-plugin-details
resolve #1349 - add url to plugin namepull/1401/head
commit
18b96b33c6
|
@ -128,3 +128,13 @@ td, th {
|
||||||
#response{
|
#response{
|
||||||
display:inline;
|
display:inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a:link, a:visited, a:hover, a:focus {
|
||||||
|
color: #333333;
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom: #333333 1px dotted;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus, a:hover {
|
||||||
|
border-bottom: #333333 1px solid;
|
||||||
|
}
|
|
@ -47,13 +47,13 @@ $(document).ready(function () {
|
||||||
$(".do-install").unbind('click').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").text());
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".do-uninstall").unbind('click').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").text());
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".do-prev-page").unbind('click').click(function (e) {
|
$(".do-prev-page").unbind('click').click(function (e) {
|
||||||
|
@ -114,7 +114,11 @@ $(document).ready(function () {
|
||||||
widget.data('total', data.total);
|
widget.data('total', data.total);
|
||||||
|
|
||||||
widget.find('.offset').html(data.query.offset);
|
widget.find('.offset').html(data.query.offset);
|
||||||
|
if (data.query.offset + data.query.limit > data.total){
|
||||||
|
widget.find('.limit').html(data.total);
|
||||||
|
}else{
|
||||||
widget.find('.limit').html(data.query.offset + data.query.limit);
|
widget.find('.limit').html(data.query.offset + data.query.limit);
|
||||||
|
}
|
||||||
widget.find('.total').html(data.total);
|
widget.find('.total').html(data.total);
|
||||||
|
|
||||||
widget.find(".results *").remove();
|
widget.find(".results *").remove();
|
||||||
|
@ -124,10 +128,13 @@ $(document).ready(function () {
|
||||||
var version = '0.0.0';
|
var version = '0.0.0';
|
||||||
// hack to access "versions" property of the npm package object
|
// hack to access "versions" property of the npm package object
|
||||||
for (version in data.results[plugin_name].versions) break;
|
for (version in data.results[plugin_name].versions) break;
|
||||||
|
|
||||||
for (attr in plugin) {
|
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[attr]+"</a>");
|
||||||
|
}else{
|
||||||
row.find("." + attr).html(plugin[attr]);
|
row.find("." + attr).html(plugin[attr]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
row.find(".version").html(version);
|
row.find(".version").html(version);
|
||||||
|
|
||||||
widget.find(".results").append(row);
|
widget.find(".results").append(row);
|
||||||
|
@ -144,8 +151,12 @@ $(document).ready(function () {
|
||||||
var row = $("#installed-plugin-template").clone();
|
var row = $("#installed-plugin-template").clone();
|
||||||
|
|
||||||
for (attr in plugin.package) {
|
for (attr in plugin.package) {
|
||||||
|
if(attr == "name"){ // Hack to rewrite URLS into name
|
||||||
|
row.find(".name").html("<a target='_blank' href='https://npmjs.org/package/"+plugin.package['name']+"'>"+plugin.package[attr]+"</a>");
|
||||||
|
}else{
|
||||||
row.find("." + attr).html(plugin.package[attr]);
|
row.find("." + attr).html(plugin.package[attr]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$("#installed-plugins").append(row);
|
$("#installed-plugins").append(row);
|
||||||
}
|
}
|
||||||
updateHandlers();
|
updateHandlers();
|
||||||
|
|
Loading…
Reference in New Issue