Created
March 24, 2017 18:30
-
-
Save Wikiko/6dc37500aca9e12625e372e36a177398 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template is="dom-bind"> | |
<style> | |
vaadin-grid#material { | |
font-family: Roboto, sans-serif; | |
--divider-color: rgba(0, 0, 0, var(--dark-divider-opacity)); | |
--vaadin-grid-cell: { | |
padding: 0; | |
}; | |
--vaadin-grid-header-cell: { | |
height: 64px; | |
color: rgba(0, 0, 0, var(--dark-secondary-opacity)); | |
font-size: 12px; | |
}; | |
--vaadin-grid-body-cell: { | |
height: 48px; | |
color: rgba(0, 0, 0, var(--dark-primary-opacity)); | |
font-size: 13px; | |
}; | |
--vaadin-grid-body-row-hover-cell: { | |
background-color: var(--paper-grey-200); | |
}; | |
--vaadin-grid-body-row-selected-cell: { | |
background-color: var(--paper-grey-100); | |
}; | |
--vaadin-grid-focused-cell: { | |
box-shadow: none; | |
font-weight: bold; | |
}; | |
} | |
vaadin-grid#material .cell { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
padding-right: 56px; | |
} | |
vaadin-grid#material .cell.last { | |
padding-right: 24px; | |
} | |
vaadin-grid#material .cell.numeric { | |
text-align: right; | |
} | |
vaadin-grid#material paper-checkbox { | |
--primary-color: var(--paper-indigo-500); | |
margin: 0 24px; | |
} | |
vaadin-grid#material vaadin-grid-sorter { | |
--vaadin-grid-sorter-arrow: { | |
display: none !important; | |
}; | |
} | |
vaadin-grid#material vaadin-grid-sorter .cell { | |
flex: 1; | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
} | |
vaadin-grid#material vaadin-grid-sorter iron-icon { | |
transform: scale(0.8); | |
} | |
vaadin-grid#material vaadin-grid-sorter:not([direction]) iron-icon { | |
color: rgba(0, 0, 0, var(--dark-disabled-opacity)); | |
} | |
vaadin-grid#material vaadin-grid-sorter[direction] { | |
color: rgba(0, 0, 0, var(--dark-primary-opacity)); | |
} | |
vaadin-grid#material vaadin-grid-sorter[direction=desc] iron-icon { | |
transform: scale(0.8) rotate(180deg); | |
} | |
</style> | |
<iron-ajax auto url="http://teste-co-in.umbler.net/clientes/teste?query=[[query]]" | |
handle-as="json" | |
last-response="{{items}}"></iron-ajax> | |
<paper-input label="Pesquisar" value="{{query}}"></paper-input> | |
<vaadin-grid id="material" items="[[items]]" multi-sort> | |
<vaadin-grid-column> | |
<template class="header"> | |
<vaadin-grid-sorter path="nome">Nome</vaadin-grid-sorter> | |
</template> | |
<template>[[item.nome]]</template> | |
</vaadin-grid-column> | |
<vaadin-grid-column> | |
<template class="header"> | |
<vaadin-grid-sorter path="cpf_cnpj">CPF/CNPJ</vaadin-grid-sorter> | |
</template> | |
<template>[[item.cpf_cnpj]]</template> | |
</vaadin-grid-column> | |
<vaadin-grid-column> | |
<template class="header"> | |
<vaadin-grid-sorter path="rg_ie">RG/IE</vaadin-grid-sorter> | |
</template> | |
<template>[[item.rg_ie]]</template> | |
</vaadin-grid-column> | |
<vaadin-grid-column> | |
<template class="header"> | |
<vaadin-grid-sorter path="email">Email</vaadin-grid-sorter> | |
</template> | |
<template>[[item.email]]</template> | |
</vaadin-grid-column> | |
<vaadin-grid-column> | |
<template class="header">Opções</template> | |
<template> | |
<a href="http://teste-co-in.umbler.net/clientes/visualizar/[[item.id]]"> | |
Visualizar | |
</a> | |
<a href="http://teste-co-in.umbler.net/clientes/editar/[[item.id]]"> | |
Editar | |
</a> | |
</template> | |
</vaadin-grid-column> | |
</vaadin-grid> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment