summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-01-17 11:17:40 +0100
committerMorris Jobke <hey@morrisjobke.de>2017-01-22 11:45:08 -0600
commit418ebfbdf4c5b73fb29007c70dfde576ca799943 (patch)
tree4d27cf7525be27bd75b87e5b40fcf46ce315173d /apps
parent0d6e3ca86b28fcf87a2541b97e1984a7a36c8bc6 (diff)
downloadnextcloud-server-418ebfbdf4c5b73fb29007c70dfde576ca799943.tar.gz
nextcloud-server-418ebfbdf4c5b73fb29007c70dfde576ca799943.zip
fit newFileMenu to css guidelines
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/css/files.css36
-rw-r--r--apps/files/js/filelist.js2
-rw-r--r--apps/files/js/newfilemenu.js10
3 files changed, 9 insertions, 39 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index 7956ef5c6ae..ada53abdc72 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -768,36 +768,9 @@ html.ie8 #controls .button.new {
}
.newFileMenu {
- width: 200px;
- margin-left: -56px;
- margin-top: 25px;
- 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;
+ font-weight: 300;
+ top: 100%;
+ margin-top: 4px;
}
.newFileMenu .filenameform {
@@ -835,6 +808,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..f0e794cdc1e 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);
+ this._newButton.append(this._newFileMenu.$el);
}
this._newFileMenu.showAt($target);
diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js
index 75c4cdcc0ba..91cf63c9508 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-center',
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);
}
});