Skip to content

Commit 7ba3b64

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 54989e8 + 1b4a63f commit 7ba3b64

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

css/files_lock.css

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
tr[data-locked='true'] .fileactions .action.action-menu.permanent {
2+
position: relative;
3+
top: 7px;
4+
}
5+
.locking-inline-state.icon-password {
6+
padding: 17px 23px;
7+
margin-right: -45px;
8+
top: -5px;
9+
width: 44px;
10+
position: relative;
11+
opacity: 0.5;
12+
}

js/files.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
}
4848
return t('files_lock', 'Lock file')
4949
},
50-
mime: 'all',
50+
mime: 'file',
5151
order: -140,
52-
iconClass: 'icon-security',
52+
iconClass: 'icon-password',
5353
permissions: OC.PERMISSION_UPDATE,
5454
actionHandler: self.switchLock
5555
})
@@ -61,12 +61,13 @@
6161
var locked = context.$file.data('locked')
6262
var $actionLink = $('<span/>')
6363
if (locked) {
64-
$actionLink.text('Locked')
64+
$actionLink.addClass('locking-inline-state')
65+
$actionLink.addClass('icon-password')
6566
}
6667
context.$file.find('a.name>span.fileactions').append($actionLink)
6768
return $actionLink
6869
},
69-
mime: 'all',
70+
mime: 'file',
7071
order: -140,
7172
type: OCA.Files.FileActions.TYPE_INLINE,
7273
permissions: OC.PERMISSION_UPDATE,

lib/AppInfo/Application.php

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public function registerHooks() {
8888
'OCA\Files::loadAdditionalScripts',
8989
function () {
9090
Util::addScript(self::APP_NAME, 'files');
91+
Util::addStyle(self::APP_NAME, 'files_lock');
9192
}
9293
);
9394

0 commit comments

Comments
 (0)