|
|
|
@ -12,8 +12,6 @@ Complex animated column editor for the table edit page |
|
|
|
|
<th :style="tdWidthStyle('name')">Name</th> |
|
|
|
|
<th :style="tdWidthStyle('type')">Type</th> |
|
|
|
|
<th :style="tdWidthStyle('title')">Title</th> |
|
|
|
|
<th v-if="!newTable"></th> |
|
|
|
|
<th></th> |
|
|
|
|
<th></th> |
|
|
|
|
</tr> |
|
|
|
|
</thead> |
|
|
|
@ -74,27 +72,22 @@ Complex animated column editor for the table edit page |
|
|
|
|
</td> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<td v-if="!newTable"> |
|
|
|
|
<!-- Save button --> |
|
|
|
|
<a href="" :class="['btn','btn-outline-secondary',{'disabled': col._remove}]" |
|
|
|
|
<td class="text-nowrap"><!-- |
|
|
|
|
Save button |
|
|
|
|
--><a href="" :class="['mr-1','btn','btn-outline-secondary',{'disabled': col._remove}]" |
|
|
|
|
v-if="!newTable" |
|
|
|
|
@click.prevent="toggleColEditing(col)"> |
|
|
|
|
<v-icon :class="col._editing ? 'fa-save' : 'fa-pencil'" |
|
|
|
|
:alt="col._editing ? 'Save' : 'Edit'" /> |
|
|
|
|
</a> |
|
|
|
|
</td> |
|
|
|
|
|
|
|
|
|
<td> |
|
|
|
|
<!-- Delete button --> |
|
|
|
|
<button type="button" :class="delBtnClass(col)" |
|
|
|
|
</a><!-- |
|
|
|
|
Delete button |
|
|
|
|
--><button type="button" :class="delBtnClass(col)" |
|
|
|
|
@click.prevent="toggleColDelete(col)"> |
|
|
|
|
<v-icon :class="col._remove ? 'fa-undo' : 'fa-trash-o'" |
|
|
|
|
:alt="col._remove ? 'Undo Remove' : 'Remove'" /> |
|
|
|
|
</button> |
|
|
|
|
</td> |
|
|
|
|
|
|
|
|
|
<td> |
|
|
|
|
<!-- Add button --> |
|
|
|
|
<button type="button" :class="['btn', 'btn-outline-secondary']" |
|
|
|
|
</button><!-- |
|
|
|
|
Add button |
|
|
|
|
--><button type="button" :class="['x-add-btn', 'btn', 'btn-outline-secondary']" |
|
|
|
|
v-if="i === columns.length - 1" |
|
|
|
|
@click.prevent="addCol()"> |
|
|
|
|
<v-icon class="fa-plus" alt="Add Column" /> |
|
|
|
@ -151,6 +144,7 @@ Complex animated column editor for the table edit page |
|
|
|
|
// approximate position of delete button |
|
|
|
|
clip-path: circle(calc(100% + 5em) at calc(100% - 4em) 50%); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.col-list-leave-active .delete-btn { |
|
|
|
|
animation: col-list-leave-delete-btn .3s forwards; |
|
|
|
|
} |
|
|
|
@ -312,6 +306,7 @@ export default { |
|
|
|
|
/** Compute classes for the column's delete button */ |
|
|
|
|
delBtnClass(col) { |
|
|
|
|
return [ |
|
|
|
|
'mr-1', |
|
|
|
|
'btn', |
|
|
|
|
'btn-outline-danger', |
|
|
|
|
'delete-btn', |
|
|
|
|