modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-param-window-parameter.ftl
author Asier Lostalé <asier.lostale@openbravo.com>
Fri, 07 Jun 2013 09:01:35 +0200
changeset 20545 b5f4eb6e456b
parent 20544 21af06fb1cdc
child 20546 9dd28d0846af
permissions -rw-r--r--
[pw2] support for read only logic 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@20545
    40
    <#if param.readOnlyIf != "" >
asier@20545
    41
      readOnlyIf: function(currentValues) {
asier@20545
    42
        return (${param.readOnlyIf});
asier@20545
    43
      },
asier@20545
    44
    </#if>
asier@19270
    45
    required: ${param.required?string}
asier@19263
    46
    ${param.parameterProperties}
asier@20544
    47
  <#else>
asier@20544
    48
    defaultValue: '${param.title?js_string}',
asier@20544
    49
    sectionExpanded: ${param.expanded?string},
asier@20544
    50
    itemIds: [
asier@20544
    51
    <#list param.children as childParam>
asier@20544
    52
      '${childParam.dBColumnName?js_string}'<#if childParam_has_next>,</#if>
asier@20544
    53
    </#list>
asier@20544
    54
    ]
asier@20544
    55
  </#if>
asier@19261
    56
}
asier@19261
    57
</#macro>