Add basic Buefy support for row grids

possibly even "complete" support...guess we'll see
This commit is contained in:
Lance Edgar 2019-05-06 19:53:59 -05:00
parent a3ca6abb7a
commit 9d6cc86e60
4 changed files with 51 additions and 17 deletions

View file

@ -6,17 +6,21 @@
<%def name="extra_javascript()">
${parent.extra_javascript()}
% if master.has_rows:
% if use_buefy:
${h.javascript_link(request.static_url('tailbone:static/js/tailbone.buefy.gridfilters.js') + '?ver={}'.format(tailbone.__version__))}
% else:
<script type="text/javascript">
$(function() {
$('.grid-wrapper').gridwrapper();
});
</script>
% endif
% endif
</%def>
<%def name="extra_styles()">
${parent.extra_styles()}
% if master.has_rows:
% if master.has_rows and not use_buefy:
<style type="text/css">
.grid-wrapper {
margin-top: 10px;
@ -83,5 +87,12 @@
</div>
% if master.has_rows:
${rows_grid|n}
% if use_buefy:
<br /><br />
## TODO: stop using |n filter
${rows_grid.render_buefy(allow_save_defaults=False, tools=rows_grid_tools)|n}
% else:
## no buefy, so do the traditional thing
${rows_grid|n}
% endif
% endif