YAHOO.namespace("traction");YAHOO.traction.AutoCompleteInSelect=function(b,d,a,c){YAHOO.traction.AutoCompleteInSelect.superclass.constructor.call(this,b,d,a,c)};YAHOO.lang.extend(YAHOO.traction.AutoCompleteInSelect,YAHOO.widget.AutoComplete);YAHOO.traction.AutoCompleteInSelect.prototype._initList=function(){this._aListItems=[];while(this._oContainer._oContent._oBody.hasChildNodes()){var b=this.getListItems();if(b){for(var a=b.length-1;a>=0;c--){b[a]=null}}this._oContainer._oContent._oBody.innerHTML=""}var f=document.createElement("div");f.setAttribute("multiple","");f=this._oContainer._oContent._oBody.appendChild(f);for(var c=0;c
'+this.subtitle+'
'+this.options.fieldLabelText+(this.options.helpBoxResourceName?("[?]"):"")+'
'+this.getOtherLinksHTML()+'
';e.innerHTML=b;this.panel=new YAHOO.traction.TractionPanel(this.id,{width:"260px",visible:true,draggable:true,dragOnly:true,constraintoviewport:true,underlay:"none",effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},minheight:150,minwidth:200,zIndex:500});this.panel.render();this.panel.hideEvent.subscribe(this.onhide,this,true);this.panel.moveEvent.subscribe(this.onmove,this,true);this.panel.dragEvent.subscribe(this.onmove,this,true);this.panel.showEvent.subscribe(this.onshow,this,true);var d=document[this.id+"_fm"];d.onsubmit=function(){return false};var a=document.getElementById(this.id+"_selector");this.selector=this.getSelector(a,this);var c=document.getElementById(this.id+"_completer");this.completer=this.getCompleter(c,this);this.id_label=document.getElementById(this.id+"_id");this.dropdown=document.getElementById(this.id+"_dropdown");if(this.dropdown!=null){this.dropdown.style.cursor="pointer";this.dropdown.onmouseover=this.hoverDropdown.bind(this);this.dropdown.onmouseout=this.unhoverDropdown.bind(this);this.dropdown.onmousedown=this.mousedownDropdown.bind(this);this.dropdown.onmouseup=this.mouseupDropdown.bind(this);this.dropdown.onclick=this.clickDropdown.bindAsEventListener(this)}this.completer.autoComplete.containerExpandEvent.subscribe(this.containerExpanded,this,true);this.completer.autoComplete.containerCollapseEvent.subscribe(this.containerCollapsed,this,true)};YAHOO.traction.SelectorPanel.prototype.hoverDropdown=function(){this.dropdown.className="ddhover"};YAHOO.traction.SelectorPanel.prototype.__ignoreNextClick=false;YAHOO.traction.SelectorPanel.prototype.mousedownDropdown=function(){if(this.completer.autoComplete.isContainerShowing()){this.__ignoreNextClick=true}this.dropdown.className="dddown"};YAHOO.traction.SelectorPanel.prototype.mouseupDropdown=function(){this.dropdown.className="dd"};YAHOO.traction.SelectorPanel.prototype.unhoverDropdown=function(){this.dropdown.className="dd"};YAHOO.traction.SelectorPanel.prototype.clickDropdown=function(b){if(this.__ignoreNextClick){this.__ignoreNextClick=false;return}if(this.completer.autoComplete.isContainerShowing()){}else{this.completer.focus();var a=this;setTimeout(function(){a.completer.onInputClick(b)},1)}};YAHOO.traction.SelectorPanel.prototype.containerCollapsed=function(b,a,c){this.syncDropdown()};YAHOO.traction.SelectorPanel.prototype.containerExpanded=function(b,a,c){this.syncDropdown()};YAHOO.traction.SelectorPanel.prototype.syncDropdown=function(){if(this.completer.autoComplete.isContainerShowing()){this.dropdown.src="/images/dropup.gif"}else{this.dropdown.src="/images/dropdown.gif"}};YAHOO.traction.SelectorPanel.prototype.labelAdded=function(a,b,c){};YAHOO.traction.SelectorPanel.prototype.labelRemoved=function(a,b,c){this.completer.reset()};YAHOO.traction.SelectorPanel.prototype.labelSelected=function(a){if(a==null){}else{this.selector.add(a);this.selector.refresh();this.completer.clear()}};YAHOO.traction.SelectorPanel.prototype.selectorRefreshed=function(a){this.completer.position()};YAHOO.traction.SelectorPanel.prototype.moveTo=function(a,b){this.panel.moveTo(a,b)};YAHOO.traction.SelectorPanel.prototype.newproj=function(a){this.completer.newproj()};YAHOO.traction.SelectorPanel.prototype.onhide=function(){cm.unlock();this.completer.blur()};YAHOO.traction.SelectorPanel.prototype.onshow=function(){this.completer.reset()};YAHOO.traction.SelectorPanel.prototype.onmove=function(){this.completer.position()};YAHOO.traction.SelectorPanel.prototype.getOtherLinksHTML=function(){return""};YAHOO.traction.SelectorPanel.prototype.getCompleter=function(c,a){var b=new YAHOO.traction.LabelCompleter(c,this,null,"wcR");b.onChooseLabel=a.labelSelected.bind(a);return b};YAHOO.traction.SelectorPanel.prototype.getSelector=function(c,b){var a=new YAHOO.traction.LabelSelector(c);a.onAdd=b.labelAdded.bind(b);a.onRemove=b.labelRemoved.bind(b);a.onRefresh=b.selectorRefreshed.bind(b);return a};YAHOO.namespace("traction");YAHOO.traction.FastProjectFilterPanel=function(a,b){YAHOO.traction.FastProjectFilterPanel.superclass.constructor.call(this,b,i18n("projectchooser_title","Choose Projects"),{fieldLabelText:i18n("projectchooser_field_label","Type a project"),helpBoxName:"projectchooser"});this.build();this.list=a;this.label=document.getElementById(a.prefix+"_label");this.button=document.getElementById(a.prefix+"_add");this.completer.clear()};YAHOO.extend(YAHOO.traction.FastProjectFilterPanel,YAHOO.traction.SelectorPanel);YAHOO.traction.FastProjectFilterPanel.prototype.load=function(){this.selector.load_initial(this.list.projects)};YAHOO.traction.FastProjectFilterPanel.prototype.display=function(){this.load();var a=0,c=0;if(this.button!=null){var b=YAHOO.util.Dom.getRegion(this.button);a=b.right-3;c=b.top+25}this.moveTo(a,c);this.show("")};YAHOO.traction.FastProjectFilterPanel.prototype.submit=function(){this.updateHidden();this.completer.clear();this.hide();if(document.fm&&document.fm.edit_title){document.fm.edit_title.focus()}};YAHOO.traction.FastProjectFilterPanel.prototype.updateHidden=function(){this.list.update(this.selector.projects)};YAHOO.traction.FastProjectFilterPanel.prototype.projectSelected=function(a){if(a==null){}else{this.selector.add(new Traction.Project(a[0],a[1],a[2]));this.selector.refresh();this.completer.clear()}};YAHOO.traction.FastProjectFilterPanel.prototype.getCompleter=function(b,a){var c=new YAHOO.traction.ProjectCompleter(b,this,a);c.initDataSource(new YAHOO.traction.ProjectDataSource(c,"a"));c.onChooseProject=a.projectSelected.bind(a);return c};YAHOO.traction.FastProjectFilterPanel.prototype.getSelector=function(c,b){var a=new YAHOO.traction.ProjectSelector(c);a.onRefresh=b.selectorRefreshed.bind(b);return a};YAHOO.namespace("traction");YAHOO.traction.LabelCompleter=function(b,a,d,c){this.input=b;this.input.onclick=this.onInputClick.bind(this);this.panel=a;this.pendingQuery=null;this.div=document.createElement("DIV");this.div.className="completer-container";document.body.appendChild(this.div);this.dataSource=d||new YAHOO.traction.LabelDataSource(null,this,c);this.autoComplete=new YAHOO.traction.TractionAutoComplete(b,this.div,this.dataSource);this.autoComplete.typeAhead=true;this.autoComplete.queryDelay=0;this.autoComplete.delimChar="";this.autoComplete.minQueryLength=0;this.autoComplete.maxQueryResults=0;this.autoComplete.animSpeed=0.2;this.autoComplete.formatResult=this.formatResult;this.autoComplete.maxResultsDisplayed=100;this.autoComplete.autoHighlight=true;this.autoComplete.typeAhead=false;this.autoComplete.selectOn2ndColon=true;this.autoComplete.containerExpandEvent.subscribe(this.containerExpanded,this,true);this.autoComplete.itemSelectEvent.subscribe(this.itemSelected,this,true);this.autoComplete.unmatchedItemSelectEvent.subscribe(this.newItemSelected,this,true);this.autoComplete.textboxKeyEvent.subscribe(this.keyTyped,this,true);this.autoComplete.onEscWhenCollapsed=this.escWhenCollapsed.bind(this);this.position();YAHOO.traction.LabelCompleter.autoComplete=this.autoComplete};YAHOO.traction.LabelCompleter.prototype.escWhenCollapsed=function(){this.panel.hide()};YAHOO.traction.LabelCompleter.prototype.setHeader=function(a){this.autoComplete.setHeader(a)};YAHOO.traction.LabelCompleter.prototype.blur=function(){this.input.blur()};YAHOO.traction.LabelCompleter.prototype.reset=function(){if(this.project==null){this.clear()}else{}};YAHOO.traction.LabelCompleter.prototype.setProject=function(a){this.load(a)};YAHOO.traction.LabelCompleter.prototype.load=function(b){this.project=b;this.dataSource.currentProject=b;if(b!=null){var a={project:b};Traction.LabelCache.getLabels(b,this.doneGetLabels.bind(this),a)}};YAHOO.traction.LabelCompleter.prototype.onInputClick=function(a){Debug.println("Event: onInputClick");this.autoComplete.sendQuery(this.input.value)};YAHOO.traction.LabelCompleter.prototype.formatResult=function(a,e){var g=a[0];var f=a[1];var d="";if(f==null){if(e.startsWith(":")||e.startsWith("/")){e=e.substring(1)}var b=g.substring(0,e.length);var h=g.substring(e.length);d+=" ";d+=""+b+""+h}else{if(f.icon!=null){d+=''}else{d+=''}var c=f.label+"";var i=c.toLowerCase().indexOf(e.toLowerCase());if(i!=-1){d+=f.label.substring(0,i);d+=""+f.label.substring(i,i+e.length)+"";d+=f.label.substring(i+e.length)}else{d+=f.label}}return d};YAHOO.traction.LabelCompleter.prototype.clear=function(){this.input.value=""};YAHOO.traction.LabelCompleter.prototype.doneGetLabels=function(b,a){};YAHOO.traction.LabelCompleter.prototype.focus=function(){this.input.focus()};YAHOO.traction.LabelCompleter.prototype.onChooseLabel=null;YAHOO.traction.LabelCompleter.prototype.itemSelected=function(d,c,g){var h=c[2];var b=h[1];if(b==null&&h[0]==""){if(this.onChooseLabel!=null){this.onChooseLabel(null)}}else{if(b!=null){this.autoComplete.alwaysShowContainer=false;if(this.onChooseLabel!=null){this.onChooseLabel(b)}this.preserveProject(b)}else{var f=Traction.Label.delim;var e=f+h[0]+f;this.input.value=e;var a=e.length;this.selectRange(a,a);this.autoComplete.alwaysShowContainer=false;this.autoComplete.sendQuery(e)}}};YAHOO.traction.LabelCompleter.prototype.preserveProject=function(b){var f=this.project;var c=b.project;if(c!=null&&c!=f){var e=Traction.Label.delim;var d=e+c+e;this.input.value=d;var a=d.length;this.selectRange(a,a)}};YAHOO.traction.LabelCompleter.prototype.newproj=function(){var c=Traction.Label.delim;this.input.value=c;this.input.focus();var a=c.length;this.selectRange(a,a);this.autoComplete.alwaysShowContainer=false;var b=this;setTimeout(function(){b.autoComplete.sendQuery(c)},1)};YAHOO.traction.LabelCompleter.prototype.selectRange=function(b,a){this.autoComplete._selectText(this.input,b,a)};YAHOO.traction.LabelCompleter.prototype._isProjectColon=function(a){return((a.startsWith(":")||a.startsWith("/"))&&(a.endsWith(":"))||a.endsWith("/"))};YAHOO.traction.LabelCompleter.prototype.newItemSelected=function(d,c,f){var e=this.input.value.trim();if(e==""||this._isProjectColon(e)){this.panel.submit()}else{var a=YAHOO.traction.LabelDataSource.splitProjectAndLabel(e);var b=Traction.Label.createNewLabel(a[0],a[1]);this.autoComplete.alwaysShowContainer=false;if(this.onChooseLabel!=null){this.onChooseLabel(b)}this.preserveProject(b)}};YAHOO.traction.LabelCompleter.prototype.keyTyped=function(b,a,c){this.autoComplete.alwaysShowContainer=false;var d=this.input.value;if(d.startsWith(":")){Traction.Label.setDelimeter(":")}else{if(d.startsWith("/")){Traction.Label.setDelimeter("/")}}Debug.println("value="+d)};YAHOO.traction.LabelCompleter.prototype.containerExpanded=function(d,a,e){var c=a[0];if(this.pendingQuery!=null){var b=this.pendingQuery;this.pendingQuery=null;this.autoComplete.sendQuery(b)}this.position()};YAHOO.traction.LabelCompleter.prototype.position=function(){var a=YAHOO.util.Dom.getRegion(this.input);YAHOO.util.Dom.setXY(this.div,new YAHOO.util.Point(a.left,a.bottom));this.div.style.width=px(a.right-a.left)};YAHOO.traction.LabelDataSource=function(c,a,b){this.currentProject=c;this.completer=a;this.requireAnyPermission=b;this._init()};YAHOO.traction.LabelDataSource.prototype=new YAHOO.widget.DataSource();YAHOO.traction.LabelDataSource.lastQueryTimeStamp=0;YAHOO.traction.LabelDataSource.prototype.doQuery=function(c,h,g){var f=h;var b=false;var d=this.currentProject;Debug.println("doQuery: "+h);if(h==null){h=""}h=decodeURIComponent(h);h=h.toLowerCase();var a=YAHOO.traction.LabelDataSource.splitProjectAndLabel(h);if(a[0]!=null){if(a[1]==null){b=true;h=a[0]}else{d=a[0];h=a[1]}}YAHOO.traction.LabelDataSource.lastQueryTimeStamp=(new Date()).getTime();var e={oCallbackFn:c,sOriginalQuery:f,sQuery:h,oParent:g,proj:d,timeStamp:YAHOO.traction.LabelDataSource.lastQueryTimeStamp};if(b){Traction.LabelCache.getProjects("R",this.doQuery_doneProjects.bind(this),e)}else{Traction.LabelCache.getLabels(d,this.doQuery_doneLabels.bind(this),e,this.requireAnyPermission)}};YAHOO.traction.LabelDataSource.splitProjectAndLabel=function(e){var d=null;if(e.startsWith(":")||e.startsWith("/")){var a=e.indexOf("/",1);var b=e.indexOf(":",1);var c;if(b==-1){c=a}else{if(a==-1){c=b}else{c=(b0)?f[0].project:b.proj;var d=(new MessageFormat(i18n("labelchooser_label_matches_heading","{0} label matches"))).format(c);this.completer.setHeader();this.getResultsEvent.fire(this,a,g,aResults);b.oCallbackFn(g,aResults,a)};YAHOO.traction.LabelDataSource.prototype.doQuery_doneProjects=function(b,c){if(YAHOO.traction.LabelDataSource.lastQueryTimeStamp!=c.timeStamp){return}var e=c.oParent;var h=c.sQuery;var d=c.sOriginalQuery;if(h==null){h=""}h=decodeURIComponent(h);h=h.toLowerCase();var g=new Array();for(var a=0;a0){this.span.appendChild(document.createTextNode(", "))}this.span.appendChild(this.links[a].element)}if(this.labels.length>0){this.span.appendChild(document.createTextNode(" "))}if(this.onRefresh!=null){this.onRefresh(this)}};YAHOO.traction.LabelListDisplay.prototype.onRefresh=null;YAHOO.namespace("traction");YAHOO.traction.LabelListLink=function(a,b){this.label=a;this.list=b;this.element=document.createElement("SPAN");if(this.label.isNew){this.element.innerHTML=this.label.getDisplayName(b.project)+" ["+i18n("labelchooser_new_label_marker","new")+"]"}else{this.element.innerHTML=this.label.getDisplayName(b.project)}this.element.onmouseout=this.unhover.bindAsEventListener(this);this.element.onclick=this.click.bindAsEventListener(this);this.element.onmousemove=this.hover.bindAsEventListener(this)};YAHOO.traction.LabelListLink.prototype.remove=function(){this.label=null;this.list=null};YAHOO.traction.LabelListLink.prototype.click=function(){this.list.remove(this.label);this.list.refresh()};YAHOO.traction.LabelListLink.prototype.hover=function(){if(!this.locked){this.element.style.textDecoration="line-through";this.element.style.cursor="pointer"}};YAHOO.traction.LabelListLink.prototype.unhover=function(){this.element.style.textDecoration="none";this.element.style.cursor=""};YAHOO.namespace("traction");YAHOO.traction.LabelPanel=function(b,c,a){YAHOO.traction.LabelPanel.superclass.constructor.call(this,c,i18n("labelchooser_title","Choose Labels"),{fieldLabelText:i18n("labelchooser_field_label","Type a label"),style:a,helpBoxName:"labelchooser"});this.build();this.list=b;this.label=document.getElementById(b.prefix+"_label");this.completer.clear();this.setProject(b.project)};YAHOO.extend(YAHOO.traction.LabelPanel,YAHOO.traction.SelectorPanel);YAHOO.traction.LabelPanel.prototype.load=function(){this.selector.load_hidden(this.list.project,this.list.hidden.value)};YAHOO.traction.LabelPanel.prototype.display=function(){this.load();var a=0,c=0;if(this.label!=null){var b=YAHOO.util.Dom.getRegion(this.label);a=b.right-3;c=b.top-6}this.moveTo(a,c);this.show("")};YAHOO.traction.LabelPanel.prototype.browse=function(a){this.updateHidden();this.completer.clear();this.hide();openInsertLabelDialogSimple(document.fm.edit_project.value,document.fm.edit_labels.value,"","&showcreate=true")};YAHOO.traction.LabelPanel.prototype.submit=function(){this.selector.addTextLeftInInput(this.completer);this.updateHidden();this.completer.clear();this.hide();if(document.fm&&document.fm.edit_title){document.fm.edit_title.focus()}};YAHOO.traction.LabelPanel.prototype.updateHidden=function(){var b=this.selector.labels;var a=Traction.Label.arrayToRS(b);this.list.setHidden(a)};YAHOO.traction.LabelPanel.prototype.getOtherLinksHTML=function(){return''+i18n("labelchooser_change_projects_link_text","Change project")+' | '+i18n("labelchooser_browse_labels_link_text","Browse labels")+""};YAHOO.namespace("traction");YAHOO.traction.LabelSelector=function(a){this.div=a;this.clear()};YAHOO.traction.LabelSelector.prototype.refresh=function(){this.div.innerHTML="";for(var a=0;a0)};YAHOO.traction.LabelSelector.prototype.hasRemoves=function(){return(this.rems!=null&&this.rems.length>0)};YAHOO.traction.LabelSelector.prototype.isNOOP=function(){return(!this.hasAdds()&&!this.hasRemoves())};YAHOO.traction.LabelSelector.prototype.addTextLeftInInput=function(a){if(!this.hasAdds()){var c=a.input.value.trim();if(c==""){}else{if(c.endsWith(":")||c.endsWith("/")){}else{var b=Traction.Label.createNewLabel(null,c);this.add(b)}}}};YAHOO.traction.LabelSelector.prototype.submitReclassification=function(c){if(this.rems.length==0&&this.adds.length==0){return}var a="";for(var b=0;b "+this.labels[b].getDisplayName(c.project)}}if(!a||confirm((new MessageFormat(i18n("labelchooser_new_label_confirmation_message","Are you sure you want to create the following new labels?\n{0}\n\nClick OK to submit and create new labels.\nClick Cancel to return to this page."))).format(a))){curItem=c.toString();if(curItem.indexOf(".")==-1){curItem+=".00"}var d=new Traction.Reclassify(this.rems,this.adds,false,false);d.execute(null,null);return true}else{return false}};YAHOO.traction.LabelSelector.prototype.load=function(a){this.project=a.project;this.clear();this.refresh();var b="";b=fm_append(b,"type=ajaxrpc");b=fm_append(b,"method=getItemLabels");b=fm_append(b,"curitem="+a.toString());xmlpost_async(FORM_ACTION_READ_WRITE,b,null,true,this.load_done.bind(this),null)};YAHOO.traction.LabelSelector.prototype.load_none=function(a){this.project=a;this.clear();this.refresh()};YAHOO.traction.LabelSelector.prototype.load_labels=function(a,b){this.clear();this.labels=b;this.project=a;this.refresh()};YAHOO.traction.LabelSelector.prototype.load_hidden=function(b,a){this.clear();this.labels=Traction.Label.parselist(a);this.project=b;this.refresh()};YAHOO.traction.LabelSelector.prototype.setProject=function(a){this.project=a;this.refresh()};YAHOO.traction.LabelSelector.prototype.load_done=function(responseText,state){if(responseText){this.clear();var arr=eval(responseText);for(var i=0;i0){var a=e.toLowerCase();var b=a.indexOf(h);while(b!=-1){d+=e.substring(0,b)+""+e.substring(b,b+i)+"";e=e.substring(b+i);a=e.toLowerCase();b=a.indexOf(h,b+1)}}d+=e;return d};YAHOO.traction.ProjectCompleter.prototype.clear=function(){this.input.value=""};YAHOO.traction.ProjectCompleter.prototype.focus=function(){this.input.focus()};YAHOO.traction.ProjectCompleter.prototype.position=function(){var b=YAHOO.util.Dom.getRegion(this.input);YAHOO.util.Dom.setXY(this.div,new YAHOO.util.Point(b.left,b.bottom));var a=b.right-b.left;if(a<300){a=300}this.div.style.width=px(a)};YAHOO.traction.ProjectCompleter.prototype.containerExpanded=function(b,a,c){this.position();this.syncDropdown()};YAHOO.traction.ProjectCompleter.prototype.containerCollapsed=function(b,a,c){this.syncDropdown()};YAHOO.traction.ProjectCompleter.prototype.syncDropdown=function(){if(this.dropdown){if(this.autoComplete.isContainerShowing()){this.dropdown.src="/images/dropup.gif"}else{this.dropdown.src="/images/dropdown.gif"}}};YAHOO.traction.ProjectDataSource=function(a,b){this.completer=a;this.permissionChar=((b==null)?"a":b);this._init()};YAHOO.traction.ProjectDataSource.prototype=new YAHOO.widget.DataSource();YAHOO.traction.ProjectDataSource.lastQueryTimeStamp=0;YAHOO.traction.ProjectDataSource.prototype.doQuery=function(a,e,d){var c=e;Debug.println("doQuery: "+e);if(e==null){e=""}e=decodeURIComponent(e);e=e.toLowerCase();YAHOO.traction.ProjectDataSource.lastQueryTimeStamp=(new Date()).getTime();var b={oCallbackFn:a,sOriginalQuery:c,sQuery:e,oParent:d,timeStamp:YAHOO.traction.ProjectDataSource.lastQueryTimeStamp};Traction.LabelCache.getProjects(this.permissionChar,this.doQuery_doneProjects.bind(this),b)};YAHOO.traction.ProjectDataSource.prototype.doQuery_doneProjects=function(b,c){if(YAHOO.traction.ProjectDataSource.lastQueryTimeStamp!=c.timeStamp){return}var e=c.oParent;var h=c.sQuery;var d=c.sOriginalQuery;if(h==null){h=""}h=decodeURIComponent(h);h=h.toLowerCase();var g=new Array();for(var a=0;a0){this.span.appendChild(document.createTextNode(", "))}this.span.appendChild(this.links[a].element)}}if(this.onRefresh!=null){this.onRefresh(this)}};YAHOO.traction.ProjectListDisplay.prototype.onRefresh=null;YAHOO.namespace("traction");YAHOO.traction.ProjectListLink=function(b,a){this.project=b;this.list=a;this.element=document.createElement("SPAN");this.element.innerHTML=this.project.getDisplayName();this.element.onmouseout=this.unhover.bindAsEventListener(this);this.element.onclick=this.click.bindAsEventListener(this);this.element.onmousemove=this.hover.bindAsEventListener(this)};YAHOO.traction.ProjectListLink.prototype.remove=function(){this.project=null;this.list=null};YAHOO.traction.ProjectListLink.prototype.click=function(){this.list.remove(this.project);this.list.refresh()};YAHOO.traction.ProjectListLink.prototype.hover=function(){if(!this.locked){this.element.style.textDecoration="line-through";this.element.style.cursor="pointer"}};YAHOO.traction.ProjectListLink.prototype.unhover=function(){this.element.style.textDecoration="none";this.element.style.cursor=""};YAHOO.namespace("traction");YAHOO.traction.ProjectSelector=function(a){this.div=a;this.clear()};YAHOO.traction.ProjectSelector.prototype.refresh=function(){this.div.innerHTML="";for(var a=0;a'+i18n("labelchooser_change_projects_link_text","Change project")+' | '+i18n("labelchooser_browse_labels_link_text","Browse labels")+""};YAHOO.namespace("traction");YAHOO.traction.SectionListLabelList=function(c,d,b){this.sectionListSetting=c;var a=this;this.sectionListSetting.onChooseLabels=function(f){closeInsertLabelDialog=this.__closeInsertLabelDialog;var g="";if(f!=null){for(var e=0;e{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} Show {RowsPerPageDropdown} per page"),pageReportTemplate:i18n("ssetup_people_paginator_summary","Showing items {startRecord} - {endRecord} of {totalRecords}"),firstPageLinkLabel:"<< "+i18n("ssetup_people_paginator_controls_first_link_text","first"),previousPageLinkLabel:"< "+i18n("ssetup_people_paginator_controls_previous_link_text","prev"),nextPageLinkLabel:i18n("ssetup_people_paginator_controls_next_link_text","next")+" >",lastPageLinkLabel:i18n("ssetup_people_paginator_controls_last_link_text","last")+" >>"};this.dataWidgets.paginator=new YAHOO.widget.Paginator(a);var b={paginator:this.dataWidgets.paginator,paginationEventHandler:this.handlePagination.bind(this),sortedBy:{key:c.sort,dir:c.dir},initialRequest:d};this.dataWidgets.dataTable=new YAHOO.widget.DataTable(this.options.containerID,this.options.columnDefs,this.dataWidgets.dataSource,b);this.dataWidgets.dataTable.subscribe("checkboxClickEvent",this.options.toggleStatusListener,this.dataWidgets.dataTable,true);this.dataWidgets.dataSource.subscribe("requestEvent",this.options.requestListener);this.dataWidgets.dataSource.subscribe("responseEvent",this.options.responseListener);this.dataWidgets.dataTable.sortColumn=this.handleSorting.bind(this)},handlePagination:function(c,a){Debug.println(this.historyID,": handlePagination");var b=a.get("sortedBy");var d=this.generateStateString(c.recordOffset,b.key,b.dir,c.rowsPerPage,this.filterString,this.options.statusFilterCheckbox.checked);YAHOO.util.History.navigate(this.historyID,d)},handleSorting:function(c){Debug.println(this.historyID,": handleSorting");var b="asc";if(c.key==this.dataWidgets.dataTable.get("sortedBy").key){b=(this.dataWidgets.dataTable.get("sortedBy").dir=="asc")?"desc":"asc"}var a=this.generateStateString(0,c.key,b,this.dataWidgets.paginator.getRowsPerPage(),this.filterString,this.options.statusFilterCheckbox.checked);Debug.println(this.historyID,": Sort Navigation ",a);YAHOO.util.History.navigate(this.historyID,a)},onFilterClear:function(){this.options.filterField.value="";this.filterString="";this.resetDisplay();this.options.filterField.focus()},onSearchClick:function(){this.updateFilterString();this.resetDisplay()},updateFilterString:function(){this.filterString=this.options.filterField.value.trim()},onToggleShowInactive:function(){this.resetDisplay()},onFilterChange:function(a){this.updateFilterString();switch(keyCode2(a)){case 13:this.resetDisplay()}}};Traction.TabularDataBrowser.__nextID=0;Traction.TabularDataBrowser.getNextID=function(){return Traction.TabularDataBrowser.__nextID++};Traction.TabularDataBrowser.__dataTableFixed=false;Traction.TabularDataBrowser._fixDataTableDisplay=function(){if(Traction.TabularDataBrowser.__dataTableFixed){return}(function(){var b=YAHOO.widget.DataTable,a=YAHOO.util.Dom;b.prototype._setColumnWidth=function(j,c,i){j=this.getColumn(j);if(j){i=i||"hidden";if(!b._bStylesheetFallback){var e;if(!b._elStylesheet){e=document.createElement("style");e.type="text/css";b._elStylesheet=document.getElementsByTagName("head").item(0).appendChild(e)}if(b._elStylesheet){e=b._elStylesheet;var f=".yui-dt-col-"+j.getId();var h=b._oStylesheetRules[f];if(!h){if(e.styleSheet&&e.styleSheet.addRule){e.styleSheet.addRule(f,"overflow:"+i);e.styleSheet.addRule(f,"width:"+c);h=e.styleSheet.rules[e.styleSheet.rules.length-1]}else{if(e.sheet&&e.sheet.insertRule){e.sheet.insertRule(f+" {overflow:"+i+";width:"+c+";}",e.sheet.cssRules.length);h=e.sheet.cssRules[e.sheet.cssRules.length-1]}else{b._bStylesheetFallback=true}}b._oStylesheetRules[f]=h}else{h.style.overflow=i;h.style.width=c}return}b._bStylesheetFallback=true}if(b._bStylesheetFallback){if(c=="auto"){c=""}var d=this._elTbody?this._elTbody.rows.length:0;if(!this._aFallbackColResizer[d]){var k,l,m;var g=["var colIdx=oColumn.getKeyIndex();","oColumn.getThEl().firstChild.style.width="];for(k=d-1,l=2;k>=0;--k){g[l++]="this._elTbody.rows[";g[l++]=k;g[l++]="].cells[colIdx].firstChild.style.width=";g[l++]="this._elTbody.rows[";g[l++]=k;g[l++]="].cells[colIdx].style.width="}g[l]="sWidth;";g[l+1]="oColumn.getThEl().firstChild.style.overflow=";for(k=d-1,m=l+2;k>=0;--k){g[m++]="this._elTbody.rows[";g[m++]=k;g[m++]="].cells[colIdx].firstChild.style.overflow=";g[m++]="this._elTbody.rows[";g[m++]=k;g[m++]="].cells[colIdx].style.overflow="}g[m]="sOverflow;";this._aFallbackColResizer[d]=new Function("oColumn","sWidth","sOverflow",g.join(""))}var n=this._aFallbackColResizer[d];if(n){n.call(this,j,c,i);return}}}else{}};b.prototype._syncColWidths=function(){var j=this.get("scrollable");if(this._elTbody.rows.length>0){var g=this._oColumnSet.keys,d=this.getFirstTrEl();if(g&&d&&(d.cells.length===g.length)){var e=false;if(j&&(YAHOO.env.ua.gecko||YAHOO.env.ua.opera)){e=true;if(this.get("width")){this._elTheadContainer.style.width="";this._elTbodyContainer.style.width=""}else{this._elContainer.style.width=""}}var k,h,n=d.cells.length;for(k=0;ki.offsetWidth)?m.firstChild:i.firstChild;if(m.offsetWidth!==i.offsetWidth||f.offsetWidth-1;j--){b.purgeElement(s[h].rows[j],true);s[h].removeChild(s[h].rows[j])}}}var r,B=this._oColumnSet;var x=B.tree;var t,p;for(l=0;l0){YAHOO.traction.TractionPanel.superclass.constructor.call(this,b,a)}};YAHOO.extend(YAHOO.traction.TractionPanel,YAHOO.widget.Panel);YAHOO.traction.TractionPanel.prototype.initDefaultConfig=function(){YAHOO.traction.TractionPanel.superclass.initDefaultConfig.call(this);this.cfg.addProperty("minheight",{value:100});this.cfg.addProperty("minwidth",{value:100})};YAHOO.traction.TractionPanel.prototype.configWidth=function(b,a,c){YAHOO.traction.TractionPanel.superclass.configWidth.call(this,b,a,c);this.body.firstChild.style.width=a[0]};YAHOO.traction.TractionPanel.prototype.configHeight=function(c,b,d){YAHOO.traction.TractionPanel.superclass.configHeight.call(this,c,b,d);var a=Util.nopx(b[0]);var e=(a-this.footer.offsetHeight-this.header.offsetHeight);if(e<0){e=0}this.body.style.height=e+"px";this.body.firstChild.style.height=e+"px";this.body.firstChild.firstChild.style.height=e+"px";this.body.firstChild.firstChild.firstChild.style.height=e+"px"};YAHOO.traction.TractionPanel.prototype.fixTransparencyInIE=function(){var b=this.innerElement.offsetWidth;var a=this.innerElement.offsetHeight;this.cfg.setProperty("width",b+"px");this.cfg.setProperty("height",a+"px")};YAHOO.traction.TractionPanel.prototype.init=function(c,b){YAHOO.traction.TractionPanel.superclass.init.call(this,c);this.beforeInitEvent.fire(YAHOO.traction.TractionPanel);var a=YAHOO.util.Dom.getElementsByClassName("br","div",this.footer);if(a.length==0){return}this.resizeHandle=a[0];this.resizeHandle.id=this.id+"_r";this.renderEvent.subscribe(function(){var e=this;this.ddResize=new YAHOO.util.DragDrop(this.resizeHandle.id,this.id);this.ddResize.setHandleElId(this.resizeHandle.id);var d=e.header.offsetHeight;this.ddResize.onMouseDown=function(f){this.startWidth=e.innerElement.offsetWidth;this.startHeight=e.innerElement.offsetHeight;e.cfg.setProperty("width",this.startWidth+"px");e.cfg.setProperty("height",this.startHeight+"px");this.startPos=[YAHOO.util.Event.getPageX(f),YAHOO.util.Event.getPageY(f)];e.innerElement.style.overflow="hidden";e.body.style.overflow="auto"};this.ddResize.onDrag=function(l){var i=[YAHOO.util.Event.getPageX(l),YAHOO.util.Event.getPageY(l)];var f=i[0]-this.startPos[0];var m=i[1]-this.startPos[1];var k=Math.max(this.startWidth+f,10);var h=Math.max(this.startHeight+m,10);var g=e.cfg.getProperty("minheight");var j=e.cfg.getProperty("minwidth");if(k"+f.substring(b,b+j)+"";f=f.substring(b+j);a=f.toLowerCase();b=a.indexOf(i,b+1)}d+=f;return d};YAHOO.traction.UserCompleter.prototype.clear=function(){this.input.value=""};YAHOO.traction.UserCompleter.prototype.position=function(){var b=YAHOO.util.Dom.getRegion(this.input);YAHOO.util.Dom.setXY(this.div,new YAHOO.util.Point(b.left,b.bottom));var a=b.right-b.left;if(a<300){a=300}this.div.style.width=px(a)};YAHOO.traction.UserCompleter.prototype.containerExpanded=function(b,a,c){this.position()};YAHOO.traction.UserDataSource=function(a){this.completer=a;this._init()};YAHOO.traction.UserDataSource.prototype=new YAHOO.widget.DataSource();YAHOO.traction.UserDataSource.lastQueryTimeStamp=0;YAHOO.traction.UserDataSource.prototype.doQuery=function(a,f,e){var d=f;if(f==null){f=""}f=decodeURIComponent(f);f=f.toLowerCase();YAHOO.traction.UserDataSource.lastQueryTimeStamp=(new Date()).getTime();var c={oCallbackFn:a,sOriginalQuery:d,sQuery:f,oParent:e,timeStamp:YAHOO.traction.UserDataSource.lastQueryTimeStamp};var b="";b=fm_append(b,"type=usercompleter");b=fm_append(b,"q="+encode_url_parameter(f));xmlpost_async(FORM_ACTION_READ_ONLY,b,null,false,this.doQuery_done.bind(this),c,-1)};YAHOO.traction.UserDataSource.prototype.doQuery_done=function(responseText,state){if(YAHOO.traction.UserDataSource.lastQueryTimeStamp!=state.timeStamp){return}var responseArray=eval(responseText);var aResults=new Array();for(var i=0;i