summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-01-12 03:57:32 +0100
committerAntoine GIRARD <sapk@users.noreply.github.com>2020-01-12 03:57:32 +0100
commit86464de0c150e046b4590c02851c9c1111cd2176 (patch)
tree7820e097858195ad151a632381454ccf2a07efa1 /web_src
parentfef49f5e2ecfc189f3d1d263c4a438d71161fef0 (diff)
downloadgitea-86464de0c150e046b4590c02851c9c1111cd2176.tar.gz
gitea-86464de0c150e046b4590c02851c9c1111cd2176.zip
silence fomantic error regarding tabs (#9713)
Fomantic expects all tabs to have a target element with content as defined by the data-tab attribute. All our usage of the tab module seems to use <a> element tabs that link to new pages so these content elements are never present and fomantic complains about that in the console with an "Activated tab cannot be found" error. This silences that error.
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/index.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js
index b8145fa439..b701da08b1 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -22,6 +22,9 @@ if (typeof (Dropzone) !== 'undefined') {
Dropzone.autoDiscover = false;
}
+// Silence fomantic's error logging when tabs are used without a target content element
+$.fn.tab.settings.silent = true;
+
function initCommentPreviewTab($form) {
const $tabMenu = $form.find('.tabular.menu');
$tabMenu.find('.item').tab();