+
+ this.error = '';
+
+ messageCenter.addMessage('success', 'docload', 'Dokument załadowany poprawnie :-)');
+ },
+
+ failedLoad: function(response) {
+ if (this.get('state') != 'loading') {
+ alert('erroneous state:', this.get('state'));
+ }
+
+ var message = parseXHRError(response);
+ this.set('error', '<h2>Nie udało się wczytać dokumentu</h2><p>'+message+"</p>");
+ this.set('state', 'error');