Creating a notification mechanism
This commit is contained in:
1 parent
06fe7f0da7
commit
820b2efd88
10 files changed
+217
-2
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')}}Cancel{{/button}}
|
||||
{{#button class='btn btn-default pull-right m-r-1' tagAttributes=(extend '' data-dismiss='modal')}}Close{{/button}}
|
||||
</div>
|
||||
{{/form}}
|
||||
</template>
|
||||
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user