Upgrading

Upgrading

menashemenashe Posts: 178Questions: 42Answers: 2

Good morning,

This si a rather basic question, but I realize that I really do not know th correct procedure.

I see that Editor 2.2.2 is now available.

After months/years of development, I have <script> entries for many different .js files--version numbers all over the place!

When I download the latest Editor, what exactly do I need to modify/update/remove?

Answers

  • allanallan Posts: 62,990Questions: 1Answers: 10,367 Site admin

    Head to the Editor download page and download the package you need. On the client-side, you just need to replace the Editor JS files that you are currently using with the latest ones. For example, if you are using a script for dataTables.editor.min.js, just update that file (the CSS should be updated as well).

    What script tags are you currently using?

    Allan

  • menashemenashe Posts: 178Questions: 42Answers: 2

    Too many? :)

    <script src="https://code.jquery.com/jquery-3.7.0.js"></script>
    
    <!-- DataTables.net -->
    <script src="https://cdn.datatables.net/v/bs5/dt-1.13.4/date-1.4.1/datatables.min.js"></script>
    <script src="https://cdn.datatables.net/select/1.7.0/js/dataTables.select.min.js"></script>
    
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js" integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.2.0/js/bootstrap.bundle.min.js"></script>
    
    <script type="text/javascript" src="DataTables/DataTables-1.13.6/Buttons-2.4.2/js/dataTables.buttons.min.js"></script>
    <script type="text/javascript" src="DataTables/DataTables-1.13.6/DateTime-1.5.1/js/dataTables.dateTime.min.js"></script>
    <script type="text/javascript" src="DataTables/DataTables-1.13.6/Bootstrap-5-5.3.0/js/bootstrap.bundle.min.js"></script>
    <script type="text/javascript" src="DataTables/DataTables-1.13.6/DataTables-1.13.6/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="DataTables/DataTables-1.13.6/DataTables-1.13.6/js/dataTables.bootstrap5.min.js"></script>
    
    <script type="text/javascript" src="Editor-PHP-2.2.2/js/dataTables.editor.min.js"></script>
    <script type="text/javascript" src="Editor-PHP-2.2.2/js/editor.bootstrap5.min.js"></script>
    
    <script type="text/javascript" src="Multi-column-Dropdown-Plugin-jQuery-Inputpicker/src/jquery.inputpicker.js"></script>
    
    <!-- Moment.js -->
    <!-- https://momentjs.com/ -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js"></script>
    <script src="https://cdn.datatables.net/plug-ins/1.10.19/sorting/datetime-moment.js"></script>
    
    <!-- Selectize -->
    <!-- https://selectize.dev/ -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.15.2/js/selectize.min.js" integrity="sha512-IOebNkvA/HZjMM7MxL0NYeLYEalloZ8ckak+NDtOViP7oiYzG5vn6WVXyrJDiJPhl4yRdmNAG49iuLmhkUdVsQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    
    <!-- JsBarcode -->
    <!-- https://github.com/lindell/JsBarcode -->
    <script type="text/javascript" src="JsBarcode/JsBarcode.all.min.js"></script>
    
  • allanallan Posts: 62,990Questions: 1Answers: 10,367 Site admin
    edited November 2023

    Not even slightly! Have a look at some WordPress sites with a theme and a few plug-ins. Now they have some serious script tag counts going on!

    You've got some duplication in you DataTables (and related) includes there. What I would suggest is that you replace the DataTables.net section with:

    <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.datatables.net/v/bs5/dt-1.13.6/b-2.4.2/date-1.5.1/sl-1.7.0/datatables.min.css" rel="stylesheet">
     
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdn.datatables.net/v/bs5/dt-1.13.6/b-2.4.2/date-1.5.1/sl-1.7.0/datatables.min.js"></script>
    
    <script type="text/javascript" src="Editor-PHP-2.2.2/js/dataTables.editor.min.js"></script>
    <script type="text/javascript" src="Editor-PHP-2.2.2/js/editor.bootstrap5.min.js"></script>
    
    <script type="text/javascript" src="Multi-column-Dropdown-Plugin-jQuery-Inputpicker/src/jquery.inputpicker.js"></script>
    

    That uses the DataTables CDN to get DataTables, DateTime, Buttons and Select, with Bootstrap 5 styling, all in a single request (note I've included the link for the styling for these as well). Since Editor isn't on the CDN, you then need to include that separately - which you've already got.

    The CDN option makes upgrades like this much easier.

    Allan

  • JazlynKubJazlynKub Posts: 1Questions: 0Answers: 0

    Any update?

  • allanallan Posts: 62,990Questions: 1Answers: 10,367 Site admin

    @JazlynKub - an update to what? My previous comment in this thread explains how to update the scripts for the original question.

    Allan

Sign In or Register to comment.