diff --git a/WebKit/css/default.css b/WebKit/css/default.css index eec1a75..76013fd 100644 --- a/WebKit/css/default.css +++ b/WebKit/css/default.css @@ -466,8 +466,12 @@ p.noresult { #new_post_container div { box-sizing: border-box; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; background: white; color: white; padding: 2px; } #new_post_container div span { background: #D8DFEA; } -#suggestions { position: absolute; left: 0; bottom: 0; } -#suggestions .active { color: red; } -#status_bar { height: 1em; } +#suggestions { width: 100%; position: absolute; left: 0; bottom: 0; background: #efefef; list-style-type: none; padding: 0; margin: 0; border-top: 1px solid #ccc; } +#suggestions li { border-top: 1px solid #fefefe; border-bottom: #c9c9c9; padding: 0 0.5em; } +#suggestions strong { font-weight: normal; color: #555; } +#suggestions .active { background: #dedede; } +#suggestions .active strong { color: black; } +#status_bar { height: 1em; border-top: 1px solid #ccc; } #status_bar p { float: right; margin: 0; padding: 0; } -#status_bar span { display: inline-block; margin: 4px 5px 0 5px; } \ No newline at end of file +#status_bar span { display: inline-block; margin: 4px 5px 0 5px; } + diff --git a/WebKit/scripts/controller/NewPost.js b/WebKit/scripts/controller/NewPost.js index 61b2f3a..6638b45 100644 --- a/WebKit/scripts/controller/NewPost.js +++ b/WebKit/scripts/controller/NewPost.js @@ -192,7 +192,7 @@ function(APICalls, HostApp) { var words = txt.match(/(^|\s)\^([^\s]+)/); var replace = words[2]; - var original = txt.replace("^" + replace, with_item.name); + var original = txt.replace("^" + replace, with_item.name + " "); this.textarea.val(original); this.mentions.push(with_item); @@ -209,11 +209,12 @@ function(APICalls, HostApp) { for (var key in this.profiles) { var item = this.profiles[key]; if((item.name.toLowerCase().indexOf(name.toLowerCase()) != -1) || item.entity.toLowerCase().indexOf(name.toLowerCase()) != -1) { - var li = $("
  • " + item.name + " " + item.entity + "
  • ") + var li = $("
  • " + item.name + "
  • ") li.get(0).item = item; this.suggestions.append(li); } } + this.suggestions.find("li:first-child").addClass("active"); } this.parseText(text); diff --git a/WebKit/scripts/controller/Profile.js b/WebKit/scripts/controller/Profile.js index 98b21bd..1315c3d 100644 --- a/WebKit/scripts/controller/Profile.js +++ b/WebKit/scripts/controller/Profile.js @@ -110,11 +110,7 @@ function(HostApp, Core, APICalls, URI) { div.appendChild(this.profile_template.following_button); this.profile_template.mention_button.onclick = function() { - var e = _this.entity; - if (e.startsWith("https://")) { - e = e.substr(8, e.length); - } - HostApp.openNewMessageWidow(null, null, "^" + e + " ", false); + HostApp.openNewMessageWidow({entity:_this.entity}); } div.appendChild(this.profile_template.mention_button); this.profile_template.mention_button.innerHTML = "Mention";