summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorAlexey 〒erentyev <axifnx@gmail.com>2019-12-02 12:13:19 +0300
committerLauris BH <lauris@nix.lv>2019-12-02 11:13:19 +0200
commit2fc3eb1d152830001ea5e8655b082adcb7adaab9 (patch)
tree84baa34a4523e6f1eb4801493aab69029e82316e /web_src
parent66028d58f9ed3f69a82b84360784f8e6ccbcd582 (diff)
downloadgitea-2fc3eb1d152830001ea5e8655b082adcb7adaab9.tar.gz
gitea-2fc3eb1d152830001ea5e8655b082adcb7adaab9.zip
Fixed topic regex pattern and added search by topic links after save (#9219)
Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js
index b8cf81972b..1683210107 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -3150,7 +3150,7 @@ function initTopicbar() {
const last = viewDiv.children('a').last();
for (let i = 0; i < topicArray.length; i++) {
- $(`<div class="ui small label topic" style="cursor:pointer;">${topicArray[i]}</div>`).insertBefore(last);
+ $(`<a class="ui repo-topic small label topic" href="${suburl}/explore/repos?q=${topicArray[i]}&topic=1">${topicArray[i]}</a>`).insertBefore(last);
}
}
editDiv.css('display', 'none');
@@ -3277,7 +3277,7 @@ function initTopicbar() {
rules: [
{
type: 'validateTopic',
- value: /^[a-z0-9][a-z0-9-]{1,35}$/,
+ value: /^[a-z0-9][a-z0-9-]{0,35}$/,
prompt: topicPrompts.formatPrompt
},
{