Hi Ajith,

Three bugs in this commit.

1. The check fromDateValue!="" && toDateValue!="" && (fromDateValue ==
toDateValue) has redundant comparisons. You can have the same results just
by having  fromDateValue != "" && (fromDateValue == toDateValue).
2. There is a typo. Data needs to be changed as Date.
3. You have not used the i18n practices in this, which you are supposed to.
For JS there is something called the JSResources.properties, which you have
not made use of.

Please fix, and also do the same for other validations in this JS file. We
notice that one or two people dedicate days or weeks to make sure i18n is
perfected and everybody else that commit afterwards blindly ignore that.
The same is noticed for FindBugs warnings, sonar warnings, and Java Docs.
We have to put a stop to these bad development practices or else we can't
get away from the vicious release cycle.

Thanks,
Senaka.

On Sat, Jun 9, 2012 at 5:38 PM, <aji...@wso2.com> wrote:

> Author: ajithn
> Date: Sat Jun  9 08:08:37 2012
> New Revision: 129621
> URL: http://wso2.org/svn/browse/wso2?view=rev&revision=129621
>
> Log:
> Fixing REGISTRY-913
>
> Modified:
>
> carbon/platform/trunk/components/registry/org.wso2.carbon.registry.activities.ui/src/main/resources/web/activities/js/activity.js
>
> Modified:
> carbon/platform/trunk/components/registry/org.wso2.carbon.registry.activities.ui/src/main/resources/web/activities/js/activity.js
> URL:
> http://wso2.org/svn/browse/wso2/carbon/platform/trunk/components/registry/org.wso2.carbon.registry.activities.ui/src/main/resources/web/activities/js/activity.js?rev=129621&r1=129620&r2=129621&view=diff
>
> ==============================================================================
> ---
> carbon/platform/trunk/components/registry/org.wso2.carbon.registry.activities.ui/src/main/resources/web/activities/js/activity.js
>   (original)
> +++
> carbon/platform/trunk/components/registry/org.wso2.carbon.registry.activities.ui/src/main/resources/web/activities/js/activity.js
>   Sat Jun  9 08:08:37 2012
> @@ -26,6 +26,12 @@
>         var userNameValue = userName.value;
>         var pathValue = path.value;
>
> +        if(fromDateValue!="" && toDateValue!="" && (fromDateValue ==
> toDateValue)){
> +            $('activityList').innerHTML="";
> +            CARBON.showWarningDialog("From Data and To Date can't be
> same");
> +            return true;
> +        }
> +
>         if(fromDateValue=="" && toDateValue=="" && userNameValue =="" &&
> pathValue =="" ){
>             $('activityList').innerHTML="";
>             CARBON.showWarningDialog("Please fill at least one field");
> _______________________________________________
> Commits mailing list
> comm...@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/commits
>



-- 
*Senaka Fernando*
Member - Integration Technologies Management Committee;
Technical Lead; WSO2 Inc.; http://wso2.com*
Member; Apache Software Foundation; http://apache.org

E-mail: senaka AT wso2.com
**P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
Linked-In: http://linkedin.com/in/senakafernando

*Lean . Enterprise . Middleware
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to