Fix popover position and avatar loading

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2017-10-04 17:01:03 +02:00
parent 0ce3636fba
commit 4ca88471b0
No known key found for this signature in database
GPG Key ID: FB5ACEED51955BF8
3 changed files with 47 additions and 37 deletions

View File

@ -35,12 +35,13 @@ input {
}
#avatarform {
> h2 {
position: relative;
}
.avatardiv {
margin: 10px auto;
}
.federationScopeMenu {
/* popover magic fix */
margin-right: calc(-50% - 7px);
}
.warning {
width: 100%;
}
@ -117,11 +118,11 @@ input {
}
.icon-federation-menu {
float: right;
padding-left: 16px;
background-size: 16px;
background-position: left 8px;
opacity: .3;
margin-left: 10px;
cursor: pointer;
.icon-triangle-s {
@ -163,12 +164,18 @@ input {
&:after {
clear: both;
}
> div {
&:not(#personal-settings-avatar-container) > div {
float: left;
width: 300px;
}
> div {
h2 {
position: relative;
margin-bottom: 5px;
display: inline-flex;
flex-wrap: nowrap;
justify-content: space-between;
width: 100%;
}
> form span {
&[class^="icon-checkmark"], &[class^="icon-error"] {

View File

@ -128,6 +128,7 @@ function avatarResponseHandler (data) {
var $warning = $('#avatarform .warning');
$warning.hide();
if (data.status === "success") {
$('#displayavatar .avatardiv').removeClass('icon-loading');
updateAvatar();
} else if (data.data === "notsquare") {
showAvatarCropper();
@ -302,7 +303,7 @@ $(document).ready(function () {
},
submit: function(e, data) {
$('#displayavatar img').hide();
$('#displayavatar .avatardiv').addClass('loading');
$('#displayavatar .avatardiv').addClass('icon-loading');
data.formData = _.extend(data.formData || {}, {
requesttoken: OC.requestToken
});

View File

@ -66,7 +66,8 @@ vendor_style('jcrop/css/jquery.Jcrop');
</div>
<div id="personal-settings">
<div id="personal-settings-avatar-container">
<div id="personal-settings-avatar-container" class="personal-settings-container">
<div>
<form id="avatarform" class="section" method="post" action="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.postAvatar')); ?>">
<h2>
<label><?php p($l->t('Profile picture')); ?></label><span class="icon-federation-menu icon-password">
@ -99,6 +100,7 @@ vendor_style('jcrop/css/jquery.Jcrop');
<?php } ?>
</form>
</div>
</div>
<div class="personal-settings-container">
<div class="personal-settings-setting-box">