mirror of
https://github.com/ansible/awx.git
synced 2026-03-26 05:15:02 -02:30
Merge pull request #711 from jaredevantabor/jobs-page-tabs
Jobs Page tabs re-styling
This commit is contained in:
@@ -23,6 +23,8 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $statePa
|
|||||||
api_complete = false,
|
api_complete = false,
|
||||||
max_rows;
|
max_rows;
|
||||||
|
|
||||||
|
$scope.jobsSelected = true;
|
||||||
|
|
||||||
if ($scope.removeListLoaded) {
|
if ($scope.removeListLoaded) {
|
||||||
$scope.removeListLoaded();
|
$scope.removeListLoaded();
|
||||||
}
|
}
|
||||||
@@ -90,6 +92,20 @@ export function JobsListController ($rootScope, $log, $scope, $compile, $statePa
|
|||||||
scheduled_scope.search('schedule');
|
scheduled_scope.search('schedule');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function clearTabs() {
|
||||||
|
$scope.jobsSelected = false;
|
||||||
|
$scope.schedulesSelected = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.toggleTab = function(tab) {
|
||||||
|
clearTabs();
|
||||||
|
if (tab === "jobs") {
|
||||||
|
$scope.jobsSelected = true;
|
||||||
|
} else if (tab === "scheduled") {
|
||||||
|
$scope.schedulesSelected = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if ($rootScope.removeJobStatusChange) {
|
if ($rootScope.removeJobStatusChange) {
|
||||||
$rootScope.removeJobStatusChange();
|
$rootScope.removeJobStatusChange();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -396,7 +396,8 @@ export default
|
|||||||
mode: 'edit',
|
mode: 'edit',
|
||||||
id: id,
|
id: id,
|
||||||
scope: scope,
|
scope: scope,
|
||||||
showSearch: false
|
showSearch: false,
|
||||||
|
title: false
|
||||||
});
|
});
|
||||||
|
|
||||||
SearchInit({
|
SearchInit({
|
||||||
|
|||||||
@@ -710,7 +710,8 @@ export default
|
|||||||
id: id,
|
id: id,
|
||||||
scope: scope,
|
scope: scope,
|
||||||
searchSize: (searchSize) ? searchSize : 'col-lg-6 col-md-6 col-sm-6 col-xs-12',
|
searchSize: (searchSize) ? searchSize : 'col-lg-6 col-md-6 col-sm-6 col-xs-12',
|
||||||
showSearch: true
|
showSearch: true,
|
||||||
|
title: false
|
||||||
});
|
});
|
||||||
|
|
||||||
SearchInit({
|
SearchInit({
|
||||||
|
|||||||
@@ -10,13 +10,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div >
|
<div>
|
||||||
<ul id="jobs_tabs" class="nav nav-tabs">
|
<div id="jobs_tabs" class="Form-tabHolder">
|
||||||
<li class="active"><a id="active_jobs_link" ng-click="toggleTab($event, 'active_jobs_link', 'jobs_tabs')" href="#active-jobs-tab" data-toggle="tab">Jobs</a></li>
|
<div class= "Form-tab is-selected" id="active_jobs_link"
|
||||||
<li><a id="scheduled_jobs_link" ng-click="toggleTab($event, 'scheduled_jobs_link', 'job_status_tabs')" href="#scheduled-jobs-tab" data-toggle= "tab">Schedule</a></li>
|
ng-class="{'is-selected': jobsSelected }"
|
||||||
</ul>
|
ng-click="toggleTab('jobs')">
|
||||||
<div id="jobs-tab-content" class= "tab-content">
|
Jobs
|
||||||
<div class="tab-pane active" id= "active-jobs-tab">
|
</div>
|
||||||
|
<div id="scheduled_jobs_link" class="Form-tab"
|
||||||
|
ng-class="{'is-selected': schedulesSelected }"
|
||||||
|
ng-click="toggleTab('scheduled')">
|
||||||
|
Schedule
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="jobs-tab-content" class="Form-tabSection"
|
||||||
|
ng-class="{'is-selected': jobsSelected }">
|
||||||
<div class= "row search-row">
|
<div class= "row search-row">
|
||||||
<div class="col-lg-4 col-md-4 " id="active-jobs-search-container">
|
<div class="col-lg-4 col-md-4 " id="active-jobs-search-container">
|
||||||
</div>
|
</div>
|
||||||
@@ -26,7 +34,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class= "tab-pane" id="scheduled-jobs-tab">
|
<div class= "Form-tabSection" id="scheduled-jobs-tab"
|
||||||
|
ng-class="{'is-selected': schedulesSelected }">
|
||||||
<div class= "row search-row">
|
<div class= "row search-row">
|
||||||
<div class="col-lg-4 col-md-4 " id="scheduled-jobs-tab-search-container">
|
<div class="col-lg-4 col-md-4 " id="scheduled-jobs-tab-search-container">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -299,30 +299,32 @@ export default ['$location', '$compile', '$rootScope', 'SearchWidget', 'Paginate
|
|||||||
list = this.list,
|
list = this.list,
|
||||||
base, size, action, fld, cnt, field_action, fAction, itm;
|
base, size, action, fld, cnt, field_action, fAction, itm;
|
||||||
|
|
||||||
html += "<div class=\"List-header\">";
|
if(options.title !== false){
|
||||||
html += "<div class=\"List-title\">";
|
html += "<div class=\"List-header\">";
|
||||||
|
html += "<div class=\"List-title\">";
|
||||||
|
|
||||||
if (list.listTitle) {
|
if (list.listTitle) {
|
||||||
|
|
||||||
html += "<div class=\"List-titleText\">" + list.listTitle + "</div>";
|
html += "<div class=\"List-titleText\">" + list.listTitle + "</div>";
|
||||||
html += "<span class=\"badge List-titleBadge\">{{(" + list.iterator + "_total_rows | number:0)}}</span>";
|
html += "<span class=\"badge List-titleBadge\">{{(" + list.iterator + "_total_rows | number:0)}}</span>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
html += "</div>";
|
||||||
|
html += "<div class=\"List-actions\">";
|
||||||
|
html += "<div class=\"list-actions\" ng-include=\"'" +
|
||||||
|
templateUrl('shared/list-generator/list-actions') +
|
||||||
|
"'\">\n";
|
||||||
|
|
||||||
|
for (action in list.actions) {
|
||||||
|
list.actions[action] = _.defaults(list.actions[action], { dataPlacement: "top" });
|
||||||
|
}
|
||||||
|
|
||||||
|
html += "</div>\n";
|
||||||
|
html += "</div>";
|
||||||
|
html += "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
html += "</div>";
|
|
||||||
html += "<div class=\"List-actions\">";
|
|
||||||
html += "<div class=\"list-actions\" ng-include=\"'" +
|
|
||||||
templateUrl('shared/list-generator/list-actions') +
|
|
||||||
"'\">\n";
|
|
||||||
|
|
||||||
for (action in list.actions) {
|
|
||||||
list.actions[action] = _.defaults(list.actions[action], { dataPlacement: "top" });
|
|
||||||
}
|
|
||||||
|
|
||||||
html += "</div>\n";
|
|
||||||
html += "</div>";
|
|
||||||
html += "</div>";
|
|
||||||
|
|
||||||
if (options.mode === 'edit' && list.editInstructions) {
|
if (options.mode === 'edit' && list.editInstructions) {
|
||||||
html += "<div class=\"alert alert-info alert-block\">\n";
|
html += "<div class=\"alert alert-info alert-block\">\n";
|
||||||
html += "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>\n";
|
html += "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user