diff --git a/ckan/public/scripts/application.js b/ckan/public/scripts/application.js index 020ed65c267..e96f5ddc3e6 100644 --- a/ckan/public/scripts/application.js +++ b/ckan/public/scripts/application.js @@ -861,10 +861,9 @@ CKAN.View.ResourceAddLink = Backbone.View.extend({ else { // Cannot reliably preview this item - with no mimetype/format information, // can't guarantee it's not a remote binary file such as an executable. - var _msg = $('

We are unable to preview this type of resource: ' + resourceData.formatNormalized + '

'); my.showError({ - title: 'Unable to preview' - , message: _msg + title: 'Preview not available for data type: ' + resourceData.formatNormalized + , message: '' }); } }; @@ -929,7 +928,10 @@ CKAN.View.ResourceAddLink = Backbone.View.extend({ }; my.showError = function (error) { - var _html = '' + $.trim(error.title) + '
' + $.trim(error.message); + var _html = _.template( + '
<%= title %>
<%= message %>
' + , error + ); my.$dialog.html(_html); };