Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bower_components/
node_modules/
dist/aha-tbody.html
dist/aha-th.html
dist/aha-td.html
dist/aha-tr.html
.DS_Store
43 changes: 0 additions & 43 deletions Gruntfile.js

This file was deleted.

202 changes: 102 additions & 100 deletions dist/aha-table.html → aha-table.html
Original file line number Diff line number Diff line change
@@ -1,62 +1,39 @@
<link rel="import" href="../polymer/polymer.html">

<!--
//http://webcomponents.github.io/articles/web-components-best-practices/
-->
<!--
/**
* @module aha-table
*
*
* Searchable Sortable Editable Paginatable Data Table
*
* aha-table is an data table/grid, it cousumes a modal data
* and modal meta to show a table that can search, sort, edit
* in place and pagiation, click to edit.
*
* Examples:
*
* <aha-table></aha-table>
*
* <aha-table id="raw"
* selectable
* copyable
* removable
* movable
* seachable
* pagesize="20"
* pagesizetitle="Page Size:"
* summarytitle="Viewing">
* <aha-column name="title"
* type="string"
* label="My Title"
* sortable
* searchable
* required
* editable
* placeholder="Example text"
* default=""
* hint="Meaning title will help you remember">
* </aha-column>
* </aha-table/>
*
* Available Event Hander:
* after-invalid(Object detail)
* after-td-click(Object detail)
* after-td-dbclick(Object detail)
* after-create(Object new_record)
* after-copy(Object new_record)
* after-save(Object new_record)
* after-select(Object new_record)
* after-remove(Object removed_record)
* after-move-down(Object moved_record)
* after-move-up(Object moved_record)
*
* @class aha-table
* @author Louis Liu<[email protected]>
*
*/
-->
aha-table is an data table/grid, it cousumes a modal data
and modal meta to show a table that can search, sort, edit
in place and pagiation, click to edit.

Examples:

<aha-table></aha-table>

<aha-table id="raw"
selectable
copyable
removable
movable
seachable
pagesize="20"
pagesizetitle="Page Size:"
summarytitle="Viewing">
<aha-column name="title"
type="string"
label="My Title"
sortable
searchable
required
editable
placeholder="Example text"
default=""
hint="Meaning title will help you remember">
</aha-column>
</aha-table/>

<link rel="import" href="../../polymer/polymer.html">
@demo demo/index.html
@hero hero.svg
-->

<dom-module id="aha-table">
<style>
Expand Down Expand Up @@ -198,7 +175,7 @@
<select
on-change="search">
<template is="dom-repeat" items="{{column.options}}" as="option">
<option value$="{{option.value}}">{{option.label}}</option>
<option value="{{option.value}}">{{option.label}}</option>
</template>
</select>
</template>
Expand Down Expand Up @@ -277,25 +254,25 @@
<input type="text"
required$="{{column.required}}"
on-blur="save"
value$="{{getValue(row,column.name)}}"/>
value="{{getValue(row,column.name)}}"/>
</template>
<template is="dom-if" if="{{isEqual(column.type, 'date')}}">
<input type="date"
required?="{{column.required}}"
on-blur="save"
value$="{{getValue(row,column.name)}}"/>
value="{{getValue(row,column.name)}}"/>
</template>
<template is="dom-if" if="{{isEqual(column.type, 'time')}}">
<input type="time"
required?="{{column.required}}"
on-blur="save"
value$="{{getValue(row,column.name)}}"/>
value="{{getValue(row,column.name)}}"/>
</template>
<template is="dom-if" if="{{isEqual(column.type, 'datetime')}}">
<input type="datetime"
required?="{{column.required}}"
on-blur="save"
value$="{{getValue(row,column.name)}}"/>
value="{{getValue(row,column.name)}}"/>
</template>
<template is="dom-if" if="{{isEqual(column.type, 'text')}}">
<textarea
Expand Down Expand Up @@ -594,6 +571,47 @@
type: String,
value: ""
}
// Following properties are to be set by behavior users
/**
* Description todo.
* @event after-invalid
*/
/**
* Description todo.
* @event after-td-click
*/
/**
* Description todo.
* @event after-td-dbclick
*/
/**
* Description todo.
* @event after-create
*/
/**
* Description todo.
* @event after-copy
*/
/**
* Description todo.
* @event after-save
*/
/**
* Description todo.
* @event after-select
*/
/**
* Description todo.
* @event after-remove
*/
/**
* Description todo.
* @event after-move-down
*/
/**
* Description todo.
* @event after-move-up
*/
},

ready: function() {
Expand Down Expand Up @@ -1144,27 +1162,20 @@


<!--
/**
* @module aha-column
*
*
* child element for aha-table, used for meta building
*
* <aha-column
* name="content"
* type="text"
* sortable
* searchable
* required
* editable
* placeholder="example"
* default="">
* </aha-column>
*
* @class aha-column
* @author Louis Liu<[email protected]>
*
*/
child element for aha-table, used for meta building

Examples:

<aha-column
name="content"
type="text"
sortable
searchable
required
editable
placeholder="example"
default="">
</aha-column>
-->
<script>
Polymer({
Expand Down Expand Up @@ -1236,23 +1247,14 @@


<!--
/**
* @module aha-html-echo
*
*
* Generates html elements dynamically, inspired by sortable-table
* https://github.com/stevenrskelton/sortable-table
*
* WARNING! Potential XSS vulnerability if `html` comes from an untrusted source
*
* <aha-html-echo
* html="html">
* </aha-html-echo>
*
* @class aha-html-echo
* @author Michael Heinrichs<[email protected]>
*
*/
Generates html elements dynamically, inspired by sortable-table
https://github.com/stevenrskelton/sortable-table

WARNING! Potential XSS vulnerability if `html` comes from an untrusted source

<aha-html-echo
html="html">
</aha-html-echo>
-->
<script>
Polymer({
Expand Down
22 changes: 14 additions & 8 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
{
"name": "aha-table",
"version": "2.0.13",
"description": "Polymer Element for aha-table, a searchable, sortable, editable, selectable, paginatable, copyable, removeable, movable table/grid.",
"authors": [
"Louis Liu"
],
"license": "MIT",
"main": "dist/aha-table.html",
"description": "Polymer Element for aha-table, a searchable, sortable, editable, selectable, paginatable, copyable, removeable, movable table/grid.",
"keywords": [
"web-component",
"polymer",
"web-components"
"aha-table",
"table"
],
"main": "aha-table.html",
"license": "MIT",
"homepage": "https://github.com/liuwenchao/aha-table",
"ignore": [
"**/.*",
"node_modules",
"bower_components"
"/.*",
"/test/"
],
"dependencies": {
"polymer": "Polymer/polymer#~1.2"
"polymer": "Polymer/polymer#^1.2.0"
},
"devDependencies": {
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"web-component-tester": "^4.0.0"
}
}
4 changes: 2 additions & 2 deletions demo/performance.html → demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Importing Web Component's Polyfill -->
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>

<!-- Importing Custom Elements -->
<link rel="import" href="../src/aha-table.html">
<link rel="import" href="../aha-table.html">
</head>
<body>
<aha-table id="raw"></aha-table>
Expand Down
27 changes: 27 additions & 0 deletions hero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading