Changeset 392


Ignore:
Timestamp:
08/08/12 13:33:58 (13 years ago)
Author:
hendrikvanantwerpen
Message:

Prevent duplication of questions on refresh in survey page.
Allow dragging by top bar only for QuestionEditorPreviewItems?.

Location:
Dev/branches/rest-dojo-ui/client/rft
Files:
5 edited

Legend:

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

    r389 r392  
    2727                    .then(lang.hitch(this,function(obj){
    2828                        this.survey = obj;
     29                        store.query(null,{keys:this.survey.questions,include_docs:true})
     30                        .forEach(lang.hitch(this.questionList,'appendItem'));
    2931                        this.refresh();
    3032                    }));
     
    6668                this.titleNode.innerHTML = this.survey.title || "(set title in properties)";
    6769                this.propertiesForm.set('value',this.survey);
    68                 store.query(null,{keys:this.survey.questions,include_docs:true})
    69                 .forEach(lang.hitch(this.questionList,'appendItem'));
    7070            },
    7171            _onShowProperties: function(evt) {
  • Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreview.js

    r389 r392  
    1010            baseClass: 'surveyEditorPreview',
    1111            type: 'questionContent',
     12            withHandles: true,
    1213
    1314            _createAvatarNode: function(item) {
  • Dev/branches/rest-dojo-ui/client/rft/ui/QuestionEditorPreviewItem.js

    r389 r392  
    4646                    this.innerWidget.startup();
    4747                }
    48                 this.titleNode.innerHTML = "[preview]";
     48                this.titleNode.innerHTML = this.item.type+" [preview]";
    4949            },
    5050            _showEditWidget: function() {
     
    5555                    this.innerWidget.startup();
    5656                }
    57                 this.titleNode.innerHTML = "[editing]";
     57                this.titleNode.innerHTML = this.item.type+" [editing]";
    5858            },
    5959            onClose: function() {},
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/List.js

    r389 r392  
    2525            removeCallback: null,
    2626            type: 'text',
     27            withHandles: false,
    2728            source: null,
    2829
     
    3738                    accept: [this.type],
    3839                    singular: true,
     40                    withHandles: this.withHandles,
    3941                    creator: lang.hitch(this, this._createNode)
    4042                });
  • Dev/branches/rest-dojo-ui/client/rft/ui/templates/QuestionEditorPreviewItem.html

    r376 r392  
    11<div class="inheritBgColor light">
    2         <div class="topBorder inheritBgColor light" data-dojo-attach-point="topBorderNode">
     2        <div class="topBorder inheritBgColor light dojoDndHandle" data-dojo-attach-point="topBorderNode">
    33                <span class="title" data-dojo-attach-point="titleNode">Default title</span>
    44                <span class="floatRight">
Note: See TracChangeset for help on using the changeset viewer.