Giter Site home page Giter Site logo

abeadam / ember-models-table Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onechiporenko/ember-models-table

0.0 1.0 0.0 18.8 MB

Table with pagination, sorting, filtering and much more

Home Page: http://onechiporenko.github.io/ember-models-table/v.3/bs3/

License: MIT License

JavaScript 79.96% Shell 0.25% HTML 0.28% Handlebars 18.79% SCSS 0.73%

ember-models-table's Introduction

Ember-models-table

Build Status Coverage Status Codacy Badge Ember Observer Score npm version License Downloads

Install

ember install ember-models-table

Discussion

Join the official Ember Discord server.

Usage

Major version 3.x is latest version of ember-models-table.

  • Demo for ember-bootstrap with Bootstrap v3 - demo bs3. Theme ember-bootstrap-v3 is used here. Add file app/instance-initializers/emt-inject.js to your project and table components will use this theme automatically:
export function initialize(appInstance) {
  appInstance.inject('component:models-table', 'themeInstance', `theme:ember-bootstrap-v3`);
  appInstance.inject('component:models-table-server-paginated', 'themeInstance', `theme:ember-bootstrap-v3`);
}

export default {
  name: 'emt-inject',
  initialize
};
  • Demo for ember-bootstrap with Bootstrap v4 - demo bs4. Theme ember-bootstrap-v4 is used here. Add file app/instance-initializers/emt-inject.js to your project and table components will use this theme automatically:
export function initialize(appInstance) {
  appInstance.inject('component:models-table', 'themeInstance', `theme:ember-bootstrap-v4`);
  appInstance.inject('component:models-table-server-paginated', 'themeInstance', `theme:ember-bootstrap-v4`);
}

export default {
  name: 'emt-inject',
  initialize
};
  • Demo for ember-paper - demo paper. Theme ember-paper is used here. Add file app/instance-initializers/emt-inject.js to your project and table components will use this theme automatically:
export function initialize(appInstance) {
  appInstance.inject('component:models-table', 'themeInstance', `theme:ember-paper`);
  appInstance.inject('component:models-table-server-paginated', 'themeInstance', `theme:ember-paper`);
}

export default {
  name: 'emt-inject',
  initialize
};

IMPORTANT Custom styles for ember-paper theme are not included to the ember-models-table by default. You can copy it from dummy app or create your own styles.

  • Demo for plain-html - demo plain html. Theme plain-html is used here. Add file app/instance-initializers/emt-inject.js to your project and table components will use this theme automatically:
export function initialize(appInstance) {
  appInstance.inject('component:models-table', 'themeInstance', `theme:plain-html`);
  appInstance.inject('component:models-table-server-paginated', 'themeInstance', `theme:plain-html`);
}

export default {
  name: 'emt-inject',
  initialize
};

IMPORTANT Custom styles for plain-html theme are not included to the ember-models-table by default. You can copy it from dummy app or create your own styles.

Custom themes

To use your custom theme based on DefaultTheme or its children you must do next steps:

  • Register your theme in the application initializer:
// app/initializes/emt-my-super-theme.js
import MySuperTheme from 'your/custom/path';

export function initialize(application) {
  application.register('emt-theme:my-super-theme', MySuperTheme, {singleton: false});
}

export default {
  name: 'emt-my-custom-theme',
  after: 'emt-themes',
  initialize
};
  • Inject your theme to the component in the application instance initializer:
// app/instance-initializers/emt-my-super-theme.js
export function initialize(appInstance) {
  appInstance.inject('component:models-table', 'themeInstance', 'theme:my-super-theme');
  appInstance.inject('component:models-table-server-paginated', 'themeInstance', 'theme:my-super-theme');
}

export default {
  name: 'emt-my-super-theme-inject',
  after: 'emt-inject',
  initialize
};

DefaultTheme uses owner.lookup internally. That is why themes based on it must be registered and injected and not just passed as arguments to the models-table component.

Old versions

ember-models-table's People

Contributors

onechiporenko avatar dependabot[bot] avatar fed03 avatar listepo avatar bgantzler avatar ruzz311 avatar sly7-7 avatar bmac avatar 1int avatar davidvotrubec avatar jekiii avatar bpinel avatar walther avatar steverhoades avatar saygun avatar philiptsv avatar oswaldoacauan avatar kylegosen avatar kjarri avatar hagl avatar ef4 avatar darrendrumm avatar runspired avatar broldak avatar 2hu12 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.