[gatein-issues] [JBoss JIRA] (GTNPORTAL-2770) Bug JS: happens when js file in module contains tab charecter at header

Pham Duy Dong (JIRA) jira-events at lists.jboss.org
Tue Dec 11 22:37:17 EST 2012


     [ https://issues.jboss.org/browse/GTNPORTAL-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pham Duy Dong updated GTNPORTAL-2770:
-------------------------------------

    Description: 
- Declare that js(ex: WCMUIPopupWindow.js) file in gatein-resources.xml
{code:xml} 
...
  <module>
    <name>moduleName</name>
    <script>
      <path>/javascript/eXo/webui/WCMUIPopupWindow.js</path>
    </script>
  </module>
...
{code} 
- Require it in groovy template file
- In a javascript file (ex: WCMUIPopupWindow.js):
  If comment at top file contains tab character(\t) at begining line, js bug happens
  After remove tab, bug js also not happens anymore

-- js file with tab at header
{code:title=WCMUIPopupWindow.js|borderStyle=solid}
	/**
	 * Some comments...
	 */
(function(gj, wcm_utils, common, uiForm) {
...
{code}
-- js file after remove tab
{code:title=WCMUIPopupWindow.js|borderStyle=solid}
/**
 * Some comments...
 */
(function(gj, wcm_utils, common, uiForm) {
...
{code}

  was:
- Declare that js(ex: WCMUIPopupWindow.js) file in gatein-resources.xml
{code:xml} 
...
  <module>
    <name>moduleName</name>
    <script>
      <path>/javascript/eXo/webui/WCMUIPopupWindow.js</path>
    </script>
  </module>
...
{code} 
- Require it in groovy template file
- In a javascript file (ex: WCMUIPopupWindow.js):
  If comment at top file contains tab character(\t) at begining line, js bug happens
  After remove tab, bug js also not happens anymore

-- js file with tab at header
{code:title=WCMUIPopupWindow.js|borderStyle=solid}
	/**
	 * Copyright (C) 2009 eXo Platform SAS.
	 * Some comments...
	 */
(function(gj, wcm_utils, common, uiForm) {
...
{code}
-- js file after remove tab
{code:title=WCMUIPopupWindow.js|borderStyle=solid}
/**
 * Copyright (C) 2009 eXo Platform SAS.
 * Some comments...
 */
(function(gj, wcm_utils, common, uiForm) {
...
{code}


    
> Bug JS: happens when js file in module contains tab charecter at header
> -----------------------------------------------------------------------
>
>                 Key: GTNPORTAL-2770
>                 URL: https://issues.jboss.org/browse/GTNPORTAL-2770
>             Project: GateIn Portal
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.5.0.Final
>            Reporter: Pham Duy Dong
>            Priority: Minor
>
> - Declare that js(ex: WCMUIPopupWindow.js) file in gatein-resources.xml
> {code:xml} 
> ...
>   <module>
>     <name>moduleName</name>
>     <script>
>       <path>/javascript/eXo/webui/WCMUIPopupWindow.js</path>
>     </script>
>   </module>
> ...
> {code} 
> - Require it in groovy template file
> - In a javascript file (ex: WCMUIPopupWindow.js):
>   If comment at top file contains tab character(\t) at begining line, js bug happens
>   After remove tab, bug js also not happens anymore
> -- js file with tab at header
> {code:title=WCMUIPopupWindow.js|borderStyle=solid}
> 	/**
> 	 * Some comments...
> 	 */
> (function(gj, wcm_utils, common, uiForm) {
> ...
> {code}
> -- js file after remove tab
> {code:title=WCMUIPopupWindow.js|borderStyle=solid}
> /**
>  * Some comments...
>  */
> (function(gj, wcm_utils, common, uiForm) {
> ...
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the gatein-issues mailing list