scripts.gadget-sonar-accessor-min.js Maven / Gradle / Ivy
AJS.$.namespace("AJS.gadget.sonar.accessor");AJS.gadget.sonar.accessor.populateProjectSelectorWithProjects=function(g,a,h,c,b){var e=AJS.$("#waitingImage");var f=AJS.$("").attr({id:"error_msg"});e.parent().prepend(f);h.empty();h.css("display","none");e.css("display","block");g.resize();var d=AJS.sonar.accessor.getAjaxOptions(AJS.sonar.accessor.parseSonarServer(g.getBaseUrl(),a),AJS.sonar.accessor.generateServerResourceApiUrl(),function(i){if(b!==null&&b.value!==undefined&&b.label!==undefined){h.append(AJS.$("").attr({value:b.value,selected:(c===b.value)}).text(b.label))}AJS.$(i).each(function(){h.append(AJS.$("").attr({value:this.key,selected:(c===this.key)}).text(this.name))});f.css("display","none");e.css("display","none");h.css("display","block");g.resize()},function(){e.css("display","none");h.css("display","none");f.css("display","block");f.empty().append(AJS.format(g.getMsg("sonar.error.failed.to.connect"),a))});AJS.$.ajax(d)};