Skip to content

Commit

Permalink
v0.2 preview
Browse files Browse the repository at this point in the history
  • Loading branch information
stevewirts committed Dec 15, 2015
1 parent 6e9f057 commit f23231c
Show file tree
Hide file tree
Showing 46 changed files with 24,405 additions and 0 deletions.
728 changes: 728 additions & 0 deletions examples/v0.2/index.html

Large diffs are not rendered by default.

23,254 changes: 23,254 additions & 0 deletions examples/v0.2/index.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions examples/v0.2/index.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions examples/v0.2/js/accounting.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

131 changes: 131 additions & 0 deletions examples/v0.2/js/myThemes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
var myThemes = {
one: {
font: '8px Tahoma, Geneva, sans-serif',
color: 'rgb(25, 25, 25)',
backgroundColor: 'rgb(241, 241, 241)',
foregroundSelectionColor: 'rgb(255, 0, 0)',
backgroundSelectionColor: 'rgb(0, 0, 255)',

columnHeaderFont: '12px Tahoma, Geneva, sans-serif',
columnHeaderColor: 'darkblue',
columnHeaderBackgroundColor: 'pink',
columnHeaderForegroundSelectionColor: 'rgb(0, 0, 255)',
columnHeaderBackgroundSelectionColor: 'rgb(255, 0, 0)',

rowHeaderFont: '8px Tahoma, Geneva, sans-serif',
rowHeaderColor: 'rgb(25, 25, 25)',
rowHeaderBackgroundColor: 'rgb(223, 227, 232)',
rowHeaderForegroundSelectionColor: 'rgb(25, 25, 25)',
rowHeaderBackgroundSelectionColor: 'rgb(255, 220, 97)',

backgroundColor2: 'rgb(201, 201, 201)',
lineColor: 'rgb(199, 199, 199)',
voffset: 0,
scrollbarHoverOver: 'visible',
scrollbarHoverOff: 'hidden',
scrollingEnabled: true,

fixedRowAlign: 'center',
fixedColAlign: 'center',
cellPadding: 5,
gridLinesH: true,
gridLinesV: true,

defaultRowHeight: 20,
defaultFixedRowHeight: 15,
defaultColumnWidth: 100,
defaultFixedColumnWidth: 100,

//for immediate painting, set these values to 0, true respectively

editorActivationKeys: ['alt', 'esc'],
columnAutosizing: false,
readOnly: false
},
two: {
font: '10px Tahoma, Geneva, sans-serif',
color: 'rgb(25, 25, 25)',
backgroundColor: 'rgb(241, 241, 241)',
foregroundSelectionColor: 'rgb(25, 25, 25)',
backgroundSelectionColor: 'rgb(183, 219, 255)',

columnHeaderFont: '10px Tahoma, Geneva, sans-serif',
columnHeaderColor: 'rgb(25, 25, 25)',
columnHeaderBackgroundColor: 'rgb(223, 227, 232)',
columnHeaderForegroundSelectionColor: 'rgb(25, 25, 25)',
columnHeaderBackgroundSelectionColor: 'rgb(255, 220, 97)',

rowHeaderFont: '10px Tahoma, Geneva, sans-serif',
rowHeaderColor: 'rgb(25, 25, 25)',
rowHeaderBackgroundColor: 'rgb(223, 227, 232)',
rowHeaderForegroundSelectionColor: 'rgb(25, 25, 25)',
rowHeaderBackgroundSelectionColor: 'rgb(255, 220, 97)',

backgroundColor2: 'rgb(201, 201, 201)',
lineColor: 'rgb(199, 199, 199)',
voffset: 0,
scrollbarHoverOver: 'visible',
scrollbarHoverOff: 'hidden',
scrollingEnabled: true,

fixedRowAlign: 'center',
fixedColAlign: 'center',
cellPadding: 5,
gridLinesH: true,
gridLinesV: true,

defaultRowHeight: 15,
defaultFixedRowHeight: 15,
defaultColumnWidth: 100,
defaultFixedColumnWidth: 100,

//for immediate painting, set these values to 0, true respectively

editorActivationKeys: ['alt', 'esc'],
columnAutosizing: false,
readOnly: false
},
three: {
font: '15px Tahoma, Geneva, sans-serif',
color: 'rgb(25, 25, 25)',
backgroundColor: 'rgb(241, 241, 241)',
foregroundSelectionColor: 'rgb(25, 25, 25)',
backgroundSelectionColor: 'rgb(183, 219, 255)',

columnHeaderFont: '15px Tahoma, Geneva, sans-serif',
columnHeaderColor: 'rgb(25, 25, 25)',
columnHeaderBackgroundColor: 'rgb(223, 227, 232)',
columnHeaderForegroundSelectionColor: 'rgb(25, 25, 25)',
columnHeaderBackgroundSelectionColor: 'rgb(255, 220, 97)',

rowHeaderFont: '15px Tahoma, Geneva, sans-serif',
rowHeaderColor: 'rgb(25, 25, 25)',
rowHeaderBackgroundColor: 'rgb(223, 227, 232)',
rowHeaderForegroundSelectionColor: 'rgb(25, 25, 25)',
rowHeaderBackgroundSelectionColor: 'rgb(255, 220, 97)',

backgroundColor2: 'rgb(201, 201, 201)',
lineColor: 'rgb(199, 199, 199)',
voffset: 0,
scrollbarHoverOver: 'visible',
scrollbarHoverOff: 'hidden',
scrollingEnabled: true,

fixedRowAlign: 'center',
fixedColAlign: 'center',
cellPadding: 5,
gridLinesH: true,
gridLinesV: true,

defaultRowHeight: 15,
defaultFixedRowHeight: 15,
defaultColumnWidth: 100,
defaultFixedColumnWidth: 100,

//for immediate painting, set these values to 0, true respectively

editorActivationKeys: ['alt', 'esc'],
columnAutosizing: false,
readOnly: false
}
};
73 changes: 73 additions & 0 deletions examples/v0.2/js/sampledata.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
'use strict';

(function() {
var numRows = 10000;

var firstNames = ['', 'Olivia', 'Sophia', 'Ava', 'Isabella', 'Boy', 'Liam', 'Noah', 'Ethan', 'Mason', 'Logan', 'Moe', 'Larry', 'Curly', 'Shemp', 'Groucho', 'Harpo', 'Chico', 'Zeppo', 'Stanley', 'Hardy'];
var lastNames = ['', 'Wirts', 'Oneil', 'Smith', 'Barbarosa', 'Soprano', 'Gotti', 'Columbo', 'Luciano', 'Doerre', 'DePena'];
var months = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];
var days = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30'];
var states = ['', 'Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'];

var randomFunc = Math.random;
//var randomFunc = rnd;

var randomPerson = function() {
var firstName = Math.round((firstNames.length - 1) * randomFunc());
//var lastName = 'a' + randomFunc() + 'b';
var lastName = Math.round((lastNames.length - 1) * randomFunc());
var number_of_pets = Math.round(10 * randomFunc());
var birthyear = 1900 + Math.round(randomFunc() * 114);
var birthmonth = Math.round(randomFunc() * 11);
var birthday = Math.round(randomFunc() * 29);
var birthstate = Math.round(randomFunc() * (states.length - 1));
var residencestate = Math.round(randomFunc() * (states.length - 1));
var travel = randomFunc() * 1000;
var income = randomFunc() * 100000;
var employed = Math.round(randomFunc());
var person = {
last_name: lastNames[lastName], //jshint ignore:line
first_name: firstNames[firstName], //jshint ignore:line
number_of_pets: number_of_pets,
birthDate: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
birthState: states[birthstate],
residenceState: states[residencestate],
employed: employed === 1,
income: income,
travel: travel,
squareOfIncome: 0,

// last_name1: lastNames[lastName], //jshint ignore:line
// first_name1: firstNames[firstName], //jshint ignore:line
// pets1: pets,
// birthDate1: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
// birthState1: states[birthstate],
// residenceState1: states[residencestate],
// employed1: employed === 1,
// income1: income,
// travel1: travel,
// squareOfIncome1: 0,
};
person.squareOfIncome = function() {
return Math.sqrt(person.income);
}
// person.squareOfIncome1 = function() {
// return Math.sqrt(person.income);
// }
return person;
};

var data1 = [];
var data2 = [];
for (var i = 0; i < numRows/2; i++) {
data1.push(randomPerson());
}
for (var i = 0; i < numRows; i++) {
data2.push(randomPerson());
}
window.people1 = data1;
window.people2 = data2;
window.states = states;
window.firstNames = firstNames;
window.lastNames = lastNames;
})();
134 changes: 134 additions & 0 deletions examples/v0.2/js/widedata.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
'use strict';

