You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
6.7 KiB

9 months ago
var PurpleMine=PurpleMine||{};PurpleMine.HistoryTabs=function(){"use strict";var a,n={en:{all:"All",notes:"Notes",details:"Changes"},ro:{all:"Toate",notes:"Note",details:"Schimbări"},fr:{all:"Tout",notes:"Remarques",details:"Changements"},pl:{all:"Wszystko",notes:"Notatki",details:"Zmiany"},de:{all:"Alles",notes:"Kommentare",details:"Änderungen"},ja:{all:"すべて",notes:"注記",details:"変更"}};var r=function(){var e=$(this),t=e.attr("data-tab");a.$tabs.removeClass("selected"),e.addClass("selected"),a.$history.removeClass("hide-details").removeClass("hide-notes"),"notes"===t?a.$history.addClass("hide-details"):"details"===t&&a.$history.addClass("hide-notes")};return function(){if(a)return a;var e,t,i,s;(a=this).$tabsContainer=null,this.$tabs=null,this.$history=$("#history"),this.lang=document.documentElement.lang,void 0===n[this.lang]&&(this.lang="en"),this._=n[this.lang],0<this.$history.length&&0<$("#history > h3").length&&(e="",s="</a></li>",e=(e=(e=(e+='<div class="tabs"><ul>')+(t='<li><a href="javascript:;" class="')+"selected "+(i='history-tab" data-tab="')+'all">'+a._.all+s)+t+i+'notes">'+a._.notes+s)+t+i+'details">'+a._.details+s+"</ul></div>",a.$tabsContainer=$(e),$("#history > h3").after(a.$tabsContainer),a.$tabs=a.$tabsContainer.find(".history-tab"),a.$tabs.on("click",r),a.$history.find(".has-notes:first").addClass("first-of-notes"),a.$history.find(".has-details:first").addClass("first-of-details"))}}(),(PurpleMine=PurpleMine||{}).MenuCollapse=function(){"use strict";var s,t={en:{topMenuToggler:"Expand/collapse top menu"},ro:{topMenuToggler:"Deschide/închide meniul de sus"},fr:{topMenuToggler:"Développer/réduire le menu principal"},pl:{topMenuToggler:"Zwiń/rozwiń górne menu"},de:{topMenuToggler:"Ein-/Ausklappen Hauptmenu"},ja:{topMenuToggler:"トップメニューの展開/折りたたみ"}};function e(){if(s)return s;for(var e in(s=this).lang=document.documentElement.lang,void 0===t[this.lang]&&(this.lang="en"),this._=t[this.lang],this.menus={top:{$el:$("#top-menu")}},this.menus)this.menus.hasOwnProperty(e)&&0<this.menus[e].$el.length&&!function(e){if("none"===s.menus[e].$el.css("maxHeight"))return;s.menus[e].collapsed=!0,window.localStorage&&(s.menus[e].collapsed=null===localStorage.getItem(i(e)));(function(e){var t=e+"-menu-toggler",i=s._[e+"MenuToggler"],t='<a href="javascript:;" class="'+t+'" title="'+i+'"></a>';s.menus[e].$toggler=$(t),s.menus[e].$el.prepend(s.menus[e].$toggler),s.menus[e].$toggler.on("click",{menu:e},s.toggleMenu)})(e),!1===s.isCollapsed(e)&&s.expandMenu(e)}(e)}function i(e){return"PurpleMine:"+e+"MenuExpanded"}return e.prototype.toggleMenu=function(e){e=e.data.menu||"";s.isCollapsed(e)?s.expandMenu(e):s.collapseMenu(e)},e.prototype.isCollapsed=function(e){return this.menus[e].collapsed},e.prototype.expandMenu=function(e){this.menus[e].$el.addClass("expanded"),this.menus[e].$toggler.addClass("expanded"),this.menus[e].collapsed=!1,window.localStorage&&localStorage.setItem(i(e),"x")},e.prototype.collapseMenu=function(e){this.menus[e].$el.removeClass("expanded"),this.menus[e].$toggler.removeClass("expanded"),this.menus[e].collapsed=!0,window.localStorage&&localStorage.removeItem(i(e))},e}(),(PurpleMine=PurpleMine||{}).RevisionGraph=function(e,t,i){"use strict";var s,a,n,r,o,l,d,u=t,t=$.map(u,function(e){return e}),h=t.length-1,p=$("table.changesets tr.changeset"),g=(null!==revisionGraph?revisionGraph.clear():revisionGraph=new Raphael(e),revisionGraph.set()),c=p.first().find("td").first().position().left-$(e).position().left,m=$(e).position().top,e=c+20*(i+1),b=p.last().position().top+p.last().height()-m,f=(revisionGraph.setSize(e,b),["#e74c3c","#584492","#019851","#ed820c","#4183c4"]);if(f.length<=i){Raphael.getColor.reset();for(var v=0;v<=i;v++)f.push(Raphael.getColor(.9))}$.each(t,function(e,i){i.hasOwnProperty("space")||(i.space=0),n=p.eq(h-i.rdmid).position().top-m+17,a=10+c+20*i.space,revisionGraph.circle(a,n,3.5).attr({fill:f[i.space],stroke:"none"}).toFront(),$.each(i.parent_scmids,function(e,t){s=u[t],(s?(s.hasOwnProperty("space")||(s.space=0),o=p.eq(h-s.rdmid).positio