1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 18:30:53 +00:00

update file lock check when update file

This commit is contained in:
lian
2015-07-23 17:30:09 +08:00
parent 525246be74
commit 68b40743c7

View File

@@ -216,8 +216,13 @@ define([
$('.yes', confirm_popup).click(function() {
var selected_file = dirents.findWhere({'obj_name': file.name});
if (selected_file.get('is_locked')) {
$('.error', confirm_popup).html(gettext("File is locked")).removeClass('hide');
Common.disableButton($(this));
if (selected_file.get('locked_by_me')) {
file.choose_to_update = true;
$.modal.close();
} else {
$('.error', confirm_popup).html(gettext("File is locked")).removeClass('hide');
Common.disableButton($(this));
}
} else {
file.choose_to_update = true;
$.modal.close();