var bugs = { popUp_width: 600, showForm: function(event) { $('PopUp_div').style.width = this.popUp_width; openPopUp(event, false, "/bugs-ajax-showForm?where_uri="+document.location, 606); }, changeType: function(type) { this.closeAllFields(); if(type == 1) { $('bug_type').style.display = "block"; $('recommendation').style.display = "block"; } else if(type == 2) { $('correction_type').style.display = "block"; //$('who').style.display = "block"; $('urgency').style.display = "block"; } else if(type == 4) { $('urgency').style.display = "block"; } //alert(type); }, changeStatus: function(bug_id, new_status) { if(new_status == 0) { return false; } $('PopUp_content').load('/bugs-ajax-changeStatus?bug='+bug_id+'&new_status='+new_status); //popUpOpacity('hide'); document.location = "/bugs"; }, changeWho: function(bug_id, new_who) { $('PopUp_content').load('/bugs-ajax-changeWho?bug='+bug_id+'&new_who='+new_who); //popUpOpacity('hide'); document.location = "/bugs"; }, closeAllFields: function(id) { $('bug_type').style.display = "none"; $('correction_type').style.display = "none"; $('recommendation').style.display = "none"; //$('who').style.display = "none"; $('urgency').style.display = "none"; }, showBugDetail: function(event, id) { $('PopUp_div').style.width = 400; openPopUp(event, false, "bugs-ajax-showBug?id="+id, 600); } }