X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/c6c257380f1ff975db6a54e96f3ab2a34aa166c2..82b3920c64a77f00e2b38d8f0e1601cd74e427e4:/src/redakcja/static/js/wiki/base.js?ds=sidebyside diff --git a/src/redakcja/static/js/wiki/base.js b/src/redakcja/static/js/wiki/base.js index 5262ab72..b4fee85f 100644 --- a/src/redakcja/static/js/wiki/base.js +++ b/src/redakcja/static/js/wiki/base.js @@ -104,6 +104,15 @@ return this.perspectives[ $(tab).attr('id')]; } + $.wiki.exitTab = function(tab){ + var self = this; + var $tab = $(tab); + if (!('.active', $tab)) return; + $('.active', $tab).removeClass('active'); + self.perspectives[$tab.attr('id')].onExit(); + $('#' + $tab.attr('data-ui-related')).hide(); + } + $.wiki.switchToTab = function(tab){ var self = this; var $tab = $(tab);