cartodb-4.42/lib/assets/javascripts/builder/data/vis-metadata-model.js
2024-04-06 05:25:13 +00:00

23 lines
386 B
JavaScript
Executable File

var Backbone = require('backbone');
/**
* Edit vis metadata dialog model
* to control if name and metadata
* are editable or not.
*
*/
module.exports = Backbone.Model.extend({
defaults: {
name: ''
},
validate: function (attrs) {
if (!attrs) return;
if (!attrs.name) {
return _t('components.modals.maps-metadata.validation.error.name');
}
}
});