How to download / install manually (noob) .

How to download / install manually (noob) .

baggisterbaggister Posts: 6Questions: 1Answers: 0

I have an asp.net mvc project. I wish to download the relevant files and include them as part of the project.
The project uses Bootstrap 3.0.0.
I have navigated to ... https://datatables.net/download/
Step 1 - I selected bootstrap 3
Step 2 - only DataTables is selected.
Extensions - none
At the bottom, I selected Download Tab. I have selected Minify and Concatenated.
This has given me a zip with two javascript files (normal and min) and two css (normal and min)
There is also a subfolder: in the folder are 3 other folders, CSS, images, js.

Do I just need the four files (two css and two js) in the main folder, and nothing else? ie is this what is meant as "concatenated"?
Is the subfolder ( and subfolders therein) here for any reason?
In the subfolder, there is an images folder. do i need these ( or do they already exist as part of bootstrap )?
In the subfolder, there are, in addition to the normal bootstrap js and css, also bootstrap 4 js and css. Why are these here if I have selected Boot strap 3?
The bootstrap referenced in datatables is 3.3.7 . can i still use 3.0.0 ? If not, whats the best way of resolving this (short of upgrading Bootstrap)

Thanks.

Answers

  • kthorngrenkthorngren Posts: 20,277Questions: 26Answers: 4,766

    You will want to read this Datatables Bootstrap styling doc to get a better understanding of what Datatables files are needed for Bootstrap.
    https://datatables.net/manual/styling/bootstrap

    If you go back to the downloads page then toggle the Concatenate button you will see the individual files that are imbedded into the concatenated file. Also you can open the datatables.min.css and .js files and, at the top, it will provide a list of all the components within the file.

    Please post any additional questions.

    Kevin

  • baggisterbaggister Posts: 6Questions: 1Answers: 0

    I tried toggling as requested - it looks like the results are exactly the same. There's no difference.

  • kthorngrenkthorngren Posts: 20,277Questions: 26Answers: 4,766

    Maybe you didn't understand what I meant. With BS 3 styling selected and just the base Datatables the concatenated files look like this:

    These would be the files you load in your HTML.

    Toggling the concatenated checkbox shows this:

    This would be the files to load individually. This is what I was asking you to look at.

    Kevin

  • baggisterbaggister Posts: 6Questions: 1Answers: 0
    edited October 2019

    yeah, I think I have done exactly that - there is no difference. I'll check again, but i#m pretty certain the two downloads deliver the same content (i'm prepared to eat my hat, however, just in case)

    I've just repeated the excercise - there appears to be no difference at all. I'm guessing that, regardless of the chosen option (concatenated/not concatenated), the download gives individual files as well as concatenated. It's not a problem - I'm just checking (one of my questions)that all I need are the two Js (normal,min) and two css (normal, min)

  • kthorngrenkthorngren Posts: 20,277Questions: 26Answers: 4,766

    The download does contain the base CSS and JS files for Datatables. If you were to select any extensions the download would also contain those. These are all individual files. In the root of the download are datatable.js, datatables.min.js, datatables.css and datatables.min.css. These files contain the concatenated options you selected. Look at the datatables.js for example. You will see this:

     * This combined file was created by the DataTables downloader builder:
     *   https://datatables.net/download
     *
     * To rebuild or modify this file with the latest versions of the included
     * software please visit:
     *   https://datatables.net/download/#bs/dt-1.10.20
     *
     * Included libraries:
     *   DataTables 1.10.20
    
    

    Note the /#bs in the URL. This indicates Bootstrap styling. The files you want to load in your page are in the root. You will choose one of either .js or .min.js and .css or .min.css. These files will include the base Datatables and the bootstrap 3 styling.

    Or you could load the files individually from the appropriate CSS or JS directories.

    HTH,
    Kevin

  • baggisterbaggister Posts: 6Questions: 1Answers: 0

    It does, thank you. It's all a bit confusing, especially for noobs like me,

    Are you able to help with more please? As my version of bootstrap is 3.0.0 and datatables requires ( I think) 3.3.7, I do not think i can use the bootstrap styling. So I think I'll just use Datatables' default styling. So I'll just use the concatenated javascript and css files in the root ( and the two minified). Do I need the images folder as well?

    Also, datatables uses jquery. There's no reference to which version of jquery is used.

  • kthorngrenkthorngren Posts: 20,277Questions: 26Answers: 4,766

    Also, datatables uses jquery. There's no reference to which version of jquery is used.

    The Dependancies section of the install doc explain the jQuery requirements.

    As my version of bootstrap is 3.0.0 and datatables requires ( I think) 3.3.7,

    3.0.0 seems like its pretty old. In general I would recommend upgrading unless your site has a specific requirement for 3.0.0. I'm not sure about the Datatables compatibility with BS 3.0.0. However I would be inclined to try it then if there are styling issues either upgrade BS or use the default Datatables styling.

    So I think I'll just use Datatables' default styling. So I'll just use the concatenated javascript and css files in the root ( and the two minified).

    If you selected Bootstrap 3 styling in the Download Builder then these files will contain the Bootstrap styling. If you want to use the default Datatables styling then use the jquery.dataTables.js in the js directory and the jquery.dataTables.css in the css directory. Or use the minimized version of them. But don't load both as it will cause problems.

    Kevin

This discussion has been closed.