summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-29 11:15:07 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-07-29 11:15:07 +0000
commit7aea19c2f8e71a7d630b613a57325c4dce1b1363 (patch)
treeb4c2e35d40afc7b3a0a22eb8f509c49b37f5f7db /static
parenta0f440de277653b3c79fd117d026855ec6b78373 (diff)
- Added release list feature
- Added noindex tag to iid-ttag browser - Replaced last poster with age of last post on home page - Merged user vote lists into new vnlist - Removed 'hide votes' feature - Fixed users+1 stats bug - Fixed FF3 JS hack - Old VNList code is still present, need to decide what to do with that git-svn-id: svn://vndb.org/vndb@74 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'static')
-rw-r--r--static/files/def.js96
-rw-r--r--static/files/style.css35
2 files changed, 97 insertions, 34 deletions
diff --git a/static/files/def.js b/static/files/def.js
index 3c13402b..fea41239 100644
--- a/static/files/def.js
+++ b/static/files/def.js
@@ -96,7 +96,12 @@ function dropDown(e) {
ddx += obj.offsetLeft;
ddy += obj.offsetTop;
} while(obj = obj.offsetParent);
- ddy += 16;
+ if(tg.className.indexOf('above') >= 0) {
+ ddx += 16;
+ ddy -= x(tg.rel).offsetHeight - 20;
+ }
+ else
+ ddy += 16;
obj = x(tg.rel);
obj.style.left = ddx+'px';
obj.style.top = ddy+'px';
@@ -107,8 +112,8 @@ function dropDown(e) {
var mouseX = e.pageX || (e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft);
var mouseY = e.pageY || (e.clientY + document.body.scrollTop + document.documentElement.scrollTop);
var obj = x(dds.rel);
- if((mouseX < ddx-5 || mouseX > ddx+obj.offsetWidth+5 || mouseY < ddy-20 || mouseY > ddy + obj.offsetHeight)
- || (mouseY < ddy && tg.nodeName.toLowerCase() == 'a' && tg != dds)) {
+ if((mouseX < ddx-15 || mouseX > ddx+obj.offsetWidth+5 || mouseY < ddy-20 || mouseY > ddy + obj.offsetHeight)
+ || (tg.nodeName.toLowerCase() == 'a' && tg.className.indexOf('dropdown') >= 0 && tg != dds)) {
obj.style.left = '-500px';
dds = null;
}
@@ -226,33 +231,6 @@ DOMLoad(function() {
if(x('adsearch'))
adsearch();
- // vnlist
- cl('askcomment', function() {
- this.href = this.href + ';c=' + encodeURIComponent(prompt("Enter personal note (optional)", '')||'');
- return true;
- });
-
- // mass-change vnlist status
- if(x('vnlistchange')) {
- x('vnlistchange').onchange = function() {
- var val = this.options[this.selectedIndex].value;
- if(val == '-3')
- return;
- var l = document.getElementsByTagName('input');
- var y; var ch=0;
- for(y=0;y<l.length;y++)
- if(l[y].type == 'checkbox' && l[y].checked)
- ch++;
- if(!ch)
- return alert('Nothing selected...');
- if(val == '-1' && !confirm('Are you sure you want to remove the selected items from your visual novel list?'))
- return;
- if(val == '-2')
- x('comments').value = prompt('Enter personal note (leave blank to delete note)','')||'';
- document.forms[1].submit();
- }
- }
-
// userdel
cl('userdel', function() { return confirm("Completely remove this account from the site?") });
@@ -273,6 +251,59 @@ DOMLoad(function() {
this.id = '';
});
+ // rlists
+ i = x('rli');
+ if(i) {
+ var l=i.getElementsByTagName('td');
+ for(i=0;i<l.length;i++)
+ if(l[i].className.indexOf('relhid')>=0)
+ l[i].onclick = function() {
+ var id=this.id.substr(2);
+ var j=0;var o;
+ var op=x('rr'+id+'-1').style.display == 'none' ? 1 : 0;
+ while((o=x('rr'+id+'-'+(++j))) != null)
+ o.style.display = op ? '' : 'none';
+ x('rhd'+id).innerHTML = op ? '&#9662;' : '&#9656;';
+ };
+ var l=x('rli').getElementsByTagName('tr');
+ for(i=0;i<l.length;i++)
+ if(l[i].className.indexOf('relhid')>=0)
+ l[i].style.display = 'none';
+ var allhid=1;
+ cl('relhidpar', function() {
+ allhid=!allhid;
+ l=x('rli').getElementsByTagName('tr');
+ for(i=0;i<l.length;i++)
+ if(l[i].className.indexOf('relhid')>=0)
+ l[i].style.display = allhid ? 'none' : '';
+ l=x('rli').getElementsByTagName('b');
+ for(i=0;i<l.length;i++)
+ if(l[i].id.substr(0,3) == 'rhd')
+ l[i].innerHTML = !allhid ? '&#9662;' : '&#9656;';
+ x('relhidparb').innerHTML = !allhid ? '&#9662;' : '&#9656;';
+ });
+ }
+
+ // mass-change rlist status
+ if(x('vnlistchange')) {
+ x('vnlistchange').onchange = function() {
+ var val = this.options[this.selectedIndex].value;
+ if(val == 'n')
+ return;
+ var l = x('rli').getElementsByTagName('input');
+ var y; var ch=0;
+ for(y=0;y<l.length;y++)
+ if(l[y].type == 'checkbox' && l[y].checked)
+ ch++;
+ if(!ch)
+ return alert('Nothing selected...');
+ if(val == 'd' && !confirm('Are you sure you want to remove the selected items from your visual novel list?'))
+ return;
+ document.forms[1].submit();
+ }
+ }
+
+
// spam protection on all forms
if(document.forms.length > 1)
for(i=1; i<document.forms.length; i++)
@@ -308,7 +339,8 @@ DOMLoad(function() {
// zebra-striped tables (client side!? yes... client side :3)
var sub = document.getElementsByTagName('tr');
for(i=1; i<sub.length; i+=2)
- sub[i].style.backgroundColor = '#f5f5f5';
+ if(!sub[i].style.backgroundColor)
+ sub[i].style.backgroundColor = '#f5f5f5';
});
@@ -316,7 +348,7 @@ DOMLoad(function() {
// small hack because the mozilla -moz-inline-stack display hack sucks
// (so we're counter-hacking a CSS hack using JS... right)
-if(navigator.userAgent.indexOf('Gecko') >= 0 && navigator.userAgent.indexOf('like Gecko') < 0 && navigator.userAgent.indexOf('fox/3') < 0)
+if(navigator.userAgent.indexOf('Gecko') >= 0 && navigator.userAgent.indexOf('like Gecko') < 0 && navigator.userAgent.indexOf('3.0') < 0)
document.write('<style type="text/css">.icons.lang { width: 15px; height: 13px; }</style>');
diff --git a/static/files/style.css b/static/files/style.css
index 6047f517..b383369a 100644
--- a/static/files/style.css
+++ b/static/files/style.css
@@ -479,12 +479,28 @@ div.dropdown b {
font-style: italic;
color: #666;
}
-div.dropdown li.center a {
+div.dropdown li.center a, div.dropdown li.center b {
text-align: center;
}
div.dropdown a:hover {
background-color: #e0e0e0;
}
+div.rlistdd {
+ width: 200px;
+}
+div.rlistdd ul, div.rlistdd ul li {
+ float: left;
+}
+div.rlistdd a, div.rlistdd b {
+ padding: 1px 5px;
+}
+div.dropdown ul.full a, div.dropdown ul.full b {
+ width: 190px;
+}
+div.dropdown ul.full, div.dropdown ul.full li {
+ clear: left;
+ width: 200px;
+}
/* paragraph markups... */
@@ -748,13 +764,28 @@ b.diff_del { font-weight: normal; background-color: #fcc; }
#thi .tc1 { width: 10px }
#thi .tc2 { width: 110px; }
+#rli tr.relhid { background-color: #fff!important; }
+#rli td.relhid, #relhidpar { cursor: pointer; }
+#rli td.relnone { color: #aaa };
+#rli .tc1 { width: 560px; }
+#rli .tc2 { width: 80px; }
+#rli .tc3 { width: 50px; }
+#rli .tc1_1 { width: 70px; padding-left: 20px }
+#rli .tc1_2 { width: 40px; padding:0; text-align: right; }
+#rli .tc1_3 { width: 370px; }
+#rli .tc1_4 { width: 60px }
+#rli .tc1_3 a { color: #203c36; }
+#rli .tc1_6 { text-align: right }
+
#tre tr { background-color: #fff!important; }
#tre tr.lang { background-color: #f5f5f5!important; font-style: italic; }
#tre .tc1 { width: 75px; padding-left: 10px; }
#tre .tc2 { width: 50px; text-align: center; white-space: nowrap; }
-#tre .tc3, #tre .tc5 { width: 16px; margin: 0; padding: 0; white-space: nowrap; text-align: right }
+#tre .tc3, #tre .tc6 { width: 16px; margin: 0; padding: 0; white-space: nowrap; text-align: right }
#tre .tc3 { width: 70px; }
+#tre .tc5 { width: 15px; text-align: right; padding-right: 10px; }
+#tre .tc5 a { display: block; width: 15px; text-decoration: none; color: #333; }
#tbv .tc2 acronym, #tbv .tc3 acronym {
zoom: 1;