/* Copyright 2011 Google Inc. All Rights Reserved. */ (function(){var global=this;String.prototype.startsWith=function(a){return 0==this.lastIndexOf(a,0)};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};Function.prototype.apply||(Function.prototype.apply=function(a,b){var c=[];a||(a=global);for(var d=b||[],e=0;e/g,quote_re_=/\"/g; function GetCursorPos(a,b){try{if(IsDefined(b.selectionEnd))return b.selectionEnd;if(a.document.selection&&a.document.selection.createRange){var c=a.document.selection.createRange();if(c.parentElement()!=b)return-1;var d=c.duplicate();d.moveToElementText(b);d.setEndPoint("EndToStart",c);var e=d.text.length;return e>b.value.length?-1:e}DB_WriteDebugMsg("Unable to get cursor position for: "+navigator.userAgent,0);return b.value.length}catch(f){DumpException(f,"Cannot get cursor pos")}return-1} function FindInArray(a,b){for(var c=0;c"+new Date+""+a+"

",c.innerHTML=a+c.innerHTML):window.status=a};function AS_Assert(){}AS_Assert.raise=function(a){if("undefined"!=typeof Error)throw Error(a||"Assertion Failed");throw a;};AS_Assert.fail=function(a){a=a||"Assertion failed";"undefined"!=typeof DumpError&&DumpError(a+"\n");AS_Assert.raise(a)};AS_Assert.isTrue=function(a,b){a||(void 0===b&&(b="Assertion failed"),AS_Assert.fail(b))};AS_Assert.equals=function(a,b,c){a!=b&&(void 0===c&&(c="AS_Assert.equals failed: <"+a+"> != <"+b+">"),AS_Assert.fail(c))}; AS_Assert.typeOf=function(a,b,c){if(typeof a!=b){if(a||""==a)try{if(b==AS_Assert.TYPE_MAP[typeof a]||a instanceof b)return}catch(d){}void 0===c&&("function"==typeof b&&(c=b.toString().match(/^\s*function\s+([^\s\{]+)/))&&(b=c[1]),c="AS_Assert.typeOf failed: <"+a+"> not typeof "+b);AS_Assert.fail(c)}};AS_Assert.TYPE_MAP={string:String,number:Number,"boolean":Boolean};Function.prototype.bind=function(a,b){if("function"!=typeof this)throw Error("Bind must be called as a method of a function object.");var c=this,d=Array.prototype.splice.call(arguments,1,arguments.length);return function(){for(var b=d.concat(),f=0;f"+c.stack),c;}};"undefined"==typeof log&&(log=function(){});function Dom(a){this.doc=a||document;this.getElementById_=this.doc.getElementById?function(a){return this.doc.getElementById(a)}:function(a){return this.doc.all[a]}}Dom.prototype.$=function(a){return this.getElementById_(a)};Dom.prototype.create=function(a){return this.doc.createElement(a)};Dom.remove=function(a){AS_Assert.isTrue(a.parentNode);a.parentNode.removeChild(a)};Dom.insertAfter=function(a,b){AS_Assert.isTrue(b.parentNode);b.parentNode.insertBefore(a,b.nextSibling)}; Dom.insertBefore=function(a,b){AS_Assert.isTrue(b.parentNode);b.parentNode.insertBefore(a,b)};Dom.replace=function(a,b){AS_Assert.isTrue(b.parentNode);b.parentNode.replaceChild(a,b)};Dom.getInnerText=function(a){var b=[];Dom.getInnerTextHelp_(a,b);return b.join("")};Dom.getInnerTextHelp_=function(a,b){if(a.innerText)b.push(a.innerText);else if(a.data)b.push(a.data);else if(a.hasChildNodes())for(var c=a.firstChild;c;)arguments.callee(c,b),c=c.nextSibling};var DM_GlobalDom=new Dom; function $(a){return DM_GlobalDom.$(a)};function PopupController(){this.activePopups_=[]}function _PC_Install(a){if(gPopupControllerInstalled)return!1;gPopupControllerInstalled=!0;a=a?a:document;listen(a.body,"mousedown",PC_notifyPopups);return!0}function PC_notifyPopups(a){if(0==gPopupController.activePopups_.length)return!1;a=a||window.event;for(var b=gPopupController.activePopups_.length-1;0<=b;--b){var c=gPopupController.activePopups_[b];PC_assertIsPopup(c);c.deactivate(a)&&gPopupController.activePopups_.splice(b,1)}return!0} function PC_assertIsPopup(a){a:{a=a.deactivate;var b=Function,c="popup missing deactivate function";if(typeof a!=b){if(a||""==a)try{if(b==AssertTypeMap[typeof a]||a instanceof b)break a}catch(d){}var e=void 0===c;e&&("function"==typeof b&&(c=b.toString().match(/^\s*function\s+([^\s\{]+)/))&&(b=c[1]),c="AssertType failed: <"+a+"> not typeof "+b);a=(a=c)||"Assertion failed";IsDefined(DumpError)&&DumpError(a+"\n");if("undefined"!=typeof Error)throw Error(a||"Assertion Failed");throw a;}}} var gPopupController=new PopupController,gPopupControllerInstalled=!1;function _ac_install(){ac_addHandler_(document.body,"onkeydown",ac_keyevent_);ac_addHandler_(document.body,"onkeypress",ac_keyevent_)}function _ac_register(a){for(var b=ac_storeConstructors.length;0<=--b;)if(ac_storeConstructors[b]===a)return;ac_storeConstructors.push(a)}function _ac_onfocus(a){ac_keyevent_(a)}function _ac_isCompleting(){return!!ac_store&&!ac_suppressCompletions}function _ac_isCompleteListShowing(){return!!ac_store&&!ac_suppressCompletions&&ac_completions&&ac_completions.length} function _ac_cancel(){ac_suppressCompletions=!0;ac_updateCompletionList(!1)}function ac_addHandler_(a,b,c){var d=a[b];a[b]=d?ac_fnchain_(a[b],c):c;return d}function ac_cancelEvent_(a){"stopPropagation"in a?a.stopPropagation():a.cancelBubble=!0;"preventDefault"in a&&a.preventDefault()}function ac_fnchain_(a,b){return function(){var c=a.apply(this,arguments),d=b.apply(this,arguments);return!1===c||!1===d?!1:!0}} function ac_keyevent_(a){a=a||window.event;var b=a.target||a.srcElement;if("INPUT"==b.tagName&&b.type.match(/^text$/i)||"TEXTAREA"==b.tagName){var c=GetKeyCode(a),d="keydown"==a.type,e=a.shiftKey,f=!0;if(b!==ac_focusedInput||null===ac_store)if(ac_focusedInput=b,f=!1,13!==c&&27!==c){for(var g=0;g"+ac_preTextToHtml(g[2])+""+ac_preTextToHtml(g[3]),g=new _AC_Completion(b[f].value,g,this.docstrings[b[f].value]),d.push(g),d.length>this.countThreshold))break}return d}; _AC_SimpleStore.prototype.autoselectFirstRow=function(){return!0};function _AC_CompareACCompletion(a,b){var c=a.value.toLowerCase().replace(/^\W*/,""),d=b.value.toLowerCase().replace(/^\W*/,"");return a.value===b.value?0:cac_selected&&1<=e&&ac_store.autoselectFirstRow()&&(ac_selected=0),0<=ac_selected&&(b=ac_focusedInput,c=ac_completions[ac_selected].value,ac_complete(),ac_store.oncomplete))ac_store.oncomplete(!0,a,b,c)}else{switch(a){case 27:ac_selected=-1;d=!1;break;case 38:b&&(ac_selected=Math.max(0<=e?0:-1,ac_selected-1));break;case 40:b&&(ac_selected=Math.min(e-1,ac_selected+ 1))}if(b)switch(a){case 27:case 13:case 38:case 40:case 39:case 37:case 9:case 16:case 8:case 46:break;default:ac_everTyped=!0}}ac_focusedInput&&ac_updateCompletionList(d)}function _ac_select(a){ac_selected=a;ac_complete();if(ac_store.oncomplete)ac_store.oncomplete(!0,null,ac_focusedInput,ac_focusedInput.value);ac_checkCompletions();ac_updateCompletionList(!0)}function _ac_mouseover(a){ac_selected=a;ac_updateCompletionList(!0)} function ac_complete(){var a=ac_getCaretPosition_(ac_focusedInput),b=ac_completions[ac_selected];ac_focusedInput.value=ac_store.substitute(ac_focusedInput.value,a,ac_lastCompletable,b);a=a-ac_lastCompletable.length+b.value.length;'""'==b.value.substring(b.value.length-2)?a--:":"!=b.value.substring(b.value.length-1)&&a++;ac_selected=-1;ac_lastCompletable=ac_completions=null;ac_everTyped=!1;var b=window,c=ac_focusedInput;IsDefined(c.selectionEnd)&&IsDefined(c.selectionStart)?(c.selectionStart=a,c.selectionEnd= a):b.document.selection&&c.createTextRange&&(b=c.createTextRange(),b.collapse(!0),b.move("character",a),b.select())}var ac_everTyped=!1; function ac_checkCompletions(){if(ac_suppressCompletions)ac_completions=ac_lastCompletable=null,ac_selected=-1;else{var a=ac_getCaretPosition_(ac_focusedInput),a=ac_store.completable(ac_focusedInput.value,a);if(a!=ac_lastCompletable){var b;ac_lastCompletable&&ac_lastCompletable.lengthac_selected&&ac_store&&ac_store.autoselectFirstRow()&&(ac_selected=0);a=[];var c=0;a.push("");for(var d=0;d"),c++;else{var e="onmousedown";-1!=navigator.userAgent.toLowerCase().indexOf("webkit")&&(e="onmouseup");a.push("':">","")}a.push("
"),c&&a.push("
"), a.push(ac_completions[d].heading,"
"," ",ac_completions[d].html);a.push(" ");ac_completions[d].dochtml&&a.push("= ",ac_completions[d].dochtml);a.push("
");b.innerHTML=a.join("");a=nodeBounds(ac_focusedInput); b.style.left=a.x+"px";b.style.top=a.y+a.h+"px";b.style.display="";window.setTimeout(ac_autoscroll,100)}else b&&(b.style.display="none",b.innerHTML="")}function ac_autoscroll(){var a=document.getElementById("ac-list"),b=document.getElementById("ac-selected-row"),c=b?b.offsetTop:0,d=b?b.offsetHeight:0;a&&b&&(ca.scrollTop+a.offsetHeight&&(a.scrollTop=c+d-a.offsetHeight+8))} function ac_preTextToHtml(a){return a.replace(/&/g,"&").replace(/")} function ac_getCaretPosition_(a){if("INPUT"==a.tagName){var b=a.value.length;if(void 0!=a.selectionStart)b=a.selectionEnd,a.id.startsWith("status")&&(b=a.selectionStart);else if(document.selection){var c=document.selection.createRange(),d=c.text.length;c.moveStart("character",-b);b=c.text.length;a.id.startsWith("status")&&(b=c.text.length-d)}return b}return GetCursorPos(window,a)};var DIT_labelStore,DIT_searchStore,DIT_quickEditStore,DIT_exclPrefixes=[],DIT_statusStore,DIT_memberListStore,DIT_ownerStore,DIT_autoCompleteStore,DIT_restrict_to_known,DIT_autoCompleteFeedName;function DIT_fullComplete(a,b){if(!a.startsWith("*"))return null;for(var c=[],d=0;dg.w?(e=b.x-h.w,BR_IsIE()&&(e-=4,f-=2),BR_IsNav()&&(e-=2),BR_IsSafari()&&(e+=-1)):(BR_IsIE()&&(f-=2),BR_IsNav()&&(e+=2),BR_IsSafari()&&(e+=3));a.style.left="-2000px";a.style.position= "absolute";c&&(e+=c);d&&(f+=d);a.style.left=e+"px";a.style.top=f+"px";c=new DIT_MyPopup(a);c.show();return!1}function DIT_closePopup(a){var b=$(a);if(b)for(a=0;ad.y&&e-d.y+c.h<=b.style.top+d.h&&GetWindowPropertyByBrowser_(window,getWindowHeightGetters_)>c.h?("fixed"!=a.style.position&&(a.style.position="fixed",a.style.top="0",BR_IsIE()?a.parentNode.style.paddingRight=c.w+2+"px":a.parentNode.style.minWidth=c.w+"px"),a.style.left=-GetWindowPropertyByBrowser_(window,getScrollLeftGetters_)+ "px"):"relative"!=a.style.position&&(a.style.position="relative",a.style.left="0",BR_IsIE()&&(a.parentNode.style.paddingRight=""))}var DIT_prefsXmlHttp=void 0;function DIT_setPeoplePrefs(a,b,c,d){DIT_prefsXmlHttp=XH_XmlHttpCreate();a=a?"/a/"+a:"";b=a+"/p/"+b+"/people/detailPrefs.do";d="perms_expanded="+c+"&token="+d;c=DIT_prefsXmlHttp;a=DIT_prefsFeedCallback;c.open("POST",b,!0);c.onreadystatechange=a;c.setRequestHeader("Content-Type","application/x-www-form-urlencoded");XH_XmlHttpSend(c,d)} function DIT_prefsFeedCallback(){}function DIT_blurOnEsc(a){27==a.keyCode&&(a.target.blur(),a.preventDefault())};function DIT_selectAllIssues(){DIT_selectIssues(!0)}function DIT_selectNoneIssues(){DIT_selectIssues(!1)}function DIT_selectIssues(a){for(var b=$("resultstable"),c=0;c Remove ';a.appendChild(b);++DIT_nextFileID;16>DIT_nextFileID?$("attachafile").innerHTML="Attach another file":$("attachprompt").style.display= "none";$("attachmaxsize").style.display=""}}function DIT_openIssueUpdateForm(){DIT_showHidden($("makechangesarea"));document.location.hash="makechanges";DIT_forceProperTableWidth();window.setTimeout("document.getElementById('addCommentTextArea').focus();",100)}var DIT_currentPromptIndex=0; function DIT_selectPrompt(a){DIT_showHidden($("prompt_edit_panel"));DIT_currentPromptIndex=a.value;var b=a=$("prompt_text_editor");HasClass(b,"undef")&&(RemoveClass(b,"undef"),b.value="");$("prompt_members_only_checkbox").checked="yes"==$("prompt_members_only_"+DIT_currentPromptIndex).value;$("prompt_summary_editor").value=$("prompt_summary_"+DIT_currentPromptIndex).value;$("prompt_summary_must_be_edited_checkbox").checked="yes"==$("prompt_summary_must_be_edited_"+DIT_currentPromptIndex).value;a.value= $("prompt_text_"+DIT_currentPromptIndex).value;$("prompt_status_editor").value=$("prompt_status_"+DIT_currentPromptIndex).value;$("prompt_owner_editor").value=$("prompt_owner_"+DIT_currentPromptIndex).value;$("owner_defaults_to_member_checkbox").checked="yes"==$("owner_defaults_to_member_"+DIT_currentPromptIndex).value;$("owner_defaults_to_member_area").style.display=$("prompt_owner_editor").value?"none":"";for(a=0;15>a;a++)$("prompt_label_editor"+a).value=$("prompt_label_"+DIT_currentPromptIndex+ "_"+a).value;for(a=b=0;a"!=DIT_promptNames[a]&&b++;1"]/g,"")){for(var c=0;ce;e++)DIT_pushHiddenField(d,"prompt_label_"+c,"prompt_label_"+c+"_"+e);$("adminIssues").innerHTML+=d.join("");DIT_promptNames.push(b);$("prompt_menu").innerHTML+='