vendor/assets/javascripts/mootools-plus.js in mootools-plus-0.2.0 vs vendor/assets/javascripts/mootools-plus.js in mootools-plus-0.2.1

- old
+ new

@@ -1,5 +2 @@ -//= require_self -//= require namespace -//= require_tree . - -if (!window.MooTools && console && console.error) console.error('Mootools is not yet installed.') +Function.implement({bindWithEvent:function(){var e=this,t=Array.from(arguments),n=t.shift();return function(r){return e.apply(n,t==null?arguments:[r].concat(t))}}}),Array.implement({getFirst:function(e){return e||e===0?this.slice(0,e):this[0]},getLast:function(e){return e>=this.length?this:e||e===0?this.slice(this.length-e,this.length):this[this.length-1]},deleteIf:function(e){for(var t=0,n=this.length;t<n;t++){var r=this.shift();e.call(r)||this.push(r)}return this},filterOne:function(e,t){return this.filter(e,t).getFirst()},isBlank:function(){return this.length==0},hasAny:function(){return!this.isBlank()}}),Array.alias("first","getFirst"),Array.alias("last","getLast"),Array.alias("select","filter"),Array.alias("selectOne","filterOne"),Array.alias("compact","clean"),Array.alias("isEmpty","isBlank"),Element.implement({hasElement:function(e){return e==undefined?this.getChildren().length>0:this.getElement(e)!=null},hasElements:function(e){return e==undefined?this.getChildren().length>0:this.getElements(e).length>1},hasEvent:function(e,t){var n=this.retrieve("events");return n&&n[e]&&(t==undefined||n[e].keys.contains(t))},hasParent:function(e){return e==undefined?this.getParent().length>0:this.getParent(e)!=null},disable:function(){return this.set("disabled",!0),this},enable:function(){return this.set("disabled",!1),this},getWidth:function(){return this.getComputedSize().totalWidth},getHeight:function(){return this.getComputedSize().totalHeight},hide:function(){return this.setStyle("display","none"),this},show:function(e){return e=e?e:"block",this.setStyle("display",e),this}}),Element.alias("width","getWidth"),Element.alias("height","getHeight"); \ No newline at end of file