Using old Dojo 0.9 in new Sharepoint 2013

90 views Asked by At

I have a Web-Application using old Dojo Framework 0.9. Migrating to a new Dojo would be very time-consuming.

In a simple iFrame my web-application is running. But when I start it in a Sharepoint2013 Webpart, dojo doesn't seem to "initialize" properly.

In main.aspx I use some div-Containers as Node for Main-Window, Pop-Up etc. When the the login-popup should be displayed, the node is not found in PopupContainer.js using Manager.js

Is there a cross-domain-problem or do I have to configure Sharepoint2013...

Thanks in Advance.

Code Snippets:

main.aspx

<script type="text/javascript" language="javascript" src="js/dojo.js"></script>

    <script language="javascript" type="text/javascript">
...  
        dojo.require("dojo.widget.ContentPane");  
        dojo.require("dojo.widget.SplitContainer")  
        dojo.require("dojo.widget.LayoutContainer");  
        dojo.require("dojo.widget.HtmlWidget");  
        dojo.require("dojo.widget.Dialog");  
        dojo.require("dojo.widget.Menu2");  
        dojo.require("dojo.widget.Tooltip");  
        dojo.require("dojo.widget.Button");  
        dojo.require("dojo.widget.FloatingPane");  
        dojo.require("dojo.widget.CWComboBox");  
        dojo.require("dojo.widget.ComboBox");  
        dojo.require("dojo.widget.PopupContainer");  
        ...  
        dojo.hostenv.writeIncludes();  
...  

<body id="content">  

        <% Process(); %>    
        <div dojoType="ContentPane" visible=false isLoaded=true  dojoAttachPoint='containerNode' widgetId="MenuPane" label="Empty" style="width:0px; height:0px; overflow:hidden;" executeScripts=true cacheContent=false>
        </div>  
        <!-- Dummy Pane for popup containers -->  
        <div dojoType="ContentPane" visible=false isLoaded=true dojoAttachPoint='containerNode' widgetId="PopupContainerPane" label="Empty" style="width:300px; height:300px; overflow:hidden;" executeScripts=true cacheContent=false>
        </div>  
        <!-- Dummy Pane for Dynamic Dialogs -->  
        <div dojoType="ContentPane" visible=false isLoaded=true dojoAttachPoint='containerNode' widgetId="DialogPane" label="Empty" style="width:0px; height:0px; overflow:hidden;" executeScripts=true cacheContent=false>
        </div>  
        <!-- MainPane -->  
        <div dojoType="CWContentPane" isLoaded=true id="w_1" widgetId="w_1" label="Empty" style="width:100%; height:100%; overflow:hidden;" executeScripts=true cacheContent=false adjustPaths=false parseContent=true scriptSeparation=false>
        </div>  
    </body>

...

Dialog.js

...
cDialogPane remains undefined, because widget _strDialogPane is not found in Manager.js

var cDialogPane = dojo.widget.manager.getWidgetById(_strDialogPane);
    if (null == cDialogPane) {
        alert('dojo.dialog.loadDialog: null == DialogPane');
        window.location.replace(dojo.session.getErrorPage());
    }

Manager.js

id is undefined, because widgetIds-Array is empty, but at least should be filled with the divs defined in main.aspx

... 
    this.getWidgetById = function(id){  
            if(dojo.lang.isString(id)){  
                return this.widgetIds[id];  
            }  
            return id;  
        }  
...
1

There are 1 answers

0
Eager2Learn On BEST ANSWER

we do not have a solution for that, but we are using a modern version of Dojo now. Possibly it was a sort of CORS issue we had with Dojo 0.9. This Version was created, when IE8 was state of the art and nowadays the web security has developed, but Dojo 0.9 not. :-)