Skip to content

Commit 01e430a

Browse files
author
Gaurav SinghaRoy
committed
made the selection of subclass a bit more intelligent
1 parent 62ca43c commit 01e430a

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

app/assets/javascripts/resources/querybuilder.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ QueryBuilder = {
164164
QueryBuilder.properties.get_subclasses(QueryBuilder.classes.get_selected_class());
165165
},
166166
select_subclass : function(uri){
167-
168167
$("#property_main_subclasses_group").find(".list-group-item").each(function(index){
169168
var html = "";
170169
if($(this).attr("uri") == uri){
@@ -173,6 +172,17 @@ QueryBuilder = {
173172
}else{
174173
html += "<span class='glyphicon glyphicon-ok'></span>&nbsp;&nbsp;";
175174
$(this).attr("clicked","true");
175+
if(uri == "all"){
176+
$(".property-subclass-individual").each(function(i){
177+
$(this).attr("clicked","false");
178+
$(this).html($(this).attr("display-name"));
179+
});
180+
}else{
181+
$(".property-subclass-group").each(function(i){
182+
$(this).attr("clicked","false");
183+
$(this).html($(this).attr("display-name"));
184+
});
185+
}
176186
}
177187
if(uri == "all")
178188
html += "<strong>"

0 commit comments

Comments
 (0)