Added save function
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2021-10-22 15:41:44 +02:00
parent e6304d026c
commit 5c34d2a540
2 changed files with 6 additions and 2 deletions

View File

@ -16,14 +16,13 @@
<vn-button icon="add"
ng-click="$broadcast('addRow')"
vn-tooltip="Add new row">
<prepend>a</prepend>
</vn-button>
<vn-button icon="delete"
ng-click="$broadcast('addRow')"
vn-tooltip="Remove selected rows">
</vn-button>
<vn-button icon="save"
ng-click="$broadcast('addRow')"
ng-click="$ctrl.save()"
vn-tooltip="Save data">
</vn-button>
</div>

View File

@ -32,6 +32,11 @@ export default class SmartTableMenu extends Component {
body.appendChild($clone[0]);
}, null, 'body');
}
save() {
this.model.save()
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
}
}
SmartTableMenu.$inject = ['$element', '$scope', '$transclude'];