rem: $.ajax({ type: "GET", url: "/gsn", success: function(data){ var start = new Date();   if (!GSN.loaded) GSN.init(data);    if (firstload && GSN.context == "home") { for (var i = 0; i < 10; ++i){ var n = $($("virtual-sensor",data).get(i)).attr("name"); if (n!=null) GSN.vsbox.add(n); 
add: success: function(msg) { GSN.data.fields = new Array(); GSN.data.fields_type = new Array(); GSN.data.criterias = new Array(); GSN.data.nb_crit = 0; $("field", $("virtual-sensor", msg)).each(function() { if ($(this).attr("type").substr(0,3) != "bin") { GSN.data.fields.push($(this).attr("name")); GSN.data.fields_type.push($(this).attr("type")); if (radio) { if (($(this).attr("type") == "int") || ($(this).attr("type") == "long") || ($(this).attr("type") == "double")) { $("#fields").append("<input type=\"radio\" name=\"fields\" id=\"field\" value=\""+$(this).attr("name")+"\">"+$(this).attr("name")+"<br/>"); } } else { $("#fields").append("<input type=\"checkbox\" name=\"fields\" id=\"field\" value=\""+$(this).attr("name")+"\">"+$(this).attr("name")+"<br/>"); } } }); if (radio) { $("#field").attr("checked", true); $("#fields").append("<br/><select name=\"aggregateFunction\" id=\"aggregateFunction\" size=\"1\"></select><br/>"); $("#aggregateFunction").append("<option value=\"AVG\">AVG</option>"); $("#aggregateFunction").append("<option value=\"AVG\">MAX</option>"); $("#aggregateFunction").append("<option value=\"AVG\">MIN</option>"); } else { $("#fields").append("<br/><input type=\"checkbox\" name=\"all\" onClick=\"javascript:GSN.data.checkAllFields(this.checked)\">Check all<br/>"); } $("#fields").append("<br><a href=\"javascript:GSN.data.nbDatas()\" id=\"nextStep\">Next step</a>"); 
context: 		$.ajax({ type: "GET", url: "/gsn", success: function(data){			var start = new Date();									//initalisation of gsn info, vsmenu			if (!GSN.loaded) GSN.init(data);									//create vsbox on the first load			if (firstload && GSN.context == "home") {				for (var i = 0; i < 10; ++i){					var n = $($("virtual-sensor",data).get(i)).attr("name");					if (n!=null) GSN.vsbox.add(n);				}			} else if (firstload && GSN.context == "fullmap") {				$("virtual-sensor",data).each(function(){					GSN.vsbox.add($(this).attr("name"));				});			}						//update vsbox			$("virtual-sensor",data).each(function(){				GSN.vsbox.update($(this));			});						//update map			GSN.map.autozoomandcenter();						//next refresh			if($("#refreshall_timeout").attr("value") > 0)				setTimeout("GSN.updateall("+GSN.updatenb+")", $("#refreshall_timeout").attr("value"));						$(".refreshing").hide();							var diff = new Date() - start;			GSN.debug("updateall time:"+diff/1000); 		}});
meta: 37	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/37/a31d85d853a22365f10afdb759fbbb8cd6f2df29/gsn.js/buggy/webapp/js/gsn.js