diff --git a/150-DOCUMENTATION/ADAM-InteractiveAnatomySummary.docx b/150-DOCUMENTATION/ADAM-InteractiveAnatomySummary.docx
new file mode 100644
index 0000000..1468be3
--- /dev/null
+++ b/150-DOCUMENTATION/ADAM-InteractiveAnatomySummary.docx
diff --git a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
index 7128c81..96df1b4 100644
--- a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
+++ b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
@@ -16,35 +16,26 @@ namespace AIAHTML5.API.Models
{
static string dbConnectionString = System.Configuration.ConfigurationManager.AppSettings["AIADatabaseV5Context"];
- static SqlConnection conn;
- static SqlCommand cmd;
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public DBModel() { }
- public static void OpenConnection()
- {
- SqlConnection conn = new SqlConnection(dbConnectionString);
-
- if (conn.State == ConnectionState.Closed)
- conn.Open();
- }
protected static DataSet GetDataFromStoredProcedure(string commandText)
{
logger.Debug(" Inside GetSQLData for command text = " + commandText);
DataSet ds = null;
- SqlConnection conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand(commandText, conn);
- cmd.CommandType = CommandType.StoredProcedure;
- SqlDataAdapter da = new SqlDataAdapter();
- da.SelectCommand = cmd;
- ds = new DataSet();
- da.Fill(ds);
-
+ SqlConnection conn = new SqlConnection(dbConnectionString);
+ SqlCommand cmd = new SqlCommand(commandText, conn);
+ cmd.CommandType = CommandType.StoredProcedure;
+ SqlDataAdapter da = new SqlDataAdapter();
+ da.SelectCommand = cmd;
+ ds = new DataSet();
+ da.Fill(ds);
+
return ds;
}
@@ -54,26 +45,26 @@ namespace AIAHTML5.API.Models
ArrayList arrUserModules = new ArrayList();
- Hashtable userModuleHash = new Hashtable();
+ Hashtable userModuleHash = new Hashtable();
- string sp = DBConstants.GET_ALL_MODULES;
+ string sp = DBConstants.GET_ALL_MODULES;
- DataSet ds = DBModel.GetDataFromStoredProcedure(sp);
+ DataSet ds = DBModel.GetDataFromStoredProcedure(sp);
- if (ds!= null && ds.Tables.Count > 0)
- {
- DataTable dt = ds.Tables[0];
+ if (ds != null && ds.Tables.Count > 0)
+ {
+ DataTable dt = ds.Tables[0];
- foreach (DataRow drModule in dt.Rows)
- {
- userModuleHash = new Hashtable();
- userModuleHash.Add(AIAConstants.KEY_ID, drModule["Id"]);
- userModuleHash.Add(AIAConstants.KEY_NAME, drModule["Name"]);
- userModuleHash.Add(AIAConstants.KEY_SLUG, drModule["Slug"]);
- arrUserModules.Add(userModuleHash);
- }
+ foreach (DataRow drModule in dt.Rows)
+ {
+ userModuleHash = new Hashtable();
+ userModuleHash.Add(AIAConstants.KEY_ID, drModule["Id"]);
+ userModuleHash.Add(AIAConstants.KEY_NAME, drModule["Name"]);
+ userModuleHash.Add(AIAConstants.KEY_SLUG, drModule["Slug"]);
+ arrUserModules.Add(userModuleHash);
}
-
+ }
+
return arrUserModules;
}
@@ -84,55 +75,55 @@ namespace AIAHTML5.API.Models
User objUser = null;
DBModel objModel = new DBModel();
-
- conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- SqlDataAdapter da = new SqlDataAdapter();
- SqlParameter param;
- DataSet ds = new DataSet();
- cmd.Connection = conn;
- cmd.CommandText = DBConstants.GET_USER_DELAILS_BY_LOGIN_ID;
- cmd.CommandType = CommandType.StoredProcedure;
+ SqlConnection conn = new SqlConnection(dbConnectionString);
+ SqlCommand cmd = new SqlCommand();
+ SqlDataAdapter da = new SqlDataAdapter();
+ SqlParameter param;
+ DataSet ds = new DataSet();
- param = new SqlParameter("@sLoginId", loginId);
- param.Direction = ParameterDirection.Input;
- param.DbType = DbType.String;
- cmd.Parameters.Add(param);
-
- da.SelectCommand = cmd;
- DataTable dt = new DataTable();
- da.Fill(dt);
-
-
- if (dt!= null && dt.Rows.Count > 0)
- {
- foreach (DataRow dr in dt.Rows)
- {
- int tempVal;
- DateTime date;
- objUser = new User();
+ cmd.Connection = conn;
+ cmd.CommandText = DBConstants.GET_USER_DELAILS_BY_LOGIN_ID;
+ cmd.CommandType = CommandType.StoredProcedure;
- objUser.Id = Convert.ToInt32(dr["Id"]);
- objUser.FirstName = dr["FirstName"].ToString();
- objUser.LastName = dr["LastName"].ToString();
- objUser.EmailId = dr["EmailId"].ToString();
- objUser.LoginId = dr["LoginId"].ToString();
- objUser.Password = dr["Password"].ToString();
- objUser.SecurityQuestionId =Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null;
- objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ;
- objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null;
- objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
- objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null;
- objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null;
- objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
- objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
- objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
- objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
- }
+ param = new SqlParameter("@sLoginId", loginId);
+ param.Direction = ParameterDirection.Input;
+ param.DbType = DbType.String;
+ cmd.Parameters.Add(param);
+
+ da.SelectCommand = cmd;
+ DataTable dt = new DataTable();
+ da.Fill(dt);
+
+
+ if (dt != null && dt.Rows.Count > 0)
+ {
+ foreach (DataRow dr in dt.Rows)
+ {
+ int tempVal;
+ DateTime date;
+ objUser = new User();
+
+ objUser.Id = Convert.ToInt32(dr["Id"]);
+ objUser.FirstName = dr["FirstName"].ToString();
+ objUser.LastName = dr["LastName"].ToString();
+ objUser.EmailId = dr["EmailId"].ToString();
+ objUser.LoginId = dr["LoginId"].ToString();
+ objUser.Password = dr["Password"].ToString();
+ objUser.SecurityQuestionId = Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null;
+ objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ;
+ objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null;
+ objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
+ objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null;
+ objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null;
+ objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
+ objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
+ objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
+ objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
}
-
-
+ }
+
+
return objUser;
}
@@ -142,33 +133,33 @@ namespace AIAHTML5.API.Models
Hashtable hash = new Hashtable();
- conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- SqlDataAdapter adapter;
- SqlParameter param;
- DataSet ds = new DataSet();
+ SqlConnection conn = new SqlConnection(dbConnectionString);
+ SqlCommand cmd = new SqlCommand();
+ SqlDataAdapter adapter;
+ SqlParameter param;
+ DataSet ds = new DataSet();
- cmd.Connection = conn;
- cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_USER_ID;
- cmd.CommandType = CommandType.StoredProcedure;
+ cmd.Connection = conn;
+ cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_USER_ID;
+ cmd.CommandType = CommandType.StoredProcedure;
- param = new SqlParameter("@iUserId", userId);
- param.Direction = ParameterDirection.Input;
- param.DbType = DbType.Int32;
- cmd.Parameters.Add(param);
+ param = new SqlParameter("@iUserId", userId);
+ param.Direction = ParameterDirection.Input;
+ param.DbType = DbType.Int32;
+ cmd.Parameters.Add(param);
- adapter = new SqlDataAdapter(cmd);
- adapter.Fill(ds);
+ adapter = new SqlDataAdapter(cmd);
+ adapter.Fill(ds);
- if (ds!= null && ds.Tables.Count > 0)
+ if (ds != null && ds.Tables.Count > 0)
+ {
+ if (ds.Tables[0].Rows.Count > 0)
{
- if (ds.Tables[0].Rows.Count > 0)
- {
- hash.Add(AIAConstants.LICENSE_KEY_ID, ds.Tables[0].Rows[0][0]);
- hash.Add(AIAConstants.EDITION_KEY_ID, ds.Tables[0].Rows[0][1]);
- }
+ hash.Add(AIAConstants.LICENSE_KEY_ID, ds.Tables[0].Rows[0][0]);
+ hash.Add(AIAConstants.EDITION_KEY_ID, ds.Tables[0].Rows[0][1]);
}
-
+ }
+
return hash;
}
@@ -178,45 +169,45 @@ namespace AIAHTML5.API.Models
ArrayList userModulelist = new ArrayList();
- Hashtable modulesHash;
- DataSet ds = new DataSet();
+ Hashtable modulesHash;
+ DataSet ds = new DataSet();
- conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- SqlDataAdapter adapter;
- SqlParameter param;
+ SqlConnection conn = new SqlConnection(dbConnectionString);
+ SqlCommand cmd = new SqlCommand();
+ SqlDataAdapter adapter;
+ SqlParameter param;
- cmd.Connection = conn;
- cmd.CommandText = DBConstants.GET_USER_MODULES_BY_LICENSE_ID;
- cmd.CommandType = CommandType.StoredProcedure;
+ cmd.Connection = conn;
+ cmd.CommandText = DBConstants.GET_USER_MODULES_BY_LICENSE_ID;
+ cmd.CommandType = CommandType.StoredProcedure;
- param = new SqlParameter("@iLicenseId", licenseId);
- param.Direction = ParameterDirection.Input;
- param.DbType = DbType.Int32;
- cmd.Parameters.Add(param);
+ param = new SqlParameter("@iLicenseId", licenseId);
+ param.Direction = ParameterDirection.Input;
+ param.DbType = DbType.Int32;
+ cmd.Parameters.Add(param);
- adapter = new SqlDataAdapter(cmd);
- adapter.Fill(ds);
-
+ adapter = new SqlDataAdapter(cmd);
+ adapter.Fill(ds);
- if (ds!=null && ds.Tables.Count > 0)
- {
- DataTable dt = ds.Tables[0];
- if (dt.Rows.Count > 0)
+ if (ds != null && ds.Tables.Count > 0)
+ {
+ DataTable dt = ds.Tables[0];
+
+ if (dt.Rows.Count > 0)
+ {
+ foreach (DataRow dr in dt.Rows)
{
- foreach (DataRow dr in dt.Rows)
- {
- modulesHash = new Hashtable();
- modulesHash.Add(AIAConstants.KEY_ID, dr["Id"]);
- modulesHash.Add(AIAConstants.KEY_NAME, dr["Title"]);
- modulesHash.Add(AIAConstants.KEY_SLUG, dr["Slug"]);
- userModulelist.Add(modulesHash);
- }
+ modulesHash = new Hashtable();
+ modulesHash.Add(AIAConstants.KEY_ID, dr["Id"]);
+ modulesHash.Add(AIAConstants.KEY_NAME, dr["Title"]);
+ modulesHash.Add(AIAConstants.KEY_SLUG, dr["Slug"]);
+ userModulelist.Add(modulesHash);
}
}
-
-
+ }
+
+
return userModulelist;
}
@@ -264,57 +255,57 @@ namespace AIAHTML5.API.Models
User objUser = null;
DBModel objModel = new DBModel();
- conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- SqlDataAdapter adapter;
- SqlParameter param;
- DataSet ds = new DataSet();
+ SqlConnection conn = new SqlConnection(dbConnectionString);
+ SqlCommand cmd = new SqlCommand();
+ SqlDataAdapter adapter;
+ SqlParameter param;
+ DataSet ds = new DataSet();
- cmd.Connection = conn;
- cmd.CommandText = DBConstants.GET_USER_DETAILS_BY_EMAILID;
- cmd.CommandType = CommandType.StoredProcedure;
+ cmd.Connection = conn;
+ cmd.CommandText = DBConstants.GET_USER_DETAILS_BY_EMAILID;
+ cmd.CommandType = CommandType.StoredProcedure;
- param = new SqlParameter("@sEmailId", emailId);
- param.Direction = ParameterDirection.Input;
- param.DbType = DbType.String;
- cmd.Parameters.Add(param);
+ param = new SqlParameter("@sEmailId", emailId);
+ param.Direction = ParameterDirection.Input;
+ param.DbType = DbType.String;
+ cmd.Parameters.Add(param);
- adapter = new SqlDataAdapter(cmd);
- adapter.Fill(ds);
+ adapter = new SqlDataAdapter(cmd);
+ adapter.Fill(ds);
- if (ds!= null && ds.Tables.Count > 0)
- {
- DataTable dt = ds.Tables[0];
+ if (ds != null && ds.Tables.Count > 0)
+ {
+ DataTable dt = ds.Tables[0];
- if (dt.Rows.Count > 0)
+ if (dt.Rows.Count > 0)
+ {
+ foreach (DataRow dr in dt.Rows)
{
- foreach (DataRow dr in dt.Rows)
- {
- int tempVal;
- DateTime date;
- objUser = new User();
-
- objUser.Id = Convert.ToInt32(dr["Id"]);
- objUser.FirstName = dr["FirstName"].ToString();
- objUser.LastName = dr["LastName"].ToString();
- objUser.EmailId = dr["EmailId"].ToString();
- objUser.LoginId = dr["LoginId"].ToString();
- objUser.Password = dr["Password"].ToString();
- objUser.SecurityQuestionId = Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null;
- objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ;
- objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null;
- objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
- objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null;
- objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null;
- objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
- objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
- objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
- objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
- }
+ int tempVal;
+ DateTime date;
+ objUser = new User();
+
+ objUser.Id = Convert.ToInt32(dr["Id"]);
+ objUser.FirstName = dr["FirstName"].ToString();
+ objUser.LastName = dr["LastName"].ToString();
+ objUser.EmailId = dr["EmailId"].ToString();
+ objUser.LoginId = dr["LoginId"].ToString();
+ objUser.Password = dr["Password"].ToString();
+ objUser.SecurityQuestionId = Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null;
+ objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ;
+ objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null;
+ objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
+ objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null;
+ objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null;
+ objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
+ objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
+ objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
+ objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
}
}
-
+ }
+
return objUser;
}
@@ -324,19 +315,20 @@ namespace AIAHTML5.API.Models
int result = 0;
+ SqlConnection conn = null;
try
{
conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- cmd.Connection = conn;
+ SqlCommand cmd = new SqlCommand();
conn.Open();
+ cmd.Connection = conn;
cmd.CommandText = DBConstants.UPDATE_USER_PASSWORD;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@sLoginId", loginId);
cmd.Parameters.AddWithValue("@sEmailId", emailId);
cmd.Parameters.AddWithValue("@sNewPassword", userInfo["newPassword"].ToString());
result = cmd.ExecuteNonQuery();
-
+
}
catch (SqlException ex)
{
@@ -356,53 +348,53 @@ namespace AIAHTML5.API.Models
logger.Debug(" Inside GetLicenseSubscriptionDetailsByLicenseId for LicenseId = " + licenseId);
LicenseSubscriptionDetails licenseSubscriptionDetails = null;
-
- conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- SqlDataAdapter adapter;
- SqlParameter param;
- DataSet ds = new DataSet();
- cmd.Connection = conn;
- cmd.CommandText = DBConstants.GET_SUBSCRIPTION_DETAILS_BY_LICENSE_ID;
- cmd.CommandType = CommandType.StoredProcedure;
+ SqlConnection conn = new SqlConnection(dbConnectionString);
+ SqlCommand cmd = new SqlCommand();
+ SqlDataAdapter adapter;
+ SqlParameter param;
+ DataSet ds = new DataSet();
- param = new SqlParameter("@iLicenseId", licenseId);
- param.Direction = ParameterDirection.Input;
- param.DbType = DbType.Int32;
- cmd.Parameters.Add(param);
+ cmd.Connection = conn;
+ cmd.CommandText = DBConstants.GET_SUBSCRIPTION_DETAILS_BY_LICENSE_ID;
+ cmd.CommandType = CommandType.StoredProcedure;
- adapter = new SqlDataAdapter(cmd);
- adapter.Fill(ds);
+ param = new SqlParameter("@iLicenseId", licenseId);
+ param.Direction = ParameterDirection.Input;
+ param.DbType = DbType.Int32;
+ cmd.Parameters.Add(param);
- if (ds!= null && ds.Tables.Count > 0)
- {
- licenseSubscriptionDetails = new LicenseSubscriptionDetails();
- DataTable dt = ds.Tables[0];
+ adapter = new SqlDataAdapter(cmd);
+ adapter.Fill(ds);
- if (dt.Rows.Count > 0)
+ if (ds != null && ds.Tables.Count > 0)
+ {
+ licenseSubscriptionDetails = new LicenseSubscriptionDetails();
+ DataTable dt = ds.Tables[0];
+
+ if (dt.Rows.Count > 0)
+ {
+ foreach (DataRow dr in dt.Rows)
{
- foreach (DataRow dr in dt.Rows)
- {
- int tempVal;
- DateTime date;
- licenseSubscriptionDetails.Id = Convert.ToInt32(dr["Id"]);
- licenseSubscriptionDetails.LicenseId = Convert.ToInt32(dr["LicenseId"]);
- licenseSubscriptionDetails.SubscriptionPlanId = Int32.TryParse(dr["SubscriptionPlanId"].ToString(), out tempVal) ? tempVal : (int?)null;
- licenseSubscriptionDetails.SubscriptionValidFrom = DateTime.TryParse(dr["SubscriptionValidFrom"].ToString(), out date) ? date : (DateTime?)null;
- licenseSubscriptionDetails.SubscriptionValidThrough = DateTime.TryParse(dr["SubscriptionValidThrough"].ToString(), out date) ? date : (DateTime?)null;
- licenseSubscriptionDetails.RenewalDate = DateTime.TryParse(dr["RenewalDate"].ToString(), out date) ? date : (DateTime?)null;
- licenseSubscriptionDetails.PaymentMode = dr["PaymentMode"].ToString();
- licenseSubscriptionDetails.TotalAmount = Convert.ToDouble(dr["TotalAmount"]);
- licenseSubscriptionDetails.AmountPaid = Convert.ToDouble(dr["AmountPaid"]);
- licenseSubscriptionDetails.AmountPending = Convert.ToDouble(dr["AmountPending"]);
- licenseSubscriptionDetails.NoOfImages = Convert.ToInt32(dr["NoofImages"]);
- }
+ int tempVal;
+ DateTime date;
+ licenseSubscriptionDetails.Id = Convert.ToInt32(dr["Id"]);
+ licenseSubscriptionDetails.LicenseId = Convert.ToInt32(dr["LicenseId"]);
+ licenseSubscriptionDetails.SubscriptionPlanId = Int32.TryParse(dr["SubscriptionPlanId"].ToString(), out tempVal) ? tempVal : (int?)null;
+ licenseSubscriptionDetails.SubscriptionValidFrom = DateTime.TryParse(dr["SubscriptionValidFrom"].ToString(), out date) ? date : (DateTime?)null;
+ licenseSubscriptionDetails.SubscriptionValidThrough = DateTime.TryParse(dr["SubscriptionValidThrough"].ToString(), out date) ? date : (DateTime?)null;
+ licenseSubscriptionDetails.RenewalDate = DateTime.TryParse(dr["RenewalDate"].ToString(), out date) ? date : (DateTime?)null;
+ licenseSubscriptionDetails.PaymentMode = dr["PaymentMode"].ToString();
+ licenseSubscriptionDetails.TotalAmount = Convert.ToDouble(dr["TotalAmount"]);
+ licenseSubscriptionDetails.AmountPaid = Convert.ToDouble(dr["AmountPaid"]);
+ licenseSubscriptionDetails.AmountPending = Convert.ToDouble(dr["AmountPending"]);
+ licenseSubscriptionDetails.NoOfImages = Convert.ToInt32(dr["NoofImages"]);
}
}
-
-
-
+ }
+
+
+
return licenseSubscriptionDetails;
}
@@ -411,65 +403,65 @@ namespace AIAHTML5.API.Models
logger.Debug(" inside GetLicenseDetailsByLicenseId for LicenseId = " + licenseId);
License license = null;
-
- conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- SqlDataAdapter adapter;
- SqlParameter param;
- DataSet ds = new DataSet();
- cmd.Connection = conn;
- cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_ID;
- cmd.CommandType = CommandType.StoredProcedure;
+ SqlConnection conn = new SqlConnection(dbConnectionString);
+ SqlCommand cmd = new SqlCommand();
+ SqlDataAdapter adapter;
+ SqlParameter param;
+ DataSet ds = new DataSet();
+
+ cmd.Connection = conn;
+ cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_ID;
+ cmd.CommandType = CommandType.StoredProcedure;
- param = new SqlParameter("@Id", licenseId);
- param.Direction = ParameterDirection.Input;
- param.DbType = DbType.Int32;
- cmd.Parameters.Add(param);
+ param = new SqlParameter("@Id", licenseId);
+ param.Direction = ParameterDirection.Input;
+ param.DbType = DbType.Int32;
+ cmd.Parameters.Add(param);
- adapter = new SqlDataAdapter(cmd);
- adapter.Fill(ds);
+ adapter = new SqlDataAdapter(cmd);
+ adapter.Fill(ds);
- if (ds!= null && ds.Tables.Count > 0)
+ if (ds != null && ds.Tables.Count > 0)
+ {
+
+ DataTable dt = ds.Tables[0];
+ if (dt.Rows.Count > 0)
{
-
- DataTable dt = ds.Tables[0];
- if (dt.Rows.Count > 0)
- {
- license = new License();
+ license = new License();
- foreach (DataRow dr in dt.Rows)
- {
- DateTime date;
- license.Id = Convert.ToInt32(dr["Id"]);
- license.AccountNumber = dr["AccountNumber"].ToString();
- license.LicenseeFirstName = dr["LicenseeFirstName"].ToString();
- license.LicenseeLastName = dr["LicenseeLastName"].ToString();
- license.LicenseTypeId = Convert.ToInt32(dr["LicenseTypeId"]);
- license.InstitutionName = dr["InstitutionName"].ToString();
- license.Address1 = dr["Address1"].ToString();
- license.Address2 = dr["Address2"].ToString();
- license.CountryId = Convert.ToInt32(dr["CountryId"]);
- license.StateId = Convert.ToInt32(dr["StateId"]);
- license.City = dr["City"].ToString();
- license.Zip = dr["Zip"].ToString();
- license.Phone = dr["Phone"].ToString();
- license.EmailId = dr["EmailId"].ToString();
- license.TotalLogins = Convert.ToInt32(dr["TotalLogins"]);
- license.AccountTypeId = Convert.ToInt32(dr["AccountTypeId"]);
- license.IsActive = Convert.ToBoolean(dr["IsActive"]);
- license.IsDistrictSiteLicense = Convert.ToBoolean(dr["IsDistrictSiteLicense"]);
- license.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
- license.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
- license.NoOfRenewals = Convert.ToInt32(dr["NoOfRenewals"]);
- license.IsTermAccepted = Convert.ToBoolean(dr["IsTermsAccepted"]);
- license.ProductId = dr["ProductId"].ToString();
- }
+ foreach (DataRow dr in dt.Rows)
+ {
+ DateTime date;
+ license.Id = Convert.ToInt32(dr["Id"]);
+ license.AccountNumber = dr["AccountNumber"].ToString();
+ license.LicenseeFirstName = dr["LicenseeFirstName"].ToString();
+ license.LicenseeLastName = dr["LicenseeLastName"].ToString();
+ license.LicenseTypeId = Convert.ToInt32(dr["LicenseTypeId"]);
+ license.InstitutionName = dr["InstitutionName"].ToString();
+ license.Address1 = dr["Address1"].ToString();
+ license.Address2 = dr["Address2"].ToString();
+ license.CountryId = Convert.ToInt32(dr["CountryId"]);
+ license.StateId = Convert.ToInt32(dr["StateId"]);
+ license.City = dr["City"].ToString();
+ license.Zip = dr["Zip"].ToString();
+ license.Phone = dr["Phone"].ToString();
+ license.EmailId = dr["EmailId"].ToString();
+ license.TotalLogins = Convert.ToInt32(dr["TotalLogins"]);
+ license.AccountTypeId = Convert.ToInt32(dr["AccountTypeId"]);
+ license.IsActive = Convert.ToBoolean(dr["IsActive"]);
+ license.IsDistrictSiteLicense = Convert.ToBoolean(dr["IsDistrictSiteLicense"]);
+ license.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
+ license.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
+ license.NoOfRenewals = Convert.ToInt32(dr["NoOfRenewals"]);
+ license.IsTermAccepted = Convert.ToBoolean(dr["IsTermsAccepted"]);
+ license.ProductId = dr["ProductId"].ToString();
}
}
-
-
-
+ }
+
+
+
return license;
}
@@ -478,18 +470,18 @@ namespace AIAHTML5.API.Models
logger.Debug(" inside UpdateLicenseTermStatus for AccountNumber = " + accountNumber);
int result = 0;
-
+ SqlConnection conn = null;
try
- {
+ {
conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- cmd.Connection = conn;
+ SqlCommand cmd = new SqlCommand();
conn.Open();
+ cmd.Connection = conn;
cmd.CommandText = DBConstants.UPDATE_LICENSE_TERM_STATUS;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@sAccountNumber", accountNumber);
result = cmd.ExecuteNonQuery();
-
+
}
catch (SqlException ex)
{
@@ -509,28 +501,28 @@ namespace AIAHTML5.API.Models
ArrayList arrTermsAndConditions = new ArrayList();
-
- Hashtable contentHash = null;
- string str = string.Empty;
- string spName = DBConstants.GET_TERMS_AND_CONDITIONS;
- DataSet ds = DBModel.GetDataFromStoredProcedure(spName);
- if (ds!= null && ds.Tables.Count > 0)
+ Hashtable contentHash = null;
+ string str = string.Empty;
+ string spName = DBConstants.GET_TERMS_AND_CONDITIONS;
+ DataSet ds = DBModel.GetDataFromStoredProcedure(spName);
+
+ if (ds != null && ds.Tables.Count > 0)
+ {
+ DataTable dt = ds.Tables[0];
+ if (dt.Rows.Count > 0)
{
- DataTable dt = ds.Tables[0];
- if (dt.Rows.Count > 0)
+ foreach (DataRow dr in dt.Rows)
{
- foreach (DataRow dr in dt.Rows)
- {
- contentHash = new Hashtable();
- contentHash.Add(AIAConstants.KEY_TITLE, dr["Title"]);
- contentHash.Add(AIAConstants.KEY_CONTENT, dr["Content"]);
- arrTermsAndConditions.Add(contentHash);
- }
+ contentHash = new Hashtable();
+ contentHash.Add(AIAConstants.KEY_TITLE, dr["Title"]);
+ contentHash.Add(AIAConstants.KEY_CONTENT, dr["Content"]);
+ arrTermsAndConditions.Add(contentHash);
}
}
-
-
+ }
+
+
return arrTermsAndConditions;
}
@@ -539,12 +531,13 @@ namespace AIAHTML5.API.Models
logger.Debug(" inside InsertLoginDetails for UserId= " + userId);
int result = 0;
+ SqlConnection conn = null;
try
{
conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- cmd.Connection = conn;
+ SqlCommand cmd = new SqlCommand();
conn.Open();
+ cmd.Connection = conn;
cmd.CommandText = DBConstants.INSERT_LOGIN_DETAIL;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@iUserId", userId);
@@ -568,12 +561,13 @@ namespace AIAHTML5.API.Models
logger.Debug(" inside InsertIncorrectLoginAttempts for UserId= " + userId);
int result = 0;
+ SqlConnection conn = null;
try
{
conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- cmd.Connection = conn;
+ SqlCommand cmd = new SqlCommand();
conn.Open();
+ cmd.Connection = conn;
cmd.CommandText = DBConstants.INSERT_INCORRECT_LOGIN_ATTEMPTS;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@iUserId", userId);
@@ -596,35 +590,35 @@ namespace AIAHTML5.API.Models
logger.Debug(" inside GetIncorrectLoginAttempts for UserId = " + userId);
int count = 0;
-
- conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- cmd.Connection = conn;
- cmd.CommandText = DBConstants.GET_INCORRECT_LOGIN_ATTEMPTS;
- cmd.CommandType = CommandType.StoredProcedure;
- cmd.Parameters.AddWithValue("@iUserId", userId);
- SqlDataAdapter da = new SqlDataAdapter();
- da.SelectCommand = cmd;
- DataSet ds = new DataSet();
- da.Fill(ds);
- if (ds!= null && ds.Tables.Count > 0)
- {
- DataTable dt = ds.Tables[0];
+ SqlConnection conn = new SqlConnection(dbConnectionString);
+ SqlCommand cmd = new SqlCommand();
+ cmd.Connection = conn;
+ cmd.CommandText = DBConstants.GET_INCORRECT_LOGIN_ATTEMPTS;
+ cmd.CommandType = CommandType.StoredProcedure;
+ cmd.Parameters.AddWithValue("@iUserId", userId);
+ SqlDataAdapter da = new SqlDataAdapter();
+ da.SelectCommand = cmd;
+ DataSet ds = new DataSet();
+ da.Fill(ds);
+
+ if (ds != null && ds.Tables.Count > 0)
+ {
+ DataTable dt = ds.Tables[0];
- if (dt.Rows.Count > 0)
+ if (dt.Rows.Count > 0)
+ {
+ foreach (DataRow dr in dt.Rows)
{
- foreach (DataRow dr in dt.Rows)
+ foreach (DataColumn dc in dt.Columns)
{
- foreach (DataColumn dc in dt.Columns)
- {
- count = Convert.ToInt32(dr[dc]);
- }
+ count = Convert.ToInt32(dr[dc]);
}
}
}
-
-
+ }
+
+
return count;
}
@@ -633,12 +627,13 @@ namespace AIAHTML5.API.Models
logger.Debug(" inside UpdateIncorrectLoginAttempts for UserId= " + userId);
int result = 0;
+ SqlConnection conn = null;
try
{
conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- cmd.Connection = conn;
+ SqlCommand cmd = new SqlCommand();
conn.Open();
+ cmd.Connection = conn;
cmd.CommandText = DBConstants.UPDATE_INCORRECT_LOGIN_ATTEMPTS;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@iUserId", userId);
@@ -661,12 +656,13 @@ namespace AIAHTML5.API.Models
logger.Debug(" inside DeleteIncorrectLoginAttempts for UserId= " + userId);
int result = 0;
+ SqlConnection conn = null;
try
{
conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- cmd.Connection = conn;
+ SqlCommand cmd = new SqlCommand();
conn.Open();
+ cmd.Connection = conn;
cmd.CommandText = DBConstants.DELETE_INCORRECT_LOGIN_ATTEMPTS;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@iUserId", userId);
@@ -690,28 +686,28 @@ namespace AIAHTML5.API.Models
ArrayList failureCauseList = new ArrayList();
- Hashtable fcHash = null;
+ Hashtable fcHash = null;
- string sp = DBConstants.GET_ALL_LOGIN_FAILURE_CAUSES;
+ string sp = DBConstants.GET_ALL_LOGIN_FAILURE_CAUSES;
- DataSet ds = DBModel.GetDataFromStoredProcedure(sp);
+ DataSet ds = DBModel.GetDataFromStoredProcedure(sp);
- if (ds.Tables.Count > 0)
- {
- DataTable dt = ds.Tables[0];
+ if (ds.Tables.Count > 0)
+ {
+ DataTable dt = ds.Tables[0];
- if (dt.Rows.Count > 0)
+ if (dt.Rows.Count > 0)
+ {
+ foreach (DataRow drFailureCause in dt.Rows)
{
- foreach (DataRow drFailureCause in dt.Rows)
- {
- fcHash = new Hashtable();
- fcHash.Add(AIAConstants.KEY_ID, drFailureCause["Id"]);
- fcHash.Add(AIAConstants.KEY_DESCRIPTION, drFailureCause["Description"]);
- failureCauseList.Add(fcHash);
- }
+ fcHash = new Hashtable();
+ fcHash.Add(AIAConstants.KEY_ID, drFailureCause["Id"]);
+ fcHash.Add(AIAConstants.KEY_DESCRIPTION, drFailureCause["Description"]);
+ failureCauseList.Add(fcHash);
}
}
-
+ }
+
return failureCauseList;
}
@@ -720,12 +716,13 @@ namespace AIAHTML5.API.Models
logger.Debug(" inside InsertUserLoginLog for AccountNumber= " + accountNumber);
int result = 0;
+ SqlConnection conn = null;
try
{
conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- cmd.Connection = conn;
+ SqlCommand cmd = new SqlCommand();
conn.Open();
+ cmd.Connection = conn;
cmd.CommandText = DBConstants.INSERT_LOGIN_ERROR_LOG;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@nvAccountNumber", accountNumber);
@@ -754,35 +751,35 @@ namespace AIAHTML5.API.Models
BlockedUser blockedUser = null;
DataTable dt = null;
-
- conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- cmd.Connection = conn;
- cmd.CommandText = DBConstants.GET_BLOCKED_USER_BY_USER_ID;
- cmd.CommandType = CommandType.StoredProcedure;
- cmd.Parameters.AddWithValue("@userId", userId);
- SqlDataAdapter da = new SqlDataAdapter();
- da.SelectCommand = cmd;
- dt = new DataTable();
- da.Fill(dt);
- if (dt!= null && dt.Rows.Count > 0)
+ SqlConnection conn = new SqlConnection(dbConnectionString);
+ SqlCommand cmd = new SqlCommand();
+ cmd.Connection = conn;
+ cmd.CommandText = DBConstants.GET_BLOCKED_USER_BY_USER_ID;
+ cmd.CommandType = CommandType.StoredProcedure;
+ cmd.Parameters.AddWithValue("@userId", userId);
+ SqlDataAdapter da = new SqlDataAdapter();
+ da.SelectCommand = cmd;
+ dt = new DataTable();
+ da.Fill(dt);
+
+ if (dt != null && dt.Rows.Count > 0)
+ {
+ blockedUser = new BlockedUser();
+ foreach (DataRow dr in dt.Rows)
{
- blockedUser = new BlockedUser();
- foreach (DataRow dr in dt.Rows)
- {
- blockedUser.Id = Convert.ToInt32(dr["Id"]);
- blockedUser.FirstName = dr["FirstName"].ToString();
- blockedUser.LastName = dr["LastName"].ToString();
- blockedUser.EmailId = dr["EmailId"].ToString();
- blockedUser.LoginId = dr["LoginId"].ToString();
- blockedUser.Password = dr["Password"].ToString();
- blockedUser.AccountNumber = dr["AccountNumber"].ToString();
- blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]);
- }
+ blockedUser.Id = Convert.ToInt32(dr["Id"]);
+ blockedUser.FirstName = dr["FirstName"].ToString();
+ blockedUser.LastName = dr["LastName"].ToString();
+ blockedUser.EmailId = dr["EmailId"].ToString();
+ blockedUser.LoginId = dr["LoginId"].ToString();
+ blockedUser.Password = dr["Password"].ToString();
+ blockedUser.AccountNumber = dr["AccountNumber"].ToString();
+ blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]);
}
-
-
+ }
+
+
return blockedUser;
}
@@ -793,39 +790,39 @@ namespace AIAHTML5.API.Models
ArrayList blockedUsersList = new ArrayList();
BlockedUser blockedUser = null;
DataTable dt = null;
-
- conn = new SqlConnection(dbConnectionString);
- cmd = new SqlCommand();
- cmd.Connection = conn;
- cmd.CommandText = DBConstants.GET_BLOCKED_USERS_BY_USER_TYPE;
- cmd.CommandType = CommandType.StoredProcedure;
- cmd.Parameters.AddWithValue("@iUserTypeId", userTypeId);
- SqlDataAdapter da = new SqlDataAdapter();
- da.SelectCommand = cmd;
- dt = new DataTable();
- da.Fill(dt);
- if (dt.Rows.Count > 0)
+ SqlConnection conn = new SqlConnection(dbConnectionString);
+ SqlCommand cmd = new SqlCommand();
+ cmd.Connection = conn;
+ cmd.CommandText = DBConstants.GET_BLOCKED_USERS_BY_USER_TYPE;
+ cmd.CommandType = CommandType.StoredProcedure;
+ cmd.Parameters.AddWithValue("@iUserTypeId", userTypeId);
+ SqlDataAdapter da = new SqlDataAdapter();
+ da.SelectCommand = cmd;
+ dt = new DataTable();
+ da.Fill(dt);
+
+ if (dt.Rows.Count > 0)
+ {
+ foreach (DataRow dr in dt.Rows)
{
- foreach (DataRow dr in dt.Rows)
- {
- blockedUser = new BlockedUser();
-
- blockedUser.Id = Convert.ToInt32(dr["Id"]);
- blockedUser.FirstName = dr["FirstName"].ToString();
- blockedUser.LastName = dr["LastName"].ToString();
- blockedUser.EmailId = dr["EmailId"].ToString();
- blockedUser.LoginId = dr["LoginId"].ToString();
- blockedUser.Password = dr["Password"].ToString();
- blockedUser.AccountNumber = dr["AccountNumber"].ToString();
- blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]);
-
- blockedUsersList.Add(blockedUser);
- }
+ blockedUser = new BlockedUser();
+
+ blockedUser.Id = Convert.ToInt32(dr["Id"]);
+ blockedUser.FirstName = dr["FirstName"].ToString();
+ blockedUser.LastName = dr["LastName"].ToString();
+ blockedUser.EmailId = dr["EmailId"].ToString();
+ blockedUser.LoginId = dr["LoginId"].ToString();
+ blockedUser.Password = dr["Password"].ToString();
+ blockedUser.AccountNumber = dr["AccountNumber"].ToString();
+ blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]);
+
+ blockedUsersList.Add(blockedUser);
}
-
-
-
+ }
+
+
+
return blockedUsersList;
}
@@ -862,7 +859,7 @@ namespace AIAHTML5.API.Models
throw;
}
- return result;
+ return result;
}
}
}
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
index 3d76088..1f0970c 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
@@ -560,7 +560,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
theme: 'success',
currentController: 'CAController',
parentSlug: 'clinical-animations',
- content: '
' + $scope.clickedCASummary + '
',
//ajax: {
// url: 'app/views/ca/ca-view-detail.html'
@@ -611,6 +611,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
if ($('.jsPanel-content').length > 0) {
$('.video-subtitle').css('margin-bottom', blackBorderHeight);
$('#divplayerinlineVideo').css('background', '#fff');
+ //Android > Clinical Animations > The animation does not fit to the screen in the Landscape mode.
+ var $ua = navigator.userAgent;
+ if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { $('.jsPanel-content').css("width", "100%"); }
}
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
index 200f1f8..b523f32 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -113,7 +113,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.IsSearchVisible = false;
$scope.shapesize = 1;
-
+ $scope.CurrentStructure = "active";
//array for bodyviewid correspoing to male female(used for gender change)
$scope.correspondingBodyViewIds = {
'1': '5',
@@ -290,6 +290,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
//to disbale layer change slider
$('.ui-slider').slider('disable');
+ // document.getElementById('txtlayerNumber').style.pointerEvents = "none";
+ $("#txtlayerNumber").prop('disabled', true);
+
$scope.isLoading = true;
$('#spinner').css('visibility', 'visible');
@@ -304,7 +307,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
//to enable layer change slider
$('.ui-slider').slider('enable');
-
+ // document.getElementById('txtlayerNumber').style.pointerEvents = "auto";
+ $("#txtlayerNumber").prop('disabled', false);
$scope.isLoading = false;
$('#spinner').css('visibility', 'hidden');
@@ -3012,7 +3016,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.highlightedBR = [];
- // if ($scope.layerNumber == 224) {
var matchedTermListPath = '~/../content/data/json/da/body-views/1/BodySystem_' + $rootScope.systemNumber + '.json';
var grayImageDataVar = null;
@@ -3029,19 +3032,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$('#spinner').css('visibility', 'hidden');
//remove existing data and draw fresh data
- for (var i = 0; i < $rootScope.grayImageDataList.length; i++) {
- var grayCanvasID = 'imageCanvas' + parseInt(i + 1);
- var grayCanvas = document.getElementById(grayCanvasID);
+ $scope.removeCurrentHighlightedBodySystem();
- if (grayCanvas != null) {
- var grayCanvasContext = grayCanvas.getContext("2d");
-
- var canvasHeight = grayCanvas.height;
- var canvasWidth = grayCanvas.width;
- grayCanvasContext.clearRect(0, 0, canvasHeight, canvasWidth)
- grayCanvasContext.putImageData($rootScope.grayImageDataList[parseInt(i)], 0, 0);
- }
- }
$scope.message = AIAConstants.NO_BODY_SYSTEM_AVAILABLE;
@@ -4920,10 +4912,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
//0. get current layer number
- if (isResized) {
+ if (isResized || isLayerChanged) {
//do nothing
- }
- else if (isLayerChanged) {
+ $scope.transNumber = 100;
+ $(".slider").slider('value', 100);
}
else {
@@ -5439,8 +5431,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.DrawOnTBWithSelectedTransparency = function (tempCanvasID, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage, Height, Width, bodyRegionId, isLayerChanged, isResized) {
-
-
var transNumber = $scope.transNumber;//txtTransparencyChange.value;
//this changes the transparency when transparency is already activated and user resizes or chage the layer
@@ -5465,12 +5455,17 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
tempCtx.putImageData(imageD, 0, 0);
//}
}
+
+
+
// set every fourth value to the desired number of transparency
var imageD1 = tempCtx.getImageData(0, 0, Width, Height);
var imageData1 = imageD1.data;
var length = imageData.length;
for (var i = 3; i < length; i += 4) {
+
+
if ($scope.voId == "9" || $scope.voId == "11") {
if (imageData1[i] == 0) {
@@ -8492,89 +8487,120 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.systemNumber = event.currentTarget.id;
+ if ($rootScope.systemNumber == 0) {
- //NIKITA
- $rootScope.isHighlightBodyByBodySystem = true;
- $scope.systemMatchedTermList = new jinqJs()
- .from($rootScope.BodySystemData.BodySystem.BodySystemTerm)
- .where('_SystemNumber == ' + event.currentTarget.id)
- .select();
-
- if ($rootScope.isHighLight == false) {
- //color the body gray
- $rootScope.isHighLight = true
- console.log('highLightBody from HighlightBodyByBodySystem')
- $scope.highLightBody();
+ console.log("inside HighlightBodyByBodySystem ..came inside current structure");
+ //clear highlighted system
+ $scope.removeCurrentHighlightedBodySystem();
+ $scope.EnableUI();
}
+
else {
- //This else is when user seraced anything then change the view and clicked on highlight options
- //in this case body is already highlihted(gray) so no need to
- if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
- if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
- $scope.isAlreadyHighlighted = true;
- }
- else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
- $scope.isAlreadyHighlighted = true;
- }
- else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
- $scope.isAlreadyHighlighted = true;
- }
- else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
- $scope.isAlreadyHighlighted = true;
- }
- if (($scope.isAlreadyHighlighted == true && $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined && $scope.systemMatchedTermList.length > 0)) {
+ //NIKITA
+ $rootScope.isHighlightBodyByBodySystem = true;
+ $scope.systemMatchedTermList = new jinqJs()
+ .from($rootScope.BodySystemData.BodySystem.BodySystemTerm)
+ .where('_SystemNumber == ' + event.currentTarget.id)
+ .select();
+
+ if ($rootScope.isHighLight == false) {
+ //color the body gray
+ $rootScope.isHighLight = true
+ console.log('highLightBody from HighlightBodyByBodySystem')
+ $scope.highLightBody();
+ }
+ else {
+ //This else is when user seraced anything then change the view and clicked on highlight options
+ //in this case body is already highlihted(gray) so no need to
+ if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
+ if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
+ $scope.isAlreadyHighlighted = true;
+ }
+ else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
+ $scope.isAlreadyHighlighted = true;
+ }
+ else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
+ $scope.isAlreadyHighlighted = true;
+ }
+ else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
+ $scope.isAlreadyHighlighted = true;
+ }
+ if (($scope.isAlreadyHighlighted == true && $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined && $scope.systemMatchedTermList.length > 0)) {
- $scope.isLoading = true;
+ $scope.isLoading = true;
- $('#spinner').css('visibility', 'visible');
- $timeout(function () { $scope.HighlightBodyByTermListForBodySystem($scope.systemMatchedTermList) }, 100);
+ $('#spinner').css('visibility', 'visible');
+ $timeout(function () { $scope.HighlightBodyByTermListForBodySystem($scope.systemMatchedTermList) }, 100);
+ }
}
}
- }
- //$rootScope.isLoading = true;
- $('#spinner').css('visibility', 'visible');
-
- //NIKITA
- // $rootScope.isHighlightBodyByBodySystem = true;
+ //$rootScope.isLoading = true;
+ $('#spinner').css('visibility', 'visible');
- //if (systemMatchedTermList != null || systemMatchedTermList != undefined) {
+
+ var viewtarget_highlightbody = angular.element(event.currentTarget);
+ var title_highlightbody = viewtarget_highlightbody.attr('title');
- // $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100);
- //}
+ $scope.removeBodySyetemSelectionClass(title_highlightbody);
+ //Highlight button should be active
+ $("#btnHighLight").addClass("btn-primary");
+ $("#btnHighLight").removeClass("btn-black");
- var viewtarget_highlightbody = angular.element(event.currentTarget);
- var title_highlightbody = viewtarget_highlightbody.attr('title');
+ if (!$("#btnNormalMode").hasClass("btn-black")) {
+ $("#btnNormalMode").addClass("btn-black");
+ }
- $scope.removeBodySyetemSelectionClass(title_highlightbody);
+ if (!$("#btnExtract").hasClass("btn-black")) {
+ $("#btnExtract").addClass("btn-black");
+ }
- //Highlight button should be active
- $("#btnHighLight").addClass("btn-primary");
- $("#btnHighLight").removeClass("btn-black");
+ if ($("#btnExtract").hasClass("btn-primary")) {
+ $("#btnExtract").removeClass("btn-primary");
+ }
- if (!$("#btnNormalMode").hasClass("btn-black")) {
- $("#btnNormalMode").addClass("btn-black");
+ if ($("#btnNormalMode").hasClass("btn-primary")) {
+ $("#btnNormalMode").removeClass("btn-primary");
+ }
}
+ }
- if (!$("#btnExtract").hasClass("btn-black")) {
- $("#btnExtract").addClass("btn-black");
- }
+ $scope.removeCurrentHighlightedBodySystem = function(){
- if ($("#btnExtract").hasClass("btn-primary")) {
- $("#btnExtract").removeClass("btn-primary");
- }
+ for (var i = 0; i < $rootScope.grayImageDataList.length; i++) {
+ var grayCanvasID = 'imageCanvas' + parseInt(i + 1);
+ var grayCanvas = document.getElementById(grayCanvasID);
- if ($("#btnNormalMode").hasClass("btn-primary")) {
- $("#btnNormalMode").removeClass("btn-primary");
- }
+ if (grayCanvas != null) {
+ var grayCanvasContext = grayCanvas.getContext("2d");
+ var canvasHeight = grayCanvas.height;
+ var canvasWidth = grayCanvas.width;
+ grayCanvasContext.clearRect(0, 0, canvasHeight, canvasWidth)
+ grayCanvasContext.putImageData($rootScope.grayImageDataList[parseInt(i)], 0, 0);
+ }
+ }
}
$scope.removeBodySyetemSelectionClass = function (title_highlightbody) {
-
- if (title_highlightbody == "Cardiovascular") {
+ if (title_highlightbody == "CurrentStructure") {
+ $scope.CurrentStructure = "active";
+ $scope.Cardiovascular = "";
+ $scope.Digestive = "";
+ $scope.Endocrine = "";
+ $scope.Immune = "";
+ $scope.Integumentary = "";
+ $scope.Lymphatic = "";
+ $scope.Muscular = "";
+ $scope.Nervous = "";
+ $scope.Reproductive = "";
+ $scope.Respiratory = "";
+ $scope.Skeletal = "";
+ $scope.Urinary = "";
+ }
+ else if (title_highlightbody == "Cardiovascular") {
$scope.CurrentStructure = "";
$scope.Cardiovascular = "active";
$scope.Digestive = "";
@@ -9410,6 +9436,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$rootScope.refreshTermListOnSystemSelection = function (bodysystemId) {
$rootScope.selectedBodySystemId = bodysystemId;
$rootScope.selectedBodySystemName = $('#bodySystems option[id="' + bodysystemId + '"]').val();
+ $("#bodySystems").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
+ $("#bodySystems").find("option[id=" + bodysystemId + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
+
$('#termList').empty();
// $('#termList').innerHTML = '';
@@ -9517,33 +9546,23 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
}
$scope.LayerChangeBasedOnKeyPressed = function (e) {
- // Dissectible Anatomy > Should not display blank page if no layer is selected.
-
-
- if (e.keyCode == 13) {
-
- if ($("#txtlayerNumber").val() == '') {
-
- $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr);
- }
- else {
- $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val();
- $scope.LayerChange();
- }
-
-
- }
// 'x' button is displaying inside the input box in IE browser.
if (e.keyCode == 38) {
-
var layerInputVal = $("#txtlayerNumber").val();
- if (layerInputVal != $rootScope.totalLayers) {
+
+ if (layerInputVal < $rootScope.totalLayers) {
+
var layerInputValInc = parseInt(layerInputVal) + 1;
$scope.layerNumber = parseInt(layerInputValInc);
$("#txtlayerNumber").val($scope.layerNumber);
$rootScope.PreviouslayerNumbr = $scope.layerNumber;
+
+ }
+ else {
+
+ $("#txtlayerNumber").val($rootScope.totalLayers);
}
@@ -9551,12 +9570,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
// 'x' button is displaying inside the input box in IE browser.
if (e.keyCode == 40) {
+
var layerInputVal = $("#txtlayerNumber").val();
if (layerInputVal > 0) {
var layerInputValDec = parseInt(layerInputVal) - 1;
$scope.layerNumber = parseInt(layerInputValDec);
$("#txtlayerNumber").val($scope.layerNumber);
$rootScope.PreviouslayerNumbr = $scope.layerNumber;
+
}
}
@@ -9565,31 +9586,54 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
$scope.LayerValueChangeBasedOnKeyUp = function (e) {
- var keyUplayerNumber = parseInt($("#txtlayerNumber").val());
-
- if (isNaN(keyUplayerNumber))
- {
- document.getElementById("txtlayerNumber").value = "";
- }
- else {
-
- if (keyUplayerNumber > $rootScope.totalLayers) {
+
+ if (e.keyCode == 13) {
- $("#txtlayerNumber").val($rootScope.totalLayers);
- $scope.layerNumber = parseInt($rootScope.totalLayers);
+ if ($("#txtlayerNumber").val() == '') {
+ $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr);
}
else {
- $("#txtlayerNumber").val(keyUplayerNumber);
- $scope.layerNumber = parseInt(keyUplayerNumber);
+ $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val();
+ var keyUplayerNumber = parseInt($("#txtlayerNumber").val());
- }
+ if (isNaN(keyUplayerNumber)) {
+ document.getElementById("txtlayerNumber").value = "";
+ }
+ else {
- }
+ if (keyUplayerNumber > $rootScope.totalLayers) {
+
+ $("#txtlayerNumber").val($rootScope.totalLayers);
+ $scope.layerNumber = parseInt($rootScope.totalLayers);
+
+ }
+ else {
+
+ $("#txtlayerNumber").val(keyUplayerNumber);
+ $scope.layerNumber = parseInt(keyUplayerNumber);
+ }
+ $scope.LayerChange();
+ }
+ }
+ }
+ else {
+ var layerInputVal = $("#txtlayerNumber").val();
+
+ if (layerInputVal <= $rootScope.totalLayers) {
+
+ $("#txtlayerNumber").val(layerInputVal);
+
+ }
+ else {
+
+ $("#txtlayerNumber").val($rootScope.totalLayers);
+ }
+ }
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index 7670961..29e8ab4 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -2504,7 +2504,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$(".btn-annotation").removeClass("activebtncolor");
$('.btnCursor').addClass('activebtncolor');
}
-
+ var isDoubleTouch = null;
$rootScope.TextEditorFunctionality = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, x, y) {
if ($rootScope.isTextAreaPreviewCompleted == true) {
$rootScope.isTextAreaPreviewCompleted = false;
@@ -2647,6 +2647,80 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
layer.draggable = false;
}
},
+ touchstart: function (layer)
+ {
+ if (isDoubleTouch == null) {
+ isDoubleTouch = setTimeout(function () {
+ isDoubleTouch = null;
+ if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
+ //jcanvas property
+ layer.draggable = true;
+ $rootScope.canvasLayerNameCollection = [];
+ $rootScope.canvasLayerNameCollection.push(layer.name);
+ $('#canvas').setLayer(layer.name, {
+ handle: {
+ type: 'rectangle',
+ fillStyle: '#fff',
+ strokeStyle: '#c33',
+ strokeWidth: 2,
+ width: 5, height: 5,
+ cornerRadius: 3,
+
+ }
+ }).drawLayers();
+ }
+ else {
+ //jcanvas property
+ layer.draggable = false;
+ }
+
+ }, 1000)
+ } else {
+ clearTimeout(isDoubleTouch);
+ isDoubleTouch = null;
+ if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
+ //jcanvas property
+ layer.draggable = true;
+ $rootScope.IsTextAlreadySave = false;
+ var RectNameArray = (layer.name).split("_");
+
+ var TextAreaRectangleName = "TextArea_";
+ var TextAreaRectNameConcat = TextAreaRectangleName.concat(RectNameArray[1]);
+ $rootScope.TextAreaRectID = layer.name;
+ $rootScope.TextID = TextAreaRectNameConcat;
+
+ $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
+ $("#annotationTextModal").css("padding-right", "0px");
+ document.getElementById('modelbackground').style.display = "block";
+ $("#annotationTextModal").modal("toggle");
+
+ $("#text_area").val('');
+ $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
+ $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
+ // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
+
+ $("#selected-font-family option:eq(0)").prop('selected', true);
+ $("#selected-font-size option:eq(0)").prop('selected', true);
+
+ $("#text-italic").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-bold").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-underline").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-left").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-right").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-center").removeClass("ActiveFormattingButtonClass");
+ }
+ else {
+ //jcanvas property
+ layer.draggable = false;
+ }
+
+ }
+ },
mouseout: function (layer) {
if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
//jcanvas property
@@ -2943,6 +3017,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
}
///-----
+
+ var isDoubleTouchSaveText = null;
+ var isDoubleTouchSaveTextAgain = null;
$rootScope.saveText = function () {
document.getElementById('modelbackground').style.display = "none";
@@ -3189,6 +3266,182 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
}
},
+ touchstart: function (layer) {
+
+ if (isDoubleTouchSaveText == null) {
+ isDoubleTouchSaveText = setTimeout(function () {
+ isDoubleTouchSaveText = null;
+ if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
+ //jcanvas property
+ layer.draggable = true;
+ $rootScope.shapeTypeText = "textAreaRect";
+ var layerName = layer.name;
+ var splitedName = layerName.split("_");
+ var textValName = "TextAreaNew_";
+ var concatinateResult = textValName.concat(splitedName[1]);
+ $rootScope.canvasLayerNameCollection = [];
+ $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
+ $('#canvas').setLayer(layer.name, {
+ handle: {
+ type: 'rectangle',
+ fillStyle: '#fff',
+ strokeStyle: '#c33',
+ strokeWidth: 2,
+ width: 5, height: 5,
+ cornerRadius: 3,
+ }
+ }).drawLayers();
+
+ }
+ else {
+ //jcanvas property
+ layer.draggable = false;
+ }
+
+ }, 1000)
+ } else {
+ clearTimeout(isDoubleTouchSaveText);
+ isDoubleTouchSaveText = null;
+ if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
+ //jcanvas property
+ layer.draggable = true;
+ $rootScope.isTextAreaClosedButtonActive = false;
+ $rootScope.IsTextAlreadySave = true;
+
+ var _rectLayerOnSave = layer.name;
+ var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
+ var TextAreaRectName = "TextAreaNew_";
+ var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]);
+
+ $rootScope.layerNameArr = layer.name;
+ $rootScope.rectTextArr = TextAreaRectNameConcatenated;
+
+
+ $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
+
+ for (var i = 0; i <= $rootScope.TextPropertyArray.length - 1; i++) {
+ if ($rootScope.TextPropertyArray[i].layerName == TextAreaRectNameConcatenated) {
+
+ var textArrVal = $rootScope.TextPropertyArray[i].Rect_Text;
+ $("#text_area").val(textArrVal);
+ var fontStyleProp = $rootScope.TextPropertyArray[i].FontStyle;
+ var fontWeightProp = fontStyleProp.split(" ");
+
+ $("#text_area").css("font-size", $rootScope.TextPropertyArray[i].FontSize);
+ $("#text_area").css("font-weight", fontWeightProp[0]);
+ $("#text_area").css("font-style", fontWeightProp[1]);
+ $("#text_area").css("text-align", $rootScope.TextPropertyArray[i].Align);
+ $("#text_area").css("color", $rootScope.TextPropertyArray[i].FontColor);
+ $("#text_area").css("font-family", $rootScope.TextPropertyArray[i].FontFamily);
+ $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[i].TextDecoration);
+ $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": $rootScope.TextPropertyArray[i].FontColor });
+
+ var CurrentFontFamily = $rootScope.TextPropertyArray[i].FontFamily;
+ var CurrentFontSize = parseInt($rootScope.TextPropertyArray[i].FontSize);
+ $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
+ $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
+
+ CurrentFontFamily = '';
+ CurrentFontSize = '';
+
+
+ if ($rootScope.TextPropertyArray[i].TextDecoration == "underline") {
+
+ $("#text-underline").addClass("ActiveFormattingButtonClass");
+
+ }
+
+ else {
+
+ $("#text-underline").removeClass("ActiveFormattingButtonClass");
+
+ }
+
+ //adding text font weight active class in text edit pop-up
+
+ if (fontWeightProp[0] == 700) {
+
+ $("#text-bold").addClass("ActiveFormattingButtonClass");
+
+ }
+
+ else {
+
+ $("#text-bold").removeClass("ActiveFormattingButtonClass");
+
+ }
+
+ //adding text font style active class in text edit pop-up
+
+ if (fontWeightProp[1] == "italic") {
+
+
+ $("#text-italic").addClass("ActiveFormattingButtonClass");
+ }
+ else {
+ $("#text-italic").removeClass("ActiveFormattingButtonClass");
+
+
+ }
+
+ //adding text alignment active class in text edit pop-up
+
+ if ($rootScope.TextPropertyArray[i].Align == "left") {
+
+ $("#text-right").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-center").removeClass("ActiveFormattingButtonClass")
+
+ $("#text-left").addClass("ActiveFormattingButtonClass");
+
+ }
+
+ else if ($rootScope.TextPropertyArray[i].Align == "right") {
+
+
+
+ $("#text-center").removeClass("ActiveFormattingButtonClass")
+
+ $("#text-left").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-right").addClass("ActiveFormattingButtonClass");
+ }
+
+ else if ($rootScope.TextPropertyArray[i].Align == "center") {
+
+ $("#text-left").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-right").removeClass("ActiveFormattingButtonClass");
+
+ $("#text-center").addClass("ActiveFormattingButtonClass");
+
+ }
+
+ }
+ else {
+ // alert("no");
+
+ }
+
+ }
+
+
+ // _rectLayerOnSaveSplitInt = '';
+ textArrVal = '';
+ $("#annotationTextModal").css("padding-right", "0px");
+ document.getElementById('modelbackground').style.display = "block";
+ $("#annotationTextModal").modal("toggle");
+
+ // $("#selected-font-family").val(CurrentFontFamily);
+ // $("#selected-font-size").val(CurrentFontSize);
+ }
+ else {
+ //jcanvas property
+ layer.draggable = false;
+ }
+
+ }
+ },
mouseout: function (layer) {
if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
@@ -3521,6 +3774,138 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
layer.draggable = false;
}
},
+ touchstart: function (layer) {
+
+ if (isDoubleTouchSaveTextAgain == null) {
+ isDoubleTouchSaveTextAgain = setTimeout(function () {
+ isDoubleTouchSaveTextAgain = null;
+ if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
+ //jcanvas property
+ layer.draggable = true;
+ $rootScope.shapeTypeText = "textAreaRect";
+ var layerName = layer.name;
+ var splitedName = layerName.split("_");
+ var textValName = "TextAreaAfterEdit_";
+ var concatinateResult = textValName.concat(splitedName[1]);
+ $rootScope.canvasLayerNameCollection = [];
+ $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
+
+ $('#canvas').setLayer(layer.name, {
+ handle: {
+ type: 'rectangle',
+ fillStyle: '#fff',
+ strokeStyle: '#c33',
+ strokeWidth: 2,
+ width: 5, height: 5,
+ cornerRadius: 3,
+ }
+ }).drawLayers();
+ }
+ else {
+ //jcanvas property
+ layer.draggable = false;
+ }
+
+ }, 1000)
+ } else {
+ clearTimeout(isDoubleTouchSaveTextAgain);
+ isDoubleTouchSaveTextAgain = null;
+ if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
+ //jcanvas property
+ layer.draggable = true;
+ $rootScope.isTextAreaClosedButtonActive = false;
+ $rootScope.IsTextAlreadySave = true;
+ var _rectLayerOnSave = layer.name;
+ var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
+ var RectNameAfterEdit = "TextAreaAfterEdit_";
+ var RectNameAfterEditResult = RectNameAfterEdit.concat(_rectLayerOnSaveSplit[1]);
+ $rootScope.modifySavedTextIndexNumber = _rectLayerOnSaveSplit[1];
+
+ $rootScope.layerNameArr = layer.name;
+ $rootScope.rectTextArr = RectNameAfterEditResult;
+
+ $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
+ $("#text_area").val(_modifiedText);
+ $("#text_area").css("font-size", _modifiedFontSize);
+ $("#text_area").css("font-weight", _modifiedFontWeight);
+ $("#text_area").css("font-style", _modifiedFontStyle);
+ $("#text_area").css("text-align", _modifiedTextAlign);
+ $("#text_area").css("color", _modifiedFontColor);
+ $("#text_area").css("font-family", _modifiedFontFamily);
+ $("#text_area").css("text-decoration", _modifiedFontDecoration);
+ $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor });
+
+ // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" });
+ // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
+
+ //khushbu
+ var CurrentFontFamily = _modifiedFontFamily;
+ // alert(CurrentFontFamily);
+ // CurrentFontFamily = CurrentFontFamily.replace(/'/g, "");
+ var CurrentFontSize = parseInt(_modifiedFontSize);
+ $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
+ $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
+ CurrentFontFamily = '';
+ CurrentFontSize = '';
+ //adding text text decoration active class in text edit pop-up
+ if (_modifiedFontDecoration == "underline") {
+ $("#text-underline").addClass("ActiveFormattingButtonClass");
+ }
+ else {
+ $("#text-underline").removeClass("ActiveFormattingButtonClass");
+ }
+
+ //adding text font weight active class in text edit pop-up
+ if (_modifiedFontWeight == 700) {
+
+ $("#text-bold").addClass("ActiveFormattingButtonClass");
+ }
+ else {
+
+ $("#text-bold").removeClass("ActiveFormattingButtonClass");
+
+ }
+
+ //adding text font style active class in text edit pop-up
+ if (_modifiedFontStyle == "italic") {
+
+ $("#text-italic").addClass("ActiveFormattingButtonClass");
+ }
+ else {
+ $("#text-italic").removeClass("ActiveFormattingButtonClass");
+
+ }
+
+ //adding text alignment active class in text edit pop-up
+ if (_modifiedTextAlign == "left") {
+ $("#text-right").removeClass("ActiveFormattingButtonClass");
+ $("#text-center").removeClass("ActiveFormattingButtonClass")
+ $("#text-left").addClass("ActiveFormattingButtonClass");
+ }
+ else if (_modifiedTextAlign == "right") {
+
+ $("#text-center").removeClass("ActiveFormattingButtonClass")
+ $("#text-left").removeClass("ActiveFormattingButtonClass");
+ $("#text-right").addClass("ActiveFormattingButtonClass");
+
+ }
+ else if (_modifiedTextAlign == "center") {
+ $("#text-left").removeClass("ActiveFormattingButtonClass");
+ $("#text-right").removeClass("ActiveFormattingButtonClass");
+ $("#text-center").addClass("ActiveFormattingButtonClass");
+
+ }
+
+ document.getElementById('modelbackground').style.display = "block";
+ $("#annotationTextModal").modal("toggle");
+ }
+ else {
+ //jcanvas property
+ layer.draggable = false;
+ }
+
+ }
+ },
mouseout: function (layer) {
if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
//jcanvas property
@@ -4652,7 +5037,15 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
$("#cursor-block").html();
}
+ var $ue = navigator.userAgent;
+ if (($ue.match(/(iPod|iPhone|iPad|android)/i))) {
+ $("#text_area").click(function () {
+ $("#annotationTextModal").draggable('disable');
+ }).blur(function () {
+ $("#annotationTextModal").draggable('enable');
+ });
+ }
$rootScope.CheckRefresh = function (e) {
//Checking if 'REFRESHED' or 'RELOADED'
if ((e.keyCode === 116) || (e.keyCode == 82 && e.ctrlKey))
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
index 6f36d07..5a3c1d3 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -260,6 +260,112 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
//7. Highlight all system body list in left side
$scope.highlightBodySystemList();
}
+ $(".slider").slider({
+ min: 25,
+ max: 100,
+ value: 100,
+ range: "min",
+ orientation: "vertical",
+ slide: function (event, ui) {
+ var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
+ scope.$apply(function () {
+ scope.sliderVal = ui.value;
+ scope.removeSpeechBubble();
+ var relativeWidth = 0;
+ var relativeHeight = 0;
+ if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
+ if (ui.value == 100) {
+ relativeWidth = scope.ViewImageWidth;
+ relativeHeight = scope.ViewImageHeight
+ scope.sliderPercentValue = 1.0;
+ }
+ else if (ui.value == 85) {
+ relativeWidth = scope.ViewImageWidth * 0.85;
+ relativeHeight = scope.ViewImageHeight * 0.85;
+ scope.sliderPercentValue = 0.85;
+
+ } else if (ui.value == 70) {
+ relativeWidth = scope.ViewImageWidth * 0.70;
+ relativeHeight = scope.ViewImageHeight * 0.70;
+ scope.sliderPercentValue = 0.70;
+ } else if (ui.value == 55) {
+
+ relativeWidth = scope.ViewImageWidth * 0.55;
+ relativeHeight = scope.ViewImageHeight * 0.55;
+ scope.sliderPercentValue = 0.55;
+
+ } else if (ui.value == 40) {
+
+ relativeWidth = scope.ViewImageWidth * 0.40;
+ relativeHeight = scope.ViewImageHeight * 0.40;
+ scope.sliderPercentValue = 0.40;
+
+ } else if (ui.value == 25) {
+
+ relativeWidth = scope.ViewImageWidth * 0.25;
+ relativeHeight = scope.ViewImageHeight * 0.25;
+ scope.sliderPercentValue = 0.25;
+
+ }
+ }
+
+ if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
+ $("#modItemImage").css("width", relativeWidth + "px");
+ $("#modItemImage").css("height", relativeHeight + "px");
+ $("#aaDetailViewCanvas").css("width", relativeWidth + "px");
+ $("#modItemImage").css("height", relativeHeight + "px");
+
+ $("#modItemImage").attr('src', '');
+
+
+ $("#aaDetailViewCanvas").remove();
+ //0.5 create canvas on the top of image so that I can draw a line over the canvas.
+ var canvas = document.createElement('canvas');
+ canvas.id = 'aaDetailViewCanvas';
+ canvas.className = 'aaCanvas';
+ canvas.height = relativeHeight;
+ canvas.width = relativeWidth;
+ canvas.style.left = '0px';
+ canvas.style.top = '0px';
+ canvas.style.position = "absolute";
+
+ $("#canvasDiv").append(canvas);
+ scope.context = canvas.getContext("2d")
+ $("#modItemImage").attr('src', scope.OpenItemImagePath);
+ scope.isSliderChange = true;
+ var btnID = '';
+ $("div.tools div:eq(1) div").each(function () {
+ if ($(this).find("button").hasClass("btn-primary")) {
+ btnID = $(this).find("button").attr("id");
+ $('#' + btnID).removeClass("btn-black");
+ $('#' + btnID).addClass("btn-primary");
+ }
+ });
+ scope.isSelectedPinBtnClickedAftrSliderCange = true;
+ switch (btnID) {
+
+ case "hidePinBtn":
+ break;
+ case "allPinBtn":
+ scope.showAllPins();
+ break;
+ case "selectedPin":
+ scope.showAllPins();
+ setTimeout(function () {
+ console.log(scope.allPinDataArray);
+ scope.activePinOnSliderChange();
+ }, 1000);
+ break;
+ }
+ }
+
+ });
+ }
+ })
+ .slider("pips", {
+ rest: "label",
+ step: "15"
+ });
}, 500);
}
@@ -1745,6 +1851,51 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
}
}
}
+ $(document).ready(function () {
+ var $ua = navigator.userAgent;
+ if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
+
+ var jspanelContainerWidth = $(".jsPanel-content").css("width");
+ $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
+ $("#ImagePanel").css("width", "100%");
+
+ //hide pin button clicked
+ $("#hidePinBtn").removeAttr("onclick");
+ $("#hidePinBtn").on("touchstart", function () {
+ var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
+ rootScope.$apply(function () {
+ rootScope.hidePins(event);
+ });
+ });
+ //selected pin button clicked
+ $("#selectedPin").removeAttr("onclick");
+ $("#selectedPin").on("touchstart", function () {
+ console.log('showSelectedPins is called')
+ var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
+ scope.$apply(function () {
+ scope.showSelectedPins(event);
+ });
+ });
+ //all pin button clicked
+ $("#allPinBtn").removeAttr("onclick");
+ $("#allPinBtn").on("touchstart", function () {
+ var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
+ scope.$apply(function () {
+ scope.showAllPinsAfterHide(event);
+ });
+ });
+ //comment-box button clicked
+ $("#comment-box").removeAttr("onclick");
+ $("#comment-box").on("touchstart", function () {
+ var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
+ scope.$apply(function () {
+ scope.ShowHideAnnotation(event);
+ });
+ });
+
+ }
+
+ });
}]);
@@ -1883,153 +2034,3 @@ function onZoom(scope) {
}
-$(document).ready(function () {
- var $ua = navigator.userAgent;
- if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
-
- var jspanelContainerWidth = $(".jsPanel-content").css("width");
- $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
- $("#ImagePanel").css("width", "100%");
-
- //hide pin button clicked
- $("#hidePinBtn").removeAttr("onclick");
- $("#hidePinBtn").on("touchstart", function () {
- var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
- rootScope.$apply(function () {
- rootScope.hidePins(event);
- });
- });
- //selected pin button clicked
- $("#selectedPin").removeAttr("onclick");
- $("#selectedPin").on("touchstart", function () {
- console.log('showSelectedPins is called')
- var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
- scope.$apply(function () {
- scope.showSelectedPins(event);
- });
- });
- //all pin button clicked
- $("#allPinBtn").removeAttr("onclick");
- $("#allPinBtn").on("touchstart", function () {
- var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
- scope.$apply(function () {
- scope.showAllPinsAfterHide(event);
- });
- });
- //comment-box button clicked
- $("#comment-box").removeAttr("onclick");
- $("#comment-box").on("touchstart", function () {
- var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
- scope.$apply(function () {
- scope.ShowHideAnnotation(event);
- });
- });
-
- }
- $(".slider").slider({
- min: 25,
- max: 100,
- value: 100,
- range: "min",
- orientation: "vertical",
- slide: function (event, ui) {
- var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
- scope.$apply(function () {
- scope.sliderVal = ui.value;
- scope.removeSpeechBubble();
- var relativeWidth = 0;
- var relativeHeight = 0;
- if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
- if (ui.value == 100) {
- relativeWidth = scope.ViewImageWidth;
- relativeHeight = scope.ViewImageHeight
- scope.sliderPercentValue = 1.0;
- }
- else if (ui.value == 85) {
- relativeWidth = scope.ViewImageWidth * 0.85;
- relativeHeight = scope.ViewImageHeight * 0.85;
- scope.sliderPercentValue = 0.85;
-
- } else if (ui.value == 70) {
- relativeWidth = scope.ViewImageWidth * 0.70;
- relativeHeight = scope.ViewImageHeight * 0.70;
- scope.sliderPercentValue = 0.70;
- } else if (ui.value == 55) {
-
- relativeWidth = scope.ViewImageWidth * 0.55;
- relativeHeight = scope.ViewImageHeight * 0.55;
- scope.sliderPercentValue = 0.55;
-
- } else if (ui.value == 40) {
-
- relativeWidth = scope.ViewImageWidth * 0.40;
- relativeHeight = scope.ViewImageHeight * 0.40;
- scope.sliderPercentValue = 0.40;
-
- } else if (ui.value == 25) {
-
- relativeWidth = scope.ViewImageWidth * 0.25;
- relativeHeight = scope.ViewImageHeight * 0.25;
- scope.sliderPercentValue = 0.25;
-
- }
- }
-
- if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
- $("#modItemImage").css("width", relativeWidth + "px");
- $("#modItemImage").css("height", relativeHeight + "px");
- $("#aaDetailViewCanvas").css("width", relativeWidth + "px");
- $("#modItemImage").css("height", relativeHeight + "px");
-
- $("#modItemImage").attr('src', '');
-
-
- $("#aaDetailViewCanvas").remove();
- //0.5 create canvas on the top of image so that I can draw a line over the canvas.
- var canvas = document.createElement('canvas');
- canvas.id = 'aaDetailViewCanvas';
- canvas.className = 'aaCanvas';
- canvas.height = relativeHeight;
- canvas.width = relativeWidth;
- canvas.style.left = '0px';
- canvas.style.top = '0px';
- canvas.style.position = "absolute";
-
- $("#canvasDiv").append(canvas);
- scope.context = canvas.getContext("2d")
- $("#modItemImage").attr('src', scope.OpenItemImagePath);
- scope.isSliderChange = true;
- var btnID = '';
- $("div.tools div:eq(1) div").each(function () {
- if ($(this).find("button").hasClass("btn-primary")) {
- btnID = $(this).find("button").attr("id");
- $('#' + btnID).removeClass("btn-black");
- $('#' + btnID).addClass("btn-primary");
- }
- });
- scope.isSelectedPinBtnClickedAftrSliderCange = true;
- switch (btnID) {
-
- case "hidePinBtn":
- break;
- case "allPinBtn":
- scope.showAllPins();
- break;
- case "selectedPin":
- scope.showAllPins();
- setTimeout(function () {
- console.log(scope.allPinDataArray);
- scope.activePinOnSliderChange();
- }, 1000);
- break;
- }
- }
-
- });
- }
- })
- .slider("pips", {
- rest: "label",
- step: "15"
- });
-});
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
index 0a0846f..c19cfa4 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
+++ b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
@@ -241,12 +241,10 @@
});
});
-
+
-
-
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
index aa523ce..6a0d455 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
+++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
@@ -168,7 +168,10 @@
Highlight Options