mirror of
https://github.com/nextcloud/passman.git
synced 2025-09-29 00:04:50 +08:00
Remove some unused code
This commit is contained in:
parent
684677e853
commit
63e089f363
4 changed files with 7 additions and 61 deletions
|
@ -113,60 +113,5 @@
|
|||
//Outside anglular we need $apply
|
||||
angular.element('#app-content-wrapper').scope().$apply();
|
||||
});
|
||||
var adjustControlsWidth = function (r) {
|
||||
if ($('#controls').length) {
|
||||
var controlsWidth;
|
||||
// if there is a scrollbar …
|
||||
if ($('#app-content').get(0)) {
|
||||
if ($('#app-content').get(0).scrollHeight > $('#app-content').height()) {
|
||||
if ($(window).width() > 768) {
|
||||
controlsWidth = $('#content').width() - $('#app-navigation').width() - OC.Util.getScrollBarWidth();
|
||||
if (!$('#app-sidebar').hasClass('hidden') && !$('#app-sidebar').hasClass('disappear')) {
|
||||
controlsWidth -= $('#app-sidebar').width();
|
||||
}
|
||||
} else {
|
||||
controlsWidth = $('#content').width() - OC.Util.getScrollBarWidth();
|
||||
}
|
||||
} else { // if there is none
|
||||
if ($(window).width() > 768) {
|
||||
controlsWidth = $('#content').width() - $('#app-navigation').width();
|
||||
if (!$('#app-sidebar').hasClass('hidden') && !$('#app-sidebar').hasClass('disappear')) {
|
||||
//controlsWidth -= $('#app-sidebar').width();
|
||||
}
|
||||
} else {
|
||||
controlsWidth = $('#content').width();
|
||||
}
|
||||
}
|
||||
}
|
||||
var magic;
|
||||
if (r) {
|
||||
magic = 0;
|
||||
} else {
|
||||
magic = 85;
|
||||
}
|
||||
$('#controls').css('width', controlsWidth + magic);
|
||||
$('#controls').css('min-width', controlsWidth + magic);
|
||||
}
|
||||
};
|
||||
/*
|
||||
$(window).resize(adjustControlsWidth, 400);
|
||||
setTimeout(function () {
|
||||
adjustControlsWidth(true);
|
||||
}, 200);*/
|
||||
|
||||
//@Fack this
|
||||
/*
|
||||
$(document).on('click', '#app-navigation-toggle', function () {
|
||||
setTimeout(function () {
|
||||
if ($('#app-content').css('transform').toString().indexOf('matrix') >= 0) {
|
||||
$('#passman-controls').css('width', 'calc( 100% - 245px)');
|
||||
$('#passman-controls').css('top', '0');
|
||||
} else {
|
||||
$('#passman-controls').css('left', 0);
|
||||
$('#passman-controls').css('top', '44px');
|
||||
$('#passman-controls').css('width', '100%');
|
||||
}
|
||||
}, 350);
|
||||
});*/
|
||||
});
|
||||
}());
|
|
@ -189,7 +189,7 @@
|
|||
e.clearSelection();
|
||||
};
|
||||
|
||||
scope.onError = function (e) {
|
||||
scope.onError = function () {
|
||||
OC.Notification.showTemporary('Press Ctrl+C to copy!');
|
||||
};
|
||||
scope.progressDivShow = false;
|
||||
|
|
|
@ -309,7 +309,7 @@
|
|||
|
||||
(new C_Promise(promise_files_update, new password_data())).progress(function (data) {
|
||||
master_promise.call_progress(data);
|
||||
}).then(function (data) {
|
||||
}).then(function () {
|
||||
console.warn("End files update");
|
||||
master_promise.promises--;
|
||||
if (master_promise.promises === 0) {
|
||||
|
|
|
@ -123,11 +123,12 @@ class CredentialService {
|
|||
}
|
||||
else {
|
||||
$acl = $this->sharingACL->getItemACL($user_id, $credential->getGuid());
|
||||
if ($acl->hasPermission(SharingACL::READ));
|
||||
return $credential;
|
||||
if ($acl->hasPermission(SharingACL::READ)) {
|
||||
return $credential;
|
||||
} else {
|
||||
throw new DoesNotExistException("Did expect one result but found none when executing");
|
||||
}
|
||||
}
|
||||
|
||||
throw new DoesNotExistException("Did expect one result but found none when executing");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue