From 3f0a7553348bc439cf97b5c0036c2d697c51045c Mon Sep 17 00:00:00 2001 From: Andrew Fan Date: Thu, 26 Jun 2014 13:06:58 +0300 Subject: [PATCH 01/24] hide left table when numFixedColumns is 0 revert dist files remove idea files add dist files --- dist/ember-table.js | 45 ++++++++++++++++++++++++------ dist/ember-table.min.js | 4 +-- src/templates/body-container.hbs | 18 ++++++------ src/templates/footer-container.hbs | 14 ++++++---- src/templates/header-container.hbs | 12 ++++---- 5 files changed, 63 insertions(+), 30 deletions(-) diff --git a/dist/ember-table.js b/dist/ember-table.js index ac7042b4b..e9c0994a1 100644 --- a/dist/ember-table.js +++ b/dist/ember-table.js @@ -14,10 +14,12 @@ var _ref; Ember.TEMPLATES["body-container"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) { this.compilerInfo = [4,'>= 1.0.0']; helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {}; - var buffer = '', escapeExpression=this.escapeExpression; - + var buffer = '', stack1, escapeExpression=this.escapeExpression, self=this; - data.buffer.push("
\n
\n
\n "); +function program1(depth0,data) { + + var buffer = ''; + data.buffer.push("\n "); data.buffer.push(escapeExpression(helpers.view.call(depth0, "Ember.Table.LazyTableBlock", {hash:{ 'classNames': ("ember-table-left-table-block"), 'contentBinding': ("controller.bodyContent"), @@ -28,6 +30,13 @@ helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {}; 'startIndexBinding': ("controller._startIndex") },hashTypes:{'classNames': "STRING",'contentBinding': "STRING",'columnsBinding': "STRING",'widthBinding': "STRING",'numItemsShowingBinding': "STRING",'scrollTopBinding': "STRING",'startIndexBinding': "STRING"},hashContexts:{'classNames': depth0,'contentBinding': depth0,'columnsBinding': depth0,'widthBinding': depth0,'numItemsShowingBinding': depth0,'scrollTopBinding': depth0,'startIndexBinding': depth0},contexts:[depth0],types:["ID"],data:data}))); data.buffer.push("\n "); + return buffer; + } + + data.buffer.push("
\n
\n
\n "); + stack1 = helpers['if'].call(depth0, "controller.numFixedColumns", {hash:{},hashTypes:{},hashContexts:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],data:data}); + if(stack1 || stack1 === 0) { data.buffer.push(stack1); } + data.buffer.push("\n "); data.buffer.push(escapeExpression(helpers.view.call(depth0, "Ember.Table.LazyTableBlock", {hash:{ 'classNames': ("ember-table-right-table-block"), 'contentBinding': ("controller.bodyContent"), @@ -85,10 +94,12 @@ function program3(depth0,data) { Ember.TEMPLATES["footer-container"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) { this.compilerInfo = [4,'>= 1.0.0']; helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {}; - var buffer = '', escapeExpression=this.escapeExpression; - + var buffer = '', stack1, escapeExpression=this.escapeExpression, self=this; - data.buffer.push("
\n "); +function program1(depth0,data) { + + var buffer = ''; + data.buffer.push("\n "); data.buffer.push(escapeExpression(helpers.view.call(depth0, "Ember.Table.TableBlock", {hash:{ 'classNames': ("ember-table-left-table-block"), 'contentBinding': ("controller.footerContent"), @@ -97,6 +108,13 @@ helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {}; 'heightBinding': ("controller.footerHeight") },hashTypes:{'classNames': "STRING",'contentBinding': "STRING",'columnsBinding': "STRING",'widthBinding': "STRING",'heightBinding': "STRING"},hashContexts:{'classNames': depth0,'contentBinding': depth0,'columnsBinding': depth0,'widthBinding': depth0,'heightBinding': depth0},contexts:[depth0],types:["ID"],data:data}))); data.buffer.push("\n "); + return buffer; + } + + data.buffer.push("
\n "); + stack1 = helpers['if'].call(depth0, "controller.numFixedColumns", {hash:{},hashTypes:{},hashContexts:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],data:data}); + if(stack1 || stack1 === 0) { data.buffer.push(stack1); } + data.buffer.push("\n "); data.buffer.push(escapeExpression(helpers.view.call(depth0, "Ember.Table.TableBlock", {hash:{ 'classNames': ("ember-table-right-table-block"), 'contentBinding': ("controller.footerContent"), @@ -129,10 +147,12 @@ helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {}; Ember.TEMPLATES["header-container"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) { this.compilerInfo = [4,'>= 1.0.0']; helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {}; - var buffer = '', escapeExpression=this.escapeExpression; - + var buffer = '', stack1, escapeExpression=this.escapeExpression, self=this; - data.buffer.push("
\n "); +function program1(depth0,data) { + + var buffer = ''; + data.buffer.push("\n "); data.buffer.push(escapeExpression(helpers.view.call(depth0, "Ember.Table.HeaderBlock", {hash:{ 'classNames': ("ember-table-left-table-block"), 'columnsBinding': ("controller.fixedColumns"), @@ -140,6 +160,13 @@ helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {}; 'heightBinding': ("controller.headerHeight") },hashTypes:{'classNames': "STRING",'columnsBinding': "STRING",'widthBinding': "STRING",'heightBinding': "STRING"},hashContexts:{'classNames': depth0,'columnsBinding': depth0,'widthBinding': depth0,'heightBinding': depth0},contexts:[depth0],types:["ID"],data:data}))); data.buffer.push("\n "); + return buffer; + } + + data.buffer.push("
\n "); + stack1 = helpers['if'].call(depth0, "controller.numFixedColumns", {hash:{},hashTypes:{},hashContexts:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],data:data}); + if(stack1 || stack1 === 0) { data.buffer.push(stack1); } + data.buffer.push("\n "); data.buffer.push(escapeExpression(helpers.view.call(depth0, "Ember.Table.HeaderBlock", {hash:{ 'classNames': ("ember-table-right-table-block"), 'columnsBinding': ("controller.tableColumns"), diff --git a/dist/ember-table.min.js b/dist/ember-table.min.js index 624ad48c5..f67f73a99 100644 --- a/dist/ember-table.min.js +++ b/dist/ember-table.min.js @@ -3,5 +3,5 @@ * Copyright 2012-2014 Addepar Inc. * See LICENSE. */ -!function(){Ember.TEMPLATES["body-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n
\n
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,widthBinding:b,numItemsShowingBinding:b,scrollTopBinding:b,startIndexBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n "),e.buffer.push(g(c.view.call(b,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,numItemsShowingBinding:b,scrollTopBinding:b,startIndexBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n
"),f}),Ember.TEMPLATES["components/ember-table"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.HeaderTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}function g(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.FooterTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var h,i="",j=this.escapeExpression,k=this;return h=c["if"].call(b,"controller.hasHeader",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(1,f,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.BodyTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),h=c["if"].call(b,"controller.hasFooter",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(3,g,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ScrollContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ColumnSortableIndicator",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),i}),Ember.TEMPLATES["footer-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n "),e.buffer.push(g(c.view.call(b,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),f}),Ember.TEMPLATES["header-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="",h=this.escapeExpression;return e.buffer.push('
\n \n '),f=c._triageMustache.call(b,"view.content.headerCellName",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n \n
"),g}),Ember.TEMPLATES["header-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-left-table-block",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,columnsBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n "),e.buffer.push(g(c.view.call(b,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-right-table-block",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),f}),Ember.TEMPLATES["header-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{contentBinding:"view.content",itemViewClassField:"headerCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f}),Ember.TEMPLATES["scroll-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.ScrollPanel",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n"),f}),Ember.TEMPLATES["table-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="";return e.buffer.push('\n '),f=c._triageMustache.call(b,"view.cellContent",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n"),g}),Ember.TEMPLATES["table-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{rowBinding:"view.row",contentBinding:"view.columns",itemViewClassField:"tableCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{rowBinding:"STRING",contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{rowBinding:b,contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f})}(),function(){Ember.Table=Ember.Namespace.create(),Ember.Table.VERSION="0.2.0",null!=(_ref=Ember.libraries)&&_ref.register("Ember Table",Ember.Table.VERSION)}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.ResizeHandlerMixin=Ember.Mixin.create({resizeEndDelay:200,resizing:!1,onResizeStart:Ember.K,onResizeEnd:Ember.K,onResize:Ember.K,endResize:Ember.computed(function(){return function(a){return this.isDestroyed?void 0:(this.set("resizing",!1),"function"==typeof this.onResizeEnd?this.onResizeEnd(a):void 0)}}),handleWindowResize:function(a){return this.get("resizing")||(this.set("resizing",!0),"function"==typeof this.onResizeStart&&this.onResizeStart(a)),"function"==typeof this.onResize&&this.onResize(a),Ember.run.debounce(this,this.get("endResize"),a,this.get("resizeEndDelay"))},didInsertElement:function(){return this._super(),this._setupDocumentHandlers()},willDestroyElement:function(){return this._removeDocumentHandlers(),this._super()},_setupDocumentHandlers:function(){return this._resizeHandler?void 0:(this._resizeHandler=jQuery.proxy(this.get("handleWindowResize"),this),jQuery(window).on("resize."+this.elementId,this._resizeHandler))},_removeDocumentHandlers:function(){return jQuery(window).off("resize."+this.elementId,this._resizeHandler),this._resizeHandler=null}})}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.StyleBindingsMixin=Ember.Mixin.create({concatenatedProperties:["styleBindings"],attributeBindings:["style"],unitType:"px",createStyleString:function(a,b){var c;return c=this.get(b),void 0!==c?("number"===Ember.typeOf(c)&&(c+=this.get("unitType")),""+a+":"+c+";"):void 0},applyStyleBindings:function(){var a,b,c,d,e,f=this;return(c=this.styleBindings)?(a={},c.forEach(function(b){var c,d,e;e=b.split(":"),c=e[0],d=e[1],a[d||c]=c}),e=Ember.keys(a),b=e.map(function(b){return a[b]}),d=Ember.computed(function(){var b,c;return c=e.map(function(b){return f.createStyleString(b,a[b])}),b=c.join(""),0!==b.length?b:void 0}),d.property.apply(d,b),Ember.defineProperty(this,"style",d)):void 0},init:function(){return this.applyStyleBindings(),this._super()}})}(),function(){jQuery.browser||!function(){var a,b,c;return b=void 0,a=void 0,jQuery.uaMatch=function(a){var b;return a=a.toLowerCase(),b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],{browser:b[1]||"",version:b[2]||"0"}},b=jQuery.uaMatch(navigator.userAgent),a={},b.browser&&(a[b.browser]=!0,a.version=b.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),c=jQuery.browser=a}()}(),function(){Ember.LazyContainerView=Ember.ContainerView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"lazy-list-container",styleBindings:["height"],content:null,itemViewClass:null,rowHeight:null,scrollTop:null,startIndex:null,init:function(){return this._super(),this.onNumChildViewsDidChange()},height:Ember.computed(function(){return this.get("content.length")*this.get("rowHeight")}).property("content.length","rowHeight"),numChildViews:Ember.computed(function(){return this.get("numItemsShowing")+2}).property("numItemsShowing"),onNumChildViewsDidChange:Ember.observer(function(){var a,b,c,d,e,f,g,h;return e=this,a=Ember.get(this.get("itemViewClass")),b=this.get("numChildViews"),a&&b?(d=this.get("length"),c=b-d,0>c?(g=this.slice(b,d),this.removeObjects(g)):c>0?(f=function(){h=[];for(var a=0;c>=0?c>a:a>c;c>=0?a++:a--)h.push(a);return h}.apply(this).map(function(){return e.createChildView(a)}),this.pushObjects(f)):void 0):void 0},"numChildViews","itemViewClass"),viewportDidChange:Ember.observer(function(){var a,b,c,d;return b=this.get("content")||[],a=b.get("length"),c=Math.min(this.get("length"),a),d=this.get("startIndex"),d+c>=a&&(d=a-c),0>d&&(d=0),this.forEach(function(a,e){var f,g;return e>=c?(a=this.objectAt(e),void a.set("content",null)):(g=d+e,a=this.objectAt(g%c),f=b.objectAt(g),f!==a.get("content")?(a.teardownContent(),a.set("itemIndex",g),a.set("content",f),a.prepareContent()):void 0)},this)},"content.length","length","startIndex")}),Ember.LazyItemView=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{itemIndex:null,prepareContent:Ember.K,teardownContent:Ember.K,rowHeightBinding:"parentView.rowHeight",styleBindings:["width","top","display"],top:Ember.computed(function(){return this.get("itemIndex")*this.get("rowHeight")}).property("itemIndex","rowHeight"),display:Ember.computed(function(){return this.get("content")?void 0:"none"}).property("content")})}(),function(){Ember.MultiItemViewCollectionView=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{styleBindings:"width",itemViewClassField:null,createChildView:function(a,b){var c,d;return d=this.get("itemViewClassField"),c=b.content.get(d),"string"==typeof c&&(c=Ember.get(Ember.lookup,c)),this._super(c,b)}}),Ember.MouseWheelHandlerMixin=Ember.Mixin.create({onMouseWheel:Ember.K,didInsertElement:function(){var a=this;return this._super(),this.$().bind("mousewheel",function(b,c,d,e){return Ember.run(a,a.onMouseWheel,b,c,d,e)})},willDestroyElement:function(){var a;return null!=(a=this.$())&&a.unbind("mousewheel"),this._super()}}),Ember.ScrollHandlerMixin=Ember.Mixin.create({onScroll:Ember.K,scrollElementSelector:"",didInsertElement:function(){var a=this;return this._super(),this.$(this.get("scrollElementSelector")).bind("scroll",function(b){return Ember.run(a,a.onScroll,b)})},willDestroyElement:function(){var a;return null!=(a=this.$(this.get("scrollElementSelector")))&&a.unbind("scroll"),this._super()}}),Ember.TouchMoveHandlerMixin=Ember.Mixin.create({onTouchMove:Ember.K,didInsertElement:function(){var a,b,c=this;return this._super(),a=b=0,this.$().bind("touchstart",function(c){a=c.originalEvent.targetTouches[0].pageX,b=c.originalEvent.targetTouches[0].pageY}),this.$().bind("touchmove",function(d){var e,f,g,h;g=d.originalEvent.targetTouches[0].pageX,h=d.originalEvent.targetTouches[0].pageY,e=-(g-a),f=-(h-b),Ember.run(c,c.onTouchMove,d,e,f),a=g,b=h})},willDestroy:function(){var a;return null!=(a=this.$())&&a.unbind("touchmove"),this._super()}}),Ember.Table.RowArrayController=Ember.ArrayController.extend({itemController:null,content:null,rowContent:Ember.computed(function(){return[]}).property(),controllerAt:function(a,b){var c,d,e;return c=this.get("container"),e=this.get("_subControllers"),(d=e[a])?d:(d=this.get("itemController").create({target:this,parentController:this.get("parentController")||this,content:b}),e[a]=d,d)}}),Ember.Table.ShowHorizontalScrollMixin=Ember.Mixin.create({mouseEnter:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.addClass("antiscroll-scrollbar-shown")},mouseLeave:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.removeClass("antiscroll-scrollbar-shown")}})}(),function(){Ember.Table.ColumnDefinition=Ember.Object.extend({headerCellName:void 0,contentPath:void 0,minWidth:void 0,maxWidth:void 0,defaultColumnWidth:150,columnWidth:Ember.computed.oneWay("defaultColumnWidth"),isResizable:!0,isSortable:!0,textAlign:"text-align-right",canAutoResize:!0,headerCellViewClass:"Ember.Table.HeaderCell",tableCellViewClass:"Ember.Table.TableCell",resize:function(a){return this.set("columnWidth",a)},getCellContent:function(a){var b;return b=this.get("contentPath"),Ember.assert("You must either provide a contentPath or override getCellContent in your column definition",null!=b),Ember.get(a,b)},setCellContent:Ember.K}),Ember.Table.Row=Ember.ObjectProxy.extend({content:null,isSelected:Ember.computed(function(){return this.get("parentController.selection")===this.get("content")}).property("parentController.selection","content"),isShowing:!0,isHovered:!1})}(),function(){Ember.Table.TableContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-container"],styleBindings:["height","width"]}),Ember.Table.TableBlock=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-block"],styleBindings:["width","height"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),columns:null,content:null,scrollLeft:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight")}),Ember.Table.LazyTableBlock=Ember.LazyContainerView.extend({classNames:["ember-table-table-block"],styleBindings:["width"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),rowHeight:Ember.computed.alias("controller.rowHeight"),columns:null,content:null,scrollLeft:null,scrollTop:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.TableRow=Ember.LazyItemView.extend({templateName:"table-row",classNames:"ember-table-table-row",classNameBindings:["row.isHovered:ember-table-hover","row.isSelected:ember-table-selected","row.rowStyle","isLastRow:ember-table-last-row"],styleBindings:["width","height"],row:Ember.computed.alias("content"),columns:Ember.computed.alias("parentView.columns"),width:Ember.computed.alias("controller._rowWidth"),height:Ember.computed.alias("controller.rowHeight"),isLastRow:Ember.computed(function(){return this.get("row")===this.get("controller.bodyContent.lastObject")}).property("controller.bodyContent.lastObject","row"),mouseEnter:function(){var a;return a=this.get("row"),a?a.set("isHovered",!0):void 0},mouseLeave:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0},teardownContent:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0}}),Ember.Table.TableCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"table-cell",classNames:["ember-table-cell"],classNameBindings:"column.textAlign",styleBindings:"width",row:Ember.computed.alias("parentView.row"),column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),init:function(){return this._super(),this.contentPathDidChange(),this.contentDidChange()},contentDidChange:function(){return this.notifyPropertyChange("cellContent")},contentPathWillChange:function(){var a;return a=this.get("column.contentPath"),a?this.removeObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),contentPathDidChange:function(){var a;return a=this.get("column.contentPath"),a?this.addObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),cellContent:Ember.computed(function(a,b){var c,d;return d=this.get("row"),c=this.get("column"),d&&c?(1===arguments.length?b=c.getCellContent(d):c.setCellContent(d,b),b):void 0}).property("row.isLoaded","column")}),Ember.Table.HeaderBlock=Ember.Table.TableBlock.extend({classNames:["ember-table-header-block"],itemViewClass:"Ember.Table.HeaderRow",content:Ember.computed(function(){return[this.get("columns")]}).property("columns")}),Ember.Table.HeaderRow=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-row",classNames:["ember-table-table-row","ember-table-header-row"],styleBindings:["width"],columns:Ember.computed.alias("content"),width:Ember.computed.alias("controller._rowWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),sortableOption:Ember.computed(function(){return{axis:"x",containment:"parent",cursor:"move",helper:"clone",items:".ember-table-header-cell.sortable",opacity:.9,placeholder:"ui-state-highlight",scroll:!0,tolerance:"intersect",update:jQuery.proxy(this.onColumnSortDone,this),stop:jQuery.proxy(this.onColumnSortStop,this),sort:jQuery.proxy(this.onColumnSortChange,this)}}),onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),didInsertElement:function(){return this._super(),this.get("controller.enableColumnReorder")?this.$("> div").sortable(this.get("sortableOption")):void 0},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onColumnSortStop:function(){return this.set("controller._isShowingSortableIndicator",!1)},onColumnSortChange:function(){var a;return a=this.$(".ui-state-highlight").offset().left-this.$().closest(".ember-table-tables-container").offset().left,this.set("controller._isShowingSortableIndicator",!0),this.set("controller._sortableIndicatorLeft",a)},onColumnSortDone:function(a,b){var c,d,e;return d=b.item.index(),e=Ember.View.views[b.item.attr("id")],c=e.get("column"),this.get("controller").onColumnSort(c,d),this.set("controller._isShowingSortableIndicator",!1)}}),Ember.Table.HeaderCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-cell",classNames:["ember-table-cell","ember-table-header-cell"],classNameBindings:["column.isSortable:sortable","column.textAlign"],styleBindings:["width","height"],column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight"),resizableOption:Ember.computed(function(){return{handles:"e",minHeight:40,minWidth:this.get("column.minWidth")||100,maxWidth:this.get("column.maxWidth")||500,grid:this.get("column.snapGrid"),resize:jQuery.proxy(this.onColumnResize,this),stop:jQuery.proxy(this.onColumnResize,this)}}),didInsertElement:function(){this.elementSizeDidChange(),this.get("column.isResizable")&&(this.$().resizable(this.get("resizableOption")),this._resizableWidget=this.$().resizable("widget"))},onColumnResize:function(a,b){return this.elementSizeDidChange(),this.get("controller.forceFillColumns")&&this.get("controller.columns").filterProperty("canAutoResize").length>1&&this.set("column.canAutoResize",!1),this.get("column").resize(b.size.width)},elementSizeDidChange:function(){var a;a=0,$(".ember-table-header-block .ember-table-content").each(function(){var b;return b=$(this).outerHeight(),b>a?a=b:void 0}),this.set("controller._contentHeaderHeight",a)}}),Ember.Table.ColumnSortableIndicator=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"ember-table-column-sortable-indicator",classNameBindings:"controller._isShowingSortableIndicator:active",styleBindings:["left","height"],left:Ember.computed.alias("controller._sortableIndicatorLeft"),height:Ember.computed.alias("controller._height")}),Ember.Table.HeaderTableContainer=Ember.Table.TableContainer.extend(Ember.Table.ShowHorizontalScrollMixin,{templateName:"header-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-header-container"],height:Ember.computed.alias("controller._headerHeight"),width:Ember.computed.alias("controller._tableContainerWidth")}),Ember.Table.BodyTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.ScrollHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"body-container",classNames:["ember-table-table-container","ember-table-body-container","antiscroll-wrap"],height:Ember.computed.alias("controller._bodyHeight"),width:Ember.computed.alias("controller._width"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),scrollElementSelector:".antiscroll-inner",onScroll:function(a){return this.set("scrollTop",a.target.scrollTop),a.preventDefault()},onMouseWheel:function(a,b,c,d){var e;if(Math.abs(c)>Math.abs(d))return e=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",e),a.preventDefault()},onTouchMove:function(a,b,c){var d;if(Math.abs(b)>Math.abs(c))return d=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",d),a.preventDefault()}}),Ember.Table.FooterTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"footer-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-footer-container"],styleBindings:"top",height:Ember.computed.alias("controller.footerHeight"),width:Ember.computed.alias("controller._tableContainerWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),top:Ember.computed(function(){var a,b,c;return c=this.get("controller._headerHeight"),b=this.get("controller._tableContentHeight")+c,a=this.get("controller._bodyHeight")+c,a>b?b:a}).property("controller._bodyHeight","controller._headerHeight","controller._tableContentHeight"),onMouseWheel:function(a,b,c){var d;return d=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",d),a.preventDefault()},onTouchMove:function(a,b){var c;return c=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",c),a.preventDefault()}}),Ember.Table.ScrollContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.ScrollHandlerMixin,{templateName:"scroll-container",classNames:["ember-table-scroll-container"],styleBindings:["left","width","height"],scrollElementSelector:".antiscroll-inner",width:Ember.computed.alias("controller._scrollContainerWidth"),height:10,left:Ember.computed.alias("controller._fixedColumnsWidth"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),didInsertElement:function(){return this._super(),this.onScrollLeftDidChange()},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onScrollLeftDidChange:Ember.observer(function(){var a;return a=this.get("scrollElementSelector"),this.$(a).scrollLeft(this.get("scrollLeft"))},"scrollLeft","scrollElementSelector")}),Ember.Table.ScrollPanel=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-scroll-panel"],styleBindings:["width","height"],width:Ember.computed.alias("controller._tableColumnsWidth"),height:Ember.computed.alias("controller._tableContentHeight")})}(),function(){Ember.Table.EmberTableComponent=Ember.Component.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.AddeparMixins.ResizeHandlerMixin,{layoutName:"components/ember-table",classNames:["ember-table-tables-container"],classNameBindings:["enableContentSelection:ember-table-content-selectable"],styleBindings:["height"],height:Ember.computed.alias("_tablesContainerHeight"),columns:null,numFixedColumns:0,numFooterRow:0,rowHeight:30,minHeaderHeight:30,footerHeight:30,hasHeader:!0,hasFooter:!0,forceFillColumns:!1,enableColumnReorder:!0,enableContentSelection:!1,selection:null,tableRowViewClass:"Ember.Table.TableRow",init:function(){if(this._super(),!$.ui)throw"Missing dependency: jquery-ui";if(!$().mousewheel)throw"Missing dependency: jquery-mousewheel";if(!$().antiscroll)throw"Missing dependency: antiscroll.js"},actions:{addColumn:Ember.K,sortByColumn:Ember.K},onColumnSort:function(a,b){var c;return c=this.get("tableColumns"),c.removeObject(a),c.insertAt(b,a)},bodyContent:Ember.computed(function(){return Ember.Table.RowArrayController.create({target:this,parentController:this,container:this.get("container"),itemController:Ember.Table.Row,content:this.get("content")})}).property("content"),footerContent:Ember.computed(function(a,b){return b?b:Ember.A()}).property(),fixedColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(0,b)||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),tableColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(b,a.get("length"))||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),prepareTableColumns:function(a){return a.setEach("controller",this)},didInsertElement:function(){return this._super(),this.set("_tableScrollTop",0),this.elementSizeDidChange()},onResizeEnd:function(){return Ember.run(this,this.elementSizeDidChange)},elementSizeDidChange:function(){return"inDOM"===this.get("state")?(this.set("_width",this.$().parent().outerWidth()),this.set("_height",this.$().parent().outerHeight()),Ember.run.next(this,this.updateLayout)):void 0},updateLayout:function(){return"inDOM"===this.get("state")?(this.$(".antiscroll-wrap").antiscroll().data("antiscroll").rebuild(),this.get("forceFillColumns")?this.doForceFillColumns():void 0):void 0},doForceFillColumns:function(){var a,b,c,d,e,f,g,h;return h=this.get("_width"),e=this.get("_fixedColumnsWidth"),g=this.get("tableColumns"),d=this._getTotalWidth(g),b=h-e,f=b-d,c=g.filterProperty("canAutoResize"),a=Math.floor(f/c.length),c.forEach(function(b){var c;return c=b.get("columnWidth")+a,b.set("columnWidth",c)})},onBodyContentLengthDidChange:Ember.observer(function(){return Ember.run.next(this,function(){return Ember.run.once(this,this.updateLayout)})},"bodyContent.length"),_tableScrollTop:0,_tableScrollLeft:0,_width:null,_height:null,_contentHeaderHeight:null,_hasVerticalScrollbar:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),a>b?!0:!1}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_hasHorizontalScrollbar:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_width")-this.get("_fixedColumnsWidth"),a>b?!0:!1}).property("_tableColumnsWidth","_width","_fixedColumnsWidth"),_tablesContainerHeight:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),b>a?a:b}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_fixedColumnsWidth:Ember.computed(function(){return this._getTotalWidth(this.get("fixedColumns"))}).property("fixedColumns.@each.columnWidth"),_tableColumnsWidth:Ember.computed(function(){var a,b;return b=this._getTotalWidth(this.get("tableColumns"))+3,a=this.get("_width")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("tableColumns.@each.columnWidth","_width","_fixedColumnsWidth"),_rowWidth:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_tableContainerWidth")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("_fixedColumnsWidth","_tableColumnsWidth","_tableContainerWidth"),_headerHeight:Ember.computed(function(){var a,b;return b=this.get("minHeaderHeight"),a=this.get("_contentHeaderHeight"),b>a?b:a}).property("_contentHeaderHeight","minHeaderHeight"),_footerHeight:Ember.computed(function(){return this.get("hasFooter")?this.get("footerHeight"):0}).property("footerHeight","hasFooter"),_bodyHeight:Ember.computed(function(){var a; -return a=this.get("_tablesContainerHeight"),this.get("hasHeader")&&(a-=this.get("_headerHeight")),this.get("hasFooter")&&(a-=this.get("footerHeight")),a}).property("_tablesContainerHeight","_hasHorizontalScrollbar","_headerHeight","footerHeight","hasHeader","hasFooter"),_tableBlockWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_fixedBlockWidthBinding:"_fixedColumnsWidth",_tableContentHeight:Ember.computed(function(){return this.get("rowHeight")*this.get("bodyContent.length")}).property("rowHeight","bodyContent.length"),_tableContainerWidth:Ember.computed(function(){return this.get("_width")}).property("_width"),_scrollContainerWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_numItemsShowing:Ember.computed(function(){return Math.floor(this.get("_bodyHeight")/this.get("rowHeight"))}).property("_bodyHeight","rowHeight"),_startIndex:Ember.computed(function(){var a,b,c,d,e;return b=this.get("bodyContent.length"),c=this.get("_numItemsShowing"),d=this.get("rowHeight"),e=this.get("_tableScrollTop"),a=Math.floor(e/d),a+c>=b&&(a=b-c),0>a?0:a}).property("bodyContent.length","_numItemsShowing","rowHeight","_tableScrollTop"),_getTotalWidth:function(a,b){var c;return null==b&&(b="columnWidth"),a?(c=a.getEach(b)||[],c.reduce(function(a,b){return a+b},0)):0},click:function(a){var b;return(b=this.getRowForEvent(a))?this.set("selection",b.get("content")):void 0},getRowForEvent:function(a){var b,c;return b=$(a.target).parents(".ember-table-table-row"),c=Ember.View.views[b.attr("id")],c?c.get("row"):void 0}}),Ember.Handlebars.helper("table-component",Ember.Table.EmberTableComponent)}(); \ No newline at end of file +!function(){Ember.TEMPLATES["body-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,numItemsShowingBinding:a,scrollTopBinding:a,startIndexBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n
\n
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,numItemsShowingBinding:b,scrollTopBinding:b,startIndexBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n
"),h}),Ember.TEMPLATES["components/ember-table"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.HeaderTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}function g(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.FooterTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var h,i="",j=this.escapeExpression,k=this;return h=c["if"].call(b,"controller.hasHeader",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(1,f,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.BodyTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),h=c["if"].call(b,"controller.hasFooter",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(3,g,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ScrollContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ColumnSortableIndicator",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),i}),Ember.TEMPLATES["footer-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="",h=this.escapeExpression;return e.buffer.push('
\n \n '),f=c._triageMustache.call(b,"view.content.headerCellName",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n \n
"),g}),Ember.TEMPLATES["header-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-left-table-block",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-right-table-block",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{contentBinding:"view.content",itemViewClassField:"headerCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f}),Ember.TEMPLATES["scroll-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.ScrollPanel",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n"),f}),Ember.TEMPLATES["table-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="";return e.buffer.push('\n '),f=c._triageMustache.call(b,"view.cellContent",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n"),g}),Ember.TEMPLATES["table-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{rowBinding:"view.row",contentBinding:"view.columns",itemViewClassField:"tableCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{rowBinding:"STRING",contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{rowBinding:b,contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f})}(),function(){Ember.Table=Ember.Namespace.create(),Ember.Table.VERSION="0.2.0",null!=(_ref=Ember.libraries)&&_ref.register("Ember Table",Ember.Table.VERSION)}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.ResizeHandlerMixin=Ember.Mixin.create({resizeEndDelay:200,resizing:!1,onResizeStart:Ember.K,onResizeEnd:Ember.K,onResize:Ember.K,endResize:Ember.computed(function(){return function(a){return this.isDestroyed?void 0:(this.set("resizing",!1),"function"==typeof this.onResizeEnd?this.onResizeEnd(a):void 0)}}),handleWindowResize:function(a){return this.get("resizing")||(this.set("resizing",!0),"function"==typeof this.onResizeStart&&this.onResizeStart(a)),"function"==typeof this.onResize&&this.onResize(a),Ember.run.debounce(this,this.get("endResize"),a,this.get("resizeEndDelay"))},didInsertElement:function(){return this._super(),this._setupDocumentHandlers()},willDestroyElement:function(){return this._removeDocumentHandlers(),this._super()},_setupDocumentHandlers:function(){return this._resizeHandler?void 0:(this._resizeHandler=jQuery.proxy(this.get("handleWindowResize"),this),jQuery(window).on("resize."+this.elementId,this._resizeHandler))},_removeDocumentHandlers:function(){return jQuery(window).off("resize."+this.elementId,this._resizeHandler),this._resizeHandler=null}})}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.StyleBindingsMixin=Ember.Mixin.create({concatenatedProperties:["styleBindings"],attributeBindings:["style"],unitType:"px",createStyleString:function(a,b){var c;return c=this.get(b),void 0!==c?("number"===Ember.typeOf(c)&&(c+=this.get("unitType")),""+a+":"+c+";"):void 0},applyStyleBindings:function(){var a,b,c,d,e,f=this;return(c=this.styleBindings)?(a={},c.forEach(function(b){var c,d,e;e=b.split(":"),c=e[0],d=e[1],a[d||c]=c}),e=Ember.keys(a),b=e.map(function(b){return a[b]}),d=Ember.computed(function(){var b,c;return c=e.map(function(b){return f.createStyleString(b,a[b])}),b=c.join(""),0!==b.length?b:void 0}),d.property.apply(d,b),Ember.defineProperty(this,"style",d)):void 0},init:function(){return this.applyStyleBindings(),this._super()}})}(),function(){jQuery.browser||!function(){var a,b,c;return b=void 0,a=void 0,jQuery.uaMatch=function(a){var b;return a=a.toLowerCase(),b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],{browser:b[1]||"",version:b[2]||"0"}},b=jQuery.uaMatch(navigator.userAgent),a={},b.browser&&(a[b.browser]=!0,a.version=b.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),c=jQuery.browser=a}()}(),function(){Ember.LazyContainerView=Ember.ContainerView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"lazy-list-container",styleBindings:["height"],content:null,itemViewClass:null,rowHeight:null,scrollTop:null,startIndex:null,init:function(){return this._super(),this.onNumChildViewsDidChange()},height:Ember.computed(function(){return this.get("content.length")*this.get("rowHeight")}).property("content.length","rowHeight"),numChildViews:Ember.computed(function(){return this.get("numItemsShowing")+2}).property("numItemsShowing"),onNumChildViewsDidChange:Ember.observer(function(){var a,b,c,d,e,f,g,h;return e=this,a=Ember.get(this.get("itemViewClass")),b=this.get("numChildViews"),a&&b?(d=this.get("length"),c=b-d,0>c?(g=this.slice(b,d),this.removeObjects(g)):c>0?(f=function(){h=[];for(var a=0;c>=0?c>a:a>c;c>=0?a++:a--)h.push(a);return h}.apply(this).map(function(){return e.createChildView(a)}),this.pushObjects(f)):void 0):void 0},"numChildViews","itemViewClass"),viewportDidChange:Ember.observer(function(){var a,b,c,d;return b=this.get("content")||[],a=b.get("length"),c=Math.min(this.get("length"),a),d=this.get("startIndex"),d+c>=a&&(d=a-c),0>d&&(d=0),this.forEach(function(a,e){var f,g;return e>=c?(a=this.objectAt(e),void a.set("content",null)):(g=d+e,a=this.objectAt(g%c),f=b.objectAt(g),f!==a.get("content")?(a.teardownContent(),a.set("itemIndex",g),a.set("content",f),a.prepareContent()):void 0)},this)},"content.length","length","startIndex")}),Ember.LazyItemView=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{itemIndex:null,prepareContent:Ember.K,teardownContent:Ember.K,rowHeightBinding:"parentView.rowHeight",styleBindings:["width","top","display"],top:Ember.computed(function(){return this.get("itemIndex")*this.get("rowHeight")}).property("itemIndex","rowHeight"),display:Ember.computed(function(){return this.get("content")?void 0:"none"}).property("content")})}(),function(){Ember.MultiItemViewCollectionView=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{styleBindings:"width",itemViewClassField:null,createChildView:function(a,b){var c,d;return d=this.get("itemViewClassField"),c=b.content.get(d),"string"==typeof c&&(c=Ember.get(Ember.lookup,c)),this._super(c,b)}}),Ember.MouseWheelHandlerMixin=Ember.Mixin.create({onMouseWheel:Ember.K,didInsertElement:function(){var a=this;return this._super(),this.$().bind("mousewheel",function(b,c,d,e){return Ember.run(a,a.onMouseWheel,b,c,d,e)})},willDestroyElement:function(){var a;return null!=(a=this.$())&&a.unbind("mousewheel"),this._super()}}),Ember.ScrollHandlerMixin=Ember.Mixin.create({onScroll:Ember.K,scrollElementSelector:"",didInsertElement:function(){var a=this;return this._super(),this.$(this.get("scrollElementSelector")).bind("scroll",function(b){return Ember.run(a,a.onScroll,b)})},willDestroyElement:function(){var a;return null!=(a=this.$(this.get("scrollElementSelector")))&&a.unbind("scroll"),this._super()}}),Ember.TouchMoveHandlerMixin=Ember.Mixin.create({onTouchMove:Ember.K,didInsertElement:function(){var a,b,c=this;return this._super(),a=b=0,this.$().bind("touchstart",function(c){a=c.originalEvent.targetTouches[0].pageX,b=c.originalEvent.targetTouches[0].pageY}),this.$().bind("touchmove",function(d){var e,f,g,h;g=d.originalEvent.targetTouches[0].pageX,h=d.originalEvent.targetTouches[0].pageY,e=-(g-a),f=-(h-b),Ember.run(c,c.onTouchMove,d,e,f),a=g,b=h})},willDestroy:function(){var a;return null!=(a=this.$())&&a.unbind("touchmove"),this._super()}}),Ember.Table.RowArrayController=Ember.ArrayController.extend({itemController:null,content:null,rowContent:Ember.computed(function(){return[]}).property(),controllerAt:function(a,b){var c,d,e;return c=this.get("container"),e=this.get("_subControllers"),(d=e[a])?d:(d=this.get("itemController").create({target:this,parentController:this.get("parentController")||this,content:b}),e[a]=d,d)}}),Ember.Table.ShowHorizontalScrollMixin=Ember.Mixin.create({mouseEnter:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.addClass("antiscroll-scrollbar-shown")},mouseLeave:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.removeClass("antiscroll-scrollbar-shown")}})}(),function(){Ember.Table.ColumnDefinition=Ember.Object.extend({headerCellName:void 0,contentPath:void 0,minWidth:void 0,maxWidth:void 0,defaultColumnWidth:150,columnWidth:Ember.computed.oneWay("defaultColumnWidth"),isResizable:!0,isSortable:!0,textAlign:"text-align-right",canAutoResize:!0,headerCellViewClass:"Ember.Table.HeaderCell",tableCellViewClass:"Ember.Table.TableCell",resize:function(a){return this.set("columnWidth",a)},getCellContent:function(a){var b;return b=this.get("contentPath"),Ember.assert("You must either provide a contentPath or override getCellContent in your column definition",null!=b),Ember.get(a,b)},setCellContent:Ember.K}),Ember.Table.Row=Ember.ObjectProxy.extend({content:null,isSelected:Ember.computed(function(){return this.get("parentController.selection")===this.get("content")}).property("parentController.selection","content"),isShowing:!0,isHovered:!1})}(),function(){Ember.Table.TableContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-container"],styleBindings:["height","width"]}),Ember.Table.TableBlock=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-block"],styleBindings:["width","height"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),columns:null,content:null,scrollLeft:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight")}),Ember.Table.LazyTableBlock=Ember.LazyContainerView.extend({classNames:["ember-table-table-block"],styleBindings:["width"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),rowHeight:Ember.computed.alias("controller.rowHeight"),columns:null,content:null,scrollLeft:null,scrollTop:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.TableRow=Ember.LazyItemView.extend({templateName:"table-row",classNames:"ember-table-table-row",classNameBindings:["row.isHovered:ember-table-hover","row.isSelected:ember-table-selected","row.rowStyle","isLastRow:ember-table-last-row"],styleBindings:["width","height"],row:Ember.computed.alias("content"),columns:Ember.computed.alias("parentView.columns"),width:Ember.computed.alias("controller._rowWidth"),height:Ember.computed.alias("controller.rowHeight"),isLastRow:Ember.computed(function(){return this.get("row")===this.get("controller.bodyContent.lastObject")}).property("controller.bodyContent.lastObject","row"),mouseEnter:function(){var a;return a=this.get("row"),a?a.set("isHovered",!0):void 0},mouseLeave:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0},teardownContent:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0}}),Ember.Table.TableCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"table-cell",classNames:["ember-table-cell"],classNameBindings:"column.textAlign",styleBindings:"width",row:Ember.computed.alias("parentView.row"),column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),init:function(){return this._super(),this.contentPathDidChange(),this.contentDidChange()},contentDidChange:function(){return this.notifyPropertyChange("cellContent")},contentPathWillChange:function(){var a;return a=this.get("column.contentPath"),a?this.removeObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),contentPathDidChange:function(){var a;return a=this.get("column.contentPath"),a?this.addObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),cellContent:Ember.computed(function(a,b){var c,d;return d=this.get("row"),c=this.get("column"),d&&c?(1===arguments.length?b=c.getCellContent(d):c.setCellContent(d,b),b):void 0}).property("row.isLoaded","column")}),Ember.Table.HeaderBlock=Ember.Table.TableBlock.extend({classNames:["ember-table-header-block"],itemViewClass:"Ember.Table.HeaderRow",content:Ember.computed(function(){return[this.get("columns")]}).property("columns")}),Ember.Table.HeaderRow=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-row",classNames:["ember-table-table-row","ember-table-header-row"],styleBindings:["width"],columns:Ember.computed.alias("content"),width:Ember.computed.alias("controller._rowWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),sortableOption:Ember.computed(function(){return{axis:"x",containment:"parent",cursor:"move",helper:"clone",items:".ember-table-header-cell.sortable",opacity:.9,placeholder:"ui-state-highlight",scroll:!0,tolerance:"intersect",update:jQuery.proxy(this.onColumnSortDone,this),stop:jQuery.proxy(this.onColumnSortStop,this),sort:jQuery.proxy(this.onColumnSortChange,this)}}),onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),didInsertElement:function(){return this._super(),this.get("controller.enableColumnReorder")?this.$("> div").sortable(this.get("sortableOption")):void 0},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onColumnSortStop:function(){return this.set("controller._isShowingSortableIndicator",!1)},onColumnSortChange:function(){var a;return a=this.$(".ui-state-highlight").offset().left-this.$().closest(".ember-table-tables-container").offset().left,this.set("controller._isShowingSortableIndicator",!0),this.set("controller._sortableIndicatorLeft",a)},onColumnSortDone:function(a,b){var c,d,e;return d=b.item.index(),e=Ember.View.views[b.item.attr("id")],c=e.get("column"),this.get("controller").onColumnSort(c,d),this.set("controller._isShowingSortableIndicator",!1)}}),Ember.Table.HeaderCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-cell",classNames:["ember-table-cell","ember-table-header-cell"],classNameBindings:["column.isSortable:sortable","column.textAlign"],styleBindings:["width","height"],column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight"),resizableOption:Ember.computed(function(){return{handles:"e",minHeight:40,minWidth:this.get("column.minWidth")||100,maxWidth:this.get("column.maxWidth")||500,grid:this.get("column.snapGrid"),resize:jQuery.proxy(this.onColumnResize,this),stop:jQuery.proxy(this.onColumnResize,this)}}),didInsertElement:function(){this.elementSizeDidChange(),this.get("column.isResizable")&&(this.$().resizable(this.get("resizableOption")),this._resizableWidget=this.$().resizable("widget"))},onColumnResize:function(a,b){return this.elementSizeDidChange(),this.get("controller.forceFillColumns")&&this.get("controller.columns").filterProperty("canAutoResize").length>1&&this.set("column.canAutoResize",!1),this.get("column").resize(b.size.width)},elementSizeDidChange:function(){var a;a=0,$(".ember-table-header-block .ember-table-content").each(function(){var b;return b=$(this).outerHeight(),b>a?a=b:void 0}),this.set("controller._contentHeaderHeight",a)}}),Ember.Table.ColumnSortableIndicator=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"ember-table-column-sortable-indicator",classNameBindings:"controller._isShowingSortableIndicator:active",styleBindings:["left","height"],left:Ember.computed.alias("controller._sortableIndicatorLeft"),height:Ember.computed.alias("controller._height")}),Ember.Table.HeaderTableContainer=Ember.Table.TableContainer.extend(Ember.Table.ShowHorizontalScrollMixin,{templateName:"header-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-header-container"],height:Ember.computed.alias("controller._headerHeight"),width:Ember.computed.alias("controller._tableContainerWidth")}),Ember.Table.BodyTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.ScrollHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"body-container",classNames:["ember-table-table-container","ember-table-body-container","antiscroll-wrap"],height:Ember.computed.alias("controller._bodyHeight"),width:Ember.computed.alias("controller._width"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),scrollElementSelector:".antiscroll-inner",onScroll:function(a){return this.set("scrollTop",a.target.scrollTop),a.preventDefault()},onMouseWheel:function(a,b,c,d){var e;if(Math.abs(c)>Math.abs(d))return e=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",e),a.preventDefault()},onTouchMove:function(a,b,c){var d;if(Math.abs(b)>Math.abs(c))return d=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",d),a.preventDefault()}}),Ember.Table.FooterTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"footer-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-footer-container"],styleBindings:"top",height:Ember.computed.alias("controller.footerHeight"),width:Ember.computed.alias("controller._tableContainerWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),top:Ember.computed(function(){var a,b,c;return c=this.get("controller._headerHeight"),b=this.get("controller._tableContentHeight")+c,a=this.get("controller._bodyHeight")+c,a>b?b:a}).property("controller._bodyHeight","controller._headerHeight","controller._tableContentHeight"),onMouseWheel:function(a,b,c){var d;return d=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",d),a.preventDefault()},onTouchMove:function(a,b){var c;return c=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",c),a.preventDefault()}}),Ember.Table.ScrollContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.ScrollHandlerMixin,{templateName:"scroll-container",classNames:["ember-table-scroll-container"],styleBindings:["left","width","height"],scrollElementSelector:".antiscroll-inner",width:Ember.computed.alias("controller._scrollContainerWidth"),height:10,left:Ember.computed.alias("controller._fixedColumnsWidth"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),didInsertElement:function(){return this._super(),this.onScrollLeftDidChange()},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onScrollLeftDidChange:Ember.observer(function(){var a;return a=this.get("scrollElementSelector"),this.$(a).scrollLeft(this.get("scrollLeft"))},"scrollLeft","scrollElementSelector")}),Ember.Table.ScrollPanel=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-scroll-panel"],styleBindings:["width","height"],width:Ember.computed.alias("controller._tableColumnsWidth"),height:Ember.computed.alias("controller._tableContentHeight")})}(),function(){Ember.Table.EmberTableComponent=Ember.Component.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.AddeparMixins.ResizeHandlerMixin,{layoutName:"components/ember-table",classNames:["ember-table-tables-container"],classNameBindings:["enableContentSelection:ember-table-content-selectable"],styleBindings:["height"],height:Ember.computed.alias("_tablesContainerHeight"),columns:null,numFixedColumns:0,numFooterRow:0,rowHeight:30,minHeaderHeight:30,footerHeight:30,hasHeader:!0,hasFooter:!0,forceFillColumns:!1,enableColumnReorder:!0,enableContentSelection:!1,selection:null,tableRowViewClass:"Ember.Table.TableRow",init:function(){if(this._super(),!$.ui)throw"Missing dependency: jquery-ui";if(!$().mousewheel)throw"Missing dependency: jquery-mousewheel";if(!$().antiscroll)throw"Missing dependency: antiscroll.js"},actions:{addColumn:Ember.K,sortByColumn:Ember.K},onColumnSort:function(a,b){var c;return c=this.get("tableColumns"),c.removeObject(a),c.insertAt(b,a)},bodyContent:Ember.computed(function(){return Ember.Table.RowArrayController.create({target:this,parentController:this,container:this.get("container"),itemController:Ember.Table.Row,content:this.get("content")})}).property("content"),footerContent:Ember.computed(function(a,b){return b?b:Ember.A()}).property(),fixedColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(0,b)||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),tableColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(b,a.get("length"))||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),prepareTableColumns:function(a){return a.setEach("controller",this)},didInsertElement:function(){return this._super(),this.set("_tableScrollTop",0),this.elementSizeDidChange()},onResizeEnd:function(){return Ember.run(this,this.elementSizeDidChange)},elementSizeDidChange:function(){return"inDOM"===this.get("state")?(this.set("_width",this.$().parent().outerWidth()),this.set("_height",this.$().parent().outerHeight()),Ember.run.next(this,this.updateLayout)):void 0},updateLayout:function(){return"inDOM"===this.get("state")?(this.$(".antiscroll-wrap").antiscroll().data("antiscroll").rebuild(),this.get("forceFillColumns")?this.doForceFillColumns():void 0):void 0},doForceFillColumns:function(){var a,b,c,d,e,f,g,h;return h=this.get("_width"),e=this.get("_fixedColumnsWidth"),g=this.get("tableColumns"),d=this._getTotalWidth(g),b=h-e,f=b-d,c=g.filterProperty("canAutoResize"),a=Math.floor(f/c.length),c.forEach(function(b){var c;return c=b.get("columnWidth")+a,b.set("columnWidth",c)})},onBodyContentLengthDidChange:Ember.observer(function(){return Ember.run.next(this,function(){return Ember.run.once(this,this.updateLayout)})},"bodyContent.length"),_tableScrollTop:0,_tableScrollLeft:0,_width:null,_height:null,_contentHeaderHeight:null,_hasVerticalScrollbar:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),a>b?!0:!1}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_hasHorizontalScrollbar:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_width")-this.get("_fixedColumnsWidth"),a>b?!0:!1}).property("_tableColumnsWidth","_width","_fixedColumnsWidth"),_tablesContainerHeight:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),b>a?a:b}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_fixedColumnsWidth:Ember.computed(function(){return this._getTotalWidth(this.get("fixedColumns"))}).property("fixedColumns.@each.columnWidth"),_tableColumnsWidth:Ember.computed(function(){var a,b; +return b=this._getTotalWidth(this.get("tableColumns"))+3,a=this.get("_width")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("tableColumns.@each.columnWidth","_width","_fixedColumnsWidth"),_rowWidth:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_tableContainerWidth")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("_fixedColumnsWidth","_tableColumnsWidth","_tableContainerWidth"),_headerHeight:Ember.computed(function(){var a,b;return b=this.get("minHeaderHeight"),a=this.get("_contentHeaderHeight"),b>a?b:a}).property("_contentHeaderHeight","minHeaderHeight"),_footerHeight:Ember.computed(function(){return this.get("hasFooter")?this.get("footerHeight"):0}).property("footerHeight","hasFooter"),_bodyHeight:Ember.computed(function(){var a;return a=this.get("_tablesContainerHeight"),this.get("hasHeader")&&(a-=this.get("_headerHeight")),this.get("hasFooter")&&(a-=this.get("footerHeight")),a}).property("_tablesContainerHeight","_hasHorizontalScrollbar","_headerHeight","footerHeight","hasHeader","hasFooter"),_tableBlockWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_fixedBlockWidthBinding:"_fixedColumnsWidth",_tableContentHeight:Ember.computed(function(){return this.get("rowHeight")*this.get("bodyContent.length")}).property("rowHeight","bodyContent.length"),_tableContainerWidth:Ember.computed(function(){return this.get("_width")}).property("_width"),_scrollContainerWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_numItemsShowing:Ember.computed(function(){return Math.floor(this.get("_bodyHeight")/this.get("rowHeight"))}).property("_bodyHeight","rowHeight"),_startIndex:Ember.computed(function(){var a,b,c,d,e;return b=this.get("bodyContent.length"),c=this.get("_numItemsShowing"),d=this.get("rowHeight"),e=this.get("_tableScrollTop"),a=Math.floor(e/d),a+c>=b&&(a=b-c),0>a?0:a}).property("bodyContent.length","_numItemsShowing","rowHeight","_tableScrollTop"),_getTotalWidth:function(a,b){var c;return null==b&&(b="columnWidth"),a?(c=a.getEach(b)||[],c.reduce(function(a,b){return a+b},0)):0},click:function(a){var b;return(b=this.getRowForEvent(a))?this.set("selection",b.get("content")):void 0},getRowForEvent:function(a){var b,c;return b=$(a.target).parents(".ember-table-table-row"),c=Ember.View.views[b.attr("id")],c?c.get("row"):void 0}}),Ember.Handlebars.helper("table-component",Ember.Table.EmberTableComponent)}(); \ No newline at end of file diff --git a/src/templates/body-container.hbs b/src/templates/body-container.hbs index 1a07364b8..11f09df70 100644 --- a/src/templates/body-container.hbs +++ b/src/templates/body-container.hbs @@ -1,14 +1,16 @@
- {{view Ember.Table.LazyTableBlock classNames="ember-table-left-table-block" - contentBinding="controller.bodyContent" - columnsBinding="controller.fixedColumns" - widthBinding="controller._fixedBlockWidth" - numItemsShowingBinding="controller._numItemsShowing" - scrollTopBinding="controller._scrollTop" - startIndexBinding="controller._startIndex" - }} + {{#if controller.numFixedColumns}} + {{view Ember.Table.LazyTableBlock classNames="ember-table-left-table-block" + contentBinding="controller.bodyContent" + columnsBinding="controller.fixedColumns" + widthBinding="controller._fixedBlockWidth" + numItemsShowingBinding="controller._numItemsShowing" + scrollTopBinding="controller._scrollTop" + startIndexBinding="controller._startIndex" + }} + {{/if}} {{view Ember.Table.LazyTableBlock classNames="ember-table-right-table-block" contentBinding="controller.bodyContent" columnsBinding="controller.tableColumns" diff --git a/src/templates/footer-container.hbs b/src/templates/footer-container.hbs index 4c256c003..a4ba8287d 100644 --- a/src/templates/footer-container.hbs +++ b/src/templates/footer-container.hbs @@ -1,10 +1,12 @@
- {{view Ember.Table.TableBlock classNames="ember-table-left-table-block" - contentBinding="controller.footerContent" - columnsBinding="controller.fixedColumns" - widthBinding="controller._fixedBlockWidth" - heightBinding="controller.footerHeight" - }} + {{#if controller.numFixedColumns}} + {{view Ember.Table.TableBlock classNames="ember-table-left-table-block" + contentBinding="controller.footerContent" + columnsBinding="controller.fixedColumns" + widthBinding="controller._fixedBlockWidth" + heightBinding="controller.footerHeight" + }} + {{/if}} {{view Ember.Table.TableBlock classNames="ember-table-right-table-block" contentBinding="controller.footerContent" columnsBinding="controller.tableColumns" diff --git a/src/templates/header-container.hbs b/src/templates/header-container.hbs index ef0b7c13f..cd456d77e 100644 --- a/src/templates/header-container.hbs +++ b/src/templates/header-container.hbs @@ -1,9 +1,11 @@
- {{view Ember.Table.HeaderBlock classNames="ember-table-left-table-block" - columnsBinding="controller.fixedColumns" - widthBinding="controller._fixedBlockWidth" - heightBinding="controller.headerHeight" - }} + {{#if controller.numFixedColumns}} + {{view Ember.Table.HeaderBlock classNames="ember-table-left-table-block" + columnsBinding="controller.fixedColumns" + widthBinding="controller._fixedBlockWidth" + heightBinding="controller.headerHeight" + }} + {{/if}} {{view Ember.Table.HeaderBlock classNames="ember-table-right-table-block" columnsBinding="controller.tableColumns" scrollLeftBinding="controller._tableScrollLeft" From ec1ff2b110ea982d538f5e1aa72193bb8c9faa00 Mon Sep 17 00:00:00 2001 From: Alex Zirbel Date: Mon, 30 Jun 2014 16:06:57 -0700 Subject: [PATCH 02/24] Release 0.2.1 --- CHANGELOG.md | 11 +++++++++++ VERSION | 2 +- bower.json | 2 +- dist/ember-table.css | 2 +- dist/ember-table.js | 4 ++-- dist/ember-table.min.js | 4 ++-- package.json | 2 +- src/main.coffee | 2 +- 8 files changed, 20 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3943ca7b8..d4ddb6b6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Ember Table Changelog +### Ember Table 0.2.1 _(June 30, 2014)_ + +* Hide fixedColumns table when numFixedColumns is 0 +* Revert "Fix a few minor UI bugs" (fixes antiscroll issue) +** Fixes #92, where rows are dynamically inserted +* Fix updateLayout to make antiscroll update its dimensions +* Use intersect rather than pointer for sortable +* Header cell span css fix +* Use row rather than content of row object proxy in table cells +** It's now necessary to use row.get('property') rather than row.property + ### Ember Table 0.2.0 _(May 19, 2014)_ * Add versions to proper files; add CHANGELOG.md to manage versions diff --git a/VERSION b/VERSION index 0ea3a944b..0c62199f1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.0 +0.2.1 diff --git a/bower.json b/bower.json index c5cd1db29..73b56f854 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ember-table", - "version": "0.2.0", + "version": "0.2.1", "description": "Table built using ember.js that lazily renders rows.", "keywords": [ "ember", diff --git a/dist/ember-table.css b/dist/ember-table.css index ae1ce8bfe..0dc97589c 100644 --- a/dist/ember-table.css +++ b/dist/ember-table.css @@ -1,5 +1,5 @@ /*! -* ember-table v0.2.0 +* ember-table v0.2.1 * Copyright 2012-2014 Addepar Inc. * See LICENSE. */ diff --git a/dist/ember-table.js b/dist/ember-table.js index e9c0994a1..0662040bf 100644 --- a/dist/ember-table.js +++ b/dist/ember-table.js @@ -1,5 +1,5 @@ /*! -* ember-table v0.2.0 +* ember-table v0.2.1 * Copyright 2012-2014 Addepar Inc. * See LICENSE. */ @@ -244,7 +244,7 @@ helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {}; Ember.Table = Ember.Namespace.create(); -Ember.Table.VERSION = '0.2.0'; +Ember.Table.VERSION = '0.2.1'; if ((_ref = Ember.libraries) != null) { _ref.register('Ember Table', Ember.Table.VERSION); diff --git a/dist/ember-table.min.js b/dist/ember-table.min.js index f67f73a99..574be0156 100644 --- a/dist/ember-table.min.js +++ b/dist/ember-table.min.js @@ -1,7 +1,7 @@ /*! -* ember-table v0.2.0 +* ember-table v0.2.1 * Copyright 2012-2014 Addepar Inc. * See LICENSE. */ -!function(){Ember.TEMPLATES["body-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,numItemsShowingBinding:a,scrollTopBinding:a,startIndexBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n
\n
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,numItemsShowingBinding:b,scrollTopBinding:b,startIndexBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n
"),h}),Ember.TEMPLATES["components/ember-table"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.HeaderTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}function g(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.FooterTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var h,i="",j=this.escapeExpression,k=this;return h=c["if"].call(b,"controller.hasHeader",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(1,f,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.BodyTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),h=c["if"].call(b,"controller.hasFooter",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(3,g,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ScrollContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ColumnSortableIndicator",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),i}),Ember.TEMPLATES["footer-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="",h=this.escapeExpression;return e.buffer.push('
\n \n '),f=c._triageMustache.call(b,"view.content.headerCellName",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n \n
"),g}),Ember.TEMPLATES["header-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-left-table-block",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-right-table-block",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{contentBinding:"view.content",itemViewClassField:"headerCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f}),Ember.TEMPLATES["scroll-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.ScrollPanel",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n"),f}),Ember.TEMPLATES["table-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="";return e.buffer.push('\n '),f=c._triageMustache.call(b,"view.cellContent",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n"),g}),Ember.TEMPLATES["table-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{rowBinding:"view.row",contentBinding:"view.columns",itemViewClassField:"tableCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{rowBinding:"STRING",contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{rowBinding:b,contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f})}(),function(){Ember.Table=Ember.Namespace.create(),Ember.Table.VERSION="0.2.0",null!=(_ref=Ember.libraries)&&_ref.register("Ember Table",Ember.Table.VERSION)}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.ResizeHandlerMixin=Ember.Mixin.create({resizeEndDelay:200,resizing:!1,onResizeStart:Ember.K,onResizeEnd:Ember.K,onResize:Ember.K,endResize:Ember.computed(function(){return function(a){return this.isDestroyed?void 0:(this.set("resizing",!1),"function"==typeof this.onResizeEnd?this.onResizeEnd(a):void 0)}}),handleWindowResize:function(a){return this.get("resizing")||(this.set("resizing",!0),"function"==typeof this.onResizeStart&&this.onResizeStart(a)),"function"==typeof this.onResize&&this.onResize(a),Ember.run.debounce(this,this.get("endResize"),a,this.get("resizeEndDelay"))},didInsertElement:function(){return this._super(),this._setupDocumentHandlers()},willDestroyElement:function(){return this._removeDocumentHandlers(),this._super()},_setupDocumentHandlers:function(){return this._resizeHandler?void 0:(this._resizeHandler=jQuery.proxy(this.get("handleWindowResize"),this),jQuery(window).on("resize."+this.elementId,this._resizeHandler))},_removeDocumentHandlers:function(){return jQuery(window).off("resize."+this.elementId,this._resizeHandler),this._resizeHandler=null}})}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.StyleBindingsMixin=Ember.Mixin.create({concatenatedProperties:["styleBindings"],attributeBindings:["style"],unitType:"px",createStyleString:function(a,b){var c;return c=this.get(b),void 0!==c?("number"===Ember.typeOf(c)&&(c+=this.get("unitType")),""+a+":"+c+";"):void 0},applyStyleBindings:function(){var a,b,c,d,e,f=this;return(c=this.styleBindings)?(a={},c.forEach(function(b){var c,d,e;e=b.split(":"),c=e[0],d=e[1],a[d||c]=c}),e=Ember.keys(a),b=e.map(function(b){return a[b]}),d=Ember.computed(function(){var b,c;return c=e.map(function(b){return f.createStyleString(b,a[b])}),b=c.join(""),0!==b.length?b:void 0}),d.property.apply(d,b),Ember.defineProperty(this,"style",d)):void 0},init:function(){return this.applyStyleBindings(),this._super()}})}(),function(){jQuery.browser||!function(){var a,b,c;return b=void 0,a=void 0,jQuery.uaMatch=function(a){var b;return a=a.toLowerCase(),b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],{browser:b[1]||"",version:b[2]||"0"}},b=jQuery.uaMatch(navigator.userAgent),a={},b.browser&&(a[b.browser]=!0,a.version=b.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),c=jQuery.browser=a}()}(),function(){Ember.LazyContainerView=Ember.ContainerView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"lazy-list-container",styleBindings:["height"],content:null,itemViewClass:null,rowHeight:null,scrollTop:null,startIndex:null,init:function(){return this._super(),this.onNumChildViewsDidChange()},height:Ember.computed(function(){return this.get("content.length")*this.get("rowHeight")}).property("content.length","rowHeight"),numChildViews:Ember.computed(function(){return this.get("numItemsShowing")+2}).property("numItemsShowing"),onNumChildViewsDidChange:Ember.observer(function(){var a,b,c,d,e,f,g,h;return e=this,a=Ember.get(this.get("itemViewClass")),b=this.get("numChildViews"),a&&b?(d=this.get("length"),c=b-d,0>c?(g=this.slice(b,d),this.removeObjects(g)):c>0?(f=function(){h=[];for(var a=0;c>=0?c>a:a>c;c>=0?a++:a--)h.push(a);return h}.apply(this).map(function(){return e.createChildView(a)}),this.pushObjects(f)):void 0):void 0},"numChildViews","itemViewClass"),viewportDidChange:Ember.observer(function(){var a,b,c,d;return b=this.get("content")||[],a=b.get("length"),c=Math.min(this.get("length"),a),d=this.get("startIndex"),d+c>=a&&(d=a-c),0>d&&(d=0),this.forEach(function(a,e){var f,g;return e>=c?(a=this.objectAt(e),void a.set("content",null)):(g=d+e,a=this.objectAt(g%c),f=b.objectAt(g),f!==a.get("content")?(a.teardownContent(),a.set("itemIndex",g),a.set("content",f),a.prepareContent()):void 0)},this)},"content.length","length","startIndex")}),Ember.LazyItemView=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{itemIndex:null,prepareContent:Ember.K,teardownContent:Ember.K,rowHeightBinding:"parentView.rowHeight",styleBindings:["width","top","display"],top:Ember.computed(function(){return this.get("itemIndex")*this.get("rowHeight")}).property("itemIndex","rowHeight"),display:Ember.computed(function(){return this.get("content")?void 0:"none"}).property("content")})}(),function(){Ember.MultiItemViewCollectionView=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{styleBindings:"width",itemViewClassField:null,createChildView:function(a,b){var c,d;return d=this.get("itemViewClassField"),c=b.content.get(d),"string"==typeof c&&(c=Ember.get(Ember.lookup,c)),this._super(c,b)}}),Ember.MouseWheelHandlerMixin=Ember.Mixin.create({onMouseWheel:Ember.K,didInsertElement:function(){var a=this;return this._super(),this.$().bind("mousewheel",function(b,c,d,e){return Ember.run(a,a.onMouseWheel,b,c,d,e)})},willDestroyElement:function(){var a;return null!=(a=this.$())&&a.unbind("mousewheel"),this._super()}}),Ember.ScrollHandlerMixin=Ember.Mixin.create({onScroll:Ember.K,scrollElementSelector:"",didInsertElement:function(){var a=this;return this._super(),this.$(this.get("scrollElementSelector")).bind("scroll",function(b){return Ember.run(a,a.onScroll,b)})},willDestroyElement:function(){var a;return null!=(a=this.$(this.get("scrollElementSelector")))&&a.unbind("scroll"),this._super()}}),Ember.TouchMoveHandlerMixin=Ember.Mixin.create({onTouchMove:Ember.K,didInsertElement:function(){var a,b,c=this;return this._super(),a=b=0,this.$().bind("touchstart",function(c){a=c.originalEvent.targetTouches[0].pageX,b=c.originalEvent.targetTouches[0].pageY}),this.$().bind("touchmove",function(d){var e,f,g,h;g=d.originalEvent.targetTouches[0].pageX,h=d.originalEvent.targetTouches[0].pageY,e=-(g-a),f=-(h-b),Ember.run(c,c.onTouchMove,d,e,f),a=g,b=h})},willDestroy:function(){var a;return null!=(a=this.$())&&a.unbind("touchmove"),this._super()}}),Ember.Table.RowArrayController=Ember.ArrayController.extend({itemController:null,content:null,rowContent:Ember.computed(function(){return[]}).property(),controllerAt:function(a,b){var c,d,e;return c=this.get("container"),e=this.get("_subControllers"),(d=e[a])?d:(d=this.get("itemController").create({target:this,parentController:this.get("parentController")||this,content:b}),e[a]=d,d)}}),Ember.Table.ShowHorizontalScrollMixin=Ember.Mixin.create({mouseEnter:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.addClass("antiscroll-scrollbar-shown")},mouseLeave:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.removeClass("antiscroll-scrollbar-shown")}})}(),function(){Ember.Table.ColumnDefinition=Ember.Object.extend({headerCellName:void 0,contentPath:void 0,minWidth:void 0,maxWidth:void 0,defaultColumnWidth:150,columnWidth:Ember.computed.oneWay("defaultColumnWidth"),isResizable:!0,isSortable:!0,textAlign:"text-align-right",canAutoResize:!0,headerCellViewClass:"Ember.Table.HeaderCell",tableCellViewClass:"Ember.Table.TableCell",resize:function(a){return this.set("columnWidth",a)},getCellContent:function(a){var b;return b=this.get("contentPath"),Ember.assert("You must either provide a contentPath or override getCellContent in your column definition",null!=b),Ember.get(a,b)},setCellContent:Ember.K}),Ember.Table.Row=Ember.ObjectProxy.extend({content:null,isSelected:Ember.computed(function(){return this.get("parentController.selection")===this.get("content")}).property("parentController.selection","content"),isShowing:!0,isHovered:!1})}(),function(){Ember.Table.TableContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-container"],styleBindings:["height","width"]}),Ember.Table.TableBlock=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-block"],styleBindings:["width","height"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),columns:null,content:null,scrollLeft:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight")}),Ember.Table.LazyTableBlock=Ember.LazyContainerView.extend({classNames:["ember-table-table-block"],styleBindings:["width"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),rowHeight:Ember.computed.alias("controller.rowHeight"),columns:null,content:null,scrollLeft:null,scrollTop:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.TableRow=Ember.LazyItemView.extend({templateName:"table-row",classNames:"ember-table-table-row",classNameBindings:["row.isHovered:ember-table-hover","row.isSelected:ember-table-selected","row.rowStyle","isLastRow:ember-table-last-row"],styleBindings:["width","height"],row:Ember.computed.alias("content"),columns:Ember.computed.alias("parentView.columns"),width:Ember.computed.alias("controller._rowWidth"),height:Ember.computed.alias("controller.rowHeight"),isLastRow:Ember.computed(function(){return this.get("row")===this.get("controller.bodyContent.lastObject")}).property("controller.bodyContent.lastObject","row"),mouseEnter:function(){var a;return a=this.get("row"),a?a.set("isHovered",!0):void 0},mouseLeave:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0},teardownContent:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0}}),Ember.Table.TableCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"table-cell",classNames:["ember-table-cell"],classNameBindings:"column.textAlign",styleBindings:"width",row:Ember.computed.alias("parentView.row"),column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),init:function(){return this._super(),this.contentPathDidChange(),this.contentDidChange()},contentDidChange:function(){return this.notifyPropertyChange("cellContent")},contentPathWillChange:function(){var a;return a=this.get("column.contentPath"),a?this.removeObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),contentPathDidChange:function(){var a;return a=this.get("column.contentPath"),a?this.addObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),cellContent:Ember.computed(function(a,b){var c,d;return d=this.get("row"),c=this.get("column"),d&&c?(1===arguments.length?b=c.getCellContent(d):c.setCellContent(d,b),b):void 0}).property("row.isLoaded","column")}),Ember.Table.HeaderBlock=Ember.Table.TableBlock.extend({classNames:["ember-table-header-block"],itemViewClass:"Ember.Table.HeaderRow",content:Ember.computed(function(){return[this.get("columns")]}).property("columns")}),Ember.Table.HeaderRow=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-row",classNames:["ember-table-table-row","ember-table-header-row"],styleBindings:["width"],columns:Ember.computed.alias("content"),width:Ember.computed.alias("controller._rowWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),sortableOption:Ember.computed(function(){return{axis:"x",containment:"parent",cursor:"move",helper:"clone",items:".ember-table-header-cell.sortable",opacity:.9,placeholder:"ui-state-highlight",scroll:!0,tolerance:"intersect",update:jQuery.proxy(this.onColumnSortDone,this),stop:jQuery.proxy(this.onColumnSortStop,this),sort:jQuery.proxy(this.onColumnSortChange,this)}}),onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),didInsertElement:function(){return this._super(),this.get("controller.enableColumnReorder")?this.$("> div").sortable(this.get("sortableOption")):void 0},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onColumnSortStop:function(){return this.set("controller._isShowingSortableIndicator",!1)},onColumnSortChange:function(){var a;return a=this.$(".ui-state-highlight").offset().left-this.$().closest(".ember-table-tables-container").offset().left,this.set("controller._isShowingSortableIndicator",!0),this.set("controller._sortableIndicatorLeft",a)},onColumnSortDone:function(a,b){var c,d,e;return d=b.item.index(),e=Ember.View.views[b.item.attr("id")],c=e.get("column"),this.get("controller").onColumnSort(c,d),this.set("controller._isShowingSortableIndicator",!1)}}),Ember.Table.HeaderCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-cell",classNames:["ember-table-cell","ember-table-header-cell"],classNameBindings:["column.isSortable:sortable","column.textAlign"],styleBindings:["width","height"],column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight"),resizableOption:Ember.computed(function(){return{handles:"e",minHeight:40,minWidth:this.get("column.minWidth")||100,maxWidth:this.get("column.maxWidth")||500,grid:this.get("column.snapGrid"),resize:jQuery.proxy(this.onColumnResize,this),stop:jQuery.proxy(this.onColumnResize,this)}}),didInsertElement:function(){this.elementSizeDidChange(),this.get("column.isResizable")&&(this.$().resizable(this.get("resizableOption")),this._resizableWidget=this.$().resizable("widget"))},onColumnResize:function(a,b){return this.elementSizeDidChange(),this.get("controller.forceFillColumns")&&this.get("controller.columns").filterProperty("canAutoResize").length>1&&this.set("column.canAutoResize",!1),this.get("column").resize(b.size.width)},elementSizeDidChange:function(){var a;a=0,$(".ember-table-header-block .ember-table-content").each(function(){var b;return b=$(this).outerHeight(),b>a?a=b:void 0}),this.set("controller._contentHeaderHeight",a)}}),Ember.Table.ColumnSortableIndicator=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"ember-table-column-sortable-indicator",classNameBindings:"controller._isShowingSortableIndicator:active",styleBindings:["left","height"],left:Ember.computed.alias("controller._sortableIndicatorLeft"),height:Ember.computed.alias("controller._height")}),Ember.Table.HeaderTableContainer=Ember.Table.TableContainer.extend(Ember.Table.ShowHorizontalScrollMixin,{templateName:"header-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-header-container"],height:Ember.computed.alias("controller._headerHeight"),width:Ember.computed.alias("controller._tableContainerWidth")}),Ember.Table.BodyTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.ScrollHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"body-container",classNames:["ember-table-table-container","ember-table-body-container","antiscroll-wrap"],height:Ember.computed.alias("controller._bodyHeight"),width:Ember.computed.alias("controller._width"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),scrollElementSelector:".antiscroll-inner",onScroll:function(a){return this.set("scrollTop",a.target.scrollTop),a.preventDefault()},onMouseWheel:function(a,b,c,d){var e;if(Math.abs(c)>Math.abs(d))return e=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",e),a.preventDefault()},onTouchMove:function(a,b,c){var d;if(Math.abs(b)>Math.abs(c))return d=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",d),a.preventDefault()}}),Ember.Table.FooterTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"footer-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-footer-container"],styleBindings:"top",height:Ember.computed.alias("controller.footerHeight"),width:Ember.computed.alias("controller._tableContainerWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),top:Ember.computed(function(){var a,b,c;return c=this.get("controller._headerHeight"),b=this.get("controller._tableContentHeight")+c,a=this.get("controller._bodyHeight")+c,a>b?b:a}).property("controller._bodyHeight","controller._headerHeight","controller._tableContentHeight"),onMouseWheel:function(a,b,c){var d;return d=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",d),a.preventDefault()},onTouchMove:function(a,b){var c;return c=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",c),a.preventDefault()}}),Ember.Table.ScrollContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.ScrollHandlerMixin,{templateName:"scroll-container",classNames:["ember-table-scroll-container"],styleBindings:["left","width","height"],scrollElementSelector:".antiscroll-inner",width:Ember.computed.alias("controller._scrollContainerWidth"),height:10,left:Ember.computed.alias("controller._fixedColumnsWidth"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),didInsertElement:function(){return this._super(),this.onScrollLeftDidChange()},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onScrollLeftDidChange:Ember.observer(function(){var a;return a=this.get("scrollElementSelector"),this.$(a).scrollLeft(this.get("scrollLeft"))},"scrollLeft","scrollElementSelector")}),Ember.Table.ScrollPanel=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-scroll-panel"],styleBindings:["width","height"],width:Ember.computed.alias("controller._tableColumnsWidth"),height:Ember.computed.alias("controller._tableContentHeight")})}(),function(){Ember.Table.EmberTableComponent=Ember.Component.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.AddeparMixins.ResizeHandlerMixin,{layoutName:"components/ember-table",classNames:["ember-table-tables-container"],classNameBindings:["enableContentSelection:ember-table-content-selectable"],styleBindings:["height"],height:Ember.computed.alias("_tablesContainerHeight"),columns:null,numFixedColumns:0,numFooterRow:0,rowHeight:30,minHeaderHeight:30,footerHeight:30,hasHeader:!0,hasFooter:!0,forceFillColumns:!1,enableColumnReorder:!0,enableContentSelection:!1,selection:null,tableRowViewClass:"Ember.Table.TableRow",init:function(){if(this._super(),!$.ui)throw"Missing dependency: jquery-ui";if(!$().mousewheel)throw"Missing dependency: jquery-mousewheel";if(!$().antiscroll)throw"Missing dependency: antiscroll.js"},actions:{addColumn:Ember.K,sortByColumn:Ember.K},onColumnSort:function(a,b){var c;return c=this.get("tableColumns"),c.removeObject(a),c.insertAt(b,a)},bodyContent:Ember.computed(function(){return Ember.Table.RowArrayController.create({target:this,parentController:this,container:this.get("container"),itemController:Ember.Table.Row,content:this.get("content")})}).property("content"),footerContent:Ember.computed(function(a,b){return b?b:Ember.A()}).property(),fixedColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(0,b)||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),tableColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(b,a.get("length"))||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),prepareTableColumns:function(a){return a.setEach("controller",this)},didInsertElement:function(){return this._super(),this.set("_tableScrollTop",0),this.elementSizeDidChange()},onResizeEnd:function(){return Ember.run(this,this.elementSizeDidChange)},elementSizeDidChange:function(){return"inDOM"===this.get("state")?(this.set("_width",this.$().parent().outerWidth()),this.set("_height",this.$().parent().outerHeight()),Ember.run.next(this,this.updateLayout)):void 0},updateLayout:function(){return"inDOM"===this.get("state")?(this.$(".antiscroll-wrap").antiscroll().data("antiscroll").rebuild(),this.get("forceFillColumns")?this.doForceFillColumns():void 0):void 0},doForceFillColumns:function(){var a,b,c,d,e,f,g,h;return h=this.get("_width"),e=this.get("_fixedColumnsWidth"),g=this.get("tableColumns"),d=this._getTotalWidth(g),b=h-e,f=b-d,c=g.filterProperty("canAutoResize"),a=Math.floor(f/c.length),c.forEach(function(b){var c;return c=b.get("columnWidth")+a,b.set("columnWidth",c)})},onBodyContentLengthDidChange:Ember.observer(function(){return Ember.run.next(this,function(){return Ember.run.once(this,this.updateLayout)})},"bodyContent.length"),_tableScrollTop:0,_tableScrollLeft:0,_width:null,_height:null,_contentHeaderHeight:null,_hasVerticalScrollbar:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),a>b?!0:!1}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_hasHorizontalScrollbar:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_width")-this.get("_fixedColumnsWidth"),a>b?!0:!1}).property("_tableColumnsWidth","_width","_fixedColumnsWidth"),_tablesContainerHeight:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),b>a?a:b}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_fixedColumnsWidth:Ember.computed(function(){return this._getTotalWidth(this.get("fixedColumns"))}).property("fixedColumns.@each.columnWidth"),_tableColumnsWidth:Ember.computed(function(){var a,b; +!function(){Ember.TEMPLATES["body-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,numItemsShowingBinding:a,scrollTopBinding:a,startIndexBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n
\n
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,numItemsShowingBinding:b,scrollTopBinding:b,startIndexBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n
"),h}),Ember.TEMPLATES["components/ember-table"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.HeaderTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}function g(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.FooterTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var h,i="",j=this.escapeExpression,k=this;return h=c["if"].call(b,"controller.hasHeader",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(1,f,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.BodyTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),h=c["if"].call(b,"controller.hasFooter",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(3,g,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ScrollContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ColumnSortableIndicator",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),i}),Ember.TEMPLATES["footer-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="",h=this.escapeExpression;return e.buffer.push('
\n \n '),f=c._triageMustache.call(b,"view.content.headerCellName",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n \n
"),g}),Ember.TEMPLATES["header-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-left-table-block",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-right-table-block",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{contentBinding:"view.content",itemViewClassField:"headerCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f}),Ember.TEMPLATES["scroll-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.ScrollPanel",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n"),f}),Ember.TEMPLATES["table-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="";return e.buffer.push('\n '),f=c._triageMustache.call(b,"view.cellContent",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n"),g}),Ember.TEMPLATES["table-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{rowBinding:"view.row",contentBinding:"view.columns",itemViewClassField:"tableCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{rowBinding:"STRING",contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{rowBinding:b,contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f})}(),function(){Ember.Table=Ember.Namespace.create(),Ember.Table.VERSION="0.2.1",null!=(_ref=Ember.libraries)&&_ref.register("Ember Table",Ember.Table.VERSION)}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.ResizeHandlerMixin=Ember.Mixin.create({resizeEndDelay:200,resizing:!1,onResizeStart:Ember.K,onResizeEnd:Ember.K,onResize:Ember.K,endResize:Ember.computed(function(){return function(a){return this.isDestroyed?void 0:(this.set("resizing",!1),"function"==typeof this.onResizeEnd?this.onResizeEnd(a):void 0)}}),handleWindowResize:function(a){return this.get("resizing")||(this.set("resizing",!0),"function"==typeof this.onResizeStart&&this.onResizeStart(a)),"function"==typeof this.onResize&&this.onResize(a),Ember.run.debounce(this,this.get("endResize"),a,this.get("resizeEndDelay"))},didInsertElement:function(){return this._super(),this._setupDocumentHandlers()},willDestroyElement:function(){return this._removeDocumentHandlers(),this._super()},_setupDocumentHandlers:function(){return this._resizeHandler?void 0:(this._resizeHandler=jQuery.proxy(this.get("handleWindowResize"),this),jQuery(window).on("resize."+this.elementId,this._resizeHandler))},_removeDocumentHandlers:function(){return jQuery(window).off("resize."+this.elementId,this._resizeHandler),this._resizeHandler=null}})}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.StyleBindingsMixin=Ember.Mixin.create({concatenatedProperties:["styleBindings"],attributeBindings:["style"],unitType:"px",createStyleString:function(a,b){var c;return c=this.get(b),void 0!==c?("number"===Ember.typeOf(c)&&(c+=this.get("unitType")),""+a+":"+c+";"):void 0},applyStyleBindings:function(){var a,b,c,d,e,f=this;return(c=this.styleBindings)?(a={},c.forEach(function(b){var c,d,e;e=b.split(":"),c=e[0],d=e[1],a[d||c]=c}),e=Ember.keys(a),b=e.map(function(b){return a[b]}),d=Ember.computed(function(){var b,c;return c=e.map(function(b){return f.createStyleString(b,a[b])}),b=c.join(""),0!==b.length?b:void 0}),d.property.apply(d,b),Ember.defineProperty(this,"style",d)):void 0},init:function(){return this.applyStyleBindings(),this._super()}})}(),function(){jQuery.browser||!function(){var a,b,c;return b=void 0,a=void 0,jQuery.uaMatch=function(a){var b;return a=a.toLowerCase(),b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],{browser:b[1]||"",version:b[2]||"0"}},b=jQuery.uaMatch(navigator.userAgent),a={},b.browser&&(a[b.browser]=!0,a.version=b.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),c=jQuery.browser=a}()}(),function(){Ember.LazyContainerView=Ember.ContainerView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"lazy-list-container",styleBindings:["height"],content:null,itemViewClass:null,rowHeight:null,scrollTop:null,startIndex:null,init:function(){return this._super(),this.onNumChildViewsDidChange()},height:Ember.computed(function(){return this.get("content.length")*this.get("rowHeight")}).property("content.length","rowHeight"),numChildViews:Ember.computed(function(){return this.get("numItemsShowing")+2}).property("numItemsShowing"),onNumChildViewsDidChange:Ember.observer(function(){var a,b,c,d,e,f,g,h;return e=this,a=Ember.get(this.get("itemViewClass")),b=this.get("numChildViews"),a&&b?(d=this.get("length"),c=b-d,0>c?(g=this.slice(b,d),this.removeObjects(g)):c>0?(f=function(){h=[];for(var a=0;c>=0?c>a:a>c;c>=0?a++:a--)h.push(a);return h}.apply(this).map(function(){return e.createChildView(a)}),this.pushObjects(f)):void 0):void 0},"numChildViews","itemViewClass"),viewportDidChange:Ember.observer(function(){var a,b,c,d;return b=this.get("content")||[],a=b.get("length"),c=Math.min(this.get("length"),a),d=this.get("startIndex"),d+c>=a&&(d=a-c),0>d&&(d=0),this.forEach(function(a,e){var f,g;return e>=c?(a=this.objectAt(e),void a.set("content",null)):(g=d+e,a=this.objectAt(g%c),f=b.objectAt(g),f!==a.get("content")?(a.teardownContent(),a.set("itemIndex",g),a.set("content",f),a.prepareContent()):void 0)},this)},"content.length","length","startIndex")}),Ember.LazyItemView=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{itemIndex:null,prepareContent:Ember.K,teardownContent:Ember.K,rowHeightBinding:"parentView.rowHeight",styleBindings:["width","top","display"],top:Ember.computed(function(){return this.get("itemIndex")*this.get("rowHeight")}).property("itemIndex","rowHeight"),display:Ember.computed(function(){return this.get("content")?void 0:"none"}).property("content")})}(),function(){Ember.MultiItemViewCollectionView=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{styleBindings:"width",itemViewClassField:null,createChildView:function(a,b){var c,d;return d=this.get("itemViewClassField"),c=b.content.get(d),"string"==typeof c&&(c=Ember.get(Ember.lookup,c)),this._super(c,b)}}),Ember.MouseWheelHandlerMixin=Ember.Mixin.create({onMouseWheel:Ember.K,didInsertElement:function(){var a=this;return this._super(),this.$().bind("mousewheel",function(b,c,d,e){return Ember.run(a,a.onMouseWheel,b,c,d,e)})},willDestroyElement:function(){var a;return null!=(a=this.$())&&a.unbind("mousewheel"),this._super()}}),Ember.ScrollHandlerMixin=Ember.Mixin.create({onScroll:Ember.K,scrollElementSelector:"",didInsertElement:function(){var a=this;return this._super(),this.$(this.get("scrollElementSelector")).bind("scroll",function(b){return Ember.run(a,a.onScroll,b)})},willDestroyElement:function(){var a;return null!=(a=this.$(this.get("scrollElementSelector")))&&a.unbind("scroll"),this._super()}}),Ember.TouchMoveHandlerMixin=Ember.Mixin.create({onTouchMove:Ember.K,didInsertElement:function(){var a,b,c=this;return this._super(),a=b=0,this.$().bind("touchstart",function(c){a=c.originalEvent.targetTouches[0].pageX,b=c.originalEvent.targetTouches[0].pageY}),this.$().bind("touchmove",function(d){var e,f,g,h;g=d.originalEvent.targetTouches[0].pageX,h=d.originalEvent.targetTouches[0].pageY,e=-(g-a),f=-(h-b),Ember.run(c,c.onTouchMove,d,e,f),a=g,b=h})},willDestroy:function(){var a;return null!=(a=this.$())&&a.unbind("touchmove"),this._super()}}),Ember.Table.RowArrayController=Ember.ArrayController.extend({itemController:null,content:null,rowContent:Ember.computed(function(){return[]}).property(),controllerAt:function(a,b){var c,d,e;return c=this.get("container"),e=this.get("_subControllers"),(d=e[a])?d:(d=this.get("itemController").create({target:this,parentController:this.get("parentController")||this,content:b}),e[a]=d,d)}}),Ember.Table.ShowHorizontalScrollMixin=Ember.Mixin.create({mouseEnter:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.addClass("antiscroll-scrollbar-shown")},mouseLeave:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.removeClass("antiscroll-scrollbar-shown")}})}(),function(){Ember.Table.ColumnDefinition=Ember.Object.extend({headerCellName:void 0,contentPath:void 0,minWidth:void 0,maxWidth:void 0,defaultColumnWidth:150,columnWidth:Ember.computed.oneWay("defaultColumnWidth"),isResizable:!0,isSortable:!0,textAlign:"text-align-right",canAutoResize:!0,headerCellViewClass:"Ember.Table.HeaderCell",tableCellViewClass:"Ember.Table.TableCell",resize:function(a){return this.set("columnWidth",a)},getCellContent:function(a){var b;return b=this.get("contentPath"),Ember.assert("You must either provide a contentPath or override getCellContent in your column definition",null!=b),Ember.get(a,b)},setCellContent:Ember.K}),Ember.Table.Row=Ember.ObjectProxy.extend({content:null,isSelected:Ember.computed(function(){return this.get("parentController.selection")===this.get("content")}).property("parentController.selection","content"),isShowing:!0,isHovered:!1})}(),function(){Ember.Table.TableContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-container"],styleBindings:["height","width"]}),Ember.Table.TableBlock=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-block"],styleBindings:["width","height"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),columns:null,content:null,scrollLeft:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight")}),Ember.Table.LazyTableBlock=Ember.LazyContainerView.extend({classNames:["ember-table-table-block"],styleBindings:["width"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),rowHeight:Ember.computed.alias("controller.rowHeight"),columns:null,content:null,scrollLeft:null,scrollTop:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.TableRow=Ember.LazyItemView.extend({templateName:"table-row",classNames:"ember-table-table-row",classNameBindings:["row.isHovered:ember-table-hover","row.isSelected:ember-table-selected","row.rowStyle","isLastRow:ember-table-last-row"],styleBindings:["width","height"],row:Ember.computed.alias("content"),columns:Ember.computed.alias("parentView.columns"),width:Ember.computed.alias("controller._rowWidth"),height:Ember.computed.alias("controller.rowHeight"),isLastRow:Ember.computed(function(){return this.get("row")===this.get("controller.bodyContent.lastObject")}).property("controller.bodyContent.lastObject","row"),mouseEnter:function(){var a;return a=this.get("row"),a?a.set("isHovered",!0):void 0},mouseLeave:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0},teardownContent:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0}}),Ember.Table.TableCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"table-cell",classNames:["ember-table-cell"],classNameBindings:"column.textAlign",styleBindings:"width",row:Ember.computed.alias("parentView.row"),column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),init:function(){return this._super(),this.contentPathDidChange(),this.contentDidChange()},contentDidChange:function(){return this.notifyPropertyChange("cellContent")},contentPathWillChange:function(){var a;return a=this.get("column.contentPath"),a?this.removeObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),contentPathDidChange:function(){var a;return a=this.get("column.contentPath"),a?this.addObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),cellContent:Ember.computed(function(a,b){var c,d;return d=this.get("row"),c=this.get("column"),d&&c?(1===arguments.length?b=c.getCellContent(d):c.setCellContent(d,b),b):void 0}).property("row.isLoaded","column")}),Ember.Table.HeaderBlock=Ember.Table.TableBlock.extend({classNames:["ember-table-header-block"],itemViewClass:"Ember.Table.HeaderRow",content:Ember.computed(function(){return[this.get("columns")]}).property("columns")}),Ember.Table.HeaderRow=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-row",classNames:["ember-table-table-row","ember-table-header-row"],styleBindings:["width"],columns:Ember.computed.alias("content"),width:Ember.computed.alias("controller._rowWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),sortableOption:Ember.computed(function(){return{axis:"x",containment:"parent",cursor:"move",helper:"clone",items:".ember-table-header-cell.sortable",opacity:.9,placeholder:"ui-state-highlight",scroll:!0,tolerance:"intersect",update:jQuery.proxy(this.onColumnSortDone,this),stop:jQuery.proxy(this.onColumnSortStop,this),sort:jQuery.proxy(this.onColumnSortChange,this)}}),onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),didInsertElement:function(){return this._super(),this.get("controller.enableColumnReorder")?this.$("> div").sortable(this.get("sortableOption")):void 0},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onColumnSortStop:function(){return this.set("controller._isShowingSortableIndicator",!1)},onColumnSortChange:function(){var a;return a=this.$(".ui-state-highlight").offset().left-this.$().closest(".ember-table-tables-container").offset().left,this.set("controller._isShowingSortableIndicator",!0),this.set("controller._sortableIndicatorLeft",a)},onColumnSortDone:function(a,b){var c,d,e;return d=b.item.index(),e=Ember.View.views[b.item.attr("id")],c=e.get("column"),this.get("controller").onColumnSort(c,d),this.set("controller._isShowingSortableIndicator",!1)}}),Ember.Table.HeaderCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-cell",classNames:["ember-table-cell","ember-table-header-cell"],classNameBindings:["column.isSortable:sortable","column.textAlign"],styleBindings:["width","height"],column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight"),resizableOption:Ember.computed(function(){return{handles:"e",minHeight:40,minWidth:this.get("column.minWidth")||100,maxWidth:this.get("column.maxWidth")||500,grid:this.get("column.snapGrid"),resize:jQuery.proxy(this.onColumnResize,this),stop:jQuery.proxy(this.onColumnResize,this)}}),didInsertElement:function(){this.elementSizeDidChange(),this.get("column.isResizable")&&(this.$().resizable(this.get("resizableOption")),this._resizableWidget=this.$().resizable("widget"))},onColumnResize:function(a,b){return this.elementSizeDidChange(),this.get("controller.forceFillColumns")&&this.get("controller.columns").filterProperty("canAutoResize").length>1&&this.set("column.canAutoResize",!1),this.get("column").resize(b.size.width)},elementSizeDidChange:function(){var a;a=0,$(".ember-table-header-block .ember-table-content").each(function(){var b;return b=$(this).outerHeight(),b>a?a=b:void 0}),this.set("controller._contentHeaderHeight",a)}}),Ember.Table.ColumnSortableIndicator=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"ember-table-column-sortable-indicator",classNameBindings:"controller._isShowingSortableIndicator:active",styleBindings:["left","height"],left:Ember.computed.alias("controller._sortableIndicatorLeft"),height:Ember.computed.alias("controller._height")}),Ember.Table.HeaderTableContainer=Ember.Table.TableContainer.extend(Ember.Table.ShowHorizontalScrollMixin,{templateName:"header-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-header-container"],height:Ember.computed.alias("controller._headerHeight"),width:Ember.computed.alias("controller._tableContainerWidth")}),Ember.Table.BodyTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.ScrollHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"body-container",classNames:["ember-table-table-container","ember-table-body-container","antiscroll-wrap"],height:Ember.computed.alias("controller._bodyHeight"),width:Ember.computed.alias("controller._width"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),scrollElementSelector:".antiscroll-inner",onScroll:function(a){return this.set("scrollTop",a.target.scrollTop),a.preventDefault()},onMouseWheel:function(a,b,c,d){var e;if(Math.abs(c)>Math.abs(d))return e=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",e),a.preventDefault()},onTouchMove:function(a,b,c){var d;if(Math.abs(b)>Math.abs(c))return d=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",d),a.preventDefault()}}),Ember.Table.FooterTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"footer-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-footer-container"],styleBindings:"top",height:Ember.computed.alias("controller.footerHeight"),width:Ember.computed.alias("controller._tableContainerWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),top:Ember.computed(function(){var a,b,c;return c=this.get("controller._headerHeight"),b=this.get("controller._tableContentHeight")+c,a=this.get("controller._bodyHeight")+c,a>b?b:a}).property("controller._bodyHeight","controller._headerHeight","controller._tableContentHeight"),onMouseWheel:function(a,b,c){var d;return d=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",d),a.preventDefault()},onTouchMove:function(a,b){var c;return c=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",c),a.preventDefault()}}),Ember.Table.ScrollContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.ScrollHandlerMixin,{templateName:"scroll-container",classNames:["ember-table-scroll-container"],styleBindings:["left","width","height"],scrollElementSelector:".antiscroll-inner",width:Ember.computed.alias("controller._scrollContainerWidth"),height:10,left:Ember.computed.alias("controller._fixedColumnsWidth"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),didInsertElement:function(){return this._super(),this.onScrollLeftDidChange()},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onScrollLeftDidChange:Ember.observer(function(){var a;return a=this.get("scrollElementSelector"),this.$(a).scrollLeft(this.get("scrollLeft"))},"scrollLeft","scrollElementSelector")}),Ember.Table.ScrollPanel=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-scroll-panel"],styleBindings:["width","height"],width:Ember.computed.alias("controller._tableColumnsWidth"),height:Ember.computed.alias("controller._tableContentHeight")})}(),function(){Ember.Table.EmberTableComponent=Ember.Component.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.AddeparMixins.ResizeHandlerMixin,{layoutName:"components/ember-table",classNames:["ember-table-tables-container"],classNameBindings:["enableContentSelection:ember-table-content-selectable"],styleBindings:["height"],height:Ember.computed.alias("_tablesContainerHeight"),columns:null,numFixedColumns:0,numFooterRow:0,rowHeight:30,minHeaderHeight:30,footerHeight:30,hasHeader:!0,hasFooter:!0,forceFillColumns:!1,enableColumnReorder:!0,enableContentSelection:!1,selection:null,tableRowViewClass:"Ember.Table.TableRow",init:function(){if(this._super(),!$.ui)throw"Missing dependency: jquery-ui";if(!$().mousewheel)throw"Missing dependency: jquery-mousewheel";if(!$().antiscroll)throw"Missing dependency: antiscroll.js"},actions:{addColumn:Ember.K,sortByColumn:Ember.K},onColumnSort:function(a,b){var c;return c=this.get("tableColumns"),c.removeObject(a),c.insertAt(b,a)},bodyContent:Ember.computed(function(){return Ember.Table.RowArrayController.create({target:this,parentController:this,container:this.get("container"),itemController:Ember.Table.Row,content:this.get("content")})}).property("content"),footerContent:Ember.computed(function(a,b){return b?b:Ember.A()}).property(),fixedColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(0,b)||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),tableColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(b,a.get("length"))||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),prepareTableColumns:function(a){return a.setEach("controller",this)},didInsertElement:function(){return this._super(),this.set("_tableScrollTop",0),this.elementSizeDidChange()},onResizeEnd:function(){return Ember.run(this,this.elementSizeDidChange)},elementSizeDidChange:function(){return"inDOM"===this.get("state")?(this.set("_width",this.$().parent().outerWidth()),this.set("_height",this.$().parent().outerHeight()),Ember.run.next(this,this.updateLayout)):void 0},updateLayout:function(){return"inDOM"===this.get("state")?(this.$(".antiscroll-wrap").antiscroll().data("antiscroll").rebuild(),this.get("forceFillColumns")?this.doForceFillColumns():void 0):void 0},doForceFillColumns:function(){var a,b,c,d,e,f,g,h;return h=this.get("_width"),e=this.get("_fixedColumnsWidth"),g=this.get("tableColumns"),d=this._getTotalWidth(g),b=h-e,f=b-d,c=g.filterProperty("canAutoResize"),a=Math.floor(f/c.length),c.forEach(function(b){var c;return c=b.get("columnWidth")+a,b.set("columnWidth",c)})},onBodyContentLengthDidChange:Ember.observer(function(){return Ember.run.next(this,function(){return Ember.run.once(this,this.updateLayout)})},"bodyContent.length"),_tableScrollTop:0,_tableScrollLeft:0,_width:null,_height:null,_contentHeaderHeight:null,_hasVerticalScrollbar:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),a>b?!0:!1}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_hasHorizontalScrollbar:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_width")-this.get("_fixedColumnsWidth"),a>b?!0:!1}).property("_tableColumnsWidth","_width","_fixedColumnsWidth"),_tablesContainerHeight:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),b>a?a:b}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_fixedColumnsWidth:Ember.computed(function(){return this._getTotalWidth(this.get("fixedColumns"))}).property("fixedColumns.@each.columnWidth"),_tableColumnsWidth:Ember.computed(function(){var a,b; return b=this._getTotalWidth(this.get("tableColumns"))+3,a=this.get("_width")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("tableColumns.@each.columnWidth","_width","_fixedColumnsWidth"),_rowWidth:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_tableContainerWidth")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("_fixedColumnsWidth","_tableColumnsWidth","_tableContainerWidth"),_headerHeight:Ember.computed(function(){var a,b;return b=this.get("minHeaderHeight"),a=this.get("_contentHeaderHeight"),b>a?b:a}).property("_contentHeaderHeight","minHeaderHeight"),_footerHeight:Ember.computed(function(){return this.get("hasFooter")?this.get("footerHeight"):0}).property("footerHeight","hasFooter"),_bodyHeight:Ember.computed(function(){var a;return a=this.get("_tablesContainerHeight"),this.get("hasHeader")&&(a-=this.get("_headerHeight")),this.get("hasFooter")&&(a-=this.get("footerHeight")),a}).property("_tablesContainerHeight","_hasHorizontalScrollbar","_headerHeight","footerHeight","hasHeader","hasFooter"),_tableBlockWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_fixedBlockWidthBinding:"_fixedColumnsWidth",_tableContentHeight:Ember.computed(function(){return this.get("rowHeight")*this.get("bodyContent.length")}).property("rowHeight","bodyContent.length"),_tableContainerWidth:Ember.computed(function(){return this.get("_width")}).property("_width"),_scrollContainerWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_numItemsShowing:Ember.computed(function(){return Math.floor(this.get("_bodyHeight")/this.get("rowHeight"))}).property("_bodyHeight","rowHeight"),_startIndex:Ember.computed(function(){var a,b,c,d,e;return b=this.get("bodyContent.length"),c=this.get("_numItemsShowing"),d=this.get("rowHeight"),e=this.get("_tableScrollTop"),a=Math.floor(e/d),a+c>=b&&(a=b-c),0>a?0:a}).property("bodyContent.length","_numItemsShowing","rowHeight","_tableScrollTop"),_getTotalWidth:function(a,b){var c;return null==b&&(b="columnWidth"),a?(c=a.getEach(b)||[],c.reduce(function(a,b){return a+b},0)):0},click:function(a){var b;return(b=this.getRowForEvent(a))?this.set("selection",b.get("content")):void 0},getRowForEvent:function(a){var b,c;return b=$(a.target).parents(".ember-table-table-row"),c=Ember.View.views[b.attr("id")],c?c.get("row"):void 0}}),Ember.Handlebars.helper("table-component",Ember.Table.EmberTableComponent)}(); \ No newline at end of file diff --git a/package.json b/package.json index 5189229d7..2373ab147 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ember-table", - "version": "0.2.0", + "version": "0.2.1", "private": true, "main": "Gruntfile.js", "scripts": { diff --git a/src/main.coffee b/src/main.coffee index 4cfdee9f2..c9476897b 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -2,7 +2,7 @@ require 'build/src/templates' ## Used for bundling files together using neuter Ember.Table = Ember.Namespace.create() -Ember.Table.VERSION = '0.2.0' +Ember.Table.VERSION = '0.2.1' Ember.libraries?.register 'Ember Table', Ember.Table.VERSION From eb735101e12a32583e1f9ee1a21b1af761806459 Mon Sep 17 00:00:00 2001 From: Alex Zirbel Date: Mon, 30 Jun 2014 16:09:13 -0700 Subject: [PATCH 03/24] Fix changelog bulleting --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4ddb6b6d..3d292ebe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,12 @@ * Hide fixedColumns table when numFixedColumns is 0 * Revert "Fix a few minor UI bugs" (fixes antiscroll issue) -** Fixes #92, where rows are dynamically inserted + * Fixes #92, where rows are dynamically inserted * Fix updateLayout to make antiscroll update its dimensions * Use intersect rather than pointer for sortable * Header cell span css fix * Use row rather than content of row object proxy in table cells -** It's now necessary to use row.get('property') rather than row.property + * It's now necessary to use row.get('property') rather than row.property ### Ember Table 0.2.0 _(May 19, 2014)_ From f978abdbe36fe3b50ad9136d890ddb3c9b36db7a Mon Sep 17 00:00:00 2001 From: Alex Zirbel Date: Fri, 18 Jul 2014 12:33:53 -0700 Subject: [PATCH 04/24] Use more standard ~ for handlebars version --- bower.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 73b56f854..13998f2f5 100644 --- a/bower.json +++ b/bower.json @@ -29,7 +29,7 @@ "antiscroll": "fa3f81d3c07b647a63036da1de859fcaf1355993", "bootstrap": "3.0.0", "ember": "1.4.0", - "handlebars": "1.3.0", + "handlebars": "~1.3.0", "jquery": "1.10.2", "jquery-mousewheel": "3.1.4", "jquery-ui": "1.10.1" @@ -48,4 +48,4 @@ ] } } -} \ No newline at end of file +} From 18e7a1d271b6e228a2829b7083e9098b0ee5a25d Mon Sep 17 00:00:00 2001 From: Alex Zirbel Date: Mon, 21 Jul 2014 15:17:09 -0700 Subject: [PATCH 05/24] Upgrade grunt-bower-task to 0.4.0 This upgrades grunt-bower-task's version of bower, which fixes the problem with the tmp package. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2373ab147..7f61b9b39 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,6 @@ "lockdown": "0.0.5", "grunt-banner": "~0.2.2", "grunt-text-replace": "~0.3.11", - "grunt-bower-task": "~0.3.4" + "grunt-bower-task": "~0.4.0" } -} \ No newline at end of file +} From a9387284a4042ba198ad840d9decec42477e3b9d Mon Sep 17 00:00:00 2001 From: Sreenath Are Date: Tue, 5 Aug 2014 15:51:16 -0700 Subject: [PATCH 06/24] Add multiselect functionality --- app/controllers/financial.coffee | 1 - app/controllers/treetable.coffee | 1 - app/templates/ember_table/documentation.hbs | 5 ++ app/templates/ember_table/financial.hbs | 1 - dist/ember-table.js | 85 +++++++++++++++++++-- dist/ember-table.min.js | 4 +- src/column.coffee | 8 +- src/component.coffee | 76 +++++++++++++++++- 8 files changed, 164 insertions(+), 17 deletions(-) diff --git a/app/controllers/financial.coffee b/app/controllers/financial.coffee index ef87b1d76..e77b735c1 100644 --- a/app/controllers/financial.coffee +++ b/app/controllers/financial.coffee @@ -85,7 +85,6 @@ App.FinancialTableComponent = Ember.Table.EmberTableComponent.extend # custom properties sortAscending: no sortColumn: null - selection: null actions: toggleTableCollapse: (event) -> diff --git a/app/controllers/treetable.coffee b/app/controllers/treetable.coffee index 1e170a951..8827ae019 100644 --- a/app/controllers/treetable.coffee +++ b/app/controllers/treetable.coffee @@ -136,7 +136,6 @@ Ember.Table.EmberTableComponent.extend App.TreeTableExample.TreeDataAdapter, # custom properties sortAscending: no sortColumn: null - selection: null toggleTableCollapse: (event) -> @toggleProperty 'isCollapsed' diff --git a/app/templates/ember_table/documentation.hbs b/app/templates/ember_table/documentation.hbs index ade23cc0a..6261329c3 100644 --- a/app/templates/ember_table/documentation.hbs +++ b/app/templates/ember_table/documentation.hbs @@ -132,6 +132,11 @@ App.MyTableView = EmberTable.TableContainerView.extend (...) false

Allows the user to select a table cell text content.

+ + selectionMode + "single" +

Sets which row selection behavior to follow. Possible values are "none" (clicking on a row does nothing), "single" (clicking on a row selects it and deselects other rows), and "multiple" (multiple rows can be selected through ctrl/cmd-click or shift-click).

+

Ember.Table.ColumnDefinition Options

diff --git a/app/templates/ember_table/financial.hbs b/app/templates/ember_table/financial.hbs index 481eed0c7..926a1c514 100644 --- a/app/templates/ember_table/financial.hbs +++ b/app/templates/ember_table/financial.hbs @@ -163,7 +163,6 @@ App.FinancialTableHeaderTreeCell = Ember.Table.HeaderCell.extend # custom properties sortAscending: no sortColumn: null - selection: null actions: toggleTableCollapse: (event) -> diff --git a/dist/ember-table.js b/dist/ember-table.js index 0662040bf..cdbf9451c 100644 --- a/dist/ember-table.js +++ b/dist/ember-table.js @@ -715,9 +715,12 @@ Ember.Table.Row = Ember.ObjectProxy.extend({ * @instance */ - isSelected: Ember.computed(function() { - return this.get('parentController.selection') === this.get('content'); - }).property('parentController.selection', 'content'), + isSelected: Ember.computed(function(key, val) { + if (arguments.length > 1) { + this.get('parentController').setSelected(this, val); + } + return this.get('parentController').isSelected(this); + }).property('parentController._selection.[]'), /** * Is Showing? * @memberof Ember.Table.Row @@ -1321,7 +1324,30 @@ Ember.Table.EmberTableComponent = Ember.Component.extend(Ember.AddeparMixins.Sty forceFillColumns: false, enableColumnReorder: true, enableContentSelection: false, - selection: null, + persistedSelection: new Ember.Set(), + rangeSelection: new Ember.Set(), + selectionMode: 'single', + _selection: Ember.computed(function() { + return this.get('persistedSelection').copy().addEach(this.get('rangeSelection')); + }).property('persistedSelection.[]', 'rangeSelection.[]'), + selection: Ember.computed(function(key, val) { + var _ref; + if (arguments.length > 1 && val === !void 0) { + if (this.get('selectionMode') === 'single') { + this.get('persistedSelection').clear(); + this.get('persistedSelection').add(val); + } else { + this.get('persistedSelection').clear(); + this.get('persistedSelection').addEach(val); + } + this.get('rangeSelection').clear(); + } + if (this.get('selectionMode') === 'single') { + return (_ref = this.get('_selection')) != null ? _ref[0] : void 0; + } else { + return this.get('_selection').toArray(); + } + }).property('_selection.[]', 'selectionMode'), tableRowViewClass: 'Ember.Table.TableRow', init: function() { this._super(); @@ -1678,13 +1704,60 @@ Ember.Table.EmberTableComponent = Ember.Component.extend(Ember.AddeparMixins.Sty return total + w; }), 0); }, + isSelected: function(row) { + return this.get('_selection').contains(row); + }, + setSelected: function(row, val) { + this.persistSelection(); + if (val) { + return this.get('persistedSelection').add(row); + } else { + return this.get('persistedSelection').remove(row); + } + }, click: function(event) { - var row; + var curIndex, lastIndex, maxIndex, minIndex, row; row = this.getRowForEvent(event); if (!row) { return; } - return this.set('selection', row.get('content')); + if (this.get('selectionMode') === 'none') { + return; + } + if (this.get('selectionMode') === 'single') { + this.get('persistedSelection').clear(); + return this.get('persistedSelection').add(row); + } else { + if (event.shiftKey) { + this.get('rangeSelection').clear(); + lastIndex = this.rowIndex(this.get('lastSelected')); + curIndex = this.rowIndex(this.getRowForEvent(event)); + minIndex = Math.min(lastIndex, curIndex); + maxIndex = Math.max(lastIndex, curIndex); + return this.get('rangeSelection').addObjects(this.get('bodyContent').slice(minIndex, maxIndex + 1)); + } else { + if (!event.ctrlKey && !event.metaKey) { + this.get('persistedSelection').clear(); + this.get('rangeSelection').clear(); + } else { + this.persistSelection(); + } + if (this.get('persistedSelection').contains(row)) { + this.get('persistedSelection').remove(row); + } else { + this.get('persistedSelection').add(row); + } + return this.set('lastSelected', row); + } + } + }, + rowIndex: function(row) { + var _ref; + return (_ref = this.get('bodyContent')) != null ? _ref.indexOf(row) : void 0; + }, + persistSelection: function() { + this.get('persistedSelection').addEach(this.get('rangeSelection')); + return this.get('rangeSelection').clear(); }, getRowForEvent: function(event) { var $rowView, view; diff --git a/dist/ember-table.min.js b/dist/ember-table.min.js index 574be0156..3406c3ae9 100644 --- a/dist/ember-table.min.js +++ b/dist/ember-table.min.js @@ -3,5 +3,5 @@ * Copyright 2012-2014 Addepar Inc. * See LICENSE. */ -!function(){Ember.TEMPLATES["body-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,numItemsShowingBinding:a,scrollTopBinding:a,startIndexBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n
\n
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,numItemsShowingBinding:b,scrollTopBinding:b,startIndexBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n
"),h}),Ember.TEMPLATES["components/ember-table"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.HeaderTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}function g(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.FooterTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var h,i="",j=this.escapeExpression,k=this;return h=c["if"].call(b,"controller.hasHeader",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(1,f,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.BodyTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),h=c["if"].call(b,"controller.hasFooter",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(3,g,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ScrollContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ColumnSortableIndicator",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),i}),Ember.TEMPLATES["footer-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="",h=this.escapeExpression;return e.buffer.push('
\n \n '),f=c._triageMustache.call(b,"view.content.headerCellName",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n \n
"),g}),Ember.TEMPLATES["header-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-left-table-block",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-right-table-block",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{contentBinding:"view.content",itemViewClassField:"headerCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f}),Ember.TEMPLATES["scroll-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.ScrollPanel",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n"),f}),Ember.TEMPLATES["table-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="";return e.buffer.push('\n '),f=c._triageMustache.call(b,"view.cellContent",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n"),g}),Ember.TEMPLATES["table-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{rowBinding:"view.row",contentBinding:"view.columns",itemViewClassField:"tableCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{rowBinding:"STRING",contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{rowBinding:b,contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f})}(),function(){Ember.Table=Ember.Namespace.create(),Ember.Table.VERSION="0.2.1",null!=(_ref=Ember.libraries)&&_ref.register("Ember Table",Ember.Table.VERSION)}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.ResizeHandlerMixin=Ember.Mixin.create({resizeEndDelay:200,resizing:!1,onResizeStart:Ember.K,onResizeEnd:Ember.K,onResize:Ember.K,endResize:Ember.computed(function(){return function(a){return this.isDestroyed?void 0:(this.set("resizing",!1),"function"==typeof this.onResizeEnd?this.onResizeEnd(a):void 0)}}),handleWindowResize:function(a){return this.get("resizing")||(this.set("resizing",!0),"function"==typeof this.onResizeStart&&this.onResizeStart(a)),"function"==typeof this.onResize&&this.onResize(a),Ember.run.debounce(this,this.get("endResize"),a,this.get("resizeEndDelay"))},didInsertElement:function(){return this._super(),this._setupDocumentHandlers()},willDestroyElement:function(){return this._removeDocumentHandlers(),this._super()},_setupDocumentHandlers:function(){return this._resizeHandler?void 0:(this._resizeHandler=jQuery.proxy(this.get("handleWindowResize"),this),jQuery(window).on("resize."+this.elementId,this._resizeHandler))},_removeDocumentHandlers:function(){return jQuery(window).off("resize."+this.elementId,this._resizeHandler),this._resizeHandler=null}})}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.StyleBindingsMixin=Ember.Mixin.create({concatenatedProperties:["styleBindings"],attributeBindings:["style"],unitType:"px",createStyleString:function(a,b){var c;return c=this.get(b),void 0!==c?("number"===Ember.typeOf(c)&&(c+=this.get("unitType")),""+a+":"+c+";"):void 0},applyStyleBindings:function(){var a,b,c,d,e,f=this;return(c=this.styleBindings)?(a={},c.forEach(function(b){var c,d,e;e=b.split(":"),c=e[0],d=e[1],a[d||c]=c}),e=Ember.keys(a),b=e.map(function(b){return a[b]}),d=Ember.computed(function(){var b,c;return c=e.map(function(b){return f.createStyleString(b,a[b])}),b=c.join(""),0!==b.length?b:void 0}),d.property.apply(d,b),Ember.defineProperty(this,"style",d)):void 0},init:function(){return this.applyStyleBindings(),this._super()}})}(),function(){jQuery.browser||!function(){var a,b,c;return b=void 0,a=void 0,jQuery.uaMatch=function(a){var b;return a=a.toLowerCase(),b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],{browser:b[1]||"",version:b[2]||"0"}},b=jQuery.uaMatch(navigator.userAgent),a={},b.browser&&(a[b.browser]=!0,a.version=b.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),c=jQuery.browser=a}()}(),function(){Ember.LazyContainerView=Ember.ContainerView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"lazy-list-container",styleBindings:["height"],content:null,itemViewClass:null,rowHeight:null,scrollTop:null,startIndex:null,init:function(){return this._super(),this.onNumChildViewsDidChange()},height:Ember.computed(function(){return this.get("content.length")*this.get("rowHeight")}).property("content.length","rowHeight"),numChildViews:Ember.computed(function(){return this.get("numItemsShowing")+2}).property("numItemsShowing"),onNumChildViewsDidChange:Ember.observer(function(){var a,b,c,d,e,f,g,h;return e=this,a=Ember.get(this.get("itemViewClass")),b=this.get("numChildViews"),a&&b?(d=this.get("length"),c=b-d,0>c?(g=this.slice(b,d),this.removeObjects(g)):c>0?(f=function(){h=[];for(var a=0;c>=0?c>a:a>c;c>=0?a++:a--)h.push(a);return h}.apply(this).map(function(){return e.createChildView(a)}),this.pushObjects(f)):void 0):void 0},"numChildViews","itemViewClass"),viewportDidChange:Ember.observer(function(){var a,b,c,d;return b=this.get("content")||[],a=b.get("length"),c=Math.min(this.get("length"),a),d=this.get("startIndex"),d+c>=a&&(d=a-c),0>d&&(d=0),this.forEach(function(a,e){var f,g;return e>=c?(a=this.objectAt(e),void a.set("content",null)):(g=d+e,a=this.objectAt(g%c),f=b.objectAt(g),f!==a.get("content")?(a.teardownContent(),a.set("itemIndex",g),a.set("content",f),a.prepareContent()):void 0)},this)},"content.length","length","startIndex")}),Ember.LazyItemView=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{itemIndex:null,prepareContent:Ember.K,teardownContent:Ember.K,rowHeightBinding:"parentView.rowHeight",styleBindings:["width","top","display"],top:Ember.computed(function(){return this.get("itemIndex")*this.get("rowHeight")}).property("itemIndex","rowHeight"),display:Ember.computed(function(){return this.get("content")?void 0:"none"}).property("content")})}(),function(){Ember.MultiItemViewCollectionView=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{styleBindings:"width",itemViewClassField:null,createChildView:function(a,b){var c,d;return d=this.get("itemViewClassField"),c=b.content.get(d),"string"==typeof c&&(c=Ember.get(Ember.lookup,c)),this._super(c,b)}}),Ember.MouseWheelHandlerMixin=Ember.Mixin.create({onMouseWheel:Ember.K,didInsertElement:function(){var a=this;return this._super(),this.$().bind("mousewheel",function(b,c,d,e){return Ember.run(a,a.onMouseWheel,b,c,d,e)})},willDestroyElement:function(){var a;return null!=(a=this.$())&&a.unbind("mousewheel"),this._super()}}),Ember.ScrollHandlerMixin=Ember.Mixin.create({onScroll:Ember.K,scrollElementSelector:"",didInsertElement:function(){var a=this;return this._super(),this.$(this.get("scrollElementSelector")).bind("scroll",function(b){return Ember.run(a,a.onScroll,b)})},willDestroyElement:function(){var a;return null!=(a=this.$(this.get("scrollElementSelector")))&&a.unbind("scroll"),this._super()}}),Ember.TouchMoveHandlerMixin=Ember.Mixin.create({onTouchMove:Ember.K,didInsertElement:function(){var a,b,c=this;return this._super(),a=b=0,this.$().bind("touchstart",function(c){a=c.originalEvent.targetTouches[0].pageX,b=c.originalEvent.targetTouches[0].pageY}),this.$().bind("touchmove",function(d){var e,f,g,h;g=d.originalEvent.targetTouches[0].pageX,h=d.originalEvent.targetTouches[0].pageY,e=-(g-a),f=-(h-b),Ember.run(c,c.onTouchMove,d,e,f),a=g,b=h})},willDestroy:function(){var a;return null!=(a=this.$())&&a.unbind("touchmove"),this._super()}}),Ember.Table.RowArrayController=Ember.ArrayController.extend({itemController:null,content:null,rowContent:Ember.computed(function(){return[]}).property(),controllerAt:function(a,b){var c,d,e;return c=this.get("container"),e=this.get("_subControllers"),(d=e[a])?d:(d=this.get("itemController").create({target:this,parentController:this.get("parentController")||this,content:b}),e[a]=d,d)}}),Ember.Table.ShowHorizontalScrollMixin=Ember.Mixin.create({mouseEnter:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.addClass("antiscroll-scrollbar-shown")},mouseLeave:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.removeClass("antiscroll-scrollbar-shown")}})}(),function(){Ember.Table.ColumnDefinition=Ember.Object.extend({headerCellName:void 0,contentPath:void 0,minWidth:void 0,maxWidth:void 0,defaultColumnWidth:150,columnWidth:Ember.computed.oneWay("defaultColumnWidth"),isResizable:!0,isSortable:!0,textAlign:"text-align-right",canAutoResize:!0,headerCellViewClass:"Ember.Table.HeaderCell",tableCellViewClass:"Ember.Table.TableCell",resize:function(a){return this.set("columnWidth",a)},getCellContent:function(a){var b;return b=this.get("contentPath"),Ember.assert("You must either provide a contentPath or override getCellContent in your column definition",null!=b),Ember.get(a,b)},setCellContent:Ember.K}),Ember.Table.Row=Ember.ObjectProxy.extend({content:null,isSelected:Ember.computed(function(){return this.get("parentController.selection")===this.get("content")}).property("parentController.selection","content"),isShowing:!0,isHovered:!1})}(),function(){Ember.Table.TableContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-container"],styleBindings:["height","width"]}),Ember.Table.TableBlock=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-block"],styleBindings:["width","height"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),columns:null,content:null,scrollLeft:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight")}),Ember.Table.LazyTableBlock=Ember.LazyContainerView.extend({classNames:["ember-table-table-block"],styleBindings:["width"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),rowHeight:Ember.computed.alias("controller.rowHeight"),columns:null,content:null,scrollLeft:null,scrollTop:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.TableRow=Ember.LazyItemView.extend({templateName:"table-row",classNames:"ember-table-table-row",classNameBindings:["row.isHovered:ember-table-hover","row.isSelected:ember-table-selected","row.rowStyle","isLastRow:ember-table-last-row"],styleBindings:["width","height"],row:Ember.computed.alias("content"),columns:Ember.computed.alias("parentView.columns"),width:Ember.computed.alias("controller._rowWidth"),height:Ember.computed.alias("controller.rowHeight"),isLastRow:Ember.computed(function(){return this.get("row")===this.get("controller.bodyContent.lastObject")}).property("controller.bodyContent.lastObject","row"),mouseEnter:function(){var a;return a=this.get("row"),a?a.set("isHovered",!0):void 0},mouseLeave:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0},teardownContent:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0}}),Ember.Table.TableCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"table-cell",classNames:["ember-table-cell"],classNameBindings:"column.textAlign",styleBindings:"width",row:Ember.computed.alias("parentView.row"),column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),init:function(){return this._super(),this.contentPathDidChange(),this.contentDidChange()},contentDidChange:function(){return this.notifyPropertyChange("cellContent")},contentPathWillChange:function(){var a;return a=this.get("column.contentPath"),a?this.removeObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),contentPathDidChange:function(){var a;return a=this.get("column.contentPath"),a?this.addObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),cellContent:Ember.computed(function(a,b){var c,d;return d=this.get("row"),c=this.get("column"),d&&c?(1===arguments.length?b=c.getCellContent(d):c.setCellContent(d,b),b):void 0}).property("row.isLoaded","column")}),Ember.Table.HeaderBlock=Ember.Table.TableBlock.extend({classNames:["ember-table-header-block"],itemViewClass:"Ember.Table.HeaderRow",content:Ember.computed(function(){return[this.get("columns")]}).property("columns")}),Ember.Table.HeaderRow=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-row",classNames:["ember-table-table-row","ember-table-header-row"],styleBindings:["width"],columns:Ember.computed.alias("content"),width:Ember.computed.alias("controller._rowWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),sortableOption:Ember.computed(function(){return{axis:"x",containment:"parent",cursor:"move",helper:"clone",items:".ember-table-header-cell.sortable",opacity:.9,placeholder:"ui-state-highlight",scroll:!0,tolerance:"intersect",update:jQuery.proxy(this.onColumnSortDone,this),stop:jQuery.proxy(this.onColumnSortStop,this),sort:jQuery.proxy(this.onColumnSortChange,this)}}),onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),didInsertElement:function(){return this._super(),this.get("controller.enableColumnReorder")?this.$("> div").sortable(this.get("sortableOption")):void 0},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onColumnSortStop:function(){return this.set("controller._isShowingSortableIndicator",!1)},onColumnSortChange:function(){var a;return a=this.$(".ui-state-highlight").offset().left-this.$().closest(".ember-table-tables-container").offset().left,this.set("controller._isShowingSortableIndicator",!0),this.set("controller._sortableIndicatorLeft",a)},onColumnSortDone:function(a,b){var c,d,e;return d=b.item.index(),e=Ember.View.views[b.item.attr("id")],c=e.get("column"),this.get("controller").onColumnSort(c,d),this.set("controller._isShowingSortableIndicator",!1)}}),Ember.Table.HeaderCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-cell",classNames:["ember-table-cell","ember-table-header-cell"],classNameBindings:["column.isSortable:sortable","column.textAlign"],styleBindings:["width","height"],column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight"),resizableOption:Ember.computed(function(){return{handles:"e",minHeight:40,minWidth:this.get("column.minWidth")||100,maxWidth:this.get("column.maxWidth")||500,grid:this.get("column.snapGrid"),resize:jQuery.proxy(this.onColumnResize,this),stop:jQuery.proxy(this.onColumnResize,this)}}),didInsertElement:function(){this.elementSizeDidChange(),this.get("column.isResizable")&&(this.$().resizable(this.get("resizableOption")),this._resizableWidget=this.$().resizable("widget"))},onColumnResize:function(a,b){return this.elementSizeDidChange(),this.get("controller.forceFillColumns")&&this.get("controller.columns").filterProperty("canAutoResize").length>1&&this.set("column.canAutoResize",!1),this.get("column").resize(b.size.width)},elementSizeDidChange:function(){var a;a=0,$(".ember-table-header-block .ember-table-content").each(function(){var b;return b=$(this).outerHeight(),b>a?a=b:void 0}),this.set("controller._contentHeaderHeight",a)}}),Ember.Table.ColumnSortableIndicator=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"ember-table-column-sortable-indicator",classNameBindings:"controller._isShowingSortableIndicator:active",styleBindings:["left","height"],left:Ember.computed.alias("controller._sortableIndicatorLeft"),height:Ember.computed.alias("controller._height")}),Ember.Table.HeaderTableContainer=Ember.Table.TableContainer.extend(Ember.Table.ShowHorizontalScrollMixin,{templateName:"header-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-header-container"],height:Ember.computed.alias("controller._headerHeight"),width:Ember.computed.alias("controller._tableContainerWidth")}),Ember.Table.BodyTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.ScrollHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"body-container",classNames:["ember-table-table-container","ember-table-body-container","antiscroll-wrap"],height:Ember.computed.alias("controller._bodyHeight"),width:Ember.computed.alias("controller._width"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),scrollElementSelector:".antiscroll-inner",onScroll:function(a){return this.set("scrollTop",a.target.scrollTop),a.preventDefault()},onMouseWheel:function(a,b,c,d){var e;if(Math.abs(c)>Math.abs(d))return e=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",e),a.preventDefault()},onTouchMove:function(a,b,c){var d;if(Math.abs(b)>Math.abs(c))return d=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",d),a.preventDefault()}}),Ember.Table.FooterTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"footer-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-footer-container"],styleBindings:"top",height:Ember.computed.alias("controller.footerHeight"),width:Ember.computed.alias("controller._tableContainerWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),top:Ember.computed(function(){var a,b,c;return c=this.get("controller._headerHeight"),b=this.get("controller._tableContentHeight")+c,a=this.get("controller._bodyHeight")+c,a>b?b:a}).property("controller._bodyHeight","controller._headerHeight","controller._tableContentHeight"),onMouseWheel:function(a,b,c){var d;return d=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",d),a.preventDefault()},onTouchMove:function(a,b){var c;return c=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",c),a.preventDefault()}}),Ember.Table.ScrollContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.ScrollHandlerMixin,{templateName:"scroll-container",classNames:["ember-table-scroll-container"],styleBindings:["left","width","height"],scrollElementSelector:".antiscroll-inner",width:Ember.computed.alias("controller._scrollContainerWidth"),height:10,left:Ember.computed.alias("controller._fixedColumnsWidth"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),didInsertElement:function(){return this._super(),this.onScrollLeftDidChange()},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onScrollLeftDidChange:Ember.observer(function(){var a;return a=this.get("scrollElementSelector"),this.$(a).scrollLeft(this.get("scrollLeft"))},"scrollLeft","scrollElementSelector")}),Ember.Table.ScrollPanel=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-scroll-panel"],styleBindings:["width","height"],width:Ember.computed.alias("controller._tableColumnsWidth"),height:Ember.computed.alias("controller._tableContentHeight")})}(),function(){Ember.Table.EmberTableComponent=Ember.Component.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.AddeparMixins.ResizeHandlerMixin,{layoutName:"components/ember-table",classNames:["ember-table-tables-container"],classNameBindings:["enableContentSelection:ember-table-content-selectable"],styleBindings:["height"],height:Ember.computed.alias("_tablesContainerHeight"),columns:null,numFixedColumns:0,numFooterRow:0,rowHeight:30,minHeaderHeight:30,footerHeight:30,hasHeader:!0,hasFooter:!0,forceFillColumns:!1,enableColumnReorder:!0,enableContentSelection:!1,selection:null,tableRowViewClass:"Ember.Table.TableRow",init:function(){if(this._super(),!$.ui)throw"Missing dependency: jquery-ui";if(!$().mousewheel)throw"Missing dependency: jquery-mousewheel";if(!$().antiscroll)throw"Missing dependency: antiscroll.js"},actions:{addColumn:Ember.K,sortByColumn:Ember.K},onColumnSort:function(a,b){var c;return c=this.get("tableColumns"),c.removeObject(a),c.insertAt(b,a)},bodyContent:Ember.computed(function(){return Ember.Table.RowArrayController.create({target:this,parentController:this,container:this.get("container"),itemController:Ember.Table.Row,content:this.get("content")})}).property("content"),footerContent:Ember.computed(function(a,b){return b?b:Ember.A()}).property(),fixedColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(0,b)||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),tableColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(b,a.get("length"))||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),prepareTableColumns:function(a){return a.setEach("controller",this)},didInsertElement:function(){return this._super(),this.set("_tableScrollTop",0),this.elementSizeDidChange()},onResizeEnd:function(){return Ember.run(this,this.elementSizeDidChange)},elementSizeDidChange:function(){return"inDOM"===this.get("state")?(this.set("_width",this.$().parent().outerWidth()),this.set("_height",this.$().parent().outerHeight()),Ember.run.next(this,this.updateLayout)):void 0},updateLayout:function(){return"inDOM"===this.get("state")?(this.$(".antiscroll-wrap").antiscroll().data("antiscroll").rebuild(),this.get("forceFillColumns")?this.doForceFillColumns():void 0):void 0},doForceFillColumns:function(){var a,b,c,d,e,f,g,h;return h=this.get("_width"),e=this.get("_fixedColumnsWidth"),g=this.get("tableColumns"),d=this._getTotalWidth(g),b=h-e,f=b-d,c=g.filterProperty("canAutoResize"),a=Math.floor(f/c.length),c.forEach(function(b){var c;return c=b.get("columnWidth")+a,b.set("columnWidth",c)})},onBodyContentLengthDidChange:Ember.observer(function(){return Ember.run.next(this,function(){return Ember.run.once(this,this.updateLayout)})},"bodyContent.length"),_tableScrollTop:0,_tableScrollLeft:0,_width:null,_height:null,_contentHeaderHeight:null,_hasVerticalScrollbar:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),a>b?!0:!1}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_hasHorizontalScrollbar:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_width")-this.get("_fixedColumnsWidth"),a>b?!0:!1}).property("_tableColumnsWidth","_width","_fixedColumnsWidth"),_tablesContainerHeight:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),b>a?a:b}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_fixedColumnsWidth:Ember.computed(function(){return this._getTotalWidth(this.get("fixedColumns"))}).property("fixedColumns.@each.columnWidth"),_tableColumnsWidth:Ember.computed(function(){var a,b; -return b=this._getTotalWidth(this.get("tableColumns"))+3,a=this.get("_width")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("tableColumns.@each.columnWidth","_width","_fixedColumnsWidth"),_rowWidth:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_tableContainerWidth")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("_fixedColumnsWidth","_tableColumnsWidth","_tableContainerWidth"),_headerHeight:Ember.computed(function(){var a,b;return b=this.get("minHeaderHeight"),a=this.get("_contentHeaderHeight"),b>a?b:a}).property("_contentHeaderHeight","minHeaderHeight"),_footerHeight:Ember.computed(function(){return this.get("hasFooter")?this.get("footerHeight"):0}).property("footerHeight","hasFooter"),_bodyHeight:Ember.computed(function(){var a;return a=this.get("_tablesContainerHeight"),this.get("hasHeader")&&(a-=this.get("_headerHeight")),this.get("hasFooter")&&(a-=this.get("footerHeight")),a}).property("_tablesContainerHeight","_hasHorizontalScrollbar","_headerHeight","footerHeight","hasHeader","hasFooter"),_tableBlockWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_fixedBlockWidthBinding:"_fixedColumnsWidth",_tableContentHeight:Ember.computed(function(){return this.get("rowHeight")*this.get("bodyContent.length")}).property("rowHeight","bodyContent.length"),_tableContainerWidth:Ember.computed(function(){return this.get("_width")}).property("_width"),_scrollContainerWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_numItemsShowing:Ember.computed(function(){return Math.floor(this.get("_bodyHeight")/this.get("rowHeight"))}).property("_bodyHeight","rowHeight"),_startIndex:Ember.computed(function(){var a,b,c,d,e;return b=this.get("bodyContent.length"),c=this.get("_numItemsShowing"),d=this.get("rowHeight"),e=this.get("_tableScrollTop"),a=Math.floor(e/d),a+c>=b&&(a=b-c),0>a?0:a}).property("bodyContent.length","_numItemsShowing","rowHeight","_tableScrollTop"),_getTotalWidth:function(a,b){var c;return null==b&&(b="columnWidth"),a?(c=a.getEach(b)||[],c.reduce(function(a,b){return a+b},0)):0},click:function(a){var b;return(b=this.getRowForEvent(a))?this.set("selection",b.get("content")):void 0},getRowForEvent:function(a){var b,c;return b=$(a.target).parents(".ember-table-table-row"),c=Ember.View.views[b.attr("id")],c?c.get("row"):void 0}}),Ember.Handlebars.helper("table-component",Ember.Table.EmberTableComponent)}(); \ No newline at end of file +!function(){Ember.TEMPLATES["body-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,numItemsShowingBinding:a,scrollTopBinding:a,startIndexBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n
\n
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,numItemsShowingBinding:b,scrollTopBinding:b,startIndexBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n
"),h}),Ember.TEMPLATES["components/ember-table"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.HeaderTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}function g(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.FooterTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var h,i="",j=this.escapeExpression,k=this;return h=c["if"].call(b,"controller.hasHeader",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(1,f,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.BodyTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),h=c["if"].call(b,"controller.hasFooter",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(3,g,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ScrollContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ColumnSortableIndicator",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),i}),Ember.TEMPLATES["footer-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="",h=this.escapeExpression;return e.buffer.push('
\n \n '),f=c._triageMustache.call(b,"view.content.headerCellName",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n \n
"),g}),Ember.TEMPLATES["header-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-left-table-block",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-right-table-block",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{contentBinding:"view.content",itemViewClassField:"headerCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f}),Ember.TEMPLATES["scroll-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.ScrollPanel",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n"),f}),Ember.TEMPLATES["table-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="";return e.buffer.push('\n '),f=c._triageMustache.call(b,"view.cellContent",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n"),g}),Ember.TEMPLATES["table-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{rowBinding:"view.row",contentBinding:"view.columns",itemViewClassField:"tableCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{rowBinding:"STRING",contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{rowBinding:b,contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f})}(),function(){Ember.Table=Ember.Namespace.create(),Ember.Table.VERSION="0.2.1",null!=(_ref=Ember.libraries)&&_ref.register("Ember Table",Ember.Table.VERSION)}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.ResizeHandlerMixin=Ember.Mixin.create({resizeEndDelay:200,resizing:!1,onResizeStart:Ember.K,onResizeEnd:Ember.K,onResize:Ember.K,endResize:Ember.computed(function(){return function(a){return this.isDestroyed?void 0:(this.set("resizing",!1),"function"==typeof this.onResizeEnd?this.onResizeEnd(a):void 0)}}),handleWindowResize:function(a){return this.get("resizing")||(this.set("resizing",!0),"function"==typeof this.onResizeStart&&this.onResizeStart(a)),"function"==typeof this.onResize&&this.onResize(a),Ember.run.debounce(this,this.get("endResize"),a,this.get("resizeEndDelay"))},didInsertElement:function(){return this._super(),this._setupDocumentHandlers()},willDestroyElement:function(){return this._removeDocumentHandlers(),this._super()},_setupDocumentHandlers:function(){return this._resizeHandler?void 0:(this._resizeHandler=jQuery.proxy(this.get("handleWindowResize"),this),jQuery(window).on("resize."+this.elementId,this._resizeHandler))},_removeDocumentHandlers:function(){return jQuery(window).off("resize."+this.elementId,this._resizeHandler),this._resizeHandler=null}})}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.StyleBindingsMixin=Ember.Mixin.create({concatenatedProperties:["styleBindings"],attributeBindings:["style"],unitType:"px",createStyleString:function(a,b){var c;return c=this.get(b),void 0!==c?("number"===Ember.typeOf(c)&&(c+=this.get("unitType")),""+a+":"+c+";"):void 0},applyStyleBindings:function(){var a,b,c,d,e,f=this;return(c=this.styleBindings)?(a={},c.forEach(function(b){var c,d,e;e=b.split(":"),c=e[0],d=e[1],a[d||c]=c}),e=Ember.keys(a),b=e.map(function(b){return a[b]}),d=Ember.computed(function(){var b,c;return c=e.map(function(b){return f.createStyleString(b,a[b])}),b=c.join(""),0!==b.length?b:void 0}),d.property.apply(d,b),Ember.defineProperty(this,"style",d)):void 0},init:function(){return this.applyStyleBindings(),this._super()}})}(),function(){jQuery.browser||!function(){var a,b,c;return b=void 0,a=void 0,jQuery.uaMatch=function(a){var b;return a=a.toLowerCase(),b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],{browser:b[1]||"",version:b[2]||"0"}},b=jQuery.uaMatch(navigator.userAgent),a={},b.browser&&(a[b.browser]=!0,a.version=b.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),c=jQuery.browser=a}()}(),function(){Ember.LazyContainerView=Ember.ContainerView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"lazy-list-container",styleBindings:["height"],content:null,itemViewClass:null,rowHeight:null,scrollTop:null,startIndex:null,init:function(){return this._super(),this.onNumChildViewsDidChange()},height:Ember.computed(function(){return this.get("content.length")*this.get("rowHeight")}).property("content.length","rowHeight"),numChildViews:Ember.computed(function(){return this.get("numItemsShowing")+2}).property("numItemsShowing"),onNumChildViewsDidChange:Ember.observer(function(){var a,b,c,d,e,f,g,h;return e=this,a=Ember.get(this.get("itemViewClass")),b=this.get("numChildViews"),a&&b?(d=this.get("length"),c=b-d,0>c?(g=this.slice(b,d),this.removeObjects(g)):c>0?(f=function(){h=[];for(var a=0;c>=0?c>a:a>c;c>=0?a++:a--)h.push(a);return h}.apply(this).map(function(){return e.createChildView(a)}),this.pushObjects(f)):void 0):void 0},"numChildViews","itemViewClass"),viewportDidChange:Ember.observer(function(){var a,b,c,d;return b=this.get("content")||[],a=b.get("length"),c=Math.min(this.get("length"),a),d=this.get("startIndex"),d+c>=a&&(d=a-c),0>d&&(d=0),this.forEach(function(a,e){var f,g;return e>=c?(a=this.objectAt(e),void a.set("content",null)):(g=d+e,a=this.objectAt(g%c),f=b.objectAt(g),f!==a.get("content")?(a.teardownContent(),a.set("itemIndex",g),a.set("content",f),a.prepareContent()):void 0)},this)},"content.length","length","startIndex")}),Ember.LazyItemView=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{itemIndex:null,prepareContent:Ember.K,teardownContent:Ember.K,rowHeightBinding:"parentView.rowHeight",styleBindings:["width","top","display"],top:Ember.computed(function(){return this.get("itemIndex")*this.get("rowHeight")}).property("itemIndex","rowHeight"),display:Ember.computed(function(){return this.get("content")?void 0:"none"}).property("content")})}(),function(){Ember.MultiItemViewCollectionView=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{styleBindings:"width",itemViewClassField:null,createChildView:function(a,b){var c,d;return d=this.get("itemViewClassField"),c=b.content.get(d),"string"==typeof c&&(c=Ember.get(Ember.lookup,c)),this._super(c,b)}}),Ember.MouseWheelHandlerMixin=Ember.Mixin.create({onMouseWheel:Ember.K,didInsertElement:function(){var a=this;return this._super(),this.$().bind("mousewheel",function(b,c,d,e){return Ember.run(a,a.onMouseWheel,b,c,d,e)})},willDestroyElement:function(){var a;return null!=(a=this.$())&&a.unbind("mousewheel"),this._super()}}),Ember.ScrollHandlerMixin=Ember.Mixin.create({onScroll:Ember.K,scrollElementSelector:"",didInsertElement:function(){var a=this;return this._super(),this.$(this.get("scrollElementSelector")).bind("scroll",function(b){return Ember.run(a,a.onScroll,b)})},willDestroyElement:function(){var a;return null!=(a=this.$(this.get("scrollElementSelector")))&&a.unbind("scroll"),this._super()}}),Ember.TouchMoveHandlerMixin=Ember.Mixin.create({onTouchMove:Ember.K,didInsertElement:function(){var a,b,c=this;return this._super(),a=b=0,this.$().bind("touchstart",function(c){a=c.originalEvent.targetTouches[0].pageX,b=c.originalEvent.targetTouches[0].pageY}),this.$().bind("touchmove",function(d){var e,f,g,h;g=d.originalEvent.targetTouches[0].pageX,h=d.originalEvent.targetTouches[0].pageY,e=-(g-a),f=-(h-b),Ember.run(c,c.onTouchMove,d,e,f),a=g,b=h})},willDestroy:function(){var a;return null!=(a=this.$())&&a.unbind("touchmove"),this._super()}}),Ember.Table.RowArrayController=Ember.ArrayController.extend({itemController:null,content:null,rowContent:Ember.computed(function(){return[]}).property(),controllerAt:function(a,b){var c,d,e;return c=this.get("container"),e=this.get("_subControllers"),(d=e[a])?d:(d=this.get("itemController").create({target:this,parentController:this.get("parentController")||this,content:b}),e[a]=d,d)}}),Ember.Table.ShowHorizontalScrollMixin=Ember.Mixin.create({mouseEnter:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.addClass("antiscroll-scrollbar-shown")},mouseLeave:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.removeClass("antiscroll-scrollbar-shown")}})}(),function(){Ember.Table.ColumnDefinition=Ember.Object.extend({headerCellName:void 0,contentPath:void 0,minWidth:void 0,maxWidth:void 0,defaultColumnWidth:150,columnWidth:Ember.computed.oneWay("defaultColumnWidth"),isResizable:!0,isSortable:!0,textAlign:"text-align-right",canAutoResize:!0,headerCellViewClass:"Ember.Table.HeaderCell",tableCellViewClass:"Ember.Table.TableCell",resize:function(a){return this.set("columnWidth",a)},getCellContent:function(a){var b;return b=this.get("contentPath"),Ember.assert("You must either provide a contentPath or override getCellContent in your column definition",null!=b),Ember.get(a,b)},setCellContent:Ember.K}),Ember.Table.Row=Ember.ObjectProxy.extend({content:null,isSelected:Ember.computed(function(a,b){return arguments.length>1&&this.get("parentController").setSelected(this,b),this.get("parentController").isSelected(this)}).property("parentController._selection.[]"),isShowing:!0,isHovered:!1})}(),function(){Ember.Table.TableContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-container"],styleBindings:["height","width"]}),Ember.Table.TableBlock=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-block"],styleBindings:["width","height"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),columns:null,content:null,scrollLeft:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight")}),Ember.Table.LazyTableBlock=Ember.LazyContainerView.extend({classNames:["ember-table-table-block"],styleBindings:["width"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),rowHeight:Ember.computed.alias("controller.rowHeight"),columns:null,content:null,scrollLeft:null,scrollTop:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.TableRow=Ember.LazyItemView.extend({templateName:"table-row",classNames:"ember-table-table-row",classNameBindings:["row.isHovered:ember-table-hover","row.isSelected:ember-table-selected","row.rowStyle","isLastRow:ember-table-last-row"],styleBindings:["width","height"],row:Ember.computed.alias("content"),columns:Ember.computed.alias("parentView.columns"),width:Ember.computed.alias("controller._rowWidth"),height:Ember.computed.alias("controller.rowHeight"),isLastRow:Ember.computed(function(){return this.get("row")===this.get("controller.bodyContent.lastObject")}).property("controller.bodyContent.lastObject","row"),mouseEnter:function(){var a;return a=this.get("row"),a?a.set("isHovered",!0):void 0},mouseLeave:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0},teardownContent:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0}}),Ember.Table.TableCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"table-cell",classNames:["ember-table-cell"],classNameBindings:"column.textAlign",styleBindings:"width",row:Ember.computed.alias("parentView.row"),column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),init:function(){return this._super(),this.contentPathDidChange(),this.contentDidChange()},contentDidChange:function(){return this.notifyPropertyChange("cellContent")},contentPathWillChange:function(){var a;return a=this.get("column.contentPath"),a?this.removeObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),contentPathDidChange:function(){var a;return a=this.get("column.contentPath"),a?this.addObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),cellContent:Ember.computed(function(a,b){var c,d;return d=this.get("row"),c=this.get("column"),d&&c?(1===arguments.length?b=c.getCellContent(d):c.setCellContent(d,b),b):void 0}).property("row.isLoaded","column")}),Ember.Table.HeaderBlock=Ember.Table.TableBlock.extend({classNames:["ember-table-header-block"],itemViewClass:"Ember.Table.HeaderRow",content:Ember.computed(function(){return[this.get("columns")]}).property("columns")}),Ember.Table.HeaderRow=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-row",classNames:["ember-table-table-row","ember-table-header-row"],styleBindings:["width"],columns:Ember.computed.alias("content"),width:Ember.computed.alias("controller._rowWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),sortableOption:Ember.computed(function(){return{axis:"x",containment:"parent",cursor:"move",helper:"clone",items:".ember-table-header-cell.sortable",opacity:.9,placeholder:"ui-state-highlight",scroll:!0,tolerance:"intersect",update:jQuery.proxy(this.onColumnSortDone,this),stop:jQuery.proxy(this.onColumnSortStop,this),sort:jQuery.proxy(this.onColumnSortChange,this)}}),onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),didInsertElement:function(){return this._super(),this.get("controller.enableColumnReorder")?this.$("> div").sortable(this.get("sortableOption")):void 0},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onColumnSortStop:function(){return this.set("controller._isShowingSortableIndicator",!1)},onColumnSortChange:function(){var a;return a=this.$(".ui-state-highlight").offset().left-this.$().closest(".ember-table-tables-container").offset().left,this.set("controller._isShowingSortableIndicator",!0),this.set("controller._sortableIndicatorLeft",a)},onColumnSortDone:function(a,b){var c,d,e;return d=b.item.index(),e=Ember.View.views[b.item.attr("id")],c=e.get("column"),this.get("controller").onColumnSort(c,d),this.set("controller._isShowingSortableIndicator",!1)}}),Ember.Table.HeaderCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-cell",classNames:["ember-table-cell","ember-table-header-cell"],classNameBindings:["column.isSortable:sortable","column.textAlign"],styleBindings:["width","height"],column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight"),resizableOption:Ember.computed(function(){return{handles:"e",minHeight:40,minWidth:this.get("column.minWidth")||100,maxWidth:this.get("column.maxWidth")||500,grid:this.get("column.snapGrid"),resize:jQuery.proxy(this.onColumnResize,this),stop:jQuery.proxy(this.onColumnResize,this)}}),didInsertElement:function(){this.elementSizeDidChange(),this.get("column.isResizable")&&(this.$().resizable(this.get("resizableOption")),this._resizableWidget=this.$().resizable("widget"))},onColumnResize:function(a,b){return this.elementSizeDidChange(),this.get("controller.forceFillColumns")&&this.get("controller.columns").filterProperty("canAutoResize").length>1&&this.set("column.canAutoResize",!1),this.get("column").resize(b.size.width)},elementSizeDidChange:function(){var a;a=0,$(".ember-table-header-block .ember-table-content").each(function(){var b;return b=$(this).outerHeight(),b>a?a=b:void 0}),this.set("controller._contentHeaderHeight",a)}}),Ember.Table.ColumnSortableIndicator=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"ember-table-column-sortable-indicator",classNameBindings:"controller._isShowingSortableIndicator:active",styleBindings:["left","height"],left:Ember.computed.alias("controller._sortableIndicatorLeft"),height:Ember.computed.alias("controller._height")}),Ember.Table.HeaderTableContainer=Ember.Table.TableContainer.extend(Ember.Table.ShowHorizontalScrollMixin,{templateName:"header-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-header-container"],height:Ember.computed.alias("controller._headerHeight"),width:Ember.computed.alias("controller._tableContainerWidth")}),Ember.Table.BodyTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.ScrollHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"body-container",classNames:["ember-table-table-container","ember-table-body-container","antiscroll-wrap"],height:Ember.computed.alias("controller._bodyHeight"),width:Ember.computed.alias("controller._width"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),scrollElementSelector:".antiscroll-inner",onScroll:function(a){return this.set("scrollTop",a.target.scrollTop),a.preventDefault()},onMouseWheel:function(a,b,c,d){var e;if(Math.abs(c)>Math.abs(d))return e=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",e),a.preventDefault()},onTouchMove:function(a,b,c){var d;if(Math.abs(b)>Math.abs(c))return d=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",d),a.preventDefault()}}),Ember.Table.FooterTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"footer-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-footer-container"],styleBindings:"top",height:Ember.computed.alias("controller.footerHeight"),width:Ember.computed.alias("controller._tableContainerWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),top:Ember.computed(function(){var a,b,c;return c=this.get("controller._headerHeight"),b=this.get("controller._tableContentHeight")+c,a=this.get("controller._bodyHeight")+c,a>b?b:a}).property("controller._bodyHeight","controller._headerHeight","controller._tableContentHeight"),onMouseWheel:function(a,b,c){var d;return d=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",d),a.preventDefault()},onTouchMove:function(a,b){var c;return c=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",c),a.preventDefault()}}),Ember.Table.ScrollContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.ScrollHandlerMixin,{templateName:"scroll-container",classNames:["ember-table-scroll-container"],styleBindings:["left","width","height"],scrollElementSelector:".antiscroll-inner",width:Ember.computed.alias("controller._scrollContainerWidth"),height:10,left:Ember.computed.alias("controller._fixedColumnsWidth"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),didInsertElement:function(){return this._super(),this.onScrollLeftDidChange()},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onScrollLeftDidChange:Ember.observer(function(){var a;return a=this.get("scrollElementSelector"),this.$(a).scrollLeft(this.get("scrollLeft"))},"scrollLeft","scrollElementSelector")}),Ember.Table.ScrollPanel=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-scroll-panel"],styleBindings:["width","height"],width:Ember.computed.alias("controller._tableColumnsWidth"),height:Ember.computed.alias("controller._tableContentHeight")})}(),function(){Ember.Table.EmberTableComponent=Ember.Component.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.AddeparMixins.ResizeHandlerMixin,{layoutName:"components/ember-table",classNames:["ember-table-tables-container"],classNameBindings:["enableContentSelection:ember-table-content-selectable"],styleBindings:["height"],height:Ember.computed.alias("_tablesContainerHeight"),columns:null,numFixedColumns:0,numFooterRow:0,rowHeight:30,minHeaderHeight:30,footerHeight:30,hasHeader:!0,hasFooter:!0,forceFillColumns:!1,enableColumnReorder:!0,enableContentSelection:!1,persistedSelection:new Ember.Set,rangeSelection:new Ember.Set,selectionMode:"single",_selection:Ember.computed(function(){return this.get("persistedSelection").copy().addEach(this.get("rangeSelection"))}).property("persistedSelection.[]","rangeSelection.[]"),selection:Ember.computed(function(a,b){var c;return arguments.length>1&&b===!0&&("single"===this.get("selectionMode")?(this.get("persistedSelection").clear(),this.get("persistedSelection").add(b)):(this.get("persistedSelection").clear(),this.get("persistedSelection").addEach(b)),this.get("rangeSelection").clear()),"single"===this.get("selectionMode")?null!=(c=this.get("_selection"))?c[0]:void 0:this.get("_selection").toArray()}).property("_selection.[]","selectionMode"),tableRowViewClass:"Ember.Table.TableRow",init:function(){if(this._super(),!$.ui)throw"Missing dependency: jquery-ui";if(!$().mousewheel)throw"Missing dependency: jquery-mousewheel";if(!$().antiscroll)throw"Missing dependency: antiscroll.js"},actions:{addColumn:Ember.K,sortByColumn:Ember.K},onColumnSort:function(a,b){var c;return c=this.get("tableColumns"),c.removeObject(a),c.insertAt(b,a)},bodyContent:Ember.computed(function(){return Ember.Table.RowArrayController.create({target:this,parentController:this,container:this.get("container"),itemController:Ember.Table.Row,content:this.get("content")})}).property("content"),footerContent:Ember.computed(function(a,b){return b?b:Ember.A()}).property(),fixedColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(0,b)||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),tableColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(b,a.get("length"))||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),prepareTableColumns:function(a){return a.setEach("controller",this)},didInsertElement:function(){return this._super(),this.set("_tableScrollTop",0),this.elementSizeDidChange()},onResizeEnd:function(){return Ember.run(this,this.elementSizeDidChange)},elementSizeDidChange:function(){return"inDOM"===this.get("state")?(this.set("_width",this.$().parent().outerWidth()),this.set("_height",this.$().parent().outerHeight()),Ember.run.next(this,this.updateLayout)):void 0},updateLayout:function(){return"inDOM"===this.get("state")?(this.$(".antiscroll-wrap").antiscroll().data("antiscroll").rebuild(),this.get("forceFillColumns")?this.doForceFillColumns():void 0):void 0},doForceFillColumns:function(){var a,b,c,d,e,f,g,h;return h=this.get("_width"),e=this.get("_fixedColumnsWidth"),g=this.get("tableColumns"),d=this._getTotalWidth(g),b=h-e,f=b-d,c=g.filterProperty("canAutoResize"),a=Math.floor(f/c.length),c.forEach(function(b){var c;return c=b.get("columnWidth")+a,b.set("columnWidth",c)})},onBodyContentLengthDidChange:Ember.observer(function(){return Ember.run.next(this,function(){return Ember.run.once(this,this.updateLayout)})},"bodyContent.length"),_tableScrollTop:0,_tableScrollLeft:0,_width:null,_height:null,_contentHeaderHeight:null,_hasVerticalScrollbar:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),a>b?!0:!1 +}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_hasHorizontalScrollbar:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_width")-this.get("_fixedColumnsWidth"),a>b?!0:!1}).property("_tableColumnsWidth","_width","_fixedColumnsWidth"),_tablesContainerHeight:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),b>a?a:b}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_fixedColumnsWidth:Ember.computed(function(){return this._getTotalWidth(this.get("fixedColumns"))}).property("fixedColumns.@each.columnWidth"),_tableColumnsWidth:Ember.computed(function(){var a,b;return b=this._getTotalWidth(this.get("tableColumns"))+3,a=this.get("_width")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("tableColumns.@each.columnWidth","_width","_fixedColumnsWidth"),_rowWidth:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_tableContainerWidth")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("_fixedColumnsWidth","_tableColumnsWidth","_tableContainerWidth"),_headerHeight:Ember.computed(function(){var a,b;return b=this.get("minHeaderHeight"),a=this.get("_contentHeaderHeight"),b>a?b:a}).property("_contentHeaderHeight","minHeaderHeight"),_footerHeight:Ember.computed(function(){return this.get("hasFooter")?this.get("footerHeight"):0}).property("footerHeight","hasFooter"),_bodyHeight:Ember.computed(function(){var a;return a=this.get("_tablesContainerHeight"),this.get("hasHeader")&&(a-=this.get("_headerHeight")),this.get("hasFooter")&&(a-=this.get("footerHeight")),a}).property("_tablesContainerHeight","_hasHorizontalScrollbar","_headerHeight","footerHeight","hasHeader","hasFooter"),_tableBlockWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_fixedBlockWidthBinding:"_fixedColumnsWidth",_tableContentHeight:Ember.computed(function(){return this.get("rowHeight")*this.get("bodyContent.length")}).property("rowHeight","bodyContent.length"),_tableContainerWidth:Ember.computed(function(){return this.get("_width")}).property("_width"),_scrollContainerWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_numItemsShowing:Ember.computed(function(){return Math.floor(this.get("_bodyHeight")/this.get("rowHeight"))}).property("_bodyHeight","rowHeight"),_startIndex:Ember.computed(function(){var a,b,c,d,e;return b=this.get("bodyContent.length"),c=this.get("_numItemsShowing"),d=this.get("rowHeight"),e=this.get("_tableScrollTop"),a=Math.floor(e/d),a+c>=b&&(a=b-c),0>a?0:a}).property("bodyContent.length","_numItemsShowing","rowHeight","_tableScrollTop"),_getTotalWidth:function(a,b){var c;return null==b&&(b="columnWidth"),a?(c=a.getEach(b)||[],c.reduce(function(a,b){return a+b},0)):0},isSelected:function(a){return this.get("_selection").contains(a)},setSelected:function(a,b){return this.persistSelection(),b?this.get("persistedSelection").add(a):this.get("persistedSelection").remove(a)},click:function(a){var b,c,d,e,f;return f=this.getRowForEvent(a),f&&"none"!==this.get("selectionMode")?"single"===this.get("selectionMode")?(this.get("persistedSelection").clear(),this.get("persistedSelection").add(f)):a.shiftKey?(this.get("rangeSelection").clear(),c=this.rowIndex(this.get("lastSelected")),b=this.rowIndex(this.getRowForEvent(a)),e=Math.min(c,b),d=Math.max(c,b),this.get("rangeSelection").addObjects(this.get("bodyContent").slice(e,d+1))):(a.ctrlKey||a.metaKey?this.persistSelection():(this.get("persistedSelection").clear(),this.get("rangeSelection").clear()),this.get("persistedSelection").contains(f)?this.get("persistedSelection").remove(f):this.get("persistedSelection").add(f),this.set("lastSelected",f)):void 0},rowIndex:function(a){var b;return null!=(b=this.get("bodyContent"))?b.indexOf(a):void 0},persistSelection:function(){return this.get("persistedSelection").addEach(this.get("rangeSelection")),this.get("rangeSelection").clear()},getRowForEvent:function(a){var b,c;return b=$(a.target).parents(".ember-table-table-row"),c=Ember.View.views[b.attr("id")],c?c.get("row"):void 0}}),Ember.Handlebars.helper("table-component",Ember.Table.EmberTableComponent)}(); \ No newline at end of file diff --git a/src/column.coffee b/src/column.coffee index a5fc1381d..e8d8a67e9 100644 --- a/src/column.coffee +++ b/src/column.coffee @@ -73,9 +73,11 @@ Ember.Table.Row = Ember.ObjectProxy.extend * @member {Boolean} isSelected * @instance ### - isSelected: Ember.computed -> - @get('parentController.selection') is @get('content') - .property 'parentController.selection', 'content' + isSelected: Ember.computed (key, val) -> + if arguments.length > 1 + @get('parentController').setSelected this, val + @get('parentController').isSelected this + .property 'parentController._selection.[]' ###* * Is Showing? diff --git a/src/component.coffee b/src/component.coffee index e273e3b3f..edf24fdd8 100644 --- a/src/component.coffee +++ b/src/component.coffee @@ -39,13 +39,39 @@ Ember.AddeparMixins.ResizeHandlerMixin, enableContentSelection: no - selection: null + # rows that were selected directly or as part of a previous + # range selection (shift-click) + persistedSelection: new Ember.Set() + + # rows that are part of the currently editable range selection + rangeSelection: new Ember.Set() + + selectionMode: 'single' + + _selection: Ember.computed -> + @get('persistedSelection').copy().addEach(@get('rangeSelection')) + .property 'persistedSelection.[]', 'rangeSelection.[]' + + selection: Ember.computed (key, val) -> + if arguments.length > 1 and val is not undefined + if @get('selectionMode') is 'single' + @get('persistedSelection').clear() + @get('persistedSelection').add(val) + else + @get('persistedSelection').clear() + @get('persistedSelection').addEach(val) + @get('rangeSelection').clear() + if @get('selectionMode') is 'single' + return @get('_selection')?[0] + else + return @get('_selection').toArray() + .property '_selection.[]', 'selectionMode' # specify the view class to use for rendering the table rows tableRowViewClass: 'Ember.Table.TableRow' init: -> - this._super() + @_super() if !$.ui then throw 'Missing dependency: jquery-ui' if !$().mousewheel then throw 'Missing dependency: jquery-mousewheel' if !$().antiscroll then throw 'Missing dependency: antiscroll.js' @@ -353,10 +379,54 @@ Ember.AddeparMixins.ResizeHandlerMixin, ############################################################################## # selection ############################################################################## + + isSelected: (row) -> + @get('_selection').contains row + + setSelected: (row, val) -> + @persistSelection() + if val + @get('persistedSelection').add(row) + else + @get('persistedSelection').remove(row) + click: (event) -> row = @getRowForEvent event return unless row - @set 'selection', row.get('content') + return if @get('selectionMode') is 'none' + if @get('selectionMode') is 'single' + @get('persistedSelection').clear() + @get('persistedSelection').add row + else + if event.shiftKey + @get('rangeSelection').clear() + + lastIndex = @rowIndex(@get('lastSelected')) + curIndex = @rowIndex(@getRowForEvent(event)) + + minIndex = Math.min(lastIndex, curIndex) + maxIndex = Math.max(lastIndex, curIndex) + + @get('rangeSelection').addObjects \ + @get('bodyContent').slice(minIndex, maxIndex + 1) + else + if !event.ctrlKey && !event.metaKey + @get('persistedSelection').clear() + @get('rangeSelection').clear() + else + @persistSelection() + if @get('persistedSelection').contains row + @get('persistedSelection').remove row + else + @get('persistedSelection').add row + @set('lastSelected', row) + + rowIndex: (row) -> + @get('bodyContent')?.indexOf(row) + + persistSelection: () -> + @get('persistedSelection').addEach(@get('rangeSelection')) + @get('rangeSelection').clear() getRowForEvent: (event) -> $rowView = $(event.target).parents('.ember-table-table-row') From 6bf49337707c75d00524446dd8088e1ca4c6ad30 Mon Sep 17 00:00:00 2001 From: Sreenath Are Date: Thu, 7 Aug 2014 14:34:49 -0700 Subject: [PATCH 07/24] Fix multiselect bugs Make selection contain the contents of rows, rather than the row objects themselves, and make a new Ember.Set for each EmberTableComponent Closes #192 --- src/component.coffee | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/component.coffee b/src/component.coffee index edf24fdd8..7bd2d6ec5 100644 --- a/src/component.coffee +++ b/src/component.coffee @@ -41,10 +41,10 @@ Ember.AddeparMixins.ResizeHandlerMixin, # rows that were selected directly or as part of a previous # range selection (shift-click) - persistedSelection: new Ember.Set() + persistedSelection: Ember.computed -> new Ember.Set() # rows that are part of the currently editable range selection - rangeSelection: new Ember.Set() + rangeSelection: Ember.computed -> new Ember.Set() selectionMode: 'single' @@ -381,14 +381,14 @@ Ember.AddeparMixins.ResizeHandlerMixin, ############################################################################## isSelected: (row) -> - @get('_selection').contains row + @get('_selection').contains row.get('content') setSelected: (row, val) -> @persistSelection() if val - @get('persistedSelection').add(row) + @get('persistedSelection').add row.get('content') else - @get('persistedSelection').remove(row) + @get('persistedSelection').remove row.get('content') click: (event) -> row = @getRowForEvent event @@ -396,7 +396,7 @@ Ember.AddeparMixins.ResizeHandlerMixin, return if @get('selectionMode') is 'none' if @get('selectionMode') is 'single' @get('persistedSelection').clear() - @get('persistedSelection').add row + @get('persistedSelection').add row.get('content') else if event.shiftKey @get('rangeSelection').clear() @@ -407,18 +407,19 @@ Ember.AddeparMixins.ResizeHandlerMixin, minIndex = Math.min(lastIndex, curIndex) maxIndex = Math.max(lastIndex, curIndex) - @get('rangeSelection').addObjects \ - @get('bodyContent').slice(minIndex, maxIndex + 1) + @get('rangeSelection').addObjects _.map \ + @get('bodyContent').slice(minIndex, maxIndex + 1), + (row) -> row.get('content') else if !event.ctrlKey && !event.metaKey @get('persistedSelection').clear() @get('rangeSelection').clear() else @persistSelection() - if @get('persistedSelection').contains row - @get('persistedSelection').remove row + if @get('persistedSelection').contains row.get('content') + @get('persistedSelection').remove row.get('content') else - @get('persistedSelection').add row + @get('persistedSelection').add row.get('content') @set('lastSelected', row) rowIndex: (row) -> From 223683f7cadc74b15d37b5e26082195854a27d9d Mon Sep 17 00:00:00 2001 From: Sreenath Are Date: Fri, 8 Aug 2014 16:07:50 -0700 Subject: [PATCH 08/24] Compile dist files --- dist/ember-table.js | 26 ++++++++++++++++---------- dist/ember-table.min.js | 4 ++-- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/dist/ember-table.js b/dist/ember-table.js index cdbf9451c..6f19eef2e 100644 --- a/dist/ember-table.js +++ b/dist/ember-table.js @@ -1324,8 +1324,12 @@ Ember.Table.EmberTableComponent = Ember.Component.extend(Ember.AddeparMixins.Sty forceFillColumns: false, enableColumnReorder: true, enableContentSelection: false, - persistedSelection: new Ember.Set(), - rangeSelection: new Ember.Set(), + persistedSelection: Ember.computed(function() { + return new Ember.Set(); + }), + rangeSelection: Ember.computed(function() { + return new Ember.Set(); + }), selectionMode: 'single', _selection: Ember.computed(function() { return this.get('persistedSelection').copy().addEach(this.get('rangeSelection')); @@ -1705,14 +1709,14 @@ Ember.Table.EmberTableComponent = Ember.Component.extend(Ember.AddeparMixins.Sty }), 0); }, isSelected: function(row) { - return this.get('_selection').contains(row); + return this.get('_selection').contains(row.get('content')); }, setSelected: function(row, val) { this.persistSelection(); if (val) { - return this.get('persistedSelection').add(row); + return this.get('persistedSelection').add(row.get('content')); } else { - return this.get('persistedSelection').remove(row); + return this.get('persistedSelection').remove(row.get('content')); } }, click: function(event) { @@ -1726,7 +1730,7 @@ Ember.Table.EmberTableComponent = Ember.Component.extend(Ember.AddeparMixins.Sty } if (this.get('selectionMode') === 'single') { this.get('persistedSelection').clear(); - return this.get('persistedSelection').add(row); + return this.get('persistedSelection').add(row.get('content')); } else { if (event.shiftKey) { this.get('rangeSelection').clear(); @@ -1734,7 +1738,9 @@ Ember.Table.EmberTableComponent = Ember.Component.extend(Ember.AddeparMixins.Sty curIndex = this.rowIndex(this.getRowForEvent(event)); minIndex = Math.min(lastIndex, curIndex); maxIndex = Math.max(lastIndex, curIndex); - return this.get('rangeSelection').addObjects(this.get('bodyContent').slice(minIndex, maxIndex + 1)); + return this.get('rangeSelection').addObjects(_.map(this.get('bodyContent').slice(minIndex, maxIndex + 1), function(row) { + return row.get('content'); + })); } else { if (!event.ctrlKey && !event.metaKey) { this.get('persistedSelection').clear(); @@ -1742,10 +1748,10 @@ Ember.Table.EmberTableComponent = Ember.Component.extend(Ember.AddeparMixins.Sty } else { this.persistSelection(); } - if (this.get('persistedSelection').contains(row)) { - this.get('persistedSelection').remove(row); + if (this.get('persistedSelection').contains(row.get('content'))) { + this.get('persistedSelection').remove(row.get('content')); } else { - this.get('persistedSelection').add(row); + this.get('persistedSelection').add(row.get('content')); } return this.set('lastSelected', row); } diff --git a/dist/ember-table.min.js b/dist/ember-table.min.js index 3406c3ae9..346caf8b2 100644 --- a/dist/ember-table.min.js +++ b/dist/ember-table.min.js @@ -3,5 +3,5 @@ * Copyright 2012-2014 Addepar Inc. * See LICENSE. */ -!function(){Ember.TEMPLATES["body-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,numItemsShowingBinding:a,scrollTopBinding:a,startIndexBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n
\n
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,numItemsShowingBinding:b,scrollTopBinding:b,startIndexBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n
"),h}),Ember.TEMPLATES["components/ember-table"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.HeaderTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}function g(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.FooterTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var h,i="",j=this.escapeExpression,k=this;return h=c["if"].call(b,"controller.hasHeader",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(1,f,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.BodyTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),h=c["if"].call(b,"controller.hasFooter",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(3,g,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ScrollContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ColumnSortableIndicator",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),i}),Ember.TEMPLATES["footer-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="",h=this.escapeExpression;return e.buffer.push('
\n \n '),f=c._triageMustache.call(b,"view.content.headerCellName",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n \n
"),g}),Ember.TEMPLATES["header-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-left-table-block",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-right-table-block",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{contentBinding:"view.content",itemViewClassField:"headerCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f}),Ember.TEMPLATES["scroll-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.ScrollPanel",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n"),f}),Ember.TEMPLATES["table-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="";return e.buffer.push('\n '),f=c._triageMustache.call(b,"view.cellContent",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n"),g}),Ember.TEMPLATES["table-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{rowBinding:"view.row",contentBinding:"view.columns",itemViewClassField:"tableCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{rowBinding:"STRING",contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{rowBinding:b,contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f})}(),function(){Ember.Table=Ember.Namespace.create(),Ember.Table.VERSION="0.2.1",null!=(_ref=Ember.libraries)&&_ref.register("Ember Table",Ember.Table.VERSION)}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.ResizeHandlerMixin=Ember.Mixin.create({resizeEndDelay:200,resizing:!1,onResizeStart:Ember.K,onResizeEnd:Ember.K,onResize:Ember.K,endResize:Ember.computed(function(){return function(a){return this.isDestroyed?void 0:(this.set("resizing",!1),"function"==typeof this.onResizeEnd?this.onResizeEnd(a):void 0)}}),handleWindowResize:function(a){return this.get("resizing")||(this.set("resizing",!0),"function"==typeof this.onResizeStart&&this.onResizeStart(a)),"function"==typeof this.onResize&&this.onResize(a),Ember.run.debounce(this,this.get("endResize"),a,this.get("resizeEndDelay"))},didInsertElement:function(){return this._super(),this._setupDocumentHandlers()},willDestroyElement:function(){return this._removeDocumentHandlers(),this._super()},_setupDocumentHandlers:function(){return this._resizeHandler?void 0:(this._resizeHandler=jQuery.proxy(this.get("handleWindowResize"),this),jQuery(window).on("resize."+this.elementId,this._resizeHandler))},_removeDocumentHandlers:function(){return jQuery(window).off("resize."+this.elementId,this._resizeHandler),this._resizeHandler=null}})}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.StyleBindingsMixin=Ember.Mixin.create({concatenatedProperties:["styleBindings"],attributeBindings:["style"],unitType:"px",createStyleString:function(a,b){var c;return c=this.get(b),void 0!==c?("number"===Ember.typeOf(c)&&(c+=this.get("unitType")),""+a+":"+c+";"):void 0},applyStyleBindings:function(){var a,b,c,d,e,f=this;return(c=this.styleBindings)?(a={},c.forEach(function(b){var c,d,e;e=b.split(":"),c=e[0],d=e[1],a[d||c]=c}),e=Ember.keys(a),b=e.map(function(b){return a[b]}),d=Ember.computed(function(){var b,c;return c=e.map(function(b){return f.createStyleString(b,a[b])}),b=c.join(""),0!==b.length?b:void 0}),d.property.apply(d,b),Ember.defineProperty(this,"style",d)):void 0},init:function(){return this.applyStyleBindings(),this._super()}})}(),function(){jQuery.browser||!function(){var a,b,c;return b=void 0,a=void 0,jQuery.uaMatch=function(a){var b;return a=a.toLowerCase(),b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],{browser:b[1]||"",version:b[2]||"0"}},b=jQuery.uaMatch(navigator.userAgent),a={},b.browser&&(a[b.browser]=!0,a.version=b.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),c=jQuery.browser=a}()}(),function(){Ember.LazyContainerView=Ember.ContainerView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"lazy-list-container",styleBindings:["height"],content:null,itemViewClass:null,rowHeight:null,scrollTop:null,startIndex:null,init:function(){return this._super(),this.onNumChildViewsDidChange()},height:Ember.computed(function(){return this.get("content.length")*this.get("rowHeight")}).property("content.length","rowHeight"),numChildViews:Ember.computed(function(){return this.get("numItemsShowing")+2}).property("numItemsShowing"),onNumChildViewsDidChange:Ember.observer(function(){var a,b,c,d,e,f,g,h;return e=this,a=Ember.get(this.get("itemViewClass")),b=this.get("numChildViews"),a&&b?(d=this.get("length"),c=b-d,0>c?(g=this.slice(b,d),this.removeObjects(g)):c>0?(f=function(){h=[];for(var a=0;c>=0?c>a:a>c;c>=0?a++:a--)h.push(a);return h}.apply(this).map(function(){return e.createChildView(a)}),this.pushObjects(f)):void 0):void 0},"numChildViews","itemViewClass"),viewportDidChange:Ember.observer(function(){var a,b,c,d;return b=this.get("content")||[],a=b.get("length"),c=Math.min(this.get("length"),a),d=this.get("startIndex"),d+c>=a&&(d=a-c),0>d&&(d=0),this.forEach(function(a,e){var f,g;return e>=c?(a=this.objectAt(e),void a.set("content",null)):(g=d+e,a=this.objectAt(g%c),f=b.objectAt(g),f!==a.get("content")?(a.teardownContent(),a.set("itemIndex",g),a.set("content",f),a.prepareContent()):void 0)},this)},"content.length","length","startIndex")}),Ember.LazyItemView=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{itemIndex:null,prepareContent:Ember.K,teardownContent:Ember.K,rowHeightBinding:"parentView.rowHeight",styleBindings:["width","top","display"],top:Ember.computed(function(){return this.get("itemIndex")*this.get("rowHeight")}).property("itemIndex","rowHeight"),display:Ember.computed(function(){return this.get("content")?void 0:"none"}).property("content")})}(),function(){Ember.MultiItemViewCollectionView=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{styleBindings:"width",itemViewClassField:null,createChildView:function(a,b){var c,d;return d=this.get("itemViewClassField"),c=b.content.get(d),"string"==typeof c&&(c=Ember.get(Ember.lookup,c)),this._super(c,b)}}),Ember.MouseWheelHandlerMixin=Ember.Mixin.create({onMouseWheel:Ember.K,didInsertElement:function(){var a=this;return this._super(),this.$().bind("mousewheel",function(b,c,d,e){return Ember.run(a,a.onMouseWheel,b,c,d,e)})},willDestroyElement:function(){var a;return null!=(a=this.$())&&a.unbind("mousewheel"),this._super()}}),Ember.ScrollHandlerMixin=Ember.Mixin.create({onScroll:Ember.K,scrollElementSelector:"",didInsertElement:function(){var a=this;return this._super(),this.$(this.get("scrollElementSelector")).bind("scroll",function(b){return Ember.run(a,a.onScroll,b)})},willDestroyElement:function(){var a;return null!=(a=this.$(this.get("scrollElementSelector")))&&a.unbind("scroll"),this._super()}}),Ember.TouchMoveHandlerMixin=Ember.Mixin.create({onTouchMove:Ember.K,didInsertElement:function(){var a,b,c=this;return this._super(),a=b=0,this.$().bind("touchstart",function(c){a=c.originalEvent.targetTouches[0].pageX,b=c.originalEvent.targetTouches[0].pageY}),this.$().bind("touchmove",function(d){var e,f,g,h;g=d.originalEvent.targetTouches[0].pageX,h=d.originalEvent.targetTouches[0].pageY,e=-(g-a),f=-(h-b),Ember.run(c,c.onTouchMove,d,e,f),a=g,b=h})},willDestroy:function(){var a;return null!=(a=this.$())&&a.unbind("touchmove"),this._super()}}),Ember.Table.RowArrayController=Ember.ArrayController.extend({itemController:null,content:null,rowContent:Ember.computed(function(){return[]}).property(),controllerAt:function(a,b){var c,d,e;return c=this.get("container"),e=this.get("_subControllers"),(d=e[a])?d:(d=this.get("itemController").create({target:this,parentController:this.get("parentController")||this,content:b}),e[a]=d,d)}}),Ember.Table.ShowHorizontalScrollMixin=Ember.Mixin.create({mouseEnter:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.addClass("antiscroll-scrollbar-shown")},mouseLeave:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.removeClass("antiscroll-scrollbar-shown")}})}(),function(){Ember.Table.ColumnDefinition=Ember.Object.extend({headerCellName:void 0,contentPath:void 0,minWidth:void 0,maxWidth:void 0,defaultColumnWidth:150,columnWidth:Ember.computed.oneWay("defaultColumnWidth"),isResizable:!0,isSortable:!0,textAlign:"text-align-right",canAutoResize:!0,headerCellViewClass:"Ember.Table.HeaderCell",tableCellViewClass:"Ember.Table.TableCell",resize:function(a){return this.set("columnWidth",a)},getCellContent:function(a){var b;return b=this.get("contentPath"),Ember.assert("You must either provide a contentPath or override getCellContent in your column definition",null!=b),Ember.get(a,b)},setCellContent:Ember.K}),Ember.Table.Row=Ember.ObjectProxy.extend({content:null,isSelected:Ember.computed(function(a,b){return arguments.length>1&&this.get("parentController").setSelected(this,b),this.get("parentController").isSelected(this)}).property("parentController._selection.[]"),isShowing:!0,isHovered:!1})}(),function(){Ember.Table.TableContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-container"],styleBindings:["height","width"]}),Ember.Table.TableBlock=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-block"],styleBindings:["width","height"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),columns:null,content:null,scrollLeft:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight")}),Ember.Table.LazyTableBlock=Ember.LazyContainerView.extend({classNames:["ember-table-table-block"],styleBindings:["width"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),rowHeight:Ember.computed.alias("controller.rowHeight"),columns:null,content:null,scrollLeft:null,scrollTop:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.TableRow=Ember.LazyItemView.extend({templateName:"table-row",classNames:"ember-table-table-row",classNameBindings:["row.isHovered:ember-table-hover","row.isSelected:ember-table-selected","row.rowStyle","isLastRow:ember-table-last-row"],styleBindings:["width","height"],row:Ember.computed.alias("content"),columns:Ember.computed.alias("parentView.columns"),width:Ember.computed.alias("controller._rowWidth"),height:Ember.computed.alias("controller.rowHeight"),isLastRow:Ember.computed(function(){return this.get("row")===this.get("controller.bodyContent.lastObject")}).property("controller.bodyContent.lastObject","row"),mouseEnter:function(){var a;return a=this.get("row"),a?a.set("isHovered",!0):void 0},mouseLeave:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0},teardownContent:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0}}),Ember.Table.TableCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"table-cell",classNames:["ember-table-cell"],classNameBindings:"column.textAlign",styleBindings:"width",row:Ember.computed.alias("parentView.row"),column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),init:function(){return this._super(),this.contentPathDidChange(),this.contentDidChange()},contentDidChange:function(){return this.notifyPropertyChange("cellContent")},contentPathWillChange:function(){var a;return a=this.get("column.contentPath"),a?this.removeObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),contentPathDidChange:function(){var a;return a=this.get("column.contentPath"),a?this.addObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),cellContent:Ember.computed(function(a,b){var c,d;return d=this.get("row"),c=this.get("column"),d&&c?(1===arguments.length?b=c.getCellContent(d):c.setCellContent(d,b),b):void 0}).property("row.isLoaded","column")}),Ember.Table.HeaderBlock=Ember.Table.TableBlock.extend({classNames:["ember-table-header-block"],itemViewClass:"Ember.Table.HeaderRow",content:Ember.computed(function(){return[this.get("columns")]}).property("columns")}),Ember.Table.HeaderRow=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-row",classNames:["ember-table-table-row","ember-table-header-row"],styleBindings:["width"],columns:Ember.computed.alias("content"),width:Ember.computed.alias("controller._rowWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),sortableOption:Ember.computed(function(){return{axis:"x",containment:"parent",cursor:"move",helper:"clone",items:".ember-table-header-cell.sortable",opacity:.9,placeholder:"ui-state-highlight",scroll:!0,tolerance:"intersect",update:jQuery.proxy(this.onColumnSortDone,this),stop:jQuery.proxy(this.onColumnSortStop,this),sort:jQuery.proxy(this.onColumnSortChange,this)}}),onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),didInsertElement:function(){return this._super(),this.get("controller.enableColumnReorder")?this.$("> div").sortable(this.get("sortableOption")):void 0},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onColumnSortStop:function(){return this.set("controller._isShowingSortableIndicator",!1)},onColumnSortChange:function(){var a;return a=this.$(".ui-state-highlight").offset().left-this.$().closest(".ember-table-tables-container").offset().left,this.set("controller._isShowingSortableIndicator",!0),this.set("controller._sortableIndicatorLeft",a)},onColumnSortDone:function(a,b){var c,d,e;return d=b.item.index(),e=Ember.View.views[b.item.attr("id")],c=e.get("column"),this.get("controller").onColumnSort(c,d),this.set("controller._isShowingSortableIndicator",!1)}}),Ember.Table.HeaderCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-cell",classNames:["ember-table-cell","ember-table-header-cell"],classNameBindings:["column.isSortable:sortable","column.textAlign"],styleBindings:["width","height"],column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight"),resizableOption:Ember.computed(function(){return{handles:"e",minHeight:40,minWidth:this.get("column.minWidth")||100,maxWidth:this.get("column.maxWidth")||500,grid:this.get("column.snapGrid"),resize:jQuery.proxy(this.onColumnResize,this),stop:jQuery.proxy(this.onColumnResize,this)}}),didInsertElement:function(){this.elementSizeDidChange(),this.get("column.isResizable")&&(this.$().resizable(this.get("resizableOption")),this._resizableWidget=this.$().resizable("widget"))},onColumnResize:function(a,b){return this.elementSizeDidChange(),this.get("controller.forceFillColumns")&&this.get("controller.columns").filterProperty("canAutoResize").length>1&&this.set("column.canAutoResize",!1),this.get("column").resize(b.size.width)},elementSizeDidChange:function(){var a;a=0,$(".ember-table-header-block .ember-table-content").each(function(){var b;return b=$(this).outerHeight(),b>a?a=b:void 0}),this.set("controller._contentHeaderHeight",a)}}),Ember.Table.ColumnSortableIndicator=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"ember-table-column-sortable-indicator",classNameBindings:"controller._isShowingSortableIndicator:active",styleBindings:["left","height"],left:Ember.computed.alias("controller._sortableIndicatorLeft"),height:Ember.computed.alias("controller._height")}),Ember.Table.HeaderTableContainer=Ember.Table.TableContainer.extend(Ember.Table.ShowHorizontalScrollMixin,{templateName:"header-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-header-container"],height:Ember.computed.alias("controller._headerHeight"),width:Ember.computed.alias("controller._tableContainerWidth")}),Ember.Table.BodyTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.ScrollHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"body-container",classNames:["ember-table-table-container","ember-table-body-container","antiscroll-wrap"],height:Ember.computed.alias("controller._bodyHeight"),width:Ember.computed.alias("controller._width"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),scrollElementSelector:".antiscroll-inner",onScroll:function(a){return this.set("scrollTop",a.target.scrollTop),a.preventDefault()},onMouseWheel:function(a,b,c,d){var e;if(Math.abs(c)>Math.abs(d))return e=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",e),a.preventDefault()},onTouchMove:function(a,b,c){var d;if(Math.abs(b)>Math.abs(c))return d=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",d),a.preventDefault()}}),Ember.Table.FooterTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"footer-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-footer-container"],styleBindings:"top",height:Ember.computed.alias("controller.footerHeight"),width:Ember.computed.alias("controller._tableContainerWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),top:Ember.computed(function(){var a,b,c;return c=this.get("controller._headerHeight"),b=this.get("controller._tableContentHeight")+c,a=this.get("controller._bodyHeight")+c,a>b?b:a}).property("controller._bodyHeight","controller._headerHeight","controller._tableContentHeight"),onMouseWheel:function(a,b,c){var d;return d=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",d),a.preventDefault()},onTouchMove:function(a,b){var c;return c=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",c),a.preventDefault()}}),Ember.Table.ScrollContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.ScrollHandlerMixin,{templateName:"scroll-container",classNames:["ember-table-scroll-container"],styleBindings:["left","width","height"],scrollElementSelector:".antiscroll-inner",width:Ember.computed.alias("controller._scrollContainerWidth"),height:10,left:Ember.computed.alias("controller._fixedColumnsWidth"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),didInsertElement:function(){return this._super(),this.onScrollLeftDidChange()},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onScrollLeftDidChange:Ember.observer(function(){var a;return a=this.get("scrollElementSelector"),this.$(a).scrollLeft(this.get("scrollLeft"))},"scrollLeft","scrollElementSelector")}),Ember.Table.ScrollPanel=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-scroll-panel"],styleBindings:["width","height"],width:Ember.computed.alias("controller._tableColumnsWidth"),height:Ember.computed.alias("controller._tableContentHeight")})}(),function(){Ember.Table.EmberTableComponent=Ember.Component.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.AddeparMixins.ResizeHandlerMixin,{layoutName:"components/ember-table",classNames:["ember-table-tables-container"],classNameBindings:["enableContentSelection:ember-table-content-selectable"],styleBindings:["height"],height:Ember.computed.alias("_tablesContainerHeight"),columns:null,numFixedColumns:0,numFooterRow:0,rowHeight:30,minHeaderHeight:30,footerHeight:30,hasHeader:!0,hasFooter:!0,forceFillColumns:!1,enableColumnReorder:!0,enableContentSelection:!1,persistedSelection:new Ember.Set,rangeSelection:new Ember.Set,selectionMode:"single",_selection:Ember.computed(function(){return this.get("persistedSelection").copy().addEach(this.get("rangeSelection"))}).property("persistedSelection.[]","rangeSelection.[]"),selection:Ember.computed(function(a,b){var c;return arguments.length>1&&b===!0&&("single"===this.get("selectionMode")?(this.get("persistedSelection").clear(),this.get("persistedSelection").add(b)):(this.get("persistedSelection").clear(),this.get("persistedSelection").addEach(b)),this.get("rangeSelection").clear()),"single"===this.get("selectionMode")?null!=(c=this.get("_selection"))?c[0]:void 0:this.get("_selection").toArray()}).property("_selection.[]","selectionMode"),tableRowViewClass:"Ember.Table.TableRow",init:function(){if(this._super(),!$.ui)throw"Missing dependency: jquery-ui";if(!$().mousewheel)throw"Missing dependency: jquery-mousewheel";if(!$().antiscroll)throw"Missing dependency: antiscroll.js"},actions:{addColumn:Ember.K,sortByColumn:Ember.K},onColumnSort:function(a,b){var c;return c=this.get("tableColumns"),c.removeObject(a),c.insertAt(b,a)},bodyContent:Ember.computed(function(){return Ember.Table.RowArrayController.create({target:this,parentController:this,container:this.get("container"),itemController:Ember.Table.Row,content:this.get("content")})}).property("content"),footerContent:Ember.computed(function(a,b){return b?b:Ember.A()}).property(),fixedColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(0,b)||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),tableColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(b,a.get("length"))||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),prepareTableColumns:function(a){return a.setEach("controller",this)},didInsertElement:function(){return this._super(),this.set("_tableScrollTop",0),this.elementSizeDidChange()},onResizeEnd:function(){return Ember.run(this,this.elementSizeDidChange)},elementSizeDidChange:function(){return"inDOM"===this.get("state")?(this.set("_width",this.$().parent().outerWidth()),this.set("_height",this.$().parent().outerHeight()),Ember.run.next(this,this.updateLayout)):void 0},updateLayout:function(){return"inDOM"===this.get("state")?(this.$(".antiscroll-wrap").antiscroll().data("antiscroll").rebuild(),this.get("forceFillColumns")?this.doForceFillColumns():void 0):void 0},doForceFillColumns:function(){var a,b,c,d,e,f,g,h;return h=this.get("_width"),e=this.get("_fixedColumnsWidth"),g=this.get("tableColumns"),d=this._getTotalWidth(g),b=h-e,f=b-d,c=g.filterProperty("canAutoResize"),a=Math.floor(f/c.length),c.forEach(function(b){var c;return c=b.get("columnWidth")+a,b.set("columnWidth",c)})},onBodyContentLengthDidChange:Ember.observer(function(){return Ember.run.next(this,function(){return Ember.run.once(this,this.updateLayout)})},"bodyContent.length"),_tableScrollTop:0,_tableScrollLeft:0,_width:null,_height:null,_contentHeaderHeight:null,_hasVerticalScrollbar:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),a>b?!0:!1 -}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_hasHorizontalScrollbar:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_width")-this.get("_fixedColumnsWidth"),a>b?!0:!1}).property("_tableColumnsWidth","_width","_fixedColumnsWidth"),_tablesContainerHeight:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),b>a?a:b}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_fixedColumnsWidth:Ember.computed(function(){return this._getTotalWidth(this.get("fixedColumns"))}).property("fixedColumns.@each.columnWidth"),_tableColumnsWidth:Ember.computed(function(){var a,b;return b=this._getTotalWidth(this.get("tableColumns"))+3,a=this.get("_width")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("tableColumns.@each.columnWidth","_width","_fixedColumnsWidth"),_rowWidth:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_tableContainerWidth")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("_fixedColumnsWidth","_tableColumnsWidth","_tableContainerWidth"),_headerHeight:Ember.computed(function(){var a,b;return b=this.get("minHeaderHeight"),a=this.get("_contentHeaderHeight"),b>a?b:a}).property("_contentHeaderHeight","minHeaderHeight"),_footerHeight:Ember.computed(function(){return this.get("hasFooter")?this.get("footerHeight"):0}).property("footerHeight","hasFooter"),_bodyHeight:Ember.computed(function(){var a;return a=this.get("_tablesContainerHeight"),this.get("hasHeader")&&(a-=this.get("_headerHeight")),this.get("hasFooter")&&(a-=this.get("footerHeight")),a}).property("_tablesContainerHeight","_hasHorizontalScrollbar","_headerHeight","footerHeight","hasHeader","hasFooter"),_tableBlockWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_fixedBlockWidthBinding:"_fixedColumnsWidth",_tableContentHeight:Ember.computed(function(){return this.get("rowHeight")*this.get("bodyContent.length")}).property("rowHeight","bodyContent.length"),_tableContainerWidth:Ember.computed(function(){return this.get("_width")}).property("_width"),_scrollContainerWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_numItemsShowing:Ember.computed(function(){return Math.floor(this.get("_bodyHeight")/this.get("rowHeight"))}).property("_bodyHeight","rowHeight"),_startIndex:Ember.computed(function(){var a,b,c,d,e;return b=this.get("bodyContent.length"),c=this.get("_numItemsShowing"),d=this.get("rowHeight"),e=this.get("_tableScrollTop"),a=Math.floor(e/d),a+c>=b&&(a=b-c),0>a?0:a}).property("bodyContent.length","_numItemsShowing","rowHeight","_tableScrollTop"),_getTotalWidth:function(a,b){var c;return null==b&&(b="columnWidth"),a?(c=a.getEach(b)||[],c.reduce(function(a,b){return a+b},0)):0},isSelected:function(a){return this.get("_selection").contains(a)},setSelected:function(a,b){return this.persistSelection(),b?this.get("persistedSelection").add(a):this.get("persistedSelection").remove(a)},click:function(a){var b,c,d,e,f;return f=this.getRowForEvent(a),f&&"none"!==this.get("selectionMode")?"single"===this.get("selectionMode")?(this.get("persistedSelection").clear(),this.get("persistedSelection").add(f)):a.shiftKey?(this.get("rangeSelection").clear(),c=this.rowIndex(this.get("lastSelected")),b=this.rowIndex(this.getRowForEvent(a)),e=Math.min(c,b),d=Math.max(c,b),this.get("rangeSelection").addObjects(this.get("bodyContent").slice(e,d+1))):(a.ctrlKey||a.metaKey?this.persistSelection():(this.get("persistedSelection").clear(),this.get("rangeSelection").clear()),this.get("persistedSelection").contains(f)?this.get("persistedSelection").remove(f):this.get("persistedSelection").add(f),this.set("lastSelected",f)):void 0},rowIndex:function(a){var b;return null!=(b=this.get("bodyContent"))?b.indexOf(a):void 0},persistSelection:function(){return this.get("persistedSelection").addEach(this.get("rangeSelection")),this.get("rangeSelection").clear()},getRowForEvent:function(a){var b,c;return b=$(a.target).parents(".ember-table-table-row"),c=Ember.View.views[b.attr("id")],c?c.get("row"):void 0}}),Ember.Handlebars.helper("table-component",Ember.Table.EmberTableComponent)}(); \ No newline at end of file +!function(){Ember.TEMPLATES["body-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,numItemsShowingBinding:a,scrollTopBinding:a,startIndexBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n
\n
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,numItemsShowingBinding:b,scrollTopBinding:b,startIndexBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n
"),h}),Ember.TEMPLATES["components/ember-table"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.HeaderTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}function g(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.FooterTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var h,i="",j=this.escapeExpression,k=this;return h=c["if"].call(b,"controller.hasHeader",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(1,f,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.BodyTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),h=c["if"].call(b,"controller.hasFooter",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(3,g,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ScrollContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ColumnSortableIndicator",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),i}),Ember.TEMPLATES["footer-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="",h=this.escapeExpression;return e.buffer.push('
\n \n '),f=c._triageMustache.call(b,"view.content.headerCellName",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n \n
"),g}),Ember.TEMPLATES["header-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-left-table-block",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-right-table-block",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{contentBinding:"view.content",itemViewClassField:"headerCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f}),Ember.TEMPLATES["scroll-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.ScrollPanel",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n"),f}),Ember.TEMPLATES["table-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="";return e.buffer.push('\n '),f=c._triageMustache.call(b,"view.cellContent",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n"),g}),Ember.TEMPLATES["table-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{rowBinding:"view.row",contentBinding:"view.columns",itemViewClassField:"tableCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{rowBinding:"STRING",contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{rowBinding:b,contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f})}(),function(){Ember.Table=Ember.Namespace.create(),Ember.Table.VERSION="0.2.1",null!=(_ref=Ember.libraries)&&_ref.register("Ember Table",Ember.Table.VERSION)}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.ResizeHandlerMixin=Ember.Mixin.create({resizeEndDelay:200,resizing:!1,onResizeStart:Ember.K,onResizeEnd:Ember.K,onResize:Ember.K,endResize:Ember.computed(function(){return function(a){return this.isDestroyed?void 0:(this.set("resizing",!1),"function"==typeof this.onResizeEnd?this.onResizeEnd(a):void 0)}}),handleWindowResize:function(a){return this.get("resizing")||(this.set("resizing",!0),"function"==typeof this.onResizeStart&&this.onResizeStart(a)),"function"==typeof this.onResize&&this.onResize(a),Ember.run.debounce(this,this.get("endResize"),a,this.get("resizeEndDelay"))},didInsertElement:function(){return this._super(),this._setupDocumentHandlers()},willDestroyElement:function(){return this._removeDocumentHandlers(),this._super()},_setupDocumentHandlers:function(){return this._resizeHandler?void 0:(this._resizeHandler=jQuery.proxy(this.get("handleWindowResize"),this),jQuery(window).on("resize."+this.elementId,this._resizeHandler))},_removeDocumentHandlers:function(){return jQuery(window).off("resize."+this.elementId,this._resizeHandler),this._resizeHandler=null}})}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.StyleBindingsMixin=Ember.Mixin.create({concatenatedProperties:["styleBindings"],attributeBindings:["style"],unitType:"px",createStyleString:function(a,b){var c;return c=this.get(b),void 0!==c?("number"===Ember.typeOf(c)&&(c+=this.get("unitType")),""+a+":"+c+";"):void 0},applyStyleBindings:function(){var a,b,c,d,e,f=this;return(c=this.styleBindings)?(a={},c.forEach(function(b){var c,d,e;e=b.split(":"),c=e[0],d=e[1],a[d||c]=c}),e=Ember.keys(a),b=e.map(function(b){return a[b]}),d=Ember.computed(function(){var b,c;return c=e.map(function(b){return f.createStyleString(b,a[b])}),b=c.join(""),0!==b.length?b:void 0}),d.property.apply(d,b),Ember.defineProperty(this,"style",d)):void 0},init:function(){return this.applyStyleBindings(),this._super()}})}(),function(){jQuery.browser||!function(){var a,b,c;return b=void 0,a=void 0,jQuery.uaMatch=function(a){var b;return a=a.toLowerCase(),b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],{browser:b[1]||"",version:b[2]||"0"}},b=jQuery.uaMatch(navigator.userAgent),a={},b.browser&&(a[b.browser]=!0,a.version=b.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),c=jQuery.browser=a}()}(),function(){Ember.LazyContainerView=Ember.ContainerView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"lazy-list-container",styleBindings:["height"],content:null,itemViewClass:null,rowHeight:null,scrollTop:null,startIndex:null,init:function(){return this._super(),this.onNumChildViewsDidChange()},height:Ember.computed(function(){return this.get("content.length")*this.get("rowHeight")}).property("content.length","rowHeight"),numChildViews:Ember.computed(function(){return this.get("numItemsShowing")+2}).property("numItemsShowing"),onNumChildViewsDidChange:Ember.observer(function(){var a,b,c,d,e,f,g,h;return e=this,a=Ember.get(this.get("itemViewClass")),b=this.get("numChildViews"),a&&b?(d=this.get("length"),c=b-d,0>c?(g=this.slice(b,d),this.removeObjects(g)):c>0?(f=function(){h=[];for(var a=0;c>=0?c>a:a>c;c>=0?a++:a--)h.push(a);return h}.apply(this).map(function(){return e.createChildView(a)}),this.pushObjects(f)):void 0):void 0},"numChildViews","itemViewClass"),viewportDidChange:Ember.observer(function(){var a,b,c,d;return b=this.get("content")||[],a=b.get("length"),c=Math.min(this.get("length"),a),d=this.get("startIndex"),d+c>=a&&(d=a-c),0>d&&(d=0),this.forEach(function(a,e){var f,g;return e>=c?(a=this.objectAt(e),void a.set("content",null)):(g=d+e,a=this.objectAt(g%c),f=b.objectAt(g),f!==a.get("content")?(a.teardownContent(),a.set("itemIndex",g),a.set("content",f),a.prepareContent()):void 0)},this)},"content.length","length","startIndex")}),Ember.LazyItemView=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{itemIndex:null,prepareContent:Ember.K,teardownContent:Ember.K,rowHeightBinding:"parentView.rowHeight",styleBindings:["width","top","display"],top:Ember.computed(function(){return this.get("itemIndex")*this.get("rowHeight")}).property("itemIndex","rowHeight"),display:Ember.computed(function(){return this.get("content")?void 0:"none"}).property("content")})}(),function(){Ember.MultiItemViewCollectionView=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{styleBindings:"width",itemViewClassField:null,createChildView:function(a,b){var c,d;return d=this.get("itemViewClassField"),c=b.content.get(d),"string"==typeof c&&(c=Ember.get(Ember.lookup,c)),this._super(c,b)}}),Ember.MouseWheelHandlerMixin=Ember.Mixin.create({onMouseWheel:Ember.K,didInsertElement:function(){var a=this;return this._super(),this.$().bind("mousewheel",function(b,c,d,e){return Ember.run(a,a.onMouseWheel,b,c,d,e)})},willDestroyElement:function(){var a;return null!=(a=this.$())&&a.unbind("mousewheel"),this._super()}}),Ember.ScrollHandlerMixin=Ember.Mixin.create({onScroll:Ember.K,scrollElementSelector:"",didInsertElement:function(){var a=this;return this._super(),this.$(this.get("scrollElementSelector")).bind("scroll",function(b){return Ember.run(a,a.onScroll,b)})},willDestroyElement:function(){var a;return null!=(a=this.$(this.get("scrollElementSelector")))&&a.unbind("scroll"),this._super()}}),Ember.TouchMoveHandlerMixin=Ember.Mixin.create({onTouchMove:Ember.K,didInsertElement:function(){var a,b,c=this;return this._super(),a=b=0,this.$().bind("touchstart",function(c){a=c.originalEvent.targetTouches[0].pageX,b=c.originalEvent.targetTouches[0].pageY}),this.$().bind("touchmove",function(d){var e,f,g,h;g=d.originalEvent.targetTouches[0].pageX,h=d.originalEvent.targetTouches[0].pageY,e=-(g-a),f=-(h-b),Ember.run(c,c.onTouchMove,d,e,f),a=g,b=h})},willDestroy:function(){var a;return null!=(a=this.$())&&a.unbind("touchmove"),this._super()}}),Ember.Table.RowArrayController=Ember.ArrayController.extend({itemController:null,content:null,rowContent:Ember.computed(function(){return[]}).property(),controllerAt:function(a,b){var c,d,e;return c=this.get("container"),e=this.get("_subControllers"),(d=e[a])?d:(d=this.get("itemController").create({target:this,parentController:this.get("parentController")||this,content:b}),e[a]=d,d)}}),Ember.Table.ShowHorizontalScrollMixin=Ember.Mixin.create({mouseEnter:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.addClass("antiscroll-scrollbar-shown")},mouseLeave:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.removeClass("antiscroll-scrollbar-shown")}})}(),function(){Ember.Table.ColumnDefinition=Ember.Object.extend({headerCellName:void 0,contentPath:void 0,minWidth:void 0,maxWidth:void 0,defaultColumnWidth:150,columnWidth:Ember.computed.oneWay("defaultColumnWidth"),isResizable:!0,isSortable:!0,textAlign:"text-align-right",canAutoResize:!0,headerCellViewClass:"Ember.Table.HeaderCell",tableCellViewClass:"Ember.Table.TableCell",resize:function(a){return this.set("columnWidth",a)},getCellContent:function(a){var b;return b=this.get("contentPath"),Ember.assert("You must either provide a contentPath or override getCellContent in your column definition",null!=b),Ember.get(a,b)},setCellContent:Ember.K}),Ember.Table.Row=Ember.ObjectProxy.extend({content:null,isSelected:Ember.computed(function(a,b){return arguments.length>1&&this.get("parentController").setSelected(this,b),this.get("parentController").isSelected(this)}).property("parentController._selection.[]"),isShowing:!0,isHovered:!1})}(),function(){Ember.Table.TableContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-container"],styleBindings:["height","width"]}),Ember.Table.TableBlock=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-block"],styleBindings:["width","height"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),columns:null,content:null,scrollLeft:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight")}),Ember.Table.LazyTableBlock=Ember.LazyContainerView.extend({classNames:["ember-table-table-block"],styleBindings:["width"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),rowHeight:Ember.computed.alias("controller.rowHeight"),columns:null,content:null,scrollLeft:null,scrollTop:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.TableRow=Ember.LazyItemView.extend({templateName:"table-row",classNames:"ember-table-table-row",classNameBindings:["row.isHovered:ember-table-hover","row.isSelected:ember-table-selected","row.rowStyle","isLastRow:ember-table-last-row"],styleBindings:["width","height"],row:Ember.computed.alias("content"),columns:Ember.computed.alias("parentView.columns"),width:Ember.computed.alias("controller._rowWidth"),height:Ember.computed.alias("controller.rowHeight"),isLastRow:Ember.computed(function(){return this.get("row")===this.get("controller.bodyContent.lastObject")}).property("controller.bodyContent.lastObject","row"),mouseEnter:function(){var a;return a=this.get("row"),a?a.set("isHovered",!0):void 0},mouseLeave:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0},teardownContent:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0}}),Ember.Table.TableCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"table-cell",classNames:["ember-table-cell"],classNameBindings:"column.textAlign",styleBindings:"width",row:Ember.computed.alias("parentView.row"),column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),init:function(){return this._super(),this.contentPathDidChange(),this.contentDidChange()},contentDidChange:function(){return this.notifyPropertyChange("cellContent")},contentPathWillChange:function(){var a;return a=this.get("column.contentPath"),a?this.removeObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),contentPathDidChange:function(){var a;return a=this.get("column.contentPath"),a?this.addObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),cellContent:Ember.computed(function(a,b){var c,d;return d=this.get("row"),c=this.get("column"),d&&c?(1===arguments.length?b=c.getCellContent(d):c.setCellContent(d,b),b):void 0}).property("row.isLoaded","column")}),Ember.Table.HeaderBlock=Ember.Table.TableBlock.extend({classNames:["ember-table-header-block"],itemViewClass:"Ember.Table.HeaderRow",content:Ember.computed(function(){return[this.get("columns")]}).property("columns")}),Ember.Table.HeaderRow=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-row",classNames:["ember-table-table-row","ember-table-header-row"],styleBindings:["width"],columns:Ember.computed.alias("content"),width:Ember.computed.alias("controller._rowWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),sortableOption:Ember.computed(function(){return{axis:"x",containment:"parent",cursor:"move",helper:"clone",items:".ember-table-header-cell.sortable",opacity:.9,placeholder:"ui-state-highlight",scroll:!0,tolerance:"intersect",update:jQuery.proxy(this.onColumnSortDone,this),stop:jQuery.proxy(this.onColumnSortStop,this),sort:jQuery.proxy(this.onColumnSortChange,this)}}),onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),didInsertElement:function(){return this._super(),this.get("controller.enableColumnReorder")?this.$("> div").sortable(this.get("sortableOption")):void 0},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onColumnSortStop:function(){return this.set("controller._isShowingSortableIndicator",!1)},onColumnSortChange:function(){var a;return a=this.$(".ui-state-highlight").offset().left-this.$().closest(".ember-table-tables-container").offset().left,this.set("controller._isShowingSortableIndicator",!0),this.set("controller._sortableIndicatorLeft",a)},onColumnSortDone:function(a,b){var c,d,e;return d=b.item.index(),e=Ember.View.views[b.item.attr("id")],c=e.get("column"),this.get("controller").onColumnSort(c,d),this.set("controller._isShowingSortableIndicator",!1)}}),Ember.Table.HeaderCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-cell",classNames:["ember-table-cell","ember-table-header-cell"],classNameBindings:["column.isSortable:sortable","column.textAlign"],styleBindings:["width","height"],column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight"),resizableOption:Ember.computed(function(){return{handles:"e",minHeight:40,minWidth:this.get("column.minWidth")||100,maxWidth:this.get("column.maxWidth")||500,grid:this.get("column.snapGrid"),resize:jQuery.proxy(this.onColumnResize,this),stop:jQuery.proxy(this.onColumnResize,this)}}),didInsertElement:function(){this.elementSizeDidChange(),this.get("column.isResizable")&&(this.$().resizable(this.get("resizableOption")),this._resizableWidget=this.$().resizable("widget"))},onColumnResize:function(a,b){return this.elementSizeDidChange(),this.get("controller.forceFillColumns")&&this.get("controller.columns").filterProperty("canAutoResize").length>1&&this.set("column.canAutoResize",!1),this.get("column").resize(b.size.width)},elementSizeDidChange:function(){var a;a=0,$(".ember-table-header-block .ember-table-content").each(function(){var b;return b=$(this).outerHeight(),b>a?a=b:void 0}),this.set("controller._contentHeaderHeight",a)}}),Ember.Table.ColumnSortableIndicator=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"ember-table-column-sortable-indicator",classNameBindings:"controller._isShowingSortableIndicator:active",styleBindings:["left","height"],left:Ember.computed.alias("controller._sortableIndicatorLeft"),height:Ember.computed.alias("controller._height")}),Ember.Table.HeaderTableContainer=Ember.Table.TableContainer.extend(Ember.Table.ShowHorizontalScrollMixin,{templateName:"header-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-header-container"],height:Ember.computed.alias("controller._headerHeight"),width:Ember.computed.alias("controller._tableContainerWidth")}),Ember.Table.BodyTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.ScrollHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"body-container",classNames:["ember-table-table-container","ember-table-body-container","antiscroll-wrap"],height:Ember.computed.alias("controller._bodyHeight"),width:Ember.computed.alias("controller._width"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),scrollElementSelector:".antiscroll-inner",onScroll:function(a){return this.set("scrollTop",a.target.scrollTop),a.preventDefault()},onMouseWheel:function(a,b,c,d){var e;if(Math.abs(c)>Math.abs(d))return e=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",e),a.preventDefault()},onTouchMove:function(a,b,c){var d;if(Math.abs(b)>Math.abs(c))return d=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",d),a.preventDefault()}}),Ember.Table.FooterTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"footer-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-footer-container"],styleBindings:"top",height:Ember.computed.alias("controller.footerHeight"),width:Ember.computed.alias("controller._tableContainerWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),top:Ember.computed(function(){var a,b,c;return c=this.get("controller._headerHeight"),b=this.get("controller._tableContentHeight")+c,a=this.get("controller._bodyHeight")+c,a>b?b:a}).property("controller._bodyHeight","controller._headerHeight","controller._tableContentHeight"),onMouseWheel:function(a,b,c){var d;return d=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",d),a.preventDefault()},onTouchMove:function(a,b){var c;return c=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",c),a.preventDefault()}}),Ember.Table.ScrollContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.ScrollHandlerMixin,{templateName:"scroll-container",classNames:["ember-table-scroll-container"],styleBindings:["left","width","height"],scrollElementSelector:".antiscroll-inner",width:Ember.computed.alias("controller._scrollContainerWidth"),height:10,left:Ember.computed.alias("controller._fixedColumnsWidth"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),didInsertElement:function(){return this._super(),this.onScrollLeftDidChange()},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onScrollLeftDidChange:Ember.observer(function(){var a;return a=this.get("scrollElementSelector"),this.$(a).scrollLeft(this.get("scrollLeft"))},"scrollLeft","scrollElementSelector")}),Ember.Table.ScrollPanel=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-scroll-panel"],styleBindings:["width","height"],width:Ember.computed.alias("controller._tableColumnsWidth"),height:Ember.computed.alias("controller._tableContentHeight")})}(),function(){Ember.Table.EmberTableComponent=Ember.Component.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.AddeparMixins.ResizeHandlerMixin,{layoutName:"components/ember-table",classNames:["ember-table-tables-container"],classNameBindings:["enableContentSelection:ember-table-content-selectable"],styleBindings:["height"],height:Ember.computed.alias("_tablesContainerHeight"),columns:null,numFixedColumns:0,numFooterRow:0,rowHeight:30,minHeaderHeight:30,footerHeight:30,hasHeader:!0,hasFooter:!0,forceFillColumns:!1,enableColumnReorder:!0,enableContentSelection:!1,persistedSelection:Ember.computed(function(){return new Ember.Set}),rangeSelection:Ember.computed(function(){return new Ember.Set}),selectionMode:"single",_selection:Ember.computed(function(){return this.get("persistedSelection").copy().addEach(this.get("rangeSelection"))}).property("persistedSelection.[]","rangeSelection.[]"),selection:Ember.computed(function(a,b){var c;return arguments.length>1&&b===!0&&("single"===this.get("selectionMode")?(this.get("persistedSelection").clear(),this.get("persistedSelection").add(b)):(this.get("persistedSelection").clear(),this.get("persistedSelection").addEach(b)),this.get("rangeSelection").clear()),"single"===this.get("selectionMode")?null!=(c=this.get("_selection"))?c[0]:void 0:this.get("_selection").toArray()}).property("_selection.[]","selectionMode"),tableRowViewClass:"Ember.Table.TableRow",init:function(){if(this._super(),!$.ui)throw"Missing dependency: jquery-ui";if(!$().mousewheel)throw"Missing dependency: jquery-mousewheel";if(!$().antiscroll)throw"Missing dependency: antiscroll.js"},actions:{addColumn:Ember.K,sortByColumn:Ember.K},onColumnSort:function(a,b){var c;return c=this.get("tableColumns"),c.removeObject(a),c.insertAt(b,a)},bodyContent:Ember.computed(function(){return Ember.Table.RowArrayController.create({target:this,parentController:this,container:this.get("container"),itemController:Ember.Table.Row,content:this.get("content")})}).property("content"),footerContent:Ember.computed(function(a,b){return b?b:Ember.A()}).property(),fixedColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(0,b)||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),tableColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(b,a.get("length"))||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),prepareTableColumns:function(a){return a.setEach("controller",this)},didInsertElement:function(){return this._super(),this.set("_tableScrollTop",0),this.elementSizeDidChange()},onResizeEnd:function(){return Ember.run(this,this.elementSizeDidChange)},elementSizeDidChange:function(){return"inDOM"===this.get("state")?(this.set("_width",this.$().parent().outerWidth()),this.set("_height",this.$().parent().outerHeight()),Ember.run.next(this,this.updateLayout)):void 0},updateLayout:function(){return"inDOM"===this.get("state")?(this.$(".antiscroll-wrap").antiscroll().data("antiscroll").rebuild(),this.get("forceFillColumns")?this.doForceFillColumns():void 0):void 0},doForceFillColumns:function(){var a,b,c,d,e,f,g,h;return h=this.get("_width"),e=this.get("_fixedColumnsWidth"),g=this.get("tableColumns"),d=this._getTotalWidth(g),b=h-e,f=b-d,c=g.filterProperty("canAutoResize"),a=Math.floor(f/c.length),c.forEach(function(b){var c;return c=b.get("columnWidth")+a,b.set("columnWidth",c)})},onBodyContentLengthDidChange:Ember.observer(function(){return Ember.run.next(this,function(){return Ember.run.once(this,this.updateLayout)})},"bodyContent.length"),_tableScrollTop:0,_tableScrollLeft:0,_width:null,_height:null,_contentHeaderHeight:null,_hasVerticalScrollbar:Ember.computed(function(){var a,b; +return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),a>b?!0:!1}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_hasHorizontalScrollbar:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_width")-this.get("_fixedColumnsWidth"),a>b?!0:!1}).property("_tableColumnsWidth","_width","_fixedColumnsWidth"),_tablesContainerHeight:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),b>a?a:b}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_fixedColumnsWidth:Ember.computed(function(){return this._getTotalWidth(this.get("fixedColumns"))}).property("fixedColumns.@each.columnWidth"),_tableColumnsWidth:Ember.computed(function(){var a,b;return b=this._getTotalWidth(this.get("tableColumns"))+3,a=this.get("_width")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("tableColumns.@each.columnWidth","_width","_fixedColumnsWidth"),_rowWidth:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_tableContainerWidth")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("_fixedColumnsWidth","_tableColumnsWidth","_tableContainerWidth"),_headerHeight:Ember.computed(function(){var a,b;return b=this.get("minHeaderHeight"),a=this.get("_contentHeaderHeight"),b>a?b:a}).property("_contentHeaderHeight","minHeaderHeight"),_footerHeight:Ember.computed(function(){return this.get("hasFooter")?this.get("footerHeight"):0}).property("footerHeight","hasFooter"),_bodyHeight:Ember.computed(function(){var a;return a=this.get("_tablesContainerHeight"),this.get("hasHeader")&&(a-=this.get("_headerHeight")),this.get("hasFooter")&&(a-=this.get("footerHeight")),a}).property("_tablesContainerHeight","_hasHorizontalScrollbar","_headerHeight","footerHeight","hasHeader","hasFooter"),_tableBlockWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_fixedBlockWidthBinding:"_fixedColumnsWidth",_tableContentHeight:Ember.computed(function(){return this.get("rowHeight")*this.get("bodyContent.length")}).property("rowHeight","bodyContent.length"),_tableContainerWidth:Ember.computed(function(){return this.get("_width")}).property("_width"),_scrollContainerWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_numItemsShowing:Ember.computed(function(){return Math.floor(this.get("_bodyHeight")/this.get("rowHeight"))}).property("_bodyHeight","rowHeight"),_startIndex:Ember.computed(function(){var a,b,c,d,e;return b=this.get("bodyContent.length"),c=this.get("_numItemsShowing"),d=this.get("rowHeight"),e=this.get("_tableScrollTop"),a=Math.floor(e/d),a+c>=b&&(a=b-c),0>a?0:a}).property("bodyContent.length","_numItemsShowing","rowHeight","_tableScrollTop"),_getTotalWidth:function(a,b){var c;return null==b&&(b="columnWidth"),a?(c=a.getEach(b)||[],c.reduce(function(a,b){return a+b},0)):0},isSelected:function(a){return this.get("_selection").contains(a.get("content"))},setSelected:function(a,b){return this.persistSelection(),b?this.get("persistedSelection").add(a.get("content")):this.get("persistedSelection").remove(a.get("content"))},click:function(a){var b,c,d,e,f;return f=this.getRowForEvent(a),f&&"none"!==this.get("selectionMode")?"single"===this.get("selectionMode")?(this.get("persistedSelection").clear(),this.get("persistedSelection").add(f.get("content"))):a.shiftKey?(this.get("rangeSelection").clear(),c=this.rowIndex(this.get("lastSelected")),b=this.rowIndex(this.getRowForEvent(a)),e=Math.min(c,b),d=Math.max(c,b),this.get("rangeSelection").addObjects(_.map(this.get("bodyContent").slice(e,d+1),function(a){return a.get("content")}))):(a.ctrlKey||a.metaKey?this.persistSelection():(this.get("persistedSelection").clear(),this.get("rangeSelection").clear()),this.get("persistedSelection").contains(f.get("content"))?this.get("persistedSelection").remove(f.get("content")):this.get("persistedSelection").add(f.get("content")),this.set("lastSelected",f)):void 0},rowIndex:function(a){var b;return null!=(b=this.get("bodyContent"))?b.indexOf(a):void 0},persistSelection:function(){return this.get("persistedSelection").addEach(this.get("rangeSelection")),this.get("rangeSelection").clear()},getRowForEvent:function(a){var b,c;return b=$(a.target).parents(".ember-table-table-row"),c=Ember.View.views[b.attr("id")],c?c.get("row"):void 0}}),Ember.Handlebars.helper("table-component",Ember.Table.EmberTableComponent)}(); \ No newline at end of file From 947ae2d462308b75233ca47cbb86054a60721b79 Mon Sep 17 00:00:00 2001 From: Sreenath Are Date: Fri, 8 Aug 2014 17:33:26 -0700 Subject: [PATCH 09/24] Fix another multiselect bug --- dist/ember-table.js | 2 +- dist/ember-table.min.js | 2 +- src/component.coffee | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/ember-table.js b/dist/ember-table.js index 6f19eef2e..e6cd55289 100644 --- a/dist/ember-table.js +++ b/dist/ember-table.js @@ -1336,7 +1336,7 @@ Ember.Table.EmberTableComponent = Ember.Component.extend(Ember.AddeparMixins.Sty }).property('persistedSelection.[]', 'rangeSelection.[]'), selection: Ember.computed(function(key, val) { var _ref; - if (arguments.length > 1 && val === !void 0) { + if (arguments.length > 1 && val) { if (this.get('selectionMode') === 'single') { this.get('persistedSelection').clear(); this.get('persistedSelection').add(val); diff --git a/dist/ember-table.min.js b/dist/ember-table.min.js index 346caf8b2..a383efb38 100644 --- a/dist/ember-table.min.js +++ b/dist/ember-table.min.js @@ -3,5 +3,5 @@ * Copyright 2012-2014 Addepar Inc. * See LICENSE. */ -!function(){Ember.TEMPLATES["body-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,numItemsShowingBinding:a,scrollTopBinding:a,startIndexBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n
\n
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,numItemsShowingBinding:b,scrollTopBinding:b,startIndexBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n
"),h}),Ember.TEMPLATES["components/ember-table"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.HeaderTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}function g(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.FooterTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var h,i="",j=this.escapeExpression,k=this;return h=c["if"].call(b,"controller.hasHeader",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(1,f,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.BodyTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),h=c["if"].call(b,"controller.hasFooter",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(3,g,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ScrollContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ColumnSortableIndicator",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),i}),Ember.TEMPLATES["footer-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="",h=this.escapeExpression;return e.buffer.push('
\n \n '),f=c._triageMustache.call(b,"view.content.headerCellName",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n \n
"),g}),Ember.TEMPLATES["header-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-left-table-block",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-right-table-block",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{contentBinding:"view.content",itemViewClassField:"headerCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f}),Ember.TEMPLATES["scroll-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.ScrollPanel",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n"),f}),Ember.TEMPLATES["table-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="";return e.buffer.push('\n '),f=c._triageMustache.call(b,"view.cellContent",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n"),g}),Ember.TEMPLATES["table-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{rowBinding:"view.row",contentBinding:"view.columns",itemViewClassField:"tableCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{rowBinding:"STRING",contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{rowBinding:b,contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f})}(),function(){Ember.Table=Ember.Namespace.create(),Ember.Table.VERSION="0.2.1",null!=(_ref=Ember.libraries)&&_ref.register("Ember Table",Ember.Table.VERSION)}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.ResizeHandlerMixin=Ember.Mixin.create({resizeEndDelay:200,resizing:!1,onResizeStart:Ember.K,onResizeEnd:Ember.K,onResize:Ember.K,endResize:Ember.computed(function(){return function(a){return this.isDestroyed?void 0:(this.set("resizing",!1),"function"==typeof this.onResizeEnd?this.onResizeEnd(a):void 0)}}),handleWindowResize:function(a){return this.get("resizing")||(this.set("resizing",!0),"function"==typeof this.onResizeStart&&this.onResizeStart(a)),"function"==typeof this.onResize&&this.onResize(a),Ember.run.debounce(this,this.get("endResize"),a,this.get("resizeEndDelay"))},didInsertElement:function(){return this._super(),this._setupDocumentHandlers()},willDestroyElement:function(){return this._removeDocumentHandlers(),this._super()},_setupDocumentHandlers:function(){return this._resizeHandler?void 0:(this._resizeHandler=jQuery.proxy(this.get("handleWindowResize"),this),jQuery(window).on("resize."+this.elementId,this._resizeHandler))},_removeDocumentHandlers:function(){return jQuery(window).off("resize."+this.elementId,this._resizeHandler),this._resizeHandler=null}})}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.StyleBindingsMixin=Ember.Mixin.create({concatenatedProperties:["styleBindings"],attributeBindings:["style"],unitType:"px",createStyleString:function(a,b){var c;return c=this.get(b),void 0!==c?("number"===Ember.typeOf(c)&&(c+=this.get("unitType")),""+a+":"+c+";"):void 0},applyStyleBindings:function(){var a,b,c,d,e,f=this;return(c=this.styleBindings)?(a={},c.forEach(function(b){var c,d,e;e=b.split(":"),c=e[0],d=e[1],a[d||c]=c}),e=Ember.keys(a),b=e.map(function(b){return a[b]}),d=Ember.computed(function(){var b,c;return c=e.map(function(b){return f.createStyleString(b,a[b])}),b=c.join(""),0!==b.length?b:void 0}),d.property.apply(d,b),Ember.defineProperty(this,"style",d)):void 0},init:function(){return this.applyStyleBindings(),this._super()}})}(),function(){jQuery.browser||!function(){var a,b,c;return b=void 0,a=void 0,jQuery.uaMatch=function(a){var b;return a=a.toLowerCase(),b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],{browser:b[1]||"",version:b[2]||"0"}},b=jQuery.uaMatch(navigator.userAgent),a={},b.browser&&(a[b.browser]=!0,a.version=b.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),c=jQuery.browser=a}()}(),function(){Ember.LazyContainerView=Ember.ContainerView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"lazy-list-container",styleBindings:["height"],content:null,itemViewClass:null,rowHeight:null,scrollTop:null,startIndex:null,init:function(){return this._super(),this.onNumChildViewsDidChange()},height:Ember.computed(function(){return this.get("content.length")*this.get("rowHeight")}).property("content.length","rowHeight"),numChildViews:Ember.computed(function(){return this.get("numItemsShowing")+2}).property("numItemsShowing"),onNumChildViewsDidChange:Ember.observer(function(){var a,b,c,d,e,f,g,h;return e=this,a=Ember.get(this.get("itemViewClass")),b=this.get("numChildViews"),a&&b?(d=this.get("length"),c=b-d,0>c?(g=this.slice(b,d),this.removeObjects(g)):c>0?(f=function(){h=[];for(var a=0;c>=0?c>a:a>c;c>=0?a++:a--)h.push(a);return h}.apply(this).map(function(){return e.createChildView(a)}),this.pushObjects(f)):void 0):void 0},"numChildViews","itemViewClass"),viewportDidChange:Ember.observer(function(){var a,b,c,d;return b=this.get("content")||[],a=b.get("length"),c=Math.min(this.get("length"),a),d=this.get("startIndex"),d+c>=a&&(d=a-c),0>d&&(d=0),this.forEach(function(a,e){var f,g;return e>=c?(a=this.objectAt(e),void a.set("content",null)):(g=d+e,a=this.objectAt(g%c),f=b.objectAt(g),f!==a.get("content")?(a.teardownContent(),a.set("itemIndex",g),a.set("content",f),a.prepareContent()):void 0)},this)},"content.length","length","startIndex")}),Ember.LazyItemView=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{itemIndex:null,prepareContent:Ember.K,teardownContent:Ember.K,rowHeightBinding:"parentView.rowHeight",styleBindings:["width","top","display"],top:Ember.computed(function(){return this.get("itemIndex")*this.get("rowHeight")}).property("itemIndex","rowHeight"),display:Ember.computed(function(){return this.get("content")?void 0:"none"}).property("content")})}(),function(){Ember.MultiItemViewCollectionView=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{styleBindings:"width",itemViewClassField:null,createChildView:function(a,b){var c,d;return d=this.get("itemViewClassField"),c=b.content.get(d),"string"==typeof c&&(c=Ember.get(Ember.lookup,c)),this._super(c,b)}}),Ember.MouseWheelHandlerMixin=Ember.Mixin.create({onMouseWheel:Ember.K,didInsertElement:function(){var a=this;return this._super(),this.$().bind("mousewheel",function(b,c,d,e){return Ember.run(a,a.onMouseWheel,b,c,d,e)})},willDestroyElement:function(){var a;return null!=(a=this.$())&&a.unbind("mousewheel"),this._super()}}),Ember.ScrollHandlerMixin=Ember.Mixin.create({onScroll:Ember.K,scrollElementSelector:"",didInsertElement:function(){var a=this;return this._super(),this.$(this.get("scrollElementSelector")).bind("scroll",function(b){return Ember.run(a,a.onScroll,b)})},willDestroyElement:function(){var a;return null!=(a=this.$(this.get("scrollElementSelector")))&&a.unbind("scroll"),this._super()}}),Ember.TouchMoveHandlerMixin=Ember.Mixin.create({onTouchMove:Ember.K,didInsertElement:function(){var a,b,c=this;return this._super(),a=b=0,this.$().bind("touchstart",function(c){a=c.originalEvent.targetTouches[0].pageX,b=c.originalEvent.targetTouches[0].pageY}),this.$().bind("touchmove",function(d){var e,f,g,h;g=d.originalEvent.targetTouches[0].pageX,h=d.originalEvent.targetTouches[0].pageY,e=-(g-a),f=-(h-b),Ember.run(c,c.onTouchMove,d,e,f),a=g,b=h})},willDestroy:function(){var a;return null!=(a=this.$())&&a.unbind("touchmove"),this._super()}}),Ember.Table.RowArrayController=Ember.ArrayController.extend({itemController:null,content:null,rowContent:Ember.computed(function(){return[]}).property(),controllerAt:function(a,b){var c,d,e;return c=this.get("container"),e=this.get("_subControllers"),(d=e[a])?d:(d=this.get("itemController").create({target:this,parentController:this.get("parentController")||this,content:b}),e[a]=d,d)}}),Ember.Table.ShowHorizontalScrollMixin=Ember.Mixin.create({mouseEnter:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.addClass("antiscroll-scrollbar-shown")},mouseLeave:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.removeClass("antiscroll-scrollbar-shown")}})}(),function(){Ember.Table.ColumnDefinition=Ember.Object.extend({headerCellName:void 0,contentPath:void 0,minWidth:void 0,maxWidth:void 0,defaultColumnWidth:150,columnWidth:Ember.computed.oneWay("defaultColumnWidth"),isResizable:!0,isSortable:!0,textAlign:"text-align-right",canAutoResize:!0,headerCellViewClass:"Ember.Table.HeaderCell",tableCellViewClass:"Ember.Table.TableCell",resize:function(a){return this.set("columnWidth",a)},getCellContent:function(a){var b;return b=this.get("contentPath"),Ember.assert("You must either provide a contentPath or override getCellContent in your column definition",null!=b),Ember.get(a,b)},setCellContent:Ember.K}),Ember.Table.Row=Ember.ObjectProxy.extend({content:null,isSelected:Ember.computed(function(a,b){return arguments.length>1&&this.get("parentController").setSelected(this,b),this.get("parentController").isSelected(this)}).property("parentController._selection.[]"),isShowing:!0,isHovered:!1})}(),function(){Ember.Table.TableContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-container"],styleBindings:["height","width"]}),Ember.Table.TableBlock=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-block"],styleBindings:["width","height"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),columns:null,content:null,scrollLeft:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight")}),Ember.Table.LazyTableBlock=Ember.LazyContainerView.extend({classNames:["ember-table-table-block"],styleBindings:["width"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),rowHeight:Ember.computed.alias("controller.rowHeight"),columns:null,content:null,scrollLeft:null,scrollTop:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.TableRow=Ember.LazyItemView.extend({templateName:"table-row",classNames:"ember-table-table-row",classNameBindings:["row.isHovered:ember-table-hover","row.isSelected:ember-table-selected","row.rowStyle","isLastRow:ember-table-last-row"],styleBindings:["width","height"],row:Ember.computed.alias("content"),columns:Ember.computed.alias("parentView.columns"),width:Ember.computed.alias("controller._rowWidth"),height:Ember.computed.alias("controller.rowHeight"),isLastRow:Ember.computed(function(){return this.get("row")===this.get("controller.bodyContent.lastObject")}).property("controller.bodyContent.lastObject","row"),mouseEnter:function(){var a;return a=this.get("row"),a?a.set("isHovered",!0):void 0},mouseLeave:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0},teardownContent:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0}}),Ember.Table.TableCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"table-cell",classNames:["ember-table-cell"],classNameBindings:"column.textAlign",styleBindings:"width",row:Ember.computed.alias("parentView.row"),column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),init:function(){return this._super(),this.contentPathDidChange(),this.contentDidChange()},contentDidChange:function(){return this.notifyPropertyChange("cellContent")},contentPathWillChange:function(){var a;return a=this.get("column.contentPath"),a?this.removeObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),contentPathDidChange:function(){var a;return a=this.get("column.contentPath"),a?this.addObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),cellContent:Ember.computed(function(a,b){var c,d;return d=this.get("row"),c=this.get("column"),d&&c?(1===arguments.length?b=c.getCellContent(d):c.setCellContent(d,b),b):void 0}).property("row.isLoaded","column")}),Ember.Table.HeaderBlock=Ember.Table.TableBlock.extend({classNames:["ember-table-header-block"],itemViewClass:"Ember.Table.HeaderRow",content:Ember.computed(function(){return[this.get("columns")]}).property("columns")}),Ember.Table.HeaderRow=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-row",classNames:["ember-table-table-row","ember-table-header-row"],styleBindings:["width"],columns:Ember.computed.alias("content"),width:Ember.computed.alias("controller._rowWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),sortableOption:Ember.computed(function(){return{axis:"x",containment:"parent",cursor:"move",helper:"clone",items:".ember-table-header-cell.sortable",opacity:.9,placeholder:"ui-state-highlight",scroll:!0,tolerance:"intersect",update:jQuery.proxy(this.onColumnSortDone,this),stop:jQuery.proxy(this.onColumnSortStop,this),sort:jQuery.proxy(this.onColumnSortChange,this)}}),onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),didInsertElement:function(){return this._super(),this.get("controller.enableColumnReorder")?this.$("> div").sortable(this.get("sortableOption")):void 0},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onColumnSortStop:function(){return this.set("controller._isShowingSortableIndicator",!1)},onColumnSortChange:function(){var a;return a=this.$(".ui-state-highlight").offset().left-this.$().closest(".ember-table-tables-container").offset().left,this.set("controller._isShowingSortableIndicator",!0),this.set("controller._sortableIndicatorLeft",a)},onColumnSortDone:function(a,b){var c,d,e;return d=b.item.index(),e=Ember.View.views[b.item.attr("id")],c=e.get("column"),this.get("controller").onColumnSort(c,d),this.set("controller._isShowingSortableIndicator",!1)}}),Ember.Table.HeaderCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-cell",classNames:["ember-table-cell","ember-table-header-cell"],classNameBindings:["column.isSortable:sortable","column.textAlign"],styleBindings:["width","height"],column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight"),resizableOption:Ember.computed(function(){return{handles:"e",minHeight:40,minWidth:this.get("column.minWidth")||100,maxWidth:this.get("column.maxWidth")||500,grid:this.get("column.snapGrid"),resize:jQuery.proxy(this.onColumnResize,this),stop:jQuery.proxy(this.onColumnResize,this)}}),didInsertElement:function(){this.elementSizeDidChange(),this.get("column.isResizable")&&(this.$().resizable(this.get("resizableOption")),this._resizableWidget=this.$().resizable("widget"))},onColumnResize:function(a,b){return this.elementSizeDidChange(),this.get("controller.forceFillColumns")&&this.get("controller.columns").filterProperty("canAutoResize").length>1&&this.set("column.canAutoResize",!1),this.get("column").resize(b.size.width)},elementSizeDidChange:function(){var a;a=0,$(".ember-table-header-block .ember-table-content").each(function(){var b;return b=$(this).outerHeight(),b>a?a=b:void 0}),this.set("controller._contentHeaderHeight",a)}}),Ember.Table.ColumnSortableIndicator=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"ember-table-column-sortable-indicator",classNameBindings:"controller._isShowingSortableIndicator:active",styleBindings:["left","height"],left:Ember.computed.alias("controller._sortableIndicatorLeft"),height:Ember.computed.alias("controller._height")}),Ember.Table.HeaderTableContainer=Ember.Table.TableContainer.extend(Ember.Table.ShowHorizontalScrollMixin,{templateName:"header-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-header-container"],height:Ember.computed.alias("controller._headerHeight"),width:Ember.computed.alias("controller._tableContainerWidth")}),Ember.Table.BodyTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.ScrollHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"body-container",classNames:["ember-table-table-container","ember-table-body-container","antiscroll-wrap"],height:Ember.computed.alias("controller._bodyHeight"),width:Ember.computed.alias("controller._width"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),scrollElementSelector:".antiscroll-inner",onScroll:function(a){return this.set("scrollTop",a.target.scrollTop),a.preventDefault()},onMouseWheel:function(a,b,c,d){var e;if(Math.abs(c)>Math.abs(d))return e=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",e),a.preventDefault()},onTouchMove:function(a,b,c){var d;if(Math.abs(b)>Math.abs(c))return d=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",d),a.preventDefault()}}),Ember.Table.FooterTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"footer-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-footer-container"],styleBindings:"top",height:Ember.computed.alias("controller.footerHeight"),width:Ember.computed.alias("controller._tableContainerWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),top:Ember.computed(function(){var a,b,c;return c=this.get("controller._headerHeight"),b=this.get("controller._tableContentHeight")+c,a=this.get("controller._bodyHeight")+c,a>b?b:a}).property("controller._bodyHeight","controller._headerHeight","controller._tableContentHeight"),onMouseWheel:function(a,b,c){var d;return d=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",d),a.preventDefault()},onTouchMove:function(a,b){var c;return c=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",c),a.preventDefault()}}),Ember.Table.ScrollContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.ScrollHandlerMixin,{templateName:"scroll-container",classNames:["ember-table-scroll-container"],styleBindings:["left","width","height"],scrollElementSelector:".antiscroll-inner",width:Ember.computed.alias("controller._scrollContainerWidth"),height:10,left:Ember.computed.alias("controller._fixedColumnsWidth"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),didInsertElement:function(){return this._super(),this.onScrollLeftDidChange()},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onScrollLeftDidChange:Ember.observer(function(){var a;return a=this.get("scrollElementSelector"),this.$(a).scrollLeft(this.get("scrollLeft"))},"scrollLeft","scrollElementSelector")}),Ember.Table.ScrollPanel=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-scroll-panel"],styleBindings:["width","height"],width:Ember.computed.alias("controller._tableColumnsWidth"),height:Ember.computed.alias("controller._tableContentHeight")})}(),function(){Ember.Table.EmberTableComponent=Ember.Component.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.AddeparMixins.ResizeHandlerMixin,{layoutName:"components/ember-table",classNames:["ember-table-tables-container"],classNameBindings:["enableContentSelection:ember-table-content-selectable"],styleBindings:["height"],height:Ember.computed.alias("_tablesContainerHeight"),columns:null,numFixedColumns:0,numFooterRow:0,rowHeight:30,minHeaderHeight:30,footerHeight:30,hasHeader:!0,hasFooter:!0,forceFillColumns:!1,enableColumnReorder:!0,enableContentSelection:!1,persistedSelection:Ember.computed(function(){return new Ember.Set}),rangeSelection:Ember.computed(function(){return new Ember.Set}),selectionMode:"single",_selection:Ember.computed(function(){return this.get("persistedSelection").copy().addEach(this.get("rangeSelection"))}).property("persistedSelection.[]","rangeSelection.[]"),selection:Ember.computed(function(a,b){var c;return arguments.length>1&&b===!0&&("single"===this.get("selectionMode")?(this.get("persistedSelection").clear(),this.get("persistedSelection").add(b)):(this.get("persistedSelection").clear(),this.get("persistedSelection").addEach(b)),this.get("rangeSelection").clear()),"single"===this.get("selectionMode")?null!=(c=this.get("_selection"))?c[0]:void 0:this.get("_selection").toArray()}).property("_selection.[]","selectionMode"),tableRowViewClass:"Ember.Table.TableRow",init:function(){if(this._super(),!$.ui)throw"Missing dependency: jquery-ui";if(!$().mousewheel)throw"Missing dependency: jquery-mousewheel";if(!$().antiscroll)throw"Missing dependency: antiscroll.js"},actions:{addColumn:Ember.K,sortByColumn:Ember.K},onColumnSort:function(a,b){var c;return c=this.get("tableColumns"),c.removeObject(a),c.insertAt(b,a)},bodyContent:Ember.computed(function(){return Ember.Table.RowArrayController.create({target:this,parentController:this,container:this.get("container"),itemController:Ember.Table.Row,content:this.get("content")})}).property("content"),footerContent:Ember.computed(function(a,b){return b?b:Ember.A()}).property(),fixedColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(0,b)||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),tableColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(b,a.get("length"))||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),prepareTableColumns:function(a){return a.setEach("controller",this)},didInsertElement:function(){return this._super(),this.set("_tableScrollTop",0),this.elementSizeDidChange()},onResizeEnd:function(){return Ember.run(this,this.elementSizeDidChange)},elementSizeDidChange:function(){return"inDOM"===this.get("state")?(this.set("_width",this.$().parent().outerWidth()),this.set("_height",this.$().parent().outerHeight()),Ember.run.next(this,this.updateLayout)):void 0},updateLayout:function(){return"inDOM"===this.get("state")?(this.$(".antiscroll-wrap").antiscroll().data("antiscroll").rebuild(),this.get("forceFillColumns")?this.doForceFillColumns():void 0):void 0},doForceFillColumns:function(){var a,b,c,d,e,f,g,h;return h=this.get("_width"),e=this.get("_fixedColumnsWidth"),g=this.get("tableColumns"),d=this._getTotalWidth(g),b=h-e,f=b-d,c=g.filterProperty("canAutoResize"),a=Math.floor(f/c.length),c.forEach(function(b){var c;return c=b.get("columnWidth")+a,b.set("columnWidth",c)})},onBodyContentLengthDidChange:Ember.observer(function(){return Ember.run.next(this,function(){return Ember.run.once(this,this.updateLayout)})},"bodyContent.length"),_tableScrollTop:0,_tableScrollLeft:0,_width:null,_height:null,_contentHeaderHeight:null,_hasVerticalScrollbar:Ember.computed(function(){var a,b; +!function(){Ember.TEMPLATES["body-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,numItemsShowingBinding:a,scrollTopBinding:a,startIndexBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n
\n
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.LazyTableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.bodyContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",numItemsShowingBinding:"controller._numItemsShowing",scrollTopBinding:"controller._scrollTop",startIndexBinding:"controller._startIndex"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",numItemsShowingBinding:"STRING",scrollTopBinding:"STRING",startIndexBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,numItemsShowingBinding:b,scrollTopBinding:b,startIndexBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n
"),h}),Ember.TEMPLATES["components/ember-table"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.HeaderTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}function g(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(j(c.view.call(a,"Ember.Table.FooterTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n"),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var h,i="",j=this.escapeExpression,k=this;return h=c["if"].call(b,"controller.hasHeader",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(1,f,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.BodyTableContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),h=c["if"].call(b,"controller.hasFooter",{hash:{},hashTypes:{},hashContexts:{},inverse:k.noop,fn:k.program(3,g,e),contexts:[b],types:["ID"],data:e}),(h||0===h)&&e.buffer.push(h),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ScrollContainer",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),e.buffer.push(j(c.view.call(b,"Ember.Table.ColumnSortableIndicator",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),i}),Ember.TEMPLATES["footer-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-left-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,contentBinding:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.TableBlock",{hash:{classNames:"ember-table-right-table-block",contentBinding:"controller.footerContent",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.footerHeight"},hashTypes:{classNames:"STRING",contentBinding:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,contentBinding:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="",h=this.escapeExpression;return e.buffer.push('
\n \n '),f=c._triageMustache.call(b,"view.content.headerCellName",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n \n
"),g}),Ember.TEMPLATES["header-container"]=Ember.Handlebars.template(function(a,b,c,d,e){function f(a,b){var d="";return b.buffer.push("\n "),b.buffer.push(i(c.view.call(a,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-left-table-block",columnsBinding:"controller.fixedColumns",widthBinding:"controller._fixedBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:a,columnsBinding:a,widthBinding:a,heightBinding:a},contexts:[a],types:["ID"],data:b}))),b.buffer.push("\n "),d}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var g,h="",i=this.escapeExpression,j=this;return e.buffer.push('
\n '),g=c["if"].call(b,"controller.numFixedColumns",{hash:{},hashTypes:{},hashContexts:{},inverse:j.noop,fn:j.program(1,f,e),contexts:[b],types:["ID"],data:e}),(g||0===g)&&e.buffer.push(g),e.buffer.push("\n "),e.buffer.push(i(c.view.call(b,"Ember.Table.HeaderBlock",{hash:{classNames:"ember-table-right-table-block",columnsBinding:"controller.tableColumns",scrollLeftBinding:"controller._tableScrollLeft",widthBinding:"controller._tableBlockWidth",heightBinding:"controller.headerHeight"},hashTypes:{classNames:"STRING",columnsBinding:"STRING",scrollLeftBinding:"STRING",widthBinding:"STRING",heightBinding:"STRING"},hashContexts:{classNames:b,columnsBinding:b,scrollLeftBinding:b,widthBinding:b,heightBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n"),h}),Ember.TEMPLATES["header-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{contentBinding:"view.content",itemViewClassField:"headerCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f}),Ember.TEMPLATES["scroll-container"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push('
\n
\n '),e.buffer.push(g(c.view.call(b,"Ember.Table.ScrollPanel",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n
\n
\n"),f}),Ember.TEMPLATES["table-cell"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f,g="";return e.buffer.push('\n '),f=c._triageMustache.call(b,"view.cellContent",{hash:{},hashTypes:{},hashContexts:{},contexts:[b],types:["ID"],data:e}),(f||0===f)&&e.buffer.push(f),e.buffer.push("\n"),g}),Ember.TEMPLATES["table-row"]=Ember.Handlebars.template(function(a,b,c,d,e){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,Ember.Handlebars.helpers),e=e||{};var f="",g=this.escapeExpression;return e.buffer.push(g(c.view.call(b,"Ember.MultiItemViewCollectionView",{hash:{rowBinding:"view.row",contentBinding:"view.columns",itemViewClassField:"tableCellViewClass",widthBinding:"controller._tableColumnsWidth"},hashTypes:{rowBinding:"STRING",contentBinding:"STRING",itemViewClassField:"STRING",widthBinding:"STRING"},hashContexts:{rowBinding:b,contentBinding:b,itemViewClassField:b,widthBinding:b},contexts:[b],types:["ID"],data:e}))),e.buffer.push("\n"),f})}(),function(){Ember.Table=Ember.Namespace.create(),Ember.Table.VERSION="0.2.1",null!=(_ref=Ember.libraries)&&_ref.register("Ember Table",Ember.Table.VERSION)}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.ResizeHandlerMixin=Ember.Mixin.create({resizeEndDelay:200,resizing:!1,onResizeStart:Ember.K,onResizeEnd:Ember.K,onResize:Ember.K,endResize:Ember.computed(function(){return function(a){return this.isDestroyed?void 0:(this.set("resizing",!1),"function"==typeof this.onResizeEnd?this.onResizeEnd(a):void 0)}}),handleWindowResize:function(a){return this.get("resizing")||(this.set("resizing",!0),"function"==typeof this.onResizeStart&&this.onResizeStart(a)),"function"==typeof this.onResize&&this.onResize(a),Ember.run.debounce(this,this.get("endResize"),a,this.get("resizeEndDelay"))},didInsertElement:function(){return this._super(),this._setupDocumentHandlers()},willDestroyElement:function(){return this._removeDocumentHandlers(),this._super()},_setupDocumentHandlers:function(){return this._resizeHandler?void 0:(this._resizeHandler=jQuery.proxy(this.get("handleWindowResize"),this),jQuery(window).on("resize."+this.elementId,this._resizeHandler))},_removeDocumentHandlers:function(){return jQuery(window).off("resize."+this.elementId,this._resizeHandler),this._resizeHandler=null}})}(),function(){Ember.AddeparMixins=Ember.AddeparMixins||Ember.Namespace.create(),Ember.AddeparMixins.StyleBindingsMixin=Ember.Mixin.create({concatenatedProperties:["styleBindings"],attributeBindings:["style"],unitType:"px",createStyleString:function(a,b){var c;return c=this.get(b),void 0!==c?("number"===Ember.typeOf(c)&&(c+=this.get("unitType")),""+a+":"+c+";"):void 0},applyStyleBindings:function(){var a,b,c,d,e,f=this;return(c=this.styleBindings)?(a={},c.forEach(function(b){var c,d,e;e=b.split(":"),c=e[0],d=e[1],a[d||c]=c}),e=Ember.keys(a),b=e.map(function(b){return a[b]}),d=Ember.computed(function(){var b,c;return c=e.map(function(b){return f.createStyleString(b,a[b])}),b=c.join(""),0!==b.length?b:void 0}),d.property.apply(d,b),Ember.defineProperty(this,"style",d)):void 0},init:function(){return this.applyStyleBindings(),this._super()}})}(),function(){jQuery.browser||!function(){var a,b,c;return b=void 0,a=void 0,jQuery.uaMatch=function(a){var b;return a=a.toLowerCase(),b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],{browser:b[1]||"",version:b[2]||"0"}},b=jQuery.uaMatch(navigator.userAgent),a={},b.browser&&(a[b.browser]=!0,a.version=b.version),a.chrome?a.webkit=!0:a.webkit&&(a.safari=!0),c=jQuery.browser=a}()}(),function(){Ember.LazyContainerView=Ember.ContainerView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"lazy-list-container",styleBindings:["height"],content:null,itemViewClass:null,rowHeight:null,scrollTop:null,startIndex:null,init:function(){return this._super(),this.onNumChildViewsDidChange()},height:Ember.computed(function(){return this.get("content.length")*this.get("rowHeight")}).property("content.length","rowHeight"),numChildViews:Ember.computed(function(){return this.get("numItemsShowing")+2}).property("numItemsShowing"),onNumChildViewsDidChange:Ember.observer(function(){var a,b,c,d,e,f,g,h;return e=this,a=Ember.get(this.get("itemViewClass")),b=this.get("numChildViews"),a&&b?(d=this.get("length"),c=b-d,0>c?(g=this.slice(b,d),this.removeObjects(g)):c>0?(f=function(){h=[];for(var a=0;c>=0?c>a:a>c;c>=0?a++:a--)h.push(a);return h}.apply(this).map(function(){return e.createChildView(a)}),this.pushObjects(f)):void 0):void 0},"numChildViews","itemViewClass"),viewportDidChange:Ember.observer(function(){var a,b,c,d;return b=this.get("content")||[],a=b.get("length"),c=Math.min(this.get("length"),a),d=this.get("startIndex"),d+c>=a&&(d=a-c),0>d&&(d=0),this.forEach(function(a,e){var f,g;return e>=c?(a=this.objectAt(e),void a.set("content",null)):(g=d+e,a=this.objectAt(g%c),f=b.objectAt(g),f!==a.get("content")?(a.teardownContent(),a.set("itemIndex",g),a.set("content",f),a.prepareContent()):void 0)},this)},"content.length","length","startIndex")}),Ember.LazyItemView=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{itemIndex:null,prepareContent:Ember.K,teardownContent:Ember.K,rowHeightBinding:"parentView.rowHeight",styleBindings:["width","top","display"],top:Ember.computed(function(){return this.get("itemIndex")*this.get("rowHeight")}).property("itemIndex","rowHeight"),display:Ember.computed(function(){return this.get("content")?void 0:"none"}).property("content")})}(),function(){Ember.MultiItemViewCollectionView=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{styleBindings:"width",itemViewClassField:null,createChildView:function(a,b){var c,d;return d=this.get("itemViewClassField"),c=b.content.get(d),"string"==typeof c&&(c=Ember.get(Ember.lookup,c)),this._super(c,b)}}),Ember.MouseWheelHandlerMixin=Ember.Mixin.create({onMouseWheel:Ember.K,didInsertElement:function(){var a=this;return this._super(),this.$().bind("mousewheel",function(b,c,d,e){return Ember.run(a,a.onMouseWheel,b,c,d,e)})},willDestroyElement:function(){var a;return null!=(a=this.$())&&a.unbind("mousewheel"),this._super()}}),Ember.ScrollHandlerMixin=Ember.Mixin.create({onScroll:Ember.K,scrollElementSelector:"",didInsertElement:function(){var a=this;return this._super(),this.$(this.get("scrollElementSelector")).bind("scroll",function(b){return Ember.run(a,a.onScroll,b)})},willDestroyElement:function(){var a;return null!=(a=this.$(this.get("scrollElementSelector")))&&a.unbind("scroll"),this._super()}}),Ember.TouchMoveHandlerMixin=Ember.Mixin.create({onTouchMove:Ember.K,didInsertElement:function(){var a,b,c=this;return this._super(),a=b=0,this.$().bind("touchstart",function(c){a=c.originalEvent.targetTouches[0].pageX,b=c.originalEvent.targetTouches[0].pageY}),this.$().bind("touchmove",function(d){var e,f,g,h;g=d.originalEvent.targetTouches[0].pageX,h=d.originalEvent.targetTouches[0].pageY,e=-(g-a),f=-(h-b),Ember.run(c,c.onTouchMove,d,e,f),a=g,b=h})},willDestroy:function(){var a;return null!=(a=this.$())&&a.unbind("touchmove"),this._super()}}),Ember.Table.RowArrayController=Ember.ArrayController.extend({itemController:null,content:null,rowContent:Ember.computed(function(){return[]}).property(),controllerAt:function(a,b){var c,d,e;return c=this.get("container"),e=this.get("_subControllers"),(d=e[a])?d:(d=this.get("itemController").create({target:this,parentController:this.get("parentController")||this,content:b}),e[a]=d,d)}}),Ember.Table.ShowHorizontalScrollMixin=Ember.Mixin.create({mouseEnter:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.addClass("antiscroll-scrollbar-shown")},mouseLeave:function(a){var b,c;return c=$(a.target).parents(".ember-table-tables-container"),b=c.find(".antiscroll-scrollbar-horizontal"),b.removeClass("antiscroll-scrollbar-shown")}})}(),function(){Ember.Table.ColumnDefinition=Ember.Object.extend({headerCellName:void 0,contentPath:void 0,minWidth:void 0,maxWidth:void 0,defaultColumnWidth:150,columnWidth:Ember.computed.oneWay("defaultColumnWidth"),isResizable:!0,isSortable:!0,textAlign:"text-align-right",canAutoResize:!0,headerCellViewClass:"Ember.Table.HeaderCell",tableCellViewClass:"Ember.Table.TableCell",resize:function(a){return this.set("columnWidth",a)},getCellContent:function(a){var b;return b=this.get("contentPath"),Ember.assert("You must either provide a contentPath or override getCellContent in your column definition",null!=b),Ember.get(a,b)},setCellContent:Ember.K}),Ember.Table.Row=Ember.ObjectProxy.extend({content:null,isSelected:Ember.computed(function(a,b){return arguments.length>1&&this.get("parentController").setSelected(this,b),this.get("parentController").isSelected(this)}).property("parentController._selection.[]"),isShowing:!0,isHovered:!1})}(),function(){Ember.Table.TableContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-container"],styleBindings:["height","width"]}),Ember.Table.TableBlock=Ember.CollectionView.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-table-block"],styleBindings:["width","height"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),columns:null,content:null,scrollLeft:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight")}),Ember.Table.LazyTableBlock=Ember.LazyContainerView.extend({classNames:["ember-table-table-block"],styleBindings:["width"],itemViewClass:Ember.computed.alias("controller.tableRowViewClass"),rowHeight:Ember.computed.alias("controller.rowHeight"),columns:null,content:null,scrollLeft:null,scrollTop:null,onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft")}),Ember.Table.TableRow=Ember.LazyItemView.extend({templateName:"table-row",classNames:"ember-table-table-row",classNameBindings:["row.isHovered:ember-table-hover","row.isSelected:ember-table-selected","row.rowStyle","isLastRow:ember-table-last-row"],styleBindings:["width","height"],row:Ember.computed.alias("content"),columns:Ember.computed.alias("parentView.columns"),width:Ember.computed.alias("controller._rowWidth"),height:Ember.computed.alias("controller.rowHeight"),isLastRow:Ember.computed(function(){return this.get("row")===this.get("controller.bodyContent.lastObject")}).property("controller.bodyContent.lastObject","row"),mouseEnter:function(){var a;return a=this.get("row"),a?a.set("isHovered",!0):void 0},mouseLeave:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0},teardownContent:function(){var a;return a=this.get("row"),a?a.set("isHovered",!1):void 0}}),Ember.Table.TableCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"table-cell",classNames:["ember-table-cell"],classNameBindings:"column.textAlign",styleBindings:"width",row:Ember.computed.alias("parentView.row"),column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),init:function(){return this._super(),this.contentPathDidChange(),this.contentDidChange()},contentDidChange:function(){return this.notifyPropertyChange("cellContent")},contentPathWillChange:function(){var a;return a=this.get("column.contentPath"),a?this.removeObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),contentPathDidChange:function(){var a;return a=this.get("column.contentPath"),a?this.addObserver("row."+a,this,this.contentDidChange):void 0}.observesBefore("column.contentPath"),cellContent:Ember.computed(function(a,b){var c,d;return d=this.get("row"),c=this.get("column"),d&&c?(1===arguments.length?b=c.getCellContent(d):c.setCellContent(d,b),b):void 0}).property("row.isLoaded","column")}),Ember.Table.HeaderBlock=Ember.Table.TableBlock.extend({classNames:["ember-table-header-block"],itemViewClass:"Ember.Table.HeaderRow",content:Ember.computed(function(){return[this.get("columns")]}).property("columns")}),Ember.Table.HeaderRow=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-row",classNames:["ember-table-table-row","ember-table-header-row"],styleBindings:["width"],columns:Ember.computed.alias("content"),width:Ember.computed.alias("controller._rowWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),sortableOption:Ember.computed(function(){return{axis:"x",containment:"parent",cursor:"move",helper:"clone",items:".ember-table-header-cell.sortable",opacity:.9,placeholder:"ui-state-highlight",scroll:!0,tolerance:"intersect",update:jQuery.proxy(this.onColumnSortDone,this),stop:jQuery.proxy(this.onColumnSortStop,this),sort:jQuery.proxy(this.onColumnSortChange,this)}}),onScrollLeftDidChange:Ember.observer(function(){return this.$().scrollLeft(this.get("scrollLeft"))},"scrollLeft"),didInsertElement:function(){return this._super(),this.get("controller.enableColumnReorder")?this.$("> div").sortable(this.get("sortableOption")):void 0},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onColumnSortStop:function(){return this.set("controller._isShowingSortableIndicator",!1)},onColumnSortChange:function(){var a;return a=this.$(".ui-state-highlight").offset().left-this.$().closest(".ember-table-tables-container").offset().left,this.set("controller._isShowingSortableIndicator",!0),this.set("controller._sortableIndicatorLeft",a)},onColumnSortDone:function(a,b){var c,d,e;return d=b.item.index(),e=Ember.View.views[b.item.attr("id")],c=e.get("column"),this.get("controller").onColumnSort(c,d),this.set("controller._isShowingSortableIndicator",!1)}}),Ember.Table.HeaderCell=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{templateName:"header-cell",classNames:["ember-table-cell","ember-table-header-cell"],classNameBindings:["column.isSortable:sortable","column.textAlign"],styleBindings:["width","height"],column:Ember.computed.alias("content"),width:Ember.computed.alias("column.columnWidth"),height:Ember.computed(function(){return this.get("controller._headerHeight")}).property("controller._headerHeight"),resizableOption:Ember.computed(function(){return{handles:"e",minHeight:40,minWidth:this.get("column.minWidth")||100,maxWidth:this.get("column.maxWidth")||500,grid:this.get("column.snapGrid"),resize:jQuery.proxy(this.onColumnResize,this),stop:jQuery.proxy(this.onColumnResize,this)}}),didInsertElement:function(){this.elementSizeDidChange(),this.get("column.isResizable")&&(this.$().resizable(this.get("resizableOption")),this._resizableWidget=this.$().resizable("widget"))},onColumnResize:function(a,b){return this.elementSizeDidChange(),this.get("controller.forceFillColumns")&&this.get("controller.columns").filterProperty("canAutoResize").length>1&&this.set("column.canAutoResize",!1),this.get("column").resize(b.size.width)},elementSizeDidChange:function(){var a;a=0,$(".ember-table-header-block .ember-table-content").each(function(){var b;return b=$(this).outerHeight(),b>a?a=b:void 0}),this.set("controller._contentHeaderHeight",a)}}),Ember.Table.ColumnSortableIndicator=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:"ember-table-column-sortable-indicator",classNameBindings:"controller._isShowingSortableIndicator:active",styleBindings:["left","height"],left:Ember.computed.alias("controller._sortableIndicatorLeft"),height:Ember.computed.alias("controller._height")}),Ember.Table.HeaderTableContainer=Ember.Table.TableContainer.extend(Ember.Table.ShowHorizontalScrollMixin,{templateName:"header-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-header-container"],height:Ember.computed.alias("controller._headerHeight"),width:Ember.computed.alias("controller._tableContainerWidth")}),Ember.Table.BodyTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.ScrollHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"body-container",classNames:["ember-table-table-container","ember-table-body-container","antiscroll-wrap"],height:Ember.computed.alias("controller._bodyHeight"),width:Ember.computed.alias("controller._width"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),scrollElementSelector:".antiscroll-inner",onScroll:function(a){return this.set("scrollTop",a.target.scrollTop),a.preventDefault()},onMouseWheel:function(a,b,c,d){var e;if(Math.abs(c)>Math.abs(d))return e=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",e),a.preventDefault()},onTouchMove:function(a,b,c){var d;if(Math.abs(b)>Math.abs(c))return d=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",d),a.preventDefault()}}),Ember.Table.FooterTableContainer=Ember.Table.TableContainer.extend(Ember.MouseWheelHandlerMixin,Ember.TouchMoveHandlerMixin,Ember.Table.ShowHorizontalScrollMixin,{templateName:"footer-container",classNames:["ember-table-table-container","ember-table-fixed-table-container","ember-table-footer-container"],styleBindings:"top",height:Ember.computed.alias("controller.footerHeight"),width:Ember.computed.alias("controller._tableContainerWidth"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),top:Ember.computed(function(){var a,b,c;return c=this.get("controller._headerHeight"),b=this.get("controller._tableContentHeight")+c,a=this.get("controller._bodyHeight")+c,a>b?b:a}).property("controller._bodyHeight","controller._headerHeight","controller._tableContentHeight"),onMouseWheel:function(a,b,c){var d;return d=this.$(".ember-table-right-table-block").scrollLeft()+c,this.set("scrollLeft",d),a.preventDefault()},onTouchMove:function(a,b){var c;return c=this.$(".ember-table-right-table-block").scrollLeft()+b,this.set("scrollLeft",c),a.preventDefault()}}),Ember.Table.ScrollContainer=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.ScrollHandlerMixin,{templateName:"scroll-container",classNames:["ember-table-scroll-container"],styleBindings:["left","width","height"],scrollElementSelector:".antiscroll-inner",width:Ember.computed.alias("controller._scrollContainerWidth"),height:10,left:Ember.computed.alias("controller._fixedColumnsWidth"),scrollTop:Ember.computed.alias("controller._tableScrollTop"),scrollLeft:Ember.computed.alias("controller._tableScrollLeft"),didInsertElement:function(){return this._super(),this.onScrollLeftDidChange()},onScroll:function(a){return this.set("scrollLeft",a.target.scrollLeft),a.preventDefault()},onScrollLeftDidChange:Ember.observer(function(){var a;return a=this.get("scrollElementSelector"),this.$(a).scrollLeft(this.get("scrollLeft"))},"scrollLeft","scrollElementSelector")}),Ember.Table.ScrollPanel=Ember.View.extend(Ember.AddeparMixins.StyleBindingsMixin,{classNames:["ember-table-scroll-panel"],styleBindings:["width","height"],width:Ember.computed.alias("controller._tableColumnsWidth"),height:Ember.computed.alias("controller._tableContentHeight")})}(),function(){Ember.Table.EmberTableComponent=Ember.Component.extend(Ember.AddeparMixins.StyleBindingsMixin,Ember.AddeparMixins.ResizeHandlerMixin,{layoutName:"components/ember-table",classNames:["ember-table-tables-container"],classNameBindings:["enableContentSelection:ember-table-content-selectable"],styleBindings:["height"],height:Ember.computed.alias("_tablesContainerHeight"),columns:null,numFixedColumns:0,numFooterRow:0,rowHeight:30,minHeaderHeight:30,footerHeight:30,hasHeader:!0,hasFooter:!0,forceFillColumns:!1,enableColumnReorder:!0,enableContentSelection:!1,persistedSelection:Ember.computed(function(){return new Ember.Set}),rangeSelection:Ember.computed(function(){return new Ember.Set}),selectionMode:"single",_selection:Ember.computed(function(){return this.get("persistedSelection").copy().addEach(this.get("rangeSelection"))}).property("persistedSelection.[]","rangeSelection.[]"),selection:Ember.computed(function(a,b){var c;return arguments.length>1&&b&&("single"===this.get("selectionMode")?(this.get("persistedSelection").clear(),this.get("persistedSelection").add(b)):(this.get("persistedSelection").clear(),this.get("persistedSelection").addEach(b)),this.get("rangeSelection").clear()),"single"===this.get("selectionMode")?null!=(c=this.get("_selection"))?c[0]:void 0:this.get("_selection").toArray()}).property("_selection.[]","selectionMode"),tableRowViewClass:"Ember.Table.TableRow",init:function(){if(this._super(),!$.ui)throw"Missing dependency: jquery-ui";if(!$().mousewheel)throw"Missing dependency: jquery-mousewheel";if(!$().antiscroll)throw"Missing dependency: antiscroll.js"},actions:{addColumn:Ember.K,sortByColumn:Ember.K},onColumnSort:function(a,b){var c;return c=this.get("tableColumns"),c.removeObject(a),c.insertAt(b,a)},bodyContent:Ember.computed(function(){return Ember.Table.RowArrayController.create({target:this,parentController:this,container:this.get("container"),itemController:Ember.Table.Row,content:this.get("content")})}).property("content"),footerContent:Ember.computed(function(a,b){return b?b:Ember.A()}).property(),fixedColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(0,b)||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),tableColumns:Ember.computed(function(){var a,b;return(a=this.get("columns"))?(b=this.get("numFixedColumns")||0,a=a.slice(b,a.get("length"))||[],this.prepareTableColumns(a),a):Ember.A()}).property("columns.@each","numFixedColumns"),prepareTableColumns:function(a){return a.setEach("controller",this)},didInsertElement:function(){return this._super(),this.set("_tableScrollTop",0),this.elementSizeDidChange()},onResizeEnd:function(){return Ember.run(this,this.elementSizeDidChange)},elementSizeDidChange:function(){return"inDOM"===this.get("state")?(this.set("_width",this.$().parent().outerWidth()),this.set("_height",this.$().parent().outerHeight()),Ember.run.next(this,this.updateLayout)):void 0},updateLayout:function(){return"inDOM"===this.get("state")?(this.$(".antiscroll-wrap").antiscroll().data("antiscroll").rebuild(),this.get("forceFillColumns")?this.doForceFillColumns():void 0):void 0},doForceFillColumns:function(){var a,b,c,d,e,f,g,h;return h=this.get("_width"),e=this.get("_fixedColumnsWidth"),g=this.get("tableColumns"),d=this._getTotalWidth(g),b=h-e,f=b-d,c=g.filterProperty("canAutoResize"),a=Math.floor(f/c.length),c.forEach(function(b){var c;return c=b.get("columnWidth")+a,b.set("columnWidth",c)})},onBodyContentLengthDidChange:Ember.observer(function(){return Ember.run.next(this,function(){return Ember.run.once(this,this.updateLayout)})},"bodyContent.length"),_tableScrollTop:0,_tableScrollLeft:0,_width:null,_height:null,_contentHeaderHeight:null,_hasVerticalScrollbar:Ember.computed(function(){var a,b; return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),a>b?!0:!1}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_hasHorizontalScrollbar:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_width")-this.get("_fixedColumnsWidth"),a>b?!0:!1}).property("_tableColumnsWidth","_width","_fixedColumnsWidth"),_tablesContainerHeight:Ember.computed(function(){var a,b;return b=this.get("_height"),a=this.get("_tableContentHeight")+this.get("_headerHeight")+this.get("_footerHeight"),b>a?a:b}).property("_height","_tableContentHeight","_headerHeight","_footerHeight"),_fixedColumnsWidth:Ember.computed(function(){return this._getTotalWidth(this.get("fixedColumns"))}).property("fixedColumns.@each.columnWidth"),_tableColumnsWidth:Ember.computed(function(){var a,b;return b=this._getTotalWidth(this.get("tableColumns"))+3,a=this.get("_width")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("tableColumns.@each.columnWidth","_width","_fixedColumnsWidth"),_rowWidth:Ember.computed(function(){var a,b;return a=this.get("_tableColumnsWidth"),b=this.get("_tableContainerWidth")-this.get("_fixedColumnsWidth"),b>a?b:a}).property("_fixedColumnsWidth","_tableColumnsWidth","_tableContainerWidth"),_headerHeight:Ember.computed(function(){var a,b;return b=this.get("minHeaderHeight"),a=this.get("_contentHeaderHeight"),b>a?b:a}).property("_contentHeaderHeight","minHeaderHeight"),_footerHeight:Ember.computed(function(){return this.get("hasFooter")?this.get("footerHeight"):0}).property("footerHeight","hasFooter"),_bodyHeight:Ember.computed(function(){var a;return a=this.get("_tablesContainerHeight"),this.get("hasHeader")&&(a-=this.get("_headerHeight")),this.get("hasFooter")&&(a-=this.get("footerHeight")),a}).property("_tablesContainerHeight","_hasHorizontalScrollbar","_headerHeight","footerHeight","hasHeader","hasFooter"),_tableBlockWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_fixedBlockWidthBinding:"_fixedColumnsWidth",_tableContentHeight:Ember.computed(function(){return this.get("rowHeight")*this.get("bodyContent.length")}).property("rowHeight","bodyContent.length"),_tableContainerWidth:Ember.computed(function(){return this.get("_width")}).property("_width"),_scrollContainerWidth:Ember.computed(function(){return this.get("_width")-this.get("_fixedColumnsWidth")}).property("_width","_fixedColumnsWidth"),_numItemsShowing:Ember.computed(function(){return Math.floor(this.get("_bodyHeight")/this.get("rowHeight"))}).property("_bodyHeight","rowHeight"),_startIndex:Ember.computed(function(){var a,b,c,d,e;return b=this.get("bodyContent.length"),c=this.get("_numItemsShowing"),d=this.get("rowHeight"),e=this.get("_tableScrollTop"),a=Math.floor(e/d),a+c>=b&&(a=b-c),0>a?0:a}).property("bodyContent.length","_numItemsShowing","rowHeight","_tableScrollTop"),_getTotalWidth:function(a,b){var c;return null==b&&(b="columnWidth"),a?(c=a.getEach(b)||[],c.reduce(function(a,b){return a+b},0)):0},isSelected:function(a){return this.get("_selection").contains(a.get("content"))},setSelected:function(a,b){return this.persistSelection(),b?this.get("persistedSelection").add(a.get("content")):this.get("persistedSelection").remove(a.get("content"))},click:function(a){var b,c,d,e,f;return f=this.getRowForEvent(a),f&&"none"!==this.get("selectionMode")?"single"===this.get("selectionMode")?(this.get("persistedSelection").clear(),this.get("persistedSelection").add(f.get("content"))):a.shiftKey?(this.get("rangeSelection").clear(),c=this.rowIndex(this.get("lastSelected")),b=this.rowIndex(this.getRowForEvent(a)),e=Math.min(c,b),d=Math.max(c,b),this.get("rangeSelection").addObjects(_.map(this.get("bodyContent").slice(e,d+1),function(a){return a.get("content")}))):(a.ctrlKey||a.metaKey?this.persistSelection():(this.get("persistedSelection").clear(),this.get("rangeSelection").clear()),this.get("persistedSelection").contains(f.get("content"))?this.get("persistedSelection").remove(f.get("content")):this.get("persistedSelection").add(f.get("content")),this.set("lastSelected",f)):void 0},rowIndex:function(a){var b;return null!=(b=this.get("bodyContent"))?b.indexOf(a):void 0},persistSelection:function(){return this.get("persistedSelection").addEach(this.get("rangeSelection")),this.get("rangeSelection").clear()},getRowForEvent:function(a){var b,c;return b=$(a.target).parents(".ember-table-table-row"),c=Ember.View.views[b.attr("id")],c?c.get("row"):void 0}}),Ember.Handlebars.helper("table-component",Ember.Table.EmberTableComponent)}(); \ No newline at end of file diff --git a/src/component.coffee b/src/component.coffee index 7bd2d6ec5..ccdec2e5b 100644 --- a/src/component.coffee +++ b/src/component.coffee @@ -53,7 +53,7 @@ Ember.AddeparMixins.ResizeHandlerMixin, .property 'persistedSelection.[]', 'rangeSelection.[]' selection: Ember.computed (key, val) -> - if arguments.length > 1 and val is not undefined + if arguments.length > 1 and val if @get('selectionMode') is 'single' @get('persistedSelection').clear() @get('persistedSelection').add(val) From 29c7e8b407ecd430997ee4deeb1088d7085281a3 Mon Sep 17 00:00:00 2001 From: Alex Zirbel Date: Sun, 20 Jul 2014 17:24:51 -0700 Subject: [PATCH 10/24] Improvements to docs pages * Add community examples page * Clean up dependencies list * Remove some unhelpful descriptions * Reorganize pages * Add migration guides page * Fix sidebar covering footer --- Gruntfile.js | 8 +++ app/assets/css/app.less | 11 ++++ .../preview_server_side_sorting.png | Bin 0 -> 116757 bytes app/router.coffee | 11 ++++ app/templates/_footer.hbs | 23 ++++++--- app/templates/_navigation.hbs | 4 +- app/templates/ember_table.hbs | 27 ++++++++-- app/templates/ember_table/_sub_navigation.hbs | 7 +++ .../ember_table/community-examples.hbs | 18 +++++++ app/templates/ember_table/documentation.hbs | 48 +----------------- app/templates/ember_table/financial.hbs | 3 -- .../ember_table/migration-guides.hbs | 47 +++++++++++++++++ app/templates/ember_table/overview.hbs | 40 +++++++-------- app/views/mixins.coffee | 8 ++- 14 files changed, 169 insertions(+), 86 deletions(-) create mode 100644 app/assets/img/community_examples/preview_server_side_sorting.png create mode 100644 app/templates/ember_table/community-examples.hbs create mode 100644 app/templates/ember_table/migration-guides.hbs diff --git a/Gruntfile.js b/Gruntfile.js index c09bd4a40..8fcbab9fb 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -220,6 +220,14 @@ module.exports = function (grunt) { from: /Ember.Table.VERSION = '.*\..*\..*'/, to: "Ember.Table.VERSION = '<%=pkg.version%>'" }] + }, + overview_page: { + src: ['app/templates/ember_table/overview.hbs'], + overwrite: true, + replacements: [{ + from: /The current version is .*\..*\..*./, + to: "The current version is <%=pkg.version%>." + }] } }, diff --git a/app/assets/css/app.less b/app/assets/css/app.less index f4e92cd1a..b2c9c44f3 100644 --- a/app/assets/css/app.less +++ b/app/assets/css/app.less @@ -93,6 +93,10 @@ h3 { h4 { font: 500 15px/1.5 @sansFontFamily; font-family: 'Univers Next W01 Medium'; + + &.byline { + margin-bottom: 2px; + } } h5 { @@ -126,6 +130,13 @@ p, font: normal 11px/1.4 @sansFontFamily; font-family: 'UniversNextW01-Regular'; } + + &.byline { + font: normal 12px/1.4 @sansFontFamily; + font-family: 'Univers Next W01 Light'; + margin-top: 2px; + margin-bottom: 6px; + } } .styled li { diff --git a/app/assets/img/community_examples/preview_server_side_sorting.png b/app/assets/img/community_examples/preview_server_side_sorting.png new file mode 100644 index 0000000000000000000000000000000000000000..1ca0910a326eb3f51854c24f9ee92c5504d20eb8 GIT binary patch literal 116757 zcmeI*2b@*K^#|~~g(_eHu`7sOv7^}Oil`uhEgI=X0g+;lz4sn_!QTIB?7hcmh`mH( zFvb>5qA`}(_O9&bIxzhoS8ds-pq-8cG$Xk)1{jxNz%OM zHr@LA|Bb)%8khS#@SgHsNz&rOkzKp?>Djewn?B?A9X4{*&?MQWdD-(V*7;1{^8?3@ z9aX+al8hcRVO-y>yR_MLx82(`dOK;9G*4P3Wyxj(2ag}yxlf<%u&d?y@>O)6m)ckH zs)eYwSK^uAT$>x5Sul;JZx6COBlP|9=Qz~N~)bWu{p-A0ZdJ8IxT(<1fxF?!TQ zcujkj_t|XxK09gSq&3_Q96Yf5PQptHpEhD>&+UFpzh>-&E>(t6mHxoU2|fD>w-SDN z#Kdj-{}}#o;y(R53ok4EyM6ZURYeb{@+HR%+M&1bV!|s89^V!ARdtnbbnu9NyZlJA z-H@T(x(ls7)irs{s2zUPrTp*1#`UP8sY?H5==f>+R>?ME!iav`NGEf}A``~- ztD>P}#j?Xj_UI{0wu*H}jN4{|2GyO2Wg2j_F^8VO9D`Lk4!M z!WJeK7biWEfyuaJXfh}nlYEr4Nw!P6Cf$DgY$JV)w86=~$tZv0+AKUhr@{LTUTE;Q z2Cp=j(%_BhX-fV`myAq?2nVlBdFeYP2Pgl;b!akvdTo_US8iFkS><*=UA zx*x6k-SqN5Y22`T!)^_?Y1pIT>J=wc+)?p##iJF^R6I~|chaWf;fi}Io~wAUD*U5d z(`y+hr3#fQgvTenpg1&{I4w42dVMpXG%=<4kwc3$T69SIDm5nAN8ZS^hMlKLJ+c~? zi6{oCac{J}()RdKuF6%Q+o7^c;Ugxr>C9UWU8_ycF@x7$tIhiBuD4-Q<$J4W zlH~K&(|l@K>p%RIw%;R3vdKyMXO-J)Q$>{|1KTCZz3(SU%P)UQYxf`BfUkV;`N0#% z?H_cNRsR|!O_PQ7ilvg}lXl5!5LrLjDA_FOlypzFO?oH&lHHPDv*8iRXc8Zg9GV=N z9G9G&oROTHT$o&zT$x;#+??E=+?_m-JeoX}Jexe9ypp_`OiA8LK2APOzD&L?D=TYM z*1W7`*-~XIl&xI0X4(2>9m}>X>t429S>LkV$_A7TFB?-fvFy;YqsvY%JFD!%vMb82 zFT1Vm-m*u_o+*2w?2WQ_%04RlPuVx+73Iy!Ta_{NwU3Dw2wYDq2^xt!Q7-v7&25?~2_khEA6tB>VoJp)75}SjSlP0&O=Wv6xlLvN%E6WURUTG(O67%>*HzwC z`9$SQmG4x3TKPkR<_(r@ux5iz8}w|jYlGnp4rp*(gYz0()8NhqPwLO_HTbe&!-lOJ zuG(;8*1lWAy&E3V@RWv^G`zLpBMo0@_-?~58Z~OPRHHQ;ZPBQAqk)YkG&-))1&wZM z^l+mW8@<=)>&6Q;UZL^&je9iSz44gFM>RgL@ePe1YW!m34;p{lWRWH-H`%mF?5)y(Z+c79C!4<2^z(%lT4=?EHd$!L zg+?xP#6ssU^nVNeexY|3`d_ofnyt~SYqLF?O>A~rvum3@((H|9pEqybe3j;%n(y9x zLi5v_U*G)k=5IIux<$(tYq#jxVn~a_TU^xQt`;x0_}9Ws7G8Pb&I|u~;e!`GZ{a%@ z{?o#rEYf6=RTk;G$iPJoTjZie?p@@yMZQ?H<)Z5?+I!K_i=MLR4U0ar=!c6nT5OfY zx-T|lv11mya)AD;S zf6np`E&tI9Emzobg^??qv%TTC{dUDw zSM0yyQ7hiM;$PY|ZP&5guy*IPd#v53E3L57_A4E_(v2(qdF3W6cU*bI%D-Lt>6O1) zWz|)7S>^au?q21?RhL|~=c)&X)qk{2JwJ zbXa4=8W*kcr!~vh+-S{_YhJSE3u`r4Ym>FctTkz^*V;F0-?{z%?Qd-V&f2Zl-fr!q z*1mh~f3369I=ioP<~mQW^TWCw)*ZF(RqMXF-eT)*yWUaj-M8L<)?Z`&!RueN{>vLQ z-=N0^hi`Dt2A^%X=7vKzymZ6YJGAVueTU;aJl5g+jW*tB+(x%-^wGvEZ9HJ(i#L9) zW2=sRI-b(;_nS1>q{}9UZ}Pw<|J!t&DY<9zDA8x+t=0i8XYV&uu zSaFMiTU@cllr7tAIbh4nx16$7+pPv}HEFBAb!yjXNT+K$eb9OJ&U<&hsq??OtlMQ= zmpi+B)pgUZzv=o&w~B6CcRQ)ukeBVvh^d|G}xxs zHfL`0TF>Qr4(@q<&ri4Ac-!A>`$Vs1y>{w#VXwb!x5jqkw!3fp^6j_X{_O4F+F|7# z#_Vu+@1%Fn-e>pzOP^Ky?APc19UJc0XUB_ne82B{eGl#X^iC~z+H0p9cKWhkmwu=B zd$a#){U`Q+Z0Ch{-ec$Mcm8UZZo8bd%amQ$+4VQOKD*n}yN%rKp4}VmzVq(a?Eb~C zy8r6jU%j_ShdqwlDhi@_b?BO4c*lNUiBR(0~ zb>xL3Kihkoy)WDQt9^R!bL~D;N9{7|*3pee4;X##n8n8IGvjmNb(ZrpLN9lzP}mz_{~!pIXQ zpSZz^7o7ORNkdNh!^!KOeBR05oig~8Kb*SWspp?M^|WE9O+J02(=R=v;TdDjc=gP! z&b;odMbA3;tas1e{_MNXX>-m==lu8Fz0Q5+ybaI0?6*ySJMp(u&fo6*doEb%f-^4o z?!pllzH(8Qi*CJm*^5uS_^V5XT=L?joi4rQvgIy2`Lb^=A9?xfS8RR7U6WRsbl#N> zuiXF2_pjRds;95+c=h$yEPc(%*L;8Nm}{q8*Y~<7uHX3j>u*^0hSP5>zj5M?AKkRa zP0!!l?dE%KX@AQVx3<3Z@HIV{bmb>*Fs!vEvhypX~MI@1N@N)ZEU(S1b*|#VCb@jjA zI%T6N55Cjwo#+0x)8F2FcksI(|9$-5zkBbP_nW_e-UlmuaQ%ntfB3*hJwAH=AHVv? zdmoSe_}fp8`{$zny!c^7&GqU;Ez;|NGb%eZF}6 z%h6wc`_)NbFZK0x|Lgd_r@z_dn-9J{;JZfOo&Wvn-{1E`uOHr;I(q8Vu>;2qoHiGz z@L4`=Sd#qbTJJ@>nL9k6Bu!hyyU{d?vUr~pF8lGXD!CvW?@v`3<`BuXosy*g5lOP$ zBS~_pzmOLd!k0(u#jgk~T@tZk_ubSeCRp^5etGzW(~_ zEW12Brx7q+{P^RK)w1~Fi%*?8bxv28^Uoqso{i+;9DxNJf!y2|?DoyIn*o8`+-HCz zk1W^-s*(;crsv`ok`aNB4?sWt_@hxcRY0vlHe_tcbf|tnFfBoxUfAPf^ z^rqc}2@~w947g@PS-5$!#f2krR=F8}3Rul5ha&VLRgobsWG+Hbg!#;5v9veeeDj!N zj)6A%4?g(d&_fT6aFOCOYwi^l)Ak^h*GjK%(e2SkAN{{+&#SM#T9;NYBJmu`q9B1i zv&5fMIs5FhUwiGf(@s0hzFuXsmO4wU5bH4SzWeUq|NeKKC-qyx@4x^4-~RTu=uR`q zQ*jpX-h1!;```agS=CrJv@Wl`Wos;D+ZE;ntDXx1mLS*j*=L_+Ymd4(h`OK@H8yM3 zZ2b7~H{N*TGtWE|HD)WSE>)yV+f!d#=CsCZ+_>>}+ieHyd+xcXZQHhk1`YbnZ+`Q? z|NSppNPTj3FGdrZMEAJsuDhBxZ91z^W;xHDu;zK|t+yU~?6Jzq%E5yN^Bgl%uTnOC z{r>mAUw7SgpL*)4JMOrnM~@yeS++WV+&=&O^WApa4Yuc;bIul9Y{5Yyd-mC94?5@| zM*oLD{DFAY3sz6j1n}Q`@4Z>Pvb*fE%QxRt{h+SkiIzI^%rn_vpFVvSS!9u!Y$*l* z^rt`VyYId$ue|crS6?lfEy(PifByLa0|sdN6<1vGrkidGYa#sg*I%#uEwRKBs;g0? z0tsu2s^Z{-58im=je&O3Nhe)()m5;X8RTpA)=?8paM4XS-E`Cc{O3P#Y15`nfuQ_4 zLm4w>j9lHlQ>RYLF1zf1|NCEM^%IF%R^;>GDL2xEBdSM5mh^Nel$91&uP7S1DP@!r zEpUEmdN2@DUpZ~9a{YyBlLY7BeDQ5vG!C!hRYL+0vT(}XB_hlHyJ%d%Wwc=1ZH1s}oN=agROrSai`viTs!Qr!*p33UwGk#7A;yZ@!$UTw?KrB;iiB8{(=5q|N7UDKKe*AEWPy7`hDOl z1>0qoSq3!f;$zlXXPr+!{q*IRU&cHr;fobt#ll*)Y{_{jOOn-ATkVriKH-@0H1aI9 z)KbX6LA-zd^PhkD%U{%M&+RI!tb!F9jS42cQ2=DxY^9Y}LZCV+3=0`$sj%?E3xD|G zhh+QetFJ^Ev`@Jyrex-{xLzr0F>2p@^UVTyrZlq}Ah{|$SyM<8aZ@RM=?*T_MK0eA zYOS@_k{((U7|5b)ue~<;Pr6!pf;tDIQKtZa3RAWI#LFz+>52pA#@4TZFJT()g zqH5TxRH@djTPso^XDF+b;xE4VBBN&*#JlB|TZRoAMkMLlk;~W0Y>B~0j8e1osT6BG z{q)l@{PN2$wIJlR^~^9SX6__DL^GjHh#)Z4Xd*ON~^nW)?zVd#Q0C@|D*3NV$cI*Bw=ow^DL>M=?e(#9kKVkD#p z#kDut{Lb&9i!RbkFeC|IKtZ_#P|Daaps$r?3klrYZY#*Je`eA5v}9C7#E zcPlGbi}&i)>&PRI#8B7TYp=byYMKH{LxzmJ{yg(U7 zEDH@vS?U&GqtG;;kz!iUe0dbD#o22o{^P8(&XNThQPbAmy?e7KAYus39e3Q3cVTB< ze_0it+DUbu?YG}PvM@1y++l|uVl4Cip!mJ_-pjZ(p?>0RMvCdR>0Q*tpmE!1qm3-5 z;7O!ok3E((Y`g8Y2rxhHxZ~QlZ-3#17m|t!TFca&cmoFxBn+DDGm|K1i_|e3!w#=D zbm&lu>;K^5Xt+AFDgBM`Oj#Q-h;T`lUV7;pZ@i(1UhM_LNCg}-3TU(P=n`JZ0CLSW z*Dz2L^2etBOp|Yhs#=ad`e-f421bk+0a*Q^y6&n2+S5-zjc1oGT{IIKek$fO=K98J zDY~K=h}Ntl6thvhm^adC_S|z%1CtjrMsWDyhwG8%Eiernqdt}`%2249rqe1+9}U!i zi$GaDUcf-c4|$P=ogzF3|73*aw)p^1o^r}5Moi-dkHVBSPjEIGJow;)1W=Yp3|AZT z8OtrVoVgP|>J3+?w;XW50SFXf>s+;WP)wMtfyE4xROoNJ?KaFw<@5gg@7K+C-E~)% zAxl3r*JSI)1i6|}MY92M{T88u$8u-So>iw;FrCXUzufB}H$*(0fu;=IOS8@pO~B*G zr4H8sTb{zyMPo5O1Lg%6TmUrmynFZV-FXK<=}Vf){O6&E9@0__mlH9aW3qkw_LZe| zv{8X-(oLmI2h2z@)UWgtiMkmFq%M9(6T_d^V_g&};4r77#mrqBQ`-`l`6APy20#xy z@IbyKHDwYrM|d$2E|7X5F{|?K?9(iT+vZbQlDP*;jj`sMYYJc+!w~b;*QLWc!n}yu zjTi;`V~9rW;Tz1?SuG|?p(G3mS*o@)Q!>4SwPr>vF~G%^i3D3^BQZYHy41qA8GLA@ z?Nw(gEX6!0RXin51LO}eq-4V>!Au4SL;mW-5R>SWc;@S>pk0R!9n4{*b4k=Ou@ROY zKt&OzdFrXB{^KA2@H*r@hq(u^DhdKcg!u(L6*QMK8cWog&@+Uxfxy{lj}qXT5|U`L z53x-n^$Kjg^oxQ^L2HHPy1JsWS^D}4XW8;fX)9FcU(DPIZ6%+BG`%zPV=+vP@+n5x zsfqQ#mx1zvhCEnEhdyViV%{2LQ3P>d#Ej6u1;a?hAr%hj5mqXziA2S-iK+1gf1e(# z7(JKPuU|jT4Co%cF{+m3^(*C{RvLj216#(;lW8Y?n?v%3FnaXp=bn2`U&s#-DzF|_D@;`KXd_Vs(er%@djdU*c)7=I z_uY3lCKv{vc;bo3iqDW=UBS?-COS5CbPUXm#wrD40FIJ^1@fzoRQ$Ihat*%(i&EH1 zH*`c1#S6;Lb`)n#95{zAvD#4^!=H?-It2v?t&4BH_0|S`{brkOw)x%feisHE^jd=F zvrxcr%?rKOFlBQ!a|r~jgt_Z2d^~9`yX-PykMUP7SELP6>j`m#ZEc^$X|RH|w(+Td zdTlj>^agC$HDm|MVH|0tX+@Eumr5bFsk{!e!3G;xDmI!MohX#oVUSVYo zeF9mHSc_i7HW-{-&lzXjf6D0}P2US}22s6HsL}V3M5UBZbzw4lej!`CFafl+zUplg zL+=dc7olJQWkid4dH`9fqYOk?v*tG)1XBScp1>>uQtH-VCe13=65ux7G@0XNy&g@R zI8jH6p2G`r24+pl1_bH~DMdX|g_OW3qQaiEcHva9l#+P9Wad=3XVRMa{Q1v+WSC`5V0Su{QOy6v?%{JU{L+^Yh8???! zTTrBW6cfUqciwqmVde2P6Kf-qR*+5}jwXQe^^?~gOboM3jmI%LW}Rj)UX9Gi^#K+T z+L==F1@WHq`s=S7uZ*$G8n5&qV!{Cx(DgaY9UBH4?I=!_NQ(j$yN*ak)7CJ!B*^tS2I%(3R@GgjH3!3%T zTMyzWL4zhV7uE)Ns>P=^4&V?lAX(8FA`7@745?7!;L!|TH`#%zP0SSJV>D7Qq(~Tz zs1_1c7L8#6WELW{C6O%5t+B=$qSsw_9RgwgsWu#mgo7S##n$3xe2pL_WSjX<+A$QX zA}m!Yl3*finDt^EeAGp2T}$^<5x@-v`lNJIXY09gO}l;Zr_Y<31Il`Xp@2;z;902& zD|R0YeM5Q!l7_O{{Lc^;SqiKnq&@(eYH|Q>CPhktF!wX?d5Mi0_7# zg|km%CNXdTpmhrpqG15|M8UdzhMibxfQFSQV={{^!tiI#p8+?am8Y99J0N$B><}rh!skNsX(MaM~bjSr4UCJfJB+NsH($gqCZ3!SWznYL^K^_!y*Y8^9ljA zC>~;K(GVUP{%I5w>1kA$c)_7S;3%H`RJD1U`5W=*V$#eOL#ixU8YXs3pL7q*)ATeD z!iUTOT8I~bcsVh%H=Ocnp&gK+hix=L@C=us*F4~7M;5Q$WXHWf`#6)s{+QLy+YW%VM1nBfRkFflaggu+D%{*1X7DOp=q zb-1&X#dEWi^%9OYs|%}{;gF?a5KJL!Z3VUethon$041EVVrT5eQllA*F~@tVy3*XV zmMA#$>1n}ipf)CGvdU(Q%-b-jfRi0>4ncT*|K7cL zeR-~iDL$Dg4iPuzVe7@o^4uB`sDJNXV>NkVeIcN?cx6(6^wclHAJc|faZBCrUA~|_o5wO(> zi{cxb>RLx$z9s}J?V_wHJx`lc2=MOql;dtodhXrl6w0;mt&F|6wdCf>^^X8^56pe$ z=3f8!7UfvA8NVn&o>|WbF!$Is4*A^N>lxgiWB224DSnPD&#zAe>{-Vy-{DxFn9dxp zd?9k?aLTC`2n2F-Um%)s1|@cWeXWrT_FjM))Sc}}t0O-?EVuvJhA%HzdI;p^UV3eo zOFY{MciJD+f`;34u&74kI<0&|}Idj&zeGbcUN}rR? z+O};QRVe78qeI^uo#w!8{Pm3?LxwmNO4vD92&4#O?nLB$_Sq*DukL}uvv}*yaZYn^ z#+K8@o%{|UX5rXY2f4vWi_Yn)>x+MEqH$P0n;eJ7?N4AZPnI zG|q8%PN;WGWn{%?oU6xPmCb&s#a0C<3^*M;LMy&KMsPY|7hIBxkW8WR%<-!E# zVLBI#-KSp)D{gbAQ}-MPYGXvUBI>BxN%Rg=6mZ_K^Z7{Y?g-74Dy!9;3+6ykr_JKV zxb;%4=_o|qKtZ{}YShXult~NLLqL5c^f&>Rs{l&K>Tsoz<>+PCk%aj=+FIL3$Ci84QAarq)J;D+Nm>eS#X+?27+_v&YfLx5Q)y`bn38P6j4`IxFUoi z&aZd+U0N^=IEt7@Powo7D6zS_(}j6Hr^?0Pu9-PJXCS9XAl8Een0G8VRQ=WgqwK~L zCoabkj;1jVtL49?6VP=#9K0DF7f5&3<7isDU5y4=@tKRLtZv=9v9lBnmDZ+fVlU|hy0*7AekPfVNre(pf z5CqbV(kcqcQ?~ULD6zS_(bM$KvA!{NaX_aNZMppVf@2=?(flSG&Js6IAOA(iI)m%*unUQ)MII?JFxxDs##C3W{e_(*9%8 z<<-{k6;}fWXAIM_X{Bc_o9(@oz^;dn&$A>9Nc zMu4>H0vyux2*8BBa>-u%j0O@h@kozuV38-r4HI`Spax8HssbiyR4LV&u9%j@bPFqd z+*=a^2m)(FE+{cBaYl$acvmHu(zvWL`_7v3oF{>jG52U)b6M9zX!|e=kXh64o1uAv z-JGbD2el04P1MCGuHFb+S5YV)zBZshQ{-oAXdII6I%n^})<6swRtY6?wAeDrop;_@ zA~Q9Evg#ts0-`q}ufM7j)eRVQOsmvuhRvYeX`l#ON8^(n>o$l*@riU%D~V=kW5AYl`CuY>xzNu8*xdW7R*o7z6b;$*kn9?HWVtrV8;H@#6>PQ1Hmm7rrBSeWvdaG%>p7q2YF8%3gPNjPEce|i$LZS!pKgURsjx(20sEzw zUSh1=us+YEpb_0ZwDV$9zu{M51q+tbcoLFh{a5YH`L&f7+c~m|0L= z0S8gWYRW`f*G6d_!h4LpjJ1F`wcUbrJ&GL{7`>imp(&-*C)Gk=k3@^JZg7imN>f{) zB;WJQBjZa-4R2hoO}F_ry|!;y=~exGk-txEn!UOun?p61i&=G6N9JxiI=QUU=+qa(3JE5C7TPMRCC#R`3zSUtejx$^>h)lUj$@D%YzE4_dN`91n}HeJ=& zYUp4al29|E^rCng%@(X4E=hBzye6lN_A5odUYogdrPW8|SP+bs(;33_YgAk!4qoD` zH?tI3thqQ`2#~=RtC*#vtU|Whn5SeoXq_|~0j$y<8!4ekG-8&x###yzi$}BEs)tL` z+^efmS}C=edueG=iqe+Y+`SYb&Sjo|5XjAa{%MO`k~xk*ZtnE}@z#Hw+GF}&fO=q; zvzRLgGjgMg2?$C3>Yqaj+j1H#|l0SBrgZ5%t>zGLVD-a{a8~lTSXeF~}xt zQ9sJIYmeFywL8>Ca7_|XdxQNTNYt+reA+A;_YOwX&oS*6O><@W4QLv*l|^w?V1>WE zhklkHQ5LCERg02}Fht6t|#w(vc-?GS(NMt1PEd%P20#^wUb#?qAV~5 zXo@JPcnTV}S(H?&fdVDM1WFMNl!zU$P=q=uXw-~-I{^z2vM7NFP$?|3z?eqCo1!EU z_?m$50a}WZXrQF|Elev=f=2BA50rc|tt?6frUj(})5@Y0riDp@ z2tdSwDQF@}=z^&9Y;J8)1#wGri$w9y=8BR*SuL%ihziV1lwzKgc$T6n&6Z7ZhdYQW1&|hj1^;YrjVPsx7eNUQ1-V6FDF6-s zEO81NvZ|k*>xiV(Ya`%OSjxPOX5}dmuO6c>9ed8P)As_@h3)Jirc?}54zEi&q=9IH znUA7Oo2)Ln%(=2Nugjb>!kI^1KBMf!y2|um;W5DTY99?#0l_^A<1! zO7c)H-xb8y1-_Vw?A5udO-?I`~N~ zn4q@{D0-XJJ{UzV`rG$tb+`0F8y;f zmp=VQLO2z2Sx%(Cb<*UvMI+-oi{>s>4hbj8Z5OI3BgelO z_uV%NhU5rb&f~01hrg-|S<0WSqlrgnaOAujrmBlN`zfuC{P?gEvwt{r>C(k<&5qj_ z)`D(0eEjjpo%$C3V)oIP*CjPH18~AFV{>>lOPDlil7q4x_v^e=+R?Oa+qOl5ZYK2K*FV>0y%BA z^%Mw91-G-groi@CUX_A&;5y6t=9_Ou>4Ld;m@ z#xRibfA-mD+qZAeU9w$?Og7ER1{@9VMky%)=J@gB9XTEZQt%A6T#PffrB~+@Db5={ z_Sj<)#6DDa^|AHf!0-%uyoajNMGr zr%xY-l2wb*h&q`1$Rm$*s(Uu8dYCJ5IJR_PvOlv7JJrD(DcmsQ<5_rOw?g3@f@S%H z3F@VL?zv}_QpDv9$_AMc!yQm2O{VB+qAcNv2G5B4tX@U7y4eVqn7R8sfCe`3r9dza zKTDVm&F8lwjI39$UTlTYkWFK|T9_~A#YHLZRW{XHzyuhvECn5u&FCG7A7xY3^cj<9 z5Sc}r0;RK?X@|4ImFEU;6>J&VE;-=e}nYj5zIISgR6$a`@8vKz&)%iKf z)mLB5D+Mtj9cHc;jhGcCWi_V*KM6gjYpNIi4BZ3kXahXCnFYqR2ShZYqpM6@MQpzA z8U*Q5;;N+-#;oFDd}vZwkn!{nKKP(Zf_;zZboD>8Bu(^YvIf+uScF$zvcUKZo`lYJ{AD8fvN_A#6jM$5&+^}7~ob|`= zU4xGsNmOJV(yN6<6)yvBv=4!UV4i=Ln7O+%%Oy@$X0$ZNV?B$1(s;sQ7V{j?*%p8b z^g7~*BdoAnQZ$IMxs;pfvYx;kEy7B-T%!X}ynrmF7tm*{B*t1E@8A}0p2DTvW-K`H z%2{GzOE<7}Et+wFt9F+?Y}4YVF)ZHOaJCe-Sw3Oe-i$5IxOq(nlai&M=i#3Ko#&#= zi~ueG_5S37aw`>Xw`CmQX8QBVSUEE))JDSuO^#WZO9w4qm?!ue&BMeQP4C{lDc-GH zH)iKsCSM9!fi1Ylx4@6`wOehql?6&q$BrGnAX?ZF=9R0%rL!?*UYxmG33X2^SCYML zlCvjak(GOTVQb8B8UU|kv54?yGCobus%u?iPr$*G5(f>Dj1qCwfUHrYMtL7_HUgPN z-BfFd*1~Q?)3P-NO3b^{-;0-TSX@vi%!~MDq~JcR8ugsd6X~LvwV7{Wd`%P5GB3{C zH<%{h#x9c(3oOKgrgW4bSyUoEG13r>&>&1;`3ATVYL@ox^CPbWT58{N_QS+56pg!5pSQ z@zh3Z)TelE6sb;=rc@8qSWA(_ltY%L#>6Z^y@zLT74^=2PB6^cI{qbR>$8nXfnP6B zyttn$o*N=nr%6+)2WC}^ltZ>)jfq);dJmVLxz{@cIm2HL0=c>Wa@soAwA5~v&s!`< zpe_jH-n}m9w-XT?sY*gFI!>=MFPkG!cLaXgqhm7zcJY}8=3z7|kMR5utru7@ z@kM(2U3%zMFPx`=^iw0wC(-&+4WGKRsyZhJ7h91cU=tFUiboLyvCqJ?coa`npurY> zktnh>7iDeH;FIQxdg>*r(kv^{P%WgARa-O)rn#b?+M;3ZSxphw7FB6BH!B|g1yPh) z915aYV&U12Vw){1nrf={f+)%~HwqSsre)Cx|73-$i+(7o=@qb5>cX$sB;AH z!3|Hj`1=i*x+1D}GLWR|PPHVlo!Y)<^0~H6)Q_^`x5E*&C)+k?=@E6+oI@!@U2*5r zuWVxbVMJ|JjeF@LYFl~SOBYdm;&(b&!AmrL04@qa=LJNRRD`i>w*aO1IUE%zLY)AO zzJ5?g*+2;_Q1Yw16s2iDf?Gs7X(h@+5K%=GR6IZ{KuL9)MqPmtVTeSqh!T~+#12?Q zsY9uVQZqnHQHtL*MHEDUN-+dr7A5e;m50F!A5DN*6n{;Vf<_n(r}^ZPDr;H=D2di+ zT7eSv84`0!Q4)qyzyhV>rd5Dam=;zuYz!uPI>-{Y6r;qRjb|=v8r{#2Hs*4@vw=*u z$h?xa9_yXqXCGNxr)Mcfv&}Q};km47x~+FE*E{oo)JQq6q^-w#XJwV9Mhx=A9D&k7 zAUF5YX{%h)IwO#qdz~T78I%qJxw)54Tji408G+o~>kMJeV7^0O$DzT7J8dHwhaGF^6K$dMbJgc0u zWwYT~;RTyyXy?4Rv{GL* z+FD~%ii4J%)@z?k`b}-nfW`5eojZ5Nq~Kdg1a^`=$K40cc1`(2jiMBEVrJX6ZH4LU&JX9~;YkKG0zNTu zG;G0%d<8Pka#Ve#^;~-CrES`@aRjdRaNw=GuS!dP(y}K{jbc;Bv8itL@Hpty8Suy$ zflpVIu^tDAIwcg1o4^V<#N|g48C*8Yt}I))82X?=gQN$yEP*havpuVC-@dHSal!cO zQA*jk#@3zT$he)u>T!B20o<-*!t@-alZqt9fB+BSZxIlKm70l{&kF2?FlQP$F4Vq?&i0U+4;+QzpZ=#Eg>yxGx=EWH(#X0r+?z_)Xx~?m8EHDD}L6&|p zCg%e?5nD>u@=^kU%PzajZ6eN06}A`B6=>iM0u{w$iy|x6a~#{9EgRwB?D8h3x*CWi zI?36^JMQ@i0!JKQd+oIjyCrJ&y0Vm&TNUJ{(RvS**xdcL+itUy_LNgj;jw_r`LT85 zd%=N{vpmMl2L&`OzsPsG*n@WL*kuLeiqojw#Om~S4qm#%lTSX`rdeBsjr;ZzGaW|H zYZe?Ri4scZo_nq==VA*NQPdgp4%&9^HZs?ExSj9ehaV1lb1IL6d5P!9U$ZQBN#N?- zB)U@0rBOx$z0Td5uI6(mY*4yh)1k+TlQ~;fjUFim6B>~=QfjOsTX0sxB{p~0sOEEq zRPAc!8t4DpcpbC7Syg_%qNjq{i?J(i9b+qI5hRSB%(YL)xjn z;FyPew6Uqn<(FSh2EI*yc2z1jAMa{jG^1~)in~<2Kyh6nYa&7Ex>Li2s|rLT1%H9? zrV&<`L4(&|sZt_QFR~0^_7W+P=;ARGD%~;?vwWn41>bVZEyDQI=;))5e(I^GypTu< z+4K_upTS`+f0m572Uun@@gtfPrhqk#mU@5z(bVYAs+g~Nh|!Ev6i_zT0@!w zn(b+}K%CErMygj><_)t@#9E3s6K3iT@$|Y5id*JG;9)xCV|l{035o{2`1y<1 zjDxjMVfHVo*Tl#X@}Rebn7x}-EjogCV7KFV#Wg(Wvr^DUk%Ag$GKvGv;o=l29xcwZ z#FlCpf!Phm5w3)vGO^U^ETg!d^M5Xra%UOs++t=Sk-+RJH5A^{kEGoN7OifLs%_i0 zR#ud%O*M<0dWFYYqH)oCY1gh@P0r)O$*LYO{Rs~J`}cR#8$ES^nYL)FEn=(pSCaMAR^2>`9{q;uS_$bdp|{pA9nNQ-c_#0k z(vU3`EKRH)&{cd}YUvn5!Uroi$)=PcfTc_Fq={)j$Dl$?*dzwAcM5D{+kr&iDBz#I zY2!mMDYdDVGOuD7GG&wU@SH}#; ze2+kG?(=;UHB8mnjdZpyzfDdkXisG*pbwyO|WUwhOF2fSFmCrW7i2C)gJ=}J-Mbw>H zcB^6%QNIk1U4ikVKl=yc7oHInmV!8 @resource 'emberTable', path: '/ember-table', -> @route 'overview' @route 'documentation' + @route 'migration-guides' @route 'ajax' @route 'bars' @route 'dynamic-bars' @@ -16,6 +17,7 @@ App.Router.map -> @route 'horizon' @route 'simple' @route 'sparkline' + @route 'community-examples' App.IndexRoute = Ember.Route.extend redirect: -> @@ -24,3 +26,12 @@ App.IndexRoute = Ember.Route.extend App.EmberTableIndexRoute = Ember.Route.extend redirect: -> @transitionTo 'emberTable.overview' + +App.EmberTableOverviewRoute = Ember.Route.extend + activate: -> + controller = @controllerFor('emberTable') + controller.set 'showLargeHero', yes + + deactivate: -> + controller = @controllerFor('emberTable') + controller.set 'showLargeHero', no diff --git a/app/templates/_footer.hbs b/app/templates/_footer.hbs index 9a68e163a..c938d54d7 100644 --- a/app/templates/_footer.hbs +++ b/app/templates/_footer.hbs @@ -2,13 +2,18 @@