Commit 0f6e7b89 authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

bug delete

parent d0351a7a
......@@ -33,7 +33,7 @@ function del_seg (){
var url="del_lst_seg?seglist=";
for (var i=0;i<lst.length;i++){
if(lst[i].checked){
url = url+lst[i].id+";";
url = url+lst[i].id+"-";
}
}
self.location.href=url;
......@@ -46,7 +46,7 @@ function edit_tag (str_lst_tag){
lst = document.getElementsByName('checkbox');
for (var i=0;i<lst.length;i++){
if(lst[i].checked){
url = url+lst[i].id+";";
url = url+lst[i].id+"-";
}
}
url = url+"&tag="+check;
......@@ -77,7 +77,7 @@ function del_prod(segid) {
var url="del_lst_prod?segid="+segid+"&taskid=";
for (var i=0;i<lst.length;i++){
if(lst[i].checked){
url = url+lst[i].id+";";
url = url+lst[i].id+"-";
}
}
self.location.href=url;
......
......@@ -108,10 +108,10 @@ class Web:
Parameters
----------
segid: string. List of seg_id ; separated. (; at the end of string also)
segid: string. List of seg_id - separated. (- at the end of string also)
tag: string. Tags are ; separated in the db.
"""
seglst = segid.split(';')
seglst = segid.split('-')
conn = sqlite3.connect(self.db_file,check_same_thread=True)
conn.text_factory=str
for segid in seglst:
......@@ -409,7 +409,7 @@ class Web:
Parameters
----------
segid: string, list of pipe id ';' separated
segid: string, list of pipe id '-' separated
"""
## remove everyboby
conn = sqlite3.connect(self.db_file,check_same_thread=True)
......@@ -444,16 +444,17 @@ class Web:
Parameters
----------
segid: string, list of pipe id ';' separated
segid: string, list of pipe id '-' separated
"""
cherrypy.log.error_log.warning('called ONCE')
seglist = seglist.split(";")
seglist = seglist.split("-")
## build list including dependencies
final_list = []
for segid in seglist:
if segid:
final_list= final_list+self._get_children(segid)
if segid and segid is not None:
final_list= final_list+self._get_children(int(segid))
final_list = list(pylab.unique(final_list))
final_list.sort()
## empty the list
......@@ -471,10 +472,10 @@ class Web:
Parameters
----------
segid: integer
taskid: string, list of task id ';' separated
taskid: string, list of task id '-' separated
"""
cherrypy.log.error_log.warning('called ONCE')
tasklist = tasklist.split(";")
tasklist = tasklist.split("-")
## build list including dependencies
final_list = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment