Skip to content

Instantly share code, notes, and snippets.

@texirv0203
Created January 9, 2018 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save texirv0203/5a49f608d107003dc8fd73f1650bed60 to your computer and use it in GitHub Desktop.
Save texirv0203/5a49f608d107003dc8fd73f1650bed60 to your computer and use it in GitHub Desktop.
app.component.ts

import { Component, OnInit, ViewChild, HostListener } from '@angular/core';
import { SPORTSUService } from './services/SPORTSu.service';
//import {ProgressCircle} from './components/shared/progress/progress-circle';
import { TranslateService } from './translate/translate.service';
import { Router } from '@angular/router';
import 'rxjs/add/operator/pairwise';

import { Base } from './components/base/base';
import { MarksUser } from './components/Marks/user';
import { AppRoutingModule } from './app.routing';
//import {AppRoutingModuleSample} from './components/Marks/appDyanmics-sample';


import { Marks } from './components/Marks/Marks';
import { Skys } from './components/Skys/Skys';
import { MarksFunctionalRoles } from './components/Marks/functional-roles';
import { MarksDepartmentRoleMapping } from './components/Marks/department-role-mapping';
import { MarksAspects } from './components/Marks/aspects';
import { MarksFunctionalRolesMap } from './components/Marks/functional-role-mapping';
import { MarksBallOwner } from './components/Marks/BallOwner';
import { MarksDeleteBat } from './components/Marks/deleteBat';
import { MarksDeleteBall } from './components/Marks/deleteBall';
import { SpecialEvents } from './components/Marks/special-events';
import { BatCreateFill } from './components/Bat/create-fill';
import { BatRights } from './components/Bat/rights';
import { BatMain } from './components/Bat/Batmain';
import { BatsHeader } from './components/Bat/Batheader';
import { BatSearch } from './components/Bat/Bat-search';
import { BatDeliverySpecs } from './components/Bat/delivery-specs';
import { BatDocuments } from './components/Bat/documents';
import { BatAllocation } from './components/Bat/allocation';
import { BatPayments } from './components/Bat/payments';
import { BatNotes } from './components/Bat/notes';



import { SkyAPTTBA } from './components/Skys/SkyAPTTBA';
import { SkylionChange } from './components/Skys/SkylionChange';
import { SkyOnAirOperations } from './components/Skys/SkyOnAirOperations';
import { SkyVDS } from './components/Skys/SkyVDS';
import { SkyBookedNotBooked } from './components/Skys/SkyBookedNotBooked';
import { SkyOriginalRepeat } from './components/Skys/SkyOriginalRepeat';
import { SkySPORTSTVEverywhereBlackoutGrid } from './components/Skys/SkySPORTSTVEverywhereBlackoutGrid';
import { SkySPORTSTVEverywherePartnerGrid } from './components/Skys/SkySPORTSTVEverywherePartnerGrid';
import { SkyVDSBall } from './components/Skys/SkyVDSBall';
import { SkyNPSC } from './components/Skys/SkyNPSC';
import { SkylionInfo } from './components/Skys/SkylionInfo';
import { SkyNonSchedTimeslot } from './components/Skys/SkyNonSchedTimeslot';
import { SkyTVEverywhereClearedGrid } from './components/Skys/SkyTVEverywhereClearedGrid';
import { SkyEpisodeCount } from './components/Skys/SkyEpisodeCount';
import { SkylionSummary } from './components/Skys/SkylionSummary';
import { SkyEpisodeUsage } from './components/Skys/SkyEpisodeUsage';
import { SkyslionCableGridReferenceByProgram } from './components/Skys/lion-cable/SkyslionCableGridReferenceByProgram';
import { GridReferenceSkyAllDetailsNoLength2087 } from './components/Skys/lion-cable/GridReferenceSkyAllDetailsNoLength2087';
import { TvEverywhere2076 } from './components/Skys/lion-cable/TvEverywhere2076';
import { GridReferenceByBallTypeBravo3000 } from './components/Skys/lion-cable/GridReferenceByBallTypeBravo3000';
import { lionAllocation2031 } from './components/Skys/lion-cable/lionAllocation2031';

import { GridReferenceSkyAllDetailsUSA2001 } from './components/Skys/lion-cable/GridReferenceSkyAllDetailsUSA2001';
import { SeriesAirDates } from './components/Skys/Ball-spanish/SeriesAirDates';
import { GridReference1006 } from './components/Skys/lion-cable/GridReference1006';
import { UsageOriginatingAdditionalNetworksUsa } from './components/Skys/lion-cable/UsageOriginatingAdditionalNetworksUsa';


import { CanDeactivateGuard } from './services/canDeactivate.service';
import { recentPinnedHistoryService } from './components/shared/content/recent-pinned-history';

declare var $: any;
@Component({
	selector: 'SPORTSu',

	templateUrl: "./app/components/shared/header/header.html"
})
export class AppComponent implements OnInit {
	constructor(private _translate: TranslateService, private SPORTSuservice: SPORTSUService, private router: Router, private recentPinnedHistory: recentPinnedHistoryService) {
		//  this.userLang = navigator.language; 
	}
	public userLang: string;
	public Bats: string;
	public SPORTSBalls: string;
	public Balls: string;
	public lions: string;
	public SPORTSlions: string;
	public Financials: string;
	public Profitability: string;
	public Jaguars: string;
	public Jumpings: string;
	public Listing: string;
	public Skys: string;
	public Marks: string;
	public Forecasting: string;

	public loggedUserName: string;
	public movie: string;
	public nonmovie: string;
	public menuListStatic;
	public menuList = [];
	public logoutYes = "Yes";
	public logoutNo = "No";

	public privilege;

