<script type="text/javascript">less = {relativeUrls: true};</script>
<script src="{% static 'wiki/editor/libs/less-1.3.3.min.js' %}"></script>
<script src="{% static 'wiki/editor/libs/require.js' %}" data-main="{% static 'wiki/editor/src/editor/entrypoint.js' %}" ></script>
+ <script src="{% static 'wiki/editor/libs/jquery-1.9.1.min.js' %}"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
{% else %}
<link href="{% static 'wiki/build/rng.css' %}" rel="stylesheet">
<script src="{% static 'wiki/build/rng.js' %}"></script>
{% endif %}
+ <script src="{% static 'js/catalogue/catalogue.js' %}"></script> {# for tutorial #}
</head>
<body>
<script type="text/javascript">
fields: [
],
revision_field_name: '{{forms.text_publish.revision.html_name}}'
- }
+ },
+ tutorial: [
+ {name: 'editor', text: 'e'},
+ {name: 'sourceEditor', text: 's'},
+ {name: 'history', text: 's'},
+ {name: 'switchToHeader', text: 's'},
+ {name: 'switchToParagraph', text: 's'},
+ {name: 'switchToImage', text: 's'},
+ {name: 'switchToVideo', text: 's'},
+ {name: 'toggleBulletList', text: 's'},
+ {name: 'toggleEnumList', text: 's'},
+ {name: 'emphasis', text: 's'},
+ {name: 'cite', text: 's'},
+ {name: 'link', text: 's'},
+ {name: 'showMetadataEditor', text: 's'},
+ {name: 'preview', text: 's'},
+ {name: 'attachments', text: 's'},
+ {name: 'draft', text: 's'},
+ {name: 'comment', text: 's'}, // needs to be set manually in comments.html :(
+ {name: 'save', text: 's'},
+ {name: 'mainpage', text: 's'},
+ {name: 'exit', text: 's'}
+ ]
};
{% if can_pubmark %}
start = null;
var all_tutorial = $('[data-toggle="tutorial"]');
+ function sortKey(a) {
+ return parseInt($(a).attr('data-tutorial'));
+ }
tutorial = $.makeArray(all_tutorial.sort(
- function(a, b) {return $(a).attr('data-tutorial') < $(b).attr('data-tutorial') ? -1 : 1}
+ function(a, b) {return sortKey(a) < sortKey(b) ? -1 : 1}
));
+ console.log($(tutorial[0]).data('popover'));
+ console.log($(tutorial[16]).data('popover'));
if (first_reset) {
$.each(tutorial, function(i, e) {
var but = (i < tutorial.length - 1) ? '>>' : 'OK';
function tuton() {
sessionStorage.setItem("tutorial", "on");
tutreset();
- $('#tutModal').modal('show');
+ var $tutModal = $('#tutModal');
+ if($tutModal.length === 0) {
+ tut();
+ } else {
+ $tutModal.modal('show');
+ }
return false;
}
function tutoff() {