Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Note Kfet 2015 django
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
BDE
Note Kfet 2015 django
Commits
de4748c1
Commit
de4748c1
authored
Jun 23, 2014
by
Charlie Jacomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[liste_dynamique_quick.js]Redirection si timeout pour la recherche
parent
a43e1d0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
1 deletion
+44
-1
note/ajaj.py
note/ajaj.py
+1
-1
static/js/custom/liste_dynamique_quick.js
static/js/custom/liste_dynamique_quick.js
+43
-0
No files found.
note/ajaj.py
View file @
de4748c1
...
...
@@ -38,7 +38,7 @@ def quick_search(request):
return
HttpResponse
(
json
.
dumps
(
out
))
else
:
response
=
sock_ou_response
return
response
return
HttpResponse
(
u
'"Erreur"'
)
@
csrf_exempt
def
get_display_info
(
request
):
...
...
static/js/custom/liste_dynamique_quick.js
View file @
de4748c1
...
...
@@ -20,6 +20,11 @@
- tosecondstack
**/
var
href
=
window
.
location
.
href
;
var
tmpArray
=
href
.
split
(
'
/
'
);
var
fichier
=
tmpArray
[
tmpArray
.
length
-
2
];
//fichier est le nom de la page courante
/* fonction qui effectue la recherche puis appelle readData en callback */
function
request
(
asked
,
callback
)
{
...
...
@@ -27,6 +32,44 @@ function request(asked, callback) {
xhr
.
onreadystatechange
=
function
()
{
if
(
xhr
.
readyState
==
4
&&
(
xhr
.
status
==
200
||
xhr
.
status
==
0
))
{
if
(
xhr
.
responseText
==
'
"Erreur"
'
)
{
if
(
fichier
==
'
consos
'
){
if
(
!
isEmpty
(
stack_button
))
{
//Soit on faisait des consos
saveStack
(
"
stack_button
"
,
stack_button
)
saveStack
(
"
ordered_stack
"
,
ordered_stack
)
}
if
(
!
isEmpty
(
display_stack
))
{
//Soit on faisait des consos
for
(
var
note
in
display_stack
)
{
delete
display_stack
[
note
][
"
source
"
]
}
saveStack
(
"
display_stack
"
,
display_stack
)
saveStack
(
"
cstack
"
,
stack
)
}
}
if
(
fichier
==
'
consos-double
'
){
if
(
!
isEmpty
(
stack_button
))
{
//Soit on faisait des consos
saveStack
(
"
stack_button
"
,
stack_button
)
saveStack
(
"
ordered_stack
"
,
ordered_stack
)
}
if
(
!
isEmpty
(
display_stack
))
{
//Soit on faisait des consos
for
(
var
note
in
display_stack
)
{
delete
display_stack
[
note
][
"
source
"
]
}
saveStack
(
"
display_stack
"
,
display_stack
)
saveStack
(
"
cstack
"
,
stack
)
}
if
(
!
isEmpty
(
display_stack_2
))
{
//Soit on faisait des consos
for
(
var
note
in
display_stack_2
)
{
delete
display_stack_2
[
note
][
"
source
"
]
}
saveStack
(
"
display_stack_2
"
,
display_stack_2
)
saveStack
(
"
cstack_2
"
,
stack_2
)
}
}
window
.
location
.
replace
(
"
/note/?next=%2Fnote%2F
"
+
fichier
+
"
%2F
"
);
return
;
}
callback
(
xhr
.
responseText
);
}
};
...
...
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