	//public menuListName=["Bat Management","Ball Management - SPORTS","Ball Management - Cable","Marks(Old)"];
	ngOnInit(): void {

		let value = this.router.events.pairwise;
		//console.log(value)
		this.resetRouterConfig();
		this.createDialog("#logOutDialog");
		let userPrivilege = JSON.parse(window.sessionStorage.getItem("userPrivilege"));
		let attributes = userPrivilege.displayName;
		////console.log(attributes);
		this.loggedUserName = "";
		if (attributes) {
			this.loggedUserName = attributes;
		}

		let that = this;
		let language = this.SPORTSuservice.userLang;
		this.SPORTSuservice.getlocalResponse(language, 'get', null)
			.subscribe(
			data => {
				that.selectlanguage(data);
			},
			err => { }
			);


		$(".triggerLeftSlider").click(function () {
			that.initiateLeftSlider();
		});

		$(".triggerSSSelectDropDownWidth").click(function () {
			that.setSSSelectDropDownWidth();
		});

		$("#mainNavTabs .hasSubItems").click(function () {
			if ($(window).outerWidth(true) <= 767) {
				$(this).find('ul').slideToggle();
				$(this).toggleClass('activeDDArrow');
			}
		});
		$("#mainNavTabs .hasSubItems").hover(function () {
			if ($(window).outerWidth(true) > 767) {
				$(this).find('ul').slideToggle();
			}
		});
		that = this;
		let prevTopScroll = 0;
		$(document).scroll(function (evt) {
			let currentTopScroll = $(document).scrollTop();
			if (prevTopScroll !== currentTopScroll) {
				that.resetGridComponents();
			}
			if (currentTopScroll == 0) {
				setTimeout(function () {
					that.removeGridScrollComponents();
				}, 100);
			}
		});


		$(".triggerDocumentScroll").click(function () {
			that.resetGridComponents();
		});


		let menuNavEnableCheckTimer = setInterval(function () {
			let isMainNavInit = $('#mainNavBox #mainNavTabs > li').eq(0).text();
			if (isMainNavInit != 0 && isMainNavInit != "") {
				that.listSliderSingleTabScrollEnable(["mainNavBox"]);
				that.menuReset();
				clearInterval(menuNavEnableCheckTimer);
			}
		}, 100);
	}

	logOut(): void {
		let that = this;
		$(".coverageendoContent").text('Are you sure you want to exit the application?');
		let newdialog = $("#logOutDialog").data("kendoWindow").center().open();
		$("#logoutYes").unbind().click(function () {
			let userId;
			let attributes = that.SPORTSuservice.getSeesionStorageValue();
			if (attributes) {
				userId = attributes.user_attributes.SSO[0];
			}
			//console.log(userId);
			let dateTime = that.SPORTSuservice.todayDateWithTime();
			let saveUserTrackData = { "userId": userId, "screenId": 0, "actionId": 2, "comment": "Logout" };//,"currentTimeStamp" : dateTime};
			//that.progress.requestStart();
			//users/v1/lastaccessed?timeStamp=6/02/2017 05:54:22 PM
			that.lastAccessCall(that);
			that.SPORTSuservice.getResponse('users/v1/saveusertrack', 'post', saveUserTrackData)
				.subscribe(
				data => {
					// that.progress.requestEnd();
				},
				err => { //that.progress.requestEnd();
				}
				);
			let data = that.recentPinnedHistory.getRecentData('recentBat');
			if (data) {
				let postData = {
					"recentBalls": data.recentData.recentBalls,
					"pinnedBalls": data.recentData.pinnedBalls,
					"pinnedBats": data.recentData.pinnedBats
				};

				that.SPORTSuservice.getResponse("Balls/v1/SPORTSRecentBalls", 'post', postData)
					.subscribe(data => {
					},
					err => {
						console.log("updating recent data failed");
					}
					);
			}

			that.SPORTSuservice.clearSession();
			window.localStorage.removeItem("season");
			window.localStorage.removeItem("recentSPORTSBall");
			window.localStorage.removeItem("recentBat");
			window.sessionStorage.removeItem("userPrivilege");
			window.sessionStorage.removeItem("loginResponse");

			let baseUrl = window.location.hostname;
			if (window.location.hostname == "localhost") {
				baseUrl = 'qa.compass.devash.iSPORTSu.com';
				window.location.href = 'https://login.stg.iSPORTSu.com/ssologin/logoff.jsp?referrer=https%3A%2F%2Fcompass-auth.login.devsysash.iSPORTSu.com/logout.do?redirect=http%3A%2F%2F' + baseUrl + '&client_id=2c074eab-6264-494e-beb3-088830a0cdd8';

			} else {
				var envCheck;

				envCheck = window.location.hostname.split(".");

				if (envCheck[2].toLowerCase() == "devash") {
					window.location.href = 'https://login.stg.iSPORTSu.com/ssologin/logoff.jsp?referrer=https%3A%2F%2Fcompass-auth.login.devsysash.iSPORTSu.com/logout.do?redirect=http%3A%2F%2F' + baseUrl + '&client_id=2c074eab-6264-494e-beb3-088830a0cdd8';
				}
				else if (envCheck[2].toLowerCase() == "ash") {
					window.location.href = 'https://login.iSPORTSu.com/ssologin/logoff.jsp?referrer=https%3A%2F%2Fauth-domain.login.sysash.iSPORTSu.com/logout.do?redirect=http%3A%2F%2F' + baseUrl + '&client_id=8dfcf377-83b7-4d5d-b403-aa65b78229f2';
				}
				else if (envCheck[2].toLowerCase() == "devush") {
					//TEmporary URL
					window.location.href = 'https://login.stg.iSPORTSu.com/ssologin/logoff.jsp?referrer=https%3A%2F%2Fcompass-auth.login.devsysash.iSPORTSu.com/logout.do?redirect=http%3A%2F%2F' + baseUrl + '&client_id=2c074eab-6264-494e-beb3-088830a0cdd8';
				}
				if (window.location.hostname == "new.compass.iSPORTSu.com") {
					window.location.href = 'https://login.iSPORTSu.com/ssologin/logoff.jsp?referrer=https%3A%2F%2Fauth-domain.login.sysash.iSPORTSu.com/logout.do?redirect=http%3A%2F%2F' + baseUrl + '&client_id=8dfcf377-83b7-4d5d-b403-aa65b78229f2';
				}
			}

			//that.router.navigate(['/Base']);
			//location.reload();
		});
		$("#logoutNo").unbind().click(function () {
			newdialog.close();
		});

	}
	@HostListener('window:beforeunload', ['$event'])
	closeBrowserOrTab($event): void {
		window.sessionStorage.removeItem('activeSearch');


		//$event.defaultPrevented();

		window.sessionStorage.removeItem('evgCopiedBlocks'); //CR-17147
		this.lastAccessCall(this);
		/*if(this.isBrowserServiceClosed){
			this.progress.requestEnd();
		}*/
		$event.returnValue = 'Are you sure want to leave?';

	};
	lastAccessCall(that): any {
		let LoginTime = window.localStorage.getItem("LoginTime");
		var dateTimeLogin = { "lastAccessedDate": LoginTime };
		if (LoginTime) {
			that.SPORTSuservice.getResponse('users/v1/lastaccessed', 'post', dateTimeLogin)
				.subscribe(
				data => {
					// that.progress.requestEnd();
				},
				err => { //that.progress.requestEnd();
				}
				);
		}
	}

	onResize(event): void {

		this.listSliderSingleTabScrollEnable(["mainNavBox"]);
		this.menuReset();

		let curDocHeight = $(document).outerHeight();
		let navHeaderHeight = $('.navHeaderBox').outerHeight();
		let breadCrumbHeight = $('.breadCrumbBox').outerHeight();
		let fireGroupingHeight = $(".coverage-grouping-header").outerHeight(true);
		let fireHeaderHeight = $('.water-header').outerHeight();

		$('.leftSlider:not(.lionrLeftEventSlider)').addClass('toggleShow');
		$('.leftSlider:not(.lionrLeftEventSlider)').removeClass('shoHideMenuActive');
		$('.slideShrinkBox').removeClass('active');
		$('.showHideFav').addClass('toggleShow');
		$('.slideShrinkBox').removeClass('active');
		$('.showHideFav').removeClass('shoHideMenuActive');
		if ($('.water.fixedfire').length > 0) {
			let windowHeight = $(window).outerHeight(true);
			let fireFooterHeight = $(".water-pager").outerHeight(true);
			let scrolledHeight = $(document).scrollTop();
			let fireScrollPos = $('.water').offset().top;
			let currentScrollPos = fireScrollPos - scrolledHeight;

			if (currentScrollPos > windowHeight - (fireHeaderHeight + fireFooterHeight + fireGroupingHeight)) {
				$(".water-pager").css({ "display": "none" });
			}
			else {
				$(".water-pager").css({ "display": "" });
			}
		}

	}
	selectlanguage(data): void {
		let commonlabel = data;
		this.Bats = commonlabel.Marks_LBL_BatS;
		this.SPORTSBalls = commonlabel.Marks_LBL_SPORTSBallS;
		this.Balls = commonlabel.Marks_LBL_BallS;
		this.lions = commonlabel.Marks_LBL_lionS;
		this.SPORTSlions = commonlabel.Marks_LBL_SPORTSlionS;
		this.Financials = commonlabel.Marks_LBL_PAGE_FINANCIALS;
		this.Jaguars = commonlabel.Marks_LBL_JaguarS;
		this.Jumpings = commonlabel.Marks_LBL_JumpingS;
		this.Listing = commonlabel.Marks_LBL_LISTING;
		this.Skys = commonlabel.Marks_LBL_SkyS;
		this.Marks = commonlabel.Marks_LBL_Marks;
		this.Forecasting = commonlabel.Marks_LBL_PAGE_FORCASTING;
		this.Profitability = commonlabel.Marks_LBL_PROFITABILITY;
		this.movie = commonlabel.Marks_LBL_MOVIE;
		this.nonmovie = commonlabel.Marks_LBL_PAGE_NONMOVIE;

		this.menuListStatic = [{ "name": this.Bats, "routerLink": "/BatManagement", "icon": "menuIcons BatIcon" },
		{ "name": this.SPORTSBalls, "routerLink": "/BallsSPORTS", "icon": "menuIcons BallsSPORTSIcon" },
		{ "name": this.Balls, "routerLink": "/Balls", "icon": "menuIcons BallsIcon" },
		{ "name": this.Marks, "routerLink": "/Marks", "icon": "menuIcons MarksIcon" },
		{ "name": this.Jaguars, "routerLink": "/Jaguars", "icon": "menuIcons JaguarsIcon" }
		];
		this.menuSettings();
		//this.resetRouterConfig();
	}

	menuSettings(): void {
		let that = this;
		let userPrivilege = JSON.parse(window.sessionStorage.getItem("userPrivilege"));
		let menus = userPrivilege.aspects;
		/* let  findList=[];
		$.each(menus, function( menuName, val ) {
			if(that.menuListName.indexOf(menuName) != -1){
				findList.push(menuName);
			}
		});
		for(let i=0;i<that.menuListName.length;i++){
		if(findList.indexOf(that.menuListName[i]) != -1){
		that.menuList.push(that.menuListStatic[i]);
		}
		
		}*/

		/*for(let i=0;i<that.menuListName.length;i++){
	if(menus[(that.menuListName[i])]){
	that.menuList.push(that.menuListStatic[i]);
	}
	}*/


	}

	hamBurgerOpen(): void {
		//console.log("hamBurgerOpen");
		this.mainNavShow();
	}

	hamBurgerClose(): void {
		//console.log("hamBurgerClose");
		this.mainNavHide();
	}

	listSliderSingleTab(sliderId, sliderDirection): void {
		if ($('#' + sliderId + ' .listSliderContainer .scroller-' + sliderDirection).attr('disabled')) {
			return;
		} else {
			$('#' + sliderId + ' .listSliderContainer .scroller-' + sliderDirection).attr('disabled', true);
		}
		if ($('#' + sliderId + ' .listSliderContainer .scroller-' + sliderDirection).hasClass('inactive')) { return; }

		let listSliderBoxWidth = $('#' + sliderId + ' .listSliderContainer .listSliderWrapper').outerWidth();
		let leftAnimate = 0;
		let i: any = 0;
		let lengthCal = true;
		let lastVisibleListLength = 0;
		let lastVisibleList = false;
		let currentSubTab = 0;
		let sliderListCount = $('#' + sliderId + ' .sliderList > li').length;
		let sliderListLPos = $('#' + sliderId + ' .sliderList').position().left;
		let nextItem = 0;
		for (let j = 0; j < sliderListCount; j++) {
			if ($('#' + sliderId + ' .sliderList > li').eq(j).hasClass('currentSubTab')) {
				currentSubTab = j;
			}
		}

		$('#' + sliderId + ' .sliderList > li').removeClass('currentSubTab');

		if (sliderDirection == 'right') {
			nextItem = currentSubTab + 1;
		} else if (sliderDirection = 'left') {
			nextItem = currentSubTab - 1;
		}

		while (i < nextItem) {
			let currentSliderListWidth = $('#' + sliderId + ' .sliderList > li').eq(i).outerWidth();
			leftAnimate += currentSliderListWidth;
			i += 1;
		}
		$('#' + sliderId + ' .sliderList > li').eq(nextItem).addClass('currentSubTab');
		let that = this;
		$('#' + sliderId + ' .sliderList').animate(
			{ left: '-' + leftAnimate + 'px' },
			{
				duration: 500,
				complete: function () {
					that.listSliderSingleTabScrollEnable([sliderId]);
				}
			}
		);
	}

