Merge branch 'master' into persist-on-mutation-825
Conflicts: platform/core/src/capabilities/PersistenceCapability.js platform/features/timeline/src/controllers/swimlane/TimelineSwimlaneDropHandler.js
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global define*/
|
||||
|
||||
define([
|
||||
"./src/actions/MoveAction",
|
||||
@@ -56,7 +55,6 @@ define([
|
||||
LocationService,
|
||||
legacyRegistry
|
||||
) {
|
||||
"use strict";
|
||||
|
||||
legacyRegistry.register("platform/entanglement", {
|
||||
"name": "Entanglement",
|
||||
|
||||
@@ -20,10 +20,8 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Common interface exposed by services which support move, copy,
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
define(
|
||||
['./AbstractComposeAction'],
|
||||
function (AbstractComposeAction) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* The CopyAction is available from context menus and allows a user to
|
||||
|
||||
@@ -20,10 +20,8 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Implements the "Go To Original" action, which follows a link back
|
||||
@@ -52,8 +50,8 @@ define(
|
||||
|
||||
GoToOriginalAction.appliesTo = function (context) {
|
||||
var domainObject = context.domainObject;
|
||||
return domainObject && domainObject.hasCapability("location")
|
||||
&& domainObject.getCapability("location").isLink();
|
||||
return domainObject && domainObject.hasCapability("location") &&
|
||||
domainObject.getCapability("location").isLink();
|
||||
};
|
||||
|
||||
return GoToOriginalAction;
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
define(
|
||||
['./AbstractComposeAction'],
|
||||
function (AbstractComposeAction) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* The LinkAction is available from context menus and allows a user to
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
define(
|
||||
['./AbstractComposeAction'],
|
||||
function (AbstractComposeAction) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* The MoveAction is available from context menus and allows a user to
|
||||
|
||||
@@ -20,10 +20,8 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Implements the "Set Primary Location" action, which sets a
|
||||
@@ -50,8 +48,8 @@ define(
|
||||
|
||||
SetPrimaryLocationAction.appliesTo = function (context) {
|
||||
var domainObject = context.domainObject;
|
||||
return domainObject && domainObject.hasCapability("location")
|
||||
&& (domainObject.getModel().location === undefined);
|
||||
return domainObject && domainObject.hasCapability("location") &&
|
||||
(domainObject.getModel().location === undefined);
|
||||
};
|
||||
|
||||
return SetPrimaryLocationAction;
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* The location capability allows a domain object to know its current
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
define([], function () {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Disallow duplication when the object to be duplicated is not
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
'use strict';
|
||||
|
||||
var DISALLOWED_ACTIONS = [
|
||||
"move",
|
||||
@@ -50,8 +48,7 @@ define(
|
||||
|
||||
function isCrossSpace(context) {
|
||||
var domainObject = context.domainObject,
|
||||
selectedObject = context.selectedObject,
|
||||
spaces = [ domainObject, selectedObject ].map(lookupSpace);
|
||||
selectedObject = context.selectedObject;
|
||||
return selectedObject !== undefined &&
|
||||
domainObject !== undefined &&
|
||||
lookupSpace(domainObject) !== lookupSpace(selectedObject);
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
define([], function () {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Disallow moves when either the parent or the child are not
|
||||
|
||||
@@ -20,12 +20,10 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
|
||||
define(
|
||||
[ "./CopyTask" ],
|
||||
function (CopyTask) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* CopyService provides an interface for deep copying objects from one
|
||||
|
||||
@@ -20,12 +20,10 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
|
||||
define(
|
||||
[],
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* This class encapsulates the process of copying a domain object
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* LinkService provides an interface for linking objects to additional
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Adds a `location` property to newly-created domain objects.
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Ensures that domain objects are loaded with a context capability
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
|
||||
/**
|
||||
* This bundle implements actions which control the location of objects
|
||||
@@ -29,7 +28,6 @@
|
||||
*/
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* The LocationService allows for easily prompting the user for a
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define */
|
||||
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
/**
|
||||
* MoveService provides an interface for moving objects from one
|
||||
* location to another. It also provides a method for determining if
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
/*global define,spyOn */
|
||||
|
||||
/*****************************************************************************
|
||||
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
||||
* as represented by the Administrator of the National Aeronautics and Space
|
||||
* Administration. All rights reserved.
|
||||
*
|
||||
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
* Open MCT Web includes source code licensed under additional open source
|
||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
/*global spyOn*/
|
||||
define(
|
||||
function () {
|
||||
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define, jasmine, */
|
||||
|
||||
/*global jasmine*/
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @typedef DomainObjectConfig
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect */
|
||||
|
||||
define(
|
||||
[
|
||||
@@ -29,7 +28,6 @@ define(
|
||||
'../DomainObjectFactory'
|
||||
],
|
||||
function (AbstractComposeAction, MockCopyService, domainObjectFactory) {
|
||||
"use strict";
|
||||
|
||||
describe("Move/copy/link Actions", function () {
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect,spyOn */
|
||||
|
||||
define(
|
||||
[
|
||||
@@ -29,7 +28,6 @@ define(
|
||||
'../DomainObjectFactory'
|
||||
],
|
||||
function (CopyAction, MockCopyService, domainObjectFactory) {
|
||||
"use strict";
|
||||
|
||||
describe("Copy Action", function () {
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect */
|
||||
|
||||
define(
|
||||
[
|
||||
@@ -29,7 +28,6 @@ define(
|
||||
'../ControlledPromise'
|
||||
],
|
||||
function (GoToOriginalAction, domainObjectFactory, ControlledPromise) {
|
||||
'use strict';
|
||||
|
||||
describe("The 'go to original' action", function () {
|
||||
var testContext,
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect */
|
||||
|
||||
define(
|
||||
[
|
||||
@@ -29,7 +28,6 @@ define(
|
||||
'../DomainObjectFactory'
|
||||
],
|
||||
function (LinkAction, MockLinkService, domainObjectFactory) {
|
||||
"use strict";
|
||||
|
||||
describe("Link Action", function () {
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect */
|
||||
|
||||
define(
|
||||
[
|
||||
@@ -29,7 +28,6 @@ define(
|
||||
'../DomainObjectFactory'
|
||||
],
|
||||
function (MoveAction, MockMoveService, domainObjectFactory) {
|
||||
"use strict";
|
||||
|
||||
describe("Move Action", function () {
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect */
|
||||
|
||||
define(
|
||||
[
|
||||
@@ -28,14 +27,12 @@ define(
|
||||
'../DomainObjectFactory'
|
||||
],
|
||||
function (SetPrimaryLocation, domainObjectFactory) {
|
||||
'use strict';
|
||||
|
||||
describe("The 'set primary location' action", function () {
|
||||
var testContext,
|
||||
testModel,
|
||||
testId,
|
||||
mockLocationCapability,
|
||||
mockContextCapability;
|
||||
mockLocationCapability;
|
||||
|
||||
beforeEach(function () {
|
||||
testId = "some-id";
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,it,expect,beforeEach,jasmine */
|
||||
|
||||
define(
|
||||
[
|
||||
@@ -29,7 +28,6 @@ define(
|
||||
'../ControlledPromise'
|
||||
],
|
||||
function (LocationCapability, domainObjectFactory, ControlledPromise) {
|
||||
'use strict';
|
||||
|
||||
describe("LocationCapability", function () {
|
||||
|
||||
|
||||
@@ -20,12 +20,10 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect,spyOn */
|
||||
define([
|
||||
'../../src/policies/CopyPolicy',
|
||||
'../DomainObjectFactory'
|
||||
], function (CopyPolicy, domainObjectFactory) {
|
||||
'use strict';
|
||||
|
||||
describe("CopyPolicy", function () {
|
||||
var testMetadata,
|
||||
|
||||
@@ -20,14 +20,12 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect,spyOn */
|
||||
define(
|
||||
[
|
||||
'../../src/policies/CrossSpacePolicy',
|
||||
'../DomainObjectFactory'
|
||||
],
|
||||
function (CrossSpacePolicy, domainObjectFactory) {
|
||||
"use strict";
|
||||
|
||||
describe("CrossSpacePolicy", function () {
|
||||
var mockAction,
|
||||
|
||||
@@ -20,12 +20,10 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect,spyOn */
|
||||
define([
|
||||
'../../src/policies/MovePolicy',
|
||||
'../DomainObjectFactory'
|
||||
], function (MovePolicy, domainObjectFactory) {
|
||||
'use strict';
|
||||
|
||||
describe("MovePolicy", function () {
|
||||
var testMetadata,
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect,spyOn */
|
||||
|
||||
define(
|
||||
[
|
||||
@@ -28,7 +27,6 @@ define(
|
||||
'../DomainObjectFactory'
|
||||
],
|
||||
function (CopyService, domainObjectFactory) {
|
||||
"use strict";
|
||||
|
||||
function synchronousPromise(value) {
|
||||
if (value && value.then) {
|
||||
@@ -126,10 +124,8 @@ define(
|
||||
|
||||
var mockQ,
|
||||
mockDeferred,
|
||||
creationService,
|
||||
createObjectPromise,
|
||||
copyService,
|
||||
mockNow,
|
||||
object,
|
||||
newParent,
|
||||
copyResult,
|
||||
@@ -174,7 +170,7 @@ define(
|
||||
'mockDeferred',
|
||||
['notify', 'resolve', 'reject']
|
||||
);
|
||||
mockDeferred.notify.andCallFake(function(notification){});
|
||||
mockDeferred.notify.andCallFake(function(){});
|
||||
mockDeferred.resolve.andCallFake(function(value){resolvedValue = value;});
|
||||
mockDeferred.promise = {
|
||||
then: function(callback){
|
||||
@@ -273,8 +269,7 @@ define(
|
||||
});
|
||||
|
||||
describe("on domainObject with composition", function () {
|
||||
var newObject,
|
||||
childObject,
|
||||
var childObject,
|
||||
objectClone,
|
||||
childObjectClone,
|
||||
compositionPromise;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect,spyOn */
|
||||
|
||||
define(
|
||||
[
|
||||
@@ -28,7 +27,6 @@ define(
|
||||
'../DomainObjectFactory'
|
||||
],
|
||||
function (CopyTask, domainObjectFactory) {
|
||||
'use strict';
|
||||
|
||||
var ID_A = "some-string-with-vaguely-uuidish-uniqueness",
|
||||
ID_B = "some-other-similarly-unique-string";
|
||||
@@ -189,8 +187,7 @@ define(
|
||||
|
||||
describe("copies object trees with multiple references to the" +
|
||||
" same object", function () {
|
||||
var model,
|
||||
mockDomainObjectB,
|
||||
var mockDomainObjectB,
|
||||
mockComposingObject,
|
||||
composingObjectModel,
|
||||
domainObjectClone,
|
||||
@@ -254,9 +251,7 @@ define(
|
||||
it(" and correctly updates child identifiers in object" +
|
||||
" arrays within models ", function () {
|
||||
var childA_ID = task.clones[0].getId(),
|
||||
childB_ID = task.clones[1].getId(),
|
||||
childC_ID = task.clones[3].getId(),
|
||||
childD_ID = task.clones[4].getId();
|
||||
childB_ID = task.clones[1].getId();
|
||||
|
||||
expect(domainObjectClone.model.objArr[0].id).not.toBe(ID_A);
|
||||
expect(domainObjectClone.model.objArr[0].id).toBe(childA_ID);
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect,spyOn */
|
||||
|
||||
define(
|
||||
[
|
||||
@@ -29,7 +28,6 @@ define(
|
||||
'../ControlledPromise'
|
||||
],
|
||||
function (LinkService, domainObjectFactory, ControlledPromise) {
|
||||
"use strict";
|
||||
|
||||
describe("LinkService", function () {
|
||||
|
||||
|
||||
@@ -20,14 +20,12 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect */
|
||||
|
||||
define(
|
||||
[
|
||||
'../../src/services/LocatingCreationDecorator'
|
||||
],
|
||||
function (LocatingCreationDecorator) {
|
||||
"use strict";
|
||||
|
||||
describe("LocatingCreationDecorator", function () {
|
||||
var mockCreationService,
|
||||
|
||||
@@ -20,14 +20,12 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect */
|
||||
|
||||
define(
|
||||
[
|
||||
'../../src/services/LocatingObjectDecorator'
|
||||
],
|
||||
function (LocatingObjectDecorator) {
|
||||
"use strict";
|
||||
|
||||
describe("LocatingObjectDecorator", function () {
|
||||
var mockContextualize,
|
||||
|
||||
@@ -20,14 +20,12 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect */
|
||||
|
||||
define(
|
||||
[
|
||||
'../../src/services/LocationService'
|
||||
],
|
||||
function (LocationService) {
|
||||
"use strict";
|
||||
|
||||
describe("LocationService", function () {
|
||||
var dialogService,
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,jasmine */
|
||||
|
||||
/*global jasmine*/
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* MockCopyService provides the same interface as the copyService,
|
||||
|
||||
@@ -20,14 +20,12 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,jasmine */
|
||||
|
||||
/*global jasmine*/
|
||||
define(
|
||||
[
|
||||
'../ControlledPromise'
|
||||
],
|
||||
function (ControlledPromise) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* MockLinkService provides the same interface as the linkService,
|
||||
@@ -65,7 +63,7 @@ define(
|
||||
]
|
||||
);
|
||||
|
||||
mockLinkService.perform.andCallFake(function (object, newParent) {
|
||||
mockLinkService.perform.andCallFake(function (object) {
|
||||
var performPromise = new ControlledPromise();
|
||||
|
||||
this.perform.mostRecentCall.promise = performPromise;
|
||||
|
||||
@@ -20,11 +20,9 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,jasmine */
|
||||
|
||||
/*global jasmine*/
|
||||
define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* MockMoveService provides the same interface as the moveService,
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
/*global define,describe,beforeEach,it,jasmine,expect,spyOn */
|
||||
define(
|
||||
[
|
||||
'../../src/services/MoveService',
|
||||
@@ -34,7 +33,6 @@ define(
|
||||
domainObjectFactory,
|
||||
ControlledPromise
|
||||
) {
|
||||
"use strict";
|
||||
|
||||
describe("MoveService", function () {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user