Author: rhari
Date: Fri Apr 27 14:14:03 2007
New Revision: 386
URL: http://svn.gna.org/viewcvs/phplinker?rev=386&view=rev
Log:
#132
Bug fix sur les enregistrements
Modified:
trunk/smarty/default/templates/admin/category.tpl
trunk/www/lib/category.php
Modified: trunk/smarty/default/templates/admin/category.tpl
URL:
http://svn.gna.org/viewcvs/phplinker/trunk/smarty/default/templates/admin/category.tpl?rev=386&r1=385&r2=386&view=diff
==============================================================================
--- trunk/smarty/default/templates/admin/category.tpl (original)
+++ trunk/smarty/default/templates/admin/category.tpl Fri Apr 27 14:14:03 2007
@@ -164,6 +164,11 @@
}
function saveCateg (){
+
+ if (deleteIds != ""){
+ xajax_linker_del_CategInIds(deleteIds);
+ }
+
// var count=0;
var Node = document.getElementById("root");
var elts = Node.getElementsByTagName("LI");
@@ -180,17 +185,20 @@
else
id_parent = id_parent.substring(6);
id = id.substring(6);
-// alert("ID : " + id + "\nNom : " + texte + "\nTag : " + tag +
"\nParent : " + id_parent);
- xajax_linker_upd_category(id, id_parent, tag, texte);
+// alert("ID : " + id + "\nNom : " + texte + "\nTag : " +
tag + "\nParent : " + id_parent);
+
+ tmpIndice = no + 1;
+ if (tmpIndice == elts.length)
+ last = 'true';
+ else
+ last = 'false';
+ xajax_linker_upd_category(id, id_parent, tag, texte, -1,
last);
}
}
- if (deleteIds != ""){
- xajax_linker_del_CategInIds(deleteIds);
- }
// alert(count);
// alert(deleteIds);
- alert("Modifications enregistrées");
+// alert("Modifications enregistrées");
}
function addTag_step2 (id, tagname){
Modified: trunk/www/lib/category.php
URL:
http://svn.gna.org/viewcvs/phplinker/trunk/www/lib/category.php?rev=386&r1=385&r2=386&view=diff
==============================================================================
--- trunk/www/lib/category.php (original)
+++ trunk/www/lib/category.php Fri Apr 27 14:14:03 2007
@@ -152,7 +152,7 @@
return $objResponse->getXML();
}
-function linker_upd_category ($id = -1, $id_parent, $id_ad_tag, $name,
$visible = -1){
+function linker_upd_category ($id = -1, $id_parent, $id_ad_tag, $name,
$visible = -1, $last = 'false'){
$objResponse = new xajaxResponse();
// if (!linker_category_exist($id_parent, $name)){
@@ -169,6 +169,12 @@
linker_log("[".$_SESSION['login'] ."]Update category $id set id_parent as
$id_parent, set id_ad_tag as $id_ad_tag, set name as $name $visibilite2");
// }
+ if ($last === 'true')
+ $objResponse->addAlert("Modifications enregistrées");
+// $ens = array(2437,2402,2403);
+// if (in_array($id, $ens)){
+// $objResponse->addAlert("vita");
+// }
return $objResponse->getXML();
}
_______________________________________________
PHPLinker-commits mailing list
[email protected]
https://mail.gna.org/listinfo/phplinker-commits