Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //<![CDATA[
- $R(function() {
- if ($R('#LogonPanel').length == 1) {
- // Both checking for sign out and language selector is logon page only.
- RemoteAccessWindowsPool.TryCheck(LogonResources.WindowsPoolKey, LogonResources.ClearSessionUrl);
- if ($R('#TimeoutPanel').length == 1 && !RemoteAccessWindowsPool.IsEmpty(LogonResources.WindowsPoolKey)) {
- // For logon page used for timeout warning page
- $R('.main').css('display', 'none');
- $R('.timeout-panel').css('display', 'block');
- }
- else {
- // For common logon pages
- if (LogonResources.ShowLanguageList) {
- $R('.language-list').menu();
- }
- $R('#LogonPanel').css('display', 'block');
- $R('#LinksPanel').css('display', 'block');
- $R('#LogonPanel').bind('keypress', function(e) {
- if (e.keyCode == 13) { $R('#LogOnButton').click(); return false; }
- });
- $R('#txtUserName').watermark(LogonResources.Username, 'watermark-txt', 'normal-txt', { keepWatermarkOnFocus: true });
- $R('#txtPassword').watermark(LogonResources.Password, 'watermark-txt', 'normal-txt', { keepWatermarkOnFocus: true });
- // Queue the focus event to allow UI changes from watermark to become effective first.
- setTimeout(function() {
- if ($R('#txtUserName').val() == 0) $R('#txtUserName').focus();
- else $R('#txtPassword').focus();
- }, 1);
- }
- }
- else if ($R('#ChangePasswordPanel').length == 1) {
- $R('#ChangePasswordPanel').css('display', 'block');
- $R('#ChangePasswordPanel').bind('keypress', function(e) {
- if (e.keyCode == 13) { $R('#ChangePasswordButton').click(); return false; }
- });
- $R('#txtOldPassword').watermark(LogonResources.OldPassword, 'watermark-txt', 'normal-txt', { keepWatermarkOnFocus: true });
- $R('#txtNewPassword').watermark(LogonResources.NewPassword, 'watermark-txt', 'normal-txt', { keepWatermarkOnFocus: true });
- $R('#txtConfirmPassword').watermark(LogonResources.ConfirmPassword, 'watermark-txt', 'normal-txt', { keepWatermarkOnFocus: true });
- setTimeout(function() { $R('#txtOldPassword').focus(); }, 1);
- }
- });
- function showCover() {
- $R('#cover').css('display', 'block');
- $R('.main').find('a,input').each(function() { this.tabIndex = -1; });
- $R('.main').blur();
- }
- //]]>
Advertisement
Add Comment
Please, Sign In to add comment