File tree Expand file tree Collapse file tree
assets/javascripts/resources Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,6 +96,16 @@ SPARQL = {
9696 }
9797 var download_url = Utils . rdf2any . server + Utils . rdf2any . actions . convert + "json?dataset=" + QueryBuilder . datasets . get_selected ( ) + "&query=" + encodeURIComponent ( query ) ;
9898 window . open ( download_url ) ;
99+ } ,
100+ for_class : function ( ) {
101+ var query = $ ( "#txt_sparql_query" ) . val ( ) ;
102+ if ( QueryBuilder . properties . will_show_properties_in_preview ( ) == true ) {
103+ $ ( "#btn_show_checked_properties_no" ) . click ( ) ;
104+ query = $ ( "#txt_sparql_query" ) . val ( ) ;
105+ $ ( "#btn_show_checked_properties_yes" ) . click ( ) ;
106+ }
107+ var download_url = Utils . rdf2any . server + Utils . rdf2any . actions . convert + "json?dataset=" + QueryBuilder . datasets . get_selected ( ) + "&query=" + encodeURIComponent ( query ) + "&for_class=" + QueryBuilder . classes . get_selected_class ( ) ;
108+ window . open ( download_url ) ;
99109 }
100110
101111 } ,
Original file line number Diff line number Diff line change 3939 < div class ="btn-group " id ="btn_group_download ">
4040 < button type ="button " class ="btn btn-default btn-primary " onclick ="SPARQL.download.rdb() "> < span class ="glyphicon glyphicon-list-alt "> </ span > RDB Script</ button >
4141 < button type ="button " class ="btn btn-default btn-success " onclick ="SPARQL.download.csv() "> < span class ="glyphicon glyphicon-align-justify "> </ span > CSV</ button >
42- < button type ="button " class ="btn btn-default btn-info " onclick ="SPARQL.download.json.virtuoso () "> < span class ="glyphicon glyphicon-road "> </ span > JSON</ button >
42+ < button type ="button " class ="btn btn-default btn-info " onclick ="SPARQL.download.json.for_class () "> < span class ="glyphicon glyphicon-road "> </ span > JSON</ button >
4343 < button type ="button " class ="btn btn-default btn-warning " onclick ="SPARQL.download.pdf() "> < span class ="glyphicon glyphicon-file "> </ span > PDF</ button >
4444 <% if in_query_builder_action? %>
4545 < button class ="btn btn-default btn-danger " onclick ="QueryBuilder.convert.configured.initiate_download() "> < span class ="glyphicon glyphicon-glass "> </ span > Generic</ button >
You can’t perform that action at this time.
0 commit comments