So, remember that gratitude from yesterday?

Well, I figured it out.  All by myself.  Go me!  

Prepare for technobabble.  Feel free to put on Madonna's "Like a Virgin" to listen to while you read said technobabble, if you like.

So, I'm using a special bootstrap template, called SB-Admin-2.  That template is a series of javascript, css, and supporting files used to give a website a certain look and feel, a style for your front end.  Part of what the template employs is an absolutely wonderful jQuery plugin called DataTables.  DataTables takes your out-of-the-box plain old HTML table and makes it super fancy.    You can sort stuff, filter, paginate, all kinds of awesome goodness.  

DT is in fact SO fancy that it has all these extensions which can make it do YET MORE THINGS.

One of those extensions is called Responsive, and its whole purpose is to make DT act, well, responsively.  When your window shrinks because you're on a phone or tablet, DataTables will do awesome, space-aware things too, like hide columns, or shove data down into a "child row" for you.  Part of that is shoving only the columns you want, when you want.

Well, that's fine in theory, but when I went to use it in my day job it did no such thing.

I figured out why.

FIRST it's because SB-Admin-2 while beautiful, wonderful, and all-inclusive, like a package vacation is somewhat dated.  It does ship with versions of bootstrap, data tables, and even responsive included.  

And that's just fine.  Except that picking which columns have priority to stay visible is a feature that's newer than the version shipped with the template.

Here, I'll show you.

This is a little screen capture of the top of the responsive javascript library.  My handy little green arrow points to the version of the extension, that being 1.0.6

This is a little screen capture of the top of the responsive javascript library.  My handy little green arrow points to the version of the extension, that being 1.0.6

And here's the page that describes how to use responsivePriority.  It works as of version 2.0.0.

And here's the page that describes how to use responsivePriority.  It works as of version 2.0.0.

In a word...

BOOM.

I love when I figure shit out!

Posted
AuthorMako Allen
Categories365 Gratitude