mirror of https://github.com/tdwg/dwc.git
148 lines
66 KiB
JavaScript
148 lines
66 KiB
JavaScript
/* 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<d.length;e++)c[e]="args["+e+"]";c="oScope.__applyTemp__.peek()("+c.join(",")+");";a.__applyTemp__||(a.__applyTemp__=[]);a.__applyTemp__.push(this);c=eval(c);a.__applyTemp__.pop();return c});
|
|
Array.prototype.push||(Array.prototype.push=function(a){for(var b=0;b<arguments.length;b++)this[this.length]=arguments[b];return this.length});Array.prototype.pop||(Array.prototype.pop=function(){if(this.length){var a=this[this.length-1];this.length--;return a}});Array.prototype.shift||(Array.prototype.shift=function(){if(0!=this.length){for(var a=this[0],b=0;b<this.length-1;b++)this[b]=this[b+1];this.length--;return a}});
|
|
Array.prototype.unshift||(Array.prototype.unshift=function(a){for(var b=arguments.length,c=this.length-1;0<=c;c--)this[c+b]=this[c];for(c=0;c<b;c++)this[c]=arguments[c];return this.length});Array.prototype.forEach||(Array.prototype.forEach=function(a,b){for(var c=0;c<this.length;c++)a.call(b,this[c],c,this)});
|
|
function bind(a,b,c){var d=a.boundArgs_||[],d=d.concat(Array.prototype.slice.call(arguments,2));"undefined"!=typeof a.boundSelf_&&(b=a.boundSelf_);"undefined"!=typeof a.boundFn_&&(a=a.boundFn_);var e=function(){var c=d.concat(Array.prototype.slice.call(arguments));return a.apply(b,c)};e.boundArgs_=d;e.boundSelf_=b;e.boundFn_=a;return e}Function.prototype.bind=function(a,b){return bind.apply(null,[this,a].concat(Array.prototype.slice.call(arguments,1)))};function DumpError(a){try{throw a;}catch(b){DumpException(b)}}function DumpException(a,b){var c="Javascript exception: "+(b?b:"")+" "+a;BR_IsIE()&&(c+=" "+a.name+": "+a.message+" ("+a.number+")");var d="";if("string"==typeof a)d=a+"\n";else for(var e in a)try{d+=e+": "+a[e]+"\n"}catch(f){}try{d+=DB_GetStackTrace(DumpException.caller)}catch(g){}DB_WriteDebugMsg(c+"\n"+d,1)}var function_name_re_=/function (\w+)/;
|
|
function DB_GetStackTrace(a){try{if(BR_IsNav())return Error().stack;if(!a)return"";var b;var c=function_name_re_.exec(String(a));b=c?c[1]:"";b="- "+b+"(";for(c=0;c<a.arguments.length;c++){0<c&&(b+=", ");var d=String(a.arguments[c]);40<d.length&&(d=d.substr(0,40)+"...");b+=d}b+=")\n";return b+=DB_GetStackTrace(a.caller)}catch(e){return"[Cannot get stack trace]: "+e+"\n"}}
|
|
function DB_WriteDebugMsg(a){"undefined"!=typeof log&&log(a?a.replace(amp_re_,"&").replace(lt_re_,"<").replace(gt_re_,">").replace(quote_re_,"""):"")};function BR_AgentContains_(a){return a in BR_AgentContains_cache_?BR_AgentContains_cache_[a]:BR_AgentContains_cache_[a]=-1!=navigator.userAgent.toLowerCase().indexOf(a)}var BR_AgentContains_cache_={};function BR_IsIE(){return(BR_AgentContains_("msie")||BR_AgentContains_("trident"))&&!window.opera}function BR_IsSafari(){return BR_AgentContains_("safari")||BR_AgentContains_("konqueror")}function BR_IsNav(){return!BR_IsIE()&&!BR_IsSafari()&&BR_AgentContains_("mozilla")}
|
|
var AssertTypeMap={string:String,number:Number,"boolean":Boolean};function HasClass(a,b){if(null==a||null==a.className)return!1;if(a.className==b)return!0;for(var c=a.className.split(" "),d=0;d<c.length;d++)if(c[d]==b)return!0;return!1}function AddClass(a,b){HasClass(a,b)||(a.className+=" "+b)}
|
|
function RemoveClass(a,b){if(null!=a.className)if(a.className==b)a.className="";else{for(var c=a.className.split(" "),d=[],e=!1,f=0;f<c.length;f++)c[f]!=b?c[f]&&d.push(c[f]):e=!0;e&&(a.className=d.join(" "))}}
|
|
var getScrollTopGetters_={ieQuirks_:function(a){return a.document.body.scrollTop},ieStandards_:function(a){return a.document.documentElement.scrollTop},dom_:function(a){return a.pageYOffset}},getScrollLeftGetters_={ieQuirks_:function(a){return a.document.body.scrollLeft},ieStandards_:function(a){return a.document.documentElement.scrollLeft},dom_:function(a){return a.pageXOffset}},getWindowHeightGetters_={ieQuirks_:function(a){return a.document.body.clientHeight},ieStandards_:function(a){return a.document.documentElement.clientHeight},
|
|
dom_:function(a){return a.innerHeight}};function GetWindowPropertyByBrowser_(a,b){try{if(BR_IsSafari())return b.dom_(a);if(!window.opera&&"compatMode"in a.document&&"CSS1Compat"==a.document.compatMode)return b.ieStandards_(a);if(BR_IsIE())return b.ieQuirks_(a)}catch(c){}return b.dom_(a)}var amp_re_=/&/g,lt_re_=/</g,gt_re_=/>/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<a.length;c++)if(a[c]==b)return c;return-1}function IsDefined(a){return"undefined"!=typeof a}function GetKeyCode(a){var b;a.keyCode?b=a.keyCode:a.which&&(b=a.which);return b}function forid_1(a){return document.getElementById(a)}function forid_2(a){return document.all[a]}var forid=document.getElementById?forid_1:forid_2;
|
|
function log(a){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+"::"+a);return}}catch(b){}var c=forid("log");c?(a="<p class=logentry><span class=logdate>"+new Date+"</span><span class=logmsg>"+a+"</span></p>",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<arguments.length;f++)b.push(arguments[f]);return c.apply(a,b)}};var listen;
|
|
(function(){function a(a){null==a.listen_hc_&&(a.listen_hc_=++d);return a.listen_hc_}function b(a){var b=Array.prototype.splice.call(arguments,1,arguments.length);return c[a].listener.apply(null,b)}var c={},d=0;listen=function(d,f,g,h){var k;k=f;var m=g,l=h,n=a(d),m=a(m),l=!!l;k=n+"_"+k+"_"+m+"_"+l;if(k in c)return k;l=b.bind(null,k);c[k]={listener:g,proxy:l,event:f,node:d,useCapture:h};if(d.addEventListener)d.addEventListener(f,l,h);else if(d.attachEvent)d.attachEvent("on"+f,l);else throw Error("Node {"+d+
|
|
"} does not support event listeners.");return k}})();function simpleBindEvent(a,b,c){var d="on"+b;if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent(d,c);else{var e=a[d];a[d]=function(){var a=e.apply(this,arguments),b=c.apply(this,arguments);return void 0==a?b:void 0==b?a:b&&a}}};function Point(a,b,c){this.x=a;this.y=b;this.coordinateFrame=c||null}Point.prototype.toString=function(){return"[P "+this.x+","+this.y+"]"};Point.prototype.clone=function(){return new Point(this.x,this.y,this.coordinateFrame)};function Delta(a,b){this.dx=a;this.dy=b}Delta.prototype.toString=function(){return"[D "+this.dx+","+this.dy+"]"};function Rect(a,b,c,d,e){this.x=a;this.y=b;this.w=c;this.h=d;this.coordinateFrame=e||null}
|
|
Rect.prototype.contains=function(a){return this.x<=a.x&&a.x<this.x+this.w&&this.y<=a.y&&a.y<this.y+this.h};Rect.prototype.toString=function(){return"[R "+this.w+"x"+this.h+"+"+this.x+"+"+this.y+"]"};Rect.prototype.clone=function(){return new Rect(this.x,this.y,this.w,this.h,this.coordinateFrame)};function nodeBounds(a){function b(b){for(var c=a.offsetParent;c&&c.offsetParent;c=c.offsetParent)c.scrollLeft&&(b.x-=c.scrollLeft),c.scrollTop&&(b.y-=c.scrollTop)}if(!a)return null;var c;c=a.ownerDocument&&a.ownerDocument.parentWindow?a.ownerDocument.parentWindow:a.ownerDocument&&a.ownerDocument.defaultView?a.ownerDocument.defaultView:window;if(a.getBoundingClientRect){var d=a.getBoundingClientRect();return new Rect(d.left+GetWindowPropertyByBrowser_(c,getScrollLeftGetters_),d.top+GetWindowPropertyByBrowser_(c,
|
|
getScrollTopGetters_),d.right-d.left,d.bottom-d.top,c)}if(a.ownerDocument&&a.ownerDocument.getBoxObjectFor)return d=a.ownerDocument.getBoxObjectFor(a),c=new Rect(d.x,d.y,d.width,d.height,c),b(c),c;for(var e=d=0,f=a;f.offsetParent;f=f.offsetParent)d+=f.offsetLeft,e+=f.offsetTop;c=new Rect(d,e,a.offsetWidth,a.offsetHeight,c);b(c);return c};var XH_ieProgId_,XH_ACTIVE_X_IDENTS$$inline_67=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
|
|
if("undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var i$$inline_68=0;i$$inline_68<XH_ACTIVE_X_IDENTS$$inline_67.length;i$$inline_68++){var candidate$$inline_69=XH_ACTIVE_X_IDENTS$$inline_67[i$$inline_68];try{new ActiveXObject(candidate$$inline_69);XH_ieProgId_=candidate$$inline_69;break}catch(e$$inline_70){}}if(!XH_ieProgId_)throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed.");}
|
|
function XH_XmlHttpCreate(){return XH_ieProgId_?new ActiveXObject(XH_ieProgId_):new XMLHttpRequest}function XH_XmlHttpGET(a,b,c){a.open("GET",b,!0);a.onreadystatechange=c;XH_XmlHttpSend(a,null)}function XH_XmlHttpSend(a,b){try{a.send(b)}catch(c){throw log("XMLHttpSend failed "+c.toString()+"<br>"+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_storeConstructors.length;++g){var h=ac_storeConstructors[g](b,a);if(h){ac_store=h;ac_oldBlurHandler=ac_addHandler_(ac_focusedInput,"onblur",_ac_ob);f=!0;break}}f||_ac_ob(null)}if(f){b=ac_store.isCompletionKey(c,
|
|
d,e);f=ac_completions&&0<ac_completions.length;g=!1;if(b&&f)g=!ac_suppressCompletions&&!!ac_completions&&-1!=ac_selected,window.setTimeout(function(){ac_store&&ac_handleKey_(c,d,e)},0);else if(!b)g=27==c||40==c||38==c,window.setTimeout(function(){ac_store&&ac_handleKey_(c,d,e)},0);else if(ac_store.oncomplete)ac_store.oncomplete(!1,c,ac_focusedInput,void 0);g&&ac_cancelEvent_(a);return!g}}return!0}function _ac_ob(a){-1==navigator.userAgent.toLowerCase().indexOf("webkit")&&_ac_real_onblur(a)}
|
|
function _ac_real_onblur(){ac_focusedInput&&(ac_focusedInput.onblur=ac_oldBlurHandler);ac_focusedInput=ac_store=null;ac_everTyped=!1;ac_oldBlurHandler=null;ac_suppressCompletions=!1;ac_updateCompletionList(!1)}function _ac_fake_onblur(a){var b;a||(a=window.event);a.target?b=a.target:a.srcElement&&(b=a.srcElement);3==b.nodeType&&(b=b.parentNode);"INPUT"!=b.nodeName&&_ac_real_onblur(a)}function _AC_Store(){}_AC_Store.prototype.completable=function(){alert("UNIMPLEMENTED completable")};
|
|
_AC_Store.prototype.completions=function(){alert("UNIMPLEMENTED completions")};_AC_Store.prototype.oncomplete=function(a,b,c){if(c.onkeyup)c.onkeyup(void 0)};_AC_Store.prototype.substitute=function(){alert("UNIMPLEMENTED substitute")};_AC_Store.prototype.commaCompletes=!0;_AC_Store.prototype.isCompletionKey=function(a,b){return!b&&(13===a||44==a&&this.commaCompletes)?!0:!1};
|
|
function _AC_AddItemToFirstCharMap(a,b,c){var d=a[b];if(!d)d=a[b]=[];else if(d[d.length-1].value==c)return;d.push(new _AC_Completion(c,null,""))}function _AC_SimpleStore(a){this.firstCharMap_={};for(var b=0;b<a.length;++b){var c=a[b];if(c){_AC_AddItemToFirstCharMap(this.firstCharMap_,c.charAt(0).toLowerCase(),c);for(var d=c.split(/\W+/),e=0;e<d.length;++e)d[e]&&_AC_AddItemToFirstCharMap(this.firstCharMap_,d[e].charAt(0).toLowerCase(),c)}}this.countThreshold=2500;this.docstrings={}}
|
|
_AC_SimpleStore.prototype=new _AC_Store;_AC_SimpleStore.prototype.constructor=_AC_SimpleStore;_AC_SimpleStore.prototype.completable=function(a,b){for(var c=0,d=0,e=0;e<b;++e){var f=a.charAt(e);switch(d){case 0:if('"'==f)d=1;else if(","==f||" "==f)c=e+1;break;case 1:'"'==f&&(d=0)}}for(;c<b&&0<=" \t\r\n".indexOf(a.charAt(c));)++c;return a.substring(c,b)};
|
|
_AC_SimpleStore.prototype.completions=function(a,b){if(!a)return[];if(null==b||0==b.length)b=this.firstCharMap_[a.charAt(0).toLowerCase()];var c=/([\^*+\-\$\\\{\}\(\)\[\]\#?\.])/g,c=a.replace(c,"\\$1"),c="^(.*[-=:,])?("+c+")(.*)",c=new RegExp(c,"i"),d=[];if(b)for(var e=b.length,f=0;f<e;++f){var g=b[f].value.match(c);if(g&&(g=ac_preTextToHtml(g[1]||"")+"<b>"+ac_preTextToHtml(g[2])+"</b>"+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:c<d?-1:1}_AC_SimpleStore.prototype.substitute=function(a,b,c,d){return a.substring(0,b-c.length)+d.value+", "+a.substring(b)};function _AC_Completion(a,b,c){this.value=a;this.html=b;this.dochtml=ac_preTextToHtml(c)}
|
|
_AC_Completion.prototype.toString=function(){return"(AC_Completion: "+this.value+")"};var ac_storeConstructors=[],ac_focusedInput=null,ac_store=null,ac_oldBlurHandler=null,ac_suppressCompletions=!1,ac_lastCompletable=null,ac_completions=null,ac_selected=-1;
|
|
function ac_handleKey_(a,b,c){ac_checkCompletions();var d=!0,e=ac_completions?ac_completions.length:0;if(ac_store.isCompletionKey(a,b,c)){if(0>ac_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.length<a.length&&a.substring(0,ac_lastCompletable.length)==ac_lastCompletable?b=ac_completions:(ac_completions=null,ac_selected=-1);var c=0<=ac_selected?ac_completions[ac_selected].value:null;ac_completions=ac_store.completions(a,
|
|
b);ac_selected=-1;for(b=0;b<ac_completions.length;++b)if(c==ac_completions[b].value){ac_selected=b;break}ac_lastCompletable=a}}}
|
|
function ac_updateCompletionList(a){var b=document.getElementById("ac-list");if(a&&ac_completions&&ac_completions.length){b||(b=document.createElement("DIV"),b.id="ac-list",b.style.position="absolute",b.style.display="none",document.body.appendChild(b));0>ac_selected&&ac_store&&ac_store.autoselectFirstRow()&&(ac_selected=0);a=[];var c=0;a.push("<table cellpadding=0 cellspacing=0>");for(var d=0;d<ac_completions.length;++d)if(ac_completions[d].heading)a.push("<tr><th colspan=2>"),c&&a.push("<br/>"),
|
|
a.push(ac_completions[d].heading,"</th></tr>"),c++;else{var e="onmousedown";-1!=navigator.userAgent.toLowerCase().indexOf("webkit")&&(e="onmouseup");a.push("<tr ",e,'="try{_acse(',d,')}finally{return false}"','onmouseover="_acmo(',d,')"',d==ac_selected?' id="ac-selected-row" class=selected>':">","<td>"," ",ac_completions[d].html);a.push("</td><td> ");ac_completions[d].dochtml&&a.push("= ",ac_completions[d].dochtml);a.push("</td></tr>")}a.push("</table>");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&&(c<a.scrollTop?a.scrollTop=c-8:c+d+8>a.scrollTop+a.offsetHeight&&(a.scrollTop=c+d-a.offsetHeight+8))}
|
|
function ac_preTextToHtml(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/\"/g,""").replace(/ /g," ").replace(/\r\n?|\n/g,"<br>")}
|
|
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;d<b.length;d++)c.push(new _AC_Completion(b[d].name,ac_preTextToHtml(b[d].name),b[d].doc));return c}var DIT_statusWords=[];
|
|
function DIT_setUpStatusStore(a,b){var c={};DIT_statusWords=[];for(var d=0;d<a.length;d++){var e=a[d];DIT_statusWords.push(e.name);c[e.name]=e.doc}for(d=0;d<b.length;d++)e=b[d],DIT_statusWords.push(e.name),c[e.name]=e.doc;DIT_statusStore=new _AC_SimpleStore(DIT_statusWords);DIT_statusStore.docstrings=c;DIT_statusStore.commaCompletes=!1;DIT_statusStore.substitute=function(a,b,c,d){return d.value};DIT_statusStore.completable=function(a){return ac_everTyped?a:"*status"};DIT_statusStore.completions=function(c,
|
|
d){var e;e=a;var k=b;if(c.startsWith("*")){var m=[];m.push({heading:"Open Statuses:"});for(var l=0;l<e.length;l++)m.push(new _AC_Completion(e[l].name,ac_preTextToHtml(e[l].name),e[l].doc));m.push({heading:"Closed Statuses:"});for(l=0;l<k.length;l++)m.push(new _AC_Completion(k[l].name,ac_preTextToHtml(k[l].name),k[l].doc));e=m}else e=null;return e?e:_AC_SimpleStore.prototype.completions.call(this,c,d)}}function DIT_addACItem(a,b,c,d){a.push(c);b[c]=d}
|
|
function DIT_addACItemList(a,b,c,d,e,f){for(var g,h=0;h<d.length;h++){var k=d[h];g=c+k.name;e&&(g=g.slice(0,1)+g.slice(1).replace(e,f));DIT_addACItem(a,b,g,k.doc)}}
|
|
function DIT_setUpSearchStore(a,b,c,d){for(var e=[],f={},g=[],h=[],k=0;k<a.length;k++){var m=a[k];-1==m.name.indexOf("-")?h.push(m):g.push(m)}DIT_addACItemList(e,f,"",g,"-","=");DIT_addACItemList(e,f,"-",g,"-","=");DIT_addACItemList(e,f,"label:",h);DIT_addACItemList(e,f,"-label:",h);"issueOptions"==DIT_autoCompleteFeedName&&(DIT_addACItem(e,f,"owner:me","Issues owned by me"),DIT_addACItem(e,f,"-owner:me","Issues not owned by me"),DIT_addACItem(e,f,"cc:me","Issues that CC me"),DIT_addACItem(e,f,"-cc:me",
|
|
"Issues that don't CC me"),DIT_addACItem(e,f,"reporter:me","Issues I reported"),DIT_addACItem(e,f,"-reporter:me","Issues reported by others"),DIT_addACItemList(e,f,"owner:",b),DIT_addACItemList(e,f,"-owner:",b),DIT_addACItemList(e,f,"cc:",b),DIT_addACItemList(e,f,"-cc:",b),DIT_addACItemList(e,f,"reporter:",b),DIT_addACItemList(e,f,"-reporter:",b),DIT_addACItemList(e,f,"status:",c),DIT_addACItemList(e,f,"-status:",c),DIT_addACItemList(e,f,"status:",d),DIT_addACItemList(e,f,"-status:",d));DIT_addACItem(e,
|
|
f,"is:starred","Starred by me");DIT_addACItem(e,f,"-is:starred","Not starred by me");DIT_addACItem(e,f,"summary:","Search within the summary field");"issueOptions"==DIT_autoCompleteFeedName?(DIT_addACItem(e,f,"commentby:me","Issues that I commented on"),DIT_addACItem(e,f,"-commentby:me","Issues that I didn't comment on"),DIT_addACItemList(e,f,"commentby:",b),DIT_addACItem(e,f,"attachment:","Search within attachment names"),DIT_addACItem(e,f,"is:open","Issues that are open"),DIT_addACItem(e,f,"-is:open",
|
|
"Issues that are closed"),DIT_addACItem(e,f,"has:owner","Issues with some owner"),DIT_addACItem(e,f,"-has:owner","Issues with no owner"),DIT_addACItem(e,f,"has:attachment","Issues with some attachments"),DIT_addACItem(e,f,"id:1,2,3","Match only the specified issues"),a=new Date,a=a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate(),DIT_addACItem(e,f,"opened-after:today-1","Opened within the last N days"),DIT_addACItem(e,f,"opened-after:"+a,"Opened after the specified date"),DIT_addACItem(e,f,"opened-before:today-1",
|
|
"Opened more than N days ago"),DIT_addACItem(e,f,"opened-before:"+a,"Opened before the specified date"),DIT_addACItem(e,f,"modified-after:today-1","Modified within the last N days"),DIT_addACItem(e,f,"modified-after:"+a,"Modified after the specified date"),DIT_addACItem(e,f,"modified-before:today-1","Modified more than N days ago"),DIT_addACItem(e,f,"modified-before:"+a,"Modified before the specified date"),DIT_addACItem(e,f,"closed-after:today-1","Closed within the last N days"),DIT_addACItem(e,
|
|
f,"closed-after:"+a,"Closed after the specified date"),DIT_addACItem(e,f,"closed-before:today-1","Closed more than N days ago"),DIT_addACItem(e,f,"closed-before:"+a,"Closed before the specified date")):"wikiOptions"==DIT_autoCompleteFeedName?(DIT_addACItem(e,f,"pagename:","Search with page names"),DIT_addACItem(e,f,"commentby:me","Pages that I commented on"),DIT_addACItem(e,f,"changedby:","Last changed by the specified user")):"downloadOptions"==DIT_autoCompleteFeedName&&(DIT_addACItem(e,f,"filename:",
|
|
"Search within file names"),DIT_addACItem(e,f,"uploadedby:","Files uploaded by the specified user"));DIT_searchStore=new _AC_SimpleStore(e);DIT_searchStore.docstrings=f;DIT_searchStore.substitute=function(a,b,c,d){for(var e=b;" "!=a.charAt(e)&&e<a.length;)e++;for(;" "==a.charAt(e)&&e<a.length;)e++;return a.substring(0,b-c.length)+d.value+" "+a.substring(e)};DIT_searchStore.autoselectFirstRow=function(){return!1}}
|
|
function DIT_setUpQuickEditStore(a,b,c,d){for(var e=[],f={},g=[],h=[],k=0;k<a.length;k++){var m=a[k];-1==m.name.indexOf("-")?h.push(m):g.push(m)}DIT_addACItemList(e,f,"",g,"-","=");DIT_addACItemList(e,f,"-",g,"-","=");DIT_addACItemList(e,f,"",h);DIT_addACItemList(e,f,"-",h);DIT_addACItem(e,f,"owner=me","Make me the owner");DIT_addACItem(e,f,"owner=---","Clear the owner field");DIT_addACItem(e,f,"cc=me","CC me on this issue");DIT_addACItem(e,f,"cc=-me","Remove me from CC list");DIT_addACItemList(e,
|
|
f,"owner=",b);DIT_addACItemList(e,f,"cc=",b);DIT_addACItemList(e,f,"cc=-",b);DIT_addACItemList(e,f,"status=",c);DIT_addACItemList(e,f,"status=",d);DIT_addACItem(e,f,'summary=""',"Set the summary field");DIT_quickEditStore=new _AC_SimpleStore(e);DIT_quickEditStore.docstrings=f;DIT_quickEditStore.substitute=function(a,b,c,d){for(var e=b;" "!=a.charAt(e)&&e<a.length;)e++;for(;" "==a.charAt(e)&&e<a.length;)e++;return a.substring(0,b-c.length)+d.value+" "+a.substring(e)}}
|
|
function DIT_setUpMemberStore(a){for(var b=[],c={},d=0;d<a.length;d++){var e=a[d];b.push(e.name);c[e.name]=e.doc}DIT_memberListStore=new _AC_SimpleStore(b);DIT_memberListStore.docstrings=c;DIT_memberListStore.completions=function(b,c){var d=DIT_fullComplete(b,a);return d?d:_AC_SimpleStore.prototype.completions.call(this,b,c)};DIT_memberListStore.completable=function(a,b){return""==a?"*member":_AC_SimpleStore.prototype.completable.call(this,a,b)};DIT_ownerStore=new _AC_SimpleStore(b);DIT_ownerStore.docstrings=
|
|
c;DIT_ownerStore.commaCompletes=!1;DIT_ownerStore.substitute=function(a,b,c,d){return d.value};DIT_ownerStore.completions=function(b,c){var d=DIT_fullComplete(b,a);return d?d:_AC_SimpleStore.prototype.completions.call(this,b,c)};DIT_ownerStore.completable=function(a){return ac_everTyped?a:"*owner"}}var DIT_labelWords=[];
|
|
function DIT_setUpLabelStore(a){DIT_labelWords=[];for(var b={},c=0;c<a.length;c++){var d=a[c];DIT_labelWords.push(d.name);b[d.name]=d.doc}DIT_labelStore=new _AC_SimpleStore(DIT_labelWords);DIT_labelStore.docstrings=b;DIT_labelStore.commaCompletes=!1;DIT_labelStore.substitute=function(a,b,c,d){return d.value};DIT_labelStore.completable=function(a,b){if(0==b)return"*label";for(var c=0,d=b;0<=--d;){var k=a.charAt(d);if(" "==k||","==k){c=d+1;break}}d=a.indexOf("?");0<=d&&(a=a.substring(c,d));d=a.substring(c,
|
|
b);a.startsWith("Restrict-")&&(d=a,8<a.lastIndexOf("-")&&(d=a.substring(c,Math.min(b,a.lastIndexOf("-")))));return d};DIT_labelStore.completions=function(b,c){var d=DIT_fullComplete(b,a);null==d&&(d=_AC_SimpleStore.prototype.completions.call(this,b,c));for(var h=[],k=0;k<d.length;k++){var m=d[k],l=m.value.split("-"),n=l[0].toLowerCase();if(m.value.startsWith("Restrict-")){if(!b.toLowerCase().startsWith("r"))continue;1<l.length&&(n+="-"+l[1].toLowerCase())}var l=-1!=FindInArray(DIT_exclPrefixes,n),
|
|
p=void 0==DIT_usedPrefixes[n]||0==DIT_usedPrefixes[n].length;if(!l||p||1==DIT_usedPrefixes[n].length&&DIT_usedPrefixes[n][0]==ac_focusedInput){var n=!0,q;for(q in DIT_usedPrefixes)for(l=DIT_usedPrefixes[q],p=0;p<l.length;p++){var r=l[p];r.value.toLowerCase()==m.value.toLowerCase()&&r!=ac_focusedInput&&(n=!1)}n&&h.push(m)}}return h}}
|
|
function DIT_setUpAutoCompleteStore(a){DIT_autoCompleteStore=new _AC_SimpleStore(a);for(var b=[],c=0;c<a.length;++c)b.push({name:a[c],doc:""});DIT_autoCompleteStore.completions=function(a,c){if(18<a.length)return[];var f=DIT_fullComplete(a,b);null==f&&(f=_AC_SimpleStore.prototype.completions.call(this,a,c));for(var g={},h=document.getElementsByTagName("input"),k=0;k<h.length;++k)HasClass(h[k],"autocomplete")&&(g[h[k].value]=!0);h=[];for(k=0;k<f.length;++k)g[f[k].value]||h.push(f[k]);return h};DIT_autoCompleteStore.completable=
|
|
function(a){return""==a?"*ac":a};DIT_autoCompleteStore.substitute=function(a,b,c,g){return g.value};DIT_autoCompleteStore.commaCompletes=!1}function DIT_fetchOptions(a){DIT_autoCompleteFeedName=a;DIT_fetchOptionsInternal(CS_env.projectHomeUrl+"/feeds/"+a)}function DIT_fetchSiteOptions(a){DIT_autoCompleteFeedName=a="projectLabels";DIT_fetchOptionsInternal(CS_env.relativeBaseUrl+"/hosting/feeds/"+a)}
|
|
function DIT_fetchOptionsInternal(a){var b=XH_XmlHttpCreate();XH_XmlHttpGET(b,a,function(){4==b.readyState&&200==b.status&&DIT_gotOptionsFeed(b.responseText)})}
|
|
function DIT_gotOptionsFeed(a){_d=null;a=a.substring(5);try{eval("_d="+a)}catch(b){return}DIT_setUpStatusStore(_d.open,_d.closed);DIT_setUpSearchStore(_d.labels,_d.members,_d.open,_d.closed);DIT_setUpQuickEditStore(_d.labels,_d.members,_d.open,_d.closed);DIT_setUpLabelStore(_d.labels);DIT_setUpMemberStore(_d.members);DIT_exclPrefixes=_d.excl_prefixes;DIT_prepLabelAC(DIT_labelFieldIDPrefix);DIT_restrict_to_known=_d.strict};function DIT_showBelow(a,b,c,d,e){var f=$(a),g=nodeBounds(b),h=g.x,g=g.y+g.h;BR_IsIE()&&(--h,g-=2);BR_IsSafari()&&(h+=1);f.style.display="block";f.style.left="-2000px";if("pop__dot"==a||"redoMenu"==a)h=h-f.offsetWidth+b.offsetWidth;c&&(h+=c);d&&(g+=d);f.style.left=h+"px";f.style.top=g+"px";a=new DIT_MyPopup(f,e);a.show();return!1}
|
|
function DIT_showRight(a,b,c,d){a=$(a);b=nodeBounds(b);var e=b.x+b.w,f=b.y,g=document.documentElement.clientWidth,h=document.documentElement.clientHeight,g={w:(window.innerWidth||g&&0<g?g:document.body.clientWidth)||1,h:(window.innerHeight||h&&0<h?h:document.body.clientHeight)||1};a.style.display="block";h=nodeBounds(a);e+h.w>g.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;a<gPopupController.activePopups_.length;++a)if(b===gPopupController.activePopups_[a]._div){b=gPopupController.activePopups_[a];b.hide();gPopupController.activePopups_.splice(a,1);break}}var DIT_allColumnNames=[];
|
|
function DIT_closeAllPopups(a){for(var b=0;b<DIT_allColumnNames.length;b++)DIT_closePopup("pop_"+b),DIT_closePopup("filter_"+b);DIT_closePopup("pop__dot");DIT_closePopup("redoMenu");RemoveClass(a,"hover");return!1}function DIT_closeSubmenus(){for(var a=0;a<DIT_allColumnNames.length;a++)DIT_closePopup("filter_"+a);return!1}function DIT_showHidden(a){for(;a;){if(HasClass(a,"closed"))return RemoveClass(a,"closed"),AddClass(a,"opened"),!1;if(HasClass(a,"opened"))return!1;a=a.parentNode}}
|
|
function DIT_toggleColumn(a){var b=$("colcontrol");HasClass(b,a)?RemoveClass(b,a):AddClass(b,a);return!1}function DIT_toggleRows(a){var b=$("colcontrol");AddClass(b,"hide_pri_groups");AddClass(b,"hide_mile_groups");AddClass(b,"hide_stat_groups");DIT_toggleColumn(a);return!1}var DIT_lastRolloverRow=void 0;function DIT_rowRolloverOn(a){DIT_lastRolloverRow&&DIT_rowRolloverOff(DIT_lastRolloverRow);AddClass(a,"hover");DIT_lastRolloverRow=a;return!1}
|
|
function DIT_rowRolloverOff(a){RemoveClass(a,"hover");return!1}function DIT_MyPopup(a,b){this._div=a;this._launcher=b;this._isVisible=!1}DIT_MyPopup.prototype.show=function(){this._div.style.display="block";this._isVisible=!0;a:{PC_assertIsPopup(this);for(var a=0;a<gPopupController.activePopups_.length;++a)if(this===gPopupController.activePopups_[a])break a;gPopupController.activePopups_.push(this)}};DIT_MyPopup.prototype.hide=function(){this._div.style.display="none";this._isVisible=!1};
|
|
DIT_MyPopup.prototype.deactivate=function(a){if(this._isVisible){var b=0,c=0;if(a.pageX||a.pageY)b=a.pageX,c=a.pageY;else if(a.clientX||a.clientY)b=a.target?a.target:a.srcElement,c=b.ownerDocument&&b.ownerDocument.parentWindow?b.ownerDocument.parentWindow:window,b=a.clientX+GetWindowPropertyByBrowser_(c,getScrollLeftGetters_),c=a.clientY+GetWindowPropertyByBrowser_(c,getScrollTopGetters_);a=new Point(b,c,window);if(nodeBounds(this._div).contains(a))return!1;if(this._launcher&&nodeBounds(this._launcher).contains(a))return this._launcher=
|
|
null,!1;this.hide()}return!0};var DIT_rowToHighlight=void 0;function DIT_highlightRow(a){DIT_rowToHighlight=a;window.setTimeout("_highlightRowCallback()",10);return!1}function DIT_highlightRowCallback(){for(var a=DIT_rowToHighlight,b=a.checked;a&&"TR"!=a.tagName;)a=a.parentNode;b?AddClass(a,"selected"):RemoveClass(a,"selected")}function DIT_floatMetadata(){var a=$("meta-float"),b=$("meta-container");simpleBindEvent(window,"scroll",function(){DIT_floatVertically(a,b)})}
|
|
function DIT_floatVertically(a,b){var c=nodeBounds(a),d=nodeBounds(b),e=GetWindowPropertyByBrowser_(window,getScrollTopGetters_);a.style.width||(a.style.width=c.w+"px");e>d.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<b.rows.length;++c){var d=b.rows[c],e=d.cells[0];if("TD"==e.tagName)for(var f=0;f<e.childNodes.length;++f){var g=e.childNodes[f];"INPUT"==g.tagName&&"checkbox"==g.type&&(g.checked=a?"checked":"",a?AddClass(d,"selected"):RemoveClass(d,"selected"))}}}var DIT_nextFileID=1;
|
|
function DIT_addAttachmentFields(a){if(!(16<=DIT_nextFileID)){a=$(a);a.style.marginTop="4px";var b=document.createElement("div");b.innerHTML='<input type="file" name="file'+DIT_nextFileID+'" size=35 style="width:auto;margin-left:17px"> <a style="font-size:x-small" href="#" onclick="this.parentNode.parentNode.removeChild(this.parentNode); return false">Remove</a> ';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.length;a++)"<DELETED>"!=DIT_promptNames[a]&&b++;1<b?$("delbtn").disabled="":$("delbtn").disabled="disabled"}var DIT_promptNames=[];
|
|
function DIT_newPrompt(){var a=DIT_promptNames.length,b=prompt("Name of new template?","");if(b=b.replace(/[&<>"]/g,"")){for(var c=0;c<DIT_promptNames.length;c++)if(b==DIT_promptNames[c]){alert("Please choose a unique name.");return}var c=a,d=[];DIT_pushHiddenField(d,"prompt_name_"+c,"prompt_name_"+c,b);DIT_pushHiddenField(d,"prompt_members_only_"+c);DIT_pushHiddenField(d,"prompt_summary_"+c);DIT_pushHiddenField(d,"prompt_summary_must_be_edited_"+c);DIT_pushHiddenField(d,"prompt_text_"+c);DIT_pushHiddenField(d,
|
|
"prompt_status_"+c);DIT_pushHiddenField(d,"prompt_owner_"+c);DIT_pushHiddenField(d,"owner_defaults_to_member_"+c,"yes");DIT_pushHiddenField(d,"prompt_members_only_"+c);for(var e=0;15>e;e++)DIT_pushHiddenField(d,"prompt_label_"+c,"prompt_label_"+c+"_"+e);$("adminIssues").innerHTML+=d.join("");DIT_promptNames.push(b);$("prompt_menu").innerHTML+='<option value="'+a+'" selected=selected>'+b+"</select>";$("default_prompt_for_developers").innerHTML+='<option value="'+b+'">'+b+"</select>";$("default_prompt_for_users").innerHTML+=
|
|
'<option value="'+b+'">'+b+"</select>";DIT_selectPrompt($("prompt_menu"))}}function DIT_pushHiddenField(a,b,c,d){a.push('<input type=hidden name="',b,'"',' id="',c||b,'"',' value="',d||"",'"/>')}
|
|
function DIT_deletePrompt(){DIT_promptNames.splice(DIT_currentPromptIndex,1,"<DELETED>");$("prompt_name_"+DIT_currentPromptIndex).value="<DELETED>";_toggleHidden($("prompt_edit_panel"));$("delbtn").disabled="disabled";for(var a=[],b=0;b<DIT_promptNames.length;b++)"<DELETED>"!=DIT_promptNames[b]&&a.push("<option value="+b,">",DIT_promptNames[b],"</option>");$("prompt_menu").innerHTML=a.join("");DIT_rebuildDefaultPromptMenu("default_prompt_for_developers");DIT_rebuildDefaultPromptMenu("default_prompt_for_users")}
|
|
function DIT_rebuildDefaultPromptMenu(a){for(var b=$(a).value,c=[],d=0;d<DIT_promptNames.length;d++)"<DELETED>"!=DIT_promptNames[d]&&(c.push('<option value="',DIT_promptNames[d],'"'),b==DIT_promptNames[d]&&c.push(' selected="selected"'),c.push(">",DIT_promptNames[d],"</option>"));$(a).innerHTML=c.join("")}
|
|
function DIT_switchPrompt(a,b,c){var d=!0;DIT_isDirty&&(d=confirm("Switching to a different template will lose the text you entered."));d&&(a=a?"/a/"+a:"",window.location=a+"/p/"+b+"/issues/entry?template="+c)}
|
|
function DIT_savePrompt(){if(DIT_currentPromptIndex){$("prompt_members_only_"+DIT_currentPromptIndex).value=$("prompt_members_only_checkbox").checked?"yes":"";$("prompt_summary_"+DIT_currentPromptIndex).value=$("prompt_summary_editor").value;$("prompt_summary_must_be_edited_"+DIT_currentPromptIndex).value=$("prompt_summary_must_be_edited_checkbox").checked?"yes":"";$("prompt_text_"+DIT_currentPromptIndex).value=$("prompt_text_editor").value;$("prompt_status_"+DIT_currentPromptIndex).value=$("prompt_status_editor").value;
|
|
$("prompt_owner_"+DIT_currentPromptIndex).value=$("prompt_owner_editor").value;$("owner_defaults_to_member_"+DIT_currentPromptIndex).value=$("owner_defaults_to_member_checkbox").checked?"yes":"";$("owner_defaults_to_member_area").style.display=$("prompt_owner_editor").value?"none":"";for(var a=0;15>a;a++)$("prompt_label_"+DIT_currentPromptIndex+"_"+a).value=$("prompt_label_editor"+a).value}}
|
|
function DIT_toggleStar(a,b,c,d,e){var f=-1!=a.src.indexOf("star_off.gif")?1:0;a.src=f?"//ssl.gstatic.com/codesite/ph/images/star_on.gif":"//ssl.gstatic.com/codesite/ph/images/star_off.gif";a=d;DIT_starXmlHttp=XH_XmlHttpCreate();b=b?"/a/"+b:"";e=b+"/p/"+c+"/issues/setstar.do?alt=js&issueid="+a+"&starred="+f+"&cd="+(new Date).getTime()+"&token="+e;XH_XmlHttpGET(DIT_starXmlHttp,e,DIT_setStarCallback)}
|
|
function DIT_syncStarIcons(a,b){var c=document.getElementById(b);c&&(c.src=a.src);if(c=document.getElementById("vote_feedback"))c.innerHTML=-1!=a.src.indexOf("off.gif")?"Vote for this issue and get email change notifications.":"Your vote has been recorded."}function DIT_IssueMigrationValidator(a,b){this.id=a;this.target=b;this.responseTarget=$("derived_labels_target");this.oldValue=b.value}
|
|
DIT_IssueMigrationValidator.prototype.getDerivedLabels=function(){var a=XH_XmlHttpCreate(),b=CS_env.projectHomeUrl+"/feeds/issueDerivedLabels?id="+this.id+"&project_name="+this.target.value+"&token="+CS_env.token,c=this.responseTarget;XH_XmlHttpGET(a,b,function(){if(4==a.readyState&&200==a.status){var b=eval("("+a.responseText+")");showIssueMigrationResults(b,c)}})};
|
|
function showIssueMigrationResults(a,b){b.innerHTML="";if(null==a.error){var c=a.derived_labels;if(!(0>=c.length)){var d=createSpanWithClassText("result_title","Derived labels: ");b.appendChild(d);for(d=0;d<c.length;d++){var e=createSpanWithClassText("result_item label",c[d]);b.appendChild(e)}}}else d=createSpanWithClassText("error_title fielderror",a.error+" "),b.appendChild(d),c=createSpanWithClassText("error_msg error fielderror",a.details),b.appendChild(c)}
|
|
function createSpanWithClassText(a,b){var c=document.createElement("span");c.setAttribute("class",a);c.appendChild(document.createTextNode(b));return c}DIT_IssueMigrationValidator.prototype.pollForChange=function(){var a=this.target.value;""==a||null==a?this.responseTarget.innerHTML="":a!=this.oldValue&&this.getDerivedLabels();this.oldValue=a};function DIT_attachIssueMigrationValidator(a,b){var c=$(a),d=new DIT_IssueMigrationValidator(b,c);window.setInterval(function(){d.pollForChange()},800)}
|
|
var DIT_starXmlHttp=void 0;function DIT_setStarCallback(){4==DIT_starXmlHttp.readyState&&200==DIT_starXmlHttp.status&&DIT_gotSetStar(DIT_starXmlHttp.responseText)}function DIT_gotSetStar(a){_d=null;try{eval("_d="+a)}catch(b){return alert("DIT: error parsing response of issue starring"),null}}function DIT_toggleStarLocal(a,b){var c=-1!=a.src.indexOf("star_off.gif")?1:0;a.src=c?"//ssl.gstatic.com/codesite/ph/images/star_on.gif":"//ssl.gstatic.com/codesite/ph/images/star_off.gif";$(b).value=""+c}
|
|
var DIT_isDirty=!1;function DIT_dirty(){DIT_isDirty=!0}function DIT_confirmDiscardUpdate(a){if(!DIT_isDirty||confirm("Discard your changes?"))document.location=a}function DIT_confirmDiscardEntry(){if(!DIT_isDirty||confirm("Discard your changes?"))document.location="list"}
|
|
function DIT_exposeExistingLabelFields(a){($("label"+a+"3").value||$("label"+a+"4").value||$("label"+a+"5").value)&&$("addrow1")&&(_showID(a+"row2"),_hideID("addrow1"));if($("label"+a+"6").value||$("label"+a+"7").value||$("label"+a+"8").value)_showID(a+"row3"),_hideID("addrow2");if($("label"+a+"9").value||$("label"+a+"10").value||$("label"+a+"11").value)_showID(a+"row4"),_hideID("addrow3");if($("label"+a+"12").value||$("label"+a+"13").value||$("label"+a+"14").value)_showID(a+"row5"),_hideID("addrow4");
|
|
if($("label"+a+"15").value||$("label"+a+"16").value||$("label"+a+"17").value)_showID(a+"row6"),_hideID("addrow5");if($("label"+a+"18").value||$("label"+a+"19").value||$("label"+a+"20").value)_showID(a+"row7"),_hideID("addrow6");if($("label"+a+"21").value||$("label"+a+"22").value||$("label"+a+"23").value)_showID(a+"row8"),_hideID("addrow7")}var DIT_firstEvent=!0;
|
|
function DIT_clearOnFirstEvent(){if(DIT_firstEvent){DIT_firstEvent=!1;var a=$("summary"),b;b=$("summary").value;b=b.match(/^(\[[^\]]+\])+|^(\S+:\s*)+/);null==b?b="":(b=b[0]," "!=b.substr(b.length-1)&&(b+=" "));a.value=b}}var DIT_novelStatuses=[],DIT_novelLabels=[];
|
|
function DIT_confirmNovelStatus(a){for(var b=a.value.trim().toLowerCase(),c=""!==b,d=DIT_statusWords,e=0;e<d.length&&c;++e){var f=d[e];b==f.toLowerCase()&&(c=!1)}c?(-1==DIT_novelStatuses.indexOf(a)&&DIT_novelStatuses.push(a),AddClass(a,"novel"),AddClass(a,"hasfocus")):(-1!=DIT_novelStatuses.indexOf(a)&&DIT_novelStatuses.splice(DIT_novelStatuses.indexOf(a),1),RemoveClass(a,"novel"));DIT_updateConfirmBeforeSubmit();return!0}
|
|
function DIT_confirmNovelLabel(a){var b=a.value.trim().toLowerCase();0==b.search("-")&&(b=b.substr(1));var c=""!==b;-1<b.indexOf("?")&&(c=!1);for(var d=DIT_labelWords,e=0;e<d.length&&c;++e){var f=d[e];b==f.toLowerCase()&&(c=!1)}c?(-1==DIT_novelLabels.indexOf(a)&&DIT_novelLabels.push(a),AddClass(a,"novel"),AddClass(a,"hasfocus")):(-1!=DIT_novelLabels.indexOf(a)&&DIT_novelLabels.splice(DIT_novelLabels.indexOf(a),1),RemoveClass(a,"novel"));DIT_updateConfirmBeforeSubmit();return!0}
|
|
var DIT_usedPrefixes={},DIT_labelFieldIDPrefix="";function DIT_prepLabelAC(a){for(var b=0;24>b;b++)DIT_validateLabel($(a+b))}var DIT_labelsBlockingSubmit=[];
|
|
function DIT_validateLabel(a){if(void 0!=a){DIT_confirmNovelLabel(a);var b=a;if(void 0!=b.oldPrefix){for(var c=DIT_usedPrefixes[b.oldPrefix],d=0;d<c.length&&c[d]!=b;)d++;c.splice(d,1)}c=b.value.split("-")[0].toLowerCase();void 0==DIT_usedPrefixes[c]?DIT_usedPrefixes[c]=[b]:DIT_usedPrefixes[c].push(b);b.oldPrefix=c;var b=[],e;for(e in DIT_usedPrefixes)if(c=DIT_usedPrefixes[e],void 0==c||0==c.length)delete DIT_usedPrefixes[e];else if(1<c.length&&-1!=FindInArray(DIT_exclPrefixes,e))for(b.push(e),d=0;d<
|
|
c.length;d++){var f=c[d];AddClass(f,"exclconflict")}else for(d=0;d<c.length;d++)f=c[d],RemoveClass(f,"exclconflict");0<b.length&&(e=DIT_restrict_to_known?"Error":"Warning",c=$("confirmarea"))&&($("confirmmsg").innerHTML=e+": Multiple values for: "+b.join(", "),c.className="exclconflict",c.style.display="");e=DIT_labelsBlockingSubmit.indexOf(a);-1<a.value.indexOf("?")&&-1==e?(DIT_labelsBlockingSubmit.push(a),AddClass(a,"questionmark")):-1==a.value.indexOf("?")&&-1<e&&(DIT_labelsBlockingSubmit.splice(e,
|
|
1),RemoveClass(a,"questionmark"));if(a=$("blocksubmitmsg"))a.innerHTML=0<DIT_labelsBlockingSubmit.length?'You must edit labels that contain "?".':""}}
|
|
function DIT_updateConfirmBeforeSubmit(){var a=DIT_restrict_to_known?"Error":"Note",b=DIT_restrict_to_known?"undefined":"uncommon",c="";0<DIT_novelStatuses.length&&1==DIT_novelLabels.length?c=a+": You are using an "+b+" status and an "+b+" label.":0<DIT_novelStatuses.length&&1<DIT_novelLabels.length?c=a+": You are using an "+b+" status and "+DIT_novelLabels.length+" "+b+" labels.":0<DIT_novelStatuses.length?c=a+": You are using an "+b+" status value.":1==DIT_novelLabels.length?c=a+": You are using an "+
|
|
b+" label.":1<DIT_novelLabels.length&&(c=a+": You are using "+DIT_novelLabels.length+" "+b+" labels.");if(a=$("confirmarea"))$("confirmmsg").innerHTML=c,""!=c?(a.className="novel",a.style.display=""):a.style.display="none"}
|
|
function DIT_handleListActions(a){switch(a.value){case "bulk":for(var b=[],c=0;c<issueRefs.length;c++){var d=document.getElementById("cb_"+issueRefs[c].id);d&&d.checked&&b.push(issueRefs[c].id)}0<b.length?(b=b.join(","),b="bulkedit?ids="+b,document.location=b+_ctxArgs):alert("Please select some issues to edit");break;case "colspec":DIT_closeAllPopups(a),_showID("columnspec")}a.value="moreactions"}
|
|
function DIT_handleDetailActions(){var a=$("more_actions");switch(a.value){case "delete":var b=confirm("Normally, you should just close issues by setting their status to a closed value.\nAre you sure you want to delete this issue?");if(b){$("delete_form").submit();return}break;case "move":_showID("move_issue_form_fragment");return}a.value="0"}var DIT_allOrigLabels=[];
|
|
function DIT_checkPlusOne(){var a=$("addCommentTextArea").value;return/^\s*[-+]+[0-9]+\s*.{0,30}$/m.test(a)&&150>a.length?(alert('This looks like a "+1" comment.\nPlease use the star icon instead.\nStars show your interest without annoying other users.'),!1):/^\s*me too.{0,30}$/i.test(a)?(alert('This looks like a "me too" comment.\nPlease use the star icon instead.\nStars show your interest without annoying other users.'),!1):!0}
|
|
function DIT_checkUnrestrict(a){for(var b=[],c=0;c<DIT_allOrigLabels.length;++c){var d=DIT_allOrigLabels[c];if(0==d.indexOf("Restrict-")){for(var e=!1,f=0;24>f;++f){var g=$("labeledit"+f).value;if(g==d){e=!0;break}}e||b.push(d)}}if(0==b.length)return!0;if(a)return alert("You may not remove restriction labels."),!1;a="You are removing these restrictions:\n "+b.join("\n ")+"\nThis may allow more people to access this issue.\nAre you sure?";return confirm(a)}
|
|
function DIT_addColumn(a){var b=DIT_getColspecElement();b.value=b.value+" "+a;$("colspecform").submit()}var DIT_lastSelectedRow=void 0;
|
|
function DIT_checkRangeSelect(a,b){var c=b.parentNode.parentNode.rowIndex;if(c!=DIT_lastSelectedRow){var d;if((d=(d=(d=a)?d:window.event?window.event:"")?d.modifiers?d.modifiers&Event.SHIFT_MASK:d.shiftKey:!1)&&void 0!=DIT_lastSelectedRow){d=$("resultstable");for(var e=c>DIT_lastSelectedRow?1:-1,f=DIT_lastSelectedRow;f!=c;f+=e){var g=d.rows[f],h=b.checked;if(g){g.className=h?"selected":"";for(g=g.firstChild;g&&"TD"!=g.tagName;)g=g.nextSibling;if(g){for(g=g.firstChild;g&&"INPUT"!=g.tagName;)g=g.nextSibling;
|
|
g&&(g.checked=h)}}}}DIT_lastSelectedRow=c}}function DIT_makeIssueLink(a){return a.issue_url+_ctxArgs}function DIT_setRowLinks(){_ctxArgs=_formatContextQueryArgs();if(0!=issueRefs.length)for(var a=$("resultstable"),b=0,c=1;c<a.rows.length;c++){var d=a.rows[c];if("TR"==d.tagName&&!HasClass(d,"group_row")){for(var e=DIT_makeIssueLink(issueRefs[b]),f=0;f<d.cells.length;f++)for(var g=d.cells[f],g=g.firstChild;g;g=g.nextSibling)if("A"==g.tagName){g.href=e;break}b++}}}
|
|
function DIT_toggleColumnUpdate(a){for(var b=DIT_getColspecElement().value.split(" "),c=[],d=0;d<b.length;d++)_allColumnNames[a]!=b[d].toLowerCase()&&c.push(b[d]);DIT_getColspecElement().value=c.join(" ");DIT_getSearchColspecElement().value=c.join(" ");DIT_toggleColumn("hide_col_"+a);DIT_setRowLinks()}
|
|
function DIT_addGroupBy(a){a=_allColumnNames[a];for(var b=DIT_getColspecElement().value.split(" "),c=[],d=0;d<b.length;d++)b[d]&&a!=b[d].toLowerCase()&&c.push(b[d]);DIT_getColspecElement().value=c.join(" ");DIT_getSearchColspecElement().value=c.join(" ");for(var b=$("groupbyspec"),c=b.value.split(" "),e=[],d=0;d<c.length;d++)c[d]&&a!=c[d].toLowerCase()&&e.push(c[d]);e.push(a);b.value=e.join(" ");$("colspecform").submit()}
|
|
function DIT_newIssuePrompt(){return DIT_isDirty?confirm("You have unsaved changes. Are you sure you want to leave this page?"):!0};var DIT_peekXmlHttp=void 0,DIT_peekRow=void 0,DIT_seenPeeks={};function DIT_toggleInfoPeek(a,b){$("infobubble").style.display?DIT_hideInfoPeek():(void 0==DIT_selected&&kibbles.skipper.setCurrentStop(0),DIT_showInfoPeek(a,DIT_selected,b,1))}function DIT_hideInfoPeek(){var a=$("infobubble");a&&(a.style.display="",a.style.left="-2000px",_qeDirty=!1)}function DIT_hideInfoPeekIfClickedOutside(a){var b=$("infobubble");if(b){for(a=a.srcElement||a.target;a&&a!=b;)a=a.parentNode;a||DIT_hideInfoPeek()}}
|
|
function DIT_showInfoPeek(a,b,c,d){DIT_peekRow=b;DIT_doPeekXHR(a,c,d);DIT_previewMouseout();DIT_displayInfoBubble()}var DIT_hoverTimer=void 0;function DIT_previewMouseover(a,b){_qeDirty||(DIT_peekRow=b,DIT_doPeekXHR(a,!1,0),DIT_hoverTimer&&window.clearTimeout(DIT_hoverTimer),DIT_hoverTimer=window.setTimeout(DIT_displayInfoBubble,200))}function DIT_previewMouseout(){DIT_hoverTimer&&(window.clearTimeout(DIT_hoverTimer),DIT_hoverTimer=void 0)}
|
|
function DIT_displayInfoBubble(){var a=$("infobubble");if(DIT_seenPeeks[DIT_peekRow])$("peekarea").innerHTML=DIT_seenPeeks[DIT_peekRow];else{var b=a;$("peekarea").innerHTML='<div class="loading">Loading...</div>';if("block"!=b.style.display)for(b.style.opacity=.1,b=1;5>=b;b++){var c=b/5;window.setTimeout('document.getElementById("infobubble").style.opacity='+c,400*b/5)}}DIT_commentNavEl=void 0;b=nodeBounds(DIT_cursorStops[DIT_peekRow]);a.style.display="block";c=b.y+b.h+0;a.style.top=c+"px";c=nodeBounds(a);
|
|
c.y+c.h>window.pageYOffset+window.innerHeight&&(c=b.y-c.h-0,c>=window.pageYOffset&&(a.style.top=c+"px"));a.style.left="110px";_qeDirty=!1}function DIT_doPeekXHR(a,b,c){a=issueRefs[DIT_peekRow];a=a.issue_url;a=a.replace("/detail?","/peek?")+_ctxArgs;DIT_peekXmlHttp=XH_XmlHttpCreate();XH_XmlHttpGET(DIT_peekXmlHttp,a,function(){4==DIT_peekXmlHttp.readyState&&200==DIT_peekXmlHttp.status&&DIT_gotPeek(DIT_peekXmlHttp.responseText,!0,b,0,c)})}
|
|
function DIT_gotPeek(a,b,c,d,e){b&&($("peekarea").innerHTML=a,c&&DIT_lastComment());for(DIT_seenPeeks[DIT_peekRow+d]=a;d<e&&DIT_peekRow+d+1<issueRefs.length&&void 0!=DIT_seenPeeks[DIT_peekRow+d+1];)d++;d<e&&DIT_peekRow+d+1<issueRefs.length&&(a=issueRefs[DIT_peekRow+d+1],a=a.issue_url,a=a.replace("/detail?","/peek?")+_ctxArgs,DIT_peekXmlHttp=XH_XmlHttpCreate(),XH_XmlHttpGET(DIT_peekXmlHttp,a,function(){4==DIT_peekXmlHttp.readyState&&200==DIT_peekXmlHttp.status&&DIT_gotPeek(DIT_peekXmlHttp.responseText,
|
|
!1,!1,d+1,e)}))}function DIT_keepInfoPeekOpen(a,b){var c=$("infobubble");""!=c.style.display&&DIT_showInfoPeek(a,DIT_selected,!1,b)}var DIT_commentNavEl=void 0;function DIT_scrollToPeekComment(a){a=a.offsetTop;$("issuecomments").scrollTop=a-30}function DIT_pickQuickEditHistory(a){var b=$("cmd");b&&(b.value=$("recent_cmd_"+a).value,$("comment").value=$("recent_comment_"+a).value,$("slot_used").value=""+a)}
|
|
function DIT_findNextCommentElement(a){for(;a&&(!a.id||"hc"!=a.id.substr(0,2));)a=a.nextSibling;return a}function DIT_findPrevCommentElement(a){for(;a&&(!a.id||"hc"!=a.id.substr(0,2));)a=a.previousSibling;return a}function DIT_nextComment(){var a;void 0==DIT_commentNavEl?(a=$("issuecomments").firstChild,a=DIT_findNextCommentElement(a),a=a.nextSibling):a=DIT_commentNavEl.nextSibling;if(a=DIT_findNextCommentElement(a))DIT_commentNavEl=a,DIT_scrollToPeekComment(DIT_commentNavEl)}
|
|
function DIT_prevComment(){var a;a=void 0==DIT_commentNavEl?$("issuecomments").lastChild:DIT_commentNavEl.previousSibling;if(a=DIT_findPrevCommentElement(a))DIT_commentNavEl=a,DIT_scrollToPeekComment(DIT_commentNavEl)}function DIT_firstComment(){DIT_commentNavEl=$("issuecomments").firstChild;DIT_commentNavEl=DIT_findNextCommentElement(DIT_commentNavEl);DIT_scrollToPeekComment(DIT_commentNavEl)}
|
|
function DIT_lastComment(){DIT_commentNavEl=$("issuecomments").lastChild;DIT_commentNavEl=DIT_findPrevCommentElement(DIT_commentNavEl);DIT_scrollToPeekComment(DIT_commentNavEl)}function DIT_toggleRedoMenu(a){"block"==$("redoMenu").style.display?DIT_closePopup("redoMenu"):DIT_showBelow("redoMenu",a,-$("infobubble").offsetLeft,-$("infobubble").offsetTop,a);return!1}function DIT_selectRecentCommand(a){DIT_pickQuickEditHistory(a);DIT_closePopup("redoMenu");return!1};var DIT_cursorStops,DIT_selected=void 0;function DIT_focusArtifactSearchField(){var a=DIT_getArtifactSearchField();a.focus();a.select()}function DIT_closeKeystrokeHelp(){var a=document.getElementById("keys_help");a&&(a.style.display="none")}function DIT_toggleKeystrokeHelp(){var a=document.getElementById("keys_help");a?a.style.display=a.style.display?"":"none":(DIT_helpXmlHttp=XH_XmlHttpCreate(),XH_XmlHttpGET(DIT_helpXmlHttp,"/hosting/issues/keyshelp",DIT_helpCallback))}var DIT_helpXmlHttp=void 0;
|
|
function DIT_helpCallback(){if(4==DIT_helpXmlHttp.readyState&&200==DIT_helpXmlHttp.status){var a=document.getElementById("helparea");a&&(a.innerHTML=DIT_helpXmlHttp.responseText)}}
|
|
function DIT_setupKibblesComponentKeys(a,b,c){kibbles.keys.addKeyPressListener("/",function(){window.setTimeout(DIT_focusArtifactSearchField,10)});"entry"!=c&&kibbles.keys.addKeyPressListener("c",function(){document.location=b});"list"!=c&&kibbles.keys.addKeyPressListener("u",function(){document.location=a});kibbles.keys.addKeyPressListener("?",DIT_toggleKeystrokeHelp);kibbles.keys.addKeyPressListener("ESC",DIT_closeKeystrokeHelp);kibbles.keys.addKeyPressListener("ESC",DIT_hideInfoPeek)}
|
|
function DIT_openArtifactAtCursor(a){0<=DIT_selected&&DIT_selected<DIT_cursorStops.length&&(a=DIT_cursorStops[DIT_selected].childNodes[a],a=a.childNodes[0])&&(a=a.getAttribute("href"),document.location=a)}function DIT_updateCursor(a,b){DIT_selected=void 0;b&&(RemoveClass(b.element,"cursor_on"),AddClass(b.element,"cursor_off"),DIT_rowRolloverOff(b.element));a&&a.element&&(RemoveClass(a.element,"cursor_off"),AddClass(a.element,"cursor_on"),DIT_selected=a.index,DIT_rowRolloverOn(a.element))}
|
|
function DIT_accumulateCursorRows(a,b){for(var c=0;c<a.childNodes.length;c++){var d=a.childNodes[c],e=d.tagName;e&&("TR"==e||"DIV"==e)&&0<=d.className.indexOf("cursor")&&(d.cursorIndex=b.length,b.push(d));DIT_accumulateCursorRows(d,b)}}
|
|
function DIT_setupKibblesCursorStops(){kibbles.skipper.addStopListener(kibbles.skipper.LISTENER_TYPE.PRE,DIT_updateCursor);kibbles.skipper.setOption("padding_top",50);kibbles.skipper.setOption("padding_bottom",50);var a=[],b=document.getElementById("cursorarea");DIT_accumulateCursorRows(b,a);DIT_cursorStops=a;for(a=0;a<DIT_cursorStops.length;a++)b=DIT_cursorStops[a],kibbles.skipper.append(b),0<=b.className.indexOf("cursor_on")&&kibbles.skipper.setCurrentStop(a)}
|
|
function DIT_setupKibblesOnEntryPage(a,b){DIT_setupKibblesComponentKeys(a,b,"entry")}
|
|
function DIT_setupKibblesOnListPage(a,b,c,d,e,f,g){DIT_setupKibblesCursorStops(!0);kibbles.skipper.addFwdKey("j");kibbles.skipper.addRevKey("k");kibbles.keys.addKeyPressListener("j",function(){DIT_keepInfoPeekOpen(c,d,3)});kibbles.keys.addKeyPressListener("k",function(){DIT_keepInfoPeekOpen(c,d,0)});kibbles.keys.addKeyPressListener("m",function(){var a=$("cmd");a&&a.select()});kibbles.keys.addKeyPressListener("e",function(){var a=$("quickeditform");a&&(AddClass($("execute"),"mode_button_active"),
|
|
a.submit())});kibbles.keys.addKeyPressListener("1",function(){DIT_pickQuickEditHistory(1)});kibbles.keys.addKeyPressListener("2",function(){DIT_pickQuickEditHistory(2)});kibbles.keys.addKeyPressListener("3",function(){DIT_pickQuickEditHistory(3)});kibbles.keys.addKeyPressListener("4",function(){DIT_pickQuickEditHistory(4)});kibbles.keys.addKeyPressListener("5",function(){DIT_pickQuickEditHistory(5)});if(void 0!=f){var h=f;kibbles.keys.addKeyPressListener("x",function(){if(0<=DIT_selected&&DIT_selected<
|
|
DIT_cursorStops.length){for(var a=DIT_cursorStops[DIT_selected].childNodes[h],a=a.firstChild;a&&"INPUT"!=a.tagName;)a=a.nextSibling;a&&(a.checked=a.checked?"":"checked")}});kibbles.keys.addKeyPressListener("s",function(){if(0<=DIT_selected&&DIT_selected<DIT_cursorStops.length){for(var a=DIT_cursorStops[DIT_selected].childNodes[h],a=a.firstChild;a&&"IMG"!=a.tagName;)a=a.nextSibling;a&&_toggleStar(a,c,issueRefs[DIT_selected].project_name,issueRefs[DIT_selected].id,g)}})}kibbles.keys.addKeyPressListener("o",
|
|
function(){DIT_openArtifactAtCursor(e)});kibbles.keys.addKeyPressListener("enter",function(){DIT_openArtifactAtCursor(e)});kibbles.keys.addKeyPressListener("h",function(){DIT_toggleInfoPeek(c)});kibbles.keys.addKeyPressListener("f",DIT_firstComment);kibbles.keys.addKeyPressListener("p",DIT_prevComment);kibbles.keys.addKeyPressListener("n",DIT_nextComment);kibbles.keys.addKeyPressListener("l",DIT_lastComment);DIT_setupKibblesComponentKeys(a,b,"list")}
|
|
function DIT_setupKibblesOnDetailPage(a,b,c,d,e,f,g,h,k,m){DIT_setupKibblesCursorStops(!1);kibbles.skipper.addFwdKey("n");kibbles.skipper.addRevKey("p");c&&kibbles.keys.addKeyPressListener("k",function(){document.location=c});d&&kibbles.keys.addKeyPressListener("j",function(){document.location=d});h&&kibbles.keys.addKeyPressListener("r",function(){window.setTimeout("_openIssueUpdateForm()",10)});k&&kibbles.keys.addKeyPressListener("s",function(){var a=document.getElementById("star");DIT_toggleStar(a,
|
|
e,f,g,m);DIT_syncStarIcons(a,"star2")});DIT_setupKibblesComponentKeys(a,b,"detail")};function DIT_getColspecElement(){return document.getElementById("colspec_field").firstChild}function DIT_getSearchColspecElement(){return document.getElementById("search_colspec").firstChild}function DIT_getArtifactSearchField(){var a=document.getElementById("qq");return a?a.firstChild:void 0}function DIT_autosizeArtifactSerchField(){var a=DIT_getArtifactSearchField();if(a){var b=a.value.length+3;75<b&&(b=75);b>a.size&&(a.size=b)}}window.setInterval(DIT_autosizeArtifactSerchField,700);
|
|
function DIT_formatContextQueryArgs(){var a="",b=DIT_getColspecElement().value;2!=_ctxCan&&(a+="&can="+_ctxCan);""!=_ctxQuery&&(a+="&q="+encodeURIComponent(_ctxQuery));""!=_ctxSortspec&&(a+="&sort="+_ctxSortspec);""!=_ctxGroupBy&&(a+="&groupby="+_ctxGroupBy);b!=_ctxDefaultColspec&&(a+="&colspec="+b);0!=_ctxStart&&(a+="&start="+_ctxStart);_ctxNum!=_ctxResultsPerPage&&(a+="&num="+_ctxNum);return a}var _PRETOKENIZED_FIELDS=["owner","reporter","cc","commentby"];
|
|
function DIT_filterTo(a,b){var c=DIT_getArtifactSearchField().value;""!=c&&(c+=" ");for(var d="=",e=0;e<_PRETOKENIZED_FIELDS.length;e++)if(a==_PRETOKENIZED_FIELDS[e]){d=":";break}c+=a+d+b;c="list?can="+$("can").value+"&q="+c;$("sort")&&$("sort").value&&(c+="&sort="+$("sort").value);c+="&colspec="+DIT_getColspecElement().value;document.location=c}
|
|
function DIT_addSort(a,b){var c="";$("sort")&&(c=$("sort").value);var c=c.split(/ +/),d=a;b&&(d="-"+a);for(var d=[d],e=0;e<c.length;e++)""!=c[e]&&c[e]!=a&&c[e]!="-"+a&&d.push(c[e]);c="list?can="+$("can").value+"&q="+DIT_getArtifactSearchField().value;c+="&sort="+d.join("+");c+="&colspec="+DIT_getColspecElement().value;document.location=c}function DIT_sortUp(a){DIT_addSort(a,!1)}function DIT_sortDown(a){DIT_addSort(a,!0)};void 0==Array.prototype.indexOf&&(Array.prototype.indexOf=function(a){for(var b=0;b<this.length;++b)if(this[b]==a)return b;return-1});function DIT_forceProperTableWidth(){var a=$("confirmarea");a&&(a.style.display="none")};function DIT_onload(){_ac_install();_ac_register(function(a){if(a.id.startsWith("search"))return DIT_searchStore;if(a.id.startsWith("cmd"))return DIT_quickEditStore;if(a.id.startsWith("label"))return DIT_labelStore;if(a.id.startsWith("status"))return DIT_statusStore;if(a.id.startsWith("member"))return DIT_memberListStore;if(a.id.startsWith("owner"))return DIT_ownerStore;if(-1!=a.className.indexOf("autocomplete"))return DIT_autoCompleteStore});_PC_Install();DIT_allColumnNames=_allColumnNames;DIT_labelFieldIDPrefix=
|
|
_lfidprefix;DIT_allOrigLabels=_allOrigLabels}_selectAllIssues=DIT_selectAllIssues;_selectNoneIssues=DIT_selectNoneIssues;_toggleRows=DIT_toggleRows;_toggleColumn=DIT_toggleColumn;_toggleColumnUpdate=DIT_toggleColumnUpdate;_addGroupBy=DIT_addGroupBy;_addcol=DIT_addColumn;_checkRangeSelect=DIT_checkRangeSelect;_makeIssueLink=DIT_makeIssueLink;_setRowLinks=DIT_setRowLinks;_onload=DIT_onload;_handleListActions=DIT_handleListActions;_handleDetailActions=DIT_handleDetailActions;_fetchOptions=DIT_fetchOptions;
|
|
_fetchSiteOptions=DIT_fetchSiteOptions;_setACOptions=DIT_setUpAutoCompleteStore;_openIssueUpdateForm=DIT_openIssueUpdateForm;_addAttachmentFields=DIT_addAttachmentFields;_acstore=_AC_SimpleStore;_accomp=_AC_Completion;_acreg=_ac_register;_formatContextQueryArgs=DIT_formatContextQueryArgs;_ctxArgs="";_ctxResultsPerPage=_ctxNum=_ctxStart=_ctxDefaultColspec=_ctxGroupBy=_ctxSortspec=_ctxQuery=_ctxCan=void 0;_filterTo=DIT_filterTo;_sortUp=DIT_sortUp;_sortDown=DIT_sortDown;_closeAllPopups=DIT_closeAllPopups;
|
|
_closeSubmenus=DIT_closeSubmenus;_showRight=DIT_showRight;_showBelow=DIT_showBelow;_highlightRow=DIT_highlightRow;_highlightRowCallback=DIT_highlightRowCallback;_floatMetadata=DIT_floatMetadata;_floatVertically=DIT_floatVertically;_selectPrompt=DIT_selectPrompt;_savePrompt=DIT_savePrompt;_newPrompt=DIT_newPrompt;_deletePrompt=DIT_deletePrompt;_switchPrompt=DIT_switchPrompt;_promptNames=DIT_promptNames;_toggleStar=DIT_toggleStar;_syncStarIcons=DIT_syncStarIcons;_toggleStarLocal=DIT_toggleStarLocal;
|
|
_rowRolloverOn=DIT_rowRolloverOn;_rowRolloverOff=DIT_rowRolloverOff;_confirmNovelStatus=DIT_confirmNovelStatus;_confirmNovelLabel=DIT_confirmNovelLabel;_vallab=DIT_validateLabel;_dirty=DIT_dirty;_exposeExistingLabelFields=DIT_exposeExistingLabelFields;_confirmDiscardEntry=DIT_confirmDiscardEntry;_confirmDiscardUpdate=DIT_confirmDiscardUpdate;_allOrigLabels=_lfidprefix=void 0;_checkPlusOne=DIT_checkPlusOne;_checkUnrestrict=DIT_checkUnrestrict;_clearOnFirstEvent=DIT_clearOnFirstEvent;
|
|
_forceProperTableWidth=DIT_forceProperTableWidth;_RC=RemoveClass;_acof=_ac_onfocus;_acmo=_ac_mouseover;_acse=_ac_select;_acrob=_ac_real_onblur;_allColumnNames=[];_attachIssueMoveValidator=DIT_attachIssueMigrationValidator;_getColspec=DIT_getColspecElement;_getSearchColspec=DIT_getSearchColspecElement;function closeAutocompleteAndIssuePreview(a){_ac_fake_onblur(a);DIT_hideInfoPeekIfClickedOutside(a)}
|
|
-1!=navigator.userAgent.toLowerCase().indexOf("webkit")?simpleBindEvent(document,"click",closeAutocompleteAndIssuePreview):simpleBindEvent(document,"click",DIT_hideInfoPeekIfClickedOutside);document.captureEvents&&document.captureEvents(Event.CLICK);_setPeoplePrefs=DIT_setPeoplePrefs;_setupKibblesOnEntryPage=DIT_setupKibblesOnEntryPage;_setupKibblesOnListPage=DIT_setupKibblesOnListPage;_setupKibblesOnDetailPage=DIT_setupKibblesOnDetailPage;_previewMouseover=DIT_previewMouseover;_previewMouseout=DIT_previewMouseout;
|
|
_showInfoPeek=DIT_showInfoPeek;_hideInfoPeek=DIT_hideInfoPeek;_toggleInfoPeek=DIT_toggleInfoPeek;_toggleRedoMenu=DIT_toggleRedoMenu;_selectRecentCommand=DIT_selectRecentCommand;_firstComment=DIT_firstComment;_prevComment=DIT_prevComment;_nextComment=DIT_nextComment;_lastComment=DIT_lastComment;_blurOnEsc=DIT_blurOnEsc;_newIssuePrompt=DIT_newIssuePrompt;})()
|