|
|
|
@ -20,7 +20,7 @@ Complex animated column editor for the table edit page |
|
|
|
|
<th :style="tdWidthStyle('type')">Type</th> |
|
|
|
|
<th :style="tdWidthStyle('title')">Title</th> |
|
|
|
|
<th> |
|
|
|
|
<a href="" type="button" v-if="!newTable" |
|
|
|
|
<a href="" type="button" v-if="!newTable && orderChanged" |
|
|
|
|
@click.prevent="resetOrder()" |
|
|
|
|
class="text-danger no-decoration"> |
|
|
|
|
Reset Order |
|
|
|
@ -205,10 +205,12 @@ export default { |
|
|
|
|
newTable: { type: Boolean, default: false }, |
|
|
|
|
name: { type: String, required: true }, |
|
|
|
|
xColumns: { type: Array, required: true }, |
|
|
|
|
orderChanged: { type: Boolean, default: false }, |
|
|
|
|
}, |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
newColNum: 0, |
|
|
|
|
orderChanged: this.orderChanged, |
|
|
|
|
columns: this.xColumns, |
|
|
|
|
colTypes: ['string', 'int', 'float', 'bool'], |
|
|
|
|
debouncedSortUpdate: _.debounce(() => this.submitColOrder(), 350) |
|
|
|
@ -225,6 +227,8 @@ export default { |
|
|
|
|
this.query ({ |
|
|
|
|
action: 'col.sort', |
|
|
|
|
order: ids, |
|
|
|
|
}, (resp) => { |
|
|
|
|
this.orderChanged = resp.data; |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -417,7 +421,8 @@ export default { |
|
|
|
|
this.query({ |
|
|
|
|
action: 'reset.col-order' |
|
|
|
|
}, (resp) => { |
|
|
|
|
this.columns = resp.data; |
|
|
|
|
this.columns = resp.data |
|
|
|
|
this.orderChanged = false |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|