ClocxHD

Untitled

Oct 31st, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         //<![CDATA[
  2.         $R(function() {
  3.             if ($R('#LogonPanel').length == 1) {
  4.                 // Both checking for sign out and language selector is logon page only.
  5.                 RemoteAccessWindowsPool.TryCheck(LogonResources.WindowsPoolKey, LogonResources.ClearSessionUrl);
  6.  
  7.                 if ($R('#TimeoutPanel').length == 1 && !RemoteAccessWindowsPool.IsEmpty(LogonResources.WindowsPoolKey)) {
  8.                     // For logon page used for timeout warning page
  9.                     $R('.main').css('display', 'none');
  10.                     $R('.timeout-panel').css('display', 'block');
  11.                 }
  12.                 else {
  13.                     // For common logon pages
  14.                     if (LogonResources.ShowLanguageList) {
  15.                         $R('.language-list').menu();
  16.                     }
  17.                     $R('#LogonPanel').css('display', 'block');
  18.                     $R('#LinksPanel').css('display', 'block');
  19.                     $R('#LogonPanel').bind('keypress', function(e) {
  20.                         if (e.keyCode == 13) { $R('#LogOnButton').click(); return false; }
  21.                     });
  22.                     $R('#txtUserName').watermark(LogonResources.Username, 'watermark-txt', 'normal-txt', { keepWatermarkOnFocus: true });
  23.                     $R('#txtPassword').watermark(LogonResources.Password, 'watermark-txt', 'normal-txt', { keepWatermarkOnFocus: true });
  24.                     // Queue the focus event to allow UI changes from watermark to become effective first.
  25.                     setTimeout(function() {
  26.                         if ($R('#txtUserName').val() == 0)  $R('#txtUserName').focus();
  27.                         else    $R('#txtPassword').focus();
  28.                     }, 1);
  29.                 }
  30.             }
  31.             else if ($R('#ChangePasswordPanel').length == 1) {
  32.                 $R('#ChangePasswordPanel').css('display', 'block');
  33.                 $R('#ChangePasswordPanel').bind('keypress', function(e) {
  34.                     if (e.keyCode == 13) { $R('#ChangePasswordButton').click(); return false; }
  35.                 });
  36.                 $R('#txtOldPassword').watermark(LogonResources.OldPassword, 'watermark-txt', 'normal-txt', { keepWatermarkOnFocus: true });
  37.                 $R('#txtNewPassword').watermark(LogonResources.NewPassword, 'watermark-txt', 'normal-txt', { keepWatermarkOnFocus: true });
  38.                 $R('#txtConfirmPassword').watermark(LogonResources.ConfirmPassword, 'watermark-txt', 'normal-txt', { keepWatermarkOnFocus: true });
  39.                 setTimeout(function() { $R('#txtOldPassword').focus(); }, 1);
  40.             }
  41.         });
  42.         function showCover() {
  43.             $R('#cover').css('display', 'block');
  44.             $R('.main').find('a,input').each(function() { this.tabIndex = -1; });
  45.             $R('.main').blur();
  46.         }
  47.         //]]>
Advertisement
Add Comment
Please, Sign In to add comment