diff --git a/js/app/app.js b/js/app/app.js index 54e80a04..e3ddde6a 100644 --- a/js/app/app.js +++ b/js/app/app.js @@ -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); - });*/ }); }()); \ No newline at end of file diff --git a/js/app/directives/passwordgen.js b/js/app/directives/passwordgen.js index ebf0939b..10fa481a 100644 --- a/js/app/directives/passwordgen.js +++ b/js/app/directives/passwordgen.js @@ -189,7 +189,7 @@ e.clearSelection(); }; - scope.onError = function (e) { + scope.onError = function () { OC.Notification.showTemporary('Press Ctrl+C to copy!'); }; scope.progressDivShow = false; diff --git a/js/app/services/credentialservice.js b/js/app/services/credentialservice.js index 0d4085ff..5b92bb34 100644 --- a/js/app/services/credentialservice.js +++ b/js/app/services/credentialservice.js @@ -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) { diff --git a/lib/Service/CredentialService.php b/lib/Service/CredentialService.php index bfd56805..3fb61113 100644 --- a/lib/Service/CredentialService.php +++ b/lib/Service/CredentialService.php @@ -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"); } /**