Merge pull request #3786 from umbraco/temp8-3651
add overlay to tree when infinite editing is open
This commit is contained in:
@@ -13,7 +13,7 @@ function MainController($scope, $location, appState, treeService, notificationsS
|
||||
//the null is important because we do an explicit bool check on this in the view
|
||||
$scope.authenticated = null;
|
||||
$scope.touchDevice = appState.getGlobalState("touchDevice");
|
||||
$scope.editors = [];
|
||||
$scope.infiniteMode = false;
|
||||
$scope.overlay = {};
|
||||
$scope.drawer = {};
|
||||
$scope.search = {};
|
||||
@@ -160,12 +160,12 @@ function MainController($scope, $location, appState, treeService, notificationsS
|
||||
}));
|
||||
|
||||
// event for infinite editors
|
||||
evts.push(eventsService.on("appState.editors.add", function (name, args) {
|
||||
$scope.editors = args.editors;
|
||||
evts.push(eventsService.on("appState.editors.open", function (name, args) {
|
||||
$scope.infiniteMode = args && args.editors.length > 0 ? true : false;
|
||||
}));
|
||||
|
||||
evts.push(eventsService.on("appState.editors.remove", function (name, args) {
|
||||
$scope.editors = args.editors;
|
||||
evts.push(eventsService.on("appState.editors.close", function (name, args) {
|
||||
$scope.infiniteMode = args && args.editors.length > 0 ? true : false;
|
||||
}));
|
||||
|
||||
//ensure to unregister from all events!
|
||||
|
||||
@@ -241,6 +241,15 @@ function NavigationController($scope, $rootScope, $location, $log, $q, $routePar
|
||||
init();
|
||||
}));
|
||||
|
||||
// event for infinite editors
|
||||
evts.push(eventsService.on("appState.editors.open", function (name, args) {
|
||||
$scope.infiniteMode = args && args.editors.length > 0 ? true : false;
|
||||
}));
|
||||
|
||||
evts.push(eventsService.on("appState.editors.close", function (name, args) {
|
||||
$scope.infiniteMode = args && args.editors.length > 0 ? true : false;
|
||||
}));
|
||||
|
||||
/**
|
||||
* Based on the current state of the application, this configures the scope variables that control the main tree and language drop down
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div id="tree" ng-show="authenticated">
|
||||
<umb-tree
|
||||
api="treeApi"
|
||||
on-init="onTreeInit()" >
|
||||
on-init="onTreeInit()">
|
||||
</umb-tree>
|
||||
</div>
|
||||
</div>
|
||||
@@ -44,6 +44,9 @@
|
||||
</umb-context-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="umb-editor__overlay" ng-show="infiniteMode"></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user