Merge remote-tracking branch 'github/master' into open477

Resolve conflicts to complete merge of #477

Conflicts:
	platform/commonUI/general/bundle.json
	platform/commonUI/themes/espresso/res/css/theme-espresso.css
	platform/commonUI/themes/snow/res/css/theme-snow.css
This commit is contained in:
Victor Woeltjen
2016-01-27 12:53:46 -08:00
225 changed files with 10800 additions and 5816 deletions

View File

@ -43,29 +43,24 @@ that Open MCT Web (and its build and tests) execute correctly.
## Tests ## Tests
The repository for Open MCT Web includes a test suite that can be run Tests are written for [Jasmine 1.3](http://jasmine.github.io/1.3/introduction.html)
directly from the web browser, `test.html`. This page will: and run by [Karma](http://karma-runner.github.io). To run:
* Load `bundles.json` to determine which bundles are in the application. `npm test`
* Load `test/suite.json` to determine which source files are to be tested.
This should contain an array of strings, where each is the name of an
AMD module in the bundle's source directory. For each source file:
* Code coverage instrumentation will be added, via Blanket.
* The associated test file will be loaded, via RequireJS. These will
be located in the bundle's test folder; the test runner will presume
these follow a naming convention where each module to be tested has a
corresponding test module with the suffix `Spec` in that folder.
* Jasmine will then be invoked to run all tests defined in the loaded
test modules. Code coverage reporting will be displayed at the bottom
of the test page.
At present, the test runner presumes that bundle conventions are followed The test suite is configured to load any scripts ending with `Spec.js` found
as above; that is, sources are contained in `src`, and tests are contained in the `src` hierarchy. Full configuration details are found in
in `test`. Additionally, individual test files must use the `Spec` suffix `karma.conf.js`. By convention, unit test scripts should be located
as described above. alongside the units that they test; for example, `src/foo/Bar.js` would be
tested by `src/foo/BarSpec.js`. (For legacy reasons, some existing tests may
be located in separate `test` folders near the units they test, but the
naming convention is otherwise the same.)
### Test Reporting
When `npm test` is run, test results will be written as HTML to
`target/tests`. Code coverage information is written to `target/coverage`.
An example of this is expressed in `platform/framework`, which follows
bundle conventions.
### Functional Testing ### Functional Testing
@ -84,8 +79,7 @@ To run:
Open MCT Web includes a Maven command line build. Although Open MCT Web Open MCT Web includes a Maven command line build. Although Open MCT Web
can be run as-is using the repository contents (that is, by viewing can be run as-is using the repository contents (that is, by viewing
`index.html` in a web browser), and its tests can be run in-place `index.html` in a web browser), the command
similarly (that is, by viewing `test.html` in a browser), the command
line build allows machine-driven verification and packaging. line build allows machine-driven verification and packaging.
This build will: This build will:
@ -93,8 +87,7 @@ This build will:
* Check all sources (excluding those in directories named `lib`) with * Check all sources (excluding those in directories named `lib`) with
JSLint for code style compliance. The build will fail if any sources JSLint for code style compliance. The build will fail if any sources
do not satisfy JSLint. do not satisfy JSLint.
* Run unit tests. This is done by running `test.html` in a PhantomJS * Run the [unit test suite](#tests).
browser-like environment. The build will fail if any tests fail.
* Package the application as a `war` (web archive) file. This is * Package the application as a `war` (web archive) file. This is
convenient for deployment on Tomcat or similar. This archive will convenient for deployment on Tomcat or similar. This archive will
include sources, resources, and libraries for bundles, as well include sources, resources, and libraries for bundles, as well
@ -106,17 +99,16 @@ Run as `mvn clean install`.
### Building Documentation ### Building Documentation
Open MCT Web's documentation is generated by an Open MCT Web's documentation is generated by an
[npm](https://www.npmjs.com/)-based build: [npm](https://www.npmjs.com/)-based build. It has additional dependencies that
may not be available on every platform and thus is not covered in the standard
npm install. Ensure your system has [libcairo](http://cairographics.org/)
installed and then run the following commands:
* `npm install` _(only needs to run once)_ * `npm install`
* `npm install canvas nomnoml`
* `npm run docs` * `npm run docs`
Documentation will be generated in `target/docs`. Note that diagram Documentation will be generated in `target/docs`.
generation is dependent on having [Cairo](http://cairographics.org/download/)
installed; see
[node-canvas](https://github.com/Automattic/node-canvas#installation)'s
documentation for help with installation.
# Glossary # Glossary

8
app.js
View File

@ -41,7 +41,13 @@
// Override bundles.json for HTTP requests // Override bundles.json for HTTP requests
app.use('/' + BUNDLE_FILE, function (req, res) { app.use('/' + BUNDLE_FILE, function (req, res) {
var bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8')); var bundles;
try {
bundles = JSON.parse(fs.readFileSync(BUNDLE_FILE, 'utf8'));
} catch (e) {
bundles = [];
}
// Handle command line inclusions/exclusions // Handle command line inclusions/exclusions
bundles = bundles.concat(options.include); bundles = bundles.concat(options.include);

View File

@ -1,39 +0,0 @@
[
"platform/framework",
"platform/core",
"platform/representation",
"platform/commonUI/about",
"platform/commonUI/browse",
"platform/commonUI/edit",
"platform/commonUI/dialog",
"platform/commonUI/formats",
"platform/commonUI/general",
"platform/commonUI/inspect",
"platform/commonUI/mobile",
"platform/commonUI/themes/espresso",
"platform/commonUI/notification",
"platform/containment",
"platform/execution",
"platform/telemetry",
"platform/features/clock",
"platform/features/events",
"platform/features/imagery",
"platform/features/layout",
"platform/features/pages",
"platform/features/plot",
"platform/features/scrolling",
"platform/features/timeline",
"platform/forms",
"platform/identity",
"platform/persistence/aggregator",
"platform/persistence/local",
"platform/persistence/queue",
"platform/policy",
"platform/entanglement",
"platform/search",
"platform/status",
"example/imagery",
"example/eventGenerator",
"example/generator"
]

View File

@ -2,10 +2,11 @@ deployment:
production: production:
branch: master branch: master
commands: commands:
- npm install canvas nomnoml
- ./build-docs.sh - ./build-docs.sh
- git push git@heroku.com:openmctweb-demo.git $CIRCLE_SHA1:refs/heads/master - git push git@heroku.com:openmctweb-demo.git $CIRCLE_SHA1:refs/heads/master
openmctweb-staging-un: openmctweb-staging-un:
branch: search branch: nem_prototype
heroku: heroku:
appname: openmctweb-staging-un appname: openmctweb-staging-un
openmctweb-staging-deux: openmctweb-staging-deux:

View File

@ -407,7 +407,7 @@ In addition to the directories defined in the bundle definition, a bundle will
typically contain other directories not used at run-time. Additionally, some typically contain other directories not used at run-time. Additionally, some
useful development scripts (such as the command line build and the test suite) useful development scripts (such as the command line build and the test suite)
expect this directory structure to be in use, and may ignore options chosen by expect this directory structure to be in use, and may ignore options chosen by
`b undle.json`. It is recommended that the directory structure described below be `bundle.json`. It is recommended that the directory structure described below be
used for new bundles. used for new bundles.
* `src`: Contains JavaScript sources for this bundle. May contain additional * `src`: Contains JavaScript sources for this bundle. May contain additional
@ -2245,7 +2245,7 @@ options. The sources can be deployed in the same directory structure used during
development. A few utilities are included to support development processes. development. A few utilities are included to support development processes.
## Command-line Build ## Command-line Build
Open MCT Web includes a script for building via command line using Maven 3.0.4 Open MCT Web includes a script for building via command line using Maven 3.3.9
https://maven.apache.org/ . https://maven.apache.org/ .
Invoking mvn clean install will: Invoking mvn clean install will:
@ -2263,50 +2263,31 @@ download build dependencies.
## Test Suite ## Test Suite
Open MCT Web uses Jasmine http://jasmine.github.io/ for automated testing. Open MCT Web uses [Jasmine 1.3](http://jasmine.github.io/) and
The file `test.html` included at the top level of the source repository, can be [Karma](http://karma-runner.github.io) for automated testing.
run from the browser to perform tests for all active bundles, as defined in
`bundle.json`.
To define tests for a bundle: The test suite is configured to load any scripts ending with `Spec.js` found
in the `src` hierarchy. Full configuration details are found in
`karma.conf.js`. By convention, unit test scripts should be located
alongside the units that they test; for example, `src/foo/Bar.js` would be
tested by `src/foo/BarSpec.js`. (For legacy reasons, some existing tests may
be located in separate `test` folders near the units they test, but the
naming convention is otherwise the same.)
* Include a directory named `test` within that bundle. Tests are written as AMD modules which depend (at minimum) upon the
* In the `test` directory, include a file named `suite.json`. This will identify unit under test. For example, `src/foo/BarSpec.js` could look like:
which scripts will be tested.
* The file `suite.json` must contain a JSON array of strings, where each string
is the name of a script to be tested. These names should include any directory
paths to the script after (but not including) the `src` folder, and should not
include the file's `.js` extension. (Note that while Open MCT Web's framework
allows a different name to be chosen for the src directory, the test runner
does not: This directory must be named `src` for the test runner to find it.)
* For each script to be tested, a corresponding test script should be located in
the bundle's `test` directory. This should include the suffix Spec at the end of
the filename (but before the `.js` extension.) This test script should be an AMD
module which uses the Jasmine API to declare its test behavior. It should
declare an AMD dependency on the script to be tested, using a relative path.
For example, if writing tests for a bundle at example/foo with two scripts:
* `example/foo/src/controllers/FooController.js`
* `example/foo/src/directives/FooDirective.js`
First, these scripts should be identified in `example/foo/test/suite.json` e.g.
with contents:`[ "controllers/FooController", "directives/FooDirective" ]`
Then, scripts which describe these tests should be written. For example, test
`example/foo/test/controllers/FooControllerSpec.js` could look like:
/*global define,Promise,describe,it,expect,beforeEach*/ /*global define,Promise,describe,it,expect,beforeEach*/
define( define(
["../../src/controllers/FooController"], ["./Bar"],
function (FooController) { function (Bar) {
"use strict"; "use strict";
describe("Bar", function () {
describe("The foo controller", function () {
it("does something", function () { it("does something", function () {
var controller = new FooController(); var bar = new Bar();
expect(controller.foo()).toEqual("foo"); expect(controller.baz()).toEqual("foo");
}); });
}); });
} }

View File

@ -0,0 +1,74 @@
/*****************************************************************************
* 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 define*/
define([
"./src/ExampleController",
"./src/ExampleDirective",
"./src/ExampleService",
'legacyRegistry'
], function (
ExampleController,
ExampleDirective,
ExampleService,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/builtins", {
"name": "Angular Built-ins Example",
"description": "Example showing how to declare extensions with built-in support from Angular.",
"sources": "src",
"extensions": {
"controllers": [
{
"key": "ExampleController",
"implementation": ExampleController,
"depends": [
"$scope",
"exampleService"
]
}
],
"directives": [
{
"key": "exampleDirective",
"implementation": ExampleDirective,
"depends": [
"examples[]"
]
}
],
"routes": [
{
"templateUrl": "templates/example.html"
}
],
"services": [
{
"key": "exampleService",
"implementation": ExampleService
}
]
}
});
});

View File

@ -1,32 +0,0 @@
{
"name": "Angular Built-ins Example",
"description": "Example showing how to declare extensions with built-in support from Angular.",
"sources": "src",
"extensions": {
"controllers": [
{
"key": "ExampleController",
"implementation": "ExampleController.js",
"depends": [ "$scope", "exampleService" ]
}
],
"directives": [
{
"key": "exampleDirective",
"implementation": "ExampleDirective.js",
"depends": [ "examples[]" ]
}
],
"routes": [
{
"templateUrl": "templates/example.html"
}
],
"services": [
{
"key": "exampleService",
"implementation": "ExampleService.js"
}
]
}
}

View File

@ -0,0 +1,82 @@
/*****************************************************************************
* 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 define*/
define([
"./src/SomeProvider",
"./src/SomeOtherProvider",
"./src/SomeDecorator",
"./src/SomeOtherDecorator",
"./src/SomeAggregator",
"./src/SomeOtherExample",
'legacyRegistry'
], function (
SomeProvider,
SomeOtherProvider,
SomeDecorator,
SomeOtherDecorator,
SomeAggregator,
SomeOtherExample,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/composite", {
"extensions": {
"components": [
{
"implementation": SomeProvider,
"provides": "someService",
"type": "provider"
},
{
"implementation": SomeOtherProvider,
"provides": "someService",
"type": "provider"
},
{
"implementation": SomeDecorator,
"provides": "someService",
"type": "decorator"
},
{
"implementation": SomeOtherDecorator,
"provides": "someService",
"type": "decorator"
},
{
"implementation": SomeAggregator,
"provides": "someService",
"type": "aggregator"
}
],
"examples": [
{
"implementation": SomeOtherExample,
"depends": [
"someService"
]
}
]
}
});
});

View File

@ -1,37 +0,0 @@
{
"extensions": {
"components": [
{
"implementation": "SomeProvider.js",
"provides": "someService",
"type": "provider"
},
{
"implementation": "SomeOtherProvider.js",
"provides": "someService",
"type": "provider"
},
{
"implementation": "SomeDecorator.js",
"provides": "someService",
"type": "decorator"
},
{
"implementation": "SomeOtherDecorator.js",
"provides": "someService",
"type": "decorator"
},
{
"implementation": "SomeAggregator.js",
"provides": "someService",
"type": "aggregator"
}
],
"examples": [
{
"implementation": "SomeOtherExample.js",
"depends": [ "someService" ]
}
]
}
}

View File

@ -0,0 +1,70 @@
/*****************************************************************************
* 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 define*/
define([
"./src/EventTelemetryProvider",
'legacyRegistry'
], function (
EventTelemetryProvider,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/eventGenerator", {
"name": "Event Message Generator",
"description": "Example of a component that produces event data.",
"extensions": {
"components": [
{
"implementation": EventTelemetryProvider,
"type": "provider",
"provides": "telemetryService",
"depends": [
"$q",
"$timeout"
]
}
],
"types": [
{
"key": "eventGenerator",
"name": "Event Message Generator",
"glyph": "f",
"description": "An event message generator",
"features": "creation",
"model": {
"telemetry": {}
},
"telemetry": {
"source": "eventGenerator",
"ranges": [
{
"format": "string"
}
]
}
}
]
}
});
});

View File

@ -1,32 +0,0 @@
{
"name": "Event Message Generator",
"description": "Example of a component that produces event data.",
"extensions": {
"components": [
{
"implementation": "EventTelemetryProvider.js",
"type": "provider",
"provides": "telemetryService",
"depends": [ "$q", "$timeout" ]
}
],
"types": [
{
"key": "eventGenerator",
"name": "Event Message Generator",
"glyph": "f",
"description": "An event message generator",
"features": "creation",
"model": {
"telemetry": {}
},
"telemetry": {
"source": "eventGenerator",
"ranges": [
{ "format": "string" }
]
}
}
]
}
}

View File

@ -0,0 +1,51 @@
/*****************************************************************************
* 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 define*/
define([
"./src/SomeExample",
'legacyRegistry'
], function (
SomeExample,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/extensions", {
"name": "Custom Extensions Examples",
"description": "Example showing how to declare custom extensions.",
"sources": "src",
"extensions": {
"examples": [
{
"text": "I came from example/extensions"
},
{
"implementation": SomeExample,
"depends": [
"exampleService"
]
}
]
}
});
});

View File

@ -1,16 +0,0 @@
{
"name": "Custom Extensions Examples",
"description": "Example showing how to declare custom extensions.",
"sources": "src",
"extensions": {
"examples": [
{
"text": "I came from example/extensions"
},
{
"implementation": "SomeExample.js",
"depends": [ "exampleService" ]
}
]
}
}

53
example/forms/bundle.js Normal file
View File

@ -0,0 +1,53 @@
/*****************************************************************************
* 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 define*/
define([
"./src/ExampleFormController",
'legacyRegistry'
], function (
ExampleFormController,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/forms", {
"name": "Declarative Forms example",
"sources": "src",
"extensions": {
"controllers": [
{
"key": "ExampleFormController",
"implementation": ExampleFormController,
"depends": [
"$scope"
]
}
],
"routes": [
{
"templateUrl": "templates/exampleForm.html"
}
]
}
});
});

View File

@ -1,18 +0,0 @@
{
"name": "Declarative Forms example",
"sources": "src",
"extensions": {
"controllers": [
{
"key": "ExampleFormController",
"implementation": "ExampleFormController.js",
"depends": [ "$scope" ]
}
],
"routes": [
{
"templateUrl": "templates/exampleForm.html"
}
]
}
}

143
example/generator/bundle.js Normal file
View File

@ -0,0 +1,143 @@
/*****************************************************************************
* 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 define*/
define([
"./src/SinewaveTelemetryProvider",
"./src/SinewaveLimitCapability",
"./src/SinewaveDeltaFormat",
'legacyRegistry'
], function (
SinewaveTelemetryProvider,
SinewaveLimitCapability,
SinewaveDeltaFormat,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/generator", {
"name": "Sine Wave Generator",
"description": "Example of a component that produces dataa.",
"extensions": {
"components": [
{
"implementation": SinewaveTelemetryProvider,
"type": "provider",
"provides": "telemetryService",
"depends": [
"$q",
"$timeout"
]
}
],
"capabilities": [
{
"key": "limit",
"implementation": SinewaveLimitCapability
}
],
"formats": [
{
"key": "example.delta",
"implementation": SinewaveDeltaFormat
}
],
"constants": [
{
"key": "TIME_CONDUCTOR_DOMAINS",
"value": [
{
"key": "time",
"name": "Time"
},
{
"key": "yesterday",
"name": "Yesterday"
},
{
"key": "delta",
"name": "Delta",
"format": "example.delta"
}
],
"priority": -1
}
],
"types": [
{
"key": "generator",
"name": "Sine Wave Generator",
"glyph": "T",
"description": "A sine wave generator",
"features": "creation",
"model": {
"telemetry": {
"period": 10
}
},
"telemetry": {
"source": "generator",
"domains": [
{
"key": "time",
"name": "Time"
},
{
"key": "yesterday",
"name": "Yesterday"
},
{
"key": "delta",
"name": "Delta",
"format": "example.delta"
}
],
"ranges": [
{
"key": "sin",
"name": "Sine"
},
{
"key": "cos",
"name": "Cosine"
}
]
},
"properties": [
{
"name": "Period",
"control": "textfield",
"cssclass": "l-small l-numeric",
"key": "period",
"required": true,
"property": [
"telemetry",
"period"
],
"pattern": "^\\d*(\\.\\d*)?$"
}
]
}
]
}
});
});

View File

@ -1,90 +0,0 @@
{
"name": "Sine Wave Generator",
"description": "Example of a component that produces dataa.",
"extensions": {
"components": [
{
"implementation": "SinewaveTelemetryProvider.js",
"type": "provider",
"provides": "telemetryService",
"depends": [ "$q", "$timeout" ]
}
],
"capabilities": [
{
"key": "limit",
"implementation": "SinewaveLimitCapability.js"
}
],
"formats": [
{
"key": "example.delta",
"implementation": "SinewaveDeltaFormat.js"
}
],
"constants": [
{
"key": "TIME_CONDUCTOR_DOMAINS",
"value": [
{ "key": "time", "name": "Time" },
{ "key": "yesterday", "name": "Yesterday" },
{ "key": "delta", "name": "Delta", "format": "example.delta" }
],
"priority": -1
}
],
"types": [
{
"key": "generator",
"name": "Sine Wave Generator",
"glyph": "T",
"description": "A sine wave generator",
"features": "creation",
"model": {
"telemetry": {
"period": 10
}
},
"telemetry": {
"source": "generator",
"domains": [
{
"key": "time",
"name": "Time"
},
{
"key": "yesterday",
"name": "Yesterday"
},
{
"key": "delta",
"name": "Delta",
"format": "example.delta"
}
],
"ranges": [
{
"key": "sin",
"name": "Sine"
},
{
"key": "cos",
"name": "Cosine"
}
]
},
"properties": [
{
"name": "Period",
"control": "textfield",
"cssclass": "l-small l-numeric",
"key": "period",
"required": true,
"property": [ "telemetry", "period" ],
"pattern": "^\\d*(\\.\\d*)?$"
}
]
}
]
}
}

View File

@ -0,0 +1,47 @@
/*****************************************************************************
* 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 define*/
define([
"./src/ExampleIdentityService",
'legacyRegistry'
], function (
ExampleIdentityService,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/identity", {
"extensions": {
"components": [
{
"implementation": ExampleIdentityService,
"provides": "identityService",
"type": "provider",
"depends": [
"dialogService"
]
}
]
}
});
});

