|
|
| Line 81: |
Line 81: |
| 'Y2':['6/63/Button_includeonly.png','Include only',"<includeonly>","<\/includeonly>",'Text'], | | 'Y2':['6/63/Button_includeonly.png','Include only',"<includeonly>","<\/includeonly>",'Text'], |
| 'Z':['3/35/Button_substitute.png','Substituted page link',"{{subst:","}}",'Template'], | | 'Z':['3/35/Button_substitute.png','Substituted page link',"{{subst:","}}",'Template'], |
| 'AI':['c/cc/Button_adv_image.png','Advanced image',"[[Image:","|thumb|right|px|Caption]]",'FileName.jpg'], | | 'AI':['c/cc/Button_adv_image.png','Advanced image',"[[Image:","|thumb|right|px|Caption]]",'FileName.jpg'] |
| 'GEO':['8/8d/Button_geolink.png','Geo location',"","",""],
| |
| 'TALK':['Button_talk.png','Add talk template',"","",""]
| |
| }; | | }; |
|
| |
|
| var XEBOrder2=[]; | | var XEBOrder2=[]; |
|
| |
|
| |
|
| |
|
|
| |
|
| Line 94: |
Line 90: |
| if(!wgIsArticle)// only if edit | | if(!wgIsArticle)// only if edit |
| { | | { |
|
| |
| if(XEBPopups)hookEvent("load", extendButtons); | | if(XEBPopups)hookEvent("load", extendButtons); |
| } | | } |
| Line 214: |
Line 209: |
| extendAButton(Isrc+"Button_cmpl_table.png",XEBPopupTable) | | extendAButton(Isrc+"Button_cmpl_table.png",XEBPopupTable) |
| extendAButton(Isrc+"Button_reflink.png",XEBPopupRef) | | extendAButton(Isrc+"Button_reflink.png",XEBPopupRef) |
| extendAButton(Isrc+"Button_geolink.png",XEBPopupGeoLink)
| |
| extendAButton(Isrc+"Button_talk.png",XEBPopupTalk)
| |
| extendAButton(Isrc+"Button_adv_image.png",XEBPopupImage) | | extendAButton(Isrc+"Button_adv_image.png",XEBPopupImage) |
| //extendAButton(Isrc+"Button_superscript.png",XEBPopupFormattedText) | | //extendAButton(Isrc+"Button_superscript.png",XEBPopupFormattedText) |
| Line 644: |
Line 637: |
| } | | } |
|
| |
|
| //===GEO LINK Function==================================================
| |
|
| |
| function XEBPopupGeoLink(e)
| |
| {
| |
| m=new GetPos(e||event);
| |
|
| |
| curPopup=new XEBPopup("geo",m.x,m.y);
| |
| curPopup.width=300;
| |
| mt='<p>Enter the location parameters below: <\/p>'
| |
| +'<form name="XEBPopupGeoLinkForm">'
| |
| +'Loction:<p\/>'
| |
| +'<table style="background: transparent;">'
| |
| +'<tr><td>Latitude:<\/td><td><input type="text" autocomplete="off" name="geoLatDeg" value="" size="4"><\/td>'
| |
| +'<td><input type="text" name="geoLatMin" size="4"><\/td>'
| |
| +'<td><input type="text" name="geoLatSec" size="4"><\/td>'
| |
| +'<td><select name="geoLatNS"><option value="N">N<option value="S">S</select><\/td><\/tr>'
| |
| +'<tr><td>Longitude:<\/td><td><input type="text" name="geoLonDeg" value="" size="4"><\/td>'
| |
| +'<td><input type="text" name="geoLonMin" value="" size="4"><\/td>'
| |
| +'<td><input type="text" name="geoLonSec" value="" size="4"><\/td>'
| |
| +'<td><select name="geoLonEW"><option value="E">E<option value="W">W</select><\/td><\/tr>'
| |
| +'<\/table>'
| |
| +'Region:<input type="text" name="geoRegion" value="" size="4"><p\/>'
| |
| +'Type:'
| |
| +'<SELECT NAME="geoType" size="5">'
| |
| +'<OPTION VALUE="country">Country<OPTION VALUE="state">State'
| |
| +'<OPTION VALUE="adm1st">Admin unit, 1st level<OPTION VALUE="adm2st">Admin unit, 2nd level'
| |
| +'<OPTION VALUE="city">City<OPTION VALUE="airport">Airport'
| |
| +'<OPTION VALUE="mountain">Mountain<OPTION VALUE="isle">Isle'
| |
| +'<OPTION VALUE="waterbody">Waterbody<OPTION VALUE="landmark" SELECTED>Landmark'
| |
| +'<OPTION VALUE="forest">forest</SELECT><br>'
| |
| +'Title: <input type="checkbox" name="geoTitle" ><p\/>'
| |
| +'<\/form>'
| |
| +'<p><button onClick="javascript:insertGeoLink()">Insert</button>'
| |
| +'<button onClick="hideXEBPopup()">Cancel</button>';
| |
|
| |
| curPopup.setInnerHTML(mt);
| |
| document.paramForm.refName.focus();
| |
| return true;
| |
|
| |
| }
| |
| function insertGeoLink()
| |
| {
| |
| f=document.XEBPopupGeoLinkForm;
| |
|
| |
| var code='{{Coor ';
| |
| if(f.geoTitle.checked)code+='title ';
| |
| ft='dms';
| |
| if(f.geoLatSec.value==''&&f.geoLonSec.value=='')ft='dm';
| |
| if(ft=='dm'&&f.geoLatMin.value==''&&f.geoLonMin.value=='')ft='d';
| |
| code+=ft;
| |
| code+='|'+f.geoLatDeg.value;
| |
| code+=(ft=='dm'||ft=='dms')?'|'+f.geoLatMin.value:'';
| |
| code+=(ft=='dms')?'|'+f.geoLatSec.value:'';
| |
| code+='|'+f.geoLatNS.value;
| |
| code+='|'+f.geoLonDeg.value;
| |
| code+=(ft=='dm'||ft=='dms')?'|'+f.geoLonMin.value:'';
| |
| code+=(ft=='dms')?'|'+f.geoLonSec.value:'';
| |
| code+='|'+f.geoLonEW.value;
| |
| code+='|type:'+f.geoType.value+'_region:'+f.geoRegion.value
| |
| code+='}}';
| |
| insertTags('','', code);
| |
| extendSummary('geo-location');
| |
| hideXEBPopup();
| |
| return false;
| |
| }
| |
|
| |
| //===Talk Page entry Function===========================================
| |
|
| |
| function XEBPopupTalk(e)
| |
| {
| |
| m=new GetPos(e||event);
| |
|
| |
| curPopup=new XEBPopup("talk",m.x,m.y);
| |
| curPopup.width=200;
| |
| mt='<div style="font-size:medium"><p>Please choose:<\/p>'
| |
| mt+='<span class="XEBMnuItm" onclick="XEBInsertTalk(1)">Test1<\/span><br>'
| |
| mt+='<span class="XEBMnuItm" onclick="XEBInsertTalk(2)">Self Test<\/span><br>'
| |
| mt+='<span class="XEBMnuItm" onclick="XEBInsertTalk(3)">Nonsense<\/span><br>'
| |
| mt+='<span class="XEBMnuItm" onclick="XEBInsertTalk(4)">Please stop<\/span><br>'
| |
| mt+='<span class="XEBMnuItm" onclick="XEBInsertTalk(5)">Last chance<\/span><br>'
| |
| mt+='<span class="XEBMnuItm" onclick="XEBInsertTalk(6)">Blanking<\/span><br>'
| |
| mt+='<span class="XEBMnuItm" onclick="XEBInsertTalk(7)">Blatant<\/span><br>'
| |
| mt+='<span class="XEBMnuItm" onclick="XEBInsertTalk(8)">*BLOCKED*<\/span><br>'
| |
| mt+='<span class="XEBMnuItm" onclick="XEBInsertTalk(9)">Spam<\/span><br>'
| |
| mt+='<span class="XEBMnuItm" onclick="XEBInsertTalk(10)">Npov<\/span></div>'
| |
|
| |
| curPopup.setInnerHTML(mt);
| |
|
| |
| return true;
| |
|
| |
| }
| |
| function XEBInsertTalk(itm)
| |
| {
| |
| hideXEBPopup();
| |
| if(itm==1)code='{{subst:test1-n|}}';
| |
| if(itm==2)code='{{subst:selftest-n|}}';
| |
| if(itm==3)code='{{subst:test2-n|}}';
| |
| if(itm==4)code='{{subst:test3-n|}}';
| |
| if(itm==5)code='{{subst:test4-n|}}';
| |
| if(itm==6)code='{{subst:test2a-n|}}';
| |
| if(itm==7)code='{{subst:bv-n|}}';
| |
| if(itm==8)code='{{subst:blantant|}}';
| |
| if(itm==9)code='{{subst:spam-n|}}';
| |
| if(itm==10)code='{{subst:NPOV user}}';
| |
|
| |
| insertTags('','', code);
| |
| return false;
| |
| }
| |
| function XEBPopupImage(e) | | function XEBPopupImage(e) |
| { | | { |