diff --git a/app-author-add/src/app/app.component.css b/app-author-add/src/app/app.component.css index dbb5931..0e480dc 100644 --- a/app-author-add/src/app/app.component.css +++ b/app-author-add/src/app/app.component.css @@ -7,3 +7,8 @@ .author-id-add input[type=radio] { margin-left: 10px; } + +.author-id-add .affiliation-panel{ + border-left: transparent; + border-right: transparent; +} \ No newline at end of file diff --git a/app-author-add/src/app/app.component.html b/app-author-add/src/app/app.component.html index 3ed1a9d..4b14a01 100644 --- a/app-author-add/src/app/app.component.html +++ b/app-author-add/src/app/app.component.html @@ -157,7 +157,7 @@

- +
+ @@ -213,19 +214,201 @@

+ + +
+
+ + +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+ + + {{langJson.Author_Identifier[1]}} +
+
+ + +
+
+
+ +
+
+ +
+
+
+
+ +
+
+
+
+
+
+   + + + {{langJson.Author_Display[1]}} +   + + + {{langJson.Author_Hide[1]}} +
+
+
+
+
+ +
+
+
+
+

+
+ +
+
+ +
+
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+
+ +
+
+ +
+
+
+
+   + + + {{langJson.Author_Display[1]}} +   + + + {{langJson.Author_Hide[1]}} +
+
+
+
+
+ +
+
+
+
+

+
+ +
+
+ +
+
+ +
+
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+

