Skip to content

Commit

Permalink
Merge pull request #201 from nextcloud/bugfix/noid/preserve-lock-data
Browse files Browse the repository at this point in the history
[stable27] fix: Preserve lock data in file info model
  • Loading branch information
juliusknorr authored Dec 19, 2023
2 parents 9e87798 + 3150236 commit 8471c9b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions js/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@
return data
})

var oldElementToFile = fileList.elementToFile
fileList.elementToFile = function($el) {
var fileData = oldElementToFile.apply(this, arguments)
fileData.locked = $el.data('locked')
fileData.lockOwnerType = $el.data('lock-owner-type')
fileData.lockOwnerEditor = $el.data('lock-owner-editor')
fileData.lockOwner = $el.data('lock-owner')
fileData.lockOwnerDisplayname = $el.data('lock-owner-displayname')
fileData.lockTime = $el.data('lock-time')
return fileData
}

var oldCreateRow = fileList._createRow
fileList._createRow = function(fileData) {
var $tr = oldCreateRow.apply(this, arguments)
Expand Down

0 comments on commit 8471c9b

Please sign in to comment.