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/server/app.js

    r487 r490  
    149149    function identity(obj) { return obj; }
    150150    function handleUnknownResponse(status,error){
    151         return new HTTPResult(500,{error: "Unexpected database response",
    152                                    innerStatus: status, innerResponse: error});
     151        return new HTTPResult(500,{error: error.reason});
    153152    }
    154153    function handleUnknownError(error){
     
    393392            .handle({
    394393                200: function(others) {
    395                     if ( others.length > 0 ) {
     394                    if ( others.length > 0 && _.some(others,function(other){ return other._id !== id; })  ) {
    396395                        return new HTTPResult(403,{error:"Other question with this code already exists."});
    397396                    } else {
Note: See TracChangeset for help on using the changeset viewer.