You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Giovanni Azua Garcia (JIRA)" <ji...@apache.org> on 2007/12/05 10:45:34 UTC

[jira] Created: (WW-2353) datetimepicker time dojo widget won't let entering minutes freely

datetimepicker time dojo widget won't let entering minutes freely
-----------------------------------------------------------------

                 Key: WW-2353
                 URL: https://issues.apache.org/struts/browse/WW-2353
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Dojo Tags
    Affects Versions: 2.1.x
         Environment: Fedora 6, Tomcat 6.x, Firefox 1.5.x
            Reporter: Giovanni Azua Garcia


Having a form definition like the one below, the onTime datetimepicker would not allow the user to enter any time i.e. freely writing a time.

Use case:

- click the datetimepicker time control button
- select the "any" time option
- in the text field enter a non multiple of 5 minutes e.g. 08:34

When the control loses focus it automatically casts the minutes to 08:30 multiple of 5.

<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

<s:form id="formSimulation" action="%{targetAction}" method="post" theme="%{currentTheme}">
<sx:datetimepicker label="On Time" tooltip="Provide the On Time" name="onTime" type="time" toggleType="fade" toggleDuration="500" />
<!-- ... etc -->
<s:submit value="%{buttonLabel}" align="center"/>
</s:form>

This same behavior may be reproduced from the showcase example application.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2353) datetimepicker time dojo widget won't let entering minutes freely

Posted by "Giovanni Azua Garcia (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44826#action_44826 ] 

Giovanni Azua Garcia commented on WW-2353:
------------------------------------------

I think I found the problem, seems it was intended to be constrained to multiples of 5. By applying the following patch the user would be able to enter minutes freely but I will be testing it now ...

Index: plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js
===================================================================
--- plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js (revision 704566)
+++ plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js (working copy)
@@ -16477,9 +16477,9 @@
 var hour=_dbf[0];
 var isAm=_dbf[1];
 var _dc2=this.time.getMinutes();
-var _dc3=parseInt(_dc2/5);
+var _dc3=parseInt(_dc2);
 this.onSetSelectedHour(this.hourIndexMap[hour]);
-this.onSetSelectedMinute(this.minuteIndexMap[_dc3]);
+this.onSetSelectedMinute(_dc3);
 this.onSetSelectedAmPm(isAm);
 }else{
 this.onSetSelectedAnyTime(); 

> datetimepicker time dojo widget won't let entering minutes freely
> -----------------------------------------------------------------
>
>                 Key: WW-2353
>                 URL: https://issues.apache.org/struts/browse/WW-2353
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Dojo Tags
>         Environment: Fedora 6, Tomcat 6.x, Firefox 1.5.x
>            Reporter: Giovanni Azua Garcia
>            Priority: Minor
>             Fix For: Future
>
>
> Having a form definition like the one below, the onTime datetimepicker would not allow the user to enter any time i.e. freely writing a time.
> Use case:
> - click the datetimepicker time control button
> - select the "any" time option
> - in the text field enter a non multiple of 5 minutes e.g. 08:34
> When the control loses focus it automatically casts the minutes to 08:30 multiple of 5.
> <%@ page contentType="text/html; charset=UTF-8"%>
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> <s:form id="formSimulation" action="%{targetAction}" method="post" theme="%{currentTheme}">
> <sx:datetimepicker label="On Time" tooltip="Provide the On Time" name="onTime" type="time" toggleType="fade" toggleDuration="500" />
> <!-- ... etc -->
> <s:submit value="%{buttonLabel}" align="center"/>
> </s:form>
> This same behavior may be reproduced from the showcase example application.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2353) datetimepicker time dojo widget won't let entering minutes freely

Posted by "Wes Wannemacher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46025#action_46025 ] 

Wes Wannemacher commented on WW-2353:
-------------------------------------

Giovanni, you mentioned that you would test with your patch applied... Did it work? If so, I'd consider applying your patch, but I don't want to put a lot of time into testing, etc. since we're moving away from dojo integration.

