Ignore:
Timestamp:
08/15/12 18:30:58 (13 years ago)
Author:
hendrikvanantwerpen
Message:

Added survey viewer page.

Added view.html page to view surveys. Widgets from the questions are
displayed, no answers are saved yet.

The content module is split for index.html and view.html, so viewers
cannot navigate to other pages. Widgets to pre-load are now seperated
in stddeps.js module and shared between run.js & view.js.

Location:
Dev/branches/rest-dojo-ui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui

    • Property svn:ignore
      •  

        old new  
        11nbproject
         2.project
  • Dev/branches/rest-dojo-ui/client/rft/ui/content/ContentWidgetFactory.js

    r394 r399  
    8686                this._textBox = new TextBox();
    8787                this._textBox.set('value', this.options.contents);
    88                 this._textBox.set('readOnly', true);
    8988                this.addChild(this._textBox);
    9089            },
    9190            _getValueAttr: function() {
    9291                return {    type: 'Header',
    93                             contents: this._textBox.get('displayedValue'),
    94                 };
     92                            contents: this._textBox.get('displayedValue')
     93                };
     94            },
     95            _setReadOnlyAttr: function(value) {
     96                this._textBox.set('readOnly', value);
    9597            }
    9698        });
     
    107109            _getValueAttr: function() {
    108110                return { type: 'Header',
    109                          contents: this._textBox.get('displayedValue'),
     111                         contents: this._textBox.get('displayedValue')
    110112                };
    111113            }
     
    117119                this._textArea = new Textarea();
    118120                this._textArea.set('value', this.options.contents);
    119                 this._textArea.set('readOnly', true);
    120121                this.addChild(this._textArea);
    121122            },
    122123            _getValueAttr: function() {
    123124                return { type: 'Text',
    124                          contents: this._textArea.get('displayedValue'),
    125                 };
    126             },
     125                         contents: this._textArea.get('displayedValue')
     126                };
     127            },
     128            _setReadOnlyAttr: function(value) {
     129                this._textBox.set('readOnly', value);
     130            }
    127131        });
    128132
     
    149153                this._textArea = new Textarea();
    150154                this._textArea.set('maxLength', this.options.maxLength || 1000);
    151                 this._textArea.set('readOnly', this.options.readOnly || false);
    152155                this._textArea.set('value', this.options.defaultValue || "");
    153156                this.addChild(this._textArea);
     
    156159                return { type: "FreeTextInput",
    157160                         defaultValue: this.options.defaultValue,
    158                          readOnly: this.options.readOnly,
    159161                         maxLength: this.options.maxLength
    160162                };
     163            },
     164            _setReadOnlyAttr: function(value) {
     165                this._textArea.set('readOnly', value);
    161166            }
    162167        });
Note: See TracChangeset for help on using the changeset viewer.