Skip to content

Commit b3da8d0

Browse files
author
Gaurav SinghaRoy
committed
css refactor of sparql editor
1 parent f4b6a60 commit b3da8d0

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

app/assets/javascripts/query.js.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# You can use CoffeeScript in this file: http://coffeescript.org/
44

55
@generate_sample_query = (template_id)->
6-
$("#txt_sparql_query").html($("#txt_sample_query_"+template_id).html())
6+
$("#txt_sparql_query").val($("#txt_sample_query_"+template_id).html())
77

88
@display_sparql_literal = (data) ->
99
display_text = break_words(html_safe(data.value))

app/views/query/_sparql_query_editor.html.erb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,20 @@
1111
</div>
1212
<div class="panel-footer">
1313
<div class="row">
14-
<div class="col-md-12">
14+
<div class="col-md-9">
1515
<button type="button" class="btn btn-lg btn-success" onclick="execute_sparql_query()"><span class="glyphicon glyphicon-play"></span>&nbsp;Run</button>
1616
</div>
17+
<%if mode == "sparql"%>
18+
<div class="col-md-3">
19+
<button onclick="generate_sample_query('1')" type="button" class="btn btn-lg btn-info pull-right">Sample Query</button>
20+
</div>
21+
<%end%>
1722
</div>
1823
</div>
1924
</div>
25+
<div class="hide">
26+
<textarea rows="5" id="txt_sample_query_1" >PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
27+
SELECT ?subject ?label
28+
WHERE { ?subject rdfs:label ?label.
29+
FILTER(langMatches(lang(?label), "EN"))} LIMIT 200</textarea>
30+
</div>

0 commit comments

Comments
 (0)