チェンジセット 2191: ruby

差分発生行の前後
無視リスト:
コミット日時:
2009/01/29 16:11:00 (3 年前)
コミッタ:
gyuque
ログメッセージ:

added loading indicator

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • ruby/jsplash/trunk/client2/jsplash/objects.js

    r1624 r2191  
    1919        decls.push("with(this){\n"); 
    2020         
    21          
     21 
    2222        var func2; 
    2323        eval( "func2=" + (func.toString()+"__END__").replace("{", "{"+decls.join('')).replace(/} *__END__$/m, saves.join('')+"}") ); 
  • ruby/jsplash/trunk/client2/jsplash/player.js

    r1624 r2191  
    152152 
    153153JSplash.launch = function() { 
     154        JSplash.showLoadingText("Loading data... (movie1 and script)"); 
    154155        JSplash.require('./'+JSplash.LOAD_DIR+'/asblock.js'); 
    155156        JSplash.require('./'+JSplash.LOAD_DIR+'/movie1.js'); 
     157} 
     158 
     159JSplash.showLoadingText = function(s) { 
     160        var box = $('loading-text'); 
     161        if (!box) return; 
     162 
     163        if (!s) 
     164        { 
     165                box.style.display = "none"; 
     166                return; 
     167        } 
     168 
     169        box.style.display = ""; 
     170        box.innerHTML = s; 
    156171} 
    157172 
     
    223238                JSplash.swfdata = dat; 
    224239                if (next_file) { 
     240                        JSplash.showLoadingText("Loading data... (movie2)"); 
     241 
    225242                        JSplash.$next(function(){ 
    226243                                JSplash.require('./'+JSplash.LOAD_DIR+'/'+next_file); 
     
    240257        } 
    241258 
     259        JSplash.showLoadingText(null); 
    242260        JSplash.$next( JSplash.initPlayer ); 
    243261}