Changeset 6973

Show
Ignore:
Timestamp:
01/02/07 21:44:06 (23 months ago)
Author:
jburke
Message:

Fixes #2197: using dojo.uri.moduleUri instead of dojo.uri.dojoUri to enable xdomain image loading, and to fit better with the module URI concept.

Location:
trunk
Files:
72 modified

Legend:

Unmodified
Added
Removed
  • trunk/buildscripts/internStrings.js

    r6929 r6973  
    6363 
    6464        var prefixes = buildUtil.getDependencyPropertyFromProfile(profileFile, "prefixes"); 
     65        //Make sure dojo is in the list. 
     66        var dojoPath = releaseDir.replace(/^.*(\/|\\)release(\/|\\)/, "release/"); 
     67        prefixes.push(["dojo", dojoPath + "/src"]); 
     68 
    6569        var skiplist = buildUtil.getDependencyPropertyFromProfile(profileFile, "internSkipList"); 
    6670         
  • trunk/src/a11y.js

    r6810 r6973  
    99        // accessible: Boolean uninitialized when null (accessible check has not been performed) 
    1010        //   if true generate accessible widgets 
    11         imgPath:dojo.uri.dojoUri("src/widget/templates/images"), 
     11        imgPath:dojo.uri.moduleUri("dojo", "widget/templates/images"), 
    1212        doAccessibleCheck: true, 
    1313        accessible: null,                
  • trunk/src/debug.js

    r6392 r6973  
    7373        dojo.debugDeep.debugVars.push(obj); 
    7474        // dojo.undo.browser back and forward breaks relpaths 
    75         var url = new dojo.uri.Uri(location, dojo.uri.dojoUri("src/debug/deep.html?var="+idx)).toString(); 
     75        var url = new dojo.uri.Uri(location, dojo.uri.moduleUri("dojo", "debug/deep.html?var="+idx)).toString(); 
    7676        var win = window.open(url, '_blank', 'width=600, height=400, resizable=yes, scrollbars=yes, status=yes'); 
    7777        try{ 
  • trunk/src/io/IframeIO.js

    r6747 r6973  
    1919        var r = dojo.render.html; 
    2020        var cframe = null; 
    21         var turi = uri||dojo.uri.dojoUri("iframe_history.html?noInit=true"); 
     21        var turi = uri||dojo.uri.moduleUri("dojo", "../iframe_history.html?noInit=true"); 
    2222        var ifrstr = ((r.ie)&&(dojo.render.os.win)) ? '<iframe name="'+fname+'" src="'+turi+'" onload="'+onloadstr+'">' : 'iframe'; 
    2323        cframe = document.createElement(ifrstr); 
  • trunk/src/io/XhrIframeProxy.js

    r6812 r6973  
    1616        //Usage of XHR IFrame Proxying does not work from local disk in Safari. 
    1717 
    18         xipClientUrl: djConfig["xipClientUrl"] || dojo.uri.dojoUri("src/io/xip_client.html"), 
     18        xipClientUrl: djConfig["xipClientUrl"] || dojo.uri.moduleUri("dojo", "io/xip_client.html"), 
    1919 
    2020        _state: {}, 
  • trunk/src/lfx/shadow.js

    r6119 r6973  
    77        //      summary 
    88        //      creates a shadow underneath node. 
    9         this.shadowPng = dojo.uri.dojoUri("src/html/images/shadow"); 
     9        this.shadowPng = dojo.uri.moduleUri("dojo", "html/images/shadow"); 
    1010        this.shadowThickness = 8; 
    1111        this.shadowOffset = 15; 
  • trunk/src/rpc/YahooService.js

    r6290 r6973  
    1414                                        "deployment of your application"); 
    1515        } 
    16         this.connect(dojo.uri.dojoUri("src/rpc/yahoo.smd")); 
     16        this.connect(dojo.uri.moduleUri("dojo", "rpc/yahoo.smd")); 
    1717        this.strictArgChecks = false; 
    1818} 
  • trunk/src/storage/browser.js

    r6832 r6973  
    643643         
    644644        _writeApplet: function(){ 
    645                 var archive = dojo.uri.dojoUri("DojoFileStorageProvider.jar").toString(); 
     645                var archive = dojo.uri.moduleUri("dojo", "../DojoFileStorageProvider.jar").toString(); 
    646646                var tag = "<applet " 
    647647                                        + "id='" + dojo.storage.browser.FileStorageProvider._APPLET_ID + "' " 
     
    853853                } 
    854854                dojo.flash.addLoadedListener(loadedListener); 
    855                 var swfloc6 = dojo.uri.dojoUri("Storage_version6.swf").toString(); 
    856                 var swfloc8 = dojo.uri.dojoUri("Storage_version8.swf").toString(); 
     855                var swfloc6 = dojo.uri.moduleUri("dojo", "../Storage_version6.swf").toString(); 
     856                var swfloc8 = dojo.uri.moduleUri("dojo", "../Storage_version8.swf").toString(); 
    857857                dojo.flash.setSwf({flash6: swfloc6, flash8: swfloc8, visible: false}); 
    858858        }, 
  • trunk/src/uri/Uri.js

    r6309 r6973  
    1111                // description: Examples: dojo.uri.moduleUri("dojo","Editor"), or dojo.uri.moduleUri("acme","someWidget") 
    1212                var loc = dojo.hostenv.getModuleSymbols(module).join('/'); 
    13                 //var loc = dojo.hostenv.getModulePrefix(module); 
    14                 if(!loc){return null;} 
    15                 if(loc.lastIndexOf("/") != loc.length-1){loc += "/";} 
    16                 return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri()+loc,uri); 
     13                if(!loc){ 
     14                        return null; 
     15                } 
     16                if(loc.lastIndexOf("/") != loc.length-1){ 
     17                        loc += "/"; 
     18                } 
     19                 
     20                //If the path is an absolute path (starts with a / or is on another domain/xdomain) 
     21                //then don't add the baseScriptUri. 
     22                var colonIndex = loc.indexOf(":"); 
     23                var slashIndex = loc.indexOf("/"); 
     24                if(loc.charAt(0) != "/" && (colonIndex == -1 || colonIndex > slashIndex)){ 
     25                        loc = dojo.hostenv.getBaseScriptUri() + loc; 
     26                } 
     27 
     28                return new dojo.uri.Uri(loc,uri); 
    1729        } 
    1830 
  • trunk/src/widget/AccordionContainer.js

    r6848 r6973  
    191191        selected: false, 
    192192 
    193         templatePath: dojo.uri.dojoUri("src/widget/templates/AccordionPane.html"), 
    194         templateCssPath: dojo.uri.dojoUri("src/widget/templates/AccordionPane.css"), 
     193        templatePath: dojo.uri.moduleUri("dojo", "widget/templates/AccordionPane.html"), 
     194        templateCssPath: dojo.uri.moduleUri("dojo", "widget/templates/AccordionPane.css"), 
    195195 
    196196        isContainer: true, 
  • trunk/src/widget/AnimatedPng.js

    r6377 r6973  
    4343                interval: 100, 
    4444 
    45                 _blankSrc: dojo.uri.dojoUri("src/widget/templates/images/blank.gif"), 
     45                _blankSrc: dojo.uri.moduleUri("dojo", "widget/templates/images/blank.gif"), 
    4646 
    4747                templateString: '<img class="dojoAnimatedPng" />', 
  • trunk/src/widget/Button.js

    r6601 r6973  
    2626                caption: "", 
    2727                 
    28                 templatePath: dojo.uri.dojoUri("src/widget/templates/ButtonTemplate.html"), 
    29                 templateCssPath: dojo.uri.dojoUri("src/widget/templates/ButtonTemplate.css"), 
     28                templatePath: dojo.uri.moduleUri("dojo", "widget/templates/ButtonTemplate.html"), 
     29                templateCssPath: dojo.uri.moduleUri("dojo", "widget/templates/ButtonTemplate.css"), 
    3030                 
    3131                // inactiveImg: Url 
    3232                //      prefix of filename holding images (left, center, right) for button in normal state 
    33                 inactiveImg: "src/widget/templates/images/soriaButton-", 
     33                inactiveImg: "widget/templates/images/soriaButton-", 
    3434                 
    3535                // activeImg: Url 
    3636                //      prefix of filename holding images (left, center, right) for button when it's being hovered over 
    37                 activeImg: "src/widget/templates/images/soriaActive-", 
     37                activeImg: "widget/templates/images/soriaActive-", 
    3838 
    3939                // pressedImg: Url 
    4040                //      prefix of filename holding images (left, center, right) for button between mouse-down and mouse-up 
    41                 pressedImg: "src/widget/templates/images/soriaPressed-", 
     41                pressedImg: "widget/templates/images/soriaPressed-", 
    4242 
    4343                // disabledImg: Url 
    4444                //      prefix of filename holding images (left, center, right) for button when it's disabled (aka, grayed-out) 
    45                 disabledImg: "src/widget/templates/images/soriaDisabled-", 
     45                disabledImg: "widget/templates/images/soriaDisabled-", 
    4646                 
    4747                // widget2height: Number 
     
    192192 
    193193                _setImage: function(/*String*/ prefix){ 
    194                         this.leftImage.src=dojo.uri.dojoUri(prefix + "l.gif"); 
    195                         this.centerImage.src=dojo.uri.dojoUri(prefix + "c.gif"); 
    196                         this.rightImage.src=dojo.uri.dojoUri(prefix + "r.gif"); 
     194                        this.leftImage.src=dojo.uri.moduleUri("dojo", prefix + "l.gif"); 
     195                        this.centerImage.src=dojo.uri.moduleUri("dojo", prefix + "c.gif"); 
     196                        this.rightImage.src=dojo.uri.moduleUri("dojo", prefix + "r.gif"); 
    197197                }, 
    198198                 
     
    260260                _sizeMyselfHelper: function(){ 
    261261                        // draw the arrow (todo: why is the arror in containerNode rather than outside it?) 
    262                         this.arrow.src = dojo.uri.dojoUri(this.disabled ? this.disabledDownArrow : this.downArrow); 
     262                        this.arrow.src = dojo.uri.moduleUri("dojo", this.disabled ? this.disabledDownArrow : this.downArrow); 
    263263                        this.containerNode.appendChild(this.arrow); 
    264264 
     
    289289                menuId: "", 
    290290         
    291                 templatePath: dojo.uri.dojoUri("src/widget/templates/ComboButtonTemplate.html"), 
     291                templatePath: dojo.uri.moduleUri("dojo", "widget/templates/ComboButtonTemplate.html"), 
    292292         
    293293                // splitWidth: Integer 
     
    338338         
    339339                _setImage: function(prefix){ 
    340                         this.leftImage.src=dojo.uri.dojoUri(prefix + "l.gif"); 
    341                         this.centerImage.src=dojo.uri.dojoUri(prefix + "c.gif"); 
     340                        this.leftImage.src=dojo.uri.moduleUri("dojo", prefix + "l.gif"); 
     341                        this.centerImage.src=dojo.uri.moduleUri("dojo", prefix + "c.gif"); 
    342342                }, 
    343343         
     
    394394         
    395395                _setImageR: function(prefix){ 
    396                         this.arrowBackgroundImage.src=dojo.uri.dojoUri(prefix + "c.gif"); 
    397                         this.rightImage.src=dojo.uri.dojoUri(prefix + "r.gif"); 
     396                        this.arrowBackgroundImage.src=dojo.uri.moduleUri("dojo", prefix + "c.gif"); 
     397                        this.rightImage.src=dojo.uri.moduleUri("dojo", prefix + "r.gif"); 
    398398                }, 
    399399 
  • trunk/src/widget/Checkbox.js

    r6911 r6973  
    1414                //      Same as an HTML checkbox, but with fancy styling 
    1515 
    16                 templatePath: dojo.uri.dojoUri('src/widget/templates/Checkbox.html'), 
    17                 templateCssPath: dojo.uri.dojoUri('src/widget/templates/Checkbox.css'), 
     16                templatePath: dojo.uri.moduleUri("dojo", "widget/templates/Checkbox.html"), 
     17                templateCssPath: dojo.uri.moduleUri("dojo", "widget/templates/Checkbox.css"), 
    1818 
    1919                // class: String 
     
    185185                //      variation on Checkbox widget to be display on monitors in high-contrast mode (that don't display CSS background images) 
    186186 
    187                 templatePath: dojo.uri.dojoUri('src/widget/templates/CheckboxA11y.html'), 
     187                templatePath: dojo.uri.moduleUri("dojo", "widget/templates/CheckboxA11y.html"), 
    188188 
    189189                postCreate: function(args, frag){ 
  • trunk/src/widget/Clock.js

    r6501 r6973  
    4848                        second:{ shadow:null, shift:{ dx:4, dy:4} } 
    4949                }; 
    50                 this.image = dojo.uri.dojoUri("src/widget/templates/images/clock.png"); 
     50                this.image = dojo.uri.moduleUri("dojo", "widget/templates/images/clock.png"); 
    5151                this.surface=null; 
    5252                this.labelNode=null; 
  • trunk/src/widget/ComboBox.js

    r6671 r6973  
    345345                // buttonSrc: URI 
    346346                //              URI for the down arrow icon to the right of the input box. 
    347                 buttonSrc: dojo.uri.dojoUri("src/widget/templates/images/combo_box_arrow.png"), 
     347                buttonSrc: dojo.uri.moduleUri("dojo", "widget/templates/images/combo_box_arrow.png"), 
    348348 
    349349                // dropdownToggle: String 
     
    351351                dropdownToggle: "fade", 
    352352 
    353                 templatePath: dojo.uri.dojoUri("src/widget/templates/ComboBox.html"), 
    354                 templateCssPath: dojo.uri.dojoUri("src/widget/templates/ComboBox.css"), 
     353                templatePath: dojo.uri.moduleUri("dojo", "widget/templates/ComboBox.html"), 
     354                templateCssPath: dojo.uri.moduleUri("dojo", "widget/templates/ComboBox.css"), 
    355355 
    356356                setValue: function(/*String*/ value){ 
  • trunk/src/widget/DatePicker.js

    r6881 r6973  
    8787                        selectedDate: "selectedItem" 
    8888                }, 
    89                 templatePath:  dojo.uri.dojoUri("src/widget/templates/DatePicker.html"), 
    90                 templateCssPath:  dojo.uri.dojoUri("src/widget/templates/DatePicker.css"), 
     89                templatePath:  dojo.uri.moduleUri("dojo", "widget/templates/DatePicker.html"), 
     90                templateCssPath:  dojo.uri.moduleUri("dojo", "widget/templates/DatePicker.css"), 
    9191 
    9292                postMixInProperties: function(){ 
  • trunk/src/widget/demoEngine/DemoContainer.js

    r4668 r6973  
    99        dojo.widget.HtmlWidget,  
    1010        { 
    11                 templatePath: dojo.uri.dojoUri("src/widget/demoEngine/templates/DemoContainer.html"), 
    12                 templateCssPath: dojo.uri.dojoUri("src/widget/demoEngine/templates/DemoContainer.css"), 
     11                templatePath: dojo.uri.moduleUri("dojo", "widget/demoEngine/templates/DemoContainer.html"), 
     12                templateCssPath: dojo.uri.moduleUri("dojo", "widget/demoEngine/templates/DemoContainer.css"), 
    1313                postCreate: function() { 
    1414                        dojo.html.addClass(this.domNode,this.domNodeClass); 
  • trunk/src/widget/demoEngine/DemoItem.js

    r6666 r6973  
    88        dojo.widget.HtmlWidget,  
    99        { 
    10                 templatePath: dojo.uri.dojoUri("src/widget/demoEngine/templates/DemoItem.html"), 
    11                 templateCssPath: dojo.uri.dojoUri("src/widget/demoEngine/templates/DemoItem.css"), 
     10                templatePath: dojo.uri.moduleUri("dojo", "widget/demoEngine/templates/DemoItem.html"), 
     11                templateCssPath: dojo.uri.moduleUri("dojo", "widget/demoEngine/templates/DemoItem.css"), 
    1212                postCreate: function() { 
    1313                        dojo.html.addClass(this.domNode,this.domNodeClass); 
  • trunk/src/widget/demoEngine/DemoNavigator.js

    r6886 r6973  
    1313        dojo.widget.HtmlWidget,  
    1414        { 
    15                 templatePath: dojo.uri.dojoUri("src/widget/demoEngine/templates/DemoNavigator.html"), 
    16                 templateCssPath: dojo.uri.dojoUri("src/widget/demoEngine/templates/DemoNavigator.css"), 
     15                templatePath: dojo.uri.moduleUri("dojo", "widget/demoEngine/templates/DemoNavigator.html"), 
     16                templateCssPath: dojo.uri.moduleUri("dojo", "widget/demoEngine/templates/DemoNavigator.css"), 
    1717                postMixInProperties: function(){ 
    1818                        dojo.widget.HtmlWidget.superclass.postMixInProperties.apply(this, arguments); 
  • trunk/src/widget/demoEngine/DemoPane.js

    r4668 r6973  
    66        dojo.widget.HtmlWidget,  
    77        { 
    8                 templatePath: dojo.uri.dojoUri("src/widget/demoEngine/templates/DemoPane.html"), 
    9                 templateCssPath: dojo.uri.dojoUri("src/widget/demoEngine/templates/DemoPane.css"), 
     8                templatePath: dojo.uri.moduleUri("dojo", "widget/demoEngine/templates/DemoPane.html"), 
     9                templateCssPath: dojo.uri.moduleUri("dojo", "widget/demoEngine/templates/DemoPane.css"), 
    1010                postCreate: function() { 
    1111                        dojo.html.addClass(this.domNode,this.domNodeClass); 
  • trunk/src/widget/demoEngine/SourcePane.js

    r4668 r6973  
    77        dojo.widget.HtmlWidget,  
    88        { 
    9                 templatePath: dojo.uri.dojoUri("src/widget/demoEngine/templates/SourcePane.html"), 
    10                 templateCssPath: dojo.uri.dojoUri("src/widget/demoEngine/templates/SourcePane.css"), 
     9                templatePath: dojo.uri.moduleUri("dojo", "widget/demoEngine/templates/SourcePane.html"), 
     10                templateCssPath: dojo.uri.moduleUri("dojo", "widget/demoEngine/templates/SourcePane.css"), 
    1111                postCreate: function() { 
    1212                        dojo.html.addClass(this.domNode,this.domNodeClass); 
  • trunk/src/widget/Dialog.js

    r6949 r6973  
    330330                //      Dialog is extended from ContentPane so it supports all the same parameters (href, etc.) 
    331331 
    332                 templatePath: dojo.uri.dojoUri("src/widget/templates/Dialog.html"), 
     332                templatePath: dojo.uri.moduleUri("dojo", "widget/templates/Dialog.html"), 
    333333 
    334334                // blockDuration: Integer 
  • trunk/src/widget/DomWidget.js

    r6969 r6973  
    1717        // summary: a mapping of strings that are used in template variable replacement 
    1818        dojoRoot: dojo.hostenv.getBaseScriptUri(), 
     19        dojoModuleUri: dojo.uri.moduleUri("dojo"), 
    1920        baseScriptUri: dojo.hostenv.getBaseScriptUri() 
    2021}; 
  • trunk/src/widget/DropdownContainer.js

    r6532 r6973  
    3030 
    3131                // iconURL: dojo.uri.Uri: icon for the dropdown button 
    32                 iconURL: dojo.uri.dojoUri("src/widget/templates/images/combo_box_arrow.png"), 
     32                iconURL: dojo.uri.moduleUri("dojo", "widget/templates/images/combo_box_arrow.png"), 
    3333 
    3434                // copyClass: 
  • trunk/src/widget/DropdownDatePicker.js

    r6511 r6973  
    3737                */ 
    3838 
    39                 iconURL: dojo.uri.dojoUri("src/widget/templates/images/dateIcon.gif"), 
     39                iconURL: dojo.uri.moduleUri("dojo", "widget/templates/images/dateIcon.gif"), 
    4040 
    4141                // formatLength: String 
  • trunk/src/widget/DropdownTimePicker.js

    r6830 r6973  
    3636                // iconURL: URL 
    3737                //      path of icon for button to display time picker widget 
    38                 iconURL: dojo.uri.dojoUri("src/widget/templates/images/timeIcon.gif"), 
     38                iconURL: dojo.uri.moduleUri("dojo", "widget/templates/images/timeIcon.gif"), 
    3939                 
    4040                // formatLength: String 
  • trunk/src/widget/Editor.js

    r6058 r6973  
    427427                        return cmd; 
    428428                } else { 
    429                         return dojo.uri.dojoUri("src/widget/templates/buttons/" + cmd + ".gif"); 
     429                        return dojo.uri.moduleUri("dojo", "widget/templates/buttons/" + cmd + ".gif"); 
    430430                } 
    431431        }, 
  • trunk/src/widget/Editor2.js

    r6929 r6973  
    207207                // toolbarTemplatePath: dojo.uri.Uri 
    208208                //              to specify the template file for the toolbar 
    209                 toolbarTemplatePath: dojo.uri.cache.allow(dojo.uri.dojoUri("src/widget/templates/EditorToolbarOneline.html