Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions data/narratives.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
management/zone/.*:
management/zone/[^/]*/$:
- li.manage-tab.active:
- step: 1
- text: Welcome! This is the landing page for admins. If at any point you would like to navigate back to this page, click on this tab!
Expand Down Expand Up @@ -28,17 +28,17 @@ update/videos:
- '#content_tree':
- step: 2
- text: Downloadable content will be organized in this topic tree.
- span.dynatree-node.dynatree-folder.dynatree-has-children.unstarted.dynatree-exp-c.dynatree-ico-cf:
- .fancytree-node:
- step: 3
- text: Simply toggle the "+" button to view see more subtopics under a topic....
- text: Simply toggle topic button to view see more subtopics.
update/languages:
- li.languages.active:
- step: 1
- text: Selecting the "Language" tab will take you to the place where you can download or update language packs!
- '#language-packs-selection':
- step: 2
- text: Click on this drop down menu to view the available language packs...
- '#option-bg':
- '#language-packs-ul li':
- step: 3
- text: ...select the language of your choice...
- before-showing:
Expand All @@ -47,7 +47,7 @@ update/languages:
- step: 4
- text: ...and details such as the number of subtitles, translation completion, and total download size will be displayed for the chosen language pack!
- before-showing:
- click: '#option-bg'
- click: '#language-packs-ul li'
- '#get-language-button':
- step: 5
- text: Just click this button to start your download!
Expand Down
4 changes: 4 additions & 0 deletions kalite/distributed/templates/distributed/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
{% block headjs %}{% endblock headjs %}
{% block analytics %}{% endblock analytics %}

<script>
// Inline help module may need to reload bootstrap src, so keep a reference to it.
window.bootstrap_src="{% static 'js/inline/bundles/bundle_bootstrap.js' %}";
</script>
<script type="text/javascript" src="{% static 'js/inline/bundles/bundle_inline_help.js' %}"></script>
</head>

Expand Down
7 changes: 6 additions & 1 deletion kalite/inline/api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
import os
import re

from django.utils.translation import ugettext as _

from kalite.shared.utils import open_json_or_yml
from kalite import settings

from fle_utils.internet.classes import JsonResponse
from fle_utils.internet.classes import JsonResponse, JsonResponseMessageWarning


def narrative_view(request, narrative_id):
Expand All @@ -25,4 +27,7 @@ def narrative_view(request, narrative_id):
the_narrative[key] = narr
break

if not the_narrative:
return JsonResponseMessageWarning(_("No inline help is available for this page."), status=404)

return JsonResponse(the_narrative)
4 changes: 4 additions & 0 deletions kalite/inline/static/js/inline/bundle_modules/bootstrap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file exists so that inline help can reload the bootstrap src, if it needs to.
// Sometimes bootstrap events might be disabled, such as when demonstrating an interactive menu, and then need to be
// re-enabled.
require("bootstrap/dist/js/bootstrap.min.js");
1 change: 1 addition & 0 deletions kalite/inline/static/js/inline/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ var ButtonView = BaseView.extend({

error: function(model, response, options) {
console.log("Unable to load inline tutorial narrative!");
self.$("#inline-btn").prop("disabled", true);
}
});
},
Expand Down