Last change
on this file since 443 was
443,
checked in by hendrikvanantwerpen, 12 years ago
|
Reorganized for Node --- the SVN gods hate us all!
Lost all historical info on moved files, because SVN is a f *.
Also we have Node now, serving both the static content and forwarding
database requests.
|
File size:
1015 bytes
|
Line | |
---|
1 | define([ |
---|
2 | "../../../widgets/_ComplexValueWidget", |
---|
3 | "dojo/_base/declare", |
---|
4 | "dojo/text!./templates/NumberInputWidget.html" |
---|
5 | ], function(_ComplexValueWidget, declare, template) { |
---|
6 | return declare([_ComplexValueWidget],{ |
---|
7 | text: '', |
---|
8 | maxLength: null, |
---|
9 | templateString: template, |
---|
10 | startup: function() { |
---|
11 | var constraints = {}; |
---|
12 | if ( this.min !== null && !isNaN(this.min) ) { |
---|
13 | constraints.min = this.min; |
---|
14 | } |
---|
15 | if ( this.max !== null && !isNaN(this.max) ) { |
---|
16 | constraints.max = this.max; |
---|
17 | } |
---|
18 | if ( this.places !== null && !isNaN(this.places) ) { |
---|
19 | constraints.places = this.places; |
---|
20 | } |
---|
21 | this.numberBox.set('constraints', constraints); |
---|
22 | }, |
---|
23 | _getValueAttr: function() { |
---|
24 | return this.numberBox.get('value'); |
---|
25 | }, |
---|
26 | _setValueAttr: function(value) { |
---|
27 | return this.numberBox.set('value', value); |
---|
28 | } |
---|
29 | }); |
---|
30 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.