From f21dfeed088d7dbbd56cddf892ec87d0751d72c3 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 14 Nov 2008 17:36:49 +0000 Subject: [PATCH] =?UTF-8?q?-=20LStips=20:=20D=C3=A9placement=20de=20la=20g?= =?UTF-8?q?estion=20des=20LStips=20de=20LSform=20vers=20LSdefault?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trunk/css/default/LSdefault.css | 21 +++++++++++++++++++++ trunk/css/default/LSform.css | 20 -------------------- trunk/includes/js/LSdefault.js | 12 +++++++++++- trunk/includes/js/LSform.js | 10 ---------- 4 files changed, 32 insertions(+), 31 deletions(-) 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();