Simplify showing/hiding attached file name
Note we have to render the `<p>` tag in one line because at the time of writing browsers don't consider elements with whitespace inside as empty [1]. [1] https://developer.mozilla.org/en-US/docs/Web/CSS/:empty
This commit is contained in:
@@ -92,7 +92,6 @@
|
||||
},
|
||||
clearFilename: function(data) {
|
||||
$(data.fileNameContainer).text("");
|
||||
$(data.fileNameContainer).hide();
|
||||
},
|
||||
clearInputErrors: function(data) {
|
||||
$(data.errorContainer).find("small.error").remove();
|
||||
@@ -102,7 +101,6 @@
|
||||
},
|
||||
setFilename: function(data, file_name) {
|
||||
$(data.fileNameContainer).text(file_name);
|
||||
$(data.fileNameContainer).show();
|
||||
},
|
||||
setProgressBar: function(data, klass) {
|
||||
$(data.progressBar).find(".loading-bar").addClass(klass);
|
||||
|
||||
Reference in New Issue
Block a user