(function() {
var numRows = 10000;

var firstNames = ['', 'Olivia', 'Sophia', 'Ava', 'Isabella', 'Boy', 'Liam', 'Noah', 'Ethan', 'Mason', 'Logan', 'Moe', 'Larry', 'Curly', 'Shemp', 'Groucho', 'Harpo', 'Chico', 'Zeppo', 'Stanley', 'Hardy'];
var lastNames = ['', 'Wirts', 'Oneil', 'Smith', 'Barbarosa', 'Soprano', 'Gotti', 'Columbo', 'Luciano', 'Doerre', 'DePena'];
var months = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];
var days = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30'];
var states = ['', 'Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'];

var randomFunc = Math.random;
//var randomFunc = rnd;

var randomPerson = function() {
var firstName = Math.round((firstNames.length - 1) * randomFunc());
//var lastName = 'a' + randomFunc() + 'b';
var lastName = Math.round((lastNames.length - 1) * randomFunc());
var pets = Math.round(10 * randomFunc());
var birthyear = 1900 + Math.round(randomFunc() * 114);
var birthmonth = Math.round(randomFunc() * 11);
var birthday = Math.round(randomFunc() * 29);
var birthstate = Math.round(randomFunc() * (states.length - 1));
var residencestate = Math.round(randomFunc() * (states.length - 1));
var travel = randomFunc() * 1000;
var income = randomFunc() * 100000;
var employed = Math.round(randomFunc());
var person = {
last_name: lastNames[lastName], //jshint ignore:line
first_name: firstNames[firstName], //jshint ignore:line
total_number_of_pets_owned: pets,
birthDate: new Date(birthyear + '-' + months[birthmonth] + '-' + days[birthday]),
birthState: states[birthstate],
residenceState: states[residencestate],
employed: employed === 1,
income: income,
travel: travel,
squareOfIncome: 0,
onelast_name: lastNames[lastName], //jshint ignore:line
onefirst_name: firstNames[firstName], //jshint ignore:line
onepets: pets,
onebirthDate: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
onebirthState: states[birthstate],
oneresidenceState: states[residencestate],
oneemployed: employed === 1,
oneincome: income,
onetravel: travel,
onesquareOfIncome: 0,
twolast_name: lastNames[lastName], //jshint ignore:line
twofirst_name: firstNames[firstName], //jshint ignore:line
twopets: pets,
twobirthDate: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
twobirthState: states[birthstate],
tworesidenceState: states[residencestate],
twoemployed: employed === 1,
twoincome: income,
twotravel: travel,
twosquareOfIncome: 0,
threelast_name: lastNames[lastName], //jshint ignore:line
threefirst_name: firstNames[firstName], //jshint ignore:line
threepets: pets,
threebirthDate: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
threebirthState: states[birthstate],
threeresidenceState: states[residencestate],
threeemployed: employed === 1,
threeincome: income,
threetravel: travel,
threesquareOfIncome: 0,
fourlast_name: lastNames[lastName], //jshint ignore:line
fourfirst_name: firstNames[firstName], //jshint ignore:line
fourpets: pets,
fourbirthDate: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
fourbirthState: states[birthstate],
fourresidenceState: states[residencestate],
fouremployed: employed === 1,
fourincome: income,
fourtravel: travel,
foursquareOfIncome: 0,
fivelast_name: lastNames[lastName], //jshint ignore:line
fivefirst_name: firstNames[firstName], //jshint ignore:line
fivepets: pets,
fivebirthDate: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
fivebirthState: states[birthstate],
fiveresidenceState: states[residencestate],
fiveemployed: employed === 1,
fiveincome: income,
fivetravel: travel,
fivesquareOfIncome: 0,
sixlast_name: lastNames[lastName], //jshint ignore:line
sixfirst_name: firstNames[firstName], //jshint ignore:line
sixpets: pets,
sixbirthDate: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
sixbirthState: states[birthstate],
sixresidenceState: states[residencestate],
sixemployed: employed === 1,
sixincome: income,
sixtravel: travel,
sixsquareOfIncome: 0,
sevenlast_name: lastNames[lastName], //jshint ignore:line
sevenfirst_name: firstNames[firstName], //jshint ignore:line
sevenpets: pets,
sevenbirthDate: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
sevenbirthState: states[birthstate],
sevenresidenceState: states[residencestate],
sevenemployed: employed === 1,
sevenincome: income,
seventravel: travel,
sevensquareOfIncome: 0,
eightlast_name: lastNames[lastName], //jshint ignore:line
eightfirst_name: firstNames[firstName], //jshint ignore:line
eightpets: pets,
eightbirthDate: birthyear + '-' + months[birthmonth] + '-' + days[birthday],
eightbirthState: states[birthstate],
eightresidenceState: states[residencestate],
eightemployed: employed === 1,
eightincome: income,
eighttravel: travel,
eightsquareOfIncome: 0,
};
person.squareOfIncome = function() {
return Math.sqrt(person.income);
}
return person;
};

var data = [];
for (var i = 0; i < numRows; i++) {
data.push(randomPerson());
}
window.people1 = window.people2 = data;
window.states = states;
window.firstNames = firstNames;
window.lastNames = lastNames;
})();
Loading

0 comments on commit f23231c

Please sign in to comment.