	listSliderSingleTabScrollEnable(sliderId): void {
		let sliderQueueCount = sliderId.length;
		if (sliderQueueCount <= 0) { return; }
		for (let i = 0; i < sliderQueueCount; i++) {
			let sliderListLPos = $('#' + sliderId[i] + ' .sliderList').position().left;
			let remaingsliderListLPos = this.listSliderSingleTabWidth(sliderId[i]) - Math.abs(sliderListLPos);
			let currentWindowW = $('#' + sliderId[i] + ' .listSliderContainer').outerWidth();
			if ($('#' + sliderId[i] + ' .sliderList > li').last().hasClass('currentSubTab') ||
				remaingsliderListLPos <= currentWindowW) {
				$('#' + sliderId[i] + ' .listSliderContainer .scroller-right').addClass('inactive');
			} else {
				$('#' + sliderId[i] + ' .listSliderContainer .scroller-right').removeClass('inactive');
			}
			if ($('#' + sliderId[i] + ' .sliderList > li').eq(0).hasClass('currentSubTab') ||
				$('#' + sliderId[i] + ' .sliderList > li.currentSubTab').length == 0) {
				$('#' + sliderId[i] + ' .listSliderContainer .scroller-left').addClass('inactive');
			} else {
				$('#' + sliderId[i] + ' .listSliderContainer .scroller-left').removeClass('inactive');
			}
			$('#' + sliderId[i] + ' .listSliderContainer .scroller-right').attr('disabled', false);
			$('#' + sliderId[i] + ' .listSliderContainer .scroller-left').attr('disabled', false);
		}
	}

	listSliderSingleTabWidth(sliderId): any {
		let sliderListItemWidth = 0;
		$('#' + sliderId + ' .sliderList > li').each(function () {
			sliderListItemWidth += $(this).outerWidth();
		});
		return sliderListItemWidth;
	}

	hasSubItems(that): any {

	}



	mainNavShow(): void {
		$('.mobileNav').animate(
			{ left: '0' },
			{
				duration: 500,
				easing: "linear",
				complete: function () { }
			}
		);

	}

	mainNavHide(): void {
		$('.mobileNav').animate(
			{ left: '-100%' },
			{
				duration: 500,
				easing: "linear",
				complete: function () { }
			}
		);

	}

	menuReset(): void {
		$('.mainNavContainer').css({ 'max-width': '' });
		let winWidth = $(window).outerWidth(true);
		let winheight = $(window).outerHeight();
		if (winWidth <= 1024) {
			$('.navContainer').css({ 'height': winheight + 'px' });
			$('.mobileNav').css({ left: '-100%' });
			$('body').addClass('mobHeaderFixed');
			$('.mainNavContainer').css({ 'max-width': '' });
			$('.logoBox').css({ 'width': '' });
		} else {
			$('.navContainer').css({ 'height': '' });
			$('.mobileNav').css({ left: 0 });
			$('body').removeClass('mobHeaderFixed');
			let mainNavContainerMaxWidth = 0;
			let mainNavContainerWidth = $('.mainNavWrapper').outerWidth();
			let mainNavlengthCal = true;
			let mainNavChildCount = $('#mainNavTabs > li').length;
			let currentNavWidth = this.listSliderSingleTabWidth('mainNavBox');
			let i = 0;
			if (currentNavWidth < mainNavContainerWidth) {
				let logoBoxWidth = winWidth - currentNavWidth - 50;
				$('.mainNavContainer .scroller').addClass('inactive');
				$('.mainNavContainer').css({ 'max-width': currentNavWidth + 'px' });
				$('.logoBox').css({ 'width': logoBoxWidth + 'px' });
			} else {
				while (mainNavlengthCal == true && mainNavChildCount > i) {
					let currentChildWidth = $('#mainNavTabs > li').eq(i).outerWidth(true);
					if (mainNavContainerWidth < (mainNavContainerMaxWidth + currentChildWidth)) {
						mainNavlengthCal = false;
						if ($('.mainNavContainer .scroller-left').hasClass('inactive') == false) {
							mainNavContainerMaxWidth += 14;
						}
						if ($('.mainNavContainer .scroller-right').hasClass('inactive') == false) {
							mainNavContainerMaxWidth += 14;
						}
						let logoBoxWidth = winWidth - mainNavContainerMaxWidth - 20;
						$('.mainNavContainer').css({ 'max-width': mainNavContainerMaxWidth + 'px' });
						$('.logoBox').css({ 'width': logoBoxWidth + 'px' });
					} else {
						mainNavContainerMaxWidth += currentChildWidth;
					}
					i += 1;
				}

			}
		}
		$('#mainNavTabs .hasSubItems ul').hide();
		$('#mainNavTabs .hasSubItems').removeClass('activeDDArrow');
	}

	initiateLeftSlider(): any {
		let that = this;
		this.positionLeftSlider();
		$(".leftSlider:not(.lionrLeftEventSlider) .panel-body > ul > li").click(function () {
			$(".leftSlider:not(.lionrLeftEventSlider) .panel-body > ul > li").removeClass('active');
			$(that).addClass('active');
		});
		$(".showHideLeftSliderBtn").click(function () {
			that.togleLeftSlider();
			setTimeout(function () {
				that.resetGridComponents();
			}, 100);
		});

		$(window).resize(function () {
			setTimeout(function () {
				that.resetGridComponents();
				that.positionLeftSlider();
				that.resetLeftSlider();
			}, 100);
		});
	}

	positionLeftSlider(): any {
		let that = this;
		let contentHeight = $(window).outerHeight(true);
		let mainNavHeight = $('.navHeaderBox').outerHeight(true);
		let breadcrumbHeight = $('.breadCrumbBox').outerHeight(true);
		if (breadcrumbHeight < 37) {
			breadcrumbHeight = 38;
		}
		let showHideTopPos = mainNavHeight + breadcrumbHeight - 7;
		let leftSliderHeight = contentHeight - showHideTopPos;

		$('.leftSlider:not(.lionrLeftEventSlider)').css({ 'top': showHideTopPos + 'px' });
		$('.fixedLeftSlider').css({ 'top': showHideTopPos + 'px' });
		$('.leftSlider:not(.lionrLeftEventSlider) .leftSliderBox').css({ 'max-height': leftSliderHeight + 'px', 'min-height': leftSliderHeight + 'px' });
	}

