Fix "refresh results" for batches, in Buefy theme
This commit is contained in:
parent
e0d1e39824
commit
dc1f613bc2
|
@ -81,10 +81,15 @@
|
|||
% if master.results_refreshable and master.has_perm('refresh'):
|
||||
% if use_buefy:
|
||||
<b-button type="is-primary"
|
||||
disabled
|
||||
title="TODO: need to implement this for new theme">
|
||||
Refresh Results
|
||||
:disabled="refreshResultsButtonDisabled"
|
||||
icon-pack="fas"
|
||||
icon-left="fas fa-redo"
|
||||
@click="refreshResults()">
|
||||
{{ refreshResultsButtonText }}
|
||||
</b-button>
|
||||
${h.form(url('{}.refresh_results'.format(route_prefix)), ref='refreshResultsForm')}
|
||||
${h.csrf_token(request)}
|
||||
${h.end_form()}
|
||||
% else:
|
||||
<button type="button" id="refresh-results-button">
|
||||
Refresh Results
|
||||
|
@ -148,6 +153,15 @@
|
|||
% if master.results_executable and master.has_perm('execute_multiple'):
|
||||
<script type="text/javascript">
|
||||
|
||||
TailboneGridData.refreshResultsButtonText = "Refresh Results"
|
||||
TailboneGridData.refreshResultsButtonDisabled = false
|
||||
|
||||
TailboneGrid.methods.refreshResults = function() {
|
||||
this.refreshResultsButtonDisabled = true
|
||||
this.refreshResultsButtonText = "Working, please wait..."
|
||||
this.$refs.refreshResultsForm.submit()
|
||||
}
|
||||
|
||||
${execute_form.component_studly}.methods.submit = function() {
|
||||
this.$refs.actualExecuteForm.submit()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue