1(function() { 2 var app = angular.module('app'); 3 app.controller('TerraceController', ['$scope', '$location', function($scope, $location) { 4 5 $("#myCarousel-pro").carousel(); 6 7 $("a.left").click(function() { 8 $("#myCarousel-pro").carousel("prev"); 9 }); 10 $("a.right").click(function() { 11 $("#myCarousel-pro").carousel("next"); 12 }); 13 14 /* $("#myCarousel-homeowner").carousel(); 15 16 $("a.left").click(function() { 17 $("#myCarousel-homeowner").carousel("prev"); 18 }); 19 $("a.right").click(function() { 20 $("#myCarousel-homeowner").carousel("next"); 21 });*/ 22 23 $scope.sliderimages = [{}]; 24 25 26 $.each($scope.sliderimages, function(index, image) { 27 28 var element = $('<div class="item carousel-wide" style="background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url(' + image.background + ') no-repeat center; background-size: cover; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover;' + image.padding + ';"><div class="container carousel-container carousel-vertical-alignment"><div class="col-xs-12"><h1 class="carousel-header" style="color: ' + image.color + '; font-family: ' + image.headerfont + '">' + image.header + '</h1></div><div class="col-sm-' + image.textcol + ' col-xs-12 vcenter"><div class="margin-spacing"><h1 class="carousel-header" style="color: ' + image.color + '; font-family: ' + image.headerfont + '">' + image.header2 + '</h1><h3 class="carousel-text hidden-xs" style="color: ' + image.color + '; font-family: ' + image.textfont + '">' + image.text + '</h3><h3 style="margin-right: 125px; margin: 40px 0px;"><a href="' + image.href + '" style="background-color:none; ' + image.color + '; color:#fff; ' + image.ctacolor + '; border: 1px solid ' + image.color + '; border-radius: 6px; padding: 8px 8px;">' + image.cta + '</a></h3></div><div class="visible-xs" style="margin-bottom: 50px;"></div></div><div class="col-sm-' + image.imgcol + ' col-xs-12 vcenter"><a href="' + image.href + '"><img src="' + image.img + '" alt="' + image.alt + '" class="img-responsive" style="' + image.imgstyle + ' "/></a></div></div></div>') 29 30 if (index === 0) { 31 element.addClass("active"); 32 } 33 34 element.appendTo("div.carousel-inner"); 35 36 }); 37 38 $scope.blocks = [{ 39 "image": "/img/featured-5-project-videos.png", 40 "header": "PROJECT VIDEOS", 41 "link": "#/productsearch", 42 "linktext": "Lorem Ipsum", 43 "description": " dolor sit amet, consectetur adipiscing elit. iam leo neque." 44 }, 45 { 46 "image": "/img/featured-5-design-my-project.png", 47 "header": "DESIGN MY PROJECT", 48 "link": "#/productsearch", 49 "linktext": "Lorem Ipsum", 50 "description": " dolor sit amet, consectetur adipiscing elit. iam leo neque." 51 }, 52 { 53 "image": "/img/featured-5-find-a-dealer-contractor.png", 54 "header": "FIND A DEALER", 55 "link": "#/productsearch", 56 "linktext": "Lorem Ipsum", 57 "description": " dolor sit amet, consectetur adipiscing elit. iam leo neque." 58 }, 59 { 60 "image": "/img/featured-5-project-profiles-homeowners.png", 61 "header": "PROJECT PROFILES", 62 "link": "#/productsearch", 63 "linktext": "Lorem Ipsum", 64 "description": " dolor sit amet, consectetur adipiscing elit. iam leo neque." 65 }, 66 { 67 "image": "/img/featured-5-calculator.png", 68 "header": "QUANTITY CALCULATOR", 69 "link": "#/productsearch", 70 "linktext": "Lorem Ipsum", 71 "description": " dolor sit amet, consectetur adipiscing elit. iam leo neque." 72 } 73 ]; 74 75 $scope.setCookie = function(cname, cvalue, exdays) { 76 var d = new Date(); 77 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 78 var expires = "expires=" + d.toUTCString(); 79 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 80 } 81 82 $scope.getCookie = function(cname) { 83 var name = cname + "="; 84 var ca = document.cookie.split(';'); 85 for (var i = 0; i < ca.length; i++) { 86 var c = ca[i];
87 while (c.charAt(0) == ' ') { 88 c = c.substring(1); 89 } 90 if (c.indexOf(name) == 0) { 91 return c.substring(name.length, c.length); 92 } 93 } 94 return ""; 95 } 96 97 $scope.selectOption = function(cname, cvalue, exdays) { 98 $scope.setCookie(cname, cvalue, exdays); 99 $('#versionModal').modal('toggle'); 100 $location.path('/contractors'); 101 } 102 103 /******************* 104 $scope.init = function() { 105 var cook = $scope.getCookie("version"); 106 if (cook) { 107 console.log(cook); 108 if (cook === "homeowner") { 109 110 } else { 111 $location.path('/contractors'); 112 } 113 } else { 114 console.log("No Cookie"); 115 $('#versionModal').modal(); 116 } 117 } 118 119 $scope.init(); 120 *********************/ 121 }]); 122}());
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.