apostrophe/data/media/table_editor/handsontable/demo/current.html

142 lines
4.0 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<title>Highlight current row or column - Handsontable</title>
<!--
Loading Handsontable (full distribution that includes all dependencies)
-->
<link data-jsfiddle="common" rel="stylesheet" media="screen" href="../dist/handsontable.full.css">
<script data-jsfiddle="common" src="../dist/handsontable.full.js"></script>
<!--
Loading demo dependencies. They are used here only to enhance the examples on this page
-->
<link data-jsfiddle="common" rel="stylesheet" media="screen" href="css/samples.css?20140331">
<script src="js/samples.js"></script>
<script src="js/highlight/highlight.pack.js"></script>
<link rel="stylesheet" media="screen" href="js/highlight/styles/github.css">
<link rel="stylesheet" href="css/font-awesome/css/font-awesome.min.css">
<!--
Facebook open graph. Don't copy this to your project :)
-->
<meta property="og:title" content="Highlight current row or column">
<meta property="og:description"
content="">
<meta property="og:url" content="http://handsontable.com/demo/current.html">
<meta property="og:image" content="http://handsontable.com/demo/image/og-image.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="409">
<meta property="og:image:height" content="164">
<link rel="canonical" href="http://handsontable.com/demo/current.html">
<!--
Google Analytics for GitHub Page. Don't copy this to your project :)
-->
<script src="js/ga.js"></script>
<script data-jsfiddle="common">
function getCarData() {
return [
["Nissan", 2009, "black", "black"],
["Nissan", 2006, "blue", "blue"],
["Chrysler", 2004, "yellow", "black"],
["Volvo", 2012, "white", "gray"]
];
}
</script>
</head>
<body>
<div class="wrapper">
<div class="wrapper-row">
<div id="global-menu-clone">
<h1><a href="../index.html">Handsontable</a></h1>
</div>
<div id="container">
<div class="columnLayout">
<div class="rowLayout">
<div class="descLayout">
<div class="pad" data-jsfiddle="example1">
<a name="lazy"></a>
<h2>Highlight current row or column</h2>
<p>Use options <code>currentRowClassName</code> and <code>currentColumnClassName</code>.</p>
<div id="example1"></div>
<p>
<button name="dump" data-dump="#example1" data-instance="hot" title="Prints current data source to Firebug/Chrome Dev Tools">
Dump
data to console
</button>
</p>
</div>
</div>
<div class="codeLayout">
<div class="pad">
<div class="jsFiddle">
<button class="jsFiddleLink" data-runfiddle="example1">Edit in jsFiddle</button>
</div>
<style data-jsfiddle="common">
.handsontable .currentRow {
background-color: #E7E8EF;
}
.handsontable .currentCol {
background-color: #F9F9FB;
}
</style>
<script data-jsfiddle="example1">
var data = [
['', 'Kia', 'Nissan', 'Toyota', 'Honda'],
['2008', 10, 11, 12, 13],
['2009', 20, 11, 14, 13],
['2009', 30, 15, 12, 13]
],
container = document.getElementById('example1'),
hot;
hot = Handsontable(container, {
data: data,
minRows: 5,
minCols: 6,
minSpareRows: 1,
currentRowClassName: 'currentRow',
currentColClassName: 'currentCol',
autoWrapRow: true,
rowHeaders: true,
colHeaders: true
});
hot.selectCell(3,3);
</script>
</div>
</div>
</div>
<div class="footer-text">
</div>
</div>
</div>
</div>
</div>
<div id="outside-links-wrapper"></div>
</body>
</html>