Commit d0e9477d authored by c24b's avatar c24b

Popover test for tour guided

parent 4aeeffd5
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<script type="text/javascript" src="{% static "lib/jquery/1.11.1/jquery.min.js" %}"></script> <script type="text/javascript" src="{% static "lib/jquery/1.11.1/jquery.min.js" %}"></script>
<link rel="stylesheet" type="text/css" href="{% static "lib/bootstrap/3.0.2/bootstrap.css" %}"> <link rel="stylesheet" type="text/css" href="{% static "lib/bootstrap/3.0.2/bootstrap.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "lib/gargantext/menu.css"%}"/> <link rel="stylesheet" type="text/css" href="{% static "lib/gargantext/menu.css"%}"/>
<script type="text/javascript" src="{% static "lib/gargantext/guided_tour.js" %}"></script>
{% block css %} {% block css %}
{% endblock %} {% endblock %}
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</ul> </ul>
<ul class="nav navbar-nav pull-right"> <ul class="nav navbar-nav pull-right">
<li> <li>
<a id="guided_tour" role="button" content="<p>Activate contextual help and discover how Gargantext works step by step</p>"> <a id="guided_tour" role="button" title="Guided Tour" content="Activate the discovery mode">
<i class="glyphicon glyphicon-question-sign" aria-hidden="true"></i> <i class="glyphicon glyphicon-question-sign" aria-hidden="true"></i>
Guided Tour Guided Tour
</a> </a>
...@@ -341,43 +341,35 @@ ...@@ -341,43 +341,35 @@
<script type="text/javascript"> <script type="text/javascript">
// initializes the popover elements with jquery // initializes the popover elements with jquery
// $(function () { $("[data-toggle='popover']").popover({ $(function () { $("[data-toggle='popover']").popover({
// html: true, html: true,
// title: function() { title: function() {
// return $("#popover-head").html(); return $("#popover-head").html();
// }, },
// content: function() { content: function() {
// return $("#popover-content").html(); return $("#popover-content").html();
// } }
// });}); });});
// function popOverFactory(selector, pos){ $(document).on("click", "a#guided_tour", function(e){
// $(selector).attr({ "type": "button", //make tab active
// "data-toggle": "popover", $(this).parent().addClass("active");
// "data-placement": pos, popOverFactory($(this), "bottom", true);
// "data-trigger": "focus", $(this).popover("show");
// });
// });
// $(selector).popover({ $(document).on("click", "button#close", function(e){
// html:true,
// trigger:'toogle', $(this).popover("hide");
// title: selector.attr("title"), });
// content: selector.attr("content"), $(document).on("click", "button#ok", function(e){
// });
// }; popOverFactory($("p#add_help"), "left", false);
// $("p#add_help").popover("show");
// $(document).on("click", "a#guided_tour", function(e){ //$("button#add").popover("show");
// //make tab active
// $(this).parent().addClass("active"); $(this).parent().parent().parent().remove();
// popOverFactory($(this), "bottom"); });
// $(this).popover("show");
//
//
// //$('[data-toggle="popover"]').popover()
// });
// $(document).on("hover", ".help", function(e){
// popOverFactory($(this), "top");
// $(this).popover('show');
// });
</script> </script>
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</div> </div>
<div class="col-md-3"></div> <div class="col-md-3"></div>
<div class="col-md-5"> <div class="col-md-5">
<p> <p id="add_help" title="STEP 1: create a New Project" content="<p>Click on the button to create a project</p>">
<br> <br>
<button id="add" type="button" class="btn btn-primary btn-lg" data-container="body" data-toggle="popover" data-placement="bottom"> <button id="add" type="button" class="btn btn-primary btn-lg" data-container="body" data-toggle="popover" data-placement="bottom">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
......
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