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:
Victor Woeltjen
2016-05-19 11:41:08 -07:00
817 changed files with 1867 additions and 4586 deletions

View File

@@ -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*/
/**
* Defines constant values for use in timeline view.

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
'use strict';
// Conversion factors from time units to milliseconds
var SECONDS = 1000,

View File

@@ -19,10 +19,8 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([], function () {
"use strict";
/**
* A column containing references to other objects contained

View File

@@ -19,10 +19,8 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(["./ExportTimelineAsCSVTask"], function (ExportTimelineAsCSVTask) {
'use strict';
/**
* Implements the "Export Timeline as CSV" action.

View File

@@ -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,Promise*/
/**
* Module defining ExportTimelineAsCSVTask. Created by vwoeltje on 2/8/16.
@@ -28,7 +27,6 @@ define([
"./TimelineTraverser",
"./TimelineColumnizer"
], function (TimelineTraverser, TimelineColumnizer) {
"use strict";
/**
* Runs (and coordinates) the preparation and export of CSV data

View File

@@ -19,10 +19,8 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([], function () {
"use strict";
/**
* A column showing domain object identifiers.

View File

@@ -19,10 +19,8 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([], function () {
"use strict";
/**
* A column reflecting properties from domain object metadata.

View File

@@ -19,10 +19,8 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define([], function () {
"use strict";
/**
* A column showing relationships to activity modes.

View File

@@ -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,Promise*/
define([
"./IdColumn",
@@ -34,7 +33,6 @@ define([
MetadataColumn,
TimespanColumn
) {
'use strict';
/**
* A description of how to populate a given column within a

View File

@@ -19,10 +19,8 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Promise*/
define([], function () {
"use strict";
/**
* Builds a list of domain objects which should be included

View File

@@ -19,10 +19,8 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(['../TimelineFormatter'], function (TimelineFormatter) {
"use strict";
var FORMATTER = new TimelineFormatter();

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
'use strict';
/**
* Describes the time span of an activity object.

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['./ActivityTimespan'],
function (ActivityTimespan) {
'use strict';
/**
* Implements the `timespan` capability for Activity objects.

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Provides data to populate resource graphs associated
@@ -37,10 +35,10 @@ define(
getPointCount: function () {
return 0;
},
getDomainValue: function (index) {
getDomainValue: function () {
return 0;
},
getRangeValue: function (index) {
getRangeValue: function () {
return 0;
}
};

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Exposes costs associated with a subsystem mode.

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Provide points for a cumulative resource summary graph, using
@@ -57,7 +55,6 @@ define(
function initializeValues() {
var values = [],
slope = 0,
previous = 0,
i;
// Add a point (or points, if needed) reaching to the provided

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['./ResourceGraph', './CumulativeGraph'],
function (ResourceGraph, CumulativeGraph) {
'use strict';
/**
* Implements the `graph` capability for Timeline and

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
// Utility function to copy an array, sorted by a specific field
function sort(array, field) {

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
'use strict';
/**
* Describes the time span of a timeline object.
@@ -65,12 +63,12 @@ define(
}
// Set the duration associated with this object
function setDuration(value) {
function setDuration() {
// No-op; duration is implicit
}
// Set the end time associated with this object
function setEnd(value) {
function setEnd() {
// No-op; end time is implicit
}

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['./TimelineTimespan'],
function (TimelineTimespan) {
'use strict';
/**
* Implements the `timespan` capability for Timeline objects.

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Provides data to populate resource graphs associated

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Provide the resource utilization over time for a timeline

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Controller which support the Values view of Activity Modes.

View File

@@ -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(
[
@@ -32,7 +31,6 @@ define(
TimelineGraphPopulator,
TimelineDragPopulator
) {
'use strict';
/**
* Controller for the Timeline view.

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,moment*/
define(
[],
function () {
"use strict";
/**
* Controller for the `datetime` form control.

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Control for Gantt bars in a timeline view.

View File

@@ -19,11 +19,9 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
'use strict';
/**
* Controller for the graph area of a timeline view.

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
["../TimelineFormatter"],
function (TimelineFormatter) {
"use strict";
var FORMATTER = new TimelineFormatter();

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
["../TimelineFormatter"],
function (TimelineFormatter) {
"use strict";
var FORMATTER = new TimelineFormatter();

View File

@@ -19,14 +19,9 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['../TimelineFormatter'],
function (TimelineFormatter) {
"use strict";
var FORMATTER = new TimelineFormatter();
[],
function () {
/**
* Controls the pan-zoom state of a timeline view.
@@ -62,7 +57,8 @@ define(
function storeZoom() {
var isEditMode = $scope.commit &&
$scope.domainObject &&
$scope.domainObject.hasCapability('editor');
$scope.domainObject.hasCapability('editor') &&
$scope.domainObject.getCapability('editor').inEditContext();
if (isEditMode) {
$scope.configuration = $scope.configuration || {};
$scope.configuration.zoomLevel = zoomIndex;
@@ -115,7 +111,6 @@ define(
* @returns {number} duration, in milliseconds
*/
duration: function (value) {
var prior = duration;
if (arguments.length > 0) {
duration = roundDuration(value);
}

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['./TimelineStartHandle', './TimelineEndHandle', './TimelineMoveHandle'],
function (TimelineStartHandle, TimelineEndHandle, TimelineMoveHandle) {
"use strict";
var DEFAULT_HANDLES = [

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Handles business logic (mutation of objects, retrieval of start/end

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['./TimelineDragHandler', './TimelineSnapHandler', './TimelineDragHandleFactory'],
function (TimelineDragHandler, TimelineSnapHandler, TimelineDragHandleFactory) {
"use strict";
/**
* Provides drag handles for the active selection in a timeline view.

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['../../TimelineConstants'],
function (Constants) {
"use strict";
/**
* Handle for changing the end time of a timeline or

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['../../TimelineConstants'],
function (Constants) {
"use strict";
/**
* Handle for moving (by drag) a timeline or
@@ -119,13 +117,10 @@ define(
style: function (zoom) {
return {
left: zoom.toPixels(dragHandler.start(id)) +
Constants.HANDLE_WIDTH +
'px',
width: zoom.toPixels(dragHandler.duration(id)) -
Constants.HANDLE_WIDTH * 2
+ 'px'
//cursor: initialStart === undefined ? 'grab' : 'grabbing'
left: (zoom.toPixels(dragHandler.start(id)) +
Constants.HANDLE_WIDTH) + 'px',
width: (zoom.toPixels(dragHandler.duration(id)) -
Constants.HANDLE_WIDTH * 2) + 'px'
};
}
};

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Snaps timestamps to match other timestamps within a

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['../../TimelineConstants'],
function (Constants) {
"use strict";
/**
* Handle for changing the start time of a timeline or

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
'use strict';
/**
* Provides data to populate a graph in a timeline view.
@@ -47,8 +45,6 @@ define(
min = 0,
// current maximum
max = 0,
// current displayed time span
duration = 1000,
// line colors to display
colors = Object.keys(domainObjects);

View File

@@ -19,11 +19,9 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['./TimelineGraph', './TimelineGraphRenderer'],
function (TimelineGraph, TimelineGraphRenderer) {
'use strict';
/**
* Responsible for determining which resource graphs

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define,Float32Array*/
define(
[],
function () {
'use strict';
/**
* Responsible for preparing data for display by

View File

@@ -19,11 +19,9 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
var COLOR_OPTIONS = [
"#20b2aa",

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Selection proxy for the Timeline view. Implements

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Describes a swimlane in a timeline view. This will be

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['./TimelineSwimlaneDropHandler'],
function (TimelineSwimlaneDropHandler) {
"use strict";
var ACTIVITY_RELATIONSHIP = "modes";

View File

@@ -19,21 +19,20 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
"use strict";
/**
* Handles drop (from drag-and-drop) initiated changes to a swimlane.
* @constructor
*/
function TimelineSwimlaneDropHandler(swimlane) {
// Check if we are in edit mode
// Check if we are in edit mode (also check parents)
function inEditMode() {
return swimlane.domainObject.hasCapability("editor");
return swimlane.domainObject.hasCapability('editor') &&
swimlane.domainObject.getCapability('editor').inEditContext();
}
// Boolean and (for reduce below)

View File

@@ -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(
[
@@ -34,7 +33,6 @@ define(
TimelineColorAssigner,
TimelineProxy
) {
'use strict';
/**
* Populates and maintains a list of swimlanes for a given

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['./SwimlaneDragConstants'],
function (SwimlaneDragConstants) {
"use strict";
/**
* Defines the `mct-swimlane-drag` directive. When a drag is initiated

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
['./SwimlaneDragConstants'],
function (SwimlaneDragConstants) {
"use strict";
/**
* Defines the `mct-swimlane-drop` directive. When a drop occurs
@@ -42,7 +40,6 @@ define(
height = element[0].offsetHeight,
rect = element[0].getBoundingClientRect(),
offset = event.pageY - rect.top,
dataTransfer = event.dataTransfer,
id = dndService.getData(
SwimlaneDragConstants.MCT_DRAG_TYPE
),

View File

@@ -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({
/**

View File

@@ -19,12 +19,10 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
/*global define*/
define(
[],
function () {
'use strict';
/**
* The ObjectLoader is a utility service for loading subgraphs