Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Fix #197
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Feb 12, 2017
1 parent 9c57d52 commit 6020d3d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 36 deletions.
33 changes: 6 additions & 27 deletions css/upload.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@
}

.newFileMenu {
width: 140px;
margin-left: -56px;
margin-top: 25px;
font-weight: 300;
top: 100%;
margin-top: 4px;
min-width: 100px;
margin-left: 7px;
z-index: 1001;
}

Expand All @@ -51,39 +53,16 @@
box-shadow: 0 0 6px #f8b9b7;
}

.newFileMenu .menuitem {
white-space: nowrap;
overflow: hidden;
}
.newFileMenu.popovermenu .menuitem .icon {
margin-bottom: -2px;
}
.newFileMenu.popovermenu a.menuitem,
.newFileMenu.popovermenu label.menuitem,
.newFileMenu.popovermenu .menuitem {
padding: 0;
margin: 0;
}

.newFileMenu.popovermenu a.menuitem.active {
opacity: 1;
}

.newFileMenu.bubble:after {
left: 75px;
right: auto;
}
.newFileMenu.bubble:before {
left: 75px;
right: auto;
}

.newFileMenu .filenameform {
display: inline-block;
}

.newFileMenu .filenameform input {
width: 100px;
margin: 2px 0;
}

#fileList .popovermenu .action {
Expand Down
2 changes: 1 addition & 1 deletion js/galleryview.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@
}
if (!this._newFileMenu) {
this._newFileMenu = new Gallery.NewFileMenu();
$('body').append(this._newFileMenu.$el);
$('.actions').append(this._newFileMenu.$el);
}
this._newFileMenu.showAt($target);

Expand Down
10 changes: 2 additions & 8 deletions js/vendor/owncloud/newfilemenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
*/
var NewFileMenu = OC.Backbone.View.extend({
tagName: 'div',
className: 'newFileMenu popovermenu bubble hidden open menu',
// Menu is opened by default because it's rendered on "add-button" click
className: 'newFileMenu popovermenu bubble menu open menu-left',

events: {
'click .menuitem': '_onClickAction'
Expand Down Expand Up @@ -126,13 +127,6 @@
*/
showAt: function ($target) {
this.render();
var targetOffset = $target.offset();
this.$el.css({
left: targetOffset.left,
top: targetOffset.top + $target.height()
});
this.$el.removeClass('hidden');

OC.showMenu(null, this.$el);
}
});
Expand Down

0 comments on commit 6020d3d

Please sign in to comment.