Ignore:
Timestamp:
12/04/12 16:29:49 (12 years ago)
Author:
hendrikvanantwerpen
Message:

Support data validation and increase dendency separation.

Added json-schema validation before documents are saved. Acts both as
a safe-guard and as a reference of the data model.

Added directory for server related material. For now it contains scripts
to configure CouchDB and check validity of documents against the schema.

Started separating out parts that depend on the data model from parts
that do not.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui/client/rft/pages/questions.js

    r414 r415  
    4040        },
    4141        onNewQuestion: function() {
    42             Deferred.when(store.add({type:'Question'}))
    43             .then(lang.hitch(this,function(question){
    44                 this.onEditQuestion(question);
    45             }));
     42            Router.go("/question/new");
    4643        },
    4744        onDeleteQuestion: function(question) {
     
    5047                Content.notify("Question deleted.");
    5148            },function(err){
    52                 Content.notify(err.reason,'error');
     49                Content.notify(err,'error');
    5350            });
    5451        },
     
    6259                Content.notify("Question published.");
    6360            },function(err){
    64                 Content.notify(err.reason,'error');
     61                Content.notify(err,'error');
    6562            });
    6663        }
Note: See TracChangeset for help on using the changeset viewer.