summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-02-28 12:55:33 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-03-07 13:17:36 +0100
commit3964616a9e2d2902f3e9be1f142938290eb34972 (patch)
tree9eeeb95e5b98a9f30abaafdd077c624840012907 /apps
parentd1aa96fef91a1e5352f987d16be773cac69135a8 (diff)
downloadnextcloud-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>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/css/files.scss8
-rw-r--r--apps/files/js/newfilemenu.js10
2 files changed, 8 insertions, 10 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('.');