-
- ' + this.langJson.Author_Confirm_Msg[1] + '
'); } } + /** + * affiliation confirm identifier url + */ + affiliationConfirm(affiliationIdType: any, affiliationId: any) { + let url_identifier = ""; + for (let i = 0; i < this.identifierOptions.length; i++) { + if (affiliationIdType == this.identifierOptions[i].id) { + url_identifier = this.identifierOptions[i].url; + } + } + if (url_identifier != "") { + window.open(url_identifier.replace(/#+$/, affiliationId)); + } else { + $('#alerts').append( + '
' + + '' + this.langJson.Author_Confirm_Msg[1] + '
'); + } + } + + /** + * Verify Identifier + */ + validationId(idType: any, id: any) { + let identifierReg = JSON.parse($("#identifier_reg").val()); + let minLength = 0; + let maxLength = 30; + let reg = new RegExp(''); + for (let i = 0; i < this.identifierOptions.length; i++) { + if (idType == this.identifierOptions[i].id) { + let identifierName = this.identifierOptions[i].name; + if (identifierName in identifierReg){ + if ('minLength' in identifierReg[identifierName]){ + minLength = identifierReg[identifierName]['minLength']; + }else{ + continue; + } + if ('maxLength' in identifierReg[identifierName]){ + maxLength = identifierReg[identifierName]['maxLength']; + }else{ + continue; + } + if ('reg' in identifierReg[identifierName]){ + reg = RegExp(identifierReg[identifierName]['reg']); + }else{ + continue; + } + }else{ + return 'No vaildation'; + } + } + } + let l = id.trim().length; + if (l < minLength || l > maxLength || !reg.test(id)) { + return 'Please enter the correct Identifier'; + } + return 'OK'; + } + /** * エラー処理 */ diff --git a/app-author-affiliation/.angular-cli.json b/app-author-affiliation/.angular-cli.json new file mode 100644 index 0000000..a236162 --- /dev/null +++ b/app-author-affiliation/.angular-cli.json @@ -0,0 +1,61 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "project": { + "name": "app-angular-js" + }, + "apps": [ + { + "root": "src", + "outDir": "dist", + "assets": [ + "assets", + "favicon.ico" + ], + "index": "index.html", + "main": "main.ts", + "polyfills": "polyfills.ts", + "test": "test.ts", + "tsconfig": "tsconfig.app.json", + "testTsconfig": "tsconfig.spec.json", + "prefix": "app", + "styles": [ + "styles.css" + ], + "scripts": [ + ], + "environmentSource": "environments/environment.ts", + "environments": { + "dev": "environments/environment.ts", + "prod": "environments/environment.prod.ts" + } + } + ], + "e2e": { + "protractor": { + "config": "./protractor.conf.js" + } + }, + "lint": [ + { + "project": "src/tsconfig.app.json", + "exclude": "**/node_modules/**" + }, + { + "project": "src/tsconfig.spec.json", + "exclude": "**/node_modules/**" + }, + { + "project": "e2e/tsconfig.e2e.json", + "exclude": "**/node_modules/**" + } + ], + "test": { + "karma": { + "config": "./karma.conf.js" + } + }, + "defaults": { + "styleExt": "css", + "component": {} + } +} diff --git a/app-author-affiliation/.editorconfig b/app-author-affiliation/.editorconfig new file mode 100644 index 0000000..6e87a00 --- /dev/null +++ b/app-author-affiliation/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/app-author-affiliation/.gitignore b/app-author-affiliation/.gitignore new file mode 100644 index 0000000..4ae2c37 --- /dev/null +++ b/app-author-affiliation/.gitignore @@ -0,0 +1,43 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/dist-server +/tmp +/out-tsc + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +testem.log +/typings + +# e2e +/e2e/*.js +/e2e/*.map + +# System Files +.DS_Store +Thumbs.db diff --git a/app-author-affiliation/README.md b/app-author-affiliation/README.md new file mode 100644 index 0000000..84828cd --- /dev/null +++ b/app-author-affiliation/README.md @@ -0,0 +1,27 @@ +# AppAngularJS + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.6.8. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/app-author-affiliation/e2e/app.e2e-spec.ts b/app-author-affiliation/e2e/app.e2e-spec.ts new file mode 100644 index 0000000..03d9686 --- /dev/null +++ b/app-author-affiliation/e2e/app.e2e-spec.ts @@ -0,0 +1,14 @@ +import { AppPage } from './app.po'; + +describe('app-angular-js App', () => { + let page: AppPage; + + beforeEach(() => { + page = new AppPage(); + }); + + it('should display welcome message', () => { + page.navigateTo(); + expect(page.getParagraphText()).toEqual('Welcome to app!'); + }); +}); diff --git a/app-author-affiliation/e2e/app.po.ts b/app-author-affiliation/e2e/app.po.ts new file mode 100644 index 0000000..82ea75b --- /dev/null +++ b/app-author-affiliation/e2e/app.po.ts @@ -0,0 +1,11 @@ +import { browser, by, element } from 'protractor'; + +export class AppPage { + navigateTo() { + return browser.get('/'); + } + + getParagraphText() { + return element(by.css('app-root h1')).getText(); + } +} diff --git a/app-author-affiliation/e2e/tsconfig.e2e.json b/app-author-affiliation/e2e/tsconfig.e2e.json new file mode 100644 index 0000000..1d9e5ed --- /dev/null +++ b/app-author-affiliation/e2e/tsconfig.e2e.json @@ -0,0 +1,14 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/e2e", + "baseUrl": "./", + "module": "commonjs", + "target": "es5", + "types": [ + "jasmine", + "jasminewd2", + "node" + ] + } +} diff --git a/app-author-affiliation/karma.conf.js b/app-author-affiliation/karma.conf.js new file mode 100644 index 0000000..af139fa --- /dev/null +++ b/app-author-affiliation/karma.conf.js @@ -0,0 +1,33 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular/cli'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular/cli/plugins/karma') + ], + client:{ + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + reports: [ 'html', 'lcovonly' ], + fixWebpackSourcePaths: true + }, + angularCli: { + environment: 'dev' + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/app-author-affiliation/package.json b/app-author-affiliation/package.json new file mode 100644 index 0000000..adee038 --- /dev/null +++ b/app-author-affiliation/package.json @@ -0,0 +1,50 @@ +{ + "name": "app-angular-js", + "version": "0.0.0", + "license": "MIT", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build --prod", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "private": true, + "dependencies": { + "@angular/animations": "^5.2.0", + "@angular/common": "^5.2.0", + "@angular/compiler": "^5.2.0", + "@angular/core": "^5.2.0", + "@angular/forms": "^5.2.0", + "@angular/http": "^5.2.0", + "@angular/platform-browser": "^5.2.0", + "@angular/platform-browser-dynamic": "^5.2.0", + "@angular/router": "^5.2.0", + "bootstrap": "^3.3.7", + "core-js": "^2.4.1", + "rxjs": "^5.5.6", + "zone.js": "^0.8.19" + }, + "devDependencies": { + "@angular/cli": "1.6.8", + "@angular/compiler-cli": "^5.2.0", + "@angular/language-service": "^5.2.0", + "@types/jasmine": "~2.8.3", + "@types/jasminewd2": "~2.0.2", + "@types/jquery": "^3.3.0", + "@types/node": "~6.0.60", + "codelyzer": "^4.0.1", + "jasmine-core": "~2.8.0", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~2.0.0", + "karma-chrome-launcher": "~2.2.0", + "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-jasmine": "~1.1.0", + "karma-jasmine-html-reporter": "^0.2.2", + "protractor": "~5.1.2", + "ts-node": "~4.1.0", + "tslint": "~5.9.1", + "typescript": "~3.2.4" + } +} diff --git a/app-author-affiliation/protractor.conf.js b/app-author-affiliation/protractor.conf.js new file mode 100644 index 0000000..7ee3b5e --- /dev/null +++ b/app-author-affiliation/protractor.conf.js @@ -0,0 +1,28 @@ +// Protractor configuration file, see link for more information +// https://github.com/angular/protractor/blob/master/lib/config.ts + +const { SpecReporter } = require('jasmine-spec-reporter'); + +exports.config = { + allScriptsTimeout: 11000, + specs: [ + './e2e/**/*.e2e-spec.ts' + ], + capabilities: { + 'browserName': 'chrome' + }, + directConnect: true, + baseUrl: 'http://localhost:4200/', + framework: 'jasmine', + jasmineNodeOpts: { + showColors: true, + defaultTimeoutInterval: 30000, + print: function() {} + }, + onPrepare() { + require('ts-node').register({ + project: 'e2e/tsconfig.e2e.json' + }); + jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); + } +}; diff --git a/app-author-affiliation/src/app/app.component.css b/app-author-affiliation/src/app/app.component.css new file mode 100644 index 0000000..6307097 --- /dev/null +++ b/app-author-affiliation/src/app/app.component.css @@ -0,0 +1,27 @@ +.weko_authors .add-button { + width: 120px; +} + +.weko_authors .name { + min-width: 200px; +} + +.weko_authors .scheme { + min-width: 250px; + max-width: 250px; +} + +.weko_authors .button-group { + text-align: right; +} + +@media only screen and (max-width: 1199px) { + .weko_authors .other-scheme { + margin-top: 10px; + } + + .weko_authors .scheme { + min-width: 150px; + max-width: 150px; + } +} diff --git a/app-author-affiliation/src/app/app.component.html b/app-author-affiliation/src/app/app.component.html new file mode 100644 index 0000000..3a115f4 --- /dev/null +++ b/app-author-affiliation/src/app/app.component.html @@ -0,0 +1,114 @@ +

+

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {{langJson.Affiliation_Name[1]}} + + {{langJson.Affiliation_Scheme[1]}} + + {{langJson.Affiliation_URL[1]}} + + {{langJson.Author_Control[1]}} +
+ + + + +
+
+ +
+
+ +
+
+
+ + + + +
+ + + +
+ + +
+
+ +
+
+ +
+
+
+ + + +
+
+
+
+
+
diff --git a/app-author-affiliation/src/app/app.component.ts b/app-author-affiliation/src/app/app.component.ts new file mode 100644 index 0000000..ccfac8b --- /dev/null +++ b/app-author-affiliation/src/app/app.component.ts @@ -0,0 +1,295 @@ +import { Component, OnInit } from '@angular/core'; +import { Http, RequestOptions, Headers } from '@angular/http'; +import 'rxjs/add/operator/toPromise'; +declare var $: any; + +@Component({ + selector: 'app-affiliation-search', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) +export class AppComponent implements OnInit { + //画面データを設定 + //i18n + public langJson = { + Affiliation_Name: [], + Affiliation_Scheme: [], + Affiliation_URL: [], + Author_Control: [], + Author_Button_Edit: [], + Author_Button_Save: [], + Author_Button_Cancel: [], + Author_Button_Delete: [], + Author_Select: [], + Author_Button_Add: [] + }; + + public control = { + edit_flag: [] + }; + public displayData: [ + { + id: -1, + name: "", + url: "", + scheme: "", + name_temp: "", + url_temp: "", + scheme_temp: "", + otherScheme_temp: "", + } + ]; + public new_settings: any = { + name: "", + url: "", + scheme: "" + }; + public controlledVocabularies = []; + public otherIndex: number = 0; + public schemeOtherValue: string = ""; + public selectedScheme: string = ""; + + constructor(private http: Http, ) { } + + ngOnInit() { + this.setI18n(); + } + ngAfterViewInit() { + this.getAuthorsAffiliationSettings(); + this.getAffiliationScheme(); + } + + /** + * i18n + */ + setI18n() { + let lang = $("#lang-code").val(); + let js = document.scripts; + let jsUrl = js[js.length - 1].src; + let strUrl = jsUrl.substring(0, jsUrl.lastIndexOf('static')); + let jsonUrl = strUrl + "static/json/weko_authors/translations/" + lang + "/messages.json"; + console.log(lang); + this.getLnagJson(jsonUrl).then(res => { + this.langJson = res; + }).catch( + ); + } + + /** + * 多言語対応 + */ + getLnagJson(url: any): Promise { + return this.http + .get(url) + .toPromise() + .then(response => response.json() as any) + .catch(this.handleError); + } + + /** + * edit authors affiliation settings + */ + edit(index: any) { + this.control.edit_flag[index] = true + console.log(this.displayData[index]); + this.displayData[index].name_temp = this.displayData[index].name; + this.displayData[index].url_temp = this.displayData[index].url; + if (this.controlledVocabularies.indexOf(this.displayData[index].scheme) < 0) { + this.displayData[index].scheme_temp = this.controlledVocabularies[this.otherIndex]; + this.displayData[index].otherScheme_temp = this.displayData[index].scheme; + } else { + this.displayData[index].scheme_temp = this.displayData[index].scheme; + this.displayData[index].otherScheme_temp = ""; + } + } + /** + * update authors affiliation settings + */ + update(index: any) { + console.log(this.displayData[index]); + let data = { id: -1, name: "", url: "", scheme: "" }; + data.id = this.displayData[index].id; + data.name = this.displayData[index].name_temp; + data.url = this.displayData[index].url_temp; + data.scheme = this.displayData[index].scheme_temp != this.controlledVocabularies[this.otherIndex] ? + this.displayData[index].scheme_temp.trim() : this.displayData[index].otherScheme_temp.trim(); + let validation_res = this.validation(data); + if (validation_res != 'OK') { + alert(validation_res); + return; + } + this.updateSettings(data).then( + res => { + if (res.code == 400) { + alert(res.msg); + } else { + alert('Update completed'); + window.location.reload(); + } + }).catch( + res => { + alert(res.msg); + window.location.reload(); + }); + } + /** + * delete authors affiliation settings + */ + delete(id: any) { + console.log(id); + this.deleteSettings(id).then( + res => { + alert('Successfully deleted'); + }).catch( + res => { + alert(res.msg); + }); + window.location.reload(); + } + /** + * add authors affiliation settings + */ + add() { + console.log(this.new_settings); + this.new_settings.scheme = this.selectedScheme != this.controlledVocabularies[this.otherIndex] ? + this.selectedScheme.trim() : this.schemeOtherValue.trim(); + let validation_res = this.validation(this.new_settings); + if (validation_res != 'OK') { + alert(validation_res); + return; + } + this.putSettings(this.new_settings).then( + res => { + if (res.code == 400) { + alert(res.msg); + } else { + alert('Successfully added'); + window.location.reload(); + } + }).catch( + res => { + alert(res.msg); + window.location.reload(); + }); + } + /** + * get authors affiliation settings + */ + getAuthorsAffiliationSettings() { + this.getDataOfAuthorsAffiliationSettings().then( + res => { + this.displayData = res; + console.log(res); + for (let i = 0; i < res.length; i++) { + this.control.edit_flag[i] = false; + this.displayData[i].name_temp = this.displayData[i].name; + this.displayData[i].url_temp = this.displayData[i].url; + this.displayData[i].scheme_temp = this.displayData[i].scheme; + } + } + ).catch(); + } + /** + * get list of controlled vocabularies + */ + getAffiliationScheme() { + this.getListOfAffiliationScheme().then( + res => { + this.controlledVocabularies = res.list; + this.otherIndex = res.index; + console.log(res); + } + ).catch(); + } + /** + * call web api (get author affiliation settings) + */ + getDataOfAuthorsAffiliationSettings() { + var urlArr = window.location.href.split('/'); + const url = urlArr[0] + "//" + urlArr[2] + "/api/authors/search_affiliation"; + return this.http + .get(url) + .toPromise() + .then(response => response.json() as any) + .catch(this.handleError); + } + /** + * call web api (get list of affiliation identifier scheme) + */ + getListOfAffiliationScheme() { + var urlArr = window.location.href.split('/'); + const url = urlArr[0] + "//" + urlArr[2] + "/api/authors/list_affiliation_scheme"; + return this.http + .get(url) + .toPromise() + .then(response => response.json() as any) + .catch(this.handleError); + } + /** + * call web api (update author affiliation settings) + */ + updateSettings(data: any) { + var urlArr = window.location.href.split('/'); + const url = urlArr[0] + "//" + urlArr[2] + "/api/authors/edit_affiliation"; + return this.http + .post(url, data) + .toPromise() + .then(response => response.json() as any) + .catch(this.handleError); + } + /** + * call web api (delete author affiliation settings) + */ + deleteSettings(id: any) { + var urlArr = window.location.href.split('/'); + const url = urlArr[0] + "//" + urlArr[2] + "/api/authors/delete_affiliation/" + id; + return this.http + .delete(url) + .toPromise() + .then(response => response.json() as any) + .catch(this.handleError); + } + /** + * call web api (add an author affiliation settings) + */ + putSettings(data: any) { + var urlArr = window.location.href.split('/'); + const url = urlArr[0] + "//" + urlArr[2] + "/api/authors/add_affiliation"; + return this.http + .put(url, data) + .toPromise() + .then(response => response.json() as any) + .catch(this.handleError); + } + /** + * Check if "name" is empty and Verify URL + */ + validation(data: any) { + if (data.name.trim().length == 0) { + return 'Please enter the correct "Name"'; + } + if (data.scheme.trim().length == 0) { + return 'Please enter the correct "Scheme"'; + } + if (data.scheme.trim().length > 30) { + return '"Scheme" is longer than 30 characters'; + } + if (this.displayData.find(i => i.scheme == data.scheme && i.id != data.id)) { + return 'Specified scheme is already exist.'; + } + let reg = /^(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/; + if (data.url.length > 0 && !reg.test(data.url)) { + return 'Please enter the correct "URL"'; + } + return 'OK'; + } + /** + * エラー処理 + */ + private handleError(error: any): Promise { + console.error('An error occurred', error); // + return Promise.reject(error.message || error); + } +} + + diff --git a/app-author-affiliation/src/app/app.module.ts b/app-author-affiliation/src/app/app.module.ts new file mode 100644 index 0000000..f773563 --- /dev/null +++ b/app-author-affiliation/src/app/app.module.ts @@ -0,0 +1,22 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { HttpModule } from '@angular/http'; +import { AppComponent } from './app.component'; +import { Route } from '@angular/compiler/src/core'; + + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + FormsModule, + HttpModule + ], + exports:[], + providers: [], + bootstrap: [AppComponent], +}) +export class AppModule { } diff --git a/app-author-affiliation/src/assets/.gitkeep b/app-author-affiliation/src/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/app-author-affiliation/src/environments/environment.prod.ts b/app-author-affiliation/src/environments/environment.prod.ts new file mode 100644 index 0000000..3612073 --- /dev/null +++ b/app-author-affiliation/src/environments/environment.prod.ts @@ -0,0 +1,3 @@ +export const environment = { + production: true +}; diff --git a/app-author-affiliation/src/environments/environment.ts b/app-author-affiliation/src/environments/environment.ts new file mode 100644 index 0000000..b7f639a --- /dev/null +++ b/app-author-affiliation/src/environments/environment.ts @@ -0,0 +1,8 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The list of which env maps to which file can be found in `.angular-cli.json`. + +export const environment = { + production: false +}; diff --git a/app-author-affiliation/src/favicon.ico b/app-author-affiliation/src/favicon.ico new file mode 100644 index 0000000..8081c7c Binary files /dev/null and b/app-author-affiliation/src/favicon.ico differ diff --git a/app-author-affiliation/src/index.html b/app-author-affiliation/src/index.html new file mode 100644 index 0000000..13e1164 --- /dev/null +++ b/app-author-affiliation/src/index.html @@ -0,0 +1,14 @@ + + + + + AppAngularJS + + + + + + + + + diff --git a/app-author-affiliation/src/main.ts b/app-author-affiliation/src/main.ts new file mode 100644 index 0000000..91ec6da --- /dev/null +++ b/app-author-affiliation/src/main.ts @@ -0,0 +1,12 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.log(err)); diff --git a/app-author-affiliation/src/polyfills.ts b/app-author-affiliation/src/polyfills.ts new file mode 100644 index 0000000..c8301a4 --- /dev/null +++ b/app-author-affiliation/src/polyfills.ts @@ -0,0 +1,66 @@ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +import 'core-js/es6/symbol'; +import 'core-js/es6/object'; +import 'core-js/es6/function'; +import 'core-js/es6/parse-int'; +import 'core-js/es6/parse-float'; +import 'core-js/es6/number'; +import 'core-js/es6/math'; +import 'core-js/es6/string'; +import 'core-js/es6/date'; +import 'core-js/es6/array'; +import 'core-js/es6/regexp'; +import 'core-js/es6/map'; +import 'core-js/es6/weak-map'; +import 'core-js/es6/set'; + +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. + +/** IE10 and IE11 requires the following for the Reflect API. */ +import 'core-js/es6/reflect'; + + +/** Evergreen browsers require these. **/ +// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. +import 'core-js/es7/reflect'; + + +/** + * Required to support Web Animations `@angular/platform-browser/animations`. + * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + **/ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + + + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ diff --git a/app-author-affiliation/src/styles.css b/app-author-affiliation/src/styles.css new file mode 100644 index 0000000..16a6c7c --- /dev/null +++ b/app-author-affiliation/src/styles.css @@ -0,0 +1,62 @@ +.alignCenter{ + text-align: center +} +.textRight{ + text-align: right +} + +.col-sm-1{ + padding-left: 2px; + padding-right: 2px; +} +.col-sm-2{ + padding-left: 2px; + padding-right: 2px; +} +.col-sm-3{ + padding-left: 2px; + padding-right: 2px; +} +.col-sm-4{ + padding-left: 2px; + padding-right: 2px; +} +.col-sm-5{ + padding-left: 2px; + padding-right: 2px; +} +.col-sm-6{ + padding-left: 2px; + padding-right: 2px; +} +.col-sm-7{ + padding-left: 2px; + padding-right: 2px; +} +.col-sm-8{ + padding-left: 2px; + padding-right: 2px; +} +.col-sm-9{ + padding-left: 2px;; + padding-right: 2px; +} +.col-sm-10{ + padding-left: 2px; + padding-right: 2px; +} +.col-sm-11{ + padding-left: 2px; + padding-right: 2px; +} +.col-sm-12{ + padding-left: 2px; + padding-right: 2px; +} + +.delButton{ + float: left; +} +.divBottom{ + margin-bottom: 10px; +} \ No newline at end of file diff --git a/app-author-affiliation/src/test.ts b/app-author-affiliation/src/test.ts new file mode 100644 index 0000000..1631789 --- /dev/null +++ b/app-author-affiliation/src/test.ts @@ -0,0 +1,20 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/app-author-affiliation/src/tsconfig.app.json b/app-author-affiliation/src/tsconfig.app.json new file mode 100644 index 0000000..39ba8db --- /dev/null +++ b/app-author-affiliation/src/tsconfig.app.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "baseUrl": "./", + "module": "es2015", + "types": [] + }, + "exclude": [ + "test.ts", + "**/*.spec.ts" + ] +} diff --git a/app-author-affiliation/src/tsconfig.spec.json b/app-author-affiliation/src/tsconfig.spec.json new file mode 100644 index 0000000..ac22a29 --- /dev/null +++ b/app-author-affiliation/src/tsconfig.spec.json @@ -0,0 +1,19 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "baseUrl": "./", + "module": "commonjs", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/app-author-affiliation/src/typings.d.ts b/app-author-affiliation/src/typings.d.ts new file mode 100644 index 0000000..ef5c7bd --- /dev/null +++ b/app-author-affiliation/src/typings.d.ts @@ -0,0 +1,5 @@ +/* SystemJS module definition */ +declare var module: NodeModule; +interface NodeModule { + id: string; +} diff --git a/app-author-affiliation/tsconfig.json b/app-author-affiliation/tsconfig.json new file mode 100644 index 0000000..a6c016b --- /dev/null +++ b/app-author-affiliation/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "target": "es5", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2017", + "dom" + ] + } +} diff --git a/app-author-affiliation/tslint.json b/app-author-affiliation/tslint.json new file mode 100644 index 0000000..9963d6c --- /dev/null +++ b/app-author-affiliation/tslint.json @@ -0,0 +1,143 @@ +{ + "rulesDirectory": [ + "node_modules/codelyzer" + ], + "rules": { + "arrow-return-shorthand": true, + "callable-types": true, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "deprecation": { + "severity": "warn" + }, + "eofline": true, + "forin": true, + "import-blacklist": [ + true, + "rxjs", + "rxjs/Rx" + ], + "import-spacing": true, + "indent": [ + true, + "spaces" + ], + "interface-over-type-literal": true, + "label-position": true, + "max-line-length": [ + true, + 140 + ], + "member-access": false, + "member-ordering": [ + true, + { + "order": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "no-arg": true, + "no-bitwise": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-debugger": true, + "no-duplicate-super": true, + "no-empty": false, + "no-empty-interface": true, + "no-eval": true, + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-misused-new": true, + "no-non-null-assertion": true, + "no-shadowed-variable": true, + "no-string-literal": false, + "no-string-throw": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-initializer": true, + "no-unused-expression": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "prefer-const": true, + "quotemark": [ + true, + "single" + ], + "radix": true, + "semicolon": [ + true, + "always" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "unified-signatures": true, + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ], + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ], + "no-output-on-prefix": true, + "use-input-property-decorator": true, + "use-output-property-decorator": true, + "use-host-property-decorator": true, + "no-input-rename": true, + "no-output-rename": true, + "use-life-cycle-interface": true, + "use-pipe-transform-interface": true, + "component-class-suffix": true, + "directive-class-suffix": true + } +} diff --git a/app-author-prefix/src/app/app.component.html b/app-author-prefix/src/app/app.component.html index 93f912f..678f0de 100644 --- a/app-author-prefix/src/app/app.component.html +++ b/app-author-prefix/src/app/app.component.html @@ -8,16 +8,16 @@ - Name + {{langJson.Prefix_Name[1]}} - Scheme + {{langJson.Prefix_Scheme[1]}} - URL + {{langJson.Prefix_URL[1]}} - Control + {{langJson.Author_Control[1]}} @@ -53,7 +53,7 @@ @@ -61,15 +61,15 @@ @@ -84,7 +84,7 @@
@@ -101,7 +101,7 @@ diff --git a/app-author-prefix/src/app/app.component.ts b/app-author-prefix/src/app/app.component.ts index d6860ea..4f5dee5 100644 --- a/app-author-prefix/src/app/app.component.ts +++ b/app-author-prefix/src/app/app.component.ts @@ -9,6 +9,21 @@ declare var $: any; styleUrls: ['./app.component.css'] }) export class AppComponent implements OnInit { + //画面データを設定 + //i18n + public langJson = { + Prefix_Name: [], + Prefix_Scheme: [], + Prefix_URL: [], + Author_Control: [], + Author_Button_Edit: [], + Author_Button_Save: [], + Author_Button_Cancel: [], + Author_Button_Delete: [], + Author_Select: [], + Author_Button_Add: [] + }; + public control = { edit_flag: [] }; @@ -37,11 +52,40 @@ export class AppComponent implements OnInit { constructor(private http: Http, ) { } ngOnInit() { + this.setI18n(); } ngAfterViewInit() { this.getAuthorsPrefixSettings(); this.getControlledVocabularies(); } + + /** + * i18n + */ + setI18n() { + let lang = $("#lang-code").val(); + let js = document.scripts; + let jsUrl = js[js.length - 1].src; + let strUrl = jsUrl.substring(0, jsUrl.lastIndexOf('static')); + let jsonUrl = strUrl + "static/json/weko_authors/translations/" + lang + "/messages.json"; + console.log(lang); + this.getLnagJson(jsonUrl).then(res => { + this.langJson = res; + }).catch( + ); + } + + /** + * 多言語対応 + */ + getLnagJson(url: any): Promise { + return this.http + .get(url) + .toPromise() + .then(response => response.json() as any) + .catch(this.handleError); + } + /** * edit authors prefix settings */ diff --git a/app-author-search/src/app/app.component.html b/app-author-search/src/app/app.component.html index 716acdd..0ebfe19 100644 --- a/app-author-search/src/app/app.component.html +++ b/app-author-search/src/app/app.component.html @@ -7,7 +7,7 @@
  
- + + + + + +
+
+ +
+
+
+
+ +
+
+
+
+
+
+   + + + {{langJson.Author_Display[1]}} +   + + + {{langJson.Author_Hide[1]}} +
+
+
+
+
+ +
+
+
+
+

+ + +
+
+ +
+
+ + + + + +
+ +
+
+
+ +
+
+ + +
+
+
+
+
+ +
+
+ +
+
+
+
+   + + + {{langJson.Author_Display[1]}} +   + + + {{langJson.Author_Hide[1]}} +
+
+
+
+
+ +
+
+
+
+

+
+ +
+
+ +
+
+ +
+
+
+ + + + + + +
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + +

diff --git a/app-items-author-search/src/app/add-author/add-author.component.ts b/app-items-author-search/src/app/add-author/add-author.component.ts index 627be7f..c5d9f7b 100644 --- a/app-items-author-search/src/app/add-author/add-author.component.ts +++ b/app-items-author-search/src/app/add-author/add-author.component.ts @@ -23,6 +23,13 @@ export class AddAuthorComponent implements OnInit { Author_Add_Author_ID: [], Author_EMail: [], Author_Add_EMail: [], + Author_Identifier: [], + Author_Add_Identifier: [], + Author_Affiliation_Name: [], + Author_Add_Affiliation_Name: [], + Author_Affiliation: [], + Author_Add_Affiliation: [], + Author_Button_Delete: [], Author_Button_Clear: [], Author_Button_Save: [], Author_familyNmAndNm: [], @@ -47,16 +54,34 @@ export class AddAuthorComponent implements OnInit { ], authorIdInfo: [ { - idType: "1", + idType: "2", authorId: "", authorIdShowFlg: "true" } ], emailInfo: [ { email: "" } + ], + affiliationInfo: [ + { + identifierInfo: [ + { + affiliationIdType: "1", + affiliationId: "", + identifierShowFlg: "true" + } + ], + affiliationNameInfo: [ + { + affiliationName: "", + affiliationNameLang: "ja", + affiliationNameShowFlg: "true" + } + ] + } ] } - //氏名の入力方 + //氏名の入力方法 // set data of name List public langOptions: any[] = [ { id: 'ja', value: 'ja' }, @@ -84,6 +109,14 @@ export class AddAuthorComponent implements OnInit { ]; // set data of group list public authorIdOptions: any[] = []; + // set data of group list + public identifierOptions: [ + { + id: -1, + name: "", + url: "" + } + ]; //氏名が姓・名で入力する場合 // set input guide public placeholderArry: any = [ @@ -101,6 +134,7 @@ export class AddAuthorComponent implements OnInit { ngOnInit() { this.setI18n(); this.getAuthorsPrefixSettings(); + this.getAuthorsAffiliationSettings(); } ngAfterViewInit() { this.getAuthorData(); @@ -115,6 +149,16 @@ export class AddAuthorComponent implements OnInit { } ).catch(); } + /** + * get authors affiliation settings + */ + getAuthorsAffiliationSettings() { + this.getDataOfAuthorsAffiliationSettings().then( + res => { + this.identifierOptions = res; + } + ).catch() + } /** * call api (get author prefix prefix) */ @@ -126,6 +170,18 @@ export class AddAuthorComponent implements OnInit { .then(response => response.json() as any) .catch(this.handleError); } + /** + * call api (get author Affiliation) + */ + getDataOfAuthorsAffiliationSettings() { + var urlArr = window.location.href.split('/'); + const url = urlArr[0] + "//" + urlArr[2] + "/api/authors/search_affiliation" + return this.http + .get(url) + .toPromise() + .then(response => response.json() as any) + .catch(this.handleError); + } /** * */ @@ -174,6 +230,12 @@ export class AddAuthorComponent implements OnInit { this.authorJsonObj.emailInfo.push(data); } } + if (info.hasOwnProperty("affiliationInfo")) { + this.authorJsonObj.affiliationInfo = []; + for (let data of info.affiliationInfo) { + this.authorJsonObj.affiliationInfo.push(data); + } + } console.log(JSON.stringify(this.authorJsonObj)) } /** @@ -184,6 +246,10 @@ export class AddAuthorComponent implements OnInit { let js = document.scripts; let jsUrl = js[js.length - 1].src; let strUrl = jsUrl.substring(0, jsUrl.lastIndexOf('static')); + if(strUrl.lastIndexOf('_debug_toolbar') > -1){ + // For debug mode + strUrl = strUrl.substring(0, strUrl.lastIndexOf('_debug_toolbar')); + } let jsonUrl = strUrl + "static/json/weko_authors/translations/" + lang + "/messages.json"; this.getLnagJson(jsonUrl).then(res => { this.langJson = res; @@ -243,6 +309,45 @@ export class AddAuthorComponent implements OnInit { this.authorJsonObj.emailInfo.splice(index, 1) } } + /** + * identifierを削除する + * @@param 削除する位置情報 + */ + delIdentifierData(affiliationIndex: string | number, identifierIndex: any) { + //全部削除する場合 + if (this.authorJsonObj.affiliationInfo[affiliationIndex].identifierInfo.length == 1) { + let subIdentifierInfoObj = this.returnSubIdentifierInfoObj(); + this.authorJsonObj.affiliationInfo[affiliationIndex].identifierInfo.splice(identifierIndex, 1, subIdentifierInfoObj); + } else { + this.authorJsonObj.affiliationInfo[affiliationIndex].identifierInfo.splice(identifierIndex, 1) + } + } + /** + * affiliationNameを削除する + * @@param 削除する位置情報 + */ + delAffiliationNameData(affiliationIndex: string | number, affiliationNameIndex: any) { + //全部削除する場合 + if (this.authorJsonObj.affiliationInfo[affiliationIndex].affiliationNameInfo.length == 1) { + let subAffiliationNameInfoObj = this.returnSubAffiliationNameInfoObj(); + this.authorJsonObj.affiliationInfo[affiliationIndex].affiliationNameInfo.splice(affiliationNameIndex, 1, subAffiliationNameInfoObj); + } else { + this.authorJsonObj.affiliationInfo[affiliationIndex].affiliationNameInfo.splice(affiliationNameIndex, 1) + } + } + /** + * affiliationを削除する + * @@param 削除する位置情報 + */ + delAffiliationData(index: any) { + //全部削除する場合 + if (this.authorJsonObj.affiliationInfo.length == 1) { + let subAffiliationInfoObj = this.returnSubAffiliationInfoObj(); + this.authorJsonObj.affiliationInfo.splice(index, 1, subAffiliationInfoObj); + } else { + this.authorJsonObj.affiliationInfo.splice(index, 1) + } + } /** * 氏名情報を追加する */ @@ -260,13 +365,13 @@ export class AddAuthorComponent implements OnInit { * 著者情報を追加する */ addAuthorIdInfo() { - //子対象を取得す + //子対象を取得する let authorIdInfoObj = this.returnAuthorIdInfoObj(); //行目を追加 this.authorJsonObj.authorIdInfo.push(authorIdInfoObj); } /** - * メール情報を削除する + * メール情報を追加する */ addEmailInfo() { //子対象を取得する @@ -274,6 +379,36 @@ export class AddAuthorComponent implements OnInit { //行目を追加 this.authorJsonObj.emailInfo.push(subEmailInfo); } + /** + * 所属機関識別子情報を追加する + * @@param 追加する位置情報 + */ + addIdentifierInfo(affiliationIndex: any) { + //子対象を取得する + let subIdentifierInfoObj = this.returnSubIdentifierInfoObj(); + //行目を追加 + this.authorJsonObj.affiliationInfo[affiliationIndex].identifierInfo.push(subIdentifierInfoObj); + } + /** + * 所属機関名情報を追加する + * @@param 追加する位置情報 + */ + addAffiliationNameInfo(affiliationIndex: any) { + //子対象を取得する + let subAffiliationNameInfoObj = this.returnSubAffiliationNameInfoObj(); + //行目を追加 + this.authorJsonObj.affiliationInfo[affiliationIndex].affiliationNameInfo.push(subAffiliationNameInfoObj); + } + /** + * 所属情報を追加する + */ + addAffiliationInfo() { + //子対象を取得する + let subAffiliationInfoObj = this.returnSubAffiliationInfoObj(); + //行目を追加 + this.authorJsonObj.affiliationInfo.push(subAffiliationInfoObj); + } + /** *画面情報をクリアする */ @@ -282,10 +417,12 @@ export class AddAuthorComponent implements OnInit { let authorNameInfoLength = this.authorJsonObj.authorNameInfo.length; let authorIdInfoLength = this.authorJsonObj.authorIdInfo.length; let emailInfoLength = this.authorJsonObj.emailInfo.length; + let affiliationInfoLength = this.authorJsonObj.affiliationInfo.length; //画面情報を初期化 this.authorJsonObj.authorNameInfo = []; this.authorJsonObj.authorIdInfo = []; this.authorJsonObj.emailInfo = []; + this.authorJsonObj.affiliationInfo = []; //予定行を追加 for (let i = 0; i < authorNameInfoLength; i++) { let authorNameInfoObj = this.returnAuthorNameInfoObj(); @@ -302,6 +439,11 @@ export class AddAuthorComponent implements OnInit { let subEmailInfo = this.returnSubEmailInfo(); this.authorJsonObj.emailInfo.push(subEmailInfo); } + for (let i = 0; i < affiliationInfoLength; i++) { + let subAffiliationInfoObj = this.returnSubAffiliationInfoObj(); + this.authorJsonObj.affiliationInfo.push(subAffiliationInfoObj); + } + //入力案内内容を初期化に変更する } /** * 氏名情報を返す @@ -340,6 +482,47 @@ export class AddAuthorComponent implements OnInit { } return subEmailInfo; } + /** + * identifier情報を返す + */ + returnSubIdentifierInfoObj(): any { + //所属機関識別子情報 + let subIdentifierInfoObj = { + affiliationIdType: "1", + affiliationId: "", + identifierShowFlg: "true" + } + return subIdentifierInfoObj; + } + + /** + * affiliationName情報を返す + */ + returnSubAffiliationNameInfoObj(): any { + //所属機関名情報 + let subAffiliationNameInfoObj = { + affiliationName: "", + affiliationNameLang: "ja", + affiliationNameShowFlg: "true" + } + return subAffiliationNameInfoObj; + } + /** + * affiliation情報を返す + */ + returnSubAffiliationInfoObj(): any { + //所属情報 + let subAffiliationInfoObj = { + "identifierInfo": [], + "affiliationNameInfo": [] + } + let subIdentifierInfoObj = this.returnSubIdentifierInfoObj(); + subAffiliationInfoObj.identifierInfo.push(subIdentifierInfoObj); + + let subAffiliationNameInfoObj = this.returnSubAffiliationNameInfoObj(); + subAffiliationInfoObj.affiliationNameInfo.push(subAffiliationNameInfoObj); + return subAffiliationInfoObj; + } /** *placeholder案内内容を返す */ @@ -445,6 +628,11 @@ export class AddAuthorComponent implements OnInit { jsonStrCopy.emailInfo.splice(i, 1); } } + for (let affiliationIndex = 0; affiliationIndex < jsonStrCopy.affiliationInfo.length; affiliationIndex++) { + if (jsonStrCopy.affiliationInfo[affiliationIndex].affiliation == "") { + jsonStrCopy.affiliationInfo.splice(affiliationIndex, 1); + } + } return jsonStrCopy; } /** @@ -534,4 +722,23 @@ deleteById(esIdJsonObj: any): Promise { '×' + this.langJson.Author_Confirm_Msg[1] + '
'); } } + /** + * affiliation confirm identifier url + */ + affiliationConfirm(affiliationIdType: any, affiliationId: any) { + let url_identifier = ""; + for (let i = 0; i < this.identifierOptions.length; i++) { + if (affiliationIdType == this.identifierOptions[i].id) { + url_identifier = this.identifierOptions[i].url; + } + } + if (url_identifier != "") { + window.open(url_identifier.replace(/#+$/, affiliationId), "_blank"); + } else { + $('#alerts').append( + '
' + + '' + this.langJson.Author_Confirm_Msg[1] + '
'); + } + } } diff --git a/app-items-author-search/src/app/app.component.ts b/app-items-author-search/src/app/app.component.ts index 00c706f..ce34a21 100644 --- a/app-items-author-search/src/app/app.component.ts +++ b/app-items-author-search/src/app/app.component.ts @@ -42,6 +42,24 @@ export class AppComponent implements OnInit { ], emailInfo: [ { email: "" } + ], + affiliationInfo: [ + { + identifierInfo: [ + { + affiliationIdType: "1", + affiliationId: "", + identifierShowFlg: "true" + } + ], + affiliationNameInfo: [ + { + affiliationName: "", + affiliationNameLang: "ja", + affiliationNameShowFlg: "true" + } + ] + } ] } //検索すると、サービスから戻ったデータ diff --git a/build.sh b/build.sh index 1a34e2a..1f47f30 100755 --- a/build.sh +++ b/build.sh @@ -32,6 +32,7 @@ done <