mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 11:51:27 +00:00
update file lock check when update file
This commit is contained in:
@@ -216,8 +216,13 @@ define([
|
|||||||
$('.yes', confirm_popup).click(function() {
|
$('.yes', confirm_popup).click(function() {
|
||||||
var selected_file = dirents.findWhere({'obj_name': file.name});
|
var selected_file = dirents.findWhere({'obj_name': file.name});
|
||||||
if (selected_file.get('is_locked')) {
|
if (selected_file.get('is_locked')) {
|
||||||
|
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');
|
$('.error', confirm_popup).html(gettext("File is locked")).removeClass('hide');
|
||||||
Common.disableButton($(this));
|
Common.disableButton($(this));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
file.choose_to_update = true;
|
file.choose_to_update = true;
|
||||||
$.modal.close();
|
$.modal.close();
|
||||||
|
Reference in New Issue
Block a user