Changeset 12311

Show
Ignore:
Timestamp:
02/07/08 10:55:15 (6 months ago)
Author:
alex
Message:

adding support for Adobe AIR. Thanks to SitePen? and Adobe for these excellent patches. Tests in next commit. Refs #5723 !strict

Files:
3 added
18 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/bench/benchTool.html

    r10052 r12311  
    5252                        if(isRunning){ return; } 
    5353                        _toggleRunMsg(); 
    54                         setTimeout("_runRealTest()",1000); 
     54                        setTimeout(function(){_runRealTest();},1000); 
    5555                } 
    5656 
     
    100100 
    101101                        dojo.byId("results").innerHTML += msg; 
    102                         setTimeout("_toggleRunMsg()",250);  
     102                        setTimeout(function(){_toggleRunMsg();},250);  
    103103                         
    104104                        // Nodes have to be in the document for IE7 to GC them. 
  • dijit/trunk/demos/mail.html

    r12157 r12311  
    9696                        dojo.fadeIn({ node: 'fetchMail', duration:300 }).play(); 
    9797                        for (var i=0; i<=numMails; i++){ 
    98                                 setTimeout("updateFetchStatus("+i+")",((i+1)*(Math.floor(Math.random()*100)+400))); 
     98                                setTimeout(function(){updateFetchStatus(i);},((i+1)*(Math.floor(Math.random()*100)+400))); 
    9999                        } 
    100100                } 
     
    110110                        dijit.byId('fakeSend').update({ indeterminate: true }); 
    111111                        dijit.byId('sendDialog').show(); 
    112                         setTimeout("stopSendBar()", 3000); 
     112                        setTimeout(function(){stopSendBar();}, 3000); 
    113113                } 
    114114 
  • dijit/trunk/tests/layout/test_ContentPane.html

    r10969 r12311  
    8282                        <p style='background-color:yellow;border:1px solid red;text-align:center;'>This text should automatically be replaced by downloaded content from combotab.html</p> 
    8383                </div> 
    84                 <input type="button" value="Change pane in 3 seconds" onClick='setTimeout("dijit.byId(\"test\").setHref(\"tab2.html\")", 3000);'> 
     84                <input type="button" value="Change pane in 3 seconds" onClick='setTimeout(function(){dijit.byId(\"test\").setHref(\"tab2.html\");}, 3000);'> 
    8585                <script type="text/javascript"> 
    8686                        dojo.addOnLoad(function(){ 
  • dijit/trunk/tests/test_Dialog.html

    r12163 r12311  
    4646                                },pane); 
    4747                        } 
    48                         setTimeout("thirdDlg.show()","3000"); 
     48                        setTimeout(function(){thirdDlg.show();},"3000"); 
    4949                } 
    5050        </script> 
  • dijit/trunk/themes/themeTester.html

    r12174 r12311  
    138138 
    139139                        dojo.byId('loaderInner').innerHTML += " done."; 
    140                         setTimeout("hideLoader()",250); 
     140                        setTimeout(function(){hideLoader();},250); 
    141141                         
    142142                }); 
     
    262262                                        <h2>Dialogs:</h2> 
    263263                                        <ul> 
    264                                                 <li><a href="javascript:dijit.byId('dialog1').show()">show Modal Dialog</a></li> 
     264                                                <li><a href="#" onclick="dijit.byId('dialog1').show()">show Modal Dialog</a></li> 
    265265                                        </ul> 
    266266 
  • dijit/trunk/_editor/RichText.js

    r12295 r12311  
    493493                var contentDoc = this.iframe.contentDocument; 
    494494                contentDoc.open(); 
    495                 contentDoc.write(this._getIframeDocTxt(html)); 
     495                if(dojo.isAIR){ 
     496                        contentDoc.body.innerHTML = html; 
     497                }else{ 
     498                        contentDoc.write(this._getIframeDocTxt(html)); 
     499                } 
    496500                contentDoc.close(); 
    497501 
  • dojo/trunk/tests/io/scriptJsonp.js

    r8568 r12311  
    5555//Set a timeout to do the callback check, since MSIE won't see the SCRIPT tag until 
    5656//we complete processing of this page. 
    57 setTimeout('doJsonpCallback()', 300); 
     57setTimeout(function(){doJsonpCallback();}, 300); 
  • dojo/trunk/_base/query.js

    r11898 r12311  
    10151015        ); 
    10161016        // uncomment to disable XPath for testing and tuning the DOM path 
    1017         // _getQueryFunc = getStepQueryFunc; 
     1017        _getQueryFunc = getStepQueryFunc; 
    10181018 
    10191019        // FIXME: we've got problems w/ the NodeList query()/filter() functions if we go XPath for everything 
  • dojo/trunk/_base/_loader/hostenv_browser.js

    r12272 r12311  
    9393                        d.isSafari = parseFloat(dav.split("Version/")[1]) || 2; 
    9494                } 
     95                d.isAIR = (dua.indexOf("AdobeAIR") >= 0) ? 1 : 0; 
    9596                d.isKhtml = (dav.indexOf("Konqueror") >= 0 || d.isSafari) ? tv : 0; 
    9697                d.isMozilla = d.isMoz = (dua.indexOf("Gecko") >= 0 && !d.isKhtml) ? tv : 0; 
     
    250251        } 
    251252 
    252         if(/(WebKit|khtml)/i.test(navigator.userAgent)){ // sniff 
     253        if(dojo.isAIR){ 
     254                window.addEventListener("load", dojo._loadInit, null); 
     255        }else if(/(WebKit|khtml)/i.test(navigator.userAgent)){ // sniff 
    253256                dojo._khtmlTimer = setInterval(function(){ 
    254257                        if(/loaded|complete/.test(document.readyState)){ 
  • dojo/trunk/_base/_loader/loader.js

    r12289 r12311  
    227227                //are being loaded (trac #2572)? Consider for 0.9. 
    228228                if(typeof setTimeout == "object" || (dojo.config.useXDomain && d.isOpera)){ 
    229                         setTimeout(dojo._scopeName + ".loaded();", 0); 
     229                        if(dojo.isAIR){ 
     230                                setTimeout(function(){dojo.loaded();}, 0); 
     231                        }else{ 
     232                                setTimeout(dojo._scopeName + ".loaded();", 0); 
     233                        } 
    230234                }else{ 
    231235                        d.loaded(); 
  • dojo/trunk/_base/_loader/loader_debug.js

    r12235 r12311  
    1313                //dojo.provide call in a module is the first line. Don't want to risk attaching 
    1414                //another script tag until the current one finishes executing. 
    15                 window.setTimeout(dojo._scopeName + "._xdDebugFileLoaded('" + resourceName + "')", 1); 
     15                if(dojo.isAIR){ 
     16                        window.setTimeout(function(){dojo._xdDebugFileLoaded(resourceName);}, 1); 
     17                }else{ 
     18                        window.setTimeout(dojo._scopeName + "._xdDebugFileLoaded('" + resourceName + "')", 1); 
     19                } 
    1620        } 
    1721 
  • dojo/trunk/_base/_loader/loader_xd.js

    r12122 r12311  
    161161                //Start timer 
    162162                if(!this._xdTimer){ 
    163                         this._xdTimer = setInterval(dojo._scopeName + "._xdWatchInFlight();", 100); 
     163                        if(dojo.isAIR){ 
     164                                this._xdTimer = setInterval(function(){dojo._xdWatchInFlight();}, 100); 
     165                        }else{ 
     166                                this._xdTimer = setInterval(dojo._scopeName + "._xdWatchInFlight();", 100); 
     167                        } 
    164168                } 
    165169                this._xdStartTime = (new Date()).getTime(); 
     
    176180                if(lastIndex != uri.length - 1){ 
    177181                        xdUri += uri.substring(lastIndex, uri.length); 
     182                } 
     183 
     184                if (dojo.isAIR){ 
     185                        xdUri = xdUri.replace("app:/", "/"); 
    178186                } 
    179187 
  • dojox/trunk/charting/tests/test_chart2d_updating.html

    r11287 r12311  
    5050        chart.addPlot("grid", {type: "Grid", hMinorLines: true}); 
    5151        chart.render(); 
    52     setInterval("updateTest()", 200); 
     52    setInterval(function(){updateTest();}, 200); 
    5353}; 
    5454 
  • dojox/trunk/grid/VirtualGrid.js

    r11983 r12311  
    211211         
    212212        createView: function(inClass){ 
    213                 var c = eval(inClass); 
     213                if(dojo.isAIR){ 
     214                        var obj = window; 
     215                        var names = inClass.split('.'); 
     216                        for(var i=0;i<names.length;i++){ 
     217                                if(typeof obj[names[i]]=='undefined'){ 
     218                                        var undefstring = names[0]; 
     219                                        for(var j=1;j<=i;j++){ 
     220                                                undefstring+="."+names[j]; 
     221                                        } 
     222                                        throw new Error(undefstring+" is undefined"); 
     223                                } 
     224                                obj = obj[names[i]]; 
     225                        } 
     226                        var c = obj; 
     227                }else{ 
     228                        var c = eval(inClass); 
     229                } 
    214230                var view = new c({ grid: this }); 
    215231                this.viewsNode.appendChild(view.domNode); 
  • dojox/trunk/image/SlideShow.js

    r11925 r12311  
    464464        _startTimer: function(){ 
    465465                // summary: Starts a timeout to show the next image when a slide show is active 
    466                 this._slideId = setTimeout("dijit.byId('"+this.id +"').showNextImage(true);", this.slideshowInterval * 1000); 
     466                var id = this.id; 
     467                this._slideId = setTimeout(function(){dijit.byId(id).showNextImage(true);}, this.slideshowInterval * 1000); 
    467468        }, 
    468469         
  • dojox/trunk/layout/tests/test_SizingPane.html

    r9728 r12311  
    6767                function hideCheck(node) { 
    6868                        if (_showing) {  
    69                         setTimeout("hide('box1')",125);  
     69                        setTimeout(function(){hide('box1');},125);  
    7070                        } 
    7171                } 
  • dojox/trunk/off/ui.js

    r12124 r12311  
    602602                        // so that the user can orient themselves 
    603603                        if(dojox.off.sync.autoSync){ 
    604                                 window.setTimeout(dojox._scopeName + ".off.sync.synchronize()", 1000); 
     604                                if(dojo.isAIR){ 
     605                                        window.setTimeout(function(){dojox.off.sync.synchronize();}, 1000); 
     606                                }else{ 
     607                                        window.setTimeout(dojox._scopeName + ".off.sync.synchronize()", 1000); 
     608                                } 
    605609                        } 
    606610                } 
  • dojox/trunk/presentation/tests/test_presentation.html

    r10052 r12311  
    7070                                }) 
    7171                        ]); 
    72                         setTimeout("externalAnimation.play()",50);  
     72                        setTimeout(function(){externalAnimation.play();},50);  
    7373                } 
    7474