Skip to content

Commit

Permalink
Updated help link, embedded player per site (#892)
Browse files Browse the repository at this point in the history
space to trick timeout exception

Removed switch statement

Add myplayer var via Ansible template

Update default myplayer for local dev environment
  • Loading branch information
Chandra Lash authored and ian-ross committed Nov 3, 2016
1 parent 3cac738 commit 1a8e6e6
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 70 deletions.
82 changes: 41 additions & 41 deletions cadasta/core/static/css/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cadasta/core/static/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ header {
}
}
}
.btn-info { // info button
.btn-help { // help button
border-radius: 0;
padding-top: 28px;
min-width: $header-height;
Expand All @@ -194,7 +194,7 @@ header {
@include button-variant(#fff, darken($btn-blue-bg, 5%), $btn-blue-bg);
transition: all 0.3s ease 0s;
}
.glyphicon-info-sign {
.glyphicon-question-sign {
font-size: 18px;
width: 48px;
height: 32px;
Expand Down
30 changes: 13 additions & 17 deletions cadasta/core/static/js/inline-manual-player.js

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions cadasta/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
</div>
{% endif %}
</div>
<!-- Info -->
<a class="btn btn-info pull-right visible-md-inline visible-lg-inline" aria-label="Info" id="info-link">
<span class="glyphicon glyphicon-info-sign"></span>
<!-- Help -->
<a class="btn btn-help pull-right visible-md-inline visible-lg-inline" aria-label="Help" id="help-link" href="#">
<span class="glyphicon glyphicon-question-sign"></span>
</a>
<nav class="nav" role="navigation">
<ul class="list-inline visible-md-block visible-lg-block">
Expand Down Expand Up @@ -100,7 +100,7 @@
<li class="organizations"><a href="{% url 'organization:list' %}">{% trans "Organizations" %}</a></li>
{% if is_superuser %}<li class="users"><a href="{% url 'user:list' %}">{% trans "Users" %}</a></li>{% endif %}
<li role="separator" class="divider"></li>
<li><a href="http://cadasta.org/platform/"><span class="glyphicon glyphicon-info-sign"></span> {% trans "Information" %}</a></li>
<li><a id="help-link" href="#"><span class="glyphicon glyphicon-question-sign"></span> {% trans "Help" %}</a></li>
</ul>
</div>
</nav>
Expand Down Expand Up @@ -236,12 +236,6 @@
$(".alert-success").fadeTo(500, 0).slideUp(500, function(){ $(this).hide(); });
}, 5000);
</script>
<script>
window.inlineManualTracking = {
uid: "{{ user.id }}",
username: "{{ user.username }}"
}
</script>
<script type="text/javascript" src="{% static 'js/inline-manual-player.js' %}"></script>
</body>
</html>
6 changes: 6 additions & 0 deletions provision/roles/cadasta/production/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
requirements="{{ application_path }}requirements/production.txt"
extra_args="--find-links https://s3.amazonaws.com:443/cadasta-wheelhouse/index.html"

- name: Write Inline Manual template to core files
become: yes
become_user: root
template: src=inline-manual-player
dest="{{ application_path }}cadasta/core/static/js/inline-manual-player.js"

17 changes: 17 additions & 0 deletions provision/roles/cadasta/production/templates/inline-manual-player
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Inline Manual Player, v2.34.1
http://inlinemanual.com/
*/

// User tracking

window.inlineManualTracking = {
uid: "{{ user.id }}",
username: "{{ user.username }}"
}

// Embed correct player for site - myplayer variable

var myplayer = "{{ myplayer }}";

!function(){var e=document.createElement("script"),t=document.getElementsByTagName("script")[0];e.async=1,e.src="https://inlinemanual.com/embed/player." + myplayer + ".js",e.charset="UTF-8",t.parentNode.insertBefore(e,t)}();

0 comments on commit 1a8e6e6

Please sign in to comment.