mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
- LSformElement_url : Désactivation du bouton JS addFavorite quand le
navigateur n'est pas supporté.
This commit is contained in:
parent
ab7f16ea67
commit
07c1e865e7
1 changed files with 17 additions and 11 deletions
|
@ -28,14 +28,16 @@ var LSformElement_url = new Class({
|
||||||
btn_go.addEvent('click',this.onGoBtnClick.bind(this,btn_go));
|
btn_go.addEvent('click',this.onGoBtnClick.bind(this,btn_go));
|
||||||
varLSdefault.addHelpInfo(btn_go,'LSformElement_url','go');
|
varLSdefault.addHelpInfo(btn_go,'LSformElement_url','go');
|
||||||
|
|
||||||
var btn_fav = new Element('img');
|
if (this.isAddFavoriteSupportedBrowser()) {
|
||||||
btn_fav.setProperties({
|
var btn_fav = new Element('img');
|
||||||
src: varLSdefault.imagePath('url_add.png')
|
btn_fav.setProperties({
|
||||||
});
|
src: varLSdefault.imagePath('url_add.png')
|
||||||
btn_fav.addClass('btn');
|
});
|
||||||
btn_fav.injectAfter(btn_go);
|
btn_fav.addClass('btn');
|
||||||
btn_fav.addEvent('click',this.onAddFavoriteBtnClick.bind(this,btn_fav));
|
btn_fav.injectAfter(btn_go);
|
||||||
varLSdefault.addHelpInfo(btn_fav,'LSformElement_url','fav');
|
btn_fav.addEvent('click',this.onAddFavoriteBtnClick.bind(this,btn_fav));
|
||||||
|
varLSdefault.addHelpInfo(btn_fav,'LSformElement_url','fav');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
reinitialize: function(el) {
|
reinitialize: function(el) {
|
||||||
|
@ -66,10 +68,14 @@ var LSformElement_url = new Class({
|
||||||
else if(window.external) {
|
else if(window.external) {
|
||||||
window.external.AddFavorite(href,name);
|
window.external.AddFavorite(href,name);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
alert('Fonctionnalité pas encore supportée pour votre navigateur.');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
isAddFavoriteSupportedBrowser: function() {
|
||||||
|
if (window.sidebar || window.external) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.addEvent(window.ie ? 'load' : 'domready', function() {
|
window.addEvent(window.ie ? 'load' : 'domready', function() {
|
||||||
|
|
Loading…
Reference in a new issue