X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/c6c257380f1ff975db6a54e96f3ab2a34aa166c2..407a830d3dbe065b09de2207d69b1d38511a770c:/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);