X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f938afb8ab4cb091d12e0ef0311eaea14b774798..5bbc488088e1d46bd14ebf9a96852f8ee8b231a2:/redakcja/static/js/wiki/base.js?ds=sidebyside
diff --git a/redakcja/static/js/wiki/base.js b/redakcja/static/js/wiki/base.js
index 523ad96e..8625b112 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 = $('
'
- + title + '');
+ + title + '');
var $view = $('
');
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');
@@ -299,6 +299,7 @@
var global = $("*[data-ui-error-for='__all__']", this.$elem);
var unassigned = [];
+ $("*[data-ui-error-for]", this.$elem).text('');
for (var field_name in errors)
{
var span = $("*[data-ui-error-for='"+field_name+"']", this.$elem);