From 3f6d5daa1e84697976d54e3260b16ec835231dfd Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 8 Jun 2019 14:26:33 -0500 Subject: [PATCH] More Buefy tweaks, for file upload, and "edit batch" generally --- tailbone/forms/core.py | 4 -- tailbone/templates/batch/edit.mako | 58 +----------------------- tailbone/templates/deform/file_upload.pt | 25 +++++----- 3 files changed, 14 insertions(+), 73 deletions(-) diff --git a/tailbone/forms/core.py b/tailbone/forms/core.py index 4f94163c..5d1ef763 100644 --- a/tailbone/forms/core.py +++ b/tailbone/forms/core.py @@ -766,10 +766,6 @@ class Form(object): model value for the given field. This JS will be written as part of the overall response, to be interpreted on the client side. """ - if isinstance(field.schema.typ, colander.Date): - # TODO: don't recall why "always null" here? - return 'null' - if isinstance(field.schema.typ, deform.FileData): # TODO: don't recall why "always null" here? return 'null' diff --git a/tailbone/templates/batch/edit.mako b/tailbone/templates/batch/edit.mako index 868c8fff..4d9e990e 100644 --- a/tailbone/templates/batch/edit.mako +++ b/tailbone/templates/batch/edit.mako @@ -1,59 +1,3 @@ ## -*- coding: utf-8; -*- <%inherit file="/master/edit.mako" /> - -<%def name="extra_javascript()"> - ${parent.extra_javascript()} - ${h.javascript_link(request.static_url('tailbone:static/js/tailbone.batch.js'))} - - - -<%def name="extra_styles()"> - ${parent.extra_styles()} - - - -<%def name="buttons()"> -
- % if master.refreshable: - ${h.submit('save-refresh', "Save & Refresh Data")} - % endif - % if not batch.executed and request.has_perm('{}.execute'.format(permission_prefix)): - - % endif -
- - -<%def name="grid_tools()"> - % if not batch.executed: -

${h.link_to("Delete all rows matching current search", url('{}.delete_rows'.format(route_prefix), uuid=batch.uuid))}

- % endif - - -
- -
- ${form.render()|n} -
- - - -
+${parent.body()} diff --git a/tailbone/templates/deform/file_upload.pt b/tailbone/templates/deform/file_upload.pt index 8daab2f8..1471199b 100644 --- a/tailbone/templates/deform/file_upload.pt +++ b/tailbone/templates/deform/file_upload.pt @@ -24,19 +24,20 @@
+ tal:define="vmodel vmodel|'field_model_' + field_name;"> ${field.start_mapping()} - - - - Click to upload - - - - {{ ${vmodel}.name }} - + + + + + Click to upload + + + + {{ ${vmodel}.name }} + + ${field.end_mapping()}