@@ -57,6 +57,9 @@ var default_1 = (function (_super) {
5757else if ( this . state . hintPos > - 1 ) {
5858ReactDOM . findDOMNode ( this . refs [ 'hint' + this . state . hintPos ] ) . scrollIntoView ( ) ;
5959}
60+ else if ( this . props . page . completed && this . props . page . onPageComplete ) {
61+ ReactDOM . findDOMNode ( this . refs . onPageComplete ) . scrollIntoView ( ) ;
62+ }
6063} ;
6164default_1 . prototype . visibleTasks = function ( ) {
6265return this . props . tasks . slice ( 0 , this . props . taskPosition + 1 ) ;
@@ -95,53 +98,55 @@ var default_1 = (function (_super) {
9598var taskPosition = this . props . taskPosition ;
9699var currentTask = taskPosition <= tasks . length ?tasks [ taskPosition ] :null ;
97100var allComplete = taskPosition >= tasks . length ;
101+ console . log ( page ) ;
98102return ( React . createElement ( material_ui_1 . Paper , { style :style , zDepth :1 , className :'cr-page' } ,
99103React . createElement ( material_ui_1 . Card , null ,
100- React . createElement ( material_ui_1 . CardHeader , { title :page . title , subtitle : page . description } ) ,
104+ React . createElement ( material_ui_1 . CardHeader , { title :page . title } ) ,
101105React . createElement ( material_ui_1 . CardText , null ,
102- React . createElement ( _components_1 . MarkdownText , { text :page . explanation } )
106+ React . createElement ( _components_1 . MarkdownText , { text :page . description } )
103107) ) ,
104108React . createElement ( material_ui_1 . Divider , null ) ,
105- React . createElement ( material_ui_1 . List , { subheader :'Tasks' , className :'cr-tasks' , ref :'tasks' } , tasks . map ( function ( task , index ) {
106- var isCurrentTask = index === taskPosition ;
107- var isDisabledTask = index > taskPosition ;
108- var isCompletedTask = index < taskPosition ;
109- var isFinalTask = index >= tasks . length - 1 ;
110- var hints = _this . hintsShown ( task ) ;
111- return ( React . createElement ( "div" , null ,
112- React . createElement ( material_ui_1 . ListItem , { ref :'task' + index , className :classnames ( {
113- 'cr-task' :true ,
114- 'isCompletedTask' :isCompletedTask ,
115- 'isCurrentTask' :isCurrentTask ,
116- 'isDisabledTask' :isDisabledTask
117- } ) } ,
118- React . createElement ( "span" , { className :'cr-task-checkbox' } , _this . getIcon ( index , taskPosition ) ) ,
119- React . createElement ( "span" , { className :'cr-task-index' } ,
120- index + 1 ,
121- "." ) ,
122- React . createElement ( "div" , { className :'cr-task-description' } ,
123- React . createElement ( _components_1 . MarkdownText , { text :task . description } )
124- ) ) ,
125- isCurrentTask && hints ?
126- hints . map ( function ( hint , indexHint ) {
127- return React . createElement ( material_ui_1 . ListItem , { className :'cr-task-hint' , ref :'hint' + indexHint } ,
128- React . createElement ( "div" , { class :'cr-task-hint-box' } ,
129- React . createElement ( "span" , { className :'cr-task-hint-index' } ,
130- indexHint + 1 ,
131- "." ) ,
132- React . createElement ( "div" , { className :'cr-task-hint-description' } ,
133- React . createElement ( _components_1 . MarkdownText , { text :hint } )
134- ) )
135- ) ;
136- } )
137- :null ,
138- isFinalTask ?null :React . createElement ( material_ui_1 . Divider , null ) ,
139- page . completed && page . onComplete ?React . createElement ( material_ui_1 . ListItem , { className :'cr-task-onComplete' , ref :'onComplete' } ,
140- React . createElement ( "div" , { className :'cr-task-onComplete-description' } ,
141- React . createElement ( _components_1 . MarkdownText , { text :page . onComplete } )
142- )
143- ) :null ) ) ;
144- } ) ) ,
109+ React . createElement ( material_ui_1 . List , { subheader :'Tasks' , className :'cr-tasks' , ref :'tasks' } ,
110+ tasks . map ( function ( task , index ) {
111+ var isCurrentTask = index === taskPosition ;
112+ var isDisabledTask = index > taskPosition ;
113+ var isCompletedTask = index < taskPosition ;
114+ var isFinalTask = index >= tasks . length - 1 ;
115+ var hints = _this . hintsShown ( task ) ;
116+ return ( React . createElement ( "div" , null ,
117+ React . createElement ( material_ui_1 . ListItem , { ref :'task' + index , className :classnames ( {
118+ 'cr-task' :true ,
119+ 'isCompletedTask' :isCompletedTask ,
120+ 'isCurrentTask' :isCurrentTask ,
121+ 'isDisabledTask' :isDisabledTask
122+ } ) } ,
123+ React . createElement ( "span" , { className :'cr-task-checkbox' } , _this . getIcon ( index , taskPosition ) ) ,
124+ React . createElement ( "span" , { className :'cr-task-index' } ,
125+ index + 1 ,
126+ "." ) ,
127+ React . createElement ( "div" , { className :'cr-task-description' } ,
128+ React . createElement ( _components_1 . MarkdownText , { text :task . description } )
129+ ) ) ,
130+ isCurrentTask && hints ?
131+ hints . map ( function ( hint , indexHint ) {
132+ return React . createElement ( material_ui_1 . ListItem , { className :'cr-task-hint' , ref :'hint' + indexHint } ,
133+ React . createElement ( "div" , { class :'cr-task-hint-box' } ,
134+ React . createElement ( "span" , { className :'cr-task-hint-index' } ,
135+ indexHint + 1 ,
136+ "." ) ,
137+ React . createElement ( "div" , { className :'cr-task-hint-description' } ,
138+ React . createElement ( _components_1 . MarkdownText , { text :hint } )
139+ ) )
140+ ) ;
141+ } )
142+ :null ,
143+ isFinalTask ?null :React . createElement ( material_ui_1 . Divider , null ) ) ) ;
144+ } ) ,
145+ page . completed && ! ! page . onPageComplete ?React . createElement ( material_ui_1 . ListItem , { className :'cr-task-onComplete' , ref :'onPageComplete' } ,
146+ React . createElement ( "div" , { className :'cr-task-onComplete-description' } ,
147+ React . createElement ( _components_1 . MarkdownText , { text :page . onPageComplete } )
148+ )
149+ ) :null ) ,
145150React . createElement ( "section" , { className :'cr-page-toolbar' } ,
146151React . createElement ( material_ui_1 . LinearProgress , { mode :'determinate' , value :taskProgress ( taskPosition , tasks . length ) , style :{ height :'6px' } } ) ,
147152React . createElement ( material_ui_1 . Toolbar , null ,