X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/5913c54d19b8f6775633176032161d49f9b2f1aa..41886adc4962a2aea572be1f71297c8a01bf99fb:/src/redakcja/static/js/wiki_img/loader.js?ds=inline 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.";