Commit ec02a4f3 by Brian Talbot Committed by Peter Fogg

Studio: changed the copy and prompt type for unit + outline deletions

parent fb0fcc31
...@@ -67,8 +67,8 @@ class CMS.Views.UnitEdit extends Backbone.View ...@@ -67,8 +67,8 @@ class CMS.Views.UnitEdit extends Backbone.View
type = $(event.currentTarget).data('type') type = $(event.currentTarget).data('type')
@$newComponentTypePicker.slideUp(250) @$newComponentTypePicker.slideUp(250)
@$(".new-component-#{type}").slideDown(250) @$(".new-component-#{type}").slideDown(250)
$('html, body').animate({ $('html, body').animate({
scrollTop: @$(".new-component-#{type}").offset().top scrollTop: @$(".new-component-#{type}").offset().top
}, 500) }, 500)
closeNewComponent: (event) => closeNewComponent: (event) =>
...@@ -115,12 +115,12 @@ class CMS.Views.UnitEdit extends Backbone.View ...@@ -115,12 +115,12 @@ class CMS.Views.UnitEdit extends Backbone.View
@model.save() @model.save()
deleteComponent: (event) => deleteComponent: (event) =>
msg = new CMS.Views.Prompt.Confirmation( msg = new CMS.Views.Prompt.Warning(
title: gettext('Are you sure you want to delete this component?'), title: gettext('Delete this component?'),
message: gettext('This action cannot be undone.'), message: gettext('Deleting this component is permanent and cannot be undone.'),
actions: actions:
primary: primary:
text: gettext('OK'), text: gettext('Yes, delete this component'),
click: (view) => click: (view) =>
view.hide() view.hide()
deleting = new CMS.Views.Notification.Mini deleting = new CMS.Views.Notification.Mini
...@@ -252,7 +252,7 @@ class CMS.Views.UnitEdit.NameEdit extends Backbone.View ...@@ -252,7 +252,7 @@ class CMS.Views.UnitEdit.NameEdit extends Backbone.View
class CMS.Views.UnitEdit.LocationState extends Backbone.View class CMS.Views.UnitEdit.LocationState extends Backbone.View
initialize: => initialize: =>
@model.on('change:state', @render) @model.on('change:state', @render)
render: => render: =>
@$el.toggleClass("#{@model.previous('state')}-item #{@model.get('state')}-item") @$el.toggleClass("#{@model.previous('state')}-item #{@model.get('state')}-item")
......
...@@ -370,12 +370,12 @@ function deleteSection(e) { ...@@ -370,12 +370,12 @@ function deleteSection(e) {
} }
function _deleteItem($el, type) { function _deleteItem($el, type) {
var confirm = new CMS.Views.Prompt.Confirmation({ var confirm = new CMS.Views.Prompt.Warning({
title: gettext('Are you sure you wish to delete this ' + type + '?'), title: gettext('Delete this ' + type + '?'),
message: gettext('It cannot be reversed!'), message: gettext('Deleting this ' + type + ' is permanent and cannot be undone.'),
actions: { actions: {
primary: { primary: {
text: gettext('OK'), text: gettext('Yes, delete this ' + type),
click: function(view) { click: function(view) {
view.hide(); view.hide();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment