reflex-dhtmlx
Requirements
- You must include the stylesheet
lib/dhtmlxcalendar.css
in your page - You must put everything in
lib/img
in the same directory that you putdhtmlxcalendar.css
. - You must provide the
lib/dhtmlxcalendar.js
file in your page
Building the Example
After cloning the repo, you will need reflex-platform
you can run git submodule update --init --recursive
to get that code as a submodule.
You can then run nix-shell -A shells.ghc
or nix-shell -A shells.ghcjs
to get a wired up nix-shell.
Alternatively you can cd reflex-dhtmlx-example
and run nix-build ../ -A ghcjs.reflex-dhtmlx-example
and simply open index.html
in your browser.
You can also see the example here.
Updating
If you are to update the javascript blob in libs/dhtmlxcalendar.js, please follow these steps to update the exports for google closure compiler:
-
Find all instances of
window.dhx
and change them towindow['dhx']
. -
Find all instances of
window.dhx4
and change them towindow['dhx4']
. -
Find all instances of
window.dhtmlxEvent
and change them towindow['dhtmlxEvent']
. -
Find the definition of the
dhtmlxEvent
function - it should be inside anif(undefined...){ function dhtmlxEvent...
and export dhtmlxEvent by adding
window['dhtmlxEvent']=dhtmlxEvent;
immediately after the function definition, inside theif
statement.
Do this for any other symbols that may end up as undefined
after running your program
through google's closure compiler.
https://developers.google.com/closure/compiler/docs/api-tutorial3#export