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

apps can start open and with all data displayed #10

Open
Permafacture opened this issue Jul 15, 2014 · 0 comments
Open

apps can start open and with all data displayed #10

Permafacture opened this issue Jul 15, 2014 · 0 comments

Comments

@Permafacture
Copy link
Owner

In response to a feature request by email I responded (note, main.jas has been edited since this and the line numbers are at least a few off):

I did make a special case in the javascript for if there is only one app, start with it open. But starting open and starting with all the datasets checked or not would best be an option in the app.

The most reusable way to do this would be to let apps have keys that tell the javascript to start with the app open and whether or not the start with all the datasets checked. "startopen" and "startchecked" maybe.

In the javascript, these keys would be added to the metaTags (line 52).

then, the startopen would be processed on line 265, replacing the "if there's only one app" condition. (either startopen or startchecked should trigger this) (actually, it should go right after the handler is defined, within the loop, right after line 261.

The startchecked would be processed in a similar way, inserted after line 228. Actually, I don't have time to play with it right now, but I think line 224-228 might need to be moved to line 209 and activating the check could happen within the loop, right after the checkbox is created (so right after line 220)

would startchecked make it so the datasets start checked only on load? Or every time the app is opened? If the former, after checking all the boxes, the hash value should be changed from true to false.

The non-reusable answer would be for you to change the javascript to fit your specific case. The html specifies main.js as the file to import, so build_page can;t take a javascript file name as an argument without some tweaking, and having different files for different behavior would be difficult to maintain.

Sorry the javascript is kind of a mess. My friend wrote it quickly and I'm not a javascript programmer so I kind of hacked it up a bit more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant