bshambaugh / node-arc-d3

Visualization of Triples
5 stars 0 forks source link

Buttons need to ultimately trigger the rest of the visualization program #22

Open bshambaugh opened 7 years ago

bshambaugh commented 7 years ago

Following Issue #13 , there needs to be functions that tie the sparql query into the function that loads the graph. The same needs to be done for the load file / LDP container. See the load file function triggered by a button developed somewhere.

bshambaugh commented 7 years ago

The load file function experiment is here:

https://github.com/bshambaugh/makebuttons/blob/master/loadfile-example-one.html

bshambaugh commented 7 years ago

Flow for loadfile-example-one.html . Back of the envelope loading file:

LoadFile Before clicking: screenshot from 2017-05-08 17 16 43 After clicking and XMLHttpRequest: screenshot from 2017-05-08 17 16 52

bshambaugh commented 7 years ago

Right now I have a pop-up window for the sparql endpoint button that loads a file. Of particular interest are the following experiments:

https://github.com/bshambaugh/node-arc-d3/blob/master/js/tests/cssgridandsparqljquerydialog/application/index-adid-strip-nobuttons-nojs-loadf.html

https://github.com/bshambaugh/node-arc-d3/blob/master/js/tests/cssgridandsparqljquerydialog/application/index-adid-strip-button-callfn.js

Obviously, this should revert to the load file / LDP container button instead. So work will ensue to do this instead. I need to load the file from the text field to the left.

The sparql endpoint should use the $( "#users" ).append( siteDomain + encodeURIComponent(name.val()) ); method to send a uri encoded uri. security?

bshambaugh commented 7 years ago

Integrate the experiments above with:

https://github.com/bshambaugh/node-arc-d3/blob/master/js/tests/cssgridandsparqljquerydialog/application/sh-jquery-todolist.html

bshambaugh commented 7 years ago

The result is:

https://github.com/bshambaugh/node-arc-d3/blob/master/js/tests/cssgridandsparqljquerydialog/application/cp-index-adid-strip-button-callfn.js

and

https://github.com/bshambaugh/node-arc-d3/blob/master/js/tests/cssgridandsparqljquerydialog/application/cp-index-adid-strip-nobuttons-nojs-loadf-dosparql.html

bshambaugh commented 7 years ago

I created a config file for jquery-ui that loads jquery-ui, but I am not sure what is meant by an anonymous module. Does this mean I can give it a name in the config file? Maybe it is this???

http://tagneto.blogspot.com/2010/09/anonymous-module-support-in-requirejs.html

seealso: https://github.com/bshambaugh/node-arc-d3/blob/master/js/config.js

bshambaugh commented 7 years ago

I am also not sure how to load this file with require.js:

https://github.com/bshambaugh/node-arc-d3/blob/master/js/cp-index-adid-strip-button-callfn.js

hopefully it will all work magically :) if I just load it.

bshambaugh commented 7 years ago

I get this error: ReferenceError: $ is not defined[Learn More] for cp_index_adid_strip_button_callfn.js

Try looking at: http://www.requirejs.org/jqueryui-amd/example/webapp/app.html

and https://stackoverflow.com/questions/17793289/requirejs-jqueryui-widget-not-defined

bshambaugh commented 7 years ago

SeeAlso: How to use RequireJS with jQuery http://requirejs.org/docs/jquery.html

bshambaugh commented 7 years ago

See jquery-ui with amd:

http://www.requirejs.org/jqueryui-amd/example/webapp/app.html

https://learn.jquery.com/jquery-ui/environments/amd/

bshambaugh commented 7 years ago

This does not seem to be working yet, try bower:

https://learn.jquery.com/jquery-ui/environments/bower/

bshambaugh commented 7 years ago

http://codeimpossible.com/2010/01/13/solving-document-ready-is-not-a-function-and-other-problems/

Or try this: https://stackoverflow.com/questions/12113172/how-do-i-use-jquery-ui-with-requirejs

bshambaugh commented 7 years ago

but I get this error: http://requirejs.org/docs/errors.html#mismatch

bshambaugh commented 7 years ago

http://requirejs.org/docs/1.0/docs/api.html#define

bshambaugh commented 7 years ago

The Load File / LDP Button works, but the SPARQL Button needs to tied to a function: 1-sm-success