You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
810 B
JavaScript
37 lines
810 B
JavaScript
var Dashboard = function ()
|
|
{
|
|
var chartColors = ['#3366CC','#DC3912', '#FF9900', '#109618','#990099','#0099C6','#DD4477','#66AA00','#B82E2E'];
|
|
|
|
return { init: init };
|
|
|
|
function init ()
|
|
{
|
|
$('*[rel=facebox]').facebox ();
|
|
$('.datatable').dataTable ();
|
|
$('.uniform').find ('input, select').uniform ();
|
|
$('input, textarea').placeholder ();
|
|
|
|
$('table.stats').each(function()
|
|
{
|
|
var chartType = '';
|
|
|
|
if ( $(this).attr('data-chart') )
|
|
{
|
|
chartType = $(this).attr('data-chart');
|
|
}
|
|
else
|
|
{
|
|
chartType = 'area';
|
|
}
|
|
|
|
var chart_width = $(this).parent ().width () * .92;
|
|
|
|
$(this).hide ().visualize({
|
|
type: chartType, // 'bar', 'area', 'pie', 'line'
|
|
width: chart_width,
|
|
height: '200px',
|
|
colors: chartColors
|
|
});
|
|
});
|
|
}
|
|
}(); |