truncate artist urls on display
This commit is contained in:
@@ -59,7 +59,7 @@
|
|||||||
$("#form").appendTo(dialog);
|
$("#form").appendTo(dialog);
|
||||||
dialog.dialog({
|
dialog.dialog({
|
||||||
title: "Edit tags",
|
title: "Edit tags",
|
||||||
width: $(window).width() / 3,
|
width: $(window).width() * 0.6,
|
||||||
position: {
|
position: {
|
||||||
my: "right",
|
my: "right",
|
||||||
at: "right-20",
|
at: "right-20",
|
||||||
|
|||||||
@@ -259,7 +259,11 @@
|
|||||||
if (text.match(/^ http/)) {
|
if (text.match(/^ http/)) {
|
||||||
text = text.substring(1, 1000);
|
text = text.substring(1, 1000);
|
||||||
var $url = $("<a/>");
|
var $url = $("<a/>");
|
||||||
$url.text(text);
|
var desc = text.replace(/^https?:\/\//, "");
|
||||||
|
if (desc.length > 30) {
|
||||||
|
desc = desc.substring(0, 30) + "...";
|
||||||
|
}
|
||||||
|
$url.text(desc);
|
||||||
$url.attr("href", text);
|
$url.attr("href", text);
|
||||||
$url.attr("target", "_blank");
|
$url.attr("target", "_blank");
|
||||||
$ul.append($("<li/>").html($url));
|
$ul.append($("<li/>").html($url));
|
||||||
|
|||||||
Reference in New Issue
Block a user