Ignore:
Timestamp:
03/08/14 22:51:23 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • Mark content as dirty to prevent moving away from unsaved data.
  • Better change propagation from lists and our own widgets.
  • Generate notifications for errors and show correct message.
  • Moved all path/url generation to the class stores, not everywhere we use it.
  • Give user always a choice between Save and Save & Close.
  • Better refresh behaviour on form changes and saves.
  • Don't generate duplicate code error when existing object is the one you're storing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/src/client/qed-client/model/classes/responses.js

    r487 r490  
    4343                handleAs: 'json',
    4444                contentType: false
    45             }).then(lang.hitch(this,'_doDeserialize'),function(err){
    46                 return new Deferred().reject(json.fromJson(err.responseText));
    47             });
     45            }).then(lang.hitch(this,'_doDeserialize'),
     46                    lang.hitch(this,'_deserializeError'));
    4847        },
    4948        postWithSecret: function(response,secret) {
     
    5554                contentType: 'application/json',
    5655                rawBody: body
    57             }).then(lang.hitch(this,'_doDeserialize'),function(err){
    58                 return new Deferred().reject(json.fromJson(err.responseText));
    59             });
     56            }).then(lang.hitch(this,'_doDeserialize'),
     57                    lang.hitch(this,'_deserializeError'));
    6058        },
    6159        putWithSecret: function(response,secret) {
     
    6765                contentType: 'application/json',
    6866                rawBody: body
    69             }).then(lang.hitch(this,'_doDeserialize'),function(err){
    70                 return new Deferred().reject(json.fromJson(err.responseText));
    71             });
     67            }).then(lang.hitch(this,'_doDeserialize'),
     68                    lang.hitch(this,'_deserializeError'));
    7269        },
    7370        removeWithSecret: function(response,secret) {
     
    8582                contentType: 'application/json',
    8683                rawBody: body
    87             });
     84            }).otherwise(lang.hitch(this,'_deserializeError'));
    8885        }
    8986    });
Note: See TracChangeset for help on using the changeset viewer.