Author: musachy Date: Sun Jun 22 08:28:01 2008 New Revision: 670371 URL: http://svn.apache.org/viewvc?rev=670371&view=rev Log: WW-2601 Tabindex not working on autocompleter also fixed tabindex for datepicker
Modified: struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js struts/struts2/trunk/plugins/dojo/src/profile/struts.profile.js Modified: struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js?rev=670371&r1=670370&r2=670371&view=diff ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js (original) +++ struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js Sun Jun 22 08:28:01 2008 @@ -279,6 +279,8 @@ //load options when page loads preload : true, + tabIndex: "", + //from Dojo's ComboBox showResultList: function() { // Our dear friend IE doesnt take max-height so we need to calculate that on our own every time @@ -418,6 +420,11 @@ this.comboBoxSelectionValue.value = this.initialKey; this.textInputNode.value = this.initialValue; + //tabindex + if(!dojo.string.isBlank(this.tabIndex)) { + this.textInputNode.tabIndex = this.tabIndex; + } + //hide arrow? if(!this.visibleDownArrow) { dojo.html.hide(this.downArrowNode); Modified: struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js?rev=670371&r1=670370&r2=670371&view=diff ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js (original) +++ struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js Sun Jun 22 08:28:01 2008 @@ -29,26 +29,32 @@ valueNotifyTopics : "", valueNotifyTopicsArray : null, - + tabIndex : "", + postCreate: function() { struts.widget.StrutsDatePicker.superclass.postCreate.apply(this, arguments); - + //set cssClass if(this.extraArgs["class"]) { dojo.html.setClass(this.inputNode, this.extraArgs["class"]); - } - + } + //set cssStyle if(this.extraArgs.style) { dojo.html.setStyleText(this.inputNode, this.extraArgs.style); - } - + } + //value topics if(!dojo.string.isBlank(this.valueNotifyTopics)) { this.valueNotifyTopicsArray = this.valueNotifyTopics.split(","); } + + //tabindex + if(!dojo.string.isBlank(this.tabIndex)) { + this.inputNode.tabIndex = this.tabIndex; + } }, - + _syncValueNode:function () { var date = this.datePicker.value; var value = ""; @@ -69,7 +75,7 @@ } this.valueNode.value = value; }, - + _updateText : function() { struts.widget.StrutsDatePicker.superclass._updateText.apply(this, arguments); if(this.valueNotifyTopicsArray != null) { Modified: struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js?rev=670371&r1=670370&r2=670371&view=diff ============================================================================== --- struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js (original) +++ struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js Sun Jun 22 08:28:01 2008 @@ -33,29 +33,36 @@ inputName: "", name: "", - + valueNotifyTopics : "", valueNotifyTopicsArray : null, - + + tabIndex : "", + postCreate: function() { struts.widget.StrutsTimePicker.superclass.postCreate.apply(this, arguments); - + //set cssClass if(this.extraArgs["class"]) { dojo.html.setClass(this.inputNode, this.extraArgs["class"]); - } - + } + //set cssStyle if(this.extraArgs.style) { dojo.html.setStyleText(this.inputNode, this.extraArgs.style); - } - + } + //value topics if(!dojo.string.isBlank(this.valueNotifyTopics)) { this.valueNotifyTopicsArray = this.valueNotifyTopics.split(","); } + + //tabindex + if(!dojo.string.isBlank(this.tabIndex)) { + this.inputNode.tabIndex = this.tabIndex; + } }, - + _syncValueNode:function () { var time = this.timePicker.time; var value; @@ -75,7 +82,7 @@ } this.valueNode.value = value; }, - + _updateText : function() { struts.widget.StrutsTimePicker.superclass._updateText.apply(this, arguments); if(this.valueNotifyTopicsArray != null) {