Ignore:
Timestamp:
11/24/12 18:13:18 (12 years ago)
Author:
hendrikvanantwerpen
Message:

Small issues for db name, widgets, startup.

Don't start application when database is not configured correctly.
Refactored edit widgets to use DefaultEdit?.
Fixed bug in getItems of Lists.
Renamed database to 'qed'.

File:
1 edited

Legend:

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

    r411 r414  
    2020                'class': 'orange',
    2121                itemActions: {
     22                    Delete: {
     23                        callback: lang.hitch(this,"onDeleteQuestion"),
     24                        icon: 'Delete',
     25                        description: 'Delete question'
     26                    },
    2227                    Edit: {
    2328                        callback: lang.hitch(this,"onEditQuestion"),
     
    4045            }));
    4146        },
     47        onDeleteQuestion: function(question) {
     48            store.remove(store.getIdentity(question),store.getRevision(question))
     49            .then(function(){
     50                Content.notify("Question deleted.");
     51            },function(err){
     52                Content.notify(err.reason,'error');
     53            });
     54        },
    4255        onEditQuestion: function(question) {
    4356            Router.go("/question/"+question._id);
     
    4760            store.put(question)
    4861            .then(function(){
    49                 Content.notify("Question puplished.");
     62                Content.notify("Question published.");
    5063            },function(err){
    5164                Content.notify(err.reason,'error');
Note: See TracChangeset for help on using the changeset viewer.