Ignore:
Timestamp:
03/12/14 15:16:54 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • Factored out general object mapping and iteration.
  • Split widgets for multiplechoice and singlechoice.
  • Restored readOnly/disabled setting for QuestionEditorPreviewItem? on innerWidget (since view innerWidget is not a form anymore, we cannot just set it on that, we iterate over all form children now).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/src/client/qed-client/widgets/TabbedBrowser.js

    r495 r510  
    11define([
     2    "../lib/object",
    23    "./Selector",
    34    "dijit/layout/ContentPane",
     
    910    "dojo/when",
    1011    "dojox/widget/Standby"
    11 ], function(Selector, ContentPane, TabContainer, array, declare, lang, win, when, Standby) {
     12], function(objectFuns, Selector, ContentPane, TabContainer, array, declare, lang, win, when, Standby) {
    1213    return declare([TabContainer],{
    1314        tabPosition: 'left-h',
     
    121122        removeItem: function(item) {
    122123            var cmap = this._dataMap;
    123             for ( var cat in cmap ) {
    124                 if ( cmap.hasOwnProperty(cat) ) {
    125                     var tmap = cmap[cat];
    126                     for ( var top in tmap ) {
    127                         if ( tmap.hasOwnProperty(top) ) {
    128                             var widget = tmap[top]._widget;
    129                             if ( widget ) { widget.removeItem(item); }
    130                         }
    131                     }
    132                 }
    133             }
     124            objectFuns.forEach(cmap,function(tmap,cat){
     125                objectFuns.forEach(tmap,function(topObj,top){
     126                    var widget = topObj._widget;
     127                    if ( widget ) { widget.removeItem(item); }
     128                },this);
     129            },this);
    134130        },
    135131        _busy: function() {
Note: See TracChangeset for help on using the changeset viewer.