tweak some stuff

This commit is contained in:
Lance Edgar 2012-08-10 14:56:33 -07:00
parent 4949ec8818
commit e5c3dc0c3e
3 changed files with 6 additions and 9 deletions

View file

@ -19,7 +19,7 @@
${h.form(request.current_route_url())} ${h.form(request.current_route_url())}
${h.hidden('departments', value='')} ${h.hidden('departments', value='')}
<div class="field-couple"> <div class="field-wrapper">
${h.hidden('vendor', value='')} ${h.hidden('vendor', value='')}
<label for="vendor-name">Vendor:</label> <label for="vendor-name">Vendor:</label>
${h.text('vendor-name', size='40', value='')} ${h.text('vendor-name', size='40', value='')}
@ -29,7 +29,7 @@ ${h.hidden('departments', value='')}
</div> </div>
</div> </div>
<div class="field-couple"> <div class="field-wrapper">
<label>Departments:</label> <label>Departments:</label>
<div class="grid"></div> <div class="grid"></div>
</div> </div>

View file

@ -88,9 +88,8 @@ class CustomersGrid(SearchableAlchemyGridView):
], ],
readonly=True) readonly=True)
def attrs(row, i): g.row_route_name = 'customer.read'
return {'onclick': "location.href = '%s';" g.row_route_kwargs = lambda x: {'uuid': x.uuid}
% self.request.route_url('customer.read', uuid=row.uuid)}
g.row_attrs = attrs g.row_attrs = attrs
return g return g

View file

@ -123,10 +123,8 @@ class ProductsGrid(SearchableAlchemyGridView):
], ],
readonly=True) readonly=True)
def attrs(row, i): g.row_route_name = 'product.read'
return {'onclick': "location.href = '%s';" g.row_route_kwargs = lambda x: {'uuid': x.uuid}
% self.request.route_url('product.read', uuid=row.uuid)}
g.row_attrs = attrs
if edbob.config.getboolean('rattail.labels', 'enabled', default=False): if edbob.config.getboolean('rattail.labels', 'enabled', default=False):
def labels(row): def labels(row):