Module/Container does not have access to jQuery library
Last Post 08/22/2014 11:28 PM by Joseph Craig. 1 Replies.
Author Messages Not Resolved
Daniel
Posts:10


--
08/22/2014 5:43 PM
    My website uses a feature of the DIXIT skin that can switch blocks of information in and out of view based on a jQuery filter library mechanism called Isotope. The required scripts are contained in jquery.isotope.min.js and sorting.js. These scripts are part of the DIXIT distribution from Mandeeps. Incidentally, I am using the most recent version of DIXIT. You can see the correct effect here. http://demo.mandeeps.com/skins/dixi...olumn.aspx
    http://isotope.metafizzy.co/

    I decided that my floating logo/menu was taking up too much space (and there were other problems) and so using information in the DIXIT documentation I disabled the logo/menu from floating by adding var fixed_menu="false" as shown below. This change was done in both Home.ascx and InnerHtml.ascx.
    <script type="text/javascript">jQuery("html").addClass("ie ie9"); var fixed_menu="false";</script> <br /> <br /> So far so good. The menu no longer floats, but unfortunately disabling the floating menu causes the jQuery isotope feature to stop working in the browser (outside of DNN), especially in IE11 as can be seen on these two pages: www.bigelow.ch/Services and www.bigelow.ch/Process. If you click on a filter item (using the IE) nothing happens. Well it might, but not for long. When it stops working the URL will have #filter appended to it. This behavior makes me think that an uninitialized variable is the cause. Note that the mechanism works as long as I stay logged into DNN. The reason being (only a theory at this point) that the DNN control panel acts as a wrapper that has visibility to the jQuery libraries which are correctly registered and initialized. As soon as I logout, the mechanism stops working for the reasons just given. <br /> <br /> I believe this is a bug in the DIXIT skin and I have requested product support from Mandeeps, but up to now I appear to be on my own. No reply from Mandeeps for a long time now. Hence my call for help now goes out to the DNN community. <br /> <br /> The other mainstream browsers are able to deal with whatever is causing IE to fail, but I think this is only luck. These browsers must be filling in the blanks for whatever is missing in the skin by using default values or something creative in the defensive programming category. <br /> <br /> The HTML modules containing the filter menu and the associated content are enclosed by the DIXIT Portfolio.ascx container which I have attempted to modify (see below). But obviously I am doing something wrong. <br /> <br /> If you have any ideas or suggestions I would be grateful. I think I have identified the cause of the problem, but I don't know how to implement the solution. In the end it will probably turn out to be something really simple. <br /> <br /> Best regards, <br /> Daniel Bigelow <br /> <br /> Portfolio.ascx -- as modified by me, but with no success. <br /> <br /> <%@ Control Language="vb" CodeBehind="~/admin/Containers/container.vb" AutoEventWireup="false" <br /> Explicit="True" Inherits="DotNetNuke.UI.Containers.Container" %> <br /> <%@ Register TagPrefix="dnn" TagName="JQUERY" Src="~/Admin/Skins/jQuery.ascx" %> <br /> <dnn:JQUERY ID="dnnjQuery" ScriptType="jQuery" runat="server" /> <br /> <dnn:JQUERY ID="isotope" ScriptType="other" Path="Skin" <br /> location="js/jquery.isotope.min.js" name="isotope" Order="e_Default" runat="server" /> <br /> <dnn:JQUERY ID="sorting" ScriptType="other" Path="Skin" <br /> location="js/sorting.js" name="sorting" Order="e_Default" runat="server" /> <br /> <script type="text/javascript" src="<%= ContainerPath %>js/jquery.isotope.min.js"></script> <br /> <script type="text/javascript" src="<%= ContainerPath %>js/sorting.js"></script> <br /> <div id="ContentPane" runat="server"> <br /> </div> <br /> <div class="clear"> <br /> </div> <br />
    Joseph Craig
    DNN MVP
    Posts:11667


    --
    08/22/2014 11:28 PM
    I believe that the problem is that the appropriate jQuery libraries are not being loaded.

    When you are logged in as an administrator, the control panel loads jQuery because the control panel needs it.

    This is, I think, the result of some recent changes to DNN that result in NOT automatically loading jQuery on every page. This is part of a redesign approach to minimize the size of DNN pages. Skins are responsible for loading what they need, and I would guess that your skin is not doing that. As this is a recent change, it's understandable that the skin my need some updating.

    My recommendation is that you contact Mandeeps and report this issue. I expect that you will get a positive reply, as Mandeeps is a well known participant in the DNN ecosystem, and they are known as a first class provider of DNN extensions. I've met Mandeep Singh on several occasions, and he is a gentleman ... on top of being a pretty darned good developer.

    Joe Craig, Patapsco Research Group
    Complete DNN Support


    ---