diff --git a/app/assets/javascripts/admin/controllers/change_site_customization_details_controller.js b/app/assets/javascripts/admin/controllers/change_site_customization_details_controller.js index 7fe0d014f08..121fb2a0032 100644 --- a/app/assets/javascripts/admin/controllers/change_site_customization_details_controller.js +++ b/app/assets/javascripts/admin/controllers/change_site_customization_details_controller.js @@ -1,5 +1,6 @@ /** - The modal for viewing the details of a staff action log record. + The modal for viewing the details of a staff action log record + for when a site customization is created or changed. @class ChangeSiteCustomizationDetailsController @extends Discourse.Controller diff --git a/app/assets/javascripts/admin/controllers/delete_site_customization_details_controller.js b/app/assets/javascripts/admin/controllers/delete_site_customization_details_controller.js new file mode 100644 index 00000000000..53a54c5054b --- /dev/null +++ b/app/assets/javascripts/admin/controllers/delete_site_customization_details_controller.js @@ -0,0 +1,15 @@ +/** + The modal for viewing the details of a staff action log record + for when a site customization is deleted. + + @class DeleteSiteCustomizationDetailsController + @extends Discourse.Controller + @namespace Discourse + @uses Discourse.ModalFunctionality + @module Discourse +**/ +Discourse.DeleteSiteCustomizationDetailsController = Discourse.ChangeSiteCustomizationDetailsController.extend({ + onShow: function() { + this.selectPrevious(); + } +}); diff --git a/app/assets/javascripts/admin/models/staff_action_log.js b/app/assets/javascripts/admin/models/staff_action_log.js index aa5a93ea6f4..93484194365 100644 --- a/app/assets/javascripts/admin/models/staff_action_log.js +++ b/app/assets/javascripts/admin/models/staff_action_log.js @@ -33,7 +33,7 @@ Discourse.StaffActionLog = Discourse.Model.extend({ }, useModalForDetails: function() { - return (this.get('action_name') === 'change_site_customization'); + return _.contains(['change_site_customization', 'delete_site_customization'], this.get('action_name')); }.property('action_name') }); diff --git a/app/assets/javascripts/admin/templates/logs/site_customization_change_modal.js.handlebars b/app/assets/javascripts/admin/templates/logs/site_customization_change_modal.js.handlebars index ca30597ed67..5d0e96ab3ab 100644 --- a/app/assets/javascripts/admin/templates/logs/site_customization_change_modal.js.handlebars +++ b/app/assets/javascripts/admin/templates/logs/site_customization_change_modal.js.handlebars @@ -9,9 +9,13 @@