mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
closed #2442
This commit is contained in:
@@ -79,6 +79,9 @@
|
|||||||
"browsing": "Browsing Settings",
|
"browsing": "Browsing Settings",
|
||||||
"open_links_in_new_tab": "Open outgoing links in new tab?",
|
"open_links_in_new_tab": "Open outgoing links in new tab?",
|
||||||
|
|
||||||
|
"enable_topic_searching": "Enable In-Topic Searching",
|
||||||
|
"topic_search_help": "If enabled, in-topic searching will override the browser's default page search behaviour and allow you to search through the entire topic, instead of what is only shown on screen.",
|
||||||
|
|
||||||
"follow_topics_you_reply_to": "Follow topics that you reply to.",
|
"follow_topics_you_reply_to": "Follow topics that you reply to.",
|
||||||
"follow_topics_you_create": "Follow topics you create."
|
"follow_topics_you_create": "Follow topics you create."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -488,14 +488,16 @@ var socket,
|
|||||||
});
|
});
|
||||||
|
|
||||||
Mousetrap.bind('ctrl+f', function(e) {
|
Mousetrap.bind('ctrl+f', function(e) {
|
||||||
// If in topic, open search window and populate, otherwise regular behaviour
|
if (config.topicSearchEnabled) {
|
||||||
var match = ajaxify.currentPage.match(/^topic\/([\d]+)/),
|
// If in topic, open search window and populate, otherwise regular behaviour
|
||||||
tid;
|
var match = ajaxify.currentPage.match(/^topic\/([\d]+)/),
|
||||||
if (match) {
|
tid;
|
||||||
e.preventDefault();
|
if (match) {
|
||||||
tid = match[1];
|
e.preventDefault();
|
||||||
searchInput.val('in:topic-' + tid + ' ');
|
tid = match[1];
|
||||||
prepareSearch();
|
searchInput.val('in:topic-' + tid + ' ');
|
||||||
|
prepareSearch();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ apiController.getConfig = function(req, res, next) {
|
|||||||
config.userLang = settings.language || config.defaultLang;
|
config.userLang = settings.language || config.defaultLang;
|
||||||
config.openOutgoingLinksInNewTab = settings.openOutgoingLinksInNewTab;
|
config.openOutgoingLinksInNewTab = settings.openOutgoingLinksInNewTab;
|
||||||
config.topicPostSort = settings.topicPostSort || config.topicPostSort;
|
config.topicPostSort = settings.topicPostSort || config.topicPostSort;
|
||||||
|
config.topicSearchEnabled = settings.topicSearchEnabled || false;
|
||||||
|
|
||||||
if (res.locals.isAPI) {
|
if (res.locals.isAPI) {
|
||||||
res.status(200).json(config);
|
res.status(200).json(config);
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ module.exports = function(User) {
|
|||||||
settings.followTopicsOnReply = parseInt(settings.followTopicsOnReply, 10) === 1;
|
settings.followTopicsOnReply = parseInt(settings.followTopicsOnReply, 10) === 1;
|
||||||
settings.sendChatNotifications = parseInt(settings.sendChatNotifications, 10) === 1;
|
settings.sendChatNotifications = parseInt(settings.sendChatNotifications, 10) === 1;
|
||||||
settings.restrictChat = parseInt(settings.restrictChat, 10) === 1;
|
settings.restrictChat = parseInt(settings.restrictChat, 10) === 1;
|
||||||
|
settings.topicSearchEnabled = parseInt(settings.topicSearchEnabled, 10) === 1;
|
||||||
|
|
||||||
callback(null, settings);
|
callback(null, settings);
|
||||||
});
|
});
|
||||||
@@ -94,7 +95,8 @@ module.exports = function(User) {
|
|||||||
followTopicsOnCreate: data.followTopicsOnCreate,
|
followTopicsOnCreate: data.followTopicsOnCreate,
|
||||||
followTopicsOnReply: data.followTopicsOnReply,
|
followTopicsOnReply: data.followTopicsOnReply,
|
||||||
sendChatNotifications: data.sendChatNotifications,
|
sendChatNotifications: data.sendChatNotifications,
|
||||||
restrictChat: data.restrictChat
|
restrictChat: data.restrictChat,
|
||||||
|
topicSearchEnabled: data.topicSearchEnabled
|
||||||
}, callback);
|
}, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user