Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleDatatables Kombifiles
Expand
titledownload advice, click here to expand...

The DataTables package has a lot of features and for each feature there is a corresponding CSS and JS File. However on the linked Site it is possible to generate one CSS and JS file with the desired features. This is advantageous, because fewer HTTP Requests are needed.

Currently (as of Jan-2017) the activated options are: The changed options are printed bold

  • jQuery: no jQuery (could be included to reduce HTTP Requests further)
  • Styling: Bootstrap
    • no styling library
  • DataTables: DataTables
  • AutoFill: Do not include
  • Buttons: Buttons
    • Column visibility: Do not include
    • Flash export: Do not include
    • HTML5 export: HTML5 export
      • JSZip: Do not include
      • pdfmake: pdfmake
    • Print view: Print view
  • ColReorder: Do not include
  • Editor: Do not include
  • FixedColumns: Do not include
  • FixedHeader: Do not include
  • KeyTable: Do not include
  • Responsive: Responsive
  • RowReorder: Do not include
  • Scroller: Scroller
  • Select: Select
  • Minification: Minify
  • Concatenate: Single File
  • CDN: CDN or Local files -> own preference

...

Code Block
languagebash
titleGet CDN files via wget example
collapsetrue
wget https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css

 

The files that need to be replaced are inside the public/components/assets-admin/plugins/[Pluginname] Folder.

...

ProsCons
  • faster in "local" networks
  • installation, upgrade and maintenance required
  • independent of internet access
 
  

...

Formating the downloaded File in Sublime3

To work with the files, they almost always need to be reformatted. For Sublime 3 exists a Plug-in to automatically beautify HTML, JS and CSS code.

Link to sublime Plug-in page: https://packagecontrol.io/packages/HTML-CSS-JS%20Prettify

The simplest method of installation is through the Sublime Text console. The console is accessed via the ctrl+` shortcut or the View > Show Console menu. Once open, paste the appropriate Python code into the consol.

Code Block
titleSublime 3 JS CSS beautify
collapsetrue
'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76';
 pf = 'Package Control.sublime-package'; ipp = 
sublime.installed_packages_path(); urllib.request.install_opener( 
urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = 
urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', 
'%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error 
validating download (got %s instead of %s), please try manual install' %
 (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)    

This code creates the Installed Packages folder for you (if necessary), and then downloads the Package Control.sublime-package into it. The download will be done over HTTP instead of HTTPS due to Python standard library limitations, however the file will be validated using SHA-256.

Now right-click into sublime in the opened file and click on HTML/CSS/JS Prettify -> Prettify code

3 Installation through composer

TO-DO: Check Composer implementation seems also possible and would be easier to maintain and does automatic updates, but was not used by me, because copying the files to the corresponding folders was sufficient for me.

 

 

 

Filter by label (Content by label)
showLabelsfalse
max5
spacesLAR
sortmodified
showSpacefalse
reversetrue
typepage
labelsCSS JS Bootstrap Header Footer

...