multiple minor cover fixes
[redakcja.git] / redakcja / static / js / wiki / base.js
index 61a3949..8625b11 100644 (file)
                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');
                        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);