View File

@ -1,12 +0,0 @@
{
"extensions": {
"components": [
{
"implementation": "ExampleIdentityService.js",
"provides": "identityService",
"type": "provider",
"depends": [ "dialogService" ]
}
]
}
}

78
example/imagery/bundle.js Normal file
View File

@ -0,0 +1,78 @@
/*****************************************************************************
* 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 define*/
define([
"./src/ImageTelemetryProvider",
'legacyRegistry'
], function (
ImageTelemetryProvider,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/imagery", {
"name": "Imagery",
"description": "Example of a component that produces image telemetry.",
"extensions": {
"components": [
{
"implementation": ImageTelemetryProvider,
"type": "provider",
"provides": "telemetryService",
"depends": [
"$q",
"$timeout"
]
}
],
"types": [
{
"key": "imagery",
"name": "Example Imagery",
"glyph": "T",
"features": "creation",
"model": {
"telemetry": {}
},
"telemetry": {
"source": "imagery",
"domains": [
{
"name": "Time",
"key": "time",
"format": "timestamp"
}
],
"ranges": [
{
"name": "Image",
"key": "url",
"format": "imageUrl"
}
]
}
}
]
}
});
});

View File

@ -1,42 +0,0 @@
{
"name": "Imagery",
"description": "Example of a component that produces image telemetry.",
"extensions": {
"components": [
{
"implementation": "ImageTelemetryProvider.js",
"type": "provider",
"provides": "telemetryService",
"depends": [ "$q", "$timeout" ]
}
],
"types": [
{
"key": "imagery",
"name": "Example Imagery",
"glyph": "T",
"features": "creation",
"model": {
"telemetry": {}
},
"telemetry": {
"source": "imagery",
"domains": [
{
"name": "Time",
"key": "time",
"format": "timestamp"
}
],
"ranges": [
{
"name": "Image",
"key": "url",
"format": "imageUrl"
}
]
}
}
]
}
}

45
example/mobile/bundle.js Normal file
View File

@ -0,0 +1,45 @@
/*****************************************************************************
* 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 define*/
define([
'legacyRegistry'
], function (
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/mobile", {
"name": "Mobile",
"description": "Allows elements with pertinence to mobile usage and development",
"extensions": {
"stylesheets": [
{
"stylesheetUrl": "css/mobile-example.css",
"priority": "mandatory"
}
]
}
});
});

View File

@ -1,12 +0,0 @@
{
"name": "Mobile",
"description": "Allows elements with pertinence to mobile usage and development",
"extensions": {
"stylesheets": [
{
"stylesheetUrl": "css/mobile-example.css",
"priority": "mandatory"
}
]
}
}

View File

@ -0,0 +1,86 @@
/*****************************************************************************
* 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 define*/
define([
"./src/DialogLaunchController",
"./src/NotificationLaunchController",
"./src/DialogLaunchIndicator",
"./src/NotificationLaunchIndicator",
'legacyRegistry'
], function (
DialogLaunchController,
NotificationLaunchController,
DialogLaunchIndicator,
NotificationLaunchIndicator,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/notifications", {
"extensions": {
"templates": [
{
"key": "dialogLaunchTemplate",
"templateUrl": "dialog-launch.html"
},
{
"key": "notificationLaunchTemplate",
"templateUrl": "notification-launch.html"
}
],
"controllers": [
{
"key": "DialogLaunchController",
"implementation": DialogLaunchController,
"depends": [
"$scope",
"$timeout",
"$log",
"dialogService",
"notificationService"
]
},
{
"key": "NotificationLaunchController",
"implementation": NotificationLaunchController,
"depends": [
"$scope",
"$timeout",
"$log",
"notificationService"
]
}
],
"indicators": [
{
"implementation": DialogLaunchIndicator,
"priority": "fallback"
},
{
"implementation": NotificationLaunchIndicator,
"priority": "fallback"
}
]
}
});
});

View File

@ -1,47 +0,0 @@
{
"extensions": {
"templates": [
{
"key": "dialogLaunchTemplate",
"templateUrl": "dialog-launch.html"
},
{
"key": "notificationLaunchTemplate",
"templateUrl": "notification-launch.html"
}
],
"controllers": [
{
"key": "DialogLaunchController",
"implementation": "DialogLaunchController.js",
"depends": [
"$scope",
"$timeout",
"$log",
"dialogService",
"notificationService"
]
},
{
"key": "NotificationLaunchController",
"implementation": "NotificationLaunchController.js",
"depends": [
"$scope",
"$timeout",
"$log",
"notificationService"
]
}
],
"indicators": [
{
"implementation": "DialogLaunchIndicator.js",
"priority": "fallback"
},
{
"implementation": "NotificationLaunchIndicator.js",
"priority": "fallback"
}
]
}
}

View File

@ -0,0 +1,54 @@
/*****************************************************************************
* 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 define*/
define([
"./src/BrowserPersistenceProvider",
'legacyRegistry'
], function (
BrowserPersistenceProvider,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/persistence", {
"extensions": {
"components": [
{
"provides": "persistenceService",
"type": "provider",
"implementation": BrowserPersistenceProvider,
"depends": [
"$q",
"PERSISTENCE_SPACE"
]
}
],
"constants": [
{
"key": "PERSISTENCE_SPACE",
"value": "mct"
}
]
}
});
});

View File

@ -1,18 +0,0 @@
{
"extensions": {
"components": [
{
"provides": "persistenceService",
"type": "provider",
"implementation": "BrowserPersistenceProvider.js",
"depends": [ "$q", "PERSISTENCE_SPACE" ]
}
],
"constants": [
{
"key": "PERSISTENCE_SPACE",
"value": "mct"
}
]
}
}

45
example/policy/bundle.js Normal file
View File

@ -0,0 +1,45 @@
/*****************************************************************************
* 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 define*/
define([
"./src/ExamplePolicy",
'legacyRegistry'
], function (
ExamplePolicy,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/policy", {
"name": "Example Policy",
"description": "Provides an example of using policies to prohibit actions.",
"extensions": {
"policies": [
{
"implementation": ExamplePolicy,
"category": "action"
}
]
}
});
});

View File

@ -1,12 +0,0 @@
{
"name": "Example Policy",
"description": "Provides an example of using policies to prohibit actions.",
"extensions": {
"policies": [
{
"implementation": "ExamplePolicy.js",
"category": "action"
}
]
}
}

View File

@ -0,0 +1,55 @@
/*****************************************************************************
* 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 define*/
define([
"./src/WatchIndicator",
"./src/DigestIndicator",
'legacyRegistry'
], function (
WatchIndicator,
DigestIndicator,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/profiling", {
"extensions": {
"indicators": [
{
"implementation": WatchIndicator,
"depends": [
"$interval",
"$rootScope"
]
},
{
"implementation": DigestIndicator,
"depends": [
"$interval",
"$rootScope"
]
}
]
}
});
});

View File

@ -1,14 +0,0 @@
{
"extensions": {
"indicators": [
{
"implementation": "WatchIndicator.js",
"depends": ["$interval", "$rootScope"]
},
{
"implementation": "DigestIndicator.js",
"depends": ["$interval", "$rootScope"]
}
]
}
}

View File

@ -0,0 +1,58 @@
/*****************************************************************************
* 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 define*/
define([
"./src/ScratchPersistenceProvider",
'legacyRegistry'
], function (
ScratchPersistenceProvider,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/scratchpad", {
"extensions": {
"roots": [
{
"id": "scratch:root",
"model": {
"type": "folder",
"composition": [],
"name": "Scratchpad"
},
"priority": "preferred"
}
],
"components": [
{
"provides": "persistenceService",
"type": "provider",
"implementation": ScratchPersistenceProvider,
"depends": [
"$q"
]
}
]
}
});
});

View File

@ -1,23 +0,0 @@
{
"extensions": {
"roots": [
{
"id": "scratch:root",
"model": {
"type": "folder",
"composition": [],
"name": "Scratchpad"
},
"priority": "preferred"
}
],
"components": [
{
"provides": "persistenceService",
"type": "provider",
"implementation": "ScratchPersistenceProvider.js",
"depends": [ "$q" ]
}
]
}
}

View File

@ -0,0 +1,63 @@
/*****************************************************************************
* 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 define*/
define([
"./src/ExampleTaxonomyModelProvider",
'legacyRegistry'
], function (
ExampleTaxonomyModelProvider,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/taxonomy", {
"name": "Example taxonomy",
"description": "Example illustrating the addition of a static top-level hierarchy",
"extensions": {
"roots": [
{
"id": "exampleTaxonomy",
"model": {
"type": "folder",
"name": "Stub Subsystems",
"composition": [
"examplePacket0",
"examplePacket1",
"examplePacket2"
]
}
}
],
"components": [
{
"provides": "modelService",
"type": "provider",
"implementation": ExampleTaxonomyModelProvider,
"depends": [
"$q"
]
}
]
}
});
});

View File

@ -1,29 +0,0 @@
{
"name": "Example taxonomy",
"description": "Example illustrating the addition of a static top-level hierarchy",
"extensions": {
"roots": [
{
"id": "exampleTaxonomy",
"model": {
"type": "folder",
"name": "Stub Subsystems",
"composition": [
"examplePacket0",
"examplePacket1",
"examplePacket2"
]
}
}
],
"components": [
{
"provides": "modelService",
"type": "provider",
"implementation": "ExampleTaxonomyModelProvider.js",
"depends": [ "$q" ]
}
]
}
}

52
example/worker/bundle.js Normal file
View File

@ -0,0 +1,52 @@
/*****************************************************************************
* 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 define*/
define([
"./src/FibonacciIndicator",
'legacyRegistry'
], function (
FibonacciIndicator,
legacyRegistry
) {
"use strict";
legacyRegistry.register("example/worker", {
"extensions": {
"indicators": [
{
"implementation": FibonacciIndicator,
"depends": [
"workerService",
"$rootScope"
]
}
],
"workers": [
{
"key": "example.fibonacci",
"scriptUrl": "FibonacciWorker.js"
}
]
}
});
});

View File

@ -1,16 +0,0 @@
{
"extensions": {
"indicators": [
{
"implementation": "FibonacciIndicator.js",
"depends": [ "workerService", "$rootScope" ]
}
],
"workers": [
{
"key": "example.fibonacci",
"scriptUrl": "FibonacciWorker.js"
}
]
}
}

View File

@ -27,7 +27,7 @@
<title></title> <title></title>
<script type="text/javascript" <script type="text/javascript"
src="platform/framework/lib/require.js" src="platform/framework/lib/require.js"
data-main="platform/framework/src/Main.js"> data-main="main.js">
</script> </script>
<link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="platform/commonUI/general/res/images/favicons/favicon-96x96.png" sizes="96x96">

View File

@ -34,6 +34,7 @@ module.exports = function(config) {
// List of files / patterns to load in the browser. // List of files / patterns to load in the browser.
// By default, files are also included in a script tag. // By default, files are also included in a script tag.
files: [ files: [
{pattern: 'src/**/*.js', included: false},
{pattern: 'example/**/*.js', included: false}, {pattern: 'example/**/*.js', included: false},
{pattern: 'platform/**/*.js', included: false}, {pattern: 'platform/**/*.js', included: false},
{pattern: 'warp/**/*.js', included: false}, {pattern: 'warp/**/*.js', included: false},
@ -47,12 +48,14 @@ module.exports = function(config) {
// Preprocess matching files before serving them to the browser. // Preprocess matching files before serving them to the browser.
// https://npmjs.org/browse/keyword/karma-preprocessor // https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {}, preprocessors: {
'**/src/**/!(*Spec).js': [ 'coverage' ]
},
// Test results reporter to use // Test results reporter to use
// Possible values: 'dots', 'progress' // Possible values: 'dots', 'progress'
// Available reporters: https://npmjs.org/browse/keyword/karma-reporter // Available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'], reporters: ['progress', 'coverage', 'html'],
// Web server port. // Web server port.
port: 9876, port: 9876,
@ -68,11 +71,23 @@ module.exports = function(config) {
// Specify browsers to run tests in. // Specify browsers to run tests in.
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: [ browsers: [
'Chrome' 'PhantomJS'
], ],
// Code coverage reporting.
coverageReporter: {
dir: "target/coverage"
},
// HTML test reporting.
htmlReporter: {
outputDir: "target/tests",
preserveDescribeNesting: true,
foldAll: false
},
// Continuous Integration mode. // Continuous Integration mode.
// If true, Karma captures browsers, runs the tests and exits. // If true, Karma captures browsers, runs the tests and exits.
singleRun: false singleRun: true
}); });
}; };

81
main.js Normal file
View File

@ -0,0 +1,81 @@
/*****************************************************************************
* 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 define, window, requirejs*/
requirejs.config({
"paths": {
"legacyRegistry": "src/legacyRegistry",
"angular": "platform/framework/lib/angular.min",
"moment": 'platform/telemetry/lib/moment.min'
},
"shim": {
"angular": {
"exports": "angular"
}
}
});
define([
'./platform/framework/src/Main',
'legacyRegistry',
'./platform/framework/bundle',
'./platform/core/bundle',
'./platform/representation/bundle',
'./platform/commonUI/about/bundle',
'./platform/commonUI/browse/bundle',
'./platform/commonUI/edit/bundle',
'./platform/commonUI/dialog/bundle',
'./platform/commonUI/formats/bundle',
'./platform/commonUI/general/bundle',
'./platform/commonUI/inspect/bundle',
'./platform/commonUI/mobile/bundle',
'./platform/commonUI/themes/espresso/bundle',
'./platform/commonUI/notification/bundle',
'./platform/containment/bundle',
'./platform/execution/bundle',
'./platform/telemetry/bundle',
'./platform/features/clock/bundle',
'./platform/features/events/bundle',
'./platform/features/imagery/bundle',
'./platform/features/layout/bundle',
'./platform/features/pages/bundle',
'./platform/features/plot/bundle',
'./platform/features/scrolling/bundle',
'./platform/features/timeline/bundle',
'./platform/forms/bundle',
'./platform/identity/bundle',
'./platform/persistence/aggregator/bundle',
'./platform/persistence/local/bundle',
'./platform/persistence/queue/bundle',
'./platform/policy/bundle',
'./platform/entanglement/bundle',
'./platform/search/bundle',
'./platform/status/bundle',
'./example/imagery/bundle',
'./example/eventGenerator/bundle',
'./example/generator/bundle'
], function (Main, legacyRegistry) {
'use strict';
new Main().run(legacyRegistry);
});

View File

@ -7,23 +7,25 @@
"minimist": "^1.1.1" "minimist": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
"glob": ">= 3.0.0",
"jasmine-core": "^2.3.0", "jasmine-core": "^2.3.0",
"jsdoc": "^3.3.2", "jsdoc": "^3.3.2",
"jshint": "^2.7.0", "jshint": "^2.7.0",
"karma": "^0.12.31", "karma": "^0.12.31",
"karma-chrome-launcher": "^0.1.8", "karma-chrome-launcher": "^0.1.8",
"karma-cli": "0.0.4", "karma-cli": "0.0.4",
"karma-coverage": "^0.5.3",
"karma-html-reporter": "^0.2.7",
"karma-jasmine": "^0.1.5", "karma-jasmine": "^0.1.5",
"karma-phantomjs-launcher": "^0.1.4", "karma-phantomjs-launcher": "^0.2.3",
"karma-requirejs": "^0.2.2", "karma-requirejs": "^0.2.2",
"requirejs": "^2.1.17", "lodash": "^3.10.1",
"markdown-toc": "^0.11.7",
"marked": "^0.3.5", "marked": "^0.3.5",
"glob": ">= 3.0.0",
"split": "^1.0.0",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
"nomnoml": "^0.0.3", "phantomjs": "^1.9.19",
"canvas": "^1.2.7", "requirejs": "^2.1.17",
"markdown-toc": "^0.11.7" "split": "^1.0.0"
}, },
"scripts": { "scripts": {
"start": "node app.js", "start": "node app.js",

View File

@ -0,0 +1,166 @@
/*****************************************************************************
* 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 define*/
define([
"./src/LogoController",
"./src/AboutController",
"./src/LicenseController",
'legacyRegistry'
], function (
LogoController,
AboutController,
LicenseController,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/commonUI/about", {
"name": "About Open MCT Web",
"extensions": {
"templates": [
{
"key": "app-logo",
"priority": "optional",
"templateUrl": "templates/app-logo.html"
},
{
"key": "about-logo",
"priority": "preferred",
"templateUrl": "templates/about-logo.html"
},
{
"key": "about-dialog",
"templateUrl": "templates/about-dialog.html"
},
{
"key": "overlay-about",
"templateUrl": "templates/overlay-about.html"
},
{
"key": "license-apache",
"templateUrl": "templates/license-apache.html"
},
{
"key": "license-mit",
"templateUrl": "templates/license-mit.html"
}
],
"controllers": [
{
"key": "LogoController",
"depends": [
"overlayService"
],
"implementation": LogoController
},
{
"key": "AboutController",
"depends": [
"versions[]",
"$window"
],
"implementation": AboutController
},
{
"key": "LicenseController",
"depends": [
"licenses[]"
],
"implementation": LicenseController
}
],
"licenses": [
{
"name": "Json.NET",
"version": "6.0.8",
"author": "Newtonsoft",
"description": "JSON serialization/deserialization",
"website": "http://www.newtonsoft.com/json",
"copyright": "Copyright (c) 2007 James Newton-King",
"license": "license-mit",
"link": "https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md"
},
{
"name": "Nancy",
"version": "0.23.2",
"author": "Andreas Håkansson, Steven Robbins and contributors",
"description": "Embedded web server",
"website": "http://nancyfx.org/",
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
"license": "license-mit",
"link": "http://www.opensource.org/licenses/mit-license.php"
},
{
"name": "Nancy.Hosting.Self",
"version": "0.23.2",
"author": "Andreas Håkansson, Steven Robbins and contributors",
"description": "Embedded web server",
"website": "http://nancyfx.org/",
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
"license": "license-mit",
"link": "http://www.opensource.org/licenses/mit-license.php"
},
{
"name": "SuperSocket",
"version": "0.9.0.2",
"author": " Kerry Jiang",
"description": "Supports SuperWebSocket",
"website": "https://supersocket.codeplex.com/",
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
"license": "license-apache",
"link": "https://supersocket.codeplex.com/license"
},
{
"name": "SuperWebSocket",
"version": "0.9.0.2",
"author": " Kerry Jiang",
"description": "WebSocket implementation for client-server communication",
"website": "https://superwebsocket.codeplex.com/",
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
"license": "license-apache",
"link": "https://superwebsocket.codeplex.com/license"
},
{
"name": "log4net",
"version": "2.0.3",
"author": "Apache Software Foundation",
"description": "Logging",
"website": "http://logging.apache.org/log4net/",
"copyright": "Copyright © 2004-2015 Apache Software Foundation.",
"license": "license-apache",
"link": "http://logging.apache.org/log4net/license.html"
}
],
"routes": [
{
"when": "/licenses",
"templateUrl": "templates/licenses.html"
},
{
"when": "/licenses-md",
"templateUrl": "templates/licenses-export-md.html"
}
]
}
});
});

