Changeset 1040 for trunk/web-app


Ignore:
Timestamp:
Nov 1, 2010, 6:11:23 PM (10 years ago)
Author:
j.a.m.wesbeek@…
Message:
  • made column widths changeable by adding:

columnWidths="[Name:200, Species: 150, MyColumnName: 300]"

where the key is the CamelCased? column name without spaces (and info)
resolves issue #152

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web-app/js/wizard.js

    r1037 r1040  
    248248        var column = 0;
    249249        var columns = [];
     250        var resized = [];
    250251
    251252        // calculate total width of elements in header
     
    265266
    266267            // remember column
     268            resized[ column ] = (c.attr('rel') == 'resized');
    267269            columns[ column ] = c.width();
    268270            column++;
     
    278280            var column = 0;
    279281            row.children().each(function() {
    280                 $(this).css({ width: columns[ column] + 'px' });
     282                var child = $(this);
     283                child.css({ width: columns[ column] + 'px' });
     284                if (resized[ column ]) {
     285                    $(':input',child).each(function() {
     286                        $(this).css({width: (columns[ column ] - 10) + 'px'});
     287                    });
     288                }
    281289                column++;
    282290            });
Note: See TracChangeset for help on using the changeset viewer.