}
#avatar #cropper {
float: left;
- background-color: #fff;
z-index: 500;
- position: relative;
+ /* float cropper above settings page to prevent unexpected flowing from dynamically sized element */
+ position: fixed;
+ background-color: rgba(0, 0, 0, .2);
+ /*opacity: .20;*/
+ box-sizing: border-box;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ padding-top: 45px;
+ text-align: center;
+}
+#avatar #cropper .inner-container {
+ display: inline-block;
+ margin-top: 160px;
+ margin-left: 30px;
+ background: #fff;
+ color: #333;
+ border-radius: 3px;
+ box-shadow: 0 0 7px #888;
+ padding: 15px;
+ text-align: left;
+}
+
+#avatar #cropper .inner-container .jcrop-holder {
+ box-shadow: 0 0 7px #888;
+}
+#avatar #cropper .inner-container .button {
+ margin-top: 15px;
+}
+#avatar #cropper .inner-container .primary {
+ float: right;
}
#displaynameform,
function showAvatarCropper () {
var $cropper = $('#cropper');
var $cropperImage = $('<img/>');
- $cropperImage.css('opacity', 0);
- $cropper.prepend($cropperImage);
+ $cropperImage.css('opacity', 0); // prevent showing the unresized image
+ $cropper.children('.inner-container').prepend($cropperImage);
$cropperImage.attr('src',
OC.generateUrl('/avatar/tmp') + '?requesttoken=' + encodeURIComponent(oc_requesttoken) + '#' + Math.floor(Math.random() * 1000));
boxHeight: 500,
boxWidth: 500,
setSelect: [0, 0, 300, 300]
- }, function() {
- $cropperImage.css('opacity', 1);
});
});
}
</div>
<div id="cropper" class="hidden">
- <div class="inlineblock button" id="abortcropperbutton"><?php p($l->t('Cancel')); ?></div>
- <div class="inlineblock button primary" id="sendcropperbutton"><?php p($l->t('Choose as profile picture')); ?></div>
+ <div class="inner-container">
+ <div class="inlineblock button" id="abortcropperbutton"><?php p($l->t('Cancel')); ?></div>
+ <div class="inlineblock button primary" id="sendcropperbutton"><?php p($l->t('Choose as profile picture')); ?></div>
+ </div>
</div>
</form>
<?php endif; ?>