Changeset 7538


Ignore:
Timestamp:
Nov 28, 2018, 9:40:18 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #2131: Add support for installing multiple authentication managers

Moved "Impersonate" functionality to it's own script file, since the latest changes caused it to re-load endlessly.

Location:
trunk/www
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/impersonate.jsp

    r7352 r7538  
    5353  %>
    5454  <base:page type="popup" title="Impersonate user">
    55   <base:head scripts="~login.js" styles="login.css" />
     55  <base:head scripts="~impersonate.js" styles="login.css" />
    5656  <base:body>
    5757    <h1>Impersonate user <base:help helpid="impersonateuser" /></h1>
  • trunk/www/login.js

    r7537 r7538  
    3939      var lastLoginForm = login.getLastLoginForm();
    4040      var selectedLoginForm = Data.get(document.body, 'login-form');
    41       if (lastLoginForm && lastLoginForm != selectedLoginForm)
     41      if (lastLoginForm && selectedLoginForm && lastLoginForm != selectedLoginForm)
    4242      {
    4343        login.switchLoginForm(lastLoginForm);
     
    348348Doc.onLoad(Login.initPage);
    349349
    350 var Impersonate = function()
    351 {
    352   var pForm = 'login';
    353   var impersonate = {};
    354  
    355   impersonate.initPage = function()
    356   {
    357     Buttons.addClickHandler('user_id.select', impersonate.selectUser);
    358     Events.addEventHandler('user_id', 'base-selected', Items.onItemSelected);
    359   }
    360  
    361   /**
    362     Open the 'select user' dialog.
    363   */
    364   impersonate.selectUser = function()
    365   {
    366     var frm = document.forms[pForm];
    367     var url = '&resetTemporary=1';
    368     if (frm.user_id.length > 0)
    369     {
    370       var id = Math.abs(parseInt(frm.user_id[0].value));       
    371       url += '&item_id='+id;
    372     }
    373     Dialogs.selectItem('USER', 'user_id', 0, url);
    374   }
    375  
    376   return impersonate;
    377 }();
    378 
    379 Doc.onLoad(Impersonate.initPage);
  • trunk/www/main.jsp

    r7537 r7538  
    130130    <input type="hidden" name="deviceToken" value="">
    131131   
    132     <table style="margin: auto; width: 700px;" id="the-login-form">
     132    <table style="margin: auto; width: 700px; display: none;" id="the-login-form">
    133133    <tr>
    134134    <td>
Note: See TracChangeset for help on using the changeset viewer.