// Tutorial handling define(["webL10n", "activity/activity"], function () { var tutorial = {}; var tour; var l10n = l10n_s; tutorial.elements = []; tutorial.tourInit = 1; tutorial.tourStandard = 2; // Init tutorial tutorial.init = function(tourType) { var prevString = l10n.get("TutoPrev"); var nextString = l10n.get("TutoNext"); var endString = l10n.get("TutoEnd"); var steps; if (tourType == tutorial.tourInit) { steps = [ { reflex: "click", element: tutorial.getElement("activity"), placement: "bottom", title: l10n.get("TutoActivityTitle"), content: l10n.get("TutoActivityContent") }, { element: tutorial.getElement("title"), placement: "right", title: l10n.get("TutoTitleTitle"), content: l10n.get("TutoTitleContent") }, { reflex: "click", element: tutorial.getElement("network"), placement: "bottom", title: l10n.get("TutoNetworkTitle"), content: l10n.get("TutoNetworkContent") }, { element: tutorial.getElement("shared"), placement: "right", title: l10n.get("TutoSharedTitle"), content: l10n.get("TutoSharedContent") }, { element: tutorial.getElement("help"), placement: "bottom", title: l10n.get("TutoHelpTitle"), content: l10n.get("TutoHelpContent") }, { element: tutorial.getElement("stop"), placement: "bottom", title: l10n.get("TutoStopTitle"), content: l10n.get("TutoStopContent") }, ]; } else { steps = [ { element: "", orphan: true, placement: "bottom", title: l10n.get("TutoExplainTitle"), content: l10n.get("TutoExplainContent") }, { element: tutorial.getElement("node"), placement: "right", title: l10n.get("TutoNodeTitle"), content: l10n.get("TutoNodeContent") }, { element: tutorial.getElement("color"), placement: "bottom", title: l10n.get("TutoColorTitle"), content: l10n.get("TutoColorContent") }, { element: tutorial.getElement("add"), placement: "bottom", title: l10n.get("TutoAddTitle"), content: l10n.get("TutoAddContent") }, { element: tutorial.getElement("remove"), placement: "bottom", title: l10n.get("TutoRemoveTitle"), content: l10n.get("TutoRemoveContent") }, { element: tutorial.getElement("undo"), placement: "bottom", title: l10n.get("TutoUndoTitle"), content: l10n.get("TutoUndoContent") }, { element: tutorial.getElement("redo"), placement: "bottom", title: l10n.get("TutoRedoTitle"), content: l10n.get("TutoRedoContent") }, { element: tutorial.getElement("zoom"), placement: "bottom", title: l10n.get("TutoZoomTitle"), content: l10n.get("TutoZoomContent") }, { element: tutorial.getElement("png"), placement: "bottom", title: l10n.get("TutoPngTitle"), content: l10n.get("TutoPngContent") }, ]; } tour = new Tour({ template: "\