This is an automated email from the ASF dual-hosted git repository.
surendralilhore pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 9aeaaa0 HDFS-14198. Upload and Create button doesn't get enabled
after getting reset. Contributed by Ayush Saxena.
9aeaaa0 is described below
commit 9aeaaa0479ea6b4c4135214722c8c7c39fb17d75
Author: Surendra Singh Lilhore <[email protected]>
AuthorDate: Fri Jan 11 14:36:55 2019 +0530
HDFS-14198. Upload and Create button doesn't get enabled after getting
reset. Contributed by Ayush Saxena.
---
.../src/main/webapps/hdfs/explorer.html | 4 ++--
.../hadoop-hdfs/src/main/webapps/hdfs/explorer.js | 28 ++++++++++++++++++++++
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git
a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.html
b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.html
index 9ddb597..88cf183 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.html
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.html
@@ -184,11 +184,11 @@
<div class="col-xs-2 col-md-2">
<button type="button" class="btn btn-default" data-toggle="modal"
aria-label="New Directory" data-target="#btn-create-directory"
- title="Create Directory">
+ title="Create Directory" id="btn-create-dir">
<span class="glyphicon glyphicon-folder-open"></span>
</button>
<button type="button" class="btn btn-default" data-toggle="modal"
- data-target="#modal-upload-file" title="Upload Files">
+ data-target="#modal-upload-file" title="Upload Files"
id="btn-upload-files">
<span class="glyphicon glyphicon-cloud-upload"></span>
</button>
<button class="btn btn-default dropdown-toggle" type="button"
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js
b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js
index 898b1f3..0520192 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js
@@ -405,6 +405,34 @@
});
})
+ $('#btn-upload-files').click(function() {
+ $('#modal-upload-file-button').prop('disabled', true).button('reset');
+ $('#modal-upload-file-input').val(null);
+ });
+
+ $('#btn-create-dir').click(function() {
+ $('#btn-create-directory-send').prop('disabled', true).button('reset');
+ $('#new_directory').val(null);
+ });
+
+ $('#modal-upload-file-input').change(function() {
+ if($('#modal-upload-file-input').prop('files').length >0) {
+ $('#modal-upload-file-button').prop('disabled', false);
+ }
+ else {
+ $('#modal-upload-file-button').prop('disabled', true);
+ }
+ });
+
+ $('#new_directory').on('keyup keypress blur change',function() {
+ if($('#new_directory').val() == '' || $('#new_directory').val() ==
null) {
+ $('#btn-create-directory-send').prop('disabled', true);
+ }
+ else {
+ $('#btn-create-directory-send').prop('disabled', false);
+ }
+ });
+
$('#modal-upload-file-button').click(function() {
$(this).prop('disabled', true);
$(this).button('complete');
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]