1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/webtrees_ynh.git synced 2024-09-03 18:26:37 +02:00
webtrees_ynh/sources/assets/js-1.7.9/webtrees.js

1 line
No EOL
19 KiB
JavaScript

var edit_window_specs="width=620,height=600,left=75,top=50,resizable=1,scrollbars=1",indx_window_specs="width=600,height=600,left=75,top=50,resizable=1,scrollbars=1",news_window_specs="width=620,height=600,left=75,top=50,resizable=1,scrollbars=1",find_window_specs="width=550,height=600,left=75,top=50,resizable=1,scrollbars=1",mesg_window_specs="width=620,height=600,left=75,top=50,resizable=1,scrollbars=1",chan_window_specs="width=600,height=600,left=75,top=50,resizable=1,scrollbars=1",mord_window_specs="width=500,height=600,left=75,top=50,resizable=1,scrollbars=1",assist_window_specs="width=800,height=600,left=75,top=50,resizable=1,scrollbars=1",gmap_window_specs="width=650,height=600,left=75,top=50,resizable=1,scrollbars=1",fam_nav_specs="width=350,height=550,left=25,top=75,resizable=1,scrollbars=1",pastefield,nameElement,remElement,textDirection=jQuery("html").attr("dir");function helpDialog(b,d){jQuery.getJSON("help_text.php?help="+b+"&mod="+d,function(c){modalNotes(c.content,c.title)})}function modalNotes(b,d){jQuery('<div title="'+d+'"></div>').html(b).dialog({modal:!0,width:500,open:function(){var c=this;jQuery(".ui-widget-overlay").on("click",function(){jQuery(c).dialog("close")})}});return !1}function closePopupAndReloadParent(b){parent.opener&&(b?parent.opener.location=b:parent.opener.location.reload());window.close()}function expand_layer(b){jQuery("#"+b+"_img").toggleClass("icon-plus icon-minus");jQuery("#"+b).slideToggle("fast");jQuery("#"+b+"-alt").toggle();return !1}function edit_interface(b,f,d){f=f||edit_window_specs;window.pastefield=d;b="edit_interface.php?"+jQuery.param(b)+"&ged="+WT_GEDCOM;window.open(b,"_blank",f);return !1}function edit_record(b,d){return edit_interface({action:"edit",xref:b,fact_id:d})}function add_fact(b,d){return edit_interface({action:"add",xref:b,fact:d})}function edit_raw(b){return edit_interface({action:"editraw",xref:b})}function edit_note(b){return edit_interface({action:"editnote",xref:b})}function add_record(b,f){var d=jQuery("#"+f).val();if(d){if("OBJE"===d){window.open("addmedia.php?action=showmediaform&linkid="+encodeURIComponent(b)+"&ged="+encodeURIComponent(WT_GEDCOM),"_blank",edit_window_specs)}else{return add_fact(b,d)}}return !1}function reorder_media(b){return edit_interface({action:"reorder_media",xref:b},mord_window_specs)}function add_new_record(b,d){return edit_interface({action:"add",xref:b,fact:d})}function add_child_to_family(b,d){return edit_interface({action:"add_child_to_family",gender:d,xref:b})}function add_child_to_individual(b,d){return edit_interface({action:"add_child_to_individual",gender:d,xref:b})}function add_parent_to_individual(b,d){return edit_interface({action:"add_parent_to_individual",xref:b,gender:d})}function add_spouse_to_family(b,d){return edit_interface({action:"add_spouse_to_family",xref:b,famtag:d})}function add_unlinked_indi(){return edit_interface({action:"add_unlinked_indi"})}function add_spouse_to_individual(b,d){return edit_interface({action:"add_spouse_to_individual",xref:b,famtag:d})}function linkspouse(b,d){return edit_interface({action:"linkspouse",xref:b,famtag:d,famid:"new"})}function add_famc(b){return edit_interface({action:"addfamlink",xref:b})}function edit_name(b,d){return edit_interface({action:"editname",xref:b,fact_id:d})}function add_name(b){return edit_interface({action:"addname",xref:b})}function accept_changes(b){jQuery.post("action.php",{action:"accept-changes",xref:b,ged:WT_GEDCOM,csrf:WT_CSRF_TOKEN},function(){location.reload()});return !1}function reject_changes(b){jQuery.post("action.php",{action:"reject-changes",xref:b,ged:WT_GEDCOM,csrf:WT_CSRF_TOKEN},function(){location.reload()});return !1}function delete_record(b,f,d){confirm(b)&&jQuery.post("action.php",{action:"delete-record",xref:f,ged:"undefined"===typeof d?WT_GEDCOM:d,csrf:WT_CSRF_TOKEN},function(){location.reload()});return !1}function delete_fact(b,f,d){confirm(b)&&jQuery.post("action.php",{action:"delete-fact",xref:f,fact_id:d,ged:WT_GEDCOM,csrf:WT_CSRF_TOKEN},function(){location.reload()});return !1}function unlink_media(b,f,d){confirm(b)&&jQuery.post("action.php",{action:"unlink-media",source:f,target:d,ged:WT_GEDCOM,csrf:WT_CSRF_TOKEN},function(){location.reload()});return !1}function copy_fact(b,d){jQuery.post("action.php",{action:"copy-fact",xref:b,fact_id:d,ged:WT_GEDCOM,csrf:WT_CSRF_TOKEN},function(){location.reload()});return !1}function paste_fact(b,d){jQuery.post("action.php",{action:"paste-fact",xref:b,fact_id:jQuery(d).val(),ged:WT_GEDCOM,csrf:WT_CSRF_TOKEN},function(){location.reload()});return !1}function delete_user(b,d){confirm(b)&&jQuery.post("action.php",{action:"delete-user",user_id:d,csrf:WT_CSRF_TOKEN},function(){location.reload()});return !1}function masquerade(b){jQuery.post("action.php",{action:"masquerade",user_id:b,csrf:WT_CSRF_TOKEN},function(){location.reload()});return !1}function reorder_children(b){return edit_interface({action:"reorder_children",xref:b})}function reorder_families(b){return edit_interface({action:"reorder_fams",xref:b})}function reply(b,d){window.open("message.php?to="+encodeURIComponent(b)+"&subject="+encodeURIComponent(d)+"&ged="+encodeURIComponent(WT_GEDCOM),"_blank",mesg_window_specs);return !1}function delete_message(b){window.open("message.php?action=delete&id="+encodeURIComponent(b)+"&ged="+encodeURIComponent(WT_GEDCOM),"_blank",mesg_window_specs);return !1}function change_family_members(b){return edit_interface({action:"changefamily",xref:b})}function addnewsource(b){return edit_interface({action:"addnewsource",xref:"newsour"},null,b)}function addnewrepository(b){return edit_interface({action:"addnewrepository",xref:"newrepo"},null,b)}function addnewnote(b){return edit_interface({action:"addnewnote",noteid:"newnote"},null,b)}function addnewnote_assisted(b,f,d){return edit_interface({action:"addnewnote_assisted",noteid:"newnote",xref:f,census:d},assist_window_specs,b)}function addmedia_links(b,f,d){pastefield=b;insertRowToTable(f,d);return !1}function valid_date(v){var t="JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC".split(" "),r="MUHAR SAFAR RABIA RABIT JUMAA JUMAT RAJAB SHAAB RAMAD SHAWW DHUAQ DHUAH".split(" "),u="TSH CSH KSL TVT SHV ADR ADS NSN IYR SVN TMZ AAV ELL".split(" "),p="VEND BRUM FRIM NIVO PLUV VENT GERM FLOR PRAI MESS THER FRUC COMP".split(" "),q="FARVA ORDIB KHORD TIR MORDA SHAHR MEHR ABAN AZAR DEY BAHMA ESFAN".split(" "),s=v.value,o=s.split("("),n="";1<o.length&&(s=o[0],n=o[1]);s=s.toUpperCase();s=s.replace(/\s+/," ");s=s.replace(/(^\s)|(\s$)/,"");s=s.replace(/(\d)([A-Z])/,"$1 $2");s=s.replace(/([A-Z])(\d)/,"$1 $2");s.match(/^Q ([1-4]) (\d\d\d\d)$/)&&(s="BET "+t[3*RegExp.$1-3]+" "+RegExp.$2+" AND "+t[3*RegExp.$1-1]+" "+RegExp.$2);s.match(/^(@#DHIJRI@|HIJRI)( \d?\d )(\d?\d)( \d?\d?\d?\d)$/)&&(s="@#DHIJRI@"+RegExp.$2+r[parseInt(RegExp.$3,10)-1]+RegExp.$4);s.match(/^(@#DJALALI@|JALALI)( \d?\d )(\d?\d)( \d?\d?\d?\d)$/)&&(s="@#DJALALI@"+RegExp.$2+q[parseInt(RegExp.$3,10)-1]+RegExp.$4);s.match(/^(@#DHEBREW@|HEBREW)( \d?\d )(\d?\d)( \d?\d?\d?\d)$/)&&(s="@#DHEBREW@"+RegExp.$2+u[parseInt(RegExp.$3,10)-1]+RegExp.$4);s.match(/^(@#DFRENCH R@|FRENCH)( \d?\d )(\d?\d)( \d?\d?\d?\d)$/)&&(s="@#DFRENCH R@"+RegExp.$2+p[parseInt(RegExp.$3,10)-1]+RegExp.$4);if(/^([^\d]*)(\d+)[^\d](\d+)[^\d](\d+)$/i.exec(s)){r=RegExp.$1;u=parseInt(RegExp.$2,10);p=parseInt(RegExp.$3,10);q=parseInt(RegExp.$4,10);o="DMY";"undefined"===typeof locale_date_format||"MDY"!==locale_date_format&&"YMD"!==locale_date_format||(o=locale_date_format);var j=(new Date).getFullYear(),i=j%100,j=j-i;if("DMY"===o&&31>=u&&12>=p||13<u&&31>=u&&12>=p&&31<q){s=r+u+" "+t[p-1]+" "+(100<=q?q:q<=i?q+j:q+j-100)}else{if("MDY"===o&&12>=u&&31>=p||13<p&&31>=p&&12>=u&&31<q){s=r+p+" "+t[u-1]+" "+(100<=q?q:q<=i?q+j:q+j-100)}else{if("YMD"===o&&12>=p&&31>=q||13<q&&31>=q&&12>=p&&31<u){s=r+q+" "+t[p-1]+" "+(100<=u?u:u<=i?u+j:u+j-100)}}}}s=s.replace(/^[>]([\w ]+)$/,"AFT $1");s=s.replace(/^[<]([\w ]+)$/,"BEF $1");s=s.replace(/^([\w ]+)[-]$/,"FROM $1");s=s.replace(/^[-]([\w ]+)$/,"TO $1");s=s.replace(/^[~]([\w ]+)$/,"ABT $1");s=s.replace(/^[*]([\w ]+)$/,"EST $1");s=s.replace(/^[#]([\w ]+)$/,"CAL $1");s=s.replace(/^([\w ]+) ?- ?([\w ]+)$/,"BET $1 AND $2");s=s.replace(/^([\w ]+) ?~ ?([\w ]+)$/,"FROM $1 TO $2");s=s.replace(/(JANUARY)/,"JAN");s=s.replace(/(FEBRUARY)/,"FEB");s=s.replace(/(MARCH)/,"MAR");s=s.replace(/(APRIL)/,"APR");s=s.replace(/(MAY)/,"MAY");s=s.replace(/(JUNE)/,"JUN");s=s.replace(/(JULY)/,"JUL");s=s.replace(/(AUGUST)/,"AUG");s=s.replace(/(SEPTEMBER)/,"SEP");s=s.replace(/(OCTOBER)/,"OCT");s=s.replace(/(NOVEMBER)/,"NOV");s=s.replace(/(DECEMBER)/,"DEC");s=s.replace(/(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)\.? (\d\d?)[, ]+(\d\d\d\d)/,"$2 $1 $3");s=s.replace(/(^| )(\d [A-Z]{3,5} \d{4})/,"$10$2");n&&(s=s+" ("+n);v.value!==s&&(v.value=s)}var menutimeouts=[];function show_submenu(j,p){var n=document.body.scrollWidth+document.documentElement.scrollLeft,i=document.getElementById(j);if(i&&i.style){for(var n=document.all?document.body.offsetWidth:document.body.scrollWidth+document.documentElement.scrollLeft-55,l=0,m=i.childNodes.length,o=0;o<m;o++){var k=i.childNodes[o];k.offsetWidth>l+5&&(l=k.offsetWidth)}i.offsetWidth<l&&(i.style.width=l+"px");if(l=document.getElementById(p)){i.style.left=l.style.left,l=i.offsetLeft+i.offsetWidth+10,l>n&&(i.style.left=n-i.offsetWidth+"px")}0>i.offsetLeft&&(i.style.left="0px");500<i.offsetHeight&&(i.style.height="400px",i.style.overflow="auto");i.style.visibility="visible"}clearTimeout(menutimeouts[j]);menutimeouts[j]=null}function hide_submenu(b){if("number"===typeof menutimeouts[b]){var d=document.getElementById(b);d&&d.style&&(d.style.visibility="hidden");clearTimeout(menutimeouts[b]);menutimeouts[b]=null}}function timeout_submenu(b){"number"!==typeof menutimeouts[b]&&(menutimeouts[b]=setTimeout("hide_submenu('"+b+"')",100))}function statusDisable(b){b=document.getElementById(b);b.checked=!1;b.disabled=!0}function statusEnable(b){document.getElementById(b).disabled=!1}function statusChecked(b){document.getElementById(b).checked=!0}var monthLabels=[,"January","February","March","April","May","June","July","August","September","October","November","December"],monthShort=[,"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"],daysOfWeek="SMTWTFS".split(""),weekStart=0;function cal_setMonthNames(x,v,t,w,r,s,u,q,p,o,j,i){monthLabels[1]=x;monthLabels[2]=v;monthLabels[3]=t;monthLabels[4]=w;monthLabels[5]=r;monthLabels[6]=s;monthLabels[7]=u;monthLabels[8]=q;monthLabels[9]=p;monthLabels[10]=o;monthLabels[11]=j;monthLabels[12]=i}function cal_setDayHeaders(i,n,l,h,j,k,m){daysOfWeek[0]=i;daysOfWeek[1]=n;daysOfWeek[2]=l;daysOfWeek[3]=h;daysOfWeek[4]=j;daysOfWeek[5]=k;daysOfWeek[6]=m}function cal_setWeekStart(b){0<=b&&7>b&&(weekStart=b)}function cal_toggleDate(f,h){var g=document.getElementById(f);if(!g){return !1}if("visible"===g.style.visibility){return g.style.visibility="hidden",!1}if("show"===g.style.visibility){return g.style.visibility="hide",!1}var d=document.getElementById(h);if(!d){return !1}d=/((\d+ (JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC) )?\d+)/.exec(d.value)?new Date(RegExp.$1):new Date;g.innerHTML=cal_generateSelectorContent(h,f,d);if("hidden"===g.style.visibility){return g.style.visibility="visible",!1}"hide"===g.style.visibility&&(g.style.visibility="show");return !1}function cal_generateSelectorContent(i,n,l){var h,j,k;k='<table border="1"><tr>'+('<td><select name="'+i+'_daySelect" id="'+i+'_daySelect" onchange="return cal_updateCalendar(\''+i+"', '"+n+"');\">");for(h=1;32>h;h++){k+='<option value="'+h+'"',l.getDate()===h&&(k+=' selected="selected"'),k+=">"+h+"</option>"}k=k+"</select></td>"+('<td><select name="'+i+'_monSelect" id="'+i+'_monSelect" onchange="return cal_updateCalendar(\''+i+"', '"+n+"');\">");for(h=1;13>h;h++){k+='<option value="'+h+'"',l.getMonth()+1===h&&(k+=' selected="selected"'),k+=">"+monthLabels[h]+"</option>"}k+="</select></td>";k+='<td><input type="text" name="'+i+'_yearInput" id="'+i+'_yearInput" size="5" value="'+l.getFullYear()+'" onchange="return cal_updateCalendar(\''+i+"', '"+n+"');\" /></td></tr>";k+='<tr><td colspan="3">';k+='<table width="100%">';k+="<tr>";j=weekStart;for(h=0;7>h;h++){k+="<td ",k+='class="descriptionbox"',k+=">",k+=daysOfWeek[j],k+="</td>",j++,6<j&&(j=0)}k+="</tr>";var m=new Date(l.getFullYear(),l.getMonth(),1);h=m.getDay();h-=weekStart;m=m.getTime()-86400000*h+43200000;m=new Date(m);for(j=0;6>j;j++){k+="<tr>";for(h=0;7>h;h++){k+="<td ",k=m.getMonth()===l.getMonth()?m.getDate()===l.getDate()?k+'class="descriptionbox"':k+'class="optionbox"':k+'style="background-color:#EAEAEA; border: solid #AAAAAA 1px;"',k+='><a href="#" onclick="return cal_dateClicked(\''+i+"', '"+n+"', "+m.getFullYear()+", "+m.getMonth()+", "+m.getDate()+');">',k+=m.getDate(),k+="</a></td>",m=m.getTime()+86400000,m=new Date(m)}k+="</tr>"}k+="</table>";k+="</td></tr>";return k+="</table>"}function cal_setDateField(f,h,g,d){f=document.getElementById(f);if(!f){return !1}10>d&&(d="0"+d);f.value=d+" "+monthShort[g+1]+" "+h;return !1}function cal_updateCalendar(f,j){var i=document.getElementById(f+"_daySelect");if(!i){return !1}var d=document.getElementById(f+"_monSelect");if(!d){return !1}var h=document.getElementById(f+"_yearInput");if(!h){return !1}d=parseInt(d.options[d.selectedIndex].value,10);i=new Date(h.value,d-1,i.options[i.selectedIndex].value);cal_setDateField(f,i.getFullYear(),i.getMonth(),i.getDate());h=document.getElementById(j);if(!h){return alert("no dateDiv "+j),!1}h.innerHTML=cal_generateSelectorContent(f,j,i);return !1}function cal_dateClicked(f,j,i,d,h){cal_setDateField(f,i,d,h);cal_toggleDate(j,f);return !1}function findWindow(f,h,g,d){d=d||{};d.type=h;d.ged="undefined"===typeof f?WT_GEDCOM:f;window.pastefield=g;window.open("find.php?"+jQuery.param(d),"_blank",find_window_specs);return !1}function findIndi(b,f,d){window.nameElement=f;return findWindow(d,"indi",b)}function findPlace(b,d){return findWindow(d,"place",b)}function findFamily(b,d){return findWindow(d,"fam",b)}function findMedia(b,f,d){return findWindow(d,"media",b,{choose:f||"0all"})}function findSource(b,f,d){window.nameElement=f;return findWindow(d,"source",b)}function findnote(b,f,d){window.nameElement=f;return findWindow(d,"note",b)}function findRepository(b,d){return findWindow(d,"repo",b)}function findSpecialChar(b){return findWindow(void 0,"specialchar",b)}function findFact(b,d){return findWindow(void 0,"fact"+d,document.getElementById(b),{tags:document.getElementById(b).value})}function openerpasteid(b){window.opener.paste_id&&window.opener.paste_id(b);window.close()}function paste_id(b){pastefield.value=b}function pastename(b){nameElement&&(nameElement.innerHTML=b);remElement&&(remElement.style.display="block")}function paste_char(b){document.selection?(pastefield.focus(),document.selection.createRange().text=b):pastefield.selectionStart||0===pastefield.selectionStart?(pastefield.value=pastefield.value.substring(0,pastefield.selectionStart)+b+pastefield.value.substring(pastefield.selectionEnd,pastefield.value.length),pastefield.selectionStart=pastefield.selectionEnd=pastefield.selectionStart+b.length):pastefield.value+=b;"NPFX"!==pastefield.id&&"GIVN"!==pastefield.id&&"SPFX"!==pastefield.id&&"SURN"!==pastefield.id&&"NSFX"!==pastefield.id||updatewholename()}function ilinkitem(b,f,d){d="undefined"===typeof d?WT_GEDCOM:d;window.open("inverselink.php?mediaid="+encodeURIComponent(b)+"&linkto="+encodeURIComponent(f)+"&ged="+encodeURIComponent(d),"_blank",find_window_specs);return !1}function message(b,f,d){window.open("message.php?to="+encodeURIComponent(b)+"&method="+encodeURIComponent(f)+"&url="+encodeURIComponent(d),"_blank",mesg_window_specs);return !1}function persistent_toggle(h,l){var k=document.getElementById(h),d=document.querySelectorAll(l),i=localStorage.getItem(h);if(k){""!==i&&(i="none");k.checked=""===i;for(var j=0;j<d.length;++j){d[j].style.display=i}k.addEventListener("click",function(){console.log(i);i=""===i?"none":"";localStorage.setItem(h,i);for(var a=0;a<d.length;++a){d[a].style.display=i}})}}function valid_lati_long(f,h,g){var d=f.value.toUpperCase(),d=d.replace(/(^\s*)|(\s*$)/g,""),d=d.replace(/ /g,":"),d=d.replace(/\+/g,""),d=d.replace(/-/g,g),d=d.replace(/,/g,"."),d=d.replace(/\u00b0/g,":"),d=d.replace(/\u0027/g,":"),d=d.replace(/^([0-9]+):([0-9]+):([0-9.]+)(.*)/g,function(j,i,n,m,l){j=parseFloat(i);j=j+n/60+m/3600;j=Math.round(10000*j)/10000;return l+j}),d=d.replace(/^([0-9]+):([0-9]+)(.*)/g,function(j,i,l,k){j=parseFloat(i);j=Math.round(10000*(j+l/60))/10000;return k+j});(d=d.replace(/(.*)([N|S|E|W]+)$/g,"$2$1"))&&d.charAt(0)!==g&&d.charAt(0)!==h&&(d=h+d);f.value=d}function activate_colorbox(b){jQuery.extend(jQuery.colorbox.settings,{fixed:!0,current:"",previous:"rtl"===textDirection?"\u25b6":"\u25c0",next:"rtl"===textDirection?"\u25c0":"\u25b6",slideshowStart:"\u25cb",slideshowStop:"\u25cf",close:"\u2715"});b&&jQuery.extend(jQuery.colorbox.settings,b);jQuery("body").on("click","a.gallery",function(){jQuery("a[type^=image].gallery").colorbox({photo:!0,maxWidth:"95%",maxHeight:"95%",rel:"gallery",slideshow:!0,slideshowAuto:!1,onComplete:function(){jQuery(".cboxPhoto").wheelzoom()}})})}function autocomplete(b){"undefined"===typeof b&&(b="input[data-autocomplete-type]");jQuery(b).each(function(){var d=jQuery(this).data("autocomplete-type"),f=jQuery(this).data("autocomplete-ged");"undefined"===typeof d&&alert("Missing data-autocomplete-type attribute");"undefined"===typeof f&&jQuery(this).data("autocomplete-ged",WT_GEDCOM);var c=jQuery(this);c.autocomplete({source:function(e,h){var g=null;c.data("autocomplete-extra")&&(g=jQuery(c.data("autocomplete-extra")).val());jQuery.getJSON("autocomplete.php",{field:c.data("autocomplete-type"),ged:c.data("autocomplete-ged"),extra:g,term:e.term},h)},html:!0})})}jQuery.extend($.ui.accordion.prototype.options,{icons:{header:"rtl"===textDirection?"ui-icon-triangle-1-w":"ui-icon-triangle-1-e",activeHeader:"ui-icon-triangle-1-s"}});jQuery.widget("ui.dialog",jQuery.ui.dialog,{_allowInteraction:function(b){if(this._super(b)||b.target.ownerDocument!==this.document[0]||jQuery(b.target).closest(".cke_dialog").length||jQuery(b.target).closest(".cke").length){return !0}},_moveToTop:function(b,d){b&&this.options.modal||this._super(b,d)}});jQuery("body").on("click",".iconz",function(r){function p(){l.parent().css("z-index",100);q();j.addClass("nameZoom");o.hide(0,function(){m.slideDown()})}function n(){m.slideUp(function(){o.show(0);j.removeClass("nameZoom");q();l.parent().css("z-index","")})}function q(){l.toggleClass(function(){return i+" "+i+"-expanded"})}r.stopPropagation();var l=jQuery(this).closest(".person_box_template"),m=l.find(".inout"),o=l.find(".inout2"),j=l.find(".namedef"),i=l.attr("class").match(/(box-style[0-2])/)[1];m.text().length?l.hasClass(i)?p():n():(l.css("cursor","progress"),m.load("expand_view.php?pid="+l.data("pid"),function(){l.css("cursor","");p()}));l.find(".iconz").toggleClass("icon-zoomin icon-zoomout")});jQuery(".menu-language").on("click","li a",function(){jQuery.post("action.php",{action:"language",language:$(this).data("language"),csrf:WT_CSRF_TOKEN},function(){location.reload()})});jQuery(".menu-theme").on("click","li a",function(){jQuery.post("action.php",{action:"theme",theme:$(this).data("theme"),csrf:WT_CSRF_TOKEN},function(){location.reload()})});function textCompareAsc(b,d){return b.localeCompare(d,WT_LOCALE,{sensitivity:"base"})}function textCompareDesc(b,d){return d.localeCompare(b,WT_LOCALE,{sensitivity:"base"})};