modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/templates/user-info.js.ftl
author Harpreet Singh <harpreet@openbravo.com>
Fri, 10 Dec 2010 19:47:45 +0100
changeset 9076 c4f1a5c7d7c2
child 10219 9c0116f3fd36
permissions -rw-r--r--
Added 3.0 modules to modules dir and changed the VERSION number
harpreet@9076
     1
/*
harpreet@9076
     2
 *************************************************************************
harpreet@9076
     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
harpreet@9076
     5
 * Version 1.1  with a permitted attribution clause; you may not  use this
harpreet@9076
     6
 * file except in compliance with the License. You  may  obtain  a copy of
harpreet@9076
     7
 * the License at http://www.openbravo.com/legal/license.html 
harpreet@9076
     8
 * Software distributed under the License  is  distributed  on  an "AS IS"
harpreet@9076
     9
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
harpreet@9076
    10
 * License for the specific  language  governing  rights  and  limitations
harpreet@9076
    11
 * under the License.
harpreet@9076
    12
 * The Original Code is Openbravo ERP.
harpreet@9076
    13
 * The Initial Developer of the Original Code is Openbravo SLU
harpreet@9076
    14
 * All portions are Copyright (C) 2010 Openbravo SLU
harpreet@9076
    15
 * All Rights Reserved.
harpreet@9076
    16
 * Contributor(s):  ______________________________________.
harpreet@9076
    17
 ************************************************************************
harpreet@9076
    18
*/
harpreet@9076
    19
harpreet@9076
    20
/* jslint */
harpreet@9076
    21
    OBUserProfile.create({}),
harpreet@9076
    22
    isc.ImgButton.create(OB.LogoutNavbarComponentStylingProperties, {
harpreet@9076
    23
      prompt: OB.I18N.getLabel('UINAVBA_EndSession'),
harpreet@9076
    24
harpreet@9076
    25
      keyboardShortcutId : 'NavBar_OBLogout',
harpreet@9076
    26
harpreet@9076
    27
      draw : function() {
harpreet@9076
    28
        var me = this;
harpreet@9076
    29
        var ksAction = function() {
harpreet@9076
    30
          OB.Utilities.logout();
harpreet@9076
    31
        };
harpreet@9076
    32
        OB.KeyboardManager.KS.add(this.keyboardShortcutId, ksAction);
harpreet@9076
    33
        this.Super("draw", arguments);
harpreet@9076
    34
        OB.TestRegistry.register('org.openbravo.client.application.navigationbarcomponents.QuitButton', this);
harpreet@9076
    35
      },
harpreet@9076
    36
      
harpreet@9076
    37
      click: function() {
harpreet@9076
    38
        var handle = this.getHandle();
harpreet@9076
    39
        OB.Utilities.logout();
harpreet@9076
    40
      }
harpreet@9076
    41
    })