Ignore:
Timestamp:
07/25/12 16:04:02 (13 years ago)
Author:
jkraaijeveld
Message:

Started the QuestionEditorPreview? bit - now works with headers and texts, fully stores and restores this in order properly.

Note: there must be a better way for this, but seeing as all content pieces can differ greatly I couldn't think of a way to make it properly generic. @Hendrik: need discussion about this.

Note2: Currently I don't use any internal events in the question editor. Not sure if it would be a lot better we would.

File:
1 edited

Legend:

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

    r374 r376  
    3939            _refresh: function () {
    4040                this._toolkit.loadQuestion(this.question);
     41                this._preview.insertObjects(this.question.content || []);
    4142            },
    4243            _onSave: function() {
    4344                lang.mixin(this.question, this._toolkit.propertiesForm.get('value'));
    4445                this.question.categories = this._toolkit._categories;
     46                this.question.content = this._preview.getContent();
    4547                store.put(this.question)
    4648                .then(function() {
     
    5052            },
    5153            _onDiscard: function() {
    52                 this._toolkit.propertiesForm.reset();
    5354                content.goTo('questions');
    5455                return false;
     
    7172            },
    7273            _setupEditor: function() {
    73 //                this.toolkit = new rft.ui.QuestionEditorToolkit( { question: this.question } );
    7474                this._toolkit = new rft.ui.QuestionEditorToolkit();
    7575                this._toolkit.placeAt("QuestionEditorToolkit");
Note: See TracChangeset for help on using the changeset viewer.