svn commit: r1806149 - in /ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro: ./ HtmlMenuMacroLibrary.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1806149 - in /ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro: ./ HtmlMenuMacroLibrary.ftl

nmalin
Author: nmalin
Date: Fri Aug 25 09:57:42 2017
New Revision: 1806149

URL: http://svn.apache.org/viewvc?rev=1806149&view=rev
Log:
Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step these step break all the UI
#6.1 Migrate the Rainbowstone theme from VisualThemeRessource data definition to be an extends of common-theme
Forget to load the HtmlMenuMacroLibrary.ftl dedicate to Rainbowstone

Added:
    ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro/
    ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl   (with props)

Added: ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl?rev=1806149&view=auto
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl (added)
+++ ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl Fri Aug 25 09:57:42 2017
@@ -0,0 +1,72 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#include "component://common-theme/template/macro/HtmlMenuMacroLibrary.ftl"/>
+
+<#macro renderLink linkUrl parameterList targetWindow uniqueItemName actionUrl linkType="" id="" style="" name="" height="" width="" text="" imgStr="">
+    <#if linkType?has_content && "hidden-form" == linkType>
+    <form method="post" action="${actionUrl}"<#if targetWindow?has_content> target="${targetWindow}"</#if> onsubmit="javascript:submitFormDisableSubmits(this)" name="${uniqueItemName}"><#rt/>
+        <#list parameterList as parameter>
+            <input name="${parameter.name}" value="${parameter.value}" type="hidden"/><#rt/>
+        </#list>
+    </form><#rt/>
+    </#if>
+    <#if uniqueItemName?has_content && "layered-modal" == linkType>
+    <div id="${uniqueItemName}"></div>
+    <a href="javascript:void(0);" id="${uniqueItemName}_link"
+        <#if style?has_content>class="${style}"</#if>>
+        <#if text?has_content>${text}</#if></a>
+    <script type="text/javascript">
+        function ${uniqueItemName}_data() {
+            var data =  {
+            <#--list parameterList as parameter>
+                 "${parameter.name}": "${parameter.value}",
+             </#list-->
+                "presentation": "layer"
+            };
+            return data;
+        }
+        jQuery("#${uniqueItemName}_link").click(function () {
+            jQuery("#${uniqueItemName}").dialog("open");
+        });
+        jQuery("#${uniqueItemName}").dialog({
+            autoOpen: false,
+                <#if text?has_content>title: "${text}",</#if>
+        height: <#if height == "">600<#else>${height}</#if>,
+        width: <#if width == "">800<#else>${width}</#if>,
+            modal: true,
+            closeOnEscape: true,
+            open: function() {
+                jQuery.ajax({
+                    url: "${linkUrl}",
+                    type: "POST",
+                    data: ${uniqueItemName}_data(),
+                    success: function(data) {jQuery("#${uniqueItemName}").html(data);}
+                });
+            }
+        });
+    </script>
+    <#else>
+        <#if (linkType?has_content && "hidden-form" == linkType) || linkUrl?has_content>
+        <a<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if><#if name?has_content> name="${name}"</#if><#if targetWindow?has_content> target="${targetWindow}"</#if> href="<#if "hidden-form"==linkType>javascript:document.${uniqueItemName}.submit()<#else>${linkUrl}</#if>"><#rt/>
+        </#if>
+        <#if imgStr?has_content>${imgStr}</#if><#if text?has_content>${text}</#if><#rt/>
+        <#if (linkType?has_content && "hidden-form" == linkType) || linkUrl?has_content></a><#rt/></#if>
+    </#if>
+</#macro>
\ No newline at end of file

Propchange: ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain