X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/434a8ca0e146d0ad9514978fffec916c90fb7542..df341bdd09208d2b0f84060454cc0000df19deba:/src/redakcja/static/js/wiki_img/loader.js diff --git a/src/redakcja/static/js/wiki_img/loader.js b/src/redakcja/static/js/wiki_img/loader.js index c3fe03e0..bd8979ca 100644 --- a/src/redakcja/static/js/wiki_img/loader.js +++ b/src/redakcja/static/js/wiki_img/loader.js @@ -32,15 +32,15 @@ $(function() /* * TABS */ - $('.tabs li').live('click', function(event, callback) { + $(document).on('click', '.tabs li', function(event, callback) { event.preventDefault(); $.wiki.switchToTab(this); }); - $('#tabs li > .tabclose').live('click', function(event, callback) { - var $tab = $(this).parent(); + $(document).on('click', '#tabs li .tabclose', function(event, callback) { + var $tab = $(this).parent().parent(); - if($tab.is('.active')) + if($('a', $tab).is('.active')) $.wiki.switchToTab(DEFAULT_PERSPECTIVE); var p = $.wiki.perspectiveForTab($tab); @@ -50,33 +50,6 @@ $(function() }); - /*$(window).resize(function(){ - $('iframe').height($(window).height() - $('#tabs').outerHeight() - $('#source-editor .toolbar').outerHeight()); - }); - - $(window).resize();*/ - - /*$('.vsplitbar').toggle( - function() { - $.wiki.state.perspectives.ScanGalleryPerspective.show = true; - $('#sidebar').show(); - $('.vsplitbar').css('right', 480).addClass('active'); - $('#editor .editor').css('right', 510); - $(window).resize(); - $.wiki.perspectiveForTab('#tabs-right .active').onEnter(); - }, - function() { - var active_right = $.wiki.perspectiveForTab('#tabs-right .active'); - $.wiki.state.perspectives.ScanGalleryPerspective.show = false; - $('#sidebar').hide(); - $('.vsplitbar').css('right', 0).removeClass('active'); - $(".vsplitbar-title").html("↑ " + active_right.vsplitbar + " ↑"); - $('#editor .editor').css('right', 30); - $(window).resize(); - active_right.onExit(); - } - );*/ - window.onbeforeunload = function(e) { if($.wiki.isDirty()) { e.returnValue = "Na stronie mogą być nie zapisane zmiany.";