diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 40c3f43..67a09f3 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -68,7 +68,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $rootScope.shapestyleFillBorderColor = "black"; $rootScope.shapestyleborderWidth = 2; $rootScope.shapestyleborderStyles = "solid"; - $rootScope.errorMassage = ''; + //$rootScope.errorMessage = ''; // Commented initialization to retain message when coming to login after password reset success screen $rootScope.disableFileMenu = "disableFileMenu"; $rootScope.userInfo = { @@ -82,11 +82,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic }; $rootScope.userData; $rootScope.userModules; - $rootScope.errorMesaage; + $rootScope.passwordMismatchMessage; $rootScope.isVisibleLogin; $rootScope.haveRoleAdmin; var isfilloptionChecked = ""; var isOutlineOptionChecked = ""; + $rootScope.forgotPwdModalShow = function () + { + $("#forgotPwdModal").modal("show"); + $(".modal-backdrop").css("opacity",".5"); + } + $rootScope.forgotUserModalShow=function() + { + $("#forgotUserModal").modal("show"); + $(".modal-backdrop").css("opacity", ".5"); + + } $rootScope.initializeAIA = function () { $rootScope.isLoading = false; @@ -100,7 +111,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic if (userInfo.username == "" || userInfo.username == null || userInfo.password == "" || userInfo.password == null) { // alert(LoginMessageConstants.USER_CREDENTIALS_MISSING); - $rootScope.errorMassage = LoginMessageConstants.USER_CREDENTIALS_MISSING; + $rootScope.errorMessage = LoginMessageConstants.USER_CREDENTIALS_MISSING; $("#messageModal").modal('show'); } else { @@ -117,14 +128,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic if (result == LoginConstants.USER_NOT_FOUND) { $rootScope.isVisibleLogin = true; // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); - $rootScope.errorMassage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT; + $rootScope.errorMessage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT; $("#messageModal").modal('show'); } else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { //alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); $rootScope.isVisibleLogin = true; - $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; + $rootScope.errorMessage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; $("#messageModal").modal('show'); } else { @@ -156,7 +167,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic console.log(' Error in authentication = ' + error.statusText); // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); $rootScope.isVisibleLogin = true; - $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; + $rootScope.errorMessage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; $("#messageModal").modal('show'); }); } @@ -215,17 +226,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic .then(function (result) { if (result == LoginConstants.USER_NOT_FOUND) { // alert(LoginMessageConstants.INCORRECT_EMAIL_ID); - $rootScope.errorMassage = LoginMessageConstants.INCORRECT_EMAIL_ID; + $rootScope.errorMessage = LoginMessageConstants.INCORRECT_EMAIL_ID; $("#messageModal").modal('show'); } else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); - $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; + $rootScope.errorMessage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; $("#messageModal").modal('show'); } else if (result == LoginConstants.MAIL_NOT_SENT) { // alert(LoginMessageConstants.MAIL_NOT_SENT); - $rootScope.errorMassage = LoginMessageConstants.MAIL_NOT_SENT; + $rootScope.errorMessage = LoginMessageConstants.MAIL_NOT_SENT; $("#messageModal").modal('show'); } else { @@ -244,7 +255,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic else message = LoginMessageConstants.USERID_SENT_IN_EMAIL //alert(message); - $rootScope.errorMassage = message; + $rootScope.errorMessage = message; $("#messageModal").modal('show'); @@ -255,31 +266,25 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic function (error) { console.log(' Error in authentication = ' + error.statusText); // alert(LoginConstants.ERROR_IN_FECTHING_DETAILS); - $rootScope.errorMassage = LoginConstants.ERROR_IN_FECTHING_DETAILS; + $rootScope.errorMessage = LoginConstants.ERROR_IN_FECTHING_DETAILS; $("#messageModal").modal('show'); }); } else { // alert(LoginMessageConstants.INCORRECT_EMAIL_ID); - $rootScope.errorMassage = LoginMessageConstants.INCORRECT_EMAIL_ID; + $rootScope.errorMessage = LoginMessageConstants.INCORRECT_EMAIL_ID; $("#messageModal").modal('show'); } } else { //alert(LoginMessageConstants.BLANK_EMAIL_ID); - $rootScope.errorMassage = LoginMessageConstants.BLANK_EMAIL_ID; + $rootScope.errorMessage = LoginMessageConstants.BLANK_EMAIL_ID; $("#messageModal").modal('show'); } }; - $rootScope.closeResetPasswordPopup = function () { - $("#passwordReset").fadeOut(); - $("#passwordReset").modal('hide'); - $location.url("/"); - $rootScope.isVisibleResetPass = false; - $rootScope.isVisibleLogin = true; - } + function validateEmail(email) { @@ -294,28 +299,30 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic userInfo.emailId = split[1]; } - if (userInfo.newPassword === userInfo.confirmPassword) { - $rootScope.errorMesaage = null; + if (userInfo.newPassword != null) { + + if (userInfo.newPassword === userInfo.confirmPassword) { + $rootScope.passwordMismatchMessage = null; AuthenticationService.ResetUserPassword(userInfo) .then( function (result) { if (result == LoginConstants.USER_NOT_FOUND) { // alert(LoginMessageConstants.USER_OR_PASSWORD_INCORRECT); - $rootScope.errorMassage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT; + $rootScope.errorMessage = LoginMessageConstants.USER_OR_PASSWORD_INCORRECT; $("#messageModal").modal('show'); } else if (result == LoginConstants.ERROR_IN_FECTHING_DETAILS) { // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); - $rootScope.errorMassage = LoginConstants.ERROR_IN_FECTHING_DETAILS; + $rootScope.errorMessage = LoginConstants.ERROR_IN_FECTHING_DETAILS; $("#messageModal").modal('show'); } else { if ((result.IsAcknowledged == true) && (result.IsModifiedCountAvailable == true)) { // alert(LoginMessageConstants.PASSWORD_RESET_MESSAGE); - $rootScope.errorMassage = LoginMessageConstants.PASSWORD_RESET_MESSAGE; + $rootScope.errorMessage = LoginMessageConstants.PASSWORD_RESET_MESSAGE; $("#messageModal").modal('show'); $rootScope.isVisibleLogin = true; $rootScope.isVisibleResetPass = false; @@ -326,13 +333,18 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic function (error) { console.log(' Error in authentication = ' + error.statusText); // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); - $rootScope.errorMassage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; + $rootScope.errorMessage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; $("#messageModal").modal('show'); }); } else { - $rootScope.errorMesaage = LoginMessageConstants.NEW_AND_OLD_PASSWORD_DONOT_MATCH; + $rootScope.passwordMismatchMassage = LoginMessageConstants.NEW_AND_OLD_PASSWORD_DONOT_MATCH; + //$("#messageModal").modal('show'); + } + } + else { + $rootScope.errorMessage = LoginMessageConstants.NEW_PASSWORD_FIELD_IS_EMPTY; $("#messageModal").modal('show'); } } @@ -559,30 +571,34 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic } $rootScope.openParent = function (slug) { + if ($('#jsPanel-1').length > 0) { - var openViews = $rootScope.openViews; - if (openViews.length > 0) { - $rootScope.openViews.splice(openViews.length - 1); - } - if (openViews.length > 0) { - var lastOpenMoudle = $rootScope.openViews[openViews.length - 1]; } - $('#daImagePanel').remove(); - if ($('#jsPanel-1').length > 0) - $('#jsPanel-1').remove(); + else { + var openViews = $rootScope.openViews; + if (openViews.length > 0) { + $rootScope.openViews.splice(openViews.length - 1); + } + if (openViews.length > 0) { + var lastOpenMoudle = $rootScope.openViews[openViews.length - 1]; + } + // $('#daImagePanel').remove(); + if ($('#jsPanel-1').length > 0) + $('#jsPanel-1').remove(); - if ($('#3DImagePanel').length > 0) - $('#3DImagePanel').remove(); + if ($('#3DImagePanel').length > 0) + $('#3DImagePanel').remove(); - if ($('#ciImagePanel').length > 0) - $('#ciImagePanel').remove(); + if ($('#ciImagePanel').length > 0) + $('#ciImagePanel').remove(); - if ($('#caVideoPanel').length > 0) - $('#caVideoPanel').remove(); + if ($('#caVideoPanel').length > 0) + $('#caVideoPanel').remove(); - $location.url('/' + slug); + $location.url('/' + slug); - $rootScope.$broadcast('jsPanelCloseEvent', true); + $rootScope.$broadcast('jsPanelCloseEvent', true); + } } //called on jsanel minimize @@ -3382,14 +3398,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic }; $rootScope.ShowExportImageWindow = function () { - $(".export-image").css("display", "block"); - }; + $(".export-image").modal("show").draggable({ handle: ".modal-header" }); - $rootScope.CloseExportImageWindow = function () { - console.log('close') - $(".export-image").css("display", "none"); + $(".modal-backdrop").css("opacity", ".5"); + $(".modal-backdrop").css("z-index", "1200001"); }; + + $rootScope.ShowPrintWindow = function () { // Print Active Viewer html2canvas($("#canvasDiv"), { onrendered: function (canvas) { @@ -3431,37 +3447,59 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic var curPosture = localStorage.getItem('currentViewTitle'); if (document.getElementById('jsPanel-1')) { //document.getElementsByClassName('ppImagePanel')) { - setTimeout(function () { - document.getElementById('imgPortrait').setAttribute('src', dataURL); - document.getElementById('imgLandscape').setAttribute('src', dataURL); - document.getElementById('spnModulePor').innerHTML = curModule; - document.getElementById('spnBodyViewTitlePor').innerHTML = curPosture; - document.getElementById('spnModuleLan').innerHTML = curModule; - document.getElementById('spnBodyViewTitleLan').innerHTML = curPosture; - if ($('#printcontainer').length > 0) { - $("#printcontainer").css('width', $(window).outerWidth()); - $("#printcontainer").css('height', $(window).outerHeight()); - } - }, 320); + if (dataURL == "" || dataURL == undefined) + { + + setTimeout(function () { + document.getElementById('imgPortrait').setAttribute('src', dataURL); + document.getElementById('imgLandscape').setAttribute('src', dataURL); + document.getElementById('spnModulePor').innerHTML = curModule; + document.getElementById('spnBodyViewTitlePor').innerHTML = curPosture; + document.getElementById('spnModuleLan').innerHTML = curModule; + document.getElementById('spnBodyViewTitleLan').innerHTML = curPosture; + if ($('#printcontainer').length > 0) { + $("#printcontainer").css('width', $(window).outerWidth()); + $("#printcontainer").css('height', $(window).outerHeight()); + } + }, 520); + } + else + { + setTimeout(function () { + document.getElementById('imgPortrait').setAttribute('src', dataURL); + document.getElementById('imgLandscape').setAttribute('src', dataURL); + document.getElementById('spnModulePor').innerHTML = curModule; + document.getElementById('spnBodyViewTitlePor').innerHTML = curPosture; + document.getElementById('spnModuleLan').innerHTML = curModule; + document.getElementById('spnBodyViewTitleLan').innerHTML = curPosture; + if ($('#printcontainer').length > 0) { + $("#printcontainer").css('width', $(window).outerWidth()); + $("#printcontainer").css('height', $(window).outerHeight()); + } + }, 320); + } + } $('#fileMenuAnchor').addClass('disableMenuannotation'); if ($('#daImagePanel').length > 0) { console.log('close') //$('#daImagePanel').css('display', 'none'); - $('#daImagePanel').remove(); + // $('#daImagePanel').remove(); } } }); }; function OpenJSPanel() { + $("#daImagePanel").css({ "pointer-events": "none", "opacity": ".5" }); + $("#ciImagePanel").css({ "pointer-events": "none", "opacity": ".5" }); $.jsPanel({ id: 'jsPanel-1', selector: '#dvPrintPreview', theme: 'success', currentController: 'HomeController', - parentSlug: 'da-view-list', //After closing panel, control moves to here + //parentSlug: 'da-view-list', //After closing panel, control moves to here ajax: { url: 'app/views/home/printPreview.html' }, @@ -3564,11 +3602,16 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic console.log('close') } - $(document).on('click', '.jsglyph-remove', function () { + $(document).on('click', '#jsPanel-1 .jsglyph-remove', function () { + $("#daImagePanel").css({ "pointer-events": "auto", "opacity": "1" }); + $("#ciImagePanel").css({ "pointer-events": "auto", "opacity": "1" }); + $("#annotationButton").parent().removeClass("disableMenuannotation"); + $("#annotationToolBarOptions").removeClass("disableMenuoption"); $('#fileMenuAnchor').removeClass('disableMenuannotation'); if ($('#jsPanel-1').length > 0) $('#jsPanel-1').remove(); - console.log('close') + console.log('close'); + }); $rootScope.restrictBodySystemList = function () { @@ -3603,7 +3646,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic AdminService.SendAdminAccessRequestMail(userInfo) .then(function (result) { if (result == AdminConstants.MAIL_SENT) { - $rootScope.errorMassage = AdminConstants.MAIL_SENT_SUCCESS_MESSAGE; + $rootScope.errorMessage = AdminConstants.MAIL_SENT_SUCCESS_MESSAGE; $("#messageModal").modal('show'); } $("#adminModal").fadeOut(); @@ -3612,7 +3655,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic }, function (error) { console.log(' Error in sending mail to admin support = ' + error.statusText); - $rootScope.errorMassage = AdminConstants.ERROR_IN_SENDING_MAIL; + $rootScope.errorMessage = AdminConstants.ERROR_IN_SENDING_MAIL; $("#messageModal").modal('show'); }); }; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js index f1e6e65..6aaa0a8 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js @@ -306,6 +306,7 @@ AIA.constant("LoginMessageConstants", { "NEW_AND_OLD_PASSWORD_DONOT_MATCH": "Your new password and confirm password not matched!", "USER_CREDENTIALS_MISSING": "Please Enter your credentials.", "USER_NOT_FOUND": "User not found.", + "NEW_PASSWORD_FIELD_IS_EMPTY": "Please enter new password to reset your password." //"ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.", //"MAIL_NOT_SENT": "Mail not sent." diff --git a/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html b/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html index f34a48f..9c00165 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html @@ -1,6 +1,6 @@
- Forgot User ID? + Forgot User ID? @@ -208,7 +208,7 @@ - Forgot Password? + Forgot Password?