cartodb/lib/assets/javascripts/builder/data/vis-metadata-model.js

23 lines
386 B
JavaScript
Raw Normal View History

2020-06-15 10:58:47 +08:00
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');
}
}
});