Ignore:
Timestamp:
05/02/13 13:13:13 (12 years ago)
Author:
hendrikvanantwerpen
Message:

Enable validation on all fields of question.

Location:
Dev/trunk/client/qed/widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/client/qed/widgets/ListWidget.js

    r441 r442  
    9090        _setValueAttr: function(value) {
    9191            this.clear();
    92             this.appendItems(value);
     92            this.appendItems(value || []);
     93        },
     94        _setDisabledAttr: function(value) {
     95            this._set("disabled", value);
     96            array.forEach(this.getChildren(), function(child){
     97                child.set("disabled", value);
     98            });
     99        },
     100        _setReadOnlyAttr: function(value) {
     101            this._set("readOnly", value);
     102            array.forEach(this.getChildren(), function(child){
     103                child.set("readOnly", value);
     104            });
     105        },
     106        focus: function() {
     107            var children = this.getChildren();
     108            if ( children.length > 0 ) {
     109                children[0].focus();
     110            }
    93111        },
    94112        appendItems: function(items) {
  • Dev/trunk/client/qed/widgets/TitleGroup.js

    r417 r442  
    1 require(['dojo/_base/declare','dojo/_base/query','dijit/registry','dojox/widget/TitleGroup'],
    2     function(declare,query,registry,TitleGroup){
    3         return declare([TitleGroup],{
    4             getChildren: function() {
    5                 return query("> .dijitTitlePane", this.domNode)
    6                 .map(function(node){
    7                     return registry.byNode(node);
    8                 });
    9             }
    10         });
     1define([
     2    "dijit/registry",
     3    "dojo/_base/declare",
     4    "dojo/_base/query",
     5    "dojox/widget/TitleGroup"
     6], function(registry, declare, query, TitleGroup) {
     7    return declare([TitleGroup],{
     8        getChildren: function() {
     9            return query("> .dijitTitlePane", this.domNode)
     10            .map(function(node){
     11                return registry.byNode(node);
     12            });
     13        }
    1114    });
     15});
Note: See TracChangeset for help on using the changeset viewer.