summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-01-22 20:39:16 -0600
committerGitHub <noreply@github.com>2017-01-22 20:39:16 -0600
commit16afaa783b8e7b0e728543556c92dcc93241ae4b (patch)
treed1f04cdaa09132972d0ed1ff01d1441cf0d3c817 /apps
parent8024f5a17f467a1d653d7b38622b4de28cc5dde2 (diff)
parent0fc0bcf6b3535f7e32f8fd4e5618a3707193acf5 (diff)
downloadnextcloud-server-16afaa783b8e7b0e728543556c92dcc93241ae4b.tar.gz
nextcloud-server-16afaa783b8e7b0e728543556c92dcc93241ae4b.zip
Merge pull request #3118 from nextcloud/newFileMenu-css-guidelines
Fit newFileMenu to css guidelines
Diffstat (limited to 'apps')
-rw-r--r--apps/files/css/files.css41
-rw-r--r--apps/files/js/filelist.js2
-rw-r--r--apps/files/js/newfilemenu.js10
3 files changed, 12 insertions, 41 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index 7956ef5c6ae..05b8e58cbe4 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -768,46 +768,20 @@ html.ie8 #controls .button.new {
}
.newFileMenu {
- width: 200px;
- margin-left: -56px;
- margin-top: 25px;
+ font-weight: 300;
+ top: 100%;
+ margin-top: 4px;
+ min-width: 100px;
+ margin-left: 7px;
z-index: 1001;
}
-.newFileMenu .menuitem {
- white-space: nowrap;
- overflow: hidden;
-}
-.newFileMenu.popovermenu a.menuitem,
-.newFileMenu.popovermenu label.menuitem,
-.newFileMenu.popovermenu .menuitem {
- padding: 0;
- margin: 0;
-}
-
-.newFileMenu.popovermenu a.menuitem.active {
- opacity: 1;
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
- filter: alpha(opacity=100);
-}
-
-.newFileMenu.bubble:after {
- left: 75px;
- right: auto;
-}
-.newFileMenu.bubble:before {
- left: 75px;
- right: auto;
-}
-
.newFileMenu .filenameform {
display: inline-block;
}
.newFileMenu .filenameform input {
- width: 100%;
- box-sizing: border-box;
- margin: -2px 0;
+ margin: 2px 0;
}
#fileList .popovermenu .action {
@@ -835,6 +809,9 @@ html.ie8 #controls .button.new {
height: 15px;
}
+.app-files .actions .button.new {
+ position: relative;
+}
.app-files .actions .button.new .icon {
margin-bottom: 2px;
}
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index bb50814dfdc..bcada9acfe5 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -2951,7 +2951,7 @@
this._newFileMenu = new OCA.Files.NewFileMenu({
fileList: this
});
- $('body').append(this._newFileMenu.$el);
+ $('.actions').append(this._newFileMenu.$el);
}
this._newFileMenu.showAt($target);
diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js
index 75c4cdcc0ba..e4023c62342 100644
--- a/apps/files/js/newfilemenu.js
+++ b/apps/files/js/newfilemenu.js
@@ -38,7 +38,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'
@@ -235,13 +236,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);
}
});