Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorfnuesse <felix.nuesse@t-online.de>2018-11-15 17:47:43 +0300
committerfnuesse <felix.nuesse@t-online.de>2018-11-21 19:34:42 +0300
commit0e747470f7399e27abc222a0a93767c6c0371ff0 (patch)
tree355953e0320360c7cdb134c2970b9dd0340c07ab /js
parent92d315af3f62d068b8e954860ecec19be30a6398 (diff)
Fixed Translationissue in navigationbar
Signed-off-by: fnuesse <felix.nuesse@t-online.de>
Diffstat (limited to 'js')
-rw-r--r--js/app/controllers/menu.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/js/app/controllers/menu.js b/js/app/controllers/menu.js
index 61c30575..13a5c8f5 100644
--- a/js/app/controllers/menu.js
+++ b/js/app/controllers/menu.js
@@ -31,8 +31,8 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
- .controller('MenuCtrl', ['$scope', 'VaultService', '$location', '$rootScope', 'TagService','SettingsService',
- function ($scope, VaultService, $location, $rootScope, TagService, SettingsService) {
+ .controller('MenuCtrl', ['$scope', 'VaultService', '$location', '$rootScope', 'TagService','SettingsService', '$translate',
+ function ($scope, VaultService, $location, $rootScope, TagService, SettingsService, $translate) {
$rootScope.logout = function () {
SettingsService.setSetting('defaultVaultPass', false);
TagService.resetTags();
@@ -176,6 +176,20 @@
};
+
+ //this is needed, because the translation is not ready when the dom loads and the translation only returns the key.
+ //then the key is set, and the taginput is collapsed by angular. If the correct translation loads, the collapsed dom element does not update itself.
+ //here we set the value manually
+ $scope.initPlaceholder = function () {
+ $translate.onReady().then(function(){
+ var string=$translate.instant('navigation.advanced.filter');
+ document.getElementById("tags-input-outer").setAttribute("placeholder", string);
+ document.getElementById("tags-input-outer").firstChild.firstChild.childNodes[1].setAttribute("placeholder", string);
+ });
+ };
+
+
+
$scope.legacyNavbarDefault=true;
$scope.legacyNavbar = $scope.legacyNavbarDefault;
$scope.$watch('legacyNavbar', function(newValue, oldValue) {