Click here to Skip to main content
15,893,668 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: I hate "KISS" Pin
BobJanova2-Jun-14 0:22
BobJanova2-Jun-14 0:22 
GeneralRe: I hate "KISS" Pin
Super Lloyd2-Jun-14 0:33
Super Lloyd2-Jun-14 0:33 
GeneralRe: I hate "KISS" Pin
BobJanova2-Jun-14 0:47
BobJanova2-Jun-14 0:47 
GeneralRe: I hate "KISS" Pin
CatchExAs2-Jun-14 1:33
professionalCatchExAs2-Jun-14 1:33 
GeneralRe: I hate "KISS" Pin
Super Lloyd2-Jun-14 1:42
Super Lloyd2-Jun-14 1:42 
GeneralRe: I hate "KISS" Pin
CatchExAs2-Jun-14 4:20
professionalCatchExAs2-Jun-14 4:20 
GeneralRe: I hate "KISS" Pin
NAANsoft2-Jun-14 2:21
NAANsoft2-Jun-14 2:21 
GeneralRe: I hate "KISS" Pin
Super Lloyd2-Jun-14 2:44
Super Lloyd2-Jun-14 2:44 
Maybe 20 lines of jQuery was bit exagerated.. Laugh | :laugh:
But the latest cookie knockout extension I wrote is quite concise, expressive and helpful.

short version
<div data-bind="cookie: { name: 'visibleColumns', data: visibleColumns() }">...</div>


long version (where I inline visibleColumns())
<div data-bind="cookie: { name: 'visibleColumns', data: tableOption.aoColumns.enumerable().where(function(x) { return x.koVisible; }).select(function(x) { return x.koVisible; }).array() }">...</div>


I have a datatable extension, which take some standart datatable option, and some extra option like an (optional) 'koVisible' property of type ko.observable<boolean>() (TypeScript syntax), to automatically hide / show columns.

This statement collect all the koVisible flags (on columns which have it), initialize them from a cookie if it exists and automatically update the cookie if any of them changes.
My programming get away... The Blog...
DirectX for WinRT/C# since 2013!
Taking over the world since 1371!


modified 2-Jun-14 9:17am.

JokeRe: I hate "KISS" Pin
Richard Deeming2-Jun-14 2:32
mveRichard Deeming2-Jun-14 2:32 
GeneralRe: I hate "KISS" Pin
Super Lloyd2-Jun-14 2:46
Super Lloyd2-Jun-14 2:46 
GeneralRe: I hate "KISS" Pin
Rowdy Raider2-Jun-14 3:04
Rowdy Raider2-Jun-14 3:04 
GeneralRe: I hate "KISS" Pin
Super Lloyd2-Jun-14 3:16
Super Lloyd2-Jun-14 3:16 
GeneralRe: I hate "KISS" Pin
Super Lloyd2-Jun-14 3:17
Super Lloyd2-Jun-14 3:17 
GeneralRe: I hate "KISS" Pin
Nicolas Dorier2-Jun-14 3:39
professionalNicolas Dorier2-Jun-14 3:39 
GeneralRe: I hate "KISS" Pin
jschell2-Jun-14 8:24
jschell2-Jun-14 8:24 
GeneralRe: I hate "KISS" Pin
Super Lloyd2-Jun-14 15:53
Super Lloyd2-Jun-14 15:53 
GeneralRe: I hate "KISS" Pin
RafagaX2-Jun-14 9:44
professionalRafagaX2-Jun-14 9:44 
GeneralRe: I hate "KISS" Pin
Super Lloyd2-Jun-14 15:55
Super Lloyd2-Jun-14 15:55 
GeneralRe: I hate "KISS" Pin
Kirk Wood2-Jun-14 12:10
Kirk Wood2-Jun-14 12:10 
GeneralRe: I hate "KISS" Pin
User 48350473-Jun-14 3:28
User 48350473-Jun-14 3:28 
GeneralRe: I hate "KISS" Pin
Super Lloyd3-Jun-14 3:57
Super Lloyd3-Jun-14 3:57 
GeneralRe: I hate "KISS" Pin
KP Lee3-Jun-14 18:57
KP Lee3-Jun-14 18:57 
GeneralSo very middle class Pin
Dalek Dave1-Jun-14 0:01
professionalDalek Dave1-Jun-14 0:01 
GeneralRe: So very middle class Pin
Richard MacCutchan1-Jun-14 0:46
mveRichard MacCutchan1-Jun-14 0:46 
GeneralRe: So very middle class Pin
Gary R. Wheeler1-Jun-14 0:54
Gary R. Wheeler1-Jun-14 0:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.