mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
text align tag + update/edit get desc + rating improve
This commit is contained in:
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
function $(e){if(typeof e=='string')e=document.getElementById(e);return e};
|
||||
function collect(a,f){var n=[];for(var i=0;i<a.length;i++){var v=f(a[i]);if(v!=null)n.push(v)}return n};
|
||||
|
||||
ajax={};
|
||||
ajax.x=function(){try{return new ActiveXObject('Msxml2.XMLHTTP')}catch(e){try{return new ActiveXObject('Microsoft.XMLHTTP')}catch(e){return new XMLHttpRequest()}}};
|
||||
ajax.serialize=function(f){var g=function(n){return f.getElementsByTagName(n)};var nv=function(e){if(e.name)return encodeURIComponent(e.name)+'='+encodeURIComponent(e.value);else return ''};var i=collect(g('input'),function(i){if((i.type!='radio'&&i.type!='checkbox')||i.checked)return nv(i)});var s=collect(g('select'),nv);var t=collect(g('textarea'),nv);return i.concat(s).concat(t).join('&');};
|
||||
ajax.send=function(u,f,m,a){var x=ajax.x();x.open(m,u,true);x.onreadystatechange=function(){if(x.readyState==4)f(x.responseText)};if(m=='POST')x.setRequestHeader('Content-type','application/x-www-form-urlencoded');x.send(a)};
|
||||
ajax.get=function(url,func){ajax.send(url,func,'GET')};
|
||||
ajax.gets=function(url){var x=ajax.x();x.open('GET',url,false);x.send(null);return x.responseText};
|
||||
ajax.post=function(url,func,args){ajax.send(url,func,'POST',args)};
|
||||
ajax.posts=function(url,args){var x=ajax.x(); x.open('POST',url,false); x.setRequestHeader('Content-type','application/x-www-form-urlencoded'); x.send(args); return x.responseText};
|
||||
ajax.update=function(url,elm){var e=$(elm);var f=function(r){e.innerHTML=r};ajax.get(url,f)};
|
||||
ajax.submit=function(url,elm,frm){var e=$(elm);var f=function(r){e.innerHTML=r};ajax.post(url,f,ajax.serialize(frm))};
|
||||
Vendored
+176
@@ -0,0 +1,176 @@
|
||||
if(!window.JSFX)JSFX=new Object();
|
||||
|
||||
var LinkFadeInStep=10;
|
||||
var LinkFadeOutStep=10;
|
||||
var LinkEndColor="FF6600"
|
||||
|
||||
var LinkStartColor="FFFFFF";
|
||||
var LinkFadeRunning=false;
|
||||
|
||||
document.onmouseover = theOnOver;
|
||||
document.onmouseout = theOnOut;
|
||||
if(document.captureEvents)
|
||||
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
|
||||
function hex2dec(hex){return(parseInt(hex,16));}
|
||||
function dec2hex(dec){return (dec < 16 ? "0" : "") + dec.toString(16);}
|
||||
function getColor(start, end, percent)
|
||||
{
|
||||
|
||||
var r1=hex2dec(start.slice(0,2));
|
||||
var g1=hex2dec(start.slice(2,4));
|
||||
var b1=hex2dec(start.slice(4,6));
|
||||
|
||||
var r2=hex2dec(end.slice(0,2));
|
||||
var g2=hex2dec(end.slice(2,4));
|
||||
var b2=hex2dec(end.slice(4,6));
|
||||
|
||||
var pc=percent/100;
|
||||
|
||||
var r=Math.floor(r1+(pc*(r2-r1)) + .5);
|
||||
var g=Math.floor(g1+(pc*(g2-g1)) + .5);
|
||||
var b=Math.floor(b1+(pc*(b2-b1)) + .5);
|
||||
|
||||
return("#" + dec2hex(r) + dec2hex(g) + dec2hex(b));
|
||||
}
|
||||
JSFX.getCurrentElementColor = function(el)
|
||||
{
|
||||
var result = LinkStartColor;
|
||||
|
||||
if (el.currentStyle)
|
||||
result = (el.currentStyle.color);
|
||||
else if (document.defaultView)
|
||||
result = (document.defaultView.getComputedStyle(el,'').getPropertyValue('color'));
|
||||
else if(el.style.color)
|
||||
result = el.style.color;
|
||||
|
||||
if(result.charAt(0) == "#")
|
||||
result = result.slice(1, 8);
|
||||
else if(result.charAt(0) == "r")
|
||||
{
|
||||
var v1 = result.slice(result.indexOf("(")+1, result.indexOf(")") );
|
||||
var v2 = v1.split(",");
|
||||
result = (dec2hex(parseInt(v2[0])) + dec2hex(parseInt(v2[1])) + dec2hex(parseInt(v2[2])));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
JSFX.findTagIE = function(el)
|
||||
{
|
||||
while (el && el.tagName != 'A')
|
||||
el = el.parentElement;
|
||||
return(el);
|
||||
}
|
||||
JSFX.findTagNS= function(el)
|
||||
{
|
||||
while (el && el.nodeName != 'A')
|
||||
el = el.parentNode;
|
||||
return(el);
|
||||
}
|
||||
function theOnOver(e)
|
||||
{
|
||||
var lnk;
|
||||
if(window.event)
|
||||
lnk=JSFX.findTagIE(event.srcElement);
|
||||
else
|
||||
lnk=JSFX.findTagNS(e.target);
|
||||
|
||||
if(lnk)
|
||||
JSFX.linkFadeUp(lnk);
|
||||
}
|
||||
JSFX.linkFadeUp = function(lnk)
|
||||
{
|
||||
if(lnk.state == null)
|
||||
{
|
||||
lnk.state = "OFF";
|
||||
lnk.index = 0;
|
||||
lnk.startColor = JSFX.getCurrentElementColor(lnk);
|
||||
lnk.endColor = LinkEndColor;
|
||||
}
|
||||
|
||||
if(lnk.state == "OFF")
|
||||
{
|
||||
lnk.state = "FADE_UP";
|
||||
JSFX.startLinkFader();
|
||||
}
|
||||
else if( lnk.state == "FADE_UP_DOWN"
|
||||
|| lnk.state == "FADE_DOWN")
|
||||
{
|
||||
lnk.state = "FADE_UP";
|
||||
}
|
||||
}
|
||||
function theOnOut(e)
|
||||
{
|
||||
var lnk;
|
||||
if(window.event)
|
||||
lnk=JSFX.findTagIE(event.srcElement);
|
||||
else
|
||||
lnk=JSFX.findTagNS(e.target);
|
||||
|
||||
if(lnk)
|
||||
JSFX.linkFadeDown(lnk);
|
||||
}
|
||||
JSFX.linkFadeDown = function(lnk)
|
||||
{
|
||||
if(lnk.state=="ON")
|
||||
{
|
||||
lnk.state="FADE_DOWN";
|
||||
JSFX.startLinkFader();
|
||||
}
|
||||
else if(lnk.state == "FADE_UP")
|
||||
{
|
||||
lnk.state="FADE_UP_DOWN";
|
||||
}
|
||||
}
|
||||
JSFX.startLinkFader = function()
|
||||
{
|
||||
if(!LinkFadeRunning)
|
||||
JSFX.LinkFadeAnimation();
|
||||
}
|
||||
JSFX.LinkFadeAnimation = function()
|
||||
{
|
||||
LinkFadeRunning = false;
|
||||
for(i=0 ; i<document.links.length ; i++)
|
||||
{
|
||||
var lnk = document.links[i];
|
||||
if(lnk.state)
|
||||
{
|
||||
if(lnk.state == "FADE_UP")
|
||||
{
|
||||
lnk.index+=LinkFadeInStep;
|
||||
if(lnk.index > 100)
|
||||
lnk.index = 100;
|
||||
lnk.style.color=getColor(lnk.startColor, lnk.endColor, lnk.index);
|
||||
|
||||
if(lnk.index == 100)
|
||||
lnk.state="ON";
|
||||
else
|
||||
LinkFadeRunning = true;
|
||||
}
|
||||
else if(lnk.state == "FADE_UP_DOWN")
|
||||
{
|
||||
lnk.index+=LinkFadeOutStep;
|
||||
if(lnk.index>100)
|
||||
lnk.index = 100;
|
||||
lnk.style.color=getColor(lnk.startColor, lnk.endColor, lnk.index);
|
||||
|
||||
if(lnk.index == 100)
|
||||
lnk.state="FADE_DOWN";
|
||||
LinkFadeRunning = true;
|
||||
}
|
||||
else if(lnk.state == "FADE_DOWN")
|
||||
{
|
||||
lnk.index-=LinkFadeOutStep;
|
||||
if(lnk.index<0)
|
||||
lnk.index = 0;
|
||||
lnk.style.color=getColor(lnk.startColor, lnk.endColor, lnk.index);
|
||||
|
||||
if(lnk.index == 0)
|
||||
lnk.state="OFF";
|
||||
else
|
||||
LinkFadeRunning = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(LinkFadeRunning)
|
||||
setTimeout("JSFX.LinkFadeAnimation()", 40);
|
||||
}
|
||||
Vendored
+406
@@ -0,0 +1,406 @@
|
||||
function postvalid(form){
|
||||
$('qr').disabled = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
function dropmenu(obj){
|
||||
$(obj.id + 'list').style.display = $(obj.id + 'list').style.display == 'none' ? '' : 'none';
|
||||
}
|
||||
|
||||
function confirm_delete(id, note, addon)
|
||||
{
|
||||
if(confirm(note))
|
||||
{
|
||||
self.location.href='?action=del'+(addon ? '&'+addon : '')+'&id='+id;
|
||||
}
|
||||
}
|
||||
|
||||
//viewfilelist.js
|
||||
|
||||
function viewfilelist(torrentid)
|
||||
{
|
||||
var result=ajax.gets('viewfilelist.php?id='+torrentid);
|
||||
document.getElementById("showfl").style.display = 'none';
|
||||
document.getElementById("hidefl").style.display = 'block';
|
||||
showlist(result);
|
||||
}
|
||||
|
||||
function showlist(filelist)
|
||||
{
|
||||
document.getElementById("filelist").innerHTML=filelist;
|
||||
}
|
||||
|
||||
function hidefilelist()
|
||||
{
|
||||
document.getElementById("hidefl").style.display = 'none';
|
||||
document.getElementById("showfl").style.display = 'block';
|
||||
document.getElementById("filelist").innerHTML="";
|
||||
}
|
||||
|
||||
//viewpeerlist.js
|
||||
|
||||
function viewpeerlist(torrentid)
|
||||
{
|
||||
var list=ajax.gets('viewpeerlist.php?id='+torrentid);
|
||||
document.getElementById("showpeer").style.display = 'none';
|
||||
document.getElementById("hidepeer").style.display = 'block';
|
||||
document.getElementById("peercount").style.display = 'none';
|
||||
document.getElementById("peerlist").innerHTML=list;
|
||||
}
|
||||
function hidepeerlist()
|
||||
{
|
||||
document.getElementById("hidepeer").style.display = 'none';
|
||||
document.getElementById("peerlist").innerHTML="";
|
||||
document.getElementById("showpeer").style.display = 'block';
|
||||
document.getElementById("peercount").style.display = 'block';
|
||||
}
|
||||
|
||||
// smileit.js
|
||||
|
||||
function SmileIT(smile,form,text){
|
||||
document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" ";
|
||||
document.forms[form].elements[text].focus();
|
||||
}
|
||||
|
||||
// saythanks.js
|
||||
|
||||
function saythanks(torrentid)
|
||||
{
|
||||
var list=ajax.post('thanks.php','','id='+torrentid);
|
||||
document.getElementById("thanksbutton").innerHTML = document.getElementById("thanksadded").innerHTML;
|
||||
document.getElementById("nothanks").innerHTML = "";
|
||||
document.getElementById("addcuruser").innerHTML = document.getElementById("curuser").innerHTML;
|
||||
}
|
||||
|
||||
// preview.js
|
||||
|
||||
function preview(obj) {
|
||||
var poststr = encodeURIComponent( document.getElementById("body").value );
|
||||
var result=ajax.posts('preview.php','body='+poststr);
|
||||
document.getElementById("previewouter").innerHTML=result;
|
||||
document.getElementById("previewouter").style.display = 'block';
|
||||
document.getElementById("editorouter").style.display = 'none';
|
||||
document.getElementById("unpreviewbutton").style.display = 'block';
|
||||
document.getElementById("previewbutton").style.display = 'none';
|
||||
}
|
||||
|
||||
function unpreview(obj){
|
||||
document.getElementById("previewouter").style.display = 'none';
|
||||
document.getElementById("editorouter").style.display = 'block';
|
||||
document.getElementById("unpreviewbutton").style.display = 'none';
|
||||
document.getElementById("previewbutton").style.display = 'block';
|
||||
}
|
||||
|
||||
function saveMagicValue(torrentid,value)
|
||||
{
|
||||
var list=ajax.posts('magic.php','value='+value +'&id='+torrentid);
|
||||
// document.getElementById("thanksbutton").innerHTML = document.getElementById("thanksadded").innerHTML;
|
||||
document.getElementById("magic_add").value += value;
|
||||
document.getElementById("magic_add").style.display = '';
|
||||
document.getElementById("listNumber").style.display = 'none';
|
||||
document.getElementById("current_user_magic").style.display = '';
|
||||
var sumAll = document.getElementById("spanSumAll").innerHTML;
|
||||
document.getElementById("spanSumAll").innerHTML = sumAll*1 + value;
|
||||
if(document.getElementById("count_user_spa")){
|
||||
var userAll = document.getElementById("count_user_spa").innerHTML;
|
||||
document.getElementById("count_user_spa").innerHTML = userAll*1 + 1;
|
||||
}
|
||||
|
||||
//document.getElementById("listNumber").innerHTML = "<input class=\"btn\" type=\"button\" id="magic_add" value=\""+value+"\" disabled=\"disabled\" />";
|
||||
|
||||
// document.getElementById("addcuruser").innerHTML = document.getElementById("curuser").innerHTML;
|
||||
}
|
||||
|
||||
// java_klappe.js
|
||||
|
||||
function klappe(id)
|
||||
{
|
||||
var klappText = document.getElementById('k' + id);
|
||||
var klappBild = document.getElementById('pic' + id);
|
||||
|
||||
if (klappText.style.display == 'none') {
|
||||
klappText.style.display = 'block';
|
||||
// klappBild.src = 'pic/blank.gif';
|
||||
}
|
||||
else {
|
||||
klappText.style.display = 'none';
|
||||
// klappBild.src = 'pic/blank.gif';
|
||||
}
|
||||
}
|
||||
|
||||
function klappe_news(id)
|
||||
{
|
||||
var klappText = document.getElementById('k' + id);
|
||||
var klappBild = document.getElementById('pic' + id);
|
||||
|
||||
if (klappText.style.display == 'none') {
|
||||
klappText.style.display = '';
|
||||
klappBild.className = 'minus';
|
||||
}
|
||||
else {
|
||||
klappText.style.display = 'none';
|
||||
klappBild.className = 'plus';
|
||||
}
|
||||
}
|
||||
function klappe_ext(id)
|
||||
{
|
||||
var klappText = document.getElementById('k' + id);
|
||||
var klappBild = document.getElementById('pic' + id);
|
||||
var klappPoster = document.getElementById('poster' + id);
|
||||
if (klappText.style.display == 'none') {
|
||||
klappText.style.display = 'block';
|
||||
klappPoster.style.display = 'block';
|
||||
klappBild.className = 'minus';
|
||||
}
|
||||
else {
|
||||
klappText.style.display = 'none';
|
||||
klappPoster.style.display = 'none';
|
||||
klappBild.className = 'plus';
|
||||
}
|
||||
}
|
||||
|
||||
// disableother.js
|
||||
|
||||
function disableother(select,target)
|
||||
{
|
||||
if (document.getElementById(select).value == 0)
|
||||
document.getElementById(target).disabled = false;
|
||||
else {
|
||||
document.getElementById(target).disabled = true;
|
||||
document.getElementById(select).disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function disableother2(oricat,newcat)
|
||||
{
|
||||
if (document.getElementById("movecheck").checked == true){
|
||||
document.getElementById(oricat).disabled = true;
|
||||
document.getElementById(newcat).disabled = false;
|
||||
}
|
||||
else {
|
||||
document.getElementById(oricat).disabled = false;
|
||||
document.getElementById(newcat).disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
// ctrlenter.js
|
||||
var submitted = false;
|
||||
function ctrlenter(event,formname,submitname){
|
||||
if (submitted == false){
|
||||
var keynum;
|
||||
if (event.keyCode){
|
||||
keynum = event.keyCode;
|
||||
}
|
||||
else if (event.which){
|
||||
keynum = event.which;
|
||||
}
|
||||
if (event.ctrlKey && keynum == 13){
|
||||
submitted = true;
|
||||
document.getElementById(formname).submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
function gotothepage(page){
|
||||
var url=window.location.href;
|
||||
var end=url.lastIndexOf("page");
|
||||
url = url.replace(/#[0-9]+/g,"");
|
||||
if (end == -1){
|
||||
if (url.lastIndexOf("?") == -1)
|
||||
window.location.href=url+"?page="+page;
|
||||
else
|
||||
window.location.href=url+"&page="+page;
|
||||
}
|
||||
else{
|
||||
url = url.replace(/page=.+/g,"");
|
||||
window.location.href=url+"page="+page;
|
||||
}
|
||||
}
|
||||
function changepage(event){
|
||||
var gotopage;
|
||||
var keynum;
|
||||
var altkey;
|
||||
if (navigator.userAgent.toLowerCase().indexOf('presto') != -1)
|
||||
altkey = event.shiftKey;
|
||||
else altkey = event.altKey;
|
||||
if (event.keyCode){
|
||||
keynum = event.keyCode;
|
||||
}
|
||||
else if (event.which){
|
||||
keynum = event.which;
|
||||
}
|
||||
if(altkey && keynum==33){
|
||||
if(currentpage<=0) return;
|
||||
gotopage=currentpage-1;
|
||||
gotothepage(gotopage);
|
||||
}
|
||||
else if (altkey && keynum == 34){
|
||||
if(currentpage>=maxpage) return;
|
||||
gotopage=currentpage+1;
|
||||
gotothepage(gotopage);
|
||||
}
|
||||
}
|
||||
if(window.document.addEventListener){
|
||||
window.addEventListener("keydown",changepage,false);
|
||||
}
|
||||
else{
|
||||
window.attachEvent("onkeydown",changepage,false);
|
||||
}
|
||||
|
||||
// bookmark.js
|
||||
function bookmark(torrentid,counter)
|
||||
{
|
||||
var result=ajax.gets('bookmark.php?torrentid='+torrentid);
|
||||
bmicon(result,counter);
|
||||
}
|
||||
function bmicon(status,counter)
|
||||
{
|
||||
if (status=="added")
|
||||
document.getElementById("bookmark"+counter).innerHTML="<img class=\"bookmark\" src=\"pic/trans.gif\" alt=\"Bookmarked\" />";
|
||||
else if (status=="deleted")
|
||||
document.getElementById("bookmark"+counter).innerHTML="<img class=\"delbookmark\" src=\"pic/trans.gif\" src=\"pic/trans.gif\" alt=\"Unbookmarked\" />";
|
||||
}
|
||||
|
||||
// check.js
|
||||
var checkflag = "false";
|
||||
function check(field,checkall_name,uncheckall_name) {
|
||||
if (checkflag == "false") {
|
||||
for (i = 0; i < field.length; i++) {
|
||||
field[i].checked = true;}
|
||||
checkflag = "true";
|
||||
return uncheckall_name; }
|
||||
else {
|
||||
for (i = 0; i < field.length; i++) {
|
||||
field[i].checked = false; }
|
||||
checkflag = "false";
|
||||
return checkall_name; }
|
||||
}
|
||||
|
||||
// in torrents.php
|
||||
var form='searchbox';
|
||||
function SetChecked(chkName,ctrlName,checkall_name,uncheckall_name,start,count) {
|
||||
dml=document.forms[form];
|
||||
len = dml.elements.length;
|
||||
var begin;
|
||||
var end;
|
||||
if (start == -1){
|
||||
begin = 0;
|
||||
end = len;
|
||||
}
|
||||
else{
|
||||
begin = start;
|
||||
end = start + count;
|
||||
}
|
||||
var check_state;
|
||||
for( i=0 ; i<len ; i++) {
|
||||
if(dml.elements[i].name==ctrlName)
|
||||
{
|
||||
if(dml.elements[i].value == checkall_name)
|
||||
{
|
||||
dml.elements[i].value = uncheckall_name;
|
||||
check_state=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
dml.elements[i].value = checkall_name;
|
||||
check_state=0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
for( i=begin ; i<end ; i++) {
|
||||
if (dml.elements[i].name.indexOf(chkName) != -1) {
|
||||
dml.elements[i].checked=check_state;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// funvote.js
|
||||
function funvote(funid,yourvote)
|
||||
{
|
||||
var result=ajax.gets('fun.php?action=vote&id='+funid+"&yourvote="+yourvote);
|
||||
voteaccept(yourvote);
|
||||
}
|
||||
function voteaccept(yourvote)
|
||||
{
|
||||
if (yourvote=="fun" || yourvote=="dull"){
|
||||
document.getElementById("funvote").style.display = 'none';
|
||||
document.getElementById("voteaccept").style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
// in upload.php
|
||||
function getname()
|
||||
{
|
||||
var filename = document.getElementById("torrent").value;
|
||||
var filename = filename.toString();
|
||||
var lowcase = filename.toLowerCase();
|
||||
var start = lowcase.lastIndexOf("\\"); //for Google Chrome on windows
|
||||
if (start == -1){
|
||||
start = lowcase.lastIndexOf("\/"); // for Google Chrome on linux
|
||||
if (start == -1)
|
||||
start == 0;
|
||||
else start = start + 1;
|
||||
}
|
||||
else start = start + 1;
|
||||
var end = lowcase.lastIndexOf("torrent");
|
||||
var noext = filename.substring(start,end-1);
|
||||
noext = noext.replace(/H\.264/ig,"H_264");
|
||||
noext = noext.replace(/5\.1/g,"5_1");
|
||||
noext = noext.replace(/2\.1/g,"2_1");
|
||||
noext = noext.replace(/\./g," ");
|
||||
noext = noext.replace(/H_264/g,"H.264");
|
||||
noext = noext.replace(/5_1/g,"5.1");
|
||||
noext = noext.replace(/2_1/g,"2.1");
|
||||
document.getElementById("name").value=noext;
|
||||
}
|
||||
|
||||
// in userdetails.php
|
||||
function getusertorrentlistajax(userid, type, blockid)
|
||||
{
|
||||
if (document.getElementById(blockid).innerHTML==""){
|
||||
var infoblock=ajax.gets('getusertorrentlistajax.php?userid='+userid+'&type='+type);
|
||||
document.getElementById(blockid).innerHTML=infoblock;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// in functions.php
|
||||
function get_ext_info_ajax(blockid,url,cache,type)
|
||||
{
|
||||
if (document.getElementById(blockid).innerHTML==""){
|
||||
var infoblock=ajax.gets('getextinfoajax.php?url='+url+'&cache='+cache+'&type='+type);
|
||||
document.getElementById(blockid).innerHTML=infoblock;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// in userdetails.php
|
||||
function enabledel(msg){
|
||||
document.deluser.submit.disabled=document.deluser.submit.checked;
|
||||
alert (msg);
|
||||
}
|
||||
|
||||
function disabledel(){
|
||||
document.deluser.submit.disabled=!document.deluser.submit.checked;
|
||||
}
|
||||
|
||||
// in mybonus.php
|
||||
function customgift()
|
||||
{
|
||||
if (document.getElementById("giftselect").value == '0'){
|
||||
document.getElementById("giftselect").disabled = true;
|
||||
document.getElementById("giftcustom").disabled = false;
|
||||
}
|
||||
}
|
||||
// settings.php
|
||||
function NewRow(anchor,up){
|
||||
var thisRow = anchor.parentNode.parentNode;
|
||||
var newRow = thisRow.cloneNode(true);
|
||||
var InputBoxes = newRow.getElementsByTagName("input");
|
||||
for(i=0; i<InputBoxes.length; i++) InputBoxes.item(i).value = "";
|
||||
var position = up ? "beforeBegin" : "afterEnd";
|
||||
thisRow.insertAdjacentElement(position,newRow);
|
||||
}
|
||||
function DelRow(anchor){
|
||||
anchor.parentNode.parentNode.parentNode.parentNode.deleteRow(anchor.parentNode.parentNode.rowIndex);
|
||||
}
|
||||
Vendored
+86
@@ -0,0 +1,86 @@
|
||||
if (navigator.appName=="Netscape") {
|
||||
document.write("<style type='text/css'>body {overflow-y:scroll;}<\/style>");
|
||||
}
|
||||
var userAgent = navigator.userAgent.toLowerCase();
|
||||
var is_ie = (userAgent.indexOf('msie') != -1) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);
|
||||
|
||||
function $() {
|
||||
var elements = new Array();
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var element = arguments[i];
|
||||
if (typeof element == 'string')
|
||||
element = document.getElementById(element);
|
||||
if (arguments.length == 1)
|
||||
return element;
|
||||
elements.push(element);
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
|
||||
function Scale(image, max_width, max_height) {
|
||||
var tempimage = new Image();
|
||||
tempimage.src = image.src;
|
||||
var tempwidth = tempimage.width;
|
||||
var tempheight = tempimage.height;
|
||||
if (tempwidth > max_width) {
|
||||
image.height = tempheight = Math.round(((max_width)/tempwidth) * tempheight);
|
||||
image.width = tempwidth = max_width;
|
||||
}
|
||||
|
||||
if (max_height != 0 && tempheight > max_height)
|
||||
{
|
||||
image.width = Math.round(((max_height)/tempheight) * tempwidth);
|
||||
image.height = max_height;
|
||||
}
|
||||
}
|
||||
|
||||
function check_avatar(image, langfolder){
|
||||
var tempimage = new Image();
|
||||
tempimage.src = image.src;
|
||||
var displayheight = image.height;
|
||||
var tempwidth = tempimage.width;
|
||||
var tempheight = tempimage.height;
|
||||
if (tempwidth > 250 || tempheight > 250 || displayheight > 250) {
|
||||
image.src='pic/forum_pic/'+langfolder+'/avatartoobig.png';
|
||||
}
|
||||
}
|
||||
|
||||
function Preview(image) {
|
||||
if (!is_ie || is_ie >= 7){
|
||||
$('lightbox').innerHTML = "<a onclick=\"Return();\"><img src=\"" + image.src + "\" /></a>";
|
||||
$('curtain').style.display = "block";
|
||||
$('lightbox').style.display = "block";
|
||||
}
|
||||
else{
|
||||
window.open(image.src);
|
||||
}
|
||||
}
|
||||
|
||||
function Previewurl(url) {
|
||||
if (!is_ie || is_ie >= 7){
|
||||
$('lightbox').innerHTML = "<a onclick=\"Return();\"><img src=\"" + url + "\" /></a>";
|
||||
$('curtain').style.display = "block";
|
||||
$('lightbox').style.display = "block";
|
||||
}
|
||||
else{
|
||||
window.open(url);
|
||||
}
|
||||
}
|
||||
|
||||
function findPosition( oElement ) {
|
||||
if( typeof( oElement.offsetParent ) != 'undefined' ) {
|
||||
for( var posX = 0, posY = 0; oElement; oElement = oElement.offsetParent ) {
|
||||
posX += oElement.offsetLeft;
|
||||
posY += oElement.offsetTop;
|
||||
}
|
||||
return [ posX, posY ];
|
||||
} else {
|
||||
return [ oElement.x, oElement.y ];
|
||||
}
|
||||
}
|
||||
|
||||
function Return() {
|
||||
$('lightbox').style.display = "none";
|
||||
$('curtain').style.display = "none";
|
||||
$('lightbox').innerHTML = "";
|
||||
}
|
||||
Vendored
+704
@@ -0,0 +1,704 @@
|
||||
/** $Id: domLib.js 2321 2006-06-12 06:45:41Z dallen $ */
|
||||
// {{{ license
|
||||
|
||||
/*
|
||||
* Copyright 2002-2005 Dan Allen, Mojavelinux.com (dan.allen@mojavelinux.com)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// }}}
|
||||
// {{{ intro
|
||||
|
||||
/**
|
||||
* Title: DOM Library Core
|
||||
* Version: 0.70
|
||||
*
|
||||
* Summary:
|
||||
* A set of commonly used functions that make it easier to create javascript
|
||||
* applications that rely on the DOM.
|
||||
*
|
||||
* Updated: 2005/05/17
|
||||
*
|
||||
* Maintainer: Dan Allen <dan.allen@mojavelinux.com>
|
||||
* Maintainer: Jason Rust <jrust@rustyparts.com>
|
||||
*
|
||||
* License: Apache 2.0
|
||||
*/
|
||||
|
||||
// }}}
|
||||
// {{{ global constants (DO NOT EDIT)
|
||||
|
||||
// -- Browser Detection --
|
||||
var domLib_userAgent = navigator.userAgent.toLowerCase();
|
||||
var domLib_isMac = navigator.appVersion.indexOf('Mac') != -1;
|
||||
var domLib_isWin = domLib_userAgent.indexOf('windows') != -1;
|
||||
// NOTE: could use window.opera for detecting Opera
|
||||
var domLib_isOpera = domLib_userAgent.indexOf('opera') != -1;
|
||||
var domLib_isOpera7up = domLib_userAgent.match(/opera.(7|8)/i);
|
||||
var domLib_isSafari = domLib_userAgent.indexOf('safari') != -1;
|
||||
var domLib_isKonq = domLib_userAgent.indexOf('konqueror') != -1;
|
||||
// Both konqueror and safari use the khtml rendering engine
|
||||
var domLib_isKHTML = (domLib_isKonq || domLib_isSafari || domLib_userAgent.indexOf('khtml') != -1);
|
||||
var domLib_isIE = (!domLib_isKHTML && !domLib_isOpera && domLib_userAgent.indexOf('msie') != -1);
|
||||
var domLib_isIE5up = domLib_isIE;
|
||||
var domLib_isIE50 = (domLib_isIE && domLib_userAgent.indexOf('msie 5.0') != -1);
|
||||
var domLib_isIE55 = (domLib_isIE && domLib_userAgent.indexOf('msie 5.5') != -1);
|
||||
var domLib_isIE5 = (domLib_isIE50 || domLib_isIE55);
|
||||
// safari and konq may use string "khtml, like gecko", so check for destinctive /
|
||||
var domLib_isGecko = domLib_userAgent.indexOf('gecko/') != -1;
|
||||
var domLib_isMacIE = (domLib_isIE && domLib_isMac);
|
||||
var domLib_isIE55up = domLib_isIE5up && !domLib_isIE50 && !domLib_isMacIE;
|
||||
var domLib_isIE6up = domLib_isIE55up && !domLib_isIE55;
|
||||
|
||||
// -- Browser Abilities --
|
||||
var domLib_standardsMode = (document.compatMode && document.compatMode == 'CSS1Compat');
|
||||
var domLib_useLibrary = (domLib_isOpera7up || domLib_isKHTML || domLib_isIE5up || domLib_isGecko || domLib_isMacIE || document.defaultView);
|
||||
// fixed in Konq3.2
|
||||
var domLib_hasBrokenTimeout = (domLib_isMacIE || (domLib_isKonq && domLib_userAgent.match(/konqueror\/3.([2-9])/) == null));
|
||||
var domLib_canFade = (domLib_isGecko || domLib_isIE || domLib_isSafari || domLib_isOpera);
|
||||
var domLib_canDrawOverSelect = (domLib_isMac || domLib_isOpera || domLib_isGecko);
|
||||
var domLib_canDrawOverFlash = (domLib_isMac || domLib_isWin);
|
||||
|
||||
// -- Event Variables --
|
||||
var domLib_eventTarget = domLib_isIE ? 'srcElement' : 'currentTarget';
|
||||
var domLib_eventButton = domLib_isIE ? 'button' : 'which';
|
||||
var domLib_eventTo = domLib_isIE ? 'toElement' : 'relatedTarget';
|
||||
var domLib_stylePointer = domLib_isIE ? 'hand' : 'pointer';
|
||||
// NOTE: a bug exists in Opera that prevents maxWidth from being set to 'none', so we make it huge
|
||||
var domLib_styleNoMaxWidth = domLib_isOpera ? '10000px' : 'none';
|
||||
var domLib_hidePosition = '-1000px';
|
||||
var domLib_scrollbarWidth = 14;
|
||||
var domLib_autoId = 1;
|
||||
var domLib_zIndex = 100;
|
||||
|
||||
// -- Detection --
|
||||
var domLib_collisionElements;
|
||||
var domLib_collisionsCached = false;
|
||||
|
||||
var domLib_timeoutStateId = 0;
|
||||
var domLib_timeoutStates = new Hash();
|
||||
|
||||
// }}}
|
||||
// {{{ DOM enhancements
|
||||
|
||||
if (!document.ELEMENT_NODE)
|
||||
{
|
||||
document.ELEMENT_NODE = 1;
|
||||
document.ATTRIBUTE_NODE = 2;
|
||||
document.TEXT_NODE = 3;
|
||||
document.DOCUMENT_NODE = 9;
|
||||
document.DOCUMENT_FRAGMENT_NODE = 11;
|
||||
}
|
||||
|
||||
function domLib_clone(obj)
|
||||
{
|
||||
var copy = {};
|
||||
for (var i in obj)
|
||||
{
|
||||
var value = obj[i];
|
||||
try
|
||||
{
|
||||
if (value != null && typeof(value) == 'object' && value != window && !value.nodeType)
|
||||
{
|
||||
copy[i] = domLib_clone(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
copy[i] = value;
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
copy[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ class Hash()
|
||||
|
||||
function Hash()
|
||||
{
|
||||
this.length = 0;
|
||||
this.numericLength = 0;
|
||||
this.elementData = [];
|
||||
for (var i = 0; i < arguments.length; i += 2)
|
||||
{
|
||||
if (typeof(arguments[i + 1]) != 'undefined')
|
||||
{
|
||||
this.elementData[arguments[i]] = arguments[i + 1];
|
||||
this.length++;
|
||||
if (arguments[i] == parseInt(arguments[i]))
|
||||
{
|
||||
this.numericLength++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// using prototype as opposed to inner functions saves on memory
|
||||
Hash.prototype.get = function(in_key)
|
||||
{
|
||||
if (typeof(this.elementData[in_key]) != 'undefined') {
|
||||
return this.elementData[in_key];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Hash.prototype.set = function(in_key, in_value)
|
||||
{
|
||||
if (typeof(in_value) != 'undefined')
|
||||
{
|
||||
if (typeof(this.elementData[in_key]) == 'undefined')
|
||||
{
|
||||
this.length++;
|
||||
if (in_key == parseInt(in_key))
|
||||
{
|
||||
this.numericLength++;
|
||||
}
|
||||
}
|
||||
|
||||
return this.elementData[in_key] = in_value;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Hash.prototype.remove = function(in_key)
|
||||
{
|
||||
var tmp_value;
|
||||
if (typeof(this.elementData[in_key]) != 'undefined')
|
||||
{
|
||||
this.length--;
|
||||
if (in_key == parseInt(in_key))
|
||||
{
|
||||
this.numericLength--;
|
||||
}
|
||||
|
||||
tmp_value = this.elementData[in_key];
|
||||
delete this.elementData[in_key];
|
||||
}
|
||||
|
||||
return tmp_value;
|
||||
}
|
||||
|
||||
Hash.prototype.size = function()
|
||||
{
|
||||
return this.length;
|
||||
}
|
||||
|
||||
Hash.prototype.has = function(in_key)
|
||||
{
|
||||
return typeof(this.elementData[in_key]) != 'undefined';
|
||||
}
|
||||
|
||||
Hash.prototype.find = function(in_obj)
|
||||
{
|
||||
for (var tmp_key in this.elementData)
|
||||
{
|
||||
if (this.elementData[tmp_key] == in_obj)
|
||||
{
|
||||
return tmp_key;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
Hash.prototype.merge = function(in_hash)
|
||||
{
|
||||
for (var tmp_key in in_hash.elementData)
|
||||
{
|
||||
if (typeof(this.elementData[tmp_key]) == 'undefined')
|
||||
{
|
||||
this.length++;
|
||||
if (tmp_key == parseInt(tmp_key))
|
||||
{
|
||||
this.numericLength++;
|
||||
}
|
||||
}
|
||||
|
||||
this.elementData[tmp_key] = in_hash.elementData[tmp_key];
|
||||
}
|
||||
}
|
||||
|
||||
Hash.prototype.compare = function(in_hash)
|
||||
{
|
||||
if (this.length != in_hash.length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var tmp_key in this.elementData)
|
||||
{
|
||||
if (this.elementData[tmp_key] != in_hash.elementData[tmp_key])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domLib_isDescendantOf()
|
||||
|
||||
function domLib_isDescendantOf(in_object, in_ancestor, in_bannedTags)
|
||||
{
|
||||
if (in_object == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (in_object == in_ancestor)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (typeof(in_bannedTags) != 'undefined' &&
|
||||
(',' + in_bannedTags.join(',') + ',').indexOf(',' + in_object.tagName + ',') != -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
while (in_object != document.documentElement)
|
||||
{
|
||||
try
|
||||
{
|
||||
if ((tmp_object = in_object.offsetParent) && tmp_object == in_ancestor)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ((tmp_object = in_object.parentNode) == in_ancestor)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
in_object = tmp_object;
|
||||
}
|
||||
}
|
||||
// in case we get some wierd error, assume we left the building
|
||||
catch(e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domLib_detectCollisions()
|
||||
|
||||
/**
|
||||
* For any given target element, determine if elements on the page
|
||||
* are colliding with it that do not obey the rules of z-index.
|
||||
*/
|
||||
function domLib_detectCollisions(in_object, in_recover, in_useCache)
|
||||
{
|
||||
// the reason for the cache is that if the root menu is built before
|
||||
// the page is done loading, then it might not find all the elements.
|
||||
// so really the only time you don't use cache is when building the
|
||||
// menu as part of the page load
|
||||
if (!domLib_collisionsCached)
|
||||
{
|
||||
var tags = [];
|
||||
|
||||
if (!domLib_canDrawOverFlash)
|
||||
{
|
||||
tags[tags.length] = 'object';
|
||||
}
|
||||
|
||||
if (!domLib_canDrawOverSelect)
|
||||
{
|
||||
tags[tags.length] = 'select';
|
||||
}
|
||||
|
||||
domLib_collisionElements = domLib_getElementsByTagNames(tags, true);
|
||||
domLib_collisionsCached = in_useCache;
|
||||
}
|
||||
|
||||
// if we don't have a tip, then unhide selects
|
||||
if (in_recover)
|
||||
{
|
||||
for (var cnt = 0; cnt < domLib_collisionElements.length; cnt++)
|
||||
{
|
||||
var thisElement = domLib_collisionElements[cnt];
|
||||
|
||||
if (!thisElement.hideList)
|
||||
{
|
||||
thisElement.hideList = new Hash();
|
||||
}
|
||||
|
||||
thisElement.hideList.remove(in_object.id);
|
||||
if (!thisElement.hideList.length)
|
||||
{
|
||||
domLib_collisionElements[cnt].style.visibility = 'visible';
|
||||
if (domLib_isKonq)
|
||||
{
|
||||
domLib_collisionElements[cnt].style.display = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else if (domLib_collisionElements.length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// okay, we have a tip, so hunt and destroy
|
||||
var objectOffsets = domLib_getOffsets(in_object);
|
||||
|
||||
for (var cnt = 0; cnt < domLib_collisionElements.length; cnt++)
|
||||
{
|
||||
var thisElement = domLib_collisionElements[cnt];
|
||||
|
||||
// if collision element is in active element, move on
|
||||
// WARNING: is this too costly?
|
||||
if (domLib_isDescendantOf(thisElement, in_object))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// konqueror only has trouble with multirow selects
|
||||
if (domLib_isKonq &&
|
||||
thisElement.tagName == 'SELECT' &&
|
||||
(thisElement.size <= 1 && !thisElement.multiple))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!thisElement.hideList)
|
||||
{
|
||||
thisElement.hideList = new Hash();
|
||||
}
|
||||
|
||||
var selectOffsets = domLib_getOffsets(thisElement);
|
||||
var center2centerDistance = Math.sqrt(Math.pow(selectOffsets.get('leftCenter') - objectOffsets.get('leftCenter'), 2) + Math.pow(selectOffsets.get('topCenter') - objectOffsets.get('topCenter'), 2));
|
||||
var radiusSum = selectOffsets.get('radius') + objectOffsets.get('radius');
|
||||
// the encompassing circles are overlapping, get in for a closer look
|
||||
if (center2centerDistance < radiusSum)
|
||||
{
|
||||
// tip is left of select
|
||||
if ((objectOffsets.get('leftCenter') <= selectOffsets.get('leftCenter') && objectOffsets.get('right') < selectOffsets.get('left')) ||
|
||||
// tip is right of select
|
||||
(objectOffsets.get('leftCenter') > selectOffsets.get('leftCenter') && objectOffsets.get('left') > selectOffsets.get('right')) ||
|
||||
// tip is above select
|
||||
(objectOffsets.get('topCenter') <= selectOffsets.get('topCenter') && objectOffsets.get('bottom') < selectOffsets.get('top')) ||
|
||||
// tip is below select
|
||||
(objectOffsets.get('topCenter') > selectOffsets.get('topCenter') && objectOffsets.get('top') > selectOffsets.get('bottom')))
|
||||
{
|
||||
thisElement.hideList.remove(in_object.id);
|
||||
if (!thisElement.hideList.length)
|
||||
{
|
||||
thisElement.style.visibility = 'visible';
|
||||
if (domLib_isKonq)
|
||||
{
|
||||
thisElement.style.display = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
thisElement.hideList.set(in_object.id, true);
|
||||
thisElement.style.visibility = 'hidden';
|
||||
if (domLib_isKonq)
|
||||
{
|
||||
thisElement.style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domLib_getOffsets()
|
||||
|
||||
function domLib_getOffsets(in_object, in_preserveScroll)
|
||||
{
|
||||
if (typeof(in_preserveScroll) == 'undefined') {
|
||||
in_preserveScroll = false;
|
||||
}
|
||||
|
||||
var originalObject = in_object;
|
||||
var originalWidth = in_object.offsetWidth;
|
||||
var originalHeight = in_object.offsetHeight;
|
||||
var offsetLeft = 0;
|
||||
var offsetTop = 0;
|
||||
|
||||
while (in_object)
|
||||
{
|
||||
offsetLeft += in_object.offsetLeft;
|
||||
offsetTop += in_object.offsetTop;
|
||||
in_object = in_object.offsetParent;
|
||||
// consider scroll offset of parent elements
|
||||
if (in_object && !in_preserveScroll)
|
||||
{
|
||||
offsetLeft -= in_object.scrollLeft;
|
||||
offsetTop -= in_object.scrollTop;
|
||||
}
|
||||
}
|
||||
|
||||
// MacIE misreports the offsets (even with margin: 0 in body{}), still not perfect
|
||||
if (domLib_isMacIE) {
|
||||
offsetLeft += 10;
|
||||
offsetTop += 10;
|
||||
}
|
||||
|
||||
return new Hash(
|
||||
'left', offsetLeft,
|
||||
'top', offsetTop,
|
||||
'right', offsetLeft + originalWidth,
|
||||
'bottom', offsetTop + originalHeight,
|
||||
'leftCenter', offsetLeft + originalWidth/2,
|
||||
'topCenter', offsetTop + originalHeight/2,
|
||||
'radius', Math.max(originalWidth, originalHeight)
|
||||
);
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domLib_setTimeout()
|
||||
|
||||
function domLib_setTimeout(in_function, in_timeout, in_args)
|
||||
{
|
||||
if (typeof(in_args) == 'undefined')
|
||||
{
|
||||
in_args = [];
|
||||
}
|
||||
|
||||
if (in_timeout == -1)
|
||||
{
|
||||
// timeout event is disabled
|
||||
return 0;
|
||||
}
|
||||
else if (in_timeout == 0)
|
||||
{
|
||||
in_function(in_args);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// must make a copy of the arguments so that we release the reference
|
||||
var args = domLib_clone(in_args);
|
||||
|
||||
if (!domLib_hasBrokenTimeout)
|
||||
{
|
||||
return setTimeout(function() { in_function(args); }, in_timeout);
|
||||
}
|
||||
else
|
||||
{
|
||||
var id = domLib_timeoutStateId++;
|
||||
var data = new Hash();
|
||||
data.set('function', in_function);
|
||||
data.set('args', args);
|
||||
domLib_timeoutStates.set(id, data);
|
||||
|
||||
data.set('timeoutId', setTimeout('domLib_timeoutStates.get(' + id + ').get(\'function\')(domLib_timeoutStates.get(' + id + ').get(\'args\')); domLib_timeoutStates.remove(' + id + ');', in_timeout));
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domLib_clearTimeout()
|
||||
|
||||
function domLib_clearTimeout(in_id)
|
||||
{
|
||||
if (!domLib_hasBrokenTimeout)
|
||||
{
|
||||
if (in_id > 0) {
|
||||
clearTimeout(in_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (domLib_timeoutStates.has(in_id))
|
||||
{
|
||||
clearTimeout(domLib_timeoutStates.get(in_id).get('timeoutId'))
|
||||
domLib_timeoutStates.remove(in_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domLib_getEventPosition()
|
||||
|
||||
function domLib_getEventPosition(in_eventObj)
|
||||
{
|
||||
var eventPosition = new Hash('x', 0, 'y', 0, 'scrollX', 0, 'scrollY', 0);
|
||||
|
||||
// IE varies depending on standard compliance mode
|
||||
if (domLib_isIE)
|
||||
{
|
||||
var doc = (domLib_standardsMode ? document.documentElement : document.body);
|
||||
// NOTE: events may fire before the body has been loaded
|
||||
if (doc)
|
||||
{
|
||||
eventPosition.set('x', in_eventObj.clientX + doc.scrollLeft);
|
||||
eventPosition.set('y', in_eventObj.clientY + doc.scrollTop);
|
||||
eventPosition.set('scrollX', doc.scrollLeft);
|
||||
eventPosition.set('scrollY', doc.scrollTop);
|
||||
}
|
||||
} else {
|
||||
eventPosition.set('x', in_eventObj.pageX);
|
||||
eventPosition.set('y', in_eventObj.pageY);
|
||||
eventPosition.set('scrollX', in_eventObj.pageX - in_eventObj.clientX);
|
||||
eventPosition.set('scrollY', in_eventObj.pageY - in_eventObj.clientY);
|
||||
}
|
||||
|
||||
return eventPosition;
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domLib_cancelBubble()
|
||||
|
||||
function domLib_cancelBubble(in_event)
|
||||
{
|
||||
var eventObj = in_event ? in_event : window.event;
|
||||
eventObj.cancelBubble = true;
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domLib_getIFrameReference()
|
||||
|
||||
function domLib_getIFrameReference(in_frame)
|
||||
{
|
||||
if (domLib_isGecko || domLib_isIE)
|
||||
{
|
||||
return in_frame.frameElement;
|
||||
}
|
||||
else
|
||||
{
|
||||
// we could either do it this way or require an id on the frame
|
||||
// equivalent to the name
|
||||
var name = in_frame.name;
|
||||
if (!name || !in_frame.parent)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var candidates = in_frame.parent.document.getElementsByTagName('iframe');
|
||||
for (var i = 0; i < candidates.length; i++)
|
||||
{
|
||||
if (candidates[i].name == name)
|
||||
{
|
||||
return candidates[i];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domLib_getElementsByClass()
|
||||
|
||||
function domLib_getElementsByClass(in_class)
|
||||
{
|
||||
var elements = domLib_isIE5 ? document.all : document.getElementsByTagName('*');
|
||||
var matches = [];
|
||||
var cnt = 0;
|
||||
for (var i = 0; i < elements.length; i++)
|
||||
{
|
||||
if ((" " + elements[i].className + " ").indexOf(" " + in_class + " ") != -1)
|
||||
{
|
||||
matches[cnt++] = elements[i];
|
||||
}
|
||||
}
|
||||
|
||||
return matches;
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domLib_getElementsByTagNames()
|
||||
|
||||
function domLib_getElementsByTagNames(in_list, in_excludeHidden)
|
||||
{
|
||||
var elements = [];
|
||||
for (var i = 0; i < in_list.length; i++)
|
||||
{
|
||||
var matches = document.getElementsByTagName(in_list[i]);
|
||||
for (var j = 0; j < matches.length; j++)
|
||||
{
|
||||
// skip objects that have nested embeds, or else we get "flashing"
|
||||
if (matches[j].tagName == 'OBJECT' && domLib_isGecko)
|
||||
{
|
||||
var kids = matches[j].childNodes;
|
||||
var skip = false;
|
||||
for (var k = 0; k < kids.length; k++)
|
||||
{
|
||||
if (kids[k].tagName == 'EMBED')
|
||||
{
|
||||
skip = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (skip) continue;
|
||||
}
|
||||
|
||||
if (in_excludeHidden && domLib_getComputedStyle(matches[j], 'visibility') == 'hidden')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
elements[elements.length] = matches[j];
|
||||
}
|
||||
}
|
||||
|
||||
return elements;
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domLib_getComputedStyle()
|
||||
|
||||
function domLib_getComputedStyle(in_obj, in_property)
|
||||
{
|
||||
if (domLib_isIE)
|
||||
{
|
||||
var humpBackProp = in_property.replace(/-(.)/, function (a, b) { return b.toUpperCase(); });
|
||||
return eval('in_obj.currentStyle.' + humpBackProp);
|
||||
}
|
||||
// getComputedStyle() is broken in konqueror, so let's go for the style object
|
||||
else if (domLib_isKonq)
|
||||
{
|
||||
//var humpBackProp = in_property.replace(/-(.)/, function (a, b) { return b.toUpperCase(); });
|
||||
return eval('in_obj.style.' + in_property);
|
||||
}
|
||||
else
|
||||
{
|
||||
return document.defaultView.getComputedStyle(in_obj, null).getPropertyValue(in_property);
|
||||
}
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ makeTrue()
|
||||
|
||||
function makeTrue()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ makeFalse()
|
||||
|
||||
function makeFalse()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// }}}
|
||||
Vendored
+1132
File diff suppressed because it is too large
Load Diff
Vendored
+102
@@ -0,0 +1,102 @@
|
||||
/** $Id: domTT_drag.js 2315 2006-06-12 05:45:36Z dallen $ */
|
||||
// {{{ license
|
||||
|
||||
/*
|
||||
* Copyright 2002-2005 Dan Allen, Mojavelinux.com (dan.allen@mojavelinux.com)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// }}}
|
||||
// {{{ globals (DO NOT EDIT)
|
||||
|
||||
var domTT_dragEnabled = true;
|
||||
var domTT_currentDragTarget;
|
||||
var domTT_dragMouseDown;
|
||||
var domTT_dragOffsetLeft;
|
||||
var domTT_dragOffsetTop;
|
||||
|
||||
// }}}
|
||||
// {{{ domTT_dragStart()
|
||||
|
||||
function domTT_dragStart(in_this, in_event)
|
||||
{
|
||||
if (typeof(in_event) == 'undefined') { in_event = window.event; }
|
||||
|
||||
var eventButton = in_event[domLib_eventButton];
|
||||
if (eventButton != 1 && !domLib_isKHTML)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
domTT_currentDragTarget = in_this;
|
||||
in_this.style.cursor = 'move';
|
||||
|
||||
// upgrade our z-index
|
||||
in_this.style.zIndex = ++domLib_zIndex;
|
||||
|
||||
var eventPosition = domLib_getEventPosition(in_event);
|
||||
|
||||
var targetPosition = domLib_getOffsets(in_this);
|
||||
domTT_dragOffsetLeft = eventPosition.get('x') - targetPosition.get('left');
|
||||
domTT_dragOffsetTop = eventPosition.get('y') - targetPosition.get('top');
|
||||
domTT_dragMouseDown = true;
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domTT_dragUpdate()
|
||||
|
||||
function domTT_dragUpdate(in_event)
|
||||
{
|
||||
if (domTT_dragMouseDown)
|
||||
{
|
||||
if (domLib_isGecko)
|
||||
{
|
||||
window.getSelection().removeAllRanges()
|
||||
}
|
||||
|
||||
if (domTT_useGlobalMousePosition && domTT_mousePosition != null)
|
||||
{
|
||||
var eventPosition = domTT_mousePosition;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (typeof(in_event) == 'undefined') { in_event = window.event; }
|
||||
var eventPosition = domLib_getEventPosition(in_event);
|
||||
}
|
||||
|
||||
domTT_currentDragTarget.style.left = (eventPosition.get('x') - domTT_dragOffsetLeft) + 'px';
|
||||
domTT_currentDragTarget.style.top = (eventPosition.get('y') - domTT_dragOffsetTop) + 'px';
|
||||
|
||||
// update the collision detection
|
||||
domLib_detectCollisions(domTT_currentDragTarget);
|
||||
}
|
||||
}
|
||||
|
||||
// }}}
|
||||
// {{{ domTT_dragStop()
|
||||
|
||||
function domTT_dragStop()
|
||||
{
|
||||
if (domTT_dragMouseDown) {
|
||||
domTT_dragMouseDown = false;
|
||||
domTT_currentDragTarget.style.cursor = 'default';
|
||||
domTT_currentDragTarget = null;
|
||||
if (domLib_isGecko)
|
||||
{
|
||||
window.getSelection().removeAllRanges()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// }}}
|
||||
Vendored
+180
@@ -0,0 +1,180 @@
|
||||
/** $Id$ */
|
||||
// Title: Fadomatic
|
||||
// Version: 1.2
|
||||
// Homepage: http://chimpen.com/fadomatic
|
||||
// Author: Philip McCarthy <fadomatic@chimpen.com>
|
||||
|
||||
// Fade interval in milliseconds
|
||||
// Make this larger if you experience performance issues
|
||||
Fadomatic.INTERVAL_MILLIS = 50;
|
||||
|
||||
// Creates a fader
|
||||
// element - The element to fade
|
||||
// speed - The speed to fade at, from 0.0 to 100.0
|
||||
// initialOpacity (optional, default 100) - element's starting opacity, 0 to 100
|
||||
// minOpacity (optional, default 0) - element's minimum opacity, 0 to 100
|
||||
// maxOpacity (optional, default 0) - element's minimum opacity, 0 to 100
|
||||
function Fadomatic (element, rate, initialOpacity, minOpacity, maxOpacity) {
|
||||
this._element = element;
|
||||
this._intervalId = null;
|
||||
this._rate = rate;
|
||||
this._isFadeOut = true;
|
||||
|
||||
// Set initial opacity and bounds
|
||||
// NB use 99 instead of 100 to avoid flicker at start of fade
|
||||
this._minOpacity = 0;
|
||||
this._maxOpacity = 99;
|
||||
this._opacity = 99;
|
||||
|
||||
if (typeof minOpacity != 'undefined') {
|
||||
if (minOpacity < 0) {
|
||||
this._minOpacity = 0;
|
||||
} else if (minOpacity > 99) {
|
||||
this._minOpacity = 99;
|
||||
} else {
|
||||
this._minOpacity = minOpacity;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof maxOpacity != 'undefined') {
|
||||
if (maxOpacity < 0) {
|
||||
this._maxOpacity = 0;
|
||||
} else if (maxOpacity > 99) {
|
||||
this._maxOpacity = 99;
|
||||
} else {
|
||||
this._maxOpacity = maxOpacity;
|
||||
}
|
||||
|
||||
if (this._maxOpacity < this._minOpacity) {
|
||||
this._maxOpacity = this._minOpacity;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof initialOpacity != 'undefined') {
|
||||
if (initialOpacity > this._maxOpacity) {
|
||||
this._opacity = this._maxOpacity;
|
||||
} else if (initialOpacity < this._minOpacity) {
|
||||
this._opacity = this._minOpacity;
|
||||
} else {
|
||||
this._opacity = initialOpacity;
|
||||
}
|
||||
}
|
||||
|
||||
// See if we're using W3C opacity, MSIE filter, or just
|
||||
// toggling visiblity
|
||||
if(typeof element.style.opacity != 'undefined') {
|
||||
|
||||
this._updateOpacity = this._updateOpacityW3c;
|
||||
|
||||
} else if(typeof element.style.filter != 'undefined') {
|
||||
|
||||
// If there's not an alpha filter on the element already,
|
||||
// add one
|
||||
if (element.style.filter.indexOf("alpha") == -1) {
|
||||
|
||||
// Attempt to preserve existing filters
|
||||
var existingFilters="";
|
||||
if (element.style.filter) {
|
||||
existingFilters = element.style.filter+" ";
|
||||
}
|
||||
element.style.filter = existingFilters+"alpha(opacity="+this._opacity+")";
|
||||
}
|
||||
|
||||
this._updateOpacity = this._updateOpacityMSIE;
|
||||
|
||||
} else {
|
||||
|
||||
this._updateOpacity = this._updateVisibility;
|
||||
}
|
||||
|
||||
this._updateOpacity();
|
||||
}
|
||||
|
||||
// Initiates a fade out
|
||||
Fadomatic.prototype.fadeOut = function () {
|
||||
this._isFadeOut = true;
|
||||
this._beginFade();
|
||||
}
|
||||
|
||||
// Initiates a fade in
|
||||
Fadomatic.prototype.fadeIn = function () {
|
||||
this._isFadeOut = false;
|
||||
this._beginFade();
|
||||
}
|
||||
|
||||
// Makes the element completely opaque, stops any fade in progress
|
||||
Fadomatic.prototype.show = function () {
|
||||
this.haltFade();
|
||||
this._opacity = this._maxOpacity;
|
||||
this._updateOpacity();
|
||||
}
|
||||
|
||||
// Makes the element completely transparent, stops any fade in progress
|
||||
Fadomatic.prototype.hide = function () {
|
||||
this.haltFade();
|
||||
this._opacity = 0;
|
||||
this._updateOpacity();
|
||||
}
|
||||
|
||||
// Halts any fade in progress
|
||||
Fadomatic.prototype.haltFade = function () {
|
||||
|
||||
clearInterval(this._intervalId);
|
||||
}
|
||||
|
||||
// Resumes a fade where it was halted
|
||||
Fadomatic.prototype.resumeFade = function () {
|
||||
|
||||
this._beginFade();
|
||||
}
|
||||
|
||||
// Pseudo-private members
|
||||
|
||||
Fadomatic.prototype._beginFade = function () {
|
||||
|
||||
this.haltFade();
|
||||
var objref = this;
|
||||
this._intervalId = setInterval(function() { objref._tickFade(); },Fadomatic.INTERVAL_MILLIS);
|
||||
}
|
||||
|
||||
Fadomatic.prototype._tickFade = function () {
|
||||
|
||||
if (this._isFadeOut) {
|
||||
this._opacity -= this._rate;
|
||||
if (this._opacity < this._minOpacity) {
|
||||
this._opacity = this._minOpacity;
|
||||
this.haltFade();
|
||||
}
|
||||
} else {
|
||||
this._opacity += this._rate;
|
||||
if (this._opacity > this._maxOpacity ) {
|
||||
this._opacity = this._maxOpacity;
|
||||
this.haltFade();
|
||||
}
|
||||
}
|
||||
|
||||
this._updateOpacity();
|
||||
}
|
||||
|
||||
Fadomatic.prototype._updateVisibility = function () {
|
||||
|
||||
if (this._opacity > 0) {
|
||||
this._element.style.visibility = 'visible';
|
||||
} else {
|
||||
this._element.style.visibility = 'hidden';
|
||||
}
|
||||
}
|
||||
|
||||
Fadomatic.prototype._updateOpacityW3c = function () {
|
||||
|
||||
this._element.style.opacity = this._opacity/100;
|
||||
this._updateVisibility();
|
||||
}
|
||||
|
||||
Fadomatic.prototype._updateOpacityMSIE = function () {
|
||||
|
||||
this._element.filters.alpha.opacity = this._opacity;
|
||||
this._updateVisibility();
|
||||
}
|
||||
|
||||
Fadomatic.prototype._updateOpacity = null;
|
||||
Vendored
+5
File diff suppressed because one or more lines are too long
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
;
|
||||
jQuery('.spoiler-title').on('click', function () {
|
||||
let content = jQuery(this).parent().next();
|
||||
if (content.hasClass('collapse')) {
|
||||
content.height(content[0].scrollHeight).removeClass('collapse')
|
||||
} else {
|
||||
content.height(0).addClass('collapse')
|
||||
}
|
||||
});
|
||||
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
jQuery('.btn-get-pt-gen').on('click', function () {
|
||||
let input = jQuery(this).closest('td').find('[data-pt-gen]')
|
||||
let value = input.val().trim()
|
||||
if (value == '') {
|
||||
return
|
||||
}
|
||||
let params = {
|
||||
action: 'getPtGen',
|
||||
params: {url: value}
|
||||
}
|
||||
jQuery('body').loading({
|
||||
stoppable: false
|
||||
});
|
||||
jQuery.post('ajax.php', params, function (response) {
|
||||
jQuery('body').loading('stop');
|
||||
if (response.ret != 0) {
|
||||
alert(response.msg)
|
||||
return
|
||||
}
|
||||
doInsert(response.data, '', false)
|
||||
}, 'json')
|
||||
})
|
||||
Vendored
+211
@@ -0,0 +1,211 @@
|
||||
var pos = 0;
|
||||
var count = 0;
|
||||
|
||||
function noenter(key)
|
||||
{
|
||||
suggcont = document.getElementById("suggcontainer");
|
||||
if (suggcont.style.display == "block")
|
||||
{
|
||||
if (key == 13)
|
||||
{
|
||||
choiceclick(document.getElementById(pos));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
document.onclick = function () { closechoices(); }
|
||||
|
||||
function suggest(key,query)
|
||||
{
|
||||
if (key == 38)
|
||||
{
|
||||
goPrev();
|
||||
}
|
||||
else if (key == 40)
|
||||
{
|
||||
goNext();
|
||||
}
|
||||
else if (key != 13)
|
||||
{
|
||||
if (query.length >= 2) {
|
||||
query = query.toLowerCase();
|
||||
if (query == 'th' || query == 'the' || query == 'the ') {
|
||||
update('');
|
||||
} else {
|
||||
ajax.get('suggest.php?q='+query,update);
|
||||
}
|
||||
} else {
|
||||
update('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function update(result) {
|
||||
arr_keywords = new Array();
|
||||
arr_searched = new Array();
|
||||
arr = new Array();
|
||||
arr = result.split('\r\n');
|
||||
|
||||
count = arr.length;
|
||||
count_keywords = 0;
|
||||
count_searched = 0;
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if(i%2 == 0)
|
||||
{
|
||||
arr_keywords[count_keywords] = arr[i];
|
||||
count_keywords++;
|
||||
}
|
||||
else
|
||||
{
|
||||
arr_searched[count_searched] = arr[i];
|
||||
count_searched++;
|
||||
}
|
||||
}
|
||||
|
||||
if (arr_keywords.length > 10)
|
||||
{
|
||||
count = 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
count = arr_keywords.length;
|
||||
}
|
||||
|
||||
suggdiv = document.getElementById("suggestions");
|
||||
suggcont = document.getElementById("suggcontainer");
|
||||
if (arr_keywords[0].length > 0)
|
||||
{
|
||||
suggcont.style.display = "block";
|
||||
suggdiv.innerHTML = '';
|
||||
suggdiv.style.height = count * 20;
|
||||
|
||||
for (i = 1; i <= count; i++)
|
||||
{
|
||||
novo = document.createElement("div");
|
||||
suggdiv.appendChild(novo);
|
||||
|
||||
novo.id = i;
|
||||
novo.style.height = "14px";
|
||||
novo.style.padding = "3px";
|
||||
novo.onmouseover = function() { select(this,true); }
|
||||
novo.onmouseout = function() { unselect(this,true); }
|
||||
novo.onclick = function() { choiceclick(this); }
|
||||
novo.value = arr_keywords[i-1];
|
||||
|
||||
if (arr_searched[i-1] == 1)
|
||||
stime = arr_searched[i-1] + " Time";
|
||||
else
|
||||
stime = arr_searched[i-1] + " Times";
|
||||
novo.innerHTML = "<table width=100% style=\"border:0px;background-color: transparent;\"><tr><td style=\"border:0px;\" align=left><strong>" + arr_keywords[i-1] + "</strong></td><td style=\"border:0px;\" align=right>" + stime + "</td></tr></table>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
suggcont.style.display = "none";
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function select(obj,mouse)
|
||||
{
|
||||
obj.style.backgroundColor = '#3366cc';
|
||||
obj.style.color = '#ffffff';
|
||||
if (mouse)
|
||||
{
|
||||
pos = obj.id;
|
||||
unselectAllOther(pos);
|
||||
}
|
||||
}
|
||||
|
||||
function unselect(obj,mouse)
|
||||
{
|
||||
obj.style.backgroundColor = '#ffffff';
|
||||
obj.style.color = '#000000';
|
||||
if (mouse)
|
||||
{
|
||||
pos = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function goNext()
|
||||
{
|
||||
if (pos <= count && count > 0) {
|
||||
if (document.getElementById(pos)) {
|
||||
unselect(document.getElementById(pos));
|
||||
}
|
||||
pos++;
|
||||
if (document.getElementById(pos)) {
|
||||
select(document.getElementById(pos));
|
||||
} else {
|
||||
pos = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function goPrev()
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
if (document.getElementById(pos))
|
||||
{
|
||||
unselect(document.getElementById(pos));
|
||||
pos--;
|
||||
if (document.getElementById(pos))
|
||||
{
|
||||
select(document.getElementById(pos));
|
||||
}
|
||||
else
|
||||
{
|
||||
pos = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pos = count;
|
||||
select(document.getElementById(count));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function choiceclick(obj)
|
||||
{
|
||||
document.getElementById("searchinput").value = obj.value;
|
||||
count = 0;
|
||||
pos = 0;
|
||||
suggcont = document.getElementById("suggcontainer");
|
||||
suggcont.style.display = "none";
|
||||
document.getElementById("searchinput").focus();
|
||||
}
|
||||
|
||||
function closechoices()
|
||||
{
|
||||
suggcont = document.getElementById("suggcontainer");
|
||||
if (suggcont.style.display == "block")
|
||||
{
|
||||
count = 0;
|
||||
pos = 0;
|
||||
suggcont.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function unselectAllOther(id)
|
||||
{
|
||||
for (i = 1; i <= count; i++)
|
||||
{
|
||||
if (i != id)
|
||||
{
|
||||
document.getElementById(i).style.backgroundColor = '#ffffff';
|
||||
document.getElementById(i).style.color = '#000000';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user