diff --git a/app/assets/javascripts/posts.js b/app/assets/javascripts/posts.js index 1faa0a171..a3d5c6d6f 100644 --- a/app/assets/javascripts/posts.js +++ b/app/assets/javascripts/posts.js @@ -59,7 +59,7 @@ $("#form").appendTo(dialog); dialog.dialog({ title: "Edit tags", - width: $(window).width() / 3, + width: $(window).width() * 0.6, position: { my: "right", at: "right-20", diff --git a/app/assets/javascripts/related_tag.js b/app/assets/javascripts/related_tag.js index 742d6ce2a..20b0ca0eb 100644 --- a/app/assets/javascripts/related_tag.js +++ b/app/assets/javascripts/related_tag.js @@ -259,7 +259,11 @@ if (text.match(/^ http/)) { text = text.substring(1, 1000); var $url = $(""); - $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("target", "_blank"); $ul.append($("
").html($url));