JavaScript
var data = [{
about: 'Nusha - drives projects by beaty',
weekWorkHours: [6, 8, 3, 4, 3, 1, 0],
src: "http://rusticker.ru/p/4fd5a0fcb8a3dafb72069d69e233bd7c.png"
}, {
about: 'Kopatich - works like machine',
weekWorkHours: [6, 5, 6, 7, 5, 1, 0],
src: 'http://rusticker.ru/p/956058422500de80654a14d89ca9a010.png'
}, {
about: 'Losayash - the most wise in team',
weekWorkHours: [7, 6, 7, 8, 6, 0, 0],
src: 'http://rusticker.ru/p/c97d0fb623809a739977f3cf12cba70c.png'
}, {
about: 'Barash - writes lyrics and encourages team',
weekWorkHours: [8, 3, 7, 6, 4, 0, 0],
src: 'http://rusticker.ru/p/6def9cdc404151fd9c44071edea3d735.png'
}, {
about: 'Eshik - intelligent and polite, works with VIP clients',
weekWorkHours: [8, 5, 3, 5, 5, 1, 0],
src: 'http://rusticker.ru/p/86e33d550dc162366a02003089ab9894.png'
}, {
about: 'Sovuniya - experinced and cooks well',
weekWorkHours: [3, 7, 4, 5, 3, 1, 0],
src: 'http://rusticker.ru/p/2adfd952d109f78f310901931aa1675b.png'
}, {
about: 'Karich - plays on all musical instruments',
weekWorkHours: [6, 4, 4, 8, 5, 1, 0],
src: 'http://rusticker.ru/p/61b07251e835d37322b7460d2b88c05b.png'
},
];
$(function() {
new FancyGrid({
title: 'Funny dream team',
renderTo: 'grid',
width: 600,
height: 350,
cellHeight: 75,
data: {
items: data
},
defaults: {
type: 'string',
width: 100
},
clicksToEdit: 1,
columnLines: false,
columns: [{
title: 'Photo',
index: 'src',
width: 80,
render: function(o) {
o.value = '<img src="' + o.value + '" style="width: 80px;margin-top: -5px;margin-left: -10px;">';
o.style = {
};
return o;
}
}, {
title: 'About',
index: 'about',
resizable: true,
width: 140,
render: function(o) {
o.style = {
'font-size': '14px',
'word-wrap': 'break-word',
...