私はyii2をバックエンドフレームワークとして使用しています。私は自分のアプリケーションをツアーしたいのですが、ブートストラップツアーポップオーバーは2ページ目に表示されません。ブートストラップツアーを作成してレイアウトに登録すると、ブートストラップツアーは最初のページで正常に動作しますが、別のページに行くと問題が発生し、次のページのデバッグに表示されます:
ブートストラップツアー 'ツアー' |ペーパー/アップロードにリダイレクト
ブートストラップツアー 'ツアー' |紙/アップロードマルチページブートストラップツアー、第2ページのポップオーバー
にエラーのリダイレクトループ私はすでにクロームの開発ツールでウィンドウのローカルストレージをチェックして、第二のページウィンドウに行くローカルストレージが示されたとき、それは正しいステップである参照: tour_current_step値2を、
と別の質問、どのようにyii2ルーターのブートストラップツアーでパスオプションの値を設定する必要があります、私のパスは正しいですか?例えば、最初のステップはサイトのメインページです: ""、それは正しいです、誰かが前のステップに戻るpopoverの前のボタンをクリックした場合、私は欲しいです。ここ
は私のjavascriptのコードで、私はレイアウトファイルにこのJavaScriptコードを登録します。私は、コード上の多くの作業を行い、最終的に答えを見つける
$(function() {
var $demo, duration, remaining, tour;
$demo = $("#demo");
duration = 5000;
remaining = duration;
tour = new Tour({
onStart: function() {
return $demo.addClass("disabled", true);
},
onEnd: function() {
return $demo.removeClass("disabled", true);
},
debug: true,
steps: [
{
path: "",
element: "#demo",
placement: "bottom",
title: "Welcome to Bootstrap Tour!",
content: "Introduce new users to your product by walking them through it step by step."
}, {
path: "",
element: "#Wordcounter",
placement: "bottom",
title: "Step One",
content: "For translation click on word counter menu item"
}, {
path: "paper/upload",
element: "#myDropzone",
placement: "top",
title: "Step two",
content: "Drag and Drop your file here or click to upload plz wate to complete upload"
}
,
{
path: "paper/upload",
element: "#next",
placement: "bottom",
title: "Step three",
content: "then Click on the Next Bottom",
reflex: true
}, {
path: "paper/show",
element: "#save",
placement: "top",
title: "Step four",
content: "click on save and continue and choose language plan",
duration: 5000
}
]
}).init();
if (tour.ended()) {
$('<div class="alert alert-info alert-dismissable"><button class="close" data-dismiss="alert" aria-hidden="true">×</button>You ended the demo tour. <a href="#" data-demo>Restart the demo tour.</a></div>').prependTo(".content").alert();
}
$(document).on("click", "[data-demo]", function(e) {
e.preventDefault();
if ($(this).hasClass("disabled")) {
return;
}
tour.restart();
return $(".alert").alert("close");
});
});