comphist / cora

A web-based, token-level annotation tool for non-standard language data
http://www.linguistics.rub.de/comphist/resources/cora/
MIT License
10 stars 6 forks source link

Move initialization code to separate JS file #18

Closed mbollmann closed 7 years ago

mbollmann commented 9 years ago

Originally reported by: Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann)


Currently, many JS sources define their own domready events.

While this keeps the initialization logic for each component physically close to that component, separating this out into a different file would keep everything that happens on domready close together.

This could also be a first step towards making the components unit-testable, since the individual JS files could be included without any domready magic happening automatically.


mbollmann commented 9 years ago

Original comment by Marcel Bollmann (Bitbucket: mbollmann, GitHub: mbollmann):


Use LAB.js and move initialization to main.js (resolves #15 and #22)

LAB.js is now used as a script loader to fetch other files; this is done in main.js (or main.login.js when on the login screen), and all initialization code (ondomready events) has been moved here as well.

Currently, this breaks compatibility with debug mode, and also, the main.js file(s) are not currently minified.