upload: Inline clear_out_file_list.

This provides a slightly clearer interface, allowing us to remove the
unnecessary split of the code for the clone_file_input concept across
multiple modules (we now just clone it on-demand).
This commit is contained in:
Tim Abbott
2018-02-13 14:29:17 -08:00
parent f253f96211
commit 787d5c50e0
3 changed files with 17 additions and 19 deletions

View File

@@ -19,7 +19,6 @@ exports.announce_warn_threshold = 60;
exports.uploads_domain = document.location.protocol + '//' + document.location.host;
exports.uploads_path = '/user_uploads';
exports.uploads_re = new RegExp("\\]\\(" + exports.uploads_domain + "(" + exports.uploads_path + "[^\\)]+)\\)", 'g');
exports.clone_file_input = undefined;
function make_uploads_relative(content) {
// Rewrite uploads in markdown links back to domain-relative form
@@ -869,9 +868,6 @@ exports.initialize = function () {
$("#compose").on("click", "#attach_files", function (e) {
e.preventDefault();
if (exports.clone_file_input === undefined) {
exports.clone_file_input = $('#file_input').clone(true);
}
$("#compose #file_input").trigger("click");
});