- LSformElement_image : Ajout de LStips pour les boutons.

This commit is contained in:
Benjamin Renard 2008-11-10 02:51:32 +00:00
parent 9772c4fe9e
commit ea23603506
2 changed files with 9 additions and 1 deletions

View file

@ -47,6 +47,13 @@ class LSformElement_image extends LSformElement {
$GLOBALS['LSsession'] -> addCssFile('LSformElement_image.css');
$return = true;
if (!$this -> isFreeze()) {
$GLOBALS['LSsession'] -> addHelpInfos(
'LSformElement_date',
array(
'zoom' => _('Cliquer pour agrandir.'),
'delete' => _('Cliquer pour supprimer cette image.')
)
);
$id=$this -> name.'_'.rand();
$return = $this -> getLabelInfos();
$return['html'] = $this -> fetchTemplate(NULL,array('id' => 'LSformElement_image_input_'.$id));

View file

@ -12,12 +12,13 @@ var LSformElement_image = new Class({
var getId = /LSformElement_image_action_zoom_(.*)/
var id = getId.exec(el.id)[1];
var img = $('LSformElement_image_' + id);
var src = img.src;
el.addEvent('click',this.zoomImg.bindWithEvent(this,img));
varLSdefault.addHelpInfo(el,'LSformElement_date','zoom');
}, this);
$$('img.LSformElement_image_action_delete').each(function(el) {
el.addEvent('click',this.onImageDeleteBtnClick.bind(this,el));
varLSdefault.addHelpInfo(el,'LSformElement_date','delete');
}, this);
},