'url' : apiUrl,
'data': {
'list' : 'allpages',
- 'apprefix' : 'TimedText:' + _this.pe.wikiTitleKey
+ 'apprefix' : _this.pe.wikiTitleKey,
+ 'apnamespace' : 102
}
- }, function( subData ) {
+ }, function( subData ) {
_this.doProcSubPages( subData, wgServer + wgScriptPath);
});
}
'titles': 'File:' + _this.pe.wikiTitleKey,
'prop' : 'imageinfo'
}
- },function( data ){
- js_log('image is shared checking commons for subtitles');
+ },function( data ){
if( data.query.pages && data.query.pages['-1'] && data.query.pages['-1'].imagerepository == 'shared'){
+ js_log('image is shared checking commons for subtitles');
//found shared repo assume commons:
do_api_req({
'url': 'http://commons.wikimedia.org/w/api.php',
_this.editlink = 'http://commons.wikimedia.org/wiki/TimedText:' + _this.pe.wikiTitleKey +'.'+ wgUserLanguage +'.srt';
_this.doProcSubPages( data, 'http://commons.wikimedia.org/w/' );
});
+ }else{
+ //no shared repo do normal proc
+ _this.getParseTimedText_rowReady();
}
});
},
selHTML+='</ul>' +
'</div>';
$j('#metaBox_'+_this.pe.id).append( selHTML );
- $j('.mvTsSelect').click(function(){
+ $j('.mvTsSelect').click(function(){
_this.applyTsSelect();
});
},
if(_this.availableTracks[track_id].display){
_this.availableTracks[track_id].display=false;
//hide unchecked
+ alert('hide: ' + '#mmbody_'+_this.pe.id +' .tt_'+track_id + ' len: ' + $j('#mmbody_'+_this.pe.id +' .tt_'+track_id ).length );
$j('#mmbody_'+_this.pe.id +' .tt_'+track_id ).fadeOut("fast");
}
}
}
//js2AddOnloadHook: ensure jQuery and the DOM are ready
-function js2AddOnloadHook( func ) {
+function js2AddOnloadHook( func ) {
+ js_log('js2AddOnloadHook::');
// If we have already run the DOM-ready function, just run the function directly:
if( mvJsLoader.doneReadyEvents ) {
// Make sure jQuery is there:
}
//timed text dispaly:
- if(wgPageName.indexOf("TimedText") === 0){
- load_mv_embed( function() {
+ if(wgPageName.indexOf("TimedText") === 0){
+ load_mv_embed(function(){
+ alert('wtf');
loadExternalJs( mwEmbedHostPath + '/mwEmbed/libTimedText/mvTimeTextEdit.js' + reqAguments );
- } );
+ });
}
// Firefogg integration