diff --git a/platform/commonUI/browse/src/creation/CreateAction.js b/platform/commonUI/browse/src/creation/CreateAction.js index e082ecab4f..f21c7a8ba0 100644 --- a/platform/commonUI/browse/src/creation/CreateAction.js +++ b/platform/commonUI/browse/src/creation/CreateAction.js @@ -92,6 +92,7 @@ define( key: 'create', glyph: type.getGlyph(), name: type.getName(), + type: type.getKey(), description: type.getDescription(), context: context }; diff --git a/platform/commonUI/edit/res/templates/edit-object.html b/platform/commonUI/edit/res/templates/edit-object.html index f6fdbdf14a..c31c59bab6 100644 --- a/platform/commonUI/edit/res/templates/edit-object.html +++ b/platform/commonUI/edit/res/templates/edit-object.html @@ -2,12 +2,13 @@ mct-object="domainObject" ng-model="representation"> -
+
-
+
-Created by FontForge 20110222 at Thu Feb 26 00:33:43 2015 +Created by FontForge 20110222 at Thu Mar 19 18:28:43 2015 By deploy user Copyright 2015 Adobe Systems Incorporated. All rights reserved. @@ -72,8 +72,8 @@ d="M0 774l396 -397l-396 -396v793zM451 0v734h173v-734h-173z" /> d="M352 0l-352 367l352 368v-735z" /> - + - + - + @@ -137,8 +137,8 @@ d="M128 237l-61 61q-27 27 -27 67t27 67l271 271q28 28 69 28q39 0 67 -28l61 -60l-8 d="M394 492l393 -377h-787z" /> - + @@ -199,6 +199,8 @@ d="M0 0l131 262l-131 262h91l132 -262l-132 -262h-91z" /> + + + -
+
@@ -46,15 +46,20 @@ Showing {{shown}} of {{count}} available options.
-
+
  • - + + - +
diff --git a/platform/commonUI/general/res/templates/label.html b/platform/commonUI/general/res/templates/label.html index d053199b49..cce26f08cd 100644 --- a/platform/commonUI/general/res/templates/label.html +++ b/platform/commonUI/general/res/templates/label.html @@ -1,4 +1,4 @@ - + {{type.getGlyph()}} diff --git a/platform/commonUI/general/res/templates/subtree.html b/platform/commonUI/general/res/templates/subtree.html new file mode 100644 index 0000000000..92eb25ef7a --- /dev/null +++ b/platform/commonUI/general/res/templates/subtree.html @@ -0,0 +1,14 @@ +
    +
  • + + + Loading... + +
  • +
  • + + +
  • +
