mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 10:58:33 +00:00
[repo new_file] go to new file page after creating a new file
This commit is contained in:
@@ -829,10 +829,11 @@ $('#add-new-file-form, #add-new-dir-form, #rename-form, #mv-form').submit(functi
|
||||
return false;
|
||||
}
|
||||
post_url = '{% url 'new_file' repo.id %}?parent_dir=' + e(path);
|
||||
after_op_success = function(data) {
|
||||
location.href = '{% url 'repo_view_file' repo.id %}?p=' + e(path) + e(data['name']);
|
||||
};
|
||||
} else {
|
||||
post_url = '{% url 'new_dir' repo.id %}?parent_dir=' + e(path);
|
||||
}
|
||||
post_data['dirent_name'] = dirent_name;
|
||||
after_op_success = function(data) {
|
||||
form.append('<p style="color:red;">' + "{% trans "Creating..." %}" + '</p>');
|
||||
reqDirData('{% url 'repo_dir_data' repo.id %}?p=' + e(cur_path), function() {
|
||||
@@ -852,6 +853,8 @@ $('#add-new-file-form, #add-new-dir-form, #rename-form, #mv-form').submit(functi
|
||||
});
|
||||
updateCmt();
|
||||
};
|
||||
}
|
||||
post_data['dirent_name'] = dirent_name;
|
||||
} else if (form_id == 'rename-form') {
|
||||
var old_name = form.find('input[name="oldname"]').val(),
|
||||
new_name = $.trim(form.find('input[name="newname"]').val()),
|
||||
|
Reference in New Issue
Block a user