PROP : Add the OpenURL 40/20240/1
authorjaeyeol lee <jaeyeol148.lee@samsung.com>
Wed, 30 Apr 2014 04:45:08 +0000 (13:45 +0900)
committerjaeyeol lee <jaeyeol148.lee@samsung.com>
Wed, 30 Apr 2014 04:45:08 +0000 (13:45 +0900)
Change-Id: I1812c772c4f20137233807e89c3744b249679ea4
Signed-off-by: jaeyeol lee <jaeyeol148.lee@samsung.com>
templates/Template/Tizen Web UI Builder/1.EmptyProject/project/tizen-ui-builder-tool/res/xslt/index_managed_js_ver0_0_1.xslt
templates/Template/Tizen Web UI Builder/2.SinglePageProject/project/tizen-ui-builder-tool/res/xslt/index_managed_js_ver0_0_1.xslt
templates/Template/Tizen Web UI Builder/3.MultiPageProject/project/tizen-ui-builder-tool/res/xslt/index_managed_js_ver0_0_1.xslt
templates/Template/Tizen Web UI Builder/4.NavigationProject/project/tizen-ui-builder-tool/res/xslt/index_managed_js_ver0_0_1.xslt

index e634cd3..d659bb8 100644 (file)
@@ -74,6 +74,8 @@ app.init = function() {
                </xsl:when>
                <xsl:when test="name() = 'gotoPage'">
                </xsl:when>
+               <xsl:when test="name() = 'openUrl'">
+               </xsl:when>
                <xsl:otherwise>
                        <xsl:value-of select="concat($class_name, '.prototype.', @id, ' = ')"/>
                        <xsl:value-of select="concat('undefined;', $newline)"/>
@@ -111,6 +113,8 @@ app.init = function() {
 </xsl:when>
 <xsl:when test="name() = 'gotoPage'">
 </xsl:when>
+<xsl:when test="name() = 'openUrl'">
+</xsl:when>
 <xsl:otherwise>
 <xsl:text>
                /**
@@ -153,6 +157,15 @@ app.init = function() {
 </xsl:if>
 </xsl:for-each>
 
+<xsl:for-each select=".//tizen.page//*">
+<xsl:if test="name() = 'openUrl'">
+<xsl:if test="../@id != $page_name">
+<xsl:value-of select="concat($tab, $tab, $class_name, '.prototype.', ../@id, '.bind(')"/>
+<xsl:value-of select="concat('&quot;', substring(@event, 3), '&quot;, ', 'function(event) { window.location.href = ', '&quot;', @url, '&quot;', ' });', $newline)"/>
+</xsl:if>
+</xsl:if>
+</xsl:for-each>
+
 <xsl:value-of select="concat($newline, $tab, '});', $newline, $newline)"/>
 
 <xsl:if test=".//tizen.page//*[@data-bind]">
index e634cd3..d659bb8 100644 (file)
@@ -74,6 +74,8 @@ app.init = function() {
                </xsl:when>
                <xsl:when test="name() = 'gotoPage'">
                </xsl:when>
+               <xsl:when test="name() = 'openUrl'">
+               </xsl:when>
                <xsl:otherwise>
                        <xsl:value-of select="concat($class_name, '.prototype.', @id, ' = ')"/>
                        <xsl:value-of select="concat('undefined;', $newline)"/>
@@ -111,6 +113,8 @@ app.init = function() {
 </xsl:when>
 <xsl:when test="name() = 'gotoPage'">
 </xsl:when>
+<xsl:when test="name() = 'openUrl'">
+</xsl:when>
 <xsl:otherwise>
 <xsl:text>
                /**
@@ -153,6 +157,15 @@ app.init = function() {
 </xsl:if>
 </xsl:for-each>
 
+<xsl:for-each select=".//tizen.page//*">
+<xsl:if test="name() = 'openUrl'">
+<xsl:if test="../@id != $page_name">
+<xsl:value-of select="concat($tab, $tab, $class_name, '.prototype.', ../@id, '.bind(')"/>
+<xsl:value-of select="concat('&quot;', substring(@event, 3), '&quot;, ', 'function(event) { window.location.href = ', '&quot;', @url, '&quot;', ' });', $newline)"/>
+</xsl:if>
+</xsl:if>
+</xsl:for-each>
+
 <xsl:value-of select="concat($newline, $tab, '});', $newline, $newline)"/>
 
 <xsl:if test=".//tizen.page//*[@data-bind]">
index e634cd3..d659bb8 100644 (file)
@@ -74,6 +74,8 @@ app.init = function() {
                </xsl:when>
                <xsl:when test="name() = 'gotoPage'">
                </xsl:when>
+               <xsl:when test="name() = 'openUrl'">
+               </xsl:when>
                <xsl:otherwise>
                        <xsl:value-of select="concat($class_name, '.prototype.', @id, ' = ')"/>
                        <xsl:value-of select="concat('undefined;', $newline)"/>
@@ -111,6 +113,8 @@ app.init = function() {
 </xsl:when>
 <xsl:when test="name() = 'gotoPage'">
 </xsl:when>
+<xsl:when test="name() = 'openUrl'">
+</xsl:when>
 <xsl:otherwise>
 <xsl:text>
                /**
@@ -153,6 +157,15 @@ app.init = function() {
 </xsl:if>
 </xsl:for-each>
 
+<xsl:for-each select=".//tizen.page//*">
+<xsl:if test="name() = 'openUrl'">
+<xsl:if test="../@id != $page_name">
+<xsl:value-of select="concat($tab, $tab, $class_name, '.prototype.', ../@id, '.bind(')"/>
+<xsl:value-of select="concat('&quot;', substring(@event, 3), '&quot;, ', 'function(event) { window.location.href = ', '&quot;', @url, '&quot;', ' });', $newline)"/>
+</xsl:if>
+</xsl:if>
+</xsl:for-each>
+
 <xsl:value-of select="concat($newline, $tab, '});', $newline, $newline)"/>
 
 <xsl:if test=".//tizen.page//*[@data-bind]">
index e634cd3..d659bb8 100644 (file)
@@ -74,6 +74,8 @@ app.init = function() {
                </xsl:when>
                <xsl:when test="name() = 'gotoPage'">
                </xsl:when>
+               <xsl:when test="name() = 'openUrl'">
+               </xsl:when>
                <xsl:otherwise>
                        <xsl:value-of select="concat($class_name, '.prototype.', @id, ' = ')"/>
                        <xsl:value-of select="concat('undefined;', $newline)"/>
@@ -111,6 +113,8 @@ app.init = function() {
 </xsl:when>
 <xsl:when test="name() = 'gotoPage'">
 </xsl:when>
+<xsl:when test="name() = 'openUrl'">
+</xsl:when>
 <xsl:otherwise>
 <xsl:text>
                /**
@@ -153,6 +157,15 @@ app.init = function() {
 </xsl:if>
 </xsl:for-each>
 
+<xsl:for-each select=".//tizen.page//*">
+<xsl:if test="name() = 'openUrl'">
+<xsl:if test="../@id != $page_name">
+<xsl:value-of select="concat($tab, $tab, $class_name, '.prototype.', ../@id, '.bind(')"/>
+<xsl:value-of select="concat('&quot;', substring(@event, 3), '&quot;, ', 'function(event) { window.location.href = ', '&quot;', @url, '&quot;', ' });', $newline)"/>
+</xsl:if>
+</xsl:if>
+</xsl:for-each>
+
 <xsl:value-of select="concat($newline, $tab, '});', $newline, $newline)"/>
 
 <xsl:if test=".//tizen.page//*[@data-bind]">