Skip to content

Commit 50ad685

Browse files
author
Gaurav SinghaRoy
committed
UI refactor of generic download
1 parent 792a977 commit 50ad685

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

app/assets/javascripts/resources/querybuilder.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,8 @@ QueryBuilder = {
642642
reader.readAsText(f);
643643
}
644644

645-
document.getElementById('list').innerHTML = '<ul>' + output.join('') + '</ul>';
645+
//document.getElementById('list').innerHTML = '<ul>' + output.join('') + '</ul>';
646+
$(".configured-download-file-ok").show("fast");
646647

647648
},
648649

@@ -709,6 +710,7 @@ QueryBuilder = {
709710
$(".div-configured-download").show("fast");
710711
$("#btn_group_download").hide("fast");
711712
$("#btn_download_configured_convert_template").attr("href","/query/configured_convert_template?selected_properties="+QueryBuilder.properties.get_checked_properties());
713+
$(".configured-download-file-ok").hide();
712714
},
713715
hide_download : function(motion){
714716
if(motion != undefined && motion != ""){

app/views/query/_search_results.html.erb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
</p>
5757
<p>
5858
Not sure how your template should be? Download the template from here :&nbsp;
59-
<a type="button" class="btn btn-default btn-xs btn-success" target="_blank" id="btn_download_configured_convert_template">Download template</a>
59+
<a type="button" class="btn btn-default btn-xs btn-success" target="_blank" id="btn_download_configured_convert_template"><span class='glyphicon glyphicon-file'></span>&nbsp;Download template</a>
6060
</p>
6161
<p >
6262
<strong>STEP 2 : </strong> Ready with the template file ? Awesome !! Now all you have to do is upload that file below.
@@ -65,12 +65,12 @@
6565
<input type="file" id="configured_template_files" name="files[]" multiple class="btn btn-warning btn-xs col-md-12"/>
6666
<output id="list"></output>
6767
</p>
68-
69-
</div>
70-
</div>
71-
<div class="div-configured-download row" style="display:none;">
72-
<div class="col-md-12">
73-
<button type="button" onclick="SPARQL.download.configured()">download final file !!</button>
68+
<p class="configured-download-file-ok">
69+
<span class="badge alert-success"><span class='glyphicon glyphicon-ok'></span></span> The uploaded template file is a valid template. You can now proceed to download your final serialization output :)
70+
</p>
71+
<p class="configured-download-file-ok">
72+
<button type="button" class="btn btn-primary" onclick="SPARQL.download.configured()"><span class='glyphicon glyphicon-glass'></span>&nbsp;download final output file</button>
73+
</p>
7474
</div>
7575
</div>
7676
<%end%>

0 commit comments

Comments
 (0)