チェンジセット 289
- 更新日時:
- 2016/06/16 17:30:26 (8 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
SPARQLBuilderWWW/web/newsparqlbuilder.js
r288 r289 133 133 if(eplist.length == 0){ 134 134 $('.SBEndPointSelect').on('epcomplete', function(){ 135 $('.SBEndPointSelect').val(defendpoint); 135 $('.SBEndPointSelect option').each(function(){ 136 if($(this).text() == defendpoint){ 137 $(this).attr('selected', 'selected'); 138 } 139 }); 136 140 defendpoint = ""; 137 141 loadStartClassList(); … … 139 143 }); 140 144 }else{ 141 $('.SBEndPointSelect').val(defendpoint); 145 $('.SBEndPointSelect option').each(function(){ 146 if($(this).text() == defendpoint){ 147 $(this).attr('selected', 'selected'); 148 } 149 }); 142 150 defendpoint = ""; 143 151 loadStartClassList(); … … 199 207 $('.SBPermaLinkButton').attr('disabled', true); 200 208 var url = 'http://www.sparqlbuilder.org/api/eplist?ds=true'; 209 $(".SBEndPointSelect").empty(); 210 $(".SBEndPointSelect").attr("disabled", "disabled"); 211 $(".SBStartClassSelect").empty(); 212 $(".SBStartClassSelect").attr("disabled", "disabled"); 213 $(".SBEndClassSelect").empty(); 214 $(".SBEndClassSelect").attr("disabled", "disabled"); 201 215 $.ajax({ 202 216 url: url, … … 207 221 for (var i = 0; i < list.length; ++i) { 208 222 $(".SBEndPointSelect").append('<option value="' + list[i]['uri'] + '">' + list[i]['label'] + '</option>'); 209 switchLoadIcon("hide"); 223 if(defendpoint == ''){ 224 switchLoadIcon("hide"); 225 } 210 226 if($('.SBModalView').attr('display') == 'block'){ 211 227 $(".SBEndPointSelect").select2(); … … 214 230 } 215 231 } 232 $(".SBEndPointSelect").removeAttr("disabled"); 216 233 $(".SBEndPointSelect").trigger(new $.Event('epcomplete')); 217 234 }, … … 220 237 221 238 changeEndPoint = function() { 222 endpoint = $(".SBEndPointSelect ").val();239 endpoint = $(".SBEndPointSelect option:selected").text(); 223 240 if(endpoint != "SBDefault"){ 224 241 loadStartClassList(); … … 229 246 $('.SBPermaLinkButton').attr('disabled', true); 230 247 var url = "http://www.sparqlbuilder.org/api/clist?ep=" + encodeURIComponent(endpoint); 248 $(".SBStartClassSelect").empty(); 249 $(".SBStartClassSelect").attr("disabled", "disabled"); 250 $(".SBEndClassSelect").empty(); 251 $(".SBEndClassSelect").attr("disabled", "disabled"); 231 252 $.ajax({ 232 253 type : "GET", 233 254 url : url, 234 async : false,255 //async : false, 235 256 success : function(data) { 236 257 var list = eval(data); 237 258 $(".SBStartClassSelect").empty(); 238 $(".SBEndClassSelect").empty();239 259 $(".SBStartClassSelect").append('<option value="SBDefault">SELECT StartClass (From ' + list.length + ' classes below)</option>'); 240 260 for (var i = 0; i < list.length; ++i) { 241 261 $(".SBStartClassSelect").append('<option value="' + list[i]['uri'] + '">' + list[i]['label'] + ' (' + list[i]['number'] + ')' + '</option>'); 242 262 } 263 $(".SBStartClassSelect").removeAttr("disabled"); 243 264 $(".SBStartClassSelect").select2(); 244 265 $(".SBEndClassSelect").select2(); … … 254 275 type : "GET", 255 276 url : url, 256 async : false,277 //async : false, 257 278 success : function(data) { 258 279 var list = eval(data); … … 262 283 $(".SBEndClassSelect").append('<option value="' + list[i]['uri'] + '">' + list[i]['label'] + ' (' + list[i]['number'] + ')' + '</option>'); 263 284 } 285 $(".SBEndClassSelect").removeAttr("disabled"); 264 286 $(".SBStartClassSelect").select2(); 265 287 $(".SBEndClassSelect").select2();