Show full version history within the "view" page

avoid full page loads when navigating version history
This commit is contained in:
Lance Edgar 2023-10-10 10:54:16 -05:00
parent 44112a3a4b
commit 4328b9e385
9 changed files with 498 additions and 130 deletions

View file

@ -254,7 +254,12 @@
% if column['field'] in grid.raw_renderers:
${grid.raw_renderers[column['field']]()}
% elif grid.is_linked(column['field']):
<a :href="props.row._action_url_view" v-html="props.row.${column['field']}"></a>
<a :href="props.row._action_url_view"
% if view_click_handler:
@click.prevent="${view_click_handler}"
% endif
v-html="props.row.${column['field']}">
</a>
% else:
<span v-html="props.row.${column['field']}"></span>
% endif
@ -274,6 +279,9 @@
% if action.click_handler:
@click.prevent="${action.click_handler}"
% endif
% if action.target:
target="${action.target}"
% endif
>
${action.render_icon()|n}
${action.render_label()|n}
@ -533,7 +541,7 @@
## TODO: i noticed buefy docs show using `async` keyword here,
## so now i am too. knowing nothing at all of if/how this is
## supposed to improve anything. we shall see i guess
async loadAsyncData(params, callback) {
async loadAsyncData(params, success, failure) {
if (params === undefined || params === null) {
params = new URLSearchParams(this.getBasicParams())
@ -551,14 +559,17 @@
this.lastItem = data.last_item
this.loading = false
this.checkedRows = this.locateCheckedRows(data.checked_rows)
if (callback) {
callback()
if (success) {
success()
}
})
.catch((error) => {
this.data = []
this.total = 0
this.loading = false
if (failure) {
failure()
}
throw error
})
},