|
|
@ -1,6 +1,6 @@
|
|
|
|
'use strict';
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
/* globals app, define, utils, socket*/
|
|
|
|
/* globals app, define, utils*/
|
|
|
|
|
|
|
|
|
|
|
|
define('forum/search', ['search', 'autocomplete'], function(searchModule, autocomplete) {
|
|
|
|
define('forum/search', ['search', 'autocomplete'], function(searchModule, autocomplete) {
|
|
|
|
var Search = {};
|
|
|
|
var Search = {};
|
|
|
@ -67,7 +67,7 @@ define('forum/search', ['search', 'autocomplete'], function(searchModule, autoco
|
|
|
|
|
|
|
|
|
|
|
|
function fillOutForm() {
|
|
|
|
function fillOutForm() {
|
|
|
|
var params = utils.params();
|
|
|
|
var params = utils.params();
|
|
|
|
var searchData = getSearchPreferences();
|
|
|
|
var searchData = searchModule.getSearchPreferences();
|
|
|
|
params = utils.merge(searchData, params);
|
|
|
|
params = utils.merge(searchData, params);
|
|
|
|
|
|
|
|
|
|
|
|
if (params) {
|
|
|
|
if (params) {
|
|
|
@ -156,14 +156,6 @@ define('forum/search', ['search', 'autocomplete'], function(searchModule, autoco
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getSearchPreferences() {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
return JSON.parse(localStorage.getItem('search-preferences'));
|
|
|
|
|
|
|
|
} catch(e) {
|
|
|
|
|
|
|
|
return {};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function enableAutoComplete() {
|
|
|
|
function enableAutoComplete() {
|
|
|
|
autocomplete.user($('#posted-by-user'));
|
|
|
|
autocomplete.user($('#posted-by-user'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|