	togleLeftSlider(): any {
		let winWidth = $(window).innerWidth();
		if (winWidth < 1025) {
			$('.leftSlider:not(.lionrLeftEventSlider)').toggleClass('toggleShow');
		} else {
			$('.leftSlider:not(.lionrLeftEventSlider)').toggleClass('shoHideMenuActive');
		}
		$('.slideShrinkBox').toggleClass('active');
	}

	resetLeftSlider(): any {
		$('.leftSlider:not(.lionrLeftEventSlider)').addClass('toggleShow');
		$('.slideShrinkBox').removeClass('active');
		$('.leftSlider:not(.lionrLeftEventSlider)').removeClass('shoHideMenuActive');
	}

	resetGridComponents(): void {
		let fireCount = $('.water.fixedfire').length;
		if (fireCount > 0) {
			for (let k = 0; k < fireCount; k++) {
				let fireLockedHeaderWidth = $('.water.fixedfire .water-header-locked').eq(k).outerWidth(true);
				let leftSliderPosition = $('.slideShrinkBox').css('left');
				leftSliderPosition = parseInt(leftSliderPosition);
				let windowWidth = $(window).outerWidth(true);
				let fireWidth = $('.water.fixedfire').eq(k).outerWidth(true);
				let fireHeaderWrapWidth = $('.water.fixedfire .water-header-wrap').eq(k).outerWidth(true);

				let windowHeight = $(window).outerHeight(true);
				let documentHeight = $(document).outerHeight(true);
				let fireHeight = $(".water.fixedfire").eq(k).outerHeight(true);
				let navHeaderHeight = $(".navHeaderBox").outerHeight(true);
				let breadCrumbHeight = $(".breadCrumbBox").outerHeight(true);
				let lionrHeaderHeight = $("#lionrListHolder").outerHeight(true);
				if (lionrHeaderHeight > 20) { lionrHeaderHeight = lionrHeaderHeight - 2; }
				let fireHeaderHeight = $(".water.fixedfire .water-header").eq(k).outerHeight(true);
				let fireFooterHeight = $(".water.fixedfire .water-pager").eq(k).outerHeight(true);
				let fireGroupingHeight = $(".water.fixedfire .coverage-grouping-header").eq(k).outerHeight(true);
				let scrolledHeight = $(document).scrollTop();
				let fireScrollPos = $('.water.fixedfire').eq(k).offset().top;
				let currentScrollPos = fireScrollPos - scrolledHeight;
				let winWidth = $(window).outerWidth(true);
				let fireGroupingPos = navHeaderHeight + breadCrumbHeight;
				let fireHeaderPos = navHeaderHeight + fireGroupingHeight + breadCrumbHeight + lionrHeaderHeight;
				let fixedfireLeftPosition = $('.water.fixedfire').eq(k).offset().left;
				let fixedfireLeftPositionOnSliderAct = fixedfireLeftPosition;
				let fixedfireWraperWidth = $('.water.fixedfire').eq(k).outerWidth(true);
				let fixedfireRightPosition = fixedfireLeftPosition + fixedfireWraperWidth - 23;
				let fixedfireRightPositionOnSliderAct = fixedfireRightPosition;

				let headerGridHeight = fireHeaderHeight + fireGroupingHeight;
				let headerNavHeight = navHeaderHeight + breadCrumbHeight;
				if (fireLockedHeaderWidth != null) {
					let fireHeaderWrapWidthWithLSlider = fireWidth - fireLockedHeaderWidth - 18;
					let fireContentWidthWithLSlider = fireHeaderWrapWidthWithLSlider + 17;
					$('.water.fixedfire .water-header-wrap').eq(k).css({ 'width': fireHeaderWrapWidthWithLSlider + 'px' });
					$('.water.fixedfire .water-content').eq(k).css({ 'width': fireContentWidthWithLSlider + 'px' });
				} else {
					$('.water.fixedfire .water-content').eq(k).css({ 'width': '' });
					$('.water.fixedfire .water-header-wrap').eq(k).css({ 'width': '' });
				}
				if ($('html body .water.fixedfire .water-header').css('position') == 'fixed') {
					let gridLeftPos = $('html body .water.fixedfire .water-content > table').eq(k).position().left;
					gridLeftPos = parseInt(gridLeftPos);


					let fireHeaderWrapWidth = $('.water.fixedfire .water-header-wrap').eq(k).outerWidth(true);
					let fireContentWidth = $('.water.fixedfire .water-content').eq(k).outerWidth(true);
					if (fireLockedHeaderWidth == null) {
						$('html body .water.fixedfire .water-header').eq(k).css({ left: gridLeftPos + 'px', 'margin-left': leftSliderPosition + 'px', width: '' });
						$('html body .water.fixedfire .water-header-wrap').eq(k).css({ position: '', left: '', width: '' });

					} else {
						$('html body .water.fixedfire .water-header').eq(k).css({ left: '', 'margin-left': '', width: '100%' });
						let fireLeftPos = fireLockedHeaderWidth + leftSliderPosition;
						fireHeaderWrapWidth = fireHeaderWrapWidth - leftSliderPosition;
						fireContentWidth = fireContentWidth - leftSliderPosition;
						$('html body .water.fixedfire .water-header-wrap').eq(k).css({ position: 'absolute', left: fireLockedHeaderWidth + 'px' });
					}
					fireScrollPos -= headerGridHeight;
				} else {
					let gridLeftPos = $('html body .water.fixedfire .water-content').eq(k).scrollLeft();
					$(".water.fixedfire .water-header").eq(k).css({ "position": "", "top": "", "left": "", 'margin-left': '', width: '' });
					$('html body .water.fixedfire .water-content').eq(k).scrollLeft(gridLeftPos);
					$('html body .water.fixedfire .water-header-wrap').eq(k).css({ position: '', left: '' });
					$('html body .water.fixedfire .water-header .water-header-wrap').eq(k).scrollLeft(gridLeftPos);
				}

				if (scrolledHeight > (fireScrollPos - headerNavHeight)) {
					$(".water.fixedfire .water-header").eq(k).css({ "position": "fixed", "top": fireHeaderPos + "px" });

					let scrolledPos = $('.water.fixedfire .water-content').eq(k).scrollLeft();
					if (fireLockedHeaderWidth == null) {
						$(".water.fixedfire .water-header").eq(k).css({ "left": '-' + scrolledPos + "px", "width": (fixedfireWraperWidth + scrolledPos) + "px" });
					} else {
						$(".water.fixedfire .water-header").eq(k).css({ "left": fixedfireLeftPosition + "px", "width": fixedfireWraperWidth + "px" });
					}

					$(".water.fixedfire .coverage-grouping-header").eq(k).css({ "position": "fixed", "top": fireGroupingPos + "px", "left": fixedfireLeftPosition + "px", "width": fixedfireWraperWidth + "px" });
					$(".water.fixedfire .previousGridColumns").eq(k).css({ "position": "fixed", "top": fireHeaderPos + "px", "left": fixedfireLeftPosition + "px" });
					$(".water.fixedfire .nextGridColumns").eq(k).css({ "position": "fixed", "top": fireHeaderPos + "px", left: fixedfireRightPosition + "px" });
					$(".water.fixedfire .fireSelectedColumnsDragBar").eq(k).css({ "position": "fixed", "top": (breadCrumbHeight + navHeaderHeight + fireGroupingHeight) + "px", "bottom": fireFooterHeight + "px", "height": "", "padding-top": "" });

					if (winWidth <= 1024) {
						$(".slideShrinkBox.active .water.fixedfire .previousGridColumns").eq(k).css({ "left": fixedfireLeftPosition + "px" });
						$(".slideShrinkBox.active .water.fixedfire .coverage-grouping-header").eq(k).css({ "left": fixedfireLeftPosition + "px" });
					} else {
						$(".slideShrinkBox.active .water.fixedfire .previousGridColumns").eq(k).css({ "left": fixedfireLeftPositionOnSliderAct + "px" });
						$(".slideShrinkBox.active .water.fixedfire .coverage-grouping-header").eq(k).css({ "left": fixedfireLeftPositionOnSliderAct + "px" });

						if (fireLockedHeaderWidth != null) {
							$(".slideShrinkBox.active .water.fixedfire .water-header").eq(k).css({ "left": (fixedfireLeftPosition) + "px" });
						} else {
							/* $(".slideShrinkBox.active .water.fixedfire .water-header").eq(k).css({"left": (fixedfireLeftPosition-248)+"px"}); */
							$(".slideShrinkBox.active .water.fixedfire .water-header").eq(k).css({ "margin-left": (leftSliderPosition) + "px" });
						}
					}
					//	let bgPos = currentScrollPos - navHeaderHeight - breadCrumbHeight - 6;
					//	bgPos = Math.abs(bgPos);
					//	$(".water.fixedfire .fireSelectedColumnsDragBar").eq(k).css({"margin-left": "", "background-position": "0 "+bgPos+"px" });
					//$(".water.fixedfire .fireSelectedColumnsDragBar").eq(k).css({"margin-left": "", "position": "fixed" });
					$(".slideShrinkBox.active .water.fixedfire .fireSelectedColumnsDragBar").eq(k).css({ "margin-left": "248px" });

					$(".coverage-animation-container > form.coverage-filter-menu").parent().css({ "top": "128px", "position": "fixed" });
				} else {
					$(".water.fixedfire .water-header").eq(k).css({ "position": "", "top": "", botttom: "", "left": "", "right": "", "width": "", "margin-left": "" });
					$(".water.fixedfire .coverage-grouping-header").eq(k).css({ "position": "", "top": "", "left": "", "right": "", "width": "" });
					$(".water.fixedfire .previousGridColumns").eq(k).css({ "position": "", "top": "", "left": "" });
					$(".slideShrinkBox.active .water.fixedfire .previousGridColumns").eq(k).css({ "left": "" });
					$(".slideShrinkBox.active .water.fixedfire .coverage-grouping-header").eq(k).css({ "left": "" });
					$(".water.fixedfire .nextGridColumns").eq(k).css({ "position": "", "top": "", "left": "" });
					$(".water.fixedfire .fireSelectedColumnsDragBar").eq(k).css({ "position": "", "top": "", "bottom": "", height: (fireHeight - fireGroupingHeight) + "px", "margin-left": "" });
					$(".slideShrinkBox.active .water.fixedfire .fireSelectedColumnsDragBar").eq(k).css({ "margin-left": "0" });
					$(".water.fixedfire .fireSelectedColumnsDragBar").eq(k).css({ "background-position": "" });

					$(".coverage-animation-container > form.coverage-filter-menu").parent().css({ "top": (fireScrollPos + 30) + "px", "position": "absolute" });

				}

				$(".water.fixedfire .water-pager").eq(k).css({ "position": "fixed", "left": fixedfireLeftPosition + "px", "width": fixedfireWraperWidth + "px", "bottom": "0", "height": "38px" });
				//$(".slideShrinkBox.active .water.fixedfire .water-pager").eq(k).css({"left": fixedfireLeftPositionOnSliderAct+"px"});

				if (currentScrollPos > windowHeight - (fireHeaderHeight + fireFooterHeight + fireGroupingHeight)) {
					$(".water.fixedfire .water-pager").eq(k).css({ "display": "none" });
				}
				else {
					$(".water.fixedfire .water-pager").eq(k).css({ "display": "" });
				}
			}
		}

		let cGridCount = $('.fixedCustomGrid').length;
		if (cGridCount > 0) {
			for (let k = 0; k < cGridCount; k++) {
				let navHeaderHeight = $(".navHeaderBox").outerHeight(true);
				let breadCrumbHeight = $(".breadCrumbBox").outerHeight(true);
				let scrolledHeight = $(document).scrollTop();
				let fireHeaderPos = navHeaderHeight + breadCrumbHeight;
				let fireScrollPos = $('.fixedCustomGrid').eq(k).offset().top;
				let sliderPosition = $('.slideShrinkBox').position().left;
				let leftScrolled = $(".fixedCustomGrid").eq(k).scrollLeft();
				if (scrolledHeight > fireScrollPos) {
					let tableWidth = $(".fixedCustomGrid").eq(k).find(".Row").eq(0).outerWidth();
					$(".fixedCustomGrid").eq(k).find(".Heading").css({ "position": "fixed", "top": fireHeaderPos + "px", "left": "-" + leftScrolled + "px", "margin-left": sliderPosition + "px", "width": tableWidth + "px" });
					$(".fixedCustomGrid").eq(k).unbind().scroll(function (e) {
						sliderPosition = $('.slideShrinkBox').position().left;
						leftScrolled = $(".fixedCustomGrid").eq(k).scrollLeft();
						$(".fixedCustomGrid").eq(k).find(".Heading").css({ left: "-" + leftScrolled + "px", "margin-left": sliderPosition + "px" });
					});
				} else {
					$(".fixedCustomGrid").eq(k).find(".Heading").css({ "position": "", "top": "", "left": "", "margin-left": "" });
					$(".fixedCustomGrid").eq(k).unbind().scroll(function (e) { });
				}
			}
		}
	}

	removeGridScrollComponents(): void {
		let fireCount = $('.water.fixedfire').length;
		if (fireCount > 0) {
			for (let k = 0; k < fireCount; k++) {
				let fireHeight = $(".water.fixedfire").eq(k).outerHeight(true);
				let fireGroupingHeight = $(".water.fixedfire .coverage-grouping-header").eq(k).outerHeight(true);
				let fireScrollPos = $('.water.fixedfire').eq(k).offset().top;
				$(".water.fixedfire .water-header").eq(k).css({ "position": "", "top": "", botttom: "", "left": "", "right": "", "width": "", "margin-left": "" });
				$(".water.fixedfire .coverage-grouping-header").eq(k).css({ "position": "", "top": "", "left": "", "right": "", "width": "" });
				$(".water.fixedfire .previousGridColumns").eq(k).css({ "position": "", "top": "", "left": "" });
				$(".slideShrinkBox.active .water.fixedfire .previousGridColumns").eq(k).css({ "left": "" });
				$(".slideShrinkBox.active .water.fixedfire .coverage-grouping-header").eq(k).css({ "left": "" });
				$(".water.fixedfire .nextGridColumns").eq(k).css({ "position": "", "top": "", "left": "" });
				$(".water.fixedfire .fireSelectedColumnsDragBar").eq(k).css({ "position": "", "top": "", "bottom": "", height: (fireHeight - fireGroupingHeight) + "px", "margin-left": "" });
				$(".slideShrinkBox.active .water.fixedfire .fireSelectedColumnsDragBar").eq(k).css({ "margin-left": "0" });
				$(".water.fixedfire .fireSelectedColumnsDragBar").eq(k).css({ "background-position": "" });
				$(".coverage-animation-container > form.coverage-filter-menu").parent().css({ "top": (fireScrollPos + 30) + "px", "position": "absolute" });
			}
		}
	}

