#silverstripe IRC Log

IRC log for 2 April 2017

All timestamps are in UTC.

1: [00:00:01] * ss-helper quit (Remote host closed the connection)
2: [00:00:14] * ss-helper has joined #silverstripe
3: [00:22:00] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
4: [00:58:05] * filisko quit (Ping timeout: 240 seconds)
5: [02:50:16] * Shrike_Finland quit (Quit: Leaving.)
6: [04:02:49] * Audlex has joined #silverstripe
7: [04:38:29] * UncleCheese has joined #silverstripe
8: [05:18:52] * Audlex quit (Remote host closed the connection)
9: [05:19:05] * Audlex has joined #silverstripe
10: [05:49:19] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
11: [06:07:50] * cloph quit (Ping timeout: 256 seconds)
12: [06:11:12] * cloph_away has joined #silverstripe
13: [06:44:48] * Shrike_Finland has joined #silverstripe
14: [07:06:02] * Shrike_Finland quit (Quit: Leaving.)
15: [08:13:36] * UncleCheese has joined #silverstripe
16: [08:54:30] * tt has joined #silverstripe
17: [08:55:30] <tt> hello guys , do we have any module for adding modifiers on a search list ?
18: [08:57:04] <tt> for eg, I have a list of products rendered after a search-form , how can i sort them using different modifiers based on pice, dateadded, brand , etc
19: [09:01:15] <cloph_away> what do you mean with modifiers? you can have the client sort using javascript, or you can add sort=key parameters to the links that you evaluate/pass to your template
20: [09:05:50] <tt> Thanx cloph , javascript sort would be good as i don't recently have much products
21: [09:10:45] <tt> here's the exact question about what i want to do
22: [09:10:46] <tt> https://www.dropbox.com/s/yiywkn52u8kcjdd/Bus%20Search%20List%20%C2%BB%20Relish%20tour.png?dl=0
23: [09:11:07] <tt> any suggestions based on silverstripe
24: [09:12:42] * Shrike_Finland has joined #silverstripe
25: [09:16:11] <cloph_away> https://github.com/abique/hefur/blob/master/www/js/table-sorter.js is a simple sorter, allows byte, int and string comparison, would need a <th onClick="sortTbody(this, 'torrents-tbody', sortByte)">size</th> for example if the size column should be sorted using the sortByte function.
26: [09:17:14] <cloph_away> apart from that, there's nothing really based on silverstripe, as I'd not really consider jQuery's tablesorter plugin as somthing related to silverstripe (but would likely be more a more generic appraoch)
27: [09:18:30] <cloph_away> if the html is not a table, but a ul, you'd still be able to use the approach, but of course more adjustments necessary.
28: [09:31:26] * samsamek has joined #silverstripe
29: [09:35:48] <tt> Thank you for the answer
30: [09:36:21] <tt> how about doing it server side? is it a good approach ? or javascript is a good approach ?
31: [09:48:18] <cloph_away> javascript is a good approach, as it avoids reloading the page.
32: [09:48:58] <cloph_away> if you want to do it server-side you can do datalist sort operations in your template's loop
33: [09:51:02] <cloph_away> https://docs.silverstripe.org/en/4/developer_guides/templates/syntax/#altering-the-list
34: [09:59:53] <tt> Thanx cloph
35: [09:59:58] <tt> great help from you
36: [10:01:18] <tt> <ul> <% loop $Children.Filter('School', 'College').Sort(Score, DESC) %> <li>$Title</li> <% end_loop %> </ul>
37: [10:01:36] <tt> does this mean , only fields school and colleges will be displayed?
38: [10:02:10] <cloph_away> no in this case this means that old elements where the School field has the value "College" will be processed
39: [10:02:31] <cloph_away> what will be displayed i in the body if the loop, in this case only the Title field is displayed.
40: [10:03:09] <cloph_away> the Filter is the same as a Foo::get()->filter(...) statemnet
41: [10:03:24] <tt> oh great
42: [10:03:26] <tt> got it
43: [10:03:28] <tt> thanx again
44: [10:03:37] <tt> nice explanation
45: [10:38:29] * kerozene is now known as kerp
46: [10:39:07] * kerp is now known as kerozene
47: [10:41:30] * kerozene is now known as kerp
48: [11:41:56] * gelignite has joined #silverstripe
49: [12:04:30] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
50: [12:12:34] * samsamek quit (Quit: samsamek)
51: [13:11:09] * samsamek has joined #silverstripe
52: [13:23:44] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
53: [13:30:28] * samsamek quit (Quit: samsamek)
54: [14:03:31] * samsamek has joined #silverstripe
55: [14:04:13] * filisko has joined #silverstripe
56: [14:07:35] * samsamek quit (Ping timeout: 240 seconds)
57: [14:13:59] * Shrike_Finland quit (Quit: Leaving.)
58: [14:29:45] * Shrike_Finland has joined #silverstripe
59: [14:51:34] * gelignite has joined #silverstripe
60: [15:26:23] * samsamek has joined #silverstripe
61: [15:32:27] * samsamek quit (Ping timeout: 240 seconds)
62: [17:05:56] * Shrike_Finland quit (Quit: Leaving.)
63: [18:42:14] * tt quit (Quit: Page closed)
64: [21:06:51] * UncleCheese has joined #silverstripe
65: [21:11:15] * BackEndCoder quit (Excess Flood)
66: [21:11:21] * BackEndCoder has joined #silverstripe
67: [22:11:13] * BackEndCoder quit (Excess Flood)
68: [22:12:50] * BackEndCoder has joined #silverstripe
69: [22:24:51] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
70: [22:37:42] * UncleCheese has joined #silverstripe
71: [23:07:15] * gelignite quit (Quit: http://bit.ly/1kso8Ta)
72: [23:20:31] * howardgrigg has joined #silverstripe
73: [23:39:26] * UncleCheese quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)

These logs were automatically created by ss-log on irc.freenode.net.