IRC log of #schooltool for Monday, 2013-01-21

*** menesis has quit IRC01:12
*** hotwebmatter has quit IRC06:39
*** menesis has joined #schooltool08:34
*** yvl has joined #schooltool09:27
*** replaceafill has joined #schooltool15:14
replaceafillyvl, you gone?17:25
yvlhey replaceafill17:25
replaceafillhey yvl17:26
replaceafillquick question17:26
replaceafilli've figured out the new table + pdf functionality17:26
replaceafillbut i'm wondering17:26
replaceafilli think there's still no way to customize visible columns?17:26
yvlumm17:27
yvlwell, there is17:27
replaceafillmaybe i'm just missing it...17:28
yvlsee FlatRMLTable17:28
yvland visible_column_names17:28
replaceafillah17:28
replaceafilli was looking at table.table and table.ajax17:28
replaceafillso, if i have two versions of the view, one html and one pdf17:29
replaceafillthe pdf version will just work17:30
yvlif using same visible columns17:30
yvlif you want to change, you have several options there17:30
* yvl starts to remember ;)17:30
yvlyou can provide an adapter:17:30
yvl            zope.component.queryMultiAdapter(17:30
yvl                (self.context, self.request, self.view, column),17:30
yvl                interfaces.IRMLColumn,17:30
yvl                column.name17:30
yvl                )17:30
replaceafillbut i'd still need to override makeFormatter?17:30
replaceafilli mean, for the html version17:31
yvlwell17:31
yvlmaybe :D17:31
replaceafillor we can include visible_column_names in makeFormatter :)17:32
replaceafillwhat i'm doing right now:17:32
yvlso, here are 3 ways to override visibility:17:32
* replaceafill listens17:32
yvl1) change the HTML table formatter's visible column17:32
yvl2) inherit from...  RMLTable I think, and specify visible_column_names there (thus replacing the @property)17:33
replaceafillvisible_columns?17:33
yvlyes17:33
replaceafillah!17:33
replaceafillso, visible_columns in the table formatter does what the old visible_column_names used to do17:33
yvl3) make a class HiddenColumn(Column):17:33
yvl   visible = False17:34
yvland register it in ZCML17:34
yvlfor your context, request, view, column and specify name="the_column_name"17:34
replaceafilloh, 3) seems fancy :)17:34
replaceafilli was looking for visible_column_names, and missed visible_columns17:34
replaceafillthat's probably the way i want to go17:35
replaceafilli'm converting all existing grouping tables to use the new classes17:35
replaceafillgetting rid of custom table_formatter's17:35
yvloh17:36
yvlI just noticed a whoopsy17:36
yvlin FlatRMLTable17:36
yvl@property17:36
yvldef visible_column_names17:36
yvlreturns columns, not their names17:36
yvland FlatRMLTable.getColumns does17:37
yvlvisible_names = [c.name for c in self.visible_column_names]17:37
replaceafillah17:37
yvlthat's a naming bug17:37
yvlwell, not naming, just bug17:37
yvlif you could change it so that visible_column_names return17:37
yvlreturn [c.name for c in self.formatter.visible_columns]17:37
yvland getColumns just do17:38
yvlvisible_names = list(self.visible_column_names)17:38
replaceafillah ok17:38
yvlthanks!17:39
replaceafillthanks yvl17:39
replaceafilli can continue now :)17:39
replaceafillnice work on the table formatters btw :)17:39
replaceafillit's helping me get rid of lots of custom s**t17:39
yvlthanks17:40
*** yvl has quit IRC18:12
*** menesis has quit IRC18:40
*** menesis has joined #schooltool18:44
*** ignas has joined #schooltool18:53
*** ignas has quit IRC21:11
th1ahi replaceafill.23:33
th1ahttps://answers.launchpad.net/schooltool/+question/21977123:33
replaceafillhey th1a23:33
replaceafillreplying...23:34
replaceafillth1a, answered23:43
th1aThanks.23:43
replaceafilltimeout error :|23:45
replaceafillah nv23:45
replaceafillnm23:45

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!