Refactory Buefy templates to use WholePage and ThisPage components

plus add `GridFilter.set_choices()` method
This commit is contained in:
Lance Edgar 2019-08-03 16:57:13 -05:00
parent c64fca852c
commit 1bb0330ab5
36 changed files with 806 additions and 613 deletions

View file

@ -107,19 +107,15 @@
% endif
</%def>
<%def name="modify_tailbone_grid()">
${parent.modify_tailbone_grid()}
<%def name="modify_this_page_vars()">
${parent.modify_this_page_vars()}
% if master.results_executable and request.has_perm('{}.execute_multiple'.format(permission_prefix)):
<script type="text/javascript">
TailboneForm.data = function() { return TailboneFormData }
TailboneForm.methods.submit = function() {
this.$refs.actualForm.submit()
}
Vue.component('tailbone-form', TailboneForm)
TailboneGridData.hasExecutionOptions = ${json.dumps(master.has_execution_options(batch))|n}
TailboneGridData.showExecutionOptions = false
@ -151,12 +147,26 @@
% endif
</%def>
<%def name="make_this_page_component()">
${parent.make_this_page_component()}
% if master.results_executable and request.has_perm('{}.execute_multiple'.format(permission_prefix)):
<script type="text/javascript">
TailboneForm.data = function() { return TailboneFormData }
Vue.component('tailbone-form', TailboneForm)
</script>
% endif
</%def>
<%def name="render_this_page_template()">
${parent.render_this_page_template()}
% if master.results_executable and request.has_perm('{}.execute_multiple'.format(permission_prefix)):
${execute_form.render_deform(form_kwargs={'ref': 'actualForm'}, buttons=False)|n}
% endif
</%def>
% if use_buefy:
% if master.results_executable and request.has_perm('{}.execute_multiple'.format(permission_prefix)):
${execute_form.render_deform(form_kwargs={'ref': 'actualForm'}, buttons=False)|n}
% endif
% endif
${parent.body()}