Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
pipelet
Pipelet
Commits
0f6e7b89
Commit
0f6e7b89
authored
Aug 31, 2010
by
Maude Le Jeune
Browse files
bug delete
parent
d0351a7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
pipelet/static/tag.js
pipelet/static/tag.js
+3
-3
pipelet/web.py
pipelet/web.py
+10
-9
No files found.
pipelet/static/tag.js
View file @
0f6e7b89
...
...
@@ -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
;
...
...
pipelet/web.py
View file @
0f6e7b89
...
...
@@ -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
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment