1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 15:38:15 +00:00

check file lock before update a file

This commit is contained in:
lian
2015-07-20 17:36:12 +08:00
parent 3ec770e7d8
commit 2d34cb611a
2 changed files with 9 additions and 2 deletions

View File

@@ -214,8 +214,14 @@ define([
});
$('#simplemodal-container').css({'height':'auto'});
$('.yes', confirm_popup).click(function() {
file.choose_to_update = true;
$.modal.close();
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));
} else {
file.choose_to_update = true;
$.modal.close();
}
});
$('.no', confirm_popup).click(function() {
file.choose_to_upload = true;