Tuesday morning, 10AM
This commit is contained in:
@@ -1,12 +1,30 @@
|
||||
import RestModel from 'discourse/models/rest';
|
||||
|
||||
const Query = RestModel.extend({
|
||||
let Query;
|
||||
Query = RestModel.extend({
|
||||
dirty: false,
|
||||
|
||||
markDirty: function() {
|
||||
this.set('dirty', true);
|
||||
}.observes('name', 'description', 'sql', 'defaults'),
|
||||
|
||||
markNotDirty() {
|
||||
this.set('dirty', false);
|
||||
},
|
||||
|
||||
listName: function() {
|
||||
if (this.get('dirty')) {
|
||||
return this.get('name') + " (*)";
|
||||
}
|
||||
return this.get('name');
|
||||
}.property('name', 'dirty'),
|
||||
|
||||
createProperties() {
|
||||
return this.getProperties("name");
|
||||
},
|
||||
|
||||
updateProperties() {
|
||||
return this.getProperties("name", "description", "sql", "defaults");
|
||||
return this.getProperties(Query.updatePropertyNames);
|
||||
},
|
||||
|
||||
run() {
|
||||
@@ -14,4 +32,8 @@ const Query = RestModel.extend({
|
||||
}
|
||||
});
|
||||
|
||||
Query.reopenClass({
|
||||
updatePropertyNames: ["name", "description", "sql", "defaults"]
|
||||
});
|
||||
|
||||
export default Query;
|
||||
|
||||
Reference in New Issue
Block a user