Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtificialOwl committed Nov 27, 2019
2 parents 54989e8 + 1b4a63f commit 7ba3b64
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
12 changes: 12 additions & 0 deletions css/files_lock.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
tr[data-locked='true'] .fileactions .action.action-menu.permanent {
position: relative;
top: 7px;
}
.locking-inline-state.icon-password {
padding: 17px 23px;
margin-right: -45px;
top: -5px;
width: 44px;
position: relative;
opacity: 0.5;
}
9 changes: 5 additions & 4 deletions js/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
}
return t('files_lock', 'Lock file')
},
mime: 'all',
mime: 'file',
order: -140,
iconClass: 'icon-security',
iconClass: 'icon-password',
permissions: OC.PERMISSION_UPDATE,
actionHandler: self.switchLock
})
Expand All @@ -61,12 +61,13 @@
var locked = context.$file.data('locked')
var $actionLink = $('<span/>')
if (locked) {
$actionLink.text('Locked')
$actionLink.addClass('locking-inline-state')
$actionLink.addClass('icon-password')
}
context.$file.find('a.name>span.fileactions').append($actionLink)
return $actionLink
},
mime: 'all',
mime: 'file',
order: -140,
type: OCA.Files.FileActions.TYPE_INLINE,
permissions: OC.PERMISSION_UPDATE,
Expand Down
1 change: 1 addition & 0 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public function registerHooks() {
'OCA\Files::loadAdditionalScripts',
function () {
Util::addScript(self::APP_NAME, 'files');
Util::addStyle(self::APP_NAME, 'files_lock');
}
);

Expand Down

0 comments on commit 7ba3b64

Please sign in to comment.