- LSformElement_textarea : Ajout d'un LStip sur le bouton clear.

This commit is contained in:
Benjamin Renard 2008-11-10 03:34:28 +00:00
parent 7765cd999b
commit 4365e4cb83
2 changed files with 7 additions and 0 deletions

View file

@ -44,6 +44,12 @@ class LSformElement_textarea extends LSformElement {
function getDisplay(){ function getDisplay(){
$return = $this -> getLabelInfos(); $return = $this -> getLabelInfos();
if (!$this -> isFreeze()) { if (!$this -> isFreeze()) {
$GLOBALS['LSsession'] -> addHelpInfos(
'LSformElement_textarea',
array(
'clear' => _('Effacer')
)
);
$GLOBALS['LSsession'] -> addJSscript('LSformElement_textarea.js'); $GLOBALS['LSsession'] -> addJSscript('LSformElement_textarea.js');
} }
$return['html'] = $this -> fetchTemplate(); $return['html'] = $this -> fetchTemplate();

View file

@ -16,6 +16,7 @@ var LSformElement_textarea = new Class({
btn.src = varLSdefault.imagePath('clear.png'); btn.src = varLSdefault.imagePath('clear.png');
btn.addEvent('click',this.onClearBtnClick.bind(this,btn)); btn.addEvent('click',this.onClearBtnClick.bind(this,btn));
btn.injectAfter(textarea); btn.injectAfter(textarea);
varLSdefault.addHelpInfo(btn,'LSformElement_textarea','clear');
}, this); }, this);
}, },