Announcement

Collapse
No announcement yet.

Norman's Tabber Setup Query

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Norman's Tabber Setup Query

    Considering Jonathan's post concerning Swift Tabber:

    https://community.sellerdeck.com/for...-tabs-to-swift

    I have a customised version of Norman's Tabber Setup add-on SD V16 V5.08 imported on the site snapshot when I upgraded to SD v18 in use on the cartridge section of our site - see code below:

    Code:
    <script type="text/javascript" src="jquery-ui-1.10.1.tabs.min.js"></script>
    <style>
    /* SD V16 Tabber V5.08 need to override some global styles */
    .dp_tab_widget {border-spacing:0;}
    .dp_tab_widget div {border:0 !important;}
    .dp_tab_widget li {border-bottom:0 !important;}
    .tabinner {width:100%; padding:0; overflow:auto;}
    .dp_extra_tab {display:none;}
    /* V14 tweaks */
    .tabber .ui-widget {font-size:inherit;}
    .tabber .ui-widget-content {<actinic:block if="%3cactinic%3avariable%20name%3d%22TabContentTextColour%22%20%2f%3e%20%21%3d%20%22%22">color:<actinic:variable name="TabContentTextColour" />;</actinic:block> <actinic:block if="%3cactinic%3avariable%20name%3d%22TabContentTextWeight%22%20%2f%3e%20%21%3d%20%22%22">font-weight:<actinic:variable name="TabContentTextWeight" />;</actinic:block>}
    <actinic:block if="%3cactinic%3avariable%20name%3d%22TabberUserHeight%22%20%2f%3e%20%21%3d%200">.tabber .ui-tabs-panel {height:<actinic:variable name="TabberUserHeight" />px; overflow:auto;}</actinic:block>
    </style>
    <script type="text/javascript">
    // tabber Variables
    var dp_untabbedprefix = '<actinic:variable name="UntabbedPrefix" encoding="perl" selectable="false" />';
    var dp_untabbedsuffix = '<actinic:variable name="UntabbedSuffix" encoding="perl" selectable="false" />';
    var dp_tabprefix = '<actinic:variable name="TabPrefix" encoding="perl" selectable="false" />';
    var dp_tabsuffix = '<actinic:variable name="TabSuffix" encoding="perl" selectable="false" />';
    var dp_searchresultshowsdescription = <actinic:variable name="SearchResultShowsDescription" encoding="perl" selectable="false" />;
    var dp_tabberemakeresponsive = <actinic:variable name="TabberMakeResponsive" encoding="perl" selectable="false" />;
    var dp_tabberresponsiveheaders = <actinic:variable name="TabberResponsiveHeaders" encoding="perl" selectable="false" />;
    var dp_tabprocessselector = '<actinic:variable name="TabberProcessSelector" encoding="perl" selectable="false" />';
    var dp_tabnotselector = '<actinic:variable name="TabberNotSelector" encoding="perl" selectable="false" />';
    function enabletabber(){ // enable tabber
    $("div[id^='tabber_']:visible").tabs({active:0
    <actinic:block if="%3cactinic%3avariable%20name%3d%22TabberFixedHeight%22%20%2f%3e%20AND%20%28%3cactinic%3avariable%20name%3d%22TabberUserHeight%22%20%2f%3e%20%3d%3d%200%29" >, heightStyle: 'auto'</actinic:block>
    <actinic:block if="%3cactinic%3avariable%20name%3d%22TabberAnimation%22%20encoding%3d%22perl%22%20selectable%3d%22false%22%20%2f%3e%20%3d%3d%20%22Scroll%22" >, hide: 'slideUp', show: 'slideDown'</actinic:block>
    <actinic:block if="%3cactinic%3avariable%20name%3d%22TabberAnimation%22%20encoding%3d%22perl%22%20selectable%3d%22false%22%20%2f%3e%20%3d%3d%20%22Fade%22" >, hide: true, show: true</actinic:block>
    });
    <actinic:block if="%3cactinic%3avariable%20name%3d%22TabberFixedHeight%22%20%2f%3e%20AND%20%3cactinic%3avariable%20name%3d%22TabberMakeResponsive%22%20%2f%3e%20AND%20%28%3cactinic%3avariable%20name%3d%22TabberUserHeight%22%20%2f%3e%20%3d%3d%200%29" >
    // fixed height tabs - so refresh on page resize
    $( window ).resize(function() {
    $("div[id^='tabber_']:visible").tabs("refresh");
    });
    </actinic:block>
    }
    </script>
    <script type="text/javascript" src="tabberv5support.js"></script>
    This functions well, however, I noticed that a script error appeared after the new version of JQuery was introduced to address the PCI external vulnerability scans failing issues, so I raised this with SD support and copy the response received below:

    That JavaScript error appears to be due to the new version of jQuery not playing nicely with the version of jQueryUI you are using. See https://stackoverflow.com/questions/...ction#37925405 for example.
    I can see you are using jquery-ui-1.10.1.tabs.min.js in the page, which must be part of a custom design. It’s over 10 years old according to the header. It needs to be updated to the latest version - using https://jqueryui.com/download/#!vers...00000000000000
    Note that as this is your own customised code, that we can’t support it if there are further problems after the update.
    In view of the comment on the last line, I have not attempted the update as the site is functioning ok despite the error and I don't feel confident in trying this out for a live site with no time available for development and test.

    I have downloaded the "ticked" jquery-ui-1.13.3.custom.zip folder but do not see a "jquery-ui-1.13.3.tabs.min.js" file included so not sure where to go next!

    Question is does the Swift-Tabber V4.04 incorporate a later than "jquery-ui-1.10.1.tabs.min.js" in the Tabber Setup that could be adopted in the page for an SD v18 site that does not use the specific Swift design template?
    Martin
    Mantra Audio

    #2
    You didn't say what error you got?

    I raised this with Gary at the time and he annotated his original post at https://community.sellerdeck.com/for...s-pci-dss-scan - see Additional Note for Web Designers

    Swift Tabber only works for Swift.

    Tabber v5 v18 still uses jquery-ui-1.10.1.tabs.min.js

    Norman's Tabber does not work with the latest jquery-ui, however the jQuery Migrate Plugin is your friend:

    The jQuery Migrate plugin simplifies upgrading from older versions of jQuery. The plugin restores deprecated features and behaviours so that older code will still run properly on newer versions of jQuery.
    Download jquery-migrate-3.5.0.min.js from https://code.jquery.com/jquery-migrate-3.5.0.min.js and save to the site folder

    In Layout Code Tabber Setup change

    Code:
    <script type="text/javascript" src="jquery-ui-1.10.1.tabs.min.js"></script>
    to

    Code:
    <script src="jquery-migrate-3.5.0.min.js"></script>
    
    <script src="jquery-ui-1.10.1.tabs.min.js"></script>
    (type="text/javascript" is redundant)

    Tested on your site in V16 and jquery 3.7.1 and all is well

    It is easier to replace

    Code:
        <script type="text/javascript" src="jquery-1.11.1<actinic:block if="%3cactinic%3avariable%20name%3d%22IsCompressionEnabled%22%20%2f%3e">.min</actinic:block>.js<actinic:block if="%3cactinic%3avariable%20name%3d%22ECDayno%22%20%2f%3e%20%21%3d%20%22%22" >?DAYNO=<actinic:variable name="ECDayno" selectable="false" /></actinic:block>"></script>
    with

    Code:
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script>
    Last edited by graphicz; 30-Dec-2024, 02:30 PM. Reason: Reminder to Download jquery-migrate-3.5.0.min.js and save to the site folder
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    Comment


      #3
      Thank you Jonathan for taking the time to consider this and the clarifications given.

      I have taken a screenshot of the script error descriptions I but cannot get any further detail as the links (if applicable) do not appear to function.

      Click image for larger version