View File

@ -1,122 +0,0 @@
{
"name": "About Open MCT Web",
"extensions": {
"templates": [
{
"key": "app-logo",
"priority": "optional",
"templateUrl": "templates/app-logo.html"
},
{
"key": "about-logo",
"priority": "preferred",
"templateUrl": "templates/about-logo.html"
},
{
"key": "about-dialog",
"templateUrl": "templates/about-dialog.html"
},
{
"key": "overlay-about",
"templateUrl": "templates/overlay-about.html"
},
{
"key": "license-apache",
"templateUrl": "templates/license-apache.html"
},
{
"key": "license-mit",
"templateUrl": "templates/license-mit.html"
}
],
"controllers": [
{
"key": "LogoController",
"depends": [ "overlayService" ],
"implementation": "LogoController.js"
},
{
"key": "AboutController",
"depends": [ "versions[]", "$window" ],
"implementation": "AboutController.js"
},
{
"key": "LicenseController",
"depends": [ "licenses[]" ],
"implementation": "LicenseController.js"
}
],
"licenses": [
{
"name": "Json.NET",
"version": "6.0.8",
"author": "Newtonsoft",
"description": "JSON serialization/deserialization",
"website": "http://www.newtonsoft.com/json",
"copyright": "Copyright (c) 2007 James Newton-King",
"license": "license-mit",
"link": "https://github.com/JamesNK/Newtonsoft.Json/blob/master/LICENSE.md"
},
{
"name": "Nancy",
"version": "0.23.2",
"author": "Andreas Håkansson, Steven Robbins and contributors",
"description": "Embedded web server",
"website": "http://nancyfx.org/",
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
"license": "license-mit",
"link": "http://www.opensource.org/licenses/mit-license.php"
},
{
"name": "Nancy.Hosting.Self",
"version": "0.23.2",
"author": "Andreas Håkansson, Steven Robbins and contributors",
"description": "Embedded web server",
"website": "http://nancyfx.org/",
"copyright": "Copyright © 2010 Andreas Håkansson, Steven Robbins and contributors",
"license": "license-mit",
"link": "http://www.opensource.org/licenses/mit-license.php"
},
{
"name": "SuperSocket",
"version": "0.9.0.2",
"author": " Kerry Jiang",
"description": "Supports SuperWebSocket",
"website": "https://supersocket.codeplex.com/",
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
"license": "license-apache",
"link": "https://supersocket.codeplex.com/license"
},
{
"name": "SuperWebSocket",
"version": "0.9.0.2",
"author": " Kerry Jiang",
"description": "WebSocket implementation for client-server communication",
"website": "https://superwebsocket.codeplex.com/",
"copyright": "Copyright 2010-2014 Kerry Jiang (kerry-jiang@hotmail.com)",
"license": "license-apache",
"link": "https://superwebsocket.codeplex.com/license"
},
{
"name": "log4net",
"version": "2.0.3",
"author": "Apache Software Foundation",
"description": "Logging",
"website": "http://logging.apache.org/log4net/",
"copyright": "Copyright © 2004-2015 Apache Software Foundation.",
"license": "license-apache",
"link": "http://logging.apache.org/log4net/license.html"
}
],
"routes": [
{
"when": "/licenses",
"templateUrl": "templates/licenses.html"
},
{
"when": "/licenses-md",
"templateUrl": "templates/licenses-export-md.html"
}
]
}
}

View File

@ -0,0 +1,309 @@
/*****************************************************************************
* 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 define*/
define([
"./src/BrowseController",
"./src/PaneController",
"./src/BrowseObjectController",
"./src/creation/CreateMenuController",
"./src/creation/LocatorController",
"./src/MenuArrowController",
"./src/navigation/NavigationService",
"./src/creation/CreationPolicy",
"./src/navigation/NavigateAction",
"./src/windowing/NewTabAction",
"./src/windowing/FullscreenAction",
"./src/creation/CreateActionProvider",
"./src/creation/CreationService",
"./src/windowing/WindowTitler",
'legacyRegistry'
], function (
BrowseController,
PaneController,
BrowseObjectController,
CreateMenuController,
LocatorController,
MenuArrowController,
NavigationService,
CreationPolicy,
NavigateAction,
NewTabAction,
FullscreenAction,
CreateActionProvider,
CreationService,
WindowTitler,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/commonUI/browse", {
"extensions": {
"routes": [
{
"when": "/browse/:ids*",
"templateUrl": "templates/browse.html",
"reloadOnSearch": false
},
{
"when": "",
"templateUrl": "templates/browse.html",
"reloadOnSearch": false
}
],
"controllers": [
{
"key": "BrowseController",
"implementation": BrowseController,
"depends": [
"$scope",
"$route",
"$location",
"$q",
"objectService",
"navigationService",
"urlService"
]
},
{
"key": "PaneController",
"implementation": PaneController,
"priority": "preferred",
"depends": [
"$scope",
"agentService",
"$window"
]
},
{
"key": "BrowseObjectController",
"implementation": BrowseObjectController,
"depends": [
"$scope",
"$location",
"$route",
"$q",
"navigationService"
]
},
{
"key": "CreateMenuController",
"implementation": CreateMenuController,
"depends": [
"$scope"
]
},
{
"key": "LocatorController",
"implementation": LocatorController,
"depends": [
"$scope",
"$timeout"
]
},
{
"key": "MenuArrowController",
"implementation": MenuArrowController,
"depends": [
"$scope"
]
}
],
"controls": [
{
"key": "locator",
"templateUrl": "templates/create/locator.html"
}
],
"representations": [
{
"key": "browse-object",
"templateUrl": "templates/browse-object.html",
"gestures": [
"drop"
],
"uses": [
"view"
]
},
{
"key": "create-button",
"templateUrl": "templates/create/create-button.html"
},
{
"key": "create-menu",
"templateUrl": "templates/create/create-menu.html",
"uses": [
"action"
]
},
{
"key": "grid-item",
"templateUrl": "templates/items/grid-item.html",
"uses": [
"type",
"action",
"location"
],
"gestures": [
"info",
"menu"
]
},
{
"key": "object-header",
"templateUrl": "templates/browse/object-header.html",
"uses": [
"type"
]
},
{
"key": "menu-arrow",
"templateUrl": "templates/menu-arrow.html",
"uses": [
"action"
],
"gestures": [
"menu"
]
},
{
"key": "back-arrow",
"uses": [
"context"
],
"templateUrl": "templates/back-arrow.html"
}
],
"services": [
{
"key": "navigationService",
"implementation": NavigationService
}
],
"policies": [
{
"implementation": CreationPolicy,
"category": "creation"
}
],
"actions": [
{
"key": "navigate",
"implementation": NavigateAction,
"depends": [
"navigationService",
"$q"
]
},
{
"key": "window",
"name": "Open In New Tab",
"implementation": NewTabAction,
"description": "Open in a new browser tab",
"category": [
"view-control",
"contextual"
],
"depends": [
"urlService",
"$window"
],
"group": "windowing",
"glyph": "y",
"priority": "preferred"
},
{
"key": "fullscreen",
"implementation": FullscreenAction,
"category": "view-control",
"group": "windowing",
"glyph": "z",
"priority": "default"
}
],
"views": [
{
"key": "items",
"name": "Items",
"glyph": "9",
"description": "Grid of available items",
"templateUrl": "templates/items/items.html",
"uses": [
"composition"
],
"gestures": [
"drop"
],
"type": "folder",
"editable": false
}
],
"components": [
{
"key": "CreateActionProvider",
"provides": "actionService",
"type": "provider",
"implementation": CreateActionProvider,
"depends": [
"$q",
"typeService",
"navigationService",
"policyService"
]
},
{
"key": "CreationService",
"provides": "creationService",
"type": "provider",
"implementation": CreationService,
"depends": [
"$q",
"$log"
]
}
],
"runs": [
{
"implementation": WindowTitler,
"depends": [
"navigationService",
"$rootScope",
"$document"
]
}
],
"licenses": [
{
"name": "screenfull.js",
"version": "1.2.0",
"description": "Wrapper for cross-browser usage of fullscreen API",
"author": "Sindre Sorhus",
"website": "https://github.com/sindresorhus/screenfull.js/",
"copyright": "Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
"license": "license-mit",
"link": "https://github.com/sindresorhus/screenfull.js/blob/gh-pages/license"
}
]
}
});
});

View File

@ -1,185 +0,0 @@
{
"extensions": {
"routes": [
{
"when": "/browse/:ids*",
"templateUrl": "templates/browse.html",
"reloadOnSearch": false
},
{
"when": "",
"templateUrl": "templates/browse.html",
"reloadOnSearch": false
}
],
"controllers": [
{
"key": "BrowseController",
"implementation": "BrowseController.js",
"depends": [
"$scope",
"$route",
"$location",
"objectService",
"navigationService",
"urlService"
]
},
{
"key": "PaneController",
"implementation": "PaneController.js",
"priority": "preferred",
"depends": [ "$scope", "agentService","$window" ]
},
{
"key": "BrowseObjectController",
"implementation": "BrowseObjectController.js",
"depends": [ "$scope", "$location", "$route" ]
},
{
"key": "CreateMenuController",
"implementation": "creation/CreateMenuController.js",
"depends": [ "$scope" ]
},
{
"key": "LocatorController",
"implementation": "creation/LocatorController.js",
"depends": [ "$scope", "$timeout" ]
},
{
"key": "MenuArrowController",
"implementation": "MenuArrowController.js",
"depends": [ "$scope" ]
}
],
"controls": [
{
"key": "locator",
"templateUrl": "templates/create/locator.html"
}
],
"representations": [
{
"key": "browse-object",
"templateUrl": "templates/browse-object.html",
"uses": [ "view" ]
},
{
"key": "create-button",
"templateUrl": "templates/create/create-button.html"
},
{
"key": "create-menu",
"templateUrl": "templates/create/create-menu.html",
"uses": [ "action" ]
},
{
"key": "grid-item",
"templateUrl": "templates/items/grid-item.html",
"uses": [ "type", "action", "location" ],
"gestures": [ "info", "menu" ]
},
{
"key": "object-header",
"templateUrl": "templates/browse/object-header.html",
"uses": [ "type" ]
},
{
"key": "menu-arrow",
"templateUrl": "templates/menu-arrow.html",
"uses": [ "action" ],
"gestures": [ "menu" ]
},
{
"key": "back-arrow",
"uses": [ "context" ],
"templateUrl": "templates/back-arrow.html"
}
],
"services": [
{
"key": "navigationService",
"implementation": "navigation/NavigationService.js"
}
],
"policies": [
{
"implementation": "creation/CreationPolicy.js",
"category": "creation"
}
],
"actions": [
{
"key": "navigate",
"implementation": "navigation/NavigateAction.js",
"depends": [ "navigationService", "$q" ]
},
{
"key": "window",
"name": "Open In New Tab",
"implementation": "windowing/NewTabAction.js",
"description": "Open in a new browser tab",
"category": ["view-control", "contextual"],
"depends": [ "urlService", "$window" ],
"group": "windowing",
"glyph": "y",
"priority": "preferred"
},
{
"key": "fullscreen",
"implementation": "windowing/FullscreenAction.js",
"category": "view-control",
"group": "windowing",
"glyph": "z",
"priority": "default"
}
],
"views": [
{
"key": "items",
"name": "Items",
"glyph": "9",
"description": "Grid of available items",
"templateUrl": "templates/items/items.html",
"uses": [ "composition" ],
"gestures": [ "drop" ],
"type": "folder",
"editable": false
}
],
"components": [
{
"key": "CreateActionProvider",
"provides": "actionService",
"type": "provider",
"implementation": "creation/CreateActionProvider.js",
"depends": [ "typeService", "dialogService", "creationService", "policyService" ]
},
{
"key": "CreationService",
"provides": "creationService",
"type": "provider",
"implementation": "creation/CreationService.js",
"depends": [ "$q", "$log" ]
}
],
"runs": [
{
"implementation": "windowing/WindowTitler.js",
"depends": [ "navigationService", "$rootScope", "$document" ]
}
],
"licenses": [
{
"name": "screenfull.js",
"version": "1.2.0",
"description": "Wrapper for cross-browser usage of fullscreen API",
"author": "Sindre Sorhus",
"website": "https://github.com/sindresorhus/screenfull.js/",
"copyright": "Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
"license": "license-mit",
"link": "https://github.com/sindresorhus/screenfull.js/blob/gh-pages/license"
}
]
}
}

View File

@ -19,8 +19,8 @@
this source code distribution or the Licensing information page available this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<span ng-controller="BrowseObjectController"> <div ng-controller="BrowseObjectController" class="abs l-flex-col">
<div class="object-browse-bar l-flex-row"> <div class="holder flex-elem l-flex-row object-browse-bar ">
<div class="items-select left flex-elem l-flex-row grows"> <div class="items-select left flex-elem l-flex-row grows">
<mct-representation key="'back-arrow'" <mct-representation key="'back-arrow'"
mct-object="domainObject" mct-object="domainObject"
@ -43,8 +43,26 @@
</mct-representation> </mct-representation>
</div> </div>
</div> </div>
<mct-representation key="representation.selected.key" <div class="holder l-flex-col flex-elem grows l-object-wrapper">
mct-object="representation.selected.key && domainObject" <div class="holder l-flex-col flex-elem grows l-object-wrapper-inner">
class="abs object-holder"> <!-- Toolbar and Save/Cancel buttons -->
</mct-representation> <div class="l-edit-controls flex-elem l-flex-row flex-align-end">
</span> <mct-toolbar name="mctToolbar"
structure="toolbar.structure"
ng-model="toolbar.state"
class="flex-elem grows">
</mct-toolbar>
<mct-representation key="'edit-action-buttons'"
mct-object="domainObject"
class='flex-elem conclude-editing'>
</mct-representation>
</div>
<mct-representation key="representation.selected.key"
mct-object="representation.selected.key && domainObject"
class="abs flex-elem grows object-holder-main scroll"
toolbar="toolbar">
</mct-representation>
</div><!--/ l-object-wrapper-inner -->
</div>
</div>

View File

@ -20,7 +20,7 @@
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<div class="abs holder-all browse-mode" ng-controller="BrowseController"> <div class="abs holder-all" ng-controller="BrowseController">
<mct-include key="'topbar-browse'"></mct-include> <mct-include key="'topbar-browse'"></mct-include>
<div class="abs holder holder-main browse-area s-browse-area browse-wrapper" <div class="abs holder holder-main browse-area s-browse-area browse-wrapper"
ng-controller="PaneController as modelPaneTree" ng-controller="PaneController as modelPaneTree"
@ -72,7 +72,7 @@
<div class="split-pane-component t-inspect pane right mobile-hide"> <div class="split-pane-component t-inspect pane right mobile-hide">
<mct-representation key="'object-inspector'" <mct-representation key="'object-inspector'"
mct-object="domainObject" mct-object="navigatedObject"
ng-model="treeModel"> ng-model="treeModel">
</mct-representation> </mct-representation>
<a class="mini-tab-icon anchor-right mobile-hide toggle-pane toggle-inspect" <a class="mini-tab-icon anchor-right mobile-hide toggle-pane toggle-inspect"

View File

@ -27,7 +27,9 @@
<mct-representation class="desktop-hide" key="'info-button'" mct-object="domainObject"></mct-representation> <mct-representation class="desktop-hide" key="'info-button'" mct-object="domainObject"></mct-representation>
</div> </div>
<div class='item-main abs lg'> <div class='item-main abs lg'>
<span class="t-item-icon" ng-class="{ 'l-icon-link':location.isLink() }">{{type.getGlyph()}}</span> <span class="t-item-icon" ng-class="{ 'l-icon-link':location.isLink() }">
<span class="t-item-icon-glyph ng-binding">{{type.getGlyph()}}</span>
</span>
<div class='ui-symbol abs item-open'>}</div> <div class='ui-symbol abs item-open'>}</div>
</div> </div>
<div class='bottom-bar bar abs'> <div class='bottom-bar bar abs'>

View File

