ldapsaisie/trunk/includes/js/LSview.js
Benjamin Renard 7d2e3baf8b - Ajout de la gestion des droits (A étendre et debugger)
- Propagation des possibilités de l'interface
2008-02-08 17:39:24 +00:00

31 lines
966 B
JavaScript

var LSview = new Class({
initialize: function(){
$$('td.LSobject-list-names').each(function(el) {
el.addEvent('click',this.onTdLSobjectListNamesClick.bind(this,el));
}, this);
$$('td.LSobject-list-names').each(function(el) {
el.addEvent('mouseenter',this.onTdLSobjectListNamesOver.bind(this,el));
}, this);
$$('td.LSobject-list-names').each(function(el) {
el.addEvent('mouseleave',this.onTdLSobjectListNamesOut.bind(this,el));
}, this);
},
onTdLSobjectListNamesClick: function(td) {
window.location=td.getFirst().href;
},
onTdLSobjectListNamesOver: function(td){
td.imgEdit = new Element('img');
td.imgEdit.src = 'templates/images/view.png';
td.imgEdit.injectInside(td);
},
onTdLSobjectListNamesOut: function(td) {
td.imgEdit.remove();
}
});
window.addEvent(window.ie ? 'load' : 'domready', function() {
varLSview = new LSview();
});