Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 2061 → Rev 2062

/trunk/src/org/tela_botanica/client/image/ImageModele.java
23,12 → 23,11
import org.tela_botanica.client.util.MotsClesUtilitaire;
 
import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.user.client.Window;
import com.gwtext.client.data.ArrayReader;
import com.gwtext.client.data.FieldDef;
import com.gwtext.client.data.IntegerFieldDef;
import com.gwtext.client.data.MemoryProxy;
import com.gwtext.client.data.Node;
import com.gwtext.client.data.RecordDef;
import com.gwtext.client.data.Store;
import com.gwtext.client.data.StringFieldDef;
486,7 → 485,7
// alors on a reçu les informations sur les mots clés
JSONArray donneesArbre = (JSONArray)nouvelleDonnees;
Object[] arbreEtCorrespondancesIds = MotsClesUtilitaire.construireArbre("Tags", "racine", donneesArbre);
Object[] arbreEtCorrespondancesIds = MotsClesUtilitaire.construireArbre("Tags", "racine", donneesArbre, false);
arbreMotsCles = (Tree)arbreEtCorrespondancesIds[0];
motsCles = (HashMap<String, String>)arbreEtCorrespondancesIds[1];
613,9 → 612,9
 
if (!id.equals("racine")) {
String[] parentUsObj = (String[]) n.getParentNode().getUserObject();
parentId = parentUsObj[1];
} else {
parentId = "racine";
if(!parentUsObj[1].equals("racine")) {
parentId = parentUsObj[1];
}
}
 
rafraichirArbreMotsCles(arbreMC);
635,7 → 634,7
* @param arbreMC
* l'arbre des mots clés en cours
*/
public void supprimerMotCleDansArbre(TreeNode n, Tree arbreMC) {
public void supprimerMotCleDansArbre(TreeNode n, Tree arbreMC, Rafraichissable r) {
 
MotsClesAsynchroneDAO MCDao = new MotsClesAsynchroneDAO("images");
 
642,7 → 641,7
String[] usObj = (String[]) n.getUserObject();
String id = usObj[1];
 
MCDao.supprimerBaseDeDonnees(id);
MCDao.supprimerBaseDeDonnees(id, r);
 
}
 
666,9 → 665,9
 
if (!id.equals("racine")) {
String[] parentUsObj = (String[]) n.getParentNode().getUserObject();
parentId = parentUsObj[1];
} else {
parentId = "racine";
if(!parentUsObj[1].equals("racine")) {
parentId = parentUsObj[1];
}
}
 
rafraichirArbreMotsCles(arbreMC);
695,11 → 694,12
String motCle = usObj[0];
String id = usObj[1];
String parentId = "";
if (!id.equals("racine")) {
String[] parentUsObj = (String[]) n.getParentNode().getUserObject();
parentId = parentUsObj[1];
} else {
parentId = "racine";
if(!parentUsObj[1].equals("racine")) {
parentId = parentUsObj[1];
}
}
 
rafraichirArbreMotsCles(arbreMC);