Creating a notification mechanism

This commit is contained in:
Bruno Alves de Faria committed 2017-09-29 12:51:39 -03:00
1 parent 06fe7f0da7
commit 820b2efd88
10 files changed
+217 -2

No files matched your search

@@ -11,7 +11,12 @@ Template.hotkeysForm.onCreated(() => {
const { contextName } = instance.data;
const form = instance.$('form').first().data('component');
const definitions = form.value();
return OHIF.hotkeys.store(contextName, definitions);
const promise = OHIF.hotkeys.store(contextName, definitions);
promise.then(() => OHIF.ui.notifications.show({
text: 'The keyboard shortcut preferences were successfully saved.',
style: 'success'
}));
return promise;
},
resetDefaults() {