bonjour,
j'ai une liste et je veux supprimer une entrée j'ai un bouton remove
quand je sélectionne le ligne et clique sur remove il dit qu'elle a bien été supprimée mais c'est pas le cas la ligne reste présente.
voila le code de ma toolbar
<?php
/**
* ChronoConnectivity version 4.0
* Copyright (c) 2006 - 2012 Chrono_Man, ChronoEngine.com. All rights reserved.
* Author: Chrono_Man (ChronoEngine.com)
* @license GNU/GPL
* Visit http://www.ChronoEngine.com for regular updates and information.
**/
$document =& JFactory::getDocument();
$uri =& JFactory::getURI();
//load template CSS in frontend only
if($c_area != 'admin'){
if($this->jversion > 1.5){
$document->addStyleSheet('administrator/templates/system/css/system.css');
//now we add the necessary stylesheets from the administrator template
//in this case i make reference to the bluestork default administrator template in joomla 1.6
$document->addCustomTag(
'<link href="administrator/templates/bluestork/css/template.css" rel="stylesheet" type="text/css" />'."\n\n".
'<!--[if IE 7]>'."\n".
'<link href="administrator/templates/bluestork/css/ie7.css" rel="stylesheet" type="text/css" />'."\n".
'<![endif]-->'."\n".
'<!--[if gte IE 8]>'."\n\n".
'<link href="administrator/templates/bluestork/css/ie8.css" rel="stylesheet" type="text/css" />'."\n".
'<![endif]-->'."\n".
'<link rel="stylesheet" href="administrator/templates/bluestork/css/rounded.css" type="text/css" />'."\n"
);
}else{
$document->addStyleSheet($uri->root().'administrator/templates/khepri/css/general.css');
$document->addStyleSheet($uri->root().'administrator/templates/khepri/css/icon.css');
}
jimport('joomla.html.toolbar');
$jtasks = array('_EDIT_' => 'edit', '_DELETE_' => 'delete', '_ADD_' => 'new', '_BINARY_' => 'publish');
$toolBar = new JToolBar('connectivity_front_toolbar');
if(strlen(trim($params->get($c_area.'_toolbar_tasks', ''))) > 0){
$buttons = explode(",", trim($params->get($c_area.'_toolbar_tasks', '')));
foreach($buttons as $button){
$button_details = explode(":", $button);
if(count($button_details) > 1){
$required = isset($button_details[2]) ? (bool)$button_details[2] : false;
if(in_array($button_details[0], array_keys($connection->main_tasks))){
$task = ($connection->main_tasks[$button_details[0]] == 'cc_binary_data') ? "cc_binary_data&fld=".$button_details[3] : $connection->main_tasks[$button_details[0]];
$toolBar->appendButton('Standard', $jtasks[$button_details[0]], $button_details[1], $task, $required);
}else{
//$toolBar->appendButton('Standard', $button_details[0], $button_details[1], "cc_custom_data&fn=".$button_details[0], $required);
$toolBar->appendButton('Standard', $button_details[0], $button_details[1], $button_details[0], $required);
}
}
}
echo $toolBar->render();
echo '<div class="clear"></div>';
}
}
?>
merci
j'ai une liste et je veux supprimer une entrée j'ai un bouton remove
quand je sélectionne le ligne et clique sur remove il dit qu'elle a bien été supprimée mais c'est pas le cas la ligne reste présente.
voila le code de ma toolbar
<?php
/**
* ChronoConnectivity version 4.0
* Copyright (c) 2006 - 2012 Chrono_Man, ChronoEngine.com. All rights reserved.
* Author: Chrono_Man (ChronoEngine.com)
* @license GNU/GPL
* Visit http://www.ChronoEngine.com for regular updates and information.
**/
$document =& JFactory::getDocument();
$uri =& JFactory::getURI();
//load template CSS in frontend only
if($c_area != 'admin'){
if($this->jversion > 1.5){
$document->addStyleSheet('administrator/templates/system/css/system.css');
//now we add the necessary stylesheets from the administrator template
//in this case i make reference to the bluestork default administrator template in joomla 1.6
$document->addCustomTag(
'<link href="administrator/templates/bluestork/css/template.css" rel="stylesheet" type="text/css" />'."\n\n".
'<!--[if IE 7]>'."\n".
'<link href="administrator/templates/bluestork/css/ie7.css" rel="stylesheet" type="text/css" />'."\n".
'<![endif]-->'."\n".
'<!--[if gte IE 8]>'."\n\n".
'<link href="administrator/templates/bluestork/css/ie8.css" rel="stylesheet" type="text/css" />'."\n".
'<![endif]-->'."\n".
'<link rel="stylesheet" href="administrator/templates/bluestork/css/rounded.css" type="text/css" />'."\n"
);
}else{
$document->addStyleSheet($uri->root().'administrator/templates/khepri/css/general.css');
$document->addStyleSheet($uri->root().'administrator/templates/khepri/css/icon.css');
}
jimport('joomla.html.toolbar');
$jtasks = array('_EDIT_' => 'edit', '_DELETE_' => 'delete', '_ADD_' => 'new', '_BINARY_' => 'publish');
$toolBar = new JToolBar('connectivity_front_toolbar');
if(strlen(trim($params->get($c_area.'_toolbar_tasks', ''))) > 0){
$buttons = explode(",", trim($params->get($c_area.'_toolbar_tasks', '')));
foreach($buttons as $button){
$button_details = explode(":", $button);
if(count($button_details) > 1){
$required = isset($button_details[2]) ? (bool)$button_details[2] : false;
if(in_array($button_details[0], array_keys($connection->main_tasks))){
$task = ($connection->main_tasks[$button_details[0]] == 'cc_binary_data') ? "cc_binary_data&fld=".$button_details[3] : $connection->main_tasks[$button_details[0]];
$toolBar->appendButton('Standard', $jtasks[$button_details[0]], $button_details[1], $task, $required);
}else{
//$toolBar->appendButton('Standard', $button_details[0], $button_details[1], "cc_custom_data&fn=".$button_details[0], $required);
$toolBar->appendButton('Standard', $button_details[0], $button_details[1], $button_details[0], $required);
}
}
}
echo $toolBar->render();
echo '<div class="clear"></div>';
}
}
?>
merci
Commentaire