Changeset 7394

Show
Ignore:
Timestamp:
02/21/07 14:54:01 (18 months ago)
Author:
jburke
Message:

References #2366. Converting more tests to use dojo.addOnLoad()

Location:
branches/0.4/tests
Files:
13 modified

Legend:

Unmodified
Added
Removed
  • branches/0.4/tests/undo/test_browser.html

    r5259 r7394  
    66                        //debugAtAllCosts: true, //Don't normally need this in applications. 
    77                        isDebug: true, 
     8                        dojoIframeHistoryUrl: "../../iframe_history.html", //for xdomain 
    89                        preventBackButtonFix: false 
    910                }; 
  • branches/0.4/tests/undo/test_browser_bookmark.html

    r5259 r7394  
    66                        //debugAtAllCosts: true, //Don't normally need this in applications. 
    77                        isDebug: true, 
     8                        dojoIframeHistoryUrl: "../../iframe_history.html", //for xdomain 
    89                        preventBackButtonFix: false 
    910                }; 
  • branches/0.4/tests/undo/test_Manager.html

    r2966 r7394  
    99                </script> 
    1010                <script type="text/javascript" src="../../dojo.js"></script> 
    11                 <script type="text/javascript" src="../../src/undo/Manager.js"></script> 
    1211                <script type="text/javascript"> 
     12                        dojo.require("dojo.undo.Manager"); 
    1313                        function foo(n) { 
    1414                                return function() { 
  • branches/0.4/tests/widget/Chart/test_fromScript.html

    r5628 r7394  
    99                        dojo.require("dojo.widget.Chart"); 
    1010 
    11                         var seriesA = new dojo.widget.Chart.DataSeries("SeriesA", "First series", "area"); 
    12                         seriesA.values=[ 
    13                                 {x:0,value:-92.45}, 
    14                                 {x:4,value:94.23}, 
    15                                 {x:8,value:-93.12}, 
    16                                 {x:12,value:89.16}, 
    17                                 {x:16,value:-82.47}, 
    18                                 {x:20,value:73.25}, 
    19                                 {x:24,value:-61.79}, 
    20                                 {x:28,value:48.44}, 
    21                                 {x:32,value:-33.6}, 
    22                                 {x:36,value:17.74}, 
    23                                 {x:40,value:-1.33}, 
    24                                 {x:44,value:-15.11}, 
    25                                 {x:48,value:31.1}, 
    26                                 {x:52,value:-46.13}, 
    27                                 {x:56,value:59.75}, 
    28                                 {x:60,value:-71.54}, 
    29                                 {x:64,value:81.14}, 
    30                                 {x:68,value:-88.26}, 
    31                                 {x:72,value:92.67}, 
    32                                 {x:76,value:-94.24}, 
    33                                 {x:80,value:92.93}, 
    34                                 {x:84,value:-88.77}, 
    35                                 {x:88,value:81.89}, 
    36                                 {x:92,value:-72.51}, 
    37                                 {x:96,value:60.9}, 
    38                                 {x:100,value:-47.43} 
    39                         ]; 
    40                         var seriesB = new dojo.widget.Chart.DataSeries("SeriesB", "Second series", "area"); 
    41                         seriesB.values=[ 
    42                                 {x:0,value:63.06}, 
    43                                 {x:4,value:-100}, 
    44                                 {x:8,value:-33.54}, 
    45                                 {x:12,value:29.71}, 
    46                                 {x:16,value:100}, 
    47                                 {x:20,value:-69.5}, 
    48                                 {x:24,value:6.07}, 
    49                                 {x:28,value:100}, 
    50                                 {x:32,value:-100}, 
    51                                 {x:36,value:-15.99}, 
    52                                 {x:40,value:51.1}, 
    53                                 {x:44,value:-100}, 
    54                                 {x:48,value:-42.5}, 
    55                                 {x:52,value:22.04}, 
    56                                 {x:56,value:100}, 
    57                                 {x:60,value:-86.06}, 
    58                                 {x:64,value:-0.51}, 
    59                                 {x:68,value:83.18}, 
    60                                 {x:72,value:-100}, 
    61                                 {x:76,value:-23.19}, 
    62                                 {x:80,value:41.02}, 
    63                                 {x:84,value:100}, 
    64                                 {x:88,value:-52.83}, 
    65                                 {x:92,value:14.91}, 
    66                                 {x:96,value:100}, 
    67                                 {x:100,value:-100} 
    68                         ]; 
    6911                        dojo.addOnLoad(function(e){ 
     12                                var seriesA = new dojo.widget.Chart.DataSeries("SeriesA", "First series", "area"); 
     13                                seriesA.values=[ 
     14                                        {x:0,value:-92.45}, 
     15                                        {x:4,value:94.23}, 
     16                                        {x:8,value:-93.12}, 
     17                                        {x:12,value:89.16}, 
     18                                        {x:16,value:-82.47}, 
     19                                        {x:20,value:73.25}, 
     20                                        {x:24,value:-61.79}, 
     21                                        {x:28,value:48.44}, 
     22                                        {x:32,value:-33.6}, 
     23                                        {x:36,value:17.74}, 
     24                                        {x:40,value:-1.33}, 
     25                                        {x:44,value:-15.11}, 
     26                                        {x:48,value:31.1}, 
     27                                        {x:52,value:-46.13}, 
     28                                        {x:56,value:59.75}, 
     29                                        {x:60,value:-71.54}, 
     30                                        {x:64,value:81.14}, 
     31                                        {x:68,value:-88.26}, 
     32                                        {x:72,value:92.67}, 
     33                                        {x:76,value:-94.24}, 
     34                                        {x:80,value:92.93}, 
     35                                        {x:84,value:-88.77}, 
     36                                        {x:88,value:81.89}, 
     37                                        {x:92,value:-72.51}, 
     38                                        {x:96,value:60.9}, 
     39                                        {x:100,value:-47.43} 
     40                                ]; 
     41                                var seriesB = new dojo.widget.Chart.DataSeries("SeriesB", "Second series", "area"); 
     42                                seriesB.values=[ 
     43                                        {x:0,value:63.06}, 
     44                                        {x:4,value:-100}, 
     45                                        {x:8,value:-33.54}, 
     46                                        {x:12,value:29.71}, 
     47                                        {x:16,value:100}, 
     48                                        {x:20,value:-69.5}, 
     49                                        {x:24,value:6.07}, 
     50                                        {x:28,value:100}, 
     51                                        {x:32,value:-100}, 
     52                                        {x:36,value:-15.99}, 
     53                                        {x:40,value:51.1}, 
     54                                        {x:44,value:-100}, 
     55                                        {x:48,value:-42.5}, 
     56                                        {x:52,value:22.04}, 
     57                                        {x:56,value:100}, 
     58                                        {x:60,value:-86.06}, 
     59                                        {x:64,value:-0.51}, 
     60                                        {x:68,value:83.18}, 
     61                                        {x:72,value:-100}, 
     62                                        {x:76,value:-23.19}, 
     63                                        {x:80,value:41.02}, 
     64                                        {x:84,value:100}, 
     65                                        {x:88,value:-52.83}, 
     66                                        {x:92,value:14.91}, 
     67                                        {x:96,value:100}, 
     68                                        {x:100,value:-100} 
     69                                ]; 
     70 
    7071                                var test = dojo.widget.createWidget("dojo:Chart", {}, dojo.byId("test")); 
    7172                                test.series.push(seriesA); 
  • branches/0.4/tests/widget/Editor/test_Editor2.html

    r7047 r7394  
    55        <title>Dojo Editor2 Test</title> 
    66        <script type="text/javascript"> 
    7                 var djConfig = { isDebug: true }; 
     7                var djConfig = { 
     8                        isDebug: true, 
     9                        dojoRichTextFrameUrl: "../../../src/widget/templates/richtextframe.html" //for xdomain 
     10                }; 
    811        </script> 
    912 
     
    6063</button> 
    6164<script> 
    62         dojo.event.connect(dojo.byId("onDemandButton"), "onclick", function(){ 
    63                 dojo.widget.createWidget("Editor2",  
    64                         {       shareToolbar: false,  
    65                                 toolbarAlwaysVisible: true, 
    66                                 focusOnLoad: false  
    67                         }, dojo.byId("onDemandEditor")); 
     65        dojo.addOnLoad(function(){ 
     66                dojo.event.connect(dojo.byId("onDemandButton"), "onclick", function(){ 
     67                        dojo.widget.createWidget("Editor2",  
     68                                {       shareToolbar: false,  
     69                                        toolbarAlwaysVisible: true, 
     70                                        focusOnLoad: false  
     71                                }, dojo.byId("onDemandEditor")); 
     72                }); 
    6873        }); 
    6974</script> 
  • branches/0.4/tests/widget/Editor/test_Editor2Code.html

    r6484 r7394  
    55        <title>Dojo Editor2 Test</title> 
    66        <script type="text/javascript"> 
    7                 var djConfig = { isDebug: true }; 
     7                var djConfig = { 
     8                        isDebug: true, 
     9                        dojoRichTextFrameUrl: "../../../src/widget/templates/richtextframe.html" //for xdomain 
     10                }; 
    811        </script> 
    912 
    1013        <script type="text/javascript" src="../../../dojo.js"></script> 
    11         <script type="text/javascript" src="../../../src/widget/RichText.js"></script> 
    12         <script type="text/javascript" src="../../../src/widget/Editor2.js"></script> 
    1314        <script type="text/javascript"> 
    1415        dojo.require("dojo.widget.Editor2Plugin.SimpleSignalCommands"); 
  • branches/0.4/tests/widget/Editor/test_Editor2InsideDialog.html

    r5718 r7394  
    66<head> 
    77<title>Editor2 Inside Dialog Dojo Test</title> 
    8 <script type="text/javascript"> djConfig = { isDebug: true }; </script> 
     8<script type="text/javascript"> 
     9        djConfig = { 
     10                isDebug: true, 
     11                dojoRichTextFrameUrl: "../../../src/widget/templates/richtextframe.html" //for xdomain 
     12        }; 
     13</script> 
    914<script type="text/javascript" src="../../../dojo.js"></script> 
    1015<script type="text/javascript"> 
  • branches/0.4/tests/widget/Editor/test_Editor2InsideFloatingPane.html

    r5718 r7394  
    55        <title>Dojo Editor2 Test</title> 
    66        <script type="text/javascript"> 
    7                 var djConfig = { isDebug: true }; 
     7                var djConfig = { 
     8                        isDebug: true, 
     9                        dojoRichTextFrameUrl: "../../../src/widget/templates/richtextframe.html" //for xdomain 
     10                }; 
    811        </script> 
    912 
  • branches/0.4/tests/widget/Editor/test_Editor2_replace.html

    r6484 r7394  
    55        <title>Dojo Editor2 Test</title> 
    66        <script type="text/javascript"> 
    7                 var djConfig = { isDebug: true }; 
     7                djConfig = { 
     8                        isDebug: true, 
     9                        dojoRichTextFrameUrl: "../../../src/widget/templates/richtextframe.html" //for xdomain 
     10                }; 
    811        </script> 
    912 
  • branches/0.4/tests/widget/Editor/test_Editor2_shared.html

    r6401 r7394  
    55        <title>Dojo Editor2 shared Toolbar and ContextMenu Test</title> 
    66        <script type="text/javascript"> 
    7                 var djConfig = { isDebug: true }; 
     7                djConfig = { 
     8                        isDebug: true, 
     9                        dojoRichTextFrameUrl: "../../../src/widget/templates/richtextframe.html" //for xdomain 
     10                }; 
    811        </script> 
    912 
     
    1316                dojo.require("dojo.widget.Editor2Plugin.ContextMenu"); 
    1417                dojo.require("dojo.widget.Editor2Plugin.SimpleSignalCommands"); 
    15                 dojo.widget.Editor2Plugin.ContextMenuManager.registerGroupSet('menugroup1',['Generic']) 
     18                dojo.addOnLoad(function(){ 
     19                        dojo.widget.Editor2Plugin.ContextMenuManager.registerGroupSet('menugroup1',['Generic']); 
     20                }); 
    1621        </script> 
    1722</head> 
  • branches/0.4/tests/widget/Editor/test_RichText.html

    r5720 r7394  
    66                //debugAtAllCosts: true, 
    77                isDebug: true, 
    8                 ieClobberMinimal: true 
     8                ieClobberMinimal: true, 
     9                dojoRichTextFrameUrl: "../../../src/widget/templates/richtextframe.html" //for xdomain 
    910        }; 
    1011</script> 
     
    4748<input type="button" value="paste in gunk" id="pastebutton"> 
    4849<script type="text/javascript"> 
    49 var editable = dojo.byId("editable"); 
    50 var savebutton = dojo.byId("savebutton"); 
    51 var editableRT; 
    52 dojo.event.connect(dojo.hostenv, "loaded", function (e) { 
     50dojo.addOnLoad(function(){ 
     51        editable = dojo.byId("editable"); 
     52        savebutton = dojo.byId("savebutton"); 
    5353        editableRT = dojo.widget.manager.getWidgetById("editdiv"); 
    54 }); 
    55 dojo.event.connect(savebutton, "onclick", function (e) { 
    56         if (editableRT) { 
    57                 editableRT.close(true); 
    58                 savebutton.value = "edit"; 
    59                 editableRT = null; 
    60         } else { 
    61                 editableRT = dojo.widget.createWidget("RichText", {}, editable); 
    62                 savebutton.value = "save"; 
    63         } 
    64 }); 
    6554 
    66 var pasteButton = dojo.byId("pastebutton"); 
    67 dojo.event.connect(pasteButton, "onclick", function(){ 
    68         editableRT.execCommand("inserthtml", "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque iaculis, nulla id semper faucibus, pede tellus nonummy magna, vitae adipiscing orci arcu ut augue. Nunc condimentum, magna a vestibulum convallis, libero purus pulvinar orci, sed vestibulum urna sem ut pede.</p>"); 
     55        dojo.event.connect(savebutton, "onclick", function (e) { 
     56                if (editableRT) { 
     57                        editableRT.close(true); 
     58                        savebutton.value = "edit"; 
     59                        editableRT = null; 
     60                } else { 
     61                        editableRT = dojo.widget.createWidget("RichText", {}, editable); 
     62                        savebutton.value = "save"; 
     63                } 
     64        }); 
     65         
     66        pasteButton = dojo.byId("pastebutton"); 
     67        dojo.event.connect(pasteButton, "onclick", function(){ 
     68                editableRT.execCommand("inserthtml", "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque iaculis, nulla id semper faucibus, pede tellus nonummy magna, vitae adipiscing orci arcu ut augue. Nunc condimentum, magna a vestibulum convallis, libero purus pulvinar orci, sed vestibulum urna sem ut pede.</p>"); 
     69        }); 
    6970}); 
    7071</script> 
     
    7374 
    7475<script type="text/javascript"> 
    75  
    76 dojo.event.connect(dojo, "loaded", function (e) { 
    77         function makeEditable (e) { 
    78                 // create an editor from the table cell and keep it's width 
    79                 var editor = dojo.widget.createWidget("RichText", 
    80                         {inheritWidth: true}, e.currentTarget); 
    81                 editor.placeCursorAtEnd(); 
    82  
    83                 // save and exit on a blur 
    84                 dojo.event.connect(editor, "onBlur", function (e) { 
    85                         editor.close(); 
    86                 }); 
    87         } 
    88  
    89         var table = dojo.byId("editabletable"); 
    90         var tds = table.getElementsByTagName("td"); 
    91         for (var i = 0; i < tds.length; i++) { 
    92                 dojo.event.connect(tds[i], "onclick", makeEditable); 
    93         } 
     76dojo.addOnLoad(function(){ 
     77        dojo.event.connect(dojo, "loaded", function (e) { 
     78                function makeEditable (e) { 
     79                        // create an editor from the table cell and keep it's width 
     80                        var editor = dojo.widget.createWidget("RichText", 
     81                                {inheritWidth: true}, e.currentTarget); 
     82                        editor.placeCursorAtEnd(); 
     83         
     84                        // save and exit on a blur 
     85                        dojo.event.connect(editor, "onBlur", function (e) { 
     86                                editor.close(); 
     87                        }); 
     88                } 
     89         
     90                table = dojo.byId("editabletable"); 
     91                tds = table.getElementsByTagName("td"); 
     92                for (var i = 0; i < tds.length; i++) { 
     93                        dojo.event.connect(tds[i], "onclick", makeEditable); 
     94                } 
     95        }); 
    9496}); 
    95  
    9697</script> 
    9798 
  • branches/0.4/tests/widget/Editor/test_RichTextStyleSheets.html

    r7087 r7394  
    55        <title>Dojo Editor2 Stylesheet test</title> 
    66        <script type="text/javascript"> 
    7                 var djConfig = { isDebug: true }; 
     7                var djConfig = { 
     8                        isDebug: true, 
     9                        dojoRichTextFrameUrl: "../../../src/widget/templates/richtextframe.html" //for xdomain 
     10                }; 
    811        </script> 
    912 
  • branches/0.4/tests/xml/test_XslTransform.html

    r5678 r7394  
    1313                        dojo.require("dojo.io.*"); 
    1414                        dojo.require("dojo.widget.*"); 
     15                        dojo.require("dojo.widget.ContentPane"); 
     16                        dojo.require("dojo.widget.Tree"); 
     17                        dojo.require("dojo.widget.TreeRPCController"); 
    1518                        dojo.require("dojo.xml.XslTransform"); 
    1619