mirror of
https://github.com/nasa/openmct.git
synced 2025-06-21 00:23:01 +00:00
[New Edit Mode] JSLint
This commit is contained in:
@ -163,8 +163,8 @@ define(
|
|||||||
// this is introduced by EditableDomainObject which is
|
// this is introduced by EditableDomainObject which is
|
||||||
// used to insulate underlying objects from changes made
|
// used to insulate underlying objects from changes made
|
||||||
// during editing.
|
// during editing.
|
||||||
|
/*jshint es5: true */
|
||||||
function doSave() {
|
function doSave() {
|
||||||
//WARNING: HACK
|
|
||||||
//This is a new 'virtual object' that has not been persisted
|
//This is a new 'virtual object' that has not been persisted
|
||||||
// yet.
|
// yet.
|
||||||
if (!domainObject.getModel().persisted){
|
if (!domainObject.getModel().persisted){
|
||||||
@ -178,7 +178,7 @@ define(
|
|||||||
.then(function(){
|
.then(function(){
|
||||||
return fetchObject(domainObject.getId());
|
return fetchObject(domainObject.getId());
|
||||||
})
|
})
|
||||||
.catch(doNothing)
|
.catch(doNothing);
|
||||||
} else {
|
} else {
|
||||||
return domainObject.getCapability("editor").save()
|
return domainObject.getCapability("editor").save()
|
||||||
.then(resolveWith(domainObject.getOriginalObject()));
|
.then(resolveWith(domainObject.getOriginalObject()));
|
||||||
|
@ -65,15 +65,13 @@ define(
|
|||||||
|
|
||||||
// A view is editable unless explicitly flagged as not
|
// A view is editable unless explicitly flagged as not
|
||||||
(views || []).forEach(function (view) {
|
(views || []).forEach(function (view) {
|
||||||
if (view.editable===false || (applicableView(view.key) && !editableType(type.getKey()))){
|
if (view.editable===true && !(applicableView(view.key) && !editableType(type.getKey()))){
|
||||||
// Do nothing
|
|
||||||
} else {
|
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the domain object is currently being edited. If
|
* Checks whether the domain object is currently being edited. If
|
||||||
|
Reference in New Issue
Block a user