summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-11-27 09:51:30 +0100
committerYorhel <git@yorhel.nl>2010-11-27 09:51:30 +0100
commit156a362991ac6922f33e61a08f39f31048310183 (patch)
tree2e38eba4ddfe66c22b72fc3c325db532b78913b6 /data
parentfabd5720d5157754406ea5b69e900db632ed035e (diff)
Re-added producer role to collapsed view on producer pages
And rewrote the expand/collapse JS/CSS code so that the difference between expanded and collapsed view is merely the class of the containing table. This way the JS code doesn't have to pass through the table rows and is thus noticeably faster for larger tables (i.e. /p65).
Diffstat (limited to 'data')
-rw-r--r--data/script.js9
-rw-r--r--data/style.css9
2 files changed, 7 insertions, 11 deletions
diff --git a/data/script.js b/data/script.js
index aafdf62b..8cf49e97 100644
--- a/data/script.js
+++ b/data/script.js
@@ -2202,14 +2202,7 @@ if(byId('expandprodrel')) {
setexpand = function() {
var exp = !(getCookie('prodrelexpand') == 1);
setText(lnk, exp ? mt('_js_collapse') : mt('_js_expand'));
- var l = byClass(byId('prodrel'), 'tr', 'rel');
- for(var i=0; i<l.length; i++)
- setClass(l[i], 'hidden', !exp);
- var l = byClass(byId('prodrel'), 'tr', exp ? 'vn_lst' : 'vn');
- for(var i=0; i<l.length; i++) {
- setClass(l[i], 'vn', exp);
- setClass(l[i], 'vn_lst', !exp);
- }
+ setClass(byId('prodrel'), 'collapse', !exp);
};
setexpand();
lnk.onclick = function () {
diff --git a/data/style.css b/data/style.css
index 2346ecf4..243e15e5 100644
--- a/data/style.css
+++ b/data/style.css
@@ -825,9 +825,12 @@ div.scr_uploader { visibility: hidden; overflow: hidden; width: 1px; height: 1px
#prodrel { width: 100%; }
#prodrel tr.vn td { background: url($_boxbg$) repeat; font-weight: bold; }
-#prodrel tr.vn i { display: none }
-#prodrel tr.vn_lst td { padding: 1px }
-#prodrel tr.vn_lst i { font-style: normal; display: block; float: left; width: 80px; padding: 0 0 0 40px; }
+#prodrel tr.vn i,
+#prodrel tr.vn span { display: none }
+#prodrel.collapse tr.vn td { padding: 1px; background: none; font-weight: normal }
+#prodrel.collapse tr.vn i { font-style: normal; display: block; float: left; width: 80px; padding: 0 0 0 40px; }
+#prodrel.collapse tr.vn span { display: inline; font-weight: normal; color: $grayedout$; padding: 0 0 0 5px }
+#prodrel.collapse tr.rel { display: none }
#prodrel td.tc1 { width: 80px; padding-left: 30px; }
#prodrel td.tc2 { width: 50px; text-align: center; }
#prodrel td.tc3 { width: 120px; text-align: right; padding: 0; }