optimalization
parent
151bb3af5e
commit
0f8d62a9ab
|
@ -3,13 +3,13 @@
|
|||
<a class="nav-link">Global:</a>
|
||||
</li>
|
||||
<li ng-repeat="(key, tab) in tabs_common" class="nav-item">
|
||||
<a class="nav-link" ng-click="setTabCommon(key)" ng-class="{ 'active': tab_common === key, 'changed': getSiteTabChanges(tab.slug) }">{{ tab.name }}<small ng-cloak>({{ commonChanges[tab.slug] }})</small></a>
|
||||
<a class="nav-link" ng-click="setTabCommon(key)" ng-class="{ 'active': tab_common === key, 'changed': commonChanges[tab.slug] }">{{ tab.name }}<small ng-cloak>({{ commonChanges[tab.slug] }})</small></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content common-content">
|
||||
<ul ng-if="layout === 'do'" class="nav nav-pills nav-fill" role="tablist">
|
||||
<li ng-repeat="(key, tab) in tabs_common" class="nav-item">
|
||||
<a class="nav-link" ng-click="setTabCommon(key)" ng-class="{ 'active': tab_common === key, 'changed': getSiteTabChanges(tab.slug), 'visited': key < tab_common }">{{ tab.name }}<small ng-cloak>({{ commonChanges[tab.slug] }})</small></a>
|
||||
<a class="nav-link" ng-mouseenter="setTabCommon(key)" ng-class="{ 'active': tab_common === key, 'changed': commonChanges[tab.slug], 'visited': key < tab_common }">{{ tab.name }}<small ng-cloak>({{ commonChanges[tab.slug] }})</small></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-pane tab-https" ng-class="{ 'active': tabs_common[tab_common].slug === 'https' }">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div class="tab-content site-content">
|
||||
<ul ng-if="layout === 'do'" class="nav nav-pills nav-fill" role="tablist">
|
||||
<li ng-repeat="(key, tab) in tabs_site" class="nav-item">
|
||||
<a class="nav-link" ng-click="setTabSite(key)" ng-class="{ 'active': tab_site === key, 'changed': getSiteTabChanges(tab.slug), 'visited': key < tab_site }">{{ tab.name }}<small ng-cloak>({{ getSiteTabChanges('php') }})</small></a>
|
||||
<a class="nav-link" ng-mouseenter="setTabSite(key)" ng-class="{ 'active': tab_site === key, 'changed': getSiteTabChanges(tab.slug), 'visited': key < tab_site }">{{ tab.name }}<small ng-cloak>({{ getSiteTabChanges('php') }})</small></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-pane tab-presets" ng-class="{ 'active': tabs_site[tab_site].slug === 'presets' }">
|
||||
|
|
|
@ -190,37 +190,16 @@
|
|||
}
|
||||
|
||||
function calculateChanges() {
|
||||
var siteTabs = [
|
||||
'server',
|
||||
'https',
|
||||
'php',
|
||||
'python',
|
||||
'proxy',
|
||||
'routing',
|
||||
'logging',
|
||||
];
|
||||
|
||||
var commonTabs = [
|
||||
'https',
|
||||
'security',
|
||||
'php',
|
||||
'python',
|
||||
'performance',
|
||||
'logging',
|
||||
'nginx',
|
||||
'tools',
|
||||
];
|
||||
|
||||
if ($scope.siteChanges[$scope.site] === undefined) {
|
||||
$scope.siteChanges[$scope.site] = {};
|
||||
}
|
||||
|
||||
for (var i in siteTabs) {
|
||||
$scope.siteChanges[$scope.site][siteTabs[i]] = $window.document.querySelectorAll('section.tabs .tab-content.site-content .tab-' + siteTabs[i] + ' .form-group:not(.disabled) .input-changed').length;
|
||||
for (var i in $scope.tabs_site) {
|
||||
$scope.siteChanges[$scope.site][$scope.tabs_site[i].slug] = $window.document.querySelectorAll('section.tabs .tab-content.site-content .tab-' + $scope.tabs_site[i].slug + ' .form-group:not(.disabled) .input-changed').length;
|
||||
}
|
||||
|
||||
for (var j in commonTabs) {
|
||||
$scope.commonChanges[commonTabs[j]] = $window.document.querySelectorAll('section.tabs .tab-content.common-content .tab-' + commonTabs[j] + ' .form-group:not(.disabled) .input-changed').length;
|
||||
for (var j in $scope.tabs_common) {
|
||||
$scope.commonChanges[$scope.tabs_common[j].slug] = $window.document.querySelectorAll('section.tabs .tab-content.common-content .tab-' + $scope.tabs_common[j].slug + ' .form-group:not(.disabled) .input-changed').length;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -462,6 +441,25 @@
|
|||
},
|
||||
];
|
||||
|
||||
$scope.steps = [
|
||||
{
|
||||
name: 'Download',
|
||||
slug: 'download',
|
||||
},
|
||||
{
|
||||
name: 'SSL init',
|
||||
slug: 'ssl',
|
||||
},
|
||||
{
|
||||
name: 'Cerbot',
|
||||
slug: 'certbot',
|
||||
},
|
||||
{
|
||||
name: 'Go Live!',
|
||||
slug: 'live',
|
||||
},
|
||||
];
|
||||
|
||||
$scope.siteChanges = {};
|
||||
$scope.commonChanges = {};
|
||||
|
||||
|
|
Loading…
Reference in New Issue