fix vstorage for files without extension
[redakcja.git] / redakcja / static / js / wiki / base.js
index 3fa47cc..de1d8e5 100644 (file)
                if($tab.length != 1)
                        $tab = $(DEFAULT_PERSPECTIVE);
 
                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');
 
                $old.each(function(){
                        $(this).removeClass('active');
                reportErrors: function(errors) {
                        var global = $("*[data-ui-error-for='__all__']", this.$elem);
                        var unassigned = [];
                reportErrors: function(errors) {
                        var global = $("*[data-ui-error-for='__all__']", this.$elem);
                        var unassigned = [];
-                       var unassigned_text = '';
 
                        for (var field_name in errors)
                        {
 
                        for (var field_name in errors)
                        {
 
                                if(!span.length) {
                                        unassigned.push(field_name);
 
                                if(!span.length) {
                                        unassigned.push(field_name);
-                                       unassigned_text += errors[field_name];
                                        continue;
                                }
 
                                        continue;
                                }
 
                        }
 
                        if(unassigned.length > 0)
                        }
 
                        if(unassigned.length > 0)
-                               global.text( global.text() + unassigned_text);
+                               global.text( global.text() + 'W formularzu wystąpiły błędy');
                }
        };
 
                }
        };