チェンジセット 245 : SPARQLBuilderWWW/web
- 更新日時:
- 2015/03/24 10:29:12 (10 年 前)
- パス:
- SPARQLBuilderWWW/web
- ファイル:
-
- 2 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/web/newsparqlbuilder.css
r243 r245 1 ul.select2-results__options{ 2 -webkit-appearance: none; 3 } 1 4 #SPARQLBUILDER{ 2 5 width: 90%; -
SPARQLBuilderWWW/web/newsparqlbuilder.js
r244 r245 60 60 $(".SBStartClassSelect").change(function() { 61 61 startClass = $(".SBStartClassSelect").val(); 62 load PathList();62 loadEndClassList(); 63 63 }); 64 64 $(".SBEndClassSelect").change(function() { … … 104 104 if(defendpoint != "" && defstartclass != "" && defendclass != ""){ 105 105 106 $('.SBStartClassSelect').on('l ccomplete', function(){106 $('.SBStartClassSelect').on('lsccomplete', function(){ 107 107 $('.SBStartClassSelect').val(defstartclass); 108 108 defstartclass = ""; 109 $('.SBEndClassSelect').val(defendclass);110 defendclass = "";111 109 112 110 $(".SBEndPointSelect").select2(); … … 114 112 $(".SBEndClassSelect").select2(); 115 113 116 $('.SBStartClassSelect').unbind('lccomplete'); 114 $('.SBStartClassSelect').unbind('lsccomplete'); 115 loadEndClassList(); 116 }); 117 118 $('.SBEndClassSelect').on('leccomplete', function(){ 119 $('.SBEndClassSelect').val(defendclass); 120 defendclass = ""; 121 122 $(".SBEndPointSelect").select2(); 123 $(".SBStartClassSelect").select2(); 124 $(".SBEndClassSelect").select2(); 125 126 $('.SBEndClassSelect').unbind('leccomplete'); 117 127 }); 118 128 … … 125 135 $('.SBEndPointSelect').val(defendpoint); 126 136 defendpoint = ""; 127 load ClassList();137 loadStartClassList(); 128 138 $('.SBEndPointSelect').unbind('epcomplete'); 129 139 }); … … 131 141 $('.SBEndPointSelect').val(defendpoint); 132 142 defendpoint = ""; 133 load ClassList();143 loadStartClassList(); 134 144 } 135 145 } … … 212 222 endpoint = $(".SBEndPointSelect").val(); 213 223 if(endpoint != "SBDefault"){ 214 load ClassList();224 loadStartClassList(); 215 225 } 216 226 }; 217 227 218 load ClassList = function() {228 loadStartClassList = function() { 219 229 $('.SBPermaLinkButton').attr('disabled', true); 220 230 var url = "http://www.sparqlbuilder.org/api/clist?ep=" + encodeURIComponent(endpoint); … … 227 237 $(".SBStartClassSelect").empty(); 228 238 $(".SBEndClassSelect").empty(); 229 $(".SBStartClassSelect").append('<option value="SBDefault">SELECT StartClass</option>'); 230 $(".SBEndClassSelect").append('<option value="SBDefault">SELECT EndClass</option>'); 239 $(".SBStartClassSelect").append('<option value="SBDefault">SELECT StartClass (From ' + list.length + ' below)</option>'); 231 240 for (var i = 0; i < list.length; ++i) { 232 241 $(".SBStartClassSelect").append('<option value="' + list[i]['uri'] + '">' + list[i]['label'] + ' (' + list[i]['number'] + ')' + '</option>'); 233 $(".SBEndClassSelect").append('<option value="' + list[i]['uri'] + '">' + list[i]['label'] + ' (' + list[i]['number'] + ')' + '</option>');234 242 } 235 243 $(".SBStartClassSelect").select2(); 236 244 $(".SBEndClassSelect").select2(); 237 $(".SBStartClassSelect").trigger(new $.Event('lccomplete')); 245 $(".SBStartClassSelect").trigger(new $.Event('lsccomplete')); 246 } 247 }); 248 }; 249 250 loadEndClassList = function() { 251 $('.SBPermaLinkButton').attr('disabled', true); 252 var url = "http://www.sparqlbuilder.org/api/clist?ep=" + encodeURIComponent(endpoint) + '&class=' + encodeURIComponent($(".SBStartClassSelect").val()); 253 $.ajax({ 254 type : "GET", 255 url : url, 256 async : false, 257 success : function(data) { 258 var list = eval(data); 259 $(".SBEndClassSelect").empty(); 260 $(".SBEndClassSelect").append('<option value="SBDefault">SELECT EndClass (From ' + list.length + ' below)</option>'); 261 for (var i = 0; i < list.length; ++i) { 262 $(".SBEndClassSelect").append('<option value="' + list[i]['uri'] + '">' + list[i]['label'] + ' (' + list[i]['number'] + ')' + '</option>'); 263 } 264 $(".SBStartClassSelect").select2(); 265 $(".SBEndClassSelect").select2(); 266 $(".SBEndClassSelect").trigger(new $.Event('leccomplete')); 238 267 } 239 268 }); … … 533 562 .attr("y", function(d) { return d.y + 4; }) 534 563 .text(function(d) { return d.score; }) 535 .style("fill", ' #ff0000')564 .style("fill", 'hsl(0, 50%, 75%)') 536 565 .style("text-anchor", 'middle') 537 566 .style("pointer-events", "none");