Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/fulltextsearch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2018-01-06 20:14:31 +0300
committerGitHub <noreply@github.com>2018-01-06 20:14:31 +0300
commit394dcf8c6e593045e91d0ab60fc89844cb39eb95 (patch)
tree39cb3d1c2c380d1fd18ede60dfb7c643fff7b812 /js
parent24fa7bc774eac26e6a3a9368b133540293e60783 (diff)
parenta96d771619886d792448b1ec1436661a2293eb7f (diff)
Merge pull request #228 from nextcloud/rename
rename
Diffstat (limited to 'js')
-rw-r--r--js/admin.elements.js35
-rw-r--r--js/admin.js25
-rw-r--r--js/admin.settings.js42
-rw-r--r--js/fulltextsearch.v1.api.js (renamed from js/nextsearch.v1.api.js)11
-rw-r--r--js/fulltextsearch.v1.js (renamed from js/nextsearch.v1.js)29
-rw-r--r--js/fulltextsearch.v1.navigation.js (renamed from js/nextsearch.v1.navigation.js)45
-rw-r--r--js/fulltextsearch.v1.result.js (renamed from js/nextsearch.v1.result.js)21
-rw-r--r--js/fulltextsearch.v1.searchbar.js (renamed from js/nextsearch.v1.searchbar.js)41
-rw-r--r--js/fulltextsearch.v1.settings.js (renamed from js/nextsearch.v1.settings.js)25
-rw-r--r--js/navigate.js (renamed from js/fullnextsearch.js)17
-rw-r--r--js/personal.js0
11 files changed, 141 insertions, 150 deletions
diff --git a/js/admin.elements.js b/js/admin.elements.js
index 777e255..884930f 100644
--- a/js/admin.elements.js
+++ b/js/admin.elements.js
@@ -1,11 +1,11 @@
/*
- * FullNextSearch - Full Text Search your Nextcloud.
+ * FullTextSearch - Full text search framework for Nextcloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Maxence Lange <maxence@artificial-owl.com>
- * @copyright 2017
+ * @copyright 2018
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -21,33 +21,32 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- *
*/
/** global: OCA */
-/** global: fns_admin_settings */
+/** global: fts_admin_settings */
-var fns_admin_elements = {
- fns_div: null,
- fns_platforms: null,
- fns_chunkSize: null,
- fns_providers: null,
+var fts_admin_elements = {
+ fts_div: null,
+ fts_platforms: null,
+ fts_chunkSize: null,
+ fts_providers: null,
init: function () {
- fns_admin_elements.fns_div = $('#fns');
- fns_admin_elements.fns_platforms = $('#fns_platforms');
- fns_admin_elements.fns_chunkSize = $('#fns_chunk_size');
+ fts_admin_elements.fts_div = $('#fns');
+ fts_admin_elements.fts_platforms = $('#fts_platforms');
+ fts_admin_elements.fts_chunkSize = $('#fts_chunk_size');
- fns_admin_elements.fns_platforms.on('change', function () {
- fns_admin_settings.tagSettingsAsNotSaved($(this));
- fns_admin_settings.saveSettings();
+ fts_admin_elements.fts_platforms.on('change', function () {
+ fts_admin_settings.tagSettingsAsNotSaved($(this));
+ fts_admin_settings.saveSettings();
});
- fns_admin_elements.fns_chunkSize.on('input', function () {
- fns_admin_settings.tagSettingsAsNotSaved($(this));
+ fts_admin_elements.fts_chunkSize.on('input', function () {
+ fts_admin_settings.tagSettingsAsNotSaved($(this));
}).blur(function () {
- fns_admin_settings.saveSettings();
+ fts_admin_settings.saveSettings();
});
}
};
diff --git a/js/admin.js b/js/admin.js
index 611d3d7..4e86549 100644
--- a/js/admin.js
+++ b/js/admin.js
@@ -1,11 +1,11 @@
/*
- * FullNextSearch - Full Text Search your Nextcloud.
+ * FullTextSearch - Full text search framework for Nextcloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Maxence Lange <maxence@artificial-owl.com>
- * @copyright 2017
+ * @copyright 2018
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -21,12 +21,11 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- *
*/
/** global: OCA */
-/** global: fns_admin_settings */
-/** global: fns_admin_elements */
+/** global: fts_admin_settings */
+/** global: fts_admin_elements */
@@ -34,17 +33,17 @@ $(document).ready(function () {
/**
- * @constructs NextSearchAdmin
+ * @constructs FullTextSearchAdmin
*/
- var NextSearchAdmin = function () {
- $.extend(NextSearchAdmin.prototype, fns_admin_elements);
- $.extend(NextSearchAdmin.prototype, fns_admin_settings);
+ var FullTextSearchAdmin = function () {
+ $.extend(FullTextSearchAdmin.prototype, fts_admin_elements);
+ $.extend(FullTextSearchAdmin.prototype, fts_admin_settings);
- fns_admin_elements.init();
- fns_admin_settings.refreshSettingPage();
+ fts_admin_elements.init();
+ fts_admin_settings.refreshSettingPage();
};
- OCA.NextSearchAdmin = NextSearchAdmin;
- OCA.NextSearchAdmin.settings = new NextSearchAdmin();
+ OCA.FullTextSearchAdmin = FullTextSearchAdmin;
+ OCA.FullTextSearchAdmin.settings = new FullTextSearchAdmin();
});
diff --git a/js/admin.settings.js b/js/admin.settings.js
index 11e83d0..5870572 100644
--- a/js/admin.settings.js
+++ b/js/admin.settings.js
@@ -1,11 +1,11 @@
/*
- * FullNextSearch - Full Text Search your Nextcloud.
+ * FullTextSearch - Full text search framework for Nextcloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Maxence Lange <maxence@artificial-owl.com>
- * @copyright 2017
+ * @copyright 2018
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,7 @@
*/
/** global: OC */
-/** global: fns_admin_elements */
+/** global: fts_admin_elements */
/** @namespace result.index_chunk */
/** @namespace result.platforms_all */
@@ -34,7 +34,7 @@
-var fns_admin_settings = {
+var fts_admin_settings = {
config: null,
@@ -42,9 +42,9 @@ var fns_admin_settings = {
$.ajax({
method: 'GET',
- url: OC.generateUrl('/apps/fullnextsearch/admin/settings')
+ url: OC.generateUrl('/apps/fulltextsearch/admin/settings')
}).done(function (res) {
- fns_admin_settings.updateSettingPage(res);
+ fts_admin_settings.updateSettingPage(res);
});
},
@@ -52,19 +52,19 @@ var fns_admin_settings = {
updateSettingPage: function (result) {
- fns_admin_settings.updateSettingPagePlatforms(result);
- fns_admin_settings.updateSettingPageChunkSize(result);
+ fts_admin_settings.updateSettingPagePlatforms(result);
+ fts_admin_settings.updateSettingPageChunkSize(result);
- fns_admin_settings.updateCurrentPlatform(result);
- fns_admin_settings.updateEnabledProviders(result);
+ fts_admin_settings.updateCurrentPlatform(result);
+ fts_admin_settings.updateEnabledProviders(result);
- fns_admin_settings.tagSettingsAsSaved(fns_admin_elements.fns_div);
+ fts_admin_settings.tagSettingsAsSaved(fts_admin_elements.fts_div);
},
updateSettingPagePlatforms: function (result) {
- fns_admin_elements.fns_platforms.empty();
- fns_admin_elements.fns_platforms.append($('<option>', {
+ fts_admin_elements.fts_platforms.empty();
+ fts_admin_elements.fts_platforms.append($('<option>', {
value: '',
text: ''
}));
@@ -73,7 +73,7 @@ var fns_admin_settings = {
var classes = Object.keys(platforms);
for (var i = 0; i < classes.length; i++) {
var platformClass = classes[i];
- fns_admin_elements.fns_platforms.append($('<option>', {
+ fts_admin_elements.fts_platforms.append($('<option>', {
value: platformClass,
selected: (result.search_platform === platformClass),
text: platforms[platformClass].name
@@ -83,13 +83,13 @@ var fns_admin_settings = {
});
}
- fns_admin_elements.fns_platforms.fadeTo(300, 1);
+ fts_admin_elements.fts_platforms.fadeTo(300, 1);
},
updateSettingPageChunkSize: function (result) {
- fns_admin_elements.fns_chunkSize.val(result.index_chunk);
- fns_admin_elements.fns_chunkSize.fadeTo(300, 1);
+ fts_admin_elements.fts_chunkSize.val(result.index_chunk);
+ fts_admin_elements.fts_chunkSize.fadeTo(300, 1);
},
@@ -138,18 +138,18 @@ var fns_admin_settings = {
saveSettings: function () {
var data = {
- search_platform: fns_admin_elements.fns_platforms.val(),
- index_chunk: fns_admin_elements.fns_chunkSize.val()
+ search_platform: fts_admin_elements.fts_platforms.val(),
+ index_chunk: fts_admin_elements.fts_chunkSize.val()
};
$.ajax({
method: 'POST',
- url: OC.generateUrl('/apps/fullnextsearch/admin/settings'),
+ url: OC.generateUrl('/apps/fulltextsearch/admin/settings'),
data: {
data: data
}
}).done(function (res) {
- fns_admin_settings.updateSettingPage(res);
+ fts_admin_settings.updateSettingPage(res);
});
}
diff --git a/js/nextsearch.v1.api.js b/js/fulltextsearch.v1.api.js
index ece1a83..1cc826e 100644
--- a/js/nextsearch.v1.api.js
+++ b/js/fulltextsearch.v1.api.js
@@ -1,11 +1,11 @@
/*
- * FullNextSearch - Full Text Search your Nextcloud.
+ * FullTextSearch - Full text search framework for Nextcloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Maxence Lange <maxence@artificial-owl.com>
- * @copyright 2017
+ * @copyright 2018
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -21,12 +21,11 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- *
*/
/** global: OC */
-/** global: next_settings */
+/** global: settings */
/** global: result */
/** global: search */
/** global: nav */
@@ -40,7 +39,7 @@ var api = {
$.ajax({
method: 'GET',
- url: OC.generateUrl('/apps/fullnextsearch/v1/search'),
+ url: OC.generateUrl('/apps/fulltextsearch/v1/search'),
data: {
request: JSON.stringify(request)
}
@@ -60,7 +59,7 @@ var api = {
$.ajax({
method: 'GET',
- url: OC.generateUrl('/apps/fullnextsearch/options/' + providerId)
+ url: OC.generateUrl('/apps/fulltextsearch/options/' + providerId)
}).done(function (res) {
searchbar.onOptionsLoaded(res);
api.onCallback(callback, res);
diff --git a/js/nextsearch.v1.js b/js/fulltextsearch.v1.js
index 5c742c9..d956088 100644
--- a/js/nextsearch.v1.js
+++ b/js/fulltextsearch.v1.js
@@ -1,11 +1,11 @@
/*
- * FullNextSearch - Full Text Search your Nextcloud.
+ * FullTextSearch - Full text search framework for Nextcloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Maxence Lange <maxence@artificial-owl.com>
- * @copyright 2017
+ * @copyright 2018
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -21,11 +21,10 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- *
*/
/** global: OCA */
-/** global: next_settings */
+/** global: settings */
/** global: searchbar */
/** global: result */
/** global: nav */
@@ -35,20 +34,20 @@
(function () {
/**
- * @constructs NextSearch
+ * @constructs FullTextSearch
*/
- var NextSearch = function () {
- $.extend(NextSearch.prototype, next_settings);
- $.extend(NextSearch.prototype, result);
- $.extend(NextSearch.prototype, searchbar);
- $.extend(NextSearch.prototype, nav);
- $.extend(NextSearch.prototype, api);
+ var FullTextSearch = function () {
+ $.extend(FullTextSearch.prototype, settings);
+ $.extend(FullTextSearch.prototype, result);
+ $.extend(FullTextSearch.prototype, searchbar);
+ $.extend(FullTextSearch.prototype, nav);
+ $.extend(FullTextSearch.prototype, api);
- next_settings.generateDefaultTemplate();
- next_settings.generateNoResultDiv();
+ settings.generateDefaultTemplate();
+ settings.generateNoResultDiv();
};
- OCA.NextSearch = NextSearch;
- OCA.NextSearch.api = new NextSearch();
+ OCA.FullTextSearch = FullTextSearch;
+ OCA.FullTextSearch.api = new FullTextSearch();
})();
diff --git a/js/nextsearch.v1.navigation.js b/js/fulltextsearch.v1.navigation.js
index 71e2d45..98a3284 100644
--- a/js/nextsearch.v1.navigation.js
+++ b/js/fulltextsearch.v1.navigation.js
@@ -1,11 +1,11 @@
/*
- * FullNextSearch - Full Text Search your Nextcloud.
+ * FullTextSearch - Full text search framework for Nextcloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Maxence Lange <maxence@artificial-owl.com>
- * @copyright 2017
+ * @copyright 2018
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -21,14 +21,13 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- *
*/
/** global: OCA */
/** global: api */
/** global: search */
/** global: result */
-/** global: next_settings */
+/** global: settings */
@@ -119,8 +118,8 @@ var nav = {
precItem.after(divResult);
}
- divResult.slideDown(next_settings.delay_result, function () {
- $(this).children('.result_template').fadeTo(next_settings.delay_result, 1);
+ divResult.slideDown(settings.delay_result, function () {
+ $(this).children('.result_template').fadeTo(settings.delay_result, 1);
});
precItem = divResult;
@@ -134,8 +133,8 @@ var nav = {
var entry = oldResult[i];
if (result.getResultIndex(entry.id, newResult) === -1) {
var divResult = nav.getDivResult(entry.id, divProviderResult);
- divResult.fadeTo(next_settings.delay_result, 0, function () {
- $(this).slideUp(next_settings.delay_result, function () {
+ divResult.fadeTo(settings.delay_result, 0, function () {
+ $(this).slideUp(settings.delay_result, function () {
$(this).remove();
});
});
@@ -168,12 +167,12 @@ var nav = {
var divResult = nav.getDivResult(entryId, divProviderResult);
if (precId === '') {
- divResult.fadeTo(next_settings.delay_result, 0.35, function () {
+ divResult.fadeTo(settings.delay_result, 0.35, function () {
$(this).prependTo(divProviderResult).fadeTo(100, 1);
});
} else {
var precItem = nav.getDivResult(precId, divProviderResult);
- divResult.fadeTo(next_settings.delay_result, 0.35, function () {
+ divResult.fadeTo(settings.delay_result, 0.35, function () {
$(this).insertAfter(precItem).fadeTo(100, 1);
});
}
@@ -183,7 +182,7 @@ var nav = {
getDivProvider: function (providerId, providerName) {
var ret = null;
- next_settings.resultContainer.children('.provider_header').each(function () {
+ settings.resultContainer.children('.provider_header').each(function () {
if ($(this).attr('data-id') === providerId) {
ret = $(this);
}
@@ -191,7 +190,7 @@ var nav = {
if (ret === null) {
ret = nav.generateDivProvider(providerId, providerName);
- next_settings.resultContainer.append(ret);
+ settings.resultContainer.append(ret);
}
return ret;
@@ -250,20 +249,20 @@ var nav = {
nav.deleteEmptyDiv(divResult, '#line1');
nav.deleteEmptyDiv(divResult, '#line2');
- if (next_settings.parentHasMethod('onEntryGenerated')) {
- next_settings.parent.onEntryGenerated(divResult);
+ if (settings.parentHasMethod('onEntryGenerated')) {
+ settings.parent.onEntryGenerated(divResult);
}
},
onSearchReset: function () {
- if (next_settings.parentHasMethod('onSearchReset')) {
- next_settings.parent.onSearchReset();
+ if (settings.parentHasMethod('onSearchReset')) {
+ settings.parent.onSearchReset();
}
},
onResultDisplayed: function () {
- if (next_settings.parentHasMethod('onResultDisplayed')) {
- next_settings.parent.onResultDisplayed();
+ if (settings.parentHasMethod('onResultDisplayed')) {
+ settings.parent.onResultDisplayed();
}
},
@@ -276,13 +275,13 @@ var nav = {
generateTemplateEntry: function (document) {
- var divTemplate = next_settings.entryTemplate;
+ var divTemplate = settings.entryTemplate;
if (divTemplate === null) {
- divTemplate = next_settings.entryTemplateDefault;
+ divTemplate = settings.entryTemplateDefault;
}
if (!divTemplate.length) {
- console.log('FullNextSearch Error: template_entry is not defined');
+ console.log('FullTextSearch Error: template_entry is not defined');
return;
}
@@ -320,7 +319,7 @@ var nav = {
var divProviderPagination = $('<div>', {class: 'provider_navigation_right'});
var divProviderPaginationPrev = $('<div>', {class: 'icon-page-prev provider_navigation_prev'});
divProviderPaginationPrev.on('click', function () {
- nextSearch.search({
+ fullTextSearch.search({
providers: providerId,
search: divProviderNavigation.attr('data-search'),
page: Number(divProviderNavigation.attr('data-page')) - 1,
@@ -333,7 +332,7 @@ var nav = {
var divProviderPaginationNext = $('<div>', {class: 'icon-page-next provider_navigation_next'});
divProviderPaginationNext.on('click', function () {
- nextSearch.search({
+ fullTextSearch.search({
providers: providerId,
search: divProviderNavigation.attr('data-search'),
page: Number(divProviderNavigation.attr('data-page')) + 1,
diff --git a/js/nextsearch.v1.result.js b/js/fulltextsearch.v1.result.js
index b4c0c6e..80a19f5 100644
--- a/js/nextsearch.v1.result.js
+++ b/js/fulltextsearch.v1.result.js
@@ -1,11 +1,11 @@
/*
- * FullNextSearch - Full Text Search your Nextcloud.
+ * FullTextSearch - Full text search framework for Nextcloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Maxence Lange <maxence@artificial-owl.com>
- * @copyright 2017
+ * @copyright 2018
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -21,11 +21,10 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- *
*/
/** global: OCA */
-/** global: next_settings */
+/** global: settings */
/** global: curr */
/** global: nav */
@@ -35,7 +34,7 @@
var result = {
displayResult: function (res) {
- if (next_settings.resultContainer === null) {
+ if (settings.resultContainer === null) {
return;
}
@@ -52,16 +51,16 @@ var result = {
displayNoResult: function () {
- next_settings.divNoResult.fadeTo(next_settings.delay_result, 1);
- next_settings.resultContainer.find('.provider_header').each(function () {
- $(this).fadeTo(next_settings.delay_result, 0);
+ settings.divNoResult.fadeTo(settings.delay_result, 1);
+ settings.resultContainer.find('.provider_header').each(function () {
+ $(this).fadeTo(settings.delay_result, 0);
});
},
displayProviderResult: function (result) {
- next_settings.divNoResult.fadeTo(next_settings.delay_result, 0);
+ settings.divNoResult.fadeTo(settings.delay_result, 0);
var current = curr.getProviderResult(result.provider.id);
var divProvider = nav.getDivProvider(result.provider.id, result.provider.name);
@@ -70,8 +69,8 @@ var result = {
nav.manageDivProviderResult(divProvider.children('.provider_result'), result.documents,
current.documents);
- divProvider.slideDown(next_settings.delay_provider, function () {
- $(this).fadeTo(next_settings.delay_provider, 1);
+ divProvider.slideDown(settings.delay_provider, function () {
+ $(this).fadeTo(settings.delay_provider, 1);
});
curr.setProviderResult(result.provider.id, result);
diff --git a/js/nextsearch.v1.searchbar.js b/js/fulltextsearch.v1.searchbar.js
index ab86eeb..641ab95 100644
--- a/js/nextsearch.v1.searchbar.js
+++ b/js/fulltextsearch.v1.searchbar.js
@@ -1,11 +1,11 @@
/*
- * FullNextSearch - Full Text Search your Nextcloud.
+ * FullTextSearch - Full text search framework for Nextcloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Maxence Lange <maxence@artificial-owl.com>
- * @copyright 2017
+ * @copyright 2018
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -21,7 +21,6 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- *
*/
/** global: OCA */
@@ -30,8 +29,8 @@
/** global: api */
/** global: search */
/** global: result */
-/** global: nextSearch */
-/** global: next_settings */
+/** global: fullTextSearch */
+/** global: settings */
var searchbox = {
@@ -53,9 +52,9 @@ var searchbar = {
searchbox.search_div = $('<div>', {class: 'next_search_div'});
divHeaderRight.prepend(searchbox.search_div);
- searchbox.search_icon = $('<div>', {class: 'icon-fullnextsearch'});
+ searchbox.search_icon = $('<div>', {class: 'icon-fulltextsearch'});
searchbox.search_icon.css('background-image',
- "url('/apps/fullnextsearch/img/fullnextsearch.svg')");
+ "url('/apps/fulltextsearch/img/fulltextsearch.svg')");
searchbox.search_icon.fadeTo(0, 0.7);
searchbox.search_div.append(searchbox.search_icon);
@@ -71,7 +70,7 @@ var searchbar = {
searchbox.search_more = $('<div>', {class: 'search_more'});
searchbox.search_more.fadeTo(0, 0);
- searchbox.search_icon_more = $('<div>', {class: 'icon-more-white icon-more-fullnextsearch'});
+ searchbox.search_icon_more = $('<div>', {class: 'icon-more-white icon-more-fulltextsearch'});
searchbox.search_icon_more.fadeTo(0, 0);
searchbox.search_icon_more.on('click', function () {
if (curr.moreDisplayed) {
@@ -84,10 +83,10 @@ var searchbar = {
});
searchbox.search_form.append(searchbox.search_icon_more);
- searchbox.search_icon_close = $('<div>', {class: 'icon-close-white icon-close-fullnextsearch'});
+ searchbox.search_icon_close = $('<div>', {class: 'icon-close-white icon-close-fulltextsearch'});
searchbox.search_icon_close.fadeTo(0, 0);
searchbox.search_icon_close.on('click', function () {
- next_settings.lockSearchbox = false;
+ settings.lockSearchbox = false;
searchbox.search_icon_more.stop().fadeTo(100, 0);
searchbox.search_icon_close.stop().fadeTo(100, 0);
searchbox.search_more.stop().fadeTo(100, 0);
@@ -101,7 +100,7 @@ var searchbar = {
searchbox.search_icon.stop().fadeTo(100, 0);
searchbox.search_form.stop().fadeTo(100, 0.8);
}, function () {
- if (next_settings.lockSearchbox === true) {
+ if (settings.lockSearchbox === true) {
return;
}
searchbox.search_form.stop().fadeTo(500, 0);
@@ -111,7 +110,7 @@ var searchbar = {
searchbox.search_div.append(searchbox.search_more);
searchbox.search_input.on('focus', function () {
- next_settings.lockSearchbox = true;
+ settings.lockSearchbox = true;
searchbox.search_icon_more.stop().fadeTo(200, 1);
searchbox.search_icon_close.stop().fadeTo(200, 1);
});
@@ -122,8 +121,8 @@ var searchbar = {
nav.onSearchReset();
}
- if (next_settings.parentHasMethod('onEntryGenerated')) {
- next_settings.parent.onEntryGenerated();
+ if (settings.parentHasMethod('onEntryGenerated')) {
+ settings.parent.onEntryGenerated();
}
if (searchbox.searchTimeout === null && searchbar.initSearch(false)) {
@@ -134,17 +133,17 @@ var searchbar = {
}
});
- nextSearch.options(next_settings.searchProviderId);
+ fullTextSearch.options(settings.searchProviderId);
},
onOptionsLoaded: function (result) {
- searchbox.search_more.html(result[next_settings.searchProviderId]);
+ searchbox.search_more.html(result[settings.searchProviderId]);
searchbox.search_more.find('INPUT').each(function () {
$(this).on('change', function () {
var search = searchbox.search_input.val();
- nextSearch.search({
- providers: next_settings.searchProviderId,
+ fullTextSearch.search({
+ providers: settings.searchProviderId,
search: search,
page: curr.page,
options: searchbar.getSearchOptions(),
@@ -171,7 +170,7 @@ var searchbar = {
},
- // TODO: do we really need this initSearch, or should we use the one from fullnextsearch.js !?
+ // TODO: do we really need this initSearch, or should we use the one from fulltextsearch.js !?
initSearch: function (force) {
var search = searchbox.search_input.val();
@@ -185,8 +184,8 @@ var searchbar = {
curr.lastRequest = search;
- nextSearch.search({
- providers: next_settings.searchProviderId,
+ fullTextSearch.search({
+ providers: settings.searchProviderId,
search: search,
page: curr.page,
options: searchbar.getSearchOptions(),
diff --git a/js/nextsearch.v1.settings.js b/js/fulltextsearch.v1.settings.js
index 71e715f..7baa168 100644
--- a/js/nextsearch.v1.settings.js
+++ b/js/fulltextsearch.v1.settings.js
@@ -1,11 +1,11 @@
/*
- * FullNextSearch - Full Text Search your Nextcloud.
+ * FullTextSearch - Full text search framework for Nextcloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Maxence Lange <maxence@artificial-owl.com>
- * @copyright 2017
+ * @copyright 2018
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -21,13 +21,12 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- *
*/
/** global: searchbar */
/** global: api */
-var next_settings = {
+var settings = {
parent: null,
delay_provider: 300,
@@ -54,7 +53,7 @@ var next_settings = {
div.append(divLeft);
div.append(divRight);
- next_settings.entryTemplateDefault = $('<div>').append(div);
+ settings.entryTemplateDefault = $('<div>').append(div);
},
@@ -62,29 +61,29 @@ var next_settings = {
var div = $('<div>', {id: 'noresult'});
div.html('no result');
div.hide();
- next_settings.divNoResult = div;
+ settings.divNoResult = div;
},
setEntryTemplateId: function (template, parent) {
- next_settings.entryTemplate = template;
- next_settings.parent = parent;
+ settings.entryTemplate = template;
+ settings.parent = parent;
},
setResultContainerId: function (container) {
- next_settings.resultContainer = container;
- next_settings.resultContainer.prepend(next_settings.divNoResult);
+ settings.resultContainer = container;
+ settings.resultContainer.prepend(settings.divNoResult);
},
addSearchBar: function (providerId) {
- next_settings.searchProviderId = providerId;
+ settings.searchProviderId = providerId;
searchbar.init();
},
parentHasMethod: function (method) {
- if (next_settings.parent === null) {
+ if (settings.parent === null) {
return false;
}
- return (typeof eval('next_settings.parent. ' + method) === "function");
+ return (typeof eval('settings.parent. ' + method) === "function");
}
};
diff --git a/js/fullnextsearch.js b/js/navigate.js
index 8b2966c..e800338 100644
--- a/js/fullnextsearch.js
+++ b/js/navigate.js
@@ -1,11 +1,11 @@
/*
- * FullNextSearch - Full Text Search your Nextcloud.
+ * FullTextSearch - Full text search framework for Nextcloud
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Maxence Lange <maxence@artificial-owl.com>
- * @copyright 2017
+ * @copyright 2018
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -21,14 +21,13 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- *
*/
/** global: OCA */
/** global: _ */
-const nextSearch = OCA.NextSearch.api;
+const fullTextSearch = OCA.FullTextSearch.api;
var elements = {
@@ -48,8 +47,8 @@ Navigate.prototype = {
init: function () {
var self = this;
- nextSearch.setEntryTemplateId($('#template_entry'), self);
- nextSearch.setResultContainerId($('#search_result'));
+ fullTextSearch.setEntryTemplateId($('#template_entry'), self);
+ fullTextSearch.setResultContainerId($('#search_result'));
elements.search_input = $('#search_input');
elements.search_submit = $('#search_submit');
@@ -86,7 +85,7 @@ Navigate.prototype = {
page: curr.page
};
- nextSearch.search(request, this.searchResult);
+ fullTextSearch.search(request, this.searchResult);
return true;
},
@@ -126,11 +125,11 @@ Navigate.prototype = {
}
};
-OCA.NextSearch.Example = Navigate;
+OCA.FullTextSearch.Example = Navigate;
$(document).ready(function () {
- OCA.NextSearch.example = new Navigate();
+ OCA.FullTextSearch.example = new Navigate();
});
diff --git a/js/personal.js b/js/personal.js
deleted file mode 100644
index e69de29..0000000
--- a/js/personal.js
+++ /dev/null