242ca750462023aad22a9d6f011ec7cd0760436a
[ldapsaisie.git] / trunk / includes / js / LSview.js
1 var LSview = new Class({
2     initialize: function(){
3       $$('td.LSobject-list-names').each(function(el) {
4         el.addEvent('click',this.onTdLSobjectListNamesClick.bind(this,el));
5       }, this);
6       $$('td.LSobject-list-names').each(function(el) {
7         el.addEvent('mouseenter',this.onTdLSobjectListNamesOver.bind(this,el));
8       }, this);
9       $$('td.LSobject-list-names').each(function(el) {
10         el.addEvent('mouseleave',this.onTdLSobjectListNamesOut.bind(this,el));
11       }, this);
12     },
13
14     onTdLSobjectListNamesClick: function(td) {
15       window.location=td.getFirst().href;
16     },
17
18     onTdLSobjectListNamesOver: function(td){
19       td.imgEdit = new Element('img');
20       td.imgEdit.src = varLSdefault.imagePath('view.png');
21       td.imgEdit.injectInside(td);
22     },
23     
24     onTdLSobjectListNamesOut: function(td) {
25       td.imgEdit.destroy();
26     }
27
28 });
29 window.addEvent(window.ie ? 'load' : 'domready', function() {
30   varLSview = new LSview();
31 });