Use config.relative_path instead of allcaps

v1.18.x
Peter Jaszkowiak 8 years ago
parent de6ced4e07
commit 240e958fb1

@ -1,5 +1,5 @@
"use strict"; "use strict";
/*globals define, admin, ajaxify, RELATIVE_PATH*/ /* globals socket, app, define, ajaxify, config */
define(function () { define(function () {
var search = {}; var search = {};
@ -31,7 +31,7 @@ define(function () {
.replace(/(?:\n ?)+/g, '\n'); .replace(/(?:\n ?)+/g, '\n');
return '<li role="presentation" class="result">' + return '<li role="presentation" class="result">' +
'<a role= "menuitem" href= "' + RELATIVE_PATH + '/' + namespace + '" >' + '<a role= "menuitem" href= "' + config.relative_path + '/' + namespace + '" >' +
title + title +
'<br>' + '<br>' +
'<small><code>' + '<small><code>' +
@ -68,7 +68,7 @@ define(function () {
$('#acp-search').parents('form').on('submit', function (ev) { $('#acp-search').parents('form').on('submit', function (ev) {
var firstResult = menu.find('li:first-child > a').attr('href'); var firstResult = menu.find('li:first-child > a').attr('href');
var href = firstResult ? firstResult : RELATIVE_PATH + '/search/' + input.val(); var href = firstResult ? firstResult : config.relative_path + '/search/' + input.val();
ajaxify.go(href.replace(/^\//, '')); ajaxify.go(href.replace(/^\//, ''));
@ -102,7 +102,7 @@ define(function () {
menu.find('.search-forum') menu.find('.search-forum')
.not('.divider') .not('.divider')
.find('a') .find('a')
.attr('href', RELATIVE_PATH + '/search/' + value) .attr('href', config.relative_path + '/search/' + value)
.find('strong') .find('strong')
.html(value); .html(value);
} else { } else {

Loading…
Cancel
Save