summaryrefslogtreecommitdiff
path: root/src/medsrv/templates/static/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/medsrv/templates/static/script.js')
-rw-r--r--src/medsrv/templates/static/script.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/medsrv/templates/static/script.js b/src/medsrv/templates/static/script.js
new file mode 100644
index 000000000..f2ab1e009
--- /dev/null
+++ b/src/medsrv/templates/static/script.js
@@ -0,0 +1,13 @@
+window.addEvent('domready', function() {
+ $$('.focus').each(function(e){e.focus();});
+ $$('table.list tr:nth-child(2n) td').each(function(e){e.set('class', 'even');});
+ $$('table.list tr:nth-child(2n+1) td').each(function(e){e.set('class', 'odd');});
+ $$('table.list tr th').each(function(e){e.set('class', 'head');});
+ $$('table.list tr td').each(function(e){e.addEvents({
+ 'click': function(){
+ location.href = this.getChildren('a')[0].get('href');
+ }
+ })});
+});
+
+