	resetRouterConfig(): void {
		this.privilege = JSON.parse(window.sessionStorage.getItem('userPrivilege'));
		let access = this.privilege.aspects.hasOwnProperty('Skys');
		let Skys = [];
		if (access) {
			Skys = Object.coverageeys(this.privilege.aspects.Skys);
		}
		let MarksAccess = this.privilege.aspects.hasOwnProperty('Marks');
		let Marks = [];
		if (MarksAccess) {
			Marks = Object.coverageeys(this.privilege.aspects.Marks);
		}
		let that = this;
		let menuListName = {
			"Bat Management": ['Balls', 'Rights', 'Delivery/Specs', 'Documents', 'Allocation', 'Payment lion', 'Notes'],
			"Ball Management - SPORTS": ['Episodes', 'Synopsis', 'Listing', 'Credits', 'Window', 'Air Dates', 'Notes', 'Normal Slot',
				'Advisory', 'On-Air Earth', 'Jumping', 'Digital Distribution', 'TVEverywhere', 'SPORTS Custom Properties'],
			"Ball Management - Cable": ['Window', 'Episodes', 'Exposures', 'Custom Properties', 'Versions', 'Internal KeyWords', 'FMV Allocation', 'Delivery', 'Restrictions', 'Properties', 'Digital Distribution', 'Rights', 'Notes', 'Genre', 'Cut - Ins', 'Allocation', 'FMV Amortize', 'Talent'],
			"Earth - SPORTS": "",
			"Earth": "",
			"Financials - Cable": "",
			"Jaguars": "",
			"Jumping Maintenance": "",
			"Search Listings": "",
			"Skys": Skys,//['APT TBA Sky (2043)','Skys','lion Change Sky (2046)','On Air Operations Sky (2070)','VDS Sky (2066)','Booked vs Not Booked Percentage','Original vs Repeat Percentage','SPORTS TVEverywhere Blackout Grid','SPORTS TVEverywhere Partner Grid','VDS Balls Sky','Show lion Information Sky (2048)','SPORTS Non-liond Timeslot Sky','Network lion Sky (2045)','NPSC Sky','Episode Information Sky (2068)','Press Listings Sky (2071)','UAR Security Sky (3010)','TVEverywhere - Percentage Cleared Sky','Episode Count Sky (2067)','lion Summary Sky (2047)','Episode Usage Sky (2069)','Grid Reference by Program - TRIO (2019)','Grid Reference Sky All Details(No Length)(2087)','TVEverywhere - % Cleared Sky (2076)','Grid Reference by Ball Type - Bravo (3000)','lion Allocation (2031)',
			//'Balls Available to lion (1013)','Grid Reference Sky- All Details - USA (2001)','Series Air Dates (2072)','Grid Reference (1006)','Usage - Originating & Additional Networks (USA)'],
			//"Marks":['User','Functional Roles','Departmental Role Mapping','Aspects','Functional Role Mapping','Ball Owner','Delete Bat','Delete Ball','Unlock','Format','Special Events','Event Template'],
			"Marks": Marks,//['Unlock','Delete Bat','Delete Ball','Ball Owner','Format','Special Events','Event Template','User','Functional Roles','Departmental Role Mapping','Aspects','Functional Role Mapping'],
			"Profitability": "",
			"MovieForecast": ""

		};




		let userPrivilege = JSON.parse(window.sessionStorage.getItem("userPrivilege"));
		let menus = userPrivilege.aspects;
		let menuPosition = 1; // its change the position if item removed in routes so // we  increase count only at true condition
		let menuLClassPosition = 1; // its not change the position if item removed in routes

		let landingScreen = true;
		let selectedLandingScreen = "";
		$.each(menuListName, function (menuName, val) {

			if (menus[menuName]) {
				if (landingScreen) {
					selectedLandingScreen = menuName;
					landingScreen = false;
				}

				if (that.hasFirstChild(menuPosition)) {
					let defaultPage = true;
					let subMenuPosition = 1;

					$.each(val, function (position, submenuName) {
						let resultOfhasChild = that.hasSecondChild(menuPosition);
						if (menus[menuName][submenuName]) {

							if (defaultPage) {
								if (resultOfhasChild.hasChild) {
									that.router.config[menuPosition].children[resultOfhasChild.position].children[0].redirectTo = that.router.config[menuPosition].children[2].children[subMenuPosition].path;
								} else {
									that.router.config[menuPosition].children[0].redirectTo = that.router.config[menuPosition].children[subMenuPosition].path;
									subMenuPosition = subMenuPosition - 1;
								}

								defaultPage = false;
							}

							subMenuPosition = subMenuPosition + 1;
						} else {
							if (resultOfhasChild.hasChild) {
								that.router.config[menuPosition].children[resultOfhasChild.position].children.splice(subMenuPosition, 1);
							} else {
								that.router.config[menuPosition].children.splice(subMenuPosition, 1);
							}
						}


					});

				}
				//console.log(menuPosition+"=="+menuName);

				menuPosition = menuPosition + 1
			} else {
				$(".isMenuAccess" + menuLClassPosition).addClass("displayNone");
				that.router.config.splice(menuPosition, 1);

			}
			menuLClassPosition = menuLClassPosition + 1;
		});
		that.defaultLandingScreenSetup(selectedLandingScreen);

	}

	hasSecondChild(menuPosition: any): any {
		let subChild = this.router.config[menuPosition].children;
		let result = { "hasChild": false, "position": -1 };
		for (let i = 0; i < subChild.length; i++) {
			if (subChild[i].children) {
				result.hasChild = true;
				result.position = i;
				return result;
			}
		}
		return result;
	}

	hasFirstChild(menuPosition: any): any {
		let result = false;
		let subChild = this.router.config[menuPosition];
		if (subChild.children) {
			result = true;
		}
		return result;
	}

	defaultLandingScreenSetup(defaultPage): any {


		let landingPage = JSON.parse(window.sessionStorage.getItem("userPrivilege")).defaultLandingPage;
		let aspects = JSON.parse(window.sessionStorage.getItem("userPrivilege")).aspects;

		let aspectLength = Object.coverageeys(aspects).length;
		let landingPageWithoutSpace = "development";
		if (aspectLength > 0) {
			if (landingPage == "") {
				//if(this.menuListName.indexOf(defaultPage) != -1){
				landingPageWithoutSpace = this.checkLandingScreen(defaultPage);
				//}			 
			} else {
				landingPageWithoutSpace = this.checkLandingScreen(landingPage);
			}
			//console.log(this.router.config);
			this.router.config[0].redirectTo = landingPageWithoutSpace;
			//this.router.navigate(["/"+landingPageWithoutSpace]);
		} else {
			let attributes = this.SPORTSuservice.getSeesionStorageValue();
			if (attributes) {

				let loggedSSO;
				if (attributes) {
					loggedSSO = attributes.user_attributes.SSO[0];
				}
				alert("SSO " + loggedSSO + " doesn’t have access to application. Please contact application support team");
				this.SPORTSuservice.clearSession();
				window.localStorage.removeItem("season");
				window.localStorage.removeItem("recentSPORTSBall");
				window.localStorage.removeItem("recentBat");
				window.sessionStorage.removeItem("userPrivilege");
				window.sessionStorage.removeItem("loginResponse");

				let baseUrl = window.location.hostname;
				if (window.location.hostname == "localhost") {
					baseUrl = 'qa.compass.devash.iSPORTSu.com';
				}
				window.location.href = 'https://login.stg.iSPORTSu.com/ssologin/logoff.jsp?referrer=https%3A%2F%2Fcompass-auth.login.devsysash.iSPORTSu.com/logout.do?redirect=http%3A%2F%2F' + baseUrl + '&client_id=0cc030be-6a26-457e-b32e-d4ca98bd2aaf';

			}
		}
	}

	checkLandingScreen(landingPage): any {

		let landingPageWithoutSpace;
		if (landingPage == "Marks") {
			landingPageWithoutSpace = "Marks";
		} else if (landingPage == "Ball Management – Cable") {
			landingPageWithoutSpace = "Balls";
		} else if (landingPage == "Ball Management - SPORTS") {
			landingPageWithoutSpace = "BallsSPORTS";
		} else if (landingPage == "Bat Management") {
			landingPageWithoutSpace = "BatManagement";
		} else if (landingPage == "Earth - SPORTS") {
			landingPageWithoutSpace = "EarthSPORTSMain";
		}
		else if (landingPage == "Skys") {
			landingPageWithoutSpace = "Skys";
		}
		else if (landingPage == "Jumping Maintenance") {
			landingPageWithoutSpace = "JumpingMaintenance";
		}
		else if (landingPage == "Jaguars") {
			landingPageWithoutSpace = "Jaguars";
		}
		else if (landingPage == "Search Listings") {
			landingPageWithoutSpace = "SearchListings";
		}
		else if (landingPage == "Financials - Cable") {
			landingPageWithoutSpace = "Financials";
		}

		else {
			landingPageWithoutSpace = "development"
		}
		return landingPageWithoutSpace;
	}

	createDialog(dialogId) { // init pop dialog
		$('#serviceStatusdialog .coveragePopUpBall').text('Confirmation');
		$(dialogId).coverageendoWindow({
			Ball: false,
			width: "350px",
			visible: false,
			resizable: false,
			draggable: false,
			modal: true,
			open: function (e) { $("html, body").css("overflow", "hidden"); },
			close: function (e) { $("html, body").css("overflow", ""); }

		});
	}

	setSSSelectDropDownWidth() {
		let ssSelectDropDownCount = $('.formRow ss-multiselect-dropdown').length;
		for (let ssCount = 0; ssCount < ssSelectDropDownCount; ssCount++) {
			let formRowWidth = $('.formRow').eq(ssCount).outerWidth();
			let formRowLabelWidth = $('.formRow .formLabelCell').eq(ssCount).outerWidth();
			let formRowControlWidth = formRowWidth - formRowLabelWidth - 15;
			$('.formRow .formControlCell ss-multiselect-dropdown button').eq(ssCount).css({ "width": formRowControlWidth + "px" });
		}

	}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment