Remove layout button & expose layout method (#126)

* Remove toggle layout button

* Expose toggle layout method
This commit is contained in:
Matt (IPv4) Cowley
2019-11-19 18:41:35 +00:00
committed by Bálint Szekeres
parent c9f81d72e1
commit 5e1e7bd279
3 changed files with 3 additions and 22 deletions

View File

@@ -832,11 +832,7 @@
}
};
$scope.toggleLayoutVisible = function() {
return $window.location.hostname !== 'nginxconfig.io';
};
$scope.toggleLayout = function() {
$window.toggleLayout = function() {
if ($scope.layout === 'default') {
$scope.layout = 'do';
$scope.tabs_site.unshift({
@@ -847,6 +843,7 @@
$scope.layout = 'default';
$scope.tabs_site.shift();
}
doMasonry();
};
@@ -1348,7 +1345,7 @@
initMasonry();
if ($window.LAYOUT && $window.LAYOUT !== $scope.layout) {
$scope.toggleLayout();
$window.toggleLayout();
}
};
}