diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-02-28 12:55:33 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-03-07 13:17:36 +0100 |
commit | 3964616a9e2d2902f3e9be1f142938290eb34972 (patch) | |
tree | 9eeeb95e5b98a9f30abaafdd077c624840012907 | |
parent | d1aa96fef91a1e5352f987d16be773cac69135a8 (diff) | |
download | nextcloud-server-3964616a9e2d2902f3e9be1f142938290eb34972.tar.gz nextcloud-server-3964616a9e2d2902f3e9be1f142938290eb34972.zip |
Updated popover rules to allow form inputs and added input submit for new File
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r-- | apps/files/css/files.scss | 8 | ||||
-rw-r--r-- | apps/files/js/newfilemenu.js | 10 | ||||
-rw-r--r-- | core/css/apps.scss | 21 |
3 files changed, 22 insertions, 17 deletions
diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss index 1be58cff5a1..3012ca171aa 100644 --- a/apps/files/css/files.scss +++ b/apps/files/css/files.scss @@ -696,14 +696,6 @@ table.dragshadow td.size { z-index: 1001; } -.newFileMenu .filenameform { - display: inline-block; -} - -.newFileMenu .filenameform input { - margin: 2px 0; -} - #filestable .filename .action .icon, #filestable .selectedActions a .icon, #filestable .filename .favorite-mark .icon, diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js index 18d9104dc40..09420328f29 100644 --- a/apps/files/js/newfilemenu.js +++ b/apps/files/js/newfilemenu.js @@ -28,6 +28,7 @@ '<form class="filenameform">' + '<label class="hidden-visually" for="{{cid}}-input-{{fileType}}">{{fileName}}</label>' + '<input id="{{cid}}-input-{{fileType}}" type="text" value="{{fileName}}" autocomplete="off" autocapitalize="off">' + + '<input type="submit" value=" " class="primary icon-checkmark-white" />' '</form>'; /** @@ -116,7 +117,7 @@ } if ($target.find('form').length) { - $target.find('input').focus(); + $target.find('input[type=\'text\']').focus(); return; } @@ -138,7 +139,8 @@ $target.append($form); // here comes the OLD code - var $input = $form.find('input'); + var $input = $form.find('input[type=\'text\']'); + var $submit = $form.find('input[type=\'submit\']'); var lastPos; var checkInput = function () { @@ -171,6 +173,10 @@ } }); + $submit.click(function(){ + $form.submit(); + }); + $input.focus(); // pre select name up to the extension lastPos = newName.lastIndexOf('.'); diff --git a/core/css/apps.scss b/core/css/apps.scss index 691a0c07131..cbacec07252 100644 --- a/core/css/apps.scss +++ b/core/css/apps.scss @@ -811,10 +811,9 @@ kbd { flex: 0 0 auto; > button, > a, - > .menuitem, - > label { + > .menuitem { cursor: pointer; - line-height: 36px; + line-height: 38px; border: 0; background-color: transparent; display: flex; @@ -827,8 +826,8 @@ kbd { color: $color-main-text; /* Override the app-navigation li opacity */ opacity: .7 !important; - [class^='icon-'], - [class*=' icon-'], + span[class^='icon-'], + span[class*=' icon-'], &[class^='icon-'], &[class*=' icon-'] { min-width: 0; /* Overwrite icons*/ @@ -836,8 +835,8 @@ kbd { background-position: 10px center; background-size: 16px; } - [class^='icon-'], - [class*=' icon-'] { + span[class^='icon-'], + span[class*=' icon-'] { /* Keep padding to define the width to assure correct position of a possible text */ padding: 18px 0 18px 36px; @@ -889,6 +888,14 @@ kbd { > input:not([type=radio]):not([type=checkbox]):not([type=image]) { width: 150px; } + input { + min-width: 34px; + max-height: 34px; + margin: 2px 0; + ~ input { + margin-left: 5px; + } + } } > button { padding: 0; |