'use strict'; var AIA = angular.module('AIA', ['ngSanitize', 'ngRoute', 'ngStorage', 'ui.bootstrap','ngIdle']); AIA.constant('pages', [ { // id:0, name: 'Index', pageSlug: 'index', pageUrl: 'index.html', pageController: 'HomeController' }, { // id:1, name: 'Dissectible Anatomy Views List', pageSlug: 'da-view-list', pageUrl: 'app/views/da/da-body-view-list.html', pageController: 'DAController' }, { //id:2, name: 'Dissectible Anatomy Body View', pageSlug: 'da-body-view', pageUrl: 'app/views/da/da-body-view.html', pageController: 'DAController' }, { name: 'Tiny View List', pageSlug: 'tile-view-list', pageUrl: 'app/views/aa/tile-view.html', pageController: 'TileViewListController' }, { // id:3, name: 'Clinical Illustrations', pageSlug: 'clinical-illustrations', pageUrl: 'app/views/ci/ci-view.html', pageController: 'CIController' }, { // id:4, name: 'Clinical Animations', pageSlug: 'clinical-animations', pageUrl: 'app/views/ca/ca-view.html', pageController: 'CAController' }, { // id:5, name: '3D Anatomy', pageSlug: '3d-anatomy-list', pageUrl: 'app/views/3dA/3dA-view.html', pageController: '3dAController' }, { //id:6, name: 'Curriculum Builder', pageSlug: 'curriculum-builder', pageUrl: 'app/views/CBuild/CBuild-view.html', pageController: 'CurrBuildController' }, { //id:7, name: 'Anatomy Tests', pageSlug: 'anatomy-test', pageUrl: 'app/views/AnatTest/AnatTest-view.html', pageController: 'AnatTestController' }, { //id:9, name: 'ADAM Images', pageSlug: 'ADAM-images', pageUrl: 'app/views/ai/ai-view.html', pageController: 'AIController' }, { //id:8, name: 'Lab Exercises', pageSlug: 'lab-exercises', pageUrl: 'app/views/LabExerc/LabExerc-view.html', pageController: 'LabExercController' }, //{ //id:9, // name: 'ADAM Images', // pageSlug: 'ADAM-images', // pageUrl: 'app/views/ADAMImg/ADAMImg-view.html', // pageController: 'ADAMImgController' //}, { //id:10, name: 'ADAM On Demand', pageSlug: 'ADAM-on-demand', pageUrl: 'app/views/AOD/AOD-view.html', pageController: 'AODController' }, { //id:11, name: 'Encyclopedia', pageSlug: 'Link/encyclopedia', pageUrl: 'app/views/Link/Link-view.html', pageController: 'LinkController' }, { //id:12, name: 'IP 10', pageSlug: 'Link/IP-10', pageUrl: 'app/views/Link/Link-view.html', pageController: 'LinkController' }, { //id:13, name: 'In-Depth Reports', pageSlug: 'Link/indepth-reports', pageUrl: 'app/views/Link/Link-view.html', pageController: 'LinkController' }, { //id:14, name: 'Complementary and Alternative Medicine', pageSlug: 'Link/complementary-and-alternate-medicine', pageUrl: 'app/views/Link/Link-view.html', pageController: 'LinkController' }, { //id:15, name: 'Body Guide', pageSlug: 'Link/bodyguide', pageUrl: 'app/views/Link/Link-view.html', pageController: 'LinkController' }, { //id:16, name: 'Health Navigator', pageSlug: 'Link/health-navigator', pageUrl: 'app/views/Link/Link-view.html', pageController: 'LinkController' }, { //id:17, name: 'The Wellness Tools', pageSlug: 'Link/wellness-tools', pageUrl: 'app/views/Link/Link-view.html', pageController: 'LinkController' }, { name: 'A.D.A.M OnDemand', pageSlug: 'AOD-view-detail', pageUrl: 'app/views/AOD/AOD-view-detail.html', pageController: 'AODController' }, { //id:18, name: 'home', pageSlug: 'home', pageUrl: 'app/widget/MainView.html', pageController: 'HomeController' }, { name: 'Tiny View List view', pageSlug: 'module-item-view', pageUrl: 'app/views/aa/module-item-view.html', pageController: 'TileViewListController' }, { // id:3, name: 'Clinical Illustrations View', pageSlug: 'clinical-illustrations-detail', pageUrl: 'app/views/ci/clinical-illustrations-detail.html', pageController: 'CIController' }, { // id:3, name: 'Clinical Animations View', pageSlug: 'clinical-animations-detail', pageUrl: 'app/views/ca/clinical-animations-detail.html', pageController: 'CAController' }, { // id:3, name: 'ADAM Images View', pageSlug: 'adam-images-detail', pageUrl: 'app/views/ai/adam-images-detail.html', pageController: 'AIController' }, { // id:3, name: 'Lab Exercises', pageSlug: 'lab-exercise-view', pageUrl: 'app/views/LabExerc/lab-exercise-view.html', pageController: 'LabExercController' }, { // id:3, name: 'curriculum-builder', pageSlug: 'curriculum-builder-detail', pageUrl: 'app/views/CBuild/curriculum-builder-detail.html', pageController: 'CurrBuildController' }, { // id:3, name: '3D Anatomy', pageSlug: '3d-anatomy-details', pageUrl: 'app/views/3dA/3d-anatomy-details.html', pageController: '3dAController' }, { //added for mypicture name: 'MyPicture', pageSlug: 'my-picture', pageUrl: 'app/views/MyPicture/MyPicture.html', pageController: 'MyPictureController' }, { //added for myanimation name: 'MyAnimation', pageSlug: 'my-animation', pageUrl: 'app/views/MyAnimation/MyAnimation.html', pageController: 'MyAnimationController' }, ]); AIA.constant('DA', [ { ethnicity: 'W', modesty: 'Y', figLeafTermId: '5868', SKIN_START_INTERNAL_LAYER: 100, SKIN_END_INTERNAL_LAYER: 199, SKIN_DEFAULT_INTERNAL_LAYER: 100, ZOOM_TERM_DATA: 50, SKIN_TERM_ID: 1 }, ]); // These constants are same as in Database table ResourceModule, we have to maintain the module order and module id mention in the same order AIA.constant('Modules', [ { Id: 1, Name: 'Dissectible Anatomy', }, { Id: 2, Name: 'Atlas Anatomy', }, { Id: 3, Name: '3D Anatomy', }, { Id: 4, Name: 'Clinical Illustrations', }, { Id: 5, Name: 'Clinical Animations', }, { Id: 6, Name: 'Encyclopedia', }, { Id: 7, Name: 'Curriculum Builder', }, { Id: 8, Name: 'Anatomy Test', }, { Id: 9, Name: 'IP 10', }, { Id: 10, Name: 'Lab Exercises', }, { Id: 11, Name: 'In-Depth Reports', }, { Id: 12, Name: 'CAM', //Complementary and Alternative Medicine' }, { Id: 13, Name: 'A.D.A.M. Images', }, { Id: 14, Name: 'Body Guide', }, { Id: 15, Name: 'Symptom Navigator', //Health Navigator', }, { Id: 16, Name: 'The Wellness Tools', }, { Id: 17, Name: 'A.D.A.M. OnDemand', }, ]); AIA.constant('BodyViewws', [ { Id: 1, Name: 'Male Anterior', }, ]); AIA.constant('BodyRegions', ['Abdomen', 'Body Wall and Back', 'Head and Neck', 'Lower Limb', 'Pelvis and Perineum', 'Thorax', 'Upper Limb']); AIA.constant('BodySystems', ['Cardiovascular', 'Digestive', 'Endocrine', 'Immune', 'Integumentary', 'Lymphatic', 'Muscular', 'Nervous', 'Reproductive', 'Respiratory', 'Skeletal', 'Urinary']); AIA.constant('ViewOrientations', ['Anterior', 'Posterior', 'Lateral', 'Medial', 'Superior', 'Inferior', 'Non-standard']); AIA.constant('MedicalSpecialties', ['Allergy & Immunology', 'Anesthesiology', 'Cardiology', 'Chiropractic', 'Dentistry', 'Dermatology', 'Embryology', 'Emergency Medicine', 'Endocrinology', 'First Aid', 'Gastroenterology', 'General Surgery', 'Geriatrics', 'Hematology', 'Infectious Diseases', 'Microbiology', 'Nuclear Medicine', 'Nephrology', 'Neurology', 'Nutrition', 'Obstetrics and Gynecology (OB/GYN)', 'Oncology (Cancer)', 'Opthalmology', 'Optometry', 'Orthopedics', 'Osteopathy', 'Otolaryngology (ENT)', 'Pathology', 'Pediatrics', 'Physiology', 'Plastic Surgery', 'Podiatry', 'Pulmonary Medicine', 'Radiology', 'Respiratory Therapy', 'Rheumatology', 'Sports Medicine', 'Urology', 'Vascular Medicine', 'Thoracic Surgery']); AIA.constant('ImageTypes', ['Illustration', 'Cadaver Photograph', 'Radiograph']); //login constant. AIA.constant("LoginConstants", { "USER_NOT_FOUND": "User not found.", "ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.", "MAIL_NOT_SENT": "Mail not sent.", "MAIL_SENT": "Mail sent.", "SQL_CONNECTION_ERROR": "We are unable to connect with database. Please contact customer support", "EXCEPTION_OCCURED": "We are facing some issue. Please try to login after sometime.", "E_NO_ERROR": "0", "E_USER_NOT_EXIST": "1", "E_PASSWORD_NOT_MATCH": "2", "E_USER_ID_BLOCKED_24_HRS": "3", "E_USER_NOT_ACTIVE": "4", "E_USER_ID_WILL_BLOCKED": "5", "E_EMAIL_ID_NOT_EXIT": "6", "E_LICENCE_IS_INACTIVE": "7", "E_USER_NOT_MAP_TO_LICENCE_EDITION": "8", "E_NO_ROW_FOUND_LICENCE_TO_EDITION_TABLE": "9", "E_NO_ROW_FOUND_LICENCE_TABLE": "10", "E_SECURITY_QUEST_NOT_MATCH": "11", "E_SEQURITY_ANSWER_NOT_MATCH": "12", "E_FORGOT_USER_ID_EMAIL_ID_NOT_EXIT": "13", "E_TOTAL_NUMBER_LOGIN_EXCEED": "14", "E_FORGOT_PASSWORD_EMAIL_ID_NOT_EXIST": "15", "E_TEST_SETUP_ACCOUNT_USER_NAME_EXIST": "16", "E_TEST_SETUP_ACCOUNT_EMAILID_EXIST": "17", "E_SP_ERROR": "18", "E_ACCOUNT_NUMBER_NOT_EXIST": "19", "E_ACCOUNT_NUMBER_ALREADY_EXIST": "20", "E_TEST_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT": "21", "E_MAIL_COULD_NOT_SENT": "22", "E_RESELLER_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT": "23", "E_LICENSE_TERM_CONDITION": "24", "E_EDITION_NOT_LINKED_WITH_SITE": "25", "E_LOGIN_SESSION_EXPIRE": "26", "E_DISCOUNT_CODE_NOT_EXIST": "27", "E_DISCOUNT_CODE_ALREADY_EXIST": "28", "E_SITE_IP_NOT_NULL": "29", "E_EDITION_ID_NOT_NULL": "30", "E_MASTER_SITEIP_NOT_EXIST": "31", "EDITION_ID_NOT_EXIST": "32", "E_ERROR_LOG": "33", "E_MASTER_SITE_ALREADY_EXIST": "34", "E_ACCOUNT_NUMBER_NOT_NULL": "35", "E_SITE_IP_ALREADY_EXIST": "36", "E_LICENCE_IS_EXPIRED": "37", "E_SINGLEACCOUNT_IS_BEING_USED": "38", "E_DATA_BASE_CONNECTION": "4060", //login failure error constant "ACCOUNT_NUMBER_NOT_NULL": "4", "EDITION_ID_NOT_NULL": "5", "ACCOUNT_NUMBER_NOT_EXIST": "1", "EDITION_NOT_EXIST": "3", "MASTER_SITEIP_NOT_EXIST": "2", "LICENSE_INACTIVE": "6", "SITELICENSE_EXPIRED": "7", "SITELICENSE_NOTSTARTED": "8", "INVALID_CLIENT": "Clinet is not valid", "MSG_NOT_AUTHORIZE_SITE_USER": "User is not authorized.", }); AIA.constant("LoginMessageConstants", { "USER_UPDATE_PROFILE":"Please update your profile first.", "USER_OR_PASSWORD_INCORRECT": "UserId or Password is incorrect.", "RESET_PASSWORD": "Please check you email and reset your password.", "USERID_SENT_IN_EMAIL": "We have sent you userId in email.", "ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.", "MAIL_NOT_SENT": "We are facing some issue in sending email. Please try after sometime.", "MAIL_SENT":"Mail sent.", "INCORRECT_EMAIL_ID": "Invalid e-mail ID. If you do not know your correct e-mail ID please contact A.D.A.M. technical support or your institution's site administrator.", "BLANK_EMAIL_ID": "Please enter your email id.", "PASSWORD_RESET_MESSAGE": "Your password has been reset.", "PASSWORD_RESET_FAILURE": "We are unable to reset your password. Please try again after sometime.", "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.", "PASSWORD_UPDATE_SUCCESS": "Password updated successfully", "PASSWORD_UPDATE_FAILED": "Password update failed", "SUBSCRIPTION_EXPIRATION_MESSAGE": "Your license is expired since ", "SUBSCRIPTION_NOT_START_MESSAGE": "Your license Subscription is not started yet. It will continue on ", "LICENSE_INACTIVE_MESSAGE": "Your license is inactive.", "INVALID_USER": "Invalid UserID", "USER_INACTIVE_MESSAGE": "User ID is inactive.", "INVALID_PASSWORD": "Invalid Password. UserID and password will be disabled if your password is entered incorrectly for five consecutive attempts. If you have forgotten your password, please click on the forgot password link.", "USER_BLOCKED": 'Your User ID has been blocked for 24 hours due to multiple wrong attempts. To unblock please click on "Forgot Password" link on your Login window and select "unblock" option.', "UNBLOCK_SELECTED": "unblock", "FORGOT_PASSWORD_SELECTED": "forgotpwd", "USER_UNBLOCK_LINK_IN_EMAIL": "Please check you email and unblock your account.", "USER_UNBLOCK_SUCCESS": "User unblocked", "USER_UNBLOCK_SUCCESS_MESSAGE": "Your account has been unblocked sucessfully.", "USER_UNBLOCK_FAILED": "Unblock operation failed", "USER_ALREADY_UNBLOCKED": "User already unblocked.", "LICENSE_TERM_CONDITION_UPDATE_SUCCESS": "License Term Accepted field updated successfully.", "LICENSE_TERM_CONDITION_UPDATE_FAILED": "License Term Accepted field update failed.", "UNABLE_TO_UNBLOCK": "We are unable to unblock. Please try after sometime.", //"ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.", //"MAIL_NOT_SENT": "Mail not sent." "E_ACCOUNT_NUMBER_NOT_NULL": "Account number cannot be null", "E_EDITION_ID_NOT_NULL": "Edition Id cannot be zero.", "E_EDITION_NOT_LINKED_WITH_SITE": "Your credentials are invalid. Please contact the site administrator of your institution.", }) AIA.constant("AdminConstants", { "ERROR_IN_SENDING_MAIL": "Some internal error occured.", "MAIL_SENT": "Mail sent.", "MAIL_NOT_SENT": "Mail not sent.", "MAIL_SENT_SUCCESS_MESSAGE": "We have received your request. We will get back to you soon." }) AIA.constant("UserTypeConstants", { "SUPER_ADMIN": "Super Admin", "GENERAL_ADMIN": "General Admin", "DISTRICT_ADMIN": "District Admin", "CLIENT_ADMIN": "Client Admin", "SINGLE_USER": "Single User", "CONCURRENT_USER": "Concurrent User", "RESELLER": "Reseller", "TEST_ACCOUNT": "Test Account", "SITE_USER": "Site User" }) AIA.constant("UserModules", [ { "name": "Dissectible Anatomy", "slug": "da-view-list" }, { "name": "Atlas Anatomy", "slug": "tile-view-list" }, { "name": "3D Anatomy", "slug": "3d-anatomy-list" }, { "name": "Clinical Illustrations", "slug": "clinical-illustrations" }, { "name": "Clinical Animations", "slug": "clinical-animations" }, { "name": "Encyclopedia", "slug": "Link/encyclopedia" }, { "name": "Curriculum Builder", "slug": "curriculum-builder" }, { "name": "Anatomy Tests", "slug": "anatomy-test" }, { "name": "IP 10", "slug": "Link/IP-10" }, { "name": "Lab Exercises", "slug": "lab-exercises" }, { "name": "In-Depth Reports", "slug": "Link/indepth-reports" }, { "name": "Complementary and Alternative Medicine", "slug": "Link/complementary-and-alternate-medicine" }, { "name": "A.D.A.M Images", "slug": "ADAM-images" }, { "name": "Body Guide", "slug": "Link/bodyguide" }, { "name": "Health Navigator", "slug": "Link/health-navigator" }, { "name": "The Wellness Tools", "slug": "Link/wellness-tools" }, { "name": "A.D.A.M OnDemand", "slug": "Link/aod" } ]); AIA.constant("AIAConstants", { "File_API_Not_Supported": "The file API isn't supported on this browser yet.", "File_No_Content_Found": "File couldn't find the element.", "Browser_Not_Supported": "This browser doesn't seem to support the `files` property of file inputs.", "Select_File": "Please select a file before clicking 'Load'.", "Image_File_Format_Not_Supported": "This image file not supported 'jpg/jpeg or png' format.\n Please try again.", "Animation_File_Size_Exceeded": "This Animation video size not allow more than 50MB.\n Please try again.", "Animation_File_Format_Not_Supported": "This Animation video not supported mp4 format.\n Please try again.", "CB_Password_Empty": "Password field is empty. Please try again.", "CB_Password_Not_Match": "Password is not matched. Please try again.", "CB_Password_Required": "password required.", "CB_Confirm_Password": "confirm password required.", "CB_Confirm_Password_Not_Match": "confirm password not matched.", "CB_Add_Slide_First": "Please add slide first to export this section.", "CB_Curriculum_Name_Empty": "Curriculum name is empty!", "NO_COURSE_FOUND": "NO COURSE FOUND", "NO_COURSE_FOUND_MESSAGE": "No Selected A.D.A.M. courses found for this user account. Please contact ADAM.", "NO_BODY_SYSTEM_AVAILABLE": "Selected body system is not available on this layer.", "COOKIES_MESSAGE": "You need to enable your browser's cookies to run this application.", "SAVED_LAB_EXERCISE_NOT_FOUND": "Saved Lab Exercise not found.", "ERROR_IN_FECTHING_DETAILS": "Error in fecthing details.", "PLEASE_ENTER_SEARCH_TEXT": "Please enter the text to search.", "SETTINGS_SAVED": "Your current settings has been saved.", "SETTING_SAVE_ERROR":"There is some error in saving your current settings.\n Please try after sometime.", "SAVE_ANIMATION_ERROR":"There is some error while saving your animation.\n Please try after sometime.", "CB_FILE_FORMAT_ISSUE":"This Curriculum file is not supported. Please try again.", "CONVERT_CB_OLD_TO_NEW_ISSUE":"The system detected some legacy functionality in the selected curriculum that cannot be fully converted to the new format (.json). Please consider recreating the curriculum using the newer version of the curriculum builder, or contact ADAM.\nDo you want to proceed with the conversion?", "OPEN_CB_OLD_TO_NEW_ISSUE":"The selected curriculum is in a legacy format. The system detected some legacy functionality in the curriculum that cannot be completely converted to the new format (.json), and it may not work correctly. Please consider recreating the curriculum using the newer version of the curriculum builder, or contact ADAM.\nDo you want to continue to open the curriculum?", "IMPORT_CB_OLD_TO_NEW_ISSUE":"The selected curriculum is in a legacy format. The system detected some legacy functionality in the curriculum that cannot be completely converted to the new format (.json), and it may not work correctly. Please consider recreating the curriculum using the newer version of the curriculum builder, or contact ADAM.\nDo you want to continue to import the curriculum?", "CB_OLD_SLIDE_ANNOTATION_ISSUE":"This slide contains some legacy version annotations that are not compatible with the newer format of the Curriculum Builder. Please consider recreating the curriculum using the newer version of the curriculum builder, or contact ADAM." }) AIA.config(function ($routeProvider, pages, $locationProvider) { $locationProvider.html5Mode(true); for (var i = 0; i < pages.length; i++) { if (pages[i].pageSlug != null) { $routeProvider. when('/' + pages[i].pageSlug, { templateUrl: pages[i].pageUrl, controller: pages[i].pageController }). when('/Link/:modname', { templateUrl: 'app/views/Link/Link-view.html', controller: 'LinkController' }) .otherwise({ templateUrl: 'app/widget/MainView.html', controller: 'HomeController' }) } } }); AIA.config(function(IdleProvider, KeepaliveProvider) { //default configuration IdleProvider.idle(20*60); // 20 minutes idle IdleProvider.timeout(30); // after 30 seconds idle, time the user out KeepaliveProvider.interval(10); // 10 seconds keep-alive ping IdleProvider.interrupt('keydown mousemove wheel mousedown touchstart touchmove scroll'); })