X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f938afb8ab4cb091d12e0ef0311eaea14b774798..bb551d54ea65621cae28c6acbfd91b22dc441dae:/redakcja/static/js/wiki/base.js

diff --git a/redakcja/static/js/wiki/base.js b/redakcja/static/js/wiki/base.js
index 523ad96e..de1d8e5d 100644
--- a/redakcja/static/js/wiki/base.js
+++ b/redakcja/static/js/wiki/base.js
@@ -69,7 +69,7 @@
 		var base_id = 'id' + Math.floor(Math.random()* 5000000000);
 		var id = (''+klass)+'_' + base_id;
 		var $tab = $('<li id="'+id+'" data-ui-related="'+base_id+'" data-ui-jsclass="'+klass+'" >'
-				+ title + '<img src="/static/icons/close.png" class="tabclose"></li>');
+				+ title + '<img src="'+STATIC_URL+'icons/close.png" class="tabclose"></li>');
 		var $view = $('<div class="editor '+klass+'" id="'+base_id+'"> </div>');
 
 		this.perspectives[id] = new $.wiki[klass]({
@@ -111,7 +111,7 @@
 		if($tab.length != 1)
 			$tab = $(DEFAULT_PERSPECTIVE);
 
-		var $old = $('#tabs li').filter('.active');
+		var $old = $tab.closest('.tabs').find('.active');
 
 		$old.each(function(){
 			$(this).removeClass('active');