moved firmware into config section
Change-Id: I9579c85d7d9d7268d9e35637809fa26d623f0310
Signed-off-by: Michael Davis <michael.s.davis@ibm.com>
diff --git a/app/configuration/controllers/firmware-controller.js b/app/configuration/controllers/firmware-controller.js
new file mode 100644
index 0000000..5004d3b
--- /dev/null
+++ b/app/configuration/controllers/firmware-controller.js
@@ -0,0 +1,46 @@
+/**
+ * Controller for firmware
+ *
+ * @module app/configuration
+ * @exports firmwareController
+ * @name firmwareController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.configuration')
+ .controller('firmwareController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ '$location',
+ '$anchorScroll',
+ function ($scope, $window, APIUtils, dataService, $location, $anchorScroll) {
+ $scope.dataService = dataService;
+
+ //Check if window has scroll
+ $scope.hasVScroll = document.body.scrollHeight > document.body.clientHeight;
+ $scope.link = document.getElementsByClassName("btn-upload");
+ $scope.appWindow = angular.element($window);
+
+ //Hide/Show anchor link if window has scroll
+ if ($scope.hasVScroll == true) {
+ $scope.link[0].style.display = 'block';
+ } else {
+ $scope.link[0].style.display = 'none';
+ }
+
+ //Scroll to target anchor
+ $scope.gotoAnchor = function () {
+ $location.hash('upload');
+ $anchorScroll();
+ };
+ }
+ ]
+ );
+
+})(angular);