[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:35: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}
/**
* Copyright (C) 2009 eXo Platform SAS.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
(function(gj, wcm_utils, common, uiForm) {
...
{code}
-- js file after remove tab
{code:title=WCMUIPopupWindow.js|borderStyle=solid}
/**
* Copyright (C) 2009 eXo Platform SAS.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
(function(gj, wcm_utils, common, uiForm) {
...
{code}
was:
- Declare that js(ex: WCMUIPopupWindow.js) file in gatein-resources.xml
{code:xml}
...
<module>
<name>ecm-seo</name>
<as>ecmSeo</as>
<script>
<path>/javascript/eXo/webui/WCMUIPopupWindow.js</path>
</script>
<depends>
<module>jquery</module>
<as>gj</as>
</depends>
<depends>
<module>wcm-utils</module>
</depends>
<depends>
<module>common</module>
</depends>
<depends>
<module>uiForm</module>
</depends>
</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.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
(function(gj, wcm_utils, common, uiForm) {
...
{code}
-- js file after remove tab
{code:title=WCMUIPopupWindow.js|borderStyle=solid}
/**
* Copyright (C) 2009 eXo Platform SAS.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
(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}
> /**
> * Copyright (C) 2009 eXo Platform SAS.
> *
> * This is free software; you can redistribute it and/or modify it
> * under the terms of the GNU Lesser General Public License as
> * published by the Free Software Foundation; either version 2.1 of
> * the License, or (at your option) any later version.
> *
> * This software is distributed in the hope that it will be useful,
> * but WITHOUT ANY WARRANTY; without even the implied warranty of
> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> * Lesser General Public License for more details.
> *
> * You should have received a copy of the GNU Lesser General Public
> * License along with this software; if not, write to the Free
> * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> */
> (function(gj, wcm_utils, common, uiForm) {
> ...
> {code}
> -- js file after remove tab
> {code:title=WCMUIPopupWindow.js|borderStyle=solid}
> /**
> * Copyright (C) 2009 eXo Platform SAS.
> *
> * This is free software; you can redistribute it and/or modify it
> * under the terms of the GNU Lesser General Public License as
> * published by the Free Software Foundation; either version 2.1 of
> * the License, or (at your option) any later version.
> *
> * This software is distributed in the hope that it will be useful,
> * but WITHOUT ANY WARRANTY; without even the implied warranty of
> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> * Lesser General Public License for more details.
> *
> * You should have received a copy of the GNU Lesser General Public
> * License along with this software; if not, write to the Free
> * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> */
> (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