X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/65750ae07c7891ea23adcddc3204d9a8c8fa0e9e..6eb09805dd1b6a4a3a7305eff38449ebcf5154db:/redakcja/static/js/catalogue/catalogue.js diff --git a/redakcja/static/js/catalogue/catalogue.js b/redakcja/static/js/catalogue/catalogue.js index 33764a71..796e3e8b 100755 --- a/redakcja/static/js/catalogue/catalogue.js +++ b/redakcja/static/js/catalogue/catalogue.js @@ -36,8 +36,8 @@ weekStart: 1, onRender: function(date) { return date.valueOf() < now.valueOf() ? 'disabled' : ''; - }, - }).on('changeDate', function(ev) { + } + }).on('changeDate', function() { checkout.hide(); }).data('datepicker'); }); @@ -47,20 +47,21 @@ var helpdiv = $(this).next(); if (helpdiv.hasClass('help-text')) { var helptext = $("option:selected", this).attr('data-help'); - helpdiv.html($("option:selected", this).attr('data-help') || ''); + helpdiv.html(helptext || ''); } }); // tutorial mode - var tutorial; + var tutorial, tutorial_no; var start; var first_reset = true; function tutreset() { if (start) $(start).popover('hide'); start = null; + tutorial_no = null; var all_tutorial = $('[data-toggle="tutorial"]'); function sortKey(a) { @@ -70,21 +71,19 @@ 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'; + var but = (i < tutorial.length - 1) ? '>>' : 'OK', + but_prev_html = i === 0 ? '' : '<<'; $(e).popover({ title: '×Tutorial', trigger: 'focus', html: 'true', - template: '
' + template: '