Improving window level presets preferences
This commit is contained in:
parent
b9b9a0f00d
commit
ac69233025
@ -1,5 +1,5 @@
|
||||
<template name="windowLevelPresetsForm">
|
||||
{{#form (extend this api=instance.api class='form-themed')}}
|
||||
{{#form (extend api=instance.api class='form-themed')}}
|
||||
<div class="form-content">
|
||||
<table class="full-width">
|
||||
<thead>
|
||||
@ -25,6 +25,7 @@
|
||||
<div class="form-buttons clearfix">
|
||||
{{#button class='btn btn-danger pull-left' action='resetDefaults'}}Reset to Defaults{{/button}}
|
||||
{{#button class='btn btn-primary pull-right' action='save'}}Save{{/button}}
|
||||
{{#button class='btn btn-secondary pull-right m-r-1' tagAttributes=(extend '' data-dismiss='modal')}}Close{{/button}}
|
||||
</div>
|
||||
{{/form}}
|
||||
</template>
|
||||
|
||||
@ -10,7 +10,11 @@ Template.windowLevelPresetsForm.onCreated(() => {
|
||||
save() {
|
||||
const form = instance.$('form').first().data('component');
|
||||
const definitions = form.value();
|
||||
wlPresets.store(definitions);
|
||||
const promise = wlPresets.store(definitions);
|
||||
promise.then(() => OHIF.ui.notifications.success({
|
||||
text: 'The Window/Levels preferences were successfully saved.'
|
||||
}));
|
||||
return promise;
|
||||
},
|
||||
|
||||
resetDefaults() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user