From 377ae7f7f84c0bbdf2bfb0622e286ee20ff2b4bc Mon Sep 17 00:00:00 2001 From: brantje Date: Fri, 23 Dec 2016 13:12:52 +0100 Subject: [PATCH] Fix bookmarklet tabs --- js/app/controllers/bookmarklet.js | 51 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/js/app/controllers/bookmarklet.js b/js/app/controllers/bookmarklet.js index 970a0002..f13ede25 100644 --- a/js/app/controllers/bookmarklet.js +++ b/js/app/controllers/bookmarklet.js @@ -218,35 +218,34 @@ $scope.http_warning_hidden = state; }; - $scope.currentTab = { - title: $translate.instant('general'), - url: 'views/partials/forms/edit_credential/basics.html', - color: 'blue' - }; - $scope.tabs = [{ - title: $translate.instant('general'), - url: 'views/partials/forms/edit_credential/basics.html', - color: 'blue' - }, { - title: $translate.instant('password'), - url: 'views/partials/forms/edit_credential/password.html', - color: 'green' - }, { - title: $translate.instant('custom.fields'), - url: 'views/partials/forms/edit_credential/custom_fields.html', - color: 'orange' - }, { - title: $translate.instant('files'), - url: 'views/partials/forms/edit_credential/files.html', - color: 'yellow' - }, { - title: $translate.instant('otp'), - url: 'views/partials/forms/edit_credential/otp.html', - color: 'purple' - }]; + $translate(['general', 'password', 'custom.fields','files','otp']).then(function (translations) { + $scope.tabs = [{ + title: translations.general, + url: 'views/partials/forms/edit_credential/basics.html', + color: 'blue' + }, { + title: translations.password, + url: 'views/partials/forms/edit_credential/password.html', + color: 'green' + }, { + title:translations['custom.fields'], + url: 'views/partials/forms/edit_credential/custom_fields.html', + color: 'orange' + }, { + title: translations.files, + url: 'views/partials/forms/edit_credential/files.html', + color: 'yellow' + }, { + title: translations.otp, + url: 'views/partials/forms/edit_credential/otp.html', + color: 'purple' + }]; + $scope.currentTab = $scope.tabs[0]; + }); + $scope.getTags = function ($query) { return TagService.searchTag($query); };