adjust paths for search

This commit is contained in:
Morris Jobke 2015-01-13 16:42:04 +01:00
parent a836479287
commit dc17019536
4 changed files with 7 additions and 7 deletions

View File

@ -23,6 +23,6 @@
"config.js", "config.js",
"multiselect.js", "multiselect.js",
"oc-requesttoken.js", "oc-requesttoken.js",
"../../search/js/search.js" "../search/js/search.js"
] ]
} }

View File

@ -74,7 +74,7 @@ var OC={
config: window.oc_config, config: window.oc_config,
appConfig: window.oc_appconfig || {}, appConfig: window.oc_appconfig || {},
theme: window.oc_defaults || {}, theme: window.oc_defaults || {},
coreApps:['', 'admin','log','search','settings','core','3rdparty'], coreApps:['', 'admin','log','core/search','settings','core','3rdparty'],
menuSpeed: 100, menuSpeed: 100,
/** /**

View File

@ -22,8 +22,8 @@ $application->registerRoutes($this, array('routes' => array(
/** @var $this OCP\Route\IRouter */ /** @var $this OCP\Route\IRouter */
// Core ajax actions // Core ajax actions
// Search // Search
$this->create('search_ajax_search', '/search/ajax/search.php') $this->create('search_ajax_search', '/core/search')
->actionInclude('search/ajax/search.php'); ->actionInclude('core/search/ajax/search.php');
// AppConfig // AppConfig
$this->create('core_ajax_appconfig', '/core/ajax/appconfig.php') $this->create('core_ajax_appconfig', '/core/ajax/appconfig.php')
->actionInclude('core/ajax/appconfig.php'); ->actionInclude('core/ajax/appconfig.php');

View File

@ -97,7 +97,7 @@
*/ */
this.search = function(query, inApps, page, size) { this.search = function(query, inApps, page, size) {
if (query) { if (query) {
OC.addStyle('search','results'); OC.addStyle('core/search','results');
if (typeof page !== 'number') { if (typeof page !== 'number') {
page = 1; page = 1;
} }
@ -128,7 +128,7 @@
$status.html(t('core', 'Searching other places')+'<img class="spinner" alt="search in progress" src="'+OC.webroot+'/core/img/loading.gif" />'); $status.html(t('core', 'Searching other places')+'<img class="spinner" alt="search in progress" src="'+OC.webroot+'/core/img/loading.gif" />');
// do the actual search query // do the actual search query
$.getJSON(OC.generateUrl('search/ajax/search.php'), {query:query, inApps:inApps, page:page, size:size }, function(results) { $.getJSON(OC.generateUrl('core/search'), {query:query, inApps:inApps, page:page, size:size }, function(results) {
lastResults = results; lastResults = results;
if (page === 1) { if (page === 1) {
showResults(results); showResults(results);
@ -364,7 +364,7 @@ $(document).ready(function() {
$('#app-content') $('#app-content')
.append($searchResults) .append($searchResults)
.find('.viewcontainer').css('min-height', 'initial'); .find('.viewcontainer').css('min-height', 'initial');
$searchResults.load(OC.webroot + '/search/templates/part.results.html', function () { $searchResults.load(OC.webroot + '/core/search/templates/part.results.html', function () {
OC.Search = new OCA.Search($('#searchbox'), $('#searchresults')); OC.Search = new OCA.Search($('#searchbox'), $('#searchresults'));
}); });
}); });