Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
3f9c4420
Commit
3f9c4420
authored
Oct 13, 2016
by
c24b
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tour PROJECTS [WIP] add project stop tour
parent
befbca35
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
32 deletions
+67
-32
guided_tour.js
static/lib/gargantext/guided_tour.js
+59
-24
menu.html
templates/pages/menu.html
+6
-6
overview.html
templates/pages/projects/overview.html
+2
-2
No files found.
static/lib/gargantext/guided_tour.js
View file @
3f9c4420
...
...
@@ -26,48 +26,82 @@ function popOverFactory(selector, pos, confirmation){
var
steps
=
{}
function
getStep
(
element
,
i
){
steps
=
$
(
document
).
find
(
".tour"
)
console
.
log
(
"curr"
,
element
);
$
(
document
).
on
(
"click"
,
"button[data-role='next']"
,
function
(
e
){
$
(
element
).
popover
(
"hide"
);
native_pop
=
$
(
element
).
children
()
native_pop
.
popover
(
"show"
);
i
=
i
+
1
return
i
})
$
(
document
).
on
(
"click"
,
"button[data-role='prev']"
,
function
(
i
){
$
(
element
).
popover
(
"hide"
);
native_pop
=
$
(
element
).
children
()
native_pop
.
popover
(
"show"
);
i
=
i
-
1
return
i
})
element
=
steps
[
i
]
popOverFactory
(
element
,
"right"
);
$
(
element
).
popover
(
"show"
);
alert
(
i
);
return
[
element
,
i
];
}
function
nextStep
(
element
,
i
){
steps
=
$
(
document
).
find
(
".tour"
)
$
(
document
).
on
(
"click"
,
"button[data-role='next']"
,
function
(
e
){
console
.
log
(
"curr"
,
element
);
$
(
element
).
popover
(
"hide"
);
native_pop
=
$
(
element
).
children
()
//native_pop.addClass("tour")
native_pop
.
popover
(
"show"
);
i
=
i
+
1
active
=
$
.
find
(
".in
"
)
//$("div.status-form").appendTo("Enter a name and click on add project")
//addFormStatus("success","div#createForm", "Enter a name and click on add project
")
if
(
active
.
length
>
0
){
return
[
native_pop
,
i
]
}
else
{
element
=
steps
[
i
]
console
.
log
(
"next"
,
element
);
popOverFactory
(
element
,
"right"
);
$
(
element
).
popover
(
"show"
);
$
(
element
).
popover
(
"hide"
);
return
[
element
,
i
];
active
=
$
.
find
(
".in"
)
submit
=
$
(
active
).
find
(
"button"
)
if
(
submit
.
length
>=
1
){
$
(
document
).
on
(
"click"
,
submit
,
function
(
e
){
i
=
i
+
1
"clicked"
})
}
else
{
i
=
i
+
1
}
});
}
function
prevStep
(
element
,
i
){
steps
=
$
(
document
).
find
(
".tour"
)
$
(
document
).
on
(
"click"
,
"button[data-role='prev']"
,
function
(
e
){
console
.
log
(
"curr"
,
element
);
$
(
element
).
popover
(
"hide"
);
alert
(
i
)
i
=
i
-
1
alert
(
i
)
// if (active.length > 0){
// $("button")
// i = i+2
//native_pop.popover("hide")
//return [native_pop, i]
//$(document).on("change keyup paste", function(){
// alert("typing...")
//})
// }
// else{
// i = i+2
// }
element
=
steps
[
i
]
console
.
log
(
"
prev
"
,
element
);
console
.
log
(
"child"
,
$
(
document
).
find
(
".popover"
));
console
.
log
(
"
next
"
,
element
);
popOverFactory
(
element
,
"right"
);
$
(
element
).
popover
(
"show"
);
return
[
element
,
i
];
});
}
function
activateTour
(){
...
...
@@ -89,6 +123,7 @@ function activateTour(){
//buildTour
curr
=
$
(
this
)
i
=
-
1
//curr, i = getStep(curr,i)
curr
,
i
=
nextStep
(
curr
,
i
)
console
.
log
(
i
,
curr
)
if
(
i
>
steps
.
lenght
){
...
...
templates/pages/menu.html
View file @
3f9c4420
...
...
@@ -28,21 +28,21 @@
</li>
{% if user.is_authenticated %}
<li
><a
href=
"/projects/"
class=
"help"
title=
"All your projects are here.
"
>
<li
class=
"tour"
title=
"Projects"
content=
"This tabs show you all the projects"
><a
href=
"/projects/
"
>
<span
class=
"glyphicon glyphicon-home"
aria-hidden=
"true"
></span>
Projects
</a>
</li>
{% endif %}
{% if project %}
<li><a
href=
"/projects/{{project.id}}"
>
<li
class=
"tour"
title=
"Corpus"
content=
"This tabs show you all the corpora of your project"
><a
href=
"/projects/{{project.id}}"
>
<span
class=
"glyphicon glyphicon-book"
aria-hidden=
"true"
></span>
{{project.name | truncatechars:15}}
</a>
</li>
{% endif %}
{% if corpus %}
<li><a
href=
"/projects/{{project.id}}/corpora/{{corpus.id}}"
>
<li
class=
"tour"
title=
"Documents"
content=
"This tabs show you all the documents of your corpus"
><a
href=
"/projects/{{project.id}}/corpora/{{corpus.id}}"
>
<span
class=
"glyphicon glyphicon-file"
aria-hidden=
"true"
></span>
{{corpus.name | truncatechars:25}}
</a>
...
...
@@ -50,7 +50,7 @@
{% endif %}
{% if view == "graph" %}
<li
id=
"graph-rename"
style=
"padding:15"
>
<li
class=
"tour"
title=
"Graph"
content=
"This tabs show you all your graphs"
id=
"graph-rename"
style=
"padding:15"
>
<span
class=
"glyphicon glyphicon-edit"
aria-hidden=
"true"
></span>
<span
id=
"graph-name"
class=
"editable"
ondblclick=
"makeEditable(this)"
>
Name your graph
...
...
@@ -115,7 +115,7 @@
{% if corpus %}
<div
class=
"container"
>
<ul
id=
"corporatop"
class=
"nav nav-tabs navbar-static-top nav-justified"
>
<li>
<li
"
>
<a
type=
"button"
class=
"btn btn-default {% if view == 'titles' %} active {% endif %}"
onclick=
"javascript:location.href='/projects/{{project.id}}/corpora/{{ corpus.id }}/'"
data-target=
'#'
href=
'#'
>
...
...
@@ -351,7 +351,7 @@
}
});});
activateTour
();
</script>
...
...
templates/pages/projects/overview.html
View file @
3f9c4420
...
...
@@ -42,7 +42,7 @@
<div
class=
"jumbotron"
>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<h1
class=
"tour"
title=
"Projects"
type=
"button"
content=
"This is the page for all your project"
>
<h1>
<span
class=
"glyphicon glyphicon-home"
aria-hidden=
"true"
></span>
Projects
</h1>
...
...
@@ -82,7 +82,7 @@
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
class=
"tour"
title=
"Projects"
type=
"button"
content=
"Here is the listing of all your project"
>
<!-- GENERIC STATUS INFO -->
<div
id=
"status"
class=
"row col-lg-12 collapse"
>
...
...
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