big @mentions update

1. switched from autocomplete.js to jquery-textcomplete
2. style update
3. Allow mentioning by ign OR display name
4. display names can be two words and separated by a space
5. display names can be all characters, except a few special ones (punctuation etc)
6. Wildcard characters are escaped in SQL
7. Suggestions are html escaped
8. Suggestions have a timeout of 300ms, so the query is made after you stopped typing
This commit is contained in:
jomo
2015-01-25 23:47:38 +01:00
parent 31dcf02083
commit 75a7f4499a
8 changed files with 75 additions and 658 deletions

View File

@@ -3,4 +3,5 @@
*= require style.css
*= require mobi.css
*= require highlight/default.css
*= require jquery-textcomplete
*/

View File

@@ -485,20 +485,24 @@ blockquote p {
display: none;
padding: 4em 1em 1em;
}
}
}
.suggestions {
background: #ddd;
padding: 0.5em;
ul.dropdown-menu {
background-color: #fff;
border: none;
border-radius: 4px;
.name {
display: inline-block;
font-style: italic;
padding: 1px 2px;
margin-right: 1em;
border: 1px solid #6cf;
border-radius: 4px;
font-weight: bold;
}
li.textcomplete-item {
padding: 0.5em 1em;
border: none;
&.active, &:hover {
background-color: #6cf;
}
a {
color: #000;
}
}
}