Name:	image_7732.jpg
Views:	52
Size:	39.6 KB
ID:	557716
      My SD v18.2.2 site does have the jquery-3.5.1.js and jquery-3.5.1.min non-Swift updates incorporated.

      I will try your first suggested code change this coming weekend after taking a snapshot just in case and will let you know if this resolves the error.
      Martin
      Mantra Audio

      Comment


        #4
        jQuery 3.7.1 is preferred as deals with some issues present in 3.5.1
        Jonathan Chappell
        Website Designer
        SellerDeck Website Designer
        Actinic to SellerDeck upgrades
        Graphicz Limited - www.graphicz.co.uk

        Comment


          #5
          Thanks again Jonathan

          Am I right in thinking that I first need to download copies of "jquery-3.7.1.js" and "jquery-3.7.1.min.js" into my site folder and then replace the code line I currently have set up in the Standard Javascript Header Functions layout - copied below:

          Code:
          <script type="text/javascript" src="jquery-3.5.1<actinic:block if="%3cactinic%3avariable%20name%3d%22IsCompressionEnabled%22%20%2f%3e">.min</actinic:block>.js<actinic:block if="%3cactinic%3avariable%20name%3d%22ECDayno%22%20%2f%3e%20%21%3d%20%22%22" >?DAYNO=<actinic:variable name="ECDayno" selectable="false" /></actinic:block>"></script>
          with "jquery-3.7.1.js" code line:

          Code:
          <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script
          and if so, do I still need make the "jquery-migrate-3.5.0.min.js" change to the Tabber Setup layout code line?
          Martin
          Mantra Audio

          Comment


            #6
            You still use migrate for any jQuery above 1.*

            You do not need to download jQuery if you reference it with the CDN as above
            Jonathan Chappell
            Website Designer
            SellerDeck Website Designer
            Actinic to SellerDeck upgrades
            Graphicz Limited - www.graphicz.co.uk

            Comment


              #7
              I don't think I made myself clear.

              You have two choices:

              1. Download the compressed and uncompressed jQuery 3.7.1 from here https://jquery.com/download/ and save jquery-3.7.1.min.js and jquery-3.7.1.js into the site folder.
              Then you can reference jQuery using:

              Code:
              <script type="text/javascript" src="jquery-3.7.1<actinic:block if="%3cactinic%3avariable%20name%3d%22IsCompressionEnabled%22%20%2f%3e">.min</actinic:block>.js<actinic:block if="%3cactinic%3avariable%20name%3d%22ECDayno%22%20%2f%3e%20%21%3d%20%22%22" >?DAYNO=<actinic:variable name="ECDayno" selectable="false" /></actinic:block>"></script>

              2. No download neccessary, reference jQuery using:

              Code:
              <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
              There are several CDNs available. This is Cloudflare's:

              Code:
              <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
              If you wish you can use a local file for offline preview and the CDN for the published site. The files will need to be saved to the Site folder for this:

              Code:
              <!-- jQuery CDN -->
              <actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e">
              <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
              </actinic:block>
              <actinic:block if="%3cactinic%3avariable%20name%3d%22IsPreviewMode%22%20%2f%3e" >
              <script src="jquery-3.7.1.min.js"></script>
              </actinic:block>
              <!-- jQuery local fallback -->
              <script async>window.jQuery || document.write('<script src="jquery-3.7.1.min.js"><\/script>')</script>
              Jonathan Chappell
              Website Designer
              SellerDeck Website Designer
              Actinic to SellerDeck upgrades
              Graphicz Limited - www.graphicz.co.uk

              Comment


                #8
                Thank you, Jonathan
                I have completed the "jquery-migrate-3.5.0.min.js", "jquery-3.7.1.js" and "jquery-3.7.1.min.js" downloads into the site folder and made the code changes suggested and this has resolved the second bullet script error that appears in the screenshot in my post #3 above.
                The first bullet script error found on the page ('Script error.') is still present but I have not been able to trace this one so will refer back to SD support to see if they can identify.
                It is not a problem as it does not impact site functionality.
                SD v18.2.2
                Martin
                Mantra Audio

                Comment

                Working...
                X