autocomplete after 2 chars instead of 3; this was changed some months back to work around implementation quirks in the custom cache driver that is now disabled.
This commit is contained in:
parent
e646684493
commit
4640253614
@ -188,7 +188,7 @@ function string2bb(element) {
|
|||||||
|
|
||||||
// Autocomplete contacts
|
// Autocomplete contacts
|
||||||
contacts = {
|
contacts = {
|
||||||
match: /(^|\s)(@\!*)([^ \n]{3,})$/,
|
match: /(^|\s)(@\!*)([^ \n]{2,})$/,
|
||||||
index: 3,
|
index: 3,
|
||||||
cache: true,
|
cache: true,
|
||||||
search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels, spinelement=false); },
|
search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels, spinelement=false); },
|
||||||
@ -198,7 +198,7 @@ function string2bb(element) {
|
|||||||
|
|
||||||
// Autocomplete forums
|
// Autocomplete forums
|
||||||
forums = {
|
forums = {
|
||||||
match: /(^|\s)(\!\!*)([^ \n]{3,})$/,
|
match: /(^|\s)(\!\!*)([^ \n]{2,})$/,
|
||||||
index: 3,
|
index: 3,
|
||||||
cache: true,
|
cache: true,
|
||||||
search: function(term, callback) { contact_search(term, callback, backend_url, 'f', extra_channels, spinelement=false); },
|
search: function(term, callback) { contact_search(term, callback, backend_url, 'f', extra_channels, spinelement=false); },
|
||||||
@ -209,7 +209,7 @@ function string2bb(element) {
|
|||||||
|
|
||||||
// Autocomplete hashtags
|
// Autocomplete hashtags
|
||||||
tags = {
|
tags = {
|
||||||
match: /(^|\s)(\#)([^ \n]{3,})$/,
|
match: /(^|\s)(\#)([^ \n]{2,})$/,
|
||||||
index: 3,
|
index: 3,
|
||||||
cache: true,
|
cache: true,
|
||||||
search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
|
search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
|
||||||
@ -253,7 +253,7 @@ function string2bb(element) {
|
|||||||
|
|
||||||
// Autocomplete contacts
|
// Autocomplete contacts
|
||||||
contacts = {
|
contacts = {
|
||||||
match: /(^@)([^\n]{3,})$/,
|
match: /(^@)([^\n]{2,})$/,
|
||||||
index: 2,
|
index: 2,
|
||||||
cache: true,
|
cache: true,
|
||||||
search: function(term, callback) { contact_search(term, callback, backend_url, 'x', [], spinelement='#nav-search-spinner'); },
|
search: function(term, callback) { contact_search(term, callback, backend_url, 'x', [], spinelement='#nav-search-spinner'); },
|
||||||
@ -263,7 +263,7 @@ function string2bb(element) {
|
|||||||
|
|
||||||
// Autocomplete forums
|
// Autocomplete forums
|
||||||
forums = {
|
forums = {
|
||||||
match: /(^\!)([^\n]{3,})$/,
|
match: /(^\!)([^\n]{2,})$/,
|
||||||
index: 2,
|
index: 2,
|
||||||
cache: true,
|
cache: true,
|
||||||
search: function(term, callback) { contact_search(term, callback, backend_url, 'f', [], spinelement='#nav-search-spinner'); },
|
search: function(term, callback) { contact_search(term, callback, backend_url, 'f', [], spinelement='#nav-search-spinner'); },
|
||||||
@ -273,7 +273,7 @@ function string2bb(element) {
|
|||||||
|
|
||||||
// Autocomplete hashtags
|
// Autocomplete hashtags
|
||||||
tags = {
|
tags = {
|
||||||
match: /(^\#)([^ \n]{3,})$/,
|
match: /(^\#)([^ \n]{2,})$/,
|
||||||
index: 2,
|
index: 2,
|
||||||
cache: true,
|
cache: true,
|
||||||
search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
|
search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
|
||||||
@ -306,7 +306,7 @@ function string2bb(element) {
|
|||||||
|
|
||||||
// Autocomplete contacts
|
// Autocomplete contacts
|
||||||
contacts = {
|
contacts = {
|
||||||
match: /(^)([^\n]{3,})$/,
|
match: /(^)([^\n]{2,})$/,
|
||||||
index: 2,
|
index: 2,
|
||||||
cache: true,
|
cache: true,
|
||||||
search: function(term, callback) { contact_search(term, callback, backend_url, typ,[], spinelement=false); },
|
search: function(term, callback) { contact_search(term, callback, backend_url, typ,[], spinelement=false); },
|
||||||
@ -344,7 +344,7 @@ function string2bb(element) {
|
|||||||
|
|
||||||
// Autocomplete contacts
|
// Autocomplete contacts
|
||||||
names = {
|
names = {
|
||||||
match: /(^)([^\n]{3,})$/,
|
match: /(^)([^\n]{2,})$/,
|
||||||
index: 2,
|
index: 2,
|
||||||
cache: true,
|
cache: true,
|
||||||
search: function(term, callback) { contact_search(term, callback, backend_url, typ,[], spinelement=false); },
|
search: function(term, callback) { contact_search(term, callback, backend_url, typ,[], spinelement=false); },
|
||||||
|
Reference in New Issue
Block a user