Revision 2506f741 ui/static/snf/js/models.js
b/ui/static/snf/js/models.js | ||
---|---|---|
77 | 77 |
|
78 | 78 |
remove: function() { |
79 | 79 |
this.api.call(this.api_path(), "delete"); |
80 |
}, |
|
81 |
|
|
82 |
changedKeys: function() { |
|
83 |
return _.keys(this.changedAttributes() || {}); |
|
84 |
}, |
|
85 |
|
|
86 |
hasOnlyChange: function(keys) { |
|
87 |
var ret = false; |
|
88 |
_.each(keys, _.bind(function(key) { |
|
89 |
if (this.changedKeys().length == 1 && this.changedKeys().indexOf(key) > -1) { ret = true}; |
|
90 |
}, this)); |
|
91 |
return ret; |
|
80 | 92 |
} |
81 | 93 |
|
82 | 94 |
}) |
Also available in: Unified diff