src/ztfy/myams/resources/js/ext/bootstrap-wizard-1.4.2.min.js
changeset 202 cc928d5f90d5
child 206 02a40997d8cb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ztfy/myams/resources/js/ext/bootstrap-wizard-1.4.2.min.js	Fri May 12 13:42:04 2017 +0200
@@ -0,0 +1,12 @@
+/*
+ * jQuery twitter bootstrap wizard plugin
+ * Examples and documentation at: http://github.com/VinceG/twitter-bootstrap-wizard
+ * version 1.4.2
+ * Requires jQuery v1.3.2 or later
+ * Supports Bootstrap 2.2.x, 2.3.x, 3.0
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ * Authors: Vadim Vincent Gabriel (http://vadimg.com), Jason Gill (www.gilluminate.com)
+ */
+(function(b){var a=function(f,l){var f=b(f);var e=this;var j='li:has([data-toggle="tab"])';var h=[];var k=b.extend({},b.fn.bootstrapWizard.defaults,l);var g=null;var i=null;this.rebindClick=function(m,n){m.unbind("click",n).bind("click",n)};this.fixNavigationButtons=function(){if(!g.length){i.find("a:first").tab("show");g=i.find(j+":first")}b(k.previousSelector,f).toggleClass("disabled",(e.firstIndex()>=e.currentIndex()));b(k.nextSelector,f).toggleClass("disabled",(e.currentIndex()>=e.navigationLength()));b(k.nextSelector,f).toggleClass("hidden",(e.currentIndex()>=e.navigationLength()&&b(k.finishSelector,f).length>0));b(k.lastSelector,f).toggleClass("hidden",(e.currentIndex()>=e.navigationLength()&&b(k.finishSelector,f).length>0));b(k.finishSelector,f).toggleClass("hidden",(e.currentIndex()<e.navigationLength()));b(k.backSelector,f).toggleClass("disabled",h.length===0);b(k.backSelector,f).toggleClass("hidden",(e.currentIndex()>=e.navigationLength()&&b(k.finishSelector,f).length>0));e.rebindClick(b(k.nextSelector,f),e.next);e.rebindClick(b(k.previousSelector,f),e.previous);e.rebindClick(b(k.lastSelector,f),e.last);e.rebindClick(b(k.firstSelector,f),e.first);e.rebindClick(b(k.finishSelector,f),e.finish);e.rebindClick(b(k.backSelector,f),e.back);if(k.onTabShow&&typeof k.onTabShow==="function"&&k.onTabShow(g,i,e.currentIndex())===false){return false}};this.next=function(n){if(f.hasClass("last")){return false}if(k.onNext&&typeof k.onNext==="function"&&k.onNext(g,i,e.nextIndex())===false){return false}var o=e.currentIndex();var m=e.nextIndex();if(m>e.navigationLength()){}else{h.push(o);i.find(j+(k.withVisible?":visible":"")+":eq("+m+") a").tab("show")}};this.previous=function(n){if(f.hasClass("first")){return false}if(k.onPrevious&&typeof k.onPrevious==="function"&&k.onPrevious(g,i,e.previousIndex())===false){return false}var o=e.currentIndex();var m=e.previousIndex();if(m<0){}else{h.push(o);i.find(j+(k.withVisible?":visible":"")+":eq("+m+") a").tab("show")}};this.first=function(m){if(k.onFirst&&typeof k.onFirst==="function"&&k.onFirst(g,i,e.firstIndex())===false){return false}if(f.hasClass("disabled")){return false}h.push(e.currentIndex());i.find(j+":eq(0) a").tab("show")};this.last=function(m){if(k.onLast&&typeof k.onLast==="function"&&k.onLast(g,i,e.lastIndex())===false){return false}if(f.hasClass("disabled")){return false}h.push(e.currentIndex());i.find(j+":eq("+e.navigationLength()+") a").tab("show")};this.finish=function(m){if(k.onFinish&&typeof k.onFinish==="function"){k.onFinish(g,i,e.lastIndex())}};this.back=function(){if(h.length==0){return null}var m=h.pop();if(k.onBack&&typeof k.onBack==="function"&&k.onBack(g,i,m)===false){h.push(m);return false}f.find(j+":eq("+m+") a").tab("show")};this.currentIndex=function(){return i.find(j+(k.withVisible?":visible":"")).index(g)};this.firstIndex=function(){return 0};this.lastIndex=function(){return e.navigationLength()};this.getIndex=function(m){return i.find(j+(k.withVisible?":visible":"")).index(m)};this.nextIndex=function(){var m=this.currentIndex();var n=null;do{m++;n=i.find(j+(k.withVisible?":visible":"")+":eq("+m+")")}while((n)&&(n.hasClass("disabled")));return m};this.previousIndex=function(){var n=this.currentIndex();var m=null;do{n--;m=i.find(j+(k.withVisible?":visible":"")+":eq("+n+")")}while((m)&&(m.hasClass("disabled")));return n};this.navigationLength=function(){return i.find(j+(k.withVisible?":visible":"")).length-1};this.activeTab=function(){return g};this.nextTab=function(){return i.find(j+":eq("+(e.currentIndex()+1)+")").length?i.find(j+":eq("+(e.currentIndex()+1)+")"):null};this.previousTab=function(){if(e.currentIndex()<=0){return null}return i.find(j+":eq("+parseInt(e.currentIndex()-1)+")")};this.show=function(m){var n=isNaN(m)?f.find(j+' a[href="#'+m+'"]'):f.find(j+":eq("+m+") a");if(n.length>0){h.push(e.currentIndex());n.tab("show")}};this.disable=function(m){i.find(j+":eq("+m+")").addClass("disabled")};this.enable=function(m){i.find(j+":eq("+m+")").removeClass("disabled")};this.hide=function(m){i.find(j+":eq("+m+")").hide()};this.display=function(m){i.find(j+":eq("+m+")").show()};this.remove=function(o){var m=o[0];var p=typeof o[1]!="undefined"?o[1]:false;var n=i.find(j+":eq("+m+")");if(p){var q=n.find("a").attr("href");b(q).remove()}n.remove()};var d=function(p){var m=i.find(j);var n=m.index(b(p.currentTarget).parent(j));var o=b(m[n]);if(k.onTabClick&&typeof k.onTabClick==="function"&&k.onTabClick(g,i,e.currentIndex(),n,o)===false){return false}};var c=function(o){var n=b(o.target).parent();var m=i.find(j).index(n);if(n.hasClass("disabled")){return false}if(k.onTabChange&&typeof k.onTabChange==="function"&&k.onTabChange(g,i,e.currentIndex(),m)===false){return false}g=n;e.fixNavigationButtons()};this.resetWizard=function(){b('a[data-toggle="tab"]',i).off("click",d);b('a[data-toggle="tab"]',i).off("show show.bs.tab",c);i=f.find("ul:first",f);g=i.find(j+".active",f);b('a[data-toggle="tab"]',i).on("click",d);b('a[data-toggle="tab"]',i).on("show show.bs.tab",c);e.fixNavigationButtons()};i=f.find("ul:first",f);g=i.find(j+".active",f);if(!i.hasClass(k.tabClass)){i.addClass(k.tabClass)}if(k.onInit&&typeof k.onInit==="function"){k.onInit(g,i,0)}if(k.onShow&&typeof k.onShow==="function"){k.onShow(g,i,e.nextIndex())}b('a[data-toggle="tab"]',i).on("click",d);b('a[data-toggle="tab"]',i).on("show show.bs.tab",c)};b.fn.bootstrapWizard=function(d){if(typeof d=="string"){var c=Array.prototype.slice.call(arguments,1);if(c.length===1){c.toString()}return this.data("bootstrapWizard")[d](c)}return this.each(function(e){var f=b(this);if(f.data("bootstrapWizard")){return}var g=new a(f,d);f.data("bootstrapWizard",g);g.fixNavigationButtons()})};b.fn.bootstrapWizard.defaults={withVisible:true,tabClass:"nav nav-pills",nextSelector:".wizard li.next",previousSelector:".wizard li.previous",firstSelector:".wizard li.first",lastSelector:".wizard li.last",finishSelector:".wizard li.finish",backSelector:".wizard li.back",onShow:null,onInit:null,onNext:null,onPrevious:null,onLast:null,onFirst:null,onFinish:null,onBack:null,onTabChange:null,onTabClick:null,onTabShow:null}})(jQuery);
\ No newline at end of file