> datetimepicker time dojo widget won't let entering minutes freely
> -----------------------------------------------------------------
>
>                 Key: WW-2353
>                 URL: https://issues.apache.org/struts/browse/WW-2353
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Dojo Tags
>         Environment: Fedora 6, Tomcat 6.x, Firefox 1.5.x
>            Reporter: Giovanni Azua Garcia
>            Priority: Minor
>             Fix For: Future
>
>
> Having a form definition like the one below, the onTime datetimepicker would not allow the user to enter any time i.e. freely writing a time.
> Use case:
> - click the datetimepicker time control button
> - select the "any" time option
> - in the text field enter a non multiple of 5 minutes e.g. 08:34
> When the control loses focus it automatically casts the minutes to 08:30 multiple of 5.
> <%@ page contentType="text/html; charset=UTF-8"%>
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> <s:form id="formSimulation" action="%{targetAction}" method="post" theme="%{currentTheme}">
> <sx:datetimepicker label="On Time" tooltip="Provide the On Time" name="onTime" type="time" toggleType="fade" toggleDuration="500" />
> <!-- ... etc -->
> <s:submit value="%{buttonLabel}" align="center"/>
> </s:form>
> This same behavior may be reproduced from the showcase example application.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WW-2353) datetimepicker time dojo widget won't let entering minutes freely

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Musachy Barroso resolved WW-2353.
---------------------------------

    Resolution: Won't Fix

closing Dojo related tickets. 

> datetimepicker time dojo widget won't let entering minutes freely
> -----------------------------------------------------------------
>
>                 Key: WW-2353
>                 URL: https://issues.apache.org/struts/browse/WW-2353
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Dojo Tags
>         Environment: Fedora 6, Tomcat 6.x, Firefox 1.5.x
>            Reporter: Giovanni Azua Garcia
>            Priority: Minor
>             Fix For: Future
>
>
> Having a form definition like the one below, the onTime datetimepicker would not allow the user to enter any time i.e. freely writing a time.
> Use case:
> - click the datetimepicker time control button
> - select the "any" time option
> - in the text field enter a non multiple of 5 minutes e.g. 08:34
> When the control loses focus it automatically casts the minutes to 08:30 multiple of 5.
> <%@ page contentType="text/html; charset=UTF-8"%>
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> <s:form id="formSimulation" action="%{targetAction}" method="post" theme="%{currentTheme}">
> <sx:datetimepicker label="On Time" tooltip="Provide the On Time" name="onTime" type="time" toggleType="fade" toggleDuration="500" />
> <!-- ... etc -->
> <s:submit value="%{buttonLabel}" align="center"/>
> </s:form>
> This same behavior may be reproduced from the showcase example application.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-2353) datetimepicker time dojo widget won't let entering minutes freely

Posted by "Giovanni Azua Garcia (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Giovanni Azua Garcia updated WW-2353:
-------------------------------------

    Priority: Minor  (was: Major)

> datetimepicker time dojo widget won't let entering minutes freely
> -----------------------------------------------------------------
>
>                 Key: WW-2353
>                 URL: https://issues.apache.org/struts/browse/WW-2353
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Dojo Tags
>    Affects Versions: 2.1.x
>         Environment: Fedora 6, Tomcat 6.x, Firefox 1.5.x
>            Reporter: Giovanni Azua Garcia
>            Priority: Minor
>
> Having a form definition like the one below, the onTime datetimepicker would not allow the user to enter any time i.e. freely writing a time.
> Use case:
> - click the datetimepicker time control button
> - select the "any" time option
> - in the text field enter a non multiple of 5 minutes e.g. 08:34
> When the control loses focus it automatically casts the minutes to 08:30 multiple of 5.
> <%@ page contentType="text/html; charset=UTF-8"%>
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> <s:form id="formSimulation" action="%{targetAction}" method="post" theme="%{currentTheme}">
> <sx:datetimepicker label="On Time" tooltip="Provide the On Time" name="onTime" type="time" toggleType="fade" toggleDuration="500" />
> <!-- ... etc -->
> <s:submit value="%{buttonLabel}" align="center"/>
> </s:form>
> This same behavior may be reproduced from the showcase example application.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.