Permalink
Browse files

odstranenie zoznamov domen, cachovanie, upravy textov, vela oprav pre…

… nasadenie
  • Loading branch information...
1 parent c00c497 commit 73d08220c36114c241202c3f62f46e64deaec6a0 @martinliptak committed Oct 9, 2011
View
@@ -4,3 +4,5 @@ log/*.log
tmp/
.sass-cache/
.idea/
+public/assets
+
@@ -31,237 +31,144 @@ function niceRound(num)
return Math.round(num * c) / c;
}
-$(function() {
- /**
- * Grid theme for Highcharts JS
- * @author Torstein Hønsi
- */
-
- Highcharts.theme = {
- colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
- chart: {
- /*
- backgroundColor: {
- linearGradient: [0, 0, 500, 500],
- stops: [
- [0, 'rgb(255, 255, 255)'],
- [1, 'rgb(240, 240, 255)']
- ]
- }
- ,
- borderWidth: 2,
- plotBackgroundColor: 'rgba(255, 255, 255, .9)',
- plotShadow: true,
- plotBorderWidth: 1
- */
- plotShadow: true
- },
- title: {
- style: {
- color: '#000',
- font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
- }
- },
- subtitle: {
- style: {
- color: '#666666',
- font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
- }
- },
- xAxis: {
- gridLineWidth: 1,
- lineColor: '#000',
- tickColor: '#000',
- labels: {
- style: {
- color: '#000',
- font: '11px Trebuchet MS, Verdana, sans-serif'
- }
- },
- title: {
- style: {
- color: '#333',
- fontWeight: 'bold',
- fontSize: '12px',
- fontFamily: 'Trebuchet MS, Verdana, sans-serif'
-
- }
- }
- },
- yAxis: {
- minorTickInterval: 'auto',
- lineColor: '#000',
- lineWidth: 1,
- tickWidth: 1,
- tickColor: '#000',
- labels: {
- style: {
- color: '#000',
- font: '11px Trebuchet MS, Verdana, sans-serif'
- }
- },
- title: {
- style: {
- color: '#333',
- fontWeight: 'bold',
- fontSize: '12px',
- fontFamily: 'Trebuchet MS, Verdana, sans-serif'
- }
- }
- },
- legend: {
- itemStyle: {
- font: '9pt Trebuchet MS, Verdana, sans-serif',
- color: 'black'
-
- },
- itemHoverStyle: {
- color: '#039'
- },
- itemHiddenStyle: {
- color: 'gray'
- }
- },
- labels: {
- style: {
- color: '#99b'
- }
- }
- };
-
- // Apply the theme
- // var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
-
- $(".chart").each(function () {
- var chart = this;
-
- options = {
- container: chart,
- chart: {
- renderTo: chart,
- defaultSeriesType: $(chart).attr("data-type"),
- zoomType: 'xy'
- },
- title: {
- text: $(chart).attr("title")
- },
- xAxis: {
- type: $(chart).attr("data-type") != 'line' ? null : 'datetime',
- categories: $.parseJSON($(chart).attr("data-categories")),
- title: {
- text: $(chart).attr("data-x-title")
- }
- },
- yAxis: {
- title: {
- text: $(chart).attr("data-y-title")
- },
- min: $(chart).attr("data-min") || null,
- startOnTick: $(chart).attr("data-type") != 'line',
- showFirstLabel: $(chart).attr("data-type") != 'line'
- },
- legend: {
- enabled: false
- },
- tooltip: {
- formatter: function () {
- return eval($(chart).attr("data-tooltip"));
- }
- },
- plotOptions: {
- column: {
- cursor: $(chart).attr("data-no-pointer") ? "" : "pointer",
- point: {
- events: {
- "click": function () {
- var m = this.category.match(/<a href="(.*)">/);
- if (m)
- window.location = m[1];
- }
+$(".chart").each(function () {
+ var chart = this;
+
+ options = {
+ container: chart,
+ chart: {
+ renderTo: chart,
+ defaultSeriesType: $(chart).attr("data-type"),
+ zoomType: 'xy'
+ },
+ title: {
+ text: $(chart).attr("title")
+ },
+ xAxis: {
+ type: $(chart).attr("data-type") != 'line' ? null : 'datetime',
+ categories: $.parseJSON($(chart).attr("data-categories")),
+ title: {
+ text: $(chart).attr("data-x-title")
+ }
+ },
+ yAxis: {
+ title: {
+ text: $(chart).attr("data-y-title")
+ },
+ min: $(chart).attr("data-min") || null,
+ startOnTick: $(chart).attr("data-type") != 'line',
+ showFirstLabel: $(chart).attr("data-type") != 'line'
+ },
+ legend: {
+ enabled: false
+ },
+ tooltip: {
+ formatter: function () {
+ return eval($(chart).attr("data-tooltip"));
+ }
+ },
+ plotOptions: {
+ column: {
+ cursor: $(chart).attr("data-no-pointer") ? "" : "pointer",
+ point: {
+ events: {
+ "click": function () {
+ var m = this.category.match(/<a href="(.*)">/);
+ if (m)
+ window.location = m[1];
}
}
},
- pie: {
- cursor: $(chart).attr("data-no-pointer") ? "" : "pointer",
- point: {
- events: {
- "click": function () {
- var m = this.name.match(/<a href="(.*)">/);
- if (m)
- window.location = m[1];
- }
+ animation: false
+ },
+ pie: {
+ cursor: $(chart).attr("data-no-pointer") ? "" : "pointer",
+ point: {
+ events: {
+ "click": function () {
+ var m = this.name.match(/<a href="(.*)">/);
+ if (m)
+ window.location = m[1];
}
}
- },
- line: {
- marker: {
- enabled: false,
- states: {
- hover: {
- enabled: true
- }
- }
- }
- }
+ },
+ animation: false
},
- series: [],
- credits: {
- enabled: false
- },
- animation: {
- enabled: false
- }
- }
-
- if ($.parseJSON($(chart).attr("data-series-hash")))
- {
- h = $.parseJSON($(chart).attr("data-series-data"));
- for (s in h)
- {
- options['series'].push({
- type: $(chart).attr("data-type"),
- name: s,
- data: h[s],
- pointInterval: parseInt($(chart).attr("data-series-interval")) || null,
- pointStart: parseInt($(chart).attr("data-series-start")) || null
- });
+ line: {
+ marker: {
+ enabled: false,
+ states: {
+ hover: {
+ enabled: true
+ }
+ }
+ }
}
-
- options.legend.enabled = true;
- }
- else
- {
- options['series'].push({
+ },
+ series: [],
+ credits: {
+ enabled: false
+ },
+ animation: {
+ enabled: false
+ }
+ }
+
+ if ($.parseJSON($(chart).attr("data-series-hash")))
+ {
+ h = $.parseJSON($(chart).attr("data-series-data"));
+ for (s in h)
+ {
+ options['series'].push({
type: $(chart).attr("data-type"),
- data: $.parseJSON($(chart).attr("data-series-data")),
+ name: s,
+ data: h[s],
pointInterval: parseInt($(chart).attr("data-series-interval")) || null,
- pointStart: parseInt($(chart).attr("data-series-start")) || null,
- dataLabels: {
- formatter: function() {
- return this.point.name + ": " + niceRound(this.y) + "%";
- }
- }
+ pointStart: parseInt($(chart).attr("data-series-start")) || null
});
- }
-
- new Highcharts.Chart(options);
- });
-
- if ($('#refresh-in').length)
- {
- setInterval('refresh();', 1000);
- }
+ }
+
+ options.legend.enabled = true;
+ }
+ else
+ {
+ options['series'].push({
+ type: $(chart).attr("data-type"),
+ data: $.parseJSON($(chart).attr("data-series-data")),
+ pointInterval: parseInt($(chart).attr("data-series-interval")) || null,
+ pointStart: parseInt($(chart).attr("data-series-start")) || null,
+ dataLabels: {
+ formatter: function() {
+ return this.point.name + ": " + niceRound(this.y) + "%";
+ }
+ }
+ });
+ }
+ new Highcharts.Chart(options);
});
+var refreshInterval;
+
function refresh()
{
secs = parseInt($('#refresh-in').html());
secs -= 1;
if (secs == 0)
+ {
+ clearInterval(refreshInterval);
location.reload(true);
+ }
else
$('#refresh-in').html(secs);
}
+
+$(function () {
+
+ if ($('#refresh-in').length)
+ {
+ refreshInterval = setInterval('refresh();', 1000);
+ }
+});
Oops, something went wrong.

0 comments on commit 73d0822

Please sign in to comment.