Modify Hipchat input field to behave like a dropdown

* Fixed UX issues
This commit is contained in:
Marliana Lara
2017-07-31 13:21:21 -04:00
parent 9d1853f6df
commit 4bcd72b1ed
10 changed files with 40 additions and 22 deletions

View File

@@ -63,17 +63,16 @@
.Form-title--is_ldap_user, .Form-title--is_ldap_user,
.Form-title--is_external_account, .Form-title--is_external_account,
.Form-title--roleType { .Form-title--roleType {
height:15px;
color: @default-interface-txt;
background-color: @default-list-header-bg; background-color: @default-list-header-bg;
border-radius: 5px; border-radius: 5px;
color: @default-interface-txt;
font-size: 10px; font-size: 10px;
padding-left: 10px;
padding-right: 10px;
margin-left: 10px;
text-transform: uppercase;
font-weight: 100; font-weight: 100;
height:15px;
margin-left: 10px;
margin-top: 2.25px; margin-top: 2.25px;
padding: 0 10px;
text-transform: uppercase;
} }
.Form-exitHolder { .Form-exitHolder {
@@ -523,11 +522,6 @@ input[type='radio']:checked:before {
.Form-mixedInputGroup { .Form-mixedInputGroup {
width: 100%; width: 100%;
.Form-lookupButton {
border-right:1px solid @field-border;
}
} }
.FormToggle {} .FormToggle {}

View File

@@ -555,10 +555,9 @@ table, tbody {
.InventoryManage-container { .InventoryManage-container {
.List-actionHolder { .List-actionHolder {
justify-content: flex-end; justify-content: flex-end;
margin-top: -52px;
} }
.List-action button { .List-actions {
margin-left: 12px; margin: 0 0 -34px 0;
} }
.SmartSearch-searchTermContainer { .SmartSearch-searchTermContainer {
width: 100%; width: 100%;

View File

@@ -44,6 +44,10 @@
padding: 0px 20px; padding: 0px 20px;
} }
.AddPermissions-body .List-well {
margin-top: 0;
}
.AddPermissions-footer { .AddPermissions-footer {
display: flex; display: flex;
flex-wrap: wrap-reverse; flex-wrap: wrap-reverse;

View File

@@ -7,12 +7,12 @@
export default ['Rest', 'Wait', 'NotificationsFormObject', export default ['Rest', 'Wait', 'NotificationsFormObject',
'ProcessErrors', 'GetBasePath', 'Alert', 'ProcessErrors', 'GetBasePath', 'Alert',
'GenerateForm', '$scope', '$state', 'CreateSelect2', 'GetChoices', 'GenerateForm', '$scope', '$state', 'CreateSelect2', 'GetChoices',
'NotificationsTypeChange', 'ParseTypeChange', 'NotificationsTypeChange', 'ParseTypeChange', 'i18n',
function( function(
Rest, Wait, NotificationsFormObject, Rest, Wait, NotificationsFormObject,
ProcessErrors, GetBasePath, Alert, ProcessErrors, GetBasePath, Alert,
GenerateForm, $scope, $state, CreateSelect2, GetChoices, GenerateForm, $scope, $state, CreateSelect2, GetChoices,
NotificationsTypeChange, ParseTypeChange NotificationsTypeChange, ParseTypeChange, i18n
) { ) {
var generator = GenerateForm, var generator = GenerateForm,
@@ -74,6 +74,12 @@ export default ['Rest', 'Wait', 'NotificationsFormObject',
element: '#notification_template_notification_type', element: '#notification_template_notification_type',
multiple: false multiple: false
}); });
$scope.hipchatColors = [i18n._('Gray'), i18n._('Green'), i18n._('Purple'), i18n._('Red'), i18n._('Yellow'), i18n._('Random')];
CreateSelect2({
element: '#notification_template_color',
multiple: false
});
}); });
$scope.$watch('headers', function validate_headers(str) { $scope.$watch('headers', function validate_headers(str) {

View File

@@ -9,14 +9,14 @@ export default ['Rest', 'Wait',
'GenerateForm', 'GenerateForm',
'notification_template', 'notification_template',
'$scope', '$state', 'GetChoices', 'CreateSelect2', 'Empty', '$scope', '$state', 'GetChoices', 'CreateSelect2', 'Empty',
'NotificationsTypeChange', 'ParseTypeChange', 'NotificationsTypeChange', 'ParseTypeChange', 'i18n',
function( function(
Rest, Wait, Rest, Wait,
NotificationsFormObject, ProcessErrors, GetBasePath, NotificationsFormObject, ProcessErrors, GetBasePath,
GenerateForm, GenerateForm,
notification_template, notification_template,
$scope, $state, GetChoices, CreateSelect2, Empty, $scope, $state, GetChoices, CreateSelect2, Empty,
NotificationsTypeChange, ParseTypeChange NotificationsTypeChange, ParseTypeChange, i18n
) { ) {
var generator = GenerateForm, var generator = GenerateForm,
id = notification_template.id, id = notification_template.id,
@@ -121,6 +121,12 @@ export default ['Rest', 'Wait',
element: '#notification_template_notification_type', element: '#notification_template_notification_type',
multiple: false multiple: false
}); });
$scope.hipchatColors = [i18n._('Gray'), i18n._('Green'), i18n._('Purple'), i18n._('Red'), i18n._('Yellow'), i18n._('Random')];
CreateSelect2({
element: '#notification_template_color',
multiple: false
});
NotificationsTypeChange.getDetailFields($scope.notification_type.value).forEach(function(field) { NotificationsTypeChange.getDetailFields($scope.notification_type.value).forEach(function(field) {
$scope[field[0]] = field[1]; $scope[field[0]] = field[1];
}); });

View File

@@ -295,7 +295,8 @@ export default ['i18n', function(i18n) {
color: { color: {
label: i18n._('Notification Color'), label: i18n._('Notification Color'),
dataTitle: i18n._('Notification Color'), dataTitle: i18n._('Notification Color'),
type: 'text', type: 'select',
ngOptions: 'color for color in hipchatColors track by color',
awPopOver: '<p>' + i18n.sprintf(i18n._('Color can be one of %s.'), '<code>yellow</code>, <code>green</code>, <code>red</code>, ' + awPopOver: '<p>' + i18n.sprintf(i18n._('Color can be one of %s.'), '<code>yellow</code>, <code>green</code>, <code>red</code>, ' +
'<code>purple</code>, <code>gray</code>, <code>random</code>') + '\n', '<code>purple</code>, <code>gray</code>, <code>random</code>') + '\n',
awRequiredWhen: { awRequiredWhen: {

View File

@@ -38,10 +38,14 @@
.alert { .alert {
margin: 0; margin: 0;
} }
.alert span:first-of-type {
margin-right: 10px;
}
.close { .close {
position: absolute; position: absolute;
right: 5px; right: 10px;
top: 0px; top: 5px;
color: white; color: white;
opacity: 1; opacity: 1;
text-shadow: none; text-shadow: none;

View File

@@ -65,6 +65,10 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
align-items: baseline; align-items: baseline;
&:hover {
color: @default-link-hov;
}
} }
.OrgCards-actionItems { .OrgCards-actionItems {

View File

@@ -224,6 +224,7 @@
.SmartSearch-examples { .SmartSearch-examples {
display: flex; display: flex;
flex-wrap: wrap;
} }
.SmartSearch-examples--title { .SmartSearch-examples--title {

View File

@@ -17,7 +17,6 @@ export default ['i18n', function(i18n) {
selectInstructions: i18n.sprintf(i18n._("Click on a row to select it, and click Finished when done. Use the %s button to create a new job template."), "<i class=\"icon-plus\"></i> "), selectInstructions: i18n.sprintf(i18n._("Click on a row to select it, and click Finished when done. Use the %s button to create a new job template."), "<i class=\"icon-plus\"></i> "),
index: false, index: false,
hover: true, hover: true,
searchBarFullWidth: true,
fields: { fields: {
name: { name: {