Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substance b6. #31

Open
wants to merge 81 commits into
base: editor
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
6e511af
Improve make script.
Integral Aug 2, 2017
af81b03
Change bundler version.
Integral Aug 2, 2017
dc8f5c9
Drop libraries into libs directory.
Integral Aug 2, 2017
34f3c64
Highlights.
Integral Aug 2, 2017
41de33c
Upgrade Interview package.
Integral Aug 2, 2017
19d047e
Upgrade towards substance beta-6.
Integral Aug 2, 2017
d2cbd82
Upgrade subjects packages.
Integral Aug 2, 2017
8b9e429
Remove obsolete tools.
Integral Aug 2, 2017
ffeebd4
Upgrade publisher.
Integral Aug 2, 2017
1882e49
Improve styles.
Integral Aug 2, 2017
5c6cf85
Missing labels.
Integral Aug 2, 2017
85867eb
Index subject parents.
Integral Aug 10, 2017
be427d9
Remove obsolete tool.
Integral Aug 10, 2017
c11927a
Repair Explorer package.
Integral Aug 10, 2017
c3c6932
Schema fixes.
Integral Aug 10, 2017
209edab
Repair Person index package.
Integral Aug 10, 2017
d283c45
Cleanup.
Integral Aug 10, 2017
bf5af9b
Improve publisher.
Integral Aug 10, 2017
f11019c
Improve subjects.
Integral Aug 10, 2017
acdf956
Fix scroll resources.
Integral Aug 10, 2017
d2801f7
Repair Reader package.
Integral Aug 10, 2017
2253d07
Repair scholar client package.
Integral Aug 10, 2017
c5e67dd
Improve html containers.
Integral Aug 10, 2017
218726c
Update eslint config.
Integral Aug 11, 2017
9657bb5
Keep collaborators inside document record.
Integral Aug 11, 2017
a4ccd27
Improve collaborators support.
Integral Aug 12, 2017
92a78b8
Fix prison context item position.
Integral Aug 12, 2017
7d809fd
Set schemas version.
Integral Aug 14, 2017
8a75331
Expose active collaborators.
Integral Aug 14, 2017
e444240
Connect collaboration engine.
Integral Aug 14, 2017
6cdffc4
Reset resource view on filter changes.
Integral Aug 14, 2017
6898bc5
Context item view mode.
Integral Aug 18, 2017
883e6c7
Small fixes.
Integral Aug 18, 2017
83b73ea
Update deps.
Integral Aug 18, 2017
f0597dc
Update libraries versions.
Integral Aug 18, 2017
2a17c59
Update archivist.
Integral Aug 19, 2017
7fab9fd
Improve translations.
Integral Aug 20, 2017
f69ecc4
Set minimum width.
Integral Aug 20, 2017
379a6f4
Set language.
Integral Aug 20, 2017
4a5b3a8
Keep scholar poly fills together.
Integral Sep 9, 2017
98aff68
Don't use notifications inside reader.
Integral Sep 9, 2017
25cb549
Male legacy version.
Integral Sep 9, 2017
a016071
Change connected scripts.
Integral Sep 9, 2017
27609c6
Connect ost publisher styles.
Integral Sep 9, 2017
1c3f950
Bump Archivist version.
Integral Sep 9, 2017
887b101
Pass configurator to Forms.
Integral Sep 11, 2017
b33948c
Pass configurator inside form widgets.
Integral Sep 12, 2017
f60bca2
Missing translations added.
Integral Sep 12, 2017
f68a003
Bump archivist version.
Integral Sep 12, 2017
7d635bc
Bump deps.
Integral Oct 11, 2017
c407222
Fix entity highlighter in reader.
Integral Oct 11, 2017
9376e72
Use npm packages, rename archivist to archivist-js.
Integral Nov 30, 2017
fa24089
Deactivate converter.
Integral Dec 5, 2017
8ab2ffa
Ignore sync script.
Integral Dec 5, 2017
b387fc5
Optional db url argument.
Integral Dec 5, 2017
5aea5d6
Waypoints.
Integral Dec 5, 2017
3a22c48
Override documents package with filters and sorting.
Integral Dec 11, 2017
0080c79
Fix location query.
Integral Dec 27, 2017
d0c9398
Fix location query.
Integral Dec 27, 2017
fa1b736
Fix reverse geocoordinates bug.
Integral Jan 17, 2018
2025e18
Rerender synonyms on geocoding events.
Integral Jan 17, 2018
58930f0
Replace latest synonym on geocoding events.
Integral Jan 17, 2018
b056720
Hide comments in reader.
Integral Mar 19, 2018
18a248e
Don't load archivist source.
Integral Mar 19, 2018
6919718
Bump archivist-js version.
Integral Mar 19, 2018
91b9af5
Change archivist-js version.
Integral Mar 19, 2018
7046324
Faster entity indexing and loading.
Integral Apr 15, 2018
4751c5b
Show IE error.
Integral Jul 23, 2018
61385e7
Disable minifier.
Integral Jul 23, 2018
f25b66b
Disable minifier.
Integral Jul 23, 2018
64e250c
Disable minifier.
Integral Jul 23, 2018
c24a3b6
Disable minifier.
Integral Jul 23, 2018
a6e71b7
Fix some packages version.
Integral Mar 4, 2019
bc9b238
Add subjects via context menu.
Integral Mar 4, 2019
a4a05e8
Add subject children.
Integral Mar 4, 2019
eba4a28
Always allow to add child subjects.
Integral Mar 4, 2019
f407c7c
Always allow to add child subjects.
Integral Mar 4, 2019
63f6227
Typo.
Integral Mar 4, 2019
299b892
Fix subject manager errors.
Integral Jul 24, 2019
d5f642d
Fix subject manager error.
Integral Jul 24, 2019
0759758
Fix typo.
Integral Jul 24, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"node": true
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 6
"ecmaVersion": 6,
"ecmaFeatures": {
"jsxnec": true,
},
},
"extends": "eslint:recommended",
"globals": {
"Promise": true
},
"globals": [
// browser
"window", "document", "URL", "XMLHttpRequest",
// browser / nodejs
"console", "setTimeout", "setInterval", "clearInterval",
// nodejs
"global",
// EcmaScript 6
"Promise", "Map", "Set", "WeakMap",
// commonjs
"require", "module", "exports"
//
].reduce((m, key)=>{m[key]=true;return m}, {}),
"rules": {
// 0 - off, 1 - warning, 2 - error
"indent": ["error", 2, { "SwitchCase": 1 }],
"semi": [0, "never"],
"semi": [0, "always"],
"comma-dangle": [2, "only-multiline"],
"no-cond-assign": 2,
"no-console": [2, { allow: ["warn", "info", "error", "assert"] }],
Expand All @@ -40,14 +48,15 @@ module.exports = {
// turned of as we want to be able to use this.hasOwnProperty() for instance
"no-prototype-builtins": 0,
"no-regex-spaces": 2,
"no-restricted-globals": [2, "Document", "Node"],
"no-sparse-arrays": 0,
"no-unexpected-multiline": 2,
"no-unreachable": 2,
"no-unsafe-finally": 2,
"use-isnan": 2,
"valid-jsdoc": 0,
"valid-typeof": 2,
"strict": 0, // [2, "safe"],
"strict": [2, "safe"],

// Best practices
"accessor-pairs": 0,
Expand Down Expand Up @@ -126,6 +135,6 @@ module.exports = {
"no-undef-init": 2,
"no-undefined": 0,
"no-unused-vars": 2,
"no-use-before-define": [2, { "functions": false }]
"no-use-before-define": [2, { "functions": false, "classes": false }]
}
};
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ config/production.json
config/test.json
config/dev.json
ecosystem.json
sync.js

# Conversion data
ost-data

dist
dist/doc
uploads
tmp
tmp
24 changes: 19 additions & 5 deletions client/publisher/ResourceClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,27 +82,41 @@ class ResourceClient {
listEntities(filters, options, cb) {
let filtersRequest = encodeURIComponent(JSON.stringify(filters))
let optionsRequest = encodeURIComponent(JSON.stringify(options))
request('GET', '/api/entities?filters=' + filtersRequest + '&options=' + optionsRequest, null, cb)
this.request('GET', '/api/entities?filters=' + filtersRequest + '&options=' + optionsRequest, null, cb)
}

searchEntities(query, language, filters, options, cb) {
let filtersRequest = encodeURIComponent(JSON.stringify(filters))
let optionsRequest = encodeURIComponent(JSON.stringify(options))
request('GET', '/api/entities/search?query=' + query + '&language=' + language + '&filters=' + filtersRequest + '&options=' + optionsRequest, null, cb)
this.request('GET', '/api/entities/search?query=' + query + '&language=' + language + '&filters=' + filtersRequest + '&options=' + optionsRequest, null, cb)
}

/*
Read all document resources
Fetch all document resources
*/
getDocumentCollaborators(documentId, cb) {
this.request('GET', '/api/collaborators/document/' + documentId, null, cb)
}

/*
Fetch all document resources
*/
getDocumentResources(documentId, cb) {
request('GET', '/api/entities/document/' + documentId, null, cb)
this.request('GET', '/api/entities/document/' + documentId, null, cb)
}

/*
Get subjects data
*/
getSubjects(cb) {
request('GET', '/api/entities/tree/subject', null, cb)
this.request('GET', '/api/entities/tree/subject', null, cb)
}

/*
Get collaborator data
*/
getCollaborator(userId, cb) {
this.request('GET', '/api/collaborators/' + userId, null, cb)
}
}

Expand Down
1 change: 0 additions & 1 deletion client/publisher/app.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* Publisher Component styles */
@import '../../node_modules/substance/dist/substance.next.css';
@import '../../node_modules/leaflet/dist/leaflet.css';
@import '../../node_modules/leaflet-control-geocoder/dist/Control.Geocoder.css';
@import './publisher.css';
Expand Down
2 changes: 1 addition & 1 deletion client/publisher/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { substanceGlobals } from 'substance'
import { Archivist, ArchivistConfigurator } from 'archivist'
import { Archivist, ArchivistConfigurator } from 'archivist-js'
import Package from './package'

substanceGlobals.DEBUG_RENDERING = true;
Expand Down
18 changes: 7 additions & 11 deletions client/publisher/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@
<head>
<title>Archivist Publisher</title>
<meta charset="UTF-8">
<script type="text/javascript" src="/substance/substance.js"></script>
<script type="text/javascript" src="/archivist/archivist.js"></script>
<script type="text/javascript" src="/libs/substance/substance.js"></script>
<script type="text/javascript" src="./publisher.js"></script>
<style>
/* Mpro Component styles */
@import '/libs/substance/substance.next.css';
@import '/libs/archivist/archivist.css';
@import '/libs/archivist/archivist-reset.css';
@import '/libs/archivist/archivist-pagestyle.css';
@import url('/libs/font-awesome/css/font-awesome.min.css');
@import './publisher.css';
/* You may want to use your own reset and pagestyle */
/* @import '../substance/substance-reset.css';*/
@import '/archivist/archivist.css';
@import '/archivist/archivist-reset.css';
@import '/archivist/archivist-pagestyle.css';
/* Using url here, so font-awesome does not get bundled. */
@import url('/font-awesome/css/font-awesome.min.css');
</style>
</head>
<body>

</body>
</html>
</html>
18 changes: 7 additions & 11 deletions client/publisher/index.production.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@
<head>
<title>OST Publisher</title>
<meta charset="UTF-8">
<script type="text/javascript" src="/substance/substance.js"></script>
<script type="text/javascript" src="/archivist/archivist.js"></script>
<script type="text/javascript" src="/libs/substance/substance.js"></script>
<script type="text/javascript" src="./publisher.js"></script>
<style>
/* Mpro Component styles */
@import '/libs/substance/substance.next.css';
@import '/libs/archivist/archivist.css';
@import '/libs/archivist/archivist-reset.css';
@import '/libs/archivist/archivist-pagestyle.css';
@import url('/libs/font-awesome/css/font-awesome.min.css');
@import './publisher.css';
/* You may want to use your own reset and pagestyle */
/* @import '../substance/substance-reset.css';*/
@import '/archivist/archivist.css';
@import '/archivist/archivist-reset.css';
@import '/archivist/archivist-pagestyle.css';
/* Using url here, so font-awesome does not get bundled. */
@import url('/font-awesome/css/font-awesome.min.css');
</style>
</head>
<body>

</body>
</html>
</html>
29 changes: 17 additions & 12 deletions client/publisher/package.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { ProseArticle } from 'substance'
import { ArchivistPackage, ArchivistSubConfigurator, CommentsPackage, DocumentsPackage, IndentationPackage, MetadataEditorPackage, ResourcesPackage, TimecodeAnnotatorPackage, UsersPackage, WhitespacePackage } from 'archivist'
import { ProseEditorPackage } from 'substance'
import { ArchivistPackage, ArchivistSubConfigurator, CommentsPackage, IndentationPackage, MetadataEditorPackage, ResourcesPackage, TimecodeAnnotatorPackage, UsersPackage, WhitespacePackage } from 'archivist-js'
import InterviewPackage from '../../packages/interview/package'
import FormsPackage from '../../packages/forms/package'
import DocumentsPackage from '../../packages/documents/package'
import DefinitionManagerPackage from '../../packages/definition-manager/package'
import PersonManagerPackage from '../../packages/person-manager/package'
import PrisonManagerPackage from '../../packages/prison-manager/package'
Expand All @@ -22,16 +23,19 @@ import Subject from '../../packages/subjects/Subject'
import Subjects from '../../packages/subjects/package'
import Toponym from '../../packages/toponym/Toponym'

const { ProseArticle } = ProseEditorPackage

let appConfig = 'ARCHIVISTCONFIG'
appConfig = JSON.parse(appConfig)

export default {
name: 'archivist-publisher',
configure: function(config) {
// Use the default Archivist package
config.setDefaultLanguage(appConfig.defaultLanguage)
config.import(ArchivistPackage)
config.import(DocumentsPackage)
// Override Archivist form package
// Override Archivist form package
config.import(FormsPackage)
// Manage person entity type
config.import(PersonManagerPackage)
Expand Down Expand Up @@ -72,7 +76,8 @@ export default {
let EntitiesConfigurator = new ArchivistSubConfigurator()
EntitiesConfigurator.defineSchema({
name: 'archivist-entities',
ArticleClass: ProseArticle
version: '1.0.0',
DocumentClass: ProseArticle
})
EntitiesConfigurator.addNode(Definition)
EntitiesConfigurator.addNode(Person)
Expand Down Expand Up @@ -107,15 +112,15 @@ export default {
config.setResourceClient(ResourceClient)

config.setMenuItems([
{icon: 'fa-file-text', label: 'Documents', action: 'archive'},
{icon: 'fa-tags', label: 'Subjects', action: 'subjects'},
{icon: 'fa-users', label: 'Persons', action: 'persons'},
{icon: 'fa-th', label: 'Prisons', action: 'prisons'},
{icon: 'fa-globe', label: 'Toponyms', action: 'toponyms'},
{icon: 'fa-book', label: 'Definitions', action: 'definitions'},
{icon: 'fa-id-badge', label: 'Users', action: 'users'}
{icon: 'fa-file-text', label: 'documents', action: 'archive'},
{icon: 'fa-tags', label: 'subjects', action: 'subjects'},
{icon: 'fa-users', label: 'persons', action: 'persons'},
{icon: 'fa-th', label: 'prisons', action: 'prisons'},
{icon: 'fa-globe', label: 'toponyms', action: 'toponyms'},
{icon: 'fa-book', label: 'definitions', action: 'definitions'},
{icon: 'fa-id-badge', label: 'users', action: 'users'}
])

config.setDefaultResourceTypes(['definition', 'person', 'prison', 'toponym'])
}
}
}
4 changes: 3 additions & 1 deletion client/publisher/publisher.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@import '../../packages/forms/_index.css';
@import '../../packages/header/_index.css';
@import '../../packages/definition/_index.css';
@import '../../packages/ost-publisher/_index.css';
@import '../../packages/documents/_index.css';
@import '../../packages/person/_index.css';
@import '../../packages/prison/_index.css';
@import '../../packages/subject/_index.css';
@import '../../packages/subject-manager/_index.css';
@import '../../packages/subjects-editor-context/_index.css';
@import '../../packages/toponym/_index.css';
@import '../../packages/toponym/_index.css';
1 change: 0 additions & 1 deletion client/scholar/app.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* Scholar styles */
@import '../../node_modules/substance/dist/substance.next.css';
@import '../../node_modules/plyr/dist/plyr.css';
@import '../../node_modules/leaflet/dist/leaflet.css';
@import '../../node_modules/leaflet.markercluster/dist/MarkerCluster.css';
Expand Down
94 changes: 0 additions & 94 deletions client/scholar/assets/multirange.js

This file was deleted.

1 change: 1 addition & 0 deletions client/scholar/assets/polyfills.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading