Loading config/install/toastr.settings.yml +1 −0 Changes for config/install/toastr.settings.yml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -13,3 +13,4 @@ toastr_extended_timeout: 10000 toastr_show_duration: 300 toastr_hide_duration: 1000 toastr_leave_errors: 1 toastr_tap_to_dismiss: 1 config/schema/toastr.schema.yml +3 −0 Changes for config/schema/toastr.schema.yml: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -47,3 +47,6 @@ toastr.settings: toastr_leave_errors: type: boolean label: 'Do not hide error messages' toastr_tap_to_dismiss: type: boolean label: 'Tap to dismiss' js/messages.js +2 −1 Changes for js/messages.js: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -23,7 +23,8 @@ "showEasing": settings.toastr.settings.toastr_show_easing, "hideEasing": settings.toastr.settings.toastr_hide_easing, "showMethod": settings.toastr.settings.toastr_show_method, "hideMethod": settings.toastr.settings.toastr_hide_method "hideMethod": settings.toastr.settings.toastr_hide_method, "tapToDismiss": settings.toastr.settings.toastr_tap_to_dismiss }; var toastr_message_type = type; if (type === 'status') { Loading src/Form/ToastrSettingsForm.php +10 −0 Changes for src/Form/ToastrSettingsForm.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ class ToastrSettingsForm extends ConfigFormBase { 'toastr_show_duration' => 300, 'toastr_hide_duration' => 1000, 'toastr_leave_errors' => 1, 'toastr_tap_to_dismiss' => TRUE, ]; } Loading Loading @@ -217,6 +218,15 @@ class ToastrSettingsForm extends ConfigFormBase { '#default_value' => $this->getConfigValue('toastr_leave_errors'), '#return_value' => 1, ]; $form['toastr_tap_to_dismiss'] = [ '#title' => $this->t('Tap to dismiss'), '#description' => $this->t('If enabled the message will disappear on tap'), '#type' => 'checkbox', '#default_value' => $this->getConfigValue('toastr_tap_to_dismiss'), '#return_value' => 1, ]; return parent::buildForm($form, $form_state); } Loading Loading
config/install/toastr.settings.yml +1 −0 Changes for config/install/toastr.settings.yml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -13,3 +13,4 @@ toastr_extended_timeout: 10000 toastr_show_duration: 300 toastr_hide_duration: 1000 toastr_leave_errors: 1 toastr_tap_to_dismiss: 1
config/schema/toastr.schema.yml +3 −0 Changes for config/schema/toastr.schema.yml: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -47,3 +47,6 @@ toastr.settings: toastr_leave_errors: type: boolean label: 'Do not hide error messages' toastr_tap_to_dismiss: type: boolean label: 'Tap to dismiss'
js/messages.js +2 −1 Changes for js/messages.js: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -23,7 +23,8 @@ "showEasing": settings.toastr.settings.toastr_show_easing, "hideEasing": settings.toastr.settings.toastr_hide_easing, "showMethod": settings.toastr.settings.toastr_show_method, "hideMethod": settings.toastr.settings.toastr_hide_method "hideMethod": settings.toastr.settings.toastr_hide_method, "tapToDismiss": settings.toastr.settings.toastr_tap_to_dismiss }; var toastr_message_type = type; if (type === 'status') { Loading
src/Form/ToastrSettingsForm.php +10 −0 Changes for src/Form/ToastrSettingsForm.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ class ToastrSettingsForm extends ConfigFormBase { 'toastr_show_duration' => 300, 'toastr_hide_duration' => 1000, 'toastr_leave_errors' => 1, 'toastr_tap_to_dismiss' => TRUE, ]; } Loading Loading @@ -217,6 +218,15 @@ class ToastrSettingsForm extends ConfigFormBase { '#default_value' => $this->getConfigValue('toastr_leave_errors'), '#return_value' => 1, ]; $form['toastr_tap_to_dismiss'] = [ '#title' => $this->t('Tap to dismiss'), '#description' => $this->t('If enabled the message will disappear on tap'), '#type' => 'checkbox', '#default_value' => $this->getConfigValue('toastr_tap_to_dismiss'), '#return_value' => 1, ]; return parent::buildForm($form, $form_state); } Loading