Rename ReGrid to DataTable 💃
This commit is contained in:
parent
8de87e25d7
commit
8dbeea9ba1
22
index.html
22
index.html
@ -5,7 +5,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<title>ReGrid</title>
|
<title>Frappé DataTable</title>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
font-family: 'Tahoma';
|
font-family: 'Tahoma';
|
||||||
@ -16,14 +16,14 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>ReGrid</h1>
|
<h1>Frappé DataTable</h1>
|
||||||
<button onclick="_regrid.render()">Refresh</button>
|
<button onclick="_regrid.render()">Refresh</button>
|
||||||
<section style="width: 60%;">
|
<section style="width: 60%;">
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<script src="./node_modules/jquery/dist/jquery.js"></script>
|
<script src="./node_modules/jquery/dist/jquery.js"></script>
|
||||||
<script src="./node_modules/clusterize.js/clusterize.js"></script>
|
<script src="./node_modules/clusterize.js/clusterize.js"></script>
|
||||||
<script src="./lib/ReGrid.js"></script>
|
<script src="./lib/frappe-datatable.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(() => {
|
$(() => {
|
||||||
|
|
||||||
@ -502,25 +502,25 @@
|
|||||||
|
|
||||||
console.log('No of Rows:', data.rows.length)
|
console.log('No of Rows:', data.rows.length)
|
||||||
|
|
||||||
performance.mark("ReGrid-start");
|
performance.mark("DataTable-start");
|
||||||
var grid = new ReGrid(document.querySelector('section'), {
|
var datatable = new DataTable(document.querySelector('section'), {
|
||||||
addSerialNoColumn: true,
|
addSerialNoColumn: true,
|
||||||
enableClusterize: true,
|
enableClusterize: true,
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
performance.mark("ReGrid-end");
|
performance.mark("DataTable-end");
|
||||||
|
|
||||||
performance.measure(
|
performance.measure(
|
||||||
"ReGrid",
|
"DataTable",
|
||||||
"ReGrid-start",
|
"DataTable-start",
|
||||||
"ReGrid-end"
|
"DataTable-end"
|
||||||
);
|
);
|
||||||
|
|
||||||
var measures = performance.getEntriesByName("ReGrid");
|
var measures = performance.getEntriesByName("DataTable");
|
||||||
var measure = measures[0];
|
var measure = measures[0];
|
||||||
console.log(measure.duration);
|
console.log(measure.duration);
|
||||||
|
|
||||||
window._regrid = grid;
|
window.datatable = datatable;
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
1
lib/frappe-datatable.js.map
Normal file
1
lib/frappe-datatable.js.map
Normal file
File diff suppressed because one or more lines are too long
11
package.json
11
package.json
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "regrid",
|
"name": "frappe-datatable",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "A modern datatable library for the web",
|
"description": "A modern datatable library for the web",
|
||||||
"main": "lib/regrid.js",
|
"main": "lib/frappe-datatable.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack --env build",
|
"build": "webpack --env build",
|
||||||
"dev": "webpack --progress --colors --watch --env dev",
|
"dev": "webpack --progress --colors --watch --env dev",
|
||||||
@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/netchampfaris/regrid.git"
|
"url": "https://github.com/frappe/datatable.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"webpack",
|
"webpack",
|
||||||
@ -43,12 +43,11 @@
|
|||||||
"author": "Faris Ansari",
|
"author": "Faris Ansari",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/netchampfaris/regrid/issues"
|
"url": "https://github.com/frappe/datatable/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/netchampfaris/regrid",
|
"homepage": "https://frappe.github.io/datatable",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "^4.0.0-beta",
|
"bootstrap": "^4.0.0-beta",
|
||||||
"clusterize.js": "^0.17.6",
|
|
||||||
"popper.js": "^1.12.5"
|
"popper.js": "^1.12.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,7 +25,7 @@ const DEFAULT_OPTIONS = {
|
|||||||
addCheckbox: true
|
addCheckbox: true
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class ReGrid {
|
export default class DataTable {
|
||||||
constructor(wrapper, options) {
|
constructor(wrapper, options) {
|
||||||
|
|
||||||
this.wrapper = $(wrapper);
|
this.wrapper = $(wrapper);
|
||||||
@ -686,7 +686,7 @@ export default class ReGrid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
makeStyle() {
|
makeStyle() {
|
||||||
this.$style = $('<style data-id="regrid"></style>')
|
this.$style = $('<style data-id="datatable"></style>')
|
||||||
.prependTo(this.wrapper);
|
.prependTo(this.wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1,2 +1,2 @@
|
|||||||
import ReGrid from './regrid.js';
|
import DataTable from './datatable.js';
|
||||||
export default ReGrid;
|
export default DataTable;
|
||||||
|
|||||||
@ -5,7 +5,7 @@ const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const env = require('yargs').argv.env; // use --env with webpack 2
|
const env = require('yargs').argv.env; // use --env with webpack 2
|
||||||
|
|
||||||
let libraryName = 'ReGrid', outputFile = 'regrid';
|
let libraryName = 'DataTable', outputFile = 'frappe-datatable';
|
||||||
|
|
||||||
let plugins = [];
|
let plugins = [];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user