modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/templates/application-js.ftl
author RM packaging bot <staff.rm@openbravo.com>
Tue, 24 Apr 2018 06:49:23 +0000
changeset 33860 915292301a97
parent 33756 9b1581758f9f
parent 33856 21633aa9f482
child 36104 2860a247fc51
permissions -rw-r--r--
Merge temporary head for 3.0PR18Q1.2
staff@10777
     1
/*
staff@10777
     2
 *************************************************************************
staff@10777
     3
 * The contents of this file are subject to the Openbravo  Public  License
harpreet@9076
     4
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
staff@10777
     5
 * Version 1.1  with a permitted attribution clause; you may not  use this
staff@10777
     6
 * file except in compliance with the License. You  may  obtain  a copy of
staff@10777
     7
 * the License at http://www.openbravo.com/legal/license.html 
staff@10777
     8
 * Software distributed under the License  is  distributed  on  an "AS IS"
staff@10777
     9
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
staff@10777
    10
 * License for the specific  language  governing  rights  and  limitations
staff@10777
    11
 * under the License.
staff@10777
    12
 * The Original Code is Openbravo ERP.
staff@10777
    13
 * The Initial Developer of the Original Code is Openbravo SLU
javier@33198
    14
 * All portions are Copyright (C) 2009-2018 Openbravo SLU
staff@10777
    15
 * All Rights Reserved.
staff@10777
    16
 * Contributor(s):  ______________________________________.
staff@10777
    17
 ************************************************************************
staff@10777
    18
*/
staff@10777
    19
//jslint
staff@10777
    20
ivan@15378
    21
if (window.isc) {
ivan@15375
    22
  // do at the beginning
ivan@15375
    23
  isc.setAutoDraw(false);
ivan@15375
    24
  // Prevent errors in smartclient for screenreader, is quite new and unstable for now
ivan@15375
    25
  isc.screenReader = false;
ivan@15375
    26
}
martin@15367
    27
carlos@33018
    28
// On logging in, create the OB object from scratch.
carlos@33018
    29
// But if we are in an old 2.50 window/process, clone the already existing OB object from the parent
carlos@33856
    30
var OBLayoutMDI = window.getFrame && window.getFrame('LayoutMDI');
carlos@33856
    31
var OB = (OBLayoutMDI && OBLayoutMDI.OB) ? OBLayoutMDI.shallowClone(OBLayoutMDI.OB) : {
staff@10777
    32
    Application : {
martin@12257
    33
        testEnvironment: ${data.testEnvironment?string},
staff@10777
    34
        contextUrl: '${data.contextUrl}',
staff@10777
    35
        communityBrandingStaticUrl: '${data.communityBrandingStaticUrl?js_string}',
staff@10777
    36
        butlerUtilsUrl: '${data.butlerUtilsUrl?js_string}',
carlos@32090
    37
        communityBrandingUrl: '${data.communityBrandingUrl?js_string}'
staff@10777
    38
    },
staff@10777
    39
staff@10777
    40
    Format : {
staff@10777
    41
        defaultGroupingSize: 3,
martin@10181
    42
        defaultGroupingSymbol: '${data.defaultGroupingSymbol}',
martin@10181
    43
        defaultDecimalSymbol: '${data.defaultDecimalSymbol}',
martin@10181
    44
        defaultNumericMask: '${data.defaultNumericMask}',
martin@10181
    45
        date: '${data.dateFormat}',
gorkaion@13642
    46
        dateTime: '${data.dateTimeFormat}',
gorkaion@13642
    47
        formats: {
gorkaion@13642
    48
        <#list data.formats?keys as key>
gorkaion@13642
    49
          '${key}': '${data.formats[key]}'<#if key_has_next>,</#if>
gorkaion@13642
    50
        </#list>
gorkaion@13642
    51
        }
staff@10777
    52
    },
david@12941
    53
staff@10777
    54
    Constants : {
david@16640
    55
        WINTITLE : 'Openbravo',
martin@10181
    56
        IDENTIFIER : '_identifier',
martin@10181
    57
        ID : 'id',
carlos@33504
    58
        TITLE : 'title',
martin@16334
    59
        FIELDSEPARATOR : '$',
martin@10181
    60
        WHERE_PARAMETER : '_where',
augusto@20347
    61
        SQL_WHERE_PARAMETER : '_sqlWhere',
martin@10181
    62
        ORG_PARAMETER : '_org',
inigo@31575
    63
        CALCULATE_ORGS: '_calculateOrgs',
martin@10181
    64
        ORDERBY_PARAMETER : '_orderBy',
augusto@20347
    65
        SQL_ORDERBY_PARAMETER : '_sqlOrderBy',
martin@10181
    66
        FILTER_PARAMETER : '_filter',
augusto@20347
    67
        SQL_FILTER_PARAMETER : '_sqlFilter',
martin@10181
    68
        SORTBY_PARAMETER : '_sortBy',
carlos@29522
    69
        OR_EXPRESSION : '_OrExpression',
carlos@29522
    70
        TEXT_MATCH_PARAMETER_OVERRIDE : '_textMatchStyleOverride',
martin@10181
    71
        SUCCESS : 'success',
carlos@29522
    72
        DBL_CLICK_DELAY : 300,
carlos@28567
    73
        ERROR : 'error',
carlos@29522
    74
        IS_PICK_AND_EDIT : '_isPickAndEdit',
carlos@29522
    75
        SELECTED_PROPERTIES : '_selectedProperties',
javier@33198
    76
        EXTRA_PROPERTIES : '_extraProperties',
javier@33198
    77
        TREE_DS_DEFAULT_FETCH_LIMIT : 200
staff@10777
    78
    },
david@12941
    79
david@12979
    80
    Styles : {
david@12979
    81
      skinsPath : '${data.contextUrl}' + 'web/org.openbravo.userinterface.smartclient/openbravo/skins/'
david@12979
    82
    },
david@12941
    83
staff@10777
    84
    I18N: {}
martin@9761
    85
};