Ignore:
Timestamp:
03/23/14 22:58:54 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • Added grey icons for better highlighting, synced block and large buttons.
  • Introduced extra color for text, now disabled/inactive/hovered -> it's not very clear though.
  • Added confirmation on irrevertable actions.
  • Added support for query string in our new request implementation.
File:
1 edited

Legend:

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

    r508 r529  
    1616            if ( this._started ) { return; }
    1717            this.inherited(arguments);
     18            this.draftsTab.set('title','Drafts (<span class="qedLoading"></span>)');
     19            this.publishedTab.set('title','Published (<span class="qedLoading"></span>)');
     20            this.runsTab.set('title','Runs (<span class="qedLoading"></span>)');
    1821            this.refresh();
    1922        },
     
    2225        },
    2326        _onPublishSurvey:function(survey){
    24             var self = this;
     27            if ( !confirm("After publication the survey cannot be modified anymore, are you sure?") ) {
     28                return;
     29            }
    2530            survey.publicationDate = new Date();
    2631            surveys.save(survey)
    27             .then(function(){
    28                 self.refreshDrafts();
    29                 self.refreshPublished();
    30             },lang.hitch(this,function(err){
     32            .then(lang.hitch(this,function(){
     33                this.refreshDrafts();
     34                this.refreshPublished();
     35            }),lang.hitch(this,function(err){
    3136                this.notify(err.error,'error');
    3237            }));
    3338        },
    3439        _onDeleteSurvey:function(survey){
    35             var self = this;
     40            if ( !confirm("Are you sure you want to delete this draft survey?") ) {
     41                return;
     42            }
    3643            surveys.remove(survey)
    37             .then(function(){
    38                 self.refreshDrafts();
    39             },lang.hitch(this,function(err){
     44            .then(lang.hitch(this,function(){
     45                this.refreshDrafts();
     46            }),lang.hitch(this,function(err){
    4047                this.notify(err.error,'error');
    4148            }));
     
    6269        },
    6370        _onRunDelete: function(surveyRun) {
     71            if ( !confirm("Are you sure you want to delete this survey run?") ) {
     72                return;
     73            }
    6474            surveyRuns.remove(surveyRun)
    6575            .then(lang.hitch(this,function(){
     
    135145                                label: 'Run',
    136146                                tooltip: 'Run survey',
    137                                 icon: 'Run'
     147                                icon: 'Forward'
    138148                            }
    139149                        }]
Note: See TracChangeset for help on using the changeset viewer.