<?php
/*********************************************************************************
 * Gest'Ecole is a school management software developped by
 * DOX Conception Copyright (C) 2012-2013 DOX Conception
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the license published by DOX Conception.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY.  See the Software License for more details.
 * 
 * You should have received a copy of the software license along with
 * this program; if not, see:
 * http://www.doxconception.com/site/index.php/licence-de-gestecole.html
 ********************************************************************************/
?>

<div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" id="listItem2_<?php echo $i_panneau; ?>" style="min-width:300px">
  <div class="portlet-header ui-widget-header ui-corner-all"><?php echo $titre; ?>
    <div class="floatdroite">
          <a href="#null" title="<?php echo $Langue['LBL_PARAMETRER_PANNEAU2']; ?>" onClick="Parametrer_Panneau('<?php echo $id_panneau; ?>')"><img src="images/parametrer.png" width=12 height=12 border=0></a>&nbsp;
          <a href="#null" title="<?php echo $Langue['LBL_SUPPRIMER_PANNEAU2']; ?>" onClick="Supprimer_Panneau('<?php echo $id_panneau; ?>')"><img src="images/supprimer.png" width=12 height=12 border=0></a>
    </div>
  </div>
  <div class="portlet-content" style="padding:0px;margin:0px">
		<div class="bloc_notes" id="bloc_notes<?php echo $id_panneau; ?>">
<?php
		$req_bc=mysql_query("SELECT * FROM `accueil_perso` WHERE id='$id_panneau'");
		if (mysql_result($req_bc,0,'parametre')=="") { echo $Langue_Panneau['LBL_TEXTE_DEFAUT']; } else { echo mysql_result($req_bc,0,'parametre'); }
?>
		</div>
  </div>
</div>
<script language="Javascript">
$(document).ready(function()
{
  $('#bloc_notes<?php echo $id_panneau; ?>').editable('./accueil/subpanels/blocnotes_save.php', 
	{
		type      : 'textarea',
		rows			: 10,
		textareaclass : "text ui-widget-content ui-corner-all",
		cancel    : '<?php echo $Langue_JS['BTN_ANNULER2']; ?>',
		submit    : '<?php echo $Langue_JS['BTN_ENREGISTRER']; ?>',
		id   : 'elementid',
		name : 'newvalue',
		style   : 'text-align:center',
		data: function(value, settings) 
		{
      /* Convert <br> to newline. */
      var retval = value.replace(/<br[\s\/]?>/gi, '\n');
      return retval;
    }	
	});
});
</script>
