From a18f1683a5e40a3670600b5e7e961e1fe15fd40c Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sun, 10 May 2015 17:55:16 +0200 Subject: [PATCH] Added newer SmartWizard (CC license) --- Site5/Scripts/jquery.smartWizard-3.3.1.js | 489 ++++++++++++++++++++++ 1 file changed, 489 insertions(+) create mode 100644 Site5/Scripts/jquery.smartWizard-3.3.1.js diff --git a/Site5/Scripts/jquery.smartWizard-3.3.1.js b/Site5/Scripts/jquery.smartWizard-3.3.1.js new file mode 100644 index 00000000..1a838de7 --- /dev/null +++ b/Site5/Scripts/jquery.smartWizard-3.3.1.js @@ -0,0 +1,489 @@ +/* + * SmartWizard 3.3.1 plugin + * jQuery Wizard control Plugin + * by Dipu + * + * Refactored and extended: + * https://github.com/mstratman/jQuery-Smart-Wizard + * + * Original URLs: + * http://www.techlaboratory.net + * http://tech-laboratory.blogspot.com + */ + +function SmartWizard(target, options) { + this.target = target; + this.options = options; + this.curStepIdx = options.selected; + this.steps = $(target).children("ul").children("li").children("a"); // Get all anchors + this.contentWidth = 0; + this.msgBox = $('
X
'); + this.elmStepContainer = $('
').addClass("stepContainer"); + this.loader = $('
Loading
').addClass("loader"); + this.buttons = { + next: $('' + options.labelNext + '').attr("href", "#").addClass("buttonNext"), + previous: $('' + options.labelPrevious + '').attr("href", "#").addClass("buttonPrevious"), + finish: $('' + options.labelFinish + '').attr("href", "#").addClass("buttonFinish") + }; + + /* + * Private functions + */ + + var _init = function ($this) { + var elmActionBar = $('
').addClass("actionBar"); + elmActionBar.append($this.msgBox); + $('.close', $this.msgBox).click(function () { + $this.msgBox.fadeOut("normal"); + return false; + }); + + var allDivs = $this.target.children('div'); + // CHeck if ul with steps has been added by user, if not add them + if ($this.target.children('ul').length == 0) { + var ul = $("