Minor improvements on notifications mechanism

This commit is contained in:
Bruno Alves de Faria committed 2017-09-29 14:01:39 -03:00
1 parent 4efa774cd3
commit 7641d6e9af
4 files changed
+9 -5

No files matched your search

@@ -15,7 +15,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-default pull-right m-r-1' tagAttributes=(extend '' data-dismiss='modal')}}Close{{/button}}
{{#button class='btn btn-secondary pull-right m-r-1' tagAttributes=(extend '' data-dismiss='modal')}}Close{{/button}}
</div>
{{/form}}
</template>
@@ -12,9 +12,8 @@ Template.hotkeysForm.onCreated(() => {
const form = instance.$('form').first().data('component');
const definitions = form.value();
const promise = OHIF.hotkeys.store(contextName, definitions);
promise.then(() => OHIF.ui.notifications.show({
text: 'The keyboard shortcut preferences were successfully saved.',
style: 'success'
promise.then(() => OHIF.ui.notifications.success({
text: 'The keyboard shortcut preferences were successfully saved.'
}));
return promise;
},