@ -19,19 +19,23 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,Promise*/ /*global define,Promise, confirm*/
/** /**
* This bundle implements Browse mode. * This bundle implements Browse mode.
* @namespace platform/commonUI/browse * @namespace platform/commonUI/browse
*/ */
define( define(
[], [
function () { '../../../representation/src/gestures/GestureConstants',
'../../edit/src/objects/EditableDomainObject'
],
function (GestureConstants, EditableDomainObject) {
"use strict"; "use strict";
var ROOT_ID = "ROOT", var ROOT_ID = "ROOT",
DEFAULT_PATH = "mine"; DEFAULT_PATH = "mine",
CONFIRM_MSG = "Unsaved changes will be lost if you leave this page.";
/** /**
* The BrowseController is used to populate the initial scope in Browse * The BrowseController is used to populate the initial scope in Browse
@ -43,11 +47,18 @@ define(
* @memberof platform/commonUI/browse * @memberof platform/commonUI/browse
* @constructor * @constructor
*/ */
function BrowseController($scope, $route, $location, objectService, navigationService, urlService) { function BrowseController($scope, $route, $location, $q, objectService, navigationService, urlService) {
var path = [ROOT_ID].concat( var path = [ROOT_ID].concat(
($route.current.params.ids || DEFAULT_PATH).split("/") ($route.current.params.ids || DEFAULT_PATH).split("/")
); );
function isDirty(){
var editorCapability = $scope.navigatedObject &&
$scope.navigatedObject.getCapability("editor"),
hasChanges = editorCapability && editorCapability.dirty();
return hasChanges;
}
function updateRoute(domainObject) { function updateRoute(domainObject) {
var priorRoute = $route.current, var priorRoute = $route.current,
// Act as if params HADN'T changed to avoid page reload // Act as if params HADN'T changed to avoid page reload
@ -64,20 +75,36 @@ define(
// urlService.urlForLocation used to adjust current // urlService.urlForLocation used to adjust current
// path to new, addressed, path based on // path to new, addressed, path based on
// domainObject // domainObject
$location.path(urlService.urlForLocation("browse", domainObject)); $location.path(urlService.urlForLocation("browse",
domainObject.hasCapability('editor') ?
domainObject.getOriginalObject() : domainObject));
} }
// Callback for updating the in-scope reference to the object // Callback for updating the in-scope reference to the object
// that is currently navigated-to. // that is currently navigated-to.
function setNavigation(domainObject) { function setNavigation(domainObject) {
$scope.navigatedObject = domainObject; if (domainObject === $scope.navigatedObject){
$scope.treeModel.selectedObject = domainObject; //do nothing;
navigationService.setNavigation(domainObject); return;
updateRoute(domainObject); }
if (isDirty() && !confirm(CONFIRM_MSG)) {
$scope.treeModel.selectedObject = $scope.navigatedObject;
navigationService.setNavigation($scope.navigatedObject);
} else {
if ($scope.navigatedObject && $scope.navigatedObject.hasCapability("editor")){
$scope.navigatedObject.getCapability("editor").cancel();
}
$scope.navigatedObject = domainObject;
$scope.treeModel.selectedObject = domainObject;
navigationService.setNavigation(domainObject);
updateRoute(domainObject);
}
} }
function navigateTo(domainObject) { function navigateTo(domainObject) {
// Check if an object has been navigated-to already... // Check if an object has been navigated-to already...
// If not, or if an ID path has been explicitly set in the URL, // If not, or if an ID path has been explicitly set in the URL,
// navigate to the URL-specified object. // navigate to the URL-specified object.
@ -143,6 +170,12 @@ define(
selectedObject: navigationService.getNavigation() selectedObject: navigationService.getNavigation()
}; };
$scope.beforeUnloadWarning = function() {
return isDirty() ?
"Unsaved changes will be lost if you leave this page." :
undefined;
};
// Listen for changes in navigation state. // Listen for changes in navigation state.
navigationService.addListener(setNavigation); navigationService.addListener(setNavigation);

View File

@ -22,8 +22,11 @@
/*global define,Promise*/ /*global define,Promise*/
define( define(
[], [
function () { '../../../representation/src/gestures/GestureConstants',
'../../edit/src/objects/EditableDomainObject'
],
function (GestureConstants, EditableDomainObject) {
"use strict"; "use strict";
/** /**
@ -32,8 +35,10 @@ define(
* @memberof platform/commonUI/browse * @memberof platform/commonUI/browse
* @constructor * @constructor
*/ */
function BrowseObjectController($scope, $location, $route) { function BrowseObjectController($scope, $location, $route, $q, navigationService) {
var navigatedObject;
function setViewForDomainObject(domainObject) { function setViewForDomainObject(domainObject) {
var locationViewKey = $location.search().view; var locationViewKey = $location.search().view;
function selectViewIfMatching(view) { function selectViewIfMatching(view) {
@ -47,12 +52,15 @@ define(
((domainObject && domainObject.useCapability('view')) || []) ((domainObject && domainObject.useCapability('view')) || [])
.forEach(selectViewIfMatching); .forEach(selectViewIfMatching);
} }
navigatedObject = domainObject;
} }
function updateQueryParam(viewKey) { function updateQueryParam(viewKey) {
var unlisten, priorRoute = $route.current; var unlisten,
priorRoute = $route.current,
isEditMode = $scope.domainObject && $scope.domainObject.hasCapability('editor');
if (viewKey) { if (viewKey && !isEditMode) {
$location.search('view', viewKey); $location.search('view', viewKey);
unlisten = $scope.$on('$locationChangeSuccess', function () { unlisten = $scope.$on('$locationChangeSuccess', function () {
// Checks path to make sure /browse/ is at front // Checks path to make sure /browse/ is at front
@ -67,6 +75,15 @@ define(
$scope.$watch('domainObject', setViewForDomainObject); $scope.$watch('domainObject', setViewForDomainObject);
$scope.$watch('representation.selected.key', updateQueryParam); $scope.$watch('representation.selected.key', updateQueryParam);
$scope.cancelEditing = function() {
navigationService.setNavigation($scope.domainObject.getDomainObject());
};
$scope.doAction = function (action){
return $scope[action] && $scope[action]();
};
} }
return BrowseObjectController; return BrowseObjectController;

View File

@ -25,8 +25,11 @@
* Module defining CreateAction. Created by vwoeltje on 11/10/14. * Module defining CreateAction. Created by vwoeltje on 11/10/14.
*/ */
define( define(
['./CreateWizard'], [
function (CreateWizard) { './CreateWizard',
'../../../edit/src/objects/EditableDomainObject'
],
function (CreateWizard, EditableDomainObject) {
"use strict"; "use strict";
/** /**
@ -45,13 +48,11 @@ define(
* override this) * override this)
* @param {ActionContext} context the context in which the * @param {ActionContext} context the context in which the
* action is being performed * action is being performed
* @param {DialogService} dialogService the dialog service * @param {NavigationService} navigationService the navigation service,
* to use when requesting user input * which handles changes in navigation. It allows the object
* @param {CreationService} creationService the creation service, * being browsed/edited to be set.
* which handles the actual instantiation and persistence
* of the newly-created domain object
*/ */
function CreateAction(type, parent, context, dialogService, creationService, policyService) { function CreateAction(type, parent, context, $q, navigationService) {
this.metadata = { this.metadata = {
key: 'create', key: 'create',
glyph: type.getGlyph(), glyph: type.getGlyph(),
@ -63,9 +64,21 @@ define(
this.type = type; this.type = type;
this.parent = parent; this.parent = parent;
this.policyService = policyService; this.navigationService = navigationService;
this.dialogService = dialogService; this.$q = $q;
this.creationService = creationService; }
// Get a count of views which are not flagged as non-editable.
function countEditableViews(domainObject) {
var views = domainObject && domainObject.useCapability('view'),
count = 0;
// A view is editable unless explicitly flagged as not
(views || []).forEach(function (view) {
count += (view.editable !== false) ? 1 : 0;
});
return count;
} }
/** /**
@ -73,45 +86,25 @@ define(
* This will prompt for user input first. * This will prompt for user input first.
*/ */
CreateAction.prototype.perform = function () { CreateAction.prototype.perform = function () {
/* var newModel = this.type.getInitialModel(),
Overview of steps in object creation: parentObject = this.navigationService.getNavigation(),
newObject,
editableObject;
1. Show dialog newModel.type = this.type.getKey();
a. Prepare dialog contents newObject = parentObject.useCapability('instantiation', newModel);
b. Invoke dialogService editableObject = new EditableDomainObject(newObject, this.$q);
2. Create new object in persistence service editableObject.setOriginalObject(parentObject);
a. Generate UUID editableObject.getCapability('status').set('editing', true);
b. Store model editableObject.useCapability('mutation', function(model){
3. Mutate destination container model.location = parentObject.getId();
a. Get mutation capability });
b. Add new id to composition
4. Persist destination container
a. ...use persistence capability.
*/
// The wizard will handle creating the form model based if (countEditableViews(editableObject) > 0 && editableObject.hasCapability('composition')) {
// on the type... this.navigationService.setNavigation(editableObject);
var wizard = } else {
new CreateWizard(this.type, this.parent, this.policyService), return editableObject.getCapability('action').perform('save');
self = this;
// Create and persist the new object, based on user
// input.
function persistResult(formValue) {
var parent = wizard.getLocation(formValue),
newModel = wizard.createModel(formValue);
return self.creationService.createObject(newModel, parent);
} }
function doNothing() {
// Create cancelled, do nothing
return false;
}
return this.dialogService.getUserInput(
wizard.getFormStructure(),
wizard.getInitialFormValue()
).then(persistResult, doNothing);
}; };

View File

@ -46,10 +46,10 @@ define(
* introduced in this bundle), responsible for handling actual * introduced in this bundle), responsible for handling actual
* object creation. * object creation.
*/ */
function CreateActionProvider(typeService, dialogService, creationService, policyService) { function CreateActionProvider($q, typeService, navigationService, policyService) {
this.typeService = typeService; this.typeService = typeService;
this.dialogService = dialogService; this.navigationService = navigationService;
this.creationService = creationService; this.$q = $q;
this.policyService = policyService; this.policyService = policyService;
} }
@ -75,9 +75,8 @@ define(
type, type,
destination, destination,
context, context,
self.dialogService, self.$q,
self.creationService, self.navigationService
self.policyService
); );
}); });
}; };

View File

@ -34,9 +34,9 @@ define(
* @memberof platform/commonUI/browse * @memberof platform/commonUI/browse
* @constructor * @constructor
*/ */
function CreateWizard(type, parent, policyService) { function CreateWizard(type, parent, policyService, initialModel) {
this.type = type; this.type = type;
this.model = type.getInitialModel(); this.model = initialModel || type.getInitialModel();
this.properties = type.getProperties(); this.properties = type.getProperties();
this.parent = parent; this.parent = parent;
this.policyService = policyService; this.policyService = policyService;

View File

@ -19,7 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine,xit,xdescribe*/
/** /**
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14. * MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
@ -29,7 +29,8 @@ define(
function (BrowseController) { function (BrowseController) {
"use strict"; "use strict";
describe("The browse controller", function () { //TODO: Disabled for NEM Beta
xdescribe("The browse controller", function () {
var mockScope, var mockScope,
mockRoute, mockRoute,
mockLocation, mockLocation,

View File

@ -19,7 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine,xit,xdescribe*/
/** /**
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14. * MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
@ -99,7 +99,8 @@ define(
); );
}); });
it("exposes one create action per type", function () { //TODO: Disabled for NEM Beta
xit("exposes one create action per type", function () {
expect(provider.getActions({ expect(provider.getActions({
key: "create", key: "create",
domainObject: {} domainObject: {}
@ -113,7 +114,8 @@ define(
}).length).toEqual(0); }).length).toEqual(0);
}); });
it("does not expose non-creatable types", function () { //TODO: Disabled for NEM Beta
xit("does not expose non-creatable types", function () {
// One of the types won't have the creation feature... // One of the types won't have the creation feature...
mockPolicyMap[mockTypes[0].getName()] = false; mockPolicyMap[mockTypes[0].getName()] = false;
// ...so it should have been filtered out. // ...so it should have been filtered out.

View File

@ -19,7 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine,xit,xdescribe*/
/** /**
* MCTRepresentationSpec. Created by vwoeltje on 11/6/14. * MCTRepresentationSpec. Created by vwoeltje on 11/6/14.
@ -103,7 +103,8 @@ define(
expect(metadata.glyph).toEqual("T"); expect(metadata.glyph).toEqual("T");
}); });
it("invokes the creation service when performed", function () { //TODO: Disabled for NEM Beta
xit("invokes the creation service when performed", function () {
action.perform(); action.perform();
expect(mockCreationService.createObject).toHaveBeenCalledWith( expect(mockCreationService.createObject).toHaveBeenCalledWith(
{ type: "test" }, { type: "test" },
@ -111,7 +112,8 @@ define(
); );
}); });
it("does not create an object if the user cancels", function () { //TODO: Disabled for NEM Beta
xit("does not create an object if the user cancels", function () {
mockDialogService.getUserInput.andReturn({ mockDialogService.getUserInput.andReturn({
then: function (callback, fail) { then: function (callback, fail) {
fail(); fail();

View File

@ -0,0 +1,91 @@
/*****************************************************************************
* 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 define*/
define([
"./src/DialogService",
"./src/OverlayService",
'legacyRegistry'
], function (
DialogService,
OverlayService,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/commonUI/dialog", {
"extensions": {
"services": [
{
"key": "dialogService",
"implementation": DialogService,
"depends": [
"overlayService",
"$q",
"$log"
]
},
{
"key": "overlayService",
"implementation": OverlayService,
"depends": [
"$document",
"$compile",
"$rootScope"
]
}
],
"templates": [
{
"key": "overlay-dialog",
"templateUrl": "templates/overlay-dialog.html"
},
{
"key": "overlay-options",
"templateUrl": "templates/overlay-options.html"
},
{
"key": "form-dialog",
"templateUrl": "templates/dialog.html"
},
{
"key": "overlay-blocking-message",
"templateUrl": "templates/overlay-blocking-message.html"
},
{
"key": "message",
"templateUrl": "templates/message.html"
},
{
"key": "overlay-message-list",
"templateUrl": "templates/overlay-message-list.html"
}
],
"containers": [
{
"key": "overlay",
"templateUrl": "templates/overlay.html"
}
]
}
});
});

View File

@ -1,48 +0,0 @@
{
"extensions": {
"services": [
{
"key": "dialogService",
"implementation": "DialogService.js",
"depends": [ "overlayService", "$q", "$log" ]
},
{
"key": "overlayService",
"implementation": "OverlayService.js",
"depends": [ "$document", "$compile", "$rootScope" ]
}
],
"templates": [
{
"key": "overlay-dialog",
"templateUrl": "templates/overlay-dialog.html"
},
{
"key": "overlay-options",
"templateUrl": "templates/overlay-options.html"
},
{
"key": "form-dialog",
"templateUrl": "templates/dialog.html"
},
{
"key": "overlay-blocking-message",
"templateUrl": "templates/overlay-blocking-message.html"
},
{
"key": "message",
"templateUrl": "templates/message.html"
},
{
"key": "overlay-message-list",
"templateUrl": "templates/overlay-message-list.html"
}
],
"containers": [
{
"key": "overlay",
"templateUrl": "templates/overlay.html"
}
]
}
}

View File

@ -0,0 +1,238 @@
/*****************************************************************************
* 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 define*/
define([
"./src/controllers/EditController",
"./src/controllers/EditActionController",
"./src/controllers/EditPanesController",
"./src/controllers/ElementsController",
"./src/directives/MCTBeforeUnload",
"./src/actions/LinkAction",
"./src/actions/EditAction",
"./src/actions/PropertiesAction",
"./src/actions/RemoveAction",
"./src/actions/SaveAction",
"./src/actions/CancelAction",
"./src/policies/EditActionPolicy",
"./src/representers/EditRepresenter",
"./src/representers/EditToolbarRepresenter",
'legacyRegistry'
], function (
EditController,
EditActionController,
EditPanesController,
ElementsController,
MCTBeforeUnload,
LinkAction,
EditAction,
PropertiesAction,
RemoveAction,
SaveAction,
CancelAction,
EditActionPolicy,
EditRepresenter,
EditToolbarRepresenter,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/commonUI/edit", {
"extensions": {
"routes": [
{
"when": "/edit",
"templateUrl": "templates/edit.html"
}
],
"controllers": [
{
"key": "EditController",
"implementation": EditController,
"depends": [
"$scope",
"$q",
"navigationService"
]
},
{
"key": "EditActionController",
"implementation": EditActionController,
"depends": [
"$scope"
]
},
{
"key": "EditPanesController",
"implementation": EditPanesController,
"depends": [
"$scope"
]
},
{
"key": "ElementsController",
"implementation": ElementsController,
"depends": [
"$scope"
]
}
],
"directives": [
{
"key": "mctBeforeUnload",
"implementation": MCTBeforeUnload,
"depends": [
"$window"
]
}
],
"actions": [
{
"key": "compose",
"implementation": LinkAction
},
{
"key": "edit",
"implementation": EditAction,
"depends": [
"$location",
"navigationService",
"$log",
"$q"
],
"description": "Edit this object.",
"category": "view-control",
"glyph": "p"
},
{
"key": "properties",
"category": [
"contextual",
"view-control"
],
"implementation": PropertiesAction,
"glyph": "p",
"name": "Edit Properties...",
"description": "Edit properties of this object.",
"depends": [
"dialogService"
]
},
{
"key": "remove",
"category": "contextual",
"implementation": RemoveAction,
"glyph": "Z",
"name": "Remove",
"description": "Remove this object from its containing object.",
"depends": [
"$q",
"navigationService"
]
},
{
"key": "save",
"category": "conclude-editing",
"implementation": SaveAction,
"name": "Save",
"description": "Save changes made to these objects.",
"depends": [
"$q",
"$location",
"$injector",
"urlService",
"navigationService",
"policyService",
"dialogService",
"creationService"
],
"priority": "mandatory"
},
{
"key": "cancel",
"category": "conclude-editing",
"implementation": CancelAction,
"name": "Cancel",
"description": "Discard changes made to these objects.",
"depends": [
"$injector",
"navigationService"
]
}
],
"policies": [
{
"category": "action",
"implementation": EditActionPolicy
}
],
"templates": [
{
"key": "edit-library",
"templateUrl": "templates/library.html"
}
],
"representations": [
{
"key": "edit-object",
"templateUrl": "templates/edit-object.html",
"uses": [
"view"
]
},
{
"key": "edit-action-buttons",
"templateUrl": "templates/edit-action-buttons.html",
"uses": [
"action"
]
},
{
"key": "edit-elements",
"templateUrl": "templates/elements.html",
"uses": [
"composition"
],
"gestures": [
"drop"
]
},
{
"key": "topbar-edit",
"templateUrl": "templates/topbar-edit.html"
}
],
"representers": [
{
"implementation": EditRepresenter,
"depends": [
"$q",
"$log"
]
},
{
"implementation": EditToolbarRepresenter
}
]
}
});
});

View File

@ -1,130 +0,0 @@
{
"extensions": {
"routes": [
{
"when": "/edit",
"templateUrl": "templates/edit.html"
}
],
"controllers": [
{
"key": "EditController",
"implementation": "controllers/EditController.js",
"depends": [ "$scope", "$q", "navigationService" ]
},
{
"key": "EditActionController",
"implementation": "controllers/EditActionController.js",
"depends": [ "$scope" ]
},
{
"key": "EditPanesController",
"implementation": "controllers/EditPanesController.js",
"depends": [ "$scope" ]
}
],
"directives": [
{
"key": "mctBeforeUnload",
"implementation": "directives/MCTBeforeUnload.js",
"depends": [ "$window" ]
}
],
"actions": [
{
"key": "compose",
"implementation": "actions/LinkAction.js"
},
{
"key": "edit",
"implementation": "actions/EditAction.js",
"depends": [ "$location", "navigationService", "$log" ],
"description": "Edit this object.",
"category": "view-control",
"glyph": "p"
},
{
"key": "properties",
"category": ["contextual", "view-control"],
"implementation": "actions/PropertiesAction.js",
"glyph": "p",
"name": "Edit Properties...",
"description": "Edit properties of this object.",
"depends": [ "dialogService" ]
},
{
"key": "remove",
"category": "contextual",
"implementation": "actions/RemoveAction.js",
"glyph": "Z",
"name": "Remove",
"description": "Remove this object from its containing object.",
"depends": [ "$q", "navigationService" ]
},
{
"key": "save",
"category": "conclude-editing",
"implementation": "actions/SaveAction.js",
"name": "Save",
"description": "Save changes made to these objects.",
"depends": [ "$location", "urlService" ],
"priority": "mandatory"
},
{
"key": "cancel",
"category": "conclude-editing",
"implementation": "actions/CancelAction.js",
"name": "Cancel",
"description": "Discard changes made to these objects.",
"depends": [ "$location", "urlService" ]
}
],
"policies": [
{
"category": "action",
"implementation": "policies/EditActionPolicy.js"
},
{
"category": "view",
"implementation": "policies/EditableViewPolicy.js"
}
],
"templates": [
{
"key": "edit-library",
"templateUrl": "templates/library.html"
}
],
"representations": [
{
"key": "edit-object",
"templateUrl": "templates/edit-object.html",
"uses": [ "view" ]
},
{
"key": "edit-action-buttons",
"templateUrl": "templates/edit-action-buttons.html",
"uses": [ "action" ]
},
{
"key": "edit-elements",
"templateUrl": "templates/elements.html",
"uses": [ "composition" ],
"gestures": [ "drop" ]
},
{
"key": "topbar-edit",
"templateUrl": "templates/topbar-edit.html"
}
],
"representers": [
{
"implementation": "representers/EditRepresenter.js",
"depends": [ "$q", "$log" ]
},
{
"implementation": "representers/EditToolbarRepresenter.js"
}
]
}
}

View File

@ -21,10 +21,11 @@
--> -->
<span ng-controller="EditActionController"> <span ng-controller="EditActionController">
<span ng-repeat="currentAction in editActions"> <span ng-repeat="currentAction in editActions">
<a class='s-btn' <a class='s-btn t-{{currentAction.getMetadata().key}}'
title='{{currentAction.getMetadata().name}}'
ng-click="currentAction.perform()" ng-click="currentAction.perform()"
ng-class="{ major: $index === 0, subtle: $index !== 0 }"> ng-class="{ major: $index === 0 }">
{{currentAction.getMetadata().name}} <span class="title-label">{{currentAction.getMetadata().name}}</span>
</a> </a>
</span> </span>
</span> </span>

View File

@ -19,16 +19,19 @@
this source code distribution or the Licensing information page available this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<div class="current-elements abs" style="height: 100%;"> <div ng-controller="ElementsController">
<!--p class="hint">Drop objects here to add them...</p--> <mct-include key="'input-filter'"
<ul class="tree"> class="flex-elem holder"
<li ng-repeat="containedObject in composition"> ng-model="filterBy">
<span class="tree-item"> </mct-include>
<mct-representation key="'label'" <div class="current-elements abs" style="height: 100%;">
mct-object="containedObject" <ul class="tree">
class="rep-object-label"> <li ng-repeat="containedObject in composition | filter:searchText">
</mct-representation> <span class="tree-item">
</span> <mct-representation key="'label'" mct-object="containedObject">
</li> </mct-representation>
</ul> </span>
</li>
</ul>
</div>
</div> </div>

View File

@ -33,10 +33,10 @@ define(
* @memberof platform/commonUI/edit * @memberof platform/commonUI/edit
* @implements {Action} * @implements {Action}
*/ */
function CancelAction($location, urlService, context) { function CancelAction($injector, navigationService, context) {
this.domainObject = context.domainObject; this.domainObject = context.domainObject;
this.$location = $location; this.navigationService = navigationService;
this.urlService = urlService; this.objectService = $injector.get('objectService');
} }
/** /**
@ -47,8 +47,7 @@ define(
*/ */
CancelAction.prototype.perform = function () { CancelAction.prototype.perform = function () {
var domainObject = this.domainObject, var domainObject = this.domainObject,
$location = this.$location, self = this;
urlService = this.urlService;
// Look up the object's "editor.completion" capability; // Look up the object's "editor.completion" capability;
// this is introduced by EditableDomainObject which is // this is introduced by EditableDomainObject which is
@ -64,13 +63,10 @@ define(
return editor.cancel(); return editor.cancel();
} }
// Discard the current root view (which will be the editing //Discard current 'editable' object, and retrieve original
// UI, which will have been pushed atop the Browise UI.) // un-edited object.
function returnToBrowse() { function returnToBrowse() {
$location.path($location.path(urlService.urlForLocation( return self.navigationService.setNavigation(self.domainObject.getOriginalObject());
"browse",
domainObject
)));
} }
return doCancel(getEditorCapability()) return doCancel(getEditorCapability())

View File

@ -25,8 +25,8 @@
* Module defining EditAction. Created by vwoeltje on 11/14/14. * Module defining EditAction. Created by vwoeltje on 11/14/14.
*/ */
define( define(
[], ['../objects/EditableDomainObject'],
function () { function (EditableDomainObject) {
"use strict"; "use strict";
// A no-op action to return in the event that the action cannot // A no-op action to return in the event that the action cannot
@ -46,7 +46,7 @@ define(
* @constructor * @constructor
* @implements {Action} * @implements {Action}
*/ */
function EditAction($location, navigationService, $log, context) { function EditAction($location, navigationService, $log, $q, context) {
var domainObject = (context || {}).domainObject; var domainObject = (context || {}).domainObject;
// We cannot enter Edit mode if we have no domain object to // We cannot enter Edit mode if we have no domain object to
@ -65,14 +65,20 @@ define(
this.domainObject = domainObject; this.domainObject = domainObject;
this.$location = $location; this.$location = $location;
this.navigationService = navigationService; this.navigationService = navigationService;
this.$q = $q;
} }
/** /**
* Enter edit mode. * Enter edit mode.
*/ */
EditAction.prototype.perform = function () { EditAction.prototype.perform = function () {
this.navigationService.setNavigation(this.domainObject); var editableObject;
this.$location.path("/edit"); if (!this.domainObject.hasCapability("editor")) {
editableObject = new EditableDomainObject(this.domainObject, this.$q);
editableObject.getCapability('status').set('editing', true);
this.navigationService.setNavigation(editableObject);
}
//this.$location.path("/edit");
}; };
/** /**
@ -83,10 +89,11 @@ define(
*/ */
EditAction.appliesTo = function (context) { EditAction.appliesTo = function (context) {
var domainObject = (context || {}).domainObject, var domainObject = (context || {}).domainObject,
type = domainObject && domainObject.getCapability('type'); type = domainObject && domainObject.getCapability('type'),
isEditMode = domainObject && domainObject.getDomainObject ? true : false;
// Only allow creatable types to be edited // Only allow creatable types to be edited
return type && type.hasFeature('creation'); return type && type.hasFeature('creation') && !isEditMode;
}; };
return EditAction; return EditAction;

View File

@ -20,10 +20,12 @@
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define*/ /*global define*/
/*jslint es5: true */
define( define(
function () { ['../../../browse/src/creation/CreateWizard'],
function (CreateWizard) {
'use strict'; 'use strict';
/** /**
@ -34,12 +36,28 @@ define(
* @implements {Action} * @implements {Action}
* @memberof platform/commonUI/edit * @memberof platform/commonUI/edit
*/ */
function SaveAction($location, urlService, context) { function SaveAction($q, $location, $injector, urlService, navigationService, policyService, dialogService, creationService, context) {
this.domainObject = (context || {}).domainObject; this.domainObject = (context || {}).domainObject;
this.$location = $location; this.$location = $location;
this.injectObjectService = function(){
this.objectService = $injector.get("objectService");
};
this.urlService = urlService; this.urlService = urlService;
this.navigationService = navigationService;
this.policyService = policyService;
this.dialogService = dialogService;
this.creationService = creationService;
this.$q = $q;
} }
SaveAction.prototype.getObjectService = function(){
// Lazily acquire object service (avoids cyclical dependency)
if (!this.objectService) {
this.injectObjectService();
}
return this.objectService;
};
/** /**
* Save changes and conclude editing. * Save changes and conclude editing.
* *
@ -50,25 +68,133 @@ define(
SaveAction.prototype.perform = function () { SaveAction.prototype.perform = function () {
var domainObject = this.domainObject, var domainObject = this.domainObject,
$location = this.$location, $location = this.$location,
urlService = this.urlService; urlService = this.urlService,
self = this;
function resolveWith(object){
return function() {
return object;
};
}
function doWizardSave(parent) {
var context = domainObject.getCapability("context"),
wizard = new CreateWizard(domainObject.useCapability('type'), parent, self.policyService, domainObject.getModel());
function mergeObjects(fromObject, toObject){
Object.keys(fromObject).forEach(function(key) {
toObject[key] = fromObject[key];
});
}
// Create and persist the new object, based on user
// input.
function buildObjectFromInput(formValue) {
var parent = wizard.getLocation(formValue),
formModel = wizard.createModel(formValue);
formModel.location = parent.getId();
//Replace domain object model with model collected
// from user form.
domainObject.useCapability("mutation", function(){
//Replace object model with the model from the form
return formModel;
});
return domainObject;
}
function getAllComposees(domainObject){
return domainObject.useCapability('composition');
}
function addComposeesToObject(object){
return function(composees){
return self.$q.all(composees.map(function (composee) {
return object.getCapability('composition').add(composee);
})).then(resolveWith(object));
};
}
/**
* Add the composees of the 'virtual' object to the
* persisted object
* @param object
* @returns {*}
*/
function composeNewObject(object){
if (self.$q.when(object.hasCapability('composition') && domainObject.hasCapability('composition'))) {
return getAllComposees(domainObject)
.then(addComposeesToObject(object));
}
}
return self.dialogService
.getUserInput(wizard.getFormStructure(), wizard.getInitialFormValue())
.then(buildObjectFromInput);
}
function persistObject(object){
return ((object.hasCapability('editor') && object.getCapability('editor').save(true)) ||
object.getCapability('persistence').persist())
.then(resolveWith(object));
}
function fetchObject(objectId){
return self.getObjectService().getObjects([objectId]).then(function(objects){
return objects[objectId];
});
}
function getParent(object){
return fetchObject(object.getModel().location);
}
function locateObjectInParent(parent){
parent.getCapability('composition').add(domainObject.getId());
return parent;
}
function doNothing() {
// Create cancelled, do nothing
return false;
}
// Invoke any save behavior introduced by the editor capability; // Invoke any save behavior introduced by the editor capability;
// 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.
function doSave() { function doSave() {
return domainObject.getCapability("editor").save(); //This is a new 'virtual object' that has not been persisted
// yet.
if (!domainObject.getModel().persisted){
return getParent(domainObject)
.then(doWizardSave)
.then(persistObject)
.then(getParent)//Parent may have changed based
// on user selection
.then(locateObjectInParent)
.then(persistObject)
.then(function(){
return fetchObject(domainObject.getId());
})
.catch(doNothing);
} else {
return domainObject.getCapability("editor").save()
.then(resolveWith(domainObject.getOriginalObject()));
}
} }
// Discard the current root view (which will be the editing // Discard the current root view (which will be the editing
// UI, which will have been pushed atop the Browise UI.) // UI, which will have been pushed atop the Browse UI.)
function returnToBrowse() { function returnToBrowse(object) {
return $location.path(urlService.urlForLocation( if (object) {
"browse", self.navigationService.setNavigation(object);
domainObject }
)); return object;
} }
//return doSave().then(returnToBrowse);
return doSave().then(returnToBrowse); return doSave().then(returnToBrowse);
}; };

View File

@ -0,0 +1,60 @@
/*****************************************************************************
* 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 define*/
define(
function () {
'use strict';
var DISALLOWED_ACTIONS = ["move", "copy", "link", "window", "follow"];
/**
* Editable Action Capability. Overrides the action capability
* normally exhibited by a domain object and filters out certain
* actions not applicable when an object is in edit mode.
*
* Meant specifically for use by EditableDomainObject and the
* associated cache; the constructor signature is particular
* to a pattern used there and may contain unused arguments.
* @constructor
* @memberof platform/commonUI/edit
* @implements {PersistenceCapability}
*/
function EditableActionCapability(
actionCapability,
editableObject,
domainObject,
cache
) {
var action = Object.create(actionCapability);
action.getActions = function(domainObject) {
return actionCapability.getActions(domainObject).filter(function(action){
return DISALLOWED_ACTIONS.indexOf(action.getMetadata().key) === -1;
});
};
return action;
}
return EditableActionCapability;
}
);

View File

@ -80,6 +80,7 @@ define(
EditorCapability.prototype.save = function (nonrecursive) { EditorCapability.prototype.save = function (nonrecursive) {
var domainObject = this.domainObject, var domainObject = this.domainObject,
editableObject = this.editableObject, editableObject = this.editableObject,
self = this,
cache = this.cache; cache = this.cache;
// Update the underlying, "real" domain object's model // Update the underlying, "real" domain object's model
@ -95,9 +96,17 @@ define(
return domainObject.getCapability('persistence').persist(); return domainObject.getCapability('persistence').persist();
} }
return nonrecursive ? editableObject.getCapability("status").set("editing", false);
resolvePromise(doMutate()).then(doPersist) :
resolvePromise(cache.saveAll()); if (nonrecursive) {
return resolvePromise(doMutate())
.then(doPersist)
.then(function(){
self.cancel();
});
} else {
return resolvePromise(cache.saveAll());
}
}; };
/** /**
@ -109,6 +118,9 @@ define(
* @memberof platform/commonUI/edit.EditorCapability# * @memberof platform/commonUI/edit.EditorCapability#
*/ */
EditorCapability.prototype.cancel = function () { EditorCapability.prototype.cancel = function () {
this.editableObject.getCapability("status").set("editing", false);
//TODO: Reset the cache as well here.
this.cache.markClean(this.editableObject);
return resolvePromise(undefined); return resolvePromise(undefined);
}; };

View File

@ -0,0 +1,47 @@
/*****************************************************************************
* 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 define,Promise*/
define(
[],
function () {
"use strict";
/**
* The ElementsController prepares the elements view for display
*
* @constructor
*/
function ElementsController($scope) {
function filterBy(text){
if (typeof text === 'undefined') {
return $scope.searchText;
} else {
$scope.searchText = text;
}
}
$scope.filterBy = filterBy;
}
return ElementsController;
}
);

View File

@ -37,6 +37,7 @@ define(
'../capabilities/EditableCompositionCapability', '../capabilities/EditableCompositionCapability',
'../capabilities/EditableRelationshipCapability', '../capabilities/EditableRelationshipCapability',
'../capabilities/EditorCapability', '../capabilities/EditorCapability',
'../capabilities/EditableActionCapability',
'./EditableDomainObjectCache' './EditableDomainObjectCache'
], ],
function ( function (
@ -45,6 +46,7 @@ define(
EditableCompositionCapability, EditableCompositionCapability,
EditableRelationshipCapability, EditableRelationshipCapability,
EditorCapability, EditorCapability,
EditableActionCapability,
EditableDomainObjectCache EditableDomainObjectCache
) { ) {
"use strict"; "use strict";
@ -78,7 +80,9 @@ define(
// different versions of the same editable domain object // different versions of the same editable domain object
// are not shown in different sections of the same Edit // are not shown in different sections of the same Edit
// UI, which might thereby fall out of sync. // UI, which might thereby fall out of sync.
var cache; var cache,
originalObject = domainObject,
cachedObject;
// Constructor for EditableDomainObject, which adheres // Constructor for EditableDomainObject, which adheres
// to the same shared cache. // to the same shared cache.
@ -102,12 +106,22 @@ define(
capability; capability;
}; };
editableObject.setOriginalObject = function(object) {
originalObject = object;
};
editableObject.getOriginalObject = function() {
return originalObject;
};
return editableObject; return editableObject;
} }
cache = new EditableDomainObjectCache(EditableDomainObjectImpl, $q); cache = new EditableDomainObjectCache(EditableDomainObjectImpl, $q);
cachedObject = cache.getEditableObject(domainObject);
return cache.getEditableObject(domainObject); return cachedObject;
} }
return EditableDomainObject; return EditableDomainObject;

View File

@ -69,7 +69,9 @@ define(
*/ */
EditableDomainObjectCache.prototype.getEditableObject = function (domainObject) { EditableDomainObjectCache.prototype.getEditableObject = function (domainObject) {
var type = domainObject.getCapability('type'), var type = domainObject.getCapability('type'),
EditableDomainObject = this.EditableDomainObject; EditableDomainObject = this.EditableDomainObject,
editableObject,
statusListener;
// Track the top-level domain object; this will have // Track the top-level domain object; this will have
// some special behavior for its context capability. // some special behavior for its context capability.
@ -86,10 +88,12 @@ define(
} }
// Provide an editable form of the object // Provide an editable form of the object
return new EditableDomainObject( editableObject = new EditableDomainObject(
domainObject, domainObject,
this.cache.getCachedModel(domainObject) this.cache.getCachedModel(domainObject)
); );
return editableObject;
}; };
/** /**

View File

@ -34,21 +34,56 @@ define(
* @constructor * @constructor
* @implements {Policy.<Action, ActionContext>} * @implements {Policy.<Action, ActionContext>}
*/ */
function EditActionPolicy() { function EditActionPolicy(policyService) {
this.policyService = policyService;
} }
// Get a count of views which are not flagged as non-editable. function applicableView(key){
function countEditableViews(context) { return ['plot', 'scrolling'].indexOf(key) >= 0;
var domainObject = (context || {}).domainObject, }
views = domainObject && domainObject.useCapability('view'),
count = 0; function editableType(key){
return key === 'telemetry.panel';
}
/**
* Get a count of views which are not flagged as non-editable.
* @private
*/
EditActionPolicy.prototype.countEditableViews = function (context) {
var domainObject = context.domainObject,
count = 0,
type, views;
if (!domainObject){
return count;
}
type = domainObject.getCapability('type');
views = domainObject.useCapability('view');
// 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) {
count += (view.editable !== false) ? 1 : 0; if (view.editable === true || (applicableView(view.key) && editableType(type.getKey()))) {
count++;
}
}); });
return count; return count;
};
/**
* Checks whether the domain object is currently being edited. If
* so, the edit action is not applicable.
* @param context
* @returns {*|boolean}
*/
function isEditing(context) {
var domainObject = (context || {}).domainObject;
return domainObject
&& domainObject.hasCapability('status')
&& domainObject.getCapability('status').get('editing');
} }
EditActionPolicy.prototype.allow = function (action, context) { EditActionPolicy.prototype.allow = function (action, context) {
@ -59,11 +94,12 @@ define(
if (category === 'view-control') { if (category === 'view-control') {
// Restrict 'edit' to cases where there are editable // Restrict 'edit' to cases where there are editable
// views (similarly, restrict 'properties' to when // views (similarly, restrict 'properties' to when
// the converse is true) // the converse is true), and where the domain object is not
// already being edited.
if (key === 'edit') { if (key === 'edit') {
return countEditableViews(context) > 0; return this.countEditableViews(context) > 0 && !isEditing(context);
} else if (key === 'properties') { } else if (key === 'properties') {
return countEditableViews(context) < 1; return this.countEditableViews(context) < 1 && !isEditing(context);
} }
} }

View File

@ -48,6 +48,8 @@ define(
function EditRepresenter($q, $log, scope) { function EditRepresenter($q, $log, scope) {
var self = this; var self = this;
this.scope = scope;
// Mutate and persist a new version of a domain object's model. // Mutate and persist a new version of a domain object's model.
function doPersist(model) { function doPersist(model) {
var domainObject = self.domainObject; var domainObject = self.domainObject;
@ -90,8 +92,14 @@ define(
} }
} }
function setEditable(editableDomainObject) {
self.domainObject = editableDomainObject;
scope.model = editableDomainObject.getModel();
}
// Place the "commit" method in the scope // Place the "commit" method in the scope
scope.commit = commit; scope.commit = commit;
scope.setEditable = setEditable;
} }
// Handle a specific representation of a specific domain object // Handle a specific representation of a specific domain object
@ -100,6 +108,7 @@ define(
this.key = (representation || {}).key; this.key = (representation || {}).key;
// Track the represented object // Track the represented object
this.domainObject = representedObject; this.domainObject = representedObject;
// Ensure existing watches are released // Ensure existing watches are released
this.destroy(); this.destroy();
}; };

View File

@ -19,14 +19,15 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,describe,it,expect,beforeEach,jasmine*/ /*global define,describe,it,expect,beforeEach,jasmine,xit,xdescribe*/
define( define(
["../../src/actions/CancelAction"], ["../../src/actions/CancelAction"],
function (CancelAction) { function (CancelAction) {
"use strict"; "use strict";
describe("The Cancel action", function () { //TODO: Disabled for NEM Beta
xdescribe("The Cancel action", function () {
var mockLocation, var mockLocation,
mockDomainObject, mockDomainObject,
mockEditorCapability, mockEditorCapability,

View File

@ -19,7 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,describe,it,expect,beforeEach,jasmine*/ /*global define,describe,it,expect,beforeEach,jasmine,xit,xdescribe*/
define( define(
["../../src/actions/EditAction"], ["../../src/actions/EditAction"],
@ -77,18 +77,21 @@ define(
expect(mockType.hasFeature).toHaveBeenCalledWith('creation'); expect(mockType.hasFeature).toHaveBeenCalledWith('creation');
}); });
it("changes URL path to edit mode when performed", function () { //TODO: Disabled for NEM Beta
xit("changes URL path to edit mode when performed", function () {
action.perform(); action.perform();
expect(mockLocation.path).toHaveBeenCalledWith("/edit"); expect(mockLocation.path).toHaveBeenCalledWith("/edit");
}); });
it("ensures that the edited object is navigated-to", function () { //TODO: Disabled for NEM Beta
xit("ensures that the edited object is navigated-to", function () {
action.perform(); action.perform();
expect(mockNavigationService.setNavigation) expect(mockNavigationService.setNavigation)
.toHaveBeenCalledWith(mockDomainObject); .toHaveBeenCalledWith(mockDomainObject);
}); });
it("logs a warning if constructed when inapplicable", function () { //TODO: Disabled for NEM Beta
xit("logs a warning if constructed when inapplicable", function () {
// Verify precondition (ensure warn wasn't called during setup) // Verify precondition (ensure warn wasn't called during setup)
expect(mockLog.warn).not.toHaveBeenCalled(); expect(mockLog.warn).not.toHaveBeenCalled();

View File

@ -19,7 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,describe,it,expect,beforeEach,jasmine*/ /*global define,describe,it,expect,beforeEach,jasmine,xit,xdescribe*/
define( define(
["../../src/actions/SaveAction"], ["../../src/actions/SaveAction"],
@ -82,7 +82,8 @@ define(
expect(SaveAction.appliesTo(actionContext)).toBeFalsy(); expect(SaveAction.appliesTo(actionContext)).toBeFalsy();
}); });
it("invokes the editor capability's save functionality when performed", function () { //TODO: Disabled for NEM Beta
xit("invokes the editor capability's save functionality when performed", function () {
// Verify precondition // Verify precondition
expect(mockEditorCapability.save).not.toHaveBeenCalled(); expect(mockEditorCapability.save).not.toHaveBeenCalled();
action.perform(); action.perform();
@ -94,7 +95,8 @@ define(
expect(mockEditorCapability.cancel).not.toHaveBeenCalled(); expect(mockEditorCapability.cancel).not.toHaveBeenCalled();
}); });
it("returns to browse when performed", function () { //TODO: Disabled for NEM Beta
xit("returns to browse when performed", function () {
action.perform(); action.perform();
expect(mockLocation.path).toHaveBeenCalledWith( expect(mockLocation.path).toHaveBeenCalledWith(
mockUrlService.urlForLocation("browse", mockDomainObject) mockUrlService.urlForLocation("browse", mockDomainObject)

View File

@ -19,7 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,describe,it,expect,beforeEach,waitsFor,runs,jasmine*/ /*global define,describe,it,expect,beforeEach,waitsFor,runs,jasmine,xit,xdescribe*/
define( define(
["../../src/capabilities/EditorCapability"], ["../../src/capabilities/EditorCapability"],
@ -65,7 +65,8 @@ define(
); );
}); });
it("mutates the real domain object on nonrecursive save", function () { //TODO: Disabled for NEM Beta
xit("mutates the real domain object on nonrecursive save", function () {
capability.save(true).then(mockCallback); capability.save(true).then(mockCallback);
// Wait for promise to resolve // Wait for promise to resolve
@ -83,7 +84,8 @@ define(
}); });
}); });
it("tells the cache to save others", function () { //TODO: Disabled for NEM Beta
xit("tells the cache to save others", function () {
capability.save().then(mockCallback); capability.save().then(mockCallback);
// Wait for promise to resolve // Wait for promise to resolve
@ -96,7 +98,8 @@ define(
}); });
}); });
it("has no interactions on cancel", function () { //TODO: Disabled for NEM Beta
xit("has no interactions on cancel", function () {
capability.cancel().then(mockCallback); capability.cancel().then(mockCallback);
// Wait for promise to resolve // Wait for promise to resolve

View File

@ -19,7 +19,7 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global define,describe,it,expect,beforeEach,jasmine*/ /*global define,describe,it,expect,beforeEach,jasmine,xit,xdescribe*/
define( define(
["../../src/policies/EditActionPolicy"], ["../../src/policies/EditActionPolicy"],
@ -66,7 +66,8 @@ define(
policy = new EditActionPolicy(); policy = new EditActionPolicy();
}); });
it("allows the edit action when there are editable views", function () { //TODO: Disabled for NEM Beta
xit("allows the edit action when there are editable views", function () {
testViews = [ editableView ]; testViews = [ editableView ];
expect(policy.allow(mockEditAction, testContext)).toBeTruthy(); expect(policy.allow(mockEditAction, testContext)).toBeTruthy();
// No edit flag defined; should be treated as editable // No edit flag defined; should be treated as editable
@ -74,17 +75,21 @@ define(
expect(policy.allow(mockEditAction, testContext)).toBeTruthy(); expect(policy.allow(mockEditAction, testContext)).toBeTruthy();
}); });
it("allows the edit properties action when there are no editable views", function () { //TODO: Disabled for NEM Beta
xit("allows the edit properties action when there are no editable views", function () {
testViews = [ nonEditableView, nonEditableView ]; testViews = [ nonEditableView, nonEditableView ];
expect(policy.allow(mockPropertiesAction, testContext)).toBeTruthy(); expect(policy.allow(mockPropertiesAction, testContext)).toBeTruthy();
}); });
it("disallows the edit action when there are no editable views", function () { //TODO: Disabled for NEM Beta
xit("disallows the edit action when there are no editable views", function () {
testViews = [ nonEditableView, nonEditableView ]; testViews = [ nonEditableView, nonEditableView ];
expect(policy.allow(mockEditAction, testContext)).toBeFalsy(); expect(policy.allow(mockEditAction, testContext)).toBeFalsy();
}); });
it("disallows the edit properties action when there are editable views", function () { //TODO: Disabled for NEM Beta
xit("disallows the edit properties action when there are" +
" editable views", function () {
testViews = [ editableView ]; testViews = [ editableView ];
expect(policy.allow(mockPropertiesAction, testContext)).toBeFalsy(); expect(policy.allow(mockPropertiesAction, testContext)).toBeFalsy();
}); });

View File

@ -0,0 +1,63 @@
/*****************************************************************************
* 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 define*/
define([
"./src/FormatProvider",
"./src/UTCTimeFormat",
'legacyRegistry'
], function (
FormatProvider,
UTCTimeFormat,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/commonUI/formats", {
"name": "Time services bundle",
"description": "Defines interfaces and provides default implementations for handling different time systems.",
"extensions": {
"components": [
{
"provides": "formatService",
"type": "provider",
"implementation": FormatProvider,
"depends": [
"formats[]"
]
}
],
"formats": [
{
"key": "utc",
"implementation": UTCTimeFormat
}
],
"constants": [
{
"key": "DEFAULT_TIME_FORMAT",
"value": "utc"
}
]
}
});
});

View File

@ -1,26 +0,0 @@
{
"name": "Time services bundle",
"description": "Defines interfaces and provides default implementations for handling different time systems.",
"extensions": {
"components": [
{
"provides": "formatService",
"type": "provider",
"implementation": "FormatProvider.js",
"depends": [ "formats[]" ]
}
],
"formats": [
{
"key": "utc",
"implementation": "UTCTimeFormat.js"
}
],
"constants": [
{
"key": "DEFAULT_TIME_FORMAT",
"value": "utc"
}
]
}
}

View File

@ -0,0 +1,492 @@
/*****************************************************************************
* 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 define*/
define([
"./src/services/UrlService",
"./src/services/PopupService",
"./src/StyleSheetLoader",
"./src/UnsupportedBrowserWarning",
"./src/controllers/TimeRangeController",
"./src/controllers/DateTimePickerController",
"./src/controllers/DateTimeFieldController",
"./src/controllers/TreeNodeController",
"./src/controllers/ActionGroupController",
"./src/controllers/ToggleController",
"./src/controllers/ContextMenuController",
"./src/controllers/ClickAwayController",
"./src/controllers/ViewSwitcherController",
"./src/controllers/BottomBarController",
"./src/controllers/GetterSetterController",
"./src/controllers/SelectorController",
"./src/controllers/ObjectInspectorController",
"./src/controllers/BannerController",
"./src/directives/MCTContainer",
"./src/directives/MCTDrag",
"./src/directives/MCTClickElsewhere",
"./src/directives/MCTResize",
"./src/directives/MCTPopup",
"./src/directives/MCTScroll",
"./src/directives/MCTSplitPane",
"./src/directives/MCTSplitter",
'legacyRegistry'
], function (
UrlService,
PopupService,
StyleSheetLoader,
UnsupportedBrowserWarning,
TimeRangeController,
DateTimePickerController,
DateTimeFieldController,
TreeNodeController,
ActionGroupController,
ToggleController,
ContextMenuController,
ClickAwayController,
ViewSwitcherController,
BottomBarController,
GetterSetterController,
SelectorController,
ObjectInspectorController,
BannerController,
MCTContainer,
MCTDrag,
MCTClickElsewhere,
MCTResize,
MCTPopup,
MCTScroll,
MCTSplitPane,
MCTSplitter,
legacyRegistry
) {
"use strict";
legacyRegistry.register("platform/commonUI/general", {
"name": "General UI elements",
"description": "General UI elements, meant to be reused across modes",
"resources": "res",
"extensions": {
"services": [
{
"key": "urlService",
"implementation": UrlService,
"depends": [
"$location"
]
},
{
"key": "popupService",
"implementation": PopupService,
"depends": [
"$document",
"$window"
]
}
],
"runs": [
{
"implementation": StyleSheetLoader,
"depends": [
"stylesheets[]",
"$document",
"THEME"
]
},
{
"implementation": UnsupportedBrowserWarning,
"depends": [
"notificationService",
"agentService"
]
}
],
"filters": [
{
"implementation": "filters/ReverseFilter.js",
"key": "reverse"
}
],
"stylesheets": [
{
"stylesheetUrl": "css/normalize.min.css",
"priority": "mandatory"
}
],
"templates": [
{
"key": "bottombar",
"templateUrl": "templates/bottombar.html"
},
{
"key": "action-button",
"templateUrl": "templates/controls/action-button.html"
},
{
"key": "input-filter",
"templateUrl": "templates/controls/input-filter.html"
},
{
"key": "indicator",
"templateUrl": "templates/indicator.html"
},
{
"key": "message-banner",
"templateUrl": "templates/message-banner.html"
},
{
"key": "progress-bar",
"templateUrl": "templates/progress-bar.html"
},
{
"key": "time-controller",
"templateUrl": "templates/controls/time-controller.html"
}
],
"controllers": [
{
"key": "TimeRangeController",
"implementation": TimeRangeController,
"depends": [
"$scope",
"formatService",
"DEFAULT_TIME_FORMAT",
"now"
]
},
{
"key": "DateTimePickerController",
"implementation": DateTimePickerController,
"depends": [
"$scope",
"now"
]
},
{
"key": "DateTimeFieldController",
"implementation": DateTimeFieldController,
"depends": [
"$scope",
"formatService",
"DEFAULT_TIME_FORMAT"
]
},
{
"key": "TreeNodeController",
"implementation": TreeNodeController,
"depends": [
"$scope",
"$timeout",
"navigationService"
]
},
{
"key": "ActionGroupController",
"implementation": ActionGroupController,
"depends": [
"$scope"
]
},
{
"key": "ToggleController",
"implementation": ToggleController
},
{
"key": "ContextMenuController",
"implementation": ContextMenuController,
"depends": [
"$scope"
]
},
{
"key": "ClickAwayController",
"implementation": ClickAwayController,
"depends": [
"$scope",
"$document"
]
},
{
"key": "ViewSwitcherController",
"implementation": ViewSwitcherController,
"depends": [
"$scope",
"$timeout"
]
},
{
"key": "BottomBarController",
"implementation": BottomBarController,
"depends": [
"indicators[]"
]
},
{
"key": "GetterSetterController",
"implementation": GetterSetterController,
"depends": [
"$scope"
]
},
{
"key": "SelectorController",
"implementation": SelectorController,
"depends": [
"objectService",
"$scope"
]
},
{
"key": "ObjectInspectorController",
"implementation": ObjectInspectorController,
"depends": [
"$scope",
"objectService"
]
},
{
"key": "BannerController",
"implementation": BannerController,
"depends": [
"$scope",
"notificationService",
"dialogService"
]
}
],
"directives": [
{
"key": "mctContainer",
"implementation": MCTContainer,
"depends": [
"containers[]"
]
},
{
"key": "mctDrag",
"implementation": MCTDrag,
"depends": [
"$document"
]
},
{
"key": "mctClickElsewhere",
"implementation": MCTClickElsewhere,
"depends": [
"$document"
]
},
{
"key": "mctResize",
"implementation": MCTResize,
"depends": [
"$timeout"
]
},
{
"key": "mctPopup",
"implementation": MCTPopup,
"depends": [
"$compile",
"popupService"
]
},
{
"key": "mctScrollX",
"implementation": MCTScroll,
"depends": [
"$parse",
"MCT_SCROLL_X_PROPERTY",
"MCT_SCROLL_X_ATTRIBUTE"
]
},
{
"key": "mctScrollY",
"implementation": MCTScroll,
"depends": [
"$parse",
"MCT_SCROLL_Y_PROPERTY",
"MCT_SCROLL_Y_ATTRIBUTE"
]
},
{
"key": "mctSplitPane",
"implementation": MCTSplitPane,
"depends": [
"$parse",
"$log",
"$interval"
]
},
{
"key": "mctSplitter",
"implementation": MCTSplitter
}
],
"constants": [
{
"key": "MCT_SCROLL_X_PROPERTY",
"value": "scrollLeft"
},
{
"key": "MCT_SCROLL_X_ATTRIBUTE",
"value": "mctScrollX"
},
{
"key": "MCT_SCROLL_Y_PROPERTY",
"value": "scrollTop"
},
{
"key": "MCT_SCROLL_Y_ATTRIBUTE",
"value": "mctScrollY"
},
{
"key": "THEME",
"value": "unspecified",
"priority": "fallback"
}
],
"containers": [
{
"key": "accordion",
"templateUrl": "templates/containers/accordion.html",
"attributes": [
"label"
]
}
],
"representations": [
{
"key": "tree",
"templateUrl": "templates/subtree.html",
"uses": [
"composition"
],
"type": "root",
"priority": "preferred"
},
{
"key": "tree",
"templateUrl": "templates/tree.html"
},
{
"key": "subtree",
"templateUrl": "templates/subtree.html",
"uses": [
"composition"
]
},
{
"key": "tree-node",
"templateUrl": "templates/tree-node.html",
"uses": [
"action"
]
},
{
"key": "label",
"templateUrl": "templates/label.html",
"uses": [
"type",
"location"
],
"gestures": [
"drag",
"menu",
"info"
]
},
{
"key": "node",
"templateUrl": "templates/label.html",
"uses": [
"type"
],
"gestures": [
"drag",
"menu"
]
},
{
"key": "action-group",
"templateUrl": "templates/controls/action-group.html",
"uses": [
"action"
]
},
{
"key": "context-menu",
"templateUrl": "templates/menu/context-menu.html",
"uses": [
"action"
]
},
{
"key": "switcher",
"templateUrl": "templates/controls/switcher.html",
"uses": [
"view"
]
},
{
"key": "object-inspector",
"templateUrl": "templates/object-inspector.html"
}
],
"controls": [
{
"key": "selector",
"templateUrl": "templates/controls/selector.html"
},
{
"key": "datetime-picker",
"templateUrl": "templates/controls/datetime-picker.html"
},
{
"key": "datetime-field",
"templateUrl": "templates/controls/datetime-field.html"
}
],
"licenses": [
{
"name": "Modernizr",
"version": "2.6.2",
"description": "Browser/device capability finding",
"author": "Faruk Ateş",
"website": "http://modernizr.com",
"copyright": "Copyright (c) 20092015",
"license": "license-mit",
"link": "http://modernizr.com/license/"
},
{
"name": "Normalize.css",
"version": "1.1.2",
"description": "Browser style normalization",
"author": "Nicolas Gallagher, Jonathan Neal",
"website": "http://necolas.github.io/normalize.css/",
"copyright": "Copyright (c) Nicolas Gallagher and Jonathan Neal",
"license": "license-mit",
"link": "https://github.com/necolas/normalize.css/blob/v1.1.2/LICENSE.md"
}
]
}
});
});

View File

@ -1,308 +0,0 @@
{
"name": "General UI elements",
"description": "General UI elements, meant to be reused across modes",
"resources": "res",
"extensions": {
"services": [
{
"key": "urlService",
"implementation": "services/UrlService.js",
"depends": [ "$location" ]
},
{
"key": "popupService",
"implementation": "services/PopupService.js",
"depends": [ "$document", "$window" ]
}
],
"runs": [
{
"implementation": "StyleSheetLoader.js",
"depends": [ "stylesheets[]", "$document", "THEME" ]
},
{
"implementation": "UnsupportedBrowserWarning.js",
"depends": [ "notificationService", "agentService" ]
}
],
"filters": [
{
"implementation": "filters/ReverseFilter.js",
"key": "reverse"
}
],
"stylesheets": [
{
"stylesheetUrl": "css/normalize.min.css",
"priority": "mandatory"
}
],
"templates": [
{
"key": "bottombar",
"templateUrl": "templates/bottombar.html"
},
{
"key": "action-button",
"templateUrl": "templates/controls/action-button.html"
},
{
"key": "input-filter",
"templateUrl": "templates/controls/input-filter.html"
},
{
"key": "indicator",
"templateUrl": "templates/indicator.html"
},
{
"key": "message-banner",
"templateUrl": "templates/message-banner.html"
},
{
"key": "progress-bar",
"templateUrl": "templates/progress-bar.html"
},
{
"key": "time-controller",
"templateUrl": "templates/controls/time-controller.html"
}
],
"controllers": [
{
"key": "TimeRangeController",
"implementation": "controllers/TimeRangeController.js",
"depends": [ "$scope", "formatService", "DEFAULT_TIME_FORMAT", "now" ]
},
{
"key": "DateTimePickerController",
"implementation": "controllers/DateTimePickerController.js",
"depends": [ "$scope", "now" ]
},
{
"key": "DateTimeFieldController",
"implementation": "controllers/DateTimeFieldController.js",
"depends": [ "$scope", "formatService", "DEFAULT_TIME_FORMAT" ]
},
{
"key": "TreeNodeController",
"implementation": "controllers/TreeNodeController.js",
"depends": [ "$scope", "$timeout" ]
},
{
"key": "ActionGroupController",
"implementation": "controllers/ActionGroupController.js",
"depends": [ "$scope" ]
},
{
"key": "ToggleController",
"implementation": "controllers/ToggleController.js"
},
{
"key": "ContextMenuController",
"implementation": "controllers/ContextMenuController.js",
"depends": [ "$scope" ]
},
{
"key": "ClickAwayController",
"implementation": "controllers/ClickAwayController.js",
"depends": [ "$scope", "$document" ]
},
{
"key": "ViewSwitcherController",
"implementation": "controllers/ViewSwitcherController.js",
"depends": [ "$scope", "$timeout" ]
},
{
"key": "BottomBarController",
"implementation": "controllers/BottomBarController.js",
"depends": [ "indicators[]" ]
},
{
"key": "GetterSetterController",
"implementation": "controllers/GetterSetterController.js",
"depends": [ "$scope" ]
},
{
"key": "SelectorController",
"implementation": "controllers/SelectorController.js",
"depends": [ "objectService", "$scope" ]
},
{
"key": "ObjectInspectorController",
"implementation": "controllers/ObjectInspectorController.js",
"depends": [ "$scope", "objectService" ]
},
{
"key": "BannerController",
"implementation": "controllers/BannerController.js",
"depends": ["$scope", "notificationService", "dialogService"]
}
],
"directives": [
{
"key": "mctContainer",
"implementation": "directives/MCTContainer.js",
"depends": [ "containers[]" ]
},
{
"key": "mctDrag",
"implementation": "directives/MCTDrag.js",
"depends": [ "$document" ]
},
{
"key": "mctClickElsewhere",
"implementation": "directives/MCTClickElsewhere.js",
"depends": [ "$document" ]
},
{
"key": "mctResize",
"implementation": "directives/MCTResize.js",
"depends": [ "$timeout" ]
},
{
"key": "mctPopup",
"implementation": "directives/MCTPopup.js",
"depends": [ "$compile", "popupService" ]
},
{
"key": "mctScrollX",
"implementation": "directives/MCTScroll.js",
"depends": [ "$parse", "MCT_SCROLL_X_PROPERTY", "MCT_SCROLL_X_ATTRIBUTE" ]
},
{
"key": "mctScrollY",
"implementation": "directives/MCTScroll.js",
"depends": [ "$parse", "MCT_SCROLL_Y_PROPERTY", "MCT_SCROLL_Y_ATTRIBUTE" ]
},
{
"key": "mctSplitPane",
"implementation": "directives/MCTSplitPane.js",
"depends": [ "$parse", "$log", "$interval" ]
},
{
"key": "mctSplitter",
"implementation": "directives/MCTSplitter.js"
}
],
"constants": [
{
"key": "MCT_SCROLL_X_PROPERTY",
"value": "scrollLeft"
},
{
"key": "MCT_SCROLL_X_ATTRIBUTE",
"value": "mctScrollX"
},
{
"key": "MCT_SCROLL_Y_PROPERTY",
"value": "scrollTop"
},
{
"key": "MCT_SCROLL_Y_ATTRIBUTE",
"value": "mctScrollY"
},
{
"key": "THEME",
"value": "unspecified",
"priority": "fallback"
}
],
"containers": [
{
"key": "accordion",
"templateUrl": "templates/containers/accordion.html",
"attributes": [ "label" ]
}
],
"representations": [
{
"key": "tree",
"templateUrl": "templates/subtree.html",
"uses": [ "composition" ],
"type": "root",
"priority": "preferred"
},
{
"key": "tree",
"templateUrl": "templates/tree.html"
},
{
"key": "subtree",
"templateUrl": "templates/subtree.html",
"uses": [ "composition" ]
},
{
"key": "tree-node",
"templateUrl": "templates/tree-node.html",
"uses": [ "action" ]
},
{
"key": "label",
"templateUrl": "templates/label.html",
"uses": [ "type", "location" ],
"gestures": [ "drag", "menu", "info" ]
},
{
"key": "node",
"templateUrl": "templates/label.html",
"uses": [ "type" ],
"gestures": [ "drag", "menu" ]
},
{
"key": "action-group",
"templateUrl": "templates/controls/action-group.html",
"uses": [ "action" ]
},
{
"key": "context-menu",
"templateUrl": "templates/menu/context-menu.html",
"uses": [ "action" ]
},
{
"key": "switcher",
"templateUrl": "templates/controls/switcher.html",
"uses": [ "view" ]
},
{
"key": "object-inspector",
"templateUrl": "templates/object-inspector.html"
}
],
"controls": [
{
"key": "selector",
"templateUrl": "templates/controls/selector.html"
},
{
"key": "datetime-picker",
"templateUrl": "templates/controls/datetime-picker.html"
},
{
"key": "datetime-field",
"templateUrl": "templates/controls/datetime-field.html"
}
],
"licenses": [
{
"name": "Modernizr",
"version": "2.6.2",
"description": "Browser/device capability finding",
"author": "Faruk Ateş",
"website": "http://modernizr.com",
"copyright": "Copyright (c) 20092015",
"license": "license-mit",
"link": "http://modernizr.com/license/"
},
{
"name": "Normalize.css",
"version": "1.1.2",
"description": "Browser style normalization",
"author": "Nicolas Gallagher, Jonathan Neal",
"website": "http://necolas.github.io/normalize.css/",
"copyright": "Copyright (c) Nicolas Gallagher and Jonathan Neal",
"license": "license-mit",
"link": "https://github.com/necolas/normalize.css/blob/v1.1.2/LICENSE.md"
}
]
}
}

View File

@ -47,14 +47,11 @@ a.disabled {
@include animation-name(pulse, 0.2); @include animation-name(pulse, 0.2);
} }
@include keyframes(pulse) { @mixin pulse($dur: 500ms, $iteration: infinite, $opacity0: 0.5, $opacity100: 1) {
0% { opacity: 0.5; } @include keyframes(pulse) {
100% { opacity: 1; } 0% { opacity: $opacity0; }
} 100% { opacity: $opacity100; }
}
@mixin pulse($dur: 500ms, $iteration: infinite) {
//@include customKeyframes(pulse, 0.2);
@include animation-name(pulse); @include animation-name(pulse);
@include animation-duration($dur); @include animation-duration($dur);
@include animation-direction(alternate); @include animation-direction(alternate);
@ -62,6 +59,19 @@ a.disabled {
@include animation-timing-function(ease-in-out); @include animation-timing-function(ease-in-out);
} }
@mixin pulseBorder($c: red, $dur: 500ms, $iteration: infinite, $delay: 0s, $opacity0: 0, $opacity100: 1) {
@include keyframes(pulseBorder) {
0% { border-color: rgba($c, $opacity0); }
100% { border-color: rgba($c, $opacity100); }
}
@include animation-name(pulseBorder);
@include animation-duration($dur);
@include animation-direction(alternate);
@include animation-iteration-count($iteration);
@include animation-timing-function(ease);
@include animation-delay($delay);
}
.pulse { .pulse {
@include pulse(750ms); @include pulse(750ms);
} }

View File

@ -121,7 +121,12 @@ mct-container {
text-align: center; text-align: center;
} }
.scrolling { .ellipsis {
@include ellipsize();
}
.scrolling,
.scroll {
overflow: auto; overflow: auto;
} }

View File

@ -35,7 +35,6 @@
} }
&.icon { &.icon {
color: $colorKey; color: $colorKey;
//position: relative;
font-size: inherit; font-size: inherit;
&.alert { &.alert {
color: $colorAlert; color: $colorAlert;
@ -81,14 +80,11 @@
} }
.t-item-icon { .t-item-icon {
// Used in grid-item.html, tree-item, inspector location, more? // Used in grid-item.html, tree-item, inspector location
@extend .ui-symbol; @extend .ui-symbol;
@extend .icon; @extend .icon;
line-height: normal; // This is Ok for the symbolsfont line-height: normal; // This is Ok for the symbolsfont
position: relative; position: relative;
.t-item-icon-glyph {
position: absolute;
}
&.l-icon-link { &.l-icon-link {
.t-item-icon-glyph { .t-item-icon-glyph {
&:before { &:before {

View File

@ -23,7 +23,7 @@
.l-inspect, .l-inspect,
.l-inspect table tr td { .l-inspect table tr td {
font-size: 0.7rem; font-size: 0.75rem;
} }
.l-inspect { .l-inspect {
@ -31,6 +31,9 @@
background: $colorInspectorBg; background: $colorInspectorBg;
color: $colorInspectorFg; color: $colorInspectorFg;
line-height: 140%; line-height: 140%;
.flex-elem.holder:not(:last-child) { margin-bottom: $interiorMargin; }
.pane-header { .pane-header {
color: pushBack($colorInspectorFg, 20%); color: pushBack($colorInspectorFg, 20%);
font-size: 0.8rem; font-size: 0.8rem;
@ -44,6 +47,16 @@
} }
} }
.split-layout {
.split-pane-component.pane {
&.bottom {
height: 30%;
min-height: 20%;
max-height: 80%;
}
}
}
ul { ul {
@include box-sizing(border-box); @include box-sizing(border-box);
padding-right: $interiorMargin; padding-right: $interiorMargin;
@ -118,4 +131,34 @@
width: 4px; width: 4px;
} }
} }
.holder-elements {
.current-elements {
position: relative;
.tree-item {
.t-object-label {
// Elements pool is a flat list, so don't indent items.
font-size: 0.75rem;
left: 0;
}
}
}
}
}
.l-inspect {
.splitter-inspect-panel,
.split-pane-component.pane.bottom {
@include trans-prop-nice(opacity, 250ms); // Not working as desired currently; entire inspector seems to be destroyed and recreated when switching into and out of edit mode.
opacity: 0;
pointer-events: none;
}
}
.s-status-editing .l-inspect {
.location-item { pointer-events: none; }
.splitter-inspect-panel,
.split-pane-component.pane.bottom {
opacity: 1;
pointer-events: inherit;
}
} }

View File

@ -64,6 +64,12 @@
} }
} }
@mixin trans-prop-nice-resize($t: 0.5s, $tf: ease-in-out) {
@include transition-property(height, width, top, right, bottom, left, opacity);
@include transition-duration($t);
@include transition-timing-function($tf);
}
@mixin trans-prop-nice-resize-h($dur: 500ms, $delay: 0) { @mixin trans-prop-nice-resize-h($dur: 500ms, $delay: 0) {
@include transition-property(height, bottom, top); @include transition-property(height, bottom, top);
@include transition-duration($dur); @include transition-duration($dur);
@ -309,11 +315,11 @@
} }
} }
@mixin input-base($bg: $colorBodyBg, $fg: $colorBodyFg) { @mixin input-base($bg: $colorInputBg, $fg: $colorInputFg, $shdw: rgba(black, 0.6) 0 1px 3px) {
@include appearance(none); @include appearance(none);
@include border-radius($controlCr); @include border-radius($controlCr);
@include box-sizing(border-box); @include box-sizing(border-box);
@include box-shadow(inset rgba(black, 0.4) 0 1px 3px); @include box-shadow(inset $shdw);
background: $bg; background: $bg;
border: none; border: none;
color: $fg; color: $fg;
@ -323,7 +329,7 @@
} }
} }
@mixin nice-input($bg: $colorBodyBg, $fg: $colorBodyFg) { @mixin nice-input($bg: $colorInputBg, $fg: $colorInputFg) {
@include input-base($bg, $fg); @include input-base($bg, $fg);
padding: 0 $interiorMarginSm; padding: 0 $interiorMarginSm;
} }

View File

@ -44,10 +44,6 @@ mct-representation {
$spinD: 0; $spinD: 0;
@include spinner($spinBW); @include spinner($spinBW);
content: ""; content: "";
display: block;
position: absolute;
left: 50%;
top: 50%;
padding: 30%; padding: 30%;
width: $spinD; width: $spinD;
height: $spinD; height: $spinD;
@ -64,6 +60,6 @@ mct-representation {
} }
} }
.selected mct-representation.s-status-pending .t-object-label .t-item-icon:before { .selected mct-representation.s-status-pending .t-object-label .t-item-icon:before {
border-color: rgba($colorItemTreeSelectedFg, 0.25); border-color: rgba($colorItemTreeSelectedFg, 0.25) !important;
border-top-color: rgba($colorItemTreeSelectedFg, 1.0); border-top-color: rgba($colorItemTreeSelectedFg, 1.0) !important;
} }

View File

@ -35,6 +35,7 @@ $pad: $interiorMargin * $baseRatio;
@include box-sizing(border-box); @include box-sizing(border-box);
padding: 0 $pad; padding: 0 $pad;
font-size: 0.7rem; font-size: 0.7rem;
vertical-align: top;
.icon { .icon {
font-size: 0.8rem; font-size: 0.8rem;
@ -70,6 +71,18 @@ $pad: $interiorMargin * $baseRatio;
&.pause-play { &.pause-play {
} }
&.t-save:before {
content:'\e612';
font-family: symbolsfont;
margin-right: $interiorMarginSm;
}
&.t-cancel {
.title-label { display: none; }
&:before {
content:'\78';
font-family: symbolsfont;
}
}
&.pause-play { &.pause-play {
.icon:before { .icon:before {

View File

@ -6,10 +6,6 @@
} }
} }
.l-time-controller-visible {
}
mct-include.l-time-controller { mct-include.l-time-controller {
$minW: 500px; $minW: 500px;
$knobHOffset: 0px; $knobHOffset: 0px;
@ -22,10 +18,10 @@ mct-include.l-time-controller {
$r2H: nth($ueTimeControlH,2); $r2H: nth($ueTimeControlH,2);
$r3H: nth($ueTimeControlH,3); $r3H: nth($ueTimeControlH,3);
@include absPosDefault(); //@include absPosDefault();
//@include test(); //@include test();
display: block; display: block;
top: auto; //top: auto;
height: $r1H + $r2H + $r3H + ($interiorMargin * 2); height: $r1H + $r2H + $r3H + ($interiorMargin * 2);
min-width: $minW; min-width: $minW;
font-size: 0.8rem; font-size: 0.8rem;

View File

@ -19,8 +19,10 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
.s-status-editing .l-object-wrapper,
.edit-main { .edit-main {
// .s-status-editing .l-object-wrapper is relevant to New Edit Mode;
// .edit-main is legacy for old edit mode.
$handleD: 15px; $handleD: 15px;
$cr: 5px; $cr: 5px;
.edit-corner, .edit-corner,
@ -92,12 +94,10 @@
} }
} }
.frame.child-frame.panel { .frame.child-frame.panel {
&:hover { &:hover {
@include boxShdwLarge(); @include boxShdwLarge();
border-color: $colorKey; border-color: $colorKey;
//z-index: 2;
.view-switcher { .view-switcher {
opacity: 1; opacity: 1;
} }

View File

@ -31,7 +31,6 @@
} }
.form { .form {
// @include test(orange);
color: $colorFormText; color: $colorFormText;
.form-section { .form-section {
position: relative; position: relative;
@ -112,12 +111,8 @@
.selector-list { .selector-list {
// Used in create overlay to display tree view // Used in create overlay to display tree view
@include nice-input($colorInputBg, $colorInputFg); @include nice-input();
$h: 150px; $h: 150px;
//@include border-radius($basicCr);
//@include box-sizing(border-box);
//background: rgba(black, 0.2);
//padding: $interiorMargin;
position: relative; position: relative;
height: $h; height: $h;
// max-width: 50%; // max-width: 50%;
@ -162,13 +157,9 @@ label.form-control.checkbox {
} }
} }
input[type="text"] { input[type="text"],
@include nice-input($colorInputBg, $colorInputFg); input[type="search"] {
&.filter { @include nice-input();
&.ng-dirty {
// background: red;
}
}
&.numeric { &.numeric {
text-align: right; text-align: right;
} }
@ -176,7 +167,6 @@ input[type="text"] {
textarea { textarea {
@include nice-textarea($colorInputBg, $colorInputFg); @include nice-textarea($colorInputBg, $colorInputFg);
// font-size: 0.9em;
position: absolute; position: absolute;
height: 100%; height: 100%;
width: 100%; width: 100%;

View File

@ -21,20 +21,7 @@
*****************************************************************************/ *****************************************************************************/
.filter, .filter,
.t-filter { .t-filter {
input.filter,
input.t-filter-input { input.t-filter-input {
@include subdued-input();
}
input.t-filter-input {
height: $formInputH;
width: 200px;
&:not(.ng-dirty) {
// TO-DO: Update compass install to support this
// @include input-placeholder {
// color: rgba(#fff, 0.3);
// font-style: italic;
// }
}
&:not(.ng-dirty) + .t-a-clear { &:not(.ng-dirty) + .t-a-clear {
display: none; display: none;
} }
@ -76,13 +63,6 @@
background-color: $colorKey; background-color: $colorKey;
} }
} }
// &:not(ng-dirty)
}
.l-filter {
// Holds an input and a clear button
display:inline-block;
position: relative;
} }
.top-bar { .top-bar {
@ -101,3 +81,74 @@
font-size: 1.4em; font-size: 1.4em;
} }
} }
.l-filter {
$iconEdgeM: 4px;
$iconD: $formInputH - ($iconEdgeM * 2);
// Adds a magnifying glass before, holds an input and a clear button
display: inline-block;
position: relative;
input[type="search"] {
padding: 2px ($iconD + $interiorMargin);
}
.clear-icon,
.menu-icon,
&:before {
@include box-sizing(border-box);
display: inline-block;
line-height: inherit;
position: absolute;
top: 50%;
@include transform(translateY(-50%));
z-index: 1;
}
&:before {
// Magnify glass icon
content:'\4d';
left: $interiorMargin;
@include trans-prop-nice(color, 250ms);
pointer-events: none;
}
.clear-icon {
right: $iconEdgeM;
// Icon is visible only when there is text input
visibility: hidden;
opacity: 0;
&.show {
visibility: visible;
opacity: 1;
}
&:hover {
color: pullForward($colorInputIcon, 10%);
}
}
}
.s-filter {
input[type="search"] {
@include input-base();
}
.clear-icon,
.menu-icon,
&:before {
color: $colorInputIcon;
cursor: pointer;
font-family: symbolsfont;
@include trans-prop-nice((opacity, color), 150ms);
}
// Make icon lighten when hovering over search bar
&:hover:before {
color: pullForward($colorInputIcon, 10%);
}
.clear-icon {
// 'x' in circle icon
&:before {
content: '\e607';
}
}
}

View File

@ -25,6 +25,7 @@
margin: 0 0 2px 0; // Needed to avoid dropshadow from being clipped by parent containers margin: 0 0 2px 0; // Needed to avoid dropshadow from being clipped by parent containers
} }
padding: 0 $interiorMargin; padding: 0 $interiorMargin;
overflow: hidden;
position: relative; position: relative;
line-height: $formInputH; line-height: $formInputH;
select { select {
@ -35,7 +36,7 @@
cursor: pointer; cursor: pointer;
border: none !important; border: none !important;
padding: 4px 25px 2px 0px; padding: 4px 25px 2px 0px;
width: 120%; width: 130%;
option { option {
margin: $interiorMargin 0; // Firefox margin: $interiorMargin 0; // Firefox
} }

View File

@ -20,62 +20,37 @@
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
@include keyframes(rotation) { @include keyframes(rotation) {
0% { transform: rotate(0deg); } 100% { @include transform(rotate(360deg)); }
100% { transform: rotate(359deg); }
} }
@mixin spinner($b: 5px) { @include keyframes(rotation-centered) {
@include keyframes(rotateCentered) { 0% { @include transform(translate(-50%, -50%) rotate(0deg)); }
0% { @include transform(translateX(-50%) translateY(-50%) rotate(0deg)); } 100% { @include transform(translate(-50%, -50%) rotate(360deg)); }
100% { @include transform(translateX(-50%) translateY(-50%) rotate(359deg)); } }
}
@include animation-name(rotateCentered); @mixin spinner($b: 5px, $c: $colorKey) {
@include transform-origin(center);
@include animation-name(rotation-centered);
@include animation-duration(0.5s); @include animation-duration(0.5s);
@include animation-iteration-count(infinite); @include animation-iteration-count(infinite);
@include animation-timing-function(linear); @include animation-timing-function(linear);
@include transform-origin(center);
border-style: solid;
border-width: $b;
@include border-radius(100%); @include border-radius(100%);
}
@mixin wait-spinner2($b: 5px, $c: $colorAlt1) {
@include spinner($b);
@include box-sizing(border-box); @include box-sizing(border-box);
border-color: rgba($c, 0.25); border-color: rgba($c, 0.25);
border-top-color: rgba($c, 1.0); border-top-color: rgba($c, 1.0);
border-style: solid;
border-width: $b;
display: block; display: block;
position: absolute; position: absolute;
height: 0; width: 0;
padding: 7%;
left: 50%; top: 50%; left: 50%; top: 50%;
} }
@mixin wait-spinner($b: 5px, $c: $colorAlt1) {
display: block;
position: absolute;
-webkit-animation: rotation .6s infinite linear;
-moz-animation: rotation .6s infinite linear;
-o-animation: rotation .6s infinite linear;
animation: rotation .6s infinite linear;
border-color: rgba($c, 0.25);
border-top-color: rgba($c, 1.0);
border-style: solid;
border-width: $b;
@include border-radius(100%);
}
.t-wait-spinner,
.wait-spinner { .wait-spinner {
$d: 5%; $d: 5%;
@include wait-spinner(0.5em, $colorKey); @include spinner(0.5em, $colorKey);
top: 50%; left: 50%;
height: auto; width: auto; height: auto; width: auto;
padding: $d; // Will size object based on parent container WIDTH padding: $d; // Will size object based on parent container WIDTH
pointer-events: none; pointer-events: none;
margin-top: $d / -1;
margin-left: $d / -1;
z-index: 2; z-index: 2;
&.inline { &.inline {
display: inline-block !important; display: inline-block !important;
@ -85,46 +60,15 @@
} }
} }
.l-wait-spinner-holder {
pointer-events: none;
position: absolute;
&.align-left {
.t-wait-spinner {
left: 0;
margin-left: 0;
}
}
&.full-size {
display: inline-block;
height: 100%; width: 100%;
.t-wait-spinner {
top: 0;
margin-top: 0;
padding: 30%;
}
}
}
.treeview .wait-spinner { .treeview .wait-spinner {
// Only used in subtree.html, which I don't think this is actually being used
$d: 10px; $d: 10px;
@include wait-spinner(0.25em, $colorKey);
height: $d; width: $d; height: $d; width: $d;
margin: 0 !important; margin: 0 !important;
padding: 0 !important; padding: 0 !important;
top: 2px; left: 0; top: 2px; left: 0;
} }
.wait-spinner.sm {
$d: 13px;
@include wait-spinner(0.25em, $colorKey);
height: $d; width: $d;
margin-left: 0 !important;
margin-top: 0 !important;
padding: 0 !important;
top: 0; left: 0;
}
.loading { .loading {
// Can be applied to any block element with height and width // Can be applied to any block element with height and width
pointer-events: none; pointer-events: none;
@ -133,7 +77,8 @@
content: ''; content: '';
} }
&:before { &:before {
@include wait-spinner2(5px, $colorLoadingFg); @include spinner(5px, $colorLoadingFg);
padding: 5%;
z-index: 10; z-index: 10;
} }
&:after { &:after {
@ -146,5 +91,4 @@
padding: $menuLineH / 4; padding: $menuLineH / 4;
border-width: 2px; border-width: 2px;
} }
} }

View File

@ -27,7 +27,6 @@
} }
.item { .item {
&.grid-item { &.grid-item {
//div { @include test() }
$d: $ueBrowseGridItemLg; $d: $ueBrowseGridItemLg;
$iconMargin: 40px; $iconMargin: 40px;
$iconD: ($d - ($iconMargin * 2)) * 0.85; $iconD: ($d - ($iconMargin * 2)) * 0.85;
@ -53,7 +52,6 @@
} }
} }
.contents { .contents {
//@include test(red);
$m: $interiorMarginLg; $m: $interiorMarginLg;
top: $m; right: $m; bottom: $m; left: $m; top: $m; right: $m; bottom: $m; left: $m;
} }
@ -83,19 +81,21 @@
.item-main { .item-main {
$h: $ueBrowseGridItemLg; $h: $ueBrowseGridItemLg;
$lh: $h * 0.8; $lh: $h * 0.8;
//top: $ueBrowseGridItemTopBarH; bottom: $ueBrowseGridItemBottomBarH; //
line-height: $lh; line-height: $lh;
z-index: 1; z-index: 1;
.item-type, .item-type,
.t-item-icon { .t-item-icon {
//@include test();
@include transform(translateX(-50%) translateY(-55%)); @include transform(translateX(-50%) translateY(-55%));
position: absolute; position: absolute;
top: 50%; left: 50%; top: 50%; left: 50%;
//height: $iconD; width: $iconD; font-size: $iconD * 0.95;
font-size: $iconD * 0.95; //6em; &.l-icon-link {
//line-height: normal; .t-item-icon-glyph {
//text-align: center; &:before {
@include transform(scale(0.25));
}
}
}
} }
.item-open { .item-open {
@include trans-prop-nice("opacity", $transTime); @include trans-prop-nice("opacity", $transTime);

View File

@ -102,7 +102,7 @@
} }
.object-browse-bar { .object-browse-bar {
left: 45px !important; margin-left: 45px;
.context-available { .context-available {
opacity: 1 !important; opacity: 1 !important;
} }

View File

@ -33,7 +33,22 @@ $plotDisplayArea: ($legendH + $interiorMargin, 0, $xBarH + $interiorMargin, $yBa
width: 100%; width: 100%;
height: 100%; height: 100%;
.gl-plot-local-controls {
@include trans-prop-nice(opacity, 150ms);
opacity: 0;
pointer-events: none;
}
.gl-plot-display-area,
.gl-plot-axis-area {
&:hover .gl-plot-local-controls {
opacity: 1;
pointer-events: inherit;
}
}
.gl-plot-axis-area { .gl-plot-axis-area {
//@include test();
position: absolute; position: absolute;
&.gl-plot-x { &.gl-plot-x {
top: auto; top: auto;
@ -114,15 +129,17 @@ $plotDisplayArea: ($legendH + $interiorMargin, 0, $xBarH + $interiorMargin, $yBa
.gl-plot-x-options, .gl-plot-x-options,
.gl-plot-y-options { .gl-plot-y-options {
$h: 32px; $h: 24px;
position: absolute; position: absolute;
height: auto; height: $h;
min-height: $h; min-height: $h;
z-index: 2; z-index: 2;
} }
.gl-plot-x-options { .gl-plot-x-options {
top: $interiorMargin; @include transform(translateX(-50%));
bottom: 0;
left: 50%;
} }
.gl-plot-y-options { .gl-plot-y-options {
@ -132,6 +149,12 @@ $plotDisplayArea: ($legendH + $interiorMargin, 0, $xBarH + $interiorMargin, $yBa
left: $yLabelW + $interiorMargin * 2; left: $yLabelW + $interiorMargin * 2;
} }
.t-plot-display-controls {
position: absolute;
top: $interiorMargin;
right: $interiorMargin;
}
.gl-plot-hash { .gl-plot-hash {
position: absolute; position: absolute;
border: 0 $colorPlotHash $stylePlotHash; border: 0 $colorPlotHash $stylePlotHash;

View File

@ -149,3 +149,32 @@ mct-representation {
border-color: rgba($colorItemTreeSelectedFg, 0.25); border-color: rgba($colorItemTreeSelectedFg, 0.25);
border-top-color: rgba($colorItemTreeSelectedFg, 1.0); border-top-color: rgba($colorItemTreeSelectedFg, 1.0);
} }
.tree .s-status-editing,
.search-results .s-status-editing {
// Item is being edited
.tree-item,
.search-result-item {
background: $colorItemTreeEditingBg;
pointer-events: none;
&:before {
// Pencil icon
@extend .ui-symbol;
@include pulse($dur: 1s, $opacity0: 0.25);
color: $colorItemTreeEditingFg;
content: '\70';
margin-right: $interiorMarginSm;
}
.t-object-label {
.t-item-icon,
.t-title-label {
color: $colorItemTreeEditingFg;
@include text-shadow(none);
}
.t-title-label {
font-style: italic;
}
}
.view-control, + .tree-item-subtree { display: none; }
}
}

View File

@ -25,6 +25,7 @@
&.child-frame.panel { &.child-frame.panel {
background: $colorBodyBg; background: $colorBodyBg;
border: 1px solid $bc; border: 1px solid $bc;
z-index: 0; // Needed to prevent child-frame controls from showing through when another child-frame is above
&:hover { &:hover {
border-color: lighten($bc, 10%); border-color: lighten($bc, 10%);
} }

View File

@ -77,38 +77,38 @@
} }
} }
// from _bottom-bar.scss .ue-bottom-bar {
.ue-bottom-bar { @include absPosDefault(0);// New status bar design
@include absPosDefault(0);// New status bar design top: auto;
top: auto; height: $ueFooterH;
height: $ueFooterH; line-height: $ueFooterH - ($interiorMargin * 2);
line-height: $ueFooterH - ($interiorMargin * 2); background: $colorFooterBg;
background: $colorFooterBg; color: lighten($colorBodyBg, 30%);
color: lighten($colorBodyBg, 30%); font-size: .7rem;
font-size: .7rem; .status-holder {
.status-holder { @include box-sizing(border-box);
@include box-sizing(border-box); @include absPosDefault($interiorMargin);
@include absPosDefault($interiorMargin); @include ellipsize();
@include ellipsize(); right: 120px;
right: 120px; text-transform: uppercase;
text-transform: uppercase; z-index: 1;
z-index: 1; }
} .app-logo {
.app-logo { @include box-sizing(border-box);
@include box-sizing(border-box); @include absPosDefault($interiorMargin);
@include absPosDefault($interiorMargin); cursor: pointer;
cursor: pointer; left: auto;
left: auto; width: $ueAppLogoW;
width: $ueAppLogoW; z-index: 2;
z-index: 2; &.logo-openmctweb {
&.logo-openmctweb { background: url($dirImgs + 'logo-openmctweb.svg') no-repeat center center;
background: url($dirImgs + 'logo-openmctweb.svg') no-repeat center center; }
} }
} }
}
} }
.edit-mode { .edit-mode {
// Old edit mode
.split-layout { .split-layout {
.split-pane-component.pane.right { .split-pane-component.pane.right {
width: 15%; width: 15%;
@ -132,7 +132,7 @@
.primary-pane { .primary-pane {
// Need to lift up this pane to ensure that 'collapsed' panes don't block user interactions // Need to lift up this pane to ensure that 'collapsed' panes don't block user interactions
z-index: 2; z-index: 4;
} }
.mini-tab-icon.toggle-pane { .mini-tab-icon.toggle-pane {
@ -172,7 +172,7 @@
&.toggle-inspect.anchor-right { &.toggle-inspect.anchor-right {
right: $bodyMargin; right: $bodyMargin;
&:after { &:after {
content: '\e615'; // e615: Crosshair icon; was e608: Info "i" icon content: '\e615'; // Eye icon
} }
&.collapsed { &.collapsed {
right: $interiorMargin; right: $interiorMargin;
@ -197,6 +197,16 @@
right: 0; right: 0;
bottom: $bodyMargin; bottom: $bodyMargin;
left: $bodyMargin; left: $bodyMargin;
.create-btn-holder {
&.s-status-editing {
display: none;
& + .search-holder .search-bar {
// .search-holder is adjacent sibling to .create-btn-holder
// Add right margin when create button is hidden, to make room for the collapse pane 'x' button
margin-right: $interiorMarginLg * 2;
}
}
}
} }
.holder.holder-object-and-inspector { .holder.holder-object-and-inspector {
@ -208,25 +218,50 @@
top: $bodyMargin; top: $bodyMargin;
bottom: $bodyMargin; bottom: $bodyMargin;
} }
.holder-inspector-elements { .holder-inspector {
top: $bodyMargin; top: $bodyMargin;
bottom: $bodyMargin; bottom: $bodyMargin;
left: $bodyMargin; left: $bodyMargin;
right: $bodyMargin; right: $bodyMargin;
} }
.holder-elements {
top: 0;
bottom: $bodyMargin;
left: $bodyMargin;
right: $bodyMargin;
}
} }
} }
.object-holder { .object-holder {
@include absPosDefault(0, auto); @include absPosDefault(0, auto);
top: $ueTopBarH + $interiorMarginLg; top: $ueTopBarH + $interiorMarginLg;
&.l-controls-visible { }
&.l-time-controller-visible {
bottom: nth($ueTimeControlH,1) + nth($ueTimeControlH,2) +nth($ueTimeControlH,3) + ($interiorMargin * 3); .l-object-wrapper {
@extend .abs;
.object-holder-main {
@extend .abs;
}
.l-edit-controls {
//@include trans-prop-nice((opacity, height), 0.25s);
border-bottom: 1px solid $colorInteriorBorder;
line-height: $ueEditToolBarH;
height: 0px;
opacity: 0;
.tool-bar {
right: $interiorMargin;
} }
} }
} }
.l-object-wrapper-inner {
@include trans-prop-nice-resize(0.25s);
}
.object-browse-bar .s-btn, .object-browse-bar .s-btn,
.top-bar .buttons-main .s-btn, .top-bar .buttons-main .s-btn,
.top-bar .s-menu-btn, .top-bar .s-menu-btn,
@ -247,7 +282,6 @@
/***************************************************** OBJECT BROWSE BAR */ /***************************************************** OBJECT BROWSE BAR */
.object-browse-bar { .object-browse-bar {
@include absPosDefault(0, visible); // Must use visible to avoid hiding view switcher menu
@include box-sizing(border-box); @include box-sizing(border-box);
height: $ueTopBarH; height: $ueTopBarH;
line-height: $ueTopBarH; line-height: $ueTopBarH;
@ -255,15 +289,13 @@
.left { .left {
padding-right: $interiorMarginLg; padding-right: $interiorMarginLg;
.l-back { .l-back:not(.s-status-editing) {
margin-right: $interiorMarginLg; margin-right: $interiorMarginLg;
} }
} }
} }
// When the tree is hidden, these are the // When the tree is hidden, these are the classes used for the left menu and the right representation.
// classes used for the left menu and the
// right representation.
.pane-tree-hidden { .pane-tree-hidden {
// Sets the left tree menu when the tree is hidden. // Sets the left tree menu when the tree is hidden.
.tree-holder, .tree-holder,
@ -299,9 +331,6 @@
.pane-inspect-hidden { .pane-inspect-hidden {
.l-object-and-inspector { .l-object-and-inspector {
.t-inspect {
z-index: 1 !important; // Move down so that primary pane elements are clickable
}
.l-inspect, .l-inspect,
.splitter-inspect { .splitter-inspect {
opacity: 0; opacity: 0;
@ -345,3 +374,22 @@
min-width: 200px; // Needed for nice display when primary pane is constrained severely via splitters min-width: 200px; // Needed for nice display when primary pane is constrained severely via splitters
} }
} }
.s-status-editing {
.l-object-wrapper {
@include pulseBorder($colorEditAreaFg, $dur: 1s, $opacity0: 0.3);
@include border-radius($controlCr);
background-color: $colorEditAreaBg;
border-color: $colorEditAreaFg;
border-width: 2px;
border-style: dotted;
.l-object-wrapper-inner {
@include absPosDefault(3px, hidden);
}
.l-edit-controls {
height: $ueEditToolBarH + $interiorMargin;
margin-bottom: $interiorMargin;
opacity: 1;
}
}
}

Some files were not shown because too many files have changed in this diff Show More