Optimized _layouts. Merged most js libraries into one

This commit is contained in:
Oleh Zasadnyy 2014-08-22 01:01:20 +03:00
parent b17812e89f
commit 84c47e3584
34 changed files with 397 additions and 682 deletions

View file

@ -1,7 +1,3 @@
/**
* kjscompiler annotation
* @ignore
*/
/*!
* Bootstrap v3.2.0 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
!function(t){t.fn.appear=function(e,s){var o=t.extend({data:void 0,one:!0,accX:0,accY:0},s);return this.each(function(){var s=t(this);if(s.appeared=!1,!e)return void s.trigger("appear",o.data);var i=t(window),a=function(){if(!s.is(":visible"))return void(s.appeared=!1);var t=i.scrollLeft(),e=i.scrollTop(),a=s.offset(),r=a.left,n=a.top,p=o.accX,u=o.accY,c=s.height(),h=i.height(),l=s.width(),f=i.width();e>n+c+u||n>e+h+u||t>r+l+p||r>t+f+p?s.appeared=!1:s.appeared||s.trigger("appear",o.data)},r=function(){if(s.appeared=!0,o.one){i.unbind("scroll",a);var r=t.inArray(a,t.fn.appear.checks);0>r||t.fn.appear.checks.splice(r,1)}e.apply(this,arguments)};o.one?s.one("appear",o.data,r):s.bind("appear",o.data,r),i.scroll(a),t.fn.appear.checks.push(a),a()})},t.extend(t.fn.appear,{checks:[],timeout:null,checkAll:function(){var e=t.fn.appear.checks.length;if(e>0)for(;e--;)t.fn.appear.checks[e]()},run:function(){t.fn.appear.timeout&&clearTimeout(t.fn.appear.timeout),t.fn.appear.timeout=setTimeout(t.fn.appear.checkAll,20)}}),t.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(e,s){var o=t.fn[s];o&&(t.fn[s]=function(){var e=o.apply(this,arguments);return t.fn.appear.run(),e})})}(jQuery);

View file

@ -1 +0,0 @@
!function(t){function e(t,e){return t.toFixed(e.decimals)}t.fn.countTo=function(e){return e=e||{},t(this).each(function(){function o(){c+=r,u++,s(c),"function"==typeof a.onUpdate&&a.onUpdate.call(n,c),i>u||(p.removeData("countTo"),clearInterval(l.interval),c=a.to,"function"==typeof a.onComplete&&a.onComplete.call(n,c))}function s(t){var e=a.formatter.call(n,t,a);p.text(e)}var a=t.extend({},t.fn.countTo.defaults,{from:t(this).data("from"),to:t(this).data("to"),speed:t(this).data("speed"),refreshInterval:t(this).data("refresh-interval"),decimals:t(this).data("decimals")},e),i=Math.ceil(a.speed/a.refreshInterval),r=(a.to-a.from)/i,n=this,p=t(this),u=0,c=a.from,l=p.data("countTo")||{};p.data("countTo",l),l.interval&&clearInterval(l.interval),l.interval=setInterval(o,a.refreshInterval),s(c)})},t.fn.countTo.defaults={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:e,onUpdate:null,onComplete:null}}(jQuery);

View file

@ -1,7 +1,3 @@
/**
* kjscompiler annotation
* @ignore
*/
(function($) {
$(document).ready(function() {
$('body').css('overflow', 'hidden');

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
!function(t){"use strict";var s=function(s,o){this.el=t(s),this.options=t.extend({},t.fn.typed.defaults,o),this.text=this.el.text(),this.typeSpeed=this.options.typeSpeed,this.startDelay=this.options.startDelay,this.backSpeed=this.options.backSpeed,this.backDelay=this.options.backDelay,this.strings=this.options.strings,this.strPos=0,this.arrayPos=0,this.string=this.strings[this.arrayPos],this.stopNum=0,this.loop=this.options.loop,this.loopCount=this.options.loopCount,this.curLoop=1,this.stopArray=this.loop===!1?this.strings.length-1:this.strings.length,this.build()};s.prototype={constructor:s,init:function(){var t=this;setTimeout(function(){t.typewrite(t.string,t.strPos)},t.startDelay)},build:function(){this.el.after('<span id="typed-cursor">|</span>'),this.init()},typewrite:function(t,s){var o=Math.round(70*Math.random())+this.typeSpeed,e=this;setTimeout(function(){if(e.arrayPos<e.strings.length){if("^"===t.substr(s,1)){var o=t.substr(s+1).indexOf(" "),i=t.substr(s+1,o);t=t.replace("^"+i,"")}else var i=0;setTimeout(function(){if(e.el.text(e.text+t.substr(0,s)),s>t.length&&e.arrayPos<e.stopArray){clearTimeout(o),e.options.onStringTyped();var o=setTimeout(function(){e.backspace(t,s)},e.backDelay)}else if(s++,e.typewrite(t,s),e.loop===!1&&e.arrayPos===e.stopArray&&s===t.length){var o=e.options.callback();clearTimeout(o)}},i)}else e.loop===!0&&e.loopCount===!1?(e.arrayPos=0,e.init()):e.loopCount!==!1&&e.curLoop<e.loopCount&&(e.arrayPos=0,e.curLoop=e.curLoop+1,e.init())},o)},backspace:function(t,s){var o=Math.round(70*Math.random())+this.backSpeed,e=this;setTimeout(function(){if(e.el.text(e.text+t.substr(0,s)),s>e.stopNum)s--,e.backspace(t,s);else if(s<=e.stopNum){clearTimeout(o);var o=e.arrayPos=e.arrayPos+1;e.typewrite(e.strings[e.arrayPos],s)}},o)}},t.fn.typed=function(o){return this.each(function(){var e=t(this),i=e.data("typed"),a="object"==typeof o&&o;i||e.data("typed",i=new s(this,a)),"string"==typeof o&&i[o]()})},t.fn.typed.defaults={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],typeSpeed:0,startDelay:0,backSpeed:0,backDelay:500,loop:!1,loopCount:!1,callback:function(){},onStringTyped:function(){}}}(window.jQuery);

10
_site/js/waves.min.js vendored
View file

@ -1,10 +0,0 @@
/*!
* Waves v0.5.1
* https://publicis-indonesia.github.io/Waves
*
* Copyright 2014 Publicis Metro Indonesia, PT. and other contributors
* Released under the BSD license
* https://github.com/publicis-indonesia/Waves/blob/master/LICENSE
*/
!function(a){"use strict";function b(a){return null!==a&&a===a.window}function c(a){return b(a)?a:9===a.nodeType&&a.defaultView}function d(a){var b,d,e={top:0,left:0},f=a&&a.ownerDocument;return b=f.documentElement,"undefined"!=typeof a.getBoundingClientRect&&(e=a.getBoundingClientRect()),d=c(f),{top:e.top+d.pageYOffset-b.clientTop,left:e.left+d.pageXOffset-b.clientLeft}}function e(a){var b="";for(var c in a)a.hasOwnProperty(c)&&(b+=c+":"+a[c]+";");return b}var f=f||{},g=document.querySelectorAll.bind(document),h={duration:500,show:function(a){var b=this,c=document.createElement("div");c.className="waves-ripple",b.appendChild(c);var f=d(b),g=a.pageY-f.top-45,i=a.pageX-f.left-45,j="scale("+b.clientWidth/100*2.5+")";c.setAttribute("data-hold",Date.now()),c.setAttribute("data-scale",j),c.setAttribute("data-x",i),c.setAttribute("data-y",g);var k={top:g+"px",left:i+"px"};c.className=c.className+" waves-notransition",c.setAttribute("style",e(k)),c.className=c.className.replace("waves-notransition",""),k["-webkit-transform"]=j,k["-moz-transform"]=j,k["-ms-transform"]=j,k["-o-transform"]=j,k.transform=j,k.opacity="1",k["-webkit-transition-duration"]=h.duration+"ms",k["-moz-transition-duration"]=h.duration+"ms",k["-o-transition-duration"]=h.duration+"ms",k["transition-duration"]=h.duration+"ms",c.setAttribute("style",e(k))},hide:function(){for(var a=this,b=(1.4*a.clientWidth,null),c=a.children.length,d=0;c>d;d++)-1===a.children[d].className.indexOf("waves-ripple")||(b=a.children[d]);if(!b)return!1;var f=b.getAttribute("data-x"),g=b.getAttribute("data-y"),i=b.getAttribute("data-scale"),j=Date.now()-Number(b.getAttribute("data-hold")),k=500-j;0>k&&(k=0),setTimeout(function(){var c={top:g+"px",left:f+"px",opacity:"0","-webkit-transition-duration":h.duration+"ms","-moz-transition-duration":h.duration+"ms","-o-transition-duration":h.duration+"ms","transition-duration":h.duration+"ms","-webkit-transform":i,"-moz-transform":i,"-ms-transform":i,"-o-transform":i,transform:i};b.setAttribute("style",e(c)),setTimeout(function(){try{a.removeChild(b)}catch(c){return!1}},h.duration)},k)},wrapInput:function(a){for(var b=0;b<a.length;b++){var c=a[b];if("input"===c.tagName.toLowerCase()){var d=c.parentNode;if("i"===d.tagName.toLowerCase()&&-1!==d.className.indexOf("waves-effect"))return!1;var e=document.createElement("i");e.className=c.className+" waves-input-wrapper";var f=c.getAttribute("style"),g="width:"+c.offsetWidth+"px;height:"+c.clientHeight+"px;";f||(f=""),e.setAttribute("style",g+f),c.className="waves-button-input",c.removeAttribute("style"),d.replaceChild(e,c),e.appendChild(c)}}}};f.displayEffect=function(b){b=b||{},"duration"in b&&(h.duration=b.duration),h.wrapInput(g(".waves-effect")),Array.prototype.forEach.call(g(".waves-effect"),function(b){a.Touch&&(b.addEventListener("touchstart",h.show,!1),b.addEventListener("touchend",h.hide,!1)),b.addEventListener("mousedown",h.show,!1),b.addEventListener("mouseup",h.hide,!1),b.addEventListener("mouseleave",h.hide,!1)})},a.Waves=f}(window);
//# sourceMappingURL=waves.min.js.map