ping server every 10 minutes
[redakcja.git] / redakcja / static / js / wiki / base.js
index 523ad96..3fa47cc 100644 (file)
@@ -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]({
                reportErrors: function(errors) {
                        var global = $("*[data-ui-error-for='__all__']", this.$elem);
                        var unassigned = [];
+                       var unassigned_text = '';
 
                        for (var field_name in errors)
                        {
 
                                if(!span.length) {
                                        unassigned.push(field_name);
+                                       unassigned_text += errors[field_name];
                                        continue;
                                }
 
                        }
 
                        if(unassigned.length > 0)
-                               global.text( global.text() + 'W formularzu wystąpiły błędy');
+                               global.text( global.text() + unassigned_text);
                }
        };