diff options
author | Andrew Dolgov <[email protected]> | 2012-08-14 18:59:10 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-08-14 18:59:18 +0400 |
commit | 1354d17270961fff662d40f90521223f8fd0d73b (patch) | |
tree | e9266be71587e47c800303446e968a6d3565e2cf /lib/dijit/form/TimeTextBox.js | |
parent | d04f8c826f5283765f52cf6b98b42a1ed8f2d6bc (diff) |
update dojo to 1.7.3
Diffstat (limited to 'lib/dijit/form/TimeTextBox.js')
-rw-r--r-- | lib/dijit/form/TimeTextBox.js | 89 |
1 files changed, 2 insertions, 87 deletions
diff --git a/lib/dijit/form/TimeTextBox.js b/lib/dijit/form/TimeTextBox.js index 81949c4a1..90b3f279d 100644 --- a/lib/dijit/form/TimeTextBox.js +++ b/lib/dijit/form/TimeTextBox.js @@ -1,87 +1,2 @@ -/* - Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. - Available via Academic Free License >= 2.1 OR the modified BSD license. - see: http://dojotoolkit.org/license for details -*/ - - -if(!dojo._hasResource["dijit.form.TimeTextBox"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["dijit.form.TimeTextBox"] = true; -dojo.provide("dijit.form.TimeTextBox"); -dojo.require("dijit._TimePicker"); -dojo.require("dijit.form._DateTimeTextBox"); - - -/*===== -dojo.declare( - "dijit.form.TimeTextBox.__Constraints", - [dijit.form._DateTimeTextBox.__Constraints, dijit._TimePicker.__Constraints] -); -=====*/ - -dojo.declare( - "dijit.form.TimeTextBox", - dijit.form._DateTimeTextBox, - { - // summary: - // A validating, serializable, range-bound time text box with a drop down time picker - - baseClass: "dijitTextBox dijitComboBox dijitTimeTextBox", - popupClass: "dijit._TimePicker", - _selector: "time", - -/*===== - // constraints: dijit.form.TimeTextBox.__Constraints - constraints:{}, -=====*/ - - // value: Date - // The value of this widget as a JavaScript Date object. Note that the date portion implies time zone and daylight savings rules. - // - // Example: - // | new dijit.form.TimeTextBox({value: dojo.date.stamp.fromISOString("T12:59:59", new Date())}) - // - // When passed to the parser in markup, must be specified according to locale-independent - // `dojo.date.stamp.fromISOString` format. - // - // Example: - // | <input dojotype='dijit.form.TimeTextBox' value='T12:34:00'> - value: new Date(""), // value.toString()="NaN" - //FIXME: in markup, you have no control over daylight savings - - _onKey: function(evt){ - this.inherited(arguments); - - // If the user has backspaced or typed some numbers, then filter the result list - // by what they typed. Maybe there's a better way to detect this, like _handleOnChange()? - switch(evt.keyCode){ - case dojo.keys.ENTER: - case dojo.keys.TAB: - case dojo.keys.ESCAPE: - case dojo.keys.DOWN_ARROW: - case dojo.keys.UP_ARROW: - // these keys have special meaning - break; - default: - // setTimeout() because the keystroke hasn't yet appeared in the <input>, - // so the get('displayedValue') call below won't give the result we want. - setTimeout(dojo.hitch(this, function(){ - // set this.filterString to the filter to apply to the drop down list; - // it will be used in openDropDown() - var val = this.get('displayedValue'); - this.filterString = (val && !this.parse(val, this.constraints)) ? val.toLowerCase() : ""; - - // close the drop down and reopen it, in order to filter the items shown in the list - // and also since the drop down may need to be repositioned if the number of list items has changed - // and it's being displayed above the <input> - if(this._opened){ - this.closeDropDown(); - } - this.openDropDown(); - }), 0); - } - } - } -); - -} +//>>built +define("dijit/form/TimeTextBox",["dojo/_base/declare","dojo/keys","dojo/_base/lang","../_TimePicker","./_DateTimeTextBox"],function(_1,_2,_3,_4,_5){return _1("dijit.form.TimeTextBox",_5,{baseClass:"dijitTextBox dijitComboBox dijitTimeTextBox",popupClass:_4,_selector:"time",value:new Date(""),_onKey:function(_6){if(this.disabled||this.readOnly){return;}this.inherited(arguments);switch(_6.keyCode){case _2.ENTER:case _2.TAB:case _2.ESCAPE:case _2.DOWN_ARROW:case _2.UP_ARROW:break;default:setTimeout(_3.hitch(this,function(){var _7=this.get("displayedValue");this.filterString=(_7&&!this.parse(_7,this.constraints))?_7.toLowerCase():"";if(this._opened){this.closeDropDown();}this.openDropDown();}),0);}}});});
\ No newline at end of file |