Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-02-28 14:55:33 +0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-03-07 15:17:36 +0300
commit3964616a9e2d2902f3e9be1f142938290eb34972 (patch)
tree9eeeb95e5b98a9f30abaafdd077c624840012907 /apps/files/js/newfilemenu.js
parentd1aa96fef91a1e5352f987d16be773cac69135a8 (diff)
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/files/js/newfilemenu.js')
-rw-r--r--apps/files/js/newfilemenu.js10
1 files changed, 8 insertions, 2 deletions
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('.');