Browse Source

silence fomantic error regarding tabs (#9713) (#9718)

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.
tags/v1.11.0-rc2
silverwind 4 years ago
parent
commit
fec35440db
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      web_src/js/index.js

+ 3
- 0
web_src/js/index.js View File

Dropzone.autoDiscover = false; 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) { function initCommentPreviewTab($form) {
const $tabMenu = $form.find('.tabular.menu'); const $tabMenu = $form.find('.tabular.menu');
$tabMenu.find('.item').tab(); $tabMenu.find('.item').tab();

Loading…
Cancel
Save