diff --git a/trunk/css/default/LSdefault.css b/trunk/css/default/LSdefault.css index 0750b535..fa2b4a15 100644 --- a/trunk/css/default/LSdefault.css +++ b/trunk/css/default/LSdefault.css @@ -52,3 +52,24 @@ top: 10px; font-weight: bold; } + + +/* Tips */ +.tip-top { + color: #fff; + width: 139px; + z-index: 13000; +} + +.tip-title { + font-weight: bold; + font-size: 11px; + margin: 0; + color: #b5e4f6; + padding: 2px; + background: #333; + opacity: 0.8; + -moz-border-radius: 2px; + max-width: 500px; + text-align: justify; +} diff --git a/trunk/css/default/LSform.css b/trunk/css/default/LSform.css index dd58404d..21cde6ab 100644 --- a/trunk/css/default/LSform.css +++ b/trunk/css/default/LSform.css @@ -132,23 +132,3 @@ dt.LSform-errors { img.LSform-add-field-btn, img.LSform-remove-field-btn { cursor: pointer; } - -/* Tips */ -.tip-top { - color: #fff; - width: 139px; - z-index: 13000; -} - -.tip-title { - font-weight: bold; - font-size: 11px; - margin: 0; - color: #b5e4f6; - padding: 2px; - background: #333; - opacity: 0.8; - -moz-border-radius: 2px; - max-width: 500px; - text-align: justify; -} diff --git a/trunk/includes/js/LSdefault.js b/trunk/includes/js/LSdefault.js index d4ee1dfd..265c9cba 100644 --- a/trunk/includes/js/LSdefault.js +++ b/trunk/includes/js/LSdefault.js @@ -46,6 +46,8 @@ var LSdefault = new Class({ if (this.LSinfos.innerHTML != '') { this.displayInfosBox(); } + + this.LStips = new Tips('.LStips'); }, onLSsession_topDnChange: function() { @@ -185,7 +187,7 @@ var LSdefault = new Class({ if ($type(el)=='element') { if ($type(this.LSjsConfig['helpInfos'][group])) { if ($type(this.LSjsConfig['helpInfos'][group][name])) { - varLSform.addTip(el); + this.addTip(el); el.store('tip:title',this.LSjsConfig['helpInfos'][group][name]); el.store('tip:text',""); } @@ -205,6 +207,14 @@ var LSdefault = new Class({ } } } + }, + + addTip: function(el) { + this.LStips.attach(el); + }, + + removeTip: function(el) { + this.LStips.detach(el); } }); diff --git a/trunk/includes/js/LSform.js b/trunk/includes/js/LSform.js index d5d75062..a2c11d69 100644 --- a/trunk/includes/js/LSform.js +++ b/trunk/includes/js/LSform.js @@ -14,7 +14,6 @@ var LSform = new Class({ }, initializeLSform: function(el) { - this.LStips = new Tips('.LStips'); if (this.idform) { if (typeof(el) == 'undefined') { el = document; @@ -225,16 +224,7 @@ var LSform = new Class({ } } } - }, - - addTip: function(el) { - this.LStips.attach(el); - }, - - removeTip: function(el) { - this.LStips.detach(el); } - }); window.addEvent(window.ie ? 'load' : 'domready', function() { varLSform = new LSform();