Ignore:
Timestamp:
03/10/14 01:33:18 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • Better names for db backup and sync scripts.
  • Added SurveyRun? deletion in UI and prevent on server when a run has replies.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/src/client/qed-client/pages/surveys.js

    r490 r497  
    5959        _onRunDetails: function(surveyRun) {
    6060            Router.go(surveyRuns.getObjectPath(surveyRun));
     61        },
     62        _onRunDelete: function(surveyRun) {
     63            surveyRuns.remove(surveyRun)
     64            .then(lang.hitch(this,function(){
     65                this.notify("SurveyRun successfully deleted.");
     66                this.refreshRuns();
     67            }),lang.hitch(this,function(err){
     68                this.notify(err.error,'error');
     69            }));
    6170        },
    6271        refresh: function() {
     
    145154                                label: 'Details',
    146155                                tooltip: 'Show details for this run',
    147                                 icon: 'Details'
     156                                icon: 'Edit'
     157                            }
     158                        },{
     159                            callback: lang.hitch(this,'_onRunDelete',surveyRun),
     160                            properties: {
     161                                label: 'Delete',
     162                                tooltip: 'Delete this run',
     163                                icon: 'Delete'
    148164                            }
    149165                        }]
Note: See TracChangeset for help on using the changeset viewer.