From 7f0f03e787696c04864c24974dbaf5528b091d15 Mon Sep 17 00:00:00 2001 From: Tarik Date: Tue, 25 Aug 2015 14:20:27 +0300 Subject: [PATCH 01/76] Fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 42cd060282..0605dbd34a 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ bundle conventions. The tests described above are all at the unit-level; an additional test suite using [Protractor](https://angular.github.io/protractor/) -us under development, in the `protractor` folder. +is under development, in the `protractor` folder. To run: From 5f7f349f29e3e707039501262ab6e1986dca82d7 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 11 Dec 2015 12:31:06 -0800 Subject: [PATCH 02/76] [Browse] Specify default selection in a constant https://github.com/nasa/openmctweb/issues/401 --- platform/commonUI/browse/bundle.json | 10 ++- .../commonUI/browse/src/BrowseController.js | 15 +++- .../browse/test/BrowseControllerSpec.js | 74 +++++++------------ 3 files changed, 45 insertions(+), 54 deletions(-) diff --git a/platform/commonUI/browse/bundle.json b/platform/commonUI/browse/bundle.json index e290f296ff..c74c177769 100644 --- a/platform/commonUI/browse/bundle.json +++ b/platform/commonUI/browse/bundle.json @@ -12,6 +12,13 @@ "reloadOnSearch": false } ], + "constants": [ + { + "key": "DEFAULT_PATH", + "value": "mine", + "priority": "fallback" + } + ], "controllers": [ { "key": "BrowseController", @@ -22,7 +29,8 @@ "$location", "objectService", "navigationService", - "urlService" + "urlService", + "DEFAULT_PATH" ] }, { diff --git a/platform/commonUI/browse/src/BrowseController.js b/platform/commonUI/browse/src/BrowseController.js index 8c032f7de3..243ce16e5b 100644 --- a/platform/commonUI/browse/src/BrowseController.js +++ b/platform/commonUI/browse/src/BrowseController.js @@ -30,8 +30,7 @@ define( function () { "use strict"; - var ROOT_ID = "ROOT", - DEFAULT_PATH = "mine"; + var ROOT_ID = "ROOT"; /** * The BrowseController is used to populate the initial scope in Browse @@ -43,9 +42,17 @@ define( * @memberof platform/commonUI/browse * @constructor */ - function BrowseController($scope, $route, $location, objectService, navigationService, urlService) { + function BrowseController( + $scope, + $route, + $location, + objectService, + navigationService, + urlService, + defaultPath + ) { var path = [ROOT_ID].concat( - ($route.current.params.ids || DEFAULT_PATH).split("/") + ($route.current.params.ids || defaultPath).split("/") ); function updateRoute(domainObject) { diff --git a/platform/commonUI/browse/test/BrowseControllerSpec.js b/platform/commonUI/browse/test/BrowseControllerSpec.js index 7b8aab90fa..70447f4a80 100644 --- a/platform/commonUI/browse/test/BrowseControllerSpec.js +++ b/platform/commonUI/browse/test/BrowseControllerSpec.js @@ -39,6 +39,7 @@ define( mockUrlService, mockDomainObject, mockNextObject, + testDefaultRoot, controller; function mockPromise(value) { @@ -49,7 +50,21 @@ define( }; } + function instantiateController() { + controller = new BrowseController( + mockScope, + mockRoute, + mockLocation, + mockObjectService, + mockNavigationService, + mockUrlService, + testDefaultRoot + ); + } + beforeEach(function () { + testDefaultRoot = "some-root-level-domain-object"; + mockScope = jasmine.createSpyObj( "$scope", [ "$on", "$watch" ] @@ -100,41 +115,20 @@ define( ])); mockNextObject.useCapability.andReturn(undefined); mockNextObject.getId.andReturn("next"); - mockDomainObject.getId.andReturn("mine"); + mockDomainObject.getId.andReturn(testDefaultRoot); - controller = new BrowseController( - mockScope, - mockRoute, - mockLocation, - mockObjectService, - mockNavigationService, - mockUrlService - ); + instantiateController(); }); it("uses composition to set the navigated object, if there is none", function () { - controller = new BrowseController( - mockScope, - mockRoute, - mockLocation, - mockObjectService, - mockNavigationService, - mockUrlService - ); + instantiateController(); expect(mockNavigationService.setNavigation) .toHaveBeenCalledWith(mockDomainObject); }); it("does not try to override navigation", function () { mockNavigationService.getNavigation.andReturn(mockDomainObject); - controller = new BrowseController( - mockScope, - mockRoute, - mockLocation, - mockObjectService, - mockNavigationService, - mockUrlService - ); + instantiateController(); expect(mockScope.navigatedObject).toBe(mockDomainObject); }); @@ -161,14 +155,8 @@ define( }); it("uses route parameters to choose initially-navigated object", function () { - mockRoute.current.params.ids = "mine/next"; - controller = new BrowseController( - mockScope, - mockRoute, - mockLocation, - mockObjectService, - mockNavigationService - ); + mockRoute.current.params.ids = testDefaultRoot + "/next"; + instantiateController(); expect(mockScope.navigatedObject).toBe(mockNextObject); expect(mockNavigationService.setNavigation) .toHaveBeenCalledWith(mockNextObject); @@ -178,14 +166,8 @@ define( // Idea here is that if we get a bad path of IDs, // browse controller should traverse down it until // it hits an invalid ID. - mockRoute.current.params.ids = "mine/junk"; - controller = new BrowseController( - mockScope, - mockRoute, - mockLocation, - mockObjectService, - mockNavigationService - ); + mockRoute.current.params.ids = testDefaultRoot + "/junk"; + instantiateController(); expect(mockScope.navigatedObject).toBe(mockDomainObject); expect(mockNavigationService.setNavigation) .toHaveBeenCalledWith(mockDomainObject); @@ -195,14 +177,8 @@ define( // Idea here is that if we get a path which passes // through an object without a composition, browse controller // should stop at it since remaining IDs cannot be loaded. - mockRoute.current.params.ids = "mine/next/junk"; - controller = new BrowseController( - mockScope, - mockRoute, - mockLocation, - mockObjectService, - mockNavigationService - ); + mockRoute.current.params.ids = testDefaultRoot + "/next/junk"; + instantiateController(); expect(mockScope.navigatedObject).toBe(mockNextObject); expect(mockNavigationService.setNavigation) .toHaveBeenCalledWith(mockNextObject); From b8206b882465ec26086c52dfd3b16a98a8e8d89f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 11 Dec 2015 13:10:47 -0800 Subject: [PATCH 03/76] [Browse] Ensure selection at startup ...even when domain object identified by default path is not found. --- platform/commonUI/browse/src/BrowseController.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/commonUI/browse/src/BrowseController.js b/platform/commonUI/browse/src/BrowseController.js index 243ce16e5b..e6c73b8af4 100644 --- a/platform/commonUI/browse/src/BrowseController.js +++ b/platform/commonUI/browse/src/BrowseController.js @@ -123,6 +123,12 @@ define( } else { doNavigate(nextObject, index + 1); } + } else if (index === 1 && c.length > 0) { + // Roots are in a top-level container that we don't + // want to be selected, so if we couldn't find an + // object at the path we wanted, at least select + // one of its children. + navigateTo(c[c.length - 1]); } else { // Couldn't find the next element of the path // so navigate to the last path object we did find From 43f6981ba1084a8da3b5812caee372280b9b88f7 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 11 Dec 2015 13:21:52 -0800 Subject: [PATCH 04/76] [Browse] Test navigation when path is not found --- platform/commonUI/browse/test/BrowseControllerSpec.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platform/commonUI/browse/test/BrowseControllerSpec.js b/platform/commonUI/browse/test/BrowseControllerSpec.js index 70447f4a80..204c8fe85e 100644 --- a/platform/commonUI/browse/test/BrowseControllerSpec.js +++ b/platform/commonUI/browse/test/BrowseControllerSpec.js @@ -126,6 +126,14 @@ define( .toHaveBeenCalledWith(mockDomainObject); }); + it("navigates to a root-level object, even when default path is not found", function () { + mockDomainObject.getId + .andReturn("something-other-than-the-" + testDefaultRoot); + instantiateController(); + expect(mockNavigationService.setNavigation) + .toHaveBeenCalledWith(mockDomainObject); + }); + it("does not try to override navigation", function () { mockNavigationService.getNavigation.andReturn(mockDomainObject); instantiateController(); From 6fb6761abf6cc1092df6308a23f2b20b46f16dbe Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 27 Jan 2016 13:52:31 -0800 Subject: [PATCH 05/76] [Plots] #638 New plot display options --- main.js | 1 + platform/commonUI/browse/bundle.js | 17 +++- .../templates/browse/inspector-region.html | 30 ++++++ .../templates/browse/object-properties.html | 61 ++++++++++++ .../commonUI/browse/src/InspectorRegion.js | 69 ++++++++++++++ .../browse/src/TypeRegionDecorator.js | 89 ++++++++++++++++++ .../res/templates/object-inspector.html | 47 ++-------- platform/commonUI/regions/bundle.js | 55 +++++++++++ .../regions/src/EditableRegionPolicy.js | 57 +++++++++++ platform/commonUI/regions/src/Region.js | 94 +++++++++++++++++++ .../commonUI/regions/src/RegionController.js | 64 +++++++++++++ .../regions/test/InspectorRegionSpec.js | 45 +++++++++ platform/commonUI/regions/test/suite.json | 3 + platform/features/layout/bundle.js | 48 +++++++++- .../res/templates/plot-options-browse.html | 57 +++++++++++ .../layout/src/PlotOptionsController.js | 87 +++++++++++++++++ 16 files changed, 782 insertions(+), 42 deletions(-) create mode 100644 platform/commonUI/browse/res/templates/browse/inspector-region.html create mode 100644 platform/commonUI/browse/res/templates/browse/object-properties.html create mode 100644 platform/commonUI/browse/src/InspectorRegion.js create mode 100644 platform/commonUI/browse/src/TypeRegionDecorator.js create mode 100644 platform/commonUI/regions/bundle.js create mode 100644 platform/commonUI/regions/src/EditableRegionPolicy.js create mode 100644 platform/commonUI/regions/src/Region.js create mode 100644 platform/commonUI/regions/src/RegionController.js create mode 100644 platform/commonUI/regions/test/InspectorRegionSpec.js create mode 100644 platform/commonUI/regions/test/suite.json create mode 100644 platform/features/layout/res/templates/plot-options-browse.html create mode 100644 platform/features/layout/src/PlotOptionsController.js diff --git a/main.js b/main.js index fd5f4533fb..9964c90a6d 100644 --- a/main.js +++ b/main.js @@ -71,6 +71,7 @@ define([ './platform/entanglement/bundle', './platform/search/bundle', './platform/status/bundle', + './platform/commonUI/regions/bundle', './example/imagery/bundle', './example/eventGenerator/bundle', diff --git a/platform/commonUI/browse/bundle.js b/platform/commonUI/browse/bundle.js index 21aba14b91..bc62a1a36e 100644 --- a/platform/commonUI/browse/bundle.js +++ b/platform/commonUI/browse/bundle.js @@ -36,6 +36,7 @@ define([ "./src/creation/CreateActionProvider", "./src/creation/CreationService", "./src/windowing/WindowTitler", + "./src/TypeRegionDecorator", 'legacyRegistry' ], function ( BrowseController, @@ -52,6 +53,7 @@ define([ CreateActionProvider, CreationService, WindowTitler, + TypeRegionDecorator, legacyRegistry ) { "use strict"; @@ -192,6 +194,14 @@ define([ "context" ], "templateUrl": "templates/back-arrow.html" + }, + { + "key": "object-properties", + "templateUrl": "templates/browse/object-properties.html" + }, + { + "key": "inspector-region", + "templateUrl": "templates/browse/inspector-region.html" } ], "services": [ @@ -280,7 +290,12 @@ define([ "$q", "$log" ] - } + }, + { + "provides": "typeService", + "type": "decorator", + "implementation": TypeRegionDecorator + }, ], "runs": [ { diff --git a/platform/commonUI/browse/res/templates/browse/inspector-region.html b/platform/commonUI/browse/res/templates/browse/inspector-region.html new file mode 100644 index 0000000000..b946c06ab3 --- /dev/null +++ b/platform/commonUI/browse/res/templates/browse/inspector-region.html @@ -0,0 +1,30 @@ + +
+
+ + +
+
diff --git a/platform/commonUI/browse/res/templates/browse/object-properties.html b/platform/commonUI/browse/res/templates/browse/object-properties.html new file mode 100644 index 0000000000..149da6b874 --- /dev/null +++ b/platform/commonUI/browse/res/templates/browse/object-properties.html @@ -0,0 +1,61 @@ + +
+
Inspection
+
    +
  • + Properties +
    +
    {{ data.name }}
    +
    {{ data.value }}
    +
    +
  • +
  • + Location + + + + +
  • +
  • + Original Location + + + + +
  • +
+
\ No newline at end of file diff --git a/platform/commonUI/browse/src/InspectorRegion.js b/platform/commonUI/browse/src/InspectorRegion.js new file mode 100644 index 0000000000..72b71a1e01 --- /dev/null +++ b/platform/commonUI/browse/src/InspectorRegion.js @@ -0,0 +1,69 @@ +/***************************************************************************** + * 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*/ + +define( + [ + '../../regions/src/Region' + ], + function (Region) { + "use strict"; + + /** + * Defines the a default Inspector region. Captured in a class to + * allow for modular extension and customization of regions based on + * the typical case. + * @memberOf platform/commonUI/regions + * @constructor + */ + function InspectorRegion() { + Region.call(this); + + this.buildRegion(); + } + + InspectorRegion.prototype = Object.create(Region.prototype); + InspectorRegion.prototype.constructor = Region; + + /** + * @private + */ + InspectorRegion.prototype.buildRegion = function() { + var metadataPart = { + name: 'properties-location', + title: 'Properties and Location', + // Which modes should the region part be visible in? If + // nothing provided here, then assumed that part is visible + // in both. The visibility or otherwise of a region part + // should be decided by a policy. In this case, 'modes' is a + // shortcut that is used by the EditableRegionPolicy. + modes: ['browse', 'edit'], + content: { + key: 'object-properties' + } + }; + this.addPart(metadataPart, 0); + } + + return InspectorRegion; + } +); diff --git a/platform/commonUI/browse/src/TypeRegionDecorator.js b/platform/commonUI/browse/src/TypeRegionDecorator.js new file mode 100644 index 0000000000..60e75cac24 --- /dev/null +++ b/platform/commonUI/browse/src/TypeRegionDecorator.js @@ -0,0 +1,89 @@ +/***************************************************************************** + * 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*/ + +define( + [ + './InspectorRegion' + ], + function (InspectorRegion) { + "use strict"; + + /** + * Adds default screen regions to Type definitions. Screen regions + * are sections of the browse and edit view of an object that can be + * customized on a per-type basis. Within {@link Region}s are {@link RegionPart}s. + * Policies can be used to decide which parts are visible or not based on object state. + * @memberOf platform/commonUI/regions + * @see {@link Region}, {@link RegionPart}, {@link EditableRegionPolicy} + * @constructor + */ + function TypeRegionDecorator(typeService) { + this.typeService = typeService + } + + /** + * Read Type bundle definition, and add default region definitions + * if none provided. + * @private + * @param type + * @returns {*} + */ + TypeRegionDecorator.prototype.decorateType = function (type) { + var regions = type.getDefinition().regions || {}; + + regions.inspector = regions.inspector || new InspectorRegion(); + + type.getDefinition().regions = regions; + + return type; + }; + + /** + * Override the provider functions in order to return decorated Type + * objects. + * @returns {Array|*} + */ + TypeRegionDecorator.prototype.listTypes = function() { + var self = this, + types = this.typeService.listTypes(); + + return types.map(function (type) { + return self.decorateType(type); + }); + }; + + /** + * Override the provider function in order to return decorated Type + * objects. + * @param key + */ + TypeRegionDecorator.prototype.getType = function(key) { + var self = this, + type = this.typeService.getType(key); + + return self.decorateType(type); + }; + + return TypeRegionDecorator; + } +); diff --git a/platform/commonUI/general/res/templates/object-inspector.html b/platform/commonUI/general/res/templates/object-inspector.html index 5f3e4d522e..8b13d841c5 100644 --- a/platform/commonUI/general/res/templates/object-inspector.html +++ b/platform/commonUI/general/res/templates/object-inspector.html @@ -19,49 +19,16 @@ this source code distribution or the Licensing information page available at runtime from the About dialog for additional information. --> - +
-
+
-
Inspection
-
    -
  • - Properties -
    -
    {{ data.name }}
    -
    {{ data.value }}
    -
    -
  • -
  • - Location - - - - -
  • -
  • - Original Location - - - - -
  • -
+ +
diff --git a/platform/commonUI/regions/bundle.js b/platform/commonUI/regions/bundle.js new file mode 100644 index 0000000000..dce4543b60 --- /dev/null +++ b/platform/commonUI/regions/bundle.js @@ -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/RegionController', + './src/EditableRegionPolicy', + 'legacyRegistry' +], function ( + RegionController, + EditableRegionPolicy, + legacyRegistry +) { + "use strict"; + + legacyRegistry.register("platform/commonUI/regions", { + "extensions": { + "controllers": [ + { + "key": "RegionController", + "implementation": RegionController, + "depends": [ + "$scope", + "policyService" + ] + } + ], + "policies": [ + { + "category": "region", + "implementation": EditableRegionPolicy + } + ] + } + }); +}); diff --git a/platform/commonUI/regions/src/EditableRegionPolicy.js b/platform/commonUI/regions/src/EditableRegionPolicy.js new file mode 100644 index 0000000000..94825ff550 --- /dev/null +++ b/platform/commonUI/regions/src/EditableRegionPolicy.js @@ -0,0 +1,57 @@ +/***************************************************************************** + * 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"; + + /** + * A policy for determining whether a region part should be visible or + * not, based on its editability and the current state of the domain + * object . + * @constructor + * @implements {Policy} + * @memberof platform/commonUI/regions + */ + function EditableRegionPolicy() { + } + + EditableRegionPolicy.prototype.allow = function (regionPart, domainObject) { + if (!regionPart.modes){ + return true; + } + if (domainObject.getCapability('status').get('editing')){ + //If the domain object is in edit mode, only include a part + // if it is marked editable + return regionPart.modes.indexOf('edit') != -1; + } else { + //If the domain object is not in edit mode, return any parts + // that are not explicitly marked editable + return regionPart.modes.indexOf('browse') != -1; + } + }; + + return EditableRegionPolicy; + } +); \ No newline at end of file diff --git a/platform/commonUI/regions/src/Region.js b/platform/commonUI/regions/src/Region.js new file mode 100644 index 0000000000..b39f53c55f --- /dev/null +++ b/platform/commonUI/regions/src/Region.js @@ -0,0 +1,94 @@ +/***************************************************************************** + * 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*/ + +define( + [], + function () { + "use strict"; + + /** + * @typeDef {object} PartContents + * @property {string} key If the part is defined as a + * representation, the key corresponding to the representation. + * @memberOf platform/commonUI/regions + */ + + /** + * @typeDef {object} RegionPart + * @property {string} name A unique name for this region part + * @property {PartContents} content the details of the region part + * being defined + * @property {Array} [modes] the modes that this region part + * should be included in. Options are 'edit' and 'browse'. By + * default, will be included in both. Inclusion of region parts is + * determined by policies of category 'region'. By default, the + * {EditableRegionPolicy} will be applied. + * @memberOf platform/commonUI/regions + */ + + /** + * Defines the interface for a screen region. A screen region is a + * section of the browse an edit screens for an object. Regions are + * declared in object type definitions. + * @memberOf platform/commonUI/regions + * @abstract + * @constructor + */ + function Region() { + this.parts = []; + } + + /** + * Adds a part to this region. + * @param {RegionPart} part the part to add + * @param {number} [index] the position to insert the part. By default + * will add to the end + */ + Region.prototype.addPart = function (part, index){ + if (index) { + this.parts.splice(index, 0, part); + } else { + this.parts.push(part); + } + }; + + /** + * Removes a part from this region. + * @param {RegionPart} part the part to add + * @param {number} [index] the position to insert the part. By default + * will add to the end + */ + Region.prototype.removePart = function (part){ + if (typeof part === 'number') { + this.parts.splice(part, 1); + } else if (typeof part === 'string'){ + this.parts + } + else { + this.parts.splice(this.parts.indexOf(part), 1); + } + }; + + return Region; + } +); diff --git a/platform/commonUI/regions/src/RegionController.js b/platform/commonUI/regions/src/RegionController.js new file mode 100644 index 0000000000..756eb1f5d7 --- /dev/null +++ b/platform/commonUI/regions/src/RegionController.js @@ -0,0 +1,64 @@ +/***************************************************************************** + * 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 RegionController adds region data for a domain object's type + * to the scope. + * + * @constructor + */ + function RegionController($scope, policyService) { + var domainObject = $scope.domainObject, + typeCapability = domainObject.getCapability('type'); + + /** + * TODO: Refactor this out, probably to a directive. + * Or, alternatively, could have a regionCapability that returns + * regions and parts filtered for applicability to current + * object state. + * @param regions + * @returns {*} + */ + function filterParts(regions) { + //Dupe so we're not modifying the type definition. + var filteredRegions = {}; + for (var regionName in regions) { + filteredRegions[regionName] = Object.create(regions[regionName]); + filteredRegions[regionName].parts = regions[regionName].parts.filter(function(part){ + return policyService.allow('region', part, domainObject); + }); + } + return filteredRegions; + } + + $scope.regions = filterParts(typeCapability.getDefinition().regions); + } + + return RegionController; + } +); \ No newline at end of file diff --git a/platform/commonUI/regions/test/InspectorRegionSpec.js b/platform/commonUI/regions/test/InspectorRegionSpec.js new file mode 100644 index 0000000000..9192ba3f11 --- /dev/null +++ b/platform/commonUI/regions/test/InspectorRegionSpec.js @@ -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,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ + +/** + * MCTIncudeSpec. Created by vwoeltje on 11/6/14. + */ +define( + ["../src/InspectorRegion"], + function (InspectorRegion) { + "use strict"; + + describe("The inspector region", function () { + var inspectorRegion; + + beforeEach(function () { + inspectorRegion = new InspectorRegion; + }); + + it("creates default region parts", function () { + expect(inspectorRegion.parts().length).toBe(2); + }); + + }); + } +); \ No newline at end of file diff --git a/platform/commonUI/regions/test/suite.json b/platform/commonUI/regions/test/suite.json new file mode 100644 index 0000000000..56239e1a2b --- /dev/null +++ b/platform/commonUI/regions/test/suite.json @@ -0,0 +1,3 @@ +[ + "InspectorRegion" +] \ No newline at end of file diff --git a/platform/features/layout/bundle.js b/platform/features/layout/bundle.js index 538d456007..4626275211 100644 --- a/platform/features/layout/bundle.js +++ b/platform/features/layout/bundle.js @@ -25,15 +25,45 @@ define([ "./src/LayoutController", "./src/FixedController", "./src/LayoutCompositionPolicy", + "../../commonUI/browse/src/InspectorRegion", + "./src/PlotOptionsController", 'legacyRegistry' ], function ( LayoutController, FixedController, LayoutCompositionPolicy, + InspectorRegion, + PlotOptionsController, legacyRegistry ) { "use strict"; + /** + * Customize and extend the default 'Inspector' region for the panel + * type, to add display options for plots. This should be moved to a + * dedicated type. + * @type {InspectorRegion} + */ + var plotInspector = new InspectorRegion(), + plotOptionsBrowsePart = { + name: "plot-options", + title: "Plot Options", + modes: ['browse'], + content: { + key: "plot-options-browse" + } + }, + plotOptionsEditPart = { + name: "plot-options", + title: "Plot Options", + modes: ['edit'], + content: { + key: "plot-options-browse" + } + }; + plotInspector.addPart(plotOptionsBrowsePart); + plotInspector.addPart(plotOptionsEditPart); + legacyRegistry.register("platform/features/layout", { "name": "Layout components.", "description": "Plug in adding Layout capabilities.", @@ -192,6 +222,10 @@ define([ { "key": "frame", "templateUrl": "templates/frame.html" + }, + { + "key": "plot-options-browse", + "templateUrl": "templates/plot-options-browse.html" } ], "controllers": [ @@ -213,6 +247,13 @@ define([ "telemetryFormatter", "throttle" ] + }, + { + "key": "PlotOptionsController", + "implementation": PlotOptionsController, + "depends": [ + "$scope" + ] } ], "templates": [ @@ -312,7 +353,12 @@ define([ "property": "layoutGrid", "conversion": "number[]" } - ] + ], + "regions": { + "inspector": plotInspector + } + + } ] } diff --git a/platform/features/layout/res/templates/plot-options-browse.html b/platform/features/layout/res/templates/plot-options-browse.html new file mode 100644 index 0000000000..693ad633e4 --- /dev/null +++ b/platform/features/layout/res/templates/plot-options-browse.html @@ -0,0 +1,57 @@ + +
+ Display +
    +
      +
    • + + + + + + + + + +
      + + +
      +
      +
    • +
    +
+
\ No newline at end of file diff --git a/platform/features/layout/src/PlotOptionsController.js b/platform/features/layout/src/PlotOptionsController.js new file mode 100644 index 0000000000..7f74492129 --- /dev/null +++ b/platform/features/layout/src/PlotOptionsController.js @@ -0,0 +1,87 @@ +/***************************************************************************** + * 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*/ + +/** + * This bundle implements object types and associated views for + * display-building. + * @namespace platform/features/layout + */ +define( + [], + function () { + "use strict"; + + /** + * The LayoutController is responsible for supporting the + * Layout view. It arranges frames according to saved configuration + * and provides methods for updating these based on mouse + * movement. + * @memberof platform/features/layout + * @constructor + * @param {Scope} $scope the controller's Angular scope + */ + function PlotOptionsController($scope) { + var self = this, + plotOptionsStructure = { + 'name':'Plot Options', + 'sections': [{ + 'rows':[ + { + 'name': 'Markers', + 'control': 'checkbox', + 'key': 'markers' + }, + { + 'name': 'No Line', + 'control': 'checkbox', + 'key': 'noLine' + }, + { + 'name': 'Step Line', + 'control': 'checkbox', + 'key': 'stepLine' + }, + { + 'name': 'Linear Line', + 'control': 'checkbox', + 'key': 'linearLine' + } + ] + }]}, + plotOptionsModel = {}; + + $scope.plotOptionsStructure = plotOptionsStructure; + $scope.plotOptionsModel = plotOptionsModel; + + $scope.domainObject.useCapability('composition').then(function(children){ + $scope.children = children; + }); + + + + } + + return PlotOptionsController; + } +); + From f1b6d7f749f28078b162ea1f9dad3ff01089e9a0 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Tue, 2 Feb 2016 09:39:29 -0800 Subject: [PATCH 06/76] [Frontend] New custom radio mctControl open #638 Markup and initial CSS --- .../general/res/sass/controls/_controls.scss | 7 +- .../espresso/res/css/theme-espresso.css | 218 ++++++++++-------- .../themes/snow/res/css/theme-snow.css | 218 ++++++++++-------- .../forms/res/templates/controls/radio.html | 28 +++ 4 files changed, 265 insertions(+), 206 deletions(-) create mode 100644 platform/forms/res/templates/controls/radio.html diff --git a/platform/commonUI/general/res/sass/controls/_controls.scss b/platform/commonUI/general/res/sass/controls/_controls.scss index d97a153cff..7148a5a054 100644 --- a/platform/commonUI/general/res/sass/controls/_controls.scss +++ b/platform/commonUI/general/res/sass/controls/_controls.scss @@ -109,7 +109,8 @@ font-size: 0.7rem; } -label.checkbox.custom { +label.checkbox.custom, +label.radio.custom { $bg: pullForward($colorBodyBg, 10%); $d: $formRowCtrlsH; cursor: pointer; @@ -157,11 +158,13 @@ label.checkbox.custom { &:checked ~ em:before { background: $colorCheck; color: lighten($colorCheck, 50%); - content: "2"; } } } +label.checkbox.custom input:checked ~ em:before { content: "\32"; } +label.radio.custom input:checked ~ em:before { content: "\e607"; } + .input-labeled { margin-left: $interiorMargin; label { diff --git a/platform/commonUI/themes/espresso/res/css/theme-espresso.css b/platform/commonUI/themes/espresso/res/css/theme-espresso.css index f0f0e41445..0e5d922945 100644 --- a/platform/commonUI/themes/espresso/res/css/theme-espresso.css +++ b/platform/commonUI/themes/espresso/res/css/theme-espresso.css @@ -810,7 +810,7 @@ mct-container { .search-results .s-status-editing .search-result-item.t-item-icon:before { color: #0099cc; font-size: inherit; } - /* line 40, ../../../../general/res/sass/_icons.scss */ + /* line 39, ../../../../general/res/sass/_icons.scss */ .ui-symbol.icon.alert, .alert.t-item-icon, .icon.alert.s-icon-btn, .l-datetime-picker .l-month-year-pager .icon.alert.pager, .l-datetime-picker .l-month-year-pager .alert.pager.t-item-icon, .tree .s-status-editing .icon.alert.tree-item:before, .tree .s-status-editing .alert.tree-item.t-item-icon:before, .tree .s-status-editing .icon.alert.search-result-item:before, .tree .s-status-editing .alert.search-result-item.t-item-icon:before, @@ -819,7 +819,7 @@ mct-container { .search-results .s-status-editing .icon.alert.search-result-item:before, .search-results .s-status-editing .alert.search-result-item.t-item-icon:before { color: #ff3c00; } - /* line 42, ../../../../general/res/sass/_icons.scss */ + /* line 41, ../../../../general/res/sass/_icons.scss */ .ui-symbol.icon.alert:hover, .alert.t-item-icon:hover, .icon.alert.s-icon-btn:hover, .l-datetime-picker .l-month-year-pager .icon.alert.pager:hover, .tree .s-status-editing .icon.alert.tree-item:hover:before, .tree .s-status-editing .alert.tree-item.t-item-icon:hover:before, .tree .s-status-editing .icon.alert.search-result-item:hover:before, .tree .s-status-editing .alert.search-result-item.t-item-icon:hover:before, @@ -828,7 +828,7 @@ mct-container { .search-results .s-status-editing .icon.alert.search-result-item:hover:before, .search-results .s-status-editing .alert.search-result-item.t-item-icon:hover:before { color: #ff8a66; } - /* line 46, ../../../../general/res/sass/_icons.scss */ + /* line 45, ../../../../general/res/sass/_icons.scss */ .ui-symbol.icon.major, .major.t-item-icon, .icon.major.s-icon-btn, .l-datetime-picker .l-month-year-pager .icon.major.pager, .l-datetime-picker .l-month-year-pager .major.pager.t-item-icon, .tree .s-status-editing .icon.major.tree-item:before, .tree .s-status-editing .major.tree-item.t-item-icon:before, .tree .s-status-editing .icon.major.search-result-item:before, .tree .s-status-editing .major.search-result-item.t-item-icon:before, @@ -837,11 +837,11 @@ mct-container { .search-results .s-status-editing .icon.major.search-result-item:before, .search-results .s-status-editing .major.search-result-item.t-item-icon:before { font-size: 1.65em; } - /* line 50, ../../../../general/res/sass/_icons.scss */ + /* line 49, ../../../../general/res/sass/_icons.scss */ .ui-symbol.icon-calendar:after, .icon-calendar.t-item-icon:after, .icon-calendar.s-icon-btn:after, .l-datetime-picker .l-month-year-pager .icon-calendar.pager:after { content: "\e605"; } -/* line 55, ../../../../general/res/sass/_icons.scss */ +/* line 54, ../../../../general/res/sass/_icons.scss */ .bar .ui-symbol, .bar .t-item-icon, .bar .s-icon-btn, .bar .l-datetime-picker .l-month-year-pager .pager, .l-datetime-picker .l-month-year-pager .bar .pager, .bar .tree .s-status-editing .tree-item:before, .tree .s-status-editing .bar .tree-item:before, .bar .tree .s-status-editing .search-result-item:before, .tree .s-status-editing .bar .search-result-item:before, @@ -851,36 +851,36 @@ mct-container { .search-results .s-status-editing .bar .search-result-item:before { display: inline-block; } -/* line 59, ../../../../general/res/sass/_icons.scss */ +/* line 58, ../../../../general/res/sass/_icons.scss */ .invoke-menu { text-shadow: none; display: inline-block; } -/* line 64, ../../../../general/res/sass/_icons.scss */ +/* line 63, ../../../../general/res/sass/_icons.scss */ .s-menu-btn .invoke-menu, .icon.major .invoke-menu, .major.t-item-icon .invoke-menu { margin-left: 3px; } -/* line 69, ../../../../general/res/sass/_icons.scss */ +/* line 68, ../../../../general/res/sass/_icons.scss */ .menu .type-icon, .tree-item .type-icon, .super-menu.menu .type-icon { position: absolute; } -/* line 75, ../../../../general/res/sass/_icons.scss */ +/* line 74, ../../../../general/res/sass/_icons.scss */ .l-icon-alert { display: none !important; } - /* line 77, ../../../../general/res/sass/_icons.scss */ + /* line 76, ../../../../general/res/sass/_icons.scss */ .l-icon-alert:before { color: #ff3c00; content: "!"; } -/* line 83, ../../../../general/res/sass/_icons.scss */ +/* line 82, ../../../../general/res/sass/_icons.scss */ .t-item-icon { line-height: normal; position: relative; } - /* line 94, ../../../../general/res/sass/_icons.scss */ + /* line 90, ../../../../general/res/sass/_icons.scss */ .t-item-icon.l-icon-link .t-item-icon-glyph:before { color: #49dedb; content: "\f4"; @@ -2294,7 +2294,8 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { font-size: 0.7rem; } /* line 112, ../../../../general/res/sass/controls/_controls.scss */ -label.checkbox.custom { +label.checkbox.custom, +label.radio.custom { cursor: pointer; display: inline-block; line-height: 14px; @@ -2302,14 +2303,16 @@ label.checkbox.custom { padding-left: 19px; position: relative; vertical-align: middle; } - /* line 122, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom em { + /* line 123, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom em, + label.radio.custom em { color: #999; display: inline-block; height: 14px; min-width: 14px; } - /* line 127, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom em:before { + /* line 128, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom em:before, + label.radio.custom em:before { -moz-border-radius: 2.25px; -webkit-border-radius: 2.25px; border-radius: 2.25px; @@ -2329,60 +2332,71 @@ label.checkbox.custom { top: 0; position: absolute; text-align: center; } - /* line 145, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom.no-text { + /* line 146, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom.no-text, + label.radio.custom.no-text { overflow: hidden; margin-right: 0; padding-left: 0; height: 14px; width: 14px; } - /* line 151, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom.no-text em { + /* line 152, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom.no-text em, + label.radio.custom.no-text em { overflow: hidden; } - /* line 155, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom input { + /* line 156, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom input, + label.radio.custom input { display: none; } - /* line 157, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom input:checked ~ em:before { + /* line 158, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom input:checked ~ em:before, + label.radio.custom input:checked ~ em:before { background: #0099cc; - color: #ccf2ff; - content: "2"; } + color: #ccf2ff; } /* line 165, ../../../../general/res/sass/controls/_controls.scss */ +label.checkbox.custom input:checked ~ em:before { + content: "\32"; } + +/* line 166, ../../../../general/res/sass/controls/_controls.scss */ +label.radio.custom input:checked ~ em:before { + content: "\e607"; } + +/* line 168, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled { margin-left: 5px; } - /* line 167, ../../../../general/res/sass/controls/_controls.scss */ + /* line 170, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled label { display: inline-block; margin-right: 3px; } - /* line 171, ../../../../general/res/sass/controls/_controls.scss */ + /* line 174, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled.inline { display: inline-block; } - /* line 174, ../../../../general/res/sass/controls/_controls.scss */ + /* line 177, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled:first-child { margin-left: 0; } -/* line 179, ../../../../general/res/sass/controls/_controls.scss */ +/* line 182, ../../../../general/res/sass/controls/_controls.scss */ .s-menu-btn label.checkbox.custom { margin-left: 5px; } -/* line 184, ../../../../general/res/sass/controls/_controls.scss */ +/* line 187, ../../../../general/res/sass/controls/_controls.scss */ .item .checkbox.checked label { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; border-bottom: none; } -/* line 190, ../../../../general/res/sass/controls/_controls.scss */ +/* line 193, ../../../../general/res/sass/controls/_controls.scss */ .context-available, .s-icon-btn { color: #0099cc; } - /* line 194, ../../../../general/res/sass/controls/_controls.scss */ + /* line 197, ../../../../general/res/sass/controls/_controls.scss */ .context-available:hover, .s-icon-btn:hover { color: deepskyblue; } -/* line 199, ../../../../general/res/sass/controls/_controls.scss */ +/* line 202, ../../../../general/res/sass/controls/_controls.scss */ .view-switcher { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2402,22 +2416,22 @@ label.checkbox.custom { transition-delay: 0; } /******************************************************** OBJECT-HEADER */ -/* line 204, ../../../../general/res/sass/controls/_controls.scss */ +/* line 207, ../../../../general/res/sass/controls/_controls.scss */ .object-header { font-size: 1em; } - /* line 207, ../../../../general/res/sass/controls/_controls.scss */ + /* line 210, ../../../../general/res/sass/controls/_controls.scss */ .object-header > .type-icon { color: #cccccc; font-size: 120%; float: left; margin-right: 5px; } - /* line 215, ../../../../general/res/sass/controls/_controls.scss */ + /* line 218, ../../../../general/res/sass/controls/_controls.scss */ .object-header .l-elem-wrapper mct-representation { min-width: 0.7em; } - /* line 223, ../../../../general/res/sass/controls/_controls.scss */ + /* line 226, ../../../../general/res/sass/controls/_controls.scss */ .object-header .action { margin-right: 5px; } - /* line 227, ../../../../general/res/sass/controls/_controls.scss */ + /* line 230, ../../../../general/res/sass/controls/_controls.scss */ .object-header .title-label { color: #999; overflow: hidden; @@ -2426,13 +2440,13 @@ label.checkbox.custom { flex: 0 1 auto; -webkit-flex: 0 1 auto; padding-right: 0.35em; } - /* line 234, ../../../../general/res/sass/controls/_controls.scss */ + /* line 237, ../../../../general/res/sass/controls/_controls.scss */ .object-header .context-available { font-size: 0.7em; flex: 0 0 1; -webkit-flex: 0 0 1; } @media only screen and (min-device-width: 1025px) and (-webkit-min-device-pixel-ratio: 1) { - /* line 240, ../../../../general/res/sass/controls/_controls.scss */ + /* line 243, ../../../../general/res/sass/controls/_controls.scss */ .object-header .context-available { -moz-transition-property: opacity; -o-transition-property: opacity; @@ -2451,7 +2465,7 @@ label.checkbox.custom { -webkit-transition-delay: 0; transition-delay: 0; opacity: 0; } - /* line 245, ../../../../general/res/sass/controls/_controls.scss */ + /* line 248, ../../../../general/res/sass/controls/_controls.scss */ .object-header:hover .context-available { opacity: 1; } } @@ -2465,12 +2479,12 @@ label.checkbox.custom { @keyframes progress { 100% { background-position: 20px center; } } -/* line 267, ../../../../general/res/sass/controls/_controls.scss */ +/* line 270, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar { display: inline-block; overflow: hidden; position: relative; } - /* line 273, ../../../../general/res/sass/controls/_controls.scss */ + /* line 276, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt-holder { overflow: hidden; position: absolute; @@ -2480,7 +2494,7 @@ label.checkbox.custom { left: 1px; width: auto; height: auto; } - /* line 276, ../../../../general/res/sass/controls/_controls.scss */ + /* line 279, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt, .l-progress-bar .progress-amt:before, .l-progress-bar .progress-amt:after { @@ -2494,14 +2508,14 @@ label.checkbox.custom { height: auto; display: block; content: ''; } - /* line 284, ../../../../general/res/sass/controls/_controls.scss */ + /* line 287, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt { right: auto; } - /* line 289, ../../../../general/res/sass/controls/_controls.scss */ + /* line 292, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar.indeterminate .progress-amt { width: 100% !important; } -/* line 295, ../../../../general/res/sass/controls/_controls.scss */ +/* line 298, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar { -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -2510,7 +2524,7 @@ label.checkbox.custom { -webkit-box-shadow: inset rgba(0, 0, 0, 0.3) 0 1px 4px; box-shadow: inset rgba(0, 0, 0, 0.3) 0 1px 4px; background: rgba(0, 0, 0, 0.1); } - /* line 299, ../../../../general/res/sass/controls/_controls.scss */ + /* line 302, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt { -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -2537,10 +2551,10 @@ label.checkbox.custom { -o-transition-delay: 0; -webkit-transition-delay: 0; transition-delay: 0; } - /* line 304, ../../../../general/res/sass/controls/_controls.scss */ + /* line 307, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt:before { background-color: #0099cc; } - /* line 307, ../../../../general/res/sass/controls/_controls.scss */ + /* line 310, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt:after { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSI1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjMwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjI1Ii8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2548,7 +2562,7 @@ label.checkbox.custom { background-image: -moz-linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); background-image: linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); } - /* line 316, ../../../../general/res/sass/controls/_controls.scss */ + /* line 319, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar:not(.indeterminate) .progress-amt:before { -moz-animation: progress 0.4s linear infinite; -webkit-animation: progress 0.4s linear infinite; @@ -2561,7 +2575,7 @@ label.checkbox.custom { background-position: 0 center; background-repeat: repeat-x; background-size: 20px 40%; } - /* line 324, ../../../../general/res/sass/controls/_controls.scss */ + /* line 327, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar.indeterminate .progress-amt:before { -moz-animation: progress 0.6s linear infinite; -webkit-animation: progress 0.6s linear infinite; @@ -2573,12 +2587,12 @@ label.checkbox.custom { background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0) 100%); background-repeat: repeat; background-size: 20px 20px; } - /* line 329, ../../../../general/res/sass/controls/_controls.scss */ + /* line 332, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar.indeterminate .progress-amt:after { display: none; } /******************************************************** SLIDERS */ -/* line 337, ../../../../general/res/sass/controls/_controls.scss */ +/* line 340, ../../../../general/res/sass/controls/_controls.scss */ .slider .slot { width: auto; position: absolute; @@ -2586,7 +2600,7 @@ label.checkbox.custom { right: 0; bottom: 0; left: 0; } -/* line 345, ../../../../general/res/sass/controls/_controls.scss */ +/* line 348, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2612,10 +2626,10 @@ label.checkbox.custom { auto: 0; bottom: auto; left: auto; } - /* line 348, ../../../../general/res/sass/controls/_controls.scss */ + /* line 351, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob:hover { background-color: #0099cc; } -/* line 359, ../../../../general/res/sass/controls/_controls.scss */ +/* line 362, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob-l { -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px; @@ -2624,7 +2638,7 @@ label.checkbox.custom { -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; cursor: w-resize; } -/* line 363, ../../../../general/res/sass/controls/_controls.scss */ +/* line 366, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob-r { -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px; @@ -2633,7 +2647,7 @@ label.checkbox.custom { -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; cursor: e-resize; } -/* line 367, ../../../../general/res/sass/controls/_controls.scss */ +/* line 370, ../../../../general/res/sass/controls/_controls.scss */ .slider .range { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2660,12 +2674,12 @@ label.checkbox.custom { left: auto; height: auto; width: auto; } - /* line 378, ../../../../general/res/sass/controls/_controls.scss */ + /* line 381, ../../../../general/res/sass/controls/_controls.scss */ .slider .range:hover { background-color: rgba(0, 153, 204, 0.5); } /******************************************************** DATETIME PICKER */ -/* line 385, ../../../../general/res/sass/controls/_controls.scss */ +/* line 388, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker { -moz-user-select: -moz-none; -ms-user-select: none; @@ -2674,65 +2688,65 @@ label.checkbox.custom { font-size: 0.8rem; padding: 10px !important; width: 230px; } - /* line 391, ../../../../general/res/sass/controls/_controls.scss */ + /* line 394, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager { height: 15px; margin-bottom: 5px; position: relative; } - /* line 400, ../../../../general/res/sass/controls/_controls.scss */ + /* line 403, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager { width: 20px; } - /* line 403, ../../../../general/res/sass/controls/_controls.scss */ + /* line 406, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.prev { right: auto; } - /* line 405, ../../../../general/res/sass/controls/_controls.scss */ + /* line 408, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.prev:before { content: "\3c"; } - /* line 409, ../../../../general/res/sass/controls/_controls.scss */ + /* line 412, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.next { left: auto; text-align: right; } - /* line 412, ../../../../general/res/sass/controls/_controls.scss */ + /* line 415, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.next:before { content: "\3e"; } - /* line 417, ../../../../general/res/sass/controls/_controls.scss */ + /* line 420, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .val { text-align: center; left: 25px; right: 25px; } - /* line 423, ../../../../general/res/sass/controls/_controls.scss */ + /* line 426, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-calendar, .l-datetime-picker .l-time-selects { border-top: 1px solid rgba(153, 153, 153, 0.1); } - /* line 427, ../../../../general/res/sass/controls/_controls.scss */ + /* line 430, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-time-selects { line-height: 22px; } /******************************************************** CALENDAR */ -/* line 435, ../../../../general/res/sass/controls/_controls.scss */ +/* line 438, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row { display: -webkit-flex; display: flex; -webkit-flex-flow: row nowrap; flex-flow: row nowrap; margin-top: 1px; } - /* line 439, ../../../../general/res/sass/controls/_controls.scss */ + /* line 442, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row:first-child { margin-top: 0; } - /* line 442, ../../../../general/res/sass/controls/_controls.scss */ + /* line 445, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row li { -webkit-flex: 1 0; flex: 1 0; margin-left: 1px; padding: 5px; text-align: center; } - /* line 447, ../../../../general/res/sass/controls/_controls.scss */ + /* line 450, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row li:first-child { margin-left: 0; } - /* line 451, ../../../../general/res/sass/controls/_controls.scss */ + /* line 454, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-header li { color: #b3b3b3; } - /* line 454, ../../../../general/res/sass/controls/_controls.scss */ + /* line 457, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li { -moz-transition-property: background-color; -o-transition-property: background-color; @@ -2751,31 +2765,31 @@ label.checkbox.custom { -webkit-transition-delay: 0; transition-delay: 0; cursor: pointer; } - /* line 457, ../../../../general/res/sass/controls/_controls.scss */ + /* line 460, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.in-month { background-color: #616161; } - /* line 460, ../../../../general/res/sass/controls/_controls.scss */ + /* line 463, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li .sub { color: #b3b3b3; font-size: 0.8em; } - /* line 464, ../../../../general/res/sass/controls/_controls.scss */ + /* line 467, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.selected { background: #006080; color: #cccccc; } - /* line 467, ../../../../general/res/sass/controls/_controls.scss */ + /* line 470, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.selected .sub { color: inherit; } - /* line 471, ../../../../general/res/sass/controls/_controls.scss */ + /* line 474, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li:hover { background-color: #0099cc; color: #fff; } - /* line 474, ../../../../general/res/sass/controls/_controls.scss */ + /* line 477, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li:hover .sub { color: inherit; } /******************************************************** BROWSER ELEMENTS */ @media only screen and (min-device-width: 1025px) and (-webkit-min-device-pixel-ratio: 1) { - /* line 485, ../../../../general/res/sass/controls/_controls.scss */ + /* line 488, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar { -moz-border-radius: 2px; -webkit-border-radius: 2px; @@ -2790,7 +2804,7 @@ label.checkbox.custom { height: 10px; width: 10px; } - /* line 494, ../../../../general/res/sass/controls/_controls.scss */ + /* line 497, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-thumb { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzU5NTk1OSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzRkNGQ0ZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2804,7 +2818,7 @@ label.checkbox.custom { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } - /* line 501, ../../../../general/res/sass/controls/_controls.scss */ + /* line 504, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-thumb:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzVlNWU1ZSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzUyNTI1MiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2813,7 +2827,7 @@ label.checkbox.custom { background-image: -webkit-linear-gradient(#5e5e5e, #525252 20px); background-image: linear-gradient(#5e5e5e, #525252 20px); } - /* line 506, ../../../../general/res/sass/controls/_controls.scss */ + /* line 509, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-corner { background: rgba(0, 0, 0, 0.4); } } /***************************************************************************** @@ -4299,10 +4313,10 @@ textarea { .field-hints, .fields { } - - + + .field-hints { - + } */ } /* line 30, ../../../../general/res/sass/forms/_datetime.scss */ @@ -6419,18 +6433,18 @@ mct-representation.s-status-pending .t-object-label .t-item-icon:before { padding: 30%; width: 0; height: 0; } -/* line 55, ../../../../general/res/sass/_object-label.scss */ +/* line 51, ../../../../general/res/sass/_object-label.scss */ mct-representation.s-status-pending .t-object-label .t-item-icon .t-item-icon-glyph { display: none; } -/* line 59, ../../../../general/res/sass/_object-label.scss */ +/* line 55, ../../../../general/res/sass/_object-label.scss */ mct-representation.s-status-pending .t-object-label .t-title-label { font-style: italic; opacity: 0.6; } -/* line 66, ../../../../general/res/sass/_object-label.scss */ +/* line 62, ../../../../general/res/sass/_object-label.scss */ .selected mct-representation.s-status-pending .t-object-label .t-item-icon:before { - border-color: rgba(204, 204, 204, 0.25); - border-top-color: #cccccc; } + border-color: rgba(204, 204, 204, 0.25) !important; + border-top-color: #cccccc !important; } /***************************************************************************** * Open MCT Web, Copyright (c) 2014-2015, United States Government @@ -7336,7 +7350,7 @@ table { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } - /* line 274, ../../../../general/res/sass/plots/_plots-main.scss */ + /* line 276, ../../../../general/res/sass/plots/_plots-main.scss */ .gl-plot-tick.gl-plot-x-tick-label, .gl-plot-tick.tick-label-x, .tick-label.gl-plot-x-tick-label, .tick-label.tick-label-x { @@ -7347,7 +7361,7 @@ table { width: 20%; margin-left: -10%; text-align: center; } - /* line 284, ../../../../general/res/sass/plots/_plots-main.scss */ + /* line 286, ../../../../general/res/sass/plots/_plots-main.scss */ .gl-plot-tick.gl-plot-y-tick-label, .gl-plot-tick.tick-label-y, .tick-label.gl-plot-y-tick-label, .tick-label.tick-label-y { @@ -7357,18 +7371,18 @@ table { margin-bottom: -0.5em; text-align: right; } -/* line 295, ../../../../general/res/sass/plots/_plots-main.scss */ +/* line 297, ../../../../general/res/sass/plots/_plots-main.scss */ .gl-plot-tick.gl-plot-x-tick-label { top: 5px; } -/* line 298, ../../../../general/res/sass/plots/_plots-main.scss */ +/* line 300, ../../../../general/res/sass/plots/_plots-main.scss */ .gl-plot-tick.gl-plot-y-tick-label { right: 5px; left: 5px; } -/* line 305, ../../../../general/res/sass/plots/_plots-main.scss */ +/* line 307, ../../../../general/res/sass/plots/_plots-main.scss */ .tick-label.tick-label-x { top: 0; } -/* line 308, ../../../../general/res/sass/plots/_plots-main.scss */ +/* line 310, ../../../../general/res/sass/plots/_plots-main.scss */ .tick-label.tick-label-y { right: 0; left: 0; } diff --git a/platform/commonUI/themes/snow/res/css/theme-snow.css b/platform/commonUI/themes/snow/res/css/theme-snow.css index 2d227a1f87..0d475a1473 100644 --- a/platform/commonUI/themes/snow/res/css/theme-snow.css +++ b/platform/commonUI/themes/snow/res/css/theme-snow.css @@ -810,7 +810,7 @@ mct-container { .search-results .s-status-editing .search-result-item.t-item-icon:before { color: #0099cc; font-size: inherit; } - /* line 40, ../../../../general/res/sass/_icons.scss */ + /* line 39, ../../../../general/res/sass/_icons.scss */ .ui-symbol.icon.alert, .alert.t-item-icon, .icon.alert.s-icon-btn, .l-datetime-picker .l-month-year-pager .icon.alert.pager, .l-datetime-picker .l-month-year-pager .alert.pager.t-item-icon, .tree .s-status-editing .icon.alert.tree-item:before, .tree .s-status-editing .alert.tree-item.t-item-icon:before, .tree .s-status-editing .icon.alert.search-result-item:before, .tree .s-status-editing .alert.search-result-item.t-item-icon:before, @@ -819,7 +819,7 @@ mct-container { .search-results .s-status-editing .icon.alert.search-result-item:before, .search-results .s-status-editing .alert.search-result-item.t-item-icon:before { color: #ff3c00; } - /* line 42, ../../../../general/res/sass/_icons.scss */ + /* line 41, ../../../../general/res/sass/_icons.scss */ .ui-symbol.icon.alert:hover, .alert.t-item-icon:hover, .icon.alert.s-icon-btn:hover, .l-datetime-picker .l-month-year-pager .icon.alert.pager:hover, .tree .s-status-editing .icon.alert.tree-item:hover:before, .tree .s-status-editing .alert.tree-item.t-item-icon:hover:before, .tree .s-status-editing .icon.alert.search-result-item:hover:before, .tree .s-status-editing .alert.search-result-item.t-item-icon:hover:before, @@ -828,7 +828,7 @@ mct-container { .search-results .s-status-editing .icon.alert.search-result-item:hover:before, .search-results .s-status-editing .alert.search-result-item.t-item-icon:hover:before { color: #ff8a66; } - /* line 46, ../../../../general/res/sass/_icons.scss */ + /* line 45, ../../../../general/res/sass/_icons.scss */ .ui-symbol.icon.major, .major.t-item-icon, .icon.major.s-icon-btn, .l-datetime-picker .l-month-year-pager .icon.major.pager, .l-datetime-picker .l-month-year-pager .major.pager.t-item-icon, .tree .s-status-editing .icon.major.tree-item:before, .tree .s-status-editing .major.tree-item.t-item-icon:before, .tree .s-status-editing .icon.major.search-result-item:before, .tree .s-status-editing .major.search-result-item.t-item-icon:before, @@ -837,11 +837,11 @@ mct-container { .search-results .s-status-editing .icon.major.search-result-item:before, .search-results .s-status-editing .major.search-result-item.t-item-icon:before { font-size: 1.65em; } - /* line 50, ../../../../general/res/sass/_icons.scss */ + /* line 49, ../../../../general/res/sass/_icons.scss */ .ui-symbol.icon-calendar:after, .icon-calendar.t-item-icon:after, .icon-calendar.s-icon-btn:after, .l-datetime-picker .l-month-year-pager .icon-calendar.pager:after { content: "\e605"; } -/* line 55, ../../../../general/res/sass/_icons.scss */ +/* line 54, ../../../../general/res/sass/_icons.scss */ .bar .ui-symbol, .bar .t-item-icon, .bar .s-icon-btn, .bar .l-datetime-picker .l-month-year-pager .pager, .l-datetime-picker .l-month-year-pager .bar .pager, .bar .tree .s-status-editing .tree-item:before, .tree .s-status-editing .bar .tree-item:before, .bar .tree .s-status-editing .search-result-item:before, .tree .s-status-editing .bar .search-result-item:before, @@ -851,36 +851,36 @@ mct-container { .search-results .s-status-editing .bar .search-result-item:before { display: inline-block; } -/* line 59, ../../../../general/res/sass/_icons.scss */ +/* line 58, ../../../../general/res/sass/_icons.scss */ .invoke-menu { text-shadow: none; display: inline-block; } -/* line 64, ../../../../general/res/sass/_icons.scss */ +/* line 63, ../../../../general/res/sass/_icons.scss */ .s-menu-btn .invoke-menu, .icon.major .invoke-menu, .major.t-item-icon .invoke-menu { margin-left: 3px; } -/* line 69, ../../../../general/res/sass/_icons.scss */ +/* line 68, ../../../../general/res/sass/_icons.scss */ .menu .type-icon, .tree-item .type-icon, .super-menu.menu .type-icon { position: absolute; } -/* line 75, ../../../../general/res/sass/_icons.scss */ +/* line 74, ../../../../general/res/sass/_icons.scss */ .l-icon-alert { display: none !important; } - /* line 77, ../../../../general/res/sass/_icons.scss */ + /* line 76, ../../../../general/res/sass/_icons.scss */ .l-icon-alert:before { color: #ff3c00; content: "!"; } -/* line 83, ../../../../general/res/sass/_icons.scss */ +/* line 82, ../../../../general/res/sass/_icons.scss */ .t-item-icon { line-height: normal; position: relative; } - /* line 94, ../../../../general/res/sass/_icons.scss */ + /* line 90, ../../../../general/res/sass/_icons.scss */ .t-item-icon.l-icon-link .t-item-icon-glyph:before { color: #49dedb; content: "\f4"; @@ -2219,7 +2219,8 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { font-size: 0.7rem; } /* line 112, ../../../../general/res/sass/controls/_controls.scss */ -label.checkbox.custom { +label.checkbox.custom, +label.radio.custom { cursor: pointer; display: inline-block; line-height: 14px; @@ -2227,14 +2228,16 @@ label.checkbox.custom { padding-left: 19px; position: relative; vertical-align: middle; } - /* line 122, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom em { + /* line 123, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom em, + label.radio.custom em { color: #666; display: inline-block; height: 14px; min-width: 14px; } - /* line 127, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom em:before { + /* line 128, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom em:before, + label.radio.custom em:before { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; @@ -2254,60 +2257,71 @@ label.checkbox.custom { top: 0; position: absolute; text-align: center; } - /* line 145, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom.no-text { + /* line 146, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom.no-text, + label.radio.custom.no-text { overflow: hidden; margin-right: 0; padding-left: 0; height: 14px; width: 14px; } - /* line 151, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom.no-text em { + /* line 152, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom.no-text em, + label.radio.custom.no-text em { overflow: hidden; } - /* line 155, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom input { + /* line 156, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom input, + label.radio.custom input { display: none; } - /* line 157, ../../../../general/res/sass/controls/_controls.scss */ - label.checkbox.custom input:checked ~ em:before { + /* line 158, ../../../../general/res/sass/controls/_controls.scss */ + label.checkbox.custom input:checked ~ em:before, + label.radio.custom input:checked ~ em:before { background: #0099cc; - color: #ccf2ff; - content: "2"; } + color: #ccf2ff; } /* line 165, ../../../../general/res/sass/controls/_controls.scss */ +label.checkbox.custom input:checked ~ em:before { + content: "\32"; } + +/* line 166, ../../../../general/res/sass/controls/_controls.scss */ +label.radio.custom input:checked ~ em:before { + content: "\e607"; } + +/* line 168, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled { margin-left: 5px; } - /* line 167, ../../../../general/res/sass/controls/_controls.scss */ + /* line 170, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled label { display: inline-block; margin-right: 3px; } - /* line 171, ../../../../general/res/sass/controls/_controls.scss */ + /* line 174, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled.inline { display: inline-block; } - /* line 174, ../../../../general/res/sass/controls/_controls.scss */ + /* line 177, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled:first-child { margin-left: 0; } -/* line 179, ../../../../general/res/sass/controls/_controls.scss */ +/* line 182, ../../../../general/res/sass/controls/_controls.scss */ .s-menu-btn label.checkbox.custom { margin-left: 5px; } -/* line 184, ../../../../general/res/sass/controls/_controls.scss */ +/* line 187, ../../../../general/res/sass/controls/_controls.scss */ .item .checkbox.checked label { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; border-bottom: none; } -/* line 190, ../../../../general/res/sass/controls/_controls.scss */ +/* line 193, ../../../../general/res/sass/controls/_controls.scss */ .context-available, .s-icon-btn { color: #0099cc; } - /* line 194, ../../../../general/res/sass/controls/_controls.scss */ + /* line 197, ../../../../general/res/sass/controls/_controls.scss */ .context-available:hover, .s-icon-btn:hover { color: deepskyblue; } -/* line 199, ../../../../general/res/sass/controls/_controls.scss */ +/* line 202, ../../../../general/res/sass/controls/_controls.scss */ .view-switcher { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2327,22 +2341,22 @@ label.checkbox.custom { transition-delay: 0; } /******************************************************** OBJECT-HEADER */ -/* line 204, ../../../../general/res/sass/controls/_controls.scss */ +/* line 207, ../../../../general/res/sass/controls/_controls.scss */ .object-header { font-size: 1em; } - /* line 207, ../../../../general/res/sass/controls/_controls.scss */ + /* line 210, ../../../../general/res/sass/controls/_controls.scss */ .object-header > .type-icon { color: #b3b3b3; font-size: 120%; float: left; margin-right: 5px; } - /* line 215, ../../../../general/res/sass/controls/_controls.scss */ + /* line 218, ../../../../general/res/sass/controls/_controls.scss */ .object-header .l-elem-wrapper mct-representation { min-width: 0.7em; } - /* line 223, ../../../../general/res/sass/controls/_controls.scss */ + /* line 226, ../../../../general/res/sass/controls/_controls.scss */ .object-header .action { margin-right: 5px; } - /* line 227, ../../../../general/res/sass/controls/_controls.scss */ + /* line 230, ../../../../general/res/sass/controls/_controls.scss */ .object-header .title-label { color: #666; overflow: hidden; @@ -2351,13 +2365,13 @@ label.checkbox.custom { flex: 0 1 auto; -webkit-flex: 0 1 auto; padding-right: 0.35em; } - /* line 234, ../../../../general/res/sass/controls/_controls.scss */ + /* line 237, ../../../../general/res/sass/controls/_controls.scss */ .object-header .context-available { font-size: 0.7em; flex: 0 0 1; -webkit-flex: 0 0 1; } @media only screen and (min-device-width: 1025px) and (-webkit-min-device-pixel-ratio: 1) { - /* line 240, ../../../../general/res/sass/controls/_controls.scss */ + /* line 243, ../../../../general/res/sass/controls/_controls.scss */ .object-header .context-available { -moz-transition-property: opacity; -o-transition-property: opacity; @@ -2376,7 +2390,7 @@ label.checkbox.custom { -webkit-transition-delay: 0; transition-delay: 0; opacity: 0; } - /* line 245, ../../../../general/res/sass/controls/_controls.scss */ + /* line 248, ../../../../general/res/sass/controls/_controls.scss */ .object-header:hover .context-available { opacity: 1; } } @@ -2390,12 +2404,12 @@ label.checkbox.custom { @keyframes progress { 100% { background-position: 20px center; } } -/* line 267, ../../../../general/res/sass/controls/_controls.scss */ +/* line 270, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar { display: inline-block; overflow: hidden; position: relative; } - /* line 273, ../../../../general/res/sass/controls/_controls.scss */ + /* line 276, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt-holder { overflow: hidden; position: absolute; @@ -2405,7 +2419,7 @@ label.checkbox.custom { left: 1px; width: auto; height: auto; } - /* line 276, ../../../../general/res/sass/controls/_controls.scss */ + /* line 279, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt, .l-progress-bar .progress-amt:before, .l-progress-bar .progress-amt:after { @@ -2419,14 +2433,14 @@ label.checkbox.custom { height: auto; display: block; content: ''; } - /* line 284, ../../../../general/res/sass/controls/_controls.scss */ + /* line 287, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt { right: auto; } - /* line 289, ../../../../general/res/sass/controls/_controls.scss */ + /* line 292, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar.indeterminate .progress-amt { width: 100% !important; } -/* line 295, ../../../../general/res/sass/controls/_controls.scss */ +/* line 298, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar { -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -2435,7 +2449,7 @@ label.checkbox.custom { -webkit-box-shadow: inset rgba(0, 0, 0, 0.3) 0 1px 4px; box-shadow: inset rgba(0, 0, 0, 0.3) 0 1px 4px; background: rgba(0, 0, 0, 0.1); } - /* line 299, ../../../../general/res/sass/controls/_controls.scss */ + /* line 302, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt { -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -2462,10 +2476,10 @@ label.checkbox.custom { -o-transition-delay: 0; -webkit-transition-delay: 0; transition-delay: 0; } - /* line 304, ../../../../general/res/sass/controls/_controls.scss */ + /* line 307, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt:before { background-color: #0a0; } - /* line 307, ../../../../general/res/sass/controls/_controls.scss */ + /* line 310, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt:after { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSI1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjMwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjI1Ii8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2473,7 +2487,7 @@ label.checkbox.custom { background-image: -moz-linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); background-image: linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); } - /* line 316, ../../../../general/res/sass/controls/_controls.scss */ + /* line 319, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar:not(.indeterminate) .progress-amt:before { -moz-animation: progress 0.4s linear infinite; -webkit-animation: progress 0.4s linear infinite; @@ -2486,7 +2500,7 @@ label.checkbox.custom { background-position: 0 center; background-repeat: repeat-x; background-size: 20px 40%; } - /* line 324, ../../../../general/res/sass/controls/_controls.scss */ + /* line 327, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar.indeterminate .progress-amt:before { -moz-animation: progress 0.6s linear infinite; -webkit-animation: progress 0.6s linear infinite; @@ -2498,12 +2512,12 @@ label.checkbox.custom { background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0) 100%); background-repeat: repeat; background-size: 20px 20px; } - /* line 329, ../../../../general/res/sass/controls/_controls.scss */ + /* line 332, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar.indeterminate .progress-amt:after { display: none; } /******************************************************** SLIDERS */ -/* line 337, ../../../../general/res/sass/controls/_controls.scss */ +/* line 340, ../../../../general/res/sass/controls/_controls.scss */ .slider .slot { width: auto; position: absolute; @@ -2511,7 +2525,7 @@ label.checkbox.custom { right: 0; bottom: 0; left: 0; } -/* line 345, ../../../../general/res/sass/controls/_controls.scss */ +/* line 348, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2537,10 +2551,10 @@ label.checkbox.custom { auto: 0; bottom: auto; left: auto; } - /* line 348, ../../../../general/res/sass/controls/_controls.scss */ + /* line 351, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob:hover { background-color: rgba(0, 153, 204, 0.7); } -/* line 359, ../../../../general/res/sass/controls/_controls.scss */ +/* line 362, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob-l { -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px; @@ -2549,7 +2563,7 @@ label.checkbox.custom { -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; cursor: w-resize; } -/* line 363, ../../../../general/res/sass/controls/_controls.scss */ +/* line 366, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob-r { -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px; @@ -2558,7 +2572,7 @@ label.checkbox.custom { -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; cursor: e-resize; } -/* line 367, ../../../../general/res/sass/controls/_controls.scss */ +/* line 370, ../../../../general/res/sass/controls/_controls.scss */ .slider .range { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2585,12 +2599,12 @@ label.checkbox.custom { left: auto; height: auto; width: auto; } - /* line 378, ../../../../general/res/sass/controls/_controls.scss */ + /* line 381, ../../../../general/res/sass/controls/_controls.scss */ .slider .range:hover { background-color: rgba(0, 153, 204, 0.4); } /******************************************************** DATETIME PICKER */ -/* line 385, ../../../../general/res/sass/controls/_controls.scss */ +/* line 388, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker { -moz-user-select: -moz-none; -ms-user-select: none; @@ -2599,65 +2613,65 @@ label.checkbox.custom { font-size: 0.8rem; padding: 10px !important; width: 230px; } - /* line 391, ../../../../general/res/sass/controls/_controls.scss */ + /* line 394, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager { height: 15px; margin-bottom: 5px; position: relative; } - /* line 400, ../../../../general/res/sass/controls/_controls.scss */ + /* line 403, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager { width: 20px; } - /* line 403, ../../../../general/res/sass/controls/_controls.scss */ + /* line 406, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.prev { right: auto; } - /* line 405, ../../../../general/res/sass/controls/_controls.scss */ + /* line 408, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.prev:before { content: "\3c"; } - /* line 409, ../../../../general/res/sass/controls/_controls.scss */ + /* line 412, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.next { left: auto; text-align: right; } - /* line 412, ../../../../general/res/sass/controls/_controls.scss */ + /* line 415, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.next:before { content: "\3e"; } - /* line 417, ../../../../general/res/sass/controls/_controls.scss */ + /* line 420, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .val { text-align: center; left: 25px; right: 25px; } - /* line 423, ../../../../general/res/sass/controls/_controls.scss */ + /* line 426, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-calendar, .l-datetime-picker .l-time-selects { border-top: 1px solid rgba(102, 102, 102, 0.2); } - /* line 427, ../../../../general/res/sass/controls/_controls.scss */ + /* line 430, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-time-selects { line-height: 22px; } /******************************************************** CALENDAR */ -/* line 435, ../../../../general/res/sass/controls/_controls.scss */ +/* line 438, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row { display: -webkit-flex; display: flex; -webkit-flex-flow: row nowrap; flex-flow: row nowrap; margin-top: 1px; } - /* line 439, ../../../../general/res/sass/controls/_controls.scss */ + /* line 442, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row:first-child { margin-top: 0; } - /* line 442, ../../../../general/res/sass/controls/_controls.scss */ + /* line 445, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row li { -webkit-flex: 1 0; flex: 1 0; margin-left: 1px; padding: 5px; text-align: center; } - /* line 447, ../../../../general/res/sass/controls/_controls.scss */ + /* line 450, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row li:first-child { margin-left: 0; } - /* line 451, ../../../../general/res/sass/controls/_controls.scss */ + /* line 454, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-header li { color: #999999; } - /* line 454, ../../../../general/res/sass/controls/_controls.scss */ + /* line 457, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li { -moz-transition-property: background-color; -o-transition-property: background-color; @@ -2676,31 +2690,31 @@ label.checkbox.custom { -webkit-transition-delay: 0; transition-delay: 0; cursor: pointer; } - /* line 457, ../../../../general/res/sass/controls/_controls.scss */ + /* line 460, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.in-month { background-color: #f2f2f2; } - /* line 460, ../../../../general/res/sass/controls/_controls.scss */ + /* line 463, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li .sub { color: #999999; font-size: 0.8em; } - /* line 464, ../../../../general/res/sass/controls/_controls.scss */ + /* line 467, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.selected { background: #1ac6ff; color: #fcfcfc; } - /* line 467, ../../../../general/res/sass/controls/_controls.scss */ + /* line 470, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.selected .sub { color: inherit; } - /* line 471, ../../../../general/res/sass/controls/_controls.scss */ + /* line 474, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li:hover { background-color: #0099cc; color: #fff; } - /* line 474, ../../../../general/res/sass/controls/_controls.scss */ + /* line 477, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li:hover .sub { color: inherit; } /******************************************************** BROWSER ELEMENTS */ @media only screen and (min-device-width: 1025px) and (-webkit-min-device-pixel-ratio: 1) { - /* line 485, ../../../../general/res/sass/controls/_controls.scss */ + /* line 488, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar { -moz-border-radius: 2px; -webkit-border-radius: 2px; @@ -2715,7 +2729,7 @@ label.checkbox.custom { height: 10px; width: 10px; } - /* line 494, ../../../../general/res/sass/controls/_controls.scss */ + /* line 497, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-thumb { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzg5ODk4OSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzdkN2Q3ZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2729,7 +2743,7 @@ label.checkbox.custom { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } - /* line 501, ../../../../general/res/sass/controls/_controls.scss */ + /* line 504, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-thumb:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwYWNlNiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwOTljYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2738,7 +2752,7 @@ label.checkbox.custom { background-image: -webkit-linear-gradient(#00ace6, #0099cc 20px); background-image: linear-gradient(#00ace6, #0099cc 20px); } - /* line 506, ../../../../general/res/sass/controls/_controls.scss */ + /* line 509, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-corner { background: rgba(0, 0, 0, 0.1); } } /***************************************************************************** @@ -4196,10 +4210,10 @@ textarea { .field-hints, .fields { } - - + + .field-hints { - + } */ } /* line 30, ../../../../general/res/sass/forms/_datetime.scss */ @@ -6292,18 +6306,18 @@ mct-representation.s-status-pending .t-object-label .t-item-icon:before { padding: 30%; width: 0; height: 0; } -/* line 55, ../../../../general/res/sass/_object-label.scss */ +/* line 51, ../../../../general/res/sass/_object-label.scss */ mct-representation.s-status-pending .t-object-label .t-item-icon .t-item-icon-glyph { display: none; } -/* line 59, ../../../../general/res/sass/_object-label.scss */ +/* line 55, ../../../../general/res/sass/_object-label.scss */ mct-representation.s-status-pending .t-object-label .t-title-label { font-style: italic; opacity: 0.6; } -/* line 66, ../../../../general/res/sass/_object-label.scss */ +/* line 62, ../../../../general/res/sass/_object-label.scss */ .selected mct-representation.s-status-pending .t-object-label .t-item-icon:before { - border-color: rgba(252, 252, 252, 0.25); - border-top-color: #fcfcfc; } + border-color: rgba(252, 252, 252, 0.25) !important; + border-top-color: #fcfcfc !important; } /***************************************************************************** * Open MCT Web, Copyright (c) 2014-2015, United States Government @@ -7209,7 +7223,7 @@ table { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } - /* line 274, ../../../../general/res/sass/plots/_plots-main.scss */ + /* line 276, ../../../../general/res/sass/plots/_plots-main.scss */ .gl-plot-tick.gl-plot-x-tick-label, .gl-plot-tick.tick-label-x, .tick-label.gl-plot-x-tick-label, .tick-label.tick-label-x { @@ -7220,7 +7234,7 @@ table { width: 20%; margin-left: -10%; text-align: center; } - /* line 284, ../../../../general/res/sass/plots/_plots-main.scss */ + /* line 286, ../../../../general/res/sass/plots/_plots-main.scss */ .gl-plot-tick.gl-plot-y-tick-label, .gl-plot-tick.tick-label-y, .tick-label.gl-plot-y-tick-label, .tick-label.tick-label-y { @@ -7230,18 +7244,18 @@ table { margin-bottom: -0.5em; text-align: right; } -/* line 295, ../../../../general/res/sass/plots/_plots-main.scss */ +/* line 297, ../../../../general/res/sass/plots/_plots-main.scss */ .gl-plot-tick.gl-plot-x-tick-label { top: 5px; } -/* line 298, ../../../../general/res/sass/plots/_plots-main.scss */ +/* line 300, ../../../../general/res/sass/plots/_plots-main.scss */ .gl-plot-tick.gl-plot-y-tick-label { right: 5px; left: 5px; } -/* line 305, ../../../../general/res/sass/plots/_plots-main.scss */ +/* line 307, ../../../../general/res/sass/plots/_plots-main.scss */ .tick-label.tick-label-x { top: 0; } -/* line 308, ../../../../general/res/sass/plots/_plots-main.scss */ +/* line 310, ../../../../general/res/sass/plots/_plots-main.scss */ .tick-label.tick-label-y { right: 0; left: 0; } diff --git a/platform/forms/res/templates/controls/radio.html b/platform/forms/res/templates/controls/radio.html new file mode 100644 index 0000000000..efc1443b76 --- /dev/null +++ b/platform/forms/res/templates/controls/radio.html @@ -0,0 +1,28 @@ + + From 8bb5a47b88734bf5e7213e33b768a0123d979630 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Tue, 2 Feb 2016 09:50:30 -0800 Subject: [PATCH 07/76] CSS updated to use new e619 character open #638 --- platform/commonUI/general/res/sass/controls/_controls.scss | 2 +- platform/commonUI/themes/espresso/res/css/theme-espresso.css | 2 +- platform/commonUI/themes/snow/res/css/theme-snow.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/commonUI/general/res/sass/controls/_controls.scss b/platform/commonUI/general/res/sass/controls/_controls.scss index 7148a5a054..415b612155 100644 --- a/platform/commonUI/general/res/sass/controls/_controls.scss +++ b/platform/commonUI/general/res/sass/controls/_controls.scss @@ -163,7 +163,7 @@ label.radio.custom { } label.checkbox.custom input:checked ~ em:before { content: "\32"; } -label.radio.custom input:checked ~ em:before { content: "\e607"; } +label.radio.custom input:checked ~ em:before { content: "\e619"; } .input-labeled { margin-left: $interiorMargin; diff --git a/platform/commonUI/themes/espresso/res/css/theme-espresso.css b/platform/commonUI/themes/espresso/res/css/theme-espresso.css index 0e5d922945..b936d7992e 100644 --- a/platform/commonUI/themes/espresso/res/css/theme-espresso.css +++ b/platform/commonUI/themes/espresso/res/css/theme-espresso.css @@ -2360,7 +2360,7 @@ label.checkbox.custom input:checked ~ em:before { /* line 166, ../../../../general/res/sass/controls/_controls.scss */ label.radio.custom input:checked ~ em:before { - content: "\e607"; } + content: "\e619"; } /* line 168, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled { diff --git a/platform/commonUI/themes/snow/res/css/theme-snow.css b/platform/commonUI/themes/snow/res/css/theme-snow.css index 0d475a1473..d9f35d4afe 100644 --- a/platform/commonUI/themes/snow/res/css/theme-snow.css +++ b/platform/commonUI/themes/snow/res/css/theme-snow.css @@ -2285,7 +2285,7 @@ label.checkbox.custom input:checked ~ em:before { /* line 166, ../../../../general/res/sass/controls/_controls.scss */ label.radio.custom input:checked ~ em:before { - content: "\e607"; } + content: "\e619"; } /* line 168, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled { From e3a0cae5fdd4a830a2198bbf04bafb9a1570b566 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 2 Feb 2016 17:11:39 -0800 Subject: [PATCH 08/76] [Plot] #638 Fleshing out form structures --- .../res/templates/plot-options-browse.html | 4 +- .../layout/src/PlotOptionsController.js | 123 ++++++++++++++++-- 2 files changed, 114 insertions(+), 13 deletions(-) diff --git a/platform/features/layout/res/templates/plot-options-browse.html b/platform/features/layout/res/templates/plot-options-browse.html index 693ad633e4..a02f7926af 100644 --- a/platform/features/layout/res/templates/plot-options-browse.html +++ b/platform/features/layout/res/templates/plot-options-browse.html @@ -30,8 +30,8 @@ Date: Tue, 2 Feb 2016 10:30:40 -0800 Subject: [PATCH 09/76] [Frontend] Fixes to scrolling and layout in Inspector open #638 In progress; --- .../browse/res/templates/browse/object-properties.html | 3 +-- platform/commonUI/general/res/sass/_inspector.scss | 2 +- .../commonUI/general/res/templates/object-inspector.html | 6 ++++-- .../commonUI/themes/espresso/res/css/theme-espresso.css | 2 +- platform/commonUI/themes/snow/res/css/theme-snow.css | 2 +- .../features/layout/res/templates/plot-options-browse.html | 6 +++--- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/platform/commonUI/browse/res/templates/browse/object-properties.html b/platform/commonUI/browse/res/templates/browse/object-properties.html index 149da6b874..8a837160c6 100644 --- a/platform/commonUI/browse/res/templates/browse/object-properties.html +++ b/platform/commonUI/browse/res/templates/browse/object-properties.html @@ -20,8 +20,7 @@ at runtime from the About dialog for additional information. -->
-
Inspection
-
    +
    • Properties
      -
      +
      +
      Inspection
      + ng-model="ngModel" + class="flex-elem grows vscroll l-flex-col">
      diff --git a/platform/commonUI/themes/espresso/res/css/theme-espresso.css b/platform/commonUI/themes/espresso/res/css/theme-espresso.css index b936d7992e..442815713f 100644 --- a/platform/commonUI/themes/espresso/res/css/theme-espresso.css +++ b/platform/commonUI/themes/espresso/res/css/theme-espresso.css @@ -1486,7 +1486,7 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { min-height: 20%; max-height: 80%; } /* line 60, ../../../../general/res/sass/_inspector.scss */ - .l-inspect ul { + .l-inspect .l-inspector-part { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; diff --git a/platform/commonUI/themes/snow/res/css/theme-snow.css b/platform/commonUI/themes/snow/res/css/theme-snow.css index d9f35d4afe..1df8fd1c07 100644 --- a/platform/commonUI/themes/snow/res/css/theme-snow.css +++ b/platform/commonUI/themes/snow/res/css/theme-snow.css @@ -1467,7 +1467,7 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { min-height: 20%; max-height: 80%; } /* line 60, ../../../../general/res/sass/_inspector.scss */ - .l-inspect ul { + .l-inspect .l-inspector-part { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; diff --git a/platform/features/layout/res/templates/plot-options-browse.html b/platform/features/layout/res/templates/plot-options-browse.html index a02f7926af..82ed27622a 100644 --- a/platform/features/layout/res/templates/plot-options-browse.html +++ b/platform/features/layout/res/templates/plot-options-browse.html @@ -1,4 +1,4 @@ ---> - -
      +
      Display
          From 68f3cd087df7b97a23c6411a165cc2bba2ab3b57 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Tue, 2 Feb 2016 13:48:17 -0800 Subject: [PATCH 10/76] [Frontend] Mods in progress to form layout open #638 In progress; --- .../features/layout/res/templates/plot-options-browse.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/features/layout/res/templates/plot-options-browse.html b/platform/features/layout/res/templates/plot-options-browse.html index 82ed27622a..a9c952eb8f 100644 --- a/platform/features/layout/res/templates/plot-options-browse.html +++ b/platform/features/layout/res/templates/plot-options-browse.html @@ -22,7 +22,7 @@ -->
          - Display + Display
            • @@ -41,13 +41,13 @@ -
              +
              + class="flex-elem l-flex-row">
              From 371669fbceb1c3489fddb48d9f7057518f960396 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Tue, 2 Feb 2016 15:36:43 -0800 Subject: [PATCH 11/76] [Frontend] Mods in progress to form layout open #638 Major progress on form-row markup and CSS when in Inspector 'part' context; General fixes cleanups to custom checkbox/radio CSS; --- .../templates/browse/object-properties.html | 6 +- .../commonUI/general/res/sass/_inspector.scss | 12 +- .../general/res/sass/controls/_controls.scss | 13 +- .../general/res/sass/forms/_elems.scss | 46 ++++-- .../res/templates/object-inspector.html | 2 +- .../espresso/res/css/theme-espresso.css | 139 +++++++++++------- .../themes/snow/res/css/theme-snow.css | 139 +++++++++++------- .../res/templates/plot-options-browse.html | 60 ++++---- platform/forms/res/templates/form.html | 12 +- 9 files changed, 264 insertions(+), 165 deletions(-) diff --git a/platform/commonUI/browse/res/templates/browse/object-properties.html b/platform/commonUI/browse/res/templates/browse/object-properties.html index 8a837160c6..9e9e21079e 100644 --- a/platform/commonUI/browse/res/templates/browse/object-properties.html +++ b/platform/commonUI/browse/res/templates/browse/object-properties.html @@ -22,7 +22,7 @@
              • - Properties + Properties
                @@ -31,7 +31,7 @@
              • - Location + Location @@ -44,7 +44,7 @@
              • - Original Location + Original Location diff --git a/platform/commonUI/general/res/sass/_inspector.scss b/platform/commonUI/general/res/sass/_inspector.scss index 75013dd185..a59c532df4 100644 --- a/platform/commonUI/general/res/sass/_inspector.scss +++ b/platform/commonUI/general/res/sass/_inspector.scss @@ -60,10 +60,18 @@ .l-inspector-part { @include box-sizing(border-box); padding-right: $interiorMargin; + .form { + margin-left: $treeVCW + $interiorMarginLg; + .form-row { + @include align-items(center); + border: none; + padding: 0; + } + } } ul li, - em { + em.t-inspector-part-header { display: block; position: relative; } @@ -72,7 +80,7 @@ margin-bottom: $interiorMarginLg; } - em { + em.t-inspector-part-header { @include border-radius($basicCr); background-color: $colorInspectorSectionHeaderBg; color: $colorInspectorSectionHeaderFg; diff --git a/platform/commonUI/general/res/sass/controls/_controls.scss b/platform/commonUI/general/res/sass/controls/_controls.scss index 415b612155..61fd350d96 100644 --- a/platform/commonUI/general/res/sass/controls/_controls.scss +++ b/platform/commonUI/general/res/sass/controls/_controls.scss @@ -115,26 +115,25 @@ label.radio.custom { $d: $formRowCtrlsH; cursor: pointer; display: inline-block; - line-height: $d; + //line-height: $d; margin-right: $interiorMargin * 4; padding-left: $d + $interiorMargin; position: relative; - vertical-align: middle; // was top + //vertical-align: middle; // was top em { color: $colorBodyFg; display: inline-block; height: $d; - min-width: $d; + width: $d; &:before { @include border-radius($basicCr * .75); background: $bg; @include box-shadow(inset rgba(black, 0.4) 0 1px 2px); box-sizing: border-box; - content: " "; + content: ""; font-family: 'symbolsfont'; font-size: 0.8em; display: inline-block; - margin-right: $interiorMargin; height: $d; width: $d; left: 0; @@ -336,7 +335,7 @@ label.radio.custom input:checked ~ em:before { content: "\e619"; } /******************************************************** SLIDERS */ .slider { - $knobH: 100%; //14px; + $knobH: 100%; .slot { width: auto; position: absolute; @@ -372,7 +371,7 @@ label.radio.custom input:checked ~ em:before { content: "\e619"; } background-color: $sliderColorRange; cursor: ew-resize; position: absolute; - top: 0; //$tbOffset; + top: 0; right: auto; bottom: 0; left: auto; diff --git a/platform/commonUI/general/res/sass/forms/_elems.scss b/platform/commonUI/general/res/sass/forms/_elems.scss index 2e7f87ef9a..ace8d91cee 100644 --- a/platform/commonUI/general/res/sass/forms/_elems.scss +++ b/platform/commonUI/general/res/sass/forms/_elems.scss @@ -23,7 +23,6 @@ @include border-radius($basicCr); background: $colorFormSectionHeader; $c: lighten($colorBodyFg, 20%); - //border-bottom: 1px solid rgba(#fff, 0.3); color: $c; font-size: 0.8em; padding: $formTBPad $formLRPad; @@ -32,6 +31,7 @@ .form { color: $colorFormText; + width: 100%; .form-section { position: relative; margin-bottom: $interiorMarginLg * 2; @@ -60,28 +60,24 @@ >.label { // Only style this way for immediate children of .form-row; prevents problems when .label is used in .controls section of a form - //@include test(orange, 0.05); - float: left; min-width: 120px; + order: 1; position: relative; white-space: nowrap; width: $formLabelW; } .value { - color: $colorInputFg; //lighten($colorBodyFg, 20%); + color: $colorInputFg; } .controls { - float: left; + order: 2; position: relative; - width: 99.9% - $formLabelW; // Start with less than 100% for Firefox + @include flex(1 1 auto); .l-composite-control { -// display: inline-block; &.l-checkbox { -// @include test(); -// height: $formRowCtrlsH; display: inline-block; line-height: $formRowCtrlsH; margin-right: 5px; @@ -115,7 +111,6 @@ $h: 150px; position: relative; height: $h; -// max-width: 50%; >.wrapper { $p: $interiorMargin; overflow: auto; @@ -129,6 +124,37 @@ } } +.l-controls-first { + .form .form-row { + margin-top: $interiorMarginSm; + >.label, + >.controls { + line-height: inherit; + min-height: inherit;; + } + >.label { + @include flex(1 1 auto); + min-width: 0; + width: auto; + order: 2; + } + >.controls { + @include flex(0 0 auto); + margin-right: $interiorMargin; + order: 1; + } + } +} + +.no-validate { + .form .form-row >.label { + padding-right: 0; + &:after { + display: none; + } + } +} + label.form-control.checkbox { input { margin-right: $interiorMargin; diff --git a/platform/commonUI/general/res/templates/object-inspector.html b/platform/commonUI/general/res/templates/object-inspector.html index 813f244b47..56eaeb86cc 100644 --- a/platform/commonUI/general/res/templates/object-inspector.html +++ b/platform/commonUI/general/res/templates/object-inspector.html @@ -36,7 +36,7 @@
                - Elements + Elements .label, .form .form-row > .controls { -moz-box-sizing: border-box; @@ -3978,42 +3985,43 @@ mct-include.l-time-controller { font-size: 0.8rem; line-height: 22px; min-height: 22px; } - /* line 61, ../../../../general/res/sass/forms/_elems.scss */ + /* line 62, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row > .label { - float: left; min-width: 120px; + order: 1; position: relative; white-space: nowrap; width: 30%; } - /* line 71, ../../../../general/res/sass/forms/_elems.scss */ + /* line 73, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .value { color: #cccccc; } - /* line 75, ../../../../general/res/sass/forms/_elems.scss */ + /* line 77, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls { - float: left; + order: 2; position: relative; - width: 69.9%; } - /* line 82, ../../../../general/res/sass/forms/_elems.scss */ + -webkit-flex: 1 1 auto; + flex: 1 1 auto; } + /* line 85, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-composite-control.l-checkbox { display: inline-block; line-height: 14px; margin-right: 5px; } - /* line 91, ../../../../general/res/sass/forms/_elems.scss */ + /* line 93, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-med input[type="text"] { width: 200px; } - /* line 95, ../../../../general/res/sass/forms/_elems.scss */ + /* line 97, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-small input[type="text"] { width: 50px; } - /* line 99, ../../../../general/res/sass/forms/_elems.scss */ + /* line 101, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-numeric input[type="text"] { text-align: right; } - /* line 103, ../../../../general/res/sass/forms/_elems.scss */ + /* line 105, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .select { margin-right: 5px; } - /* line 108, ../../../../general/res/sass/forms/_elems.scss */ + /* line 110, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .field-hints { color: #666666; } - /* line 112, ../../../../general/res/sass/forms/_elems.scss */ + /* line 114, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .selector-list { -moz-appearance: none; -webkit-appearance: none; @@ -4036,7 +4044,7 @@ mct-include.l-time-controller { /* line 327, ../../../../general/res/sass/_mixins.scss */ .form .form-row .selector-list.error { background: rgba(255, 0, 0, 0.5); } - /* line 119, ../../../../general/res/sass/forms/_elems.scss */ + /* line 121, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .selector-list > .wrapper { overflow: auto; position: absolute; @@ -4045,24 +4053,53 @@ mct-include.l-time-controller { bottom: 5px; left: 5px; } -/* line 133, ../../../../general/res/sass/forms/_elems.scss */ +/* line 135, ../../../../general/res/sass/forms/_elems.scss */ +.l-controls-first .form .form-row { + margin-top: 3px; } + /* line 138, ../../../../general/res/sass/forms/_elems.scss */ + .l-controls-first .form .form-row > .label, + .l-controls-first .form .form-row > .controls { + line-height: inherit; + min-height: inherit; } + /* line 143, ../../../../general/res/sass/forms/_elems.scss */ + .l-controls-first .form .form-row > .label { + -webkit-flex: 1 1 auto; + flex: 1 1 auto; + min-width: 0; + width: auto; + order: 2; } + /* line 149, ../../../../general/res/sass/forms/_elems.scss */ + .l-controls-first .form .form-row > .controls { + -webkit-flex: 0 0 auto; + flex: 0 0 auto; + margin-right: 5px; + order: 1; } + +/* line 158, ../../../../general/res/sass/forms/_elems.scss */ +.no-validate .form .form-row > .label { + padding-right: 0; } + /* line 160, ../../../../general/res/sass/forms/_elems.scss */ + .no-validate .form .form-row > .label:after { + display: none; } + +/* line 167, ../../../../general/res/sass/forms/_elems.scss */ label.form-control.checkbox input { margin-right: 5px; vertical-align: top; } -/* line 139, ../../../../general/res/sass/forms/_elems.scss */ +/* line 173, ../../../../general/res/sass/forms/_elems.scss */ .hint, .s-hint { font-size: 0.9em; } -/* line 144, ../../../../general/res/sass/forms/_elems.scss */ +/* line 178, ../../../../general/res/sass/forms/_elems.scss */ .l-result { display: inline-block; min-width: 32px; min-height: 32px; position: relative; vertical-align: top; } - /* line 151, ../../../../general/res/sass/forms/_elems.scss */ + /* line 185, ../../../../general/res/sass/forms/_elems.scss */ .l-result div.s-hint { -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -4072,7 +4109,7 @@ label.form-control.checkbox input { color: #ffad99; padding: 5px; } -/* line 160, ../../../../general/res/sass/forms/_elems.scss */ +/* line 194, ../../../../general/res/sass/forms/_elems.scss */ input[type="text"], input[type="search"] { -moz-appearance: none; @@ -4095,12 +4132,12 @@ input[type="search"] { input[type="text"].error, input[type="search"].error { background: rgba(255, 0, 0, 0.5); } - /* line 163, ../../../../general/res/sass/forms/_elems.scss */ + /* line 197, ../../../../general/res/sass/forms/_elems.scss */ input[type="text"].numeric, input[type="search"].numeric { text-align: right; } -/* line 168, ../../../../general/res/sass/forms/_elems.scss */ +/* line 202, ../../../../general/res/sass/forms/_elems.scss */ textarea { -moz-appearance: none; -webkit-appearance: none; diff --git a/platform/commonUI/themes/snow/res/css/theme-snow.css b/platform/commonUI/themes/snow/res/css/theme-snow.css index 1df8fd1c07..d252032321 100644 --- a/platform/commonUI/themes/snow/res/css/theme-snow.css +++ b/platform/commonUI/themes/snow/res/css/theme-snow.css @@ -1472,16 +1472,25 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { -webkit-box-sizing: border-box; box-sizing: border-box; padding-right: 5px; } - /* line 65, ../../../../general/res/sass/_inspector.scss */ + /* line 63, ../../../../general/res/sass/_inspector.scss */ + .l-inspect .l-inspector-part .form { + margin-left: 20px; } + /* line 65, ../../../../general/res/sass/_inspector.scss */ + .l-inspect .l-inspector-part .form .form-row { + -webkit-align-items: center; + align-items: center; + border: none; + padding: 0; } + /* line 73, ../../../../general/res/sass/_inspector.scss */ .l-inspect ul li, - .l-inspect em { + .l-inspect em.t-inspector-part-header { display: block; position: relative; } - /* line 71, ../../../../general/res/sass/_inspector.scss */ + /* line 79, ../../../../general/res/sass/_inspector.scss */ .l-inspect ul li { margin-bottom: 10px; } - /* line 75, ../../../../general/res/sass/_inspector.scss */ - .l-inspect em { + /* line 83, ../../../../general/res/sass/_inspector.scss */ + .l-inspect em.t-inspector-part-header { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; @@ -1490,21 +1499,21 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { margin-bottom: 5px; padding: 5px 5px; text-transform: uppercase; } - /* line 84, ../../../../general/res/sass/_inspector.scss */ + /* line 92, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties { padding: 3px 0; } - /* line 85, ../../../../general/res/sass/_inspector.scss */ + /* line 93, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties:not(.first) { border-top: 1px solid #e3e3e3; } - /* line 89, ../../../../general/res/sass/_inspector.scss */ + /* line 97, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties .label { color: #999999; text-transform: uppercase; } - /* line 93, ../../../../general/res/sass/_inspector.scss */ + /* line 101, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties .value { color: #404040; word-break: break-all; } - /* line 100, ../../../../general/res/sass/_inspector.scss */ + /* line 108, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -1514,18 +1523,18 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { line-height: 1.2em; position: relative; padding: 2px 4px; } - /* line 109, ../../../../general/res/sass/_inspector.scss */ + /* line 117, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item .t-object-label .t-item-icon { height: 1.2em; width: 0.7rem; } - /* line 114, ../../../../general/res/sass/_inspector.scss */ + /* line 122, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item:hover { background: rgba(102, 102, 102, 0.1); color: #333333; } - /* line 117, ../../../../general/res/sass/_inspector.scss */ + /* line 125, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item:hover .icon, .l-inspect .inspector-location .location-item:hover .t-item-icon { color: #0099cc; } - /* line 122, ../../../../general/res/sass/_inspector.scss */ + /* line 130, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location:not(.last) .t-object-label .t-title-label:after { color: #8c8c8c; content: '\3e'; @@ -1536,15 +1545,15 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { line-height: inherit; margin-left: 3px; width: 4px; } - /* line 135, ../../../../general/res/sass/_inspector.scss */ + /* line 143, ../../../../general/res/sass/_inspector.scss */ .l-inspect .holder-elements .current-elements { position: relative; } - /* line 138, ../../../../general/res/sass/_inspector.scss */ + /* line 146, ../../../../general/res/sass/_inspector.scss */ .l-inspect .holder-elements .current-elements .tree-item .t-object-label { font-size: 0.75rem; left: 0; } -/* line 149, ../../../../general/res/sass/_inspector.scss */ +/* line 157, ../../../../general/res/sass/_inspector.scss */ .l-inspect .splitter-inspect-panel, .l-inspect .split-pane-component.pane.bottom { -moz-transition-property: opacity; @@ -1566,10 +1575,10 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { opacity: 0; pointer-events: none; } -/* line 158, ../../../../general/res/sass/_inspector.scss */ +/* line 166, ../../../../general/res/sass/_inspector.scss */ .s-status-editing .l-inspect .location-item { pointer-events: none; } -/* line 159, ../../../../general/res/sass/_inspector.scss */ +/* line 167, ../../../../general/res/sass/_inspector.scss */ .s-status-editing .l-inspect .splitter-inspect-panel, .s-status-editing .l-inspect .split-pane-component.pane.bottom { opacity: 1; @@ -2223,18 +2232,16 @@ label.checkbox.custom, label.radio.custom { cursor: pointer; display: inline-block; - line-height: 14px; margin-right: 20px; padding-left: 19px; - position: relative; - vertical-align: middle; } + position: relative; } /* line 123, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom em, label.radio.custom em { color: #666; display: inline-block; height: 14px; - min-width: 14px; } + width: 14px; } /* line 128, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom em:before, label.radio.custom em:before { @@ -2246,11 +2253,10 @@ label.radio.custom { -webkit-box-shadow: inset rgba(0, 0, 0, 0.4) 0 1px 2px; box-shadow: inset rgba(0, 0, 0, 0.4) 0 1px 2px; box-sizing: border-box; - content: " "; + content: ""; font-family: 'symbolsfont'; font-size: 0.8em; display: inline-block; - margin-right: 5px; height: 14px; width: 14px; left: 0; @@ -3867,12 +3873,13 @@ mct-include.l-time-controller { /* line 33, ../../../../general/res/sass/forms/_elems.scss */ .form { - color: gray; } - /* line 35, ../../../../general/res/sass/forms/_elems.scss */ + color: gray; + width: 100%; } + /* line 36, ../../../../general/res/sass/forms/_elems.scss */ .form .form-section { position: relative; margin-bottom: 20px; } - /* line 40, ../../../../general/res/sass/forms/_elems.scss */ + /* line 41, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -3883,10 +3890,10 @@ mct-include.l-time-controller { margin-top: 5px; padding: 5px 0; position: relative; } - /* line 48, ../../../../general/res/sass/forms/_elems.scss */ + /* line 49, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row.first { border-top: none; } - /* line 52, ../../../../general/res/sass/forms/_elems.scss */ + /* line 53, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row > .label, .form .form-row > .controls { -moz-box-sizing: border-box; @@ -3897,42 +3904,43 @@ mct-include.l-time-controller { font-size: 0.8rem; line-height: 22px; min-height: 22px; } - /* line 61, ../../../../general/res/sass/forms/_elems.scss */ + /* line 62, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row > .label { - float: left; min-width: 120px; + order: 1; position: relative; white-space: nowrap; width: 30%; } - /* line 71, ../../../../general/res/sass/forms/_elems.scss */ + /* line 73, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .value { color: #666; } - /* line 75, ../../../../general/res/sass/forms/_elems.scss */ + /* line 77, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls { - float: left; + order: 2; position: relative; - width: 69.9%; } - /* line 82, ../../../../general/res/sass/forms/_elems.scss */ + -webkit-flex: 1 1 auto; + flex: 1 1 auto; } + /* line 85, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-composite-control.l-checkbox { display: inline-block; line-height: 14px; margin-right: 5px; } - /* line 91, ../../../../general/res/sass/forms/_elems.scss */ + /* line 93, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-med input[type="text"] { width: 200px; } - /* line 95, ../../../../general/res/sass/forms/_elems.scss */ + /* line 97, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-small input[type="text"] { width: 50px; } - /* line 99, ../../../../general/res/sass/forms/_elems.scss */ + /* line 101, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-numeric input[type="text"] { text-align: right; } - /* line 103, ../../../../general/res/sass/forms/_elems.scss */ + /* line 105, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .select { margin-right: 5px; } - /* line 108, ../../../../general/res/sass/forms/_elems.scss */ + /* line 110, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .field-hints { color: #333333; } - /* line 112, ../../../../general/res/sass/forms/_elems.scss */ + /* line 114, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .selector-list { -moz-appearance: none; -webkit-appearance: none; @@ -3955,7 +3963,7 @@ mct-include.l-time-controller { /* line 327, ../../../../general/res/sass/_mixins.scss */ .form .form-row .selector-list.error { background: rgba(255, 0, 0, 0.5); } - /* line 119, ../../../../general/res/sass/forms/_elems.scss */ + /* line 121, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .selector-list > .wrapper { overflow: auto; position: absolute; @@ -3964,24 +3972,53 @@ mct-include.l-time-controller { bottom: 5px; left: 5px; } -/* line 133, ../../../../general/res/sass/forms/_elems.scss */ +/* line 135, ../../../../general/res/sass/forms/_elems.scss */ +.l-controls-first .form .form-row { + margin-top: 3px; } + /* line 138, ../../../../general/res/sass/forms/_elems.scss */ + .l-controls-first .form .form-row > .label, + .l-controls-first .form .form-row > .controls { + line-height: inherit; + min-height: inherit; } + /* line 143, ../../../../general/res/sass/forms/_elems.scss */ + .l-controls-first .form .form-row > .label { + -webkit-flex: 1 1 auto; + flex: 1 1 auto; + min-width: 0; + width: auto; + order: 2; } + /* line 149, ../../../../general/res/sass/forms/_elems.scss */ + .l-controls-first .form .form-row > .controls { + -webkit-flex: 0 0 auto; + flex: 0 0 auto; + margin-right: 5px; + order: 1; } + +/* line 158, ../../../../general/res/sass/forms/_elems.scss */ +.no-validate .form .form-row > .label { + padding-right: 0; } + /* line 160, ../../../../general/res/sass/forms/_elems.scss */ + .no-validate .form .form-row > .label:after { + display: none; } + +/* line 167, ../../../../general/res/sass/forms/_elems.scss */ label.form-control.checkbox input { margin-right: 5px; vertical-align: top; } -/* line 139, ../../../../general/res/sass/forms/_elems.scss */ +/* line 173, ../../../../general/res/sass/forms/_elems.scss */ .hint, .s-hint { font-size: 0.9em; } -/* line 144, ../../../../general/res/sass/forms/_elems.scss */ +/* line 178, ../../../../general/res/sass/forms/_elems.scss */ .l-result { display: inline-block; min-width: 32px; min-height: 32px; position: relative; vertical-align: top; } - /* line 151, ../../../../general/res/sass/forms/_elems.scss */ + /* line 185, ../../../../general/res/sass/forms/_elems.scss */ .l-result div.s-hint { -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -3991,7 +4028,7 @@ label.form-control.checkbox input { color: #ffa799; padding: 5px; } -/* line 160, ../../../../general/res/sass/forms/_elems.scss */ +/* line 194, ../../../../general/res/sass/forms/_elems.scss */ input[type="text"], input[type="search"] { -moz-appearance: none; @@ -4014,12 +4051,12 @@ input[type="search"] { input[type="text"].error, input[type="search"].error { background: rgba(255, 0, 0, 0.5); } - /* line 163, ../../../../general/res/sass/forms/_elems.scss */ + /* line 197, ../../../../general/res/sass/forms/_elems.scss */ input[type="text"].numeric, input[type="search"].numeric { text-align: right; } -/* line 168, ../../../../general/res/sass/forms/_elems.scss */ +/* line 202, ../../../../general/res/sass/forms/_elems.scss */ textarea { -moz-appearance: none; -webkit-appearance: none; diff --git a/platform/features/layout/res/templates/plot-options-browse.html b/platform/features/layout/res/templates/plot-options-browse.html index a9c952eb8f..1ab2799a83 100644 --- a/platform/features/layout/res/templates/plot-options-browse.html +++ b/platform/features/layout/res/templates/plot-options-browse.html @@ -1,28 +1,26 @@ - +
                - Display + Display
                  • @@ -41,15 +39,13 @@ -
                    - - -
                    + +
                  diff --git a/platform/forms/res/templates/form.html b/platform/forms/res/templates/form.html index b4181384fd..809a43fb0e 100644 --- a/platform/forms/res/templates/form.html +++ b/platform/forms/res/templates/form.html @@ -19,16 +19,14 @@ this source code distribution or the Licensing information page available at runtime from the About dialog for additional information. --> -
                  - -
                  +
                  {{section.name}}
                  -
                  -
                  +
                  {{row.name}} i
                  -
                  +
                  -
                  - \ No newline at end of file From f2903f4030eaee62878d9995f6b9a40be91f9a16 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Tue, 2 Feb 2016 16:41:48 -0800 Subject: [PATCH 12/76] [Frontend] Final styling on properties form in Inspector open #638 Added custom radio button control and modified PlotOptionsController / plotOptionsStructure accordingly; spacing, borders, etc. are all as finally intended; --- .../commonUI/general/res/sass/_inspector.scss | 35 ++- .../general/res/sass/controls/_controls.scss | 5 +- .../espresso/res/css/theme-espresso.css | 277 +++++++++--------- .../themes/snow/res/css/theme-snow.css | 277 +++++++++--------- platform/forms/bundle.js | 4 + platform/forms/res/templates/form.html | 7 +- 6 files changed, 320 insertions(+), 285 deletions(-) diff --git a/platform/commonUI/general/res/sass/_inspector.scss b/platform/commonUI/general/res/sass/_inspector.scss index a59c532df4..533a55413e 100644 --- a/platform/commonUI/general/res/sass/_inspector.scss +++ b/platform/commonUI/general/res/sass/_inspector.scss @@ -32,14 +32,16 @@ color: $colorInspectorFg; line-height: 140%; - .flex-elem.holder:not(:last-child) { margin-bottom: $interiorMargin; } + .flex-elem.holder:not(:last-child) { + margin-bottom: $interiorMargin; + } .pane-header { color: pushBack($colorInspectorFg, 20%); font-size: 0.8rem; &:before { color: pushBack($colorInspectorFg, 10%); - content:'\e615'; // e615 Crosshair symbol + content: '\e615'; // e615 Crosshair symbol display: inline; font-family: symbolsfont; margin-right: $interiorMargin; @@ -56,16 +58,23 @@ } } } - + .l-inspector-part { @include box-sizing(border-box); padding-right: $interiorMargin; .form { margin-left: $treeVCW + $interiorMarginLg; - .form-row { - @include align-items(center); - border: none; - padding: 0; + margin-bottom: $interiorMarginLg; + .form-section { + margin-bottom: 0; + &:not(.first) { + border-top: 1px solid $colorFormLines; + } + .form-row { + @include align-items(center); + border: none; + padding: 0; + } } } } @@ -79,7 +88,7 @@ ul li { margin-bottom: $interiorMarginLg; } - + em.t-inspector-part-header { @include border-radius($basicCr); background-color: $colorInspectorSectionHeaderBg; @@ -162,8 +171,16 @@ } } +mct-representation:not(.s-status-editing) .l-inspect { + .split-pane-component.pane.top { + bottom: 0 !important; + } +} + .s-status-editing .l-inspect { - .location-item { pointer-events: none; } + .location-item { + pointer-events: none; + } .splitter-inspect-panel, .split-pane-component.pane.bottom { opacity: 1; diff --git a/platform/commonUI/general/res/sass/controls/_controls.scss b/platform/commonUI/general/res/sass/controls/_controls.scss index 61fd350d96..3089cb6b67 100644 --- a/platform/commonUI/general/res/sass/controls/_controls.scss +++ b/platform/commonUI/general/res/sass/controls/_controls.scss @@ -83,7 +83,6 @@ .l-control-group { // Buttons that have a conceptual grouping - internal space between, and a divider between groups. - // @include test(); @include box-sizing(border-box); border-left: 1px solid $colorInteriorBorder; display: inline-block; @@ -115,11 +114,9 @@ label.radio.custom { $d: $formRowCtrlsH; cursor: pointer; display: inline-block; - //line-height: $d; margin-right: $interiorMargin * 4; padding-left: $d + $interiorMargin; position: relative; - //vertical-align: middle; // was top em { color: $colorBodyFg; display: inline-block; @@ -132,7 +129,7 @@ label.radio.custom { box-sizing: border-box; content: ""; font-family: 'symbolsfont'; - font-size: 0.8em; + font-size: 0.7em; display: inline-block; height: $d; width: $d; diff --git a/platform/commonUI/themes/espresso/res/css/theme-espresso.css b/platform/commonUI/themes/espresso/res/css/theme-espresso.css index eeeada1c6b..fd52e541d0 100644 --- a/platform/commonUI/themes/espresso/res/css/theme-espresso.css +++ b/platform/commonUI/themes/espresso/res/css/theme-espresso.css @@ -1468,11 +1468,11 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { /* line 35, ../../../../general/res/sass/_inspector.scss */ .l-inspect .flex-elem.holder:not(:last-child) { margin-bottom: 5px; } - /* line 37, ../../../../general/res/sass/_inspector.scss */ + /* line 39, ../../../../general/res/sass/_inspector.scss */ .l-inspect .pane-header { color: #666666; font-size: 0.8rem; } - /* line 40, ../../../../general/res/sass/_inspector.scss */ + /* line 42, ../../../../general/res/sass/_inspector.scss */ .l-inspect .pane-header:before { color: gray; content: '\e615'; @@ -1480,35 +1480,42 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { font-family: symbolsfont; margin-right: 5px; vertical-align: bottom; } - /* line 52, ../../../../general/res/sass/_inspector.scss */ + /* line 54, ../../../../general/res/sass/_inspector.scss */ .l-inspect .split-layout .split-pane-component.pane.bottom { height: 30%; min-height: 20%; max-height: 80%; } - /* line 60, ../../../../general/res/sass/_inspector.scss */ + /* line 62, ../../../../general/res/sass/_inspector.scss */ .l-inspect .l-inspector-part { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; padding-right: 5px; } - /* line 63, ../../../../general/res/sass/_inspector.scss */ + /* line 65, ../../../../general/res/sass/_inspector.scss */ .l-inspect .l-inspector-part .form { - margin-left: 20px; } - /* line 65, ../../../../general/res/sass/_inspector.scss */ - .l-inspect .l-inspector-part .form .form-row { - -webkit-align-items: center; - align-items: center; - border: none; - padding: 0; } - /* line 73, ../../../../general/res/sass/_inspector.scss */ + margin-left: 20px; + margin-bottom: 10px; } + /* line 68, ../../../../general/res/sass/_inspector.scss */ + .l-inspect .l-inspector-part .form .form-section { + margin-bottom: 0; } + /* line 70, ../../../../general/res/sass/_inspector.scss */ + .l-inspect .l-inspector-part .form .form-section:not(.first) { + border-top: 1px solid rgba(255, 255, 255, 0.1); } + /* line 73, ../../../../general/res/sass/_inspector.scss */ + .l-inspect .l-inspector-part .form .form-section .form-row { + -webkit-align-items: center; + align-items: center; + border: none; + padding: 0; } + /* line 82, ../../../../general/res/sass/_inspector.scss */ .l-inspect ul li, .l-inspect em.t-inspector-part-header { display: block; position: relative; } - /* line 79, ../../../../general/res/sass/_inspector.scss */ + /* line 88, ../../../../general/res/sass/_inspector.scss */ .l-inspect ul li { margin-bottom: 10px; } - /* line 83, ../../../../general/res/sass/_inspector.scss */ + /* line 92, ../../../../general/res/sass/_inspector.scss */ .l-inspect em.t-inspector-part-header { -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -1518,21 +1525,21 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { margin-bottom: 5px; padding: 5px 5px; text-transform: uppercase; } - /* line 92, ../../../../general/res/sass/_inspector.scss */ + /* line 101, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties { padding: 3px 0; } - /* line 93, ../../../../general/res/sass/_inspector.scss */ + /* line 102, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties:not(.first) { border-top: 1px solid rgba(255, 255, 255, 0.1); } - /* line 97, ../../../../general/res/sass/_inspector.scss */ + /* line 106, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties .label { color: #737373; text-transform: uppercase; } - /* line 101, ../../../../general/res/sass/_inspector.scss */ + /* line 110, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties .value { color: #bfbfbf; word-break: break-all; } - /* line 108, ../../../../general/res/sass/_inspector.scss */ + /* line 117, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -1542,18 +1549,18 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { line-height: 1.2em; position: relative; padding: 2px 4px; } - /* line 117, ../../../../general/res/sass/_inspector.scss */ + /* line 126, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item .t-object-label .t-item-icon { height: 1.2em; width: 0.7rem; } - /* line 122, ../../../../general/res/sass/_inspector.scss */ + /* line 131, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item:hover { background: rgba(153, 153, 153, 0.1); color: #cccccc; } - /* line 125, ../../../../general/res/sass/_inspector.scss */ + /* line 134, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item:hover .icon, .l-inspect .inspector-location .location-item:hover .t-item-icon { color: #33ccff; } - /* line 130, ../../../../general/res/sass/_inspector.scss */ + /* line 139, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location:not(.last) .t-object-label .t-title-label:after { color: #737373; content: '\3e'; @@ -1564,15 +1571,15 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { line-height: inherit; margin-left: 3px; width: 4px; } - /* line 143, ../../../../general/res/sass/_inspector.scss */ + /* line 152, ../../../../general/res/sass/_inspector.scss */ .l-inspect .holder-elements .current-elements { position: relative; } - /* line 146, ../../../../general/res/sass/_inspector.scss */ + /* line 155, ../../../../general/res/sass/_inspector.scss */ .l-inspect .holder-elements .current-elements .tree-item .t-object-label { font-size: 0.75rem; left: 0; } -/* line 157, ../../../../general/res/sass/_inspector.scss */ +/* line 166, ../../../../general/res/sass/_inspector.scss */ .l-inspect .splitter-inspect-panel, .l-inspect .split-pane-component.pane.bottom { -moz-transition-property: opacity; @@ -1594,10 +1601,14 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { opacity: 0; pointer-events: none; } -/* line 166, ../../../../general/res/sass/_inspector.scss */ +/* line 175, ../../../../general/res/sass/_inspector.scss */ +mct-representation:not(.s-status-editing) .l-inspect .split-pane-component.pane.top { + bottom: 0 !important; } + +/* line 181, ../../../../general/res/sass/_inspector.scss */ .s-status-editing .l-inspect .location-item { pointer-events: none; } -/* line 167, ../../../../general/res/sass/_inspector.scss */ +/* line 184, ../../../../general/res/sass/_inspector.scss */ .s-status-editing .l-inspect .splitter-inspect-panel, .s-status-editing .l-inspect .split-pane-component.pane.bottom { opacity: 1; @@ -2286,23 +2297,23 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { display: inline-block; padding: 0 5px; position: relative; } - /* line 92, ../../../../general/res/sass/controls/_controls.scss */ + /* line 91, ../../../../general/res/sass/controls/_controls.scss */ .l-control-group:first-child { border-left: none; padding-left: 0; } -/* line 98, ../../../../general/res/sass/controls/_controls.scss */ +/* line 97, ../../../../general/res/sass/controls/_controls.scss */ .l-local-controls { position: absolute; top: 5px; right: 5px; z-index: 5; } -/* line 108, ../../../../general/res/sass/controls/_controls.scss */ +/* line 107, ../../../../general/res/sass/controls/_controls.scss */ .s-local-controls { font-size: 0.7rem; } -/* line 112, ../../../../general/res/sass/controls/_controls.scss */ +/* line 111, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom, label.radio.custom { cursor: pointer; @@ -2310,14 +2321,14 @@ label.radio.custom { margin-right: 20px; padding-left: 19px; position: relative; } - /* line 123, ../../../../general/res/sass/controls/_controls.scss */ + /* line 120, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom em, label.radio.custom em { color: #999; display: inline-block; height: 14px; width: 14px; } - /* line 128, ../../../../general/res/sass/controls/_controls.scss */ + /* line 125, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom em:before, label.radio.custom em:before { -moz-border-radius: 2.25px; @@ -2330,7 +2341,7 @@ label.radio.custom { box-sizing: border-box; content: ""; font-family: 'symbolsfont'; - font-size: 0.8em; + font-size: 0.7em; display: inline-block; height: 14px; width: 14px; @@ -2338,7 +2349,7 @@ label.radio.custom { top: 0; position: absolute; text-align: center; } - /* line 146, ../../../../general/res/sass/controls/_controls.scss */ + /* line 142, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom.no-text, label.radio.custom.no-text { overflow: hidden; @@ -2346,63 +2357,63 @@ label.radio.custom { padding-left: 0; height: 14px; width: 14px; } - /* line 152, ../../../../general/res/sass/controls/_controls.scss */ + /* line 148, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom.no-text em, label.radio.custom.no-text em { overflow: hidden; } - /* line 156, ../../../../general/res/sass/controls/_controls.scss */ + /* line 152, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom input, label.radio.custom input { display: none; } - /* line 158, ../../../../general/res/sass/controls/_controls.scss */ + /* line 154, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom input:checked ~ em:before, label.radio.custom input:checked ~ em:before { background: #0099cc; color: #ccf2ff; } -/* line 165, ../../../../general/res/sass/controls/_controls.scss */ +/* line 161, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom input:checked ~ em:before { content: "\32"; } -/* line 166, ../../../../general/res/sass/controls/_controls.scss */ +/* line 162, ../../../../general/res/sass/controls/_controls.scss */ label.radio.custom input:checked ~ em:before { content: "\e619"; } -/* line 168, ../../../../general/res/sass/controls/_controls.scss */ +/* line 164, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled { margin-left: 5px; } - /* line 170, ../../../../general/res/sass/controls/_controls.scss */ + /* line 166, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled label { display: inline-block; margin-right: 3px; } - /* line 174, ../../../../general/res/sass/controls/_controls.scss */ + /* line 170, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled.inline { display: inline-block; } - /* line 177, ../../../../general/res/sass/controls/_controls.scss */ + /* line 173, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled:first-child { margin-left: 0; } -/* line 182, ../../../../general/res/sass/controls/_controls.scss */ +/* line 178, ../../../../general/res/sass/controls/_controls.scss */ .s-menu-btn label.checkbox.custom { margin-left: 5px; } -/* line 187, ../../../../general/res/sass/controls/_controls.scss */ +/* line 183, ../../../../general/res/sass/controls/_controls.scss */ .item .checkbox.checked label { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; border-bottom: none; } -/* line 193, ../../../../general/res/sass/controls/_controls.scss */ +/* line 189, ../../../../general/res/sass/controls/_controls.scss */ .context-available, .s-icon-btn { color: #0099cc; } - /* line 197, ../../../../general/res/sass/controls/_controls.scss */ + /* line 193, ../../../../general/res/sass/controls/_controls.scss */ .context-available:hover, .s-icon-btn:hover { color: deepskyblue; } -/* line 202, ../../../../general/res/sass/controls/_controls.scss */ +/* line 198, ../../../../general/res/sass/controls/_controls.scss */ .view-switcher { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2422,22 +2433,22 @@ label.radio.custom input:checked ~ em:before { transition-delay: 0; } /******************************************************** OBJECT-HEADER */ -/* line 207, ../../../../general/res/sass/controls/_controls.scss */ +/* line 203, ../../../../general/res/sass/controls/_controls.scss */ .object-header { font-size: 1em; } - /* line 210, ../../../../general/res/sass/controls/_controls.scss */ + /* line 206, ../../../../general/res/sass/controls/_controls.scss */ .object-header > .type-icon { color: #cccccc; font-size: 120%; float: left; margin-right: 5px; } - /* line 218, ../../../../general/res/sass/controls/_controls.scss */ + /* line 214, ../../../../general/res/sass/controls/_controls.scss */ .object-header .l-elem-wrapper mct-representation { min-width: 0.7em; } - /* line 226, ../../../../general/res/sass/controls/_controls.scss */ + /* line 222, ../../../../general/res/sass/controls/_controls.scss */ .object-header .action { margin-right: 5px; } - /* line 230, ../../../../general/res/sass/controls/_controls.scss */ + /* line 226, ../../../../general/res/sass/controls/_controls.scss */ .object-header .title-label { color: #999; overflow: hidden; @@ -2446,13 +2457,13 @@ label.radio.custom input:checked ~ em:before { flex: 0 1 auto; -webkit-flex: 0 1 auto; padding-right: 0.35em; } - /* line 237, ../../../../general/res/sass/controls/_controls.scss */ + /* line 233, ../../../../general/res/sass/controls/_controls.scss */ .object-header .context-available { font-size: 0.7em; flex: 0 0 1; -webkit-flex: 0 0 1; } @media only screen and (min-device-width: 1025px) and (-webkit-min-device-pixel-ratio: 1) { - /* line 243, ../../../../general/res/sass/controls/_controls.scss */ + /* line 239, ../../../../general/res/sass/controls/_controls.scss */ .object-header .context-available { -moz-transition-property: opacity; -o-transition-property: opacity; @@ -2471,7 +2482,7 @@ label.radio.custom input:checked ~ em:before { -webkit-transition-delay: 0; transition-delay: 0; opacity: 0; } - /* line 248, ../../../../general/res/sass/controls/_controls.scss */ + /* line 244, ../../../../general/res/sass/controls/_controls.scss */ .object-header:hover .context-available { opacity: 1; } } @@ -2485,12 +2496,12 @@ label.radio.custom input:checked ~ em:before { @keyframes progress { 100% { background-position: 20px center; } } -/* line 270, ../../../../general/res/sass/controls/_controls.scss */ +/* line 266, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar { display: inline-block; overflow: hidden; position: relative; } - /* line 276, ../../../../general/res/sass/controls/_controls.scss */ + /* line 272, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt-holder { overflow: hidden; position: absolute; @@ -2500,7 +2511,7 @@ label.radio.custom input:checked ~ em:before { left: 1px; width: auto; height: auto; } - /* line 279, ../../../../general/res/sass/controls/_controls.scss */ + /* line 275, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt, .l-progress-bar .progress-amt:before, .l-progress-bar .progress-amt:after { @@ -2514,14 +2525,14 @@ label.radio.custom input:checked ~ em:before { height: auto; display: block; content: ''; } - /* line 287, ../../../../general/res/sass/controls/_controls.scss */ + /* line 283, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt { right: auto; } - /* line 292, ../../../../general/res/sass/controls/_controls.scss */ + /* line 288, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar.indeterminate .progress-amt { width: 100% !important; } -/* line 298, ../../../../general/res/sass/controls/_controls.scss */ +/* line 294, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar { -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -2530,7 +2541,7 @@ label.radio.custom input:checked ~ em:before { -webkit-box-shadow: inset rgba(0, 0, 0, 0.3) 0 1px 4px; box-shadow: inset rgba(0, 0, 0, 0.3) 0 1px 4px; background: rgba(0, 0, 0, 0.1); } - /* line 302, ../../../../general/res/sass/controls/_controls.scss */ + /* line 298, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt { -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -2557,10 +2568,10 @@ label.radio.custom input:checked ~ em:before { -o-transition-delay: 0; -webkit-transition-delay: 0; transition-delay: 0; } - /* line 307, ../../../../general/res/sass/controls/_controls.scss */ + /* line 303, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt:before { background-color: #0099cc; } - /* line 310, ../../../../general/res/sass/controls/_controls.scss */ + /* line 306, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt:after { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSI1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjMwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjI1Ii8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2568,7 +2579,7 @@ label.radio.custom input:checked ~ em:before { background-image: -moz-linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); background-image: linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); } - /* line 319, ../../../../general/res/sass/controls/_controls.scss */ + /* line 315, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar:not(.indeterminate) .progress-amt:before { -moz-animation: progress 0.4s linear infinite; -webkit-animation: progress 0.4s linear infinite; @@ -2581,7 +2592,7 @@ label.radio.custom input:checked ~ em:before { background-position: 0 center; background-repeat: repeat-x; background-size: 20px 40%; } - /* line 327, ../../../../general/res/sass/controls/_controls.scss */ + /* line 323, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar.indeterminate .progress-amt:before { -moz-animation: progress 0.6s linear infinite; -webkit-animation: progress 0.6s linear infinite; @@ -2593,12 +2604,12 @@ label.radio.custom input:checked ~ em:before { background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0) 100%); background-repeat: repeat; background-size: 20px 20px; } - /* line 332, ../../../../general/res/sass/controls/_controls.scss */ + /* line 328, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar.indeterminate .progress-amt:after { display: none; } /******************************************************** SLIDERS */ -/* line 340, ../../../../general/res/sass/controls/_controls.scss */ +/* line 336, ../../../../general/res/sass/controls/_controls.scss */ .slider .slot { width: auto; position: absolute; @@ -2606,7 +2617,7 @@ label.radio.custom input:checked ~ em:before { right: 0; bottom: 0; left: 0; } -/* line 348, ../../../../general/res/sass/controls/_controls.scss */ +/* line 344, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2632,10 +2643,10 @@ label.radio.custom input:checked ~ em:before { auto: 0; bottom: auto; left: auto; } - /* line 351, ../../../../general/res/sass/controls/_controls.scss */ + /* line 347, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob:hover { background-color: #0099cc; } -/* line 362, ../../../../general/res/sass/controls/_controls.scss */ +/* line 358, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob-l { -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px; @@ -2644,7 +2655,7 @@ label.radio.custom input:checked ~ em:before { -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; cursor: w-resize; } -/* line 366, ../../../../general/res/sass/controls/_controls.scss */ +/* line 362, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob-r { -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px; @@ -2653,7 +2664,7 @@ label.radio.custom input:checked ~ em:before { -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; cursor: e-resize; } -/* line 370, ../../../../general/res/sass/controls/_controls.scss */ +/* line 366, ../../../../general/res/sass/controls/_controls.scss */ .slider .range { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2680,12 +2691,12 @@ label.radio.custom input:checked ~ em:before { left: auto; height: auto; width: auto; } - /* line 381, ../../../../general/res/sass/controls/_controls.scss */ + /* line 377, ../../../../general/res/sass/controls/_controls.scss */ .slider .range:hover { background-color: rgba(0, 153, 204, 0.5); } /******************************************************** DATETIME PICKER */ -/* line 388, ../../../../general/res/sass/controls/_controls.scss */ +/* line 384, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker { -moz-user-select: -moz-none; -ms-user-select: none; @@ -2694,65 +2705,65 @@ label.radio.custom input:checked ~ em:before { font-size: 0.8rem; padding: 10px !important; width: 230px; } - /* line 394, ../../../../general/res/sass/controls/_controls.scss */ + /* line 390, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager { height: 15px; margin-bottom: 5px; position: relative; } - /* line 403, ../../../../general/res/sass/controls/_controls.scss */ + /* line 399, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager { width: 20px; } - /* line 406, ../../../../general/res/sass/controls/_controls.scss */ + /* line 402, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.prev { right: auto; } - /* line 408, ../../../../general/res/sass/controls/_controls.scss */ + /* line 404, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.prev:before { content: "\3c"; } - /* line 412, ../../../../general/res/sass/controls/_controls.scss */ + /* line 408, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.next { left: auto; text-align: right; } - /* line 415, ../../../../general/res/sass/controls/_controls.scss */ + /* line 411, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.next:before { content: "\3e"; } - /* line 420, ../../../../general/res/sass/controls/_controls.scss */ + /* line 416, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .val { text-align: center; left: 25px; right: 25px; } - /* line 426, ../../../../general/res/sass/controls/_controls.scss */ + /* line 422, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-calendar, .l-datetime-picker .l-time-selects { border-top: 1px solid rgba(153, 153, 153, 0.1); } - /* line 430, ../../../../general/res/sass/controls/_controls.scss */ + /* line 426, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-time-selects { line-height: 22px; } /******************************************************** CALENDAR */ -/* line 438, ../../../../general/res/sass/controls/_controls.scss */ +/* line 434, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row { display: -webkit-flex; display: flex; -webkit-flex-flow: row nowrap; flex-flow: row nowrap; margin-top: 1px; } - /* line 442, ../../../../general/res/sass/controls/_controls.scss */ + /* line 438, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row:first-child { margin-top: 0; } - /* line 445, ../../../../general/res/sass/controls/_controls.scss */ + /* line 441, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row li { -webkit-flex: 1 0; flex: 1 0; margin-left: 1px; padding: 5px; text-align: center; } - /* line 450, ../../../../general/res/sass/controls/_controls.scss */ + /* line 446, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row li:first-child { margin-left: 0; } - /* line 454, ../../../../general/res/sass/controls/_controls.scss */ + /* line 450, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-header li { color: #b3b3b3; } - /* line 457, ../../../../general/res/sass/controls/_controls.scss */ + /* line 453, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li { -moz-transition-property: background-color; -o-transition-property: background-color; @@ -2771,31 +2782,31 @@ label.radio.custom input:checked ~ em:before { -webkit-transition-delay: 0; transition-delay: 0; cursor: pointer; } - /* line 460, ../../../../general/res/sass/controls/_controls.scss */ + /* line 456, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.in-month { background-color: #616161; } - /* line 463, ../../../../general/res/sass/controls/_controls.scss */ + /* line 459, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li .sub { color: #b3b3b3; font-size: 0.8em; } - /* line 467, ../../../../general/res/sass/controls/_controls.scss */ + /* line 463, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.selected { background: #006080; color: #cccccc; } - /* line 470, ../../../../general/res/sass/controls/_controls.scss */ + /* line 466, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.selected .sub { color: inherit; } - /* line 474, ../../../../general/res/sass/controls/_controls.scss */ + /* line 470, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li:hover { background-color: #0099cc; color: #fff; } - /* line 477, ../../../../general/res/sass/controls/_controls.scss */ + /* line 473, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li:hover .sub { color: inherit; } /******************************************************** BROWSER ELEMENTS */ @media only screen and (min-device-width: 1025px) and (-webkit-min-device-pixel-ratio: 1) { - /* line 488, ../../../../general/res/sass/controls/_controls.scss */ + /* line 484, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar { -moz-border-radius: 2px; -webkit-border-radius: 2px; @@ -2810,7 +2821,7 @@ label.radio.custom input:checked ~ em:before { height: 10px; width: 10px; } - /* line 497, ../../../../general/res/sass/controls/_controls.scss */ + /* line 493, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-thumb { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzU5NTk1OSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzRkNGQ0ZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2824,7 +2835,7 @@ label.radio.custom input:checked ~ em:before { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } - /* line 504, ../../../../general/res/sass/controls/_controls.scss */ + /* line 500, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-thumb:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzVlNWU1ZSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzUyNTI1MiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2833,7 +2844,7 @@ label.radio.custom input:checked ~ em:before { background-image: -webkit-linear-gradient(#5e5e5e, #525252 20px); background-image: linear-gradient(#5e5e5e, #525252 20px); } - /* line 509, ../../../../general/res/sass/controls/_controls.scss */ + /* line 505, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-corner { background: rgba(0, 0, 0, 0.4); } } /***************************************************************************** @@ -3952,15 +3963,15 @@ mct-include.l-time-controller { padding: 5px 5px; text-transform: uppercase; } -/* line 33, ../../../../general/res/sass/forms/_elems.scss */ +/* line 32, ../../../../general/res/sass/forms/_elems.scss */ .form { color: rgba(255, 255, 255, 0.5); width: 100%; } - /* line 36, ../../../../general/res/sass/forms/_elems.scss */ + /* line 35, ../../../../general/res/sass/forms/_elems.scss */ .form .form-section { position: relative; margin-bottom: 20px; } - /* line 41, ../../../../general/res/sass/forms/_elems.scss */ + /* line 40, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -3971,10 +3982,10 @@ mct-include.l-time-controller { margin-top: 5px; padding: 5px 0; position: relative; } - /* line 49, ../../../../general/res/sass/forms/_elems.scss */ + /* line 48, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row.first { border-top: none; } - /* line 53, ../../../../general/res/sass/forms/_elems.scss */ + /* line 52, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row > .label, .form .form-row > .controls { -moz-box-sizing: border-box; @@ -3985,43 +3996,43 @@ mct-include.l-time-controller { font-size: 0.8rem; line-height: 22px; min-height: 22px; } - /* line 62, ../../../../general/res/sass/forms/_elems.scss */ + /* line 61, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row > .label { min-width: 120px; order: 1; position: relative; white-space: nowrap; width: 30%; } - /* line 73, ../../../../general/res/sass/forms/_elems.scss */ + /* line 70, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .value { color: #cccccc; } - /* line 77, ../../../../general/res/sass/forms/_elems.scss */ + /* line 74, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls { order: 2; position: relative; -webkit-flex: 1 1 auto; flex: 1 1 auto; } - /* line 85, ../../../../general/res/sass/forms/_elems.scss */ + /* line 80, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-composite-control.l-checkbox { display: inline-block; line-height: 14px; margin-right: 5px; } - /* line 93, ../../../../general/res/sass/forms/_elems.scss */ + /* line 87, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-med input[type="text"] { width: 200px; } - /* line 97, ../../../../general/res/sass/forms/_elems.scss */ + /* line 91, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-small input[type="text"] { width: 50px; } - /* line 101, ../../../../general/res/sass/forms/_elems.scss */ + /* line 95, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-numeric input[type="text"] { text-align: right; } - /* line 105, ../../../../general/res/sass/forms/_elems.scss */ + /* line 99, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .select { margin-right: 5px; } - /* line 110, ../../../../general/res/sass/forms/_elems.scss */ + /* line 104, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .field-hints { color: #666666; } - /* line 114, ../../../../general/res/sass/forms/_elems.scss */ + /* line 108, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .selector-list { -moz-appearance: none; -webkit-appearance: none; @@ -4044,7 +4055,7 @@ mct-include.l-time-controller { /* line 327, ../../../../general/res/sass/_mixins.scss */ .form .form-row .selector-list.error { background: rgba(255, 0, 0, 0.5); } - /* line 121, ../../../../general/res/sass/forms/_elems.scss */ + /* line 114, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .selector-list > .wrapper { overflow: auto; position: absolute; @@ -4053,53 +4064,53 @@ mct-include.l-time-controller { bottom: 5px; left: 5px; } -/* line 135, ../../../../general/res/sass/forms/_elems.scss */ +/* line 128, ../../../../general/res/sass/forms/_elems.scss */ .l-controls-first .form .form-row { margin-top: 3px; } - /* line 138, ../../../../general/res/sass/forms/_elems.scss */ + /* line 130, ../../../../general/res/sass/forms/_elems.scss */ .l-controls-first .form .form-row > .label, .l-controls-first .form .form-row > .controls { line-height: inherit; min-height: inherit; } - /* line 143, ../../../../general/res/sass/forms/_elems.scss */ + /* line 135, ../../../../general/res/sass/forms/_elems.scss */ .l-controls-first .form .form-row > .label { -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; width: auto; order: 2; } - /* line 149, ../../../../general/res/sass/forms/_elems.scss */ + /* line 141, ../../../../general/res/sass/forms/_elems.scss */ .l-controls-first .form .form-row > .controls { -webkit-flex: 0 0 auto; flex: 0 0 auto; margin-right: 5px; order: 1; } -/* line 158, ../../../../general/res/sass/forms/_elems.scss */ +/* line 150, ../../../../general/res/sass/forms/_elems.scss */ .no-validate .form .form-row > .label { padding-right: 0; } - /* line 160, ../../../../general/res/sass/forms/_elems.scss */ + /* line 152, ../../../../general/res/sass/forms/_elems.scss */ .no-validate .form .form-row > .label:after { display: none; } -/* line 167, ../../../../general/res/sass/forms/_elems.scss */ +/* line 159, ../../../../general/res/sass/forms/_elems.scss */ label.form-control.checkbox input { margin-right: 5px; vertical-align: top; } -/* line 173, ../../../../general/res/sass/forms/_elems.scss */ +/* line 165, ../../../../general/res/sass/forms/_elems.scss */ .hint, .s-hint { font-size: 0.9em; } -/* line 178, ../../../../general/res/sass/forms/_elems.scss */ +/* line 170, ../../../../general/res/sass/forms/_elems.scss */ .l-result { display: inline-block; min-width: 32px; min-height: 32px; position: relative; vertical-align: top; } - /* line 185, ../../../../general/res/sass/forms/_elems.scss */ + /* line 177, ../../../../general/res/sass/forms/_elems.scss */ .l-result div.s-hint { -moz-border-radius: 3px; -webkit-border-radius: 3px; @@ -4109,7 +4120,7 @@ label.form-control.checkbox input { color: #ffad99; padding: 5px; } -/* line 194, ../../../../general/res/sass/forms/_elems.scss */ +/* line 186, ../../../../general/res/sass/forms/_elems.scss */ input[type="text"], input[type="search"] { -moz-appearance: none; @@ -4132,12 +4143,12 @@ input[type="search"] { input[type="text"].error, input[type="search"].error { background: rgba(255, 0, 0, 0.5); } - /* line 197, ../../../../general/res/sass/forms/_elems.scss */ + /* line 189, ../../../../general/res/sass/forms/_elems.scss */ input[type="text"].numeric, input[type="search"].numeric { text-align: right; } -/* line 202, ../../../../general/res/sass/forms/_elems.scss */ +/* line 194, ../../../../general/res/sass/forms/_elems.scss */ textarea { -moz-appearance: none; -webkit-appearance: none; diff --git a/platform/commonUI/themes/snow/res/css/theme-snow.css b/platform/commonUI/themes/snow/res/css/theme-snow.css index d252032321..8123ffaf9f 100644 --- a/platform/commonUI/themes/snow/res/css/theme-snow.css +++ b/platform/commonUI/themes/snow/res/css/theme-snow.css @@ -1449,11 +1449,11 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { /* line 35, ../../../../general/res/sass/_inspector.scss */ .l-inspect .flex-elem.holder:not(:last-child) { margin-bottom: 5px; } - /* line 37, ../../../../general/res/sass/_inspector.scss */ + /* line 39, ../../../../general/res/sass/_inspector.scss */ .l-inspect .pane-header { color: #999999; font-size: 0.8rem; } - /* line 40, ../../../../general/res/sass/_inspector.scss */ + /* line 42, ../../../../general/res/sass/_inspector.scss */ .l-inspect .pane-header:before { color: gray; content: '\e615'; @@ -1461,35 +1461,42 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { font-family: symbolsfont; margin-right: 5px; vertical-align: bottom; } - /* line 52, ../../../../general/res/sass/_inspector.scss */ + /* line 54, ../../../../general/res/sass/_inspector.scss */ .l-inspect .split-layout .split-pane-component.pane.bottom { height: 30%; min-height: 20%; max-height: 80%; } - /* line 60, ../../../../general/res/sass/_inspector.scss */ + /* line 62, ../../../../general/res/sass/_inspector.scss */ .l-inspect .l-inspector-part { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; padding-right: 5px; } - /* line 63, ../../../../general/res/sass/_inspector.scss */ + /* line 65, ../../../../general/res/sass/_inspector.scss */ .l-inspect .l-inspector-part .form { - margin-left: 20px; } - /* line 65, ../../../../general/res/sass/_inspector.scss */ - .l-inspect .l-inspector-part .form .form-row { - -webkit-align-items: center; - align-items: center; - border: none; - padding: 0; } - /* line 73, ../../../../general/res/sass/_inspector.scss */ + margin-left: 20px; + margin-bottom: 10px; } + /* line 68, ../../../../general/res/sass/_inspector.scss */ + .l-inspect .l-inspector-part .form .form-section { + margin-bottom: 0; } + /* line 70, ../../../../general/res/sass/_inspector.scss */ + .l-inspect .l-inspector-part .form .form-section:not(.first) { + border-top: 1px solid rgba(0, 0, 0, 0.1); } + /* line 73, ../../../../general/res/sass/_inspector.scss */ + .l-inspect .l-inspector-part .form .form-section .form-row { + -webkit-align-items: center; + align-items: center; + border: none; + padding: 0; } + /* line 82, ../../../../general/res/sass/_inspector.scss */ .l-inspect ul li, .l-inspect em.t-inspector-part-header { display: block; position: relative; } - /* line 79, ../../../../general/res/sass/_inspector.scss */ + /* line 88, ../../../../general/res/sass/_inspector.scss */ .l-inspect ul li { margin-bottom: 10px; } - /* line 83, ../../../../general/res/sass/_inspector.scss */ + /* line 92, ../../../../general/res/sass/_inspector.scss */ .l-inspect em.t-inspector-part-header { -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -1499,21 +1506,21 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { margin-bottom: 5px; padding: 5px 5px; text-transform: uppercase; } - /* line 92, ../../../../general/res/sass/_inspector.scss */ + /* line 101, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties { padding: 3px 0; } - /* line 93, ../../../../general/res/sass/_inspector.scss */ + /* line 102, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties:not(.first) { border-top: 1px solid #e3e3e3; } - /* line 97, ../../../../general/res/sass/_inspector.scss */ + /* line 106, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties .label { color: #999999; text-transform: uppercase; } - /* line 101, ../../../../general/res/sass/_inspector.scss */ + /* line 110, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-properties .value { color: #404040; word-break: break-all; } - /* line 108, ../../../../general/res/sass/_inspector.scss */ + /* line 117, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -1523,18 +1530,18 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { line-height: 1.2em; position: relative; padding: 2px 4px; } - /* line 117, ../../../../general/res/sass/_inspector.scss */ + /* line 126, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item .t-object-label .t-item-icon { height: 1.2em; width: 0.7rem; } - /* line 122, ../../../../general/res/sass/_inspector.scss */ + /* line 131, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item:hover { background: rgba(102, 102, 102, 0.1); color: #333333; } - /* line 125, ../../../../general/res/sass/_inspector.scss */ + /* line 134, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location .location-item:hover .icon, .l-inspect .inspector-location .location-item:hover .t-item-icon { color: #0099cc; } - /* line 130, ../../../../general/res/sass/_inspector.scss */ + /* line 139, ../../../../general/res/sass/_inspector.scss */ .l-inspect .inspector-location:not(.last) .t-object-label .t-title-label:after { color: #8c8c8c; content: '\3e'; @@ -1545,15 +1552,15 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { line-height: inherit; margin-left: 3px; width: 4px; } - /* line 143, ../../../../general/res/sass/_inspector.scss */ + /* line 152, ../../../../general/res/sass/_inspector.scss */ .l-inspect .holder-elements .current-elements { position: relative; } - /* line 146, ../../../../general/res/sass/_inspector.scss */ + /* line 155, ../../../../general/res/sass/_inspector.scss */ .l-inspect .holder-elements .current-elements .tree-item .t-object-label { font-size: 0.75rem; left: 0; } -/* line 157, ../../../../general/res/sass/_inspector.scss */ +/* line 166, ../../../../general/res/sass/_inspector.scss */ .l-inspect .splitter-inspect-panel, .l-inspect .split-pane-component.pane.bottom { -moz-transition-property: opacity; @@ -1575,10 +1582,14 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { opacity: 0; pointer-events: none; } -/* line 166, ../../../../general/res/sass/_inspector.scss */ +/* line 175, ../../../../general/res/sass/_inspector.scss */ +mct-representation:not(.s-status-editing) .l-inspect .split-pane-component.pane.top { + bottom: 0 !important; } + +/* line 181, ../../../../general/res/sass/_inspector.scss */ .s-status-editing .l-inspect .location-item { pointer-events: none; } -/* line 167, ../../../../general/res/sass/_inspector.scss */ +/* line 184, ../../../../general/res/sass/_inspector.scss */ .s-status-editing .l-inspect .splitter-inspect-panel, .s-status-editing .l-inspect .split-pane-component.pane.bottom { opacity: 1; @@ -2211,23 +2222,23 @@ tr[class*="s-limit"].s-limit-lwr td:first-child:before { display: inline-block; padding: 0 5px; position: relative; } - /* line 92, ../../../../general/res/sass/controls/_controls.scss */ + /* line 91, ../../../../general/res/sass/controls/_controls.scss */ .l-control-group:first-child { border-left: none; padding-left: 0; } -/* line 98, ../../../../general/res/sass/controls/_controls.scss */ +/* line 97, ../../../../general/res/sass/controls/_controls.scss */ .l-local-controls { position: absolute; top: 5px; right: 5px; z-index: 5; } -/* line 108, ../../../../general/res/sass/controls/_controls.scss */ +/* line 107, ../../../../general/res/sass/controls/_controls.scss */ .s-local-controls { font-size: 0.7rem; } -/* line 112, ../../../../general/res/sass/controls/_controls.scss */ +/* line 111, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom, label.radio.custom { cursor: pointer; @@ -2235,14 +2246,14 @@ label.radio.custom { margin-right: 20px; padding-left: 19px; position: relative; } - /* line 123, ../../../../general/res/sass/controls/_controls.scss */ + /* line 120, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom em, label.radio.custom em { color: #666; display: inline-block; height: 14px; width: 14px; } - /* line 128, ../../../../general/res/sass/controls/_controls.scss */ + /* line 125, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom em:before, label.radio.custom em:before { -moz-border-radius: 3px; @@ -2255,7 +2266,7 @@ label.radio.custom { box-sizing: border-box; content: ""; font-family: 'symbolsfont'; - font-size: 0.8em; + font-size: 0.7em; display: inline-block; height: 14px; width: 14px; @@ -2263,7 +2274,7 @@ label.radio.custom { top: 0; position: absolute; text-align: center; } - /* line 146, ../../../../general/res/sass/controls/_controls.scss */ + /* line 142, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom.no-text, label.radio.custom.no-text { overflow: hidden; @@ -2271,63 +2282,63 @@ label.radio.custom { padding-left: 0; height: 14px; width: 14px; } - /* line 152, ../../../../general/res/sass/controls/_controls.scss */ + /* line 148, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom.no-text em, label.radio.custom.no-text em { overflow: hidden; } - /* line 156, ../../../../general/res/sass/controls/_controls.scss */ + /* line 152, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom input, label.radio.custom input { display: none; } - /* line 158, ../../../../general/res/sass/controls/_controls.scss */ + /* line 154, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom input:checked ~ em:before, label.radio.custom input:checked ~ em:before { background: #0099cc; color: #ccf2ff; } -/* line 165, ../../../../general/res/sass/controls/_controls.scss */ +/* line 161, ../../../../general/res/sass/controls/_controls.scss */ label.checkbox.custom input:checked ~ em:before { content: "\32"; } -/* line 166, ../../../../general/res/sass/controls/_controls.scss */ +/* line 162, ../../../../general/res/sass/controls/_controls.scss */ label.radio.custom input:checked ~ em:before { content: "\e619"; } -/* line 168, ../../../../general/res/sass/controls/_controls.scss */ +/* line 164, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled { margin-left: 5px; } - /* line 170, ../../../../general/res/sass/controls/_controls.scss */ + /* line 166, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled label { display: inline-block; margin-right: 3px; } - /* line 174, ../../../../general/res/sass/controls/_controls.scss */ + /* line 170, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled.inline { display: inline-block; } - /* line 177, ../../../../general/res/sass/controls/_controls.scss */ + /* line 173, ../../../../general/res/sass/controls/_controls.scss */ .input-labeled:first-child { margin-left: 0; } -/* line 182, ../../../../general/res/sass/controls/_controls.scss */ +/* line 178, ../../../../general/res/sass/controls/_controls.scss */ .s-menu-btn label.checkbox.custom { margin-left: 5px; } -/* line 187, ../../../../general/res/sass/controls/_controls.scss */ +/* line 183, ../../../../general/res/sass/controls/_controls.scss */ .item .checkbox.checked label { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; border-bottom: none; } -/* line 193, ../../../../general/res/sass/controls/_controls.scss */ +/* line 189, ../../../../general/res/sass/controls/_controls.scss */ .context-available, .s-icon-btn { color: #0099cc; } - /* line 197, ../../../../general/res/sass/controls/_controls.scss */ + /* line 193, ../../../../general/res/sass/controls/_controls.scss */ .context-available:hover, .s-icon-btn:hover { color: deepskyblue; } -/* line 202, ../../../../general/res/sass/controls/_controls.scss */ +/* line 198, ../../../../general/res/sass/controls/_controls.scss */ .view-switcher { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2347,22 +2358,22 @@ label.radio.custom input:checked ~ em:before { transition-delay: 0; } /******************************************************** OBJECT-HEADER */ -/* line 207, ../../../../general/res/sass/controls/_controls.scss */ +/* line 203, ../../../../general/res/sass/controls/_controls.scss */ .object-header { font-size: 1em; } - /* line 210, ../../../../general/res/sass/controls/_controls.scss */ + /* line 206, ../../../../general/res/sass/controls/_controls.scss */ .object-header > .type-icon { color: #b3b3b3; font-size: 120%; float: left; margin-right: 5px; } - /* line 218, ../../../../general/res/sass/controls/_controls.scss */ + /* line 214, ../../../../general/res/sass/controls/_controls.scss */ .object-header .l-elem-wrapper mct-representation { min-width: 0.7em; } - /* line 226, ../../../../general/res/sass/controls/_controls.scss */ + /* line 222, ../../../../general/res/sass/controls/_controls.scss */ .object-header .action { margin-right: 5px; } - /* line 230, ../../../../general/res/sass/controls/_controls.scss */ + /* line 226, ../../../../general/res/sass/controls/_controls.scss */ .object-header .title-label { color: #666; overflow: hidden; @@ -2371,13 +2382,13 @@ label.radio.custom input:checked ~ em:before { flex: 0 1 auto; -webkit-flex: 0 1 auto; padding-right: 0.35em; } - /* line 237, ../../../../general/res/sass/controls/_controls.scss */ + /* line 233, ../../../../general/res/sass/controls/_controls.scss */ .object-header .context-available { font-size: 0.7em; flex: 0 0 1; -webkit-flex: 0 0 1; } @media only screen and (min-device-width: 1025px) and (-webkit-min-device-pixel-ratio: 1) { - /* line 243, ../../../../general/res/sass/controls/_controls.scss */ + /* line 239, ../../../../general/res/sass/controls/_controls.scss */ .object-header .context-available { -moz-transition-property: opacity; -o-transition-property: opacity; @@ -2396,7 +2407,7 @@ label.radio.custom input:checked ~ em:before { -webkit-transition-delay: 0; transition-delay: 0; opacity: 0; } - /* line 248, ../../../../general/res/sass/controls/_controls.scss */ + /* line 244, ../../../../general/res/sass/controls/_controls.scss */ .object-header:hover .context-available { opacity: 1; } } @@ -2410,12 +2421,12 @@ label.radio.custom input:checked ~ em:before { @keyframes progress { 100% { background-position: 20px center; } } -/* line 270, ../../../../general/res/sass/controls/_controls.scss */ +/* line 266, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar { display: inline-block; overflow: hidden; position: relative; } - /* line 276, ../../../../general/res/sass/controls/_controls.scss */ + /* line 272, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt-holder { overflow: hidden; position: absolute; @@ -2425,7 +2436,7 @@ label.radio.custom input:checked ~ em:before { left: 1px; width: auto; height: auto; } - /* line 279, ../../../../general/res/sass/controls/_controls.scss */ + /* line 275, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt, .l-progress-bar .progress-amt:before, .l-progress-bar .progress-amt:after { @@ -2439,14 +2450,14 @@ label.radio.custom input:checked ~ em:before { height: auto; display: block; content: ''; } - /* line 287, ../../../../general/res/sass/controls/_controls.scss */ + /* line 283, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar .progress-amt { right: auto; } - /* line 292, ../../../../general/res/sass/controls/_controls.scss */ + /* line 288, ../../../../general/res/sass/controls/_controls.scss */ .l-progress-bar.indeterminate .progress-amt { width: 100% !important; } -/* line 298, ../../../../general/res/sass/controls/_controls.scss */ +/* line 294, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar { -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -2455,7 +2466,7 @@ label.radio.custom input:checked ~ em:before { -webkit-box-shadow: inset rgba(0, 0, 0, 0.3) 0 1px 4px; box-shadow: inset rgba(0, 0, 0, 0.3) 0 1px 4px; background: rgba(0, 0, 0, 0.1); } - /* line 302, ../../../../general/res/sass/controls/_controls.scss */ + /* line 298, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt { -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -2482,10 +2493,10 @@ label.radio.custom input:checked ~ em:before { -o-transition-delay: 0; -webkit-transition-delay: 0; transition-delay: 0; } - /* line 307, ../../../../general/res/sass/controls/_controls.scss */ + /* line 303, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt:before { background-color: #0a0; } - /* line 310, ../../../../general/res/sass/controls/_controls.scss */ + /* line 306, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar .progress-amt:after { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSI1JSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjMwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjI1Ii8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2493,7 +2504,7 @@ label.radio.custom input:checked ~ em:before { background-image: -moz-linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); background-image: linear-gradient(rgba(0, 0, 0, 0) 5%, rgba(255, 255, 255, 0.25) 30%, rgba(0, 0, 0, 0) 100%); } - /* line 319, ../../../../general/res/sass/controls/_controls.scss */ + /* line 315, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar:not(.indeterminate) .progress-amt:before { -moz-animation: progress 0.4s linear infinite; -webkit-animation: progress 0.4s linear infinite; @@ -2506,7 +2517,7 @@ label.radio.custom input:checked ~ em:before { background-position: 0 center; background-repeat: repeat-x; background-size: 20px 40%; } - /* line 327, ../../../../general/res/sass/controls/_controls.scss */ + /* line 323, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar.indeterminate .progress-amt:before { -moz-animation: progress 0.6s linear infinite; -webkit-animation: progress 0.6s linear infinite; @@ -2518,12 +2529,12 @@ label.radio.custom input:checked ~ em:before { background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0) 100%); background-repeat: repeat; background-size: 20px 20px; } - /* line 332, ../../../../general/res/sass/controls/_controls.scss */ + /* line 328, ../../../../general/res/sass/controls/_controls.scss */ .s-progress-bar.indeterminate .progress-amt:after { display: none; } /******************************************************** SLIDERS */ -/* line 340, ../../../../general/res/sass/controls/_controls.scss */ +/* line 336, ../../../../general/res/sass/controls/_controls.scss */ .slider .slot { width: auto; position: absolute; @@ -2531,7 +2542,7 @@ label.radio.custom input:checked ~ em:before { right: 0; bottom: 0; left: 0; } -/* line 348, ../../../../general/res/sass/controls/_controls.scss */ +/* line 344, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2557,10 +2568,10 @@ label.radio.custom input:checked ~ em:before { auto: 0; bottom: auto; left: auto; } - /* line 351, ../../../../general/res/sass/controls/_controls.scss */ + /* line 347, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob:hover { background-color: rgba(0, 153, 204, 0.7); } -/* line 362, ../../../../general/res/sass/controls/_controls.scss */ +/* line 358, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob-l { -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px; @@ -2569,7 +2580,7 @@ label.radio.custom input:checked ~ em:before { -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; cursor: w-resize; } -/* line 366, ../../../../general/res/sass/controls/_controls.scss */ +/* line 362, ../../../../general/res/sass/controls/_controls.scss */ .slider .knob-r { -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px; @@ -2578,7 +2589,7 @@ label.radio.custom input:checked ~ em:before { -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; cursor: e-resize; } -/* line 370, ../../../../general/res/sass/controls/_controls.scss */ +/* line 366, ../../../../general/res/sass/controls/_controls.scss */ .slider .range { -moz-transition-property: opacity, background-color, border-color, color; -o-transition-property: opacity, background-color, border-color, color; @@ -2605,12 +2616,12 @@ label.radio.custom input:checked ~ em:before { left: auto; height: auto; width: auto; } - /* line 381, ../../../../general/res/sass/controls/_controls.scss */ + /* line 377, ../../../../general/res/sass/controls/_controls.scss */ .slider .range:hover { background-color: rgba(0, 153, 204, 0.4); } /******************************************************** DATETIME PICKER */ -/* line 388, ../../../../general/res/sass/controls/_controls.scss */ +/* line 384, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker { -moz-user-select: -moz-none; -ms-user-select: none; @@ -2619,65 +2630,65 @@ label.radio.custom input:checked ~ em:before { font-size: 0.8rem; padding: 10px !important; width: 230px; } - /* line 394, ../../../../general/res/sass/controls/_controls.scss */ + /* line 390, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager { height: 15px; margin-bottom: 5px; position: relative; } - /* line 403, ../../../../general/res/sass/controls/_controls.scss */ + /* line 399, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager { width: 20px; } - /* line 406, ../../../../general/res/sass/controls/_controls.scss */ + /* line 402, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.prev { right: auto; } - /* line 408, ../../../../general/res/sass/controls/_controls.scss */ + /* line 404, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.prev:before { content: "\3c"; } - /* line 412, ../../../../general/res/sass/controls/_controls.scss */ + /* line 408, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.next { left: auto; text-align: right; } - /* line 415, ../../../../general/res/sass/controls/_controls.scss */ + /* line 411, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .pager.next:before { content: "\3e"; } - /* line 420, ../../../../general/res/sass/controls/_controls.scss */ + /* line 416, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-month-year-pager .val { text-align: center; left: 25px; right: 25px; } - /* line 426, ../../../../general/res/sass/controls/_controls.scss */ + /* line 422, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-calendar, .l-datetime-picker .l-time-selects { border-top: 1px solid rgba(102, 102, 102, 0.2); } - /* line 430, ../../../../general/res/sass/controls/_controls.scss */ + /* line 426, ../../../../general/res/sass/controls/_controls.scss */ .l-datetime-picker .l-time-selects { line-height: 22px; } /******************************************************** CALENDAR */ -/* line 438, ../../../../general/res/sass/controls/_controls.scss */ +/* line 434, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row { display: -webkit-flex; display: flex; -webkit-flex-flow: row nowrap; flex-flow: row nowrap; margin-top: 1px; } - /* line 442, ../../../../general/res/sass/controls/_controls.scss */ + /* line 438, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row:first-child { margin-top: 0; } - /* line 445, ../../../../general/res/sass/controls/_controls.scss */ + /* line 441, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row li { -webkit-flex: 1 0; flex: 1 0; margin-left: 1px; padding: 5px; text-align: center; } - /* line 450, ../../../../general/res/sass/controls/_controls.scss */ + /* line 446, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row li:first-child { margin-left: 0; } - /* line 454, ../../../../general/res/sass/controls/_controls.scss */ + /* line 450, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-header li { color: #999999; } - /* line 457, ../../../../general/res/sass/controls/_controls.scss */ + /* line 453, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li { -moz-transition-property: background-color; -o-transition-property: background-color; @@ -2696,31 +2707,31 @@ label.radio.custom input:checked ~ em:before { -webkit-transition-delay: 0; transition-delay: 0; cursor: pointer; } - /* line 460, ../../../../general/res/sass/controls/_controls.scss */ + /* line 456, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.in-month { background-color: #f2f2f2; } - /* line 463, ../../../../general/res/sass/controls/_controls.scss */ + /* line 459, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li .sub { color: #999999; font-size: 0.8em; } - /* line 467, ../../../../general/res/sass/controls/_controls.scss */ + /* line 463, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.selected { background: #1ac6ff; color: #fcfcfc; } - /* line 470, ../../../../general/res/sass/controls/_controls.scss */ + /* line 466, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li.selected .sub { color: inherit; } - /* line 474, ../../../../general/res/sass/controls/_controls.scss */ + /* line 470, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li:hover { background-color: #0099cc; color: #fff; } - /* line 477, ../../../../general/res/sass/controls/_controls.scss */ + /* line 473, ../../../../general/res/sass/controls/_controls.scss */ .l-calendar ul.l-cal-row.l-body li:hover .sub { color: inherit; } /******************************************************** BROWSER ELEMENTS */ @media only screen and (min-device-width: 1025px) and (-webkit-min-device-pixel-ratio: 1) { - /* line 488, ../../../../general/res/sass/controls/_controls.scss */ + /* line 484, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar { -moz-border-radius: 2px; -webkit-border-radius: 2px; @@ -2735,7 +2746,7 @@ label.radio.custom input:checked ~ em:before { height: 10px; width: 10px; } - /* line 497, ../../../../general/res/sass/controls/_controls.scss */ + /* line 493, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-thumb { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzg5ODk4OSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzdkN2Q3ZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2749,7 +2760,7 @@ label.radio.custom input:checked ~ em:before { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } - /* line 504, ../../../../general/res/sass/controls/_controls.scss */ + /* line 500, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-thumb:hover { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwYWNlNiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwOTljYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; @@ -2758,7 +2769,7 @@ label.radio.custom input:checked ~ em:before { background-image: -webkit-linear-gradient(#00ace6, #0099cc 20px); background-image: linear-gradient(#00ace6, #0099cc 20px); } - /* line 509, ../../../../general/res/sass/controls/_controls.scss */ + /* line 505, ../../../../general/res/sass/controls/_controls.scss */ ::-webkit-scrollbar-corner { background: rgba(0, 0, 0, 0.1); } } /***************************************************************************** @@ -3871,15 +3882,15 @@ mct-include.l-time-controller { padding: 5px 5px; text-transform: uppercase; } -/* line 33, ../../../../general/res/sass/forms/_elems.scss */ +/* line 32, ../../../../general/res/sass/forms/_elems.scss */ .form { color: gray; width: 100%; } - /* line 36, ../../../../general/res/sass/forms/_elems.scss */ + /* line 35, ../../../../general/res/sass/forms/_elems.scss */ .form .form-section { position: relative; margin-bottom: 20px; } - /* line 41, ../../../../general/res/sass/forms/_elems.scss */ + /* line 40, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -3890,10 +3901,10 @@ mct-include.l-time-controller { margin-top: 5px; padding: 5px 0; position: relative; } - /* line 49, ../../../../general/res/sass/forms/_elems.scss */ + /* line 48, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row.first { border-top: none; } - /* line 53, ../../../../general/res/sass/forms/_elems.scss */ + /* line 52, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row > .label, .form .form-row > .controls { -moz-box-sizing: border-box; @@ -3904,43 +3915,43 @@ mct-include.l-time-controller { font-size: 0.8rem; line-height: 22px; min-height: 22px; } - /* line 62, ../../../../general/res/sass/forms/_elems.scss */ + /* line 61, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row > .label { min-width: 120px; order: 1; position: relative; white-space: nowrap; width: 30%; } - /* line 73, ../../../../general/res/sass/forms/_elems.scss */ + /* line 70, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .value { color: #666; } - /* line 77, ../../../../general/res/sass/forms/_elems.scss */ + /* line 74, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls { order: 2; position: relative; -webkit-flex: 1 1 auto; flex: 1 1 auto; } - /* line 85, ../../../../general/res/sass/forms/_elems.scss */ + /* line 80, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-composite-control.l-checkbox { display: inline-block; line-height: 14px; margin-right: 5px; } - /* line 93, ../../../../general/res/sass/forms/_elems.scss */ + /* line 87, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-med input[type="text"] { width: 200px; } - /* line 97, ../../../../general/res/sass/forms/_elems.scss */ + /* line 91, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-small input[type="text"] { width: 50px; } - /* line 101, ../../../../general/res/sass/forms/_elems.scss */ + /* line 95, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .l-numeric input[type="text"] { text-align: right; } - /* line 105, ../../../../general/res/sass/forms/_elems.scss */ + /* line 99, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .controls .select { margin-right: 5px; } - /* line 110, ../../../../general/res/sass/forms/_elems.scss */ + /* line 104, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .field-hints { color: #333333; } - /* line 114, ../../../../general/res/sass/forms/_elems.scss */ + /* line 108, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .selector-list { -moz-appearance: none; -webkit-appearance: none; @@ -3963,7 +3974,7 @@ mct-include.l-time-controller { /* line 327, ../../../../general/res/sass/_mixins.scss */ .form .form-row .selector-list.error { background: rgba(255, 0, 0, 0.5); } - /* line 121, ../../../../general/res/sass/forms/_elems.scss */ + /* line 114, ../../../../general/res/sass/forms/_elems.scss */ .form .form-row .selector-list > .wrapper { overflow: auto; position: absolute; @@ -3972,53 +3983,53 @@ mct-include.l-time-controller { bottom: 5px; left: 5px; } -/* line 135, ../../../../general/res/sass/forms/_elems.scss */ +/* line 128, ../../../../general/res/sass/forms/_elems.scss */ .l-controls-first .form .form-row { margin-top: 3px; } - /* line 138, ../../../../general/res/sass/forms/_elems.scss */ + /* line 130, ../../../../general/res/sass/forms/_elems.scss */ .l-controls-first .form .form-row > .label, .l-controls-first .form .form-row > .controls { line-height: inherit; min-height: inherit; } - /* line 143, ../../../../general/res/sass/forms/_elems.scss */ + /* line 135, ../../../../general/res/sass/forms/_elems.scss */ .l-controls-first .form .form-row > .label { -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; width: auto; order: 2; } - /* line 149, ../../../../general/res/sass/forms/_elems.scss */ + /* line 141, ../../../../general/res/sass/forms/_elems.scss */ .l-controls-first .form .form-row > .controls { -webkit-flex: 0 0 auto; flex: 0 0 auto; margin-right: 5px; order: 1; } -/* line 158, ../../../../general/res/sass/forms/_elems.scss */ +/* line 150, ../../../../general/res/sass/forms/_elems.scss */ .no-validate .form .form-row > .label { padding-right: 0; } - /* line 160, ../../../../general/res/sass/forms/_elems.scss */ + /* line 152, ../../../../general/res/sass/forms/_elems.scss */ .no-validate .form .form-row > .label:after { display: none; } -/* line 167, ../../../../general/res/sass/forms/_elems.scss */ +/* line 159, ../../../../general/res/sass/forms/_elems.scss */ label.form-control.checkbox input { margin-right: 5px; vertical-align: top; } -/* line 173, ../../../../general/res/sass/forms/_elems.scss */ +/* line 165, ../../../../general/res/sass/forms/_elems.scss */ .hint, .s-hint { font-size: 0.9em; } -/* line 178, ../../../../general/res/sass/forms/_elems.scss */ +/* line 170, ../../../../general/res/sass/forms/_elems.scss */ .l-result { display: inline-block; min-width: 32px; min-height: 32px; position: relative; vertical-align: top; } - /* line 185, ../../../../general/res/sass/forms/_elems.scss */ + /* line 177, ../../../../general/res/sass/forms/_elems.scss */ .l-result div.s-hint { -moz-border-radius: 4px; -webkit-border-radius: 4px; @@ -4028,7 +4039,7 @@ label.form-control.checkbox input { color: #ffa799; padding: 5px; } -/* line 194, ../../../../general/res/sass/forms/_elems.scss */ +/* line 186, ../../../../general/res/sass/forms/_elems.scss */ input[type="text"], input[type="search"] { -moz-appearance: none; @@ -4051,12 +4062,12 @@ input[type="search"] { input[type="text"].error, input[type="search"].error { background: rgba(255, 0, 0, 0.5); } - /* line 197, ../../../../general/res/sass/forms/_elems.scss */ + /* line 189, ../../../../general/res/sass/forms/_elems.scss */ input[type="text"].numeric, input[type="search"].numeric { text-align: right; } -/* line 202, ../../../../general/res/sass/forms/_elems.scss */ +/* line 194, ../../../../general/res/sass/forms/_elems.scss */ textarea { -moz-appearance: none; -webkit-appearance: none; diff --git a/platform/forms/bundle.js b/platform/forms/bundle.js index 43c76d18ae..d2ad579ebd 100644 --- a/platform/forms/bundle.js +++ b/platform/forms/bundle.js @@ -68,6 +68,10 @@ define([ "key": "checkbox", "templateUrl": "templates/controls/checkbox.html" }, + { + "key": "radio", + "templateUrl": "templates/controls/radio.html" + }, { "key": "datetime", "templateUrl": "templates/controls/datetime.html" diff --git a/platform/forms/res/templates/form.html b/platform/forms/res/templates/form.html index 809a43fb0e..edd4f81d1c 100644 --- a/platform/forms/res/templates/form.html +++ b/platform/forms/res/templates/form.html @@ -24,7 +24,7 @@
                  {{section.name}}
                  -
                  +
                  -
                  {{row.name}} - - i -
                  From abf5f2215542c1c0302230952f4949e49c54d438 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 3 Feb 2016 16:00:11 -0800 Subject: [PATCH 13/76] [Plots] #638 added onchange handling in order to synchronize forms with domain object model. Fixed failing test Added tests jslint errors Minor refactoring of layout bundle revert layout/bundle.json --- platform/commonUI/browse/bundle.js | 2 +- .../commonUI/browse/src/InspectorRegion.js | 2 +- .../browse/src/TypeRegionDecorator.js | 11 +- .../test/InspectorRegionSpec.js | 4 +- .../browse/test/TypeRegionDecoratorSpec.js | 70 +++++++ .../templates/controls/datetime-field.html | 1 + .../regions/src/EditableRegionPolicy.js | 4 +- platform/commonUI/regions/src/Region.js | 14 +- .../commonUI/regions/src/RegionController.js | 13 +- .../regions/test/EditableRegionPolicySpec.js | 75 +++++++ .../regions/test/RegionControllerSpec.js | 82 ++++++++ platform/commonUI/regions/test/RegionSpec.js | 107 ++++++++++ platform/commonUI/regions/test/suite.json | 3 - platform/features/layout/bundle.js | 48 +---- .../res/templates/plot-options-browse.html | 27 ++- .../layout/src/PlotOptionsController.js | 186 +++++++----------- .../features/layout/src/PlotOptionsForm.js | 166 ++++++++++++++++ .../layout/test/PlotOptionsControllerSpec.js | 161 +++++++++++++++ .../layout/test/PlotOptionsFormSpec.js | 73 +++++++ .../res/templates/controls/checkbox.html | 1 + .../forms/res/templates/controls/radio.html | 4 +- .../forms/res/templates/controls/select.html | 1 + .../res/templates/controls/textfield.html | 1 + platform/forms/res/templates/form.html | 1 + 24 files changed, 867 insertions(+), 190 deletions(-) rename platform/commonUI/{regions => browse}/test/InspectorRegionSpec.js (93%) create mode 100644 platform/commonUI/browse/test/TypeRegionDecoratorSpec.js create mode 100644 platform/commonUI/regions/test/EditableRegionPolicySpec.js create mode 100644 platform/commonUI/regions/test/RegionControllerSpec.js create mode 100644 platform/commonUI/regions/test/RegionSpec.js delete mode 100644 platform/commonUI/regions/test/suite.json create mode 100644 platform/features/layout/src/PlotOptionsForm.js create mode 100644 platform/features/layout/test/PlotOptionsControllerSpec.js create mode 100644 platform/features/layout/test/PlotOptionsFormSpec.js diff --git a/platform/commonUI/browse/bundle.js b/platform/commonUI/browse/bundle.js index bc62a1a36e..9c08521f5e 100644 --- a/platform/commonUI/browse/bundle.js +++ b/platform/commonUI/browse/bundle.js @@ -295,7 +295,7 @@ define([ "provides": "typeService", "type": "decorator", "implementation": TypeRegionDecorator - }, + } ], "runs": [ { diff --git a/platform/commonUI/browse/src/InspectorRegion.js b/platform/commonUI/browse/src/InspectorRegion.js index 72b71a1e01..accbac8fbd 100644 --- a/platform/commonUI/browse/src/InspectorRegion.js +++ b/platform/commonUI/browse/src/InspectorRegion.js @@ -62,7 +62,7 @@ define( } }; this.addPart(metadataPart, 0); - } + }; return InspectorRegion; } diff --git a/platform/commonUI/browse/src/TypeRegionDecorator.js b/platform/commonUI/browse/src/TypeRegionDecorator.js index 60e75cac24..7c3f60994f 100644 --- a/platform/commonUI/browse/src/TypeRegionDecorator.js +++ b/platform/commonUI/browse/src/TypeRegionDecorator.js @@ -29,16 +29,17 @@ define( "use strict"; /** - * Adds default screen regions to Type definitions. Screen regions - * are sections of the browse and edit view of an object that can be - * customized on a per-type basis. Within {@link Region}s are {@link RegionPart}s. - * Policies can be used to decide which parts are visible or not based on object state. + * Adds default browse screen regions to Type definitions. Screen + * regions are sections of the browse and edit view of an object + * that can be customized on a per-type basis. Within + * {@link Region}s are {@link RegionPart}s. Policies can be used to + * decide which parts are visible or not based on object state. * @memberOf platform/commonUI/regions * @see {@link Region}, {@link RegionPart}, {@link EditableRegionPolicy} * @constructor */ function TypeRegionDecorator(typeService) { - this.typeService = typeService + this.typeService = typeService; } /** diff --git a/platform/commonUI/regions/test/InspectorRegionSpec.js b/platform/commonUI/browse/test/InspectorRegionSpec.js similarity index 93% rename from platform/commonUI/regions/test/InspectorRegionSpec.js rename to platform/commonUI/browse/test/InspectorRegionSpec.js index 9192ba3f11..3eb9428518 100644 --- a/platform/commonUI/regions/test/InspectorRegionSpec.js +++ b/platform/commonUI/browse/test/InspectorRegionSpec.js @@ -33,11 +33,11 @@ define( var inspectorRegion; beforeEach(function () { - inspectorRegion = new InspectorRegion; + inspectorRegion = new InspectorRegion(); }); it("creates default region parts", function () { - expect(inspectorRegion.parts().length).toBe(2); + expect(inspectorRegion.parts.length).toBe(1); }); }); diff --git a/platform/commonUI/browse/test/TypeRegionDecoratorSpec.js b/platform/commonUI/browse/test/TypeRegionDecoratorSpec.js new file mode 100644 index 0000000000..a525df5b9b --- /dev/null +++ b/platform/commonUI/browse/test/TypeRegionDecoratorSpec.js @@ -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,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ + +/** + * MCTIncudeSpec. Created by vwoeltje on 11/6/14. + */ +define( + ["../src/TypeRegionDecorator"], + function (TypeRegionDecorator) { + "use strict"; + + describe("The type region decorator", function () { + var typeRegionDecorator, + mockTypeService, + mockType, + mockTypeDefinition; + + beforeEach(function () { + mockTypeDefinition = {}; + + mockType = jasmine.createSpyObj('type', [ + 'getDefinition' + ]); + mockType.getDefinition.andReturn(mockTypeDefinition); + + mockTypeService = jasmine.createSpyObj('typeService', [ + 'listTypes', + 'getType' + ]); + mockTypeService.getType.andReturn(mockType); + mockTypeService.listTypes.andReturn([mockType]); + + typeRegionDecorator = new TypeRegionDecorator(mockTypeService); + }); + + it("decorates individual type definitions with basic inspector" + + " region", function () { + typeRegionDecorator.getType('someType'); + expect(mockTypeDefinition.regions).toBeDefined(); + }); + + it("decorates all type definitions with basic inspector" + + " region", function () { + typeRegionDecorator.listTypes(); + expect(mockTypeDefinition.regions).toBeDefined(); + }); + + }); + } +); \ No newline at end of file diff --git a/platform/commonUI/general/res/templates/controls/datetime-field.html b/platform/commonUI/general/res/templates/controls/datetime-field.html index 18eb9ec46d..793083ea60 100644 --- a/platform/commonUI/general/res/templates/controls/datetime-field.html +++ b/platform/commonUI/general/res/templates/controls/datetime-field.html @@ -23,6 +23,7 @@ ng-controller="DateTimeFieldController"> +
                  Display + + + + +
                  + Plot Series +
                    • @@ -41,8 +64,8 @@ diff --git a/platform/features/layout/src/PlotOptionsController.js b/platform/features/layout/src/PlotOptionsController.js index 633dde36f4..fbafe303ee 100644 --- a/platform/features/layout/src/PlotOptionsController.js +++ b/platform/features/layout/src/PlotOptionsController.js @@ -27,8 +27,8 @@ * @namespace platform/features/layout */ define( - [], - function () { + ['./PlotOptionsForm'], + function (PlotOptionsForm) { "use strict"; /** @@ -50,136 +50,98 @@ define( * @constructor * @param {Scope} $scope the controller's Angular scope */ - function PlotOptionsController($scope) { + function PlotOptionsController($scope, topic) { + var self = this, domainObject = $scope.domainObject, - xAxisForm = { - 'name':'x-axis', - 'sections': [{ - 'name': 'x-axis', - 'rows': [ - { - 'name': 'Domain', - 'control': 'select', - 'key': 'key', - //TODO fetch options from platform or object type configuration - 'options': [ - {'name':'scet', 'value': 'scet'}, - {'name':'sclk', 'value': 'sclk'}, - {'name':'lst', 'value': 'lst'} - ] - } - ] - }]}, - yAxisForm = { - 'name':'y-axis', - 'sections': [{ - // Will need to be repeated for each y-axis, with a - // distinct name each. Ideally the name of the axis itself. - 'name': 'y-axis', - 'rows': [ - { - 'name': 'Autoscale', - 'control': 'checkbox', - 'key': 'autoscale', - }, - { - 'name': 'Min', - 'control': 'textfield', - 'key': 'min', - 'pattern': '[0-9]' - }, - { - 'name': 'Max', - 'control': 'textfield', - 'key': 'min', - 'pattern': '[0-9]' - }, - { - 'name': 'Range', - 'control': 'select', - 'key': 'key', - 'options': [ - {'name':'eu', 'value': 'eu'}, - {'name':'dn', 'value': 'dn'}, - {'name':'status', 'value': 'status'} - ] - } - ] - }] - }, - plotSeriesForm = { - // For correctness of the rendered markup, repeated forms - // will probably need to have unique names. - 'name': 'plotSeries', - 'sections': [{ - 'name': 'Plot Series', - 'rows': [ - { - 'name': 'Markers', - 'control': 'checkbox', - 'key': 'markers' - }, - { - 'name': 'No Line', - 'control': 'radio', - 'key': 'noLine' - }, - { - 'name': 'Step Line', - 'control': 'radio', - 'key': 'stepLine' - }, - { - 'name': 'Linear Line', - 'control': 'radio', - 'key': 'linearLine' - } - ] - }] - }, - plotOptionsModel = {}; + composition, + mutationListener, + formListener, + configuration = domainObject.getModel().configuration || {}; - /*domainObject.getModel().configuration.plot.xAxis= { - 'key': 'scet' - }; + this.plotOptionsForm = new PlotOptionsForm(topic); - domainObject.getModel().configuration.plot.yAxis = [{ - 'autoscale': true, - 'min': 0, - 'max': 15, - 'key': 'eu' - }]; + /* + * Determine whether the changes to the model that triggered a + * mutation event were purely compositional. + */ + function hasCompositionChanged(oldComposition, newComposition){ + // Framed slightly strangely, but the boolean logic is + // easier to follow for the unchanged case. + var isUnchanged = oldComposition === newComposition || + ( + oldComposition.length === newComposition.length && + oldComposition.every( function (currentValue, index) { + return newComposition[index] && currentValue === newComposition[index]; + }) + ); + return !isUnchanged; + } - domainObject.getModel().configuration.plot.series = [ - { - 'id': '', - 'lineStyle': '', - 'color': '#aaddaa', - 'interpolation': 'none' - }, - //etc - ];*/ - - $scope.plotOptionsStructure = plotSeriesForm; - $scope.plotOptionsModel = plotOptionsModel; + /* + Default the plot options model + */ + function defaultConfiguration() { + configuration.plot = configuration.plot || {}; + configuration.plot.xAxis = configuration.plot.xAxis || {}; + configuration.plot.yAxis = configuration.plot.yAxis || {}; // y-axes will be associative array keyed on axis key + configuration.plot.series = configuration.plot.series || {}; // series will be associative array keyed on sub-object id + $scope.configuration = configuration; + } + /* + When a child is added to, or removed from a plot, update the + plot options model + */ function updateChildren() { domainObject.useCapability('composition').then(function(children){ $scope.children = children; + composition = domainObject.getModel().composition; + children.forEach(function(child){ + configuration.plot.series[child.getId()] = configuration.plot.series[child.getId()] || {}; + }); }); } + /* + On changes to the form, update the configuration on the domain + object + */ + function updateConfiguration() { + domainObject.useCapability('mutation', function(model){ + model.configuration = model.configuration || {}; + model.configuration.plot = configuration.plot; + }); + } + + /* + Set form structures on scope + */ + $scope.plotSeriesForm = this.plotOptionsForm.plotSeriesForm; + $scope.xAxisForm = this.plotOptionsForm.xAxisForm; + $scope.yAxisForm = this.plotOptionsForm.yAxisForm; + /* Listen for changes to the domain object and update the object's children. */ - domainObject.getCapability('mutation').listen(function(model) { - updateChildren(); + mutationListener = domainObject.getCapability('mutation').listen(function(model) { + if (hasCompositionChanged(composition, model.composition)) { + updateChildren(); + } }); + formListener = this.plotOptionsForm.listen(updateConfiguration); + + defaultConfiguration(); updateChildren(); + $scope.$on("$destroy", function() { + //Clean up any listeners on destruction of controller + mutationListener(); + formListener(); + }); + } return PlotOptionsController; diff --git a/platform/features/layout/src/PlotOptionsForm.js b/platform/features/layout/src/PlotOptionsForm.js new file mode 100644 index 0000000000..e72c34d6b9 --- /dev/null +++ b/platform/features/layout/src/PlotOptionsForm.js @@ -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( + [], + function () { + "use strict"; + + /** + * A class for encapsulating structure and behaviour of the plot + * options form + * @memberOf platform/features/layout + * @param topic + * @constructor + */ + function PlotOptionsForm(topic) { + var self = this; + this.onchangeTopic = topic(); + + function onchange(value){ + self.onchangeTopic.notify(value); + } + + /* + Defined below are the form structures for the plot options. + */ + this.xAxisForm = { + 'name':'x-axis', + 'sections': [{ + 'name': 'x-axis', + 'rows': [ + { + 'name': 'Domain', + 'control': 'select', + 'key': 'key', + 'onchange': onchange, + 'options': [ + {'name':'scet', 'value': 'scet'}, + {'name':'sclk', 'value': 'sclk'}, + {'name':'lst', 'value': 'lst'} + ] + } + ] + }]}; + + this.yAxisForm = { + 'name':'y-axis', + 'sections': [{ + // Will need to be repeated for each y-axis, with a + // distinct name for each. Ideally the name of the axis + // itself. + 'name': 'y-axis', + 'rows': [ + { + 'name': 'Autoscale', + 'control': 'checkbox', + 'key': 'autoscale', + 'onchange': onchange + }, + { + 'name': 'Min', + 'control': 'textfield', + 'key': 'min', + 'pattern': '[0-9]', + 'onchange': onchange + }, + { + 'name': 'Max', + 'control': 'textfield', + 'key': 'max', + 'pattern': '[0-9]', + 'onchange': onchange + }, + { + 'name': 'Range', + 'control': 'select', + 'key': 'key', + 'onchange': onchange, + 'options': [ + {'name':'eu', 'value': 'eu'}, + {'name':'dn', 'value': 'dn'}, + {'name':'status', 'value': 'status'} + ] + } + ] + }] + }; + this.plotSeriesForm = { + 'name':'Series Options', + 'sections': [ + { + rows: [ + { + 'name': 'Color', + 'control': 'color', + 'key': 'color', + 'onchange': onchange + }] + }, + { + 'rows':[ + { + 'name': 'Markers', + 'control': 'checkbox', + 'key': 'markers', + 'onchange': onchange + } + ] + }, + { + 'rows':[ + { + 'name': 'No Line', + 'control': 'radio', + 'key': 'lineType', + 'value': 'noLine', + 'onchange': onchange + }, + { + 'name': 'Step Line', + 'control': 'radio', + 'key': 'lineType', + 'value': 'stepLine', + 'onchange': onchange + }, + { + 'name': 'Linear Line', + 'control': 'radio', + 'key': 'lineType', + 'value': 'linearLine', + 'onchange': onchange + } + ] + } + ] + }; + } + + PlotOptionsForm.prototype.listen = function (callback){ + return this.onchangeTopic.listen(callback); + }; + + return PlotOptionsForm; + } +); + diff --git a/platform/features/layout/test/PlotOptionsControllerSpec.js b/platform/features/layout/test/PlotOptionsControllerSpec.js new file mode 100644 index 0000000000..81fafb3768 --- /dev/null +++ b/platform/features/layout/test/PlotOptionsControllerSpec.js @@ -0,0 +1,161 @@ +/***************************************************************************** + * 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,describe,it,expect,beforeEach,jasmine,xit*/ + +define( + ['../src/PlotOptionsController'], + function (PlotOptionsController) { + "use strict"; + + describe("The Plot Options controller", function () { + var plotOptionsController, + mockTopicFunction, + mockTopicObject, + mockDomainObject, + mockMutationCapability, + mockUseCapabilities, + mockCompositionCapability, + mockComposition, + mockUnlisten, + mockFormUnlisten, + mockChildOne, + mockChildTwo, + model, + mockScope; + + beforeEach(function () { + model = { + composition: ['childOne'] + }; + + mockChildOne = jasmine.createSpyObj('domainObject', [ + 'getId' + ]); + mockChildOne.getId.andReturn('childOne'); + + mockChildTwo = jasmine.createSpyObj('childTwo', [ + 'getId' + ]); + mockChildOne.getId.andReturn('childTwo'); + + mockCompositionCapability = jasmine.createSpyObj('compositionCapability', [ + 'then' + ]); + mockComposition = [ + mockChildOne + ]; + mockCompositionCapability.then.andCallFake(function (callback){ + callback(mockComposition); + }); + + mockUseCapabilities = jasmine.createSpyObj('useCapabilities', [ + 'composition', + 'mutation' + ]); + mockUseCapabilities.composition.andReturn(mockCompositionCapability); + + mockMutationCapability = jasmine.createSpyObj('mutationCapability', [ + 'listen' + ]); + mockUnlisten = jasmine.createSpy('unlisten'); + mockMutationCapability.listen.andReturn(mockUnlisten); + + + mockTopicObject = jasmine.createSpyObj('Topic', [ + 'listen', + 'notify' + ]); + mockFormUnlisten = jasmine.createSpy('formUnlisten'); + mockTopicObject.listen.andReturn(mockFormUnlisten); + + mockTopicFunction = function() { + return mockTopicObject; + }; + + mockDomainObject = jasmine.createSpyObj('domainObject', [ + 'getModel', + 'useCapability', + 'getCapability' + ]); + mockDomainObject.useCapability.andCallFake(function(capability){ + return mockUseCapabilities[capability](); + }); + mockDomainObject.getCapability.andReturn(mockMutationCapability); + mockDomainObject.getModel.andReturn(model); + + mockScope = jasmine.createSpyObj('scope', [ + '$on' + ]); + mockScope.domainObject = mockDomainObject; + + plotOptionsController = new PlotOptionsController(mockScope, mockTopicFunction); + }); + + it("sets form definitions on scope", function () { + expect(mockScope.xAxisForm).toBeDefined(); + expect(mockScope.yAxisForm).toBeDefined(); + expect(mockScope.plotSeriesForm).toBeDefined(); + }); + + it("sets object children on scope", function () { + expect(mockScope.children).toBe(mockComposition); + }); + + it("on changes in object composition, updates the form", function () { + expect(mockMutationCapability.listen).toHaveBeenCalled(); + expect(mockScope.children).toBe(mockComposition); + expect(mockScope.children.length).toBe(1); + mockComposition.push(mockChildTwo); + model.composition.push('childTwo'); + mockMutationCapability.listen.mostRecentCall.args[0](model); + expect(mockScope.children).toBe(mockComposition); + expect(mockScope.children.length).toBe(2); + }); + + it("on changes in form values, updates the object model", function () { + var scopeConfiguration = mockScope.configuration, + model = mockDomainObject.getModel(); + + scopeConfiguration.plot.xAxis.key = 'lst'; + scopeConfiguration.plot.yAxis.autoScale = true; + scopeConfiguration.plot.yAxis.key = 'eu'; + + expect(mockTopicObject.listen).toHaveBeenCalled(); + mockTopicObject.listen.mostRecentCall.args[0](); + expect(mockDomainObject.useCapability).toHaveBeenCalledWith('mutation', jasmine.any(Function)); + + mockDomainObject.useCapability.mostRecentCall.args[1](model); + expect(model.configuration.plot.xAxis.key).toBe('lst'); + expect(model.configuration.plot.yAxis.autoScale).toBe(true); + expect(model.configuration.plot.yAxis.key).toBe('eu'); + + }); + + it("cleans up listeners on destruction of the controller", function () { + mockScope.$on.mostRecentCall.args[1](); + expect(mockUnlisten).toHaveBeenCalled(); + expect(mockFormUnlisten).toHaveBeenCalled(); + }); + + }); + } +); diff --git a/platform/features/layout/test/PlotOptionsFormSpec.js b/platform/features/layout/test/PlotOptionsFormSpec.js new file mode 100644 index 0000000000..2cd7b62390 --- /dev/null +++ b/platform/features/layout/test/PlotOptionsFormSpec.js @@ -0,0 +1,73 @@ +/***************************************************************************** + * 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,describe,it,expect,beforeEach,jasmine,xit*/ + +define( + ['../src/PlotOptionsForm'], + function (PlotOptionsForm) { + "use strict"; + + describe("The Plot Options form", function () { + var plotOptionsForm, + mockTopicFunction, + mockTopicObject, + listener; + + beforeEach(function () { + + mockTopicObject = jasmine.createSpyObj('Topic', [ + 'listen', + 'notify' + ]); + mockTopicFunction = function() { + return mockTopicObject; + }; + + plotOptionsForm = new PlotOptionsForm(mockTopicFunction); + }); + + it("defines form specs for x-axis, y-axis, and series data", function () { + expect(plotOptionsForm.xAxisForm).toBeDefined(); + expect(plotOptionsForm.xAxisForm.sections).toBeDefined(); + expect(plotOptionsForm.xAxisForm.sections[0].rows).toBeDefined(); + expect(plotOptionsForm.xAxisForm.sections[0].rows.length).toBeGreaterThan(0); + + expect(plotOptionsForm.yAxisForm).toBeDefined(); + expect(plotOptionsForm.plotSeriesForm).toBeDefined(); + }); + + it("uses a topic to register listeners and inform them when a" + + " form value changes", function () { + var changedValue = 'changedValue'; + + expect(plotOptionsForm.xAxisForm.sections[0].rows[0].onchange).toBeDefined(); + + plotOptionsForm.listen(listener); + expect(mockTopicObject.listen).toHaveBeenCalledWith(listener); + + plotOptionsForm.xAxisForm.sections[0].rows[0].onchange(changedValue); + expect(mockTopicObject.notify).toHaveBeenCalledWith(changedValue); + }); + + }); + } +); diff --git a/platform/forms/res/templates/controls/checkbox.html b/platform/forms/res/templates/controls/checkbox.html index b23ea7c768..45b6915a36 100644 --- a/platform/forms/res/templates/controls/checkbox.html +++ b/platform/forms/res/templates/controls/checkbox.html @@ -23,6 +23,7 @@ diff --git a/platform/forms/res/templates/controls/radio.html b/platform/forms/res/templates/controls/radio.html index efc1443b76..d9f4e36b04 100644 --- a/platform/forms/res/templates/controls/radio.html +++ b/platform/forms/res/templates/controls/radio.html @@ -23,6 +23,8 @@ + ng-disabled="ngDisabled" + ng-change="structure.onchange(ngModel[field])" + ng-value="structure.value"> diff --git a/platform/forms/res/templates/controls/select.html b/platform/forms/res/templates/controls/select.html index c8688a0010..d4b3ee50ef 100644 --- a/platform/forms/res/templates/controls/select.html +++ b/platform/forms/res/templates/controls/select.html @@ -24,6 +24,7 @@ ng-model="ngModel[field]" ng-options="opt.value as opt.name for opt in options" ng-required="ngRequired" + ng-change="structure.onchange(ngModel[field])" name="mctControl"> diff --git a/platform/forms/res/templates/controls/textfield.html b/platform/forms/res/templates/controls/textfield.html index fef977be7b..948f7ef13d 100644 --- a/platform/forms/res/templates/controls/textfield.html +++ b/platform/forms/res/templates/controls/textfield.html @@ -25,6 +25,7 @@ ng-required="ngRequired" ng-model="ngModel[field]" ng-pattern="ngPattern" + ng-change="structure.onchange(ngModel[field])" size="{{structure.size}}" name="mctControl"> diff --git a/platform/forms/res/templates/form.html b/platform/forms/res/templates/form.html index edd4f81d1c..b99e951aed 100644 --- a/platform/forms/res/templates/form.html +++ b/platform/forms/res/templates/form.html @@ -41,6 +41,7 @@ Date: Thu, 4 Feb 2016 15:05:14 -0800 Subject: [PATCH 14/76] [Plot] #638 Added a new plot options example bundle and rebased Fixed jsdoc Fixed incorrect memberof declaration Corrected memberof statement --- example/plotOptions/bundle.js | 145 ++++++++++++++++++ platform/features/plot/bundle.js | 16 ++ .../res/templates/plot-options-browse.html | 0 .../src/PlotOptionsController.js | 7 +- .../{layout => plot}/src/PlotOptionsForm.js | 2 +- .../test/PlotOptionsControllerSpec.js | 0 .../test/PlotOptionsFormSpec.js | 0 7 files changed, 163 insertions(+), 7 deletions(-) create mode 100644 example/plotOptions/bundle.js rename platform/features/{layout => plot}/res/templates/plot-options-browse.html (100%) rename platform/features/{layout => plot}/src/PlotOptionsController.js (97%) rename platform/features/{layout => plot}/src/PlotOptionsForm.js (99%) rename platform/features/{layout => plot}/test/PlotOptionsControllerSpec.js (100%) rename platform/features/{layout => plot}/test/PlotOptionsFormSpec.js (100%) diff --git a/example/plotOptions/bundle.js b/example/plotOptions/bundle.js new file mode 100644 index 0000000000..ea9be6495b --- /dev/null +++ b/example/plotOptions/bundle.js @@ -0,0 +1,145 @@ +/***************************************************************************** + * 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', + '../../platform/commonUI/browse/src/InspectorRegion' +], function ( + legacyRegistry, + InspectorRegion +) { + "use strict"; + + /** + * Add a 'plot options' region part to the inspector region for the + * Telemetry Plot type only. {@link InspectorRegion} is a default region + * implementation that is added automatically to all types. In order to + * customize what appears in the inspector region, you can start from a + * blank slate by using Region, or customize the default inspector + * region by using {@link InspectorRegion}. + */ + var plotInspector = new InspectorRegion(), + /** + * Two region parts are defined here. One that appears only in browse + * mode, and one that appears only in edit mode. For not they both point + * to the same representation, but a different key could be used here to + * include a customized representation for edit mode. + */ + plotOptionsBrowsePart = { + name: "plot-options", + title: "Plot Options", + modes: ['browse'], + content: { + key: "plot-options-browse" + } + }, + plotOptionsEditPart = { + name: "plot-options", + title: "Plot Options", + modes: ['edit'], + content: { + key: "plot-options-browse" + } + }; + + /** + * Both parts are added, and policies of type 'region' will determine + * which is shown based on domain object state. A default policy is + * provided which will check the 'modes' attribute of the region part + * definition. + */ + plotInspector.addPart(plotOptionsBrowsePart); + plotInspector.addPart(plotOptionsEditPart); + + legacyRegistry.register("example/plotType", { + "name": "Plot Type", + "description": "Example illustrating registration of a new object type", + "extensions": { + "types": [ + { + "key": "plot", + "name": "Telemetry Plot", + "glyph": "t", + "description": "A plot for displaying telemetry", + "delegates": [ + "telemetry" + ], + "features": "creation", + "contains": [ + { + "has": "telemetry" + } + ], + "model": { + "composition": [] + }, + "regions": { + "inspector": plotInspector + }, + "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*)?$" + } + ] + } + ] + } + }); +}); diff --git a/platform/features/plot/bundle.js b/platform/features/plot/bundle.js index 18eba3aa51..80e1e7fab8 100644 --- a/platform/features/plot/bundle.js +++ b/platform/features/plot/bundle.js @@ -25,11 +25,13 @@ define([ "./src/MCTChart", "./src/PlotController", "./src/policies/PlotViewPolicy", + "./src/PlotOptionsController", 'legacyRegistry' ], function ( MCTChart, PlotController, PlotViewPolicy, + PlotOptionsController, legacyRegistry ) { "use strict"; @@ -71,6 +73,14 @@ define([ "throttle", "PLOT_FIXED_DURATION" ] + }, + { + "key": "PlotOptionsController", + "implementation": PlotOptionsController, + "depends": [ + "$scope", + "topic" + ] } ], "constants": [ @@ -86,6 +96,12 @@ define([ "category": "view", "implementation": PlotViewPolicy } + ], + "representations": [ + { + "key": "plot-options-browse", + "templateUrl": "templates/plot-options-browse.html" + } ] } }); diff --git a/platform/features/layout/res/templates/plot-options-browse.html b/platform/features/plot/res/templates/plot-options-browse.html similarity index 100% rename from platform/features/layout/res/templates/plot-options-browse.html rename to platform/features/plot/res/templates/plot-options-browse.html diff --git a/platform/features/layout/src/PlotOptionsController.js b/platform/features/plot/src/PlotOptionsController.js similarity index 97% rename from platform/features/layout/src/PlotOptionsController.js rename to platform/features/plot/src/PlotOptionsController.js index fbafe303ee..7af8c23df3 100644 --- a/platform/features/layout/src/PlotOptionsController.js +++ b/platform/features/plot/src/PlotOptionsController.js @@ -21,11 +21,6 @@ *****************************************************************************/ /*global define*/ -/** - * This bundle implements object types and associated views for - * display-building. - * @namespace platform/features/layout - */ define( ['./PlotOptionsForm'], function (PlotOptionsForm) { @@ -46,7 +41,7 @@ define( * Layout view. It arranges frames according to saved configuration * and provides methods for updating these based on mouse * movement. - * @memberof platform/features/layout + * @memberof platform/features/plot * @constructor * @param {Scope} $scope the controller's Angular scope */ diff --git a/platform/features/layout/src/PlotOptionsForm.js b/platform/features/plot/src/PlotOptionsForm.js similarity index 99% rename from platform/features/layout/src/PlotOptionsForm.js rename to platform/features/plot/src/PlotOptionsForm.js index e72c34d6b9..d21106318f 100644 --- a/platform/features/layout/src/PlotOptionsForm.js +++ b/platform/features/plot/src/PlotOptionsForm.js @@ -29,7 +29,7 @@ define( /** * A class for encapsulating structure and behaviour of the plot * options form - * @memberOf platform/features/layout + * @memberOf platform/features/plot * @param topic * @constructor */ diff --git a/platform/features/layout/test/PlotOptionsControllerSpec.js b/platform/features/plot/test/PlotOptionsControllerSpec.js similarity index 100% rename from platform/features/layout/test/PlotOptionsControllerSpec.js rename to platform/features/plot/test/PlotOptionsControllerSpec.js diff --git a/platform/features/layout/test/PlotOptionsFormSpec.js b/platform/features/plot/test/PlotOptionsFormSpec.js similarity index 100% rename from platform/features/layout/test/PlotOptionsFormSpec.js rename to platform/features/plot/test/PlotOptionsFormSpec.js From 3ae8fcc8b487c6d12d3aed867d36eede8e529b51 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 12:21:06 -0800 Subject: [PATCH 15/76] [CSV Export] Add CSV library as dependency For use in general-purpose CSV export service, #649 --- bower.json | 3 ++- main.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bower.json b/bower.json index dd0ebbd06a..1fe4389b6c 100644 --- a/bower.json +++ b/bower.json @@ -15,6 +15,7 @@ "text": "requirejs-text#^2.0.14", "es6-promise": "^3.0.2", "screenfull": "^3.0.0", - "node-uuid": "^1.4.7" + "node-uuid": "^1.4.7", + "comma-separated-values": "^3.6.4" } } diff --git a/main.js b/main.js index ab911921ec..7d2da35534 100644 --- a/main.js +++ b/main.js @@ -26,6 +26,7 @@ requirejs.config({ "legacyRegistry": "src/legacyRegistry", "angular": "bower_components/angular/angular.min", "angular-route": "bower_components/angular-route/angular-route.min", + "csv": "bower_components/comma-separated-values/csv.min", "es6-promise": "bower_components/es6-promise/promise.min", "moment": "bower_components/moment/moment", "moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format", From 15eb4b047fb604e2b6fe35cba77a8a9b9404ba2f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 12:47:57 -0800 Subject: [PATCH 16/76] [CSV Export] Add empty scripts for CSV export --- platform/exporters/ExportService.js | 26 +++++++++++++++++++ platform/exporters/bundle.js | 40 +++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 platform/exporters/ExportService.js create mode 100644 platform/exporters/bundle.js diff --git a/platform/exporters/ExportService.js b/platform/exporters/ExportService.js new file mode 100644 index 0000000000..a5a7c8a3d3 --- /dev/null +++ b/platform/exporters/ExportService.js @@ -0,0 +1,26 @@ +/***************************************************************************** + * 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(['csv'], function (CSV) { + +}); diff --git a/platform/exporters/bundle.js b/platform/exporters/bundle.js new file mode 100644 index 0000000000..62c2f690ee --- /dev/null +++ b/platform/exporters/bundle.js @@ -0,0 +1,40 @@ +/***************************************************************************** + * 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([ + "./ExportService", + "legacyRegistry" +], function (ExportService, legacyRegistry) { + 'use strict'; + + legacyRegistry.register("platform/exporters", { + extensions: { + services: [ + { + key: "exportService", + implementation: ExportService + } + ] + } + }); +}); From cec6295d24725c816483d01669a169faf095caf3 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 13:02:21 -0800 Subject: [PATCH 17/76] [CSV Export] Sketch in exportService --- platform/exporters/ExportService.js | 16 +++++++++++++++- platform/exporters/bundle.js | 7 ++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/platform/exporters/ExportService.js b/platform/exporters/ExportService.js index a5a7c8a3d3..49ad8c2887 100644 --- a/platform/exporters/ExportService.js +++ b/platform/exporters/ExportService.js @@ -19,8 +19,22 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ +/*global define,Blob*/ define(['csv'], function (CSV) { + function ExportService(saveAs) { + this.saveAs = saveAs; + } + + ExportService.prototype.exportCSV = function (rows, options) { + var headers = (options && options.headers) || + (Object.keys((rows[0] || {}).sort())), + filename = (options && options.filename) || "export.csv", + csvText = new CSV(rows, { header: headers }).encode(), + blob = new Blob(csvText, { type: "text/csv" }); + this.saveAs(blob, filename); + }; + + return ExportService; }); diff --git a/platform/exporters/bundle.js b/platform/exporters/bundle.js index 62c2f690ee..1de3d0eef7 100644 --- a/platform/exporters/bundle.js +++ b/platform/exporters/bundle.js @@ -32,7 +32,12 @@ define([ services: [ { key: "exportService", - implementation: ExportService + implementation: function () { + return new ExportService(function (blob, name) { + // TODO: Replace with FileSaver.js + console.log(blob, name); + }); + } } ] } From 750a5648d2df805d111a9114741fda11a68f6f3d Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 13:31:08 -0800 Subject: [PATCH 18/76] [CSV Export] Upgrade PhantomJS ...for Blob support. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2eb6e9273b..45797a78c5 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "marked": "^0.3.5", "mkdirp": "^0.5.1", "moment": "^2.11.1", - "phantomjs": "^1.9.19", + "phantomjs-prebuilt": "^2.0.0", "requirejs": "^2.1.17", "split": "^1.0.0" }, From 8868b6a1305fa24722cf894a527adf27a3fd69ba Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 13:32:21 -0800 Subject: [PATCH 19/76] [CSV Export] Begin testing exportService ...including fixes to immediately-identified errors. --- platform/exporters/ExportService.js | 4 +- platform/exporters/ExportServiceSpec.js | 60 +++++++++++++++++++++++++ test-main.js | 1 + 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 platform/exporters/ExportServiceSpec.js diff --git a/platform/exporters/ExportService.js b/platform/exporters/ExportService.js index 49ad8c2887..424fc4e153 100644 --- a/platform/exporters/ExportService.js +++ b/platform/exporters/ExportService.js @@ -29,10 +29,10 @@ define(['csv'], function (CSV) { ExportService.prototype.exportCSV = function (rows, options) { var headers = (options && options.headers) || - (Object.keys((rows[0] || {}).sort())), + (Object.keys((rows[0] || {})).sort()), filename = (options && options.filename) || "export.csv", csvText = new CSV(rows, { header: headers }).encode(), - blob = new Blob(csvText, { type: "text/csv" }); + blob = new Blob([ csvText ] , { type: "text/csv" }); this.saveAs(blob, filename); }; diff --git a/platform/exporters/ExportServiceSpec.js b/platform/exporters/ExportServiceSpec.js new file mode 100644 index 0000000000..7c54273209 --- /dev/null +++ b/platform/exporters/ExportServiceSpec.js @@ -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,describe,it,expect,beforeEach,waitsFor,jasmine*/ + +define( + ["./ExportService", "csv"], + function (ExportService, CSV) { + 'use strict'; + + describe("ExportService", function () { + var mockSaveAs, + testRows, + exportService; + + beforeEach(function () { + testRows = [ + { a: 1, b: 2, c: 3 }, + { a: 4, b: 5, c: 6 }, + { a: 7, b: 8, c: 9 } + ]; + mockSaveAs = jasmine.createSpy('saveAs'); + exportService = new ExportService(mockSaveAs); + }); + + describe("#exportCSV(rows)", function () { + beforeEach(function () { + exportService.exportCSV(testRows); + }); + + it("triggers saving of a file", function () { + expect(mockSaveAs).toHaveBeenCalledWith( + jasmine.any(Blob), + jasmine.any(String) + ); + }); + }); + + }); + + } +); \ No newline at end of file diff --git a/test-main.js b/test-main.js index 2e67985d60..9c9d715e21 100644 --- a/test-main.js +++ b/test-main.js @@ -46,6 +46,7 @@ requirejs.config({ "legacyRegistry": "src/legacyRegistry", "angular": "bower_components/angular/angular.min", "angular-route": "bower_components/angular-route/angular-route.min", + "csv": "bower_components/comma-separated-values/csv.min", "es6-promise": "bower_components/es6-promise/promise.min", "moment": "bower_components/moment/moment", "moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format", From 013690e0df5923082d8a39b73caee75657d47639 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 13:58:17 -0800 Subject: [PATCH 20/76] [CSV Export] Add test case which examines CSV --- platform/exporters/ExportServiceSpec.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/platform/exporters/ExportServiceSpec.js b/platform/exporters/ExportServiceSpec.js index 7c54273209..878476d2d2 100644 --- a/platform/exporters/ExportServiceSpec.js +++ b/platform/exporters/ExportServiceSpec.js @@ -19,7 +19,7 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,waitsFor,jasmine*/ +/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,Blob,FileReader*/ define( ["./ExportService", "csv"], @@ -29,21 +29,35 @@ define( describe("ExportService", function () { var mockSaveAs, testRows, + csvContents, exportService; + function finishedReadingCSV() { + return !!csvContents; + } + beforeEach(function () { + csvContents = undefined; testRows = [ { a: 1, b: 2, c: 3 }, { a: 4, b: 5, c: 6 }, { a: 7, b: 8, c: 9 } ]; mockSaveAs = jasmine.createSpy('saveAs'); + mockSaveAs.andCallFake(function (blob) { + var reader = new FileReader(); + reader.onloadend = function () { + csvContents = new CSV(reader.result).parse(); + }; + reader.readAsText(blob); + }); exportService = new ExportService(mockSaveAs); }); describe("#exportCSV(rows)", function () { beforeEach(function () { exportService.exportCSV(testRows); + waitsFor(finishedReadingCSV); }); it("triggers saving of a file", function () { @@ -52,6 +66,10 @@ define( jasmine.any(String) ); }); + + it("includes headers from the data set", function () { + expect(csvContents[0]).toEqual([ 'a', 'b', 'c' ]); + }); }); }); From 54c67b891c21cff84d7eb5e5af168d0eae0460e3 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 13:59:03 -0800 Subject: [PATCH 21/76] [CSV Export] Update PhantomJS version Use version 2.1+ for availability of Linux binaries; incidentally addresses #258. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 45797a78c5..0409ea31e8 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "marked": "^0.3.5", "mkdirp": "^0.5.1", "moment": "^2.11.1", - "phantomjs-prebuilt": "^2.0.0", + "phantomjs-prebuilt": "^2.1.0", "requirejs": "^2.1.17", "split": "^1.0.0" }, From 300d71ddc234da57a6d7b94bc51258876be603d8 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 14:03:15 -0800 Subject: [PATCH 22/76] [CSV Export] Verify CSV data content --- platform/exporters/ExportServiceSpec.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/platform/exporters/ExportServiceSpec.js b/platform/exporters/ExportServiceSpec.js index 878476d2d2..5e1c7e33bb 100644 --- a/platform/exporters/ExportServiceSpec.js +++ b/platform/exporters/ExportServiceSpec.js @@ -68,7 +68,19 @@ define( }); it("includes headers from the data set", function () { - expect(csvContents[0]).toEqual([ 'a', 'b', 'c' ]); + expect(csvContents[0]) + .toEqual(Object.keys(testRows[0]).sort()); + }); + + it("includes data from the data set", function () { + var headers = csvContents[0], + expectedData = testRows.map(function (row) { + return headers.map(function (key) { + return String(row[key]); + }); + }); + // Everything after header should be data + expect(csvContents.slice(1)).toEqual(expectedData); }); }); From c4d5643ea7557e495c6907f9c18dc0bdeda610b9 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 14:06:40 -0800 Subject: [PATCH 23/76] [CSV Export] Test with headers specified --- platform/exporters/ExportServiceSpec.js | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/platform/exporters/ExportServiceSpec.js b/platform/exporters/ExportServiceSpec.js index 5e1c7e33bb..41a66bbffe 100644 --- a/platform/exporters/ExportServiceSpec.js +++ b/platform/exporters/ExportServiceSpec.js @@ -84,6 +84,41 @@ define( }); }); + describe("#exportCSV(rows, options.headers)", function () { + var testHeaders; + + beforeEach(function () { + testHeaders = [ 'a', 'b' ]; + exportService + .exportCSV(testRows, { headers: testHeaders }); + waitsFor(finishedReadingCSV); + }); + + it("triggers saving of a file", function () { + expect(mockSaveAs).toHaveBeenCalledWith( + jasmine.any(Blob), + jasmine.any(String) + ); + }); + + it("includes only the specified headers", function () { + expect(csvContents[0]) + .toEqual(testHeaders); + expect(csvContents[0]) + .not.toEqual(Object.keys(testRows[0]).sort()); + }); + + it("includes a subset data from the data set", function () { + var headers = testHeaders, + expectedData = testRows.map(function (row) { + return headers.map(function (key) { + return String(row[key]); + }); + }); + expect(csvContents.slice(1)).toEqual(expectedData); + }); + }); + }); } From c07dc0ea8b2580257b124cd2c444f545f1cd6239 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 14:08:47 -0800 Subject: [PATCH 24/76] [CSV Export] Test with specified filename --- platform/exporters/ExportServiceSpec.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/platform/exporters/ExportServiceSpec.js b/platform/exporters/ExportServiceSpec.js index 41a66bbffe..4a634ef880 100644 --- a/platform/exporters/ExportServiceSpec.js +++ b/platform/exporters/ExportServiceSpec.js @@ -119,6 +119,25 @@ define( }); }); + describe("#exportCSV(rows, options.filename)", function () { + var testFilename; + + beforeEach(function () { + testFilename = "some-test-filename.csv"; + exportService + .exportCSV(testRows, { filename: testFilename }); + waitsFor(finishedReadingCSV); + }); + + it("saves a file with the specified name", function () { + expect(mockSaveAs).toHaveBeenCalledWith( + jasmine.any(Blob), + testFilename + ); + }); + }); + + }); } From cb0f191ab352069ee5615855cb282625ae645c22 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 14:39:24 -0800 Subject: [PATCH 25/76] [CSV Export] Add FileSaver dependency ...to handle export part of CSV export. --- bower.json | 3 ++- main.js | 1 + platform/exporters/bundle.js | 8 +++----- test-main.js | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index 1fe4389b6c..b4bf273af2 100644 --- a/bower.json +++ b/bower.json @@ -16,6 +16,7 @@ "es6-promise": "^3.0.2", "screenfull": "^3.0.0", "node-uuid": "^1.4.7", - "comma-separated-values": "^3.6.4" + "comma-separated-values": "^3.6.4", + "FileSaver.js": "^0.0.2" } } diff --git a/main.js b/main.js index 7d2da35534..f804c747d5 100644 --- a/main.js +++ b/main.js @@ -30,6 +30,7 @@ requirejs.config({ "es6-promise": "bower_components/es6-promise/promise.min", "moment": "bower_components/moment/moment", "moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format", + "saveAs": "bower_components/FileSaver.js/FileSaver.min", "screenfull": "bower_components/screenfull/dist/screenfull.min", "text": "bower_components/text/text", "uuid": "bower_components/node-uuid/uuid" diff --git a/platform/exporters/bundle.js b/platform/exporters/bundle.js index 1de3d0eef7..36c05eb3b0 100644 --- a/platform/exporters/bundle.js +++ b/platform/exporters/bundle.js @@ -23,8 +23,9 @@ define([ "./ExportService", + "saveAs", "legacyRegistry" -], function (ExportService, legacyRegistry) { +], function (ExportService, saveAs, legacyRegistry) { 'use strict'; legacyRegistry.register("platform/exporters", { @@ -33,10 +34,7 @@ define([ { key: "exportService", implementation: function () { - return new ExportService(function (blob, name) { - // TODO: Replace with FileSaver.js - console.log(blob, name); - }); + return new ExportService(saveAs); } } ] diff --git a/test-main.js b/test-main.js index 9c9d715e21..13f1bf367d 100644 --- a/test-main.js +++ b/test-main.js @@ -50,6 +50,7 @@ requirejs.config({ "es6-promise": "bower_components/es6-promise/promise.min", "moment": "bower_components/moment/moment", "moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format", + "saveAs": "bower_components/FileSaver.js/FileSaver.min", "screenfull": "bower_components/screenfull/dist/screenfull.min", "text": "bower_components/text/text", "uuid": "bower_components/node-uuid/uuid" From 8c1264ab22457dbfe6a870e81ae19bf80c69c938 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 15:07:18 -0800 Subject: [PATCH 26/76] [CSV Export] Add example of exportService usage --- example/export/bundle.js | 84 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 example/export/bundle.js diff --git a/example/export/bundle.js b/example/export/bundle.js new file mode 100644 index 0000000000..13b9b35e01 --- /dev/null +++ b/example/export/bundle.js @@ -0,0 +1,84 @@ +/***************************************************************************** + * 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"; + + function ExportTelemetryAsCSVAction(exportService, context) { + this.exportService = exportService; + this.context = context; + } + + ExportTelemetryAsCSVAction.prototype.perform = function () { + var context = this.context, + domainObject = context.domainObject, + telemetry = domainObject.getCapability("telemetry"), + metadata = telemetry.getMetadata(), + domains = metadata.domains, + ranges = metadata.ranges, + exportService = this.exportService; + + function getName(domainOrRange) { + return domainOrRange.name; + } + + telemetry.requestData({}).then(function (series) { + var headers = domains.map(getName).concat(ranges.map(getName)), + rows = [], + row, + i; + for (i = 0; i < series.getPointCount(); i += 1) { + row = {}; + domains.forEach(function (domain) { + row[domain.name] = series.getDomainValue(i, domain.key); + }); + ranges.forEach(function (range) { + row[range.name] = series.getRangeValue(i, range.key); + }); + rows.push(row); + } + exportService.exportCSV(rows, { headers: headers }); + }); + }; + + ExportTelemetryAsCSVAction.appliesTo = function (context) { + return context.domainObject && + context.domainObject.hasCapability("telemetry"); + }; + + legacyRegistry.register("example/export", { + "name": "Example of using CSV Export", + "extensions": { + "actions": [ + { + "key": "example.export", + "name": "Export Telemetry as CSV", + "implementation": ExportTelemetryAsCSVAction, + "category": "contextual", + "glyph": "\u0033", + "depends": [ "exportService" ] + } + ] + } + }); +}); From 882cf80ba9badae9926b97f3cf78445a18b89ad4 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 15:07:51 -0800 Subject: [PATCH 27/76] [CSV Export] Include exportService as active bundle --- main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/main.js b/main.js index f804c747d5..dc68632efa 100644 --- a/main.js +++ b/main.js @@ -67,6 +67,7 @@ define([ './platform/commonUI/notification/bundle', './platform/containment/bundle', './platform/execution/bundle', + './platform/exporters/bundle', './platform/telemetry/bundle', './platform/features/clock/bundle', './platform/features/events/bundle', From 2f0fd8eebde4993a44f7430f8fcf3ec81e347f2b Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 15:12:47 -0800 Subject: [PATCH 28/76] [CSV Export] Add JSDoc to ExportService --- platform/exporters/ExportService.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/platform/exporters/ExportService.js b/platform/exporters/ExportService.js index 424fc4e153..c9f60c575c 100644 --- a/platform/exporters/ExportService.js +++ b/platform/exporters/ExportService.js @@ -23,10 +23,25 @@ define(['csv'], function (CSV) { + /** + * The `exportService` provides + * @param {function} saveAs a function that takes a Blob and a file name + * and triggers a file download as a consequence + * @constructor + */ function ExportService(saveAs) { this.saveAs = saveAs; } + /** + * Export a set of data as comma-separated values. Triggers a download + * using the function provided when the ExportService was instantiated. + * + * @param {Object[]} rows an array of objects containing key-value pairs, + * where keys are header names, and values are values + * @param {ExportOptions} [options] additional parameters for the file + * export + */ ExportService.prototype.exportCSV = function (rows, options) { var headers = (options && options.headers) || (Object.keys((rows[0] || {})).sort()), @@ -36,5 +51,15 @@ define(['csv'], function (CSV) { this.saveAs(blob, filename); }; + /** + * Additional parameters for file export. + * @typedef ExportOptions + * @property {string} filename the name of the file to write + * @property {string[]} headers column header names, both as they + * should appear in the output and as they should be + * used to look up values from the data set. Defaults + * to the keys in the first object in the data set. + */ + return ExportService; }); From 659d05f73aff2793b02ccbbdbb5489c60bf9e762 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 16:05:41 -0800 Subject: [PATCH 29/76] [CSV Export] Update LICENSES.md ...to reflect usage of CSV.js and FileSaver.js, added to support export. --- LICENSES.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/LICENSES.md b/LICENSES.md index f76c6c26b7..6e270d3937 100644 --- a/LICENSES.md +++ b/LICENSES.md @@ -416,6 +416,66 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- +### CSV.js + +#### Info + +* Link: https://github.com/knrz/CSV.js + +* Version: 3.6.4 + +* Authors: Kash Nouroozi + +* Description: Encoder for CSV (comma separated values) export + +#### License + +Copyright (c) 2014 Kash Nouroozi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +### FileSaver.js + +#### Info + +* Link: https://github.com/eligrey/FileSaver.js/ + +* Version: 0.0.2 + +* Authors: Eli Grey + +* Description: File download initiator (for file exports) + +#### License + +Copyright © 2015 Eli Grey. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + ### Json.NET #### Info From 92e49d6b76f7b333710814ba9ad5ad07bd564bbb Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 16:10:30 -0800 Subject: [PATCH 30/76] [CSV Export] Add licensing info for run-time Add licensing info for CSV.js and FileSaver.js as licenses which can be displayed at run-time. --- platform/exporters/bundle.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/platform/exporters/bundle.js b/platform/exporters/bundle.js index 36c05eb3b0..42d6b674a1 100644 --- a/platform/exporters/bundle.js +++ b/platform/exporters/bundle.js @@ -37,6 +37,28 @@ define([ return new ExportService(saveAs); } } + ], + licenses: [ + { + "name": "CSV.js", + "version": "3.6.4", + "author": "Kash Nouroozi", + "description": "Encoder for CSV (comma separated values) export", + "website": "https://github.com/knrz/CSV.js", + "copyright": "Copyright (c) 2014 Kash Nouroozi", + "license": "license-mit", + "link": "https://github.com/knrz/CSV.js/blob/3.6.4/LICENSE" + }, + { + "name": "FileSaver.js", + "version": "0.0.2", + "author": "Eli Grey", + "description": "File download initiator (for file exports)", + "website": "https://github.com/eligrey/FileSaver.js/", + "copyright": "Copyright © 2015 Eli Grey.", + "license": "license-mit", + "link": "https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md" + } ] } }); From 3adc5f1e266578288ee677ab20181c238cf70887 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 5 Feb 2016 16:56:26 -0800 Subject: [PATCH 31/76] [CSV Export] Upgrade to phantomjs launcher 1.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0409ea31e8..b00bb180af 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "karma-coverage": "^0.5.3", "karma-html-reporter": "^0.2.7", "karma-jasmine": "^0.1.5", - "karma-phantomjs-launcher": "^0.2.3", + "karma-phantomjs-launcher": "^1.0.0", "karma-requirejs": "^0.2.2", "lodash": "^3.10.1", "markdown-toc": "^0.11.7", From be031285b93618325da694c43993894764a84a5e Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 8 Feb 2016 17:46:21 -0800 Subject: [PATCH 32/76] Added form-level change event --- platform/features/plot/src/PlotOptionsForm.js | 29 +++++++------------ .../res/templates/controls/checkbox.html | 2 +- .../forms/res/templates/controls/radio.html | 2 +- .../forms/res/templates/controls/select.html | 2 +- .../res/templates/controls/textfield.html | 2 +- platform/forms/res/templates/form.html | 2 +- platform/forms/src/MCTControl.js | 2 ++ 7 files changed, 18 insertions(+), 23 deletions(-) diff --git a/platform/features/plot/src/PlotOptionsForm.js b/platform/features/plot/src/PlotOptionsForm.js index d21106318f..c6c5d2b343 100644 --- a/platform/features/plot/src/PlotOptionsForm.js +++ b/platform/features/plot/src/PlotOptionsForm.js @@ -46,6 +46,7 @@ define( */ this.xAxisForm = { 'name':'x-axis', + 'onchange': onchange, 'sections': [{ 'name': 'x-axis', 'rows': [ @@ -53,7 +54,6 @@ define( 'name': 'Domain', 'control': 'select', 'key': 'key', - 'onchange': onchange, 'options': [ {'name':'scet', 'value': 'scet'}, {'name':'sclk', 'value': 'sclk'}, @@ -65,6 +65,7 @@ define( this.yAxisForm = { 'name':'y-axis', + 'onchange': onchange, 'sections': [{ // Will need to be repeated for each y-axis, with a // distinct name for each. Ideally the name of the axis @@ -74,28 +75,24 @@ define( { 'name': 'Autoscale', 'control': 'checkbox', - 'key': 'autoscale', - 'onchange': onchange + 'key': 'autoscale' }, { 'name': 'Min', 'control': 'textfield', 'key': 'min', - 'pattern': '[0-9]', - 'onchange': onchange + 'pattern': '[0-9]' }, { 'name': 'Max', 'control': 'textfield', 'key': 'max', - 'pattern': '[0-9]', - 'onchange': onchange + 'pattern': '[0-9]' }, { 'name': 'Range', 'control': 'select', 'key': 'key', - 'onchange': onchange, 'options': [ {'name':'eu', 'value': 'eu'}, {'name':'dn', 'value': 'dn'}, @@ -107,14 +104,14 @@ define( }; this.plotSeriesForm = { 'name':'Series Options', + 'onchange': onchange, 'sections': [ { rows: [ { 'name': 'Color', 'control': 'color', - 'key': 'color', - 'onchange': onchange + 'key': 'color' }] }, { @@ -122,8 +119,7 @@ define( { 'name': 'Markers', 'control': 'checkbox', - 'key': 'markers', - 'onchange': onchange + 'key': 'markers' } ] }, @@ -133,22 +129,19 @@ define( 'name': 'No Line', 'control': 'radio', 'key': 'lineType', - 'value': 'noLine', - 'onchange': onchange + 'value': 'noLine' }, { 'name': 'Step Line', 'control': 'radio', 'key': 'lineType', - 'value': 'stepLine', - 'onchange': onchange + 'value': 'stepLine' }, { 'name': 'Linear Line', 'control': 'radio', 'key': 'lineType', - 'value': 'linearLine', - 'onchange': onchange + 'value': 'linearLine' } ] } diff --git a/platform/forms/res/templates/controls/checkbox.html b/platform/forms/res/templates/controls/checkbox.html index 45b6915a36..c676fb85cd 100644 --- a/platform/forms/res/templates/controls/checkbox.html +++ b/platform/forms/res/templates/controls/checkbox.html @@ -23,7 +23,7 @@ diff --git a/platform/forms/res/templates/controls/radio.html b/platform/forms/res/templates/controls/radio.html index d9f4e36b04..d5fb7284aa 100644 --- a/platform/forms/res/templates/controls/radio.html +++ b/platform/forms/res/templates/controls/radio.html @@ -24,7 +24,7 @@ name="mctControl" ng-model="ngModel[field]" ng-disabled="ngDisabled" - ng-change="structure.onchange(ngModel[field])" + ng-change="ngChange()" ng-value="structure.value"> diff --git a/platform/forms/res/templates/controls/select.html b/platform/forms/res/templates/controls/select.html index d4b3ee50ef..9742bfb7d0 100644 --- a/platform/forms/res/templates/controls/select.html +++ b/platform/forms/res/templates/controls/select.html @@ -24,7 +24,7 @@ ng-model="ngModel[field]" ng-options="opt.value as opt.name for opt in options" ng-required="ngRequired" - ng-change="structure.onchange(ngModel[field])" + ng-change="ngChange()" name="mctControl"> diff --git a/platform/forms/res/templates/controls/textfield.html b/platform/forms/res/templates/controls/textfield.html index 948f7ef13d..c79cc83b90 100644 --- a/platform/forms/res/templates/controls/textfield.html +++ b/platform/forms/res/templates/controls/textfield.html @@ -25,7 +25,7 @@ ng-required="ngRequired" ng-model="ngModel[field]" ng-pattern="ngPattern" - ng-change="structure.onchange(ngModel[field])" + ng-change="ngChange()" size="{{structure.size}}" name="mctControl"> diff --git a/platform/forms/res/templates/form.html b/platform/forms/res/templates/form.html index b99e951aed..b2e9aa8d01 100644 --- a/platform/forms/res/templates/form.html +++ b/platform/forms/res/templates/form.html @@ -41,7 +41,7 @@ -
                      -
                      +
                      +
                      -
                      +
                      diff --git a/platform/commonUI/browse/res/templates/browse/object-properties.html b/platform/commonUI/browse/res/templates/browse/object-properties.html index 9e9e21079e..a15efed6c9 100644 --- a/platform/commonUI/browse/res/templates/browse/object-properties.html +++ b/platform/commonUI/browse/res/templates/browse/object-properties.html @@ -57,4 +57,4 @@
                    -
                  \ No newline at end of file +
                  \ No newline at end of file diff --git a/platform/commonUI/browse/src/InspectorRegion.js b/platform/commonUI/browse/src/InspectorRegion.js index accbac8fbd..cc47ae2db8 100644 --- a/platform/commonUI/browse/src/InspectorRegion.js +++ b/platform/commonUI/browse/src/InspectorRegion.js @@ -36,7 +36,7 @@ define( * @constructor */ function InspectorRegion() { - Region.call(this); + Region.call(this, {'name': 'Inspector'}); this.buildRegion(); } @@ -48,9 +48,9 @@ define( * @private */ InspectorRegion.prototype.buildRegion = function() { - var metadataPart = { - name: 'properties-location', - title: 'Properties and Location', + var metadataRegion = { + name: 'metadata', + title: 'Metadata Region', // Which modes should the region part be visible in? If // nothing provided here, then assumed that part is visible // in both. The visibility or otherwise of a region part @@ -61,7 +61,7 @@ define( key: 'object-properties' } }; - this.addPart(metadataPart, 0); + this.addRegion(new Region(metadataRegion), 0); }; return InspectorRegion; diff --git a/platform/commonUI/browse/src/TypeRegionDecorator.js b/platform/commonUI/browse/src/TypeRegionDecorator.js deleted file mode 100644 index 7c3f60994f..0000000000 --- a/platform/commonUI/browse/src/TypeRegionDecorator.js +++ /dev/null @@ -1,90 +0,0 @@ -/***************************************************************************** - * 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*/ - -define( - [ - './InspectorRegion' - ], - function (InspectorRegion) { - "use strict"; - - /** - * Adds default browse screen regions to Type definitions. Screen - * regions are sections of the browse and edit view of an object - * that can be customized on a per-type basis. Within - * {@link Region}s are {@link RegionPart}s. Policies can be used to - * decide which parts are visible or not based on object state. - * @memberOf platform/commonUI/regions - * @see {@link Region}, {@link RegionPart}, {@link EditableRegionPolicy} - * @constructor - */ - function TypeRegionDecorator(typeService) { - this.typeService = typeService; - } - - /** - * Read Type bundle definition, and add default region definitions - * if none provided. - * @private - * @param type - * @returns {*} - */ - TypeRegionDecorator.prototype.decorateType = function (type) { - var regions = type.getDefinition().regions || {}; - - regions.inspector = regions.inspector || new InspectorRegion(); - - type.getDefinition().regions = regions; - - return type; - }; - - /** - * Override the provider functions in order to return decorated Type - * objects. - * @returns {Array|*} - */ - TypeRegionDecorator.prototype.listTypes = function() { - var self = this, - types = this.typeService.listTypes(); - - return types.map(function (type) { - return self.decorateType(type); - }); - }; - - /** - * Override the provider function in order to return decorated Type - * objects. - * @param key - */ - TypeRegionDecorator.prototype.getType = function(key) { - var self = this, - type = this.typeService.getType(key); - - return self.decorateType(type); - }; - - return TypeRegionDecorator; - } -); diff --git a/platform/commonUI/browse/test/InspectorRegionSpec.js b/platform/commonUI/browse/test/InspectorRegionSpec.js index 3eb9428518..e455a8df4d 100644 --- a/platform/commonUI/browse/test/InspectorRegionSpec.js +++ b/platform/commonUI/browse/test/InspectorRegionSpec.js @@ -37,7 +37,7 @@ define( }); it("creates default region parts", function () { - expect(inspectorRegion.parts.length).toBe(1); + expect(inspectorRegion.regions.length).toBe(1); }); }); diff --git a/platform/commonUI/browse/test/TypeRegionDecoratorSpec.js b/platform/commonUI/browse/test/TypeRegionDecoratorSpec.js deleted file mode 100644 index a525df5b9b..0000000000 --- a/platform/commonUI/browse/test/TypeRegionDecoratorSpec.js +++ /dev/null @@ -1,70 +0,0 @@ -/***************************************************************************** - * 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,describe,it,expect,beforeEach,waitsFor,jasmine*/ - -/** - * MCTIncudeSpec. Created by vwoeltje on 11/6/14. - */ -define( - ["../src/TypeRegionDecorator"], - function (TypeRegionDecorator) { - "use strict"; - - describe("The type region decorator", function () { - var typeRegionDecorator, - mockTypeService, - mockType, - mockTypeDefinition; - - beforeEach(function () { - mockTypeDefinition = {}; - - mockType = jasmine.createSpyObj('type', [ - 'getDefinition' - ]); - mockType.getDefinition.andReturn(mockTypeDefinition); - - mockTypeService = jasmine.createSpyObj('typeService', [ - 'listTypes', - 'getType' - ]); - mockTypeService.getType.andReturn(mockType); - mockTypeService.listTypes.andReturn([mockType]); - - typeRegionDecorator = new TypeRegionDecorator(mockTypeService); - }); - - it("decorates individual type definitions with basic inspector" + - " region", function () { - typeRegionDecorator.getType('someType'); - expect(mockTypeDefinition.regions).toBeDefined(); - }); - - it("decorates all type definitions with basic inspector" + - " region", function () { - typeRegionDecorator.listTypes(); - expect(mockTypeDefinition.regions).toBeDefined(); - }); - - }); - } -); \ No newline at end of file diff --git a/platform/commonUI/regions/bundle.js b/platform/commonUI/regions/bundle.js index dce4543b60..d361347ad4 100644 --- a/platform/commonUI/regions/bundle.js +++ b/platform/commonUI/regions/bundle.js @@ -22,11 +22,11 @@ /*global define*/ define([ - './src/RegionController', + './src/InspectorController', './src/EditableRegionPolicy', 'legacyRegistry' ], function ( - RegionController, + InspectorController, EditableRegionPolicy, legacyRegistry ) { @@ -36,8 +36,8 @@ define([ "extensions": { "controllers": [ { - "key": "RegionController", - "implementation": RegionController, + "key": "InspectorController", + "implementation": InspectorController, "depends": [ "$scope", "policyService" diff --git a/platform/commonUI/regions/src/RegionController.js b/platform/commonUI/regions/src/InspectorController.js similarity index 69% rename from platform/commonUI/regions/src/RegionController.js rename to platform/commonUI/regions/src/InspectorController.js index 4641811672..7bc18fd342 100644 --- a/platform/commonUI/regions/src/RegionController.js +++ b/platform/commonUI/regions/src/InspectorController.js @@ -22,17 +22,17 @@ /*global define,Promise*/ define( - [], - function () { + ['../../browse/src/InspectorRegion'], + function (InspectorRegion) { "use strict"; /** - * The RegionController adds region data for a domain object's type + * The InspectorController adds region data for a domain object's type * to the scope. * * @constructor */ - function RegionController($scope, policyService) { + function InspectorController($scope, policyService) { var domainObject = $scope.domainObject, typeCapability = domainObject.getCapability('type'); @@ -41,21 +41,16 @@ define( * @param regions * @returns {{}} */ - function filterParts(regions) { + function filterRegions(inspector) { //Dupe so we're not modifying the type definition. - var filteredRegions = {}; - Object.keys(regions).forEach(function(regionName) { - filteredRegions[regionName] = Object.create(regions[regionName]); - filteredRegions[regionName].parts = (regions[regionName].parts || []).filter(function(part){ - return policyService.allow('region', part, domainObject); - }); + return inspector.regions && inspector.regions.filter(function(region) { + return policyService.allow('region', region, domainObject); }); - return filteredRegions; } - $scope.regions = filterParts(typeCapability.getDefinition().regions); + $scope.regions = filterRegions(typeCapability.getDefinition().inspector || new InspectorRegion()); } - return RegionController; + return InspectorController; } ); \ No newline at end of file diff --git a/platform/commonUI/regions/src/Region.js b/platform/commonUI/regions/src/Region.js index 3cc61c45ac..9e95590ca9 100644 --- a/platform/commonUI/regions/src/Region.js +++ b/platform/commonUI/regions/src/Region.js @@ -34,13 +34,13 @@ define( */ /** - * @typeDef {object} RegionPart + * @typeDef {object} RegionConfiguration * @property {string} name A unique name for this region part - * @property {PartContents} content the details of the region part - * being defined - * @property {Array} [modes] the modes that this region part + * @property {PartContents} [content] the details of the region being + * defined + * @property {Array} [modes] the modes that this region * should be included in. Options are 'edit' and 'browse'. By - * default, will be included in both. Inclusion of region parts is + * default, will be included in both. Inclusion of regions is * determined by policies of category 'region'. By default, the * {EditableRegionPolicy} will be applied. * @memberOf platform/commonUI/regions @@ -54,40 +54,45 @@ define( * @abstract * @constructor */ - function Region() { - this.parts = []; + function Region(configuration) { + configuration = configuration || {}; + this.name = configuration.name; + this.content = configuration.content; + this.modes = configuration.modes; + + this.regions = []; } /** - * Adds a part to this region. - * @param {RegionPart} part the part to add - * @param {number} [index] the position to insert the part. By default + * Adds a sub-region to this region. + * @param {Region} region the part to add + * @param {number} [index] the position to insert the region. By default * will add to the end */ - Region.prototype.addPart = function (part, index){ + Region.prototype.addRegion = function (region, index){ if (index) { - this.parts.splice(index, 0, part); + this.regions.splice(index, 0, region); } else { - this.parts.push(part); + this.regions.push(region); } }; /** - * Removes a part from this region. - * @param {RegionPart | number | strnig} part The region part to - * remove. If a number, will remove the part at that index. If a - * string, will remove the part with the matching name. If an + * Removes a sub-region from this region. + * @param {Region | number | strnig} region The region to + * remove. If a number, will remove the region at that index. If a + * string, will remove the region with the matching name. If an * object, will attempt to remove that object from the Region */ - Region.prototype.removePart = function (part){ - if (typeof part === 'number') { - this.parts.splice(part, 1); - } else if (typeof part === 'string'){ - this.parts = this.parts.filter(function(thisPart) { - return thisPart.name !== part; + Region.prototype.removeRegion = function (region){ + if (typeof region === 'number') { + this.regions.splice(region, 1); + } else if (typeof region === 'string'){ + this.regions = this.regions.filter(function(thisRegion) { + return thisRegion.name !== region; }); } else { - this.parts.splice(this.parts.indexOf(part), 1); + this.regions.splice(this.regions.indexOf(region), 1); } }; diff --git a/platform/commonUI/regions/test/RegionControllerSpec.js b/platform/commonUI/regions/test/InspectorControllerSpec.js similarity index 78% rename from platform/commonUI/regions/test/RegionControllerSpec.js rename to platform/commonUI/regions/test/InspectorControllerSpec.js index 352c5bd088..1fc230f01d 100644 --- a/platform/commonUI/regions/test/RegionControllerSpec.js +++ b/platform/commonUI/regions/test/InspectorControllerSpec.js @@ -22,11 +22,11 @@ /*global define,describe,it,expect,beforeEach,waitsFor,jasmine */ define( - ['../src/RegionController'], - function (RegionController) { + ['../src/InspectorController'], + function (InspectorController) { "use strict"; - describe("The region controller ", function () { + describe("The inspector controller ", function () { var mockScope, mockDomainObject, mockTypeCapability, @@ -36,14 +36,12 @@ define( beforeEach(function(){ mockTypeDefinition = { - regions: + inspector: { - 'regionOne': { - 'parts': [ - {'name': 'Part One'}, - {'name': 'Part Two'} - ] - } + 'regions': [ + {'name': 'Part One'}, + {'name': 'Part Two'} + ] } }; @@ -68,14 +66,14 @@ define( it("filters out regions disallowed by region policy", function() { mockPolicyService.allow.andReturn(false); - controller = new RegionController(mockScope, mockPolicyService); - expect(mockScope.regions.regionOne.parts.length).toBe(0); + controller = new InspectorController(mockScope, mockPolicyService); + expect(mockScope.regions.length).toBe(0); }); it("does not filter out regions allowed by region policy", function() { mockPolicyService.allow.andReturn(true); - controller = new RegionController(mockScope, mockPolicyService); - expect(mockScope.regions.regionOne.parts.length).toBe(2); + controller = new InspectorController(mockScope, mockPolicyService); + expect(mockScope.regions.length).toBe(2); }); }); } diff --git a/platform/commonUI/regions/test/RegionSpec.js b/platform/commonUI/regions/test/RegionSpec.js index 00ef1cb1e6..2e52508d04 100644 --- a/platform/commonUI/regions/test/RegionSpec.js +++ b/platform/commonUI/regions/test/RegionSpec.js @@ -29,77 +29,76 @@ define( describe("The region class ", function () { var region, - part2 = {'name': 'part2'}; + part2 = new Region({'name': 'part2'}); beforeEach(function(){ region = new Region(); - region.parts = [ - {name: 'part1'}, - {name: 'part3'}, - {name: 'part4'} + region.regions = [ + new Region({name: 'part1'}), + new Region({name: 'part3'}), + new Region({name: 'part4'}) ]; }); - it("adding a region part at a specified index adds it in that" + + it("adding a region at a specified index adds it in that" + " position", function() { - region.addPart(part2, 1); + region.addRegion(part2, 1); - expect(region.parts.length).toBe(4); - expect(region.parts[1]).toBe(part2); + expect(region.regions.length).toBe(4); + expect(region.regions[1]).toBe(part2); }); - it("adding a region part without an index adds it at the end", function() { - var partN = {'name': 'partN'}; + it("adding a region without an index adds it at the end", function() { + var partN = new Region({'name': 'partN'}); - region.addPart(partN); + region.addRegion(partN); - expect(region.parts.length).toBe(4); - expect(region.parts[region.parts.length-1]).toBe(partN); + expect(region.regions.length).toBe(4); + expect(region.regions[region.regions.length-1]).toBe(partN); }); - describe("removing a region part", function(){ + describe("removing a region", function(){ var partName = "part2"; beforeEach(function(){ - region.parts = [ - {name: 'part1'}, + region.regions = [ + new Region({name: 'part1'}), part2, - {name: 'part3'}, - {name: 'part4'} + new Region({name: 'part3'}), + new Region({name: 'part4'}) ]; }); - it("with a string matches on region part" + - " name", function() { - expect(region.parts.length).toBe(4); - expect(region.parts.indexOf(part2)).toBe(1); + it("with a string matches on region name", function() { + expect(region.regions.length).toBe(4); + expect(region.regions.indexOf(part2)).toBe(1); - region.removePart(partName); + region.removeRegion(partName); - expect(region.parts.length).toBe(3); - expect(region.parts.indexOf(part2)).toBe(-1); + expect(region.regions.length).toBe(3); + expect(region.regions.indexOf(part2)).toBe(-1); }); it("with a number removes by index", function() { - expect(region.parts.length).toBe(4); - expect(region.parts.indexOf(part2)).toBe(1); + expect(region.regions.length).toBe(4); + expect(region.regions.indexOf(part2)).toBe(1); - region.removePart(1); + region.removeRegion(1); - expect(region.parts.length).toBe(3); - expect(region.parts.indexOf(part2)).toBe(-1); + expect(region.regions.length).toBe(3); + expect(region.regions.indexOf(part2)).toBe(-1); }); it("with object matches that object", function() { - expect(region.parts.length).toBe(4); - expect(region.parts.indexOf(part2)).toBe(1); + expect(region.regions.length).toBe(4); + expect(region.regions.indexOf(part2)).toBe(1); - region.removePart(part2); + region.removeRegion(part2); - expect(region.parts.length).toBe(3); - expect(region.parts.indexOf(part2)).toBe(-1); + expect(region.regions.length).toBe(3); + expect(region.regions.indexOf(part2)).toBe(-1); }); }); }); diff --git a/platform/features/plot/src/PlotOptionsController.js b/platform/features/plot/src/PlotOptionsController.js index 7af8c23df3..4206799986 100644 --- a/platform/features/plot/src/PlotOptionsController.js +++ b/platform/features/plot/src/PlotOptionsController.js @@ -47,67 +47,26 @@ define( */ function PlotOptionsController($scope, topic) { - var self = this, - domainObject = $scope.domainObject, - composition, - mutationListener, - formListener, - configuration = domainObject.getModel().configuration || {}; - + var self = this; + this.$scope = $scope; + this.domainObject = $scope.domainObject; + this.configuration = this.domainObject.getModel().configuration || {}; this.plotOptionsForm = new PlotOptionsForm(topic); + this.composition = []; /* - * Determine whether the changes to the model that triggered a - * mutation event were purely compositional. + Listen for changes to the domain object and update the object's + children. */ - function hasCompositionChanged(oldComposition, newComposition){ - // Framed slightly strangely, but the boolean logic is - // easier to follow for the unchanged case. - var isUnchanged = oldComposition === newComposition || - ( - oldComposition.length === newComposition.length && - oldComposition.every( function (currentValue, index) { - return newComposition[index] && currentValue === newComposition[index]; - }) - ); - return !isUnchanged; - } + this.mutationListener = this.domainObject.getCapability('mutation').listen(function(model) { + if (self.hasCompositionChanged(self.composition, model.composition)) { + self.updateChildren(); + } + }); - /* - Default the plot options model - */ - function defaultConfiguration() { - configuration.plot = configuration.plot || {}; - configuration.plot.xAxis = configuration.plot.xAxis || {}; - configuration.plot.yAxis = configuration.plot.yAxis || {}; // y-axes will be associative array keyed on axis key - configuration.plot.series = configuration.plot.series || {}; // series will be associative array keyed on sub-object id - $scope.configuration = configuration; - } - - /* - When a child is added to, or removed from a plot, update the - plot options model - */ - function updateChildren() { - domainObject.useCapability('composition').then(function(children){ - $scope.children = children; - composition = domainObject.getModel().composition; - children.forEach(function(child){ - configuration.plot.series[child.getId()] = configuration.plot.series[child.getId()] || {}; - }); - }); - } - - /* - On changes to the form, update the configuration on the domain - object - */ - function updateConfiguration() { - domainObject.useCapability('mutation', function(model){ - model.configuration = model.configuration || {}; - model.configuration.plot = configuration.plot; - }); - } + this.formListener = this.plotOptionsForm.listen(function(value){ + self.updateConfiguration(value); + }); /* Set form structures on scope @@ -116,29 +75,71 @@ define( $scope.xAxisForm = this.plotOptionsForm.xAxisForm; $scope.yAxisForm = this.plotOptionsForm.yAxisForm; - /* - Listen for changes to the domain object and update the object's - children. - */ - mutationListener = domainObject.getCapability('mutation').listen(function(model) { - if (hasCompositionChanged(composition, model.composition)) { - updateChildren(); - } - }); - - formListener = this.plotOptionsForm.listen(updateConfiguration); - - defaultConfiguration(); - updateChildren(); - $scope.$on("$destroy", function() { //Clean up any listeners on destruction of controller - mutationListener(); - formListener(); + self.mutationListener(); + self.formListener(); }); + this.defaultConfiguration(); + this.updateChildren(); } + /* + * Determine whether the changes to the model that triggered a + * mutation event were purely compositional. + */ + PlotOptionsController.prototype.hasCompositionChanged = function(oldComposition, newComposition){ + // Framed slightly strangely, but the boolean logic is + // easier to follow for the unchanged case. + var isUnchanged = oldComposition === newComposition || + ( + oldComposition.length === newComposition.length && + oldComposition.every( function (currentValue, index) { + return newComposition[index] && currentValue === newComposition[index]; + }) + ); + return !isUnchanged; + }; + + /* + Default the plot options model + */ + PlotOptionsController.prototype.defaultConfiguration = function () { + this.configuration.plot = this.configuration.plot || {}; + this.configuration.plot.xAxis = this.configuration.plot.xAxis || {}; + this.configuration.plot.yAxis = this.configuration.plot.yAxis || {}; // y-axes will be associative array keyed on axis key + this.configuration.plot.series = this.configuration.plot.series || {}; // series will be associative array keyed on sub-object id + this.$scope.configuration = this.configuration; + }; + + /* + When a child is added to, or removed from a plot, update the + plot options model + */ + PlotOptionsController.prototype.updateChildren = function() { + var self = this; + this.domainObject.useCapability('composition').then(function(children){ + self.$scope.children = children; + self.composition = self.domainObject.getModel().composition; + children.forEach(function(child){ + self.configuration.plot.series[child.getId()] = self.configuration.plot.series[child.getId()] || {}; + }); + }); + }; + + /* + On changes to the form, update the configuration on the domain + object + */ + PlotOptionsController.prototype.updateConfiguration = function() { + var self = this; + this.domainObject.useCapability('mutation', function(model){ + model.configuration = model.configuration || {}; + model.configuration.plot = self.configuration.plot; + }); + }; + return PlotOptionsController; } ); diff --git a/platform/features/plot/test/PlotOptionsFormSpec.js b/platform/features/plot/test/PlotOptionsFormSpec.js index 2cd7b62390..3b5e1a990e 100644 --- a/platform/features/plot/test/PlotOptionsFormSpec.js +++ b/platform/features/plot/test/PlotOptionsFormSpec.js @@ -55,16 +55,16 @@ define( expect(plotOptionsForm.plotSeriesForm).toBeDefined(); }); - it("uses a topic to register listeners and inform them when a" + + it("uses a topic to register a listener and inform them when a" + " form value changes", function () { var changedValue = 'changedValue'; - expect(plotOptionsForm.xAxisForm.sections[0].rows[0].onchange).toBeDefined(); + expect(plotOptionsForm.xAxisForm.onchange).toBeDefined(); plotOptionsForm.listen(listener); expect(mockTopicObject.listen).toHaveBeenCalledWith(listener); - plotOptionsForm.xAxisForm.sections[0].rows[0].onchange(changedValue); + plotOptionsForm.xAxisForm.onchange(changedValue); expect(mockTopicObject.notify).toHaveBeenCalledWith(changedValue); }); From 6880c82719f10f6b54f11cfb4ab30d899fadf911 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Tue, 9 Feb 2016 12:13:33 -0800 Subject: [PATCH 34/76] [CSV Export] Restructure example Restructure CSV export example to reflect recommended style for plugins, per code review; https://github.com/nasa/openmctweb/pull/652#discussion_r52263869 --- example/export/ExportTelemetryAsCSVAction.js | 80 ++++++++++++++++++++ example/export/bundle.js | 47 +----------- 2 files changed, 84 insertions(+), 43 deletions(-) create mode 100644 example/export/ExportTelemetryAsCSVAction.js diff --git a/example/export/ExportTelemetryAsCSVAction.js b/example/export/ExportTelemetryAsCSVAction.js new file mode 100644 index 0000000000..d8d29ef83c --- /dev/null +++ b/example/export/ExportTelemetryAsCSVAction.js @@ -0,0 +1,80 @@ +/***************************************************************************** + * 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'; + + /** + * An example of using the `exportService`; queries for telemetry + * and provides the results as a CSV file. + * @param {platform/exporters.ExportService} exportService the + * service which will handle the CSV export + * @param {ActionContext} context the action's context + * @constructor + * @memberof example/export + * @implements {Action} + */ + function ExportTelemetryAsCSVAction(exportService, context) { + this.exportService = exportService; + this.context = context; + } + + ExportTelemetryAsCSVAction.prototype.perform = function () { + var context = this.context, + domainObject = context.domainObject, + telemetry = domainObject.getCapability("telemetry"), + metadata = telemetry.getMetadata(), + domains = metadata.domains, + ranges = metadata.ranges, + exportService = this.exportService; + + function getName(domainOrRange) { + return domainOrRange.name; + } + + telemetry.requestData({}).then(function (series) { + var headers = domains.map(getName).concat(ranges.map(getName)), + rows = [], + row, + i; + for (i = 0; i < series.getPointCount(); i += 1) { + row = {}; + domains.forEach(function (domain) { + row[domain.name] = series.getDomainValue(i, domain.key); + }); + ranges.forEach(function (range) { + row[range.name] = series.getRangeValue(i, range.key); + }); + rows.push(row); + } + exportService.exportCSV(rows, { headers: headers }); + }); + }; + + ExportTelemetryAsCSVAction.appliesTo = function (context) { + return context.domainObject && + context.domainObject.hasCapability("telemetry"); + }; + + return ExportTelemetryAsCSVAction; +}); \ No newline at end of file diff --git a/example/export/bundle.js b/example/export/bundle.js index 13b9b35e01..41c3f423c3 100644 --- a/example/export/bundle.js +++ b/example/export/bundle.js @@ -21,51 +21,12 @@ *****************************************************************************/ /*global define*/ -define(['legacyRegistry'], function (legacyRegistry) { +define([ + 'legacyRegistry', + './ExportTelemetryAsCSVAction' +], function (legacyRegistry, ExportTelemetryAsCSVAction) { "use strict"; - function ExportTelemetryAsCSVAction(exportService, context) { - this.exportService = exportService; - this.context = context; - } - - ExportTelemetryAsCSVAction.prototype.perform = function () { - var context = this.context, - domainObject = context.domainObject, - telemetry = domainObject.getCapability("telemetry"), - metadata = telemetry.getMetadata(), - domains = metadata.domains, - ranges = metadata.ranges, - exportService = this.exportService; - - function getName(domainOrRange) { - return domainOrRange.name; - } - - telemetry.requestData({}).then(function (series) { - var headers = domains.map(getName).concat(ranges.map(getName)), - rows = [], - row, - i; - for (i = 0; i < series.getPointCount(); i += 1) { - row = {}; - domains.forEach(function (domain) { - row[domain.name] = series.getDomainValue(i, domain.key); - }); - ranges.forEach(function (range) { - row[range.name] = series.getRangeValue(i, range.key); - }); - rows.push(row); - } - exportService.exportCSV(rows, { headers: headers }); - }); - }; - - ExportTelemetryAsCSVAction.appliesTo = function (context) { - return context.domainObject && - context.domainObject.hasCapability("telemetry"); - }; - legacyRegistry.register("example/export", { "name": "Example of using CSV Export", "extensions": { From 437b235361535398621e1ffa23e11ad126318268 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Tue, 9 Feb 2016 12:30:53 -0800 Subject: [PATCH 35/76] [CSV Export] Update JSDoc Fill in complete JSDoc and separate out callback documentation per code review: https://github.com/nasa/openmctweb/pull/652/files#r52263213 https://github.com/nasa/openmctweb/pull/652/files#r52264447 --- platform/exporters/ExportService.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/platform/exporters/ExportService.js b/platform/exporters/ExportService.js index c9f60c575c..1493e8a8a6 100644 --- a/platform/exporters/ExportService.js +++ b/platform/exporters/ExportService.js @@ -21,13 +21,28 @@ *****************************************************************************/ /*global define,Blob*/ +/** + * @namespace platform/exporters + */ define(['csv'], function (CSV) { /** - * The `exportService` provides - * @param {function} saveAs a function that takes a Blob and a file name - * and triggers a file download as a consequence + * Callback used to initiate saving files from the export service; + * typical implementation is + * [FileSaver.js](https://github.com/eligrey/FileSaver.js/). + * @callback platform/exporters.ExportService~saveAs + * @param {Blob} blob the contents of the file to export + * @param {string} filename the name of the file to export + */ + + + /** + * The `exportService` provides a means to initiate downloads of + * structured data in the CSV format. + * @param {platform/exporters.ExportService~saveAs} saveAs function + * used to initiate saving files * @constructor + * @memberof platform/exporters */ function ExportService(saveAs) { this.saveAs = saveAs; From ab1c79f25d37697f31bc763fb00f1bc110427579 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 9 Feb 2016 20:51:56 -0800 Subject: [PATCH 36/76] [Plot] Switched to $watchCollection on form model --- platform/features/plot/bundle.js | 3 +- .../plot/src/PlotOptionsController.js | 27 +++++++++++++----- platform/features/plot/src/PlotOptionsForm.js | 12 +------- .../plot/test/PlotOptionsControllerSpec.js | 28 +++++-------------- .../features/plot/test/PlotOptionsFormSpec.js | 25 +---------------- .../res/templates/controls/checkbox.html | 1 - .../forms/res/templates/controls/radio.html | 1 - .../forms/res/templates/controls/select.html | 1 - .../res/templates/controls/textfield.html | 1 - platform/forms/res/templates/form.html | 1 - 10 files changed, 30 insertions(+), 70 deletions(-) diff --git a/platform/features/plot/bundle.js b/platform/features/plot/bundle.js index 80e1e7fab8..341b7c76c4 100644 --- a/platform/features/plot/bundle.js +++ b/platform/features/plot/bundle.js @@ -78,8 +78,7 @@ define([ "key": "PlotOptionsController", "implementation": PlotOptionsController, "depends": [ - "$scope", - "topic" + "$scope" ] } ], diff --git a/platform/features/plot/src/PlotOptionsController.js b/platform/features/plot/src/PlotOptionsController.js index 4206799986..2e333cce07 100644 --- a/platform/features/plot/src/PlotOptionsController.js +++ b/platform/features/plot/src/PlotOptionsController.js @@ -45,13 +45,13 @@ define( * @constructor * @param {Scope} $scope the controller's Angular scope */ - function PlotOptionsController($scope, topic) { + function PlotOptionsController($scope) { var self = this; this.$scope = $scope; this.domainObject = $scope.domainObject; this.configuration = this.domainObject.getModel().configuration || {}; - this.plotOptionsForm = new PlotOptionsForm(topic); + this.plotOptionsForm = new PlotOptionsForm(); this.composition = []; /* @@ -64,10 +64,6 @@ define( } }); - this.formListener = this.plotOptionsForm.listen(function(value){ - self.updateConfiguration(value); - }); - /* Set form structures on scope */ @@ -78,11 +74,27 @@ define( $scope.$on("$destroy", function() { //Clean up any listeners on destruction of controller self.mutationListener(); - self.formListener(); }); this.defaultConfiguration(); this.updateChildren(); + + /** + * Setup a number of watches for changes to form values. On + * change, update the model configuration via mutation + */ + $scope.$watchCollection('configuration.plot.yAxis', function(newValue, oldValue){ + self.updateConfiguration(newValue, oldValue); + }); + $scope.$watchCollection('configuration.plot.xAxis', function(newValue, oldValue){ + self.updateConfiguration(newValue, oldValue); + }); + ($scope.children || []).forEach(function(child){ + $scope.$watchCollection('configuration.plot.series[' + child.getId() + ']', function(newValue, oldValue){ + self.updateConfiguration(newValue, oldValue); + }); + }); + } /* @@ -134,6 +146,7 @@ define( */ PlotOptionsController.prototype.updateConfiguration = function() { var self = this; + console.log('form values changed'); this.domainObject.useCapability('mutation', function(model){ model.configuration = model.configuration || {}; model.configuration.plot = self.configuration.plot; diff --git a/platform/features/plot/src/PlotOptionsForm.js b/platform/features/plot/src/PlotOptionsForm.js index c6c5d2b343..392085a991 100644 --- a/platform/features/plot/src/PlotOptionsForm.js +++ b/platform/features/plot/src/PlotOptionsForm.js @@ -33,13 +33,7 @@ define( * @param topic * @constructor */ - function PlotOptionsForm(topic) { - var self = this; - this.onchangeTopic = topic(); - - function onchange(value){ - self.onchangeTopic.notify(value); - } + function PlotOptionsForm() { /* Defined below are the form structures for the plot options. @@ -149,10 +143,6 @@ define( }; } - PlotOptionsForm.prototype.listen = function (callback){ - return this.onchangeTopic.listen(callback); - }; - return PlotOptionsForm; } ); diff --git a/platform/features/plot/test/PlotOptionsControllerSpec.js b/platform/features/plot/test/PlotOptionsControllerSpec.js index 81fafb3768..6b21771f79 100644 --- a/platform/features/plot/test/PlotOptionsControllerSpec.js +++ b/platform/features/plot/test/PlotOptionsControllerSpec.js @@ -28,8 +28,6 @@ define( describe("The Plot Options controller", function () { var plotOptionsController, - mockTopicFunction, - mockTopicObject, mockDomainObject, mockMutationCapability, mockUseCapabilities, @@ -79,18 +77,6 @@ define( mockUnlisten = jasmine.createSpy('unlisten'); mockMutationCapability.listen.andReturn(mockUnlisten); - - mockTopicObject = jasmine.createSpyObj('Topic', [ - 'listen', - 'notify' - ]); - mockFormUnlisten = jasmine.createSpy('formUnlisten'); - mockTopicObject.listen.andReturn(mockFormUnlisten); - - mockTopicFunction = function() { - return mockTopicObject; - }; - mockDomainObject = jasmine.createSpyObj('domainObject', [ 'getModel', 'useCapability', @@ -103,11 +89,12 @@ define( mockDomainObject.getModel.andReturn(model); mockScope = jasmine.createSpyObj('scope', [ - '$on' + '$on', + '$watchCollection' ]); mockScope.domainObject = mockDomainObject; - plotOptionsController = new PlotOptionsController(mockScope, mockTopicFunction); + plotOptionsController = new PlotOptionsController(mockScope); }); it("sets form definitions on scope", function () { @@ -135,25 +122,24 @@ define( var scopeConfiguration = mockScope.configuration, model = mockDomainObject.getModel(); - scopeConfiguration.plot.xAxis.key = 'lst'; scopeConfiguration.plot.yAxis.autoScale = true; scopeConfiguration.plot.yAxis.key = 'eu'; + scopeConfiguration.plot.xAxis.key = 'lst'; - expect(mockTopicObject.listen).toHaveBeenCalled(); - mockTopicObject.listen.mostRecentCall.args[0](); + expect(mockScope.$watchCollection).toHaveBeenCalled(); + mockScope.$watchCollection.calls[0].args[1](); expect(mockDomainObject.useCapability).toHaveBeenCalledWith('mutation', jasmine.any(Function)); mockDomainObject.useCapability.mostRecentCall.args[1](model); - expect(model.configuration.plot.xAxis.key).toBe('lst'); expect(model.configuration.plot.yAxis.autoScale).toBe(true); expect(model.configuration.plot.yAxis.key).toBe('eu'); + expect(model.configuration.plot.xAxis.key).toBe('lst'); }); it("cleans up listeners on destruction of the controller", function () { mockScope.$on.mostRecentCall.args[1](); expect(mockUnlisten).toHaveBeenCalled(); - expect(mockFormUnlisten).toHaveBeenCalled(); }); }); diff --git a/platform/features/plot/test/PlotOptionsFormSpec.js b/platform/features/plot/test/PlotOptionsFormSpec.js index 3b5e1a990e..49dfc823e9 100644 --- a/platform/features/plot/test/PlotOptionsFormSpec.js +++ b/platform/features/plot/test/PlotOptionsFormSpec.js @@ -28,21 +28,11 @@ define( describe("The Plot Options form", function () { var plotOptionsForm, - mockTopicFunction, - mockTopicObject, listener; beforeEach(function () { - mockTopicObject = jasmine.createSpyObj('Topic', [ - 'listen', - 'notify' - ]); - mockTopicFunction = function() { - return mockTopicObject; - }; - - plotOptionsForm = new PlotOptionsForm(mockTopicFunction); + plotOptionsForm = new PlotOptionsForm(); }); it("defines form specs for x-axis, y-axis, and series data", function () { @@ -55,19 +45,6 @@ define( expect(plotOptionsForm.plotSeriesForm).toBeDefined(); }); - it("uses a topic to register a listener and inform them when a" + - " form value changes", function () { - var changedValue = 'changedValue'; - - expect(plotOptionsForm.xAxisForm.onchange).toBeDefined(); - - plotOptionsForm.listen(listener); - expect(mockTopicObject.listen).toHaveBeenCalledWith(listener); - - plotOptionsForm.xAxisForm.onchange(changedValue); - expect(mockTopicObject.notify).toHaveBeenCalledWith(changedValue); - }); - }); } ); diff --git a/platform/forms/res/templates/controls/checkbox.html b/platform/forms/res/templates/controls/checkbox.html index c676fb85cd..b23ea7c768 100644 --- a/platform/forms/res/templates/controls/checkbox.html +++ b/platform/forms/res/templates/controls/checkbox.html @@ -23,7 +23,6 @@ diff --git a/platform/forms/res/templates/controls/radio.html b/platform/forms/res/templates/controls/radio.html index d5fb7284aa..2dd55c8813 100644 --- a/platform/forms/res/templates/controls/radio.html +++ b/platform/forms/res/templates/controls/radio.html @@ -24,7 +24,6 @@ name="mctControl" ng-model="ngModel[field]" ng-disabled="ngDisabled" - ng-change="ngChange()" ng-value="structure.value"> diff --git a/platform/forms/res/templates/controls/select.html b/platform/forms/res/templates/controls/select.html index 9742bfb7d0..c8688a0010 100644 --- a/platform/forms/res/templates/controls/select.html +++ b/platform/forms/res/templates/controls/select.html @@ -24,7 +24,6 @@ ng-model="ngModel[field]" ng-options="opt.value as opt.name for opt in options" ng-required="ngRequired" - ng-change="ngChange()" name="mctControl"> diff --git a/platform/forms/res/templates/controls/textfield.html b/platform/forms/res/templates/controls/textfield.html index c79cc83b90..fef977be7b 100644 --- a/platform/forms/res/templates/controls/textfield.html +++ b/platform/forms/res/templates/controls/textfield.html @@ -25,7 +25,6 @@ ng-required="ngRequired" ng-model="ngModel[field]" ng-pattern="ngPattern" - ng-change="ngChange()" size="{{structure.size}}" name="mctControl"> diff --git a/platform/forms/res/templates/form.html b/platform/forms/res/templates/form.html index b2e9aa8d01..edd4f81d1c 100644 --- a/platform/forms/res/templates/form.html +++ b/platform/forms/res/templates/form.html @@ -41,7 +41,6 @@ Date: Tue, 9 Feb 2016 20:59:08 -0800 Subject: [PATCH 37/76] [Plot] Fixed jsLint, removed onchange Removed ngChange from mct-control Removed ng-change --- .../general/res/templates/controls/datetime-field.html | 1 - platform/features/plot/src/PlotOptionsController.js | 1 - platform/features/plot/src/PlotOptionsForm.js | 3 --- platform/forms/src/MCTControl.js | 2 -- 4 files changed, 7 deletions(-) diff --git a/platform/commonUI/general/res/templates/controls/datetime-field.html b/platform/commonUI/general/res/templates/controls/datetime-field.html index 793083ea60..18eb9ec46d 100644 --- a/platform/commonUI/general/res/templates/controls/datetime-field.html +++ b/platform/commonUI/general/res/templates/controls/datetime-field.html @@ -23,7 +23,6 @@ ng-controller="DateTimeFieldController"> diff --git a/platform/features/plot/src/PlotOptionsController.js b/platform/features/plot/src/PlotOptionsController.js index 7276146e0f..78706f9231 100644 --- a/platform/features/plot/src/PlotOptionsController.js +++ b/platform/features/plot/src/PlotOptionsController.js @@ -53,6 +53,7 @@ define( this.configuration = this.domainObject.getModel().configuration || {}; this.plotOptionsForm = new PlotOptionsForm(); this.composition = []; + this.watches = []; /* Listen for changes to the domain object and update the object's @@ -79,7 +80,7 @@ define( this.defaultConfiguration(); this.updateChildren(); - /** + /* * Setup a number of watches for changes to form values. On * change, update the model configuration via mutation */ @@ -89,17 +90,52 @@ define( $scope.$watchCollection('configuration.plot.xAxis', function(newValue, oldValue){ self.updateConfiguration(newValue, oldValue); }); - ($scope.children || []).forEach(function(child){ - $scope.$watchCollection('configuration.plot.series[' + child.getId() + ']', function(newValue, oldValue){ - self.updateConfiguration(newValue, oldValue); - }); - }); + + this.watchSeries(); } - /* + /** + * Unregister all watches for series data (ie. the configuration for + * child objects) + * @private + */ + PlotOptionsController.prototype.clearSeriesWatches = function() { + this.watches.forEach(function(watch) { + watch(); + }); + this.watches = []; + } + + /** + * Attach watches for each object in the plot's composition + * @private + */ + PlotOptionsController.prototype.watchSeries = function() { + var self = this; + + this.clearSeriesWatches(); + + console.log("watches before: " + this.watches.length); + + (self.$scope.children || []).forEach(function(child, index){ + self.watches.push( + self.$scope.$watchCollection( + 'configuration.plot.series[' + index + ']', + function(newValue, oldValue){ + self.updateConfiguration(newValue, oldValue); + } + ) + ); + }); + console.log("watches after: " + self.watches.length); + }; + + /** * Determine whether the changes to the model that triggered a * mutation event were purely compositional. + * + * @private */ PlotOptionsController.prototype.hasCompositionChanged = function(oldComposition, newComposition){ // Framed slightly strangely, but the boolean logic is @@ -114,36 +150,42 @@ define( return !isUnchanged; }; - /* - Default the plot options model + /** + * Default the plot options model + * + * @private */ PlotOptionsController.prototype.defaultConfiguration = function () { this.configuration.plot = this.configuration.plot || {}; this.configuration.plot.xAxis = this.configuration.plot.xAxis || {}; this.configuration.plot.yAxis = this.configuration.plot.yAxis || {}; // y-axes will be associative array keyed on axis key - this.configuration.plot.series = this.configuration.plot.series || {}; // series will be associative array keyed on sub-object id + this.configuration.plot.series = this.configuration.plot.series || []; // series will be associative array keyed on sub-object id this.$scope.configuration = this.configuration; }; - /* - When a child is added to, or removed from a plot, update the - plot options model + /** + * When a child is added to, or removed from a plot, update the + * plot options model + * @private */ PlotOptionsController.prototype.updateChildren = function() { var self = this; this.domainObject.useCapability('composition').then(function(children){ self.$scope.children = children; self.composition = self.domainObject.getModel().composition; - children.forEach(function(child){ - self.configuration.plot.series[child.getId()] = self.configuration.plot.series[child.getId()] || {}; + children.forEach(function(child, index){ + self.configuration.plot.series[index] = + self.configuration.plot.series[index] || {'id': child.getId()}; }); + self.watchSeries(); }); }; - /* - On changes to the form, update the configuration on the domain - object - */ + /** + * On changes to the form, update the configuration on the domain + * object + * @private + */ PlotOptionsController.prototype.updateConfiguration = function() { var self = this; this.domainObject.useCapability('mutation', function(model){ From 53c60ee64f1f1fdf631c6971817d87e4477464a6 Mon Sep 17 00:00:00 2001 From: Melanie Lean Date: Thu, 11 Feb 2016 21:34:22 -0800 Subject: [PATCH 39/76] [Timelines] #677 Applied fix to prevent editing of timelines in browse mode Fixed failing test --- .../browse/res/templates/browse-object.html | 18 ++++++++++++++++-- .../edit/src/representers/EditRepresenter.js | 2 ++ .../test/representers/EditRepresenterSpec.js | 13 ++++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/platform/commonUI/browse/res/templates/browse-object.html b/platform/commonUI/browse/res/templates/browse-object.html index 3632267df8..562f8bdf6a 100644 --- a/platform/commonUI/browse/res/templates/browse-object.html +++ b/platform/commonUI/browse/res/templates/browse-object.html @@ -44,7 +44,7 @@
                  -
                  +
                  -
                  +
                  +
                  + +
                  + + + +
                  + + +
                  diff --git a/platform/commonUI/edit/src/representers/EditRepresenter.js b/platform/commonUI/edit/src/representers/EditRepresenter.js index c6f890af0e..0844f65e67 100644 --- a/platform/commonUI/edit/src/representers/EditRepresenter.js +++ b/platform/commonUI/edit/src/representers/EditRepresenter.js @@ -109,6 +109,8 @@ define( // Track the represented object this.domainObject = representedObject; + this.scope.isEditable = representedObject.getCapability('status').get('editing'); + // Ensure existing watches are released this.destroy(); }; diff --git a/platform/commonUI/edit/test/representers/EditRepresenterSpec.js b/platform/commonUI/edit/test/representers/EditRepresenterSpec.js index 8b0ef22a7d..79b336202a 100644 --- a/platform/commonUI/edit/test/representers/EditRepresenterSpec.js +++ b/platform/commonUI/edit/test/representers/EditRepresenterSpec.js @@ -33,6 +33,8 @@ define( testRepresentation, mockDomainObject, mockPersistence, + mockCapabilities, + mockStatusCapability, representer; function mockPromise(value) { @@ -57,11 +59,20 @@ define( ]); mockPersistence = jasmine.createSpyObj("persistence", ["persist"]); + mockStatusCapability = + jasmine.createSpyObj("status", ["get"]); + mockStatusCapability.get.andReturn(false); + mockCapabilities = { + 'persistence': mockPersistence, + 'status': mockStatusCapability + }; mockDomainObject.getModel.andReturn({}); mockDomainObject.hasCapability.andReturn(true); mockDomainObject.useCapability.andReturn(true); - mockDomainObject.getCapability.andReturn(mockPersistence); + mockDomainObject.getCapability.andCallFake(function(capability){ + return mockCapabilities[capability]; + }); representer = new EditRepresenter(mockQ, mockLog, mockScope); representer.represent(testRepresentation, mockDomainObject); From 31a983966bb6c553701d83be7c7ac91a2f5e6525 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Mon, 22 Feb 2016 15:44:57 -0800 Subject: [PATCH 40/76] [Frontend] In-progress on adding branded per-app screens open #164 CSS, markup; --- index.html | 9 +++- .../commonUI/general/res/sass/_about.scss | 41 +------------------ .../general/res/sass/_logo-and-bg.scss | 30 ++++++++++++++ .../commonUI/general/res/sass/startup.scss | 26 ++++++++++++ 4 files changed, 65 insertions(+), 41 deletions(-) create mode 100644 platform/commonUI/general/res/sass/_logo-and-bg.scss create mode 100644 platform/commonUI/general/res/sass/startup.scss diff --git a/index.html b/index.html index b33764958a..ffd86b972f 100644 --- a/index.html +++ b/index.html @@ -33,13 +33,18 @@ mct.run(); }); + - - + +
                  + + +
                  +
                  diff --git a/platform/commonUI/general/res/sass/_about.scss b/platform/commonUI/general/res/sass/_about.scss index 978ea42078..38c4c59b61 100644 --- a/platform/commonUI/general/res/sass/_about.scss +++ b/platform/commonUI/general/res/sass/_about.scss @@ -21,63 +21,30 @@ *****************************************************************************/ // General About dialog styling +@import "logo-and-bg"; + .l-about { - // Layout &.abs { -// top: 20px; overflow: auto; } $contentH: 200px; .l-logo-holder { position: relative; height: 45%; - .l-logo { - $w: 5%; - position: absolute; - &.l-logo-app { -// @include test(blue); - top: 0; right: 15%; bottom: 0; left: 15%; - } - &.s-logo-nasa { -// @include test(red); - $m: 10px; - background-image: url($dirImgs + 'logo-nasa.svg'); - top: $m; right: auto; bottom: auto; left: $m; - width: $w * 2; height: auto; padding-bottom: $w; padding-top: $w; - } - } } .l-content { -// @include test(); position: relative; margin-top: $interiorMarginLg; } } .s-about { - // Styling line-height: 120%; a { color: $colorAboutLink; } .s-description, - .s-info { -// font-size: 0.8em; - } - .s-logo-holder { - background: url($dirImgs + "bg-about-openmctweb.jpg") no-repeat center; // For OpenMCT Web. - background-size: cover; - } - .s-logo { - // @include txtShdwLarge(); // text-shadow doesn't work for svg - background-position: center; - background-repeat: no-repeat; - background-size: contain; - } - .s-logo-openmctweb { - background-image: url($dirImgs + 'logo-openmctweb-shdw.svg'); - } .s-btn { line-height: 2em; } @@ -90,10 +57,6 @@ } em { color: pushBack($colorBodyFg, 20%); -// margin-left: 2em; - &:first-child { -// margin-left: 0; - } } h3 { font-size: 1.25em; diff --git a/platform/commonUI/general/res/sass/_logo-and-bg.scss b/platform/commonUI/general/res/sass/_logo-and-bg.scss new file mode 100644 index 0000000000..cb1e033919 --- /dev/null +++ b/platform/commonUI/general/res/sass/_logo-and-bg.scss @@ -0,0 +1,30 @@ +.l-logo-holder { + position: absolute; + top: 0; right: 0; bottom: 0; left: 0; + .l-logo { + $w: 5%; + position: absolute; + &.l-logo-app { + top: 0; right: 15%; bottom: 0; left: 15%; + } + &.s-logo-nasa { + $m: 10px; + background-image: url($dirImgs + 'logo-nasa.svg'); + top: $m; right: auto; bottom: auto; left: $m; + width: $w * 2; height: auto; padding-bottom: $w; padding-top: $w; + } + } +} + +.s-logo-holder { + background: url($dirImgs + "bg-about-openmctweb.jpg") no-repeat center; // For OpenMCT Web. + background-size: cover; +} +.s-logo { + background-position: center; + background-repeat: no-repeat; + background-size: contain; +} +.s-logo-openmctweb { + background-image: url($dirImgs + 'logo-openmctweb-shdw.svg'); +} \ No newline at end of file diff --git a/platform/commonUI/general/res/sass/startup.scss b/platform/commonUI/general/res/sass/startup.scss new file mode 100644 index 0000000000..4784926b20 --- /dev/null +++ b/platform/commonUI/general/res/sass/startup.scss @@ -0,0 +1,26 @@ +@import "compass"; +@import "compass/css3"; +@import "constants"; +$dirImgs: '../../../general/res/images/'; +@import "logo-and-bg"; + +body { + background: black; +} + +.s-logo-holder { + @include transition-property(opacity); + @include transition-duration(500ms); + @include transition-timing-function(ease-in-out); + background-image: url($dirImgs + "bg-about-openmctweb.jpg") no-repeat center; // For OpenMCT Web. + z-index: 1000; + opacity: 1; + &.fadeout { + opacity: 0; + pointer-events: none; + } +} + +.s-logo-openmctweb { + background-image: url($dirImgs + 'logo-openmctweb-shdw.svg'); +} From 25f3b1e110f13038e3837e911625a651a26edaef Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Mon, 22 Feb 2016 16:39:20 -0800 Subject: [PATCH 41/76] [Frontend] Add splash screen manager Add a runtime extension that detects the splash screen and triggers a fade out after the application has loaded. Once the fade out has ended, it removes the element from the page. Related to https://github.com/nasa/openmctweb/issues/164 --- platform/commonUI/general/bundle.js | 8 ++ .../general/src/SplashScreenManager.js | 46 ++++++++++ .../general/test/SplashScreenManagerSpec.js | 91 +++++++++++++++++++ 3 files changed, 145 insertions(+) create mode 100644 platform/commonUI/general/src/SplashScreenManager.js create mode 100644 platform/commonUI/general/test/SplashScreenManagerSpec.js diff --git a/platform/commonUI/general/bundle.js b/platform/commonUI/general/bundle.js index aeb05762b1..3d98a22143 100644 --- a/platform/commonUI/general/bundle.js +++ b/platform/commonUI/general/bundle.js @@ -24,6 +24,7 @@ define([ "./src/services/UrlService", "./src/services/PopupService", + "./src/SplashScreenManager", "./src/StyleSheetLoader", "./src/UnsupportedBrowserWarning", "./src/controllers/TimeRangeController", @@ -52,6 +53,7 @@ define([ ], function ( UrlService, PopupService, + SplashScreenManager, StyleSheetLoader, UnsupportedBrowserWarning, TimeRangeController, @@ -117,6 +119,12 @@ define([ "notificationService", "agentService" ] + }, + { + "implementation": SplashScreenManager, + "depends": [ + "$document" + ] } ], "filters": [ diff --git a/platform/commonUI/general/src/SplashScreenManager.js b/platform/commonUI/general/src/SplashScreenManager.js new file mode 100644 index 0000000000..e9666f4f6d --- /dev/null +++ b/platform/commonUI/general/src/SplashScreenManager.js @@ -0,0 +1,46 @@ +/***************************************************************************** + * 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'; + + function SplashScreenManager($document) { + var splash; + $document = $document[0]; + splash = $document.querySelectorAll('.s-logo-holder')[0]; + if (!splash) { + return; + } + splash.className += ' fadeout'; + splash.addEventListener('transitionend', function () { + splash.parentNode.removeChild(splash); + }); + } + + return SplashScreenManager; +}); diff --git a/platform/commonUI/general/test/SplashScreenManagerSpec.js b/platform/commonUI/general/test/SplashScreenManagerSpec.js new file mode 100644 index 0000000000..b1d340fe58 --- /dev/null +++ b/platform/commonUI/general/test/SplashScreenManagerSpec.js @@ -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,describe,beforeEach,jasmine,it,expect*/ + +define([ + '../src/SplashScreenManager' +], function (SplashScreenManager) { + 'use strict'; + + describe('SplashScreenManager', function () { + var $document, + splashElement; + + beforeEach(function () { + $document = jasmine.createSpyObj( + '$document', + ['querySelectorAll'] + ); + + splashElement = jasmine.createSpyObj( + 'splashElement', + ['addEventListener'] + ); + + splashElement.parentNode = jasmine.createSpyObj( + 'splashParent', + ['removeChild'] + ); + + splashElement.className = 'some-class-name'; + + $document.querySelectorAll.andReturn([splashElement]); + }); + + describe('when element exists', function () { + beforeEach(function () { + $document.querySelectorAll.andReturn([splashElement]); + new SplashScreenManager([$document]); + }); + + it('adds fade out class', function () { + expect(splashElement.className).toBe('some-class-name fadeout'); + }); + + it('removes the element when the transition ends', function () { + expect(splashElement.addEventListener) + .toHaveBeenCalledWith( + 'transitionend', + jasmine.any(Function) + ); + expect(splashElement.parentNode.removeChild) + .not + .toHaveBeenCalled(); + + splashElement.addEventListener.mostRecentCall.args[1](); + expect(splashElement.parentNode.removeChild) + .toHaveBeenCalledWith(splashElement); + }); + }); + + it('does not error when element doesn\'t exist', function () { + $document.querySelectorAll.andReturn([]); + + function run() { + new SplashScreenManager([$document]); + } + + expect(run).not.toThrow(); + }); + }); +}); + From aabeb7220306cc16a3cf88eb1d286466efb96601 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 23 Feb 2016 15:22:21 -0800 Subject: [PATCH 42/76] [Plots] #638 Fixed failing test --- platform/features/plot/src/PlotOptionsController.js | 3 --- platform/features/plot/test/PlotOptionsControllerSpec.js | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/features/plot/src/PlotOptionsController.js b/platform/features/plot/src/PlotOptionsController.js index 78706f9231..8be5579ebf 100644 --- a/platform/features/plot/src/PlotOptionsController.js +++ b/platform/features/plot/src/PlotOptionsController.js @@ -116,8 +116,6 @@ define( this.clearSeriesWatches(); - console.log("watches before: " + this.watches.length); - (self.$scope.children || []).forEach(function(child, index){ self.watches.push( self.$scope.$watchCollection( @@ -128,7 +126,6 @@ define( ) ); }); - console.log("watches after: " + self.watches.length); }; /** diff --git a/platform/features/plot/test/PlotOptionsControllerSpec.js b/platform/features/plot/test/PlotOptionsControllerSpec.js index 6b21771f79..cac42f72a7 100644 --- a/platform/features/plot/test/PlotOptionsControllerSpec.js +++ b/platform/features/plot/test/PlotOptionsControllerSpec.js @@ -94,6 +94,9 @@ define( ]); mockScope.domainObject = mockDomainObject; + function noop() {} + mockScope.$watchCollection.andReturn(noop); + plotOptionsController = new PlotOptionsController(mockScope); }); From 164d959f60c2bcaa0f453a8af1ec02be915c004d Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Tue, 23 Feb 2016 18:30:21 -0800 Subject: [PATCH 43/76] [Frontend] Significant markup/CSS mods for splash screen #164 Markup in index.html and about-dialog.html changed to simplify and use :before/:after psuedos; CSS in _logo-and-bg.scss modded for same; Added _startup.scss to hold general CSS for the startup screen; Renamed startup.scss to startup-open.scss; Modified SplashScreenManager.js to target renamed outer container .l-splash-holder; Added media query for startup screen on phone; Cleanup: moved classes out of _effects into _global; Still to-do: apply to WARP and VISTA, including needed mods to their About dialog screens; --- index.html | 7 +- .../about/res/templates/about-dialog.html | 5 +- .../commonUI/general/res/sass/_about.scss | 2 +- .../commonUI/general/res/sass/_effects.scss | 20 ------ .../commonUI/general/res/sass/_global.scss | 17 ++++- .../general/res/sass/_logo-and-bg.scss | 64 ++++++++++++------- .../commonUI/general/res/sass/_startup.scss | 47 ++++++++++++++ .../general/res/sass/startup-open.scss | 36 +++++++++++ .../commonUI/general/res/sass/startup.scss | 26 -------- .../general/src/SplashScreenManager.js | 3 +- 10 files changed, 146 insertions(+), 81 deletions(-) create mode 100644 platform/commonUI/general/res/sass/_startup.scss create mode 100644 platform/commonUI/general/res/sass/startup-open.scss delete mode 100644 platform/commonUI/general/res/sass/startup.scss diff --git a/index.html b/index.html index ffd86b972f..2535414aa7 100644 --- a/index.html +++ b/index.html @@ -33,16 +33,15 @@ mct.run(); }); - + -
                  - - +
                  +
                  diff --git a/platform/commonUI/about/res/templates/about-dialog.html b/platform/commonUI/about/res/templates/about-dialog.html index 5113954105..fe19442f16 100644 --- a/platform/commonUI/about/res/templates/about-dialog.html +++ b/platform/commonUI/about/res/templates/about-dialog.html @@ -20,10 +20,7 @@ at runtime from the About dialog for additional information. -->
                  -
                  - - -
                  +

                  OpenMCT Web

                  diff --git a/platform/commonUI/general/res/sass/_about.scss b/platform/commonUI/general/res/sass/_about.scss index 38c4c59b61..1e9abe70cf 100644 --- a/platform/commonUI/general/res/sass/_about.scss +++ b/platform/commonUI/general/res/sass/_about.scss @@ -28,7 +28,7 @@ overflow: auto; } $contentH: 200px; - .l-logo-holder { + .l-splash { position: relative; height: 45%; } diff --git a/platform/commonUI/general/res/sass/_effects.scss b/platform/commonUI/general/res/sass/_effects.scss index c1701f7387..a048eb75d0 100644 --- a/platform/commonUI/general/res/sass/_effects.scss +++ b/platform/commonUI/general/res/sass/_effects.scss @@ -19,26 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -.disabled, -a.disabled { - opacity: $controlDisabledOpacity; - pointer-events: none !important; - cursor: default !important; -} - -.incised { - @include boxIncised(0.8); - border-bottom: 1px solid rgba(#fff, 0.3); -} - -.test-stripes { - @include bgDiagonalStripes(); -} - -.test { - @include test(); -} - @mixin pulse($animName: pulse, $dur: 500ms, $iteration: infinite, $opacity0: 0.5, $opacity100: 1) { @include keyframes($animName) { 0% { opacity: $opacity0; } diff --git a/platform/commonUI/general/res/sass/_global.scss b/platform/commonUI/general/res/sass/_global.scss index cb0894c9fe..cc318eddce 100644 --- a/platform/commonUI/general/res/sass/_global.scss +++ b/platform/commonUI/general/res/sass/_global.scss @@ -112,6 +112,13 @@ mct-container { padding: 1em; } +.disabled, +a.disabled { + opacity: $controlDisabledOpacity; + pointer-events: none !important; + cursor: default !important; +} + .align-right { text-align: right; } @@ -158,4 +165,12 @@ mct-container { .sep { color: rgba(#fff, 0.2); -} \ No newline at end of file +} + +.test-stripes { + @include bgDiagonalStripes(); +} + +.test { + @include test(); +} diff --git a/platform/commonUI/general/res/sass/_logo-and-bg.scss b/platform/commonUI/general/res/sass/_logo-and-bg.scss index cb1e033919..136060cc9c 100644 --- a/platform/commonUI/general/res/sass/_logo-and-bg.scss +++ b/platform/commonUI/general/res/sass/_logo-and-bg.scss @@ -1,30 +1,46 @@ -.l-logo-holder { +.l-splash { + background-size: cover; position: absolute; - top: 0; right: 0; bottom: 0; left: 0; - .l-logo { - $w: 5%; + top: 0; + right: 0; + bottom: 0; + left: 0; + &:before, + &:after { + background-position: center; + background-repeat: no-repeat; + background-size: contain; + content: ''; position: absolute; - &.l-logo-app { - top: 0; right: 15%; bottom: 0; left: 15%; - } - &.s-logo-nasa { - $m: 10px; - background-image: url($dirImgs + 'logo-nasa.svg'); - top: $m; right: auto; bottom: auto; left: $m; - width: $w * 2; height: auto; padding-bottom: $w; padding-top: $w; - } + } + + &:before { + // NASA logo + $w: 5%; + $m: 10px; + background-image: url($dirImgs + 'logo-nasa.svg'); + top: $m; + right: auto; + bottom: auto; + left: $m; + height: auto; + width: $w * 2; + padding-bottom: $w; + padding-top: $w; + } + + &:after { + // App logo + top: 0; + right: 15%; + bottom: 0; + left: 15%; } } -.s-logo-holder { - background: url($dirImgs + "bg-about-openmctweb.jpg") no-repeat center; // For OpenMCT Web. - background-size: cover; -} -.s-logo { - background-position: center; - background-repeat: no-repeat; - background-size: contain; -} -.s-logo-openmctweb { - background-image: url($dirImgs + 'logo-openmctweb-shdw.svg'); +.s-splash { + background-image: url($dirImgs + "bg-about-openmctweb.jpg"); // For OpenMCT Web. + &:after { + background-image: url($dirImgs + 'logo-openmctweb-shdw.svg'); + } } \ No newline at end of file diff --git a/platform/commonUI/general/res/sass/_startup.scss b/platform/commonUI/general/res/sass/_startup.scss new file mode 100644 index 0000000000..3124cd1c45 --- /dev/null +++ b/platform/commonUI/general/res/sass/_startup.scss @@ -0,0 +1,47 @@ +@import "bourbon"; +$dirImgs: '../../../general/res/images/'; +@import "logo-and-bg"; + +@mixin splashElem($m: 20%) { + top: $m; right: $m * 1.25; bottom: $m; left: $m * 1.25; + +} + +.l-splash-holder { + // Main outer holder. + @include transition-property(opacity); + @include transition-duration(500ms); + @include transition-timing-function(ease-in-out); + @include transition-delay(1s); + z-index: 10000; + opacity: 1; + &.fadeout { + opacity: 0; + pointer-events: none; + } + .l-splash { + // The splash element. + @include splashElem(); + border-radius: 10px; + box-shadow: 0 5px 50px 25px rgba(#fff, 0.1); + } +} + +@media only screen and (max-device-width: 767px) { + .l-splash-holder .l-splash { + @include splashElem(0); + border-radius: 0; + box-shadow: none; + } +} + +@media only screen and (max-device-width: 767px) and (orientation: portrait) { + .l-splash-holder .l-splash { + &:before { + $w: 12%; + width: $w * 2; + padding-bottom: $w; + padding-top: $w; + } + } +} \ No newline at end of file diff --git a/platform/commonUI/general/res/sass/startup-open.scss b/platform/commonUI/general/res/sass/startup-open.scss new file mode 100644 index 0000000000..0f13bf853d --- /dev/null +++ b/platform/commonUI/general/res/sass/startup-open.scss @@ -0,0 +1,36 @@ +/***************************************************************************** + * 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. + *****************************************************************************/ +@import "startup"; + +.l-splash-holder { + background: #333; + position: absolute; + top: 0; right: 0; bottom: 0; left: 0; + .s-splash { + background-image: url($dirImgs + "bg-about-openmctweb.jpg"); // For OpenMCT Web. + // &:before { // Use this to override the NASA logo. Could add a AMMOS logo along with NASA if desired. } + &:after { + // App logo + background-image: url($dirImgs + 'logo-openmctweb-shdw.svg'); + } + } +} diff --git a/platform/commonUI/general/res/sass/startup.scss b/platform/commonUI/general/res/sass/startup.scss deleted file mode 100644 index 4784926b20..0000000000 --- a/platform/commonUI/general/res/sass/startup.scss +++ /dev/null @@ -1,26 +0,0 @@ -@import "compass"; -@import "compass/css3"; -@import "constants"; -$dirImgs: '../../../general/res/images/'; -@import "logo-and-bg"; - -body { - background: black; -} - -.s-logo-holder { - @include transition-property(opacity); - @include transition-duration(500ms); - @include transition-timing-function(ease-in-out); - background-image: url($dirImgs + "bg-about-openmctweb.jpg") no-repeat center; // For OpenMCT Web. - z-index: 1000; - opacity: 1; - &.fadeout { - opacity: 0; - pointer-events: none; - } -} - -.s-logo-openmctweb { - background-image: url($dirImgs + 'logo-openmctweb-shdw.svg'); -} diff --git a/platform/commonUI/general/src/SplashScreenManager.js b/platform/commonUI/general/src/SplashScreenManager.js index e9666f4f6d..8c38339531 100644 --- a/platform/commonUI/general/src/SplashScreenManager.js +++ b/platform/commonUI/general/src/SplashScreenManager.js @@ -32,7 +32,8 @@ define([ function SplashScreenManager($document) { var splash; $document = $document[0]; - splash = $document.querySelectorAll('.s-logo-holder')[0]; + splash = $document.querySelectorAll('.l-splash-holder')[0]; + console.log(splash); if (!splash) { return; } From 129b554f9d1d02d83ceec1fe42ee743bcc06969f Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Wed, 24 Feb 2016 17:47:24 -0800 Subject: [PATCH 44/76] [Frontend] Significant markup/CSS mods for splash screen #164 https://github.jpl.nasa.gov/MissionControl/vista/issues/299 App logo and bg files renamed; Added openmct.scss to hold openmct-specific styles; Renamed _startup.scss to startup-base.scss which now renders its own .css file; Still to-do: apply to WARP including needed mods to its About dialog screen; --- index.html | 3 +- .../about/res/templates/about-dialog.html | 1 - ...{bg-about-openmctweb.jpg => bg-splash.jpg} | Bin ...-openmctweb-shdw.svg => logo-app-shdw.svg} | 198 +++++++++--------- .../{logo-openmctweb.svg => logo-app.svg} | 140 ++++++------- .../general/res/sass/_logo-and-bg.scss | 42 +++- .../commonUI/general/res/sass/_startup.scss | 47 ----- .../sass/{startup-open.scss => openmct.scss} | 21 +- .../general/res/sass/startup-base.scss | 70 +++++++ .../res/sass/user-environ/_layout.scss | 3 - 10 files changed, 287 insertions(+), 238 deletions(-) rename platform/commonUI/general/res/images/{bg-about-openmctweb.jpg => bg-splash.jpg} (100%) rename platform/commonUI/general/res/images/{logo-openmctweb-shdw.svg => logo-app-shdw.svg} (99%) rename platform/commonUI/general/res/images/{logo-openmctweb.svg => logo-app.svg} (98%) delete mode 100644 platform/commonUI/general/res/sass/_startup.scss rename platform/commonUI/general/res/sass/{startup-open.scss => openmct.scss} (75%) create mode 100644 platform/commonUI/general/res/sass/startup-base.scss diff --git a/index.html b/index.html index 2535414aa7..6307a5f0dd 100644 --- a/index.html +++ b/index.html @@ -33,7 +33,8 @@ mct.run(); }); - + + diff --git a/platform/commonUI/about/res/templates/about-dialog.html b/platform/commonUI/about/res/templates/about-dialog.html index fe19442f16..7b7dd436f5 100644 --- a/platform/commonUI/about/res/templates/about-dialog.html +++ b/platform/commonUI/about/res/templates/about-dialog.html @@ -21,7 +21,6 @@ -->
                  -

                  OpenMCT Web

                  diff --git a/platform/commonUI/general/res/images/bg-about-openmctweb.jpg b/platform/commonUI/general/res/images/bg-splash.jpg similarity index 100% rename from platform/commonUI/general/res/images/bg-about-openmctweb.jpg rename to platform/commonUI/general/res/images/bg-splash.jpg diff --git a/platform/commonUI/general/res/images/logo-openmctweb-shdw.svg b/platform/commonUI/general/res/images/logo-app-shdw.svg similarity index 99% rename from platform/commonUI/general/res/images/logo-openmctweb-shdw.svg rename to platform/commonUI/general/res/images/logo-app-shdw.svg index cd7b4cd19b..cf42b0621c 100644 --- a/platform/commonUI/general/res/images/logo-openmctweb-shdw.svg +++ b/platform/commonUI/general/res/images/logo-app-shdw.svg @@ -1,99 +1,99 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform/commonUI/general/res/images/logo-openmctweb.svg b/platform/commonUI/general/res/images/logo-app.svg similarity index 98% rename from platform/commonUI/general/res/images/logo-openmctweb.svg rename to platform/commonUI/general/res/images/logo-app.svg index 4db4e60396..9a2acf1f81 100644 --- a/platform/commonUI/general/res/images/logo-openmctweb.svg +++ b/platform/commonUI/general/res/images/logo-app.svg @@ -1,70 +1,70 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform/commonUI/general/res/sass/_logo-and-bg.scss b/platform/commonUI/general/res/sass/_logo-and-bg.scss index 136060cc9c..a78ac85e88 100644 --- a/platform/commonUI/general/res/sass/_logo-and-bg.scss +++ b/platform/commonUI/general/res/sass/_logo-and-bg.scss @@ -1,24 +1,49 @@ +/***************************************************************************** + * 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. + *****************************************************************************/ +.l-splash, +.l-splash:before, +.l-splash:after { + background-position: center; + background-repeat: no-repeat; + position: absolute; +} + .l-splash { background-size: cover; - position: absolute; top: 0; right: 0; bottom: 0; left: 0; &:before, &:after { - background-position: center; - background-repeat: no-repeat; background-size: contain; content: ''; - position: absolute; } &:before { // NASA logo $w: 5%; $m: 10px; - background-image: url($dirImgs + 'logo-nasa.svg'); + background-image: url('/platform/commonUI/general/res/images/logo-nasa.svg'); top: $m; right: auto; bottom: auto; @@ -38,9 +63,10 @@ } } +/* .s-splash { - background-image: url($dirImgs + "bg-about-openmctweb.jpg"); // For OpenMCT Web. + background-image: url('/branding/res/images/bg-splash.jpg'); &:after { - background-image: url($dirImgs + 'logo-openmctweb-shdw.svg'); + background-image: url('/branding/res/images/logo-app-shdw.svg'); } -} \ No newline at end of file +}*/ diff --git a/platform/commonUI/general/res/sass/_startup.scss b/platform/commonUI/general/res/sass/_startup.scss deleted file mode 100644 index 3124cd1c45..0000000000 --- a/platform/commonUI/general/res/sass/_startup.scss +++ /dev/null @@ -1,47 +0,0 @@ -@import "bourbon"; -$dirImgs: '../../../general/res/images/'; -@import "logo-and-bg"; - -@mixin splashElem($m: 20%) { - top: $m; right: $m * 1.25; bottom: $m; left: $m * 1.25; - -} - -.l-splash-holder { - // Main outer holder. - @include transition-property(opacity); - @include transition-duration(500ms); - @include transition-timing-function(ease-in-out); - @include transition-delay(1s); - z-index: 10000; - opacity: 1; - &.fadeout { - opacity: 0; - pointer-events: none; - } - .l-splash { - // The splash element. - @include splashElem(); - border-radius: 10px; - box-shadow: 0 5px 50px 25px rgba(#fff, 0.1); - } -} - -@media only screen and (max-device-width: 767px) { - .l-splash-holder .l-splash { - @include splashElem(0); - border-radius: 0; - box-shadow: none; - } -} - -@media only screen and (max-device-width: 767px) and (orientation: portrait) { - .l-splash-holder .l-splash { - &:before { - $w: 12%; - width: $w * 2; - padding-bottom: $w; - padding-top: $w; - } - } -} \ No newline at end of file diff --git a/platform/commonUI/general/res/sass/startup-open.scss b/platform/commonUI/general/res/sass/openmct.scss similarity index 75% rename from platform/commonUI/general/res/sass/startup-open.scss rename to platform/commonUI/general/res/sass/openmct.scss index 0f13bf853d..43dc1736b0 100644 --- a/platform/commonUI/general/res/sass/startup-open.scss +++ b/platform/commonUI/general/res/sass/openmct.scss @@ -19,18 +19,21 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -@import "startup"; +.app-logo { + background: url('/platform/commonUI/general/res/images/logo-app.svg') no-repeat center center; +} .l-splash-holder { background: #333; - position: absolute; - top: 0; right: 0; bottom: 0; left: 0; .s-splash { - background-image: url($dirImgs + "bg-about-openmctweb.jpg"); // For OpenMCT Web. - // &:before { // Use this to override the NASA logo. Could add a AMMOS logo along with NASA if desired. } - &:after { - // App logo - background-image: url($dirImgs + 'logo-openmctweb-shdw.svg'); - } + border-radius: 10px; + box-shadow: 0 5px 50px 25px rgba(255, 255, 255, 0.1); } } + +.s-splash { + background-image: url('/platform/commonUI/general/res/images/bg-splash.jpg'); + &:after { + background-image: url('/platform/commonUI/general/res/images/logo-app-shdw.svg'); + } +} \ No newline at end of file diff --git a/platform/commonUI/general/res/sass/startup-base.scss b/platform/commonUI/general/res/sass/startup-base.scss new file mode 100644 index 0000000000..c99870f880 --- /dev/null +++ b/platform/commonUI/general/res/sass/startup-base.scss @@ -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. + *****************************************************************************/ +@import "bourbon"; +@import "logo-and-bg"; + +@mixin splashElem($m: 20%) { + top: $m; right: $m * 1.25; bottom: $m; left: $m * 1.25; +} + +.l-splash-holder { + // Main outer holder. + @include transition-property(opacity); + @include transition-duration(500ms); + @include transition-timing-function(ease-in-out); + @include transition-delay(1s); + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 10000; + opacity: 1; + &.fadeout { + opacity: 0; + pointer-events: none; + } + .l-splash { + // The splash element. + @include splashElem(); + } +} + +@media only screen and (max-device-width: 767px) { + .l-splash-holder .l-splash { + @include splashElem(0); + border-radius: 0; + box-shadow: none; + } +} + +@media only screen and (max-device-width: 767px) and (orientation: portrait) { + .l-splash-holder .l-splash { + &:before { + // Make the NASA logo a bit bigger when we're in portrait mode. + $w: 12%; + width: $w * 2; + padding-bottom: $w; + padding-top: $w; + } + } +} \ No newline at end of file diff --git a/platform/commonUI/general/res/sass/user-environ/_layout.scss b/platform/commonUI/general/res/sass/user-environ/_layout.scss index 23a47447b2..f2f73ead8a 100644 --- a/platform/commonUI/general/res/sass/user-environ/_layout.scss +++ b/platform/commonUI/general/res/sass/user-environ/_layout.scss @@ -100,9 +100,6 @@ left: auto; width: $ueAppLogoW; z-index: 2; - &.logo-openmctweb { - background: url($dirImgs + 'logo-openmctweb.svg') no-repeat center center; - } } } } From 1a2a2e66ca6fb646999e51c2cab2422d70a69913 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Thu, 25 Feb 2016 12:41:54 -0800 Subject: [PATCH 45/76] [Frontend] Removed commented styling open #164 --- platform/commonUI/general/res/sass/_logo-and-bg.scss | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/platform/commonUI/general/res/sass/_logo-and-bg.scss b/platform/commonUI/general/res/sass/_logo-and-bg.scss index a78ac85e88..fbe13f7cb4 100644 --- a/platform/commonUI/general/res/sass/_logo-and-bg.scss +++ b/platform/commonUI/general/res/sass/_logo-and-bg.scss @@ -61,12 +61,4 @@ bottom: 0; left: 15%; } -} - -/* -.s-splash { - background-image: url('/branding/res/images/bg-splash.jpg'); - &:after { - background-image: url('/branding/res/images/logo-app-shdw.svg'); - } -}*/ +} \ No newline at end of file From d203f3adc08f73cad949d19807d33373e5b7a0fe Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Fri, 26 Feb 2016 10:15:15 -0800 Subject: [PATCH 46/76] [Frontend] New logo art; paths changed #164 Per comments in #702, abs paths changed to relative; New logo art for Open MCT added; CSS tweaked as needed; --- platform/commonUI/general/res/sass/_constants.scss | 2 +- platform/commonUI/general/res/sass/openmct.scss | 6 +++--- .../commonUI/general/res/sass/user-environ/_layout.scss | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/platform/commonUI/general/res/sass/_constants.scss b/platform/commonUI/general/res/sass/_constants.scss index ab6b729533..d5f725862f 100644 --- a/platform/commonUI/general/res/sass/_constants.scss +++ b/platform/commonUI/general/res/sass/_constants.scss @@ -40,7 +40,7 @@ $ueTopBarEditH: 30px; $ueTopBarBtnH: 35px; $ueFooterH: 25px; $ueColMargin: 1.5%; -$ueAppLogoW: 105px; +$ueAppLogoW: 80px; $ueEditToolBarH: 25px; $ueCollapsedPaneEdgeM: 22px; $uePaneMiniTabH: $ueTopBarH; diff --git a/platform/commonUI/general/res/sass/openmct.scss b/platform/commonUI/general/res/sass/openmct.scss index 43dc1736b0..1fc1ed28fe 100644 --- a/platform/commonUI/general/res/sass/openmct.scss +++ b/platform/commonUI/general/res/sass/openmct.scss @@ -20,7 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ .app-logo { - background: url('/platform/commonUI/general/res/images/logo-app.svg') no-repeat center center; + background: url('../images/logo-app.svg') no-repeat center center; } .l-splash-holder { @@ -32,8 +32,8 @@ } .s-splash { - background-image: url('/platform/commonUI/general/res/images/bg-splash.jpg'); + background-image: url('../images/bg-splash.jpg'); &:after { - background-image: url('/platform/commonUI/general/res/images/logo-app-shdw.svg'); + background-image: url('../images/logo-app-shdw.svg'); } } \ No newline at end of file diff --git a/platform/commonUI/general/res/sass/user-environ/_layout.scss b/platform/commonUI/general/res/sass/user-environ/_layout.scss index f2f73ead8a..99d8fb9d14 100644 --- a/platform/commonUI/general/res/sass/user-environ/_layout.scss +++ b/platform/commonUI/general/res/sass/user-environ/_layout.scss @@ -94,10 +94,11 @@ z-index: 1; } .app-logo { + background-position: right center; box-sizing: border-box; - @include absPosDefault($interiorMargin); + @include absPosDefault($interiorMargin - 1); cursor: pointer; - left: auto; + left: auto; right: $interiorMargin; width: $ueAppLogoW; z-index: 2; } From bc3eb4ab8d863d670131414e6b8a97da370197cd Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Fri, 26 Feb 2016 10:59:54 -0800 Subject: [PATCH 47/76] [Frontend] New logo art #164 New logo art for Open MCT added; Removed console.log; --- .../general/res/images/logo-app-shdw.svg | 111 ++++-------------- .../commonUI/general/res/images/logo-app.svg | 86 ++++---------- .../general/src/SplashScreenManager.js | 1 - 3 files changed, 42 insertions(+), 156 deletions(-) diff --git a/platform/commonUI/general/res/images/logo-app-shdw.svg b/platform/commonUI/general/res/images/logo-app-shdw.svg index cf42b0621c..17eeaa8c6e 100644 --- a/platform/commonUI/general/res/images/logo-app-shdw.svg +++ b/platform/commonUI/general/res/images/logo-app-shdw.svg @@ -1,99 +1,32 @@ - - + - - - + viewBox="20 0 640 150" enable-background="new 20 0 640 150" xml:space="preserve"> + + + - - - - - - - - - - - + + + + + + + diff --git a/platform/commonUI/general/res/images/logo-app.svg b/platform/commonUI/general/res/images/logo-app.svg index 9a2acf1f81..b328671336 100644 --- a/platform/commonUI/general/res/images/logo-app.svg +++ b/platform/commonUI/general/res/images/logo-app.svg @@ -1,70 +1,24 @@ - - + - - - - - - - - - - - - - - - - - - + viewBox="20 0 640 150" enable-background="new 20 0 640 150" xml:space="preserve"> + + + + + + + + diff --git a/platform/commonUI/general/src/SplashScreenManager.js b/platform/commonUI/general/src/SplashScreenManager.js index 8c38339531..97b866ec45 100644 --- a/platform/commonUI/general/src/SplashScreenManager.js +++ b/platform/commonUI/general/src/SplashScreenManager.js @@ -33,7 +33,6 @@ define([ var splash; $document = $document[0]; splash = $document.querySelectorAll('.l-splash-holder')[0]; - console.log(splash); if (!splash) { return; } From 4666292907ef18adb2838a9e0a81ed8cda7a642f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 12:12:13 -0800 Subject: [PATCH 48/76] [Templates] Begin writing migration script ...to rewrite bundle.js files to load templates via the RequireJS text plugin. #673 --- scripts/migrate-templates.js | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 scripts/migrate-templates.js diff --git a/scripts/migrate-templates.js b/scripts/migrate-templates.js new file mode 100644 index 0000000000..b3bf8fe52c --- /dev/null +++ b/scripts/migrate-templates.js @@ -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. + *****************************************************************************/ + +// Converts all templateUrl references in bundle.js files to +// plain template references, loading said templates with the +// RequireJS text plugin. + +var glob = require('glob'), + fs = require('fs'), + path = require('path'), + _ = require('lodash'); + +function findTemplateURLs(sourceCode) { + return sourceCode.split('\n') + .map(_.trim) + .filter(function (line) { + return line.indexOf("templateUrl") !== -1; + }); +} + +function migrate(file) { + var sourceCode = fs.readFileSync(file, 'utf8'), + templateUrls = findTemplateURLs(sourceCode); + console.log(templateUrls); +} + +glob('platform/**/bundle.js', {}, function (err, files) { + if (err) { + console.log(err); + return; + } + + files.forEach(migrate); +}); From 930fed83e81fa66b44c8ca501f2734029ccf4f16 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 12:17:57 -0800 Subject: [PATCH 49/76] [Templates] Create variable names by template URL --- scripts/migrate-templates.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/migrate-templates.js b/scripts/migrate-templates.js index b3bf8fe52c..4e43e39a48 100644 --- a/scripts/migrate-templates.js +++ b/scripts/migrate-templates.js @@ -29,18 +29,29 @@ var glob = require('glob'), path = require('path'), _ = require('lodash'); +function toTemplateName(templateUrl) { + var parts = templateUrl.split('/'); + return _.camelCase(parts[parts.length - 1].replace(".html", "")) + + "Template"; +} + function findTemplateURLs(sourceCode) { return sourceCode.split('\n') .map(_.trim) .filter(function (line) { return line.indexOf("templateUrl") !== -1; + }) + .map(function (line) { + return _.trim(line.split(":")[1], "\", "); }); } function migrate(file) { var sourceCode = fs.readFileSync(file, 'utf8'), templateUrls = findTemplateURLs(sourceCode); - console.log(templateUrls); + templateUrls.forEach(function (templateUrl) { + console.log(templateUrl, toTemplateName(templateUrl)); + }); } glob('platform/**/bundle.js', {}, function (err, files) { From f2e4b0172103525363bb87b6716f95dc5e83ea76 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 12:50:28 -0800 Subject: [PATCH 50/76] [Templates] Add template paths ...with text! prefix --- scripts/migrate-templates.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/scripts/migrate-templates.js b/scripts/migrate-templates.js index 4e43e39a48..f9c1f3bcd8 100644 --- a/scripts/migrate-templates.js +++ b/scripts/migrate-templates.js @@ -46,12 +46,25 @@ function findTemplateURLs(sourceCode) { }); } +function injectRequireArgument(sourceCode, templateUrls) { + var lines = sourceCode.split('\n'), + index; + + templateUrls = _.uniq(templateUrls); + + index = lines.map(_.trim).indexOf("'legacyRegistry'"); + + lines = lines.slice(0, index).concat(templateUrls.map(function (url) { + return " \"text!./res/" + url + "\","; + }).concat(lines.slice(index))); + + return lines.join('\n'); +} + function migrate(file) { var sourceCode = fs.readFileSync(file, 'utf8'), templateUrls = findTemplateURLs(sourceCode); - templateUrls.forEach(function (templateUrl) { - console.log(templateUrl, toTemplateName(templateUrl)); - }); + console.log(injectRequireArgument(sourceCode, templateUrls)); } glob('platform/**/bundle.js', {}, function (err, files) { From 852faf061ea18e0ec9ed9069c7aa247320117688 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 12:51:58 -0800 Subject: [PATCH 51/76] [Templates] Add parameter names for required templates --- scripts/migrate-templates.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/migrate-templates.js b/scripts/migrate-templates.js index f9c1f3bcd8..15bfd4defb 100644 --- a/scripts/migrate-templates.js +++ b/scripts/migrate-templates.js @@ -52,12 +52,18 @@ function injectRequireArgument(sourceCode, templateUrls) { templateUrls = _.uniq(templateUrls); + // Add arguments for source paths... index = lines.map(_.trim).indexOf("'legacyRegistry'"); - lines = lines.slice(0, index).concat(templateUrls.map(function (url) { return " \"text!./res/" + url + "\","; }).concat(lines.slice(index))); + /// ...and for arguments + index = lines.map(_.trim).indexOf("legacyRegistry"); + lines = lines.slice(0, index).concat(templateUrls.map(function (url) { + return " " + toTemplateName(url) + ","; + }).concat(lines.slice(index))); + return lines.join('\n'); } From e13e068b6ebb6220d029fbe45c7c00c9250f7b82 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 13:00:50 -0800 Subject: [PATCH 52/76] [Templates] Begin teplacing templateUrl properties --- scripts/migrate-templates.js | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/scripts/migrate-templates.js b/scripts/migrate-templates.js index 15bfd4defb..365fa5ba1d 100644 --- a/scripts/migrate-templates.js +++ b/scripts/migrate-templates.js @@ -35,15 +35,19 @@ function toTemplateName(templateUrl) { "Template"; } +function getTemplateUrl(sourceLine) { + return _.trim(sourceLine.split(":")[1], "\", "); +} + +function hasTemplateUrl(sourceLine) { + return sourceLine.indexOf("templateUrl") !== -1; +} + function findTemplateURLs(sourceCode) { return sourceCode.split('\n') .map(_.trim) - .filter(function (line) { - return line.indexOf("templateUrl") !== -1; - }) - .map(function (line) { - return _.trim(line.split(":")[1], "\", "); - }); + .filter(hasTemplateUrl) + .map(getTemplateUrl); } function injectRequireArgument(sourceCode, templateUrls) { @@ -67,10 +71,24 @@ function injectRequireArgument(sourceCode, templateUrls) { return lines.join('\n'); } +function rewriteUrl(sourceLine) { + return "\"template\": " + toTemplateName(getTemplateUrl(sourceLine)); +} + +function rewriteLine(sourceLine) { + return hasTemplateUrl(sourceLine) ? + rewriteUrl(sourceLine.replace("templateUrl", "template")) : + sourceLine; +} + +function rewriteTemplateUrls(sourceCode) { + return sourceCode.split('\n').map(rewriteLine).join('\n'); +} + function migrate(file) { var sourceCode = fs.readFileSync(file, 'utf8'), templateUrls = findTemplateURLs(sourceCode); - console.log(injectRequireArgument(sourceCode, templateUrls)); + console.log(rewriteTemplateUrls(injectRequireArgument(sourceCode, templateUrls))); } glob('platform/**/bundle.js', {}, function (err, files) { From 8ea56486c56b1e03f93cfdcce350268ce359fb27 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 13:03:06 -0800 Subject: [PATCH 53/76] [Templates] Normalize spacing --- scripts/migrate-templates.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/migrate-templates.js b/scripts/migrate-templates.js index 365fa5ba1d..ca56a8ada3 100644 --- a/scripts/migrate-templates.js +++ b/scripts/migrate-templates.js @@ -72,7 +72,11 @@ function injectRequireArgument(sourceCode, templateUrls) { } function rewriteUrl(sourceLine) { - return "\"template\": " + toTemplateName(getTemplateUrl(sourceLine)); + return [ + sourceLine.substring(0, sourceLine.indexOf(sourceLine.trim())), + "\"template\": " + toTemplateName(getTemplateUrl(sourceLine)), + _.endsWith(sourceLine, ",") ? "," : "" + ].join(''); } function rewriteLine(sourceLine) { From 60efdb4ad3b6a87fd467c638a55ffed7de7b9ca6 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 13:07:32 -0800 Subject: [PATCH 54/76] [Templates] Add in-place rewrite step --- scripts/migrate-templates.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/migrate-templates.js b/scripts/migrate-templates.js index ca56a8ada3..4ada0c0ea3 100644 --- a/scripts/migrate-templates.js +++ b/scripts/migrate-templates.js @@ -90,9 +90,10 @@ function rewriteTemplateUrls(sourceCode) { } function migrate(file) { - var sourceCode = fs.readFileSync(file, 'utf8'), - templateUrls = findTemplateURLs(sourceCode); - console.log(rewriteTemplateUrls(injectRequireArgument(sourceCode, templateUrls))); + var sourceCode = fs.readFileSync(file, 'utf8'); + fs.writeFileSync(file, rewriteTemplateUrls( + injectRequireArgument(sourceCode, findTemplateURLs(sourceCode)) + ), 'utf8'); } glob('platform/**/bundle.js', {}, function (err, files) { From bf1fa0ac4c5c453f831f76e1a86b128cc14dc509 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 13:07:50 -0800 Subject: [PATCH 55/76] [Templates] Include templates using text plugin Resolves #673 --- platform/commonUI/about/bundle.js | 28 ++++++-- platform/commonUI/browse/bundle.js | 42 ++++++++---- platform/commonUI/dialog/bundle.js | 28 ++++++-- platform/commonUI/edit/bundle.js | 24 +++++-- platform/commonUI/general/bundle.js | 80 +++++++++++++++++------ platform/commonUI/inspect/bundle.js | 16 +++-- platform/commonUI/notification/bundle.js | 4 +- platform/features/clock/bundle.js | 8 ++- platform/features/conductor/bundle.js | 4 +- platform/features/events/bundle.js | 4 +- platform/features/imagery/bundle.js | 4 +- platform/features/layout/bundle.js | 32 ++++++--- platform/features/pages/bundle.js | 4 +- platform/features/plot/bundle.js | 4 +- platform/features/rtevents/bundle.js | 4 +- platform/features/rtscrolling/bundle.js | 4 +- platform/features/scrolling/bundle.js | 4 +- platform/features/static-markup/bundle.js | 4 +- platform/features/timeline/bundle.js | 42 ++++++++---- platform/forms/bundle.js | 36 +++++++--- platform/persistence/queue/bundle.js | 4 +- platform/search/bundle.js | 12 +++- 22 files changed, 292 insertions(+), 100 deletions(-) diff --git a/platform/commonUI/about/bundle.js b/platform/commonUI/about/bundle.js index 90235af297..aff0825f5c 100644 --- a/platform/commonUI/about/bundle.js +++ b/platform/commonUI/about/bundle.js @@ -26,12 +26,26 @@ define([ "./src/LogoController", "./src/AboutController", "./src/LicenseController", + "text!./res/templates/app-logo.html", + "text!./res/templates/about-logo.html", + "text!./res/templates/overlay-about.html", + "text!./res/templates/license-apache.html", + "text!./res/templates/license-mit.html", + "text!./res/templates/licenses.html", + "text!./res/templates/licenses-export-md.html", 'legacyRegistry' ], function ( aboutDialogTemplate, LogoController, AboutController, LicenseController, + appLogoTemplate, + aboutLogoTemplate, + overlayAboutTemplate, + licenseApacheTemplate, + licenseMitTemplate, + licensesTemplate, + licensesExportMdTemplate, legacyRegistry ) { "use strict"; @@ -43,12 +57,12 @@ define([ { "key": "app-logo", "priority": "optional", - "templateUrl": "templates/app-logo.html" + "template": appLogoTemplate }, { "key": "about-logo", "priority": "preferred", - "templateUrl": "templates/about-logo.html" + "template": aboutLogoTemplate }, { "key": "about-dialog", @@ -56,15 +70,15 @@ define([ }, { "key": "overlay-about", - "templateUrl": "templates/overlay-about.html" + "template": overlayAboutTemplate }, { "key": "license-apache", - "templateUrl": "templates/license-apache.html" + "template": licenseApacheTemplate }, { "key": "license-mit", - "templateUrl": "templates/license-mit.html" + "template": licenseMitTemplate } ], "controllers": [ @@ -156,11 +170,11 @@ define([ "routes": [ { "when": "/licenses", - "templateUrl": "templates/licenses.html" + "template": licensesTemplate }, { "when": "/licenses-md", - "templateUrl": "templates/licenses-export-md.html" + "template": licensesExportMdTemplate } ] } diff --git a/platform/commonUI/browse/bundle.js b/platform/commonUI/browse/bundle.js index 10eb6c7004..74c4059cab 100644 --- a/platform/commonUI/browse/bundle.js +++ b/platform/commonUI/browse/bundle.js @@ -37,6 +37,16 @@ define([ "./src/creation/AddActionProvider", "./src/creation/CreationService", "./src/windowing/WindowTitler", + "text!./res/templates/browse.html", + "text!./res/templates/create/locator.html", + "text!./res/templates/browse-object.html", + "text!./res/templates/create/create-button.html", + "text!./res/templates/create/create-menu.html", + "text!./res/templates/items/grid-item.html", + "text!./res/templates/browse/object-header.html", + "text!./res/templates/menu-arrow.html", + "text!./res/templates/back-arrow.html", + "text!./res/templates/items/items.html", 'legacyRegistry' ], function ( BrowseController, @@ -54,6 +64,16 @@ define([ AddActionProvider, CreationService, WindowTitler, + browseTemplate, + locatorTemplate, + browseObjectTemplate, + createButtonTemplate, + createMenuTemplate, + gridItemTemplate, + objectHeaderTemplate, + menuArrowTemplate, + backArrowTemplate, + itemsTemplate, legacyRegistry ) { "use strict"; @@ -63,12 +83,12 @@ define([ "routes": [ { "when": "/browse/:ids*", - "templateUrl": "templates/browse.html", + "template": browseTemplate, "reloadOnSearch": false }, { "when": "", - "templateUrl": "templates/browse.html", + "template": browseTemplate, "reloadOnSearch": false } ], @@ -134,13 +154,13 @@ define([ "controls": [ { "key": "locator", - "templateUrl": "templates/create/locator.html" + "template": locatorTemplate } ], "representations": [ { "key": "browse-object", - "templateUrl": "templates/browse-object.html", + "template": browseObjectTemplate, "gestures": [ "drop" ], @@ -150,18 +170,18 @@ define([ }, { "key": "create-button", - "templateUrl": "templates/create/create-button.html" + "template": createButtonTemplate }, { "key": "create-menu", - "templateUrl": "templates/create/create-menu.html", + "template": createMenuTemplate, "uses": [ "action" ] }, { "key": "grid-item", - "templateUrl": "templates/items/grid-item.html", + "template": gridItemTemplate, "uses": [ "type", "action", @@ -174,14 +194,14 @@ define([ }, { "key": "object-header", - "templateUrl": "templates/browse/object-header.html", + "template": objectHeaderTemplate, "uses": [ "type" ] }, { "key": "menu-arrow", - "templateUrl": "templates/menu-arrow.html", + "template": menuArrowTemplate, "uses": [ "action" ], @@ -194,7 +214,7 @@ define([ "uses": [ "context" ], - "templateUrl": "templates/back-arrow.html" + "template": backArrowTemplate } ], "services": [ @@ -250,7 +270,7 @@ define([ "name": "Items", "glyph": "9", "description": "Grid of available items", - "templateUrl": "templates/items/items.html", + "template": itemsTemplate, "uses": [ "composition" ], diff --git a/platform/commonUI/dialog/bundle.js b/platform/commonUI/dialog/bundle.js index 3839afbcf8..3d99408478 100644 --- a/platform/commonUI/dialog/bundle.js +++ b/platform/commonUI/dialog/bundle.js @@ -24,10 +24,24 @@ define([ "./src/DialogService", "./src/OverlayService", + "text!./res/templates/overlay-dialog.html", + "text!./res/templates/overlay-options.html", + "text!./res/templates/dialog.html", + "text!./res/templates/overlay-blocking-message.html", + "text!./res/templates/message.html", + "text!./res/templates/overlay-message-list.html", + "text!./res/templates/overlay.html", 'legacyRegistry' ], function ( DialogService, OverlayService, + overlayDialogTemplate, + overlayOptionsTemplate, + dialogTemplate, + overlayBlockingMessageTemplate, + messageTemplate, + overlayMessageListTemplate, + overlayTemplate, legacyRegistry ) { "use strict"; @@ -57,33 +71,33 @@ define([ "templates": [ { "key": "overlay-dialog", - "templateUrl": "templates/overlay-dialog.html" + "template": overlayDialogTemplate }, { "key": "overlay-options", - "templateUrl": "templates/overlay-options.html" + "template": overlayOptionsTemplate }, { "key": "form-dialog", - "templateUrl": "templates/dialog.html" + "template": dialogTemplate }, { "key": "overlay-blocking-message", - "templateUrl": "templates/overlay-blocking-message.html" + "template": overlayBlockingMessageTemplate }, { "key": "message", - "templateUrl": "templates/message.html" + "template": messageTemplate }, { "key": "overlay-message-list", - "templateUrl": "templates/overlay-message-list.html" + "template": overlayMessageListTemplate } ], "containers": [ { "key": "overlay", - "templateUrl": "templates/overlay.html" + "template": overlayTemplate } ] } diff --git a/platform/commonUI/edit/bundle.js b/platform/commonUI/edit/bundle.js index f5142031e6..c4b0da1798 100644 --- a/platform/commonUI/edit/bundle.js +++ b/platform/commonUI/edit/bundle.js @@ -36,6 +36,12 @@ define([ "./src/policies/EditActionPolicy", "./src/representers/EditRepresenter", "./src/representers/EditToolbarRepresenter", + "text!./res/templates/edit.html", + "text!./res/templates/library.html", + "text!./res/templates/edit-object.html", + "text!./res/templates/edit-action-buttons.html", + "text!./res/templates/elements.html", + "text!./res/templates/topbar-edit.html", 'legacyRegistry' ], function ( EditController, @@ -52,6 +58,12 @@ define([ EditActionPolicy, EditRepresenter, EditToolbarRepresenter, + editTemplate, + libraryTemplate, + editObjectTemplate, + editActionButtonsTemplate, + elementsTemplate, + topbarEditTemplate, legacyRegistry ) { "use strict"; @@ -61,7 +73,7 @@ define([ "routes": [ { "when": "/edit", - "templateUrl": "templates/edit.html" + "template": editTemplate } ], "controllers": [ @@ -185,27 +197,27 @@ define([ "templates": [ { "key": "edit-library", - "templateUrl": "templates/library.html" + "template": libraryTemplate } ], "representations": [ { "key": "edit-object", - "templateUrl": "templates/edit-object.html", + "template": editObjectTemplate, "uses": [ "view" ] }, { "key": "edit-action-buttons", - "templateUrl": "templates/edit-action-buttons.html", + "template": editActionButtonsTemplate, "uses": [ "action" ] }, { "key": "edit-elements", - "templateUrl": "templates/elements.html", + "template": elementsTemplate, "uses": [ "composition" ], @@ -215,7 +227,7 @@ define([ }, { "key": "topbar-edit", - "templateUrl": "templates/topbar-edit.html" + "template": topbarEditTemplate } ], "representers": [ diff --git a/platform/commonUI/general/bundle.js b/platform/commonUI/general/bundle.js index 6077785cf1..71c5890947 100644 --- a/platform/commonUI/general/bundle.js +++ b/platform/commonUI/general/bundle.js @@ -48,6 +48,25 @@ define([ "./src/directives/MCTScroll", "./src/directives/MCTSplitPane", "./src/directives/MCTSplitter", + "text!./res/templates/bottombar.html", + "text!./res/templates/controls/action-button.html", + "text!./res/templates/controls/input-filter.html", + "text!./res/templates/indicator.html", + "text!./res/templates/message-banner.html", + "text!./res/templates/progress-bar.html", + "text!./res/templates/controls/time-controller.html", + "text!./res/templates/containers/accordion.html", + "text!./res/templates/subtree.html", + "text!./res/templates/tree.html", + "text!./res/templates/tree-node.html", + "text!./res/templates/label.html", + "text!./res/templates/controls/action-group.html", + "text!./res/templates/menu/context-menu.html", + "text!./res/templates/controls/switcher.html", + "text!./res/templates/object-inspector.html", + "text!./res/templates/controls/selector.html", + "text!./res/templates/controls/datetime-picker.html", + "text!./res/templates/controls/datetime-field.html", 'legacyRegistry' ], function ( UrlService, @@ -76,6 +95,25 @@ define([ MCTScroll, MCTSplitPane, MCTSplitter, + bottombarTemplate, + actionButtonTemplate, + inputFilterTemplate, + indicatorTemplate, + messageBannerTemplate, + progressBarTemplate, + timeControllerTemplate, + accordionTemplate, + subtreeTemplate, + treeTemplate, + treeNodeTemplate, + labelTemplate, + actionGroupTemplate, + contextMenuTemplate, + switcherTemplate, + objectInspectorTemplate, + selectorTemplate, + datetimePickerTemplate, + datetimeFieldTemplate, legacyRegistry ) { "use strict"; @@ -138,31 +176,31 @@ define([ "templates": [ { "key": "bottombar", - "templateUrl": "templates/bottombar.html" + "template": bottombarTemplate }, { "key": "action-button", - "templateUrl": "templates/controls/action-button.html" + "template": actionButtonTemplate }, { "key": "input-filter", - "templateUrl": "templates/controls/input-filter.html" + "template": inputFilterTemplate }, { "key": "indicator", - "templateUrl": "templates/indicator.html" + "template": indicatorTemplate }, { "key": "message-banner", - "templateUrl": "templates/message-banner.html" + "template": messageBannerTemplate }, { "key": "progress-bar", - "templateUrl": "templates/progress-bar.html" + "template": progressBarTemplate }, { "key": "time-controller", - "templateUrl": "templates/controls/time-controller.html" + "template": timeControllerTemplate } ], "controllers": [ @@ -371,7 +409,7 @@ define([ "containers": [ { "key": "accordion", - "templateUrl": "templates/containers/accordion.html", + "template": accordionTemplate, "attributes": [ "label" ] @@ -380,7 +418,7 @@ define([ "representations": [ { "key": "tree", - "templateUrl": "templates/subtree.html", + "template": subtreeTemplate, "uses": [ "composition" ], @@ -389,25 +427,25 @@ define([ }, { "key": "tree", - "templateUrl": "templates/tree.html" + "template": treeTemplate }, { "key": "subtree", - "templateUrl": "templates/subtree.html", + "template": subtreeTemplate, "uses": [ "composition" ] }, { "key": "tree-node", - "templateUrl": "templates/tree-node.html", + "template": treeNodeTemplate, "uses": [ "action" ] }, { "key": "label", - "templateUrl": "templates/label.html", + "template": labelTemplate, "uses": [ "type", "location" @@ -420,7 +458,7 @@ define([ }, { "key": "node", - "templateUrl": "templates/label.html", + "template": labelTemplate, "uses": [ "type" ], @@ -431,42 +469,42 @@ define([ }, { "key": "action-group", - "templateUrl": "templates/controls/action-group.html", + "template": actionGroupTemplate, "uses": [ "action" ] }, { "key": "context-menu", - "templateUrl": "templates/menu/context-menu.html", + "template": contextMenuTemplate, "uses": [ "action" ] }, { "key": "switcher", - "templateUrl": "templates/controls/switcher.html", + "template": switcherTemplate, "uses": [ "view" ] }, { "key": "object-inspector", - "templateUrl": "templates/object-inspector.html" + "template": objectInspectorTemplate } ], "controls": [ { "key": "selector", - "templateUrl": "templates/controls/selector.html" + "template": selectorTemplate }, { "key": "datetime-picker", - "templateUrl": "templates/controls/datetime-picker.html" + "template": datetimePickerTemplate }, { "key": "datetime-field", - "templateUrl": "templates/controls/datetime-field.html" + "template": datetimeFieldTemplate } ], "licenses": [ diff --git a/platform/commonUI/inspect/bundle.js b/platform/commonUI/inspect/bundle.js index ea2f58e432..9576a344c1 100644 --- a/platform/commonUI/inspect/bundle.js +++ b/platform/commonUI/inspect/bundle.js @@ -25,11 +25,19 @@ define([ "./src/gestures/InfoGesture", "./src/gestures/InfoButtonGesture", "./src/services/InfoService", + "text!./res/info-table.html", + "text!./res/info-bubble.html", + "text!./res/bubble.html", + "text!./res/templates/info-button.html", 'legacyRegistry' ], function ( InfoGesture, InfoButtonGesture, InfoService, + infoTableTemplate, + infoBubbleTemplate, + bubbleTemplate, + infoButtonTemplate, legacyRegistry ) { "use strict"; @@ -39,17 +47,17 @@ define([ "templates": [ { "key": "info-table", - "templateUrl": "info-table.html" + "template": infoTableTemplate }, { "key": "info-bubble", - "templateUrl": "info-bubble.html" + "template": infoBubbleTemplate } ], "containers": [ { "key": "bubble", - "templateUrl": "bubble.html", + "template": bubbleTemplate, "attributes": [ "bubbleTitle", "bubbleLayout" @@ -99,7 +107,7 @@ define([ "representations": [ { "key": "info-button", - "templateUrl": "templates/info-button.html", + "template": infoButtonTemplate, "gestures": [ "infobutton" ] diff --git a/platform/commonUI/notification/bundle.js b/platform/commonUI/notification/bundle.js index a9123847fc..4bde1dff03 100644 --- a/platform/commonUI/notification/bundle.js +++ b/platform/commonUI/notification/bundle.js @@ -25,11 +25,13 @@ define([ "./src/NotificationIndicatorController", "./src/NotificationIndicator", "./src/NotificationService", + "text!./res/notification-indicator.html", 'legacyRegistry' ], function ( NotificationIndicatorController, NotificationIndicator, NotificationService, + notificationIndicatorTemplate, legacyRegistry ) { "use strict"; @@ -53,7 +55,7 @@ define([ "templates": [ { "key": "notificationIndicatorTemplate", - "templateUrl": "notification-indicator.html" + "template": notificationIndicatorTemplate } ], "controllers": [ diff --git a/platform/features/clock/bundle.js b/platform/features/clock/bundle.js index b7661e418b..1d22a3f8a0 100644 --- a/platform/features/clock/bundle.js +++ b/platform/features/clock/bundle.js @@ -29,6 +29,8 @@ define([ "./src/controllers/RefreshingController", "./src/actions/StartTimerAction", "./src/actions/RestartTimerAction", + "text!./res/templates/clock.html", + "text!./res/templates/timer.html", 'legacyRegistry' ], function ( ClockIndicator, @@ -38,6 +40,8 @@ define([ RefreshingController, StartTimerAction, RestartTimerAction, + clockTemplate, + timerTemplate, legacyRegistry ) { "use strict"; @@ -116,13 +120,13 @@ define([ "key": "clock", "type": "clock", "editable": false, - "templateUrl": "templates/clock.html" + "template": clockTemplate }, { "key": "timer", "type": "timer", "editable": false, - "templateUrl": "templates/timer.html" + "template": timerTemplate } ], "actions": [ diff --git a/platform/features/conductor/bundle.js b/platform/features/conductor/bundle.js index 1a215e2a10..9987be5c68 100644 --- a/platform/features/conductor/bundle.js +++ b/platform/features/conductor/bundle.js @@ -25,11 +25,13 @@ define([ "./src/ConductorRepresenter", "./src/ConductorTelemetryDecorator", "./src/ConductorService", + "text!./res/templates/time-conductor.html", 'legacyRegistry' ], function ( ConductorRepresenter, ConductorTelemetryDecorator, ConductorService, + timeConductorTemplate, legacyRegistry ) { "use strict"; @@ -70,7 +72,7 @@ define([ "templates": [ { "key": "time-conductor", - "templateUrl": "templates/time-conductor.html" + "template": timeConductorTemplate } ], "constants": [ diff --git a/platform/features/events/bundle.js b/platform/features/events/bundle.js index 829036acb3..f494784eff 100644 --- a/platform/features/events/bundle.js +++ b/platform/features/events/bundle.js @@ -25,11 +25,13 @@ define([ "./src/EventListController", "./src/directives/MCTDataTable", "./src/policies/MessagesViewPolicy", + "text!./res/templates/messages.html", 'legacyRegistry' ], function ( EventListController, MCTDataTable, MessagesViewPolicy, + messagesTemplate, legacyRegistry ) { "use strict"; @@ -44,7 +46,7 @@ define([ "name": "Messages", "glyph": "5", "description": "Scrolling list of messages.", - "templateUrl": "templates/messages.html", + "template": messagesTemplate, "needs": [ "telemetry" ], diff --git a/platform/features/imagery/bundle.js b/platform/features/imagery/bundle.js index 79c3d00994..e17534fc4c 100644 --- a/platform/features/imagery/bundle.js +++ b/platform/features/imagery/bundle.js @@ -25,11 +25,13 @@ define([ "./src/policies/ImageryViewPolicy", "./src/controllers/ImageryController", "./src/directives/MCTBackgroundImage", + "text!./res/templates/imagery.html", 'legacyRegistry' ], function ( ImageryViewPolicy, ImageryController, MCTBackgroundImage, + imageryTemplate, legacyRegistry ) { "use strict"; @@ -42,7 +44,7 @@ define([ "name": "Imagery", "key": "imagery", "glyph": "ã", - "templateUrl": "templates/imagery.html", + "template": imageryTemplate, "priority": "preferred", "needs": [ "telemetry" diff --git a/platform/features/layout/bundle.js b/platform/features/layout/bundle.js index 538d456007..493a910b97 100644 --- a/platform/features/layout/bundle.js +++ b/platform/features/layout/bundle.js @@ -25,11 +25,27 @@ define([ "./src/LayoutController", "./src/FixedController", "./src/LayoutCompositionPolicy", + "text!./res/templates/layout.html", + "text!./res/templates/fixed.html", + "text!./res/templates/frame.html", + "text!./res/templates/elements/telemetry.html", + "text!./res/templates/elements/box.html", + "text!./res/templates/elements/line.html", + "text!./res/templates/elements/text.html", + "text!./res/templates/elements/image.html", 'legacyRegistry' ], function ( LayoutController, FixedController, LayoutCompositionPolicy, + layoutTemplate, + fixedTemplate, + frameTemplate, + telemetryTemplate, + boxTemplate, + lineTemplate, + textTemplate, + imageTemplate, legacyRegistry ) { "use strict"; @@ -44,7 +60,7 @@ define([ "name": "Display Layout", "glyph": "L", "type": "layout", - "templateUrl": "templates/layout.html", + "template": layoutTemplate, "editable": true, "uses": [] }, @@ -53,7 +69,7 @@ define([ "name": "Fixed Position", "glyph": "3", "type": "telemetry.panel", - "templateUrl": "templates/fixed.html", + "template": fixedTemplate, "uses": [ "composition" ], @@ -191,7 +207,7 @@ define([ "representations": [ { "key": "frame", - "templateUrl": "templates/frame.html" + "template": frameTemplate } ], "controllers": [ @@ -218,23 +234,23 @@ define([ "templates": [ { "key": "fixed.telemetry", - "templateUrl": "templates/elements/telemetry.html" + "template": telemetryTemplate }, { "key": "fixed.box", - "templateUrl": "templates/elements/box.html" + "template": boxTemplate }, { "key": "fixed.line", - "templateUrl": "templates/elements/line.html" + "template": lineTemplate }, { "key": "fixed.text", - "templateUrl": "templates/elements/text.html" + "template": textTemplate }, { "key": "fixed.image", - "templateUrl": "templates/elements/image.html" + "template": imageTemplate } ], "policies": [ diff --git a/platform/features/pages/bundle.js b/platform/features/pages/bundle.js index 1d5cb24210..70119db5bd 100644 --- a/platform/features/pages/bundle.js +++ b/platform/features/pages/bundle.js @@ -23,9 +23,11 @@ define([ "./src/EmbeddedPageController", + "text!./res/iframe.html", 'legacyRegistry' ], function ( EmbeddedPageController, + iframeTemplate, legacyRegistry ) { "use strict"; @@ -54,7 +56,7 @@ define([ ], "views": [ { - "templateUrl": "iframe.html", + "template": iframeTemplate, "name": "Page", "type": "example.page", "key": "example.page", diff --git a/platform/features/plot/bundle.js b/platform/features/plot/bundle.js index 18eba3aa51..e780a61d2c 100644 --- a/platform/features/plot/bundle.js +++ b/platform/features/plot/bundle.js @@ -25,11 +25,13 @@ define([ "./src/MCTChart", "./src/PlotController", "./src/policies/PlotViewPolicy", + "text!./res/templates/plot.html", 'legacyRegistry' ], function ( MCTChart, PlotController, PlotViewPolicy, + plotTemplate, legacyRegistry ) { "use strict"; @@ -42,7 +44,7 @@ define([ "name": "Plot", "key": "plot", "glyph": "6", - "templateUrl": "templates/plot.html", + "template": plotTemplate, "needs": [ "telemetry" ], diff --git a/platform/features/rtevents/bundle.js b/platform/features/rtevents/bundle.js index 8efaf072bd..25142d7dc6 100644 --- a/platform/features/rtevents/bundle.js +++ b/platform/features/rtevents/bundle.js @@ -25,11 +25,13 @@ define([ "./src/RTEventListController", "./src/directives/MCTRTDataTable", "./src/policies/RTMessagesViewPolicy", + "text!./res/templates/rtmessages.html", 'legacyRegistry' ], function ( RTEventListController, MCTRTDataTable, RTMessagesViewPolicy, + rtmessagesTemplate, legacyRegistry ) { "use strict"; @@ -44,7 +46,7 @@ define([ "name": "RT Messages", "glyph": "5", "description": "Scrolling list of real time messages.", - "templateUrl": "templates/rtmessages.html", + "template": rtmessagesTemplate, "needs": [ "telemetry" ], diff --git a/platform/features/rtscrolling/bundle.js b/platform/features/rtscrolling/bundle.js index d0b8f68f10..3466dc44f1 100644 --- a/platform/features/rtscrolling/bundle.js +++ b/platform/features/rtscrolling/bundle.js @@ -23,9 +23,11 @@ define([ "./src/RTScrollingListController", + "text!./res/templates/rtscrolling.html", 'legacyRegistry' ], function ( RTScrollingListController, + rtscrollingTemplate, legacyRegistry ) { "use strict"; @@ -40,7 +42,7 @@ define([ "name": "Scrolling", "glyph": "5", "description": "Scrolling list of data values.", - "templateUrl": "templates/rtscrolling.html", + "template": rtscrollingTemplate, "needs": [ "telemetry" ], diff --git a/platform/features/scrolling/bundle.js b/platform/features/scrolling/bundle.js index 546fb6a06b..567330e165 100644 --- a/platform/features/scrolling/bundle.js +++ b/platform/features/scrolling/bundle.js @@ -23,9 +23,11 @@ define([ "./src/ScrollingListController", + "text!./res/templates/scrolling.html", 'legacyRegistry' ], function ( ScrollingListController, + scrollingTemplate, legacyRegistry ) { "use strict"; @@ -40,7 +42,7 @@ define([ "name": "Scrolling", "glyph": "5", "description": "Scrolling list of data values.", - "templateUrl": "templates/scrolling.html", + "template": scrollingTemplate, "needs": [ "telemetry" ], diff --git a/platform/features/static-markup/bundle.js b/platform/features/static-markup/bundle.js index 63dfe3ac0b..4ac5a13701 100644 --- a/platform/features/static-markup/bundle.js +++ b/platform/features/static-markup/bundle.js @@ -23,9 +23,11 @@ define([ + "text!./res/markup.html", 'legacyRegistry' ], function ( + markupTemplate, legacyRegistry ) { "use strict"; @@ -45,7 +47,7 @@ define([ ], "views": [ { - "templateUrl": "markup.html", + "template": markupTemplate, "name": "Static Markup", "type": "static.markup", "key": "static.markup" diff --git a/platform/features/timeline/bundle.js b/platform/features/timeline/bundle.js index a791fc4fb0..5be95f643c 100644 --- a/platform/features/timeline/bundle.js +++ b/platform/features/timeline/bundle.js @@ -38,6 +38,16 @@ define([ "./src/directives/MCTSwimlaneDrop", "./src/directives/MCTSwimlaneDrag", "./src/services/ObjectLoader", + "text!./res/templates/values.html", + "text!./res/templates/timeline.html", + "text!./res/templates/activity-gantt.html", + "text!./res/templates/tabular-swimlane-cols-tree.html", + "text!./res/templates/tabular-swimlane-cols-data.html", + "text!./res/templates/resource-graphs.html", + "text!./res/templates/resource-graph-labels.html", + "text!./res/templates/legend-item.html", + "text!./res/templates/ticks.html", + "text!./res/templates/controls/datetime.html", 'legacyRegistry' ], function ( TimelineController, @@ -56,6 +66,16 @@ define([ MCTSwimlaneDrop, MCTSwimlaneDrag, ObjectLoader, + valuesTemplate, + timelineTemplate, + activityGanttTemplate, + tabularSwimlaneColsTreeTemplate, + tabularSwimlaneColsDataTemplate, + resourceGraphsTemplate, + resourceGraphLabelsTemplate, + legendItemTemplate, + ticksTemplate, + datetimeTemplate, legacyRegistry ) { "use strict"; @@ -226,7 +246,7 @@ define([ "key": "values", "name": "Values", "glyph": "A", - "templateUrl": "templates/values.html", + "template": valuesTemplate, "type": "mode", "uses": [ "cost" @@ -239,7 +259,7 @@ define([ "glyph": "S", "type": "timeline", "description": "A timeline view of Timelines and Activities.", - "templateUrl": "templates/timeline.html", + "template": timelineTemplate, "editable": true, "toolbar": { "sections": [ @@ -335,7 +355,7 @@ define([ "representations": [ { "key": "gantt", - "templateUrl": "templates/activity-gantt.html", + "template": activityGanttTemplate, "uses": [ "timespan", "type" @@ -346,42 +366,42 @@ define([ { "key": "timeline-tabular-swimlane-cols-tree", "priority": "mandatory", - "templateUrl": "templates/tabular-swimlane-cols-tree.html" + "template": tabularSwimlaneColsTreeTemplate }, { "key": "timeline-tabular-swimlane-cols-data", "priority": "mandatory", - "templateUrl": "templates/tabular-swimlane-cols-data.html" + "template": tabularSwimlaneColsDataTemplate }, { "key": "timeline-resource-graphs", "priority": "mandatory", - "templateUrl": "templates/resource-graphs.html" + "template": resourceGraphsTemplate }, { "key": "timeline-resource-graph-labels", "priority": "mandatory", - "templateUrl": "templates/resource-graph-labels.html" + "template": resourceGraphLabelsTemplate }, { "key": "timeline-legend-item", "priority": "mandatory", - "templateUrl": "templates/legend-item.html" + "template": legendItemTemplate }, { "key": "timeline-ticks", "priority": "mandatory", - "templateUrl": "templates/ticks.html" + "template": ticksTemplate } ], "controls": [ { "key": "timeline-datetime", - "templateUrl": "templates/controls/datetime.html" + "template": datetimeTemplate }, { "key": "duration", - "templateUrl": "templates/controls/datetime.html" + "template": datetimeTemplate } ], "controllers": [ diff --git a/platform/forms/bundle.js b/platform/forms/bundle.js index 43c76d18ae..5cd3cbdaad 100644 --- a/platform/forms/bundle.js +++ b/platform/forms/bundle.js @@ -29,6 +29,15 @@ define([ "./src/controllers/CompositeController", "./src/controllers/ColorController", "./src/controllers/DialogButtonController", + "text!./res/templates/controls/checkbox.html", + "text!./res/templates/controls/datetime.html", + "text!./res/templates/controls/select.html", + "text!./res/templates/controls/textfield.html", + "text!./res/templates/controls/button.html", + "text!./res/templates/controls/color.html", + "text!./res/templates/controls/composite.html", + "text!./res/templates/controls/menu-button.html", + "text!./res/templates/controls/dialog.html", 'legacyRegistry' ], function ( MCTForm, @@ -38,6 +47,15 @@ define([ CompositeController, ColorController, DialogButtonController, + checkboxTemplate, + datetimeTemplate, + selectTemplate, + textfieldTemplate, + buttonTemplate, + colorTemplate, + compositeTemplate, + menuButtonTemplate, + dialogTemplate, legacyRegistry ) { "use strict"; @@ -66,39 +84,39 @@ define([ "controls": [ { "key": "checkbox", - "templateUrl": "templates/controls/checkbox.html" + "template": checkboxTemplate }, { "key": "datetime", - "templateUrl": "templates/controls/datetime.html" + "template": datetimeTemplate }, { "key": "select", - "templateUrl": "templates/controls/select.html" + "template": selectTemplate }, { "key": "textfield", - "templateUrl": "templates/controls/textfield.html" + "template": textfieldTemplate }, { "key": "button", - "templateUrl": "templates/controls/button.html" + "template": buttonTemplate }, { "key": "color", - "templateUrl": "templates/controls/color.html" + "template": colorTemplate }, { "key": "composite", - "templateUrl": "templates/controls/composite.html" + "template": compositeTemplate }, { "key": "menu-button", - "templateUrl": "templates/controls/menu-button.html" + "template": menuButtonTemplate }, { "key": "dialog-button", - "templateUrl": "templates/controls/dialog.html" + "template": dialogTemplate } ], "controllers": [ diff --git a/platform/persistence/queue/bundle.js b/platform/persistence/queue/bundle.js index 473e91a06d..00df156b0a 100644 --- a/platform/persistence/queue/bundle.js +++ b/platform/persistence/queue/bundle.js @@ -25,11 +25,13 @@ define([ "./src/QueuingPersistenceCapabilityDecorator", "./src/PersistenceQueue", "./src/PersistenceFailureController", + "text!./res/templates/persistence-failure-dialog.html", 'legacyRegistry' ], function ( QueuingPersistenceCapabilityDecorator, PersistenceQueue, PersistenceFailureController, + persistenceFailureDialogTemplate, legacyRegistry ) { "use strict"; @@ -67,7 +69,7 @@ define([ "templates": [ { "key": "persistence-failure-dialog", - "templateUrl": "templates/persistence-failure-dialog.html" + "template": persistenceFailureDialogTemplate } ], "controllers": [ diff --git a/platform/search/bundle.js b/platform/search/bundle.js index 3ad0c8b77f..7a0a9f4b9e 100644 --- a/platform/search/bundle.js +++ b/platform/search/bundle.js @@ -27,6 +27,9 @@ define([ "./src/controllers/ClickAwayController", "./src/services/GenericSearchProvider", "./src/services/SearchAggregator", + "text!./res/templates/search-item.html", + "text!./res/templates/search.html", + "text!./res/templates/search-menu.html", 'legacyRegistry' ], function ( SearchController, @@ -34,6 +37,9 @@ define([ ClickAwayController, GenericSearchProvider, SearchAggregator, + searchItemTemplate, + searchTemplate, + searchMenuTemplate, legacyRegistry ) { "use strict"; @@ -80,17 +86,17 @@ define([ "representations": [ { "key": "search-item", - "templateUrl": "templates/search-item.html" + "template": searchItemTemplate } ], "templates": [ { "key": "search", - "templateUrl": "templates/search.html" + "template": searchTemplate }, { "key": "search-menu", - "templateUrl": "templates/search-menu.html" + "template": searchMenuTemplate } ], "components": [ From 741d4476e6ac7dd7c0c72c40b22dc6f808a16438 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 13:12:35 -0800 Subject: [PATCH 56/76] [Templates] Use text plugin for toolbar --- platform/forms/src/MCTToolbar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/forms/src/MCTToolbar.js b/platform/forms/src/MCTToolbar.js index 0a31efc4fd..7db74a9dbe 100644 --- a/platform/forms/src/MCTToolbar.js +++ b/platform/forms/src/MCTToolbar.js @@ -25,8 +25,8 @@ * Module defining MCTForm. Created by vwoeltje on 11/10/14. */ define( - ["./controllers/FormController"], - function (FormController) { + ["./controllers/FormController", "text!../res/templates/toolbar.html"], + function (FormController, toolbarTemplate) { "use strict"; /** @@ -61,7 +61,7 @@ define( restrict: "E", // Load the forms template - templateUrl: templatePath, + template: toolbarTemplate, // Use FormController to populate/respond to changes in scope controller: [ '$scope', FormController ], From e61711688e33115568b53b5a75e6e8a3525d0f93 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 14:24:41 -0800 Subject: [PATCH 57/76] [Templates] Use templateLinker from MCTContainer ...for compatibility with both template and templateUrl. --- platform/commonUI/general/bundle.js | 1 + .../general/src/directives/MCTContainer.js | 22 +++++-------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/platform/commonUI/general/bundle.js b/platform/commonUI/general/bundle.js index 71c5890947..f6cfa63e62 100644 --- a/platform/commonUI/general/bundle.js +++ b/platform/commonUI/general/bundle.js @@ -319,6 +319,7 @@ define([ "key": "mctContainer", "implementation": MCTContainer, "depends": [ + "templateLinker", "containers[]" ] }, diff --git a/platform/commonUI/general/src/directives/MCTContainer.js b/platform/commonUI/general/src/directives/MCTContainer.js index f65cf0803d..18712c6850 100644 --- a/platform/commonUI/general/src/directives/MCTContainer.js +++ b/platform/commonUI/general/src/directives/MCTContainer.js @@ -42,18 +42,12 @@ define( * @memberof platform/commonUI/general * @constructor */ - function MCTContainer(containers) { + function MCTContainer(templateLinker, containers) { var containerMap = {}; // Initialize container map from extensions containers.forEach(function (container) { - var key = container.key; - containerMap[key] = Object.create(container); - containerMap[key].templateUrl = [ - container.bundle.path, - container.bundle.resources, - container.templateUrl - ].join("/"); + containerMap[container.key] = container; }); return { @@ -73,9 +67,11 @@ define( var key = attrs.key, container = containerMap[key], alias = "container", - copiedAttributes = {}; + copiedAttributes = {}, + changeTemplate = templateLinker.link(scope, element); if (container) { + changeTemplate(container); alias = container.alias || alias; (container.attributes || []).forEach(function (attr) { copiedAttributes[attr] = attrs[attr]; @@ -83,15 +79,7 @@ define( } scope[alias] = copiedAttributes; - }, - - // Get the template URL for this container, based - // on its attributes. - templateUrl: function (element, attrs) { - var key = attrs.key; - return containerMap[key].templateUrl; } - }; } From 192bbae6e5f49983fcce8795418f7baabfb2f1df Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Fri, 26 Feb 2016 14:49:34 -0800 Subject: [PATCH 58/76] [Frontend] Fix paths, includes #702 Per https://github.com/nasa/openmctweb/pull/702; Removed include of _logo-and-bg.scss into _about.scss; --- index.html | 4 ++-- platform/commonUI/general/res/sass/_about.scss | 5 +---- platform/commonUI/general/res/sass/_logo-and-bg.scss | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 6307a5f0dd..e5145d5c5e 100644 --- a/index.html +++ b/index.html @@ -33,8 +33,8 @@ mct.run(); }); - - + + diff --git a/platform/commonUI/general/res/sass/_about.scss b/platform/commonUI/general/res/sass/_about.scss index 1e9abe70cf..5c94a63181 100644 --- a/platform/commonUI/general/res/sass/_about.scss +++ b/platform/commonUI/general/res/sass/_about.scss @@ -20,9 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ // General About dialog styling - -@import "logo-and-bg"; - +// Depends on styles loaded via /platform/commonUI/general/res/sass/startup-base.scss .l-about { &.abs { overflow: auto; @@ -67,4 +65,3 @@ } } } - diff --git a/platform/commonUI/general/res/sass/_logo-and-bg.scss b/platform/commonUI/general/res/sass/_logo-and-bg.scss index fbe13f7cb4..b67060b8fb 100644 --- a/platform/commonUI/general/res/sass/_logo-and-bg.scss +++ b/platform/commonUI/general/res/sass/_logo-and-bg.scss @@ -40,10 +40,10 @@ } &:before { - // NASA logo + // NASA logo, dude $w: 5%; $m: 10px; - background-image: url('/platform/commonUI/general/res/images/logo-nasa.svg'); + background-image: url('../images/logo-nasa.svg'); top: $m; right: auto; bottom: auto; From 8581547a9c3ecee35913e16c9e48a9838d2cabbd Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 14:49:55 -0800 Subject: [PATCH 59/76] [Templates] Allow only template property for containers ...to work around difficulties with transclusion using templateLinker. --- docs/src/guide/index.md | 19 ++++++++++++++++++- platform/commonUI/general/bundle.js | 1 - .../general/src/directives/MCTContainer.js | 12 ++++++++---- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/docs/src/guide/index.md b/docs/src/guide/index.md index f6d22fb2fb..93cb95bb7a 100644 --- a/docs/src/guide/index.md +++ b/docs/src/guide/index.md @@ -910,7 +910,24 @@ A capability's implementation may also expose a static method `appliesTo(model)` which should return a boolean value, and will be used by the platform to filter down capabilities to those which should be exposed by specific domain objects, based on their domain object models. - + +## Containers Category + +Containers provide options for the `mct-container` directive. + +The definition for an extension in the `containers` category should include: + +* `key`: An identifier for the container. +* `template`: An Angular template for the container, including an + `ng-transclude` where contained content should go. +* `attributes`: An array of attribute names. The values associated with + these attributes will be exposed in the template's scope under the + name provided by the `alias` property. +* `alias`: The property name in scope under which attributes will be + exposed. Optional; defaults to "container". + +Note that `templateUrl` is not supported for `containers`. + ## Controls Category Controls provide options for the `mct-control` directive. diff --git a/platform/commonUI/general/bundle.js b/platform/commonUI/general/bundle.js index f6cfa63e62..71c5890947 100644 --- a/platform/commonUI/general/bundle.js +++ b/platform/commonUI/general/bundle.js @@ -319,7 +319,6 @@ define([ "key": "mctContainer", "implementation": MCTContainer, "depends": [ - "templateLinker", "containers[]" ] }, diff --git a/platform/commonUI/general/src/directives/MCTContainer.js b/platform/commonUI/general/src/directives/MCTContainer.js index 18712c6850..e35c52f9f6 100644 --- a/platform/commonUI/general/src/directives/MCTContainer.js +++ b/platform/commonUI/general/src/directives/MCTContainer.js @@ -42,7 +42,7 @@ define( * @memberof platform/commonUI/general * @constructor */ - function MCTContainer(templateLinker, containers) { + function MCTContainer(containers) { var containerMap = {}; // Initialize container map from extensions @@ -67,11 +67,9 @@ define( var key = attrs.key, container = containerMap[key], alias = "container", - copiedAttributes = {}, - changeTemplate = templateLinker.link(scope, element); + copiedAttributes = {}; if (container) { - changeTemplate(container); alias = container.alias || alias; (container.attributes || []).forEach(function (attr) { copiedAttributes[attr] = attrs[attr]; @@ -79,6 +77,12 @@ define( } scope[alias] = copiedAttributes; + }, + + template: function (element, attrs) { + var key = attrs.key, + container = containerMap[key]; + return container ? container.template : ""; } }; } From 5c3d8508a22466fd4094dcda2c9295fbc0e9a2d2 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 15:01:40 -0800 Subject: [PATCH 60/76] [Templates] Use templateLinker for forms ...for compatibility with both template and templateUrl --- platform/forms/bundle.js | 1 + platform/forms/src/MCTControl.js | 17 ++++------------- platform/forms/src/MCTForm.js | 12 +++--------- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/platform/forms/bundle.js b/platform/forms/bundle.js index 5cd3cbdaad..19ebf4d9b5 100644 --- a/platform/forms/bundle.js +++ b/platform/forms/bundle.js @@ -77,6 +77,7 @@ define([ "key": "mctControl", "implementation": MCTControl, "depends": [ + "templateLinker", "controls[]" ] } diff --git a/platform/forms/src/MCTControl.js b/platform/forms/src/MCTControl.js index 78ac8c194d..09192a09ee 100644 --- a/platform/forms/src/MCTControl.js +++ b/platform/forms/src/MCTControl.js @@ -36,23 +36,18 @@ define( * @constructor * @memberof platform/forms */ - function MCTControl(controls) { + function MCTControl(templateLinker, controls) { var controlMap = {}; // Prepopulate controlMap for easy look up by key controls.forEach(function (control) { - var path = [ - control.bundle.path, - control.bundle.resources, - control.templateUrl - ].join("/"); - controlMap[control.key] = path; + controlMap[control.key] = control; }); function link(scope, element, attrs, ngModelController) { + var changeTemplate = templateLinker.link(scope, element); scope.$watch("key", function (key) { - // Pass the template URL to ng-include via scope. - scope.inclusion = controlMap[key]; + changeTemplate(controlMap[key]); }); scope.ngModelController = ngModelController; } @@ -61,10 +56,6 @@ define( // Only show at the element level restrict: "E", - // Use ng-include as a template; "inclusion" will be the real - // template path - template: '', - // ngOptions is terminal, so we need to be higher priority priority: 1000, diff --git a/platform/forms/src/MCTForm.js b/platform/forms/src/MCTForm.js index ce48ed1572..70c18cbf2f 100644 --- a/platform/forms/src/MCTForm.js +++ b/platform/forms/src/MCTForm.js @@ -27,8 +27,8 @@ * @namespace platform/forms */ define( - ["./controllers/FormController"], - function (FormController) { + ["./controllers/FormController", "text!../res/templates/form.html"], + function (FormController, formTemplate) { "use strict"; /** @@ -52,18 +52,12 @@ define( * @constructor */ function MCTForm() { - var templatePath = [ - "platform/forms", //MCTForm.bundle.path, - "res", //MCTForm.bundle.resources, - "templates/form.html" - ].join("/"); - return { // Only show at the element level restrict: "E", // Load the forms template - templateUrl: templatePath, + template: formTemplate, // Use FormController to populate/respond to changes in scope controller: [ '$scope', FormController ], From 19b442cc0bcd792cc89971cf6c5b97902b5c2391 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 15:02:04 -0800 Subject: [PATCH 61/76] [Templates] Require data table templates ...via text plugin --- platform/features/events/src/directives/MCTDataTable.js | 6 +++--- platform/features/rtevents/src/directives/MCTRTDataTable.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/features/events/src/directives/MCTDataTable.js b/platform/features/events/src/directives/MCTDataTable.js index e830fbe885..0ea0946fe8 100644 --- a/platform/features/events/src/directives/MCTDataTable.js +++ b/platform/features/events/src/directives/MCTDataTable.js @@ -25,14 +25,14 @@ * Module defining MCTDataTable. Created by shale on 06/22/2015. */ define( - [], - function () { + ['text!../../res/templates/mct-data-table.html'], + function (dataTableTemplate) { "use strict"; function MCTDataTable($window) { return { restrict: "E", - templateUrl: "platform/features/events/res/templates/mct-data-table.html", + template: dataTableTemplate, scope: { headers: "=", rows: "=", diff --git a/platform/features/rtevents/src/directives/MCTRTDataTable.js b/platform/features/rtevents/src/directives/MCTRTDataTable.js index d7337eab4f..6f0cc38913 100644 --- a/platform/features/rtevents/src/directives/MCTRTDataTable.js +++ b/platform/features/rtevents/src/directives/MCTRTDataTable.js @@ -25,14 +25,14 @@ * Module defining MCTRTDataTable. Created by shale on 06/25/2015. */ define( - [], - function () { + ['text!../../res/templates/mct-rt-data-table.html'], + function (dataTableTemplate) { "use strict"; function MCTRTDataTable($window) { return { restrict: "E", - templateUrl: "platform/features/rtevents/res/templates/mct-rt-data-table.html", + template: dataTableTemplate, scope: { headers: "=", rows: "=", From 2d03e3e6d4f8c8cce84f6f012533b0a84b21abd6 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 15:03:45 -0800 Subject: [PATCH 62/76] [Templates] Remove unused template path calculation --- platform/forms/src/MCTToolbar.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/platform/forms/src/MCTToolbar.js b/platform/forms/src/MCTToolbar.js index 7db74a9dbe..15e3523d11 100644 --- a/platform/forms/src/MCTToolbar.js +++ b/platform/forms/src/MCTToolbar.js @@ -50,12 +50,6 @@ define( * @constructor */ function MCTForm() { - var templatePath = [ - "platform/forms", //MCTForm.bundle.path, - "res", //MCTForm.bundle.resources, - "templates/toolbar.html" - ].join("/"); - return { // Only show at the element level restrict: "E", From 596735352ae8aa461cc3e52b734ee95ae9edcb44 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 15:17:31 -0800 Subject: [PATCH 63/76] [Templates] Simplify MCTToolbar Use mct-form as a basis; simply change the template. --- platform/forms/src/MCTToolbar.js | 36 ++++++++------------------------ 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/platform/forms/src/MCTToolbar.js b/platform/forms/src/MCTToolbar.js index 15e3523d11..42c93c4842 100644 --- a/platform/forms/src/MCTToolbar.js +++ b/platform/forms/src/MCTToolbar.js @@ -25,8 +25,8 @@ * Module defining MCTForm. Created by vwoeltje on 11/10/14. */ define( - ["./controllers/FormController", "text!../res/templates/toolbar.html"], - function (FormController, toolbarTemplate) { + ["./MCTForm", "text!../res/templates/toolbar.html"], + function (MCTForm, toolbarTemplate) { "use strict"; /** @@ -49,32 +49,14 @@ define( * @memberof platform/forms * @constructor */ - function MCTForm() { - return { - // Only show at the element level - restrict: "E", - - // Load the forms template - template: toolbarTemplate, - - // Use FormController to populate/respond to changes in scope - controller: [ '$scope', FormController ], - - // Initial an isolate scope - scope: { - - // The model: Where form input will actually go - ngModel: "=", - - // Form structure; what sections/rows to show - structure: "=", - - // Name under which to publish the form - name: "@" - } - }; + function MCTToolbar() { + // Use Directive Definition Object from mct-form, + // but use the toolbar's template instead. + var ddo = new MCTForm(); + ddo.template = toolbarTemplate; + return ddo; } - return MCTForm; + return MCTToolbar; } ); From 931fa77cbe2a57ed01ca897aa9559a62848761a6 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 15:37:19 -0800 Subject: [PATCH 64/76] [Templates] Handle deferred selection availability Loading templates via RequireJS text plugin means they are immediately available; appears to have caused a change in ordering wherein controllers for views may be initialized before representers have installed things like selection state. As such, need to watch for changes instead of simply checking for a selection object when the controller is initialized. --- platform/features/layout/src/FixedController.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/platform/features/layout/src/FixedController.js b/platform/features/layout/src/FixedController.js index 28ca9c3990..751a0e70d3 100644 --- a/platform/features/layout/src/FixedController.js +++ b/platform/features/layout/src/FixedController.js @@ -303,12 +303,16 @@ define( this.generateDragHandles = generateDragHandles; // Track current selection state - this.selection = $scope.selection; + $scope.$watch("selection", function (selection) { + this.selection = selection; - // Expose the view's selection proxy - if (this.selection) { - this.selection.proxy(new FixedProxy(addElement, $q, dialogService)); - } + // Expose the view's selection proxy + if (this.selection) { + this.selection.proxy( + new FixedProxy(addElement, $q, dialogService) + ); + } + }.bind(this)); // Refresh list of elements whenever model changes $scope.$watch("model.modified", refreshElements); From f3fd2e67fca0b10d70db59c328f8f1e19617c633 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 15:40:36 -0800 Subject: [PATCH 65/76] [Templates] Watch for selection object ...from Timeline, to ensure toolbar appears etc. Reflects changes to ordering triggered by use of template instead of templateUrl --- .../src/controllers/TimelineController.js | 5 ++++- .../swimlane/TimelineSwimlanePopulator.js | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/platform/features/timeline/src/controllers/TimelineController.js b/platform/features/timeline/src/controllers/TimelineController.js index 8667bfec5f..c2cd25bc5e 100644 --- a/platform/features/timeline/src/controllers/TimelineController.js +++ b/platform/features/timeline/src/controllers/TimelineController.js @@ -98,10 +98,13 @@ define( }); } } - + // Recalculate swimlane state on changes $scope.$watch("domainObject", swimlanePopulator.populate); + // Pass selection object into swimlane populator + $scope.$watch("selection", swimlanePopulator.selection); + // Also recalculate whenever anything in view is modified $scope.$watch(modificationSum, repopulateSwimlanes); diff --git a/platform/features/timeline/src/controllers/swimlane/TimelineSwimlanePopulator.js b/platform/features/timeline/src/controllers/swimlane/TimelineSwimlanePopulator.js index a15d97196f..0875c87d5a 100644 --- a/platform/features/timeline/src/controllers/swimlane/TimelineSwimlanePopulator.js +++ b/platform/features/timeline/src/controllers/swimlane/TimelineSwimlanePopulator.js @@ -46,7 +46,8 @@ define( start = Number.POSITIVE_INFINITY, end = Number.NEGATIVE_INFINITY, colors = (configuration.colors || {}), - assigner = new TimelineColorAssigner(colors); + assigner = new TimelineColorAssigner(colors), + lastDomainObject; // Track extremes of start/end times function trackStartEnd(timespan) { @@ -144,12 +145,25 @@ define( domainObject && new TimelineProxy(domainObject, selection) ); } + + lastDomainObject = domainObject; + } + + function setSelectionObject(s) { + selection = s; + recalculateSwimlanes(lastDomainObject); } // Ensure colors are exposed in configuration configuration.colors = colors; return { + /** + * Set the selection object associated with this timeline view. + * @param {Object} selection the selection object + */ + selection: setSelectionObject, + /** * Update list of swimlanes to match those reachable from this * object. From fe419714f5d26d553afc2f7ca8c6689dc0cb2a7d Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 15:50:07 -0800 Subject: [PATCH 66/76] [Templates] Check for availability of timespan ...as ordering changes due to change from templateUrl to template may mean this is not available when first initialized. --- platform/features/timeline/res/templates/activity-gantt.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/features/timeline/res/templates/activity-gantt.html b/platform/features/timeline/res/templates/activity-gantt.html index 2af4900dc9..69d1d8984a 100644 --- a/platform/features/timeline/res/templates/activity-gantt.html +++ b/platform/features/timeline/res/templates/activity-gantt.html @@ -22,10 +22,10 @@
                  + } : {}">
                  From 894cf5c46145889d537512018c501853861d2028 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 15:53:30 -0800 Subject: [PATCH 67/76] [Templates] Include templates in test configuration ...such that they are available to the RequireJS text plugin for loading. --- karma.conf.js | 1 + 1 file changed, 1 insertion(+) diff --git a/karma.conf.js b/karma.conf.js index cee8401576..e63b6712ef 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -39,6 +39,7 @@ module.exports = function(config) { {pattern: 'example/**/*.js', included: false}, {pattern: 'platform/**/*.js', included: false}, {pattern: 'warp/**/*.js', included: false}, + {pattern: 'platform/**/*.html', included: false}, 'test-main.js' ], From 9b21b0b7f2a8d797744392c33386820858d45f81 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 16:17:33 -0800 Subject: [PATCH 68/76] [Templates] Update mct-container spec ...to reflect change to template over templateUrl --- .../general/test/directives/MCTContainerSpec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/commonUI/general/test/directives/MCTContainerSpec.js b/platform/commonUI/general/test/directives/MCTContainerSpec.js index 2d0ce444da..0c25e6c645 100644 --- a/platform/commonUI/general/test/directives/MCTContainerSpec.js +++ b/platform/commonUI/general/test/directives/MCTContainerSpec.js @@ -30,12 +30,12 @@ define( var testContainers = [ { bundle: { path: "a", resources: "b" }, - templateUrl: "c/template.html", + template: "
                  foo
                  ", key: "abc" }, { bundle: { path: "x", resources: "y" }, - templateUrl: "z/template.html", + template: "bar", key: "xyz", attributes: [ "someAttr", "someOtherAttr" ] } @@ -55,15 +55,15 @@ define( }); it("chooses a template based on key", function () { - expect(mctContainer.templateUrl( + expect(mctContainer.template( undefined, { key: "abc" } - )).toEqual("a/b/c/template.html"); + )).toEqual(testContainers[0].template); - expect(mctContainer.templateUrl( + expect(mctContainer.template( undefined, { key: "xyz" } - )).toEqual("x/y/z/template.html"); + )).toEqual(testContainers[1].template); }); it("copies attributes needed by the container", function () { From 3a6e0be2d75e4c4cae08ac8a9fc960e0fc55627b Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 16:19:14 -0800 Subject: [PATCH 69/76] [Templates] Update FixedController spec ...to reflect changes to how selection object is obtained, which in turn reflects change to using templates obtained via RequireJS text plugin, instead of loading by URL. --- platform/features/layout/test/FixedControllerSpec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/features/layout/test/FixedControllerSpec.js b/platform/features/layout/test/FixedControllerSpec.js index b6842497e0..7c545e2d3d 100644 --- a/platform/features/layout/test/FixedControllerSpec.js +++ b/platform/features/layout/test/FixedControllerSpec.js @@ -148,6 +148,8 @@ define( mockHandler, mockFormatter ); + + findWatch("selection")(mockScope.selection); }); it("subscribes when a domain object is available", function () { From 7240ff4f8d2646b6cf45a1536e16f2e5e6880bfd Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 16:22:55 -0800 Subject: [PATCH 70/76] [Templates] Update mct-control spec ...to reflect usage of templateLinker, to support including templates via RequireJS text plugin --- platform/forms/test/MCTControlSpec.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/platform/forms/test/MCTControlSpec.js b/platform/forms/test/MCTControlSpec.js index a743fd8e31..4f4b2cbd6f 100644 --- a/platform/forms/test/MCTControlSpec.js +++ b/platform/forms/test/MCTControlSpec.js @@ -29,6 +29,8 @@ define( describe("The mct-control directive", function () { var testControls, mockScope, + mockLinker, + mockChangeTemplate, mctControl; beforeEach(function () { @@ -46,8 +48,11 @@ define( ]; mockScope = jasmine.createSpyObj("$scope", [ "$watch" ]); + mockLinker = jasmine.createSpyObj("templateLinker", ["link"]); + mockChangeTemplate = jasmine.createSpy('changeTemplate'); + mockLinker.link.andReturn(mockChangeTemplate); - mctControl = new MCTControl(testControls); + mctControl = new MCTControl(mockLinker, testControls); }); it("is restricted to the element level", function () { @@ -66,14 +71,16 @@ define( it("changes its template dynamically", function () { mctControl.link(mockScope); + expect(mockChangeTemplate) + .not.toHaveBeenCalledWith(testControls[1]); + mockScope.key = "xyz"; mockScope.$watch.mostRecentCall.args[1]("xyz"); // Should have communicated the template path to // ng-include via the "inclusion" field in scope - expect(mockScope.inclusion).toEqual( - "x/y/z/template.html" - ); + expect(mockChangeTemplate) + .toHaveBeenCalledWith(testControls[1]); }); }); From 70ed16491a4cb672bd761802b2850e00610fd6f4 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 16:26:31 -0800 Subject: [PATCH 71/76] [Templates] Change watch order ...to work around order-sensitive test case --- .../features/timeline/src/controllers/TimelineController.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/features/timeline/src/controllers/TimelineController.js b/platform/features/timeline/src/controllers/TimelineController.js index c2cd25bc5e..a31fffa1c7 100644 --- a/platform/features/timeline/src/controllers/TimelineController.js +++ b/platform/features/timeline/src/controllers/TimelineController.js @@ -102,15 +102,15 @@ define( // Recalculate swimlane state on changes $scope.$watch("domainObject", swimlanePopulator.populate); - // Pass selection object into swimlane populator - $scope.$watch("selection", swimlanePopulator.selection); - // Also recalculate whenever anything in view is modified $scope.$watch(modificationSum, repopulateSwimlanes); // Carry over changes in swimlane set to changes in graphs $scope.$watch(graphMask, repopulateGraphs); + // Pass selection object into swimlane populator + $scope.$watch("selection", swimlanePopulator.selection); + // Convey current selection to drag handle populator $scope.$watch("selection.get()", dragPopulator.select); From 721557b8143330eda6f396b027efb7906b773e27 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Feb 2016 16:29:06 -0800 Subject: [PATCH 72/76] [Templates] Exercise selection method ...add to TimelineSwimlanePopulator to reflect changes to time at which selection object may become available as a consequence to changes in the way templates are normally loaded. #673 --- .../swimlane/TimelineSwimlanePopulatorSpec.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platform/features/timeline/test/controllers/swimlane/TimelineSwimlanePopulatorSpec.js b/platform/features/timeline/test/controllers/swimlane/TimelineSwimlanePopulatorSpec.js index 02b2010def..895ae34a79 100644 --- a/platform/features/timeline/test/controllers/swimlane/TimelineSwimlanePopulatorSpec.js +++ b/platform/features/timeline/test/controllers/swimlane/TimelineSwimlanePopulatorSpec.js @@ -150,6 +150,15 @@ define( expect(mockSelection.proxy).toHaveBeenCalled(); }); + it("allows selection object to be changed", function () { + var mockNewSelectionObject = jasmine.createSpyObj( + 'new-selection', + ['get', 'select', 'proxy'] + ); + populator.selection(mockNewSelectionObject); + expect(mockNewSelectionObject.proxy) + .toHaveBeenCalled(); + }); }); } From 5a9bcfa938bd0a26e83d9d8f8064e30cff2d470e Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Fri, 26 Feb 2016 16:48:23 -0800 Subject: [PATCH 73/76] [Frontend] Markup, CSS changes #442 Removed white space from markup; Moved getGlyphClass up to status-block-holder element out of status-block; CSS mods to selectors and style defs in _messages.scss; --- example/notifications/res/dialog-launch.html | 7 +- .../res/notification-launch.html | 7 +- .../general/res/sass/controls/_messages.scss | 90 ++++++++++--------- .../general/res/templates/bottombar.html | 3 +- .../general/res/templates/indicator.html | 2 - .../res/notification-indicator.html | 7 +- 6 files changed, 58 insertions(+), 58 deletions(-) diff --git a/example/notifications/res/dialog-launch.html b/example/notifications/res/dialog-launch.html index bc56e6b4f2..9eebd2e3e5 100644 --- a/example/notifications/res/dialog-launch.html +++ b/example/notifications/res/dialog-launch.html @@ -1,10 +1,9 @@ - - + + Known | Unknown | Error | Info - - Dialogs + Dialogs \ No newline at end of file diff --git a/example/notifications/res/notification-launch.html b/example/notifications/res/notification-launch.html index 1e077bf3be..e5f5cbac6b 100644 --- a/example/notifications/res/notification-launch.html +++ b/example/notifications/res/notification-launch.html @@ -1,10 +1,9 @@ - - + + Success | Error | Alert | Progress - - Notifications + Notifications \ No newline at end of file diff --git a/platform/commonUI/general/res/sass/controls/_messages.scss b/platform/commonUI/general/res/sass/controls/_messages.scss index f8869c18be..015b9db559 100644 --- a/platform/commonUI/general/res/sass/controls/_messages.scss +++ b/platform/commonUI/general/res/sass/controls/_messages.scss @@ -36,43 +36,49 @@ } } -mct-include.status-block-holder { - // mct-include that wraps status.block - // Must use display: inline-block to fix white space problems - display: inline-block; +// Status coloring +.ok, .info { + .status-indicator { + color: $colorStatusInfo; + } } -.status.block { +.alert, .caution, .warning { + .status-indicator, .count { + color: $colorStatusAlert; + } + +} + +.error, .err { + .status-indicator, .count { + color: $colorStatusError; + } +} + +.available { + .status-indicator, .count { + color: $colorStatusAvailable; + } +} + +.status-block-holder { + // Applied to mct-include element + // Contains status.block elements $transDelay: 1.5s; $transSpeed: .25s; - color: $colorStatusDefault; - display: inline-block; - margin-right: $interiorMargin; - .status-indicator, - .label, - .count { - display: inline-block; - vertical-align: top; - } - + display: inline-block; &.clickable { cursor: pointer; } &:not(.clickable) { cursor: default; } - - &.no-icon { + &.no-icon .status.block { .status-indicator { display: none; } } - &.float-right { float: right; } - - .status-indicator { - margin-right: $interiorMarginSm; - } - - &:not(.no-collapse) { + &:not(.no-collapse) .status.block { .label { // Max-width silliness is necessary for width transition @include trans-prop-nice(max-width, $transSpeed, $transDelay); @@ -92,21 +98,25 @@ mct-include.status-block-holder { } } - &.ok .status-indicator, - &.info .status-indicator { - color: $colorStatusInfo; +} + +.status.block { + $transDelay: 1.5s; + $transSpeed: .25s; + color: $colorStatusDefault; + display: inline-block; + margin-right: $interiorMargin; + .status-indicator, + .label, + .count { + display: inline-block; + vertical-align: top; } - &.alert .status-indicator, - &.warning .status-indicator, - &.caution .status-indicator { - color: $colorStatusAlert; + + .status-indicator { + margin-right: $interiorMarginSm; } - &.error .status-indicator { - color: $colorStatusError; - } - &.available .status-indicator { - color: $colorStatusAvailable; - } + .count { @include trans-prop-nice(opacity, $transSpeed, $transDelay); font-weight: bold; @@ -191,12 +201,6 @@ mct-include.status-block-holder { z-index: 10; } -.s-message-banner { - //@include transition-property(left, opacity); - //@include transition-duration(0.35s); - //@include transition-timing-function(ease-in-out); -} - .s-message-banner { border-radius: $controlCr; @include statusBannerColors($colorStatusDefault, $colorStatusFg); diff --git a/platform/commonUI/general/res/templates/bottombar.html b/platform/commonUI/general/res/templates/bottombar.html index 1883d31dd5..5a5db7a357 100644 --- a/platform/commonUI/general/res/templates/bottombar.html +++ b/platform/commonUI/general/res/templates/bottombar.html @@ -24,7 +24,8 @@ + class="status-block-holder" + ng-class='indicator.ngModel.getGlyphClass()'>
                  diff --git a/platform/commonUI/general/res/templates/indicator.html b/platform/commonUI/general/res/templates/indicator.html index 401c9990b9..7b1f11a4d3 100644 --- a/platform/commonUI/general/res/templates/indicator.html +++ b/platform/commonUI/general/res/templates/indicator.html @@ -23,7 +23,6 @@
                  {{ngModel.getGlyph()}} @@ -32,6 +31,5 @@ {{ngModel.getText()}} G -
                  \ No newline at end of file diff --git a/platform/commonUI/notification/res/notification-indicator.html b/platform/commonUI/notification/res/notification-indicator.html index 9c7e80a639..2a2ec074df 100644 --- a/platform/commonUI/notification/res/notification-indicator.html +++ b/platform/commonUI/notification/res/notification-indicator.html @@ -1,10 +1,9 @@ + - - + {{notifications.length}} Notifications - - {{notifications.length}} + {{notifications.length}} \ No newline at end of file From bc6185f76df10635c88a6f04f1355104d8622668 Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 1 Mar 2016 10:36:30 -0800 Subject: [PATCH 74/76] [Browse] Remove unused constant https://github.com/nasa/openmctweb/issues/401 --- platform/commonUI/browse/src/BrowseController.js | 1 - 1 file changed, 1 deletion(-) diff --git a/platform/commonUI/browse/src/BrowseController.js b/platform/commonUI/browse/src/BrowseController.js index 910892c685..d1d5aa92cc 100644 --- a/platform/commonUI/browse/src/BrowseController.js +++ b/platform/commonUI/browse/src/BrowseController.js @@ -34,7 +34,6 @@ define( "use strict"; var ROOT_ID = "ROOT", - DEFAULT_PATH = "mine", CONFIRM_MSG = "Unsaved changes will be lost if you leave this page."; /** From 96d9f8c194435aa7e540506eeb6940c9f269e8c9 Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 1 Mar 2016 10:52:07 -0800 Subject: [PATCH 75/76] [Templates] load plot templates with require Load templates with requirejs. https://github.com/nasa/openmctweb/issues/673 --- platform/commonUI/browse/bundle.js | 8 ++++++-- platform/features/plot/bundle.js | 4 +++- platform/forms/bundle.js | 4 +++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/platform/commonUI/browse/bundle.js b/platform/commonUI/browse/bundle.js index ed04891284..bf76295b18 100644 --- a/platform/commonUI/browse/bundle.js +++ b/platform/commonUI/browse/bundle.js @@ -47,6 +47,8 @@ define([ "text!./res/templates/menu-arrow.html", "text!./res/templates/back-arrow.html", "text!./res/templates/items/items.html", + "text!./res/templates/browse/object-properties.html", + "text!./res/templates/browse/inspector-region.html", 'legacyRegistry' ], function ( BrowseController, @@ -74,6 +76,8 @@ define([ menuArrowTemplate, backArrowTemplate, itemsTemplate, + objectPropertiesTemplate, + inspectorRegionTemplate, legacyRegistry ) { "use strict"; @@ -226,11 +230,11 @@ define([ }, { "key": "object-properties", - "templateUrl": "templates/browse/object-properties.html" + "template": objectPropertiesTemplate }, { "key": "inspector-region", - "templateUrl": "templates/browse/inspector-region.html" + "template": inspectorRegionTemplate } ], "services": [ diff --git a/platform/features/plot/bundle.js b/platform/features/plot/bundle.js index d132147c9e..87f4563d91 100644 --- a/platform/features/plot/bundle.js +++ b/platform/features/plot/bundle.js @@ -27,6 +27,7 @@ define([ "./src/policies/PlotViewPolicy", "./src/PlotOptionsController", "text!./res/templates/plot.html", + "text!./res/templates/plot-options-browse.html", 'legacyRegistry' ], function ( MCTChart, @@ -34,6 +35,7 @@ define([ PlotViewPolicy, PlotOptionsController, plotTemplate, + plotOptionsBrowseTemplate, legacyRegistry ) { "use strict"; @@ -101,7 +103,7 @@ define([ "representations": [ { "key": "plot-options-browse", - "templateUrl": "templates/plot-options-browse.html" + "template": plotOptionsBrowseTemplate } ] } diff --git a/platform/forms/bundle.js b/platform/forms/bundle.js index 1c99910950..76cd4c20b8 100644 --- a/platform/forms/bundle.js +++ b/platform/forms/bundle.js @@ -38,6 +38,7 @@ define([ "text!./res/templates/controls/composite.html", "text!./res/templates/controls/menu-button.html", "text!./res/templates/controls/dialog.html", + "text!./res/templates/controls/radio.html", 'legacyRegistry' ], function ( MCTForm, @@ -56,6 +57,7 @@ define([ compositeTemplate, menuButtonTemplate, dialogTemplate, + radioTemplate, legacyRegistry ) { "use strict"; @@ -89,7 +91,7 @@ define([ }, { "key": "radio", - "templateUrl": "templates/controls/radio.html" + "template": radioTemplate }, { "key": "datetime", From d17679730763fac58359073d481de260ada0bae1 Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 1 Mar 2016 10:59:23 -0800 Subject: [PATCH 76/76] [Style] Add missing semicolon --- platform/features/plot/src/PlotOptionsController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/features/plot/src/PlotOptionsController.js b/platform/features/plot/src/PlotOptionsController.js index 8be5579ebf..381ee4dea2 100644 --- a/platform/features/plot/src/PlotOptionsController.js +++ b/platform/features/plot/src/PlotOptionsController.js @@ -105,7 +105,7 @@ define( watch(); }); this.watches = []; - } + }; /** * Attach watches for each object in the plot's composition