11// Functions for the thebe activate button and status field
22//
3- //
3+ //
44
55function thebe_place_activate_button ( ) {
66 $ ( '.thebe_status_field' )
@@ -27,7 +27,7 @@ about=' (<a href="http://sage-package.readthedocs.io/en/latest/sage_package/theb
2727server = ''
2828
2929messages = {
30- 'downloading' : 'Downloading Thebe ' ,
30+ 'downloading' : 'Downloading ThebeLab ' ,
3131 'building' : 'Building ' + sagemath ,
3232 'built' : 'Built ' + sagemath ,
3333 'launching' : 'Launching server' ,
@@ -38,14 +38,14 @@ messages = {
3838}
3939
4040function thebe_update_status_field ( evt , data ) {
41- console . log ( "Thebe : status changed (" + data . status + "): " + data . message ) ;
41+ console . log ( "ThebeLab : status changed (" + data . status + "): " + data . message ) ;
4242 $ ( ".thebe-status-field" )
4343 . attr ( "class" , "thebe-status-field thebe-status-" + data . status )
4444 . html ( messages [ data . status ] + server + about ) ;
4545}
4646
4747function thebe_bootstrap_local ( ) {
48- console . log ( "Thebe : using local server" ) ;
48+ console . log ( "ThebeLab : using local server" ) ;
4949 thebelab . on ( "status" , thebe_update_status_field ) ;
5050 thebelab . bootstrap ( {
5151 binderOptions : { repo : null } ,
@@ -59,7 +59,7 @@ function thebe_bootstrap_local () {
5959}
6060
6161function thebe_bootstrap_binder ( ) {
62- console . log ( "Thebe : using remote server on binder" ) ;
62+ console . log ( "ThebeLab : using remote server on binder" ) ;
6363 thebelab . on ( "status" , thebe_update_status_field ) ; // Duplicated with above; would be nicer as thebe option
6464 server = " on " + mybinder ;
6565 thebelab . bootstrap ( ) ;
@@ -68,8 +68,8 @@ function thebe_bootstrap_binder () {
6868// Try downloading thebe remotely; if successfull call next_operation
6969function thebe_download_remote ( next_operation ) {
7070 thebe_update_status_field ( { } , { status : 'downloading' , message : '' } )
71- // Load the Thebe library
72- $ . getScript ( "https://unpkg.com/thebelab@^0.1.0 " )
71+ // Load the ThebeLab library
72+ $ . getScript ( "https://unpkg.com/thebelab@^0.2.1 " )
7373 . done ( function ( script , textStatus ) {
7474 next_operation ( )
7575 } )
@@ -81,8 +81,8 @@ function thebe_download_remote(next_operation) {
8181
8282// Try downloading thebe locally, or remotely if unavailable; if successfull call next_operation
8383function thebe_download_local ( next_operation ) {
84- console . log ( "Thebe : trying to get thebe from the nbextensions" ) ;
85- $ . getScript ( "/nbextensions/thebelab.js" )
84+ console . log ( "ThebeLab : trying to get thebe from the nbextensions" ) ;
85+ $ . getScript ( "/nbextensions/thebelab/index .js" )
8686 . done ( function ( script , textStatus ) {
8787 next_operation ( )
8888 } )
0 commit comments