sets a css class for every column for further tunings
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 4 Dec 2013 20:45:05 +0000 (21:45 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 4 Dec 2013 20:45:05 +0000 (21:45 +0100)
plugins/querytable/static/css/querytable.css
plugins/querytable/static/js/querytable.js

index 19088ad..3a999d1 100644 (file)
@@ -25,3 +25,8 @@ div.querytable .slick-column-name {
 div.querytable {
     font-size: small;
 }
+
+/* an example of the css classes used */
+.querytable-column-network_hrn {
+    background-color:red;
+}
index c790c94..98fc5b4 100644 (file)
            // compute columns based on columns and hidden_columns
            this.slick_columns = [];
            var all_columns = this.options.columns; // .concat(this.options.hidden_columns)
+           // xxx would be helpful to support a column_renamings options arg
+           // for redefining some labels like 'network_hrn' that really are not meaningful
            for (c in all_columns) {
                var column=all_columns[c];
-               this.slick_columns.push ( {id:column, name:column, field:column, width:100, minWidth:40, });
+               this.slick_columns.push ( {id:column, name:column, field:column, 
+                                          cssClass: "querytable-column-"+column,
+                                          width:100, minWidth:40, });
            }
 
            // xxx should be extensible from caller with this.options.slickgrid_options