mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CS-15325: Fix selected name of user from the drop down list overlay.
This commit is contained in:
parent
730f808d18
commit
b7d68ac5d5
@ -280,6 +280,8 @@ body.login {
|
|||||||
.login .fields .field label.error {
|
.login .fields .field label.error {
|
||||||
color: #FF0000;
|
color: #FF0000;
|
||||||
float: right;
|
float: right;
|
||||||
|
left: 204px;
|
||||||
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login .fields input {
|
.login .fields input {
|
||||||
|
|||||||
@ -53,7 +53,7 @@
|
|||||||
$form.validate();
|
$form.validate();
|
||||||
|
|
||||||
// Form label behavior
|
// Form label behavior
|
||||||
$inputs.bind('keydown keyup focus blur', function(event) {
|
$inputs.bind('keydown focus click blur', function(event) {
|
||||||
var $target = $(event.target);
|
var $target = $(event.target);
|
||||||
var $label = $form.find('label').filter(function() {
|
var $label = $form.find('label').filter(function() {
|
||||||
return $(this).attr('for') == $target.attr('name');
|
return $(this).attr('for') == $target.attr('name');
|
||||||
@ -63,10 +63,15 @@
|
|||||||
$label.hide();
|
$label.hide();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else if (event.type == 'blur') {
|
||||||
if (!$target.val()) {
|
if ($target.hasClass('first-input')) {
|
||||||
|
$target.removeClass('first-input');
|
||||||
|
}
|
||||||
|
if (!$(this).val()) {
|
||||||
$label.show();
|
$label.show();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (!$target.hasClass('first-input')) {
|
||||||
$label.hide();
|
$label.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -79,11 +84,13 @@
|
|||||||
// Labels cause related input to be focused
|
// Labels cause related input to be focused
|
||||||
$login.find('label').click(function() {
|
$login.find('label').click(function() {
|
||||||
var $input = $inputs.filter('[name=' + $(this).attr('for') + ']');
|
var $input = $inputs.filter('[name=' + $(this).attr('for') + ']');
|
||||||
|
var $label = $(this);
|
||||||
|
|
||||||
$input.focus();
|
$input.focus();
|
||||||
|
$label.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
$inputs.filter(':first').focus();
|
$inputs.filter(':first').addClass('first-input').focus();
|
||||||
|
|
||||||
// Login action
|
// Login action
|
||||||
$login.find('input[type=submit]').click(function() {
|
$login.find('input[type=submit]').click(function() {
|
||||||
|
|||||||
@ -352,7 +352,7 @@
|
|||||||
// Check if target should be hovered
|
// Check if target should be hovered
|
||||||
function checkHoveredLabel($target) {
|
function checkHoveredLabel($target) {
|
||||||
var $multiWizard = $('div.ui-dialog div.multi-wizard');
|
var $multiWizard = $('div.ui-dialog div.multi-wizard');
|
||||||
if ($target.is('label[for]') ||
|
if (($target.is('label[for]') && !$target.parents('body.login')) ||
|
||||||
($multiWizard.size() &&
|
($multiWizard.size() &&
|
||||||
($target.is('.multi-wizard label') && $target.prev('input[type="radio"],input[type="checkbox"]').size()) ||
|
($target.is('.multi-wizard label') && $target.prev('input[type="radio"],input[type="checkbox"]').size()) ||
|
||||||
($target.is('.multi-wizard .select-desc div.name') && $target.parent('div.select-desc').prev('input[type="radio"],input[type="checkbox"]').size())
|
($target.is('.multi-wizard .select-desc div.name') && $target.parent('div.select-desc').prev('input[type="radio"],input[type="checkbox"]').size())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user