diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetManageRights.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetManageRights.sql new file mode 100644 index 0000000..80474e5 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetManageRights.sql diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupController.cs b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupController.cs new file mode 100644 index 0000000..c4c2cd5 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupController.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using AIAHTML5.ADMIN.API.Models; +using System.Web.Http.Cors; +using System.Web.Cors; +using AIAHTML5.Server.Constants; +using log4net; +using System.Text; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Controllers +{ + [EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] + [RoutePrefix("UserGroup")] + public class UserGroupController : ApiController + { + AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities(); + + [Route("LicenseUserGroups")] + [HttpGet] + public HttpResponseMessage GetLicenseUserGroups(int LicenseId) + { + List UserGroupList = new List(); + try + { + UserGroupList = UserGroupModel.GetLicenseUserGroups(dbContext, LicenseId); + return Request.CreateResponse(HttpStatusCode.OK, UserGroupList); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("LicenseUserGroupUsers")] + [HttpGet] + public HttpResponseMessage GetLicenseUserGroupUsers(int LicenseId, int UserGroupId) + { + List UserList = new List(); + try + { + UserList = UserGroupModel.GetLicenseUserGroupUsers(dbContext, LicenseId, UserGroupId); + return Request.CreateResponse(HttpStatusCode.OK, UserList); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("InsertUpdateLicenseUserGroup")] + [HttpPost] + public HttpResponseMessage InsertUpdateLicenseUserGroup(JObject jsonData) + { + bool Status = false; + UserGroupModel UserGroupEntity = new UserGroupModel(); + UserGroupEntity.Id = jsonData["id"].Value(); + UserGroupEntity.LicenseId = jsonData["licenseId"].Value(); + UserGroupEntity.Title = jsonData["title"].Value(); + UserGroupEntity.IsActive = jsonData["isActive"].Value(); + UserGroupEntity.CreationDate = jsonData["creationDate"].Value(); + UserGroupEntity.ModifiedDate = jsonData["modifiedDate"].Value(); + try + { + Status = UserGroupModel.InsertUpdateLicenseUserGroup(dbContext, UserGroupEntity); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("UpdateLicenseUserGroupUsers")] + [HttpPost] + public HttpResponseMessage UpdateLicenseUserGroupUsers(JObject jsonData) + { + bool Status = false; + int UserGroupId = jsonData["userGroupId"].Value(); + string UserIds = jsonData["userIds"].Value(); + try + { + Status = UserGroupModel.UpdateLicenseUserGroupUsers(dbContext, UserGroupId, UserIds); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("DeleteLicenseUserGroup")] + [HttpGet] + public HttpResponseMessage DeleteLicenseUserGroup(int UserGroupId) + { + bool Status = false; + try + { + Status = UserGroupModel.DeleteLicenseUserGroup(dbContext, UserGroupId); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + } +} diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupModel.cs b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupModel.cs new file mode 100644 index 0000000..634d6c6 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupModel.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Models +{ + public class UserGroupModel + { + public int Id { get; set; } + public int LicenseId { get; set; } + public string Title { get; set; } + public DateTime? CreationDate { get; set; } + public DateTime? ModifiedDate { get; set; } + public bool? IsActive { get; set; } + public int? TotalUsers { get; set; } + + public static List GetLicenseUserGroups(AIADatabaseV5Entities dbContext, int LicenseId) + { + List UserGroupList = new List(); + UserGroupModel UserGroupObj = new UserGroupModel(); + try + { + var result = dbContext.usp_GetLicenseUserGroups(LicenseId).ToList(); + foreach (var item in result) + { + UserGroupObj = new UserGroupModel(); + UserGroupObj.Id = item.Id; + UserGroupObj.LicenseId = item.LicenseId; + UserGroupObj.Title = item.Title; + UserGroupObj.IsActive = item.IsActive; + UserGroupObj.ModifiedDate = item.ModifiedDate; + UserGroupObj.CreationDate = item.CreationDate; + UserGroupObj.TotalUsers = item.TotalUsers; + UserGroupList.Add(UserGroupObj); + } + } + catch (Exception ex) { } + return UserGroupList; + } + + public static List GetLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int LicenseId, int UserGroupId) + { + List UserList = new List(); + UserModel UserModelObj = new UserModel(); + try + { + var result = dbContext.GetAllUserWithGroup(LicenseId, UserGroupId).ToList(); + foreach (var item in result) + { + UserModelObj = new UserModel(); + UserModelObj.Id = item.Id; + UserModelObj.FirstName = item.FirstName; + UserModelObj.LastName = item.LastName; + UserModelObj.LoginId = item.LoginId; + UserModelObj.EmailId = item.EmailId; + UserModelObj.ProductEdition = item.Title; + UserModelObj.InGroup = item.InGroup; + UserList.Add(UserModelObj); + } + } + catch (Exception ex) { } + return UserList; + } + + public static bool InsertUpdateLicenseUserGroup(AIADatabaseV5Entities dbContext, UserGroupModel UserGroupEntity) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_InsertUpdateLicenseUserGroup(UserGroupEntity.Id, UserGroupEntity.LicenseId, UserGroupEntity.Title, + UserGroupEntity.CreationDate, UserGroupEntity.ModifiedDate, UserGroupEntity.IsActive, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + public static bool UpdateLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int UserGroupId, string UserIds) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_UpdateLicenseUserGroupUsers(UserGroupId, UserIds, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + public static bool DeleteLicenseUserGroup(AIADatabaseV5Entities dbContext, int UserGroupId) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_DeleteLicenseUserGroup(UserGroupId, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + } + +} \ No newline at end of file diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserModel.cs b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserModel.cs new file mode 100644 index 0000000..f73ebbf --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserModel.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Models +{ + public class UserModel + { + public int Id { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string EmailId { get; set; } + public string LoginId { get; set; } + public string NewLoginId { get; set; } + public string Password { get; set; } + public int SecurityQuestionId { get; set; } + public string SecurityAnswer { get; set; } + public int CreatorId { get; set; } + public DateTime CreationDate { get; set; } + public DateTime DeactivationDate { get; set; } + public int ModifierId { get; set; } + public DateTime ModifiedDate { get; set; } + public int UserTypeId { get; set; } + public bool IsActive { get; set; } + public string ProductEdition { get; set; } + public int InGroup { get; set; } + + public static bool UpdateUserProfile(AIADatabaseV5Entities dbContext, int intUserID, string strFirstName, string strLastName, string strEmailID) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.UpdateUserProfile(intUserID, strFirstName, strLastName, strEmailID, spStatus); + if (spStatus.Value.ToString() == "1") + { + return true; + } + else + { + return false; + } + } + catch (Exception ex) + { + return false; + } + } + public static bool UpdateUserPassword(AIADatabaseV5Entities dbContext, int intUserID, string newPassword) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.UpdateAiaUserPassword(intUserID, newPassword, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + public static string UpdateUserId(AIADatabaseV5Entities dbContext, int id, string userId, string oldUserId) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_UpdateUserId(id, userId, oldUserId, spStatus); + if (spStatus.Value.ToString() == "1") + { + // return "success"; + return "1"; + } + else if (spStatus.Value.ToString() == "2") + { + return "2"; + // return "Already Exist Userid"; + } + else + { + return "fail"; + } + } + catch (Exception ex) + { + return ex.Message; + } + } + } +} \ No newline at end of file diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/mergecode.txt b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/mergecode.txt new file mode 100644 index 0000000..434a2f5 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/mergecode.txt @@ -0,0 +1,62 @@ +//user.service.ts + + GetLicenseUserGroups(licensId: number) { + return this.http.get(this.commonService.resourceBaseUrl + "UserGroup/LicenseUserGroups?LicenseId=" + licensId) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + GetLicenseUserGroupUsers(licensId: number, UserGroupId: number) { + return this.http.get(this.commonService.resourceBaseUrl + "UserGroup/LicenseUserGroupUsers?LicenseId=" + licensId + "&UserGroupId=" + UserGroupId) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + InsertUpdateLicenseUserGroup(obj: any) { + //let options = new RequestOptions({ headers: this.headers }); + var jsonData = {'id': obj.id, 'licenseId': obj.licenseId, 'creationDate': obj.creationDate, 'modifiedDate': obj.modifiedDate, 'title': obj.title, 'isActive': obj.isActive }; + var headers = new Headers({ + 'Content-Type': 'application/json' + }); + return this.http.post(this.commonService.resourceBaseUrl + "UserGroup/InsertUpdateLicenseUserGroup", + JSON.stringify(jsonData), {headers: headers}) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + UpdateLicenseUserGroupUsers(userGroupId: number, userIds: string) { + //let options = new RequestOptions({ headers: this.headers }); + var jsonData = {'userGroupId': userGroupId, 'userIds': userIds }; + var headers = new Headers({ + 'Content-Type': 'application/json' + }); + return this.http.post(this.commonService.resourceBaseUrl + "UserGroup/UpdateLicenseUserGroupUsers", + JSON.stringify(jsonData), {headers: headers}) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + DeleteLicenseUserGroup(userGroupId: number) { + return this.http.get(this.commonService.resourceBaseUrl + "UserGroup/DeleteLicenseUserGroup?UserGroupId=" + userGroupId) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); +} + + +//app.routing.module + +import { UserGroup } from './components/UserEntity/usergroup.component'; + + + { path: 'usergroup', component: UserGroup } + + +//app.module.ts + +import { UserGroup } from './components/UserEntity/usergroup.component'; + +UserGroup + +//app.component.html + +
  • User Group
  • diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.html b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.html new file mode 100644 index 0000000..9de3fd8 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.html @@ -0,0 +1,204 @@ + +
    + +
    +

    {{mode}} User Group

    +
    + + + + + + + + + + + + + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + +
    Group NameNumber of User(s)Created DateLast Modified Date
    + {{item.Title}} + {{item.TotalUsers}}{{item.CreationDate | date: 'MM/dd/yyyy'}}{{item.ModifiedDate | date: 'MM/dd/yyyy'}}
    +
    + +
    +
    + + + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    User group name is required
    +
    +
    +
    +
    +
    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + +
    SelectFirst NameLast NameUser IDEmail IDProduct Edition
    + + + {{item.FirstName}}{{item.LastName}}{{item.UserId}}{{item.EmailId}}{{item.ProductEdition}}
    + +
    + +
    +
    + + +
    +
    + +
    + +
    + +
    +
    +
    + \ No newline at end of file diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.ts b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.ts new file mode 100644 index 0000000..22449dd --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.ts @@ -0,0 +1,267 @@ +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef } from '@angular/core'; +import { UserService } from './user.service'; +import { Router, ActivatedRoute } from '@angular/router'; +import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { License } from '../UserEntity/datamodel'; +import { BsDatepickerModule } from 'ngx-bootstrap'; +import { Http, Response } from '@angular/http'; +import { DatePipe } from '@angular/common'; +import { BsModalService } from 'ngx-bootstrap/modal'; +import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; + +declare var $:any; + +@Component({ + templateUrl: './usergroup.component.html' +}) + +export class UserGroup implements OnInit { + + lstAccountNumbers: any; + lstLicenseUserGroups: any; + licenseUserGroup: any; + lstLicenseUserGroupUsers: any; + lstAllUsers: any; + mode: string = 'Search'; + license: License; + updateUserGroupFrm: FormGroup; + error: any; + alerts: string; + modalAlerts: string; + divClass: string = ''; + topPos: string = '2000px'; + selectedRow: number = 0; + selectedId: number = 0; + modalRef: BsModalRef; + checkedRecords: Array; + + constructor(private userService: UserService, private router: Router, private activeRoute: ActivatedRoute, private fb: FormBuilder, private modalService: BsModalService) { } + + ngOnInit(): void + { + this.selectedRow = 0; + this.divClass = 'col-sm-12'; + this.license = new License(); + this.alerts = ''; + this.updateUserGroupFrm = this.fb.group({ + userGroupName: ['', Validators.required], + }); + this.GetLicenseAccounts(); + + $('#fixed_hdr2').fxdHdrCol({ + fixedCols: 0, + width: "100%", + height: 330, + colModal: [ + { width: 80, align: 'center' }, + { width: 200, align: 'center' }, + { width: 200, align: 'Center' }, + { width: 200, align: 'Center' }, + { width: 200, align: 'Center' }, + { width: 250, align: 'Center' }, + ], + sort: true + }); + if(document.getElementById("fixed_table_rc") != undefined){ + document.getElementById("fixed_table_rc").remove(); + } + var testScript = document.createElement("script"); + testScript.setAttribute("id", "fixed_table_rc"); + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); + testScript.setAttribute("type", "text/javascript"); + document.body.appendChild(testScript); + } + + openModal(template: TemplateRef) { + this.modalRef = this.modalService.show(template); + } + + onChange(Idx: number, Id: number, isChecked: boolean){ + if(isChecked){ + this.checkedRecords[Idx] = Id; + } + else{ + this.checkedRecords[Idx] = 0; + } + } + + SetClickedRow(i: number, item: any) { + this.selectedRow = i; + this.selectedId = item['Id']; + this.licenseUserGroup = item; + } + + BindFormFields(data){ + this.lstLicenseUserGroups = data; + this.licenseUserGroup = this.lstLicenseUserGroups[this.selectedRow]; + this.selectedId = this.licenseUserGroup['Id']; + } + + BindUserFormFields(data){ + this.lstLicenseUserGroupUsers = data; + if(this.mode == 'Edit'){ + this.checkedRecords = new Array(this.lstLicenseUserGroupUsers.length); + for (let i = 0; i < this.lstLicenseUserGroupUsers.length ; i++) { + if(this.lstLicenseUserGroupUsers[i].InGroup > 0){ + this.checkedRecords[i] = this.lstLicenseUserGroupUsers[i].Id; + } + } + } + else{ + this.lstLicenseUserGroupUsers = this.lstLicenseUserGroupUsers.filter(C => C.InGroup> 0); + } + } + + GetLicenseAccounts() { + this.userService.GetAccountNumber() + .subscribe(st => { this.lstAccountNumbers = st; }, error => this.error = error); + } + + GetLicenseUserGroups() { + this.alerts = ''; + this.userService.GetLicenseUserGroups(this.license.LicenseId) + .subscribe(st => { this.BindFormFields(st); }, error => this.error = error); + } + + GetLicenseUserGroupUsers() { + this.alerts = ''; + this.userService.GetLicenseUserGroupUsers(this.license.LicenseId, this.selectedId) + .subscribe(st => { this.BindUserFormFields(st); }, error => this.error = error); + } + + AccountNumberChanged(LicenseId: number){ + this.license.LicenseId = LicenseId; + this.lstLicenseUserGroups = null; + this.GetLicenseUserGroups(); + } + + AfterDeleteData(data, template) { + if (data.Status == "false") { + this.alerts = "License user group delete unsuccessfull"; + } else { + this.modalAlerts = "

    License user group deleted successfully

    "; + this.modalRef = this.modalService.show(template); + this.GetLicenseUserGroups(); + } + } + + AfterInsertData(data, template) { + if (data.Status == "false") { + this.alerts = "License user group save unsuccessfull"; + } else { + this.modalAlerts = "

    License user group saved successfully

    "; + this.modalRef = this.modalService.show(template); + this.GetLicenseUserGroups(); + } + } + + AfterUpdateData(data, template) { + if (data.Status == "false") { + this.alerts = "License user group update unsuccessfull"; + } else { + this.modalAlerts = "

    License user group updated successfully

    "; + this.modalRef = this.modalService.show(template); + this.GetLicenseUserGroups(); + } + } + + InsertLicenseUserGroup(title: string, template: TemplateRef) { + this.alerts = ''; + if(title == '' || title == undefined){ + this.alerts = "Please enter a name for user group."; + return; + } + var obj = { + 'id': 0, 'licenseId': this.license.LicenseId, 'title': title, + 'isActive': true, 'creationDate': new Date(), + 'modifiedDate': new Date() + }; + if(this.alerts == ''){ + return this.userService.InsertUpdateLicenseUserGroup(obj) + .subscribe( + n => (this.AfterInsertData(n, template)), + error => this.error = error); + } + } + + UpdateLicenseUserGroup(template: TemplateRef) { + this.alerts = ''; + var obj = { + 'id': this.licenseUserGroup.Id, + 'licenseId': this.license.LicenseId, + 'title': this.updateUserGroupFrm.controls['userGroupName'].value, + 'isActive': this.licenseUserGroup.IsActive, + 'creationDate': this.licenseUserGroup.CreationDate, + 'modifiedDate': this.licenseUserGroup.ModifiedDate + }; + if(this.alerts == ''){ + return this.userService.InsertUpdateLicenseUserGroup(obj) + .subscribe( + n => ( + this.UpdateLicenseUserGroupUsers(template) + ), + error => this.error = error); + } + } + + UpdateLicenseUserGroupUsers(template: TemplateRef) { + var userIds = ''; + this.checkedRecords.filter(C => C > 0).forEach(element => { + if(element > 0){ + userIds += element + ','; + } + }); + if(userIds!=''){ + userIds = userIds.substr(0, userIds.length - 1); + } + return this.userService.UpdateLicenseUserGroupUsers(this.selectedId, userIds) + .subscribe( + n => ( + this.AfterUpdateData(n, template) + ), + error => this.error = error); + } + + DeleteLicenseUserGroup(template: TemplateRef){ + this.modalRef.hide(); + this.alerts = ''; + if(this.selectedId == 0){ + this.alerts = "Please select a license user group"; + } + if(this.alerts == ''){ + return this.userService.DeleteLicenseUserGroup(this.selectedId) + .subscribe( + data => (this.AfterDeleteData(data, template)), + error => { + this.error = error; + this.alerts = "License user group delete unsuccessfull"; + }); + } + } + + EditLicenseUserGroup(){ + $('.ft_r thead tr th:eq(0)').show(); + this.mode = 'Edit'; + this.topPos = '100px'; + this.alerts = ''; + this.updateUserGroupFrm.controls['userGroupName'].setValue(this.licenseUserGroup.Title); + this.GetLicenseUserGroupUsers(); + } + + ViewLicenseUserGroup(){ + $('.ft_r thead tr th:eq(0)').hide(); + this.mode = 'View'; + this.topPos = '100px'; + this.alerts = ''; + this.updateUserGroupFrm.controls['userGroupName'].setValue(this.licenseUserGroup.Title); + this.GetLicenseUserGroupUsers(); + } + + CancelAddEdit(){ + this.mode = 'Search'; + this.topPos = '2000px'; + this.GetLicenseUserGroups(); + this.selectedRow = this.lstLicenseUserGroups.findIndex(C => C.Id == this.selectedId); + this.SetClickedRow(this.selectedRow, this.lstLicenseUserGroups.find(C => C.Id == this.selectedId)); + } +} diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/users.component.ts b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/users.component.ts new file mode 100644 index 0000000..aa39cec --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/users.component.ts @@ -0,0 +1,324 @@ +import { Component, OnInit, AfterViewInit,ViewChild } from '@angular/core'; +import { UserService } from './user.service'; +import { Router } from '@angular/router'; +import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { User } from '../UserEntity/datamodel'; +import { UserManageRightsModel } from '../UserEntity/datamodel'; +import { Http, Response } from '@angular/http'; +//import { Global } from '../../Shared/global'; +//import { DBOperation } from 'S'; +import { Observable } from 'rxjs/Observable'; +import { ConfirmService } from '../../Shared/Confirm/confirm.service'; +import 'rxjs/Rx'; +import 'rxjs/add/operator/map'; +import 'rxjs/add/operator/filter'; +import { LoadingService } from '../../shared/loading.service'; +declare var $: any; +import { DatePipe } from '@angular/common'; +import { GlobalService } from '../../Shared/global'; +@Component({ + templateUrl:'./users.component.html' // '../../../../../wwwroot/html/UpdateProfile/updateuserprofile.component.html' +}) + +export class UsersList implements OnInit { + + Mode: string = 'Manage'; + modalTitle: string; + Users: FormGroup; + adduserFrm: FormGroup; + managerightFrm: FormGroup; + alerts: string; + public UserTypeList: any; + public AccountTypeList: any; + public UserList: any; + public UserManageRightsList: Array; + emailPattern = "^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"; + public UserTypeListByLicense: any; + public AccountNumberList: any; + public ProductEditionList: any; + UserEntity: User; + public UserManageRightsEntity: UserManageRightsModel; + topPos: string = '2000px'; + datePipe: DatePipe = new DatePipe('en-US'); + error; + selectedRow: number = 0; + selectedId: number = 0; + divClass: string; + isActive: boolean; + NoRecord: string; + //@ViewChild("profileModal") + //profileModal: ModalComponent; + //errorMessage: any; + constructor(private _loadingService: LoadingService,private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http, + private _confirmService: ConfirmService,private global:GlobalService + ) { } + + ngOnInit(): void { + this.modalTitle = 'LIST USER'; + this.alerts = ''; + this.NoRecord = this.global.NoRecords; + this.Users = this.fb.group({ + FirstName:[''], + LastName: [''], + EmailId: [''], + AccountNumber: [''], + UserTypeId: [0], //bug#28162 + AccountTypeId: [0] + // Gender: ['', Validators.required], + // Email: [''] + + }); + this.adduserFrm = this.fb.group({ + id: [''], + UserName: ['', Validators.required], + Password: ['', [Validators.required, Validators.minLength(8)]], + ConfirmPassword: ['', Validators.required], + FirstName: ['', Validators.required], + LastName: ['', Validators.required], + EmailId: ['', Validators.required], + AccountNumber: [''], + UserType: [''], + AccountType: [''], + Createddate: [''], + LastModifiedDate: [''], + Createdby: [''], + Modifiedby: [''], + DeactivationDate: [''], + isActive: [false], + UserStatusActive: ['false'], + UserStatusInActive:[''] + }); + this.managerightFrm = this.fb.group({ + id: [''], + UserTypeTitle: [''] + }); + this._loadingService.ShowLoading("global-loading"); + this.GetUserType(); + this.GetAccountType(); + this._loadingService.HideLoading("global-loading"); + $('#fixed_hdr2').fxdHdrCol({ + fixedCols: 0, + width: "100%", + height: 300, + colModal: [ + { width: 180, align: 'center' }, + { width: 230, align: 'center' }, + { width: 150, align: 'Center' }, + { width: 150, align: 'Center' }, + { width: 350, align: 'Center' }, + { width: 200, align: 'Center' }, + { width: 130, align: 'Center' }, + { width: 120, align: 'center' }, + { width: 280, align: 'Center' }, + { width: 180, align: 'center' }, + { width: 200, align: 'center' }, + { width: 170, align: 'center' }, + { width: 80, align: 'center' }, + { width: 150, align: 'center' }, + { width: 150, align: 'center' }, + { width: 180, align: 'Center' }, + { width: 400, align: 'Center' }, + { width: 150, align: 'center' }, + { width: 110, align: 'center' }, + ], + sort: true + }); + document.getElementById("fixed_table_rc").remove(); + var testScript = document.createElement("script"); + testScript.setAttribute("id", "fixed_table_rc"); + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); + testScript.setAttribute("type", "text/javascript"); + document.body.appendChild(testScript); + this._loadingService.ShowLoading("global-loading"); + //this.bindUsers(); + this._loadingService.HideLoading("global-loading"); + + //this.GetUserList(); + } + handleChange(evt) { + debugger; + var target = evt.target; + if (target.value == 'true') { + this.isActive = true; + } + else if (target.value == 'false') { + this.isActive = false; + } + } + + public SetClickedRow(i: number, item: any) { + this.selectedRow = i; + this.selectedId = item['Id']; + this.UserEntity = item; + } + public SetClickedRowManageRight(j: number, item: any) { + this.selectedRow = j; + this.selectedId = item['Id']; + this.UserManageRightsList = item; + } + redirect() { + this.router.navigate(['/']); + } + + GetUserType() { + this.userservice.GetUserType().subscribe(x => { this.UserTypeList = x; }, error => this.error = error); + } + GetAccountType() { + this.userservice.GetAccountType().subscribe(x => { this.AccountTypeList = x; }, error => this.error = error); + } + GetUserList() { + //this.userservice.GetUserList().subscribe(x => { this.UserList = x; }, error => this.error = error); + } + GetUserRights() { + this.userservice.GetManageUserRights({ + UserId: this.managerightFrm.controls['id'].value, + UserType: this.managerightFrm.controls['UserTypeTitle'].value + }) + .subscribe(x => { console.log(x); this.UserManageRightsList = x }, error => { + this.error = error; + this.alerts = "" + this.error + ""; + }); + } + SearchUserList(this) + { + this._loadingService.ShowLoading("global-loading"); + var UserFilterControl = this.Users.value; + this.userservice.GetUserList( + { + FirstName: this.Users.controls['FirstName'].value, + LastName: this.Users.controls['LastName'].value, + EmailId: this.Users.controls['EmailId'].value, + AccountNumber: this.Users.controls['AccountNumber'].value, + UserTypeId: (this.Users.controls['UserTypeId'].value != null && this.Users.controls['UserTypeId'].value !='' ? this.Users.controls['UserTypeId'].value:0), + AccountTypeId: (this.Users.controls['AccountTypeId'].value != null && this.Users.controls['AccountTypeId'].value != ''? this.Users.controls['AccountTypeId'].value : 0), + + + }) + + .subscribe(x => { this.BindFormFields(x) }, error => this.error = error); + + } + BindFormFields(data) { + this.UserList = data; + if (this.UserList.length > 0) { + this.NoRecord = ''; + this._loadingService.HideLoading("global-loading"); + } + if (this.UserList.length == 0) { + this.NoRecord = this.global.NoRecords; + this._loadingService.HideLoading("global-loading"); + } + } + EditUser() { + debugger; + this.Mode = 'Edit'; + this.modalTitle = 'Edit USER'; + this.topPos = '100px'; + this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; + this.alerts = ''; + this.adduserFrm.controls['id'].setValue(this.UserEntity.Id) + this.adduserFrm.controls['FirstName'].setValue(this.UserEntity.FirstName) + this.adduserFrm.controls['LastName'].setValue(this.UserEntity.LastName) + this.adduserFrm.controls['EmailId'].setValue(this.UserEntity.EmailId) + this.adduserFrm.controls['UserName'].setValue(this.UserEntity.LoginId) + this.adduserFrm.controls['Password'].setValue(this.UserEntity.Password) + this.adduserFrm.controls['ConfirmPassword'].setValue(this.UserEntity.Password) + this.adduserFrm.controls['AccountNumber'].setValue(this.UserEntity.AccountNumber) + this.adduserFrm.controls['UserType'].setValue(this.UserEntity.UserTypeTitle) + this.adduserFrm.controls['AccountType'].setValue(this.UserEntity.AccountTypeTitle) + this.adduserFrm.controls['Createddate'].setValue(this.datePipe.transform(this.UserEntity.CreationDate, 'MM/dd/yyyy')) + this.adduserFrm.controls['LastModifiedDate'].setValue(this.datePipe.transform(this.UserEntity.ModifiedDate, 'MM/dd/yyyy')) + this.adduserFrm.controls['Createdby'].setValue(this.UserEntity.Createdby) + this.adduserFrm.controls['Modifiedby'].setValue(this.UserEntity.Modifiedby) + this.adduserFrm.controls['DeactivationDate'].setValue(this.datePipe.transform(this.UserEntity.DeactivationDate, 'MM/dd/yyyy')) + if (this.UserEntity.UserStatus == 'Active') { + this.adduserFrm.controls['UserStatusActive'].setValue('true') + } + else { + this.adduserFrm.controls['UserStatusActive'].setValue('false') + } + //this.adduserFrm.controls['UserStatusActive'].setValue(true) + //this.adduserFrm.controls['UserStatusInActive'].setValue(false) + this.isActive = (this.UserEntity.UserStatus=='Active'?true :false) + + } + + EditManageUserRights() { + this.Mode = 'ManageRight'; + this.modalTitle = 'MANAGE USER Right'; + this.topPos = '100px'; + this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; + this.alerts = ''; + this.managerightFrm.controls['id'].setValue(this.UserEntity.Id); + this.managerightFrm.controls['UserTypeTitle'].setValue(this.UserEntity.UserTypeTitle); + this.GetUserRights(); + } + + public UpdateUser(this) { + this.alerts = ''; + if (this.adduserFrm.value.UserName == '') { + this.alerts += 'User Name is required.'; + } + if (this.adduserFrm.value.Password == '') { + this.alerts += '
    Password of minimum 8 characters is required.'; + } + if (this.adduserFrm.value.ConfirmPassword == '') { + this.alerts += '
    Confirm Password is required.'; + } + if (this.adduserFrm.value.EmailId == '') { + this.alerts += '
    Email Id is required.'; + } + if (this.adduserFrm.value.FirstName == '') { + this.alerts += '
    First Name is required.'; + } + if (this.adduserFrm.value.LastName == '') { + this.alerts += '
    Last Name is required.'; + } + if (this.adduserFrm.value.newPassword != this.adduserFrm.value.confirmPassword) { + this.alerts += '
    Password and confirm password must be same'; + } + + if (this.adduserFrm.valid && this.alerts == '') { + this.adduserFrm.controls['isActive'].setValue(this.adduserFrm.value.UserStatusActive) + + var UserEntity = this.adduserFrm.value; + + return this.userservice.UpdateUserEntity(UserEntity) + .subscribe( + n => (this.AfterInsertData(n)), + error => { + this.error = error; + this.alerts = "" + this.error + ""; + }); + } + + } + + //public DeleteUnblockedUser(this) { + // this.alerts = ''; + //} + + AfterInsertData(data) { + + if (data == "User updated successfully") { + this.alerts = ''; + this._confirmService.activate("User updated successfully.", "alertMsg"); + } + //if (this.closeflag) { + // this.close.emit(null); + //} + //else { + //} + } + + ResetFormFields() { + //this.ChangeUserIdFrm.reset() + //this.ChangeUserIdFrm.controls['id'].setValue(this.user.Id) + //this.ChangeUserIdFrm.controls['loginid'].setValue(this.user.LoginId) + //this.ChangeUserIdFrm.controls['newloginid'].setValue('') + //this.ChangeUserIdFrm.controls['confirmloginid'].setValue('') + this.alerts = ''; + } + +} diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteLicenseUserGroup.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteLicenseUserGroup.sql new file mode 100644 index 0000000..194927e --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteLicenseUserGroup.sql @@ -0,0 +1,43 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_DeleteLicenseUserGroup]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_DeleteLicenseUserGroup] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 14-Feb-2018 +-- Description: To insert or update a user group users of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_DeleteLicenseUserGroup] + -- Add the parameters for the stored procedure here + @UserGroupId int, @Status bit out +AS +BEGIN +SET NOCOUNT ON; + + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + + delete from UserGroupToAIAUser where UserGroupId = @UserGroupId; + delete from UserGroup where Id = @UserGroupId; + + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseUserGroups.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseUserGroups.sql new file mode 100644 index 0000000..dd827a2 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseUserGroups.sql @@ -0,0 +1,39 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetLicenseUserGroups]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetLicenseUserGroups] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 09-Feb-2018 +-- Description: To get all user groups of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_GetLicenseUserGroups] + -- Add the parameters for the stored procedure here + @LicenseId int +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + -- Insert statements for procedure here + select UG.*, UGU.TotalUsers from UserGroup UG left outer join + (select count(*) as TotalUsers, UserGroupId from UserGroupToAIAUser + group by UserGroupId) UGU on UG.Id = UGU.UserGroupId where UG.LicenseId = @LicenseId; + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + + + + diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertDeleteUserManageRights.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertDeleteUserManageRights.sql new file mode 100644 index 0000000..948e99b --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertDeleteUserManageRights.sql @@ -0,0 +1,58 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_InsertDeleteUserManageRights]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_InsertDeleteUserManageRights] +GO + +-- ==================================================== +-- Author: Ebix +-- Create date: 12-Feb-2018 +-- Description: To delete and insert User Rights +-- ==================================================== +create PROCEDURE [dbo].[usp_InsertDeleteUserManageRights] + -- Add the parameters for the stored procedure here + @RoleName varchar(50),@ActivityId int, @UserId int,@RequestType varchar(20), + @Status bit out +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. +SET NOCOUNT ON; +declare @RoleId int; +declare @ParentId int; +Set @RoleId=(Select Id From UserType WHere Title=@RoleName); +set @ParentId=(select top 1 ParentId FROM Activity WHERE id =@ActivityId) + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + if(@RequestType='insert') + Begin + INSERT INTO AIAUserActivity(UserId,RoleId,ActivityId) + Select @UserId,@RoleId,Id from Activity Where ParentId=@ActivityId and IsActive=1 + End; + if(@RequestType='Remove') + begin + DELETE FROM AIAUserActivity + WHERE UserId = @UserId AND RoleId = @RoleId AND ActivityId IN (SELECT id FROM Activity WHERE ParentId=@ActivityId ) + end + + + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateLicenseUserGroup.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateLicenseUserGroup.sql new file mode 100644 index 0000000..5f216a3 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateLicenseUserGroup.sql @@ -0,0 +1,47 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_InsertUpdateLicenseUserGroup]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_InsertUpdateLicenseUserGroup] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 12-Feb-2018 +-- Description: To insert or update a user group of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_InsertUpdateLicenseUserGroup] + -- Add the parameters for the stored procedure here + @Id int, @LicenseId int, @Title varchar(100), @CreationDate datetime, @ModifiedDate datetime, @IsActive bit, @Status bit out +AS +BEGIN + + SET NOCOUNT ON; + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + if(@Id = 0) + begin + insert into UserGroup(LicenseId, Title, CreationDate, ModifiedDate, IsActive) values(@LicenseId, @Title, @CreationDate, @ModifiedDate, @IsActive); + end + else + begin + update UserGroup set Title = @Title, CreationDate = @CreationDate, ModifiedDate = @ModifiedDate, @IsActive = @IsActive where Id = @Id; + end + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseUserGroupUsers.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseUserGroupUsers.sql new file mode 100644 index 0000000..8797db8 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseUserGroupUsers.sql @@ -0,0 +1,63 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseUserGroupUsers]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_UpdateLicenseUserGroupUsers] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 14-Feb-2018 +-- Description: To insert or update a user group users of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_UpdateLicenseUserGroupUsers] + -- Add the parameters for the stored procedure here + @UserGroupId int, @UserIds varchar(2000), @Status bit out +AS +BEGIN +SET NOCOUNT ON; + +DECLARE @pos INT, @tempUserId int; +DECLARE @len INT; +DECLARE @value varchar(10); + +if(@UserIds != '') +begin + set @UserIds = @UserIds + ','; +end + + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + + delete UGU from UserGroupToAIAUser UGU where UserGroupId = @UserGroupId; + + set @pos = 0 + set @len = 0 + + WHILE CHARINDEX(',', @UserIds, @pos+1)>0 + BEGIN + set @len = CHARINDEX(',', @UserIds, @pos+1) - @pos; + set @value = SUBSTRING(@UserIds, @pos, @len); + set @tempUserId = convert(int, @value); + insert into UserGroupToAIAUser(UserGroupId, UserId) values(@UserGroupId, @tempUserId); + set @pos = CHARINDEX(',', @UserIds, @pos+@len) + 1; + END + + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj b/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj index 739f66e..3c38f38 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj @@ -167,6 +167,7 @@ + AIADBEntity.tt @@ -512,7 +513,10 @@ AIADBEntity.tt - + + AIADBEntity.tt + + AIADBEntity.tt @@ -725,12 +729,18 @@ AIADBEntity.tt - + + AIADBEntity.tt + + AIADBEntity.tt AIADBEntity.tt + + AIADBEntity.tt + AIADBEntity.tt @@ -791,6 +801,7 @@ + diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/App_Start/WebApiConfig.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/App_Start/WebApiConfig.cs index 164815d..af9553d 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/App_Start/WebApiConfig.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/App_Start/WebApiConfig.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Configuration; using System.Linq; using System.Web.Http; using System.Web.Http.Cors; @@ -15,9 +16,14 @@ namespace AIAHTML5.ADMIN.API = Newtonsoft.Json.ReferenceLoopHandling.Ignore; GlobalConfiguration.Configuration.Formatters .Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter); - + string Enablecors = ConfigurationManager.AppSettings["Enablecors"]; + if (Enablecors == "false") + { + EnableCorsAttribute cors = new EnableCorsAttribute("http://localhost:4200", "*", "GET,POST"); + config.EnableCors(cors); + } // Configure cross domain access - config.EnableCors(); + // Web API routes config.MapHttpAttributeRoutes(); diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs index 6b71f6e..639ea4b 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs @@ -43,14 +43,15 @@ namespace AIAHTML5.ADMIN.API.Controllers [HttpGet] public HttpResponseMessage GetLicenses(string accountNumber, string licenseeFirstName, string licenseeLastName, byte licenseTypeId, string institutionName, int stateId, int countryId, string emailId, DateTime subscriptionStartDate, DateTime subscriptionEndDate, - bool isActive) + bool isActive, int pageNo, int pageLength) { List LicenseList = new List(); + int recordCount = 0; try { LicenseList = LicenseModel.GetLicenses(dbContext, accountNumber, licenseeFirstName, licenseeLastName, licenseTypeId, institutionName, - stateId, countryId, emailId, subscriptionStartDate, subscriptionEndDate, isActive); - return Request.CreateResponse(HttpStatusCode.OK, LicenseList); + stateId, countryId, emailId, subscriptionStartDate, subscriptionEndDate, isActive, pageNo, pageLength, out recordCount); + return Request.CreateResponse(HttpStatusCode.OK, new { LicenseList = LicenseList, RecordCount = recordCount }); } catch (Exception ex) { @@ -59,6 +60,7 @@ namespace AIAHTML5.ADMIN.API.Controllers } } + [Route("InsertLicense")] [HttpPost] public HttpResponseMessage InsertLicense(JObject jsonData) @@ -389,5 +391,22 @@ namespace AIAHTML5.ADMIN.API.Controllers } } + [Route("CheckAccountNumber")] + [HttpGet] + public HttpResponseMessage CheckAccountNumber(string AccountNo) + { + bool Status = false; + try + { + Status = LicenseModel.CheckAccountNumber(dbContext, AccountNo); + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + } } diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs index 012acba..600ef6a 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs @@ -22,44 +22,51 @@ namespace AIAHTML5.ADMIN.API.Controllers AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities(); [Route("GetUsageReport")] [HttpGet] - public IHttpActionResult GetUsageReport(string sFromDate, string sToDate, string sAccoutNumber, string sZip, int iState, int iCountry) + public IHttpActionResult GetUsageReport(string sFromDate, string sToDate, string sAccoutNumber, string sZip, int iState, int iCountry, int pageNo, int pageLength) { - var lstUsageReport = dbContext.GetUsageReport(sFromDate, sToDate, sAccoutNumber, sZip, iState, iCountry).ToList(); - return Ok(lstUsageReport); + + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); + var lstUsageReport = dbContext.GetUsageReport(sFromDate, sToDate, sAccoutNumber, sZip, iState, iCountry,pageNo, pageLength, spRecordCount).ToList(); + return Ok(new { UserUsage = lstUsageReport, RecordCount = spRecordCount.Value }); + //return Ok(lstUsageReport); } [Route("GetCustomerSummeryReport")] [HttpGet] - public IHttpActionResult GetCustomerSummeryReport(string sAccoutNumber, string sLicenseeFullName, Nullable iStartPrice, Nullable iEndPrice, int iLicenseType, int iAccountType, string sZip, int iState, int iCountry) + public IHttpActionResult GetCustomerSummeryReport(string sAccoutNumber, string sLicenseeFullName, Nullable iStartPrice, Nullable iEndPrice, int iLicenseType, int iAccountType, string sZip, int iState, int iCountry, int pageNo, int pageLength) { - var lstCustomerSummeryReport = dbContext.GetCustomerSummary(sAccoutNumber, sLicenseeFullName, iStartPrice, iEndPrice, (byte)iLicenseType, (byte)iAccountType, sZip, iState, iCountry).ToList(); - return Ok(lstCustomerSummeryReport); + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); + var lstCustomerSummeryReport = dbContext.GetCustomerSummary(sAccoutNumber, sLicenseeFullName, iStartPrice, iEndPrice, (byte)iLicenseType, (byte)iAccountType, sZip, iState, iCountry,pageNo,pageLength,spRecordCount).ToList(); + return Ok(new { CustomerSummery = lstCustomerSummeryReport, RecordCount = spRecordCount.Value }); + //return Ok(lstCustomerSummeryReport); } [Route("GetExpiringSubscriptionReport")] [HttpGet] - public IHttpActionResult GetExpiringSubscriptionReport(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId) + public IHttpActionResult GetExpiringSubscriptionReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, int pageNo, int pageLength) { - var lstExpiringSubscriptionReport = dbContext.GetExpiringLicenses(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId).ToList(); - return Ok(lstExpiringSubscriptionReport); + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); + var lstExpiringSubscriptionReport = dbContext.GetExpiringLicenses(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, pageNo, pageLength, spRecordCount).ToList(); + return Ok(new { ExpiringSubscription = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); + } [Route("GetSubscriptionReport")] [HttpGet] - public IHttpActionResult GetSubscriptionReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId) + public IHttpActionResult GetSubscriptionReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, int pageNo, int pageLength) { - - var lstExpiringSubscriptionReport = dbContext.GetSubscribedLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId).ToList(); - return Ok(lstExpiringSubscriptionReport); + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); + var lstExpiringSubscriptionReport = dbContext.GetSubscribedLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, pageNo, pageLength, spRecordCount).ToList(); + return Ok(new { Subscription = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); } [Route("GetSubscriptionCancellationReport")] [HttpGet] - public IHttpActionResult GetSubscriptionCancellationReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId) + public IHttpActionResult GetSubscriptionCancellationReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, int pageNo, int pageLength) { - - var lstExpiringSubscriptionReport = dbContext.GetCancelledLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId).ToList(); - return Ok(lstExpiringSubscriptionReport); + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); + var lstExpiringSubscriptionReport = dbContext.GetCancelledLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, pageNo, pageLength, spRecordCount).ToList(); + return Ok(new { SubscriptionCancel = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); } [Route("GetNetAdSummaryReport")] diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs index f4ef93f..406c24c 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs @@ -16,7 +16,7 @@ using AIAHTML5.ADMIN.API.Entity; namespace AIAHTML5.ADMIN.API.Controllers { - //[EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] + // [EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] [RoutePrefix("User")] public class UserController : ApiController @@ -142,15 +142,27 @@ namespace AIAHTML5.ADMIN.API.Controllers [Route("Users")] [HttpGet] - public IHttpActionResult UserList(string firstname, string lastname, string emailid, string accountnumber, string usertypeid, string accounttypeid) + public IHttpActionResult UserList(string firstname, string lastname, string emailid, string accountnumber, string usertypeid, string accounttypeid, + int pageNo, int pageLength) { - int UserTypeId = (!string.IsNullOrEmpty(usertypeid) ? Convert.ToInt32(usertypeid) : 0); - int AccountTypeId = (!string.IsNullOrEmpty(accounttypeid) ? Convert.ToInt32(accounttypeid) : 0); - dbContext.Configuration.ProxyCreationEnabled = false; - List Users = dbContext.usp_GetSearchUserList(firstname, lastname, emailid, accountnumber, UserTypeId, AccountTypeId, 1).ToList(); - return Ok(Users); + try + { + int UserTypeId = (!string.IsNullOrEmpty(usertypeid) ? Convert.ToInt32(usertypeid) : 0); + int AccountTypeId = (!string.IsNullOrEmpty(accounttypeid) ? Convert.ToInt32(accounttypeid) : 0); + int recordCount = 0; + dbContext.Configuration.ProxyCreationEnabled = false; + //var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); + //recordCount = (int)spRecordCount.Value; + List Users = dbContext.GetSearchUsers(firstname, lastname, emailid, accountnumber, UserTypeId, AccountTypeId, 1, + pageNo, pageLength, spRecordCount).ToList(); + return Ok(new { UserList = Users, RecordCount = spRecordCount.Value }); + } + catch(Exception ex) + { + return BadRequest(); + } } - [Route("UpdateUser")] [HttpPost] public HttpResponseMessage UpdateUser(JObject jsonUserData) @@ -211,7 +223,69 @@ namespace AIAHTML5.ADMIN.API.Controllers throw new HttpResponseException(message); } } - + + [Route("InsertDeleteUserManageRights")] + [HttpPost] + public HttpResponseMessage InsertDeleteUserManageRights(JObject jsonUserData) + { + bool Status = false; + var jsonString = jsonUserData; + try + { + int UserId = 0; + string RoleName = string.Empty; + List CheckedUserRights = new List(); + List UnCheckedUserRights = new List(); + foreach (var item in jsonUserData) + { + if(item.Key=="UserId") + { + UserId = Convert.ToInt32(item.Value); + } + else if (item.Key == "UserType") + { + RoleName = item.Value.ToString(); + } + else if (item.Key == "CheckedUserRights") + { + JArray jsonVal = JArray.Parse(item.Value.ToString()) as JArray; + dynamic CheckedUserRightsList = jsonVal; + foreach (dynamic itemCheckedUserRights in CheckedUserRightsList) + { + CheckedUserRights.Add(Convert.ToInt32(itemCheckedUserRights)); + } + } + else if (item.Key == "UnCheckedUserRights") + { + JArray jsonVal = JArray.Parse(item.Value.ToString()) as JArray; + dynamic CheckedUserRightsList = jsonVal; + foreach (dynamic itemCheckedUserRights in CheckedUserRightsList) + { + UnCheckedUserRights.Add(Convert.ToInt32(itemCheckedUserRights)); + } + } + + + } + Status = UserModel.InsertDeleteUserManageRight(dbContext, CheckedUserRights, UnCheckedUserRights, UserId, RoleName); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, "Done"); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + + + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + #endregion #region Add User [Route("GetUserTypebyLicenseId")] diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs new file mode 100644 index 0000000..593240a --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using AIAHTML5.ADMIN.API.Models; +using System.Web.Http.Cors; +using System.Web.Cors; +using AIAHTML5.Server.Constants; +using log4net; +using System.Text; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Controllers +{ + //[EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] + [RoutePrefix("UserGroup")] + public class UserGroupController : ApiController + { + AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities(); + + [Route("LicenseUserGroups")] + [HttpGet] + public HttpResponseMessage GetLicenseUserGroups(int LicenseId) + { + List UserGroupList = new List(); + try + { + UserGroupList = UserGroupModel.GetLicenseUserGroups(dbContext, LicenseId); + return Request.CreateResponse(HttpStatusCode.OK, UserGroupList); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("LicenseUserGroupUsers")] + [HttpGet] + public HttpResponseMessage GetLicenseUserGroupUsers(int LicenseId, int UserGroupId) + { + List UserList = new List(); + try + { + UserList = UserGroupModel.GetLicenseUserGroupUsers(dbContext, LicenseId, UserGroupId); + return Request.CreateResponse(HttpStatusCode.OK, UserList); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("InsertUpdateLicenseUserGroup")] + [HttpPost] + public HttpResponseMessage InsertUpdateLicenseUserGroup(JObject jsonData) + { + bool Status = false; + UserGroupModel UserGroupEntity = new UserGroupModel(); + UserGroupEntity.Id = jsonData["id"].Value(); + UserGroupEntity.LicenseId = jsonData["licenseId"].Value(); + UserGroupEntity.Title = jsonData["title"].Value(); + UserGroupEntity.IsActive = jsonData["isActive"].Value(); + UserGroupEntity.CreationDate = jsonData["creationDate"].Value(); + UserGroupEntity.ModifiedDate = jsonData["modifiedDate"].Value(); + try + { + Status = UserGroupModel.InsertUpdateLicenseUserGroup(dbContext, UserGroupEntity); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("UpdateLicenseUserGroupUsers")] + [HttpPost] + public HttpResponseMessage UpdateLicenseUserGroupUsers(JObject jsonData) + { + bool Status = false; + int UserGroupId = jsonData["userGroupId"].Value(); + string UserIds = jsonData["userIds"].Value(); + try + { + Status = UserGroupModel.UpdateLicenseUserGroupUsers(dbContext, UserGroupId, UserIds); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("DeleteLicenseUserGroup")] + [HttpGet] + public HttpResponseMessage DeleteLicenseUserGroup(int UserGroupId) + { + bool Status = false; + try + { + Status = UserGroupModel.DeleteLicenseUserGroup(dbContext, UserGroupId); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + } +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs index 8450fa7..228e18b 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs @@ -971,7 +971,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCAMSearch", sSearchKeywordParameter); } - public virtual ObjectResult GetCancelledLicenses(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseTypeId, Nullable iAccountTypeId, string sZip, Nullable iStateId, Nullable iCountryId) + public virtual ObjectResult GetCancelledLicenses(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseTypeId, Nullable iAccountTypeId, string sZip, Nullable iStateId, Nullable iCountryId, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) { var sFromDateParameter = sFromDate != null ? new ObjectParameter("sFromDate", sFromDate) : @@ -1009,7 +1009,15 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("iCountryId", iCountryId) : new ObjectParameter("iCountryId", typeof(int)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCancelledLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter); + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCancelledLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, pageNoParameter, pageLengthParameter, recordCount); } public virtual int GetContentAttributeData(Nullable iContentTypeId) @@ -1030,7 +1038,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetContentList", iContentTypeIdParameter); } - public virtual ObjectResult GetCustomerSummary(string sAccoutNumber, string sLicenseeFullName, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseType, Nullable iAccountType, string sZip, Nullable iState, Nullable iCountry) + public virtual ObjectResult GetCustomerSummary(string sAccoutNumber, string sLicenseeFullName, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseType, Nullable iAccountType, string sZip, Nullable iState, Nullable iCountry, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) { var sAccoutNumberParameter = sAccoutNumber != null ? new ObjectParameter("sAccoutNumber", sAccoutNumber) : @@ -1068,7 +1076,15 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("iCountry", iCountry) : new ObjectParameter("iCountry", typeof(int)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCustomerSummary", sAccoutNumberParameter, sLicenseeFullNameParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeParameter, iAccountTypeParameter, sZipParameter, iStateParameter, iCountryParameter); + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetCustomerSummary", sAccoutNumberParameter, sLicenseeFullNameParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeParameter, iAccountTypeParameter, sZipParameter, iStateParameter, iCountryParameter, pageNoParameter, pageLengthParameter, recordCount); } public virtual ObjectResult GetDiscountDetails(string sDiscountCode, string sStartDate, string sEndDate) @@ -1149,7 +1165,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetEncyclopediaSearch", iLexiconIdParameter, sSearchKeywordParameter); } - public virtual ObjectResult GetExpiringLicenses(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseTypeId, Nullable iAccountTypeId, string sZip, Nullable iStateId, Nullable iCountryId) + public virtual ObjectResult GetExpiringLicenses(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseTypeId, Nullable iAccountTypeId, string sZip, Nullable iStateId, Nullable iCountryId, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) { var sFromDateParameter = sFromDate != null ? new ObjectParameter("sFromDate", sFromDate) : @@ -1187,7 +1203,15 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("iCountryId", iCountryId) : new ObjectParameter("iCountryId", typeof(int)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetExpiringLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter); + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetExpiringLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, pageNoParameter, pageLengthParameter, recordCount); } public virtual ObjectResult GetExportedImageDetails(string sStartDate, string sEndDate, string sAccoutNumber) @@ -1466,7 +1490,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSearchTerms"); } - public virtual ObjectResult GetSearchUserList(string sFirstName, string sLastName, string sEmailId, string sAccoutNumber, Nullable iUserTypeId, Nullable iAccountTypeId, Nullable iLoginUserType) + public virtual int GetSearchUserList(string sFirstName, string sLastName, string sEmailId, string sAccoutNumber, Nullable iUserTypeId, Nullable iAccountTypeId, Nullable iLoginUserType, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) { var sFirstNameParameter = sFirstName != null ? new ObjectParameter("sFirstName", sFirstName) : @@ -1496,7 +1520,15 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("iLoginUserType", iLoginUserType) : new ObjectParameter("iLoginUserType", typeof(int)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSearchUserList", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter); + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSearchUserList", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter, pageNoParameter, pageLengthParameter, recordCount); } public virtual ObjectResult GetSiteAccoutDetail(string strAccountNumber) @@ -1538,7 +1570,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSiteLicenseUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter); } - public virtual ObjectResult GetSubscribedLicenses(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseTypeId, Nullable iAccountTypeId, string sZip, Nullable iStateId, Nullable iCountryId) + public virtual ObjectResult GetSubscribedLicenses(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseTypeId, Nullable iAccountTypeId, string sZip, Nullable iStateId, Nullable iCountryId, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) { var sFromDateParameter = sFromDate != null ? new ObjectParameter("sFromDate", sFromDate) : @@ -1576,7 +1608,15 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("iCountryId", iCountryId) : new ObjectParameter("iCountryId", typeof(int)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSubscribedLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter); + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSubscribedLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, pageNoParameter, pageLengthParameter, recordCount); } public virtual ObjectResult GetSubscriptionDetailsByLicenseId(Nullable iLicenseId) @@ -1630,7 +1670,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("GetTotalLoginsByLicenseEditionId", licenseEditionIdParameter); } - public virtual ObjectResult GetUsageReport(string sFromDate, string sToDate, string sAccoutNumber, string sZip, Nullable iState, Nullable iCountry) + public virtual ObjectResult GetUsageReport(string sFromDate, string sToDate, string sAccoutNumber, string sZip, Nullable iState, Nullable iCountry, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) { var sFromDateParameter = sFromDate != null ? new ObjectParameter("sFromDate", sFromDate) : @@ -1656,7 +1696,15 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("iCountry", iCountry) : new ObjectParameter("iCountry", typeof(int)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, sZipParameter, iStateParameter, iCountryParameter); + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, sZipParameter, iStateParameter, iCountryParameter, pageNoParameter, pageLengthParameter, recordCount); } public virtual ObjectResult GetUsageReport_OLD_PROC(string sFromDate, string sToDate, string sAccoutNumber, string sZip, Nullable iState, Nullable iCountry) @@ -3159,55 +3207,6 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetLicenseById", idParameter); } - public virtual ObjectResult usp_GetLicenses(string sStartDate, string sEndDate, string sAccoutNumber, string sLicenseeFirstName, string sLicenseeLastName, Nullable iLicenseTypeId, string sInstituteName, string sEmail, Nullable iStateId, Nullable iCountryId, Nullable bisActive) - { - var sStartDateParameter = sStartDate != null ? - new ObjectParameter("sStartDate", sStartDate) : - new ObjectParameter("sStartDate", typeof(string)); - - var sEndDateParameter = sEndDate != null ? - new ObjectParameter("sEndDate", sEndDate) : - new ObjectParameter("sEndDate", typeof(string)); - - var sAccoutNumberParameter = sAccoutNumber != null ? - new ObjectParameter("sAccoutNumber", sAccoutNumber) : - new ObjectParameter("sAccoutNumber", typeof(string)); - - var sLicenseeFirstNameParameter = sLicenseeFirstName != null ? - new ObjectParameter("sLicenseeFirstName", sLicenseeFirstName) : - new ObjectParameter("sLicenseeFirstName", typeof(string)); - - var sLicenseeLastNameParameter = sLicenseeLastName != null ? - new ObjectParameter("sLicenseeLastName", sLicenseeLastName) : - new ObjectParameter("sLicenseeLastName", typeof(string)); - - var iLicenseTypeIdParameter = iLicenseTypeId.HasValue ? - new ObjectParameter("iLicenseTypeId", iLicenseTypeId) : - new ObjectParameter("iLicenseTypeId", typeof(byte)); - - var sInstituteNameParameter = sInstituteName != null ? - new ObjectParameter("sInstituteName", sInstituteName) : - new ObjectParameter("sInstituteName", typeof(string)); - - var sEmailParameter = sEmail != null ? - new ObjectParameter("sEmail", sEmail) : - new ObjectParameter("sEmail", typeof(string)); - - var iStateIdParameter = iStateId.HasValue ? - new ObjectParameter("iStateId", iStateId) : - new ObjectParameter("iStateId", typeof(int)); - - var iCountryIdParameter = iCountryId.HasValue ? - new ObjectParameter("iCountryId", iCountryId) : - new ObjectParameter("iCountryId", typeof(int)); - - var bisActiveParameter = bisActive.HasValue ? - new ObjectParameter("bisActive", bisActive) : - new ObjectParameter("bisActive", typeof(bool)); - - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetLicenses", sStartDateParameter, sEndDateParameter, sAccoutNumberParameter, sLicenseeFirstNameParameter, sLicenseeLastNameParameter, iLicenseTypeIdParameter, sInstituteNameParameter, sEmailParameter, iStateIdParameter, iCountryIdParameter, bisActiveParameter); - } - public virtual ObjectResult usp_GetLicenseTypes() { return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetLicenseTypes"); @@ -3449,5 +3448,291 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModuleStatus", licenseIdParameter, moduleIdParameter, moduleStatusParameter, status); } + + public virtual int usp_InsertDeleteUserManageRights(string roleName, Nullable activityId, Nullable userId, string requestType, ObjectParameter status) + { + var roleNameParameter = roleName != null ? + new ObjectParameter("RoleName", roleName) : + new ObjectParameter("RoleName", typeof(string)); + + var activityIdParameter = activityId.HasValue ? + new ObjectParameter("ActivityId", activityId) : + new ObjectParameter("ActivityId", typeof(int)); + + var userIdParameter = userId.HasValue ? + new ObjectParameter("UserId", userId) : + new ObjectParameter("UserId", typeof(int)); + + var requestTypeParameter = requestType != null ? + new ObjectParameter("RequestType", requestType) : + new ObjectParameter("RequestType", typeof(string)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertDeleteUserManageRights", roleNameParameter, activityIdParameter, userIdParameter, requestTypeParameter, status); + } + + public virtual int usp_DeleteLicenseUserGroup(Nullable userGroupId, ObjectParameter status) + { + var userGroupIdParameter = userGroupId.HasValue ? + new ObjectParameter("UserGroupId", userGroupId) : + new ObjectParameter("UserGroupId", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_DeleteLicenseUserGroup", userGroupIdParameter, status); + } + + public virtual ObjectResult usp_GetLicenseUserGroups(Nullable licenseId) + { + var licenseIdParameter = licenseId.HasValue ? + new ObjectParameter("LicenseId", licenseId) : + new ObjectParameter("LicenseId", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetLicenseUserGroups", licenseIdParameter); + } + + public virtual int usp_InsertUpdateLicenseUserGroup(Nullable id, Nullable licenseId, string title, Nullable creationDate, Nullable modifiedDate, Nullable isActive, ObjectParameter status) + { + var idParameter = id.HasValue ? + new ObjectParameter("Id", id) : + new ObjectParameter("Id", typeof(int)); + + var licenseIdParameter = licenseId.HasValue ? + new ObjectParameter("LicenseId", licenseId) : + new ObjectParameter("LicenseId", typeof(int)); + + var titleParameter = title != null ? + new ObjectParameter("Title", title) : + new ObjectParameter("Title", typeof(string)); + + var creationDateParameter = creationDate.HasValue ? + new ObjectParameter("CreationDate", creationDate) : + new ObjectParameter("CreationDate", typeof(System.DateTime)); + + var modifiedDateParameter = modifiedDate.HasValue ? + new ObjectParameter("ModifiedDate", modifiedDate) : + new ObjectParameter("ModifiedDate", typeof(System.DateTime)); + + var isActiveParameter = isActive.HasValue ? + new ObjectParameter("IsActive", isActive) : + new ObjectParameter("IsActive", typeof(bool)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertUpdateLicenseUserGroup", idParameter, licenseIdParameter, titleParameter, creationDateParameter, modifiedDateParameter, isActiveParameter, status); + } + + public virtual int usp_UpdateLicenseUserGroupUsers(Nullable userGroupId, string userIds, ObjectParameter status) + { + var userGroupIdParameter = userGroupId.HasValue ? + new ObjectParameter("UserGroupId", userGroupId) : + new ObjectParameter("UserGroupId", typeof(int)); + + var userIdsParameter = userIds != null ? + new ObjectParameter("UserIds", userIds) : + new ObjectParameter("UserIds", typeof(string)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseUserGroupUsers", userGroupIdParameter, userIdsParameter, status); + } + + public virtual ObjectResult usp_Getlicenses(string sStartDate, string sEndDate, string sAccoutNumber, string sLicenseeFirstName, string sLicenseeLastName, Nullable iLicenseTypeId, string sInstituteName, string sEmail, Nullable iStateId, Nullable iCountryId, Nullable bisActive, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) + { + var sStartDateParameter = sStartDate != null ? + new ObjectParameter("sStartDate", sStartDate) : + new ObjectParameter("sStartDate", typeof(string)); + + var sEndDateParameter = sEndDate != null ? + new ObjectParameter("sEndDate", sEndDate) : + new ObjectParameter("sEndDate", typeof(string)); + + var sAccoutNumberParameter = sAccoutNumber != null ? + new ObjectParameter("sAccoutNumber", sAccoutNumber) : + new ObjectParameter("sAccoutNumber", typeof(string)); + + var sLicenseeFirstNameParameter = sLicenseeFirstName != null ? + new ObjectParameter("sLicenseeFirstName", sLicenseeFirstName) : + new ObjectParameter("sLicenseeFirstName", typeof(string)); + + var sLicenseeLastNameParameter = sLicenseeLastName != null ? + new ObjectParameter("sLicenseeLastName", sLicenseeLastName) : + new ObjectParameter("sLicenseeLastName", typeof(string)); + + var iLicenseTypeIdParameter = iLicenseTypeId.HasValue ? + new ObjectParameter("iLicenseTypeId", iLicenseTypeId) : + new ObjectParameter("iLicenseTypeId", typeof(byte)); + + var sInstituteNameParameter = sInstituteName != null ? + new ObjectParameter("sInstituteName", sInstituteName) : + new ObjectParameter("sInstituteName", typeof(string)); + + var sEmailParameter = sEmail != null ? + new ObjectParameter("sEmail", sEmail) : + new ObjectParameter("sEmail", typeof(string)); + + var iStateIdParameter = iStateId.HasValue ? + new ObjectParameter("iStateId", iStateId) : + new ObjectParameter("iStateId", typeof(int)); + + var iCountryIdParameter = iCountryId.HasValue ? + new ObjectParameter("iCountryId", iCountryId) : + new ObjectParameter("iCountryId", typeof(int)); + + var bisActiveParameter = bisActive.HasValue ? + new ObjectParameter("bisActive", bisActive) : + new ObjectParameter("bisActive", typeof(bool)); + + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_Getlicenses", sStartDateParameter, sEndDateParameter, sAccoutNumberParameter, sLicenseeFirstNameParameter, sLicenseeLastNameParameter, iLicenseTypeIdParameter, sInstituteNameParameter, sEmailParameter, iStateIdParameter, iCountryIdParameter, bisActiveParameter, pageNoParameter, pageLengthParameter, recordCount); + } + + public virtual ObjectResult usp_GetlicensesList(string sStartDate, string sEndDate, string sAccoutNumber, string sLicenseeFirstName, string sLicenseeLastName, Nullable iLicenseTypeId, string sInstituteName, string sEmail, Nullable iStateId, Nullable iCountryId, Nullable bisActive, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) + { + var sStartDateParameter = sStartDate != null ? + new ObjectParameter("sStartDate", sStartDate) : + new ObjectParameter("sStartDate", typeof(string)); + + var sEndDateParameter = sEndDate != null ? + new ObjectParameter("sEndDate", sEndDate) : + new ObjectParameter("sEndDate", typeof(string)); + + var sAccoutNumberParameter = sAccoutNumber != null ? + new ObjectParameter("sAccoutNumber", sAccoutNumber) : + new ObjectParameter("sAccoutNumber", typeof(string)); + + var sLicenseeFirstNameParameter = sLicenseeFirstName != null ? + new ObjectParameter("sLicenseeFirstName", sLicenseeFirstName) : + new ObjectParameter("sLicenseeFirstName", typeof(string)); + + var sLicenseeLastNameParameter = sLicenseeLastName != null ? + new ObjectParameter("sLicenseeLastName", sLicenseeLastName) : + new ObjectParameter("sLicenseeLastName", typeof(string)); + + var iLicenseTypeIdParameter = iLicenseTypeId.HasValue ? + new ObjectParameter("iLicenseTypeId", iLicenseTypeId) : + new ObjectParameter("iLicenseTypeId", typeof(byte)); + + var sInstituteNameParameter = sInstituteName != null ? + new ObjectParameter("sInstituteName", sInstituteName) : + new ObjectParameter("sInstituteName", typeof(string)); + + var sEmailParameter = sEmail != null ? + new ObjectParameter("sEmail", sEmail) : + new ObjectParameter("sEmail", typeof(string)); + + var iStateIdParameter = iStateId.HasValue ? + new ObjectParameter("iStateId", iStateId) : + new ObjectParameter("iStateId", typeof(int)); + + var iCountryIdParameter = iCountryId.HasValue ? + new ObjectParameter("iCountryId", iCountryId) : + new ObjectParameter("iCountryId", typeof(int)); + + var bisActiveParameter = bisActive.HasValue ? + new ObjectParameter("bisActive", bisActive) : + new ObjectParameter("bisActive", typeof(bool)); + + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetlicensesList", sStartDateParameter, sEndDateParameter, sAccoutNumberParameter, sLicenseeFirstNameParameter, sLicenseeLastNameParameter, iLicenseTypeIdParameter, sInstituteNameParameter, sEmailParameter, iStateIdParameter, iCountryIdParameter, bisActiveParameter, pageNoParameter, pageLengthParameter, recordCount); + } + + public virtual ObjectResult GetSearchUserList1(string sFirstName, string sLastName, string sEmailId, string sAccoutNumber, Nullable iUserTypeId, Nullable iAccountTypeId, Nullable iLoginUserType, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) + { + var sFirstNameParameter = sFirstName != null ? + new ObjectParameter("sFirstName", sFirstName) : + new ObjectParameter("sFirstName", typeof(string)); + + var sLastNameParameter = sLastName != null ? + new ObjectParameter("sLastName", sLastName) : + new ObjectParameter("sLastName", typeof(string)); + + var sEmailIdParameter = sEmailId != null ? + new ObjectParameter("sEmailId", sEmailId) : + new ObjectParameter("sEmailId", typeof(string)); + + var sAccoutNumberParameter = sAccoutNumber != null ? + new ObjectParameter("sAccoutNumber", sAccoutNumber) : + new ObjectParameter("sAccoutNumber", typeof(string)); + + var iUserTypeIdParameter = iUserTypeId.HasValue ? + new ObjectParameter("iUserTypeId", iUserTypeId) : + new ObjectParameter("iUserTypeId", typeof(int)); + + var iAccountTypeIdParameter = iAccountTypeId.HasValue ? + new ObjectParameter("iAccountTypeId", iAccountTypeId) : + new ObjectParameter("iAccountTypeId", typeof(int)); + + var iLoginUserTypeParameter = iLoginUserType.HasValue ? + new ObjectParameter("iLoginUserType", iLoginUserType) : + new ObjectParameter("iLoginUserType", typeof(int)); + + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSearchUserList1", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter, pageNoParameter, pageLengthParameter, recordCount); + } + + public virtual ObjectResult GetSearchUsers(string sFirstName, string sLastName, string sEmailId, string sAccoutNumber, Nullable iUserTypeId, Nullable iAccountTypeId, Nullable iLoginUserType, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) + { + var sFirstNameParameter = sFirstName != null ? + new ObjectParameter("sFirstName", sFirstName) : + new ObjectParameter("sFirstName", typeof(string)); + + var sLastNameParameter = sLastName != null ? + new ObjectParameter("sLastName", sLastName) : + new ObjectParameter("sLastName", typeof(string)); + + var sEmailIdParameter = sEmailId != null ? + new ObjectParameter("sEmailId", sEmailId) : + new ObjectParameter("sEmailId", typeof(string)); + + var sAccoutNumberParameter = sAccoutNumber != null ? + new ObjectParameter("sAccoutNumber", sAccoutNumber) : + new ObjectParameter("sAccoutNumber", typeof(string)); + + var iUserTypeIdParameter = iUserTypeId.HasValue ? + new ObjectParameter("iUserTypeId", iUserTypeId) : + new ObjectParameter("iUserTypeId", typeof(int)); + + var iAccountTypeIdParameter = iAccountTypeId.HasValue ? + new ObjectParameter("iAccountTypeId", iAccountTypeId) : + new ObjectParameter("iAccountTypeId", typeof(int)); + + var iLoginUserTypeParameter = iLoginUserType.HasValue ? + new ObjectParameter("iLoginUserType", iLoginUserType) : + new ObjectParameter("iLoginUserType", typeof(int)); + + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSearchUsers", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter, pageNoParameter, pageLengthParameter, recordCount); + } + + public virtual int usp_CheckAccountNoExists(string accountNo, ObjectParameter status) + { + var accountNoParameter = accountNo != null ? + new ObjectParameter("AccountNo", accountNo) : + new ObjectParameter("AccountNo", typeof(string)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_CheckAccountNoExists", accountNoParameter, status); + } } } diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx index ef07853..9ea5f41 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx @@ -2074,6 +2074,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + @@ -2091,6 +2094,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + @@ -2133,6 +2139,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + @@ -2178,9 +2187,6 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does - - - @@ -2228,6 +2234,21 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + + + + + + + + + + + + + @@ -2251,6 +2272,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + @@ -2273,6 +2297,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + @@ -2615,7 +2642,15 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + + + + + + @@ -2640,7 +2675,7 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does - + @@ -2652,8 +2687,14 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + + + + @@ -2661,15 +2702,6 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does - - - - - - - - - @@ -2697,6 +2729,13 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + + + + + @@ -2706,6 +2745,15 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + + + + + + + @@ -2771,6 +2819,11 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + + + @@ -5674,6 +5727,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + @@ -5691,6 +5747,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + @@ -5728,6 +5787,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + @@ -5815,7 +5877,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - + @@ -5823,6 +5885,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + @@ -5846,6 +5911,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + @@ -5868,6 +5936,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + @@ -6224,7 +6295,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - + @@ -6296,19 +6367,6 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - - - - - - - - - - - - - @@ -6329,7 +6387,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - + @@ -6381,6 +6439,94 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6916,23 +7062,6 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - - - - - - - - - - - - - - - - - @@ -7015,6 +7144,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + @@ -7267,28 +7397,6 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - - - - - - - - - - - - - - - - - - - - - - @@ -7334,6 +7442,94 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -9127,7 +9323,6 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - @@ -9222,27 +9417,6 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - - - - - - - - - - - - - - - - - - - - - @@ -9362,6 +9536,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + @@ -9675,30 +9850,6 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - - - - - - - - - - - - - - - - - - - - - - - - @@ -9749,32 +9900,6 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -9845,6 +9970,93 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetSearchUserList_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetSearchUserList1_Result.cs index b480457..e7850ba 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetSearchUserList_Result.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetSearchUserList1_Result.cs @@ -11,7 +11,7 @@ namespace AIAHTML5.ADMIN.API.Entity { using System; - public partial class GetSearchUserList_Result + public partial class GetSearchUserList1_Result { public Nullable Id { get; set; } public string FirstName { get; set; } diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetSearchUsers_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetSearchUsers_Result.cs new file mode 100644 index 0000000..e84584a --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetSearchUsers_Result.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AIAHTML5.ADMIN.API.Entity +{ + using System; + + public partial class GetSearchUsers_Result + { + public Nullable RowNum { get; set; } + public Nullable Id { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string LoginId { get; set; } + public string EmailId { get; set; } + public string UserTypeTitle { get; set; } + public string Password { get; set; } + public Nullable CreationDate { get; set; } + public Nullable ModifiedDate { get; set; } + public string AccountNumber { get; set; } + public string AccountTypeTitle { get; set; } + public string EditionType { get; set; } + public string UserStatus { get; set; } + public Nullable UserTypeId { get; set; } + public Nullable EditionTypeId { get; set; } + } +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetUsageReport_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetUsageReport_Result.cs index ba66087..15871a2 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetUsageReport_Result.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/GetUsageReport_Result.cs @@ -26,5 +26,6 @@ namespace AIAHTML5.ADMIN.API.Entity public string InstitutionName { get; set; } public Nullable TotalLogins { get; set; } public string LastLogin { get; set; } + public Nullable RowNum { get; set; } } } diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseUserGroups_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseUserGroups_Result.cs new file mode 100644 index 0000000..4e88bff --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseUserGroups_Result.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AIAHTML5.ADMIN.API.Entity +{ + using System; + + public partial class usp_GetLicenseUserGroups_Result + { + public int Id { get; set; } + public string Title { get; set; } + public int LicenseId { get; set; } + public System.DateTime CreationDate { get; set; } + public Nullable ModifiedDate { get; set; } + public bool IsActive { get; set; } + public Nullable TotalUsers { get; set; } + } +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenses_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenses_Result.cs index 34defa5..f49aa89 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenses_Result.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenses_Result.cs @@ -11,7 +11,7 @@ namespace AIAHTML5.ADMIN.API.Entity { using System; - public partial class usp_GetLicenses_Result + public partial class usp_Getlicenses_Result { public int LicenseId { get; set; } public string AccountNumber { get; set; } diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetlicensesList_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetlicensesList_Result.cs new file mode 100644 index 0000000..0f9b2e6 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetlicensesList_Result.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AIAHTML5.ADMIN.API.Entity +{ + using System; + + public partial class usp_GetlicensesList_Result + { + public int LicenseId { get; set; } + public string AccountNumber { get; set; } + public string LicenseType { get; set; } + public string AccountType { get; set; } + public string InstitutionName { get; set; } + public string LicenseState { get; set; } + public string LicenseCountry { get; set; } + public string EmailId { get; set; } + public Nullable CardNumber { get; set; } + public string ProductKey { get; set; } + public string ClientAdmin { get; set; } + public string LicenseeName { get; set; } + public string ContactAddress { get; set; } + public string EntryDate { get; set; } + public string LicenseStatus { get; set; } + public string ModifyDate { get; set; } + public string StartDate { get; set; } + public string RenewDate { get; set; } + public string EndDate { get; set; } + public Nullable NoofImages { get; set; } + } +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/DiscountCodeModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/DiscountCodeModel.cs index a677a03..3611937 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/DiscountCodeModel.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/DiscountCodeModel.cs @@ -21,7 +21,7 @@ namespace AIAHTML5.ADMIN.API.Models DiscountCodeModel DiscountCodeObj = new DiscountCodeModel(); try { - var result = dbContext.GetDiscountCodes(discountCode, startDate.ToString(), endDate.ToString()).ToList(); + var result = dbContext.GetDiscountCodes(discountCode, startDate.ToString("MM/dd/yyyy"), endDate.ToString("MM/dd/yyyy")).ToList(); if (result.Count > 0) { foreach (var item in result) diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs index dae84e7..1a6bd58 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs @@ -57,20 +57,21 @@ namespace AIAHTML5.ADMIN.API.Models public bool IsRenew { get; set; } public static List GetLicenses(AIADatabaseV5Entities dbContext, string accountNumber, string licenseeFirstName, - string licenseeLastName, byte licenseTypeId, string institutionName, int stateId, int countryId, string emailId, - DateTime subscriptionStartDate, DateTime subscriptionEndDate, bool isActive) + string licenseeLastName, byte licenseTypeId, string institutionName, int stateId, int countryId, string emailId, + DateTime subscriptionStartDate, DateTime subscriptionEndDate, bool isActive, int pageNo, int pageLength, out int recordCount) { List LicenseList = new List(); LicenseModel LicenseObj = new LicenseModel(); - int i = 0; + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); + recordCount = 0; try { - var result = dbContext.usp_GetLicenses( + var result = dbContext.usp_GetlicensesList( (subscriptionStartDate > DateTime.MinValue ? subscriptionStartDate.ToShortDateString() : "01/01/01"), (subscriptionEndDate > DateTime.MinValue ? subscriptionEndDate.ToShortDateString() : "01/01/01"), (accountNumber == null ? "" : accountNumber), (licenseeFirstName == null ? "" : licenseeFirstName), (licenseeLastName == null ? "" : licenseeLastName), licenseTypeId, (institutionName == null ? "" : institutionName), - (emailId == null ? "" : emailId), stateId, countryId, isActive).ToList(); + (emailId == null ? "" : emailId), stateId, countryId, isActive, pageNo, pageLength, spRecordCount).ToList(); if (result.Count > 0) { foreach (var item in result) @@ -97,9 +98,8 @@ namespace AIAHTML5.ADMIN.API.Models LicenseObj.ModifyDate = DateTime.ParseExact((item.ModifyDate == "" ? "01/01/0001" : item.ModifyDate), "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture); LicenseObj.IsActive = (item.LicenseStatus == "Active" ? true : false); LicenseList.Add(LicenseObj); - i++; - if (i >= 100) break; } + recordCount = (int)spRecordCount.Value; } } catch (Exception ex) { } @@ -421,6 +421,19 @@ namespace AIAHTML5.ADMIN.API.Models } } + public static bool CheckAccountNumber(AIADatabaseV5Entities dbContext, string AccountNo) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_CheckAccountNoExists(AccountNo, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } } public class LicenseTypeModel diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs new file mode 100644 index 0000000..634d6c6 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Models +{ + public class UserGroupModel + { + public int Id { get; set; } + public int LicenseId { get; set; } + public string Title { get; set; } + public DateTime? CreationDate { get; set; } + public DateTime? ModifiedDate { get; set; } + public bool? IsActive { get; set; } + public int? TotalUsers { get; set; } + + public static List GetLicenseUserGroups(AIADatabaseV5Entities dbContext, int LicenseId) + { + List UserGroupList = new List(); + UserGroupModel UserGroupObj = new UserGroupModel(); + try + { + var result = dbContext.usp_GetLicenseUserGroups(LicenseId).ToList(); + foreach (var item in result) + { + UserGroupObj = new UserGroupModel(); + UserGroupObj.Id = item.Id; + UserGroupObj.LicenseId = item.LicenseId; + UserGroupObj.Title = item.Title; + UserGroupObj.IsActive = item.IsActive; + UserGroupObj.ModifiedDate = item.ModifiedDate; + UserGroupObj.CreationDate = item.CreationDate; + UserGroupObj.TotalUsers = item.TotalUsers; + UserGroupList.Add(UserGroupObj); + } + } + catch (Exception ex) { } + return UserGroupList; + } + + public static List GetLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int LicenseId, int UserGroupId) + { + List UserList = new List(); + UserModel UserModelObj = new UserModel(); + try + { + var result = dbContext.GetAllUserWithGroup(LicenseId, UserGroupId).ToList(); + foreach (var item in result) + { + UserModelObj = new UserModel(); + UserModelObj.Id = item.Id; + UserModelObj.FirstName = item.FirstName; + UserModelObj.LastName = item.LastName; + UserModelObj.LoginId = item.LoginId; + UserModelObj.EmailId = item.EmailId; + UserModelObj.ProductEdition = item.Title; + UserModelObj.InGroup = item.InGroup; + UserList.Add(UserModelObj); + } + } + catch (Exception ex) { } + return UserList; + } + + public static bool InsertUpdateLicenseUserGroup(AIADatabaseV5Entities dbContext, UserGroupModel UserGroupEntity) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_InsertUpdateLicenseUserGroup(UserGroupEntity.Id, UserGroupEntity.LicenseId, UserGroupEntity.Title, + UserGroupEntity.CreationDate, UserGroupEntity.ModifiedDate, UserGroupEntity.IsActive, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + public static bool UpdateLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int UserGroupId, string UserIds) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_UpdateLicenseUserGroupUsers(UserGroupId, UserIds, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + public static bool DeleteLicenseUserGroup(AIADatabaseV5Entities dbContext, int UserGroupId) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_DeleteLicenseUserGroup(UserGroupId, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + } + +} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs index f840952..5b33483 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs @@ -27,7 +27,8 @@ namespace AIAHTML5.ADMIN.API.Models public int LicenseId { get; set; } public int EditionId { get; set; } public short iUserTypeId { get; set; } - + public int InGroup { get; set; } + public string ProductEdition { get; set; } public static bool UpdateUserProfile(AIADatabaseV5Entities dbContext, int intUserID, string strFirstName, string strLastName, string strEmailID) { @@ -136,5 +137,30 @@ namespace AIAHTML5.ADMIN.API.Models return false; } } + + public static bool InsertDeleteUserManageRight(AIADatabaseV5Entities dbContext, List SelectectedUserRights, List UncheckedUserRights, + int UserId,string RoleName) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + foreach (var item in SelectectedUserRights) + { + dbContext.usp_InsertDeleteUserManageRights(RoleName,item,UserId,"Insert", spStatus); + if (!(bool)spStatus.Value) break; + } + foreach (var item in UncheckedUserRights) + { + dbContext.usp_InsertDeleteUserManageRights(RoleName, item, UserId, "Remove", spStatus); + if (!(bool)spStatus.Value) break; + } + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + } } \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Web.config b/400-SOURCECODE/AIAHTML5.ADMIN.API/Web.config index 5308430..7fa7593 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Web.config +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Web.config @@ -12,6 +12,7 @@ + diff --git a/400-SOURCECODE/Admin/dist/assets/img/alertmessage.png b/400-SOURCECODE/Admin/dist/assets/img/alertmessage.png deleted file mode 100644 index f5f2786..0000000 --- a/400-SOURCECODE/Admin/dist/assets/img/alertmessage.png +++ /dev/null diff --git a/400-SOURCECODE/Admin/dist/assets/img/bg.gif b/400-SOURCECODE/Admin/dist/assets/img/bg.gif deleted file mode 100644 index fac668f..0000000 --- a/400-SOURCECODE/Admin/dist/assets/img/bg.gif +++ /dev/null diff --git a/400-SOURCECODE/Admin/dist/assets/img/calander.png b/400-SOURCECODE/Admin/dist/assets/img/calander.png deleted file mode 100644 index 62ba25c..0000000 --- a/400-SOURCECODE/Admin/dist/assets/img/calander.png +++ /dev/null diff --git a/400-SOURCECODE/Admin/dist/assets/img/close-button.png b/400-SOURCECODE/Admin/dist/assets/img/close-button.png deleted file mode 100644 index 933272b..0000000 --- a/400-SOURCECODE/Admin/dist/assets/img/close-button.png +++ /dev/null diff --git a/400-SOURCECODE/Admin/dist/assets/img/doller.png b/400-SOURCECODE/Admin/dist/assets/img/doller.png deleted file mode 100644 index 45158b4..0000000 --- a/400-SOURCECODE/Admin/dist/assets/img/doller.png +++ /dev/null diff --git a/400-SOURCECODE/Admin/dist/assets/img/img1 - Copy.png b/400-SOURCECODE/Admin/dist/assets/img/img1 - Copy.png deleted file mode 100644 index 31fa7c1..0000000 --- a/400-SOURCECODE/Admin/dist/assets/img/img1 - Copy.png +++ /dev/null diff --git a/400-SOURCECODE/Admin/dist/assets/img/img1-white.png b/400-SOURCECODE/Admin/dist/assets/img/img1-white.png deleted file mode 100644 index 63d9609..0000000 --- a/400-SOURCECODE/Admin/dist/assets/img/img1-white.png +++ /dev/null diff --git a/400-SOURCECODE/Admin/dist/assets/img/img1.png b/400-SOURCECODE/Admin/dist/assets/img/img1.png deleted file mode 100644 index 406409a..0000000 --- a/400-SOURCECODE/Admin/dist/assets/img/img1.png +++ /dev/null diff --git a/400-SOURCECODE/Admin/dist/assets/img/logo-large.png b/400-SOURCECODE/Admin/dist/assets/img/logo-large.png deleted file mode 100644 index 4430baa..0000000 --- a/400-SOURCECODE/Admin/dist/assets/img/logo-large.png +++ /dev/null diff --git a/400-SOURCECODE/Admin/dist/assets/img/logo-main.png b/400-SOURCECODE/Admin/dist/assets/img/logo-main.png deleted file mode 100644 index 9b7f27d..0000000 --- a/400-SOURCECODE/Admin/dist/assets/img/logo-main.png +++ /dev/null diff --git a/400-SOURCECODE/Admin/dist/assets/img/search.png b/400-SOURCECODE/Admin/dist/assets/img/search.png deleted file mode 100644 index e69945d..0000000 --- a/400-SOURCECODE/Admin/dist/assets/img/search.png +++ /dev/null diff --git a/400-SOURCECODE/Admin/dist/assets/scripts/bootstrap-datetimepicker.min.js b/400-SOURCECODE/Admin/dist/assets/scripts/bootstrap-datetimepicker.min.js deleted file mode 100644 index a30f776..0000000 --- a/400-SOURCECODE/Admin/dist/assets/scripts/bootstrap-datetimepicker.min.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @license - * ========================================================= - * bootstrap-datetimepicker.js - * http://www.eyecon.ro/bootstrap-datepicker - * ========================================================= - * Copyright 2012 Stefan Petre - * - * Contributions: - * - Andrew Rowls - * - Thiago de Arruda - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= - */ -(function($){var smartPhone=window.orientation!=undefined;var DateTimePicker=function(element,options){this.id=dpgId++;this.init(element,options)};var dateToDate=function(dt){if(typeof dt==="string"){return new Date(dt)}return dt};DateTimePicker.prototype={constructor:DateTimePicker,init:function(element,options){var icon;if(!(options.pickTime||options.pickDate))throw new Error("Must choose at least one picker");this.options=options;this.$element=$(element);this.language=options.language in dates?options.language:"en";this.pickDate=options.pickDate;this.pickTime=options.pickTime;this.isInput=this.$element.is("input");this.component=false;if(this.$element.find(".input-append")||this.$element.find(".input-prepend"))this.component=this.$element.find(".add-on");this.format=options.format;if(!this.format){if(this.isInput)this.format=this.$element.data("format");else this.format=this.$element.find("input").data("format");if(!this.format)this.format="MM/dd/yyyy"}this._compileFormat();if(this.component){icon=this.component.find("i")}if(this.pickTime){if(icon&&icon.length)this.timeIcon=icon.data("time-icon");if(!this.timeIcon)this.timeIcon="icon-time";icon.addClass(this.timeIcon)}if(this.pickDate){if(icon&&icon.length)this.dateIcon=icon.data("date-icon");if(!this.dateIcon)this.dateIcon="icon-calendar";icon.removeClass(this.timeIcon);icon.addClass(this.dateIcon)}this.widget=$(getTemplate(this.timeIcon,options.pickDate,options.pickTime,options.pick12HourFormat,options.pickSeconds,options.collapse)).appendTo("body");this.minViewMode=options.minViewMode||this.$element.data("date-minviewmode")||0;if(typeof this.minViewMode==="string"){switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0;break}}this.viewMode=options.viewMode||this.$element.data("date-viewmode")||0;if(typeof this.viewMode==="string"){switch(this.viewMode){case"months":this.viewMode=1;break;case"years":this.viewMode=2;break;default:this.viewMode=0;break}}this.startViewMode=this.viewMode;this.weekStart=options.weekStart||this.$element.data("date-weekstart")||0;this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.setStartDate(options.startDate||this.$element.data("date-startdate"));this.setEndDate(options.endDate||this.$element.data("date-enddate"));this.fillDow();this.fillMonths();this.fillHours();this.fillMinutes();this.fillSeconds();this.update();this.showMode();this._attachDatePickerEvents()},show:function(e){this.widget.show();this.height=this.component?this.component.outerHeight():this.$element.outerHeight();this.place();this.$element.trigger({type:"show",date:this._date});this._attachDatePickerGlobalEvents();if(e){e.stopPropagation();e.preventDefault()}},disable:function(){this.$element.find("input").prop("disabled",true);this._detachDatePickerEvents()},enable:function(){this.$element.find("input").prop("disabled",false);this._attachDatePickerEvents()},hide:function(){var collapse=this.widget.find(".collapse");for(var i=0;i");while(dowCnt'+dates[this.language].daysMin[dowCnt++%7]+"")}this.widget.find(".datepicker-days thead").append(html)},fillMonths:function(){var html="";var i=0;while(i<12){html+=''+dates[this.language].monthsShort[i++]+""}this.widget.find(".datepicker-months td").append(html)},fillDate:function(){var year=this.viewDate.getUTCFullYear();var month=this.viewDate.getUTCMonth();var currentDate=UTCDate(this._date.getUTCFullYear(),this._date.getUTCMonth(),this._date.getUTCDate(),0,0,0,0);var startYear=typeof this.startDate==="object"?this.startDate.getUTCFullYear():-Infinity;var startMonth=typeof this.startDate==="object"?this.startDate.getUTCMonth():-1;var endYear=typeof this.endDate==="object"?this.endDate.getUTCFullYear():Infinity;var endMonth=typeof this.endDate==="object"?this.endDate.getUTCMonth():12;this.widget.find(".datepicker-days").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-months").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-years").find(".disabled").removeClass("disabled");this.widget.find(".datepicker-days th:eq(1)").text(dates[this.language].months[month]+" "+year);var prevMonth=UTCDate(year,month-1,28,0,0,0,0);var day=DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(),prevMonth.getUTCMonth());prevMonth.setUTCDate(day);prevMonth.setUTCDate(day-(prevMonth.getUTCDay()-this.weekStart+7)%7);if(year==startYear&&month<=startMonth||year=endMonth||year>endYear){this.widget.find(".datepicker-days th:eq(2)").addClass("disabled")}var nextMonth=new Date(prevMonth.valueOf());nextMonth.setUTCDate(nextMonth.getUTCDate()+42);nextMonth=nextMonth.valueOf();var html=[];var row;var clsName;while(prevMonth.valueOf()");html.push(row)}clsName="";if(prevMonth.getUTCFullYear()year||prevMonth.getUTCFullYear()==year&&prevMonth.getUTCMonth()>month){clsName+=" new"}if(prevMonth.valueOf()===currentDate.valueOf()){clsName+=" active"}if(prevMonth.valueOf()+864e5<=this.startDate){clsName+=" disabled"}if(prevMonth.valueOf()>this.endDate){clsName+=" disabled"}row.append(''+prevMonth.getUTCDate()+"");prevMonth.setUTCDate(prevMonth.getUTCDate()+1)}this.widget.find(".datepicker-days tbody").empty().append(html);var currentYear=this._date.getUTCFullYear();var months=this.widget.find(".datepicker-months").find("th:eq(1)").text(year).end().find("span").removeClass("active");if(currentYear===year){months.eq(this._date.getUTCMonth()).addClass("active")}if(currentYear-1endYear){this.widget.find(".datepicker-months th:eq(2)").addClass("disabled")}for(var i=0;i<12;i++){if(year==startYear&&startMonth>i||yearendYear){$(months[i]).addClass("disabled")}}html="";year=parseInt(year/10,10)*10;var yearCont=this.widget.find(".datepicker-years").find("th:eq(1)").text(year+"-"+(year+9)).end().find("td");this.widget.find(".datepicker-years").find("th").removeClass("disabled");if(startYear>year){this.widget.find(".datepicker-years").find("th:eq(0)").addClass("disabled")}if(endYearendYear?" disabled":"")+'">'+year+"";year+=1}yearCont.html(html)},fillHours:function(){var table=this.widget.find(".timepicker .timepicker-hours table");table.parent().hide();var html="";if(this.options.pick12HourFormat){var current=1;for(var i=0;i<3;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}else{var current=0;for(var i=0;i<6;i+=1){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current++}html+=""}}table.html(html)},fillMinutes:function(){var table=this.widget.find(".timepicker .timepicker-minutes table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillSeconds:function(){var table=this.widget.find(".timepicker .timepicker-seconds table");table.parent().hide();var html="";var current=0;for(var i=0;i<5;i++){html+="";for(var j=0;j<4;j+=1){var c=current.toString();html+=''+padLeft(c,2,"0")+"";current+=3}html+=""}table.html(html)},fillTime:function(){if(!this._date)return;var timeComponents=this.widget.find(".timepicker span[data-time-component]");var table=timeComponents.closest("table");var is12HourFormat=this.options.pick12HourFormat;var hour=this._date.getUTCHours();var period="AM";if(is12HourFormat){if(hour>=12)period="PM";if(hour===0)hour=12;else if(hour!=12)hour=hour%12;this.widget.find(".timepicker [data-action=togglePeriod]").text(period)}hour=padLeft(hour.toString(),2,"0");var minute=padLeft(this._date.getUTCMinutes().toString(),2,"0");var second=padLeft(this._date.getUTCSeconds().toString(),2,"0");timeComponents.filter("[data-time-component=hours]").text(hour);timeComponents.filter("[data-time-component=minutes]").text(minute);timeComponents.filter("[data-time-component=seconds]").text(second)},click:function(e){e.stopPropagation();e.preventDefault();this._unset=false;var target=$(e.target).closest("span, td, th");if(target.length===1){if(!target.is(".disabled")){switch(target[0].nodeName.toLowerCase()){case"th":switch(target[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var vd=this.viewDate;var navFnc=DPGlobal.modes[this.viewMode].navFnc;var step=DPGlobal.modes[this.viewMode].navStep;if(target[0].className==="prev")step=step*-1;vd["set"+navFnc](vd["get"+navFnc]()+step);this.fillDate();this.set();break}break;case"span":if(target.is(".month")){var month=target.parent().find("span").index(target);this.viewDate.setUTCMonth(month)}else{var year=parseInt(target.text(),10)||0;this.viewDate.setUTCFullYear(year)}if(this.viewMode!==0){this._date=UTCDate(this.viewDate.getUTCFullYear(),this.viewDate.getUTCMonth(),this.viewDate.getUTCDate(),this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.notifyChange()}this.showMode(-1);this.fillDate();this.set();break;case"td":if(target.is(".day")){var day=parseInt(target.text(),10)||1;var month=this.viewDate.getUTCMonth();var year=this.viewDate.getUTCFullYear();if(target.is(".old")){if(month===0){month=11;year-=1}else{month-=1}}else if(target.is(".new")){if(month==11){month=0;year+=1}else{month+=1}}this._date=UTCDate(year,month,day,this._date.getUTCHours(),this._date.getUTCMinutes(),this._date.getUTCSeconds(),this._date.getUTCMilliseconds());this.viewDate=UTCDate(year,month,Math.min(28,day),0,0,0,0);this.fillDate();this.set();this.notifyChange()}break}}}},actions:{incrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()+1)},incrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()+1)},incrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()+1)},decrementHours:function(e){this._date.setUTCHours(this._date.getUTCHours()-1)},decrementMinutes:function(e){this._date.setUTCMinutes(this._date.getUTCMinutes()-1)},decrementSeconds:function(e){this._date.setUTCSeconds(this._date.getUTCSeconds()-1)},togglePeriod:function(e){var hour=this._date.getUTCHours();if(hour>=12)hour-=12;else hour+=12;this._date.setUTCHours(hour)},showPicker:function(){this.widget.find(".timepicker > div:not(.timepicker-picker)").hide();this.widget.find(".timepicker .timepicker-picker").show()},showHours:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-hours").show()},showMinutes:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){this.widget.find(".timepicker .timepicker-picker").hide();this.widget.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);if(this.options.pick12HourFormat){var current=this._date.getUTCHours();if(current>=12){if(value!=12)value=(value+12)%24}else{if(value===12)value=0;else value=value%12}}this._date.setUTCHours(value);this.actions.showPicker.call(this)},selectMinute:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCMinutes(value);this.actions.showPicker.call(this)},selectSecond:function(e){var tgt=$(e.target);var value=parseInt(tgt.text(),10);this._date.setUTCSeconds(value);this.actions.showPicker.call(this)}},doAction:function(e){e.stopPropagation();e.preventDefault();if(!this._date)this._date=UTCDate(1970,0,0,0,0,0,0);var action=$(e.currentTarget).data("action");var rv=this.actions[action].apply(this,arguments);this.set();this.fillTime();this.notifyChange();return rv},stopEvent:function(e){e.stopPropagation();e.preventDefault()},keydown:function(e){var self=this,k=e.which,input=$(e.target);if(k==8||k==46){setTimeout(function(){self._resetMaskPos(input)})}},keypress:function(e){var k=e.which;if(k==8||k==46){return}var input=$(e.target);var c=String.fromCharCode(k);var val=input.val()||"";val+=c;var mask=this._mask[this._maskPos];if(!mask){return false}if(mask.end!=val.length){return}if(!mask.pattern.test(val.slice(mask.start))){val=val.slice(0,val.length-1);while((mask=this._mask[this._maskPos])&&mask.character){val+=mask.character;this._maskPos++}val+=c;if(mask.end!=val.length){input.val(val);return false}else{if(!mask.pattern.test(val.slice(mask.start))){input.val(val.slice(0,mask.start));return false}else{input.val(val);this._maskPos++;return false}}}else{this._maskPos++}},change:function(e){var input=$(e.target);var val=input.val();if(this._formatPattern.test(val)){this.update();this.setValue(this._date.getTime());this.notifyChange();this.set()}else if(val&&val.trim()){this.setValue(this._date.getTime());if(this._date)this.set();else input.val("")}else{if(this._date){this.setValue(null);this.notifyChange();this._unset=true}}this._resetMaskPos(input)},showMode:function(dir){if(dir){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+dir))}this.widget.find(".datepicker > div").hide().filter(".datepicker-"+DPGlobal.modes[this.viewMode].clsName).show()},destroy:function(){this._detachDatePickerEvents();this._detachDatePickerGlobalEvents();this.widget.remove();this.$element.removeData("datetimepicker");this.component.removeData("datetimepicker")},formatDate:function(d){return this.format.replace(formatReplacer,function(match){var methodName,property,rv,len=match.length;if(match==="ms")len=1;property=dateFormatComponents[match].property;if(property==="Hours12"){rv=d.getUTCHours();if(rv===0)rv=12;else if(rv!==12)rv=rv%12}else if(property==="Period12"){if(d.getUTCHours()>=12)return"PM";else return"AM"}else{methodName="get"+property;rv=d[methodName]()}if(methodName==="getUTCMonth")rv=rv+1;if(methodName==="getUTCYear")rv=rv+1900-2e3;return padLeft(rv.toString(),len,"0")})},parseDate:function(str){var match,i,property,methodName,value,parsed={};if(!(match=this._formatPattern.exec(str)))return null;for(i=1;ival.length){this._maskPos=i;break}else if(this._mask[i].end===val.length){this._maskPos=i+1;break}}},_finishParsingDate:function(parsed){var year,month,date,hours,minutes,seconds,milliseconds;year=parsed.UTCFullYear;if(parsed.UTCYear)year=2e3+parsed.UTCYear;if(!year)year=1970;if(parsed.UTCMonth)month=parsed.UTCMonth-1;else month=0;date=parsed.UTCDate||1;hours=parsed.UTCHours||0;minutes=parsed.UTCMinutes||0;seconds=parsed.UTCSeconds||0;milliseconds=parsed.UTCMilliseconds||0;if(parsed.Hours12){hours=parsed.Hours12}if(parsed.Period12){if(/pm/i.test(parsed.Period12)){if(hours!=12)hours=(hours+12)%24}else{hours=hours%12}}return UTCDate(year,month,date,hours,minutes,seconds,milliseconds)},_compileFormat:function(){var match,component,components=[],mask=[],str=this.format,propertiesByIndex={},i=0,pos=0;while(match=formatComponent.exec(str)){component=match[0];if(component in dateFormatComponents){i++;propertiesByIndex[i]=dateFormatComponents[component].property;components.push("\\s*"+dateFormatComponents[component].getPattern(this)+"\\s*");mask.push({pattern:new RegExp(dateFormatComponents[component].getPattern(this)),property:dateFormatComponents[component].property,start:pos,end:pos+=component.length})}else{components.push(escapeRegExp(component));mask.push({pattern:new RegExp(escapeRegExp(component)),character:component,start:pos,end:++pos})}str=str.slice(component.length)}this._mask=mask;this._maskPos=0;this._formatPattern=new RegExp("^\\s*"+components.join("")+"\\s*$");this._propertiesByIndex=propertiesByIndex},_attachDatePickerEvents:function(){var self=this;this.widget.on("click",".datepicker *",$.proxy(this.click,this));this.widget.on("click","[data-action]",$.proxy(this.doAction,this));this.widget.on("mousedown",$.proxy(this.stopEvent,this));if(this.pickDate&&this.pickTime){this.widget.on("click.togglePicker",".accordion-toggle",function(e){e.stopPropagation();var $this=$(this);var $parent=$this.closest("ul");var expanded=$parent.find(".collapse.in");var closed=$parent.find(".collapse:not(.in)");if(expanded&&expanded.length){var collapseData=expanded.data("collapse");if(collapseData&&collapseData.transitioning)return;expanded.collapse("hide");closed.collapse("show");$this.find("i").toggleClass(self.timeIcon+" "+self.dateIcon);self.$element.find(".add-on i").toggleClass(self.timeIcon+" "+self.dateIcon)}})}if(this.isInput){this.$element.on({focus:$.proxy(this.show,this),change:$.proxy(this.change,this)});if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)})}}else{this.$element.on({change:$.proxy(this.change,this)},"input");if(this.options.maskInput){this.$element.on({keydown:$.proxy(this.keydown,this),keypress:$.proxy(this.keypress,this)},"input")}if(this.component){this.component.on("click",$.proxy(this.show,this))}else{this.$element.on("click",$.proxy(this.show,this))}}},_attachDatePickerGlobalEvents:function(){$(window).on("resize.datetimepicker"+this.id,$.proxy(this.place,this));if(!this.isInput){$(document).on("mousedown.datetimepicker"+this.id,$.proxy(this.hide,this))}},_detachDatePickerEvents:function(){this.widget.off("click",".datepicker *",this.click);this.widget.off("click","[data-action]");this.widget.off("mousedown",this.stopEvent);if(this.pickDate&&this.pickTime){this.widget.off("click.togglePicker")}if(this.isInput){this.$element.off({focus:this.show,change:this.change});if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress})}}else{this.$element.off({change:this.change},"input");if(this.options.maskInput){this.$element.off({keydown:this.keydown,keypress:this.keypress},"input")}if(this.component){this.component.off("click",this.show)}else{this.$element.off("click",this.show)}}},_detachDatePickerGlobalEvents:function(){$(window).off("resize.datetimepicker"+this.id);if(!this.isInput){$(document).off("mousedown.datetimepicker"+this.id)}},_isInFixed:function(){if(this.$element){var parents=this.$element.parents();var inFixed=false;for(var i=0;i'+"
      "+""+'
      '+DPGlobal.template+"
      "+""+'
    • '+""+'
      '+TPGlobal.getTemplate(is12Hours,showSeconds)+"
      "+""+"
    "+""}else if(pickTime){return'"}else{return'"}}function UTCDate(){return new Date(Date.UTC.apply(Date,arguments))}var DPGlobal={modes:[{clsName:"days",navFnc:"UTCMonth",navStep:1},{clsName:"months",navFnc:"UTCFullYear",navStep:1},{clsName:"years",navFnc:"UTCFullYear",navStep:10}],isLeapYear:function(year){return year%4===0&&year%100!==0||year%400===0},getDaysInMonth:function(year,month){return[31,DPGlobal.isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31][month]},headTemplate:""+""+'‹'+''+'›'+""+"",contTemplate:''};DPGlobal.template='
    '+''+DPGlobal.headTemplate+""+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    "+'
    '+''+DPGlobal.headTemplate+DPGlobal.contTemplate+"
    "+"
    ";var TPGlobal={hourTemplate:'',minuteTemplate:'',secondTemplate:''};TPGlobal.getTemplate=function(is12Hours,showSeconds){return'
    '+'"+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+""+" "+''+" "+(showSeconds?''+"":"")+(is12Hours?''+"":"")+""+""+''+''+''+(showSeconds?''+'':"")+(is12Hours?'':"")+""+"
    "+TPGlobal.hourTemplate+":"+TPGlobal.minuteTemplate+":"+TPGlobal.secondTemplate+""+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+'
    '+''+"
    "+"
    "+(showSeconds?'
    '+''+"
    "+"
    ":"")}})(window.jQuery); \ No newline at end of file diff --git a/400-SOURCECODE/Admin/dist/assets/scripts/bootstrap.js b/400-SOURCECODE/Admin/dist/assets/scripts/bootstrap.js deleted file mode 100644 index 30b701d..0000000 --- a/400-SOURCECODE/Admin/dist/assets/scripts/bootstrap.js +++ /dev/null @@ -1,2366 +0,0 @@ -/*! - * Bootstrap v3.3.5 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ - -/*! - * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=7b2c778c370c61853a11) - * Config saved to config.json and https://gist.github.com/7b2c778c370c61853a11 - */ -if (typeof jQuery === 'undefined') { - throw new Error('Bootstrap\'s JavaScript requires jQuery') -} -+function ($) { - 'use strict'; - var version = $.fn.jquery.split(' ')[0].split('.') - if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) { - throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3') - } -}(jQuery); - -/* ======================================================================== - * Bootstrap: alert.js v3.3.6 - * http://getbootstrap.com/javascript/#alerts - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // ALERT CLASS DEFINITION - // ====================== - - var dismiss = '[data-dismiss="alert"]' - var Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.VERSION = '3.3.6' - - Alert.TRANSITION_DURATION = 150 - - Alert.prototype.close = function (e) { - var $this = $(this) - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = $(selector) - - if (e) e.preventDefault() - - if (!$parent.length) { - $parent = $this.closest('.alert') - } - - $parent.trigger(e = $.Event('close.bs.alert')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - // detach from parent, fire event then clean up data - $parent.detach().trigger('closed.bs.alert').remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent - .one('bsTransitionEnd', removeElement) - .emulateTransitionEnd(Alert.TRANSITION_DURATION) : - removeElement() - } - - - // ALERT PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.alert') - - if (!data) $this.data('bs.alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - var old = $.fn.alert - - $.fn.alert = Plugin - $.fn.alert.Constructor = Alert - - - // ALERT NO CONFLICT - // ================= - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - // ALERT DATA-API - // ============== - - $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: button.js v3.3.6 - * http://getbootstrap.com/javascript/#buttons - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // BUTTON PUBLIC CLASS DEFINITION - // ============================== - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Button.DEFAULTS, options) - this.isLoading = false - } - - Button.VERSION = '3.3.6' - - Button.DEFAULTS = { - loadingText: 'loading...' - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - var $el = this.$element - var val = $el.is('input') ? 'val' : 'html' - var data = $el.data() - - state += 'Text' - - if (data.resetText == null) $el.data('resetText', $el[val]()) - - // push to event loop to allow forms to submit - setTimeout($.proxy(function () { - $el[val](data[state] == null ? this.options[state] : data[state]) - - if (state == 'loadingText') { - this.isLoading = true - $el.addClass(d).attr(d, d) - } else if (this.isLoading) { - this.isLoading = false - $el.removeClass(d).removeAttr(d) - } - }, this), 0) - } - - Button.prototype.toggle = function () { - var changed = true - var $parent = this.$element.closest('[data-toggle="buttons"]') - - if ($parent.length) { - var $input = this.$element.find('input') - if ($input.prop('type') == 'radio') { - if ($input.prop('checked')) changed = false - $parent.find('.active').removeClass('active') - this.$element.addClass('active') - } else if ($input.prop('type') == 'checkbox') { - if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false - this.$element.toggleClass('active') - } - $input.prop('checked', this.$element.hasClass('active')) - if (changed) $input.trigger('change') - } else { - this.$element.attr('aria-pressed', !this.$element.hasClass('active')) - this.$element.toggleClass('active') - } - } - - - // BUTTON PLUGIN DEFINITION - // ======================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.button') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.button', (data = new Button(this, options))) - - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - var old = $.fn.button - - $.fn.button = Plugin - $.fn.button.Constructor = Button - - - // BUTTON NO CONFLICT - // ================== - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - // BUTTON DATA-API - // =============== - - $(document) - .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - Plugin.call($btn, 'toggle') - if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() - }) - .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { - $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: carousel.js v3.3.6 - * http://getbootstrap.com/javascript/#carousel - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CAROUSEL CLASS DEFINITION - // ========================= - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.paused = null - this.sliding = null - this.interval = null - this.$active = null - this.$items = null - - this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) - - this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element - .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) - .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) - } - - Carousel.VERSION = '3.3.6' - - Carousel.TRANSITION_DURATION = 600 - - Carousel.DEFAULTS = { - interval: 5000, - pause: 'hover', - wrap: true, - keyboard: true - } - - Carousel.prototype.keydown = function (e) { - if (/input|textarea/i.test(e.target.tagName)) return - switch (e.which) { - case 37: this.prev(); break - case 39: this.next(); break - default: return - } - - e.preventDefault() - } - - Carousel.prototype.cycle = function (e) { - e || (this.paused = false) - - this.interval && clearInterval(this.interval) - - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - - return this - } - - Carousel.prototype.getItemIndex = function (item) { - this.$items = item.parent().children('.item') - return this.$items.index(item || this.$active) - } - - Carousel.prototype.getItemForDirection = function (direction, active) { - var activeIndex = this.getItemIndex(active) - var willWrap = (direction == 'prev' && activeIndex === 0) - || (direction == 'next' && activeIndex == (this.$items.length - 1)) - if (willWrap && !this.options.wrap) return active - var delta = direction == 'prev' ? -1 : 1 - var itemIndex = (activeIndex + delta) % this.$items.length - return this.$items.eq(itemIndex) - } - - Carousel.prototype.to = function (pos) { - var that = this - var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" - if (activeIndex == pos) return this.pause().cycle() - - return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) - } - - Carousel.prototype.pause = function (e) { - e || (this.paused = true) - - if (this.$element.find('.next, .prev').length && $.support.transition) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } - - this.interval = clearInterval(this.interval) - - return this - } - - Carousel.prototype.next = function () { - if (this.sliding) return - return this.slide('next') - } - - Carousel.prototype.prev = function () { - if (this.sliding) return - return this.slide('prev') - } - - Carousel.prototype.slide = function (type, next) { - var $active = this.$element.find('.item.active') - var $next = next || this.getItemForDirection(type, $active) - var isCycling = this.interval - var direction = type == 'next' ? 'left' : 'right' - var that = this - - if ($next.hasClass('active')) return (this.sliding = false) - - var relatedTarget = $next[0] - var slideEvent = $.Event('slide.bs.carousel', { - relatedTarget: relatedTarget, - direction: direction - }) - this.$element.trigger(slideEvent) - if (slideEvent.isDefaultPrevented()) return - - this.sliding = true - - isCycling && this.pause() - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) - $nextIndicator && $nextIndicator.addClass('active') - } - - var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" - if ($.support.transition && this.$element.hasClass('slide')) { - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - $active - .one('bsTransitionEnd', function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { - that.$element.trigger(slidEvent) - }, 0) - }) - .emulateTransitionEnd(Carousel.TRANSITION_DURATION) - } else { - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger(slidEvent) - } - - isCycling && this.cycle() - - return this - } - - - // CAROUSEL PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.carousel') - var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) - var action = typeof option == 'string' ? option : options.slide - - if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - var old = $.fn.carousel - - $.fn.carousel = Plugin - $.fn.carousel.Constructor = Carousel - - - // CAROUSEL NO CONFLICT - // ==================== - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - - // CAROUSEL DATA-API - // ================= - - var clickHandler = function (e) { - var href - var $this = $(this) - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 - if (!$target.hasClass('carousel')) return - var options = $.extend({}, $target.data(), $this.data()) - var slideIndex = $this.attr('data-slide-to') - if (slideIndex) options.interval = false - - Plugin.call($target, options) - - if (slideIndex) { - $target.data('bs.carousel').to(slideIndex) - } - - e.preventDefault() - } - - $(document) - .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) - .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) - - $(window).on('load', function () { - $('[data-ride="carousel"]').each(function () { - var $carousel = $(this) - Plugin.call($carousel, $carousel.data()) - }) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: dropdown.js v3.3.6 - * http://getbootstrap.com/javascript/#dropdowns - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // DROPDOWN CLASS DEFINITION - // ========================= - - var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle="dropdown"]' - var Dropdown = function (element) { - $(element).on('click.bs.dropdown', this.toggle) - } - - Dropdown.VERSION = '3.3.6' - - function getParent($this) { - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = selector && $(selector) - - return $parent && $parent.length ? $parent : $this.parent() - } - - function clearMenus(e) { - if (e && e.which === 3) return - $(backdrop).remove() - $(toggle).each(function () { - var $this = $(this) - var $parent = getParent($this) - var relatedTarget = { relatedTarget: this } - - if (!$parent.hasClass('open')) return - - if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return - - $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this.attr('aria-expanded', 'false') - $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) - }) - } - - Dropdown.prototype.toggle = function (e) { - var $this = $(this) - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we use a backdrop because click events don't delegate - $(document.createElement('div')) - .addClass('dropdown-backdrop') - .insertAfter($(this)) - .on('click', clearMenus) - } - - var relatedTarget = { relatedTarget: this } - $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this - .trigger('focus') - .attr('aria-expanded', 'true') - - $parent - .toggleClass('open') - .trigger($.Event('shown.bs.dropdown', relatedTarget)) - } - - return false - } - - Dropdown.prototype.keydown = function (e) { - if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return - - var $this = $(this) - - e.preventDefault() - e.stopPropagation() - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - if (!isActive && e.which != 27 || isActive && e.which == 27) { - if (e.which == 27) $parent.find(toggle).trigger('focus') - return $this.trigger('click') - } - - var desc = ' li:not(.disabled):visible a' - var $items = $parent.find('.dropdown-menu' + desc) - - if (!$items.length) return - - var index = $items.index(e.target) - - if (e.which == 38 && index > 0) index-- // up - if (e.which == 40 && index < $items.length - 1) index++ // down - if (!~index) index = 0 - - $items.eq(index).trigger('focus') - } - - - // DROPDOWN PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.dropdown') - - if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - var old = $.fn.dropdown - - $.fn.dropdown = Plugin - $.fn.dropdown.Constructor = Dropdown - - - // DROPDOWN NO CONFLICT - // ==================== - - $.fn.dropdown.noConflict = function () { - $.fn.dropdown = old - return this - } - - - // APPLY TO STANDARD DROPDOWN ELEMENTS - // =================================== - - $(document) - .on('click.bs.dropdown.data-api', clearMenus) - .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) - .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) - .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: modal.js v3.3.6 - * http://getbootstrap.com/javascript/#modals - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // MODAL CLASS DEFINITION - // ====================== - - var Modal = function (element, options) { - this.options = options - this.$body = $(document.body) - this.$element = $(element) - this.$dialog = this.$element.find('.modal-dialog') - this.$backdrop = null - this.isShown = null - this.originalBodyPad = null - this.scrollbarWidth = 0 - this.ignoreBackdropClick = false - - if (this.options.remote) { - this.$element - .find('.modal-content') - .load(this.options.remote, $.proxy(function () { - this.$element.trigger('loaded.bs.modal') - }, this)) - } - } - - Modal.VERSION = '3.3.6' - - Modal.TRANSITION_DURATION = 300 - Modal.BACKDROP_TRANSITION_DURATION = 150 - - Modal.DEFAULTS = { - backdrop: true, - keyboard: true, - show: true - } - - Modal.prototype.toggle = function (_relatedTarget) { - return this.isShown ? this.hide() : this.show(_relatedTarget) - } - - Modal.prototype.show = function (_relatedTarget) { - var that = this - var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) - - this.$element.trigger(e) - - if (this.isShown || e.isDefaultPrevented()) return - - this.isShown = true - - this.checkScrollbar() - this.setScrollbar() - this.$body.addClass('modal-open') - - this.escape() - this.resize() - - this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) - - this.$dialog.on('mousedown.dismiss.bs.modal', function () { - that.$element.one('mouseup.dismiss.bs.modal', function (e) { - if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true - }) - }) - - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - if (!that.$element.parent().length) { - that.$element.appendTo(that.$body) // don't move modals dom position - } - - that.$element - .show() - .scrollTop(0) - - that.adjustDialog() - - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element.addClass('in') - - that.enforceFocus() - - var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) - - transition ? - that.$dialog // wait for modal to slide in - .one('bsTransitionEnd', function () { - that.$element.trigger('focus').trigger(e) - }) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - that.$element.trigger('focus').trigger(e) - }) - } - - Modal.prototype.hide = function (e) { - if (e) e.preventDefault() - - e = $.Event('hide.bs.modal') - - this.$element.trigger(e) - - if (!this.isShown || e.isDefaultPrevented()) return - - this.isShown = false - - this.escape() - this.resize() - - $(document).off('focusin.bs.modal') - - this.$element - .removeClass('in') - .off('click.dismiss.bs.modal') - .off('mouseup.dismiss.bs.modal') - - this.$dialog.off('mousedown.dismiss.bs.modal') - - $.support.transition && this.$element.hasClass('fade') ? - this.$element - .one('bsTransitionEnd', $.proxy(this.hideModal, this)) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - this.hideModal() - } - - Modal.prototype.enforceFocus = function () { - $(document) - .off('focusin.bs.modal') // guard against infinite focus loop - .on('focusin.bs.modal', $.proxy(function (e) { - if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { - this.$element.trigger('focus') - } - }, this)) - } - - Modal.prototype.escape = function () { - if (this.isShown && this.options.keyboard) { - this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { - e.which == 27 && this.hide() - }, this)) - } else if (!this.isShown) { - this.$element.off('keydown.dismiss.bs.modal') - } - } - - Modal.prototype.resize = function () { - if (this.isShown) { - $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) - } else { - $(window).off('resize.bs.modal') - } - } - - Modal.prototype.hideModal = function () { - var that = this - this.$element.hide() - this.backdrop(function () { - that.$body.removeClass('modal-open') - that.resetAdjustments() - that.resetScrollbar() - that.$element.trigger('hidden.bs.modal') - }) - } - - Modal.prototype.removeBackdrop = function () { - this.$backdrop && this.$backdrop.remove() - this.$backdrop = null - } - - Modal.prototype.backdrop = function (callback) { - var that = this - var animate = this.$element.hasClass('fade') ? 'fade' : '' - - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate - - this.$backdrop = $(document.createElement('div')) - .addClass('modal-backdrop ' + animate) - .appendTo(this.$body) - - this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { - if (this.ignoreBackdropClick) { - this.ignoreBackdropClick = false - return - } - if (e.target !== e.currentTarget) return - this.options.backdrop == 'static' - ? this.$element[0].focus() - : this.hide() - }, this)) - - if (doAnimate) this.$backdrop[0].offsetWidth // force reflow - - this.$backdrop.addClass('in') - - if (!callback) return - - doAnimate ? - this.$backdrop - .one('bsTransitionEnd', callback) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callback() - - } else if (!this.isShown && this.$backdrop) { - this.$backdrop.removeClass('in') - - var callbackRemove = function () { - that.removeBackdrop() - callback && callback() - } - $.support.transition && this.$element.hasClass('fade') ? - this.$backdrop - .one('bsTransitionEnd', callbackRemove) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callbackRemove() - - } else if (callback) { - callback() - } - } - - // these following methods are used to handle overflowing modals - - Modal.prototype.handleUpdate = function () { - this.adjustDialog() - } - - Modal.prototype.adjustDialog = function () { - var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight - - this.$element.css({ - paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', - paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' - }) - } - - Modal.prototype.resetAdjustments = function () { - this.$element.css({ - paddingLeft: '', - paddingRight: '' - }) - } - - Modal.prototype.checkScrollbar = function () { - var fullWindowWidth = window.innerWidth - if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 - var documentElementRect = document.documentElement.getBoundingClientRect() - fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) - } - this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth - this.scrollbarWidth = this.measureScrollbar() - } - - Modal.prototype.setScrollbar = function () { - var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) - this.originalBodyPad = document.body.style.paddingRight || '' - if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) - } - - Modal.prototype.resetScrollbar = function () { - this.$body.css('padding-right', this.originalBodyPad) - } - - Modal.prototype.measureScrollbar = function () { // thx walsh - var scrollDiv = document.createElement('div') - scrollDiv.className = 'modal-scrollbar-measure' - this.$body.append(scrollDiv) - var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth - this.$body[0].removeChild(scrollDiv) - return scrollbarWidth - } - - - // MODAL PLUGIN DEFINITION - // ======================= - - function Plugin(option, _relatedTarget) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.modal') - var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data) $this.data('bs.modal', (data = new Modal(this, options))) - if (typeof option == 'string') data[option](_relatedTarget) - else if (options.show) data.show(_relatedTarget) - }) - } - - var old = $.fn.modal - - $.fn.modal = Plugin - $.fn.modal.Constructor = Modal - - - // MODAL NO CONFLICT - // ================= - - $.fn.modal.noConflict = function () { - $.fn.modal = old - return this - } - - - // MODAL DATA-API - // ============== - - $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { - var $this = $(this) - var href = $this.attr('href') - var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 - var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) - - if ($this.is('a')) e.preventDefault() - - $target.one('show.bs.modal', function (showEvent) { - if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown - $target.one('hidden.bs.modal', function () { - $this.is(':visible') && $this.trigger('focus') - }) - }) - Plugin.call($target, option, this) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: tooltip.js v3.3.6 - * http://getbootstrap.com/javascript/#tooltip - * Inspired by the original jQuery.tipsy by Jason Frame - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // TOOLTIP PUBLIC CLASS DEFINITION - // =============================== - - var Tooltip = function (element, options) { - this.type = null - this.options = null - this.enabled = null - this.timeout = null - this.hoverState = null - this.$element = null - this.inState = null - - this.init('tooltip', element, options) - } - - Tooltip.VERSION = '3.3.6' - - Tooltip.TRANSITION_DURATION = 150 - - Tooltip.DEFAULTS = { - animation: true, - placement: 'top', - selector: false, - template: '', - trigger: 'hover focus', - title: '', - delay: 0, - html: false, - container: false, - viewport: { - selector: 'body', - padding: 0 - } - } - - Tooltip.prototype.init = function (type, element, options) { - this.enabled = true - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport)) - this.inState = { click: false, hover: false, focus: false } - - if (this.$element[0] instanceof document.constructor && !this.options.selector) { - throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') - } - - var triggers = this.options.trigger.split(' ') - - for (var i = triggers.length; i--;) { - var trigger = triggers[i] - - if (trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (trigger != 'manual') { - var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' - var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' - - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) - } - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - Tooltip.prototype.getDefaults = function () { - return Tooltip.DEFAULTS - } - - Tooltip.prototype.getOptions = function (options) { - options = $.extend({}, this.getDefaults(), this.$element.data(), options) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay, - hide: options.delay - } - } - - return options - } - - Tooltip.prototype.getDelegateOptions = function () { - var options = {} - var defaults = this.getDefaults() - - this._options && $.each(this._options, function (key, value) { - if (defaults[key] != value) options[key] = value - }) - - return options - } - - Tooltip.prototype.enter = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true - } - - if (self.tip().hasClass('in') || self.hoverState == 'in') { - self.hoverState = 'in' - return - } - - clearTimeout(self.timeout) - - self.hoverState = 'in' - - if (!self.options.delay || !self.options.delay.show) return self.show() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - Tooltip.prototype.isInStateTrue = function () { - for (var key in this.inState) { - if (this.inState[key]) return true - } - - return false - } - - Tooltip.prototype.leave = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false - } - - if (self.isInStateTrue()) return - - clearTimeout(self.timeout) - - self.hoverState = 'out' - - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - Tooltip.prototype.show = function () { - var e = $.Event('show.bs.' + this.type) - - if (this.hasContent() && this.enabled) { - this.$element.trigger(e) - - var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) - if (e.isDefaultPrevented() || !inDom) return - var that = this - - var $tip = this.tip() - - var tipId = this.getUID(this.type) - - this.setContent() - $tip.attr('id', tipId) - this.$element.attr('aria-describedby', tipId) - - if (this.options.animation) $tip.addClass('fade') - - var placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - var autoToken = /\s?auto?\s?/i - var autoPlace = autoToken.test(placement) - if (autoPlace) placement = placement.replace(autoToken, '') || 'top' - - $tip - .detach() - .css({ top: 0, left: 0, display: 'block' }) - .addClass(placement) - .data('bs.' + this.type, this) - - this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) - this.$element.trigger('inserted.bs.' + this.type) - - var pos = this.getPosition() - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (autoPlace) { - var orgPlacement = placement - var viewportDim = this.getPosition(this.$viewport) - - placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : - placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : - placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : - placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : - placement - - $tip - .removeClass(orgPlacement) - .addClass(placement) - } - - var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) - - this.applyPlacement(calculatedOffset, placement) - - var complete = function () { - var prevHoverState = that.hoverState - that.$element.trigger('shown.bs.' + that.type) - that.hoverState = null - - if (prevHoverState == 'out') that.leave(that) - } - - $.support.transition && this.$tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - } - } - - Tooltip.prototype.applyPlacement = function (offset, placement) { - var $tip = this.tip() - var width = $tip[0].offsetWidth - var height = $tip[0].offsetHeight - - // manually read margins because getBoundingClientRect includes difference - var marginTop = parseInt($tip.css('margin-top'), 10) - var marginLeft = parseInt($tip.css('margin-left'), 10) - - // we must check for NaN for ie 8/9 - if (isNaN(marginTop)) marginTop = 0 - if (isNaN(marginLeft)) marginLeft = 0 - - offset.top += marginTop - offset.left += marginLeft - - // $.fn.offset doesn't round pixel values - // so we use setOffset directly with our own function B-0 - $.offset.setOffset($tip[0], $.extend({ - using: function (props) { - $tip.css({ - top: Math.round(props.top), - left: Math.round(props.left) - }) - } - }, offset), 0) - - $tip.addClass('in') - - // check to see if placing tip in new offset caused the tip to resize itself - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (placement == 'top' && actualHeight != height) { - offset.top = offset.top + height - actualHeight - } - - var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) - - if (delta.left) offset.left += delta.left - else offset.top += delta.top - - var isVertical = /top|bottom/.test(placement) - var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight - var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' - - $tip.offset(offset) - this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) - } - - Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { - this.arrow() - .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%') - .css(isVertical ? 'top' : 'left', '') - } - - Tooltip.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } - - Tooltip.prototype.hide = function (callback) { - var that = this - var $tip = $(this.$tip) - var e = $.Event('hide.bs.' + this.type) - - function complete() { - if (that.hoverState != 'in') $tip.detach() - that.$element - .removeAttr('aria-describedby') - .trigger('hidden.bs.' + that.type) - callback && callback() - } - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - $tip.removeClass('in') - - $.support.transition && $tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - - this.hoverState = null - - return this - } - - Tooltip.prototype.fixTitle = function () { - var $e = this.$element - if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') - } - } - - Tooltip.prototype.hasContent = function () { - return this.getTitle() - } - - Tooltip.prototype.getPosition = function ($element) { - $element = $element || this.$element - - var el = $element[0] - var isBody = el.tagName == 'BODY' - - var elRect = el.getBoundingClientRect() - if (elRect.width == null) { - // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 - elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) - } - var elOffset = isBody ? { top: 0, left: 0 } : $element.offset() - var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } - var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null - - return $.extend({}, elRect, scroll, outerDims, elOffset) - } - - Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { - return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : - /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } - - } - - Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { - var delta = { top: 0, left: 0 } - if (!this.$viewport) return delta - - var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 - var viewportDimensions = this.getPosition(this.$viewport) - - if (/right|left/.test(placement)) { - var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll - var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight - if (topEdgeOffset < viewportDimensions.top) { // top overflow - delta.top = viewportDimensions.top - topEdgeOffset - } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow - delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset - } - } else { - var leftEdgeOffset = pos.left - viewportPadding - var rightEdgeOffset = pos.left + viewportPadding + actualWidth - if (leftEdgeOffset < viewportDimensions.left) { // left overflow - delta.left = viewportDimensions.left - leftEdgeOffset - } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow - delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset - } - } - - return delta - } - - Tooltip.prototype.getTitle = function () { - var title - var $e = this.$element - var o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - Tooltip.prototype.getUID = function (prefix) { - do prefix += ~~(Math.random() * 1000000) - while (document.getElementById(prefix)) - return prefix - } - - Tooltip.prototype.tip = function () { - if (!this.$tip) { - this.$tip = $(this.options.template) - if (this.$tip.length != 1) { - throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') - } - } - return this.$tip - } - - Tooltip.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) - } - - Tooltip.prototype.enable = function () { - this.enabled = true - } - - Tooltip.prototype.disable = function () { - this.enabled = false - } - - Tooltip.prototype.toggleEnabled = function () { - this.enabled = !this.enabled - } - - Tooltip.prototype.toggle = function (e) { - var self = this - if (e) { - self = $(e.currentTarget).data('bs.' + this.type) - if (!self) { - self = new this.constructor(e.currentTarget, this.getDelegateOptions()) - $(e.currentTarget).data('bs.' + this.type, self) - } - } - - if (e) { - self.inState.click = !self.inState.click - if (self.isInStateTrue()) self.enter(self) - else self.leave(self) - } else { - self.tip().hasClass('in') ? self.leave(self) : self.enter(self) - } - } - - Tooltip.prototype.destroy = function () { - var that = this - clearTimeout(this.timeout) - this.hide(function () { - that.$element.off('.' + that.type).removeData('bs.' + that.type) - if (that.$tip) { - that.$tip.detach() - } - that.$tip = null - that.$arrow = null - that.$viewport = null - }) - } - - - // TOOLTIP PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tooltip') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.tooltip - - $.fn.tooltip = Plugin - $.fn.tooltip.Constructor = Tooltip - - - // TOOLTIP NO CONFLICT - // =================== - - $.fn.tooltip.noConflict = function () { - $.fn.tooltip = old - return this - } - -}(jQuery); - -/* ======================================================================== - * Bootstrap: popover.js v3.3.6 - * http://getbootstrap.com/javascript/#popovers - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // POPOVER PUBLIC CLASS DEFINITION - // =============================== - - var Popover = function (element, options) { - this.init('popover', element, options) - } - - if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') - - Popover.VERSION = '3.3.6' - - Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { - placement: 'right', - trigger: 'click', - content: '', - template: '' - }) - - - // NOTE: POPOVER EXTENDS tooltip.js - // ================================ - - Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) - - Popover.prototype.constructor = Popover - - Popover.prototype.getDefaults = function () { - return Popover.DEFAULTS - } - - Popover.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - var content = this.getContent() - - $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) - $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events - this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' - ](content) - - $tip.removeClass('fade top bottom left right in') - - // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do - // this manually by checking the contents. - if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() - } - - Popover.prototype.hasContent = function () { - return this.getTitle() || this.getContent() - } - - Popover.prototype.getContent = function () { - var $e = this.$element - var o = this.options - - return $e.attr('data-content') - || (typeof o.content == 'function' ? - o.content.call($e[0]) : - o.content) - } - - Popover.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.arrow')) - } - - - // POPOVER PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.popover') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.popover', (data = new Popover(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.popover - - $.fn.popover = Plugin - $.fn.popover.Constructor = Popover - - - // POPOVER NO CONFLICT - // =================== - - $.fn.popover.noConflict = function () { - $.fn.popover = old - return this - } - -}(jQuery); - -/* ======================================================================== - * Bootstrap: tab.js v3.3.6 - * http://getbootstrap.com/javascript/#tabs - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // TAB CLASS DEFINITION - // ==================== - - var Tab = function (element) { - // jscs:disable requireDollarBeforejQueryAssignment - this.element = $(element) - // jscs:enable requireDollarBeforejQueryAssignment - } - - Tab.VERSION = '3.3.6' - - Tab.TRANSITION_DURATION = 150 - - Tab.prototype.show = function () { - var $this = this.element - var $ul = $this.closest('ul:not(.dropdown-menu)') - var selector = $this.data('target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - if ($this.parent('li').hasClass('active')) return - - var $previous = $ul.find('.active:last a') - var hideEvent = $.Event('hide.bs.tab', { - relatedTarget: $this[0] - }) - var showEvent = $.Event('show.bs.tab', { - relatedTarget: $previous[0] - }) - - $previous.trigger(hideEvent) - $this.trigger(showEvent) - - if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return - - var $target = $(selector) - - this.activate($this.closest('li'), $ul) - this.activate($target, $target.parent(), function () { - $previous.trigger({ - type: 'hidden.bs.tab', - relatedTarget: $this[0] - }) - $this.trigger({ - type: 'shown.bs.tab', - relatedTarget: $previous[0] - }) - }) - } - - Tab.prototype.activate = function (element, container, callback) { - var $active = container.find('> .active') - var transition = callback - && $.support.transition - && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) - - function next() { - $active - .removeClass('active') - .find('> .dropdown-menu > .active') - .removeClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', false) - - element - .addClass('active') - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - - if (transition) { - element[0].offsetWidth // reflow for transition - element.addClass('in') - } else { - element.removeClass('fade') - } - - if (element.parent('.dropdown-menu').length) { - element - .closest('li.dropdown') - .addClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - } - - callback && callback() - } - - $active.length && transition ? - $active - .one('bsTransitionEnd', next) - .emulateTransitionEnd(Tab.TRANSITION_DURATION) : - next() - - $active.removeClass('in') - } - - - // TAB PLUGIN DEFINITION - // ===================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tab') - - if (!data) $this.data('bs.tab', (data = new Tab(this))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.tab - - $.fn.tab = Plugin - $.fn.tab.Constructor = Tab - - - // TAB NO CONFLICT - // =============== - - $.fn.tab.noConflict = function () { - $.fn.tab = old - return this - } - - - // TAB DATA-API - // ============ - - var clickHandler = function (e) { - e.preventDefault() - Plugin.call($(this), 'show') - } - - $(document) - .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) - .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: affix.js v3.3.6 - * http://getbootstrap.com/javascript/#affix - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // AFFIX CLASS DEFINITION - // ====================== - - var Affix = function (element, options) { - this.options = $.extend({}, Affix.DEFAULTS, options) - - this.$target = $(this.options.target) - .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) - .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) - - this.$element = $(element) - this.affixed = null - this.unpin = null - this.pinnedOffset = null - - this.checkPosition() - } - - Affix.VERSION = '3.3.6' - - Affix.RESET = 'affix affix-top affix-bottom' - - Affix.DEFAULTS = { - offset: 0, - target: window - } - - Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - var targetHeight = this.$target.height() - - if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false - - if (this.affixed == 'bottom') { - if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' - return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' - } - - var initializing = this.affixed == null - var colliderTop = initializing ? scrollTop : position.top - var colliderHeight = initializing ? targetHeight : height - - if (offsetTop != null && scrollTop <= offsetTop) return 'top' - if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' - - return false - } - - Affix.prototype.getPinnedOffset = function () { - if (this.pinnedOffset) return this.pinnedOffset - this.$element.removeClass(Affix.RESET).addClass('affix') - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - return (this.pinnedOffset = position.top - scrollTop) - } - - Affix.prototype.checkPositionWithEventLoop = function () { - setTimeout($.proxy(this.checkPosition, this), 1) - } - - Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) return - - var height = this.$element.height() - var offset = this.options.offset - var offsetTop = offset.top - var offsetBottom = offset.bottom - var scrollHeight = Math.max($(document).height(), $(document.body).height()) - - if (typeof offset != 'object') offsetBottom = offsetTop = offset - if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) - if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) - - var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) - - if (this.affixed != affix) { - if (this.unpin != null) this.$element.css('top', '') - - var affixType = 'affix' + (affix ? '-' + affix : '') - var e = $.Event(affixType + '.bs.affix') - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - this.affixed = affix - this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null - - this.$element - .removeClass(Affix.RESET) - .addClass(affixType) - .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') - } - - if (affix == 'bottom') { - this.$element.offset({ - top: scrollHeight - height - offsetBottom - }) - } - } - - - // AFFIX PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.affix') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.affix', (data = new Affix(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.affix - - $.fn.affix = Plugin - $.fn.affix.Constructor = Affix - - - // AFFIX NO CONFLICT - // ================= - - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } - - - // AFFIX DATA-API - // ============== - - $(window).on('load', function () { - $('[data-spy="affix"]').each(function () { - var $spy = $(this) - var data = $spy.data() - - data.offset = data.offset || {} - - if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom - if (data.offsetTop != null) data.offset.top = data.offsetTop - - Plugin.call($spy, data) - }) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: collapse.js v3.3.6 - * http://getbootstrap.com/javascript/#collapse - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // COLLAPSE PUBLIC CLASS DEFINITION - // ================================ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Collapse.DEFAULTS, options) - this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + - '[data-toggle="collapse"][data-target="#' + element.id + '"]') - this.transitioning = null - - if (this.options.parent) { - this.$parent = this.getParent() - } else { - this.addAriaAndCollapsedClass(this.$element, this.$trigger) - } - - if (this.options.toggle) this.toggle() - } - - Collapse.VERSION = '3.3.6' - - Collapse.TRANSITION_DURATION = 350 - - Collapse.DEFAULTS = { - toggle: true - } - - Collapse.prototype.dimension = function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - Collapse.prototype.show = function () { - if (this.transitioning || this.$element.hasClass('in')) return - - var activesData - var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') - - if (actives && actives.length) { - activesData = actives.data('bs.collapse') - if (activesData && activesData.transitioning) return - } - - var startEvent = $.Event('show.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - if (actives && actives.length) { - Plugin.call(actives, 'hide') - activesData || actives.data('bs.collapse', null) - } - - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - .addClass('collapsing')[dimension](0) - .attr('aria-expanded', true) - - this.$trigger - .removeClass('collapsed') - .attr('aria-expanded', true) - - this.transitioning = 1 - - var complete = function () { - this.$element - .removeClass('collapsing') - .addClass('collapse in')[dimension]('') - this.transitioning = 0 - this.$element - .trigger('shown.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - var scrollSize = $.camelCase(['scroll', dimension].join('-')) - - this.$element - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) - } - - Collapse.prototype.hide = function () { - if (this.transitioning || !this.$element.hasClass('in')) return - - var startEvent = $.Event('hide.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var dimension = this.dimension() - - this.$element[dimension](this.$element[dimension]())[0].offsetHeight - - this.$element - .addClass('collapsing') - .removeClass('collapse in') - .attr('aria-expanded', false) - - this.$trigger - .addClass('collapsed') - .attr('aria-expanded', false) - - this.transitioning = 1 - - var complete = function () { - this.transitioning = 0 - this.$element - .removeClass('collapsing') - .addClass('collapse') - .trigger('hidden.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - this.$element - [dimension](0) - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION) - } - - Collapse.prototype.toggle = function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - Collapse.prototype.getParent = function () { - return $(this.options.parent) - .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') - .each($.proxy(function (i, element) { - var $element = $(element) - this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) - }, this)) - .end() - } - - Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { - var isOpen = $element.hasClass('in') - - $element.attr('aria-expanded', isOpen) - $trigger - .toggleClass('collapsed', !isOpen) - .attr('aria-expanded', isOpen) - } - - function getTargetFromTrigger($trigger) { - var href - var target = $trigger.attr('data-target') - || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 - - return $(target) - } - - - // COLLAPSE PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.collapse') - var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false - if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.collapse - - $.fn.collapse = Plugin - $.fn.collapse.Constructor = Collapse - - - // COLLAPSE NO CONFLICT - // ==================== - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - // COLLAPSE DATA-API - // ================= - - $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { - var $this = $(this) - - if (!$this.attr('data-target')) e.preventDefault() - - var $target = getTargetFromTrigger($this) - var data = $target.data('bs.collapse') - var option = data ? 'toggle' : $this.data() - - Plugin.call($target, option) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: scrollspy.js v3.3.6 - * http://getbootstrap.com/javascript/#scrollspy - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // SCROLLSPY CLASS DEFINITION - // ========================== - - function ScrollSpy(element, options) { - this.$body = $(document.body) - this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) - this.options = $.extend({}, ScrollSpy.DEFAULTS, options) - this.selector = (this.options.target || '') + ' .nav li > a' - this.offsets = [] - this.targets = [] - this.activeTarget = null - this.scrollHeight = 0 - - this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) - this.refresh() - this.process() - } - - ScrollSpy.VERSION = '3.3.6' - - ScrollSpy.DEFAULTS = { - offset: 10 - } - - ScrollSpy.prototype.getScrollHeight = function () { - return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) - } - - ScrollSpy.prototype.refresh = function () { - var that = this - var offsetMethod = 'offset' - var offsetBase = 0 - - this.offsets = [] - this.targets = [] - this.scrollHeight = this.getScrollHeight() - - if (!$.isWindow(this.$scrollElement[0])) { - offsetMethod = 'position' - offsetBase = this.$scrollElement.scrollTop() - } - - this.$body - .find(this.selector) - .map(function () { - var $el = $(this) - var href = $el.data('target') || $el.attr('href') - var $href = /^#./.test(href) && $(href) - - return ($href - && $href.length - && $href.is(':visible') - && [[$href[offsetMethod]().top + offsetBase, href]]) || null - }) - .sort(function (a, b) { return a[0] - b[0] }) - .each(function () { - that.offsets.push(this[0]) - that.targets.push(this[1]) - }) - } - - ScrollSpy.prototype.process = function () { - var scrollTop = this.$scrollElement.scrollTop() + this.options.offset - var scrollHeight = this.getScrollHeight() - var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() - var offsets = this.offsets - var targets = this.targets - var activeTarget = this.activeTarget - var i - - if (this.scrollHeight != scrollHeight) { - this.refresh() - } - - if (scrollTop >= maxScroll) { - return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) - } - - if (activeTarget && scrollTop < offsets[0]) { - this.activeTarget = null - return this.clear() - } - - for (i = offsets.length; i--;) { - activeTarget != targets[i] - && scrollTop >= offsets[i] - && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) - && this.activate(targets[i]) - } - } - - ScrollSpy.prototype.activate = function (target) { - this.activeTarget = target - - this.clear() - - var selector = this.selector + - '[data-target="' + target + '"],' + - this.selector + '[href="' + target + '"]' - - var active = $(selector) - .parents('li') - .addClass('active') - - if (active.parent('.dropdown-menu').length) { - active = active - .closest('li.dropdown') - .addClass('active') - } - - active.trigger('activate.bs.scrollspy') - } - - ScrollSpy.prototype.clear = function () { - $(this.selector) - .parentsUntil(this.options.target, '.active') - .removeClass('active') - } - - - // SCROLLSPY PLUGIN DEFINITION - // =========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.scrollspy') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.scrollspy - - $.fn.scrollspy = Plugin - $.fn.scrollspy.Constructor = ScrollSpy - - - // SCROLLSPY NO CONFLICT - // ===================== - - $.fn.scrollspy.noConflict = function () { - $.fn.scrollspy = old - return this - } - - - // SCROLLSPY DATA-API - // ================== - - $(window).on('load.bs.scrollspy.data-api', function () { - $('[data-spy="scroll"]').each(function () { - var $spy = $(this) - Plugin.call($spy, $spy.data()) - }) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: transition.js v3.3.6 - * http://getbootstrap.com/javascript/#transitions - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) - // ============================================================ - - function transitionEnd() { - var el = document.createElement('bootstrap') - - var transEndEventNames = { - WebkitTransition : 'webkitTransitionEnd', - MozTransition : 'transitionend', - OTransition : 'oTransitionEnd otransitionend', - transition : 'transitionend' - } - - for (var name in transEndEventNames) { - if (el.style[name] !== undefined) { - return { end: transEndEventNames[name] } - } - } - - return false // explicit for ie8 ( ._.) - } - - // http://blog.alexmaccaw.com/css-transitions - $.fn.emulateTransitionEnd = function (duration) { - var called = false - var $el = this - $(this).one('bsTransitionEnd', function () { called = true }) - var callback = function () { if (!called) $($el).trigger($.support.transition.end) } - setTimeout(callback, duration) - return this - } - - $(function () { - $.support.transition = transitionEnd() - - if (!$.support.transition) return - - $.event.special.bsTransitionEnd = { - bindType: $.support.transition.end, - delegateType: $.support.transition.end, - handle: function (e) { - if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) - } - } - }) - -}(jQuery); diff --git a/400-SOURCECODE/Admin/dist/assets/scripts/fixed_table_rc.js b/400-SOURCECODE/Admin/dist/assets/scripts/fixed_table_rc.js deleted file mode 100644 index f2c9214..0000000 --- a/400-SOURCECODE/Admin/dist/assets/scripts/fixed_table_rc.js +++ /dev/null @@ -1,243 +0,0 @@ -/* -A jQuery plugin to convert a well formatted table into a table with fixed -rows and columns. - -Copyright 2011-2015 Selvakumar Arumugam -http://meetselva.github.io/ - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ -(function ($) { - - $.fn.fxdHdrCol = function (o) { - var cfg = { - height: 0, - width: 0, - fixedCols: 0, - colModal: [], - tableTmpl: function () { - return ''; - }, - sort: false - }; - $.extend(cfg, o); - - return this.each (function () { - var lc = { - ft_container: null, - ft_rel_container: null, - ft_wrapper: null, - ft_rc: null, - ft_r: null, - ft_c: null, - tableWidth: 0 - }; - - var $this = $(this); - $this.addClass('ui-widget-header'); - $this.find('tbody tr').addClass('ui-widget-content'); - - $this.wrap('
    '); - lc.ft_container = $this.parent().css({width: cfg.width, height: cfg.height}); - - var $ths = $('thead tr', $this).first().find('th'); - - if (cfg.sort && sorttable && cfg.fixedCols == 0) { - $ths.addClass('fx_sort_bg'); - } - - var $thFirst = $ths.first(); - var thSpace = parseInt($thFirst.css('paddingLeft'), 10) + parseInt($thFirst.css('paddingRight'), 10); - - /* set width and textAlign from colModal */ - var ct = 0; - $ths.each(function (i, el) { - var calcWidth = 0; - for (var j = 0; j < el.colSpan; j++) { - calcWidth += cfg.colModal[ct].width; - ct++; - } - $(el).css({width: calcWidth, textAlign: cfg.colModal[ct-1].align}); - - lc.tableWidth += calcWidth + thSpace + ((i == 0)?2:1); - }); - - $('tbody', $this).find('tr').each(function (i, el) { - $('td', el).each(function (i, tdel) { - tdel.style.textAlign = cfg.colModal[i].align; - }); - }); - - $this.width(lc.tableWidth); - - //add relative container - $this.wrap('
    '); - lc.ft_rel_container = $this.parent(); - - //add wrapper to base table which will have the scrollbars - $this.wrap('
    '); - lc.ft_wrapper = $this.parent().css('width', cfg.width - 5); - - var theadTr = $('thead', $this); - //clone the thead->tr - var theadTrClone = theadTr.clone(); - - //construct fixed row (full row) - lc.ft_rel_container - .prepend($(cfg.tableTmpl(), {'class': 'ft_r ui-widget-header'}) - .append(theadTrClone)); - - //an instance of fixed row - lc.ft_r = $('.ft_r', lc.ft_rel_container); - lc.ft_r.wrap($('
    ', {'class': 'ft_rwrapper'})); - - lc.ft_r.width(lc.tableWidth); - - if (cfg.fixedCols > 0) { - //clone the thead again to construct the - theadTrClone = theadTr.clone(); - - //calculate the actual column's count (support for colspan) - var r1c1ColSpan = 0; - for (var i = 0; i < cfg.fixedCols; i++ ) { - r1c1ColSpan += this.rows[0].cells[i].colSpan; - } - - //prepare rows/cols for fixed row col section - $('tr', theadTrClone).each(function () { - var tdct = 0; - $(this).find('th').filter(function() { - tdct += this.colSpan; - return tdct > r1c1ColSpan; - }).remove(); - }); - - //add fixed row col section - lc.ft_rel_container - .prepend($(cfg.tableTmpl(), {'class': 'ft_rc ui-widget-header'}) - .append(theadTrClone)); - - //an instance of fixed row column - lc.ft_rc = $('.ft_rc', lc.ft_rel_container); - - //now clone the fixed row column and append tbody for the remaining rows - lc.ft_c = lc.ft_rc.clone(); - lc.ft_c[0].className = 'ft_c'; - - //append tbody - lc.ft_c.append('
    '); - - //append row by row while just keeping the frozen cols - var ftc_tbody = lc.ft_c.find('tbody'); - $.each ($this.find('tbody > tr'), function (idx, el) { - var tr = $(el).clone(); - - tdct = 0; - tr.find('td').filter(function (){ - tdct += this.colSpan; - return tdct > r1c1ColSpan; - }).remove(); - - ftc_tbody.append(tr); - }); - - lc.ft_rc.after(lc.ft_c); - lc.ft_c.wrap($('
    ', {'class': 'ft_cwrapper'})); - - var tw = 0; - for (var i = 0; i < cfg.fixedCols; i++) { - tw += $(this.rows[0].cells[i]).outerWidth(true); - } - lc.ft_c.add(lc.ft_rc).width(tw); - lc.ft_c.height($this.outerHeight(true)); - - //set height of fixed_rc and fixed_c - for (var i = 0; i < this.rows.length; i++) { - var ch = $(this.rows[i]).outerHeight(); - var fch = $(lc.ft_c[0].rows[i]).outerHeight(true); - - ch = (ch>fch)?ch:fch; - - if (i < lc.ft_rc[0].rows.length) { - $(lc.ft_r[0].rows[i]) - .add(lc.ft_rc[0].rows[i]) - .height(ch); - } - - $(lc.ft_c[0].rows[i]) - .add(this.rows[i]) - .height(ch); - } - - lc.ft_c - .parent() - .css({height: lc.ft_container.height() - 17}) - .width(lc.ft_rc.outerWidth(true) + 1); - } - - lc.ft_r - .parent() - .css({width: lc.ft_wrapper.width()- 17}); - - //events (scroll and resize) - lc.ft_wrapper.scroll(function () { - if (cfg.fixedCols > 0) { - lc.ft_c.css('top', ($(this).scrollTop()*-1)); - } - lc.ft_r.css('left', ($(this).scrollLeft()*-1)); - }); - - /*$(window).on('resize', function () { - lc.ft_r - .parent() - .css({width: lc.ft_rel_container.width()- 17}); - });*/ - - if (cfg.sort && sorttable && cfg.fixedCols == 0) { - - $('table', lc.ft_container).addClass('sorttable'); - - sorttable.makeSortable(this); - - var $sortableTh = $('.fx_sort_bg', lc.ft_rel_container); - - $sortableTh.click (function () { - var $this = $(this); - var isAscSort = $this.hasClass('fx_sort_asc'); - - $sortableTh.removeClass('fx_sort_asc fx_sort_desc'); - - if (isAscSort) { - $this.addClass('fx_sort_desc').removeClass('fx_sort_asc'); - } else { - $this.addClass('fx_sort_asc').removeClass('fx_sort_desc'); - } - - var idx = $(this).index(); - - sorttable.innerSortFunction.apply(lc.ft_wrapper.find('th').get(idx), []); - }); - } - - }); - - }; - -})(jQuery); diff --git a/400-SOURCECODE/Admin/dist/assets/scripts/jquery-1.11.3.min.js b/400-SOURCECODE/Admin/dist/assets/scripts/jquery-1.11.3.min.js deleted file mode 100644 index 0f60b7b..0000000 --- a/400-SOURCECODE/Admin/dist/assets/scripts/jquery-1.11.3.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; - -return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
    a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:k.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("