Index: branches/MwEmbedStandAlone/modules/MiroSubs/loader.js |
— | — | @@ -10,8 +10,7 @@ |
11 | 11 | }); |
12 | 12 | // add as loader dependency 'mw.style.mirosubsMenu' |
13 | 13 | |
14 | | - mw.addResourcePaths( { |
15 | | - "goog" : "mirosubs/base.min.js", |
| 14 | + mw.addResourcePaths( { |
16 | 15 | "mirosubs" : "mirosubs/mirosubs-api.min.js", |
17 | 16 | "mw.MiroSubsConfig" : "mw.MiroSubsConfig.js", |
18 | 17 | "mw.style.mirosubsMenu" : "css/mw.style.mirosubsMenu.css" |
— | — | @@ -42,7 +41,10 @@ |
43 | 42 | |
44 | 43 | // Load miro subs: |
45 | 44 | mw.load( 'MiroSubs', function(){ |
46 | | - mw.MiroSubsConfig.getConfig( embedPlayer , function( config ){ |
| 45 | + mw.MiroSubsConfig.getConfig( embedPlayer , function( config ){ |
| 46 | + if( !config ){ |
| 47 | + return ; |
| 48 | + } |
47 | 49 | // xxx NOTE there are some weird async display issues |
48 | 50 | // that only seem to be resolvable with timeouts for DOM actions |
49 | 51 | setTimeout(function(){ |
Index: branches/MwEmbedStandAlone/modules/MiroSubs/mw.MiroSubsConfig.js |
— | — | @@ -22,14 +22,18 @@ |
23 | 23 | this.embedPlayer = embedPlayer; |
24 | 24 | |
25 | 25 | // Set initial config |
26 | | - this.config = this.getDefaultConfig(); |
| 26 | + this.config = this.getDefaultConfig(); |
27 | 27 | |
28 | 28 | // Make sure we are logged in:: |
29 | 29 | mw.getUserName( function( userName ){ |
30 | 30 | mw.log( "MiroSubsConfig::getUserName: " + userName ); |
31 | 31 | if( !userName ){ |
32 | | - mw.log("Error: MiroSubsConfig user not logged in"); |
33 | | - callback( { 'status':'error', 'error': gM('mwe-mirosubs-not-loggedin') } ); |
| 32 | + mw.addDialog({ |
| 33 | + 'title' : gM('mwe-mirosubs-subs-please-login'), |
| 34 | + 'content' : gM('mwe-mirosubs-subs-please-login-desc') |
| 35 | + }); |
| 36 | + callback( false ); |
| 37 | + return false; |
34 | 38 | } else { |
35 | 39 | _this.config.username = userName; |
36 | 40 | if( _this.isConfigReady( callback ) ){ |
Index: branches/MwEmbedStandAlone/modules/MiroSubs/MiroSubs.i18n.php |
— | — | @@ -9,8 +9,7 @@ |
10 | 10 | $messages = array(); |
11 | 11 | |
12 | 12 | $messages['en'] = array( |
13 | | - 'mwe-mirosubs-add-universal-subtitles' => 'Universal subtitles editor', |
14 | | - 'mwe-mirosubs-not-loggedin' => 'Please login to edit subtitles with universal subtitles', |
| 13 | + 'mwe-mirosubs-add-universal-subtitles' => 'Universal subtitles editor', |
15 | 14 | 'mwe-mirosubs-loading-universal-subtitles' => 'Loading universal subtitles editor', |
16 | 15 | 'mwe-mirosubs-save-summary' => 'Summary of subtitle edits', |
17 | 16 | 'mwe-mirosubs-save-default' => 'Edited subtitles', |
— | — | @@ -19,4 +18,6 @@ |
20 | 19 | 'mwe-mirosubs-subs-saved' => 'Subtitles saved', |
21 | 20 | 'mwe-mirosubs-thankyou-contribution' => 'Thank you for your subtitle contribution', |
22 | 21 | 'mwe-mirosubs-subs-saved-error' => 'Error in saving subtitles', |
| 22 | + 'mwe-mirosubs-subs-please-login' => 'Please login', |
| 23 | + 'mwe-mirosubs-subs-please-login-desc' => 'Please login, to use the universal subtitles editor' |
23 | 24 | ); |
\ No newline at end of file |