modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-param-window-parameter.ftl
author Asier Lostalé <asier.lostale@openbravo.com>
Thu, 06 Jun 2013 17:06:02 +0200
changeset 20544 21af06fb1cdc
parent 20538 9936e77a561f
child 20545 b5f4eb6e456b
permissions -rw-r--r--
[pw2] support for field groups in parameter windows
asier@19261
     1
<#--
asier@19261
     2
/*
asier@19261
     3
 *************************************************************************
asier@19261
     4
 * The contents of this file are subject to the Openbravo  Public  License
asier@19261
     5
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
asier@19261
     6
 * Version 1.1  with a permitted attribution clause; you may not  use this
asier@19261
     7
 * file except in compliance with the License. You  may  obtain  a copy of
asier@19261
     8
 * the License at http://www.openbravo.com/legal/license.html
asier@19261
     9
 * Software distributed under the License  is  distributed  on  an "AS IS"
asier@19261
    10
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
asier@19261
    11
 * License for the specific  language  governing  rights  and  limitations
asier@19261
    12
 * under the License.
asier@19261
    13
 * The Original Code is Openbravo ERP.
asier@19261
    14
 * The Initial Developer of the Original Code is Openbravo SLU
asier@20538
    15
 * All portions are Copyright (C) 2012-2013 Openbravo SLU
asier@19261
    16
 * All Rights Reserved.
asier@19261
    17
 * Contributor(s):  ______________________________________.
asier@19261
    18
 ************************************************************************
asier@19261
    19
*/
asier@19261
    20
asier@19261
    21
-->
asier@19261
    22
asier@19261
    23
<#macro createParameter param>
asier@19261
    24
{
asier@19261
    25
    type: '${param.type}',
asier@19261
    26
    title: '${param.title?js_string}',
asier@19261
    27
    name: '${param.name?js_string}',
asier@20544
    28
    
asier@20544
    29
  <#if param.type != "OBSectionItem">
asier@20544
    30
    paramId: '${param.id}',
augusto@19826
    31
    width: '${param.width?js_string}',
augusto@19441
    32
    <#if param.redrawOnChange>
augusto@19441
    33
      redrawOnChange: true,
augusto@19441
    34
    </#if>
augusto@19441
    35
    <#if param.showIf != "" >
augusto@19441
    36
      showIf: function(item, value, form, currentValues, context) {
augusto@19441
    37
        return (${param.showIf});
augusto@19441
    38
      },
augusto@19441
    39
    </#if>
asier@19270
    40
    required: ${param.required?string}
asier@19263
    41
    ${param.parameterProperties}
asier@20544
    42
  <#else>
asier@20544
    43
    defaultValue: '${param.title?js_string}',
asier@20544
    44
    sectionExpanded: ${param.expanded?string},
asier@20544
    45
    itemIds: [
asier@20544
    46
    <#list param.children as childParam>
asier@20544
    47
      '${childParam.dBColumnName?js_string}'<#if childParam_has_next>,</#if>
asier@20544
    48
    </#list>
asier@20544
    49
    ]
asier@20544
    50
  </#if>
asier@19261
    51
}
asier@19261
    52
</#macro>