Last change
on this file since 376 was
376,
checked in by jkraaijeveld, 13 years ago
|
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 size:
496 bytes
|
Line | |
---|
1 | define(["dojo", "dijit"],
|
---|
2 | function(dojo, dijit) {
|
---|
3 | dojo.provide("rft.ui.PreviewWidgets.TextItem");
|
---|
4 | dojo.require("dijit.form.TextBox");
|
---|
5 |
|
---|
6 | dojo.declare("rft.ui.PreviewWidgets.TextItem", dijit.form.Textarea, {
|
---|
7 | edit: function() {
|
---|
8 | this.set('disabled', false);
|
---|
9 | },
|
---|
10 | save: function() {
|
---|
11 | this.set('disabled', true);
|
---|
12 | },
|
---|
13 | getContent: function() {
|
---|
14 | return this.get('value');
|
---|
15 | },
|
---|
16 | setContent: function(content) {
|
---|
17 | this.set('value', content);
|
---|
18 | }
|
---|
19 | });
|
---|
20 | }) |
---|
Note: See
TracBrowser
for help on using the repository browser.