- You must include the stylesheet
lib/dhtmlxcalendar.cssin your page - You must put everything in
lib/imgin the same directory that you putdhtmlxcalendar.css. - You must provide the
lib/dhtmlxcalendar.jsfile in your page
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.
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.dhxand change them towindow['dhx']. -
Find all instances of
window.dhx4and change them towindow['dhx4']. -
Find all instances of
window.dhtmlxEventand change them towindow['dhtmlxEvent']. -
Find the definition of the
dhtmlxEventfunction - it should be inside anif(undefined...){ function dhtmlxEvent...and export dhtmlxEvent by adding
window['dhtmlxEvent']=dhtmlxEvent;immediately after the function definition, inside theifstatement.
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