diff --git a/README.md b/README.md index 8a34ab289..b25b78063 100644 --- a/README.md +++ b/README.md @@ -10,19 +10,19 @@ [![DOI](https://zenodo.org/badge/5966814.svg)](https://zenodo.org/badge/latestdoi/5966814) - -
+ +
-**[Showcases](https://github.com/Edirom/Edirom-Online#showcases) • -[Get started](https://github.com/Edirom/Edirom-Online#get-started) • -[Documentation](https://github.com/Edirom/Edirom-Online#documentation) • -[Dependencies](https://github.com/Edirom/Edirom-Online#dependencies) • -[Roadmap](https://github.com/Edirom/Edirom-Online#roadmap) • -[Contributing](https://github.com/Edirom/Edirom-Online#contributing) • -[Get in touch](https://github.com/Edirom/Edirom-Online#get-in-touch) • -[Code of Conduct](https://github.com/Edirom/Edirom-Online#code-of-Conduct) • -[License](https://github.com/Edirom/Edirom-Online#license)** +**[Showcases](https://github.com/Edirom/Edirom-Online?tab=readme-ov-file#showcases) • +[Get started](https://github.com/Edirom/Edirom-Online?tab=readme-ov-file#get-started) • +[Dependencies](https://github.com/Edirom/Edirom-Online?tab=readme-ov-file#dependencies) • +[Roadmap](https://github.com/Edirom/Edirom-Online?tab=readme-ov-file#roadmap) • +[Contributing](https://github.com/Edirom/Edirom-Online?tab=readme-ov-file#contributing) • +[Get in touch](https://github.com/Edirom/Edirom-Online?tab=readme-ov-file#get-in-touch) • +[Code of Conduct](https://github.com/Edirom/Edirom-Online?tab=readme-ov-file#code-of-conduct) • +[Citation](https://github.com/Edirom/Edirom-Online?tab=readme-ov-file#citation) +[License](https://github.com/Edirom/Edirom-Online?tab=readme-ov-file#license)**
diff --git a/add/data/locale/edirom-lang-de.xml b/add/data/locale/edirom-lang-de.xml index 2623dec9e..60ea41462 100644 --- a/add/data/locale/edirom-lang-de.xml +++ b/add/data/locale/edirom-lang-de.xml @@ -64,6 +64,7 @@ + @@ -99,6 +100,8 @@ + + diff --git a/add/data/locale/edirom-lang-en.xml b/add/data/locale/edirom-lang-en.xml index 44d568e4a..5f94ad188 100644 --- a/add/data/locale/edirom-lang-en.xml +++ b/add/data/locale/edirom-lang-en.xml @@ -64,6 +64,7 @@ + @@ -99,6 +100,8 @@ + + diff --git a/app/Application.js b/app/Application.js index 76fd97764..c8f379a62 100644 --- a/app/Application.js +++ b/app/Application.js @@ -32,6 +32,7 @@ Ext.define('EdiromOnline.Application', { 'desktop.TaskBar', 'desktop.TopBar', 'navigator.Navigator', + 'window.about.AboutWindow', 'window.AnnotationView', 'window.HeaderView', 'window.HelpWindow', diff --git a/app/controller/desktop/Desktop.js b/app/controller/desktop/Desktop.js index b91a06754..a768c6c8e 100644 --- a/app/controller/desktop/Desktop.js +++ b/app/controller/desktop/Desktop.js @@ -34,6 +34,9 @@ Ext.define('EdiromOnline.controller.desktop.Desktop', { 'topbar button[action=openSearchWindow]': { click: this.onOpenSearchWindow }, + 'topbar button[action=openAboutWindow]': { + click: this.onOpenAboutWindow + }, 'topbar #searchTextFieldTop': { specialkey: this.onSpecialKey } @@ -94,6 +97,11 @@ Ext.define('EdiromOnline.controller.desktop.Desktop', { me.desktop.openSearchWindow(term); }, + onOpenAboutWindow: function(button, event, args) { + var me = this; + me.desktop.openAboutWindow(); + }, + switchDesktop: function(desk) { this.desktop.switchDesktop(desk); }, diff --git a/app/controller/window/about/AboutWindow.js b/app/controller/window/about/AboutWindow.js new file mode 100644 index 000000000..4bc211e4d --- /dev/null +++ b/app/controller/window/about/AboutWindow.js @@ -0,0 +1,79 @@ +/** + * Edirom Online + * Copyright (C) 2014 The Edirom Project + * http://www.edirom.de + * + * Edirom Online is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Edirom Online is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Edirom Online. If not, see . + */ +Ext.define('EdiromOnline.controller.window.about.AboutWindow', { + + extend: 'Ext.app.Controller', + + views: [ + 'window.about.AboutWindow' + ], + + init: function() { + this.control({ + 'aboutWindow': { + afterlayout : this.onAfterLayout + } + }); + }, + + onAfterLayout: function(view) { + + var me = this; + + if(view.initialized) return; + view.initialized = true; + + window.doAJAXRequest('resources/CITATION.cff', + 'GET', {}, + Ext.bind(function(response){ + + const citation = response.responseText; + + // find keys in citation + const abstract = String(citation.match(/^abstract:\s>-\n(\s+.*\n)+/gm)).replace(/^abstract:\s>-\n/, ''); + const version = citation.match(/^version: (.*)/m)[1]; + const title = citation.match(/^title: (.*)/m)[1]; + const license = citation.match(/^license: (.*)/m)[1]; + const repoUrl = citation.match(/^repository\-code: '(.*)'/m)[1]; + const releaseDate = citation.match(/^date\-released: '(.*)'/m)[1]; + const doi = citation.match(/value: ([0-9]+\.[0-9]+\/zenodo\.[0-9]+)/)[1]; + + view.setResult(` +
+

About ${title}

+
+

${abstract}

+

Version: ${version}

+

Release date: ${releaseDate}

+

DOI: ${doi}

+

${getLangString('view.window.about.AboutWindow_License')}: ${license}

+

GitHub: ${repoUrl}

+

Contributors:
+ + Avatars of contributors to ${title} in GitHub + +

+
+
+ `); + + }, this) + ); + } +}); diff --git a/app/view/desktop/Desktop.js b/app/view/desktop/Desktop.js index 6dea2561f..4dcf31e4f 100644 --- a/app/view/desktop/Desktop.js +++ b/app/view/desktop/Desktop.js @@ -207,6 +207,29 @@ Ext.define('EdiromOnline.view.desktop.Desktop', { //win.doSearch(term); }, + openAboutWindow: function() { + + var me = this; + var win = null; + + me.getActiveWindowsSet().each(function(window) { + if(Ext.getClassName(window) == 'EdiromOnline.view.window.about.AboutWindow') + win = window; + }); + + if(win == null) { + win = Ext.create('EdiromOnline.view.window.about.AboutWindow', me.getSizeAndPosition(700, 600)); + me.addWindow(win); + win.show(); + + }else if(win != me.getActiveWindow()) + win.show(); + + else + win.hide(); + + }, + getSizeAndPosition: function(maxWidth, maxHeight) { var me = this; diff --git a/app/view/desktop/TaskBar.js b/app/view/desktop/TaskBar.js index c34be95a5..9c3ec67bd 100644 --- a/app/view/desktop/TaskBar.js +++ b/app/view/desktop/TaskBar.js @@ -43,6 +43,7 @@ Ext.define('EdiromOnline.view.desktop.TaskBar', { 'sortVertically', 'openConcordanceNavigator', 'openSearchWindow', + 'openAboutWindow', 'switchLanguage'); me.windowSort = new Ext.toolbar.Toolbar(me.getWindowSortConfig()); diff --git a/app/view/desktop/TopBar.js b/app/view/desktop/TopBar.js index 85f330dc7..1e60b1e25 100644 --- a/app/view/desktop/TopBar.js +++ b/app/view/desktop/TopBar.js @@ -57,6 +57,13 @@ Ext.define('EdiromOnline.view.desktop.TopBar', { action: 'openSearchWindow' }); + me.aboutButton = Ext.create('Ext.button.Button', { + id: 'aboutBtn', + cls: 'taskLinkButton about', + text: getLangString('view.desktop.TaskBar_about'), + action: 'openAboutWindow' + }); + me.searchTextField = Ext.create('Ext.form.TextField', { width: 180, id: 'searchTextFieldTop' @@ -82,7 +89,8 @@ Ext.define('EdiromOnline.view.desktop.TopBar', { me.workCombo, '->', me.searchTextField, - me.searchButton + me.searchButton, + me.aboutButton ] }) ]; diff --git a/app/view/window/about/AboutWindow.js b/app/view/window/about/AboutWindow.js new file mode 100644 index 000000000..784938941 --- /dev/null +++ b/app/view/window/about/AboutWindow.js @@ -0,0 +1,84 @@ +/** + * Edirom Online + * Copyright (C) 2014 The Edirom Project + * http://www.edirom.de + * + * Edirom Online is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Edirom Online is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Edirom Online. If not, see . + * + */ +Ext.define('EdiromOnline.view.window.about.AboutWindow', { + + extend: 'Ext.window.Window', + + mixins: { + observable: 'Ext.util.Observable' + }, + + alias: 'widget.aboutWindow', + + requires: [ + ], + + stateful: false, + isWindow: true, + //closeAction: 'hide', + constrainHeader: true, + minimizable: false, + maximizable: false, + closable: true, + shadow: false, + + layout: { + type: 'vbox', + align: 'stretch' + }, + border: 0, + bodyBorder: false, + + padding: 0, + + bodyPadding: '0', + + cls: 'ediromWindow aboutWindow', + + defaults: { + border:false + }, + + initComponent: function() { + var me = this; + + me.title = getLangString('view.window.about.AboutWindow_Title'); + + me.items = [ + { + xtype: 'panel', + flex: 1, + html: '
' + } + + ]; + + me.callParent(); + }, + + setResult: function(text) { + Ext.fly(this.id + '_textCont').update(text); + this.fireEvent('documentLoaded', this); + }, + + close: function() { + this.hide(); + } +}); \ No newline at end of file diff --git a/build.xml b/build.xml index 4e9abda72..b3941eb43 100755 --- a/build.xml +++ b/build.xml @@ -45,6 +45,7 @@ + diff --git a/packages/eoTheme/sass/var/button/Button.scss b/packages/eoTheme/sass/var/button/Button.scss index b7f102363..04775c46b 100644 --- a/packages/eoTheme/sass/var/button/Button.scss +++ b/packages/eoTheme/sass/var/button/Button.scss @@ -112,6 +112,15 @@ $edirom-taskbarWindowButton-background-color: #cccccc; } } +.taskLinkButton.about { + border: 1px solid #949393; + background-image: -webkit-linear-gradient(top, #adadad, #a79b9b 48%, #979797 52%, #c3c2c2); +} + +.taskLinkButton.about:hover { + background-image: -webkit-linear-gradient(top, #cdcdcd, #c5c5c5 48%, #c3c3c3 52%, #d3d2d2); +} + .x-btn-default-toolbar-small.x-pressed { background-color: #A3A3A3 !important; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4) inset;