From 4a609943f9d95c7138ce3ee48772f20e05797ef8 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:11:17 -0800 Subject: [PATCH 01/53] [Build] Configure JSHint #671 --- .jshintrc | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.jshintrc b/.jshintrc index a8e18932fd..e33c0e0c45 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,4 +1,18 @@ { - "validthis": true, - "laxbreak": true + "bitwise": true, + "curly": true, + "eqeqeq": true, + "esversion": 5, + "freeze": true, + "funcscope": true, + "futurehostile": true, + "latedef": true, + "noarg": true, + "nocomma": true, + "nonbsp": true, + "nonew": true, + "predef": [ "define" ], + "strict": "implied", + "undef": true, + "unused": true } From 91fb82d2121f5ef456cec082316787180f0c552f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:14:37 -0800 Subject: [PATCH 02/53] [Build] Remove esversion: 5 from lint cfg ...as this is apparently presumed. --- .jshintrc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.jshintrc b/.jshintrc index e33c0e0c45..3448f91e42 100644 --- a/.jshintrc +++ b/.jshintrc @@ -2,7 +2,6 @@ "bitwise": true, "curly": true, "eqeqeq": true, - "esversion": 5, "freeze": true, "funcscope": true, "futurehostile": true, @@ -11,8 +10,8 @@ "nocomma": true, "nonbsp": true, "nonew": true, - "predef": [ "define" ], + "predef": ["define"], "strict": "implied", "undef": true, "unused": true -} +} \ No newline at end of file From 28ae62b4acd9c00765d4973659f7d1e7ef47f1d0 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:21:12 -0800 Subject: [PATCH 03/53] [Build] Add script for JSHint migration To remove boilerplate which JSHint neither expects nor like. --- scripts/migrate-for-jshint.js | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 scripts/migrate-for-jshint.js diff --git a/scripts/migrate-for-jshint.js b/scripts/migrate-for-jshint.js new file mode 100644 index 0000000000..d86abc12aa --- /dev/null +++ b/scripts/migrate-for-jshint.js @@ -0,0 +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. + *****************************************************************************/ + +// 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'); + +function migrate(file) { + var sourceCode = fs.readFileSync(file, 'utf8'), + lines = sourceCode.split('\n') + .filter(function (line) { + return line.trim().replace("'", '"') !== '"use strict";'; + }) + .filter(function (line) { + return line.indexOf("/*global") !== 0; + }); + fs.writeFileSync(file, lines.join('\n')); +} + +glob('platform/**/*.js', {}, function (err, files) { + if (err) { + console.log(err); + return; + } + + files.forEach(migrate); +}); From f092bfe653c5b5a573a8e743aa7c992b91f866a7 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:27:34 -0800 Subject: [PATCH 04/53] [Build] Don't lint specs --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index fa832d1aa6..1724192224 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -98,7 +98,7 @@ gulp.task('stylesheets', function () { }); gulp.task('lint', function () { - return gulp.src(paths.scripts) + return gulp.src(paths.scripts.concat(['!**/test/*', '!**/*Spec.js'])) .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(jshint.reporter('fail')); From 02b806ebe0191fafc9b8f4bd5cadcfafd37d8fe3 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:27:59 -0800 Subject: [PATCH 05/53] [Build] Remove main.js boilerplate ...to satisfy JSHint --- main.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.js b/main.js index 452fe3e823..739cf056cd 100644 --- a/main.js +++ b/main.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, window, requirejs*/ +/*global requirejs*/ requirejs.config({ "paths": { @@ -93,8 +93,6 @@ define([ './example/eventGenerator/bundle', './example/generator/bundle' ], function (Main, legacyRegistry) { - 'use strict'; - return { legacyRegistry: legacyRegistry, run: function () { From bc8aafbb1ff1609ee78b9b95f2c617f6a455f51c Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:36:10 -0800 Subject: [PATCH 06/53] [Build] Define more common globals --- .jshintrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.jshintrc b/.jshintrc index 3448f91e42..b3d3868d70 100644 --- a/.jshintrc +++ b/.jshintrc @@ -10,7 +10,11 @@ "nocomma": true, "nonbsp": true, "nonew": true, - "predef": ["define"], + "predef": [ + "define", + "Blob", + "Promise" + ], "strict": "implied", "undef": true, "unused": true From 377786caf96f92fa4cab8e221a5269e86c6b9f94 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:36:28 -0800 Subject: [PATCH 07/53] [Build] Fix lint exclusions --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 1724192224..6a8c790c8b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -98,7 +98,7 @@ gulp.task('stylesheets', function () { }); gulp.task('lint', function () { - return gulp.src(paths.scripts.concat(['!**/test/*', '!**/*Spec.js'])) + return gulp.src(paths.scripts.concat(['!**/test/**/*.js', '!**/*Spec.js'])) .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(jshint.reporter('fail')); From 9f840aa0fdaf94bb76fe2c3b5d25d897abc2fb21 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:36:49 -0800 Subject: [PATCH 08/53] [Build] Tweak migration script --- scripts/migrate-for-jshint.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/migrate-for-jshint.js b/scripts/migrate-for-jshint.js index d86abc12aa..77a7c14569 100644 --- a/scripts/migrate-for-jshint.js +++ b/scripts/migrate-for-jshint.js @@ -31,7 +31,7 @@ function migrate(file) { var sourceCode = fs.readFileSync(file, 'utf8'), lines = sourceCode.split('\n') .filter(function (line) { - return line.trim().replace("'", '"') !== '"use strict";'; + return !(/^\W*['"]use strict['"];\W*$/.test(line)); }) .filter(function (line) { return line.indexOf("/*global") !== 0; @@ -39,7 +39,7 @@ function migrate(file) { fs.writeFileSync(file, lines.join('\n')); } -glob('platform/**/*.js', {}, function (err, files) { +glob('@(src|platform)/**/*.js', {}, function (err, files) { if (err) { console.log(err); return; From ac5ac8d34eedc76d8fbd78ae5898343f363f97f6 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:46:38 -0800 Subject: [PATCH 09/53] [Build] Remove boilerplate from scripts No longer necessary after JSHint configuration. --- platform/commonUI/about/bundle.js | 2 -- platform/commonUI/about/src/AboutController.js | 2 -- platform/commonUI/about/src/LicenseController.js | 2 -- platform/commonUI/about/src/LogoController.js | 2 -- platform/commonUI/about/test/AboutControllerSpec.js | 2 -- platform/commonUI/about/test/LicenseControllerSpec.js | 2 -- platform/commonUI/about/test/LogoControllerSpec.js | 2 -- platform/commonUI/browse/bundle.js | 2 -- platform/commonUI/browse/src/BrowseController.js | 2 -- platform/commonUI/browse/src/BrowseObjectController.js | 2 -- platform/commonUI/browse/src/InspectorRegion.js | 2 -- platform/commonUI/browse/src/MenuArrowController.js | 2 -- platform/commonUI/browse/src/PaneController.js | 2 -- platform/commonUI/browse/src/creation/AddAction.js | 2 -- platform/commonUI/browse/src/creation/AddActionProvider.js | 2 -- platform/commonUI/browse/src/creation/CreateAction.js | 2 -- platform/commonUI/browse/src/creation/CreateActionProvider.js | 2 -- platform/commonUI/browse/src/creation/CreateMenuController.js | 2 -- platform/commonUI/browse/src/creation/CreateWizard.js | 2 -- platform/commonUI/browse/src/creation/CreationPolicy.js | 2 -- platform/commonUI/browse/src/creation/CreationService.js | 2 -- platform/commonUI/browse/src/creation/LocatorController.js | 2 -- platform/commonUI/browse/src/navigation/NavigateAction.js | 2 -- platform/commonUI/browse/src/navigation/NavigationService.js | 2 -- platform/commonUI/browse/src/windowing/FullscreenAction.js | 2 -- platform/commonUI/browse/src/windowing/NewTabAction.js | 2 -- platform/commonUI/browse/src/windowing/WindowTitler.js | 2 -- platform/commonUI/browse/test/BrowseControllerSpec.js | 2 -- platform/commonUI/browse/test/BrowseObjectControllerSpec.js | 2 -- platform/commonUI/browse/test/InspectorRegionSpec.js | 2 -- platform/commonUI/browse/test/MenuArrowControllerSpec.js | 2 -- platform/commonUI/browse/test/PaneControllerSpec.js | 2 -- platform/commonUI/browse/test/creation/AddActionProviderSpec.js | 2 -- .../commonUI/browse/test/creation/CreateActionProviderSpec.js | 2 -- platform/commonUI/browse/test/creation/CreateActionSpec.js | 2 -- .../commonUI/browse/test/creation/CreateMenuControllerSpec.js | 2 -- platform/commonUI/browse/test/creation/CreateWizardSpec.js | 2 -- platform/commonUI/browse/test/creation/CreationPolicySpec.js | 2 -- platform/commonUI/browse/test/creation/CreationServiceSpec.js | 2 -- platform/commonUI/browse/test/creation/LocatorControllerSpec.js | 2 -- platform/commonUI/browse/test/navigation/NavigateActionSpec.js | 2 -- .../commonUI/browse/test/navigation/NavigationServiceSpec.js | 2 -- platform/commonUI/browse/test/windowing/FullscreenActionSpec.js | 2 -- platform/commonUI/browse/test/windowing/NewTabActionSpec.js | 2 -- platform/commonUI/browse/test/windowing/WindowTitlerSpec.js | 2 -- platform/commonUI/dialog/bundle.js | 2 -- platform/commonUI/dialog/src/DialogService.js | 2 -- platform/commonUI/dialog/src/OverlayService.js | 2 -- platform/commonUI/dialog/test/DialogServiceSpec.js | 2 -- platform/commonUI/dialog/test/OverlayServiceSpec.js | 2 -- platform/commonUI/edit/bundle.js | 2 -- platform/commonUI/edit/src/actions/CancelAction.js | 2 -- platform/commonUI/edit/src/actions/EditAction.js | 2 -- platform/commonUI/edit/src/actions/LinkAction.js | 2 -- platform/commonUI/edit/src/actions/PropertiesAction.js | 2 -- platform/commonUI/edit/src/actions/PropertiesDialog.js | 2 -- platform/commonUI/edit/src/actions/RemoveAction.js | 2 -- platform/commonUI/edit/src/actions/SaveAction.js | 2 -- .../commonUI/edit/src/capabilities/EditableActionCapability.js | 2 -- .../edit/src/capabilities/EditableCompositionCapability.js | 2 -- .../commonUI/edit/src/capabilities/EditableContextCapability.js | 2 -- .../edit/src/capabilities/EditableInstantiationCapability.js | 2 -- .../commonUI/edit/src/capabilities/EditableLookupCapability.js | 2 -- .../edit/src/capabilities/EditablePersistenceCapability.js | 2 -- .../edit/src/capabilities/EditableRelationshipCapability.js | 2 -- platform/commonUI/edit/src/capabilities/EditorCapability.js | 2 -- platform/commonUI/edit/src/controllers/EditActionController.js | 2 -- platform/commonUI/edit/src/controllers/EditObjectController.js | 2 -- platform/commonUI/edit/src/controllers/EditPanesController.js | 2 -- platform/commonUI/edit/src/controllers/ElementsController.js | 2 -- platform/commonUI/edit/src/directives/MCTBeforeUnload.js | 2 -- platform/commonUI/edit/src/objects/EditableDomainObject.js | 2 -- platform/commonUI/edit/src/objects/EditableDomainObjectCache.js | 2 -- platform/commonUI/edit/src/objects/EditableModelCache.js | 2 -- platform/commonUI/edit/src/policies/EditActionPolicy.js | 2 -- platform/commonUI/edit/src/policies/EditNavigationPolicy.js | 2 -- platform/commonUI/edit/src/policies/EditableViewPolicy.js | 2 -- platform/commonUI/edit/src/representers/EditRepresenter.js | 2 -- platform/commonUI/edit/src/representers/EditToolbar.js | 2 -- .../commonUI/edit/src/representers/EditToolbarRepresenter.js | 2 -- platform/commonUI/edit/src/representers/EditToolbarSelection.js | 2 -- platform/commonUI/edit/test/actions/CancelActionSpec.js | 2 -- platform/commonUI/edit/test/actions/EditActionSpec.js | 2 -- platform/commonUI/edit/test/actions/LinkActionSpec.js | 2 -- platform/commonUI/edit/test/actions/PropertiesActionSpec.js | 2 -- platform/commonUI/edit/test/actions/PropertiesDialogSpec.js | 2 -- platform/commonUI/edit/test/actions/RemoveActionSpec.js | 2 -- platform/commonUI/edit/test/actions/SaveActionSpec.js | 2 -- .../edit/test/capabilities/EditableCompositionCapabilitySpec.js | 2 -- .../edit/test/capabilities/EditableContextCapabilitySpec.js | 2 -- .../edit/test/capabilities/EditableLookupCapabilitySpec.js | 2 -- .../edit/test/capabilities/EditablePersistenceCapabilitySpec.js | 2 -- .../test/capabilities/EditableRelationshipCapabilitySpec.js | 2 -- .../commonUI/edit/test/capabilities/EditorCapabilitySpec.js | 2 -- .../commonUI/edit/test/controllers/EditActionControllerSpec.js | 2 -- platform/commonUI/edit/test/controllers/EditControllerSpec.js | 2 -- .../commonUI/edit/test/controllers/EditPanesControllerSpec.js | 2 -- platform/commonUI/edit/test/directives/MCTBeforeUnloadSpec.js | 2 -- .../commonUI/edit/test/objects/EditableDomainObjectCacheSpec.js | 2 -- platform/commonUI/edit/test/objects/EditableDomainObjectSpec.js | 2 -- platform/commonUI/edit/test/objects/EditableModelCacheSpec.js | 2 -- platform/commonUI/edit/test/policies/EditActionPolicySpec.js | 2 -- platform/commonUI/edit/test/policies/EditableViewPolicySpec.js | 2 -- platform/commonUI/edit/test/representers/EditRepresenterSpec.js | 2 -- .../edit/test/representers/EditToolbarRepresenterSpec.js | 2 -- .../commonUI/edit/test/representers/EditToolbarSelectionSpec.js | 2 -- platform/commonUI/edit/test/representers/EditToolbarSpec.js | 2 -- platform/commonUI/formats/bundle.js | 2 -- platform/commonUI/formats/src/FormatProvider.js | 2 -- platform/commonUI/formats/src/UTCTimeFormat.js | 2 -- platform/commonUI/formats/test/FormatProviderSpec.js | 2 -- platform/commonUI/formats/test/UTCTimeFormatSpec.js | 2 -- platform/commonUI/general/bundle.js | 2 -- platform/commonUI/general/src/SplashScreenManager.js | 2 -- platform/commonUI/general/src/StyleSheetLoader.js | 2 -- platform/commonUI/general/src/UnsupportedBrowserWarning.js | 2 -- .../commonUI/general/src/controllers/ActionGroupController.js | 2 -- platform/commonUI/general/src/controllers/BannerController.js | 2 -- .../commonUI/general/src/controllers/BottomBarController.js | 2 -- .../commonUI/general/src/controllers/ClickAwayController.js | 2 -- .../commonUI/general/src/controllers/ContextMenuController.js | 2 -- .../commonUI/general/src/controllers/DateTimeFieldController.js | 2 -- .../general/src/controllers/DateTimePickerController.js | 2 -- .../commonUI/general/src/controllers/GetterSetterController.js | 2 -- .../general/src/controllers/ObjectInspectorController.js | 2 -- platform/commonUI/general/src/controllers/SelectorController.js | 2 -- .../commonUI/general/src/controllers/TimeRangeController.js | 2 -- platform/commonUI/general/src/controllers/ToggleController.js | 2 -- platform/commonUI/general/src/controllers/TreeNodeController.js | 2 -- .../commonUI/general/src/controllers/ViewSwitcherController.js | 2 -- platform/commonUI/general/src/directives/MCTClickElsewhere.js | 2 -- platform/commonUI/general/src/directives/MCTContainer.js | 2 -- platform/commonUI/general/src/directives/MCTDrag.js | 2 -- platform/commonUI/general/src/directives/MCTPopup.js | 2 -- platform/commonUI/general/src/directives/MCTResize.js | 2 -- platform/commonUI/general/src/directives/MCTScroll.js | 2 -- platform/commonUI/general/src/directives/MCTSplitPane.js | 2 -- platform/commonUI/general/src/directives/MCTSplitter.js | 2 -- platform/commonUI/general/src/filters/ReverseFilter.js | 2 -- platform/commonUI/general/src/services/Popup.js | 2 -- platform/commonUI/general/src/services/PopupService.js | 2 -- platform/commonUI/general/src/services/UrlService.js | 2 -- platform/commonUI/general/test/SplashScreenManagerSpec.js | 2 -- platform/commonUI/general/test/StyleSheetLoaderSpec.js | 2 -- platform/commonUI/general/test/UnsupportedBrowserWarningSpec.js | 2 -- .../general/test/controllers/ActionGroupControllerSpec.js | 2 -- .../general/test/controllers/BottomBarControllerSpec.js | 2 -- .../general/test/controllers/ClickAwayControllerSpec.js | 2 -- .../general/test/controllers/ContextMenuControllerSpec.js | 2 -- .../general/test/controllers/DateTimeFieldControllerSpec.js | 2 -- .../general/test/controllers/DateTimePickerControllerSpec.js | 2 -- .../general/test/controllers/GetterSetterControllerSpec.js | 2 -- .../general/test/controllers/ObjectInspectorControllerSpec.js | 2 -- .../commonUI/general/test/controllers/SelectorControllerSpec.js | 2 -- .../general/test/controllers/TimeRangeControllerSpec.js | 2 -- .../commonUI/general/test/controllers/ToggleControllerSpec.js | 2 -- .../commonUI/general/test/controllers/TreeNodeControllerSpec.js | 2 -- .../general/test/controllers/ViewSwitcherControllerSpec.js | 2 -- .../commonUI/general/test/directives/MCTClickElsewhereSpec.js | 2 -- platform/commonUI/general/test/directives/MCTContainerSpec.js | 2 -- platform/commonUI/general/test/directives/MCTDragSpec.js | 2 -- platform/commonUI/general/test/directives/MCTPopupSpec.js | 2 -- platform/commonUI/general/test/directives/MCTResizeSpec.js | 2 -- platform/commonUI/general/test/directives/MCTScrollSpec.js | 2 -- platform/commonUI/general/test/directives/MCTSplitPaneSpec.js | 2 -- platform/commonUI/general/test/directives/MCTSplitterSpec.js | 2 -- platform/commonUI/general/test/filters/ReverseFilterSpec.js | 2 -- platform/commonUI/general/test/services/PopupServiceSpec.js | 2 -- platform/commonUI/general/test/services/PopupSpec.js | 2 -- platform/commonUI/general/test/services/UrlServiceSpec.js | 2 -- platform/commonUI/inspect/bundle.js | 2 -- platform/commonUI/inspect/src/InfoConstants.js | 1 - platform/commonUI/inspect/src/gestures/InfoButtonGesture.js | 2 -- platform/commonUI/inspect/src/gestures/InfoGesture.js | 2 -- platform/commonUI/inspect/src/services/InfoService.js | 2 -- .../commonUI/inspect/test/gestures/InfoButtonGestureSpec.js | 2 -- platform/commonUI/inspect/test/gestures/InfoGestureSpec.js | 2 -- platform/commonUI/inspect/test/services/InfoServiceSpec.js | 2 -- platform/commonUI/mobile/bundle.js | 2 -- platform/commonUI/mobile/src/AgentService.js | 2 -- platform/commonUI/mobile/src/DeviceClassifier.js | 2 -- platform/commonUI/mobile/src/DeviceMatchers.js | 2 -- platform/commonUI/mobile/src/MCTDevice.js | 2 -- platform/commonUI/mobile/test/AgentServiceSpec.js | 2 -- platform/commonUI/mobile/test/DeviceClassifierSpec.js | 2 -- platform/commonUI/mobile/test/DeviceMatchersSpec.js | 2 -- platform/commonUI/mobile/test/MCTDeviceSpec.js | 2 -- platform/commonUI/notification/bundle.js | 2 -- platform/commonUI/notification/src/NotificationIndicator.js | 2 -- .../notification/src/NotificationIndicatorController.js | 2 -- platform/commonUI/notification/src/NotificationService.js | 2 -- .../notification/test/NotificationIndicatorControllerSpec.js | 2 -- platform/commonUI/notification/test/NotificationServiceSpec.js | 2 -- platform/commonUI/regions/bundle.js | 2 -- platform/commonUI/regions/src/EditableRegionPolicy.js | 2 -- platform/commonUI/regions/src/InspectorController.js | 2 -- platform/commonUI/regions/src/Region.js | 2 -- platform/commonUI/regions/test/EditableRegionPolicySpec.js | 2 -- platform/commonUI/regions/test/InspectorControllerSpec.js | 2 -- platform/commonUI/regions/test/RegionSpec.js | 2 -- platform/commonUI/themes/espresso/bundle.js | 2 -- platform/commonUI/themes/snow/bundle.js | 2 -- platform/containment/bundle.js | 2 -- platform/containment/src/CapabilityTable.js | 2 -- platform/containment/src/ComposeActionPolicy.js | 2 -- platform/containment/src/CompositionModelPolicy.js | 2 -- platform/containment/src/CompositionMutabilityPolicy.js | 2 -- platform/containment/src/CompositionPolicy.js | 2 -- platform/containment/src/ContainmentTable.js | 2 -- platform/containment/test/CapabilityTableSpec.js | 2 -- platform/containment/test/ComposeActionPolicySpec.js | 2 -- platform/containment/test/CompositionModelPolicySpec.js | 2 -- platform/containment/test/CompositionMutabilityPolicySpec.js | 2 -- platform/containment/test/CompositionPolicySpec.js | 2 -- platform/containment/test/ContainmentTableSpec.js | 2 -- platform/core/bundle.js | 2 -- platform/core/src/actions/ActionAggregator.js | 2 -- platform/core/src/actions/ActionCapability.js | 2 -- platform/core/src/actions/ActionProvider.js | 2 -- platform/core/src/actions/LoggingActionDecorator.js | 2 -- platform/core/src/capabilities/CompositionCapability.js | 2 -- platform/core/src/capabilities/ContextCapability.js | 2 -- platform/core/src/capabilities/ContextualDomainObject.js | 2 -- platform/core/src/capabilities/CoreCapabilityProvider.js | 2 -- platform/core/src/capabilities/DelegationCapability.js | 2 -- platform/core/src/capabilities/InstantiationCapability.js | 2 -- platform/core/src/capabilities/MetadataCapability.js | 2 -- platform/core/src/capabilities/MutationCapability.js | 2 -- platform/core/src/capabilities/PersistenceCapability.js | 2 -- platform/core/src/capabilities/RelationshipCapability.js | 2 -- platform/core/src/identifiers/Identifier.js | 2 -- platform/core/src/identifiers/IdentifierProvider.js | 2 -- platform/core/src/models/CachingModelDecorator.js | 2 -- platform/core/src/models/MissingModelDecorator.js | 2 -- platform/core/src/models/ModelAggregator.js | 2 -- platform/core/src/models/PersistedModelProvider.js | 2 -- platform/core/src/models/RootModelProvider.js | 2 -- platform/core/src/models/StaticModelProvider.js | 2 -- platform/core/src/objects/DomainObjectImpl.js | 2 -- platform/core/src/objects/DomainObjectProvider.js | 2 -- platform/core/src/services/Contextualize.js | 2 -- platform/core/src/services/Instantiate.js | 2 -- platform/core/src/services/Now.js | 2 -- platform/core/src/services/Throttle.js | 2 -- platform/core/src/services/Topic.js | 2 -- platform/core/src/types/MergeModels.js | 2 -- platform/core/src/types/TypeCapability.js | 2 -- platform/core/src/types/TypeImpl.js | 2 -- platform/core/src/types/TypeProperty.js | 2 -- platform/core/src/types/TypePropertyConversion.js | 2 -- platform/core/src/types/TypeProvider.js | 2 -- platform/core/src/views/ViewCapability.js | 2 -- platform/core/src/views/ViewProvider.js | 2 -- platform/core/test/actions/ActionAggregatorSpec.js | 2 -- platform/core/test/actions/ActionCapabilitySpec.js | 2 -- platform/core/test/actions/ActionProviderSpec.js | 2 -- platform/core/test/actions/LoggingActionDecoratorSpec.js | 2 -- platform/core/test/capabilities/CompositionCapabilitySpec.js | 2 -- platform/core/test/capabilities/ContextCapabilitySpec.js | 2 -- platform/core/test/capabilities/ContextualDomainObjectSpec.js | 2 -- platform/core/test/capabilities/CoreCapabilityProviderSpec.js | 2 -- platform/core/test/capabilities/DelegationCapabilitySpec.js | 2 -- platform/core/test/capabilities/InstantiationCapabilitySpec.js | 2 -- platform/core/test/capabilities/MetadataCapabilitySpec.js | 2 -- platform/core/test/capabilities/MutationCapabilitySpec.js | 2 -- platform/core/test/capabilities/PersistenceCapabilitySpec.js | 2 -- platform/core/test/capabilities/RelationshipCapabilitySpec.js | 2 -- platform/core/test/identifiers/IdentifierProviderSpec.js | 2 -- platform/core/test/identifiers/IdentifierSpec.js | 2 -- platform/core/test/models/CachingModelDecoratorSpec.js | 2 -- platform/core/test/models/MissingModelDecoratorSpec.js | 2 -- platform/core/test/models/ModelAggregatorSpec.js | 2 -- platform/core/test/models/PersistedModelProviderSpec.js | 2 -- platform/core/test/models/RootModelProviderSpec.js | 2 -- platform/core/test/models/StaticModelProviderSpec.js | 2 -- platform/core/test/objects/DomainObjectProviderSpec.js | 2 -- platform/core/test/objects/DomainObjectSpec.js | 2 -- platform/core/test/services/ContextualizeSpec.js | 2 -- platform/core/test/services/InstantiateSpec.js | 2 -- platform/core/test/services/NowSpec.js | 2 -- platform/core/test/services/ThrottleSpec.js | 2 -- platform/core/test/services/TopicSpec.js | 2 -- platform/core/test/types/MergeModelsSpec.js | 2 -- platform/core/test/types/TypeCapabilitySpec.js | 2 -- platform/core/test/types/TypeImplSpec.js | 2 -- platform/core/test/types/TypePropertyConversionSpec.js | 2 -- platform/core/test/types/TypePropertySpec.js | 2 -- platform/core/test/types/TypeProviderSpec.js | 2 -- platform/core/test/views/ViewCapabilitySpec.js | 2 -- platform/core/test/views/ViewProviderSpec.js | 2 -- platform/entanglement/bundle.js | 2 -- platform/entanglement/src/actions/AbstractComposeAction.js | 2 -- platform/entanglement/src/actions/CopyAction.js | 2 -- platform/entanglement/src/actions/GoToOriginalAction.js | 2 -- platform/entanglement/src/actions/LinkAction.js | 2 -- platform/entanglement/src/actions/MoveAction.js | 2 -- platform/entanglement/src/actions/SetPrimaryLocationAction.js | 2 -- platform/entanglement/src/capabilities/LocationCapability.js | 2 -- platform/entanglement/src/policies/CrossSpacePolicy.js | 2 -- platform/entanglement/src/services/CopyService.js | 2 -- platform/entanglement/src/services/CopyTask.js | 2 -- platform/entanglement/src/services/LinkService.js | 2 -- platform/entanglement/src/services/LocatingCreationDecorator.js | 2 -- platform/entanglement/src/services/LocatingObjectDecorator.js | 2 -- platform/entanglement/src/services/LocationService.js | 2 -- platform/entanglement/src/services/MoveService.js | 2 -- platform/entanglement/test/ControlledPromise.js | 1 - platform/entanglement/test/DomainObjectFactory.js | 2 -- platform/entanglement/test/actions/AbstractComposeActionSpec.js | 2 -- platform/entanglement/test/actions/CopyActionSpec.js | 2 -- platform/entanglement/test/actions/GoToOriginalActionSpec.js | 2 -- platform/entanglement/test/actions/LinkActionSpec.js | 2 -- platform/entanglement/test/actions/MoveActionSpec.js | 2 -- .../entanglement/test/actions/SetPrimaryLocationActionSpec.js | 2 -- .../entanglement/test/capabilities/LocationCapabilitySpec.js | 2 -- platform/entanglement/test/policies/CrossSpacePolicySpec.js | 2 -- platform/entanglement/test/services/CopyServiceSpec.js | 2 -- platform/entanglement/test/services/CopyTaskSpec.js | 2 -- platform/entanglement/test/services/LinkServiceSpec.js | 2 -- .../entanglement/test/services/LocatingCreationDecoratorSpec.js | 2 -- .../entanglement/test/services/LocatingObjectDecoratorSpec.js | 2 -- platform/entanglement/test/services/LocationServiceSpec.js | 2 -- platform/entanglement/test/services/MockCopyService.js | 2 -- platform/entanglement/test/services/MockLinkService.js | 2 -- platform/entanglement/test/services/MockMoveService.js | 2 -- platform/entanglement/test/services/MoveServiceSpec.js | 2 -- platform/execution/bundle.js | 2 -- platform/execution/src/WorkerService.js | 2 -- platform/execution/test/WorkerServiceSpec.js | 2 -- platform/exporters/ExportService.js | 1 - platform/exporters/ExportServiceSpec.js | 2 -- platform/exporters/bundle.js | 2 -- platform/features/clock/bundle.js | 2 -- platform/features/clock/src/actions/AbstractStartTimerAction.js | 2 -- platform/features/clock/src/actions/RestartTimerAction.js | 2 -- platform/features/clock/src/actions/StartTimerAction.js | 2 -- platform/features/clock/src/controllers/ClockController.js | 2 -- platform/features/clock/src/controllers/RefreshingController.js | 2 -- platform/features/clock/src/controllers/TimerController.js | 2 -- platform/features/clock/src/controllers/TimerFormatter.js | 2 -- platform/features/clock/src/indicators/ClockIndicator.js | 2 -- platform/features/clock/src/services/TickerService.js | 2 -- .../features/clock/test/actions/AbstractStartTimerActionSpec.js | 2 -- platform/features/clock/test/actions/RestartTimerActionSpec.js | 2 -- platform/features/clock/test/actions/StartTimerActionSpec.js | 2 -- platform/features/clock/test/controllers/ClockControllerSpec.js | 2 -- .../features/clock/test/controllers/RefreshingControllerSpec.js | 2 -- platform/features/clock/test/controllers/TimerControllerSpec.js | 2 -- platform/features/clock/test/controllers/TimerFormatterSpec.js | 2 -- platform/features/clock/test/indicators/ClockIndicatorSpec.js | 2 -- platform/features/clock/test/services/TickerServiceSpec.js | 2 -- platform/features/conductor/bundle.js | 2 -- platform/features/conductor/src/ConductorRepresenter.js | 2 -- platform/features/conductor/src/ConductorService.js | 2 -- platform/features/conductor/src/ConductorTelemetryDecorator.js | 2 -- platform/features/conductor/src/TimeConductor.js | 2 -- platform/features/conductor/test/ConductorRepresenterSpec.js | 2 -- platform/features/conductor/test/ConductorServiceSpec.js | 2 -- .../features/conductor/test/ConductorTelemetryDecoratorSpec.js | 2 -- platform/features/conductor/test/TestTimeConductor.js | 2 -- platform/features/conductor/test/TimeConductorSpec.js | 2 -- platform/features/events/bundle.js | 2 -- platform/features/events/src/DomainColumn.js | 2 -- platform/features/events/src/EventListController.js | 2 -- platform/features/events/src/EventListPopulator.js | 2 -- platform/features/events/src/RangeColumn.js | 2 -- platform/features/events/src/directives/MCTDataTable.js | 2 -- platform/features/events/src/policies/MessagesViewPolicy.js | 2 -- platform/features/events/test/DomainColumnSpec.js | 2 -- platform/features/events/test/EventListControllerSpec.js | 2 -- platform/features/events/test/EventListPopulatorSpec.js | 2 -- platform/features/events/test/RangeColumnSpec.js | 2 -- .../features/events/test/policies/MessagesViewPolicySpec.js | 2 -- platform/features/imagery/bundle.js | 2 -- platform/features/imagery/src/controllers/ImageryController.js | 2 -- platform/features/imagery/src/directives/MCTBackgroundImage.js | 2 -- platform/features/imagery/src/policies/ImageryViewPolicy.js | 2 -- .../features/imagery/test/controllers/ImageryControllerSpec.js | 2 -- .../features/imagery/test/directives/MCTBackgroundImageSpec.js | 2 -- .../features/imagery/test/policies/ImageryViewPolicySpec.js | 2 -- platform/features/layout/bundle.js | 2 -- platform/features/layout/src/FixedController.js | 2 -- platform/features/layout/src/FixedDragHandle.js | 2 -- platform/features/layout/src/FixedProxy.js | 2 -- platform/features/layout/src/LayoutCompositionPolicy.js | 2 -- platform/features/layout/src/LayoutController.js | 2 -- platform/features/layout/src/LayoutDrag.js | 2 -- platform/features/layout/src/elements/AccessorMutator.js | 2 -- platform/features/layout/src/elements/BoxProxy.js | 2 -- platform/features/layout/src/elements/ElementFactory.js | 2 -- platform/features/layout/src/elements/ElementProxies.js | 2 -- platform/features/layout/src/elements/ElementProxy.js | 2 -- platform/features/layout/src/elements/ImageProxy.js | 2 -- platform/features/layout/src/elements/LineHandle.js | 2 -- platform/features/layout/src/elements/LineProxy.js | 2 -- platform/features/layout/src/elements/ResizeHandle.js | 2 -- platform/features/layout/src/elements/TelemetryProxy.js | 2 -- platform/features/layout/src/elements/TextProxy.js | 2 -- platform/features/layout/test/FixedControllerSpec.js | 2 -- platform/features/layout/test/FixedDragHandleSpec.js | 2 -- platform/features/layout/test/FixedProxySpec.js | 2 -- platform/features/layout/test/LayoutCompositionPolicySpec.js | 2 -- platform/features/layout/test/LayoutControllerSpec.js | 2 -- platform/features/layout/test/LayoutDragSpec.js | 2 -- platform/features/layout/test/elements/AccessorMutatorSpec.js | 2 -- platform/features/layout/test/elements/BoxProxySpec.js | 2 -- platform/features/layout/test/elements/ElementFactorySpec.js | 2 -- platform/features/layout/test/elements/ElementProxiesSpec.js | 2 -- platform/features/layout/test/elements/ElementProxySpec.js | 2 -- platform/features/layout/test/elements/ImageProxySpec.js | 2 -- platform/features/layout/test/elements/LineHandleSpec.js | 2 -- platform/features/layout/test/elements/LineProxySpec.js | 2 -- platform/features/layout/test/elements/ResizeHandleSpec.js | 2 -- platform/features/layout/test/elements/TelemetryProxySpec.js | 2 -- platform/features/layout/test/elements/TextProxySpec.js | 2 -- platform/features/pages/bundle.js | 2 -- platform/features/pages/src/EmbeddedPageController.js | 2 -- platform/features/pages/test/EmbeddedPageControllerSpec.js | 2 -- platform/features/plot/bundle.js | 2 -- platform/features/plot/src/Canvas2DChart.js | 2 -- platform/features/plot/src/GLChart.js | 2 -- platform/features/plot/src/MCTChart.js | 2 -- platform/features/plot/src/PlotController.js | 2 -- platform/features/plot/src/PlotOptionsController.js | 2 -- platform/features/plot/src/PlotOptionsForm.js | 2 -- platform/features/plot/src/SubPlot.js | 2 -- platform/features/plot/src/SubPlotFactory.js | 2 -- platform/features/plot/src/elements/PlotAxis.js | 2 -- platform/features/plot/src/elements/PlotLimitTracker.js | 2 -- platform/features/plot/src/elements/PlotLine.js | 2 -- platform/features/plot/src/elements/PlotLineBuffer.js | 2 -- platform/features/plot/src/elements/PlotPalette.js | 2 -- platform/features/plot/src/elements/PlotPanZoomStack.js | 2 -- platform/features/plot/src/elements/PlotPanZoomStackGroup.js | 2 -- platform/features/plot/src/elements/PlotPosition.js | 2 -- platform/features/plot/src/elements/PlotPreparer.js | 2 -- platform/features/plot/src/elements/PlotSeriesWindow.js | 2 -- platform/features/plot/src/elements/PlotTelemetryFormatter.js | 2 -- platform/features/plot/src/elements/PlotTickGenerator.js | 2 -- platform/features/plot/src/elements/PlotUpdater.js | 2 -- platform/features/plot/src/modes/PlotModeOptions.js | 2 -- platform/features/plot/src/modes/PlotOverlayMode.js | 2 -- platform/features/plot/src/modes/PlotStackMode.js | 2 -- platform/features/plot/src/policies/PlotViewPolicy.js | 2 -- platform/features/plot/test/Canvas2DChartSpec.js | 2 -- platform/features/plot/test/GLChartSpec.js | 2 -- platform/features/plot/test/MCTChartSpec.js | 2 -- platform/features/plot/test/PlotControllerSpec.js | 2 -- platform/features/plot/test/PlotOptionsControllerSpec.js | 2 -- platform/features/plot/test/PlotOptionsFormSpec.js | 2 -- platform/features/plot/test/SubPlotFactorySpec.js | 2 -- platform/features/plot/test/SubPlotSpec.js | 2 -- platform/features/plot/test/elements/PlotAxisSpec.js | 2 -- platform/features/plot/test/elements/PlotLimitTrackerSpec.js | 2 -- platform/features/plot/test/elements/PlotLineBufferSpec.js | 2 -- platform/features/plot/test/elements/PlotLineSpec.js | 2 -- platform/features/plot/test/elements/PlotPaletteSpec.js | 2 -- .../features/plot/test/elements/PlotPanZoomStackGroupSpec.js | 2 -- platform/features/plot/test/elements/PlotPanZoomStackSpec.js | 2 -- platform/features/plot/test/elements/PlotPositionSpec.js | 2 -- platform/features/plot/test/elements/PlotPreparerSpec.js | 2 -- platform/features/plot/test/elements/PlotSeriesWindowSpec.js | 2 -- .../features/plot/test/elements/PlotTelemetryFormatterSpec.js | 2 -- platform/features/plot/test/elements/PlotTickGeneratorSpec.js | 2 -- platform/features/plot/test/elements/PlotUpdaterSpec.js | 2 -- platform/features/plot/test/modes/PlotModeOptionsSpec.js | 2 -- platform/features/plot/test/modes/PlotOverlayModeSpec.js | 2 -- platform/features/plot/test/modes/PlotStackModeSpec.js | 2 -- platform/features/plot/test/policies/PlotViewPolicySpec.js | 2 -- platform/features/rtevents/bundle.js | 2 -- platform/features/rtevents/src/DomainColumn.js | 2 -- platform/features/rtevents/src/RTEventListController.js | 2 -- platform/features/rtevents/src/RangeColumn.js | 2 -- platform/features/rtevents/src/directives/MCTRTDataTable.js | 2 -- platform/features/rtevents/src/policies/RTMessagesViewPolicy.js | 2 -- platform/features/rtevents/test/DomainColumnSpec.js | 2 -- platform/features/rtevents/test/RTEventListControllerSpec.js | 2 -- platform/features/rtevents/test/RangeColumnSpec.js | 2 -- .../features/rtevents/test/policies/RTMessagesViewPolicySpec.js | 2 -- platform/features/rtscrolling/bundle.js | 2 -- platform/features/rtscrolling/src/DomainColumn.js | 2 -- platform/features/rtscrolling/src/NameColumn.js | 2 -- platform/features/rtscrolling/src/RTScrollingListController.js | 2 -- platform/features/rtscrolling/src/RangeColumn.js | 2 -- platform/features/scrolling/bundle.js | 2 -- platform/features/scrolling/src/DomainColumn.js | 2 -- platform/features/scrolling/src/NameColumn.js | 2 -- platform/features/scrolling/src/RangeColumn.js | 2 -- platform/features/scrolling/src/ScrollingListController.js | 2 -- platform/features/scrolling/src/ScrollingListPopulator.js | 2 -- platform/features/scrolling/test/DomainColumnSpec.js | 2 -- platform/features/scrolling/test/NameColumnSpec.js | 2 -- platform/features/scrolling/test/RangeColumnSpec.js | 2 -- platform/features/scrolling/test/ScrollingListControllerSpec.js | 2 -- platform/features/scrolling/test/ScrollingListPopulatorSpec.js | 2 -- platform/features/static-markup/bundle.js | 2 -- platform/features/table/bundle.js | 2 -- platform/features/table/src/DomainColumn.js | 2 -- platform/features/table/src/NameColumn.js | 2 -- platform/features/table/src/RangeColumn.js | 2 -- platform/features/table/src/TableConfiguration.js | 2 -- platform/features/table/src/controllers/MCTTableController.js | 2 -- .../features/table/src/controllers/TableOptionsController.js | 2 -- .../features/table/src/controllers/TelemetryTableController.js | 2 -- platform/features/table/src/directives/MCTTable.js | 2 -- platform/features/table/test/DomainColumnSpec.js | 2 -- platform/features/table/test/NameColumnSpec.js | 2 -- platform/features/table/test/RangeColumnSpec.js | 2 -- platform/features/table/test/TableConfigurationSpec.js | 2 -- .../features/table/test/controllers/MCTTableControllerSpec.js | 2 -- .../table/test/controllers/TableOptionsControllerSpec.js | 2 -- .../table/test/controllers/TelemetryTableControllerSpec.js | 2 -- platform/features/timeline/bundle.js | 2 -- platform/features/timeline/src/TimelineConstants.js | 1 - platform/features/timeline/src/TimelineFormatter.js | 2 -- platform/features/timeline/src/capabilities/ActivityTimespan.js | 2 -- .../timeline/src/capabilities/ActivityTimespanCapability.js | 2 -- .../features/timeline/src/capabilities/ActivityUtilization.js | 2 -- platform/features/timeline/src/capabilities/CostCapability.js | 2 -- platform/features/timeline/src/capabilities/CumulativeGraph.js | 2 -- platform/features/timeline/src/capabilities/GraphCapability.js | 2 -- platform/features/timeline/src/capabilities/ResourceGraph.js | 2 -- platform/features/timeline/src/capabilities/TimelineTimespan.js | 2 -- .../timeline/src/capabilities/TimelineTimespanCapability.js | 2 -- .../features/timeline/src/capabilities/TimelineUtilization.js | 2 -- .../features/timeline/src/capabilities/UtilizationCapability.js | 2 -- .../timeline/src/controllers/ActivityModeValuesController.js | 2 -- .../features/timeline/src/controllers/TimelineController.js | 2 -- .../timeline/src/controllers/TimelineDateTimeController.js | 2 -- .../timeline/src/controllers/TimelineGanttController.js | 2 -- .../timeline/src/controllers/TimelineGraphController.js | 2 -- .../timeline/src/controllers/TimelineTableController.js | 2 -- .../features/timeline/src/controllers/TimelineTickController.js | 2 -- .../features/timeline/src/controllers/TimelineZoomController.js | 2 -- .../timeline/src/controllers/drag/TimelineDragHandleFactory.js | 2 -- .../timeline/src/controllers/drag/TimelineDragHandler.js | 2 -- .../timeline/src/controllers/drag/TimelineDragPopulator.js | 2 -- .../features/timeline/src/controllers/drag/TimelineEndHandle.js | 2 -- .../timeline/src/controllers/drag/TimelineMoveHandle.js | 2 -- .../timeline/src/controllers/drag/TimelineSnapHandler.js | 2 -- .../timeline/src/controllers/drag/TimelineStartHandle.js | 2 -- .../features/timeline/src/controllers/graph/TimelineGraph.js | 2 -- .../timeline/src/controllers/graph/TimelineGraphPopulator.js | 2 -- .../timeline/src/controllers/graph/TimelineGraphRenderer.js | 2 -- .../timeline/src/controllers/swimlane/TimelineColorAssigner.js | 2 -- .../features/timeline/src/controllers/swimlane/TimelineProxy.js | 2 -- .../timeline/src/controllers/swimlane/TimelineSwimlane.js | 2 -- .../src/controllers/swimlane/TimelineSwimlaneDecorator.js | 2 -- .../src/controllers/swimlane/TimelineSwimlaneDropHandler.js | 2 -- .../src/controllers/swimlane/TimelineSwimlanePopulator.js | 2 -- platform/features/timeline/src/directives/MCTSwimlaneDrag.js | 2 -- platform/features/timeline/src/directives/MCTSwimlaneDrop.js | 2 -- .../features/timeline/src/directives/SwimlaneDragConstants.js | 1 - platform/features/timeline/src/services/ObjectLoader.js | 2 -- platform/features/timeline/test/TimelineConstantsSpec.js | 2 -- platform/features/timeline/test/TimelineFormatterSpec.js | 2 -- .../test/capabilities/ActivityTimespanCapabilitySpec.js | 2 -- .../features/timeline/test/capabilities/ActivityTimespanSpec.js | 2 -- .../timeline/test/capabilities/ActivityUtilizationSpec.js | 2 -- .../features/timeline/test/capabilities/CostCapabilitySpec.js | 2 -- .../features/timeline/test/capabilities/CumulativeGraphSpec.js | 2 -- .../features/timeline/test/capabilities/GraphCapabilitySpec.js | 2 -- .../features/timeline/test/capabilities/ResourceGraphSpec.js | 2 -- .../test/capabilities/TimelineTimespanCapabilitySpec.js | 2 -- .../features/timeline/test/capabilities/TimelineTimespanSpec.js | 2 -- .../timeline/test/capabilities/TimelineUtilizationSpec.js | 2 -- .../timeline/test/capabilities/UtilizationCapabilitySpec.js | 2 -- .../test/controllers/ActivityModeValuesControllerSpec.js | 2 -- .../timeline/test/controllers/TimelineControllerSpec.js | 2 -- .../timeline/test/controllers/TimelineDateTimeControllerSpec.js | 2 -- .../timeline/test/controllers/TimelineGanttControllerSpec.js | 2 -- .../timeline/test/controllers/TimelineGraphControllerSpec.js | 2 -- .../timeline/test/controllers/TimelineTableControllerSpec.js | 2 -- .../timeline/test/controllers/TimelineTickControllerSpec.js | 2 -- .../timeline/test/controllers/TimelineZoomControllerSpec.js | 2 -- .../test/controllers/drag/TimelineDragHandleFactorySpec.js | 2 -- .../timeline/test/controllers/drag/TimelineDragHandlerSpec.js | 2 -- .../timeline/test/controllers/drag/TimelineDragPopulatorSpec.js | 2 -- .../timeline/test/controllers/drag/TimelineEndHandleSpec.js | 2 -- .../timeline/test/controllers/drag/TimelineMoveHandleSpec.js | 2 -- .../timeline/test/controllers/drag/TimelineSnapHandlerSpec.js | 2 -- .../timeline/test/controllers/drag/TimelineStartHandleSpec.js | 2 -- .../test/controllers/graph/TimelineGraphPopulatorSpec.js | 2 -- .../test/controllers/graph/TimelineGraphRendererSpec.js | 2 -- .../timeline/test/controllers/graph/TimelineGraphSpec.js | 2 -- .../test/controllers/swimlane/TimelineColorAssignerSpec.js | 2 -- .../timeline/test/controllers/swimlane/TimelineProxySpec.js | 2 -- .../test/controllers/swimlane/TimelineSwimlaneDecoratorSpec.js | 2 -- .../controllers/swimlane/TimelineSwimlaneDropHandlerSpec.js | 2 -- .../test/controllers/swimlane/TimelineSwimlanePopulatorSpec.js | 2 -- .../timeline/test/controllers/swimlane/TimelineSwimlaneSpec.js | 2 -- .../features/timeline/test/directives/MCTSwimlaneDragSpec.js | 2 -- .../features/timeline/test/directives/MCTSwimlaneDropSpec.js | 2 -- .../timeline/test/directives/SwimlaneDragConstantsSpec.js | 2 -- platform/features/timeline/test/services/ObjectLoaderSpec.js | 2 -- platform/forms/bundle.js | 2 -- platform/forms/src/MCTControl.js | 2 -- platform/forms/src/MCTForm.js | 2 -- platform/forms/src/MCTToolbar.js | 2 -- platform/forms/src/controllers/ColorController.js | 2 -- platform/forms/src/controllers/CompositeController.js | 2 -- platform/forms/src/controllers/DateTimeController.js | 2 -- platform/forms/src/controllers/DialogButtonController.js | 2 -- platform/forms/src/controllers/FormController.js | 2 -- platform/forms/test/MCTControlSpec.js | 2 -- platform/forms/test/MCTFormSpec.js | 2 -- platform/forms/test/MCTToolbarSpec.js | 2 -- platform/forms/test/controllers/ColorControllerSpec.js | 2 -- platform/forms/test/controllers/CompositeControllerSpec.js | 2 -- platform/forms/test/controllers/DateTimeControllerSpec.js | 2 -- platform/forms/test/controllers/DialogButtonControllerSpec.js | 2 -- platform/forms/test/controllers/FormControllerSpec.js | 2 -- platform/framework/bundle.js | 2 -- platform/framework/src/Constants.js | 1 - platform/framework/src/FrameworkInitializer.js | 2 -- platform/framework/src/FrameworkLayer.js | 2 -- platform/framework/src/LogLevel.js | 2 -- platform/framework/src/Main.js | 2 -- platform/framework/src/bootstrap/ApplicationBootstrapper.js | 2 -- platform/framework/src/load/Bundle.js | 2 -- platform/framework/src/load/BundleLoader.js | 2 -- platform/framework/src/load/Extension.js | 2 -- platform/framework/src/register/CustomRegistrars.js | 2 -- platform/framework/src/register/ExtensionRegistrar.js | 2 -- platform/framework/src/register/ExtensionSorter.js | 2 -- platform/framework/src/register/PartialConstructor.js | 2 -- platform/framework/src/register/ServiceCompositor.js | 2 -- platform/framework/src/resolve/BundleResolver.js | 2 -- platform/framework/src/resolve/ExtensionResolver.js | 2 -- platform/framework/src/resolve/ImplementationLoader.js | 2 -- platform/framework/src/resolve/RequireConfigurator.js | 2 -- platform/framework/test/FrameworkInitializerSpec.js | 2 -- platform/framework/test/LogLevelSpec.js | 2 -- .../framework/test/bootstrap/ApplicationBootstrapperSpec.js | 2 -- platform/framework/test/load/BundleLoaderSpec.js | 2 -- platform/framework/test/load/BundleSpec.js | 2 -- platform/framework/test/load/ExtensionSpec.js | 2 -- platform/framework/test/register/CustomRegistrarsSpec.js | 2 -- platform/framework/test/register/ExtensionRegistrarSpec.js | 2 -- platform/framework/test/register/ExtensionSorterSpec.js | 2 -- platform/framework/test/register/PartialConstructorSpec.js | 2 -- platform/framework/test/register/ServiceCompositorSpec.js | 2 -- platform/framework/test/resolve/BundleResolverSpec.js | 2 -- platform/framework/test/resolve/ExtensionResolverSpec.js | 2 -- platform/framework/test/resolve/ImplementationLoaderSpec.js | 2 -- platform/framework/test/resolve/RequireConfiguratorSpec.js | 2 -- platform/identity/bundle.js | 2 -- platform/identity/src/IdentityAggregator.js | 2 -- platform/identity/src/IdentityCreationDecorator.js | 2 -- platform/identity/src/IdentityIndicator.js | 2 -- platform/identity/src/IdentityProvider.js | 2 -- platform/identity/test/IdentityAggregatorSpec.js | 2 -- platform/identity/test/IdentityCreationDecoratorSpec.js | 2 -- platform/identity/test/IdentityIndicatorSpec.js | 2 -- platform/identity/test/IdentityProviderSpec.js | 2 -- platform/persistence/aggregator/bundle.js | 2 -- platform/persistence/aggregator/src/PersistenceAggregator.js | 2 -- .../persistence/aggregator/test/PersistenceAggregatorSpec.js | 2 -- platform/persistence/cache/bundle.js | 2 -- platform/persistence/cache/src/CachingPersistenceDecorator.js | 2 -- .../persistence/cache/test/CachingPersistenceDecoratorSpec.js | 2 -- platform/persistence/couch/bundle.js | 2 -- platform/persistence/couch/src/CouchDocument.js | 2 -- platform/persistence/couch/src/CouchIndicator.js | 2 -- platform/persistence/couch/src/CouchPersistenceProvider.js | 2 -- platform/persistence/couch/test/CouchDocumentSpec.js | 2 -- platform/persistence/couch/test/CouchIndicatorSpec.js | 2 -- platform/persistence/couch/test/CouchPersistenceProviderSpec.js | 2 -- platform/persistence/elastic/bundle.js | 2 -- platform/persistence/elastic/src/ElasticIndicator.js | 2 -- platform/persistence/elastic/src/ElasticPersistenceProvider.js | 2 -- platform/persistence/elastic/src/ElasticSearchProvider.js | 2 -- platform/persistence/elastic/test/ElasticIndicatorSpec.js | 2 -- .../persistence/elastic/test/ElasticPersistenceProviderSpec.js | 2 -- platform/persistence/elastic/test/ElasticSearchProviderSpec.js | 2 -- platform/persistence/local/bundle.js | 2 -- platform/persistence/local/src/LocalStorageIndicator.js | 2 -- .../persistence/local/src/LocalStoragePersistenceProvider.js | 2 -- platform/persistence/local/test/LocalStorageIndicatorSpec.js | 2 -- .../local/test/LocalStoragePersistenceProviderSpec.js | 2 -- platform/persistence/queue/bundle.js | 2 -- platform/persistence/queue/src/PersistenceFailureConstants.js | 1 - platform/persistence/queue/src/PersistenceFailureController.js | 2 -- platform/persistence/queue/src/PersistenceFailureDialog.js | 2 -- platform/persistence/queue/src/PersistenceFailureHandler.js | 2 -- platform/persistence/queue/src/PersistenceQueue.js | 2 -- platform/persistence/queue/src/PersistenceQueueHandler.js | 2 -- platform/persistence/queue/src/PersistenceQueueImpl.js | 2 -- platform/persistence/queue/src/QueuingPersistenceCapability.js | 2 -- .../queue/src/QueuingPersistenceCapabilityDecorator.js | 2 -- .../persistence/queue/test/PersistenceFailureConstantsSpec.js | 2 -- .../persistence/queue/test/PersistenceFailureControllerSpec.js | 2 -- platform/persistence/queue/test/PersistenceFailureDialogSpec.js | 2 -- .../persistence/queue/test/PersistenceFailureHandlerSpec.js | 2 -- platform/persistence/queue/test/PersistenceQueueHandlerSpec.js | 2 -- platform/persistence/queue/test/PersistenceQueueImplSpec.js | 2 -- platform/persistence/queue/test/PersistenceQueueSpec.js | 2 -- .../queue/test/QueuingPersistenceCapabilityDecoratorSpec.js | 2 -- .../persistence/queue/test/QueuingPersistenceCapabilitySpec.js | 2 -- platform/policy/bundle.js | 2 -- platform/policy/src/PolicyActionDecorator.js | 2 -- platform/policy/src/PolicyProvider.js | 2 -- platform/policy/src/PolicyViewDecorator.js | 2 -- platform/policy/test/PolicyActionDecoratorSpec.js | 2 -- platform/policy/test/PolicyProviderSpec.js | 2 -- platform/policy/test/PolicyViewDecoratorSpec.js | 2 -- platform/representation/bundle.js | 2 -- platform/representation/src/MCTInclude.js | 2 -- platform/representation/src/MCTRepresentation.js | 2 -- platform/representation/src/TemplateLinker.js | 2 -- platform/representation/src/TemplatePrefetcher.js | 2 -- platform/representation/src/actions/ContextMenuAction.js | 2 -- platform/representation/src/gestures/ContextMenuGesture.js | 2 -- platform/representation/src/gestures/DragGesture.js | 2 -- platform/representation/src/gestures/DropGesture.js | 2 -- platform/representation/src/gestures/GestureConstants.js | 1 - platform/representation/src/gestures/GestureProvider.js | 2 -- platform/representation/src/gestures/GestureRepresenter.js | 2 -- platform/representation/src/services/DndService.js | 2 -- platform/representation/test/MCTIncludeSpec.js | 2 -- platform/representation/test/MCTRepresentationSpec.js | 2 -- platform/representation/test/TemplateLinkerSpec.js | 2 -- platform/representation/test/TemplatePrefetcherSpec.js | 2 -- platform/representation/test/actions/ContextMenuActionSpec.js | 2 -- platform/representation/test/gestures/ContextMenuGestureSpec.js | 2 -- platform/representation/test/gestures/DragGestureSpec.js | 2 -- platform/representation/test/gestures/DropGestureSpec.js | 2 -- platform/representation/test/gestures/GestureProviderSpec.js | 2 -- platform/representation/test/gestures/GestureRepresenterSpec.js | 2 -- platform/representation/test/services/DndServiceSpec.js | 2 -- platform/search/bundle.js | 2 -- platform/search/src/controllers/ClickAwayController.js | 2 -- platform/search/src/controllers/SearchController.js | 2 -- platform/search/src/controllers/SearchMenuController.js | 2 -- platform/search/src/services/GenericSearchProvider.js | 2 -- platform/search/src/services/GenericSearchWorker.js | 2 -- platform/search/src/services/SearchAggregator.js | 2 -- platform/search/test/controllers/ClickAwayControllerSpec.js | 2 -- platform/search/test/controllers/SearchControllerSpec.js | 2 -- platform/search/test/controllers/SearchMenuControllerSpec.js | 2 -- platform/search/test/services/GenericSearchProviderSpec.js | 2 -- platform/search/test/services/GenericSearchWorkerSpec.js | 2 -- platform/search/test/services/SearchAggregatorSpec.js | 2 -- platform/status/bundle.js | 2 -- platform/status/src/StatusCapability.js | 2 -- platform/status/src/StatusConstants.js | 1 - platform/status/src/StatusRepresenter.js | 2 -- platform/status/src/StatusService.js | 2 -- platform/status/test/StatusCapabilitySpec.js | 2 -- platform/status/test/StatusRepresenterSpec.js | 2 -- platform/status/test/StatusServiceSpec.js | 2 -- platform/telemetry/bundle.js | 2 -- platform/telemetry/src/TelemetryAggregator.js | 2 -- platform/telemetry/src/TelemetryCapability.js | 2 -- platform/telemetry/src/TelemetryController.js | 2 -- platform/telemetry/src/TelemetryDelegator.js | 2 -- platform/telemetry/src/TelemetryFormatter.js | 2 -- platform/telemetry/src/TelemetryHandle.js | 2 -- platform/telemetry/src/TelemetryHandler.js | 2 -- platform/telemetry/src/TelemetryQueue.js | 2 -- platform/telemetry/src/TelemetrySubscriber.js | 2 -- platform/telemetry/src/TelemetrySubscription.js | 2 -- platform/telemetry/src/TelemetryTable.js | 2 -- platform/telemetry/test/TelemetryAggregatorSpec.js | 2 -- platform/telemetry/test/TelemetryCapabilitySpec.js | 2 -- platform/telemetry/test/TelemetryControllerSpec.js | 2 -- platform/telemetry/test/TelemetryDelegatorSpec.js | 2 -- platform/telemetry/test/TelemetryFormatterSpec.js | 2 -- platform/telemetry/test/TelemetryHandleSpec.js | 2 -- platform/telemetry/test/TelemetryHandlerSpec.js | 2 -- platform/telemetry/test/TelemetryQueueSpec.js | 2 -- platform/telemetry/test/TelemetrySubscriberSpec.js | 2 -- platform/telemetry/test/TelemetrySubscriptionSpec.js | 2 -- platform/telemetry/test/TelemetryTableSpec.js | 2 -- src/BundleRegistry.js | 2 -- src/BundleRegistrySpec.js | 2 -- src/legacyRegistry.js | 2 -- src/legacyRegistrySpec.js | 2 -- 778 files changed, 1547 deletions(-) diff --git a/platform/commonUI/about/bundle.js b/platform/commonUI/about/bundle.js index aff0825f5c..a5fdd726d5 100644 --- a/platform/commonUI/about/bundle.js +++ b/platform/commonUI/about/bundle.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([ "text!./res/templates/about-dialog.html", @@ -48,7 +47,6 @@ define([ licensesExportMdTemplate, legacyRegistry ) { - "use strict"; legacyRegistry.register("platform/commonUI/about", { "name": "About Open MCT Web", diff --git a/platform/commonUI/about/src/AboutController.js b/platform/commonUI/about/src/AboutController.js index dffd9b9471..0807166bc9 100644 --- a/platform/commonUI/about/src/AboutController.js +++ b/platform/commonUI/about/src/AboutController.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ /** @@ -29,7 +28,6 @@ define( [], function () { - "use strict"; /** * The AboutController provides information to populate the diff --git a/platform/commonUI/about/src/LicenseController.js b/platform/commonUI/about/src/LicenseController.js index 740124641f..5d030588c9 100644 --- a/platform/commonUI/about/src/LicenseController.js +++ b/platform/commonUI/about/src/LicenseController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * Provides extension-introduced licenses information to the diff --git a/platform/commonUI/about/src/LogoController.js b/platform/commonUI/about/src/LogoController.js index 85909a0552..616981e8da 100644 --- a/platform/commonUI/about/src/LogoController.js +++ b/platform/commonUI/about/src/LogoController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * The LogoController provides functionality to the application diff --git a/platform/commonUI/about/test/AboutControllerSpec.js b/platform/commonUI/about/test/AboutControllerSpec.js index c4fb26c488..f902c7b6dc 100644 --- a/platform/commonUI/about/test/AboutControllerSpec.js +++ b/platform/commonUI/about/test/AboutControllerSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ define( ['../src/AboutController'], function (AboutController) { - "use strict"; describe("The About controller", function () { var testVersions, diff --git a/platform/commonUI/about/test/LicenseControllerSpec.js b/platform/commonUI/about/test/LicenseControllerSpec.js index 9e281c3cfd..ba99fc1f0d 100644 --- a/platform/commonUI/about/test/LicenseControllerSpec.js +++ b/platform/commonUI/about/test/LicenseControllerSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ define( ['../src/LicenseController'], function (LicenseController) { - "use strict"; describe("The License controller", function () { var testLicenses, diff --git a/platform/commonUI/about/test/LogoControllerSpec.js b/platform/commonUI/about/test/LogoControllerSpec.js index c7ad665319..da1c4b0a84 100644 --- a/platform/commonUI/about/test/LogoControllerSpec.js +++ b/platform/commonUI/about/test/LogoControllerSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ define( ['../src/LogoController'], function (LogoController) { - "use strict"; describe("The About controller", function () { var mockOverlayService, diff --git a/platform/commonUI/browse/bundle.js b/platform/commonUI/browse/bundle.js index 7fd785a7f5..73b3f44de7 100644 --- a/platform/commonUI/browse/bundle.js +++ b/platform/commonUI/browse/bundle.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([ "./src/BrowseController", @@ -80,7 +79,6 @@ define([ inspectorRegionTemplate, legacyRegistry ) { - "use strict"; legacyRegistry.register("platform/commonUI/browse", { "extensions": { diff --git a/platform/commonUI/browse/src/BrowseController.js b/platform/commonUI/browse/src/BrowseController.js index db7d9182cb..2c07ee7b50 100644 --- a/platform/commonUI/browse/src/BrowseController.js +++ b/platform/commonUI/browse/src/BrowseController.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise, confirm*/ /** * This bundle implements Browse mode. @@ -30,7 +29,6 @@ define( '../../../representation/src/gestures/GestureConstants' ], function (GestureConstants) { - "use strict"; var ROOT_ID = "ROOT"; diff --git a/platform/commonUI/browse/src/BrowseObjectController.js b/platform/commonUI/browse/src/BrowseObjectController.js index 71345d6f1b..63547993f8 100644 --- a/platform/commonUI/browse/src/BrowseObjectController.js +++ b/platform/commonUI/browse/src/BrowseObjectController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ define( [], function () { - "use strict"; /** * Controller for the `browse-object` representation of a domain diff --git a/platform/commonUI/browse/src/InspectorRegion.js b/platform/commonUI/browse/src/InspectorRegion.js index cc47ae2db8..e227d3d452 100644 --- a/platform/commonUI/browse/src/InspectorRegion.js +++ b/platform/commonUI/browse/src/InspectorRegion.js @@ -19,14 +19,12 @@ * 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 diff --git a/platform/commonUI/browse/src/MenuArrowController.js b/platform/commonUI/browse/src/MenuArrowController.js index 5c4916e099..f222871ccc 100644 --- a/platform/commonUI/browse/src/MenuArrowController.js +++ b/platform/commonUI/browse/src/MenuArrowController.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ /** * Module defining MenuArrowController. Created by shale on 06/30/2015. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; /** * A left-click on the menu arrow should display a diff --git a/platform/commonUI/browse/src/PaneController.js b/platform/commonUI/browse/src/PaneController.js index 6a59baa0e0..3fb5630fdd 100644 --- a/platform/commonUI/browse/src/PaneController.js +++ b/platform/commonUI/browse/src/PaneController.js @@ -19,13 +19,11 @@ * 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"; /** * Controller to provide the ability to show/hide the tree in diff --git a/platform/commonUI/browse/src/creation/AddAction.js b/platform/commonUI/browse/src/creation/AddAction.js index 3832280130..9a9467ef5b 100644 --- a/platform/commonUI/browse/src/creation/AddAction.js +++ b/platform/commonUI/browse/src/creation/AddAction.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining AddAction. Created by ahenry on 01/21/16. @@ -29,7 +28,6 @@ define( './CreateWizard' ], function (CreateWizard) { - "use strict"; /** * The Add Action is performed to create new instances of diff --git a/platform/commonUI/browse/src/creation/AddActionProvider.js b/platform/commonUI/browse/src/creation/AddActionProvider.js index 0ac97c0013..9ae5364d95 100644 --- a/platform/commonUI/browse/src/creation/AddActionProvider.js +++ b/platform/commonUI/browse/src/creation/AddActionProvider.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining AddActionProvider.js. Created by ahenry on 01/21/16. @@ -27,7 +26,6 @@ define( ["./AddAction"], function (AddAction) { - "use strict"; /** * The AddActionProvider is an ActionProvider which introduces diff --git a/platform/commonUI/browse/src/creation/CreateAction.js b/platform/commonUI/browse/src/creation/CreateAction.js index 83d88ba709..00b7c09fa4 100644 --- a/platform/commonUI/browse/src/creation/CreateAction.js +++ b/platform/commonUI/browse/src/creation/CreateAction.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining CreateAction. Created by vwoeltje on 11/10/14. @@ -30,7 +29,6 @@ define( '../../../edit/src/objects/EditableDomainObject' ], function (CreateWizard, EditableDomainObject) { - "use strict"; /** * The Create Action is performed to create new instances of diff --git a/platform/commonUI/browse/src/creation/CreateActionProvider.js b/platform/commonUI/browse/src/creation/CreateActionProvider.js index 0a8d145b4e..82f57343da 100644 --- a/platform/commonUI/browse/src/creation/CreateActionProvider.js +++ b/platform/commonUI/browse/src/creation/CreateActionProvider.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining CreateActionProvider.js. Created by vwoeltje on 11/10/14. @@ -27,7 +26,6 @@ define( ["./CreateAction"], function (CreateAction) { - "use strict"; /** * The CreateActionProvider is an ActionProvider which introduces diff --git a/platform/commonUI/browse/src/creation/CreateMenuController.js b/platform/commonUI/browse/src/creation/CreateMenuController.js index 624764c2e4..77e09a69c4 100644 --- a/platform/commonUI/browse/src/creation/CreateMenuController.js +++ b/platform/commonUI/browse/src/creation/CreateMenuController.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining CreateMenuController. Created by vwoeltje on 11/10/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; /** * Controller for the Create menu; maintains an up-to-date diff --git a/platform/commonUI/browse/src/creation/CreateWizard.js b/platform/commonUI/browse/src/creation/CreateWizard.js index f4a29d42ac..660a577905 100644 --- a/platform/commonUI/browse/src/creation/CreateWizard.js +++ b/platform/commonUI/browse/src/creation/CreateWizard.js @@ -19,11 +19,9 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( function () { - 'use strict'; /** * A class for capturing user input data from an object creation diff --git a/platform/commonUI/browse/src/creation/CreationPolicy.js b/platform/commonUI/browse/src/creation/CreationPolicy.js index 28749e711f..480d0adec4 100644 --- a/platform/commonUI/browse/src/creation/CreationPolicy.js +++ b/platform/commonUI/browse/src/creation/CreationPolicy.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * A policy for determining whether objects of a given type can be diff --git a/platform/commonUI/browse/src/creation/CreationService.js b/platform/commonUI/browse/src/creation/CreationService.js index 4b7c0119c9..ca5389e162 100644 --- a/platform/commonUI/browse/src/creation/CreationService.js +++ b/platform/commonUI/browse/src/creation/CreationService.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining CreateService. Created by vwoeltje on 11/10/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; var NON_PERSISTENT_WARNING = "Tried to create an object in non-persistent container.", diff --git a/platform/commonUI/browse/src/creation/LocatorController.js b/platform/commonUI/browse/src/creation/LocatorController.js index 3d8c6cfc7f..43a1a4ed10 100644 --- a/platform/commonUI/browse/src/creation/LocatorController.js +++ b/platform/commonUI/browse/src/creation/LocatorController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * Controller for the "locator" control, which provides the diff --git a/platform/commonUI/browse/src/navigation/NavigateAction.js b/platform/commonUI/browse/src/navigation/NavigateAction.js index 7b258afafe..e9cc700f93 100644 --- a/platform/commonUI/browse/src/navigation/NavigateAction.js +++ b/platform/commonUI/browse/src/navigation/NavigateAction.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining NavigateAction. Created by vwoeltje on 11/10/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; /** * The navigate action navigates to a specific domain object. diff --git a/platform/commonUI/browse/src/navigation/NavigationService.js b/platform/commonUI/browse/src/navigation/NavigationService.js index 3b4d266bd1..05d93aa996 100644 --- a/platform/commonUI/browse/src/navigation/NavigationService.js +++ b/platform/commonUI/browse/src/navigation/NavigationService.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining NavigationService. Created by vwoeltje on 11/10/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; /** * The navigation service maintains the application's current diff --git a/platform/commonUI/browse/src/windowing/FullscreenAction.js b/platform/commonUI/browse/src/windowing/FullscreenAction.js index 5de4336acd..f898dbbe6e 100644 --- a/platform/commonUI/browse/src/windowing/FullscreenAction.js +++ b/platform/commonUI/browse/src/windowing/FullscreenAction.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,screenfull,Promise*/ /** * Module defining FullscreenAction. Created by vwoeltje on 11/18/14. @@ -27,7 +26,6 @@ define( ["screenfull"], function () { - "use strict"; var ENTER_FULLSCREEN = "Enter full screen mode", EXIT_FULLSCREEN = "Exit full screen mode"; diff --git a/platform/commonUI/browse/src/windowing/NewTabAction.js b/platform/commonUI/browse/src/windowing/NewTabAction.js index 301c204bbd..83422d5096 100644 --- a/platform/commonUI/browse/src/windowing/NewTabAction.js +++ b/platform/commonUI/browse/src/windowing/NewTabAction.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining NewTabAction (Originally NewWindowAction). Created by vwoeltje on 11/18/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; var ROOT_ID = "ROOT", DEFAULT_PATH = "/mine"; /** diff --git a/platform/commonUI/browse/src/windowing/WindowTitler.js b/platform/commonUI/browse/src/windowing/WindowTitler.js index 4ce448cb1e..eb8c499e24 100644 --- a/platform/commonUI/browse/src/windowing/WindowTitler.js +++ b/platform/commonUI/browse/src/windowing/WindowTitler.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ define( [], function () { - "use strict"; /** * Updates the title of the current window to reflect the name diff --git a/platform/commonUI/browse/test/BrowseControllerSpec.js b/platform/commonUI/browse/test/BrowseControllerSpec.js index cc14b4d0e5..6bb41b4e6e 100644 --- a/platform/commonUI/browse/test/BrowseControllerSpec.js +++ b/platform/commonUI/browse/test/BrowseControllerSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine,xit,xdescribe*/ /** * MCTRepresentationSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../src/BrowseController"], function (BrowseController) { - "use strict"; describe("The browse controller", function () { var mockScope, diff --git a/platform/commonUI/browse/test/BrowseObjectControllerSpec.js b/platform/commonUI/browse/test/BrowseObjectControllerSpec.js index 9fc7ba3119..dd873030f5 100644 --- a/platform/commonUI/browse/test/BrowseObjectControllerSpec.js +++ b/platform/commonUI/browse/test/BrowseObjectControllerSpec.js @@ -19,13 +19,11 @@ * 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*/ define( ["../src/BrowseObjectController"], function (BrowseObjectController) { - "use strict"; describe("The browse object controller", function () { var mockScope, diff --git a/platform/commonUI/browse/test/InspectorRegionSpec.js b/platform/commonUI/browse/test/InspectorRegionSpec.js index e455a8df4d..b7ce021cdc 100644 --- a/platform/commonUI/browse/test/InspectorRegionSpec.js +++ b/platform/commonUI/browse/test/InspectorRegionSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /** * MCTIncudeSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../src/InspectorRegion"], function (InspectorRegion) { - "use strict"; describe("The inspector region", function () { var inspectorRegion; diff --git a/platform/commonUI/browse/test/MenuArrowControllerSpec.js b/platform/commonUI/browse/test/MenuArrowControllerSpec.js index b8aa345489..22f9882115 100644 --- a/platform/commonUI/browse/test/MenuArrowControllerSpec.js +++ b/platform/commonUI/browse/test/MenuArrowControllerSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /** * MenuArrowControllerSpec. Created by shale on 07/02/2015. @@ -27,7 +26,6 @@ define( ["../src/MenuArrowController"], function (MenuArrowController) { - "use strict"; describe("The menu arrow controller ", function () { var mockScope, diff --git a/platform/commonUI/browse/test/PaneControllerSpec.js b/platform/commonUI/browse/test/PaneControllerSpec.js index f02da713a4..8654884f39 100644 --- a/platform/commonUI/browse/test/PaneControllerSpec.js +++ b/platform/commonUI/browse/test/PaneControllerSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ define( ["../src/PaneController"], function (PaneController) { - 'use strict'; describe("The PaneController", function () { var mockScope, diff --git a/platform/commonUI/browse/test/creation/AddActionProviderSpec.js b/platform/commonUI/browse/test/creation/AddActionProviderSpec.js index aaa83af8e9..3b391d0258 100644 --- a/platform/commonUI/browse/test/creation/AddActionProviderSpec.js +++ b/platform/commonUI/browse/test/creation/AddActionProviderSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine,xit,xdescribe*/ /** * MCTRepresentationSpec. Created by ahenry on 01/21/14. @@ -27,7 +26,6 @@ define( ["../../src/creation/AddActionProvider"], function (AddActionProvider) { - "use strict"; describe("The add action provider", function () { var mockTypeService, diff --git a/platform/commonUI/browse/test/creation/CreateActionProviderSpec.js b/platform/commonUI/browse/test/creation/CreateActionProviderSpec.js index 857b29fe4e..b5bb794b04 100644 --- a/platform/commonUI/browse/test/creation/CreateActionProviderSpec.js +++ b/platform/commonUI/browse/test/creation/CreateActionProviderSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine,xit,xdescribe*/ /** * MCTRepresentationSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../../src/creation/CreateActionProvider"], function (CreateActionProvider) { - "use strict"; describe("The create action provider", function () { var mockTypeService, diff --git a/platform/commonUI/browse/test/creation/CreateActionSpec.js b/platform/commonUI/browse/test/creation/CreateActionSpec.js index d7e357fd9e..600bfadbdb 100644 --- a/platform/commonUI/browse/test/creation/CreateActionSpec.js +++ b/platform/commonUI/browse/test/creation/CreateActionSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine,xit,xdescribe*/ /** * MCTRepresentationSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../../src/creation/CreateAction"], function (CreateAction) { - "use strict"; describe("The create action", function () { var mockType, diff --git a/platform/commonUI/browse/test/creation/CreateMenuControllerSpec.js b/platform/commonUI/browse/test/creation/CreateMenuControllerSpec.js index 5f10ee35e4..a2f5473199 100644 --- a/platform/commonUI/browse/test/creation/CreateMenuControllerSpec.js +++ b/platform/commonUI/browse/test/creation/CreateMenuControllerSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /** * MCTRepresentationSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../../src/creation/CreateMenuController"], function (CreateMenuController) { - "use strict"; describe("The create menu controller", function () { var mockScope, diff --git a/platform/commonUI/browse/test/creation/CreateWizardSpec.js b/platform/commonUI/browse/test/creation/CreateWizardSpec.js index fbb2a735e6..577fb9b9ff 100644 --- a/platform/commonUI/browse/test/creation/CreateWizardSpec.js +++ b/platform/commonUI/browse/test/creation/CreateWizardSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /** * MCTRepresentationSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../../src/creation/CreateWizard"], function (CreateWizard) { - "use strict"; describe("The create wizard", function () { var mockType, diff --git a/platform/commonUI/browse/test/creation/CreationPolicySpec.js b/platform/commonUI/browse/test/creation/CreationPolicySpec.js index 1f88c1b149..a12d2c752d 100644 --- a/platform/commonUI/browse/test/creation/CreationPolicySpec.js +++ b/platform/commonUI/browse/test/creation/CreationPolicySpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/creation/CreationPolicy"], function (CreationPolicy) { - "use strict"; describe("The creation policy", function () { var mockType, diff --git a/platform/commonUI/browse/test/creation/CreationServiceSpec.js b/platform/commonUI/browse/test/creation/CreationServiceSpec.js index e0704ba702..deb2ba068b 100644 --- a/platform/commonUI/browse/test/creation/CreationServiceSpec.js +++ b/platform/commonUI/browse/test/creation/CreationServiceSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /** * MCTRepresentationSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../../src/creation/CreationService"], function (CreationService) { - "use strict"; describe("The creation service", function () { var mockQ, diff --git a/platform/commonUI/browse/test/creation/LocatorControllerSpec.js b/platform/commonUI/browse/test/creation/LocatorControllerSpec.js index 381aecf0ab..a601d5ea42 100644 --- a/platform/commonUI/browse/test/creation/LocatorControllerSpec.js +++ b/platform/commonUI/browse/test/creation/LocatorControllerSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /** * MCTRepresentationSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../../src/creation/LocatorController"], function (LocatorController) { - "use strict"; describe("The locator controller", function () { var mockScope, diff --git a/platform/commonUI/browse/test/navigation/NavigateActionSpec.js b/platform/commonUI/browse/test/navigation/NavigateActionSpec.js index 2441087a1a..fca6f3bea0 100644 --- a/platform/commonUI/browse/test/navigation/NavigateActionSpec.js +++ b/platform/commonUI/browse/test/navigation/NavigateActionSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /** * MCTRepresentationSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../../src/navigation/NavigateAction"], function (NavigateAction) { - "use strict"; describe("The navigate action", function () { var mockNavigationService, diff --git a/platform/commonUI/browse/test/navigation/NavigationServiceSpec.js b/platform/commonUI/browse/test/navigation/NavigationServiceSpec.js index 410a5f1562..12b849a314 100644 --- a/platform/commonUI/browse/test/navigation/NavigationServiceSpec.js +++ b/platform/commonUI/browse/test/navigation/NavigationServiceSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /** * MCTRepresentationSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../../src/navigation/NavigationService"], function (NavigationService) { - "use strict"; describe("The navigation service", function () { var navigationService; diff --git a/platform/commonUI/browse/test/windowing/FullscreenActionSpec.js b/platform/commonUI/browse/test/windowing/FullscreenActionSpec.js index 4ef3f50a7f..f0cf4eb382 100644 --- a/platform/commonUI/browse/test/windowing/FullscreenActionSpec.js +++ b/platform/commonUI/browse/test/windowing/FullscreenActionSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine,afterEach,window*/ /** * MCTRepresentationSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../../src/windowing/FullscreenAction"], function (FullscreenAction) { - "use strict"; describe("The fullscreen action", function () { var action, diff --git a/platform/commonUI/browse/test/windowing/NewTabActionSpec.js b/platform/commonUI/browse/test/windowing/NewTabActionSpec.js index 1371f96eda..47f02f6c41 100644 --- a/platform/commonUI/browse/test/windowing/NewTabActionSpec.js +++ b/platform/commonUI/browse/test/windowing/NewTabActionSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine,afterEach,window*/ define( ["../../src/windowing/NewTabAction"], function (NewTabAction) { - "use strict"; describe("The new tab action", function () { var actionSelected, diff --git a/platform/commonUI/browse/test/windowing/WindowTitlerSpec.js b/platform/commonUI/browse/test/windowing/WindowTitlerSpec.js index d9c71a86dd..f4a0bfb4bc 100644 --- a/platform/commonUI/browse/test/windowing/WindowTitlerSpec.js +++ b/platform/commonUI/browse/test/windowing/WindowTitlerSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /** * WindowTitlerSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../../src/windowing/WindowTitler"], function (WindowTitler) { - "use strict"; describe("The window titler", function () { var mockNavigationService, diff --git a/platform/commonUI/dialog/bundle.js b/platform/commonUI/dialog/bundle.js index 3d99408478..ef1384c3d4 100644 --- a/platform/commonUI/dialog/bundle.js +++ b/platform/commonUI/dialog/bundle.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([ "./src/DialogService", @@ -44,7 +43,6 @@ define([ overlayTemplate, legacyRegistry ) { - "use strict"; legacyRegistry.register("platform/commonUI/dialog", { "extensions": { diff --git a/platform/commonUI/dialog/src/DialogService.js b/platform/commonUI/dialog/src/DialogService.js index 0d480f3455..94b59e0156 100644 --- a/platform/commonUI/dialog/src/DialogService.js +++ b/platform/commonUI/dialog/src/DialogService.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ /** * This bundle implements the dialog service, which can be used to @@ -29,7 +28,6 @@ define( [], function () { - "use strict"; /** * The dialog service is responsible for handling window-modal * communication with the user, such as displaying forms for user diff --git a/platform/commonUI/dialog/src/OverlayService.js b/platform/commonUI/dialog/src/OverlayService.js index 5e9703cb42..084342603f 100644 --- a/platform/commonUI/dialog/src/OverlayService.js +++ b/platform/commonUI/dialog/src/OverlayService.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; // Template to inject into the DOM to show the dialog; really just points to // the a specific template that can be included via mct-include diff --git a/platform/commonUI/dialog/test/DialogServiceSpec.js b/platform/commonUI/dialog/test/DialogServiceSpec.js index 2dc109ac44..cfaf21fe76 100644 --- a/platform/commonUI/dialog/test/DialogServiceSpec.js +++ b/platform/commonUI/dialog/test/DialogServiceSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /** * MCTIncudeSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../src/DialogService"], function (DialogService) { - "use strict"; describe("The dialog service", function () { var mockOverlayService, diff --git a/platform/commonUI/dialog/test/OverlayServiceSpec.js b/platform/commonUI/dialog/test/OverlayServiceSpec.js index cdeffb9f24..42fec48efd 100644 --- a/platform/commonUI/dialog/test/OverlayServiceSpec.js +++ b/platform/commonUI/dialog/test/OverlayServiceSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ /** * MCTIncudeSpec. Created by vwoeltje on 11/6/14. @@ -27,7 +26,6 @@ define( ["../src/OverlayService"], function (OverlayService) { - "use strict"; describe("The overlay service", function () { var mockDocument, diff --git a/platform/commonUI/edit/bundle.js b/platform/commonUI/edit/bundle.js index 80a98a6927..3638f882c9 100644 --- a/platform/commonUI/edit/bundle.js +++ b/platform/commonUI/edit/bundle.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([ "./src/controllers/EditActionController", @@ -66,7 +65,6 @@ define([ topbarEditTemplate, legacyRegistry ) { - "use strict"; legacyRegistry.register("platform/commonUI/edit", { "extensions": { diff --git a/platform/commonUI/edit/src/actions/CancelAction.js b/platform/commonUI/edit/src/actions/CancelAction.js index 6b9cbf9c08..da3fea8046 100644 --- a/platform/commonUI/edit/src/actions/CancelAction.js +++ b/platform/commonUI/edit/src/actions/CancelAction.js @@ -19,11 +19,9 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( function () { - 'use strict'; /** * The "Cancel" action; the action triggered by clicking Cancel from diff --git a/platform/commonUI/edit/src/actions/EditAction.js b/platform/commonUI/edit/src/actions/EditAction.js index d771f75dd4..17fd34156c 100644 --- a/platform/commonUI/edit/src/actions/EditAction.js +++ b/platform/commonUI/edit/src/actions/EditAction.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining EditAction. Created by vwoeltje on 11/14/14. @@ -27,7 +26,6 @@ define( ['../objects/EditableDomainObject'], function (EditableDomainObject) { - "use strict"; // A no-op action to return in the event that the action cannot // be completed. diff --git a/platform/commonUI/edit/src/actions/LinkAction.js b/platform/commonUI/edit/src/actions/LinkAction.js index 95ed9a8082..f12539b1fe 100644 --- a/platform/commonUI/edit/src/actions/LinkAction.js +++ b/platform/commonUI/edit/src/actions/LinkAction.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** diff --git a/platform/commonUI/edit/src/actions/PropertiesAction.js b/platform/commonUI/edit/src/actions/PropertiesAction.js index 1134c23190..7ec48122ca 100644 --- a/platform/commonUI/edit/src/actions/PropertiesAction.js +++ b/platform/commonUI/edit/src/actions/PropertiesAction.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ /** * Edit the properties of a domain object. Shows a dialog @@ -29,7 +28,6 @@ define( ['./PropertiesDialog'], function (PropertiesDialog) { - 'use strict'; /** * Implements the "Edit Properties" action, which prompts the user diff --git a/platform/commonUI/edit/src/actions/PropertiesDialog.js b/platform/commonUI/edit/src/actions/PropertiesDialog.js index f461c0b8e1..0508724ac1 100644 --- a/platform/commonUI/edit/src/actions/PropertiesDialog.js +++ b/platform/commonUI/edit/src/actions/PropertiesDialog.js @@ -19,11 +19,9 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( function () { - 'use strict'; /** * Construct a new Properties dialog. diff --git a/platform/commonUI/edit/src/actions/RemoveAction.js b/platform/commonUI/edit/src/actions/RemoveAction.js index dd95616289..3174330d03 100644 --- a/platform/commonUI/edit/src/actions/RemoveAction.js +++ b/platform/commonUI/edit/src/actions/RemoveAction.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ /** * Module defining RemoveAction. Created by vwoeltje on 11/17/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; /** * Construct an action which will remove the provided object manifestation. diff --git a/platform/commonUI/edit/src/actions/SaveAction.js b/platform/commonUI/edit/src/actions/SaveAction.js index 1415a6ed4b..55755e12cb 100644 --- a/platform/commonUI/edit/src/actions/SaveAction.js +++ b/platform/commonUI/edit/src/actions/SaveAction.js @@ -19,14 +19,12 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ /*jslint es5: true */ define( ['../../../browse/src/creation/CreateWizard'], function (CreateWizard) { - 'use strict'; /** * The "Save" action; the action triggered by clicking Save from diff --git a/platform/commonUI/edit/src/capabilities/EditableActionCapability.js b/platform/commonUI/edit/src/capabilities/EditableActionCapability.js index b5bad72dc0..2e83dee0a0 100644 --- a/platform/commonUI/edit/src/capabilities/EditableActionCapability.js +++ b/platform/commonUI/edit/src/capabilities/EditableActionCapability.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( function () { - 'use strict'; var DISALLOWED_ACTIONS = ["move", "copy", "link", "window", "follow"]; /** * Editable Action Capability. Overrides the action capability diff --git a/platform/commonUI/edit/src/capabilities/EditableCompositionCapability.js b/platform/commonUI/edit/src/capabilities/EditableCompositionCapability.js index 17dff58c0d..343c6a03a2 100644 --- a/platform/commonUI/edit/src/capabilities/EditableCompositionCapability.js +++ b/platform/commonUI/edit/src/capabilities/EditableCompositionCapability.js @@ -19,13 +19,11 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( ['./EditableLookupCapability'], function (EditableLookupCapability) { - 'use strict'; /** * Wrapper for the "composition" capability; diff --git a/platform/commonUI/edit/src/capabilities/EditableContextCapability.js b/platform/commonUI/edit/src/capabilities/EditableContextCapability.js index d0df90afc4..d20971fb04 100644 --- a/platform/commonUI/edit/src/capabilities/EditableContextCapability.js +++ b/platform/commonUI/edit/src/capabilities/EditableContextCapability.js @@ -19,13 +19,11 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( ['./EditableLookupCapability'], function (EditableLookupCapability) { - 'use strict'; /** * Wrapper for the "context" capability; diff --git a/platform/commonUI/edit/src/capabilities/EditableInstantiationCapability.js b/platform/commonUI/edit/src/capabilities/EditableInstantiationCapability.js index 6a0392476b..4376a9310e 100644 --- a/platform/commonUI/edit/src/capabilities/EditableInstantiationCapability.js +++ b/platform/commonUI/edit/src/capabilities/EditableInstantiationCapability.js @@ -19,13 +19,11 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( ['./EditableLookupCapability'], function (EditableLookupCapability) { - 'use strict'; /** * Wrapper for the "instantiation" capability; diff --git a/platform/commonUI/edit/src/capabilities/EditableLookupCapability.js b/platform/commonUI/edit/src/capabilities/EditableLookupCapability.js index dae2df3d83..a0c8add0c3 100644 --- a/platform/commonUI/edit/src/capabilities/EditableLookupCapability.js +++ b/platform/commonUI/edit/src/capabilities/EditableLookupCapability.js @@ -19,13 +19,11 @@ * 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'; /** * Wrapper for both "context" and "composition" capabilities; diff --git a/platform/commonUI/edit/src/capabilities/EditablePersistenceCapability.js b/platform/commonUI/edit/src/capabilities/EditablePersistenceCapability.js index 92d29f66ad..e6c32e2bf4 100644 --- a/platform/commonUI/edit/src/capabilities/EditablePersistenceCapability.js +++ b/platform/commonUI/edit/src/capabilities/EditablePersistenceCapability.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( function () { - 'use strict'; /** * Editable Persistence Capability. Overrides the persistence capability diff --git a/platform/commonUI/edit/src/capabilities/EditableRelationshipCapability.js b/platform/commonUI/edit/src/capabilities/EditableRelationshipCapability.js index 3034301502..af8c142338 100644 --- a/platform/commonUI/edit/src/capabilities/EditableRelationshipCapability.js +++ b/platform/commonUI/edit/src/capabilities/EditableRelationshipCapability.js @@ -19,13 +19,11 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( ['./EditableLookupCapability'], function (EditableLookupCapability) { - 'use strict'; /** * Wrapper for the "relationship" capability; diff --git a/platform/commonUI/edit/src/capabilities/EditorCapability.js b/platform/commonUI/edit/src/capabilities/EditorCapability.js index b48c1988e6..ff9dfc19ed 100644 --- a/platform/commonUI/edit/src/capabilities/EditorCapability.js +++ b/platform/commonUI/edit/src/capabilities/EditorCapability.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - 'use strict'; /** diff --git a/platform/commonUI/edit/src/controllers/EditActionController.js b/platform/commonUI/edit/src/controllers/EditActionController.js index 4ea38f9bb5..85a0550182 100644 --- a/platform/commonUI/edit/src/controllers/EditActionController.js +++ b/platform/commonUI/edit/src/controllers/EditActionController.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining EditActionController. Created by vwoeltje on 11/17/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; var ACTION_CONTEXT = { category: 'conclude-editing' }; diff --git a/platform/commonUI/edit/src/controllers/EditObjectController.js b/platform/commonUI/edit/src/controllers/EditObjectController.js index d6121106ec..2b41f344b5 100644 --- a/platform/commonUI/edit/src/controllers/EditObjectController.js +++ b/platform/commonUI/edit/src/controllers/EditObjectController.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * This bundle implements Edit mode. @@ -28,7 +27,6 @@ define( [], function () { - "use strict"; /** * Controller which is responsible for populating the scope for diff --git a/platform/commonUI/edit/src/controllers/EditPanesController.js b/platform/commonUI/edit/src/controllers/EditPanesController.js index 7dedc251ec..83562c6ffc 100644 --- a/platform/commonUI/edit/src/controllers/EditPanesController.js +++ b/platform/commonUI/edit/src/controllers/EditPanesController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * Supports the Library and Elements panes in Edit mode. diff --git a/platform/commonUI/edit/src/controllers/ElementsController.js b/platform/commonUI/edit/src/controllers/ElementsController.js index c62e999fa2..531828544a 100644 --- a/platform/commonUI/edit/src/controllers/ElementsController.js +++ b/platform/commonUI/edit/src/controllers/ElementsController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ define( [], function () { - "use strict"; /** * The ElementsController prepares the elements view for display diff --git a/platform/commonUI/edit/src/directives/MCTBeforeUnload.js b/platform/commonUI/edit/src/directives/MCTBeforeUnload.js index 3e7501c788..a5dfc852ed 100644 --- a/platform/commonUI/edit/src/directives/MCTBeforeUnload.js +++ b/platform/commonUI/edit/src/directives/MCTBeforeUnload.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * Defines the `mct-before-unload` directive. The expression bound diff --git a/platform/commonUI/edit/src/objects/EditableDomainObject.js b/platform/commonUI/edit/src/objects/EditableDomainObject.js index 253947181d..1eedcd563b 100644 --- a/platform/commonUI/edit/src/objects/EditableDomainObject.js +++ b/platform/commonUI/edit/src/objects/EditableDomainObject.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ /** * Defines EditableDomainObject, which wraps domain objects @@ -51,7 +50,6 @@ define( EditableActionCapability, EditableDomainObjectCache ) { - "use strict"; var capabilityFactories = { persistence: EditablePersistenceCapability, diff --git a/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js b/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js index 32a11604de..bd557f882c 100644 --- a/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js +++ b/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ /* @@ -36,7 +35,6 @@ define( ["./EditableModelCache"], function (EditableModelCache) { - 'use strict'; /** * Construct a new cache for editable domain objects. This can be used diff --git a/platform/commonUI/edit/src/objects/EditableModelCache.js b/platform/commonUI/edit/src/objects/EditableModelCache.js index 30ca3d774a..702cfbe6c7 100644 --- a/platform/commonUI/edit/src/objects/EditableModelCache.js +++ b/platform/commonUI/edit/src/objects/EditableModelCache.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * An editable model cache stores domain object models that have been diff --git a/platform/commonUI/edit/src/policies/EditActionPolicy.js b/platform/commonUI/edit/src/policies/EditActionPolicy.js index 7f623ce07b..a3a43fa81e 100644 --- a/platform/commonUI/edit/src/policies/EditActionPolicy.js +++ b/platform/commonUI/edit/src/policies/EditActionPolicy.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * Policy controlling when the `edit` and/or `properties` actions diff --git a/platform/commonUI/edit/src/policies/EditNavigationPolicy.js b/platform/commonUI/edit/src/policies/EditNavigationPolicy.js index 882e64935e..6797ac4eb1 100644 --- a/platform/commonUI/edit/src/policies/EditNavigationPolicy.js +++ b/platform/commonUI/edit/src/policies/EditNavigationPolicy.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * Policy controlling whether navigation events should proceed diff --git a/platform/commonUI/edit/src/policies/EditableViewPolicy.js b/platform/commonUI/edit/src/policies/EditableViewPolicy.js index 17194064b0..7c9742e2d3 100644 --- a/platform/commonUI/edit/src/policies/EditableViewPolicy.js +++ b/platform/commonUI/edit/src/policies/EditableViewPolicy.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * Policy controlling which views should be visible in Edit mode. diff --git a/platform/commonUI/edit/src/representers/EditRepresenter.js b/platform/commonUI/edit/src/representers/EditRepresenter.js index 533c8031e0..386285b38f 100644 --- a/platform/commonUI/edit/src/representers/EditRepresenter.js +++ b/platform/commonUI/edit/src/representers/EditRepresenter.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * The EditRepresenter is responsible for implementing diff --git a/platform/commonUI/edit/src/representers/EditToolbar.js b/platform/commonUI/edit/src/representers/EditToolbar.js index 367eaf1705..aabea1cf4a 100644 --- a/platform/commonUI/edit/src/representers/EditToolbar.js +++ b/platform/commonUI/edit/src/representers/EditToolbar.js @@ -19,11 +19,9 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; // Utility functions for reducing truth arrays function and(a, b) { return a && b; } diff --git a/platform/commonUI/edit/src/representers/EditToolbarRepresenter.js b/platform/commonUI/edit/src/representers/EditToolbarRepresenter.js index daf3645b69..0e30920575 100644 --- a/platform/commonUI/edit/src/representers/EditToolbarRepresenter.js +++ b/platform/commonUI/edit/src/representers/EditToolbarRepresenter.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( ['./EditToolbar', './EditToolbarSelection'], function (EditToolbar, EditToolbarSelection) { - "use strict"; // No operation var NOOP_REPRESENTER = { diff --git a/platform/commonUI/edit/src/representers/EditToolbarSelection.js b/platform/commonUI/edit/src/representers/EditToolbarSelection.js index 318ae935b5..f6cdedeadd 100644 --- a/platform/commonUI/edit/src/representers/EditToolbarSelection.js +++ b/platform/commonUI/edit/src/representers/EditToolbarSelection.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * Tracks selection state for editable views. Selection is diff --git a/platform/commonUI/edit/test/actions/CancelActionSpec.js b/platform/commonUI/edit/test/actions/CancelActionSpec.js index 4a06ad9649..2131bbf999 100644 --- a/platform/commonUI/edit/test/actions/CancelActionSpec.js +++ b/platform/commonUI/edit/test/actions/CancelActionSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine,xit,xdescribe*/ define( ["../../src/actions/CancelAction"], function (CancelAction) { - "use strict"; //TODO: Disabled for NEM Beta xdescribe("The Cancel action", function () { diff --git a/platform/commonUI/edit/test/actions/EditActionSpec.js b/platform/commonUI/edit/test/actions/EditActionSpec.js index 4858d9cf0a..7ed8b672bd 100644 --- a/platform/commonUI/edit/test/actions/EditActionSpec.js +++ b/platform/commonUI/edit/test/actions/EditActionSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine,xit,xdescribe*/ define( ["../../src/actions/EditAction"], function (EditAction) { - "use strict"; describe("The Edit action", function () { var mockLocation, diff --git a/platform/commonUI/edit/test/actions/LinkActionSpec.js b/platform/commonUI/edit/test/actions/LinkActionSpec.js index 96ea30e2b3..144dd4e395 100644 --- a/platform/commonUI/edit/test/actions/LinkActionSpec.js +++ b/platform/commonUI/edit/test/actions/LinkActionSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine,spyOn*/ define( ["../../src/actions/LinkAction"], function (LinkAction) { - "use strict"; describe("The Link action", function () { var mockQ, diff --git a/platform/commonUI/edit/test/actions/PropertiesActionSpec.js b/platform/commonUI/edit/test/actions/PropertiesActionSpec.js index 1621a34ab6..cad091cff5 100644 --- a/platform/commonUI/edit/test/actions/PropertiesActionSpec.js +++ b/platform/commonUI/edit/test/actions/PropertiesActionSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,xit,expect,beforeEach,jasmine*/ define( ['../../src/actions/PropertiesAction'], function (PropertiesAction) { - "use strict"; describe("Properties action", function () { var capabilities, model, object, context, input, dialogService, action; diff --git a/platform/commonUI/edit/test/actions/PropertiesDialogSpec.js b/platform/commonUI/edit/test/actions/PropertiesDialogSpec.js index a9077e8ec6..764d8483c9 100644 --- a/platform/commonUI/edit/test/actions/PropertiesDialogSpec.js +++ b/platform/commonUI/edit/test/actions/PropertiesDialogSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,xit,expect,beforeEach*/ define( ["../../src/actions/PropertiesDialog"], function (PropertiesDialog) { - "use strict"; describe("Properties dialog", function () { diff --git a/platform/commonUI/edit/test/actions/RemoveActionSpec.js b/platform/commonUI/edit/test/actions/RemoveActionSpec.js index 116627c87d..f9f36e36a8 100644 --- a/platform/commonUI/edit/test/actions/RemoveActionSpec.js +++ b/platform/commonUI/edit/test/actions/RemoveActionSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine,spyOn*/ define( ["../../src/actions/RemoveAction"], function (RemoveAction) { - "use strict"; describe("The Remove action", function () { var mockQ, diff --git a/platform/commonUI/edit/test/actions/SaveActionSpec.js b/platform/commonUI/edit/test/actions/SaveActionSpec.js index 656d6e1ebc..77b27fa429 100644 --- a/platform/commonUI/edit/test/actions/SaveActionSpec.js +++ b/platform/commonUI/edit/test/actions/SaveActionSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine,xit,xdescribe*/ define( ["../../src/actions/SaveAction"], function (SaveAction) { - "use strict"; describe("The Save action", function () { var mockLocation, diff --git a/platform/commonUI/edit/test/capabilities/EditableCompositionCapabilitySpec.js b/platform/commonUI/edit/test/capabilities/EditableCompositionCapabilitySpec.js index eed6222202..3e4083d2e8 100644 --- a/platform/commonUI/edit/test/capabilities/EditableCompositionCapabilitySpec.js +++ b/platform/commonUI/edit/test/capabilities/EditableCompositionCapabilitySpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/capabilities/EditableCompositionCapability"], function (EditableCompositionCapability) { - "use strict"; describe("An editable composition capability", function () { var mockContext, diff --git a/platform/commonUI/edit/test/capabilities/EditableContextCapabilitySpec.js b/platform/commonUI/edit/test/capabilities/EditableContextCapabilitySpec.js index 9967ffa076..b18a02e881 100644 --- a/platform/commonUI/edit/test/capabilities/EditableContextCapabilitySpec.js +++ b/platform/commonUI/edit/test/capabilities/EditableContextCapabilitySpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/capabilities/EditableContextCapability"], function (EditableContextCapability) { - "use strict"; describe("An editable context capability", function () { var mockContext, diff --git a/platform/commonUI/edit/test/capabilities/EditableLookupCapabilitySpec.js b/platform/commonUI/edit/test/capabilities/EditableLookupCapabilitySpec.js index 16bcee88b1..dc178da449 100644 --- a/platform/commonUI/edit/test/capabilities/EditableLookupCapabilitySpec.js +++ b/platform/commonUI/edit/test/capabilities/EditableLookupCapabilitySpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/capabilities/EditableLookupCapability"], function (EditableLookupCapability) { - "use strict"; describe("An editable lookup capability", function () { var mockContext, diff --git a/platform/commonUI/edit/test/capabilities/EditablePersistenceCapabilitySpec.js b/platform/commonUI/edit/test/capabilities/EditablePersistenceCapabilitySpec.js index 7fa0ac0dd7..4ce4a2f75d 100644 --- a/platform/commonUI/edit/test/capabilities/EditablePersistenceCapabilitySpec.js +++ b/platform/commonUI/edit/test/capabilities/EditablePersistenceCapabilitySpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/capabilities/EditablePersistenceCapability"], function (EditablePersistenceCapability) { - "use strict"; describe("An editable persistence capability", function () { var mockPersistence, diff --git a/platform/commonUI/edit/test/capabilities/EditableRelationshipCapabilitySpec.js b/platform/commonUI/edit/test/capabilities/EditableRelationshipCapabilitySpec.js index 366818e861..9a6c17d944 100644 --- a/platform/commonUI/edit/test/capabilities/EditableRelationshipCapabilitySpec.js +++ b/platform/commonUI/edit/test/capabilities/EditableRelationshipCapabilitySpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/capabilities/EditableRelationshipCapability"], function (EditableRelationshipCapability) { - "use strict"; describe("An editable relationship capability", function () { var mockContext, diff --git a/platform/commonUI/edit/test/capabilities/EditorCapabilitySpec.js b/platform/commonUI/edit/test/capabilities/EditorCapabilitySpec.js index 4e16a01170..d18cdcd931 100644 --- a/platform/commonUI/edit/test/capabilities/EditorCapabilitySpec.js +++ b/platform/commonUI/edit/test/capabilities/EditorCapabilitySpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,waitsFor,runs,jasmine,xit,xdescribe*/ define( ["../../src/capabilities/EditorCapability"], function (EditorCapability) { - "use strict"; describe("The editor capability", function () { var mockPersistence, diff --git a/platform/commonUI/edit/test/controllers/EditActionControllerSpec.js b/platform/commonUI/edit/test/controllers/EditActionControllerSpec.js index 0ac30d6ef5..6478837ce6 100644 --- a/platform/commonUI/edit/test/controllers/EditActionControllerSpec.js +++ b/platform/commonUI/edit/test/controllers/EditActionControllerSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/controllers/EditActionController"], function (EditActionController) { - "use strict"; describe("The Edit Action controller", function () { var mockScope, diff --git a/platform/commonUI/edit/test/controllers/EditControllerSpec.js b/platform/commonUI/edit/test/controllers/EditControllerSpec.js index 0ed0ddecc7..a359d6945b 100644 --- a/platform/commonUI/edit/test/controllers/EditControllerSpec.js +++ b/platform/commonUI/edit/test/controllers/EditControllerSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/controllers/EditObjectController"], function (EditObjectController) { - "use strict"; describe("The Edit mode controller", function () { var mockScope, diff --git a/platform/commonUI/edit/test/controllers/EditPanesControllerSpec.js b/platform/commonUI/edit/test/controllers/EditPanesControllerSpec.js index fd1d56e67c..d0d6aea413 100644 --- a/platform/commonUI/edit/test/controllers/EditPanesControllerSpec.js +++ b/platform/commonUI/edit/test/controllers/EditPanesControllerSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/controllers/EditPanesController"], function (EditPanesController) { - "use strict"; describe("The Edit Panes controller", function () { var mockScope, diff --git a/platform/commonUI/edit/test/directives/MCTBeforeUnloadSpec.js b/platform/commonUI/edit/test/directives/MCTBeforeUnloadSpec.js index 41070d76f5..f025cef20d 100644 --- a/platform/commonUI/edit/test/directives/MCTBeforeUnloadSpec.js +++ b/platform/commonUI/edit/test/directives/MCTBeforeUnloadSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/directives/MCTBeforeUnload"], function (MCTBeforeUnload) { - "use strict"; describe("The mct-before-unload directive", function () { var mockWindow, diff --git a/platform/commonUI/edit/test/objects/EditableDomainObjectCacheSpec.js b/platform/commonUI/edit/test/objects/EditableDomainObjectCacheSpec.js index 4eea727e26..127bf6e3e4 100644 --- a/platform/commonUI/edit/test/objects/EditableDomainObjectCacheSpec.js +++ b/platform/commonUI/edit/test/objects/EditableDomainObjectCacheSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/objects/EditableDomainObjectCache"], function (EditableDomainObjectCache) { - 'use strict'; describe("Editable domain object cache", function () { diff --git a/platform/commonUI/edit/test/objects/EditableDomainObjectSpec.js b/platform/commonUI/edit/test/objects/EditableDomainObjectSpec.js index f0f241be96..3878575237 100644 --- a/platform/commonUI/edit/test/objects/EditableDomainObjectSpec.js +++ b/platform/commonUI/edit/test/objects/EditableDomainObjectSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/objects/EditableDomainObject"], function (EditableDomainObject) { - "use strict"; describe("Editable domain object", function () { diff --git a/platform/commonUI/edit/test/objects/EditableModelCacheSpec.js b/platform/commonUI/edit/test/objects/EditableModelCacheSpec.js index a12432164d..1fe8db0262 100644 --- a/platform/commonUI/edit/test/objects/EditableModelCacheSpec.js +++ b/platform/commonUI/edit/test/objects/EditableModelCacheSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/objects/EditableModelCache"], function (EditableModelCache) { - "use strict"; describe("The editable model cache", function () { var mockObject, diff --git a/platform/commonUI/edit/test/policies/EditActionPolicySpec.js b/platform/commonUI/edit/test/policies/EditActionPolicySpec.js index 823c3d2737..b82d5458d0 100644 --- a/platform/commonUI/edit/test/policies/EditActionPolicySpec.js +++ b/platform/commonUI/edit/test/policies/EditActionPolicySpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine,xit,xdescribe*/ define( ["../../src/policies/EditActionPolicy"], function (EditActionPolicy) { - "use strict"; describe("The Edit action policy", function () { var editableView, diff --git a/platform/commonUI/edit/test/policies/EditableViewPolicySpec.js b/platform/commonUI/edit/test/policies/EditableViewPolicySpec.js index a4a4c41a6f..6f432fafeb 100644 --- a/platform/commonUI/edit/test/policies/EditableViewPolicySpec.js +++ b/platform/commonUI/edit/test/policies/EditableViewPolicySpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/policies/EditableViewPolicy"], function (EditableViewPolicy) { - "use strict"; describe("The editable view policy", function () { var testView, diff --git a/platform/commonUI/edit/test/representers/EditRepresenterSpec.js b/platform/commonUI/edit/test/representers/EditRepresenterSpec.js index 3dcaa34627..b4c2f4ce7f 100644 --- a/platform/commonUI/edit/test/representers/EditRepresenterSpec.js +++ b/platform/commonUI/edit/test/representers/EditRepresenterSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/representers/EditRepresenter"], function (EditRepresenter) { - "use strict"; describe("The Edit mode representer", function () { var mockQ, diff --git a/platform/commonUI/edit/test/representers/EditToolbarRepresenterSpec.js b/platform/commonUI/edit/test/representers/EditToolbarRepresenterSpec.js index c8b5bb2c91..cc566c71f3 100644 --- a/platform/commonUI/edit/test/representers/EditToolbarRepresenterSpec.js +++ b/platform/commonUI/edit/test/representers/EditToolbarRepresenterSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ["../../src/representers/EditToolbarRepresenter"], function (EditToolbarRepresenter) { - "use strict"; describe("The Edit mode toolbar representer", function () { var mockScope, diff --git a/platform/commonUI/edit/test/representers/EditToolbarSelectionSpec.js b/platform/commonUI/edit/test/representers/EditToolbarSelectionSpec.js index 45cbe92136..fa762631f7 100644 --- a/platform/commonUI/edit/test/representers/EditToolbarSelectionSpec.js +++ b/platform/commonUI/edit/test/representers/EditToolbarSelectionSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine,xit*/ define( ['../../src/representers/EditToolbarSelection'], function (EditToolbarSelection) { - "use strict"; describe("The Edit mode selection manager", function () { var testProxy, diff --git a/platform/commonUI/edit/test/representers/EditToolbarSpec.js b/platform/commonUI/edit/test/representers/EditToolbarSpec.js index fb58015654..9a5488d356 100644 --- a/platform/commonUI/edit/test/representers/EditToolbarSpec.js +++ b/platform/commonUI/edit/test/representers/EditToolbarSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,jasmine*/ define( ['../../src/representers/EditToolbar'], function (EditToolbar) { - "use strict"; describe("An Edit mode toolbar", function () { var mockCommit, diff --git a/platform/commonUI/formats/bundle.js b/platform/commonUI/formats/bundle.js index d323d3d47a..99c384f47f 100644 --- a/platform/commonUI/formats/bundle.js +++ b/platform/commonUI/formats/bundle.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([ "./src/FormatProvider", @@ -30,7 +29,6 @@ define([ UTCTimeFormat, legacyRegistry ) { - "use strict"; legacyRegistry.register("platform/commonUI/formats", { "name": "Time services bundle", diff --git a/platform/commonUI/formats/src/FormatProvider.js b/platform/commonUI/formats/src/FormatProvider.js index e6d38fbcee..4df4a82d3d 100644 --- a/platform/commonUI/formats/src/FormatProvider.js +++ b/platform/commonUI/formats/src/FormatProvider.js @@ -19,14 +19,12 @@ * 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 object used to convert between numeric values and text values, diff --git a/platform/commonUI/formats/src/UTCTimeFormat.js b/platform/commonUI/formats/src/UTCTimeFormat.js index b035fed99f..913ffe3200 100644 --- a/platform/commonUI/formats/src/UTCTimeFormat.js +++ b/platform/commonUI/formats/src/UTCTimeFormat.js @@ -19,14 +19,12 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([ 'moment' ], function ( moment ) { - "use strict"; var DATE_FORMAT = "YYYY-MM-DD HH:mm:ss", DATE_FORMATS = [ diff --git a/platform/commonUI/formats/test/FormatProviderSpec.js b/platform/commonUI/formats/test/FormatProviderSpec.js index 4f68c106f7..d66f9f8a5d 100644 --- a/platform/commonUI/formats/test/FormatProviderSpec.js +++ b/platform/commonUI/formats/test/FormatProviderSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ define( ['../src/FormatProvider'], function (FormatProvider) { - 'use strict'; var KEYS = [ 'a', 'b', 'c' ]; diff --git a/platform/commonUI/formats/test/UTCTimeFormatSpec.js b/platform/commonUI/formats/test/UTCTimeFormatSpec.js index d55a8a9507..cd6917b06c 100644 --- a/platform/commonUI/formats/test/UTCTimeFormatSpec.js +++ b/platform/commonUI/formats/test/UTCTimeFormatSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ define( ['../src/UTCTimeFormat', 'moment'], function (UTCTimeFormat, moment) { - 'use strict'; describe("The UTCTimeFormat", function () { var format; diff --git a/platform/commonUI/general/bundle.js b/platform/commonUI/general/bundle.js index f3d6d98f61..c03fe4cf09 100644 --- a/platform/commonUI/general/bundle.js +++ b/platform/commonUI/general/bundle.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([ "./src/services/UrlService", @@ -118,7 +117,6 @@ define([ datetimeFieldTemplate, legacyRegistry ) { - "use strict"; legacyRegistry.register("platform/commonUI/general", { "name": "General UI elements", diff --git a/platform/commonUI/general/src/SplashScreenManager.js b/platform/commonUI/general/src/SplashScreenManager.js index 97b866ec45..b0e1d30672 100644 --- a/platform/commonUI/general/src/SplashScreenManager.js +++ b/platform/commonUI/general/src/SplashScreenManager.js @@ -20,14 +20,12 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([ ], function ( ) { - 'use strict'; function SplashScreenManager($document) { var splash; diff --git a/platform/commonUI/general/src/StyleSheetLoader.js b/platform/commonUI/general/src/StyleSheetLoader.js index 9b64303df1..76f2a4a803 100644 --- a/platform/commonUI/general/src/StyleSheetLoader.js +++ b/platform/commonUI/general/src/StyleSheetLoader.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ /** * This bundle provides various general-purpose UI elements, including @@ -29,7 +28,6 @@ define( [], function () { - "use strict"; /** * The StyleSheetLoader adds links to style sheets exposed from diff --git a/platform/commonUI/general/src/UnsupportedBrowserWarning.js b/platform/commonUI/general/src/UnsupportedBrowserWarning.js index f2fa0c3f20..5e37568cfd 100644 --- a/platform/commonUI/general/src/UnsupportedBrowserWarning.js +++ b/platform/commonUI/general/src/UnsupportedBrowserWarning.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ /** * This bundle provides various general-purpose UI elements, including @@ -29,7 +28,6 @@ define( [], function () { - "use strict"; var WARNING_TITLE = "Unsupported browser", WARNING_DESCRIPTION = [ diff --git a/platform/commonUI/general/src/controllers/ActionGroupController.js b/platform/commonUI/general/src/controllers/ActionGroupController.js index 0992b5e967..f9704f9c81 100644 --- a/platform/commonUI/general/src/controllers/ActionGroupController.js +++ b/platform/commonUI/general/src/controllers/ActionGroupController.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining ActionGroupController. Created by vwoeltje on 11/14/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; /** * Controller which keeps an up-to-date list of actions of diff --git a/platform/commonUI/general/src/controllers/BannerController.js b/platform/commonUI/general/src/controllers/BannerController.js index cea7af4fbd..b3f7e23131 100644 --- a/platform/commonUI/general/src/controllers/BannerController.js +++ b/platform/commonUI/general/src/controllers/BannerController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * A controller for banner notifications. Banner notifications are a diff --git a/platform/commonUI/general/src/controllers/BottomBarController.js b/platform/commonUI/general/src/controllers/BottomBarController.js index d53d76fce6..a536da1881 100644 --- a/platform/commonUI/general/src/controllers/BottomBarController.js +++ b/platform/commonUI/general/src/controllers/BottomBarController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * Controller for the bottombar template. Exposes diff --git a/platform/commonUI/general/src/controllers/ClickAwayController.js b/platform/commonUI/general/src/controllers/ClickAwayController.js index 9c7c6f8091..d8843d5631 100644 --- a/platform/commonUI/general/src/controllers/ClickAwayController.js +++ b/platform/commonUI/general/src/controllers/ClickAwayController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ define( [], function () { - "use strict"; /** * A ClickAwayController is used to toggle things (such as context diff --git a/platform/commonUI/general/src/controllers/ContextMenuController.js b/platform/commonUI/general/src/controllers/ContextMenuController.js index dece522682..0f81d785bc 100644 --- a/platform/commonUI/general/src/controllers/ContextMenuController.js +++ b/platform/commonUI/general/src/controllers/ContextMenuController.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining ContextMenuController. Created by vwoeltje on 11/17/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; /** * Controller for the context menu. Maintains an up-to-date diff --git a/platform/commonUI/general/src/controllers/DateTimeFieldController.js b/platform/commonUI/general/src/controllers/DateTimeFieldController.js index ef0827e515..555cb62209 100644 --- a/platform/commonUI/general/src/controllers/DateTimeFieldController.js +++ b/platform/commonUI/general/src/controllers/DateTimeFieldController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ define( [], function () { - 'use strict'; /** * Controller to support the date-time entry field. diff --git a/platform/commonUI/general/src/controllers/DateTimePickerController.js b/platform/commonUI/general/src/controllers/DateTimePickerController.js index ac07d77553..81708d353e 100644 --- a/platform/commonUI/general/src/controllers/DateTimePickerController.js +++ b/platform/commonUI/general/src/controllers/DateTimePickerController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ define( [ 'moment' ], function (moment) { - 'use strict'; var TIME_NAMES = { 'hours': "Hour", diff --git a/platform/commonUI/general/src/controllers/GetterSetterController.js b/platform/commonUI/general/src/controllers/GetterSetterController.js index 3d61c00116..90a5474cd3 100644 --- a/platform/commonUI/general/src/controllers/GetterSetterController.js +++ b/platform/commonUI/general/src/controllers/GetterSetterController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * This controller acts as an adapter to permit getter-setter diff --git a/platform/commonUI/general/src/controllers/ObjectInspectorController.js b/platform/commonUI/general/src/controllers/ObjectInspectorController.js index 5b04304af0..abdc27c154 100644 --- a/platform/commonUI/general/src/controllers/ObjectInspectorController.js +++ b/platform/commonUI/general/src/controllers/ObjectInspectorController.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining ObjectInspectorController. Created by shale on 08/21/2015. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; /** * The ObjectInspectorController gets and formats the data for diff --git a/platform/commonUI/general/src/controllers/SelectorController.js b/platform/commonUI/general/src/controllers/SelectorController.js index 26fe5f4d62..55a79af308 100644 --- a/platform/commonUI/general/src/controllers/SelectorController.js +++ b/platform/commonUI/general/src/controllers/SelectorController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; var ROOT_ID = "ROOT"; diff --git a/platform/commonUI/general/src/controllers/TimeRangeController.js b/platform/commonUI/general/src/controllers/TimeRangeController.js index f0e3da46d9..3f1b625d29 100644 --- a/platform/commonUI/general/src/controllers/TimeRangeController.js +++ b/platform/commonUI/general/src/controllers/TimeRangeController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ define( ['moment'], function (moment) { - "use strict"; var TICK_SPACING_PX = 150; diff --git a/platform/commonUI/general/src/controllers/ToggleController.js b/platform/commonUI/general/src/controllers/ToggleController.js index 9d7d493f15..8d5840f05a 100644 --- a/platform/commonUI/general/src/controllers/ToggleController.js +++ b/platform/commonUI/general/src/controllers/ToggleController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ define( [], function () { - "use strict"; /** * A ToggleController is used to activate/deactivate things. diff --git a/platform/commonUI/general/src/controllers/TreeNodeController.js b/platform/commonUI/general/src/controllers/TreeNodeController.js index 3efcf82d28..228069a8e9 100644 --- a/platform/commonUI/general/src/controllers/TreeNodeController.js +++ b/platform/commonUI/general/src/controllers/TreeNodeController.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining TreeNodeController. Created by vwoeltje on 11/10/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; /** * The TreeNodeController supports the tree node representation; diff --git a/platform/commonUI/general/src/controllers/ViewSwitcherController.js b/platform/commonUI/general/src/controllers/ViewSwitcherController.js index a3ab2e7bc4..2dee615011 100644 --- a/platform/commonUI/general/src/controllers/ViewSwitcherController.js +++ b/platform/commonUI/general/src/controllers/ViewSwitcherController.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining ViewSwitcherController. Created by vwoeltje on 11/7/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; /** * Controller for the view switcher; populates and maintains a list diff --git a/platform/commonUI/general/src/directives/MCTClickElsewhere.js b/platform/commonUI/general/src/directives/MCTClickElsewhere.js index 1bcdbbe6b5..0ffff19713 100644 --- a/platform/commonUI/general/src/directives/MCTClickElsewhere.js +++ b/platform/commonUI/general/src/directives/MCTClickElsewhere.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * The `mct-click-elsewhere` directive will evaluate its diff --git a/platform/commonUI/general/src/directives/MCTContainer.js b/platform/commonUI/general/src/directives/MCTContainer.js index e35c52f9f6..0c58f6a914 100644 --- a/platform/commonUI/general/src/directives/MCTContainer.js +++ b/platform/commonUI/general/src/directives/MCTContainer.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining MCTContainer. Created by vwoeltje on 11/17/14. @@ -27,7 +26,6 @@ define( [], function () { - "use strict"; /** * The mct-container is similar to the mct-include directive diff --git a/platform/commonUI/general/src/directives/MCTDrag.js b/platform/commonUI/general/src/directives/MCTDrag.js index 7bccccdf28..ac96357da8 100644 --- a/platform/commonUI/general/src/directives/MCTDrag.js +++ b/platform/commonUI/general/src/directives/MCTDrag.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; /** * The mct-drag directive allows drag functionality diff --git a/platform/commonUI/general/src/directives/MCTPopup.js b/platform/commonUI/general/src/directives/MCTPopup.js index 254a41d1eb..e96c1c0327 100644 --- a/platform/commonUI/general/src/directives/MCTPopup.js +++ b/platform/commonUI/general/src/directives/MCTPopup.js @@ -19,11 +19,9 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( function () { - 'use strict'; var TEMPLATE = "
"; diff --git a/platform/commonUI/general/src/directives/MCTResize.js b/platform/commonUI/general/src/directives/MCTResize.js index f0fd8e0a69..5cf6971c39 100644 --- a/platform/commonUI/general/src/directives/MCTResize.js +++ b/platform/commonUI/general/src/directives/MCTResize.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - "use strict"; // Default resize interval var DEFAULT_INTERVAL = 100; diff --git a/platform/commonUI/general/src/directives/MCTScroll.js b/platform/commonUI/general/src/directives/MCTScroll.js index 6b9d480c66..fd546e426c 100644 --- a/platform/commonUI/general/src/directives/MCTScroll.js +++ b/platform/commonUI/general/src/directives/MCTScroll.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - 'use strict'; /** * Implements `mct-scroll-x` and `mct-scroll-y` directives. Listens diff --git a/platform/commonUI/general/src/directives/MCTSplitPane.js b/platform/commonUI/general/src/directives/MCTSplitPane.js index b094ba785f..5f028fdf6b 100644 --- a/platform/commonUI/general/src/directives/MCTSplitPane.js +++ b/platform/commonUI/general/src/directives/MCTSplitPane.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - 'use strict'; // Pixel width to allocate for the splitter itself var DEFAULT_ANCHOR = 'left', diff --git a/platform/commonUI/general/src/directives/MCTSplitter.js b/platform/commonUI/general/src/directives/MCTSplitter.js index ad8f809c65..b0c5b3357d 100644 --- a/platform/commonUI/general/src/directives/MCTSplitter.js +++ b/platform/commonUI/general/src/directives/MCTSplitter.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [], function () { - 'use strict'; // Pixel width to allocate for the splitter itself var SPLITTER_TEMPLATE = "
Date: Fri, 4 Mar 2016 10:46:51 -0800 Subject: [PATCH 10/53] [Build] Add Float32Array to predefs --- .jshintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.jshintrc b/.jshintrc index b3d3868d70..a0109fbce7 100644 --- a/.jshintrc +++ b/.jshintrc @@ -13,6 +13,7 @@ "predef": [ "define", "Blob", + "Float32Array", "Promise" ], "strict": "implied", From dda06286212b9ef95c3236924409256f508927e2 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:49:22 -0800 Subject: [PATCH 11/53] [Build] Clarify expressions ...to satisfy JSHint. --- .../src/controllers/drag/TimelineMoveHandle.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/platform/features/timeline/src/controllers/drag/TimelineMoveHandle.js b/platform/features/timeline/src/controllers/drag/TimelineMoveHandle.js index 6d642bf166..a05ce117e5 100644 --- a/platform/features/timeline/src/controllers/drag/TimelineMoveHandle.js +++ b/platform/features/timeline/src/controllers/drag/TimelineMoveHandle.js @@ -117,13 +117,10 @@ define( style: function (zoom) { return { - left: zoom.toPixels(dragHandler.start(id)) + - Constants.HANDLE_WIDTH + - 'px', - width: zoom.toPixels(dragHandler.duration(id)) - - Constants.HANDLE_WIDTH * 2 - + 'px' - //cursor: initialStart === undefined ? 'grab' : 'grabbing' + left: (zoom.toPixels(dragHandler.start(id)) + + Constants.HANDLE_WIDTH) + 'px', + width: (zoom.toPixels(dragHandler.duration(id)) - + Constants.HANDLE_WIDTH * 2) + 'px' }; } }; From 2dabe0d3c426dcf683d23b0582e27bc2188f3b79 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:51:08 -0800 Subject: [PATCH 12/53] [Build] Add curly braces around if block ...to satisfy JSHint --- .../features/table/src/controllers/TelemetryTableController.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/features/table/src/controllers/TelemetryTableController.js b/platform/features/table/src/controllers/TelemetryTableController.js index 747f6cc137..12339cf9e6 100644 --- a/platform/features/table/src/controllers/TelemetryTableController.js +++ b/platform/features/table/src/controllers/TelemetryTableController.js @@ -59,8 +59,9 @@ define( // Subscribe to telemetry when a domain object becomes available this.$scope.$watch('domainObject', function(domainObject){ - if (!domainObject) + if (!domainObject) { return; + } self.subscribe(); self.registerChangeListeners(); From a8f7bc01c32dd1d9f191649c338a96f5b9be5389 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:53:12 -0800 Subject: [PATCH 13/53] [Build] Redeclare globals --- platform/framework/src/FrameworkLayer.js | 2 ++ platform/framework/src/Main.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/platform/framework/src/FrameworkLayer.js b/platform/framework/src/FrameworkLayer.js index ba362be67b..1f8910fe15 100644 --- a/platform/framework/src/FrameworkLayer.js +++ b/platform/framework/src/FrameworkLayer.js @@ -20,6 +20,8 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global window,requirejs*/ + define([ 'require', './Constants', diff --git a/platform/framework/src/Main.js b/platform/framework/src/Main.js index 87b67dd8ca..c468e4dbea 100644 --- a/platform/framework/src/Main.js +++ b/platform/framework/src/Main.js @@ -20,6 +20,8 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global window,requirejs*/ + /** * Implements the framework layer, which handles the loading of bundles * and the wiring-together of the extensions they expose. From 72ef1347507c7258e77ea4cda6c3d82e86489662 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:55:30 -0800 Subject: [PATCH 14/53] [Build] Move operators to satisfy JSHint --- platform/features/clock/src/actions/RestartTimerAction.js | 4 ++-- platform/features/clock/src/actions/StartTimerAction.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/features/clock/src/actions/RestartTimerAction.js b/platform/features/clock/src/actions/RestartTimerAction.js index 7f359ca721..30b785b332 100644 --- a/platform/features/clock/src/actions/RestartTimerAction.js +++ b/platform/features/clock/src/actions/RestartTimerAction.js @@ -47,8 +47,8 @@ define( RestartTimerAction.appliesTo = function (context) { var model = - (context.domainObject && context.domainObject.getModel()) - || {}; + (context.domainObject && context.domainObject.getModel()) || + {}; // We show this variant for timers which already have // a target time. diff --git a/platform/features/clock/src/actions/StartTimerAction.js b/platform/features/clock/src/actions/StartTimerAction.js index 04a548de2b..25aff8ac2a 100644 --- a/platform/features/clock/src/actions/StartTimerAction.js +++ b/platform/features/clock/src/actions/StartTimerAction.js @@ -47,8 +47,8 @@ define( StartTimerAction.appliesTo = function (context) { var model = - (context.domainObject && context.domainObject.getModel()) - || {}; + (context.domainObject && context.domainObject.getModel()) || + {}; // We show this variant for timers which do not yet have // a target time. From f6898d16c9efabf25319cae2981bd1d8c082fff1 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:56:51 -0800 Subject: [PATCH 15/53] [Build] Remove obsolete argument ...which incidentally triggers JSHint errors --- platform/commonUI/inspect/src/services/InfoService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/commonUI/inspect/src/services/InfoService.js b/platform/commonUI/inspect/src/services/InfoService.js index 314ed32dd0..605bf8dfc5 100644 --- a/platform/commonUI/inspect/src/services/InfoService.js +++ b/platform/commonUI/inspect/src/services/InfoService.js @@ -67,7 +67,7 @@ define( // On a phone, bubble takes up more screen real estate, // so position it differently (toward the bottom) - if (this.agentService.isPhone(navigator.userAgent)) { + if (this.agentService.isPhone()) { position = MOBILE_POSITION; options = {}; } From 56a91dfbaf3012bcfd2bc27967a86be6fbd54a3f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 10:58:23 -0800 Subject: [PATCH 16/53] [Build] Use not-threequals operator ...to satisfy JSHint --- platform/commonUI/edit/src/representers/EditRepresenter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/commonUI/edit/src/representers/EditRepresenter.js b/platform/commonUI/edit/src/representers/EditRepresenter.js index 386285b38f..d61d5825ec 100644 --- a/platform/commonUI/edit/src/representers/EditRepresenter.js +++ b/platform/commonUI/edit/src/representers/EditRepresenter.js @@ -131,7 +131,7 @@ define( * object representation accordingly */ this.listenHandle = this.domainObject.getCapability('status').listen(function(statuses){ - if (statuses.indexOf('editing')!=-1){ + if (statuses.indexOf('editing') !== -1){ setEditing(); } else { delete scope.viewObjectTemplate; From c00d77dcb11338c67fe01ee610c7a77ed331fda3 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:02:57 -0800 Subject: [PATCH 17/53] [Build] Relocate operators ...in multi-line expressions, to satisfy JSHint. --- platform/commonUI/edit/src/policies/EditActionPolicy.js | 6 +++--- .../commonUI/edit/src/policies/EditNavigationPolicy.js | 4 ++-- platform/commonUI/notification/src/NotificationService.js | 8 ++++---- platform/entanglement/src/actions/GoToOriginalAction.js | 4 ++-- .../entanglement/src/actions/SetPrimaryLocationAction.js | 4 ++-- platform/features/plot/src/SubPlot.js | 4 ++-- platform/persistence/queue/src/PersistenceQueueImpl.js | 4 ++-- .../representation/src/gestures/ContextMenuGesture.js | 8 ++++---- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/platform/commonUI/edit/src/policies/EditActionPolicy.js b/platform/commonUI/edit/src/policies/EditActionPolicy.js index a3a43fa81e..8c4ffc2641 100644 --- a/platform/commonUI/edit/src/policies/EditActionPolicy.js +++ b/platform/commonUI/edit/src/policies/EditActionPolicy.js @@ -79,9 +79,9 @@ define( */ function isEditing(context) { var domainObject = (context || {}).domainObject; - return domainObject - && domainObject.hasCapability('status') - && domainObject.getCapability('status').get('editing'); + return domainObject && + domainObject.hasCapability('status') && + domainObject.getCapability('status').get('editing'); } EditActionPolicy.prototype.allow = function (action, context) { diff --git a/platform/commonUI/edit/src/policies/EditNavigationPolicy.js b/platform/commonUI/edit/src/policies/EditNavigationPolicy.js index 6797ac4eb1..62c489b35d 100644 --- a/platform/commonUI/edit/src/policies/EditNavigationPolicy.js +++ b/platform/commonUI/edit/src/policies/EditNavigationPolicy.js @@ -45,8 +45,8 @@ define( statusCapability = navigatedObject && navigatedObject.getCapability("status"); - return statusCapability && statusCapability.get('editing') - && editorCapability && editorCapability.dirty(); + return statusCapability && statusCapability.get('editing') && + editorCapability && editorCapability.dirty(); }; /** diff --git a/platform/commonUI/notification/src/NotificationService.js b/platform/commonUI/notification/src/NotificationService.js index 6ee888d57c..7d3ab2c61d 100644 --- a/platform/commonUI/notification/src/NotificationService.js +++ b/platform/commonUI/notification/src/NotificationService.js @@ -388,8 +388,8 @@ define( notifications queued for display, setup a timeout to dismiss the dialog. */ - if (notification && (notification.model.autoDismiss - || this.selectNextNotification())) { + if (notification && (notification.model.autoDismiss || + this.selectNextNotification())) { timeout = notification.model.autoDismiss || this.DEFAULT_AUTO_DISMISS; this.active.timeout = this.$timeout(function () { @@ -416,8 +416,8 @@ define( for (; i< this.notifications.length; i++) { notification = this.notifications[i]; - if (!notification.model.minimized - && notification!== this.active.notification) { + if (!notification.model.minimized && + notification!== this.active.notification) { return notification; } diff --git a/platform/entanglement/src/actions/GoToOriginalAction.js b/platform/entanglement/src/actions/GoToOriginalAction.js index 6a1dbc6343..f68225d3b3 100644 --- a/platform/entanglement/src/actions/GoToOriginalAction.js +++ b/platform/entanglement/src/actions/GoToOriginalAction.js @@ -50,8 +50,8 @@ define( GoToOriginalAction.appliesTo = function (context) { var domainObject = context.domainObject; - return domainObject && domainObject.hasCapability("location") - && domainObject.getCapability("location").isLink(); + return domainObject && domainObject.hasCapability("location") && + domainObject.getCapability("location").isLink(); }; return GoToOriginalAction; diff --git a/platform/entanglement/src/actions/SetPrimaryLocationAction.js b/platform/entanglement/src/actions/SetPrimaryLocationAction.js index d47ef4a28d..6fbdf89cbc 100644 --- a/platform/entanglement/src/actions/SetPrimaryLocationAction.js +++ b/platform/entanglement/src/actions/SetPrimaryLocationAction.js @@ -48,8 +48,8 @@ define( SetPrimaryLocationAction.appliesTo = function (context) { var domainObject = context.domainObject; - return domainObject && domainObject.hasCapability("location") - && (domainObject.getModel().location === undefined); + return domainObject && domainObject.hasCapability("location") && + (domainObject.getModel().location === undefined); }; return SetPrimaryLocationAction; diff --git a/platform/features/plot/src/SubPlot.js b/platform/features/plot/src/SubPlot.js index b2a31cc8ca..d016d4730d 100644 --- a/platform/features/plot/src/SubPlot.js +++ b/platform/features/plot/src/SubPlot.js @@ -68,8 +68,8 @@ define( * @returns {boolean} true if domain data exists for the current pan/zoom level */ SubPlot.prototype.hasDomainData = function() { - return this.panZoomStack - && this.panZoomStack.getDimensions()[0] > 0; + return this.panZoomStack && + this.panZoomStack.getDimensions()[0] > 0; }; // Utility function for filtering out empty strings. diff --git a/platform/persistence/queue/src/PersistenceQueueImpl.js b/platform/persistence/queue/src/PersistenceQueueImpl.js index d344efe2b5..f177800afe 100644 --- a/platform/persistence/queue/src/PersistenceQueueImpl.js +++ b/platform/persistence/queue/src/PersistenceQueueImpl.js @@ -66,8 +66,8 @@ define( // Check if the queue's size has stopped increasing) function quiescent() { - return Object.keys(self.persistences).length - === self.lastObservedSize; + return Object.keys(self.persistences).length === + self.lastObservedSize; } // Persist all queued objects diff --git a/platform/representation/src/gestures/ContextMenuGesture.js b/platform/representation/src/gestures/ContextMenuGesture.js index 36d5aea65e..78abed5347 100644 --- a/platform/representation/src/gestures/ContextMenuGesture.js +++ b/platform/representation/src/gestures/ContextMenuGesture.js @@ -45,10 +45,10 @@ define( parameters = element && element.attr('parameters') && $parse(element.attr('parameters'))(); function suppressMenu() { - return parameters - && parameters.suppressMenuOnEdit - && navigationService.getNavigation() - && navigationService.getNavigation().hasCapability('editor'); + return parameters && + parameters.suppressMenuOnEdit && + navigationService.getNavigation() && + navigationService.getNavigation().hasCapability('editor'); } function showMenu(event) { From 6289fe333bb62f2a01a181a860b592f560f64368 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:05:08 -0800 Subject: [PATCH 18/53] [Build] Declare screenfull ...and shim such that it can be acquired in the normal AMD way. Avoids use of global variable to satisfy JSHint. --- main.js | 3 +++ platform/commonUI/browse/src/windowing/FullscreenAction.js | 2 +- test-main.js | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 739cf056cd..8f0dfd2f3e 100644 --- a/main.js +++ b/main.js @@ -44,6 +44,9 @@ requirejs.config({ }, "moment-duration-format": { "deps": [ "moment" ] + }, + "screenfull": { + "exports": "screenfull" } } }); diff --git a/platform/commonUI/browse/src/windowing/FullscreenAction.js b/platform/commonUI/browse/src/windowing/FullscreenAction.js index f898dbbe6e..e9fcf9df76 100644 --- a/platform/commonUI/browse/src/windowing/FullscreenAction.js +++ b/platform/commonUI/browse/src/windowing/FullscreenAction.js @@ -25,7 +25,7 @@ */ define( ["screenfull"], - function () { + function (screenfull) { var ENTER_FULLSCREEN = "Enter full screen mode", EXIT_FULLSCREEN = "Exit full screen mode"; diff --git a/test-main.js b/test-main.js index 13f1bf367d..caa306c1b6 100644 --- a/test-main.js +++ b/test-main.js @@ -65,6 +65,9 @@ requirejs.config({ }, "moment-duration-format": { "deps": [ "moment" ] + }, + "screenfull": { + "exports": "screenfull" } }, From f380e43219e38a53f59b579e4d76cc05186413f3 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:08:20 -0800 Subject: [PATCH 19/53] [Build] Inject window to satisfy JSHint --- platform/persistence/local/bundle.js | 1 + .../persistence/local/src/LocalStoragePersistenceProvider.js | 5 ++--- .../local/test/LocalStoragePersistenceProviderSpec.js | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/platform/persistence/local/bundle.js b/platform/persistence/local/bundle.js index 11a546941a..e09e19e4b7 100644 --- a/platform/persistence/local/bundle.js +++ b/platform/persistence/local/bundle.js @@ -38,6 +38,7 @@ define([ "type": "provider", "implementation": LocalStoragePersistenceProvider, "depends": [ + "$window", "$q", "PERSISTENCE_SPACE" ] diff --git a/platform/persistence/local/src/LocalStoragePersistenceProvider.js b/platform/persistence/local/src/LocalStoragePersistenceProvider.js index 2321297a44..a930304074 100644 --- a/platform/persistence/local/src/LocalStoragePersistenceProvider.js +++ b/platform/persistence/local/src/LocalStoragePersistenceProvider.js @@ -20,7 +20,6 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ - define( [], function () { @@ -36,11 +35,11 @@ define( * @param $interval Angular's $interval service * @param {string} space the name of the persistence space being served */ - function LocalStoragePersistenceProvider($q, space) { + function LocalStoragePersistenceProvider($window, $q, space) { this.$q = $q; this.space = space; this.spaces = space ? [space] : []; - this.localStorage = window.localStorage; + this.localStorage = $window.localStorage; } /** diff --git a/platform/persistence/local/test/LocalStoragePersistenceProviderSpec.js b/platform/persistence/local/test/LocalStoragePersistenceProviderSpec.js index f01ece2e49..b6530584d6 100644 --- a/platform/persistence/local/test/LocalStoragePersistenceProviderSpec.js +++ b/platform/persistence/local/test/LocalStoragePersistenceProviderSpec.js @@ -49,14 +49,11 @@ define( mockQ.when.andCallFake(mockPromise); provider = new LocalStoragePersistenceProvider( + { localStorage: testLocalStorage }, mockQ, testSpace, testLocalStorage ); - - // White-boxy: Can't effectively mock window.localStorage, - // so override the provider's local reference to it. - provider.localStorage = testLocalStorage; }); it("reports available spaces", function () { From 6aeb156a5864d81cbafb81a83e9d5aa5b69704de Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:09:41 -0800 Subject: [PATCH 20/53] [Build] Declare global self in worker --- platform/search/src/services/GenericSearchWorker.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/search/src/services/GenericSearchWorker.js b/platform/search/src/services/GenericSearchWorker.js index bd8ab68ec2..a3cd34c2e2 100644 --- a/platform/search/src/services/GenericSearchWorker.js +++ b/platform/search/src/services/GenericSearchWorker.js @@ -20,6 +20,8 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global self*/ + /** * Module defining GenericSearchWorker. Created by shale on 07/21/2015. */ From 9526207af876358987d7f0570f2e700418554b83 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:13:31 -0800 Subject: [PATCH 21/53] [Build] Replace setTimeout with To avoid need to declare global usage to satisfy JSHint --- platform/search/bundle.js | 1 + platform/search/src/services/GenericSearchProvider.js | 10 ++++++---- .../search/test/services/GenericSearchProviderSpec.js | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/platform/search/bundle.js b/platform/search/bundle.js index fb5714fab6..74040b84f4 100644 --- a/platform/search/bundle.js +++ b/platform/search/bundle.js @@ -103,6 +103,7 @@ define([ "type": "provider", "implementation": GenericSearchProvider, "depends": [ + "$timeout", "$q", "$log", "modelService", diff --git a/platform/search/src/services/GenericSearchProvider.js b/platform/search/src/services/GenericSearchProvider.js index 7eff7c3b08..caa5dec428 100644 --- a/platform/search/src/services/GenericSearchProvider.js +++ b/platform/search/src/services/GenericSearchProvider.js @@ -41,8 +41,9 @@ define([ * @param {TopicService} topic the topic service. * @param {Array} ROOTS An array of object Ids to begin indexing. */ - function GenericSearchProvider($q, $log, modelService, workerService, topic, ROOTS) { + function GenericSearchProvider($timeout, $q, $log, modelService, workerService, topic, ROOTS) { var provider = this; + this.$timeout = $timeout; this.$q = $q; this.$log = $log; this.modelService = modelService; @@ -188,7 +189,8 @@ define([ */ GenericSearchProvider.prototype.beginIndexRequest = function () { var idToIndex = this.idsToIndex.shift(), - provider = this; + provider = this, + $timeout = this.$timeout; this.pendingRequests += 1; this.modelService @@ -204,10 +206,10 @@ define([ .warn('Failed to index domain object ' + idToIndex); }) .then(function () { - setTimeout(function () { + $timeout(function () { provider.pendingRequests -= 1; provider.keepIndexing(); - }, 0); + }, 0, false); }); }; diff --git a/platform/search/test/services/GenericSearchProviderSpec.js b/platform/search/test/services/GenericSearchProviderSpec.js index da3f43897f..b7c8321add 100644 --- a/platform/search/test/services/GenericSearchProviderSpec.js +++ b/platform/search/test/services/GenericSearchProviderSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ - runs*/ /** * SearchSpec. Created by shale on 07/31/2015. @@ -43,6 +42,7 @@ define([ provider; beforeEach(function () { + $timeout = jasmine.createSpy('$timeout'); $q = jasmine.createSpyObj( '$q', ['defer'] @@ -82,6 +82,7 @@ define([ spyOn(GenericSearchProvider.prototype, 'scheduleForIndexing'); provider = new GenericSearchProvider( + $timeout, $q, $log, modelService, From 19c9fcd3691ea86db583905bfc653c5a75130d44 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:18:25 -0800 Subject: [PATCH 22/53] [Build] Remove apparent strict violations ...from persistence providers. --- .../couch/src/CouchPersistenceProvider.js | 16 ++++++++-------- .../elastic/src/ElasticPersistenceProvider.js | 11 ++++++----- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/platform/persistence/couch/src/CouchPersistenceProvider.js b/platform/persistence/couch/src/CouchPersistenceProvider.js index 6e7a1c6aaf..21579eb5f9 100644 --- a/platform/persistence/couch/src/CouchPersistenceProvider.js +++ b/platform/persistence/couch/src/CouchPersistenceProvider.js @@ -69,24 +69,24 @@ define( // Check the response to a create/update/delete request; // track the rev if it's valid, otherwise return false to // indicate that the request failed. - function checkResponse(response) { + CouchPersistenceProvider.prototype.checkResponse = function (response) { if (response && response.ok) { this.revs[response.id] = response.rev; return response.ok; } else { return false; } - } + }; // Get a domain object model out of CouchDB's response - function getModel(response) { + CouchPersistenceProvider.prototype.getModel = function (response) { if (response && response.model) { this.revs[response[ID]] = response[REV]; return response.model; } else { return undefined; } - } + }; // Issue a request using $http; get back the plain JS object // from the expected JSON response @@ -122,24 +122,24 @@ define( CouchPersistenceProvider.prototype.createObject = function (space, key, value) { return this.put(key, new CouchDocument(key, value)) - .then(bind(checkResponse, this)); + .then(bind(this.checkResponse, this)); }; CouchPersistenceProvider.prototype.readObject = function (space, key) { - return this.get(key).then(bind(getModel, this)); + return this.get(key).then(bind(this.getModel, this)); }; CouchPersistenceProvider.prototype.updateObject = function (space, key, value) { var rev = this.revs[key]; return this.put(key, new CouchDocument(key, value, rev)) - .then(bind(checkResponse, this)); + .then(bind(this.checkResponse, this)); }; CouchPersistenceProvider.prototype.deleteObject = function (space, key, value) { var rev = this.revs[key]; return this.put(key, new CouchDocument(key, value, rev, true)) - .then(bind(checkResponse, this)); + .then(bind(this.checkResponse, this)); }; return CouchPersistenceProvider; diff --git a/platform/persistence/elastic/src/ElasticPersistenceProvider.js b/platform/persistence/elastic/src/ElasticPersistenceProvider.js index 75208c9aac..8ffb5d0232 100644 --- a/platform/persistence/elastic/src/ElasticPersistenceProvider.js +++ b/platform/persistence/elastic/src/ElasticPersistenceProvider.js @@ -108,14 +108,14 @@ define( }; // Get a domain object model out of ElasticSearch's response - function getModel(response) { + ElasticPersistenceProvider.prototype.getModel = function (response) { if (response && response[SRC]) { this.revs[response[ID]] = response[REV]; return response[SRC]; } else { return undefined; } - } + }; // Check the response to a create/update/delete request; // track the rev if it's valid, otherwise return false to @@ -145,15 +145,16 @@ define( }; ElasticPersistenceProvider.prototype.readObject = function (space, key) { - return this.get(key).then(bind(getModel, this)); + return this.get(key).then(bind(this.getModel, this)); }; ElasticPersistenceProvider.prototype.updateObject = function (space, key, value) { + var self = this; function checkUpdate(response) { - return this.checkResponse(response, key); + return self.checkResponse(response, key); } return this.put(key, value, { version: this.revs[key] }) - .then(bind(checkUpdate, this)); + .then(checkUpdate); }; ElasticPersistenceProvider.prototype.deleteObject = function (space, key, value) { From bf232d05933e9a24d3be42b72351a8c3ec2d0bf6 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:24:14 -0800 Subject: [PATCH 23/53] [Build] Ignore apparent strict violation ...in CustomRegistrars. --- platform/framework/src/register/CustomRegistrars.js | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/framework/src/register/CustomRegistrars.js b/platform/framework/src/register/CustomRegistrars.js index d0ce3cccc3..95ce291ad1 100644 --- a/platform/framework/src/register/CustomRegistrars.js +++ b/platform/framework/src/register/CustomRegistrars.js @@ -26,6 +26,7 @@ define( ['../Constants', './ServiceCompositor'], function (Constants, ServiceCompositor) { + /*jshint validthis:true */ /** * Handles registration of a few specific extension types that are From a1a7b2b8ce9b6c512842cbc17ceca6d2273c8849 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:41:48 -0800 Subject: [PATCH 24/53] [Build] Remove unused variables ...to satisfy JSHint --- platform/commonUI/browse/src/BrowseController.js | 6 ++---- platform/commonUI/browse/src/creation/CreationService.js | 4 +--- platform/commonUI/browse/src/windowing/NewTabAction.js | 2 -- platform/commonUI/edit/src/actions/SaveAction.js | 3 +-- .../edit/src/capabilities/EditableActionCapability.js | 5 +---- .../edit/src/objects/EditableDomainObjectCache.js | 3 +-- .../commonUI/edit/src/representers/EditRepresenter.js | 4 ++-- .../general/src/controllers/TimeRangeController.js | 8 ++++---- .../general/src/controllers/TreeNodeController.js | 4 +--- platform/commonUI/general/src/directives/MCTSplitPane.js | 9 +-------- platform/commonUI/general/src/directives/MCTSplitter.js | 9 +-------- platform/commonUI/general/src/services/PopupService.js | 3 +-- .../commonUI/notification/src/NotificationService.js | 3 +-- platform/containment/src/CompositionModelPolicy.js | 2 +- .../core/src/capabilities/InstantiationCapability.js | 4 ++-- platform/core/src/objects/DomainObjectProvider.js | 4 ++-- platform/entanglement/src/policies/CrossSpacePolicy.js | 3 +-- .../features/clock/src/controllers/TimerController.js | 3 +-- platform/features/clock/src/services/TickerService.js | 4 ++-- platform/features/conductor/src/ConductorRepresenter.js | 2 +- .../conductor/src/ConductorTelemetryDecorator.js | 3 --- .../imagery/src/directives/MCTBackgroundImage.js | 4 ++-- platform/features/layout/src/FixedController.js | 4 ++-- platform/features/layout/src/elements/TelemetryProxy.js | 4 ++-- platform/features/rtevents/src/RTEventListController.js | 6 +----- .../table/src/controllers/TelemetryTableController.js | 2 +- platform/features/table/src/directives/MCTTable.js | 4 ++-- .../timeline/src/capabilities/ActivityUtilization.js | 4 ++-- .../timeline/src/capabilities/CumulativeGraph.js | 1 - .../timeline/src/capabilities/TimelineTimespan.js | 4 ++-- .../timeline/src/controllers/TimelineZoomController.js | 8 ++------ .../timeline/src/controllers/graph/TimelineGraph.js | 2 -- .../features/timeline/src/directives/MCTSwimlaneDrop.js | 1 - platform/forms/src/controllers/ColorController.js | 2 +- platform/persistence/couch/src/CouchIndicator.js | 2 +- .../persistence/couch/src/CouchPersistenceProvider.js | 2 +- .../elastic/src/ElasticPersistenceProvider.js | 2 +- .../persistence/elastic/src/ElasticSearchProvider.js | 2 +- .../local/src/LocalStoragePersistenceProvider.js | 2 +- platform/representation/src/MCTRepresentation.js | 5 ++--- platform/representation/src/TemplatePrefetcher.js | 2 +- .../representation/src/gestures/ContextMenuGesture.js | 2 +- platform/representation/src/gestures/DropGesture.js | 9 +-------- platform/telemetry/src/TelemetryFormatter.js | 2 +- 44 files changed, 55 insertions(+), 109 deletions(-) diff --git a/platform/commonUI/browse/src/BrowseController.js b/platform/commonUI/browse/src/BrowseController.js index 2c07ee7b50..e5d0fcf2b9 100644 --- a/platform/commonUI/browse/src/BrowseController.js +++ b/platform/commonUI/browse/src/BrowseController.js @@ -25,10 +25,8 @@ * @namespace platform/commonUI/browse */ define( - [ - '../../../representation/src/gestures/GestureConstants' - ], - function (GestureConstants) { + [], + function () { var ROOT_ID = "ROOT"; diff --git a/platform/commonUI/browse/src/creation/CreationService.js b/platform/commonUI/browse/src/creation/CreationService.js index ca5389e162..6048d15378 100644 --- a/platform/commonUI/browse/src/creation/CreationService.js +++ b/platform/commonUI/browse/src/creation/CreationService.js @@ -28,9 +28,7 @@ define( function () { var NON_PERSISTENT_WARNING = - "Tried to create an object in non-persistent container.", - NO_COMPOSITION_WARNING = - "Could not add to composition; no composition in "; + "Tried to create an object in non-persistent container."; /** * The creation service is responsible for instantiating and diff --git a/platform/commonUI/browse/src/windowing/NewTabAction.js b/platform/commonUI/browse/src/windowing/NewTabAction.js index 83422d5096..86c1dfdd94 100644 --- a/platform/commonUI/browse/src/windowing/NewTabAction.js +++ b/platform/commonUI/browse/src/windowing/NewTabAction.js @@ -26,8 +26,6 @@ define( [], function () { - var ROOT_ID = "ROOT", - DEFAULT_PATH = "/mine"; /** * The new tab action allows a domain object to be opened * into a new browser tab. diff --git a/platform/commonUI/edit/src/actions/SaveAction.js b/platform/commonUI/edit/src/actions/SaveAction.js index 55755e12cb..bdc3225258 100644 --- a/platform/commonUI/edit/src/actions/SaveAction.js +++ b/platform/commonUI/edit/src/actions/SaveAction.js @@ -79,8 +79,7 @@ define( } function doWizardSave(parent) { - var context = domainObject.getCapability("context"), - wizard = new CreateWizard( + var wizard = new CreateWizard( domainObject, parent, self.policyService diff --git a/platform/commonUI/edit/src/capabilities/EditableActionCapability.js b/platform/commonUI/edit/src/capabilities/EditableActionCapability.js index 2e83dee0a0..bdfa4d3f59 100644 --- a/platform/commonUI/edit/src/capabilities/EditableActionCapability.js +++ b/platform/commonUI/edit/src/capabilities/EditableActionCapability.js @@ -37,10 +37,7 @@ define( * @implements {PersistenceCapability} */ function EditableActionCapability( - actionCapability, - editableObject, - domainObject, - cache + actionCapability ) { var action = Object.create(actionCapability); diff --git a/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js b/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js index bd557f882c..774e562e61 100644 --- a/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js +++ b/platform/commonUI/edit/src/objects/EditableDomainObjectCache.js @@ -68,8 +68,7 @@ define( EditableDomainObjectCache.prototype.getEditableObject = function (domainObject) { var type = domainObject.getCapability('type'), EditableDomainObject = this.EditableDomainObject, - editableObject, - statusListener; + editableObject; // Track the top-level domain object; this will have // some special behavior for its context capability. diff --git a/platform/commonUI/edit/src/representers/EditRepresenter.js b/platform/commonUI/edit/src/representers/EditRepresenter.js index d61d5825ec..b48bb2f50a 100644 --- a/platform/commonUI/edit/src/representers/EditRepresenter.js +++ b/platform/commonUI/edit/src/representers/EditRepresenter.js @@ -109,8 +109,8 @@ define( // Handle a specific representation of a specific domain object EditRepresenter.prototype.represent = function represent(representation, representedObject) { - var scope = this.scope, - self = this; + var scope = this.scope; + // Track the key, to know which view configuration to save to. this.key = (representation || {}).key; // Track the represented object diff --git a/platform/commonUI/general/src/controllers/TimeRangeController.js b/platform/commonUI/general/src/controllers/TimeRangeController.js index 3f1b625d29..7f6732b98a 100644 --- a/platform/commonUI/general/src/controllers/TimeRangeController.js +++ b/platform/commonUI/general/src/controllers/TimeRangeController.js @@ -21,8 +21,8 @@ *****************************************************************************/ define( - ['moment'], - function (moment) { + [], + function () { var TICK_SPACING_PX = 150; @@ -180,7 +180,7 @@ define( }; } - function updateOuterStart(t) { + function updateOuterStart() { var ngModel = $scope.ngModel; ngModel.inner.start = @@ -195,7 +195,7 @@ define( updateTicks(); } - function updateOuterEnd(t) { + function updateOuterEnd() { var ngModel = $scope.ngModel; ngModel.inner.end = diff --git a/platform/commonUI/general/src/controllers/TreeNodeController.js b/platform/commonUI/general/src/controllers/TreeNodeController.js index 228069a8e9..52b0e2e5a9 100644 --- a/platform/commonUI/general/src/controllers/TreeNodeController.js +++ b/platform/commonUI/general/src/controllers/TreeNodeController.js @@ -60,9 +60,7 @@ define( */ function TreeNodeController($scope, $timeout) { var self = this, - selectedObject = ($scope.ngModel || {}).selectedObject, - isSelected = false, - hasBeenExpanded = false; + selectedObject = ($scope.ngModel || {}).selectedObject; // Look up the id for a domain object. A convenience // for mapping; additionally does some undefined-checking. diff --git a/platform/commonUI/general/src/directives/MCTSplitPane.js b/platform/commonUI/general/src/directives/MCTSplitPane.js index 5f028fdf6b..243481f0db 100644 --- a/platform/commonUI/general/src/directives/MCTSplitPane.js +++ b/platform/commonUI/general/src/directives/MCTSplitPane.js @@ -94,13 +94,6 @@ define( * @constructor */ function MCTSplitPane($parse, $log, $interval) { - var anchors = { - left: true, - right: true, - top: true, - bottom: true - }; - function controller($scope, $element, $attrs) { var anchorKey = $attrs.anchor || DEFAULT_ANCHOR, anchor, @@ -162,7 +155,7 @@ define( // Getter-setter for the pixel offset of the splitter, // relative to the current edge. function getSetPosition(value) { - var min, max, prior = position; + var prior = position; if (typeof value === 'number') { position = value; enforceExtrema(); diff --git a/platform/commonUI/general/src/directives/MCTSplitter.js b/platform/commonUI/general/src/directives/MCTSplitter.js index b0c5b3357d..0f8c77da96 100644 --- a/platform/commonUI/general/src/directives/MCTSplitter.js +++ b/platform/commonUI/general/src/directives/MCTSplitter.js @@ -28,13 +28,7 @@ define( var SPLITTER_TEMPLATE = "
", - OFFSETS_BY_EDGE = { - left: "offsetLeft", - right: "offsetRight", - top: "offsetTop", - bottom: "offsetBottom" - }; + "mct-drag-up=\"splitter.endMove()\">
"; /** * Implements `mct-splitter` directive. @@ -50,7 +44,6 @@ define( scope.splitter = { // Begin moving this splitter startMove: function () { - var splitter = element[0]; initialPosition = mctSplitPane.position(); mctSplitPane.toggleClass('resizing'); }, diff --git a/platform/commonUI/general/src/services/PopupService.js b/platform/commonUI/general/src/services/PopupService.js index 62d7a340e7..b869be6d76 100644 --- a/platform/commonUI/general/src/services/PopupService.js +++ b/platform/commonUI/general/src/services/PopupService.js @@ -81,8 +81,7 @@ define( winDim = [ $window.innerWidth, $window.innerHeight ], styles = { position: 'absolute' }, margin, - offset, - bubble; + offset; function adjustNegatives(value, index) { return value < 0 ? (value + winDim[index]) : value; diff --git a/platform/commonUI/notification/src/NotificationService.js b/platform/commonUI/notification/src/NotificationService.js index 7d3ab2c61d..868ccf6f08 100644 --- a/platform/commonUI/notification/src/NotificationService.js +++ b/platform/commonUI/notification/src/NotificationService.js @@ -379,9 +379,8 @@ define( */ NotificationService.prototype.setActiveNotification = function (notification) { + var timeout; - var self = this, - timeout; this.active.notification = notification; /* If autoDismiss has been specified, OR there are other diff --git a/platform/containment/src/CompositionModelPolicy.js b/platform/containment/src/CompositionModelPolicy.js index 3c8144a08e..be51e0c040 100644 --- a/platform/containment/src/CompositionModelPolicy.js +++ b/platform/containment/src/CompositionModelPolicy.js @@ -13,7 +13,7 @@ define( function CompositionModelPolicy() { } - CompositionModelPolicy.prototype.allow = function (candidate, context) { + CompositionModelPolicy.prototype.allow = function (candidate) { return Array.isArray( (candidate.getInitialModel() || {}).composition ); diff --git a/platform/core/src/capabilities/InstantiationCapability.js b/platform/core/src/capabilities/InstantiationCapability.js index 0b92c2bc68..e1de97f624 100644 --- a/platform/core/src/capabilities/InstantiationCapability.js +++ b/platform/core/src/capabilities/InstantiationCapability.js @@ -21,8 +21,8 @@ *****************************************************************************/ define( - ['../objects/DomainObjectImpl'], - function (DomainObjectImpl) { + [], + function () { /** * Implements the `instantiation` capability. This allows new domain diff --git a/platform/core/src/objects/DomainObjectProvider.js b/platform/core/src/objects/DomainObjectProvider.js index b2bbd8f84c..496d29d117 100644 --- a/platform/core/src/objects/DomainObjectProvider.js +++ b/platform/core/src/objects/DomainObjectProvider.js @@ -61,7 +61,7 @@ define( * @memberof platform/core * @constructor */ - function DomainObjectProvider(modelService, instantiate, $q) { + function DomainObjectProvider(modelService, instantiate) { this.modelService = modelService; this.instantiate = instantiate; } @@ -75,7 +75,7 @@ define( // from this service. function assembleResult(models) { var result = {}; - ids.forEach(function (id, index) { + ids.forEach(function (id) { if (models[id]) { // Create the domain object result[id] = instantiate(models[id], id); diff --git a/platform/entanglement/src/policies/CrossSpacePolicy.js b/platform/entanglement/src/policies/CrossSpacePolicy.js index 42f4c80f7f..29aab5a484 100644 --- a/platform/entanglement/src/policies/CrossSpacePolicy.js +++ b/platform/entanglement/src/policies/CrossSpacePolicy.js @@ -48,8 +48,7 @@ define( function isCrossSpace(context) { var domainObject = context.domainObject, - selectedObject = context.selectedObject, - spaces = [ domainObject, selectedObject ].map(lookupSpace); + selectedObject = context.selectedObject; return selectedObject !== undefined && domainObject !== undefined && lookupSpace(domainObject) !== lookupSpace(selectedObject); diff --git a/platform/features/clock/src/controllers/TimerController.js b/platform/features/clock/src/controllers/TimerController.js index ab42b065c1..d1d31bfb80 100644 --- a/platform/features/clock/src/controllers/TimerController.js +++ b/platform/features/clock/src/controllers/TimerController.js @@ -38,8 +38,7 @@ define( * time (typically wrapping `Date.now`) */ function TimerController($scope, $window, now) { - var timerObject, - formatter, + var formatter, active = true, relativeTimestamp, lastTimestamp, diff --git a/platform/features/clock/src/services/TickerService.js b/platform/features/clock/src/services/TickerService.js index 4f8661fca4..07e0a5886b 100644 --- a/platform/features/clock/src/services/TickerService.js +++ b/platform/features/clock/src/services/TickerService.js @@ -21,8 +21,8 @@ *****************************************************************************/ define( - ['moment'], - function (moment) { + [], + function () { /** * Calls functions every second, as close to the actual second diff --git a/platform/features/conductor/src/ConductorRepresenter.js b/platform/features/conductor/src/ConductorRepresenter.js index 720372b316..08a5968800 100644 --- a/platform/features/conductor/src/ConductorRepresenter.js +++ b/platform/features/conductor/src/ConductorRepresenter.js @@ -144,7 +144,7 @@ define( }; // Handle a specific representation of a specific domain object - ConductorRepresenter.prototype.represent = function represent(representation, representedObject) { + ConductorRepresenter.prototype.represent = function represent(representation) { this.destroy(); if (this.views.indexOf(representation) !== -1 && !GLOBAL_SHOWING) { diff --git a/platform/features/conductor/src/ConductorTelemetryDecorator.js b/platform/features/conductor/src/ConductorTelemetryDecorator.js index 953056c25a..67ec29a17b 100644 --- a/platform/features/conductor/src/ConductorTelemetryDecorator.js +++ b/platform/features/conductor/src/ConductorTelemetryDecorator.js @@ -57,14 +57,11 @@ define( }; ConductorTelemetryDecorator.prototype.requestTelemetry = function (requests) { - var self = this; return this.telemetryService .requestTelemetry(this.amendRequests(requests)); }; ConductorTelemetryDecorator.prototype.subscribe = function (callback, requests) { - var self = this; - return this.telemetryService .subscribe(callback, this.amendRequests(requests)); }; diff --git a/platform/features/imagery/src/directives/MCTBackgroundImage.js b/platform/features/imagery/src/directives/MCTBackgroundImage.js index f550b5f93b..ab2eb7b169 100644 --- a/platform/features/imagery/src/directives/MCTBackgroundImage.js +++ b/platform/features/imagery/src/directives/MCTBackgroundImage.js @@ -36,7 +36,7 @@ define( * @memberof platform/features/imagery */ function MCTBackgroundImage($document) { - function link(scope, element, attrs) { + function link(scope, element) { // General strategy here: // - Keep count of how many images have been requested; this // counter will be used as an internal identifier or sorts @@ -49,7 +49,7 @@ define( // in which images are actually loaded may be different, so // some strategy like this is necessary to ensure that images // do not display out-of-order. - var div, requested = 0, loaded = 0; + var requested = 0, loaded = 0; function nextImage(url) { var myCounter = requested, diff --git a/platform/features/layout/src/FixedController.js b/platform/features/layout/src/FixedController.js index b2d5e3c934..8a3bfd9d7e 100644 --- a/platform/features/layout/src/FixedController.js +++ b/platform/features/layout/src/FixedController.js @@ -36,7 +36,7 @@ define( * @constructor * @param {Scope} $scope the controller's Angular scope */ - function FixedController($scope, $q, dialogService, telemetryHandler, telemetryFormatter, throttle) { + function FixedController($scope, $q, dialogService, telemetryHandler, telemetryFormatter) { var self = this, handle, names = {}, // Cache names by ID @@ -230,7 +230,7 @@ define( } // Handle changes in the object's composition - function updateComposition(ids) { + function updateComposition() { // Populate panel positions // TODO: Ensure defaults here // Resubscribe - objects in view have changed diff --git a/platform/features/layout/src/elements/TelemetryProxy.js b/platform/features/layout/src/elements/TelemetryProxy.js index f03bb6cbb6..5537d3b525 100644 --- a/platform/features/layout/src/elements/TelemetryProxy.js +++ b/platform/features/layout/src/elements/TelemetryProxy.js @@ -21,8 +21,8 @@ *****************************************************************************/ define( - ['./TextProxy', './AccessorMutator'], - function (TextProxy, AccessorMutator) { + ['./TextProxy'], + function (TextProxy) { // Method names to expose from this proxy var HIDE = 'hideTitle', SHOW = 'showTitle'; diff --git a/platform/features/rtevents/src/RTEventListController.js b/platform/features/rtevents/src/RTEventListController.js index 9beaffdec9..1d32a346b6 100644 --- a/platform/features/rtevents/src/RTEventListController.js +++ b/platform/features/rtevents/src/RTEventListController.js @@ -58,11 +58,7 @@ define( lastIds.some(mismatch); } - function setupColumns(telemetryObjects) { - var id = $scope.domainObject && $scope.domainObject.getId(), - firstId = - telemetryObjects[0] && telemetryObjects[0].getId(); - + function setupColumns() { columns = []; columns.push(new DomainColumn(telemetryFormatter)); diff --git a/platform/features/table/src/controllers/TelemetryTableController.js b/platform/features/table/src/controllers/TelemetryTableController.js index 12339cf9e6..f7fcdec74a 100644 --- a/platform/features/table/src/controllers/TelemetryTableController.js +++ b/platform/features/table/src/controllers/TelemetryTableController.js @@ -143,7 +143,7 @@ define( self = this; if (handle) { - handle.promiseTelemetryObjects().then(function (objects) { + handle.promiseTelemetryObjects().then(function () { table.buildColumns(handle.getMetadata()); self.filterColumns(); diff --git a/platform/features/table/src/directives/MCTTable.js b/platform/features/table/src/directives/MCTTable.js index 8a8b9588c0..c7feb6bc35 100644 --- a/platform/features/table/src/directives/MCTTable.js +++ b/platform/features/table/src/directives/MCTTable.js @@ -3,7 +3,7 @@ define( ["../controllers/MCTTableController"], function (MCTTableController) { - function MCTTable($timeout) { + function MCTTable() { return { restrict: "E", templateUrl: "platform/features/table/res/templates/mct-data-table.html", @@ -13,7 +13,7 @@ define( rows: "=", enableFilter: "=?", enableSort: "=?" - }, + } }; } diff --git a/platform/features/timeline/src/capabilities/ActivityUtilization.js b/platform/features/timeline/src/capabilities/ActivityUtilization.js index b64d102e7c..9034d09939 100644 --- a/platform/features/timeline/src/capabilities/ActivityUtilization.js +++ b/platform/features/timeline/src/capabilities/ActivityUtilization.js @@ -35,10 +35,10 @@ define( getPointCount: function () { return 0; }, - getDomainValue: function (index) { + getDomainValue: function () { return 0; }, - getRangeValue: function (index) { + getRangeValue: function () { return 0; } }; diff --git a/platform/features/timeline/src/capabilities/CumulativeGraph.js b/platform/features/timeline/src/capabilities/CumulativeGraph.js index 2908e0c77c..a9cf5c7cad 100644 --- a/platform/features/timeline/src/capabilities/CumulativeGraph.js +++ b/platform/features/timeline/src/capabilities/CumulativeGraph.js @@ -55,7 +55,6 @@ define( function initializeValues() { var values = [], slope = 0, - previous = 0, i; // Add a point (or points, if needed) reaching to the provided diff --git a/platform/features/timeline/src/capabilities/TimelineTimespan.js b/platform/features/timeline/src/capabilities/TimelineTimespan.js index 246c60e075..ac07ef7071 100644 --- a/platform/features/timeline/src/capabilities/TimelineTimespan.js +++ b/platform/features/timeline/src/capabilities/TimelineTimespan.js @@ -63,12 +63,12 @@ define( } // Set the duration associated with this object - function setDuration(value) { + function setDuration() { // No-op; duration is implicit } // Set the end time associated with this object - function setEnd(value) { + function setEnd() { // No-op; end time is implicit } diff --git a/platform/features/timeline/src/controllers/TimelineZoomController.js b/platform/features/timeline/src/controllers/TimelineZoomController.js index 4581195d6f..1488d44aeb 100644 --- a/platform/features/timeline/src/controllers/TimelineZoomController.js +++ b/platform/features/timeline/src/controllers/TimelineZoomController.js @@ -20,11 +20,8 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ define( - ['../TimelineFormatter'], - function (TimelineFormatter) { - - - var FORMATTER = new TimelineFormatter(); + [], + function () { /** * Controls the pan-zoom state of a timeline view. @@ -113,7 +110,6 @@ define( * @returns {number} duration, in milliseconds */ duration: function (value) { - var prior = duration; if (arguments.length > 0) { duration = roundDuration(value); } diff --git a/platform/features/timeline/src/controllers/graph/TimelineGraph.js b/platform/features/timeline/src/controllers/graph/TimelineGraph.js index 99696ac40c..c5e84ddaa0 100644 --- a/platform/features/timeline/src/controllers/graph/TimelineGraph.js +++ b/platform/features/timeline/src/controllers/graph/TimelineGraph.js @@ -45,8 +45,6 @@ define( min = 0, // current maximum max = 0, - // current displayed time span - duration = 1000, // line colors to display colors = Object.keys(domainObjects); diff --git a/platform/features/timeline/src/directives/MCTSwimlaneDrop.js b/platform/features/timeline/src/directives/MCTSwimlaneDrop.js index 1ffc0744d2..5a827c75f6 100644 --- a/platform/features/timeline/src/directives/MCTSwimlaneDrop.js +++ b/platform/features/timeline/src/directives/MCTSwimlaneDrop.js @@ -40,7 +40,6 @@ define( height = element[0].offsetHeight, rect = element[0].getBoundingClientRect(), offset = event.pageY - rect.top, - dataTransfer = event.dataTransfer, id = dndService.getData( SwimlaneDragConstants.MCT_DRAG_TYPE ), diff --git a/platform/forms/src/controllers/ColorController.js b/platform/forms/src/controllers/ColorController.js index 6224b25944..2bf38e0c63 100644 --- a/platform/forms/src/controllers/ColorController.js +++ b/platform/forms/src/controllers/ColorController.js @@ -55,7 +55,7 @@ define( } function initializeGroups() { - var i, group; + var group; // Ten grayscale colors group = []; diff --git a/platform/persistence/couch/src/CouchIndicator.js b/platform/persistence/couch/src/CouchIndicator.js index dfd8de04ee..223a12b7c4 100644 --- a/platform/persistence/couch/src/CouchIndicator.js +++ b/platform/persistence/couch/src/CouchIndicator.js @@ -74,7 +74,7 @@ define( // Callback if the HTTP request to Couch fails - function handleError(err) { + function handleError() { self.state = DISCONNECTED; } diff --git a/platform/persistence/couch/src/CouchPersistenceProvider.js b/platform/persistence/couch/src/CouchPersistenceProvider.js index 21579eb5f9..2e0cec8807 100644 --- a/platform/persistence/couch/src/CouchPersistenceProvider.js +++ b/platform/persistence/couch/src/CouchPersistenceProvider.js @@ -116,7 +116,7 @@ define( return this.$q.when(this.spaces); }; - CouchPersistenceProvider.prototype.listObjects = function (space) { + CouchPersistenceProvider.prototype.listObjects = function () { return this.get("_all_docs").then(bind(getIdsFromAllDocs, this)); }; diff --git a/platform/persistence/elastic/src/ElasticPersistenceProvider.js b/platform/persistence/elastic/src/ElasticPersistenceProvider.js index 8ffb5d0232..564029b4c7 100644 --- a/platform/persistence/elastic/src/ElasticPersistenceProvider.js +++ b/platform/persistence/elastic/src/ElasticPersistenceProvider.js @@ -157,7 +157,7 @@ define( .then(checkUpdate); }; - ElasticPersistenceProvider.prototype.deleteObject = function (space, key, value) { + ElasticPersistenceProvider.prototype.deleteObject = function (space, key) { return this.del(key).then(bind(this.checkResponse, this)); }; diff --git a/platform/persistence/elastic/src/ElasticSearchProvider.js b/platform/persistence/elastic/src/ElasticSearchProvider.js index a3dbe58f9c..30ef2cd62a 100644 --- a/platform/persistence/elastic/src/ElasticSearchProvider.js +++ b/platform/persistence/elastic/src/ElasticSearchProvider.js @@ -73,7 +73,7 @@ define([ }) .then(function success(succesResponse) { return provider.parseResponse(succesResponse); - }, function error(errorResponse) { + }, function error() { // Gracefully fail. return { hits: [], diff --git a/platform/persistence/local/src/LocalStoragePersistenceProvider.js b/platform/persistence/local/src/LocalStoragePersistenceProvider.js index a930304074..9f6b594a71 100644 --- a/platform/persistence/local/src/LocalStoragePersistenceProvider.js +++ b/platform/persistence/local/src/LocalStoragePersistenceProvider.js @@ -79,7 +79,7 @@ define( return this.$q.when(spaceObj[key]); }; - LocalStoragePersistenceProvider.prototype.deleteObject = function (space, key, value) { + LocalStoragePersistenceProvider.prototype.deleteObject = function (space, key) { var spaceObj = this.getValue(space); delete spaceObj[key]; this.setValue(space, spaceObj); diff --git a/platform/representation/src/MCTRepresentation.js b/platform/representation/src/MCTRepresentation.js index a9b784ae56..783f61e1f2 100644 --- a/platform/representation/src/MCTRepresentation.js +++ b/platform/representation/src/MCTRepresentation.js @@ -53,8 +53,7 @@ define( * @param {ViewDefinition[]} views an array of view extensions */ function MCTRepresentation(representations, views, representers, $q, templateLinker, $log) { - var representationMap = {}, - gestureMap = {}; + var representationMap = {}; // Assemble all representations and views // The distinction between views and representations is @@ -82,7 +81,7 @@ define( } } - function link($scope, element, attrs, ctrl, transclude) { + function link($scope, element, attrs) { var activeRepresenters = representers.map(function (Representer) { return new Representer($scope, element, attrs); }), diff --git a/platform/representation/src/TemplatePrefetcher.js b/platform/representation/src/TemplatePrefetcher.js index aea1389825..25fd223610 100644 --- a/platform/representation/src/TemplatePrefetcher.js +++ b/platform/representation/src/TemplatePrefetcher.js @@ -31,7 +31,7 @@ define( * @param {...Array.<{templateUrl: string}>} extensions arrays * of template or template-like extensions */ - function TemplatePrefetcher(templateLinker, extensions) { + function TemplatePrefetcher(templateLinker) { Array.prototype.slice.apply(arguments, [1]) .reduce(function (a, b) { return a.concat(b); diff --git a/platform/representation/src/gestures/ContextMenuGesture.js b/platform/representation/src/gestures/ContextMenuGesture.js index 78abed5347..f659005694 100644 --- a/platform/representation/src/gestures/ContextMenuGesture.js +++ b/platform/representation/src/gestures/ContextMenuGesture.js @@ -91,7 +91,7 @@ define( }); // Whenever the touch event ends, 'isPressing' is false. - element.on('touchend', function (event) { + element.on('touchend', function () { isPressing = false; }); } diff --git a/platform/representation/src/gestures/DropGesture.js b/platform/representation/src/gestures/DropGesture.js index 992c17ba98..6af580d9c3 100644 --- a/platform/representation/src/gestures/DropGesture.js +++ b/platform/representation/src/gestures/DropGesture.js @@ -71,13 +71,6 @@ define( } } - function canCompose(domainObject, selectedObject){ - return domainObject.getCapability("action").getActions({ - key: 'compose', - selectedObject: selectedObject - }).length > 0; - } - function dragOver(e) { //Refresh domain object on each dragOver to catch external // updates to the model @@ -121,7 +114,7 @@ define( // destination domain object's composition, and persist // the change. if (id) { - $q.when(action && action.perform()).then(function (result) { + $q.when(action && action.perform()).then(function () { //Don't go into edit mode for folders if (domainObjectType!=='folder') { editableDomainObject.getCapability('action').perform('edit'); diff --git a/platform/telemetry/src/TelemetryFormatter.js b/platform/telemetry/src/TelemetryFormatter.js index 71c6e60bb9..92807f5cb8 100644 --- a/platform/telemetry/src/TelemetryFormatter.js +++ b/platform/telemetry/src/TelemetryFormatter.js @@ -70,7 +70,7 @@ define( * @returns {string} a textual representation of the * value, suitable for display. */ - TelemetryFormatter.prototype.formatRangeValue = function (v, key) { + TelemetryFormatter.prototype.formatRangeValue = function (v) { return isNaN(v) ? String(v) : v.toFixed(VALUE_FORMAT_DIGITS); }; From 65095d18f274e7de5a91de2edba648f61dd07dcb Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:43:55 -0800 Subject: [PATCH 25/53] [Build] Remove partial global declarations --- platform/core/test/actions/ActionCapabilitySpec.js | 1 - platform/features/conductor/test/ConductorRepresenterSpec.js | 1 - platform/search/test/services/GenericSearchWorkerSpec.js | 1 - 3 files changed, 3 deletions(-) diff --git a/platform/core/test/actions/ActionCapabilitySpec.js b/platform/core/test/actions/ActionCapabilitySpec.js index f0a7da2672..de80d2186d 100644 --- a/platform/core/test/actions/ActionCapabilitySpec.js +++ b/platform/core/test/actions/ActionCapabilitySpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ - jasmine*/ /** * ActionCapabilitySpec. Created by vwoeltje on 11/6/14. diff --git a/platform/features/conductor/test/ConductorRepresenterSpec.js b/platform/features/conductor/test/ConductorRepresenterSpec.js index a9493b8864..20647e91e8 100644 --- a/platform/features/conductor/test/ConductorRepresenterSpec.js +++ b/platform/features/conductor/test/ConductorRepresenterSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ - waitsFor,afterEach,jasmine*/ define( ["../src/ConductorRepresenter", "./TestTimeConductor"], diff --git a/platform/search/test/services/GenericSearchWorkerSpec.js b/platform/search/test/services/GenericSearchWorkerSpec.js index 3a35edfc9a..44c7c778ba 100644 --- a/platform/search/test/services/GenericSearchWorkerSpec.js +++ b/platform/search/test/services/GenericSearchWorkerSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ - require,afterEach*/ /** * SearchSpec. Created by shale on 07/31/2015. From 4f85616632bd03937547cce9cfcedde5399319d1 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:46:15 -0800 Subject: [PATCH 26/53] [Build] Fix FullscreenAction spec ...to reflect acquisition of screenfull dependency via AMD --- .../browse/test/windowing/FullscreenActionSpec.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/platform/commonUI/browse/test/windowing/FullscreenActionSpec.js b/platform/commonUI/browse/test/windowing/FullscreenActionSpec.js index f0cf4eb382..7b3dfdab80 100644 --- a/platform/commonUI/browse/test/windowing/FullscreenActionSpec.js +++ b/platform/commonUI/browse/test/windowing/FullscreenActionSpec.js @@ -24,26 +24,25 @@ * MCTRepresentationSpec. Created by vwoeltje on 11/6/14. */ define( - ["../../src/windowing/FullscreenAction"], - function (FullscreenAction) { + ["../../src/windowing/FullscreenAction", "screenfull"], + function (FullscreenAction, screenfull) { describe("The fullscreen action", function () { var action, - oldScreenfull; + oldToggle; beforeEach(function () { // Screenfull is not shimmed or injected, so // we need to spy on it in the global scope. - oldScreenfull = window.screenfull; + oldToggle = screenfull.toggle; - window.screenfull = {}; - window.screenfull.toggle = jasmine.createSpy("toggle"); + screenfull.toggle = jasmine.createSpy("toggle"); action = new FullscreenAction({}); }); afterEach(function () { - window.screenfull = oldScreenfull; + screenfull.toggle = oldToggle; }); it("toggles fullscreen mode when performed", function () { From 2be6b3f0515fa25de349826a3d2faeca9721d702 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:48:20 -0800 Subject: [PATCH 27/53] [Build] Fix GenericSearchProvider spec ...by delegating to window.setTimeout, such that spec as-written behaves correctly. --- platform/search/test/services/GenericSearchProviderSpec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/search/test/services/GenericSearchProviderSpec.js b/platform/search/test/services/GenericSearchProviderSpec.js index b7c8321add..a6c0e981c8 100644 --- a/platform/search/test/services/GenericSearchProviderSpec.js +++ b/platform/search/test/services/GenericSearchProviderSpec.js @@ -81,6 +81,10 @@ define([ spyOn(GenericSearchProvider.prototype, 'scheduleForIndexing'); + $timeout.andCallFake(function (callback, millis) { + window.setTimeout(callback, millis); + }); + provider = new GenericSearchProvider( $timeout, $q, From 1cdbc11894289ad3e200820884db14696cba5864 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:52:46 -0800 Subject: [PATCH 28/53] [Build] Clarify spec paths --- gulpfile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 6a8c790c8b..d96d0ad825 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -42,6 +42,7 @@ var gulp = require('gulp'), assets: 'dist/assets', scss: ['./platform/**/*.scss', './example/**/*.scss'], scripts: [ 'main.js', 'platform/**/*.js', 'src/**/*.js' ], + specs: [ 'platform/**/*Spec.js', 'src/**/*Spec.js' ], static: [ 'index.html', 'platform/**/*', @@ -98,7 +99,10 @@ gulp.task('stylesheets', function () { }); gulp.task('lint', function () { - return gulp.src(paths.scripts.concat(['!**/test/**/*.js', '!**/*Spec.js'])) + var nonspecs = paths.specs.map(function (glob) { + return "!" + glob; + }); + return gulp.src(paths.scripts.concat(nonspecs)) .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(jshint.reporter('fail')); From f34ef8c4c8d1588f921e59870ae78687478c962f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:53:08 -0800 Subject: [PATCH 29/53] [Build] Add global declarations to mocks --- .../entanglement/test/ControlledPromise.js | 23 ++++++++++++++++++- .../entanglement/test/DomainObjectFactory.js | 2 +- .../test/services/MockCopyService.js | 2 +- .../test/services/MockLinkService.js | 4 ++-- .../test/services/MockMoveService.js | 2 +- .../conductor/test/TestTimeConductor.js | 1 + 6 files changed, 28 insertions(+), 6 deletions(-) diff --git a/platform/entanglement/test/ControlledPromise.js b/platform/entanglement/test/ControlledPromise.js index b555a5333d..0b3fcd6cf6 100644 --- a/platform/entanglement/test/ControlledPromise.js +++ b/platform/entanglement/test/ControlledPromise.js @@ -1,4 +1,25 @@ - +/***************************************************************************** + * Open MCT Web, Copyright (c) 2014-2015, United States Government + * as represented by the Administrator of the National Aeronautics and Space + * Administration. All rights reserved. + * + * Open MCT Web is licensed under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * Open MCT Web includes source code licensed under additional open source + * licenses. See the Open Source Licenses file (LICENSES.md) included with + * this source code distribution or the Licensing information page available + * at runtime from the About dialog for additional information. + *****************************************************************************/ +/*global spyOn*/ define( function () { diff --git a/platform/entanglement/test/DomainObjectFactory.js b/platform/entanglement/test/DomainObjectFactory.js index 5ee26c0a2f..4a11667084 100644 --- a/platform/entanglement/test/DomainObjectFactory.js +++ b/platform/entanglement/test/DomainObjectFactory.js @@ -20,7 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ - +/*global jasmine*/ define( function () { diff --git a/platform/entanglement/test/services/MockCopyService.js b/platform/entanglement/test/services/MockCopyService.js index 0415a01b4b..cf986bec7e 100644 --- a/platform/entanglement/test/services/MockCopyService.js +++ b/platform/entanglement/test/services/MockCopyService.js @@ -20,7 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ - +/*global jasmine*/ define( function () { diff --git a/platform/entanglement/test/services/MockLinkService.js b/platform/entanglement/test/services/MockLinkService.js index 2a5122d871..5345efc86e 100644 --- a/platform/entanglement/test/services/MockLinkService.js +++ b/platform/entanglement/test/services/MockLinkService.js @@ -20,7 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ - +/*global jasmine*/ define( [ '../ControlledPromise' @@ -63,7 +63,7 @@ define( ] ); - mockLinkService.perform.andCallFake(function (object, newParent) { + mockLinkService.perform.andCallFake(function (object) { var performPromise = new ControlledPromise(); this.perform.mostRecentCall.promise = performPromise; diff --git a/platform/entanglement/test/services/MockMoveService.js b/platform/entanglement/test/services/MockMoveService.js index 6136d623c6..d5a290c03f 100644 --- a/platform/entanglement/test/services/MockMoveService.js +++ b/platform/entanglement/test/services/MockMoveService.js @@ -20,7 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ - +/*global jasmine*/ define( function () { diff --git a/platform/features/conductor/test/TestTimeConductor.js b/platform/features/conductor/test/TestTimeConductor.js index 2a0fe7a7a8..52ffb773d4 100644 --- a/platform/features/conductor/test/TestTimeConductor.js +++ b/platform/features/conductor/test/TestTimeConductor.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global spyOn*/ define( ["../src/TimeConductor"], function (TimeConductor) { From 43176cfbb858f6b3050e5716d6d0f89b70ece0c3 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 11:56:31 -0800 Subject: [PATCH 30/53] [Build] Move lint config to gulpfile --- .jshintrc | 22 ---------------------- gulpfile.js | 24 +++++++++++++++++++++++- 2 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 .jshintrc diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index a0109fbce7..0000000000 --- a/.jshintrc +++ /dev/null @@ -1,22 +0,0 @@ -{ - "bitwise": true, - "curly": true, - "eqeqeq": true, - "freeze": true, - "funcscope": true, - "futurehostile": true, - "latedef": true, - "noarg": true, - "nocomma": true, - "nonbsp": true, - "nonew": true, - "predef": [ - "define", - "Blob", - "Float32Array", - "Promise" - ], - "strict": "implied", - "undef": true, - "unused": true -} \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index d96d0ad825..1fab6d5b18 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -56,6 +56,28 @@ var gulp = require('gulp'), mainConfigFile: paths.main, wrapShim: true }, + jshint: { + "bitwise": true, + "curly": true, + "eqeqeq": true, + "freeze": true, + "funcscope": true, + "futurehostile": true, + "latedef": true, + "noarg": true, + "nocomma": true, + "nonbsp": true, + "nonew": true, + "predef": [ + "define", + "Blob", + "Float32Array", + "Promise" + ], + "strict": "implied", + "undef": true, + "unused": true + }, karma: { configFile: path.resolve(__dirname, 'karma.conf.js'), singleRun: true @@ -103,7 +125,7 @@ gulp.task('lint', function () { return "!" + glob; }); return gulp.src(paths.scripts.concat(nonspecs)) - .pipe(jshint()) + .pipe(jshint(options.jshint)) .pipe(jshint.reporter('default')) .pipe(jshint.reporter('fail')); }); From c7f199a59ecfe40f1ddb5cff53898edd96d14a67 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 12:01:11 -0800 Subject: [PATCH 31/53] [Build] Also lint specs ...with additional tolerance declared for Jasmine variables. --- gulpfile.js | 14 ++++++++++---- package.json | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 1fab6d5b18..2caf983d46 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -35,7 +35,9 @@ var gulp = require('gulp'), fs = require('fs'), git = require('git-rev-sync'), moment = require('moment'), + merge = require('merge-stream'), project = require('./package.json'), + _ = require('lodash'), paths = { main: 'main.js', dist: 'dist', @@ -122,10 +124,14 @@ gulp.task('stylesheets', function () { gulp.task('lint', function () { var nonspecs = paths.specs.map(function (glob) { - return "!" + glob; - }); - return gulp.src(paths.scripts.concat(nonspecs)) - .pipe(jshint(options.jshint)) + return "!" + glob; + }), + scriptLint = gulp.src(paths.scripts.concat(nonspecs)) + .pipe(jshint(options.jshint)), + specLint = gulp.src(paths.specs) + .pipe(jshint(_.extend({ jasmine: true }, options.jshint))); + + return merge(scriptLint, specLint) .pipe(jshint.reporter('default')) .pipe(jshint.reporter('fail')); }); diff --git a/package.json b/package.json index c0afb1c9ce..19f45ac089 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "lodash": "^3.10.1", "markdown-toc": "^0.11.7", "marked": "^0.3.5", + "merge-stream": "^1.0.0", "mkdirp": "^0.5.1", "moment": "^2.11.1", "node-bourbon": "^4.2.3", From 7eb7027b671ebaf33a31e4db9504926eb6942cda Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 12:05:00 -0800 Subject: [PATCH 32/53] [Build] Specify browser environment ...such that various browser globals do not need to be individually declared. --- gulpfile.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 2caf983d46..d319738002 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -60,6 +60,7 @@ var gulp = require('gulp'), }, jshint: { "bitwise": true, + "browser": true, "curly": true, "eqeqeq": true, "freeze": true, @@ -72,8 +73,6 @@ var gulp = require('gulp'), "nonew": true, "predef": [ "define", - "Blob", - "Float32Array", "Promise" ], "strict": "implied", From 5920533637e58d5af9ad65e369bad8185192178a Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 12:23:53 -0800 Subject: [PATCH 33/53] [Build] Don't appear to use new for side effects --- platform/commonUI/general/test/SplashScreenManagerSpec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/commonUI/general/test/SplashScreenManagerSpec.js b/platform/commonUI/general/test/SplashScreenManagerSpec.js index 09546971a5..1e82190326 100644 --- a/platform/commonUI/general/test/SplashScreenManagerSpec.js +++ b/platform/commonUI/general/test/SplashScreenManagerSpec.js @@ -52,7 +52,7 @@ define([ describe('when element exists', function () { beforeEach(function () { $document.querySelectorAll.andReturn([splashElement]); - new SplashScreenManager([$document]); + return new SplashScreenManager([$document]); }); it('adds fade out class', function () { @@ -79,7 +79,7 @@ define([ $document.querySelectorAll.andReturn([]); function run() { - new SplashScreenManager([$document]); + return new SplashScreenManager([$document]); } expect(run).not.toThrow(); From e4704517183996685930a7c009c2aaa21b44233a Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 12:30:23 -0800 Subject: [PATCH 34/53] [Build] Declare undefined variables ...to satisfy JSLint for specs. --- platform/search/test/services/GenericSearchProviderSpec.js | 3 ++- platform/search/test/services/GenericSearchWorkerSpec.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/search/test/services/GenericSearchProviderSpec.js b/platform/search/test/services/GenericSearchProviderSpec.js index a6c0e981c8..ecc76f044e 100644 --- a/platform/search/test/services/GenericSearchProviderSpec.js +++ b/platform/search/test/services/GenericSearchProviderSpec.js @@ -30,7 +30,8 @@ define([ ) { describe('GenericSearchProvider', function () { - var $q, + var $timeout, + $q, $log, modelService, models, diff --git a/platform/search/test/services/GenericSearchWorkerSpec.js b/platform/search/test/services/GenericSearchWorkerSpec.js index 44c7c778ba..952d2a4d58 100644 --- a/platform/search/test/services/GenericSearchWorkerSpec.js +++ b/platform/search/test/services/GenericSearchWorkerSpec.js @@ -20,6 +20,8 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global require*/ + /** * SearchSpec. Created by shale on 07/31/2015. */ From d6ec7e9ab883d125f995c176e48f753fd98de145 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 12:56:14 -0800 Subject: [PATCH 35/53] [Build] Remove unused variables from specs ...to satisfy JSHint. --- .../browse/test/creation/CreationServiceSpec.js | 6 ++---- .../browse/test/navigation/NavigateActionSpec.js | 1 - .../browse/test/windowing/NewTabActionSpec.js | 1 - .../edit/test/actions/PropertiesDialogSpec.js | 2 +- .../edit/test/controllers/EditControllerSpec.js | 3 +-- .../test/objects/EditableDomainObjectCacheSpec.js | 3 +-- .../edit/test/objects/EditableDomainObjectSpec.js | 4 ++++ .../edit/test/policies/EditableViewPolicySpec.js | 3 +-- .../edit/test/representers/EditToolbarSpec.js | 2 +- .../commonUI/formats/test/FormatProviderSpec.js | 1 - .../general/test/directives/MCTPopupSpec.js | 8 -------- .../inspect/test/services/InfoServiceSpec.js | 4 ++-- .../test/NotificationIndicatorControllerSpec.js | 13 ++++++------- platform/containment/test/CapabilityTableSpec.js | 2 +- .../test/capabilities/MutationCapabilitySpec.js | 2 +- .../test/capabilities/RelationshipCapabilitySpec.js | 6 ++---- platform/core/test/identifiers/IdentifierSpec.js | 2 +- .../core/test/objects/DomainObjectProviderSpec.js | 6 ------ platform/core/test/services/InstantiateSpec.js | 2 -- platform/core/test/types/TypeProviderSpec.js | 8 +------- platform/core/test/views/ViewProviderSpec.js | 3 +-- .../test/actions/SetPrimaryLocationActionSpec.js | 3 +-- .../entanglement/test/services/CopyServiceSpec.js | 7 ++----- platform/entanglement/test/services/CopyTaskSpec.js | 7 ++----- .../clock/test/controllers/ClockControllerSpec.js | 1 - .../clock/test/controllers/TimerFormatterSpec.js | 4 ---- .../test/ConductorTelemetryDecoratorSpec.js | 10 ---------- .../events/test/policies/MessagesViewPolicySpec.js | 3 +-- .../features/layout/test/LayoutControllerSpec.js | 2 +- .../features/plot/test/PlotOptionsControllerSpec.js | 1 - platform/features/plot/test/PlotOptionsFormSpec.js | 3 +-- .../plot/test/elements/PlotLimitTrackerSpec.js | 1 - .../features/plot/test/elements/PlotPreparerSpec.js | 2 ++ .../features/plot/test/modes/PlotOverlayModeSpec.js | 13 ++----------- .../features/plot/test/modes/PlotStackModeSpec.js | 11 +---------- .../test/controllers/MCTTableControllerSpec.js | 8 -------- .../test/controllers/TableOptionsControllerSpec.js | 8 -------- .../controllers/TelemetryTableControllerSpec.js | 2 -- .../timeline/test/directives/MCTSwimlaneDropSpec.js | 1 - platform/forms/test/MCTFormSpec.js | 3 +-- platform/identity/test/IdentityAggregatorSpec.js | 1 - .../queue/test/PersistenceFailureHandlerSpec.js | 2 +- platform/policy/test/PolicyActionDecoratorSpec.js | 2 +- platform/policy/test/PolicyViewDecoratorSpec.js | 2 +- .../test/actions/ContextMenuActionSpec.js | 7 +++---- .../test/gestures/GestureRepresenterSpec.js | 1 - .../test/controllers/SearchMenuControllerSpec.js | 1 - platform/telemetry/test/TelemetryDelegatorSpec.js | 4 ++++ 48 files changed, 50 insertions(+), 142 deletions(-) diff --git a/platform/commonUI/browse/test/creation/CreationServiceSpec.js b/platform/commonUI/browse/test/creation/CreationServiceSpec.js index deb2ba068b..270f5f8c90 100644 --- a/platform/commonUI/browse/test/creation/CreationServiceSpec.js +++ b/platform/commonUI/browse/test/creation/CreationServiceSpec.js @@ -147,8 +147,7 @@ define( }); it("adds new objects to the parent's composition", function () { - var model = { someKey: "some value" }, - parentModel = { composition: ["notAnyUUID"] }; + var model = { someKey: "some value" }; creationService.createObject(model, mockParentObject); // Verify that a new ID was added @@ -199,8 +198,7 @@ define( it("logs an error when mutaton fails", function () { // If mutation of the parent fails, we've lost the // created object - this is an error. - var model = { someKey: "some value" }, - parentModel = { composition: ["notAnyUUID"] }; + var model = { someKey: "some value" }; mockCompositionCapability.add.andReturn(mockPromise(false)); diff --git a/platform/commonUI/browse/test/navigation/NavigateActionSpec.js b/platform/commonUI/browse/test/navigation/NavigateActionSpec.js index fca6f3bea0..0295651a1f 100644 --- a/platform/commonUI/browse/test/navigation/NavigateActionSpec.js +++ b/platform/commonUI/browse/test/navigation/NavigateActionSpec.js @@ -30,7 +30,6 @@ define( describe("The navigate action", function () { var mockNavigationService, mockQ, - actionContext, mockDomainObject, action; diff --git a/platform/commonUI/browse/test/windowing/NewTabActionSpec.js b/platform/commonUI/browse/test/windowing/NewTabActionSpec.js index 47f02f6c41..335c4fe42b 100644 --- a/platform/commonUI/browse/test/windowing/NewTabActionSpec.js +++ b/platform/commonUI/browse/test/windowing/NewTabActionSpec.js @@ -28,7 +28,6 @@ define( var actionSelected, actionCurrent, mockWindow, - mockDomainObject, mockContextCurrent, mockContextSelected, mockUrlService; diff --git a/platform/commonUI/edit/test/actions/PropertiesDialogSpec.js b/platform/commonUI/edit/test/actions/PropertiesDialogSpec.js index 764d8483c9..2de6c12885 100644 --- a/platform/commonUI/edit/test/actions/PropertiesDialogSpec.js +++ b/platform/commonUI/edit/test/actions/PropertiesDialogSpec.js @@ -26,7 +26,7 @@ define( describe("Properties dialog", function () { - var type, properties, domainObject, model, dialog; + var type, properties, model, dialog; beforeEach(function () { type = { diff --git a/platform/commonUI/edit/test/controllers/EditControllerSpec.js b/platform/commonUI/edit/test/controllers/EditControllerSpec.js index a359d6945b..8c6a1ee31f 100644 --- a/platform/commonUI/edit/test/controllers/EditControllerSpec.js +++ b/platform/commonUI/edit/test/controllers/EditControllerSpec.js @@ -93,8 +93,7 @@ define( }); it("exposes a warning message for unload", function () { - var obj = mockObject, - errorMessage = "Unsaved changes"; + var errorMessage = "Unsaved changes"; // Normally, should be undefined expect(controller.getUnloadWarning()).toBeUndefined(); diff --git a/platform/commonUI/edit/test/objects/EditableDomainObjectCacheSpec.js b/platform/commonUI/edit/test/objects/EditableDomainObjectCacheSpec.js index 127bf6e3e4..edbfd3edc4 100644 --- a/platform/commonUI/edit/test/objects/EditableDomainObjectCacheSpec.js +++ b/platform/commonUI/edit/test/objects/EditableDomainObjectCacheSpec.js @@ -28,7 +28,6 @@ define( var captured, completionCapability, - object, mockQ, mockType, cache; @@ -45,7 +44,7 @@ define( type: mockType }[key]; }, - hasCapability: function (key) { + hasCapability: function () { return false; } }; diff --git a/platform/commonUI/edit/test/objects/EditableDomainObjectSpec.js b/platform/commonUI/edit/test/objects/EditableDomainObjectSpec.js index 3878575237..9b1095f68d 100644 --- a/platform/commonUI/edit/test/objects/EditableDomainObjectSpec.js +++ b/platform/commonUI/edit/test/objects/EditableDomainObjectSpec.js @@ -25,7 +25,11 @@ define( function (EditableDomainObject) { describe("Editable domain object", function () { + var object; + beforeEach(function () { + object = new EditableDomainObject(); + }); }); } ); \ No newline at end of file diff --git a/platform/commonUI/edit/test/policies/EditableViewPolicySpec.js b/platform/commonUI/edit/test/policies/EditableViewPolicySpec.js index 6f432fafeb..2194a8c45a 100644 --- a/platform/commonUI/edit/test/policies/EditableViewPolicySpec.js +++ b/platform/commonUI/edit/test/policies/EditableViewPolicySpec.js @@ -25,8 +25,7 @@ define( function (EditableViewPolicy) { describe("The editable view policy", function () { - var testView, - mockDomainObject, + var mockDomainObject, testMode, policy; diff --git a/platform/commonUI/edit/test/representers/EditToolbarSpec.js b/platform/commonUI/edit/test/representers/EditToolbarSpec.js index 9a5488d356..a252b32612 100644 --- a/platform/commonUI/edit/test/representers/EditToolbarSpec.js +++ b/platform/commonUI/edit/test/representers/EditToolbarSpec.js @@ -147,7 +147,7 @@ define( }); it("invokes setters on update", function () { - var structure, state; + var structure; testABC.a = jasmine.createSpy('a'); diff --git a/platform/commonUI/formats/test/FormatProviderSpec.js b/platform/commonUI/formats/test/FormatProviderSpec.js index d66f9f8a5d..527a0182af 100644 --- a/platform/commonUI/formats/test/FormatProviderSpec.js +++ b/platform/commonUI/formats/test/FormatProviderSpec.js @@ -28,7 +28,6 @@ define( describe("The FormatProvider", function () { var mockFormats, - mockLog, mockFormatInstances, provider; diff --git a/platform/commonUI/general/test/directives/MCTPopupSpec.js b/platform/commonUI/general/test/directives/MCTPopupSpec.js index 065b916c32..bfe6b469cb 100644 --- a/platform/commonUI/general/test/directives/MCTPopupSpec.js +++ b/platform/commonUI/general/test/directives/MCTPopupSpec.js @@ -40,14 +40,6 @@ define( testRect, mctPopup; - function testEvent(x, y) { - return { - pageX: x, - pageY: y, - preventDefault: jasmine.createSpy("preventDefault") - }; - } - beforeEach(function () { mockCompile = jasmine.createSpy("$compile"); diff --git a/platform/commonUI/inspect/test/services/InfoServiceSpec.js b/platform/commonUI/inspect/test/services/InfoServiceSpec.js index 167b940360..1f5c315041 100644 --- a/platform/commonUI/inspect/test/services/InfoServiceSpec.js +++ b/platform/commonUI/inspect/test/services/InfoServiceSpec.js @@ -21,8 +21,8 @@ *****************************************************************************/ define( - ['../../src/services/InfoService', '../../src/InfoConstants'], - function (InfoService, InfoConstants) { + ['../../src/services/InfoService'], + function (InfoService) { describe("The info service", function () { var mockCompile, diff --git a/platform/commonUI/notification/test/NotificationIndicatorControllerSpec.js b/platform/commonUI/notification/test/NotificationIndicatorControllerSpec.js index 0af266ad19..a6acd28417 100644 --- a/platform/commonUI/notification/test/NotificationIndicatorControllerSpec.js +++ b/platform/commonUI/notification/test/NotificationIndicatorControllerSpec.js @@ -27,7 +27,8 @@ define( describe("The notification indicator controller ", function () { var mockNotificationService, mockScope, - mockDialogService; + mockDialogService, + controller; beforeEach(function(){ mockNotificationService = jasmine.createSpy("notificationService"); @@ -36,19 +37,18 @@ define( "dialogService", ["getDialogResponse","dismiss"] ); - }); - - it("exposes the highest notification severity to the template", function() { mockNotificationService.highest = { severity: "error" }; - var controller = new NotificationIndicatorController(mockScope, mockNotificationService, mockDialogService); + controller = new NotificationIndicatorController(mockScope, mockNotificationService, mockDialogService); + }); + + it("exposes the highest notification severity to the template", function() { expect(mockScope.highest).toBeTruthy(); expect(mockScope.highest.severity).toBe("error"); }); it("invokes the dialog service to show list of messages", function() { - var controller = new NotificationIndicatorController(mockScope, mockNotificationService, mockDialogService); expect(mockScope.showNotificationsList).toBeDefined(); mockScope.showNotificationsList(); expect(mockDialogService.getDialogResponse).toHaveBeenCalled(); @@ -61,7 +61,6 @@ define( }); it("provides a means of dismissing the message list", function() { - var controller = new NotificationIndicatorController(mockScope, mockNotificationService, mockDialogService); expect(mockScope.showNotificationsList).toBeDefined(); mockScope.showNotificationsList(); expect(mockDialogService.getDialogResponse).toHaveBeenCalled(); diff --git a/platform/containment/test/CapabilityTableSpec.js b/platform/containment/test/CapabilityTableSpec.js index 79a86d45d5..76fbd6ffcd 100644 --- a/platform/containment/test/CapabilityTableSpec.js +++ b/platform/containment/test/CapabilityTableSpec.js @@ -39,7 +39,7 @@ define( [ 'getCapabilities' ] ); // Both types can only contain b, let's say - mockTypes = ['a', 'b'].map(function (type, index) { + mockTypes = ['a', 'b'].map(function (type) { var mockType = jasmine.createSpyObj( 'type-' + type, ['getKey', 'getDefinition', 'getInitialModel'] diff --git a/platform/core/test/capabilities/MutationCapabilitySpec.js b/platform/core/test/capabilities/MutationCapabilitySpec.js index 28aa983144..bb6070b154 100644 --- a/platform/core/test/capabilities/MutationCapabilitySpec.js +++ b/platform/core/test/capabilities/MutationCapabilitySpec.js @@ -60,7 +60,7 @@ define( }); it("allows setting a model", function () { - mutation.invoke(function (m) { + mutation.invoke(function () { return { someKey: "some value" }; }); expect(testModel.number).toBeUndefined(); diff --git a/platform/core/test/capabilities/RelationshipCapabilitySpec.js b/platform/core/test/capabilities/RelationshipCapabilitySpec.js index f3130326c6..6b69a9b615 100644 --- a/platform/core/test/capabilities/RelationshipCapabilitySpec.js +++ b/platform/core/test/capabilities/RelationshipCapabilitySpec.js @@ -104,10 +104,8 @@ define( }); it("avoids redundant requests", function () { - // Lookups can be expensive, so this capability + // Lookups can be expensive, so this capability // should have some self-caching - var response; - mockDomainObject.getModel .andReturn({ relationships: { xyz: ['a'] } }); @@ -123,7 +121,7 @@ define( it("makes new requests on modification", function () { // Lookups can be expensive, so this capability // should have some self-caching - var response, testModel; + var testModel; testModel = { relationships: { xyz: ['a'] } }; diff --git a/platform/core/test/identifiers/IdentifierSpec.js b/platform/core/test/identifiers/IdentifierSpec.js index 37fee4b82a..e54a853712 100644 --- a/platform/core/test/identifiers/IdentifierSpec.js +++ b/platform/core/test/identifiers/IdentifierSpec.js @@ -34,7 +34,7 @@ define( }); describe("when space is encoded", function () { - var idSpace, idKey, spacedId; + var idSpace, idKey; beforeEach(function () { idSpace = "a-specific-space"; diff --git a/platform/core/test/objects/DomainObjectProviderSpec.js b/platform/core/test/objects/DomainObjectProviderSpec.js index 19aa95bc24..6da0d122b5 100644 --- a/platform/core/test/objects/DomainObjectProviderSpec.js +++ b/platform/core/test/objects/DomainObjectProviderSpec.js @@ -46,12 +46,6 @@ define( }; } - function mockAll(mockPromises) { - return mockPromise(mockPromises.map(function (p) { - return mockPromise(p).testValue; - })); - } - beforeEach(function () { mockModelService = jasmine.createSpyObj( "modelService", diff --git a/platform/core/test/services/InstantiateSpec.js b/platform/core/test/services/InstantiateSpec.js index bd609de8ef..0d32f9fa0e 100644 --- a/platform/core/test/services/InstantiateSpec.js +++ b/platform/core/test/services/InstantiateSpec.js @@ -30,8 +30,6 @@ define( mockIdentifierService, mockCapabilityConstructor, mockCapabilityInstance, - mockCapabilities, - mockIdentifier, idCounter, testModel, instantiate, diff --git a/platform/core/test/types/TypeProviderSpec.js b/platform/core/test/types/TypeProviderSpec.js index d178564e2e..3f687764d3 100644 --- a/platform/core/test/types/TypeProviderSpec.js +++ b/platform/core/test/types/TypeProviderSpec.js @@ -26,13 +26,7 @@ define( describe("Type provider", function () { - var captured = {}, - capture = function (name) { - return function (value) { - captured[name] = value; - }; - }, - testTypeDefinitions = [ + var testTypeDefinitions = [ { key: 'basic', glyph: "X", diff --git a/platform/core/test/views/ViewProviderSpec.js b/platform/core/test/views/ViewProviderSpec.js index 936bb903b4..0029527bbb 100644 --- a/platform/core/test/views/ViewProviderSpec.js +++ b/platform/core/test/views/ViewProviderSpec.js @@ -133,8 +133,7 @@ define( }); it("enforces view restrictions from types", function () { - var testType = "testType", - testView = { key: "x" }, + var testView = { key: "x" }, provider = new ViewProvider([testView], mockLog); // Include a "type" capability diff --git a/platform/entanglement/test/actions/SetPrimaryLocationActionSpec.js b/platform/entanglement/test/actions/SetPrimaryLocationActionSpec.js index db6e805a3e..ca4c1671ec 100644 --- a/platform/entanglement/test/actions/SetPrimaryLocationActionSpec.js +++ b/platform/entanglement/test/actions/SetPrimaryLocationActionSpec.js @@ -32,8 +32,7 @@ define( var testContext, testModel, testId, - mockLocationCapability, - mockContextCapability; + mockLocationCapability; beforeEach(function () { testId = "some-id"; diff --git a/platform/entanglement/test/services/CopyServiceSpec.js b/platform/entanglement/test/services/CopyServiceSpec.js index e020a828b3..c036de1ec6 100644 --- a/platform/entanglement/test/services/CopyServiceSpec.js +++ b/platform/entanglement/test/services/CopyServiceSpec.js @@ -124,10 +124,8 @@ define( var mockQ, mockDeferred, - creationService, createObjectPromise, copyService, - mockNow, object, newParent, copyResult, @@ -172,7 +170,7 @@ define( 'mockDeferred', ['notify', 'resolve', 'reject'] ); - mockDeferred.notify.andCallFake(function(notification){}); + mockDeferred.notify.andCallFake(function(){}); mockDeferred.resolve.andCallFake(function(value){resolvedValue = value;}); mockDeferred.promise = { then: function(callback){ @@ -271,8 +269,7 @@ define( }); describe("on domainObject with composition", function () { - var newObject, - childObject, + var childObject, objectClone, childObjectClone, compositionPromise; diff --git a/platform/entanglement/test/services/CopyTaskSpec.js b/platform/entanglement/test/services/CopyTaskSpec.js index 6f97db7fe0..32302edb04 100644 --- a/platform/entanglement/test/services/CopyTaskSpec.js +++ b/platform/entanglement/test/services/CopyTaskSpec.js @@ -187,8 +187,7 @@ define( describe("copies object trees with multiple references to the" + " same object", function () { - var model, - mockDomainObjectB, + var mockDomainObjectB, mockComposingObject, composingObjectModel, domainObjectClone, @@ -252,9 +251,7 @@ define( it(" and correctly updates child identifiers in object" + " arrays within models ", function () { var childA_ID = task.clones[0].getId(), - childB_ID = task.clones[1].getId(), - childC_ID = task.clones[3].getId(), - childD_ID = task.clones[4].getId(); + childB_ID = task.clones[1].getId(); expect(domainObjectClone.model.objArr[0].id).not.toBe(ID_A); expect(domainObjectClone.model.objArr[0].id).toBe(childA_ID); diff --git a/platform/features/clock/test/controllers/ClockControllerSpec.js b/platform/features/clock/test/controllers/ClockControllerSpec.js index c453ca356d..3ee76596fb 100644 --- a/platform/features/clock/test/controllers/ClockControllerSpec.js +++ b/platform/features/clock/test/controllers/ClockControllerSpec.js @@ -31,7 +31,6 @@ define( var mockScope, mockTicker, mockUnticker, - mockDomainObject, controller; beforeEach(function () { diff --git a/platform/features/clock/test/controllers/TimerFormatterSpec.js b/platform/features/clock/test/controllers/TimerFormatterSpec.js index 9a54685f21..58f91edad7 100644 --- a/platform/features/clock/test/controllers/TimerFormatterSpec.js +++ b/platform/features/clock/test/controllers/TimerFormatterSpec.js @@ -45,10 +45,6 @@ define( ].reduce(sum, 0); } - function twoDigits(n) { - return n < 10 ? ('0' + n) : n; - } - it("formats short-form values (no days)", function () { expect(formatter.short(toDuration(0, 123, 2, 3) + 123)) .toEqual("123:02:03"); diff --git a/platform/features/conductor/test/ConductorTelemetryDecoratorSpec.js b/platform/features/conductor/test/ConductorTelemetryDecoratorSpec.js index 914fbf0e3b..aa7757423b 100644 --- a/platform/features/conductor/test/ConductorTelemetryDecoratorSpec.js +++ b/platform/features/conductor/test/ConductorTelemetryDecoratorSpec.js @@ -33,16 +33,6 @@ define( mockSeries, decorator; - function seriesIsInWindow(series) { - var i, v, inWindow = true; - for (i = 0; i < series.getPointCount(); i += 1) { - v = series.getDomainValue(i); - inWindow = inWindow && (v >= mockConductor.displayStart()); - inWindow = inWindow && (v <= mockConductor.displayEnd()); - } - return inWindow; - } - beforeEach(function () { mockTelemetryService = jasmine.createSpyObj( 'telemetryService', diff --git a/platform/features/events/test/policies/MessagesViewPolicySpec.js b/platform/features/events/test/policies/MessagesViewPolicySpec.js index 95542fa2c3..f890dda91a 100644 --- a/platform/features/events/test/policies/MessagesViewPolicySpec.js +++ b/platform/features/events/test/policies/MessagesViewPolicySpec.js @@ -30,7 +30,6 @@ define( describe("The messages view policy", function () { var mockDomainObject, mockTelemetry, - telemetryType, testType, testView, testMetadata, @@ -50,7 +49,7 @@ define( ['getMetadata'] ); - mockDomainObject.getModel.andCallFake(function (c) { + mockDomainObject.getModel.andCallFake(function () { return {type: testType}; }); mockDomainObject.getCapability.andCallFake(function (c) { diff --git a/platform/features/layout/test/LayoutControllerSpec.js b/platform/features/layout/test/LayoutControllerSpec.js index 85efaec5bd..ebd778cb7e 100644 --- a/platform/features/layout/test/LayoutControllerSpec.js +++ b/platform/features/layout/test/LayoutControllerSpec.js @@ -235,7 +235,7 @@ define( }); it("ensures a minimum frame size", function () { - var styleB, styleC; + var styleB; // Start with a very small frame size testModel.layoutGrid = [ 1, 1 ]; diff --git a/platform/features/plot/test/PlotOptionsControllerSpec.js b/platform/features/plot/test/PlotOptionsControllerSpec.js index 6584ccfe78..caaf66182a 100644 --- a/platform/features/plot/test/PlotOptionsControllerSpec.js +++ b/platform/features/plot/test/PlotOptionsControllerSpec.js @@ -32,7 +32,6 @@ define( mockCompositionCapability, mockComposition, mockUnlisten, - mockFormUnlisten, mockChildOne, mockChildTwo, model, diff --git a/platform/features/plot/test/PlotOptionsFormSpec.js b/platform/features/plot/test/PlotOptionsFormSpec.js index 6ee5a25ac6..bb35d532f4 100644 --- a/platform/features/plot/test/PlotOptionsFormSpec.js +++ b/platform/features/plot/test/PlotOptionsFormSpec.js @@ -25,8 +25,7 @@ define( function (PlotOptionsForm) { describe("The Plot Options form", function () { - var plotOptionsForm, - listener; + var plotOptionsForm; beforeEach(function () { diff --git a/platform/features/plot/test/elements/PlotLimitTrackerSpec.js b/platform/features/plot/test/elements/PlotLimitTrackerSpec.js index 3e080b9e87..d37507c628 100644 --- a/platform/features/plot/test/elements/PlotLimitTrackerSpec.js +++ b/platform/features/plot/test/elements/PlotLimitTrackerSpec.js @@ -29,7 +29,6 @@ define( testRange, mockTelemetryObjects, testData, - mockLimitCapabilities, tracker; beforeEach(function () { diff --git a/platform/features/plot/test/elements/PlotPreparerSpec.js b/platform/features/plot/test/elements/PlotPreparerSpec.js index fd0535bd91..414c3b56e1 100644 --- a/platform/features/plot/test/elements/PlotPreparerSpec.js +++ b/platform/features/plot/test/elements/PlotPreparerSpec.js @@ -61,6 +61,8 @@ define( var datas = [makeMockData(1)], preparer = new PlotPreparer(datas, "testDomain", "testRange"); + expect(preparer).toBeDefined(); + expect(datas[0].getDomainValue).toHaveBeenCalledWith( jasmine.any(Number), "testDomain" diff --git a/platform/features/plot/test/modes/PlotOverlayModeSpec.js b/platform/features/plot/test/modes/PlotOverlayModeSpec.js index 2f86c0e11e..0560d428f7 100644 --- a/platform/features/plot/test/modes/PlotOverlayModeSpec.js +++ b/platform/features/plot/test/modes/PlotOverlayModeSpec.js @@ -30,20 +30,11 @@ define( describe("Overlaid plot mode", function () { var mockDomainObject, mockSubPlotFactory, - mockSubPlot, mockPrepared, testBuffers, testDrawingObjects, mode; - function mockElement(x, y, w, h) { - return { - getBoundingClientRect: function () { - return { left: x, top: y, width: w, height: h }; - } - }; - } - function createMockSubPlot() { var mockSubPlot = jasmine.createSpyObj( "subPlot", @@ -127,7 +118,7 @@ define( mode.plotTelemetry(mockPrepared); // Should have one sub-plot with three lines - testDrawingObjects.forEach(function (testDrawingObject, i) { + testDrawingObjects.forEach(function (testDrawingObject) { // Either empty list or undefined is fine; // just want to make sure there are no lines. expect(testDrawingObject.lines.length) @@ -178,7 +169,7 @@ define( }); // Step back the same number of zoom changes - mockSubPlotFactory.createSubPlot.calls.forEach(function (c) { + mockSubPlotFactory.createSubPlot.calls.forEach(function () { // Should still be zoomed at start of each iteration expect(mode.isZoomed()).toBeTruthy(); // Step back one of the zoom changes. diff --git a/platform/features/plot/test/modes/PlotStackModeSpec.js b/platform/features/plot/test/modes/PlotStackModeSpec.js index db052dbe5c..cf4407e7e0 100644 --- a/platform/features/plot/test/modes/PlotStackModeSpec.js +++ b/platform/features/plot/test/modes/PlotStackModeSpec.js @@ -30,20 +30,11 @@ define( describe("Stacked plot mode", function () { var mockDomainObject, mockSubPlotFactory, - mockSubPlot, mockPrepared, testBuffers, testDrawingObjects, mode; - function mockElement(x, y, w, h) { - return { - getBoundingClientRect: function () { - return { left: x, top: y, width: w, height: h }; - } - }; - } - function createMockSubPlot() { var mockSubPlot = jasmine.createSpyObj( "subPlot", @@ -172,7 +163,7 @@ define( }); // Step back the same number of zoom changes - mockSubPlotFactory.createSubPlot.calls.forEach(function (c) { + mockSubPlotFactory.createSubPlot.calls.forEach(function () { // Should still be zoomed at start of each iteration expect(mode.isZoomed()).toBeTruthy(); // Step back diff --git a/platform/features/table/test/controllers/MCTTableControllerSpec.js b/platform/features/table/test/controllers/MCTTableControllerSpec.js index f9c7ff50c7..4fe4be7df3 100644 --- a/platform/features/table/test/controllers/MCTTableControllerSpec.js +++ b/platform/features/table/test/controllers/MCTTableControllerSpec.js @@ -34,14 +34,6 @@ define( mockTimeout, mockElement; - function promise(value) { - return { - then: function (callback){ - return promise(callback(value)); - } - }; - } - beforeEach(function() { watches = {}; diff --git a/platform/features/table/test/controllers/TableOptionsControllerSpec.js b/platform/features/table/test/controllers/TableOptionsControllerSpec.js index 7976aecafd..4838f2e6ac 100644 --- a/platform/features/table/test/controllers/TableOptionsControllerSpec.js +++ b/platform/features/table/test/controllers/TableOptionsControllerSpec.js @@ -32,14 +32,6 @@ define( controller, mockScope; - function promise(value) { - return { - then: function (callback){ - return promise(callback(value)); - } - }; - } - beforeEach(function() { mockCapability = jasmine.createSpyObj('mutationCapability', [ 'listen' diff --git a/platform/features/table/test/controllers/TelemetryTableControllerSpec.js b/platform/features/table/test/controllers/TelemetryTableControllerSpec.js index 548e0ea733..91e6a05315 100644 --- a/platform/features/table/test/controllers/TelemetryTableControllerSpec.js +++ b/platform/features/table/test/controllers/TelemetryTableControllerSpec.js @@ -130,8 +130,6 @@ define( it('to create column configuration, which is written to the' + ' object model', function() { - var mockModel = {}; - controller.setup(); expect(mockTable.getColumnConfiguration).toHaveBeenCalled(); expect(mockTable.saveColumnConfiguration).toHaveBeenCalled(); diff --git a/platform/features/timeline/test/directives/MCTSwimlaneDropSpec.js b/platform/features/timeline/test/directives/MCTSwimlaneDropSpec.js index 0ae16394a0..60891567cc 100644 --- a/platform/features/timeline/test/directives/MCTSwimlaneDropSpec.js +++ b/platform/features/timeline/test/directives/MCTSwimlaneDropSpec.js @@ -33,7 +33,6 @@ define( mockElement, testAttrs, mockSwimlane, - mockRealElement, testEvent, handlers, directive; diff --git a/platform/forms/test/MCTFormSpec.js b/platform/forms/test/MCTFormSpec.js index 7b5563f6ae..0be985212e 100644 --- a/platform/forms/test/MCTFormSpec.js +++ b/platform/forms/test/MCTFormSpec.js @@ -29,8 +29,7 @@ define( mctForm; function installController() { - var controllerProperty = mctForm.controller, - Controller = mctForm.controller[1]; + var Controller = mctForm.controller[1]; return new Controller(mockScope); } diff --git a/platform/identity/test/IdentityAggregatorSpec.js b/platform/identity/test/IdentityAggregatorSpec.js index 242ff95eca..c61e8b805b 100644 --- a/platform/identity/test/IdentityAggregatorSpec.js +++ b/platform/identity/test/IdentityAggregatorSpec.js @@ -28,7 +28,6 @@ define( var mockProviders, mockQ, resolves, - mockPromise, mockCallback, testUsers, aggregator; diff --git a/platform/persistence/queue/test/PersistenceFailureHandlerSpec.js b/platform/persistence/queue/test/PersistenceFailureHandlerSpec.js index e6a5f9cc27..7bb0fe8a04 100644 --- a/platform/persistence/queue/test/PersistenceFailureHandlerSpec.js +++ b/platform/persistence/queue/test/PersistenceFailureHandlerSpec.js @@ -104,7 +104,7 @@ define( // User chooses overwrite mockPromise.then.mostRecentCall.args[0](false); // Should refresh, but not remutate, and requeue all objects - mockFailures.forEach(function (mockFailure, i) { + mockFailures.forEach(function (mockFailure) { expect(mockFailure.persistence.refresh).toHaveBeenCalled(); expect(mockFailure.requeue).not.toHaveBeenCalled(); expect(mockFailure.domainObject.useCapability).not.toHaveBeenCalled(); diff --git a/platform/policy/test/PolicyActionDecoratorSpec.js b/platform/policy/test/PolicyActionDecoratorSpec.js index a098d508e4..fb9c7b6724 100644 --- a/platform/policy/test/PolicyActionDecoratorSpec.js +++ b/platform/policy/test/PolicyActionDecoratorSpec.js @@ -86,7 +86,7 @@ define( it("filters out policy-disallowed actions", function () { // Disallow the second action - mockPolicyService.allow.andCallFake(function (cat, candidate, ctxt) { + mockPolicyService.allow.andCallFake(function (cat, candidate) { return candidate.someKey !== 'b'; }); expect(decorator.getActions(testContext)) diff --git a/platform/policy/test/PolicyViewDecoratorSpec.js b/platform/policy/test/PolicyViewDecoratorSpec.js index 30829f46ce..91e86e9bd1 100644 --- a/platform/policy/test/PolicyViewDecoratorSpec.js +++ b/platform/policy/test/PolicyViewDecoratorSpec.js @@ -90,7 +90,7 @@ define( it("filters out policy-disallowed views", function () { // Disallow the second action - mockPolicyService.allow.andCallFake(function (cat, candidate, ctxt) { + mockPolicyService.allow.andCallFake(function (cat, candidate) { return candidate.someKey !== 'b'; }); expect(decorator.getViews(mockDomainObject)) diff --git a/platform/representation/test/actions/ContextMenuActionSpec.js b/platform/representation/test/actions/ContextMenuActionSpec.js index 3af48fb3c5..bab5a311f5 100644 --- a/platform/representation/test/actions/ContextMenuActionSpec.js +++ b/platform/representation/test/actions/ContextMenuActionSpec.js @@ -25,12 +25,11 @@ * Module defining ContextMenuActionSpec. Created by shale on 07/02/2015. */ define( - ["../../src/actions/ContextMenuAction", "../../src/gestures/GestureConstants"], - function (ContextMenuAction, GestureConstants) { + ["../../src/actions/ContextMenuAction"], + function (ContextMenuAction) { var JQLITE_FUNCTIONS = [ "on", "off", "find", "append", "remove" ], - DOMAIN_OBJECT_METHODS = [ "getId", "getModel", "getCapability", "hasCapability", "useCapability" ], - MENU_DIMENSIONS = GestureConstants.MCT_MENU_DIMENSIONS; + DOMAIN_OBJECT_METHODS = [ "getId", "getModel", "getCapability", "hasCapability", "useCapability" ]; describe("The 'context menu' action", function () { diff --git a/platform/representation/test/gestures/GestureRepresenterSpec.js b/platform/representation/test/gestures/GestureRepresenterSpec.js index ceffa2e734..f66696ed99 100644 --- a/platform/representation/test/gestures/GestureRepresenterSpec.js +++ b/platform/representation/test/gestures/GestureRepresenterSpec.js @@ -27,7 +27,6 @@ define( describe("A gesture representer", function () { var mockGestureService, mockGestureHandle, - mockScope, mockElement, representer; diff --git a/platform/search/test/controllers/SearchMenuControllerSpec.js b/platform/search/test/controllers/SearchMenuControllerSpec.js index 1c0949a67c..bff6dab569 100644 --- a/platform/search/test/controllers/SearchMenuControllerSpec.js +++ b/platform/search/test/controllers/SearchMenuControllerSpec.js @@ -29,7 +29,6 @@ define( describe("The search menu controller", function () { var mockScope, - mockPromise, mockTypes, controller; diff --git a/platform/telemetry/test/TelemetryDelegatorSpec.js b/platform/telemetry/test/TelemetryDelegatorSpec.js index 5c5897cf30..0841020449 100644 --- a/platform/telemetry/test/TelemetryDelegatorSpec.js +++ b/platform/telemetry/test/TelemetryDelegatorSpec.js @@ -25,7 +25,11 @@ define( function (TelemetryDelegator) { describe("The telemetry delegator", function () { + var delegator; + beforeEach(function () { + delegator = new TelemetryDelegator(); + }); }); } ); From 8b5a425da6eebb47fd0596c3b2f7601880c77daa Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 13:03:41 -0800 Subject: [PATCH 36/53] [Build] Restore erroneously-removed variable --- platform/core/test/types/TypeProviderSpec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/core/test/types/TypeProviderSpec.js b/platform/core/test/types/TypeProviderSpec.js index 3f687764d3..d876c9fa08 100644 --- a/platform/core/test/types/TypeProviderSpec.js +++ b/platform/core/test/types/TypeProviderSpec.js @@ -26,7 +26,8 @@ define( describe("Type provider", function () { - var testTypeDefinitions = [ + var captured = {}, + testTypeDefinitions = [ { key: 'basic', glyph: "X", From fb56b3ad56f4cdc628e46d80a42d288f9a3a0ef2 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 13:04:06 -0800 Subject: [PATCH 37/53] [Build] Enable forin check for JSHint --- gulpfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulpfile.js b/gulpfile.js index d319738002..80a668b87c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -63,6 +63,7 @@ var gulp = require('gulp'), "browser": true, "curly": true, "eqeqeq": true, + "forin": true, "freeze": true, "funcscope": true, "futurehostile": true, From 134452582c5c1c8e9c0d4dc150609b8b3fa2c8ca Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 13:10:23 -0800 Subject: [PATCH 38/53] [Build] Remove/qualify for-in usages --- .../capabilities/EditableLookupCapability.js | 2 +- .../src/controllers/SearchMenuController.js | 6 ++---- .../controllers/SearchMenuControllerSpec.js | 20 +++++++------------ 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/platform/commonUI/edit/src/capabilities/EditableLookupCapability.js b/platform/commonUI/edit/src/capabilities/EditableLookupCapability.js index a0c8add0c3..0abde97c5a 100644 --- a/platform/commonUI/edit/src/capabilities/EditableLookupCapability.js +++ b/platform/commonUI/edit/src/capabilities/EditableLookupCapability.js @@ -24,7 +24,7 @@ define( [], function () { - + /*jshint forin:false */ /** * Wrapper for both "context" and "composition" capabilities; * ensures that any domain objects reachable in Edit mode diff --git a/platform/search/src/controllers/SearchMenuController.js b/platform/search/src/controllers/SearchMenuController.js index 154f746a53..2f369929ab 100644 --- a/platform/search/src/controllers/SearchMenuController.js +++ b/platform/search/src/controllers/SearchMenuController.js @@ -90,12 +90,10 @@ define(function () { // For documentation, see checkAll below function checkAll() { - var type; - // Reset all the other options to original/default position - for (type in $scope.ngModel.checked) { + Object.keys($scope.ngModel.checked).forEach(function (type) { $scope.ngModel.checked[type] = false; - } + }); // Change the filters string depending on checkAll status if ($scope.ngModel.checkAll) { diff --git a/platform/search/test/controllers/SearchMenuControllerSpec.js b/platform/search/test/controllers/SearchMenuControllerSpec.js index bff6dab569..68f8930431 100644 --- a/platform/search/test/controllers/SearchMenuControllerSpec.js +++ b/platform/search/test/controllers/SearchMenuControllerSpec.js @@ -87,24 +87,20 @@ define( }); it("checking checkAll option resets other options", function () { - var type; - mockScope.ngModel.checked['mock.type.1'] = true; mockScope.ngModel.checked['mock.type.2'] = true; controller.checkAll(); - - for (type in mockScope.ngModel.checked) { + + Object.keys(mockScope.ngModel.checked).forEach(function (type) { expect(mockScope.ngModel.checked[type]).toBeFalsy(); - } + }); }); it("tells the user when no options are checked", function () { - var type; - - for (type in mockScope.ngModel.checked) { + Object.keys(mockScope.ngModel.checked).forEach(function (type) { mockScope.ngModel.checked[type] = false; - } + }); mockScope.ngModel.checkAll = false; controller.updateOptions(); @@ -113,12 +109,10 @@ define( }); it("tells the user when options are checked", function () { - var type; - mockScope.ngModel.checkAll = false; - for (type in mockScope.ngModel.checked) { + Object.keys(mockScope.ngModel.checked).forEach(function (type) { mockScope.ngModel.checked[type] = true; - } + }); controller.updateOptions(); From 22be6bc86027180ad0a8ed996a25f45604840554 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 4 Mar 2016 16:16:35 -0800 Subject: [PATCH 39/53] [Build] Run lint task from CircleCI https://github.com/nasa/openmctweb/pull/724#issuecomment-192487995 --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index d163b3ee0c..e2f670e899 100644 --- a/circle.yml +++ b/circle.yml @@ -15,4 +15,4 @@ deployment: appname: openmctweb-staging-deux test: post: - - npm run jshint --silent + - gulp lint From 50884537125d743259b30d95f7ffa69d713f2b6c Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Apr 2016 16:11:12 -0700 Subject: [PATCH 40/53] [Build] Remove use strict, global Remove usages of use strict and global declarations that are no longer necessary with JSHint configuration, from files added/changed since #724 --- platform/commonUI/edit/src/policies/EditableLinkPolicy.js | 2 -- platform/commonUI/general/src/ui/TreeLabelView.js | 2 -- platform/commonUI/general/src/ui/TreeNodeView.js | 2 -- platform/commonUI/general/src/ui/TreeView.js | 2 -- platform/commonUI/general/test/directives/MCTTreeSpec.js | 1 - platform/commonUI/general/test/ui/TreeViewSpec.js | 2 -- platform/core/src/models/ModelCacheService.js | 2 -- platform/core/test/models/ModelCacheServiceSpec.js | 2 -- platform/entanglement/src/policies/CopyPolicy.js | 2 -- platform/entanglement/src/policies/MovePolicy.js | 2 -- platform/entanglement/test/ControlledPromise.js | 1 - platform/entanglement/test/DomainObjectFactory.js | 1 - platform/entanglement/test/policies/CopyPolicySpec.js | 2 -- platform/entanglement/test/policies/MovePolicySpec.js | 2 -- platform/entanglement/test/services/MockCopyService.js | 1 - platform/entanglement/test/services/MockLinkService.js | 1 - platform/entanglement/test/services/MockMoveService.js | 1 - platform/features/conductor/test/TestTimeConductor.js | 1 - .../table/src/controllers/RTTelemetryTableController.js | 2 -- .../table/test/controllers/RTTelemetryTableControllerSpec.js | 2 -- platform/features/timeline/src/actions/CompositionColumn.js | 2 -- .../features/timeline/src/actions/ExportTimelineAsCSVAction.js | 2 -- .../features/timeline/src/actions/ExportTimelineAsCSVTask.js | 2 -- platform/features/timeline/src/actions/IdColumn.js | 2 -- platform/features/timeline/src/actions/MetadataColumn.js | 2 -- platform/features/timeline/src/actions/ModeColumn.js | 2 -- platform/features/timeline/src/actions/TimelineColumnizer.js | 2 -- platform/features/timeline/src/actions/TimelineTraverser.js | 2 -- platform/features/timeline/src/actions/TimespanColumn.js | 2 -- .../features/timeline/test/actions/CompositionColumnSpec.js | 1 - .../timeline/test/actions/ExportTimelineAsCSVActionSpec.js | 1 - .../timeline/test/actions/ExportTimelineAsCSVTaskSpec.js | 2 -- platform/features/timeline/test/actions/IdColumnSpec.js | 1 - platform/features/timeline/test/actions/MetadataColumnSpec.js | 1 - platform/features/timeline/test/actions/ModeColumnSpec.js | 1 - .../features/timeline/test/actions/TimelineColumnizerSpec.js | 1 - .../features/timeline/test/actions/TimelineTraverserSpec.js | 2 -- platform/features/timeline/test/actions/TimespanColumnSpec.js | 1 - platform/framework/src/FrameworkLayer.js | 1 - platform/framework/src/Main.js | 1 - platform/search/src/services/GenericSearchWorker.js | 1 - platform/search/test/services/GenericSearchWorkerSpec.js | 1 - 42 files changed, 66 deletions(-) diff --git a/platform/commonUI/edit/src/policies/EditableLinkPolicy.js b/platform/commonUI/edit/src/policies/EditableLinkPolicy.js index ad3043df2d..c311266cf8 100644 --- a/platform/commonUI/edit/src/policies/EditableLinkPolicy.js +++ b/platform/commonUI/edit/src/policies/EditableLinkPolicy.js @@ -19,10 +19,8 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([], function () { - "use strict"; /** * Policy suppressing links when the linked-to domain object is in diff --git a/platform/commonUI/general/src/ui/TreeLabelView.js b/platform/commonUI/general/src/ui/TreeLabelView.js index 75e8efcc29..d5dffb0068 100644 --- a/platform/commonUI/general/src/ui/TreeLabelView.js +++ b/platform/commonUI/general/src/ui/TreeLabelView.js @@ -19,13 +19,11 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([ 'zepto', 'text!../../res/templates/tree/tree-label.html' ], function ($, labelTemplate) { - 'use strict'; function TreeLabelView(gestureService) { this.el = $(labelTemplate); diff --git a/platform/commonUI/general/src/ui/TreeNodeView.js b/platform/commonUI/general/src/ui/TreeNodeView.js index 14ff0f3233..2cff198e76 100644 --- a/platform/commonUI/general/src/ui/TreeNodeView.js +++ b/platform/commonUI/general/src/ui/TreeNodeView.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([ 'zepto', @@ -27,7 +26,6 @@ define([ './ToggleView', './TreeLabelView' ], function ($, nodeTemplate, ToggleView, TreeLabelView) { - 'use strict'; function TreeNodeView(gestureService, subtreeFactory, selectFn) { this.li = $('
  • '); diff --git a/platform/commonUI/general/src/ui/TreeView.js b/platform/commonUI/general/src/ui/TreeView.js index b1b394ae4c..da0bed7091 100644 --- a/platform/commonUI/general/src/ui/TreeView.js +++ b/platform/commonUI/general/src/ui/TreeView.js @@ -19,14 +19,12 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([ 'zepto', './TreeNodeView', 'text!../../res/templates/tree/wait-node.html' ], function ($, TreeNodeView, spinnerTemplate) { - 'use strict'; function TreeView(gestureService, selectFn) { this.ul = $('
      '); diff --git a/platform/commonUI/general/test/directives/MCTTreeSpec.js b/platform/commonUI/general/test/directives/MCTTreeSpec.js index 597c4c55b7..80854685e6 100644 --- a/platform/commonUI/general/test/directives/MCTTreeSpec.js +++ b/platform/commonUI/general/test/directives/MCTTreeSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,beforeEach,jasmine,it,expect*/ define([ '../../src/directives/MCTTree' diff --git a/platform/commonUI/general/test/ui/TreeViewSpec.js b/platform/commonUI/general/test/ui/TreeViewSpec.js index eae4d3eafd..7d28ae32a6 100644 --- a/platform/commonUI/general/test/ui/TreeViewSpec.js +++ b/platform/commonUI/general/test/ui/TreeViewSpec.js @@ -19,13 +19,11 @@ * 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/ui/TreeView', 'zepto' ], function (TreeView, $) { - 'use strict'; describe("TreeView", function () { var mockGestureService, diff --git a/platform/core/src/models/ModelCacheService.js b/platform/core/src/models/ModelCacheService.js index 4bcee0b93d..0e6a196dbc 100644 --- a/platform/core/src/models/ModelCacheService.js +++ b/platform/core/src/models/ModelCacheService.js @@ -19,10 +19,8 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([], function () { - 'use strict'; /** * Provides a cache for domain object models which exist in memory, diff --git a/platform/core/test/models/ModelCacheServiceSpec.js b/platform/core/test/models/ModelCacheServiceSpec.js index f8254779ab..23d1a0ce0d 100644 --- a/platform/core/test/models/ModelCacheServiceSpec.js +++ b/platform/core/test/models/ModelCacheServiceSpec.js @@ -19,10 +19,8 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/ define(['../../src/models/ModelCacheService'], function (ModelCacheService) { - 'use strict'; describe("ModelCacheService", function () { var testIds, testModels, diff --git a/platform/entanglement/src/policies/CopyPolicy.js b/platform/entanglement/src/policies/CopyPolicy.js index 09fe424540..dae3066111 100644 --- a/platform/entanglement/src/policies/CopyPolicy.js +++ b/platform/entanglement/src/policies/CopyPolicy.js @@ -20,9 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define */ define([], function () { - 'use strict'; /** * Disallow duplication when the object to be duplicated is not diff --git a/platform/entanglement/src/policies/MovePolicy.js b/platform/entanglement/src/policies/MovePolicy.js index 064b6b7192..0c395f9302 100644 --- a/platform/entanglement/src/policies/MovePolicy.js +++ b/platform/entanglement/src/policies/MovePolicy.js @@ -20,9 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define */ define([], function () { - 'use strict'; /** * Disallow moves when either the parent or the child are not diff --git a/platform/entanglement/test/ControlledPromise.js b/platform/entanglement/test/ControlledPromise.js index 0b3fcd6cf6..2f1c99ed84 100644 --- a/platform/entanglement/test/ControlledPromise.js +++ b/platform/entanglement/test/ControlledPromise.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global spyOn*/ define( function () { diff --git a/platform/entanglement/test/DomainObjectFactory.js b/platform/entanglement/test/DomainObjectFactory.js index 4a11667084..e9ef03c021 100644 --- a/platform/entanglement/test/DomainObjectFactory.js +++ b/platform/entanglement/test/DomainObjectFactory.js @@ -20,7 +20,6 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global jasmine*/ define( function () { diff --git a/platform/entanglement/test/policies/CopyPolicySpec.js b/platform/entanglement/test/policies/CopyPolicySpec.js index b53f4d22ed..88eeaec8d8 100644 --- a/platform/entanglement/test/policies/CopyPolicySpec.js +++ b/platform/entanglement/test/policies/CopyPolicySpec.js @@ -20,12 +20,10 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,beforeEach,it,jasmine,expect,spyOn */ define([ '../../src/policies/CopyPolicy', '../DomainObjectFactory' ], function (CopyPolicy, domainObjectFactory) { - 'use strict'; describe("CopyPolicy", function () { var testMetadata, diff --git a/platform/entanglement/test/policies/MovePolicySpec.js b/platform/entanglement/test/policies/MovePolicySpec.js index d55ad3c697..ab19731a60 100644 --- a/platform/entanglement/test/policies/MovePolicySpec.js +++ b/platform/entanglement/test/policies/MovePolicySpec.js @@ -20,12 +20,10 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,beforeEach,it,jasmine,expect,spyOn */ define([ '../../src/policies/MovePolicy', '../DomainObjectFactory' ], function (MovePolicy, domainObjectFactory) { - 'use strict'; describe("MovePolicy", function () { var testMetadata, diff --git a/platform/entanglement/test/services/MockCopyService.js b/platform/entanglement/test/services/MockCopyService.js index cf986bec7e..2ba49b53b9 100644 --- a/platform/entanglement/test/services/MockCopyService.js +++ b/platform/entanglement/test/services/MockCopyService.js @@ -20,7 +20,6 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global jasmine*/ define( function () { diff --git a/platform/entanglement/test/services/MockLinkService.js b/platform/entanglement/test/services/MockLinkService.js index 5345efc86e..5c583783c8 100644 --- a/platform/entanglement/test/services/MockLinkService.js +++ b/platform/entanglement/test/services/MockLinkService.js @@ -20,7 +20,6 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global jasmine*/ define( [ '../ControlledPromise' diff --git a/platform/entanglement/test/services/MockMoveService.js b/platform/entanglement/test/services/MockMoveService.js index d5a290c03f..1eccad53c0 100644 --- a/platform/entanglement/test/services/MockMoveService.js +++ b/platform/entanglement/test/services/MockMoveService.js @@ -20,7 +20,6 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global jasmine*/ define( function () { diff --git a/platform/features/conductor/test/TestTimeConductor.js b/platform/features/conductor/test/TestTimeConductor.js index 52ffb773d4..2a0fe7a7a8 100644 --- a/platform/features/conductor/test/TestTimeConductor.js +++ b/platform/features/conductor/test/TestTimeConductor.js @@ -20,7 +20,6 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global spyOn*/ define( ["../src/TimeConductor"], function (TimeConductor) { diff --git a/platform/features/table/src/controllers/RTTelemetryTableController.js b/platform/features/table/src/controllers/RTTelemetryTableController.js index 8a61d61b5e..6ae7f3b578 100644 --- a/platform/features/table/src/controllers/RTTelemetryTableController.js +++ b/platform/features/table/src/controllers/RTTelemetryTableController.js @@ -19,14 +19,12 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define( [ './TelemetryTableController' ], function (TableController) { - "use strict"; /** * Extends TelemetryTableController and adds real-time streaming diff --git a/platform/features/table/test/controllers/RTTelemetryTableControllerSpec.js b/platform/features/table/test/controllers/RTTelemetryTableControllerSpec.js index 59911d1771..cf6421c9a5 100644 --- a/platform/features/table/test/controllers/RTTelemetryTableControllerSpec.js +++ b/platform/features/table/test/controllers/RTTelemetryTableControllerSpec.js @@ -19,14 +19,12 @@ * 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,xit*/ define( [ "../../src/controllers/RTTelemetryTableController" ], function (TableController) { - "use strict"; describe('The real-time table controller', function () { var mockScope, diff --git a/platform/features/timeline/src/actions/CompositionColumn.js b/platform/features/timeline/src/actions/CompositionColumn.js index b7208c3e92..f9bede9983 100644 --- a/platform/features/timeline/src/actions/CompositionColumn.js +++ b/platform/features/timeline/src/actions/CompositionColumn.js @@ -19,10 +19,8 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([], function () { - "use strict"; /** * A column containing references to other objects contained diff --git a/platform/features/timeline/src/actions/ExportTimelineAsCSVAction.js b/platform/features/timeline/src/actions/ExportTimelineAsCSVAction.js index 387c0839a0..7b7754e720 100644 --- a/platform/features/timeline/src/actions/ExportTimelineAsCSVAction.js +++ b/platform/features/timeline/src/actions/ExportTimelineAsCSVAction.js @@ -19,10 +19,8 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define(["./ExportTimelineAsCSVTask"], function (ExportTimelineAsCSVTask) { - 'use strict'; /** * Implements the "Export Timeline as CSV" action. diff --git a/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js b/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js index 253db5c8b9..b8d796b3c4 100644 --- a/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js +++ b/platform/features/timeline/src/actions/ExportTimelineAsCSVTask.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ /** * Module defining ExportTimelineAsCSVTask. Created by vwoeltje on 2/8/16. @@ -28,7 +27,6 @@ define([ "./TimelineTraverser", "./TimelineColumnizer" ], function (TimelineTraverser, TimelineColumnizer) { - "use strict"; /** * Runs (and coordinates) the preparation and export of CSV data diff --git a/platform/features/timeline/src/actions/IdColumn.js b/platform/features/timeline/src/actions/IdColumn.js index 56ddfe385f..38c8b9264e 100644 --- a/platform/features/timeline/src/actions/IdColumn.js +++ b/platform/features/timeline/src/actions/IdColumn.js @@ -19,10 +19,8 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([], function () { - "use strict"; /** * A column showing domain object identifiers. diff --git a/platform/features/timeline/src/actions/MetadataColumn.js b/platform/features/timeline/src/actions/MetadataColumn.js index c94237a917..7676552879 100644 --- a/platform/features/timeline/src/actions/MetadataColumn.js +++ b/platform/features/timeline/src/actions/MetadataColumn.js @@ -19,10 +19,8 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([], function () { - "use strict"; /** * A column reflecting properties from domain object metadata. diff --git a/platform/features/timeline/src/actions/ModeColumn.js b/platform/features/timeline/src/actions/ModeColumn.js index 4ae61b30d3..fe2063566d 100644 --- a/platform/features/timeline/src/actions/ModeColumn.js +++ b/platform/features/timeline/src/actions/ModeColumn.js @@ -19,10 +19,8 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define([], function () { - "use strict"; /** * A column showing relationships to activity modes. diff --git a/platform/features/timeline/src/actions/TimelineColumnizer.js b/platform/features/timeline/src/actions/TimelineColumnizer.js index 3069bd8b96..f24fa20eee 100644 --- a/platform/features/timeline/src/actions/TimelineColumnizer.js +++ b/platform/features/timeline/src/actions/TimelineColumnizer.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ define([ "./IdColumn", @@ -34,7 +33,6 @@ define([ MetadataColumn, TimespanColumn ) { - 'use strict'; /** * A description of how to populate a given column within a diff --git a/platform/features/timeline/src/actions/TimelineTraverser.js b/platform/features/timeline/src/actions/TimelineTraverser.js index f6857658fb..f38d0e3489 100644 --- a/platform/features/timeline/src/actions/TimelineTraverser.js +++ b/platform/features/timeline/src/actions/TimelineTraverser.js @@ -19,10 +19,8 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ define([], function () { - "use strict"; /** * Builds a list of domain objects which should be included diff --git a/platform/features/timeline/src/actions/TimespanColumn.js b/platform/features/timeline/src/actions/TimespanColumn.js index 6d0c4e05a9..a701724ee1 100644 --- a/platform/features/timeline/src/actions/TimespanColumn.js +++ b/platform/features/timeline/src/actions/TimespanColumn.js @@ -19,10 +19,8 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define*/ define(['../TimelineFormatter'], function (TimelineFormatter) { - "use strict"; var FORMATTER = new TimelineFormatter(); diff --git a/platform/features/timeline/test/actions/CompositionColumnSpec.js b/platform/features/timeline/test/actions/CompositionColumnSpec.js index 99e23d5597..87377a856f 100644 --- a/platform/features/timeline/test/actions/CompositionColumnSpec.js +++ b/platform/features/timeline/test/actions/CompositionColumnSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/ define( ['../../src/actions/CompositionColumn'], diff --git a/platform/features/timeline/test/actions/ExportTimelineAsCSVActionSpec.js b/platform/features/timeline/test/actions/ExportTimelineAsCSVActionSpec.js index 3d5cd8b01c..7250fd2621 100644 --- a/platform/features/timeline/test/actions/ExportTimelineAsCSVActionSpec.js +++ b/platform/features/timeline/test/actions/ExportTimelineAsCSVActionSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/ define( ['../../src/actions/ExportTimelineAsCSVAction'], diff --git a/platform/features/timeline/test/actions/ExportTimelineAsCSVTaskSpec.js b/platform/features/timeline/test/actions/ExportTimelineAsCSVTaskSpec.js index 7979104ee5..d9c6ca3c6e 100644 --- a/platform/features/timeline/test/actions/ExportTimelineAsCSVTaskSpec.js +++ b/platform/features/timeline/test/actions/ExportTimelineAsCSVTaskSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/ define( ['../../src/actions/ExportTimelineAsCSVTask'], function (ExportTimelineAsCSVTask) { - 'use strict'; // Note that most responsibility is delegated to helper // classes, so testing here is minimal. diff --git a/platform/features/timeline/test/actions/IdColumnSpec.js b/platform/features/timeline/test/actions/IdColumnSpec.js index a12b6145a9..5aab82d11f 100644 --- a/platform/features/timeline/test/actions/IdColumnSpec.js +++ b/platform/features/timeline/test/actions/IdColumnSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/ define( ['../../src/actions/IdColumn'], diff --git a/platform/features/timeline/test/actions/MetadataColumnSpec.js b/platform/features/timeline/test/actions/MetadataColumnSpec.js index ba38fc83c0..f9ff3f3d35 100644 --- a/platform/features/timeline/test/actions/MetadataColumnSpec.js +++ b/platform/features/timeline/test/actions/MetadataColumnSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/ define( ['../../src/actions/MetadataColumn'], diff --git a/platform/features/timeline/test/actions/ModeColumnSpec.js b/platform/features/timeline/test/actions/ModeColumnSpec.js index ab15d696c2..1189b30ca6 100644 --- a/platform/features/timeline/test/actions/ModeColumnSpec.js +++ b/platform/features/timeline/test/actions/ModeColumnSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/ define( ['../../src/actions/ModeColumn'], diff --git a/platform/features/timeline/test/actions/TimelineColumnizerSpec.js b/platform/features/timeline/test/actions/TimelineColumnizerSpec.js index 9eacf4f3b3..d47d493ca9 100644 --- a/platform/features/timeline/test/actions/TimelineColumnizerSpec.js +++ b/platform/features/timeline/test/actions/TimelineColumnizerSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/ define( ['../../src/actions/TimelineColumnizer'], diff --git a/platform/features/timeline/test/actions/TimelineTraverserSpec.js b/platform/features/timeline/test/actions/TimelineTraverserSpec.js index 6962373ff9..3cec488b0d 100644 --- a/platform/features/timeline/test/actions/TimelineTraverserSpec.js +++ b/platform/features/timeline/test/actions/TimelineTraverserSpec.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/ define([ "../../src/actions/TimelineTraverser" ], function (TimelineTraverser) { - 'use strict'; describe("TimelineTraverser", function () { var testModels, diff --git a/platform/features/timeline/test/actions/TimespanColumnSpec.js b/platform/features/timeline/test/actions/TimespanColumnSpec.js index f4970b778e..5eea2a9281 100644 --- a/platform/features/timeline/test/actions/TimespanColumnSpec.js +++ b/platform/features/timeline/test/actions/TimespanColumnSpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,describe,it,expect,beforeEach,waitsFor,jasmine,window,afterEach*/ define( ['../../src/actions/TimespanColumn', '../../src/TimelineFormatter'], diff --git a/platform/framework/src/FrameworkLayer.js b/platform/framework/src/FrameworkLayer.js index 1f8910fe15..765013adf8 100644 --- a/platform/framework/src/FrameworkLayer.js +++ b/platform/framework/src/FrameworkLayer.js @@ -20,7 +20,6 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global window,requirejs*/ define([ 'require', diff --git a/platform/framework/src/Main.js b/platform/framework/src/Main.js index c468e4dbea..e1feb8b861 100644 --- a/platform/framework/src/Main.js +++ b/platform/framework/src/Main.js @@ -20,7 +20,6 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global window,requirejs*/ /** * Implements the framework layer, which handles the loading of bundles diff --git a/platform/search/src/services/GenericSearchWorker.js b/platform/search/src/services/GenericSearchWorker.js index a3cd34c2e2..4575ed1b55 100644 --- a/platform/search/src/services/GenericSearchWorker.js +++ b/platform/search/src/services/GenericSearchWorker.js @@ -20,7 +20,6 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global self*/ /** * Module defining GenericSearchWorker. Created by shale on 07/21/2015. diff --git a/platform/search/test/services/GenericSearchWorkerSpec.js b/platform/search/test/services/GenericSearchWorkerSpec.js index 952d2a4d58..22f0d35ac9 100644 --- a/platform/search/test/services/GenericSearchWorkerSpec.js +++ b/platform/search/test/services/GenericSearchWorkerSpec.js @@ -20,7 +20,6 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global require*/ /** * SearchSpec. Created by shale on 07/31/2015. From 0b11ddbcfd6dd8c9e8ca9e859f2c010e1447d353 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Apr 2016 16:22:28 -0700 Subject: [PATCH 41/53] [Build] Satisfy JSHint Restore globals lost during removal due to merge, remove unused variables and use threequals in new scripts. --- platform/commonUI/general/test/ui/TreeViewSpec.js | 3 ++- platform/core/src/capabilities/PersistenceCapability.js | 1 - platform/entanglement/test/ControlledPromise.js | 1 + platform/entanglement/test/DomainObjectFactory.js | 1 + platform/entanglement/test/services/MockCopyService.js | 1 + platform/entanglement/test/services/MockLinkService.js | 1 + platform/entanglement/test/services/MockMoveService.js | 1 + platform/features/conductor/test/TestTimeConductor.js | 1 + .../features/table/src/controllers/MCTTableController.js | 7 +++---- .../table/src/controllers/TelemetryTableController.js | 2 -- platform/framework/src/FrameworkLayer.js | 1 + platform/framework/src/Main.js | 1 + platform/search/src/services/GenericSearchWorker.js | 1 + platform/search/test/services/GenericSearchWorkerSpec.js | 1 + 14 files changed, 15 insertions(+), 8 deletions(-) diff --git a/platform/commonUI/general/test/ui/TreeViewSpec.js b/platform/commonUI/general/test/ui/TreeViewSpec.js index 7d28ae32a6..e8d114b27a 100644 --- a/platform/commonUI/general/test/ui/TreeViewSpec.js +++ b/platform/commonUI/general/test/ui/TreeViewSpec.js @@ -19,6 +19,7 @@ * 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/ui/TreeView', @@ -122,7 +123,7 @@ define([ function waitForCompositionCallback() { var calledBack = false; - testCapabilities.composition.invoke().then(function (c) { + testCapabilities.composition.invoke().then(function () { calledBack = true; }); waitsFor(function () { diff --git a/platform/core/src/capabilities/PersistenceCapability.js b/platform/core/src/capabilities/PersistenceCapability.js index a56e0bb1c9..bf8fbd9961 100644 --- a/platform/core/src/capabilities/PersistenceCapability.js +++ b/platform/core/src/capabilities/PersistenceCapability.js @@ -130,7 +130,6 @@ define( domainObject = this.domainObject, model = domainObject.getModel(), modified = model.modified, - cacheService = this.cacheService, persistenceService = this.persistenceService, persistenceFn = model.persisted !== undefined ? this.persistenceService.updateObject : diff --git a/platform/entanglement/test/ControlledPromise.js b/platform/entanglement/test/ControlledPromise.js index 2f1c99ed84..0b3fcd6cf6 100644 --- a/platform/entanglement/test/ControlledPromise.js +++ b/platform/entanglement/test/ControlledPromise.js @@ -19,6 +19,7 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global spyOn*/ define( function () { diff --git a/platform/entanglement/test/DomainObjectFactory.js b/platform/entanglement/test/DomainObjectFactory.js index e9ef03c021..4a11667084 100644 --- a/platform/entanglement/test/DomainObjectFactory.js +++ b/platform/entanglement/test/DomainObjectFactory.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global jasmine*/ define( function () { diff --git a/platform/entanglement/test/services/MockCopyService.js b/platform/entanglement/test/services/MockCopyService.js index 2ba49b53b9..cf986bec7e 100644 --- a/platform/entanglement/test/services/MockCopyService.js +++ b/platform/entanglement/test/services/MockCopyService.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global jasmine*/ define( function () { diff --git a/platform/entanglement/test/services/MockLinkService.js b/platform/entanglement/test/services/MockLinkService.js index 5c583783c8..5345efc86e 100644 --- a/platform/entanglement/test/services/MockLinkService.js +++ b/platform/entanglement/test/services/MockLinkService.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global jasmine*/ define( [ '../ControlledPromise' diff --git a/platform/entanglement/test/services/MockMoveService.js b/platform/entanglement/test/services/MockMoveService.js index 1eccad53c0..d5a290c03f 100644 --- a/platform/entanglement/test/services/MockMoveService.js +++ b/platform/entanglement/test/services/MockMoveService.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global jasmine*/ define( function () { diff --git a/platform/features/conductor/test/TestTimeConductor.js b/platform/features/conductor/test/TestTimeConductor.js index 2a0fe7a7a8..52ffb773d4 100644 --- a/platform/features/conductor/test/TestTimeConductor.js +++ b/platform/features/conductor/test/TestTimeConductor.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global spyOn*/ define( ["../src/TimeConductor"], function (TimeConductor) { diff --git a/platform/features/table/src/controllers/MCTTableController.js b/platform/features/table/src/controllers/MCTTableController.js index ace37bdfe6..34987fc15d 100644 --- a/platform/features/table/src/controllers/MCTTableController.js +++ b/platform/features/table/src/controllers/MCTTableController.js @@ -118,7 +118,7 @@ define( // Do a sequential search here. Only way of finding row is by // object equality, so array is in effect unsorted. indexInDisplayRows = this.$scope.displayRows.indexOf(row); - if (indexInDisplayRows != -1) { + if (indexInDisplayRows !== -1) { this.$scope.displayRows.splice(indexInDisplayRows, 1); this.setVisibleRows(); } @@ -160,7 +160,7 @@ define( if (this.$scope.displayRows.length < this.maxDisplayRows) { //Check whether need to resynchronize visible with display // rows (if data added) - if (this.$scope.visibleRows.length != + if (this.$scope.visibleRows.length !== this.$scope.displayRows.length){ start = 0; end = this.$scope.displayRows.length; @@ -247,8 +247,7 @@ define( * for individual rows. */ MCTTableController.prototype.setElementSizes = function () { - var self = this, - thead = this.element.find('thead'), + var thead = this.element.find('thead'), tbody = this.element.find('tbody'), firstRow = tbody.find('tr'), column = firstRow.find('td'), diff --git a/platform/features/table/src/controllers/TelemetryTableController.js b/platform/features/table/src/controllers/TelemetryTableController.js index 1954488a69..488f8dc171 100644 --- a/platform/features/table/src/controllers/TelemetryTableController.js +++ b/platform/features/table/src/controllers/TelemetryTableController.js @@ -108,8 +108,6 @@ define( only). */ TelemetryTableController.prototype.subscribe = function () { - var self = this; - if (this.handle) { this.handle.unsubscribe(); } diff --git a/platform/framework/src/FrameworkLayer.js b/platform/framework/src/FrameworkLayer.js index 765013adf8..1f8910fe15 100644 --- a/platform/framework/src/FrameworkLayer.js +++ b/platform/framework/src/FrameworkLayer.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global window,requirejs*/ define([ 'require', diff --git a/platform/framework/src/Main.js b/platform/framework/src/Main.js index e1feb8b861..c468e4dbea 100644 --- a/platform/framework/src/Main.js +++ b/platform/framework/src/Main.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global window,requirejs*/ /** * Implements the framework layer, which handles the loading of bundles diff --git a/platform/search/src/services/GenericSearchWorker.js b/platform/search/src/services/GenericSearchWorker.js index 4575ed1b55..a3cd34c2e2 100644 --- a/platform/search/src/services/GenericSearchWorker.js +++ b/platform/search/src/services/GenericSearchWorker.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global self*/ /** * Module defining GenericSearchWorker. Created by shale on 07/21/2015. diff --git a/platform/search/test/services/GenericSearchWorkerSpec.js b/platform/search/test/services/GenericSearchWorkerSpec.js index 22f0d35ac9..952d2a4d58 100644 --- a/platform/search/test/services/GenericSearchWorkerSpec.js +++ b/platform/search/test/services/GenericSearchWorkerSpec.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global require*/ /** * SearchSpec. Created by shale on 07/31/2015. From f6a9c90cef7ea0822731550886fbd63b6b8a508f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Apr 2016 16:25:32 -0700 Subject: [PATCH 42/53] [Build] Use native bind ...in CouchPersistenceProvider and ElasticPersistenceProvider, per https://github.com/nasa/openmct/pull/724#issuecomment-193542314 --- .../couch/src/CouchPersistenceProvider.js | 16 +++++----------- .../elastic/src/ElasticPersistenceProvider.js | 12 +++--------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/platform/persistence/couch/src/CouchPersistenceProvider.js b/platform/persistence/couch/src/CouchPersistenceProvider.js index 2e0cec8807..ac0aaca304 100644 --- a/platform/persistence/couch/src/CouchPersistenceProvider.js +++ b/platform/persistence/couch/src/CouchPersistenceProvider.js @@ -54,12 +54,6 @@ define( this.path = path; } - function bind(fn, thisArg) { - return function () { - return fn.apply(thisArg, arguments); - }; - } - // Pull out a list of document IDs from CouchDB's // _all_docs response function getIdsFromAllDocs(allDocs) { @@ -117,29 +111,29 @@ define( }; CouchPersistenceProvider.prototype.listObjects = function () { - return this.get("_all_docs").then(bind(getIdsFromAllDocs, this)); + return this.get("_all_docs").then(getIdsFromAllDocs.bind(this)); }; CouchPersistenceProvider.prototype.createObject = function (space, key, value) { return this.put(key, new CouchDocument(key, value)) - .then(bind(this.checkResponse, this)); + .then(this.checkResponse.bind(this)); }; CouchPersistenceProvider.prototype.readObject = function (space, key) { - return this.get(key).then(bind(this.getModel, this)); + return this.get(key).then(this.getModel.bind(this)); }; CouchPersistenceProvider.prototype.updateObject = function (space, key, value) { var rev = this.revs[key]; return this.put(key, new CouchDocument(key, value, rev)) - .then(bind(this.checkResponse, this)); + .then(this.checkResponse.bind(this)); }; CouchPersistenceProvider.prototype.deleteObject = function (space, key, value) { var rev = this.revs[key]; return this.put(key, new CouchDocument(key, value, rev, true)) - .then(bind(this.checkResponse, this)); + .then(this.checkResponse.bind(this)); }; return CouchPersistenceProvider; diff --git a/platform/persistence/elastic/src/ElasticPersistenceProvider.js b/platform/persistence/elastic/src/ElasticPersistenceProvider.js index 564029b4c7..970f5cca26 100644 --- a/platform/persistence/elastic/src/ElasticPersistenceProvider.js +++ b/platform/persistence/elastic/src/ElasticPersistenceProvider.js @@ -58,12 +58,6 @@ define( this.path = path; } - function bind(fn, thisArg) { - return function () { - return fn.apply(thisArg, arguments); - }; - } - // Issue a request using $http; get back the plain JS object // from the expected JSON response ElasticPersistenceProvider.prototype.request = function (subpath, method, value, params) { @@ -141,11 +135,11 @@ define( ElasticPersistenceProvider.prototype.createObject = function (space, key, value) { - return this.put(key, value).then(bind(this.checkResponse, this)); + return this.put(key, value).then(this.checkResponse.bind(this)); }; ElasticPersistenceProvider.prototype.readObject = function (space, key) { - return this.get(key).then(bind(this.getModel, this)); + return this.get(key).then(this.getModel.bind(this)); }; ElasticPersistenceProvider.prototype.updateObject = function (space, key, value) { @@ -158,7 +152,7 @@ define( }; ElasticPersistenceProvider.prototype.deleteObject = function (space, key) { - return this.del(key).then(bind(this.checkResponse, this)); + return this.del(key).then(this.checkResponse.bind(this)); }; return ElasticPersistenceProvider; From aa45e5344082ff24f34164f1d2cb61dd3847b945 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Apr 2016 16:28:35 -0700 Subject: [PATCH 43/53] [Build] Revert setTimeout changes Restore usage of setTimeout (instead of the Angular-wrapped version) per https://github.com/nasa/openmct/pull/724#issuecomment-193542314 --- platform/search/bundle.js | 1 - platform/search/src/services/GenericSearchProvider.js | 11 +++++------ .../search/test/services/GenericSearchProviderSpec.js | 9 +-------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/platform/search/bundle.js b/platform/search/bundle.js index 74040b84f4..fb5714fab6 100644 --- a/platform/search/bundle.js +++ b/platform/search/bundle.js @@ -103,7 +103,6 @@ define([ "type": "provider", "implementation": GenericSearchProvider, "depends": [ - "$timeout", "$q", "$log", "modelService", diff --git a/platform/search/src/services/GenericSearchProvider.js b/platform/search/src/services/GenericSearchProvider.js index ce2ae642ed..fbe45ae6d8 100644 --- a/platform/search/src/services/GenericSearchProvider.js +++ b/platform/search/src/services/GenericSearchProvider.js @@ -19,6 +19,7 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global setTimeout*/ /** * Module defining GenericSearchProvider. Created by shale on 07/16/2015. @@ -41,9 +42,8 @@ define([ * @param {TopicService} topic the topic service. * @param {Array} ROOTS An array of object Ids to begin indexing. */ - function GenericSearchProvider($timeout, $q, $log, modelService, workerService, topic, ROOTS) { + function GenericSearchProvider($q, $log, modelService, workerService, topic, ROOTS) { var provider = this; - this.$timeout = $timeout; this.$q = $q; this.$log = $log; this.modelService = modelService; @@ -193,8 +193,7 @@ define([ */ GenericSearchProvider.prototype.beginIndexRequest = function () { var idToIndex = this.idsToIndex.shift(), - provider = this, - $timeout = this.$timeout; + provider = this; this.pendingRequests += 1; this.modelService @@ -210,10 +209,10 @@ define([ .warn('Failed to index domain object ' + idToIndex); }) .then(function () { - $timeout(function () { + setTimeout(function () { provider.pendingRequests -= 1; provider.keepIndexing(); - }, 0, false); + }, 0); }); }; diff --git a/platform/search/test/services/GenericSearchProviderSpec.js b/platform/search/test/services/GenericSearchProviderSpec.js index c9fc1ff03d..abfe3d011d 100644 --- a/platform/search/test/services/GenericSearchProviderSpec.js +++ b/platform/search/test/services/GenericSearchProviderSpec.js @@ -30,8 +30,7 @@ define([ ) { describe('GenericSearchProvider', function () { - var $timeout, - $q, + var $q, $log, modelService, models, @@ -43,7 +42,6 @@ define([ provider; beforeEach(function () { - $timeout = jasmine.createSpy('$timeout'); $q = jasmine.createSpyObj( '$q', ['defer'] @@ -82,12 +80,7 @@ define([ spyOn(GenericSearchProvider.prototype, 'scheduleForIndexing'); - $timeout.andCallFake(function (callback, millis) { - window.setTimeout(callback, millis); - }); - provider = new GenericSearchProvider( - $timeout, $q, $log, modelService, From 93512851828ff89686d729384e35b0201596185e Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Apr 2016 16:31:01 -0700 Subject: [PATCH 44/53] [Build] Remove obsolete argument from spec ...to reflect changes associated with JSHint configuration, https://github.com/nasa/openmct/pull/724#issuecomment-193542314 --- .../local/test/LocalStoragePersistenceProviderSpec.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/persistence/local/test/LocalStoragePersistenceProviderSpec.js b/platform/persistence/local/test/LocalStoragePersistenceProviderSpec.js index b6530584d6..50869cf9a0 100644 --- a/platform/persistence/local/test/LocalStoragePersistenceProviderSpec.js +++ b/platform/persistence/local/test/LocalStoragePersistenceProviderSpec.js @@ -51,8 +51,7 @@ define( provider = new LocalStoragePersistenceProvider( { localStorage: testLocalStorage }, mockQ, - testSpace, - testLocalStorage + testSpace ); }); From c1ae68b565bcc33c61a7f3ec9e96a54492c10a9f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Apr 2016 16:32:17 -0700 Subject: [PATCH 45/53] [Build] Change unused to vars To allow placeholder arguments in method signatures, per https://github.com/nasa/openmct/pull/724#issuecomment-193542314 --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index d36ebef46a..662574cea5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -78,7 +78,7 @@ var gulp = require('gulp'), ], "strict": "implied", "undef": true, - "unused": true + "unused": "vars" }, karma: { configFile: path.resolve(__dirname, 'karma.conf.js'), From a224711dce6b2d0e7bd4e87139ef18be04cb1891 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Apr 2016 16:37:18 -0700 Subject: [PATCH 46/53] [Build] Move JSHint config to .jshintrc ...to allow code editors etc to pick up on rules, per https://github.com/nasa/openmct/pull/724#issuecomment-193542314 --- .jshintrc | 22 ++++++++++++++++++++++ gulpfile.js | 26 ++------------------------ 2 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 .jshintrc diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000000..df3f02a1ff --- /dev/null +++ b/.jshintrc @@ -0,0 +1,22 @@ +{ + "bitwise": true, + "browser": true, + "curly": true, + "eqeqeq": true, + "forin": true, + "freeze": true, + "funcscope": true, + "futurehostile": true, + "latedef": true, + "noarg": true, + "nocomma": true, + "nonbsp": true, + "nonew": true, + "predef": [ + "define", + "Promise" + ], + "strict": "implied", + "undef": true, + "unused": "vars" +} diff --git a/gulpfile.js b/gulpfile.js index 662574cea5..7d7fb8a8e7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -58,28 +58,6 @@ var gulp = require('gulp'), mainConfigFile: paths.main, wrapShim: true }, - jshint: { - "bitwise": true, - "browser": true, - "curly": true, - "eqeqeq": true, - "forin": true, - "freeze": true, - "funcscope": true, - "futurehostile": true, - "latedef": true, - "noarg": true, - "nocomma": true, - "nonbsp": true, - "nonew": true, - "predef": [ - "define", - "Promise" - ], - "strict": "implied", - "undef": true, - "unused": "vars" - }, karma: { configFile: path.resolve(__dirname, 'karma.conf.js'), singleRun: true @@ -128,9 +106,9 @@ gulp.task('lint', function () { return "!" + glob; }), scriptLint = gulp.src(paths.scripts.concat(nonspecs)) - .pipe(jshint(options.jshint)), + .pipe(jshint()), specLint = gulp.src(paths.specs) - .pipe(jshint(_.extend({ jasmine: true }, options.jshint))); + .pipe(jshint({ jasmine: true })); return merge(scriptLint, specLint) .pipe(jshint.reporter('default')) From 934eb13813254294d75fc8052ece74be96beea8d Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Apr 2016 16:54:01 -0700 Subject: [PATCH 47/53] [Build] Remove obsolete jslint tags ES5 mode is enabled by default in JSHint, tags no longer necessary per https://github.com/nasa/openmct/pull/724#discussion_r55095722 --- platform/commonUI/edit/src/actions/SaveAction.js | 2 -- platform/core/src/capabilities/PersistenceCapability.js | 2 -- platform/core/test/capabilities/PersistenceCapabilitySpec.js | 1 - 3 files changed, 5 deletions(-) diff --git a/platform/commonUI/edit/src/actions/SaveAction.js b/platform/commonUI/edit/src/actions/SaveAction.js index bdc3225258..c4ea3b02ba 100644 --- a/platform/commonUI/edit/src/actions/SaveAction.js +++ b/platform/commonUI/edit/src/actions/SaveAction.js @@ -19,8 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*jslint es5: true */ - define( ['../../../browse/src/creation/CreateWizard'], diff --git a/platform/core/src/capabilities/PersistenceCapability.js b/platform/core/src/capabilities/PersistenceCapability.js index bf8fbd9961..4e4e753e0c 100644 --- a/platform/core/src/capabilities/PersistenceCapability.js +++ b/platform/core/src/capabilities/PersistenceCapability.js @@ -19,8 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*jslint es5: true */ - define( function () { diff --git a/platform/core/test/capabilities/PersistenceCapabilitySpec.js b/platform/core/test/capabilities/PersistenceCapabilitySpec.js index 2126d1e1b2..16f5d34e61 100644 --- a/platform/core/test/capabilities/PersistenceCapabilitySpec.js +++ b/platform/core/test/capabilities/PersistenceCapabilitySpec.js @@ -19,7 +19,6 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*jslint es5: true */ /** * PersistenceCapabilitySpec. Created by vwoeltje on 11/6/14. From 11cfb6e1b869d6e2280a3a65fd114bb64a573f62 Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 21 Apr 2016 10:30:55 -0700 Subject: [PATCH 48/53] [Edit] Elements pool filtering displays more consistent results --- .../commonUI/edit/res/templates/elements.html | 2 +- .../src/controllers/ElementsController.js | 11 +++ .../controllers/ElementsControllerSpec.js | 68 +++++++++++++++++++ 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 platform/commonUI/edit/test/controllers/ElementsControllerSpec.js diff --git a/platform/commonUI/edit/res/templates/elements.html b/platform/commonUI/edit/res/templates/elements.html index 23884e0a54..12d83a47fc 100644 --- a/platform/commonUI/edit/res/templates/elements.html +++ b/platform/commonUI/edit/res/templates/elements.html @@ -26,7 +26,7 @@
        -
      • +
      • Date: Mon, 25 Apr 2016 09:55:21 -0700 Subject: [PATCH 49/53] [Frontend] z-index added to .object-top-bar .left element #836 --- platform/commonUI/general/res/sass/user-environ/_frame.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/commonUI/general/res/sass/user-environ/_frame.scss b/platform/commonUI/general/res/sass/user-environ/_frame.scss index 64c4dbd69b..7bc3367c00 100644 --- a/platform/commonUI/general/res/sass/user-environ/_frame.scss +++ b/platform/commonUI/general/res/sass/user-environ/_frame.scss @@ -36,6 +36,8 @@ line-height: $ohH; .left { padding-right: $interiorMarginLg; + + z-index: 5; } } >.object-holder.abs { From 09d1c2cd4b4f96d3587dca32efed3e088b728917 Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 3 May 2016 14:34:52 -0700 Subject: [PATCH 50/53] #899 updated circle.yml to deploy to live_demo and remove doc generation --- circle.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/circle.yml b/circle.yml index d163b3ee0c..fa8515e90e 100644 --- a/circle.yml +++ b/circle.yml @@ -2,13 +2,11 @@ deployment: production: branch: master commands: - - npm install canvas nomnoml - - ./build-docs.sh - git push git@heroku.com:openmctweb-demo.git $CIRCLE_SHA1:refs/heads/master - openmctweb-staging-un: - branch: nem_prototype + openmct-demo: + branch: live_demo heroku: - appname: openmctweb-staging-un + appname: openmct-demo openmctweb-staging-deux: branch: mobile heroku: From ab6ef22363523f4383e4b46a276b166f0c1bf9c8 Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 8 May 2016 10:46:59 -0700 Subject: [PATCH 51/53] #898 updated stylesheet reference --- docs/footer.html | 6 ------ docs/header.html | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/docs/footer.html b/docs/footer.html index e4e5daee87..a6878b0cac 100644 --- a/docs/footer.html +++ b/docs/footer.html @@ -1,9 +1,3 @@
        - - This document is styled using - - https://github.com/jasonm23/markdown-css-themes - . - diff --git a/docs/header.html b/docs/header.html index e6be56f543..c945996f4a 100644 --- a/docs/header.html +++ b/docs/header.html @@ -1,7 +1,9 @@ + href="//nasa.github.io/openmct/static/res/css/styles.css"> + From 61683800cc2b05a2edc7879b336fba44c25a48ce Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Mon, 9 May 2016 10:30:24 -0700 Subject: [PATCH 52/53] [Style] Update style to reflect new jshint config Update style to match new jshint config https://github.com/nasa/openmct/issues/671 --- .../edit/src/controllers/ElementsController.js | 4 +--- .../test/controllers/ElementsControllerSpec.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/platform/commonUI/edit/src/controllers/ElementsController.js b/platform/commonUI/edit/src/controllers/ElementsController.js index 5c5a2ed8a4..180b60dddc 100644 --- a/platform/commonUI/edit/src/controllers/ElementsController.js +++ b/platform/commonUI/edit/src/controllers/ElementsController.js @@ -19,12 +19,10 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ -/*global define,Promise*/ define( [], function () { - "use strict"; /** * The ElementsController prepares the elements view for display @@ -55,4 +53,4 @@ define( return ElementsController; } -); \ No newline at end of file +); diff --git a/platform/commonUI/edit/test/controllers/ElementsControllerSpec.js b/platform/commonUI/edit/test/controllers/ElementsControllerSpec.js index 0d708452e8..2837eb03df 100644 --- a/platform/commonUI/edit/test/controllers/ElementsControllerSpec.js +++ b/platform/commonUI/edit/test/controllers/ElementsControllerSpec.js @@ -19,12 +19,11 @@ * 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*/ +/*global describe,it,expect,beforeEach,jasmine*/ define( ["../../src/controllers/ElementsController"], function (ElementsController) { - "use strict"; describe("The Elements Pane controller", function () { var mockScope, @@ -35,6 +34,12 @@ define( controller = new ElementsController(mockScope); }); + function getModel (model) { + return function() { + return model; + }; + } + it("filters objects in elements pool based on input text and" + " object name", function () { var objects = [ @@ -50,13 +55,8 @@ define( { getModel: getModel({name: "THIRD Element 1"}) } - ]; - function getModel (model) { - return function() { - return model; - }; - } + mockScope.filterBy("third element"); expect(objects.filter(mockScope.searchElements).length).toBe(2); mockScope.filterBy("element"); @@ -65,4 +65,4 @@ define( }); } -); \ No newline at end of file +); From f5539ec6780f0ee03360074ded03197d12282e8e Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Mon, 9 May 2016 10:46:17 -0700 Subject: [PATCH 53/53] [Build] Use Circle's heroku integration for deploy Use circle's heroku integration to deploy to ensure that we deploy a full clone of the repo and not a shallow clone, prevents build failure in master branch. --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 9c88352bd6..472fdf7c17 100644 --- a/circle.yml +++ b/circle.yml @@ -1,8 +1,8 @@ deployment: production: branch: master - commands: - - git push git@heroku.com:openmctweb-demo.git $CIRCLE_SHA1:refs/heads/master + heroku: + appname: openmctweb-demo openmct-demo: branch: live_demo heroku: