UX: fix post admin menu positioning & closing on mobile
This commit is contained in:
parent
d926cc13ac
commit
d70bb0e58b
|
@ -304,9 +304,12 @@ export default Discourse.View.extend({
|
|||
},
|
||||
|
||||
clickAdmin: function() {
|
||||
var $adminMenu = this.$('.post-admin-menu');
|
||||
this.set('adminMenu', $adminMenu);
|
||||
$adminMenu.show();
|
||||
var $postAdminMenu = this.$(".post-admin-menu");
|
||||
$postAdminMenu.show();
|
||||
$("html").on("mouseup.post-admin-menu", function() {
|
||||
$postAdminMenu.hide();
|
||||
$("html").off("mouseup.post-admin-menu");
|
||||
});
|
||||
},
|
||||
|
||||
clickToggleWiki: function() {
|
||||
|
|
|
@ -52,12 +52,6 @@ Discourse.PostView = Discourse.GroupedView.extend(Ember.Evented, {
|
|||
if (this.get('controller.multiSelect') && (e.metaKey || e.ctrlKey)) {
|
||||
this.get('controller').toggledSelectedPost(this.get('post'));
|
||||
}
|
||||
|
||||
var $adminMenu = this.get('adminMenu');
|
||||
if ($adminMenu && !$(e.target).is($adminMenu)) {
|
||||
$adminMenu.hide();
|
||||
this.set('adminMenu', null);
|
||||
}
|
||||
},
|
||||
|
||||
selected: function() {
|
||||
|
|
|
@ -206,8 +206,8 @@ nav.post-controls {
|
|||
border: 1px solid scale-color-diff();
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
bottom: -2px;
|
||||
right: 15px;
|
||||
z-index: 1000;
|
||||
display: none;
|
||||
|
||||
|
|
|
@ -77,12 +77,13 @@ button {
|
|||
border: 1px solid scale-color-diff();
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
bottom: -26px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
left: 135px;
|
||||
z-index: 1000;
|
||||
display: none;
|
||||
|
||||
h3 {
|
||||
margin-top: 0;
|
||||
color: $primary;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
@ -140,6 +141,7 @@ a.star {
|
|||
padding-top: 5px;
|
||||
padding-bottom: 0px;
|
||||
clear: both;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.topic-map {
|
||||
|
@ -446,8 +448,7 @@ blockquote > *:last-child {
|
|||
|
||||
.gutter { display: none; }
|
||||
|
||||
.posts-wrapper { position: relative;
|
||||
}
|
||||
.posts-wrapper { position: relative; }
|
||||
|
||||
.topic-body.highlighted {
|
||||
background-color: scale-color($tertiary, $lightness: 75%);
|
||||
|
|
Loading…
Reference in New Issue