32 lines
737 B
JavaScript
32 lines
737 B
JavaScript
/**
|
|
* DO NOT EDIT THIS FILE.
|
|
* See the following change record for more information,
|
|
* https://www.drupal.org/node/2815083
|
|
* @preserve
|
|
**/
|
|
|
|
(function (Drupal, Backbone) {
|
|
Drupal.quickedit.BaseModel = Backbone.Model.extend({
|
|
initialize(options) {
|
|
this.__initialized = true;
|
|
return Backbone.Model.prototype.initialize.call(this, options);
|
|
},
|
|
|
|
set(key, val, options) {
|
|
if (this.__initialized) {
|
|
if (typeof key === 'object') {
|
|
key.validate = true;
|
|
} else {
|
|
if (!options) {
|
|
options = {};
|
|
}
|
|
|
|
options.validate = true;
|
|
}
|
|
}
|
|
|
|
return Backbone.Model.prototype.set.call(this, key, val, options);
|
|
}
|
|
|
|
});
|
|
})(Drupal, Backbone); |