mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 22:28:13 +00:00
[Common UI] Initial commonUI bundles
Bring in work on general-purpose and over-arching user interface bundles from the sandbox transition branch. WTD-574.
This commit is contained in:
@ -0,0 +1,30 @@
|
||||
/*global define*/
|
||||
|
||||
/**
|
||||
* Editable Persistence Capability. Overrides the persistence capability
|
||||
* normally exhibited by a domain object to ensure that changes made
|
||||
* during edit mode are not immediately stored to the database or other
|
||||
* backing storage.
|
||||
*/
|
||||
define(
|
||||
function () {
|
||||
'use strict';
|
||||
|
||||
return function EditablePersistenceCapability(
|
||||
persistenceCapability,
|
||||
editableObject,
|
||||
domainObject,
|
||||
cache
|
||||
) {
|
||||
var persistence = Object.create(persistenceCapability);
|
||||
|
||||
// Simply trigger refresh of in-view objects; do not
|
||||
// write anything to database.
|
||||
persistence.persist = function () {
|
||||
cache.markDirty(editableObject);
|
||||
};
|
||||
|
||||
return persistence;
|
||||
};
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user