jxdnsong
2020-10-23 a7929e6b3ec9ac17233f39e55a2b8ac63ea75f42
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
define([
    'dojo/_base/declare',
    './ConfigForm',
    'dojo/text!./templates/OnDemandGrid.html',
    'dgrid/OnDemandGrid',
    // for template
    'dijit/form/NumberTextBox',
    'dijit/form/RadioButton',
    'dijit/form/FilteringSelect'
], function (declare, ConfigForm, template, OnDemandGrid) {
    return declare(ConfigForm, {
        templateString: template,
        defaultsObject: OnDemandGrid.prototype,
 
        _getValueAttr: function () {
            var returnValue = this.inherited(arguments);
            var numericValue;
 
            if ('maxEmptySpace' in returnValue) {
                numericValue = +returnValue.maxEmptySpace;
 
                if (numericValue !== this.defaultsObject.maxEmptySpace &&
                    !isNaN(numericValue)) {
                    returnValue.maxEmptySpace = numericValue;
                }
                else {
                    delete returnValue.maxEmptySpace;
                }
            }
 
            return returnValue;
        }
    });
});