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'.

Location:
Dev/branches/rest-dojo-ui/client/rft/pages
Files:
3 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');
  • Dev/branches/rest-dojo-ui/client/rft/pages/surveys.html

    r410 r414  
    1414            </div>
    1515            <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;">
    16                 <button data-dojo-type="dijit/form/Button" class="blue" data-dojo-props="baseClass: 'rftBlockButton', iconClass: 'rftIcon rftIconNew'" data-dojo-attach-event="onClick:_onNewSurvey">New survey</button>
    1716            </div>
    1817        </div>
     
    3332    </div>
    3433
     34    <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" style="height: 40px;">
     35        <button data-dojo-type="dijit/form/Button" class="blue" data-dojo-props="baseClass: 'rftBlockButton', iconClass: 'rftIcon rftIconNew'" data-dojo-attach-event="onClick:_onNewSurvey">New survey</button>
     36    </div>
     37
    3538</div>
  • Dev/branches/rest-dojo-ui/client/rft/pages/surveys.js

    r410 r414  
    2222            .then(function(survey) {
    2323                Router.go('/survey/'+store.getIdentity(survey));
     24            },function(err){
     25                Content.notify(err.reason,'error');
    2426            });
    2527        },
Note: See TracChangeset for help on using the changeset viewer.