diff --git a/platform/commonUI/general/res/templates/tree-node.html b/platform/commonUI/general/res/templates/tree-node.html index 27416597e4..e97780c001 100644 --- a/platform/commonUI/general/res/templates/tree-node.html +++ b/platform/commonUI/general/res/templates/tree-node.html @@ -1,23 +1,31 @@ - - + + {{toggle.isActive() ? "v" : ">"}} - + - + - diff --git a/platform/commonUI/general/res/templates/tree.html b/platform/commonUI/general/res/templates/tree.html index 92eb25ef7a..445d554222 100644 --- a/platform/commonUI/general/res/templates/tree.html +++ b/platform/commonUI/general/res/templates/tree.html @@ -1,13 +1,7 @@
    -
  • - - - Loading... - -
  • -
  • +
  • diff --git a/platform/core/bundle.json b/platform/core/bundle.json index 917c175931..46f4b81f72 100644 --- a/platform/core/bundle.json +++ b/platform/core/bundle.json @@ -115,6 +115,11 @@ } ] }, + { + "key": "root", + "name": "Root", + "glyph": "F" + }, { "key": "folder", "name": "Folder", @@ -157,8 +162,7 @@ }, { "key": "mutation", - "implementation": "capabilities/MutationCapability.js", - "depends": [ "$q" ] + "implementation": "capabilities/MutationCapability.js" }, { "key": "delegation", diff --git a/platform/core/src/capabilities/ContextCapability.js b/platform/core/src/capabilities/ContextCapability.js index b46708bef4..7dce323dac 100644 --- a/platform/core/src/capabilities/ContextCapability.js +++ b/platform/core/src/capabilities/ContextCapability.js @@ -76,7 +76,12 @@ define( * object which exposed this capability. */ getRoot: function () { - return this.getPath()[0]; + var parentContext = parentObject && + parentObject.getCapability('context'); + + return parentContext ? + parentContext.getRoot() : + (parentObject || domainObject); } }; } diff --git a/platform/core/src/capabilities/MutationCapability.js b/platform/core/src/capabilities/MutationCapability.js index d0d6c2b360..9a36d60180 100644 --- a/platform/core/src/capabilities/MutationCapability.js +++ b/platform/core/src/capabilities/MutationCapability.js @@ -21,6 +21,16 @@ define( }); } + // Utility function to cast to a promise, without waiting + // for nextTick if a value is non-promise-like. + function fastPromise(value) { + return (value || {}).then ? value : { + then: function (callback) { + return fastPromise(callback(value)); + } + }; + } + /** * The `mutation` capability allows a domain object's model to be * modified. Wrapping such modifications in calls made through @@ -36,12 +46,11 @@ define( * }); * ``` * - * @param $q Angular's $q service, for promises * @param {DomainObject} domainObject the domain object * which will expose this capability * @constructor */ - function MutationCapability($q, domainObject) { + function MutationCapability(domainObject) { function mutate(mutator) { // Get the object's model and clone it, so the @@ -73,8 +82,7 @@ define( // Invoke the provided mutator, then make changes to // the underlying model (if applicable.) - return $q.when(mutator(clone)) - .then(handleMutation); + return fastPromise(mutator(clone)).then(handleMutation); } return { diff --git a/platform/core/src/models/RootModelProvider.js b/platform/core/src/models/RootModelProvider.js index 6e6e59e417..f819f94dd4 100644 --- a/platform/core/src/models/RootModelProvider.js +++ b/platform/core/src/models/RootModelProvider.js @@ -28,6 +28,7 @@ define( function addRoot(models) { models.ROOT = { name: "The root object", + type: "root", composition: ids }; return models; diff --git a/platform/core/test/capabilities/MutationCapabilitySpec.js b/platform/core/test/capabilities/MutationCapabilitySpec.js index 3c03ba5dce..83536347f3 100644 --- a/platform/core/test/capabilities/MutationCapabilitySpec.js +++ b/platform/core/test/capabilities/MutationCapabilitySpec.js @@ -13,21 +13,9 @@ define( domainObject = { getModel: function () { return testModel; } }, mutation; - function mockPromise(value) { - return { - then: function (callback) { - return (value && value.then) ? - value : mockPromise(callback(value)); - } - }; - } - beforeEach(function () { testModel = { number: 6 }; - mutation = new MutationCapability( - { when: mockPromise }, // $q - domainObject - ); + mutation = new MutationCapability(domainObject); }); it("allows mutation of a model", function () { diff --git a/platform/features/layout/bundle.json b/platform/features/layout/bundle.json index 558bd7222a..f5d753c7ac 100644 --- a/platform/features/layout/bundle.json +++ b/platform/features/layout/bundle.json @@ -112,7 +112,7 @@ }, { "property": "text", - "glyph": "p", + "glyph": "G", "control": "dialog-button", "title": "Text Properties", "dialog": { @@ -221,12 +221,6 @@ ], "key": "layoutGrid", "conversion": "number[]" - }, - { - "label": "Panel(s)", - "control": "selector", - "type": "telemetry.panel", - "key": "somethingElse" } ] }, diff --git a/platform/forms/res/templates/controls/button.html b/platform/forms/res/templates/controls/button.html index c826738641..8f47a84a69 100644 --- a/platform/forms/res/templates/controls/button.html +++ b/platform/forms/res/templates/controls/button.html @@ -1,4 +1,4 @@ - diff --git a/platform/forms/res/templates/toolbar.html b/platform/forms/res/templates/toolbar.html index 86b8abd45f..cbf09a377c 100644 --- a/platform/forms/res/templates/toolbar.html +++ b/platform/forms/res/templates/toolbar.html @@ -1,7 +1,7 @@
    4.0.0 gov.nasa.arc.wtd open-mct-web - 0.6.0-SNAPSHOT + 0.6.1-SNAPSHOT Open MCT Web war