Skip to content

Instantly share code, notes, and snippets.

@rhettl
Last active January 10, 2018 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhettl/d017c6cde15222f58d76334081595da8 to your computer and use it in GitHub Desktop.
Save rhettl/d017c6cde15222f58d76334081595da8 to your computer and use it in GitHub Desktop.
Bootstrap Theme Test
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
import Bootstrap from 'app/themes/theme';
export default Ember.Controller.extend({
useNumericPagination: false,
columns: [
{propertyName: 'id'},
{propertyName: 'firstName'},
{propertyName: 'lastName', filterWithSelect: true}
],
columnSets: [
{
"label": "Only Name",
"showColumns": [
"firstName",
"lastName"
]
}
],
themeInstance: Bootstrap
});
import Ember from 'ember';
export default Ember.Route.extend({
model() {
return Promise.resolve([
{id: '1', firstName: 'Jim', lastName: 'Raynor'},
{id: '2', firstName: 'Sarah', lastName: 'Kerrigan'},
{id: '3', firstName: 'Rory', lastName: 'Swann'},
{id: '4', firstName: 'Tychus', lastName: 'Findlay'},
{id: '5', firstName: 'Nova', lastName: 'Tera'},
{id: '6', firstName: 'Gabriel', lastName: 'Tosh'},
{id: '7', firstName: 'Egon', lastName: 'Stetmann'},
{id: '8', firstName: 'Horace', lastName: 'Warfield'},
{id: '9', firstName: 'Carolina', lastName: 'Davis'},
{id: '10', firstName: 'Alexei', lastName: 'Stukov'},
{id: '11', firstName: 'Valerian', lastName: 'Mengsk'},
{id: '12', firstName: 'Ariel', lastName: 'Hanson'},
{id: '13', firstName: 'Matt', lastName: 'Horner'},
{id: '1', firstName: 'Jim', lastName: 'Raynor'},
{id: '2', firstName: 'Sarah', lastName: 'Kerrigan'},
{id: '3', firstName: 'Rory', lastName: 'Swann'},
{id: '4', firstName: 'Tychus', lastName: 'Findlay'},
{id: '5', firstName: 'Nova', lastName: 'Tera'},
{id: '6', firstName: 'Gabriel', lastName: 'Tosh'},
{id: '7', firstName: 'Egon', lastName: 'Stetmann'},
{id: '8', firstName: 'Horace', lastName: 'Warfield'},
{id: '9', firstName: 'Carolina', lastName: 'Davis'},
{id: '10', firstName: 'Alexei', lastName: 'Stukov'},
{id: '11', firstName: 'Valerian', lastName: 'Mengsk'},
{id: '12', firstName: 'Ariel', lastName: 'Hanson'},
{id: '13', firstName: 'Matt', lastName: 'Horner'},
{id: '1', firstName: 'Jim', lastName: 'Raynor'},
{id: '2', firstName: 'Sarah', lastName: 'Kerrigan'},
{id: '3', firstName: 'Rory', lastName: 'Swann'},
{id: '4', firstName: 'Tychus', lastName: 'Findlay'},
{id: '5', firstName: 'Nova', lastName: 'Tera'},
{id: '6', firstName: 'Gabriel', lastName: 'Tosh'},
{id: '7', firstName: 'Egon', lastName: 'Stetmann'},
{id: '8', firstName: 'Horace', lastName: 'Warfield'},
{id: '9', firstName: 'Carolina', lastName: 'Davis'},
{id: '10', firstName: 'Alexei', lastName: 'Stukov'},
{id: '11', firstName: 'Valerian', lastName: 'Mengsk'},
{id: '12', firstName: 'Ariel', lastName: 'Hanson'},
{id: '13', firstName: 'Matt', lastName: 'Horner'},
{id: '1', firstName: 'Jim', lastName: 'Raynor'},
{id: '2', firstName: 'Sarah', lastName: 'Kerrigan'},
{id: '3', firstName: 'Rory', lastName: 'Swann'},
{id: '4', firstName: 'Tychus', lastName: 'Findlay'},
{id: '5', firstName: 'Nova', lastName: 'Tera'},
{id: '6', firstName: 'Gabriel', lastName: 'Tosh'},
{id: '7', firstName: 'Egon', lastName: 'Stetmann'},
{id: '8', firstName: 'Horace', lastName: 'Warfield'},
{id: '9', firstName: 'Carolina', lastName: 'Davis'},
{id: '10', firstName: 'Alexei', lastName: 'Stukov'},
{id: '11', firstName: 'Valerian', lastName: 'Mengsk'},
{id: '12', firstName: 'Ariel', lastName: 'Hanson'},
{id: '13', firstName: 'Matt', lastName: 'Horner'},
{id: '1', firstName: 'Jim', lastName: 'Raynor'},
{id: '2', firstName: 'Sarah', lastName: 'Kerrigan'},
{id: '3', firstName: 'Rory', lastName: 'Swann'},
{id: '4', firstName: 'Tychus', lastName: 'Findlay'},
{id: '5', firstName: 'Nova', lastName: 'Tera'},
{id: '6', firstName: 'Gabriel', lastName: 'Tosh'},
{id: '7', firstName: 'Egon', lastName: 'Stetmann'},
{id: '8', firstName: 'Horace', lastName: 'Warfield'},
{id: '9', firstName: 'Carolina', lastName: 'Davis'},
{id: '10', firstName: 'Alexei', lastName: 'Stukov'},
{id: '11', firstName: 'Valerian', lastName: 'Mengsk'},
{id: '12', firstName: 'Ariel', lastName: 'Hanson'},
{id: '13', firstName: 'Matt', lastName: 'Horner'},
{id: '1', firstName: 'Jim', lastName: 'Raynor'},
{id: '2', firstName: 'Sarah', lastName: 'Kerrigan'},
{id: '3', firstName: 'Rory', lastName: 'Swann'},
{id: '4', firstName: 'Tychus', lastName: 'Findlay'},
{id: '5', firstName: 'Nova', lastName: 'Tera'},
{id: '6', firstName: 'Gabriel', lastName: 'Tosh'},
{id: '7', firstName: 'Egon', lastName: 'Stetmann'},
{id: '8', firstName: 'Horace', lastName: 'Warfield'},
{id: '9', firstName: 'Carolina', lastName: 'Davis'},
{id: '10', firstName: 'Alexei', lastName: 'Stukov'},
{id: '11', firstName: 'Valerian', lastName: 'Mengsk'},
{id: '12', firstName: 'Ariel', lastName: 'Hanson'},
{id: '13', firstName: 'Matt', lastName: 'Horner'},
]);
}
});
@import "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css";
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
{{models-table
data=model
columns=columns
columnSets=columnSets
themeInstance=themeInstance
}}
import Default from './bootstrap4';
import Ember from 'ember';
const {computed: {alias}} = Ember;
export default Default.extend({}).create();
{
"version": "0.13.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://code.jquery.com/jquery-3.2.1.min.js",
"popper": "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js",
"bootstrap": "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js",
"fontawesome": "https://use.fontawesome.com/releases/v5.0.3/js/all.js",
"ember": "2.16.2",
"ember-template-compiler": "2.16.2",
"ember-testing": "2.16.2"
},
"addons": {
"ember-data": "2.16.3",
"ember-models-table": "2.3.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment