@@ -16,13 +16,17 @@ app.config(function($stateProvider, $urlRouterProvider, $locationProvider) {
1616
1717 $locationProvider . html5Mode ( true ) ;
1818
19- $urlRouterProvider . otherwise ( "/?status= 404" ) ;
19+ $urlRouterProvider . otherwise ( "/404" ) ;
2020
2121 $stateProvider
2222 . state ( 'index' , {
2323 url : '/' ,
2424 templateUrl : '/assets/build/templates/index.html'
2525 } )
26+ . state ( '404' , {
27+ url : '/404' ,
28+ templateUrl : '/assets/build/templates/404.html'
29+ } )
2630 . state ( 'generate' , {
2731 url : '/generate' ,
2832 templateUrl : '/assets/build/templates/generate.html' ,
@@ -503,7 +507,7 @@ app.controller("AppCtrl", function($scope, localStorage, $window, $filter, $stat
503507 return course . sections . reduce (
504508 function ( total , section ) {
505509 return total && section . selected ;
506- } ) ;
510+ } , true ) ;
507511 } ,
508512
509513 /**
@@ -1351,7 +1355,7 @@ app.factory('uiDayFactory', function() {
13511355app . directive ( "courseCart" , function ( ) {
13521356 return {
13531357 restrict : 'A' ,
1354- templateUrl : '/js /templates/cart.html'
1358+ templateUrl : '/assets/build /templates/cart.html'
13551359 } ;
13561360} ) ;
13571361app . directive ( "dowSelectFields" , function ( uiDayFactory ) {
@@ -1410,7 +1414,7 @@ app.directive("loadingButton", function(uiDayFactory) {
14101414app . directive ( "scheduleCourse" , function ( ) {
14111415 return {
14121416 restrict : "C" ,
1413- templateUrl : './js /templates/courseselect.html' ,
1417+ templateUrl : '/assets/build /templates/courseselect.html' ,
14141418 } ;
14151419} ) ;
14161420app . directive ( "dynamicItems" , function ( $compile , $timeout , globalKbdShortcuts ) {
@@ -1595,7 +1599,7 @@ app.directive('pinned', function() {
15951599
15961600 var $window = $ ( window ) ,
15971601 sizer = elm . parent ( ) . parent ( ) . find ( ".pinned-sizer" ) ,
1598- $footer = $ ( "# footer" ) ,
1602+ $footer = $ ( "footer.main " ) ,
15991603 fO , sO ;
16001604 var updateHeight = function ( ) {
16011605 fO = $window . height ( ) - $footer . offset ( ) . top - $footer . outerHeight ( ) ;
@@ -2030,7 +2034,7 @@ app.directive('schedule', function($timeout, $filter) {
20302034
20312035 return {
20322036 restrict : 'A' ,
2033- templateUrl : '/js/ templates/schedule .html' ,
2037+ templateUrl : '/assets/build/ templates/scheduleitem .html' ,
20342038 link : {
20352039 pre : function ( scope , elm , attrs ) {
20362040 scope . scheduleController = new Schedule ( scope ) ;
@@ -2156,10 +2160,9 @@ app.controller("ScheduleCtrl", function($scope, parsedSchedule) {
21562160} ) ;
21572161
21582162
2159- app . controller ( "ScheduleViewCtrl" , function ( $scope , $location ) {
2163+ app . controller ( "ScheduleViewCtrl" , function ( $scope , $location , $stateParams ) {
21602164
2161- var id = window . location . pathname . split ( '/' ) ;
2162- id = id [ id . length - 1 ] ;
2165+ id = $stateParams . id ;
21632166 $scope . saveInfo = {
21642167 url : $location . absUrl ( ) ,
21652168 id : id
0 commit comments