modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/templates/application-js.ftl
changeset 9076 c4f1a5c7d7c2
child 9761 02584b440762
equal deleted inserted replaced
9075:b3ea04de2722 9076:c4f1a5c7d7c2
       
     1 /*
       
     2  *************************************************************************
       
     3  * The contents of this file are subject to the Openbravo  Public  License
       
     4  * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
       
     5  * Version 1.1  with a permitted attribution clause; you may not  use this
       
     6  * file except in compliance with the License. You  may  obtain  a copy of
       
     7  * the License at http://www.openbravo.com/legal/license.html 
       
     8  * Software distributed under the License  is  distributed  on  an "AS IS"
       
     9  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
       
    10  * License for the specific  language  governing  rights  and  limitations
       
    11  * under the License.
       
    12  * The Original Code is Openbravo ERP.
       
    13  * The Initial Developer of the Original Code is Openbravo SLU
       
    14  * All portions are Copyright (C) 2009-2010 Openbravo SLU
       
    15  * All Rights Reserved.
       
    16  * Contributor(s):  ______________________________________.
       
    17  ************************************************************************
       
    18 */
       
    19 //jslint
       
    20 
       
    21 var OB = {
       
    22     Application : {
       
    23         language : '${data.languageId?js_string}',
       
    24         systemVersion : '${data.systemVersion?js_string}', // global version used in all hyperlinks
       
    25         contextUrl: '${data.contextUrl}',
       
    26         communityBrandingUrl: '${data.communityBrandingUrl?js_string}',
       
    27         communityBrandingStaticUrl: '${data.communityBrandingStaticUrl?js_string}',
       
    28         butlerUtilsUrl: '${data.butlerUtilsUrl?js_string}',
       
    29         purpose: '${data.instancePurpose?js_string}',
       
    30         licenseType: '${data.licenseType?js_string}',
       
    31         versionDescription: '${data.versionDescription?js_string}'
       
    32     },
       
    33 
       
    34     User : {
       
    35         id : "${data.user.id}",
       
    36         firstName : "${(data.user.firstName!'')?js_string}",
       
    37         lastName : "${(data.user.lastName!'')?js_string}",
       
    38         userName : "${(data.user.username!'')?js_string}",
       
    39         name : "${(data.user.name!'')?js_string}",
       
    40         email : "${(data.user.email!'')?js_string}",
       
    41         roleId: "${data.role.id}",
       
    42         roleName: "${data.role.name}",
       
    43         clientId: "${data.client.id}",
       
    44         clientName: "${data.client.name}",
       
    45         organizationId: "${data.organization.id}",
       
    46         organizationName: "${data.organization.name}"
       
    47     },
       
    48 
       
    49     Format : {
       
    50         defaultGroupingSize: 3,
       
    51         defaultGroupingSymbol: "${data.defaultGroupingSymbol}",
       
    52         defaultDecimalSymbol: "${data.defaultDecimalSymbol}",
       
    53         defaultNumericMask: "${data.defaultNumericMask}",
       
    54         date: "${data.dateFormat}",
       
    55         dateTime: "${data.dateTimeFormat}"
       
    56     },
       
    57     
       
    58     Constants : {
       
    59         IDENTIFIER : "_identifier",
       
    60         ID : "id",
       
    61         WHERE_PARAMETER : "_where",
       
    62         ORG_PARAMETER : "_org",
       
    63         ORDERBY_PARAMETER : "_orderBy",
       
    64         FILTER_PARAMETER : "_filter",
       
    65         SORTBY_PARAMETER : "_sortBy",
       
    66         OR_EXPRESSION: "_OrExpression",
       
    67         TEXT_MATCH_PARAMETER_OVERRIDE: "_textMatchStyleOverride",
       
    68         SUCCESS : "success",
       
    69         DBL_CLICK_DELAY: 300,
       
    70         ERROR : "error"        
       
    71     },
       
    72     
       
    73     I18N: {}
       
    74 };
       
    75 
       
    76 OB.Application.moduleVersionParameters = {
       
    77 <#list data.moduleVersionParameters as moduleVersionParameter>
       
    78 '${moduleVersionParameter.id?js_string}' : '${moduleVersionParameter.value?js_string}'<#if moduleVersionParameter_has_next>,</#if>
       
    79 </#list>};
       
    80 
       
    81 OB.Constants.VERSION_QUERYSTRING = "_version=" + OB.Application.systemVersion + "&_language=" + OB.Application.language;