Fix section name validation alerting

This commit is contained in:
David Baumgold
2013-05-15 12:50:59 -04:00
parent 8e384a73be
commit 91c2594c8d
2 changed files with 5 additions and 5 deletions

View File

@@ -69,7 +69,7 @@ CMS.Views.Prompt = CMS.Views.Alert.extend({
}),
render: function() {
if(!window.$body) { window.$body = $(document.body); }
if(this.model.get('shown')) {
if(this.options.shown) {
$body.addClass('prompt-is-shown');
} else {
$body.removeClass('prompt-is-shown');

View File

@@ -59,16 +59,16 @@ CMS.Views.SectionEdit = Backbone.View.extend({
this.showView.render();
},
showErrorMessage: function(model, error, options) {
var that = this;
var msg = new CMS.Models.ErrorMessage({
title: "Validation Error",
message: error,
close: false,
icon: false,
actions: {
primary: {
text: "Dismiss",
click: function() {
this.hide();
click: function(view) {
view.hide();
that.$("input[type=text]").focus();
}
}
}