AC-682 Made project help text changes. Found a way to get help icon tool-tip to display top while help text pop-out displays left. Added status drop-dwon options on projects search filter.

This commit is contained in:
Chris Houseknecht 2013-11-21 18:04:26 +00:00
parent f473d51ef3
commit 1a3d0e4e6f
4 changed files with 38 additions and 9 deletions

View File

@ -117,6 +117,22 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
scope.search(list.iterator);
});
if (scope.removeStatusOptionsReady) {
scope.removeStatusOptionsReady();
}
scope.removeStatusOptionsReady = scope.$on('statusOptionsReady', function() {
list.fields.status.searchOptions = scope.project_status_options;
});
// Load options for status --used in search
GetChoices({
scope: scope,
url: defaultUrl,
field: 'status',
variable: 'project_status_options',
callback: 'statusOptionsReady'
});
// Load the list of options for Kind
GetChoices({
scope: scope,
@ -126,7 +142,6 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
callback: 'choicesReady'
});
LoadBreadCrumbs();
scope.showActivity = function() { Stream(); }

View File

@ -30,7 +30,7 @@ angular.module('ProjectsListDefinition', [])
excludeModal: true
},
scm_type: {
label: 'SCM Type',
label: 'Type',
searchType: 'select',
searchOptions: [], // will be set by Options call to projects resource
excludeModal: true,
@ -43,6 +43,8 @@ angular.module('ProjectsListDefinition', [])
dataPlacement: 'top',
badgeIcon: "\{\{ 'icon-failures-' + project.badge \}\}",
badgePlacement: 'left',
searchType: 'select',
searchOptions: [], // will be set by Options call to projects resource
excludeModal: true
},
last_updated: {
@ -63,12 +65,13 @@ angular.module('ProjectsListDefinition', [])
awToolTip: 'Create a new project'
},
help: {
awPopOver: "<dl>\n<dt>Updating</dt><dd>An SCM update is in progress.</dd>\n" +
"<dt>Never Updated</dt><dd>No SCM update has ever run for the project.</dd>\n" +
"<dt>Failed</dt><dd>An error occurred during the most recent SCM update.</dd>\n" +
"<dt>Successful</dt><dd>The latest SCM update ran to completion without incident.</dd>\n" +
"<dt>Missing</dt><dd>The local project directory is missing.</dd>\n" +
"<dt>N/A</dt><dd>The project does not use SCM, so an update status is not available.</dd>\n" +
awPopOver: "<dl>\n<dt>Updating</dt><dd>A source control update is in progress.</dd>\n" +
"<dt>Never Updated</dt><dd>This project has not yet been updated from source control.</dd>\n" +
"<dt>Failed</dt><dd>An error occurred during the most recent source control update, click the status " +
"text for more information.</dd>\n" +
"<dt>Successful</dt><dd>TThe latest source control update completed successfully.</dd>\n" +
"<dt>Missing</dt><dd>The previously configured local project directory is missing.</dd>\n" +
"<dt>N/A</dt><dd>The project is not linked to source control, so updates are not applicable.</dd>\n" +
"</dl>\n",
dataPlacement: 'left',
dataContainer: 'body',
@ -76,6 +79,7 @@ angular.module('ProjectsListDefinition', [])
mode: 'all',
'class': 'btn-xs btn-info btn-help',
awToolTip: 'Click for help',
awTipPlacement: 'top',
dataTitle: 'Project Status',
iconSize: 'large'
},

View File

@ -238,7 +238,13 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Hos
.directive('awToolTip', function() {
return function(scope, element, attrs) {
var delay = (attrs.delay != undefined && attrs.delay != null) ? attrs.delay : $AnsibleConfig.tooltip_delay;
var placement = (attrs.placement != undefined && attrs.placement != null) ? attrs.placement : 'left';
var placement;
if (attrs.awTipPlacement) {
placement = attrs.awTipPlacement;
}
else {
placement = (attrs.placement != undefined && attrs.placement != null) ? attrs.placement : 'left';
}
$(element).on('hidden.bs.tooltip', function( ) {
// TB3RC1 is leaving behind tooltip <div> elements. This will remove them
// after a tooltip fades away. If not, they lay overtop of other elements and

View File

@ -59,6 +59,9 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
case 'dataTitle':
result = "data-title=\"" + value + "\" ";
break;
case 'awTipPlacement':
result = "aw-tip-placement=\"" + value + "\" ";
break;
case 'columnShow':
result = "ng-show=\"" + value + "\" ";
break;
@ -139,6 +142,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
html += (btn.ngHide) ? Attr(btn, 'ngHide') : "";
html += (btn.ngDisabled) ? Attr(btn, 'ngHide') : "";
html += (btn.ngClass) ? Attr(btn, 'ngClass') : "";
html += (btn.awTipPlacement) ? Attr(btn, 'awTipPlacement') : "";
html += " >";
html += (btn['img']) ? "<img src=\"" + $basePath + "img/" + btn.img + "\" style=\"width: 12px; height: 12px;\" >" : "";
html += (btn['icon']) ? Attr(btn,'icon') : "";