diff --git a/bower.json b/bower.json index 4ebeabbf..137054b2 100644 --- a/bower.json +++ b/bower.json @@ -1,5 +1,5 @@ { - "version": "1.1.0-rc.2", + "version": "1.1.0", "name": "toolkit", "description": "A collection of extensible front-end UI components for the responsive web.", "keywords": [ @@ -21,7 +21,7 @@ "fluid", "mobile" ], - "copyright": "Copyright 2010-2013, The Titon Project", + "copyright": "Copyright 2010-2014, The Titon Project", "homepage": "http://titon.io", "licenses": "https://github.com/titon/toolkit/blob/master/license.md", "author": ["Miles Johnson"], diff --git a/dist/jquery/toolkit-accordion.min.js b/dist/jquery/toolkit-accordion.min.js index f9832e73..042713db 100644 --- a/dist/jquery/toolkit-accordion.min.js +++ b/dist/jquery/toolkit-accordion.min.js @@ -1,6 +1,6 @@ /*! - * Titon Toolkit v1.1.0-rc.2 - * Copyright 2010-2013, The Titon Project - http://titon.io + * Titon Toolkit v1.1.0 + * Copyright 2010-2014, The Titon Project - http://titon.io * BSD-2 - https://github.com/titon/toolkit/blob/master/license.md */ -!function(a){"use strict";Toolkit.Accordion=Toolkit.Component.extend(function(b,c){var d,e,f;this.component="Accordion",this.version="1.0.0",this.options=c=this.setOptions(c),this.element=b=this.setElement(b),this.headers=e=this.element.find(c.headerElement),this.sections=f=this.element.find(c.contentElement),this.previousIndex=0,this.currentIndex=0,this.node=null,b.children("li").removeClass(Toolkit.options.isPrefix+"active"),e.each(function(b){a(this).data("index",b)}),f.each(function(){var b=a(this);b.data("height",b.height()).conceal()}),e.on("click"===c.mode?"click":"mouseover",this.__show.bind(this)),this.fireEvent("init"),d=e.item(e[c.defaultIndex]?c.defaultIndex:0),this.show(d)},{jump:function(a){a>=this.headers.length?a=0:0>a&&(a=this.headers.length-1),this.fireEvent("jump",a),this.show(this.headers[a])},show:function(b){b=a(b);var c=this.options,d=b.parent(),e=b.next(c.contentElement),f=b.data("index"),g=parseInt(e.data("height"),10),h=this.node&&this.node.is(b);if("click"===c.mode&&(c.multiple||c.collapsible&&h))e.is(":shown")&&this.node?(e.css("max-height",0).conceal(),d.removeClass(Toolkit.options.isPrefix+"active")):(e.css("max-height",g).reveal(),d.addClass(Toolkit.options.isPrefix+"active"));else{if(h)return;this.sections.css("max-height",0).conceal(),e.css("max-height",g).reveal(),this.element.children("li").removeClass(Toolkit.options.isPrefix+"active"),d.addClass(Toolkit.options.isPrefix+"active")}this.previousIndex=this.currentIndex,this.currentIndex=f,this.node=b,this.fireEvent("show",e)},__show:function(a){a.preventDefault(),this.show(a.currentTarget)}},{mode:"click",defaultIndex:0,multiple:!1,collapsible:!1,headerElement:".accordion-head",contentElement:".accordion-handle"}),Toolkit.createComponent("accordion",function(a){return new Toolkit.Accordion(this,a)})}(jQuery); \ No newline at end of file +!function(a){"use strict";Toolkit.Accordion=Toolkit.Component.extend(function(b,c){var d,e,f;this.component="Accordion",this.version="1.1.0",this.options=c=this.setOptions(c),this.element=b=this.setElement(b),this.headers=e=this.element.find(c.headerElement),this.sections=f=this.element.find(c.sectionElement),this.previousIndex=0,this.currentIndex=0,this.node=null,b.children("li").removeClass(Toolkit.options.isPrefix+"active"),e.each(function(b){a(this).data("index",b)}),f.each(function(){var b=a(this);b.data("height",b.height()).conceal()}),e.on("click"===c.mode?"click":"mouseover",this.__show.bind(this)),this.fireEvent("init"),d=e.item(e[c.defaultIndex]?c.defaultIndex:0),this.show(d)},{jump:function(a){a>=this.headers.length?a=0:0>a&&(a=this.headers.length-1),this.fireEvent("jump",a),this.show(this.headers[a])},show:function(b){b=a(b);var c=this.options,d=b.parent(),e=b.next(),f=b.data("index"),g=parseInt(e.data("height"),10),h=this.node&&this.node.is(b);if("click"===c.mode&&(c.multiple||c.collapsible&&h))e.is(":shown")&&this.node?(e.css("max-height",0).conceal(),d.removeClass(Toolkit.options.isPrefix+"active")):(e.css("max-height",g).reveal(),d.addClass(Toolkit.options.isPrefix+"active"));else{if(h)return;this.sections.css("max-height",0).conceal(),e.css("max-height",g).reveal(),this.element.children("li").removeClass(Toolkit.options.isPrefix+"active"),d.addClass(Toolkit.options.isPrefix+"active")}this.previousIndex=this.currentIndex,this.currentIndex=f,this.node=b,this.fireEvent("show",e)},__show:function(a){a.preventDefault(),this.show(a.currentTarget)}},{mode:"click",defaultIndex:0,multiple:!1,collapsible:!1,headerElement:".accordion-header",sectionElement:".accordion-section"}),Toolkit.createComponent("accordion",function(a){return new Toolkit.Accordion(this,a)})}(jQuery); \ No newline at end of file diff --git a/dist/jquery/toolkit-blackout.min.js b/dist/jquery/toolkit-blackout.min.js index 7b711bad..becc182f 100644 --- a/dist/jquery/toolkit-blackout.min.js +++ b/dist/jquery/toolkit-blackout.min.js @@ -1,6 +1,6 @@ /*! - * Titon Toolkit v1.1.0-rc.2 - * Copyright 2010-2013, The Titon Project - http://titon.io + * Titon Toolkit v1.1.0 + * Copyright 2010-2014, The Titon Project - http://titon.io * BSD-2 - https://github.com/titon/toolkit/blob/master/license.md */ !function(a){"use strict";Toolkit.Blackout=Toolkit.Component.extend(function(b){this.component="Blackout",this.version="1.1.0",this.options=b=this.setOptions(Toolkit.options,b),this.element=this.createElement(),this.count=0;var c=Toolkit.options.vendor,d="bubble-spinner"===b.loader?8:b.waveCount;this.loader=a("
").addClass(c+"loader").addClass(b.loader).appendTo(this.element);var e,f="";for(e=0;d>e;e++)f+="";"bubble-spinner"===b.loader?a("
").addClass("spinner").html(f).appendTo(this.loader):this.loader.html(f),this.message=a("
").addClass(c+"loader-message").html(b.loaderMessage).appendTo(this.loader),this.fireEvent("init")},{hide:function(){var a=this.count-1;0>=a?(this.count=0,this.element.conceal(),this.hideLoader()):this.count=a,this.fireEvent("hide",0>=a)},hideLoader:function(){this.loader.conceal()},show:function(){this.count++,this.element.reveal(),this.showLoader(),this.fireEvent("show")},showLoader:function(){this.loader.reveal()}},{loader:"bar-wave",loaderMessage:Toolkit.messages.loading,waveCount:5,template:'
',templateFrom:"#toolkit-blackout"});var b=null;Toolkit.Blackout.factory=function(a){return b?b:b=new Toolkit.Blackout(a)}}(jQuery); \ No newline at end of file diff --git a/dist/jquery/toolkit-carousel.min.js b/dist/jquery/toolkit-carousel.min.js index 00e1fcdc..fc12601c 100644 --- a/dist/jquery/toolkit-carousel.min.js +++ b/dist/jquery/toolkit-carousel.min.js @@ -1,6 +1,6 @@ /*! - * Titon Toolkit v1.1.0-rc.2 - * Copyright 2010-2013, The Titon Project - http://titon.io + * Titon Toolkit v1.1.0 + * Copyright 2010-2014, The Titon Project - http://titon.io * BSD-2 - https://github.com/titon/toolkit/blob/master/license.md */ -!function(a){"use strict";Toolkit.Carousel=Toolkit.Component.extend(function(b,c){if(this.component="Carousel",this.version="1.0.0",this.options=c=this.setOptions(c),this.element=b=this.setElement(b),this.itemsWrapper=b.find(c.itemsElement),this.itemsList=this.itemsWrapper.children("ul, ol"),this.items=this.itemsWrapper.find(c.itemElement),this.tabsWrapper=b.find(c.tabsElement),this.tabs=this.tabsWrapper.find(c.tabElement),this.nextButton=b.find(c.nextElement),this.prevButton=b.find(c.prevElement),this.previousIndex=0,this.currentIndex=0,this.timer=null,this.stopped=!1,this.items.length<=1)return this.tabsWrapper.hide(),this.nextButton.hide(),void this.prevButton.hide();switch(c.animation){case"fade":this.items.item(0).reveal();break;case"slide":this.itemsList.css("width",100*this.items.length+"%"),this.items.css("width",100/this.items.length+"%")}this.tabs.each(function(b){a(this).data("index",b)}),a(window).on("keydown",function(b){switch(a.inArray(b.keyCode,[37,38,39,40])>=0&&b.preventDefault(),b.keyCode){case 37:this.prev();break;case 38:this.jump(0);break;case 39:this.next();break;case 40:this.jump(-1)}}.bind(this)),c.stopOnHover&&this.element.on("mouseenter",this.stop.bind(this)).on("mouseleave",this.start.bind(this)),this.element.on("swipeleft",this.next.bind(this)).on("swiperight",this.prev.bind(this)),this.tabs.on("click",this.__jump.bind(this)),this.nextButton.on("click",this.next.bind(this)),this.prevButton.on("click",this.prev.bind(this)),this.fireEvent("init"),this.start(),this.reset()},{jump:function(a){switch(a>=this.items.length?a=0:0>a&&(a=this.items.length-1),this.previousIndex=this.currentIndex,this.currentIndex=a,this.tabs.length&&this.tabs.removeClass(Toolkit.options.isPrefix+"active").item(a).addClass(Toolkit.options.isPrefix+"active"),this.options.animation){case"fade":this.items.removeClass("show").item(a).reveal();break;case"slide-up":this.itemsList.css("top",-(100*a)+"%");break;default:this.itemsList.css("left",-(100*a)+"%")}this.reset(),this.fireEvent("jump",a)},next:function(){this.jump(this.currentIndex+1)},prev:function(){this.jump(this.currentIndex-1)},reset:function(){this.options.autoCycle&&(clearInterval(this.timer),this.timer=setInterval(this.__cycle.bind(this),this.options.duration))},start:function(){this.element.removeClass(Toolkit.options.isPrefix+"stopped"),this.stopped=!1,this.fireEvent("start")},stop:function(){this.element.addClass(Toolkit.options.isPrefix+"stopped"),this.stopped=!0,this.fireEvent("stop")},__cycle:function(){this.enabled&&!this.stopped&&(this.fireEvent("cycle"),this.next())},__jump:function(b){b.preventDefault(),this.enabled&&this.jump(a(b.target).data("index")||0)}},{animation:"slide",duration:5e3,autoCycle:!0,stopOnHover:!0,itemsElement:".carousel-items",itemElement:"li",tabsElement:".carousel-tabs",tabElement:"a",nextElement:".carousel-next",prevElement:".carousel-prev"}),Toolkit.createComponent("carousel",function(a){return new Toolkit.Carousel(this,a)})}(jQuery); \ No newline at end of file +!function(a){"use strict";Toolkit.Carousel=Toolkit.Component.extend(function(b,c){if(this.component="Carousel",this.version="1.0.0",this.options=c=this.setOptions(c),this.element=b=this.setElement(b),this.itemsWrapper=b.find(c.itemsElement),this.itemsList=this.itemsWrapper.children("ul, ol"),this.items=this.itemsWrapper.find(c.itemElement),this.tabsWrapper=b.find(c.tabsElement),this.tabs=this.tabsWrapper.find(c.tabElement),this.nextButton=b.find(c.nextElement),this.prevButton=b.find(c.prevElement),this.previousIndex=0,this.currentIndex=0,this.timer=null,this.stopped=!1,this.items.length<=1)return this.tabsWrapper.hide(),this.nextButton.hide(),void this.prevButton.hide();switch(c.animation){case"fade":this.items.item(0).reveal();break;case"slide":this.itemsList.css("width",100*this.items.length+"%"),this.items.css("width",100/this.items.length+"%")}this.tabs.each(function(b){a(this).data("index",b)}),a(window).on("keydown",function(b){switch(a.inArray(b.keyCode,[37,38,39,40])>=0&&b.preventDefault(),b.keyCode){case 37:this.prev();break;case 38:this.jump(0);break;case 39:this.next();break;case 40:this.jump(-1)}}.bind(this)),c.stopOnHover&&this.element.on("mouseenter",this.stop.bind(this)).on("mouseleave",this.start.bind(this)),this.element.on("swipeleft swipeup",this.next.bind(this)).on("swiperight swipdown",this.prev.bind(this)),this.tabs.on("click",this.__jump.bind(this)),this.nextButton.on("click",this.next.bind(this)),this.prevButton.on("click",this.prev.bind(this)),this.fireEvent("init"),this.start(),this.reset()},{jump:function(a){switch(a>=this.items.length?a=0:0>a&&(a=this.items.length-1),this.previousIndex=this.currentIndex,this.currentIndex=a,this.tabs.length&&this.tabs.removeClass(Toolkit.options.isPrefix+"active").item(a).addClass(Toolkit.options.isPrefix+"active"),this.options.animation){case"fade":this.items.removeClass("show").item(a).reveal();break;case"slide-up":this.itemsList.css("top",-(100*a)+"%");break;default:this.itemsList.css("left",-(100*a)+"%")}this.reset(),this.fireEvent("jump",a)},next:function(){this.jump(this.currentIndex+1)},prev:function(){this.jump(this.currentIndex-1)},reset:function(){this.options.autoCycle&&(clearInterval(this.timer),this.timer=setInterval(this.__cycle.bind(this),this.options.duration))},start:function(){this.element.removeClass(Toolkit.options.isPrefix+"stopped"),this.stopped=!1,this.fireEvent("start")},stop:function(){this.element.addClass(Toolkit.options.isPrefix+"stopped"),this.stopped=!0,this.fireEvent("stop")},__cycle:function(){this.enabled&&!this.stopped&&(this.fireEvent("cycle"),this.next())},__jump:function(b){b.preventDefault(),this.enabled&&this.jump(a(b.target).data("index")||0)}},{animation:"slide",duration:5e3,autoCycle:!0,stopOnHover:!0,itemsElement:".carousel-items",itemElement:"li",tabsElement:".carousel-tabs",tabElement:"a",nextElement:".carousel-next",prevElement:".carousel-prev"}),Toolkit.createComponent("carousel",function(a){return new Toolkit.Carousel(this,a)})}(jQuery); \ No newline at end of file diff --git a/dist/jquery/toolkit-drop.min.js b/dist/jquery/toolkit-drop.min.js index 4058d7b3..0e8e24ab 100644 --- a/dist/jquery/toolkit-drop.min.js +++ b/dist/jquery/toolkit-drop.min.js @@ -1,6 +1,6 @@ /*! - * Titon Toolkit v1.1.0-rc.2 - * Copyright 2010-2013, The Titon Project - http://titon.io + * Titon Toolkit v1.1.0 + * Copyright 2010-2014, The Titon Project - http://titon.io * BSD-2 - https://github.com/titon/toolkit/blob/master/license.md */ !function(a){"use strict";Toolkit.Drop=Toolkit.Component.extend(function(b,c){this.component="Drop",this.version="1.1.0",this.options=c=this.setOptions(c),this.element=null,this.node=null,this.nodes=b=a(b);var d=["down","up","left","right"].map(function(a){return"."+Toolkit.options.vendor+"drop--"+a});a(b.selector+", "+d.join(", ")).clickout(this.hide.bind(this)),a(c.context||document).on("click"===c.mode?"click":"mouseenter",b.selector,this.__show.bind(this)),this.fireEvent("init")},{hide:function(){this.element&&this.element.is(":shown")&&(this.element.conceal(),this.node.removeClass(Toolkit.options.isPrefix+"active"),this.fireEvent("hide"))},show:function(b){this.element.reveal(),this.node=a(b),this.node.addClass(Toolkit.options.isPrefix+"active"),this.fireEvent("show")},__show:function(b){if(b.preventDefault(),this.enabled){var c=a(b.target),d=this.readValue(c,this.options.getTarget);d&&"#"===d.substr(0,1)&&(this.options.hideOpened&&this.node&&!this.node.is(c)&&this.hide(),this.element=a(d),this.node=c,this.element.is(":shown")?this.hide():this.show(c))}}},{mode:"click",context:null,getTarget:"data-drop",hideOpened:!0}),Toolkit.createComponent("drop",function(a){return new Toolkit.Drop(this,a)},!0)}(jQuery); \ No newline at end of file diff --git a/dist/jquery/toolkit-flyout.min.js b/dist/jquery/toolkit-flyout.min.js index 475d00cb..64a4b4e7 100644 --- a/dist/jquery/toolkit-flyout.min.js +++ b/dist/jquery/toolkit-flyout.min.js @@ -1,6 +1,6 @@ /*! - * Titon Toolkit v1.1.0-rc.2 - * Copyright 2010-2013, The Titon Project - http://titon.io + * Titon Toolkit v1.1.0 + * Copyright 2010-2014, The Titon Project - http://titon.io * BSD-2 - https://github.com/titon/toolkit/blob/master/license.md */ !function(a){"use strict";Toolkit.Flyout=Toolkit.Component.extend(function(b,c,d){if(!c)throw new Error("Flyout URL required to download sitemap JSON");this.component="Flyout",this.version="1.0.0",this.options=d=this.setOptions(d),this.nodes=b=a(b),this.node=null,this.element=null,this.current=null,this.menus={},this.data=[],this.dataMap={},this.timers={},a.getJSON(c,this.load.bind(this)),"hover"===d.mode&&a(d.context||document).on("mouseenter",b.selector,function(){this.clearTimer("hide"),this.startTimer("show",d.showDelay)}.bind(this)).on("mouseleave",b.selector,function(){this.clearTimer("show"),this.startTimer("hide",d.showDelay)}.bind(this)),a(d.context||document).on("click"===d.mode?"click":"mouseenter",b.selector,this.__show.bind(this)),this.fireEvent("init")},{clearTimer:function(a){clearTimeout(this.timers[a]),delete this.timers[a]},hide:function(){this.node.removeClass(Toolkit.options.isPrefix+"active"),this.current&&this.isVisible()&&(this.menus[this.current].conceal(),this.fireEvent("hide"),this.current=null)},isVisible:function(){return this.current&&this.menus[this.current]&&(this.element=this.menus[this.current]),this.element&&this.element.is(":shown")},load:function(a,b){if(b=b||0,0===b&&(this.data=a),this.dataMap[a.url]=a,a.children)for(var c=0,d=a.children.length;d>c;c++)this.load(a.children[c],b+1)},position:function(){var b=this.current,c=this.options;if(this.menus[b]){var d=this.menus[b],e=d.outerHeight(),f=this.node.offset(),g=f.left+c.xOffset,h=f.top+c.yOffset+this.node.outerHeight(),i=a(window).height();h>i/2&&(h=f.top-c.yOffset-e),d.css({left:g,top:h}).reveal(),this.fireEvent("show")}},show:function(b){var c=this._getTarget(b);this.current&&c!==this.current&&(this.hide(),this.startTimer("show",this.options.showDelay)),this.node=a(b),this._getMenu()&&(this.fireEvent("load",b),this.node.addClass(Toolkit.options.isPrefix+"active"),"click"===this.options.mode&&this.position())},startTimer:function(a,b,c){this.clearTimer(a);var d;d="show"===a?this.position.bind(this):this.hide.bind(this),d&&(this.timers[a]=setTimeout(function(){d.apply(this,c||[])}.bind(this),b))},_buildMenu:function(b,c){if(!c.children||!c.children.length)return null;var d,e,f,g,h,i=a(this.options.template),j=[],k=this.options.contentElement,l=this.options.itemLimit;if(this.options.className&&i.addClass(this.options.className),b.is("body")&&i.addClass(Toolkit.options.isPrefix+"root"),l&&c.children.length>l)for(g=0,h=c.children.length;h>g;)j.push(c.children.slice(g,g+=l));else j.push(c.children);for(var m,n,o=0;m=j[o];o++){for(d=a("