mirror of
https://github.com/nasa/openmct.git
synced 2025-02-09 20:31:22 +00:00
[Common UI] Remove CreateButtonController
Remove CreateButtonController; this has been generalized to ClickAwayController in the platform/commonUI/general bundle. WTD-574.
This commit is contained in:
parent
3a5a015097
commit
6e9d6e2199
@ -1,36 +0,0 @@
|
|||||||
/*global define,Promise*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Module defining CreateController. Created by vwoeltje on 11/10/14.
|
|
||||||
*/
|
|
||||||
define(
|
|
||||||
[],
|
|
||||||
function () {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
function CreateButtonController($scope, $document) {
|
|
||||||
function collapse() {
|
|
||||||
$scope.createState.visible = false;
|
|
||||||
$scope.$apply("createState.visible");
|
|
||||||
$document.off("mouseup", collapse);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.createState = { visible: false };
|
|
||||||
|
|
||||||
$scope.toggle = function () {
|
|
||||||
$scope.createState.visible = !$scope.createState.visible;
|
|
||||||
if ($scope.createState.visible) {
|
|
||||||
$document.on("mouseup", collapse);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return CreateButtonController;
|
|
||||||
}
|
|
||||||
);
|
|
Loading…
x
Reference in New Issue
Block a user