ember-cli-filtertable-inbox-health
Version:
A HTML table with some added controls
1 lines • 18.3 kB
JavaScript
define("dummy/adapters/application",["ember-data","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.ActiveModelAdapter.extend({host:"http://localhost:4200",namespace:"api"})}),define("dummy/app",["ember","ember/resolver","ember/load-initializers","exports"],function(e,t,s,a){"use strict";var n=e["default"],r=t["default"],l=s["default"];n.MODEL_FACTORY_INJECTIONS=!0;var o=n.Application.extend({modulePrefix:"dummy",Resolver:r});l(o,"dummy"),a["default"]=o}),define("dummy/components/action-button",["ember","ember-cli-filtertable/components/action-button","exports"],function(e,t,s){"use strict";var a=(e["default"],t["default"]);s["default"]=a}),define("dummy/components/filter-table",["ember","ember-cli-filtertable/components/filter-table","exports"],function(e,t,s){"use strict";var a=(e["default"],t["default"]);s["default"]=a}),define("dummy/config/environment",["exports"],function(e){"use strict";e["default"]={environment:"production",baseURL:"/ember-filtertable",locationType:"auto",EmberENV:{FEATURES:{}},APP:{}}}),define("dummy/config/environments/production",["exports"],function(e){"use strict";e["default"]={environment:"production",baseURL:"/ember-filtertable",locationType:"auto",EmberENV:{FEATURES:{}},APP:{}}}),define("dummy/controllers/flat",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.ArrayController.extend({activeFilterOptions:["all users","active","inactive"],genderFilterOptions:["both genders","male","female"],applyDropdownFilter:function(e){s.debug("Applying dropdown filter in controller");var t=this.get("activeFilter"),a=this.get("genderFilter");return"all users"!==t&&(e=e.filterBy("isActive","active"===t)),"both genders"!==a&&(e=e.filterBy("gender",a)),e},reloadTable:function(){s.debug("Sending reload user table from controller"),s.debug(this.get("reloadUsers")),this.set("reloadUsers",!0)}.observes("genderFilter","activeFilter"),customBtnActive:function(){return 2===this.get("selectedRecords.length")}.property("selectedRecords.@each"),actions:{clickedNone:function(){s.debug("Clicked on NONE button")},clickedOne:function(){s.debug("Clicked on ONE button")},clickedMany:function(){s.debug("Clicked on MANY button")},clickedCustom:function(){s.debug("Clicked on CUSTOM button")},removeRow:function(e){s.debug("Removing selected record"),this.get("content").removeObject(e),e.destroy()}}})}),define("dummy/controllers/tree",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.ArrayController.extend({})}),define("dummy/helpers/tree-tab",["ember","ember-cli-filtertable/helpers/tree-tab","exports"],function(e,t,s){"use strict";var a=(e["default"],t["default"]);s["default"]=a}),define("dummy/models/group",["ember-data","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Model.extend({name:s.attr("string"),children:s.hasMany("group",{inverse:"parent"}),parent:s.belongsTo("group",{inverse:"children"}),depth:s.attr("number"),hasChildren:function(){return this.get("_data.children.length")>0||!1}.property("_data.children.@each"),childNum:function(){return this.get("_data.children.length")||0}.property("_data.children.@each")})}),define("dummy/models/user",["ember-data","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Model.extend({name:s.attr("string"),surname:s.attr("string"),email:s.attr("string"),isActive:s.attr("boolean"),gender:s.attr("string"),fullName:function(){return"%@ %@".fmt(this.get("name"),this.get("surname"))}.property("name","surname")})}),define("dummy/router",["ember","exports"],function(e,t){"use strict";var s=e["default"],a=s.Router.extend({location:DummyENV.locationType});a.map(function(){this.route("tree"),this.route("flat",{path:"/"})}),t["default"]=a}),define("dummy/routes/flat",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Route.extend({model:function(){return this.get("store").find("user")}})}),define("dummy/routes/tree",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Route.extend({model:function(){return this.get("store").find("group")}})}),define("dummy/templates/application",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Handlebars.template(function(e,t,a,n,r){function l(e,t){t.buffer.push("Flat Structure")}function o(e,t){t.buffer.push("Tree Structure")}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,s.Handlebars.helpers),r=r||{};var u,h,c,i="",p=this,f=a.helperMissing;return r.buffer.push('<div class="btn-group">\n '),h=a["link-to"]||t&&t["link-to"],c={hash:{"class":"btn btn-default"},hashTypes:{"class":"STRING"},hashContexts:{"class":t},inverse:p.noop,fn:p.program(1,l,r),contexts:[t],types:["STRING"],data:r},u=h?h.call(t,"flat",c):f.call(t,"link-to","flat",c),(u||0===u)&&r.buffer.push(u),r.buffer.push("\n "),h=a["link-to"]||t&&t["link-to"],c={hash:{"class":"btn btn-default"},hashTypes:{"class":"STRING"},hashContexts:{"class":t},inverse:p.noop,fn:p.program(3,o,r),contexts:[t],types:["STRING"],data:r},u=h?h.call(t,"tree",c):f.call(t,"link-to","tree",c),(u||0===u)&&r.buffer.push(u),r.buffer.push("\n</div>\n<hr/>\n"),u=a._triageMustache.call(t,"outlet",{hash:{},hashTypes:{},hashContexts:{},contexts:[t],types:["ID"],data:r}),(u||0===u)&&r.buffer.push(u),r.buffer.push("\n"),i})}),define("dummy/templates/components/action-button",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Handlebars.template(function(e,t,a,n,r){function l(e,t){var s="";return t.buffer.push("\n <span "),t.buffer.push(h(a["bind-attr"].call(e,{hash:{"class":":glyphicon glyphicon"},hashTypes:{"class":"STRING"},hashContexts:{"class":e},contexts:[],types:[],data:t}))),t.buffer.push("></span>\n"),s}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,s.Handlebars.helpers),r=r||{};var o,u="",h=this.escapeExpression,c=this;return o=a["if"].call(t,"hasGlyph",{hash:{},hashTypes:{},hashContexts:{},inverse:c.noop,fn:c.program(1,l,r),contexts:[t],types:["ID"],data:r}),(o||0===o)&&r.buffer.push(o),r.buffer.push("\n<span>"),o=a._triageMustache.call(t,"title",{hash:{},hashTypes:{},hashContexts:{},contexts:[t],types:["ID"],data:r}),(o||0===o)&&r.buffer.push(o),r.buffer.push("</span>\n"),u})}),define("dummy/templates/components/filter-table",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Handlebars.template(function(e,t,a,n,r){function l(e,t){var s,n,r="";return t.buffer.push("\n <tr><th "),t.buffer.push(x(a["bind-attr"].call(e,{hash:{colspan:"headerFilterColspan"},hashTypes:{colspan:"ID"},hashContexts:{colspan:e},contexts:[],types:[],data:t}))),t.buffer.push(">\n "),t.buffer.push(x((s=a.input||e&&e.input,n={hash:{type:"text",value:"textFilter",autofocus:"autofocus",placeholder:"Enter search filter","class":"form-control"},hashTypes:{type:"STRING",value:"ID",autofocus:"STRING",placeholder:"STRING","class":"STRING"},hashContexts:{type:e,value:e,autofocus:e,placeholder:e,"class":e},contexts:[],types:[],data:t},s?s.call(e,n):g.call(e,"input",n)))),t.buffer.push("\n </th></tr>\n"),r}function o(e,t){var s,n,r="";return t.buffer.push('\n <th class="checkbox-all">'),t.buffer.push(x((s=a.input||e&&e.input,n={hash:{type:"checkbox",name:"allSelected",checked:"selectAll"},hashTypes:{type:"STRING",name:"STRING",checked:"ID"},hashContexts:{type:e,name:e,checked:e},contexts:[],types:[],data:t},s?s.call(e,n):g.call(e,"input",n)))),t.buffer.push("</th>\n"),r}function u(e,t){var s="";return t.buffer.push("\n <tr><td "),t.buffer.push(x(a["bind-attr"].call(e,{hash:{colspan:"headerFilterColspan"},hashTypes:{colspan:"ID"},hashContexts:{colspan:e},contexts:[],types:[],data:t}))),t.buffer.push('><span class="label label-danger">Note:</span> No records exist yet</td></tr>\n'),s}function h(e,t){var s;s=a["if"].call(e,"hasNoFilteredRecords",{hash:{},hashTypes:{},hashContexts:{},inverse:v.program(10,i,t),fn:v.program(8,c,t),contexts:[e],types:["ID"],data:t}),t.buffer.push(s||0===s?s:"")}function c(e,t){var s="";return t.buffer.push("\n <tr><td "),t.buffer.push(x(a["bind-attr"].call(e,{hash:{colspan:"headerFilterColspan"},hashTypes:{colspan:"ID"},hashContexts:{colspan:e},contexts:[],types:[],data:t}))),t.buffer.push('><span class="label label-warning">Note:</span> No records match your filter</td></tr>\n'),s}function i(e,t){var s,n="";return t.buffer.push("\n"),s=a.each.call(e,"r","in","filteredRecords",{hash:{},hashTypes:{},hashContexts:{},inverse:v.noop,fn:v.program(11,p,t),contexts:[e,e,e],types:["ID","ID","ID"],data:t}),(s||0===s)&&t.buffer.push(s),t.buffer.push("\n"),n}function p(e,t){var s,n,r,l="";return t.buffer.push("\n <tr>\n "),s=a["if"].call(e,"showCheckboxes",{hash:{},hashTypes:{},hashContexts:{},inverse:v.noop,fn:v.program(12,f,t),contexts:[e],types:["ID"],data:t}),(s||0===s)&&t.buffer.push(s),t.buffer.push("\n "),t.buffer.push(x((n=a.partial||e&&e.partial,r={hash:{},hashTypes:{},hashContexts:{},contexts:[e],types:["ID"],data:t},n?n.call(e,"bodyTemplate",r):g.call(e,"partial","bodyTemplate",r)))),t.buffer.push("\n </tr>\n"),l}function f(e,t){var s,n,r="";return t.buffer.push("\n <td>"),t.buffer.push(x((s=a.input||e&&e.input,n={hash:{type:"checkbox",name:"r.selected",checked:"r.selected"},hashTypes:{type:"STRING",name:"STRING",checked:"ID"},hashContexts:{type:e,name:e,checked:e},contexts:[],types:[],data:t},s?s.call(e,n):g.call(e,"input",n)))),t.buffer.push("</td>\n "),r}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,s.Handlebars.helpers),r=r||{};var d,b,m,y="",x=this.escapeExpression,g=a.helperMissing,v=this;return r.buffer.push('<table class="table table-striped table-hovered filtertable">\n<thead>\n'),d=a["if"].call(t,"showTextFilter",{hash:{},hashTypes:{},hashContexts:{},inverse:v.noop,fn:v.program(1,l,r),contexts:[t],types:["ID"],data:r}),(d||0===d)&&r.buffer.push(d),r.buffer.push("\n<tr>\n"),d=a["if"].call(t,"showCheckboxes",{hash:{},hashTypes:{},hashContexts:{},inverse:v.noop,fn:v.program(3,o,r),contexts:[t],types:["ID"],data:r}),(d||0===d)&&r.buffer.push(d),r.buffer.push("\n "),r.buffer.push(x((b=a.partial||t&&t.partial,m={hash:{},hashTypes:{},hashContexts:{},contexts:[t],types:["ID"],data:r},b?b.call(t,"headerTemplate",m):g.call(t,"partial","headerTemplate",m)))),r.buffer.push("\n</tr>\n</thead>\n<tbody>\n"),d=a["if"].call(t,"hasNoActualRecords",{hash:{},hashTypes:{},hashContexts:{},inverse:v.program(7,h,r),fn:v.program(5,u,r),contexts:[t],types:["ID"],data:r}),(d||0===d)&&r.buffer.push(d),r.buffer.push("\n</tbody>\n</table>\n"),y})}),define("dummy/templates/flat",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Handlebars.template(function(e,t,a,n,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,s.Handlebars.helpers),r=r||{};var l,o,u,h="",c=a.helperMissing,i=this.escapeExpression;return r.buffer.push("<h1>List of users</h1>\n"),r.buffer.push(i((o=a["filter-table"]||t&&t["filter-table"],u={hash:{content:"content",columnNum:3,bodyTemplate:"users-table-body",headerTemplate:"users-table-header",sortOptions:"sortOptions",reloadRecords:"reloadUsers"},hashTypes:{content:"ID",columnNum:"INTEGER",bodyTemplate:"STRING",headerTemplate:"STRING",sortOptions:"ID",reloadRecords:"ID"},hashContexts:{content:t,columnNum:t,bodyTemplate:t,headerTemplate:t,sortOptions:t,reloadRecords:t},contexts:[],types:[],data:r},o?o.call(t,u):c.call(t,"filter-table",u)))),r.buffer.push("\n\n"),l=a._triageMustache.call(t,"selectedSortOption",{hash:{},hashTypes:{},hashContexts:{},contexts:[t],types:["ID"],data:r}),(l||0===l)&&r.buffer.push(l),r.buffer.push("\n"),h})}),define("dummy/templates/groups-table-body",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Handlebars.template(function(e,t,a,n,r){function l(e,t){var s,n="";return t.buffer.push('<span class="label label-primary">'),s=a._triageMustache.call(e,"r.childNum",{hash:{},hashTypes:{},hashContexts:{},contexts:[e],types:["ID"],data:t}),(s||0===s)&&t.buffer.push(s),t.buffer.push(" children</span>"),n}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,s.Handlebars.helpers),r=r||{};var o,u,h,c="",i=this.escapeExpression,p=a.helperMissing,f=this;return r.buffer.push('<td><span class="spec-toggle-expand" '),r.buffer.push(i(a.action.call(t,"toggleExpand","r",{hash:{},hashTypes:{},hashContexts:{},contexts:[t,t],types:["STRING","ID"],data:r}))),r.buffer.push(">"),r.buffer.push(i((u=a["tree-tab"]||t&&t["tree-tab"],h={hash:{},hashTypes:{},hashContexts:{},contexts:[t],types:["ID"],data:r},u?u.call(t,"r",h):p.call(t,"tree-tab","r",h)))),r.buffer.push("</span>\n <strong>"),o=a._triageMustache.call(t,"r.name",{hash:{},hashTypes:{},hashContexts:{},contexts:[t],types:["ID"],data:r}),(o||0===o)&&r.buffer.push(o),r.buffer.push("</strong>\n "),o=a["if"].call(t,"r.hasChildren",{hash:{},hashTypes:{},hashContexts:{},inverse:f.noop,fn:f.program(1,l,r),contexts:[t],types:["ID"],data:r}),(o||0===o)&&r.buffer.push(o),r.buffer.push("\n</td>\n"),c})}),define("dummy/templates/groups-table-header",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Handlebars.template(function(e,t,a,n,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,s.Handlebars.helpers),r=r||{},r.buffer.push('<th colspan="2">\n</th>\n')})}),define("dummy/templates/tree",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Handlebars.template(function(e,t,a,n,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,s.Handlebars.helpers),r=r||{};var l,o,u,h="",c=a.helperMissing,i=this.escapeExpression;return r.buffer.push("<h1>Tree of groups</h1>\n"),r.buffer.push(i((o=a["filter-table"]||t&&t["filter-table"],u={hash:{content:"content",columnNum:1,isTree:!0,bodyTemplate:"groups-table-body",headerTemplate:"groups-table-header"},hashTypes:{content:"ID",columnNum:"INTEGER",isTree:"BOOLEAN",bodyTemplate:"STRING",headerTemplate:"STRING"},hashContexts:{content:t,columnNum:t,isTree:t,bodyTemplate:t,headerTemplate:t},contexts:[],types:[],data:r},o?o.call(t,u):c.call(t,"filter-table",u)))),r.buffer.push("\n\n"),l=a._triageMustache.call(t,"selectedSortOption",{hash:{},hashTypes:{},hashContexts:{},contexts:[t],types:["ID"],data:r}),(l||0===l)&&r.buffer.push(l),r.buffer.push("\n"),h})}),define("dummy/templates/users-table-body",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Handlebars.template(function(e,t,a,n,r){function l(e,t){t.buffer.push('<span class="label label-warning">inactive</span>')}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,s.Handlebars.helpers),r=r||{};var o,u="",h=this,c=this.escapeExpression;return r.buffer.push("<td><strong>"),o=a._triageMustache.call(t,"r.fullName",{hash:{},hashTypes:{},hashContexts:{},contexts:[t],types:["ID"],data:r}),(o||0===o)&&r.buffer.push(o),r.buffer.push("</strong>\n "),o=a.unless.call(t,"r.isActive",{hash:{},hashTypes:{},hashContexts:{},inverse:h.noop,fn:h.program(1,l,r),contexts:[t],types:["ID"],data:r}),(o||0===o)&&r.buffer.push(o),r.buffer.push("</td>\n<td>"),o=a._triageMustache.call(t,"r.email",{hash:{},hashTypes:{},hashContexts:{},contexts:[t],types:["ID"],data:r}),(o||0===o)&&r.buffer.push(o),r.buffer.push("</td>\n<td "),r.buffer.push(c(a.action.call(t,"remove","removeRow","r",{hash:{},hashTypes:{},hashContexts:{},contexts:[t,t,t],types:["STRING","STRING","ID"],data:r}))),r.buffer.push(">(remove)</td>\n"),u})}),define("dummy/templates/users-table-header",["ember","exports"],function(e,t){"use strict";var s=e["default"];t["default"]=s.Handlebars.template(function(e,t,a,n,r){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,s.Handlebars.helpers),r=r||{};var l,o,u="",h=a.helperMissing,c=this.escapeExpression;return r.buffer.push('<th colspan="2">\n '),r.buffer.push(c((l=a["action-button"]||t&&t["action-button"],o={hash:{title:"Active on many",glyphicon:"glyphicon-tag",action:"clickedMany",isActive:"oneOrMoreSelected"},hashTypes:{title:"STRING",glyphicon:"STRING",action:"STRING",isActive:"STRING"},hashContexts:{title:t,glyphicon:t,action:t,isActive:t},contexts:[],types:[],data:r},l?l.call(t,o):h.call(t,"action-button",o)))),r.buffer.push("\n "),r.buffer.push(c((l=a["action-button"]||t&&t["action-button"],o={hash:{title:"Active on one",glyphicon:"glyphicon-tags",action:"clickedOne",isActive:"oneSelected",activeClass:"btn-success"},hashTypes:{title:"STRING",glyphicon:"STRING",action:"STRING",isActive:"STRING",activeClass:"STRING"},hashContexts:{title:t,glyphicon:t,action:t,isActive:t,activeClass:t},contexts:[],types:[],data:r},l?l.call(t,o):h.call(t,"action-button",o)))),r.buffer.push("\n "),r.buffer.push(c((l=a["action-button"]||t&&t["action-button"],o={hash:{title:"Active on none",glyphicon:"glyphicon-tags",action:"clickedNone",isActive:"noneSelected",activeClass:"btn-danger"},hashTypes:{title:"STRING",glyphicon:"STRING",action:"STRING",isActive:"STRING",activeClass:"STRING"},hashContexts:{title:t,glyphicon:t,action:t,isActive:t,activeClass:t},contexts:[],types:[],data:r},l?l.call(t,o):h.call(t,"action-button",o)))),r.buffer.push("\n "),r.buffer.push(c((l=a["action-button"]||t&&t["action-button"],o={hash:{title:"Active on custom",glyphicon:"glyphicon-star",action:"clickedCustom",activeClass:"btn-warning",isActive:"customBtnActive"},hashTypes:{title:"STRING",glyphicon:"STRING",action:"STRING",activeClass:"STRING",isActive:"STRING"},hashContexts:{title:t,glyphicon:t,action:t,activeClass:t,isActive:t},contexts:[],types:[],data:r},l?l.call(t,o):h.call(t,"action-button",o)))),r.buffer.push('\n\n <td class="pull-right">\n <span class="pull-left">\n '),r.buffer.push(c(a.view.call(t,"Ember.Select",{hash:{content:"targetObject.activeFilterOptions",selection:"targetObject.activeFilter","class":"spec-activeDropdown form-control"},hashTypes:{content:"ID",selection:"ID","class":"STRING"},hashContexts:{content:t,selection:t,"class":t},contexts:[t],types:["ID"],data:r}))),r.buffer.push('\n </span>\n <span class="pull-left">\n '),r.buffer.push(c(a.view.call(t,"Ember.Select",{hash:{content:"targetObject.genderFilterOptions",selection:"targetObject.genderFilter","class":"spec-genderDropdown form-control"},hashTypes:{content:"ID",selection:"ID","class":"STRING"},hashContexts:{content:t,selection:t,"class":t},contexts:[t],types:["ID"],data:r}))),r.buffer.push("\n </span>\n </td>\n</th>\n"),u})});