From 16231da19fdc367ecb4db71abe1ccd0052312469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Thu, 3 May 2018 17:05:15 +0200 Subject: [PATCH] Fix position and template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- settings/css/settings.scss | 62 +++++++++---------- settings/js/federationscopemenu.js | 6 +- settings/js/federationsettingsview.js | 7 +-- .../settings/personal/personal.info.php | 57 ++++++++++------- 4 files changed, 71 insertions(+), 61 deletions(-) diff --git a/settings/css/settings.scss b/settings/css/settings.scss index a7a4e9776fb..97767ce2f22 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -106,23 +106,6 @@ input { grid-template-rows: 1fr 2fr 1fr; } - -.icon-federation-menu { - padding-left: 16px; - background-size: 16px; - background-position: left 8px; - opacity: .3; - margin-top: -2px; - margin-left: 10px; - cursor: pointer; - - .icon-triangle-s { - display: inline-block; - vertical-align: middle; - cursor: pointer; - } -} - .personal-show-container { width: 100%; } @@ -318,20 +301,37 @@ input { } } -.federationScopeMenu { - top: 44px; - &.popovermenu { - .menuitem { - // override h2 heading font size - font-size: 12.8px; - line-height: 1.6em; - .menuitem-text-detail { - opacity: .75; - } - &.active { - box-shadow: inset 2px 0 $color-primary; - .menuitem-text { - font-weight: 600; +.federation-menu { + position: relative; + cursor: pointer; + margin-left: 10px; + .icon-federation-menu { + padding-left: 16px; + background-size: 16px; + background-position: left center; + opacity: .3; + cursor: inherit; + .icon-triangle-s { + display: inline-block; + vertical-align: middle; + cursor: inherit; + } + } + .federationScopeMenu { + top: 44px; + &.popovermenu { + .menuitem { + // override h2 heading font size + font-size: 12.8px; + line-height: 1.6em; + .menuitem-text-detail { + opacity: .75; + } + &.active { + box-shadow: inset 2px 0 $color-primary; + .menuitem-text { + font-weight: 600; + } } } } diff --git a/settings/js/federationscopemenu.js b/settings/js/federationscopemenu.js index 4b1813f90e9..db8b8ff33f7 100644 --- a/settings/js/federationscopemenu.js +++ b/settings/js/federationscopemenu.js @@ -37,7 +37,7 @@ */ var FederationScopeMenu = OC.Backbone.View.extend({ tagName: 'div', - className: 'federationScopeMenu popovermenu bubble hidden menu', + className: 'federationScopeMenu popovermenu bubble menu menu-center', field: undefined, _scopes: undefined, @@ -129,10 +129,6 @@ break; } - var $el = $(context.target); - var offsetIcon = $el.offset(); - var offsetHeading = $el.closest('h2').offset(); - this.render(); this.$el.removeClass('hidden'); diff --git a/settings/js/federationsettingsview.js b/settings/js/federationsettingsview.js index b9722520f6d..d20d7bb78b6 100644 --- a/settings/js/federationsettingsview.js +++ b/settings/js/federationsettingsview.js @@ -62,14 +62,13 @@ render: function() { var self = this; _.each(this._inputFields, function(field) { - var $heading = self.$('#' + field + 'form h2'); - var $icon = self.$('#' + field + 'form h2 > span'); + var $icon = self.$('#' + field + 'form h2 > .federation-menu'); var scopeMenu = new OC.Settings.FederationScopeMenu({field: field}); self.listenTo(scopeMenu, 'select:scope', function(scope) { self._onScopeChanged(field, scope); }); - $heading.append(scopeMenu.$el); + $icon.append(scopeMenu.$el); $icon.on('click', _.bind(scopeMenu.show, scopeMenu)); // Restore initial state @@ -190,7 +189,7 @@ }, _setFieldScopeIcon: function(field, scope) { - var $icon = this.$('#' + field + 'form > h2 > span'); + var $icon = this.$('#' + field + 'form > h2 .icon-federation-menu'); $icon.removeClass('icon-password'); $icon.removeClass('icon-contacts-dark'); diff --git a/settings/templates/settings/personal/personal.info.php b/settings/templates/settings/personal/personal.info.php index e581e6d39e6..b40f4b6720f 100644 --- a/settings/templates/settings/personal/personal.info.php +++ b/settings/templates/settings/personal/personal.info.php @@ -42,9 +42,12 @@ vendor_style('jcrop/css/jquery.Jcrop');

- - - + +
+ + + +

@@ -102,9 +105,11 @@ vendor_style('jcrop/css/jquery.Jcrop');

- - - +
+ + + +

@@ -124,9 +129,11 @@ vendor_style('jcrop/css/jquery.Jcrop');

- - - +
+ + + +

- - - +
+ + + +

value="" @@ -185,9 +194,11 @@ vendor_style('jcrop/css/jquery.Jcrop');

- - - +
+ + + +

placeholder="t('Your postal address')); ?>" @@ -205,9 +216,11 @@ vendor_style('jcrop/css/jquery.Jcrop');

- - - +
+ + + +

@@ -252,9 +265,11 @@ vendor_style('jcrop/css/jquery.Jcrop');

- - - +
+ + + +