From 40d8cff331ff47bb94bcfaf3b635dc991c64ec4f Mon Sep 17 00:00:00 2001 From: Mario Romano Date: Thu, 19 May 2016 18:41:40 +0100 Subject: [PATCH] fix search and login --- ng2-components/ng2-alfresco-core/package.json | 2 +- .../ng2-alfresco-login/package.json | 2 +- .../components/alfresco-login.component.ts | 16 -- .../ng2-alfresco-search/package.json | 178 +++++++++--------- 4 files changed, 91 insertions(+), 107 deletions(-) diff --git a/ng2-components/ng2-alfresco-core/package.json b/ng2-components/ng2-alfresco-core/package.json index af71549360..644158abc7 100644 --- a/ng2-components/ng2-alfresco-core/package.json +++ b/ng2-components/ng2-alfresco-core/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-core", "description": "Alfresco Angular 2 Components core", - "version": "0.1.6", + "version": "0.1.11", "author": "Alfresco Software, Ltd.", "scripts": { "typings": "typings install", diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json index f1db3df80a..80d2a4db49 100644 --- a/ng2-components/ng2-alfresco-login/package.json +++ b/ng2-components/ng2-alfresco-login/package.json @@ -1,7 +1,7 @@ { "name": "ng2-alfresco-login", "description": "Alfresco Angular2 Login Component", - "version": "0.1.1", + "version": "0.1.3", "author": "Alfresco Software, Ltd.", "scripts": { "typings": "typings install", diff --git a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts index acaeacc010..5438242980 100644 --- a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts +++ b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.component.ts @@ -78,7 +78,6 @@ export class AlfrescoLoginComponent { 'required': 'LOGIN.MESSAGES.PASSWORD-REQUIRED' } }; - this.translationInit(translate); this.form.valueChanges.subscribe(data => this.onValueChanged(data)); @@ -156,19 +155,4 @@ export class AlfrescoLoginComponent { return true; } } - - /** - * Initial configuration for Multi language - * @param translate - */ - translationInit(translate: TranslateService) { - this.translate = translate; - let userLang = navigator.language.split('-')[0]; // use navigator lang if available - userLang = /(fr|en)/gi.test(userLang) ? userLang : 'en'; - - this.translate.setDefaultLang(userLang); - this.translate.currentLoader.addComponentList('node_modules/ng2-alfresco-login'); - this.translate.getTranslation(userLang); - this.translate.use(userLang); - } } diff --git a/ng2-components/ng2-alfresco-search/package.json b/ng2-components/ng2-alfresco-search/package.json index 23eccf7ab6..f2c86cdbc6 100644 --- a/ng2-components/ng2-alfresco-search/package.json +++ b/ng2-components/ng2-alfresco-search/package.json @@ -1,92 +1,92 @@ { - "name": "ng2-alfresco-search", - "description": "Alfresco Angular2 Search Component", - "version": "0.1.1", - "author": "Alfresco Software, Ltd.", - "scripts": { - "postinstall": "typings install && npm link ../ng2-alfresco-core && npm run build", - "typings": "typings install", - "start": "http-server -c-1 -o -p 8875 .", - "build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check", - "tslint": "npm run tslint-src && npm run tslint-root", - "tslint-src": "tslint -c tslint.json src/**/*.ts", - "tslint-root": "tslint -c tslint.json *.ts", - "copytemplates": "npm run copy-html && npm run copy-css", - "copy-html": "copyfiles './src/**/*.html' dist", - "copy-css": "copyfiles './src/**/*.css' dist", - "licensecheck": "license-check", - "tsc": "tsc", - "pretest": "npm run build", - "test": "karma start karma.conf.js", - "posttest": "node_modules/.bin/remap-istanbul -i coverage/coverage-final.json -o coverage -t html", - "coverage": "http-server -c-1 -o -p 9875 ./coverage", - "prepublish": "npm run build" - }, - "repository": { - "type": "git", - "url": "https://github.com/Alfresco/dev-platform-webcomponents.git" - }, - "bugs": { - "url": "https://github.com/Alfresco/dev-platform-webcomponents/issues" - }, - "license": "Apache-2.0", - "contributors": [ - { - "name": "Will Abson", - "email": "will.abson@alfresco.com" - } - ], - "keywords": [ - "ng2", - "angular", - "angular2", - "alfresco" - ], - "dependencies": { - "angular2": "2.0.0-beta.15", - "systemjs": "0.19.26", - "es6-shim": "^0.35.0", - "reflect-metadata": "0.1.2", - "rxjs": "5.0.0-beta.2", - "zone.js": "^0.6.12", - "es6-module-loader": "^0.17.8" - }, - "peerDependencies": { - "angular2": "2.0.0-beta.15" - }, - "devDependencies": { - "copyfiles": "^0.2.1", - "coveralls": "^2.11.9", - "http-server": "0.8.5", - "jasmine-core": "2.4.1", - "karma": "~0.13.22", - "karma-chrome-launcher": "~1.0.1", - "karma-coverage": "^1.0.0", - "karma-jasmine": "~1.0.2", - "karma-mocha-reporter": "^2.0.3", - "license-check": "^1.0.4", - "remap-istanbul": "^0.6.3", - "traceur": "^0.0.91", - "tslint": "^3.8.1", - "typescript": "^1.8.10", - "typings": "^0.7.12" - }, - "license-check-config": { - "src": [ - "**/*.js", - "**/*.ts", - "!/**/coverage/**/*", - "!/**/demo/**/*", - "!/**/node_modules/**/*", - "!/**/typings/**/*", - "!*.js" - ], - "path": "assets/license_header.txt", - "blocking": false, - "logInfo": false, - "logError": true - }, - "publishConfig": { - "registry": "http://52.16.120.219:4873/" + "name": "ng2-alfresco-search", + "description": "Alfresco Angular2 Search Component", + "version": "0.1.2", + "author": "Alfresco Software, Ltd.", + "scripts": { + "typings": "typings install", + "start": "http-server -c-1 -o -p 8875 .", + "build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check", + "tslint": "npm run tslint-src && npm run tslint-root", + "tslint-src": "tslint -c tslint.json src/**/*.ts", + "tslint-root": "tslint -c tslint.json *.ts", + "copytemplates": "npm run copy-html && npm run copy-css", + "copy-html": "copyfiles './src/**/*.html' dist", + "copy-css": "copyfiles './src/**/*.css' dist", + "licensecheck": "license-check", + "tsc": "tsc", + "pretest": "npm run build", + "test": "karma start karma.conf.js", + "posttest": "node_modules/.bin/remap-istanbul -i coverage/coverage-final.json -o coverage -t html", + "coverage": "http-server -c-1 -o -p 9875 ./coverage", + "prepublish": "npm run build" + }, + "repository": { + "type": "git", + "url": "https://github.com/Alfresco/dev-platform-webcomponents.git" + }, + "bugs": { + "url": "https://github.com/Alfresco/dev-platform-webcomponents/issues" + }, + "license": "Apache-2.0", + "contributors": [ + { + "name": "Will Abson", + "email": "will.abson@alfresco.com" } + ], + "keywords": [ + "ng2", + "angular", + "angular2", + "alfresco" + ], + "dependencies": { + "angular2": "2.0.0-beta.15", + "systemjs": "0.19.26", + "es6-shim": "^0.35.0", + "reflect-metadata": "0.1.2", + "rxjs": "5.0.0-beta.2", + "zone.js": "^0.6.12", + "es6-module-loader": "^0.17.8" + }, + "peerDependencies": { + "angular2": "2.0.0-beta.15" + }, + "devDependencies": { + "copyfiles": "^0.2.1", + "coveralls": "^2.11.9", + "http-server": "0.8.5", + "jasmine-core": "2.4.1", + "ng2-alfresco-core": "^0.1.0", + "karma": "~0.13.22", + "karma-chrome-launcher": "~1.0.1", + "karma-coverage": "^1.0.0", + "karma-jasmine": "~1.0.2", + "karma-mocha-reporter": "^2.0.3", + "license-check": "^1.0.4", + "remap-istanbul": "^0.6.3", + "traceur": "^0.0.91", + "tslint": "^3.8.1", + "typescript": "^1.8.10", + "typings": "^0.7.12" + }, + "license-check-config": { + "src": [ + "**/*.js", + "**/*.ts", + "!/**/coverage/**/*", + "!/**/demo/**/*", + "!/**/node_modules/**/*", + "!/**/typings/**/*", + "!*.js" + ], + "path": "assets/license_header.txt", + "blocking": false, + "logInfo": false, + "logError": true + }, + "publishConfig": { + "registry": "http://52.16.120.219:4873/" + } }