-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from DimitarChristoff/interact-js
Interact js
- Loading branch information
Showing
58 changed files
with
7,903 additions
and
1,633 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"version": "0.2.0", | ||
"name": "slickgrid-es6", | ||
"description": "Non-tracking fork of slickgrid fork by 6pac to be used via npm - https://github.com/6pac/SlickGrid", | ||
"main": "dist/slick.es6.min.js", | ||
"authors": [ | ||
"Michael Leibman" | ||
], | ||
"license": "MIT", | ||
"homepage": "https://github.com/DimitarChristoff/slickgrid-es6", | ||
"ignore": [ | ||
"node_modules", | ||
"bower_components", | ||
"examples" | ||
], | ||
"dependencies": { | ||
"flatpickr": "1.9.1", | ||
"jquery": "3.1.0" | ||
} | ||
} |
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const data = []; | ||
|
||
for (let i = 0; i < 500; i++){ | ||
const d = (data[i] = {}); | ||
|
||
d['title'] = 'Task ' + i; | ||
d['description'] = 'This is a sample task description.\n It can be multiline'; | ||
d['duration'] = '5 days'; | ||
d['percentComplete'] = Math.round(Math.random() * 100); | ||
d['start'] = '01/01/2009'; | ||
d['finish'] = '01/05/2009'; | ||
d['effortDriven'] = (i % 5 == 0); | ||
} | ||
|
||
export default data; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,30 @@ | ||
import { Grid } from '../src/'; | ||
import data from './example-data'; | ||
|
||
const columns = [ | ||
{id: 'title', name: 'Title', field: 'title'}, | ||
{id: 'duration', name: 'Duration', field: 'duration'}, | ||
{id: 'title', name: 'Title', field: 'title', maxWidth: 100, minWidth: 80}, | ||
{id: 'duration', name: 'Duration', field: 'duration', resizable: false}, | ||
{id: '%', name: '% Complete', field: 'percentComplete'}, | ||
{id: 'start', name: 'Start', field: 'start'}, | ||
{id: 'finish', name: 'Finish', field: 'finish'}, | ||
{id: 'effort-driven', name: 'Effort Driven', field: 'effortDriven'} | ||
]; | ||
|
||
let grid; | ||
|
||
const options = { | ||
enableCellNavigation: true, | ||
enableColumnReorder: false | ||
enableColumnReorder: !false, | ||
forceFitColumns: !true | ||
}; | ||
|
||
const data = []; | ||
for (let i = 0; i < 500; i++) { | ||
data[i] = { | ||
title: 'Task ' + i, | ||
duration: '5 days', | ||
percentComplete: Math.round(Math.random() * 100), | ||
start: '01/01/2009', | ||
finish: '01/05/2009', | ||
effortDriven: (i % 5 == 0) | ||
}; | ||
} | ||
|
||
export default { | ||
init: (id) => { | ||
new Grid(id, data, columns, options); | ||
grid = new Grid(id, data, columns, options); | ||
grid.onDragStart.subscribe(function(){ | ||
console.log('drag init'); | ||
}); | ||
}, | ||
title: 'Simple Example', | ||
route: '/example1' | ||
} | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,31 @@ | ||
import { Grid, Formatters } from '../src/'; | ||
import data from './example-data'; | ||
|
||
function formatter(row, cell, value, columnDef, dataContext) { | ||
function formatter(row, cell, value, columnDef, dataContext){ | ||
return value; | ||
} | ||
|
||
|
||
var grid; | ||
var data = []; | ||
var columns = [ | ||
{id: "title", name: "Title", field: "title", width: 120, cssClass: "cell-title", formatter: formatter}, | ||
{id: "duration", name: "Duration", field: "duration"}, | ||
{id: "%", name: "% Complete", field: "percentComplete", width: 80, resizable: false, formatter: Formatters.PercentCompleteBar}, | ||
{id: "start", name: "Start", field: "start", minWidth: 60}, | ||
{id: "finish", name: "Finish", field: "finish", minWidth: 60}, | ||
{id: "effort-driven", name: "Effort Driven", sortable: false, width: 80, minWidth: 20, maxWidth: 80, cssClass: "cell-effort-driven", field: "effortDriven", formatter: Formatters.Checkmark} | ||
let grid; | ||
const columns = [ | ||
{id: 'title', name: 'Title', field: 'title', width: 120, cssClass: 'cell-title', formatter: formatter}, | ||
{id: 'duration', name: 'Duration', field: 'duration'}, | ||
{id: '%', name: '% Complete', field: 'percentComplete', width: 80, resizable: false, formatter: Formatters.PercentCompleteBar}, | ||
{id: 'start', name: 'Start', field: 'start', minWidth: 60}, | ||
{id: 'finish', name: 'Finish', field: 'finish', minWidth: 60}, | ||
{id: 'effort-driven', name: 'Effort Driven', sortable: false, width: 80, minWidth: 20, maxWidth: 80, cssClass: 'cell-effort-driven', field: 'effortDriven', formatter: Formatters.Checkmark} | ||
]; | ||
|
||
var options = { | ||
const options = { | ||
editable: false, | ||
enableAddRow: false, | ||
enableCellNavigation: true | ||
enableCellNavigation: true, | ||
enableColumnReorder: false | ||
}; | ||
|
||
for (var i = 0; i < 5; i++) { | ||
var d = (data[i] = {}); | ||
|
||
d["title"] = "<a href='#' tabindex='0'>Task</a> " + i; | ||
d["duration"] = "5 days"; | ||
d["percentComplete"] = Math.min(100, Math.round(Math.random() * 110)); | ||
d["start"] = "01/01/2009"; | ||
d["finish"] = "01/05/2009"; | ||
d["effortDriven"] = (i % 5 == 0); | ||
} | ||
|
||
export default { | ||
init: id => { | ||
new Grid(id, data, columns, options); | ||
grid = new Grid(id, data, columns, options); | ||
}, | ||
title: 'Example 2: Formatters', | ||
route: '/example2' | ||
} | ||
}; |
This file contains 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
Oops, something went wrong.