var ui = function(){ var _ui = {}; function commonInitialize($scope) { $scope.quoteUI = {}; $scope.quoteUI.RoofPitch_choices = [ ["steep", "Steep"], ["verys", "Very steep"], ["notst", "Not steep"], ["esteep", "Extremely Steep"], ["4/12", "4/12"], ["5/12", "5/12"], ["6/12", "6/12"], ["7/12", "7/12"], ["8/12", "8/12"], ["9/12", "9/12"], ["10/12", "10/12"], ["12/12", "12/12"]]; } _ui.manual_quote_initialize = function($scope){ commonInitialize($scope); $scope.quoteUI.RoofPitch_multipliers = { /* not steep */ "notst" : 1.15, /* steep */ "steep" : 1.25, /* very steep */ "verys" : 1.4, /* extremely steep */ "esteep" : 1.55, "4/12" : 1.035, "5/12" : 1.055, "6/12" : 1.085, "7/12": 1.16, "8/12": 1.205, "9/12": 1.25, "10/12": 1.305, "11/12": 1.36, "12/12": 1.415 }; }; _ui.quote_initialize = function($scope){ commonInitialize($scope); $scope.quote = {}; $scope.quoteUI.Stories_choices = [[1, "One story"], [2, "Two story"]]; $scope.quoteUI.Garage_choices = [[1, "One car"], [2, "Two car"], [3, "Three car"], [4, "Four car"]]; $scope.quoteUI.RoofType_choices = [["asph", "Asphalt shingle"], ["tile", "Tile concrete"], ["clay", "Clay"]]; $scope.quoteUI.CoveredParking_choices = [[1, "One car"], [2, "Two car"]]; $scope.quoteUI.CoveredPorchOrPatio_choices = [["l", "large"], ["s", "small"]]; }; _ui.quote_defaults = function($scope){ $scope.quote.Stories = null; $scope.quote.SquareFeet = null; $scope.quote.Garage = 2; $scope.quote.RoofType = null; $scope.quote.RoofPitch = null; $scope.quote.ExtraSquareFeet = null; $scope.quote.CoveredParking = null; $scope.quote.CoveredPorchOrPatio = null; $scope.quote.Address = null; $scope.quote.City = null; $scope.quote.State = null; $scope.quote.ZipCode = null; $scope.quote.Owner = null; $scope.quote.Telephone = null; $scope.quote.Email = null; $scope.quote.Quote = null; $scope.quote.send_to_email = true; $scope.quote.send_to_phone = true; }; _ui.contractor_defaults = function($scope){ $scope.contractor = {}; $scope.contractor.CostPerSqFtAsphalt = '0.18'; $scope.contractor.CostPerSqFtClay = '0.25'; $scope.contractor.CostPerSqFtConcrete = '0.25'; }; return _ui; }();