pull/3/head
Jim Heising 2013-08-13 15:23:42 -07:00
parent 815f2c0202
commit 55fdef5a42
23 changed files with 14403 additions and 0 deletions

1
.gitignore vendored 100644
View File

@ -0,0 +1 @@
.idea

28
config.js 100644
View File

@ -0,0 +1,28 @@
var gridConfig = {
"datasources" : [
{
name : "bunker_still",
type : "json",
url : "http://ops.bunkerstills.com/things/1291d1ffb033/status?access_code=355272e39ec44198bf0dec6f58a003b7&callback=?",
refresh : 5
}
],
"widgets" : [
{
"title" : "Status",
"width" : 2,
"height": 2,
"row" : 1,
"col" : 1,
"sections" :
[
{
"title" : "Now",
"type" : "big-text",
"value" : "datasource: bunker_still.status.components.ambientPressure.value",
"refresh" : "bunker_still"
}
]
}
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

6167
css/bootstrap.css 100644

File diff suppressed because it is too large Load Diff

9
css/bootstrap.min.css vendored 100644

File diff suppressed because one or more lines are too long

2
css/jquery.gridster.min.css vendored 100644
View File

@ -0,0 +1,2 @@
/*! gridster.js - v0.1.0 - 2013-06-14 - * http://gridster.net/ - Copyright (c) 2013 ducksboard; Licensed MIT */
.gridster{position:relative}.gridster>*{margin:0 auto;-webkit-transition:height .4s;-moz-transition:height .4s;-o-transition:height .4s;-ms-transition:height .4s;transition:height .4s}.gridster .gs_w{z-index:2;position:absolute}.ready .gs_w:not(.preview-holder){-webkit-transition:opacity .3s,left .3s,top .3s;-moz-transition:opacity .3s,left .3s,top .3s;-o-transition:opacity .3s,left .3s,top .3s;transition:opacity .3s,left .3s,top .3s}.ready .gs_w:not(.preview-holder){-webkit-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-moz-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-o-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;transition:opacity .3s,left .3s,top .3s,width .3s,height .3s}.gridster .preview-holder{z-index:1;position:absolute;background-color:#fff;border-color:#fff;opacity:.3}.gridster .player-revert{z-index:10!important;-webkit-transition:left .3s,top .3s!important;-moz-transition:left .3s,top .3s!important;-o-transition:left .3s,top .3s!important;transition:left .3s,top .3s!important}.gridster .dragging{z-index:10!important;-webkit-transition:all 0s!important;-moz-transition:all 0s!important;-o-transition:all 0s!important;transition:all 0s!important}

310
css/styles.css 100644
View File

@ -0,0 +1,310 @@
body
{
background-color: #101214;
text-shadow: 1px 1px #0e0e0e;
color: #8b8b8b;
}
.gridster header
{
background-color: #272727;
height: 40px;
margin: 0;
padding: 0 10px 0 10px;
color: #8b8b8b;
text-transform: uppercase;
}
header h1
{
font-size: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 0;
margin: 0;
}
.gridster section
{
padding: 10px;
line-height: normal;
bottom: 0;
left: 0;
right: 0;
margin: auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#main-header
{
height: 300px;
position : fixed;
width: 100%;
z-index : 1000;
top: -280px;
}
#admin-bar
{
background-color : #313131;
width: 100%;
height: 100%;
bottom: 20px;
position : absolute;
}
#toggle-header
{
display : block;
width : 36px;
height : 22px;
background-color: #313131;
bottom: -22px;
position : absolute;
left: 48%;
border-radius: 3px;
}
.widget-tools
{
top : 10px;
right: 0px;
position: absolute;
display: none;
opacity: 0.0;
}
.widget-tools i
{
padding-right: 10px;
}
#board-tools
{
width: 50%;
float: left;
}
#datasources
{
width: 50%;
float: right;
}
#cam
{
height: 100%;
background-size: cover;
}
#admin-menu
{
left: 0px;
right: 0px;
width: 950px;
top: 30px;
margin: 0px auto;
padding-left: 20px;
position: absolute;
}
#admin-menu button
{
color : #d3d4d4;
text-shadow : 1px 1px #0e0e0e;
text-transform: uppercase;
font-weight : 100;
font-family : "HelveticaNeue-UltraLight", "Helvetica Neue Ultra Light", "Helvetica Neue", sans-serif;
}
.sparkline-inline
{
width: 50%;
float: right;
height: 30px;
}
.sparkline
{
width: 100%;
height: 60px;
}
.sub-section > h2
{
font-size: 14px;
font-weight: normal;
padding: 0px;
margin: 0px;
line-height: normal;
}
.sub-section
{
border-bottom: solid 1px #363636;
margin-bottom: 10px;
}
.sub-section:last-of-type
{
border-bottom: none;
margin-bottom: 0;
}
#pump-icon
{
padding: 10px;
padding-bottom: 12px;
display: none;
}
.gauge-widget
{
width: 200px;
height: 160px;
display: inline-block;
text-align: center;
}
#admin-menu h1
{
}
.big-text
{
color: #d3d4d4;
font-size: 45px;
font-weight: 100;
font-family: "HelveticaNeue-UltraLight", "Helvetica Neue Ultra Light", "Helvetica Neue", sans-serif;
overflow: hidden;
text-overflow: ellipsis;
}
.medium-text
{
color: #d3d4d4;
font-size: 30px;
font-weight: 100;
font-family: "HelveticaNeue-UltraLight", "Helvetica Neue Ultra Light", "Helvetica Neue", sans-serif;
overflow: hidden;
text-overflow: ellipsis;
}
.small-text
{
color: #d3d4d4;
font-size: 20px;
font-weight: 100;
font-family: "HelveticaNeue-UltraLight", "Helvetica Neue Ultra Light", "Helvetica Neue", sans-serif;
overflow: hidden;
text-overflow: ellipsis;
}
ul, ol {
list-style: none;
}
.gridster {
max-width: 960px;
width: 100%;
margin: 0 auto;
margin-top: 20px;
opacity: 0;
-webkit-transition: opacity .6s;
-moz-transition: opacity .6s;
-o-transition: opacity .6s;
-ms-transition: opacity .6s;
transition: opacity .6s;
}
.gridster .gs_w {
background: #2a2a2a;
cursor: pointer;
-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.3);
box-shadow: 0 0 5px rgba(0,0,0,0.3);
padding: 0px;
margin: 0px;
overflow: hidden;
}
.gridster .player {
-webkit-box-shadow: 3px 3px 5px rgba(0,0,0,0.3);
box-shadow: 3px 3px 5px rgba(0,0,0,0.3);
}
.gridster .preview-holder {
border: none!important;
border-radius: 0!important;
background: rgba(255,255,255,.2)!important;
}
.onoffswitch {
position: relative; width: 100px;
-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
}
.onoffswitch-checkbox {
display: none;
}
.onoffswitch-label {
display: block; overflow: hidden; cursor: pointer;
border: 0px solid #999999; border-radius: 0px;
}
.onoffswitch-inner {
width: 200%; margin-left: -100%;
-moz-transition: margin 0.3s ease-in 0s; -webkit-transition: margin 0.3s ease-in 0s;
-o-transition: margin 0.3s ease-in 0s; transition: margin 0.3s ease-in 0s;
}
.onoffswitch-inner > div {
float: left; position: relative; width: 50%; height: 40px; padding: 0; line-height: 40px;
font-size: 15px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
.onoffswitch-inner .onoffswitch-active {
padding-left: 15px;
background-color: #1F1F1F; color: #FFFFFF;
}
.onoffswitch-inner .onoffswitch-inactive {
padding-right: 15px;
background-color: #1F1F1F; color: #FFFFFF;
text-align: right;
}
.onoffswitch-switch {
width: 50px; margin: 0px; text-align: center;
border: 0px solid #999999;border-radius: 0px;
position: absolute; top: 0; bottom: 0;
}
.onoffswitch-active .onoffswitch-switch {
background: #78AB49; left: 0;
}
.onoffswitch-inactive .onoffswitch-switch {
background: #9D3926; right: 0;
}
.onoffswitch-active .onoffswitch-switch:before {
content: " "; position: absolute; top: 0; left: 50px;
border-style: solid; border-color: #78AB49 transparent transparent #78AB49; border-width: 20px 10px;
}
.onoffswitch-inactive .onoffswitch-switch:before {
content: " "; position: absolute; top: 0; right: 50px;
border-style: solid; border-color: transparent #9D3926 #9D3926 transparent; border-width: 20px 10px;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
margin-left: 0;
}

BIN
img/ajax-loader.gif 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

163
index.html 100644
View File

@ -0,0 +1,163 @@
<!DOCTYPE html>
<html>
<head>
<title>deccoboard</title>
<meta name="viewport" content="width=1024"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport" content = "width = device-width, initial-scale = 1, user-scalable = no" />
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="css/jquery.gridster.min.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<script src="js/head.js"></script>
<script type="text/javascript">
head.js("js/jquery.js",
"js/underscore.js",
"js/bootstrap.min.js",
"js/jquery.gridster.js",
"js/jquery.sparkline.min.js",
"js/raphael.2.1.0.min.js",
"js/justgage.1.0.1.min.js",
"js/dashboard.js",
"config.js",
function (){
});
</script>
</head>
<body>
<header id="main-header">
<div id="admin-bar">
<div id="admin-menu">
<div id="board-tools">
<h1>DECCOBOARD</h1>
<button class="btn btn-inverse" type="button"><i class="icon-plus icon-white delete-widget"></i> Add Widget</button>
</div>
<div id="datasources">
<h1>DATASOURCES</h1>
<table class="table" id="datasources-list">
</table>
</div>
</div>
</div>
<a id="toggle-header" href="#" class="" style="bottom: 0px;"></a>
</header>
<div class="gridster">
<ul>
<!--<li data-row="1" data-col="1" data-sizex="2" data-sizey="2">
<header>
<h1>Status</h1>
<div class="widget-tools"><i class="icon-wrench icon-white edit-widget"></i><i class="icon-trash icon-white delete-widget"></i></div>
</header>
<section>
<div class="sub-section">
Now
<br>
<div class="big-text" id="current-time" style="font-size: 45px;"></div>
</div>
<div class="sub-section">
Last Telemetry Update
<br>
<div class="medium-text" id="last-telemetry"></div>
</div>
<div class="sub-section">
<div class="onoffswitch">
<input id="status-on-off" type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked disabled>
<label class="onoffswitch-label" for="myonoffswitch">
<div class="onoffswitch-inner">
<div class="onoffswitch-active"><div class="onoffswitch-switch">ON</div></div>
<div class="onoffswitch-inactive"><div class="onoffswitch-switch">OFF</div></div>
</div>
</label>
</div>
<span class="small-text" id="status"></span> phase
</div>
</section>
</li>
<li data-row="3" data-col="1" data-sizex="2" data-sizey="2">
<header>
<h1>Live</h1>
</header>
<section id="cam">
</section>
</li>
<li data-row="1" data-col="5" data-sizex="2" data-sizey="2">
<header>
<h1>Draw Temperatures</h1>
</header>
<section>
<div class="sub-section">
Heads
<br>
<span class="medium-text" id="heads-temp"></span> &deg;F
&nbsp;<span id="heads-temp-sparkline" class="sparkline-inline"></span>
</div>
<div class="sub-section">
Hearts
<br>
<span class="medium-text" id="hearts-temp"></span> &deg;F
&nbsp;<span id="hearts-temp-sparkline" class="sparkline-inline"></span>
</div>
<div class="sub-section">
Tails
<br>
<span class="medium-text" id="tails-temp"></span> &deg;F
&nbsp;<span id="tails-temp-sparkline" class="sparkline-inline"></span>
</div>
<div class="sub-section">
Sump
<br>
<span class="medium-text" id="sump-temp"></span> &deg;F
&nbsp;<span id="sump-temp-sparkline" class="sparkline-inline"></span>
</div>
</section>
</li>
<li data-row="1" data-col="3" data-sizex="2" data-sizey="1">
<header>
<h1>Pump Flow Rate</h1>
</header>
<section>
<span class="big-text" id="pump-flow-rate"></span> gallons / hour <img id="pump-icon" src="img/ajax-loader.gif">
</section>
</li>
<li data-row="2" data-col="3" data-sizex="2" data-sizey="1">
<header>
<h1>Atmosphere</h1>
</header>
<section>
<div class="sub-section">
Barometric Pressure
<br>
<span class="medium-text" id="pressure"></span> Pa
&nbsp;<span id="pressure-sparkline" class="sparkline-inline"></span>
</div>
</section>
</li>
<li data-row="3" data-col="3" data-sizex="2" data-sizey="2">
<header>
<h1>Pre Heater</h1>
</header>
<section class="text-center">
<div id="pre-heater-gauge" class="gauge-widget"></div>
<br>
<div id="pre-heater-sparkline" class="sparkline"></div>
</section>
</li>
<li data-row="3" data-col="5" data-sizex="2" data-sizey="2">
<header>
<h1>Main Heater</h1>
</header>
<section class="text-center">
<div id="main-heater-gauge" class="gauge-widget"></div>
<br>
<div id="main-heater-sparkline" class="sparkline"></div>
</section>
</li>-->
</ul>
</div>
</body>
</html>

2280
js/bootstrap.js 100644

File diff suppressed because it is too large Load Diff

6
js/bootstrap.min.js vendored 100644

File diff suppressed because one or more lines are too long

383
js/dashboard.js 100644
View File

@ -0,0 +1,383 @@
var ACCESS_CODE = "355272e39ec44198bf0dec6f58a003b7";
var THING_ID = "1291d1ffb033";
var SPARKLINE_HISTORY_LENGTH = 100;
var mainPowerGauge;
var prePowerGauge;
var editing = false;
var grid;
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
function createGauge(id, min, max)
{
return new JustGage({
id: id,
value: 0,
min: min,
max: max,
title: "Power",
label: "%",
showInnerShadow: false,
valueFontColor: "#d3d4d4"
});
}
function updateSparkline(id, maxValues, newValue)
{
var values = $(id).data().values;
if(!values)
{
values = [];
}
if(values.length >= maxValues)
{
values.shift();
}
values.push(newValue);
$(id).data().values = values;
$(id).sparkline(values, {
type : "line",
height: "100%",
width: "100%",
fillColor : false,
lineColor : "#FF9900",
lineWidth : 2,
spotRadius : 3,
spotColor: false,
minSpotColor : "#78AB49",
maxSpotColor : "#78AB49",
highlightSpotColor : "#9D3926",
highlightLineColor : "#9D3926"
});
}
function updateDashboard() {
$.getJSON("http://ops.bunkerstills.com/things/" + getParameterByName("still_id") + "/status?access_code=" + getParameterByName("access_code") + "&callback=?")
.done(function (data) {
var components = data.status.components;
var onOff = !(components.startStopSwitch.value == "OFF" || components.startStopSwitch.value == "false" || components.startStopSwitch.value == false);
if(onOff)
{
$("#pump-icon").show();
}
else
{
$("#pump-icon").hide();
}
$("#status-on-off").prop("checked", onOff);
$("#status").text(components.operationState.value);
if(onOff)
{
$("#pump-flow-rate").text(components.pumpFlowRate.value);
}
else
{
$("#pump-flow-rate").text("0.0");
}
var telemetryUpdateTime = new Date(data.status_update_time);
$("#last-telemetry").text(telemetryUpdateTime.toLocaleTimeString());
$("#pressure").text(components.ambientPressure.value);
updateSparkline("#pressure-sparkline", SPARKLINE_HISTORY_LENGTH, components.ambientPressure.value);
$("#heads-temp").text(components.headsTemp.value);
updateSparkline("#heads-temp-sparkline", SPARKLINE_HISTORY_LENGTH, components.headsTemp.value);
$("#hearts-temp").text(components.heartsTemp.value);
updateSparkline("#hearts-temp-sparkline", SPARKLINE_HISTORY_LENGTH, components.heartsTemp.value);
$("#tails-temp").text(components.tailsTemp.value);
updateSparkline("#tails-temp-sparkline", SPARKLINE_HISTORY_LENGTH, components.tailsTemp.value);
$("#sump-temp").text(components.calculatedSumpTemp.value);
updateSparkline("#sump-temp-sparkline", SPARKLINE_HISTORY_LENGTH, components.calculatedSumpTemp.value);
prePowerGauge.refresh(components.preHeaterPower.value);
updateSparkline("#pre-heater-sparkline", SPARKLINE_HISTORY_LENGTH, components.preHeaterPower.value);
mainPowerGauge.refresh(components.mainHeaterPower.value);
updateSparkline("#main-heater-sparkline", SPARKLINE_HISTORY_LENGTH, components.mainHeaterPower.value);
});
}
function toggleEdit()
{
editing = !editing;
if(!editing)
{
$("#main-header").animate({top: "-280px"}, 500);
$(".gridster").animate({"margin-top": "20px"}, 500);
$("#main-header").data().shown = false;
$(".widget-tools").animate({opacity: 0.0}, 500, function(){
$().css("display", "none");
});
grid.disable();
}
else
{
$("#main-header").animate({top:"0px"}, 500);
$(".gridster").animate({"margin-top": "300px"}, 500);
$("#main-header").data().shown = true;
$(".widget-tools").css("display", "block").animate({opacity: 1.0}, 500);
grid.enable();
}
}
function updateSectionValue(section)
{
var config = section.data("decco-config");
var valueElement = $("#section-" + config.sectionID + "-value");
var value;
// If an error existed here before, destroy it
valueElement.popover('destroy');
try
{
value = window["getSection" + config.sectionID + "Value"](datasourcesData);
}
catch(e)
{
value = "Error";
valueElement.popover({
title: "Error",
content: e.toString(),
trigger: "hover",
container : "body"
});
}
valueElement.text(value);
}
var sectionID = 0;
function addWidget(widgetConfig)
{
var widget = $('<li><header><h1>' + widgetConfig.title + '</h1><div class="widget-tools"><i class="icon-wrench icon-white edit-widget"></i><i class="icon-trash icon-white delete-widget"></i></div></header></li>');
var sectionContainer = $("<section></section>");
widget.append(sectionContainer);
grid.add_widget(widget, widgetConfig.width, widgetConfig.height, widgetConfig.col, widgetConfig.row);
_.each(widgetConfig.sections, function(sectionConfig, index, list)
{
sectionID++;
sectionConfig.sectionID = sectionID;
var section = $('<div class="sub-section" id="' + sectionID + '"></div>');
section.data("decco-config", sectionConfig);
if(!_.isUndefined(sectionConfig.title))
{
section.append("<h2>" + sectionConfig.title + "</h2>");
}
var sectionValue = $('<div id="section-' + sectionID + '-value"></div>');
section.append(sectionValue);
switch(sectionConfig.type)
{
case "big-text":
{
sectionValue.addClass("big-text");
break;
}
}
var valueScript = $('<script type="text/javascript"></script>');
section.append(valueScript);
var script;
var typeSpecIndex = sectionConfig.value.indexOf("javascript:");
if(typeSpecIndex == 0)
{
script = sectionConfig.value.substring(11);
// If there is no return, add one
if((script.match(/;/g) || []).length <= 1 && script.indexOf("return") == -1)
{
script = "return " + script;
}
}
else
{
typeSpecIndex = sectionConfig.value.indexOf("datasource:");
if(typeSpecIndex == 0)
{
script = 'return data.' + sectionConfig.value.substring(11).trim() + ";";
}
else
{
script = 'return "' + sectionConfig.value + '";';
}
}
valueScript.text('function getSection' + sectionID + 'Value(data){ ' + script + ' }');
sectionContainer.append(section);
if(!_.isUndefined(sectionConfig.refresh))
{
addUpdateSection(section);
}
});
}
function addDatasource(datasourceConfig)
{
if(_.isUndefined(datasourceConfig.refresh))
{
return;
}
updateDatasources[datasourceConfig.name] = {
last_update: Math.round(Date.now() / 1000),
interval : Number(datasourceConfig.refresh),
config : datasourceConfig,
sections : []
};
doUpdateDatasource(updateDatasources[datasourceConfig.name]);
}
var updateSections = [];
var updateDatasources = {};
var datasourcesData = {};
function processUpdates()
{
var now = Math.round(Date.now() / 1000);
_.each(updateSections, function(updateSection)
{
var elapsedSeconds = now - updateSection.last_update;
if(elapsedSeconds >= updateSection.interval)
{
updateSection.last_update = Math.round(Date.now() / 1000);
updateSectionValue(updateSection.section);
}
});
_.each(updateDatasources, function(updateDatasource)
{
var elapsedSeconds = now - updateDatasource.last_update;
if(elapsedSeconds >= updateDatasource.interval)
{
updateDatasource.last_update = Math.round(Date.now() / 1000);
doUpdateDatasource(updateDatasource);
}
});
}
function doUpdateDatasource(datasource)
{
switch(datasource.config.type)
{
case "json":
{
$.getJSON(datasource.config.url).done(function(data)
{
datasourcesData[datasource.config.name] = data;
_.each(datasource.sections, function(section)
{
updateSectionValue(section);
});
});
break;
}
}
}
function addUpdateSection(section)
{
var config = section.data("decco-config");
if(_.isUndefined(config.refresh))
{
return;
}
var data = {
config : config,
section : section
};
if(_.isNumber(config.refresh))
{
// If this is a number, add it to be refreshed at a given time
updateSections.push({
last_update : Math.round(Date.now() / 1000),
interval : Number(config.refresh),
config : config,
section: section
});
updateSectionValue(section);
}
else if(config.refresh in updateDatasources)
{
// If this is a datasource name, add it to our datasources to be refreshed
updateDatasources[config.refresh].sections.push(section);
}
}
$(function () { //DOM Ready
grid = $(".gridster ul").gridster({
widget_margins: [10, 10],
widget_base_dimensions: [140, 140]
}).data("gridster");
grid.disable();
// Parse out our datasources
_.each(gridConfig.datasources, function(datasourceConfig)
{
addDatasource(datasourceConfig);
});
// Parse our our widgets
_.each(gridConfig.widgets, function(widgetConfig)
{
addWidget(widgetConfig);
});
processUpdates();
setInterval(processUpdates, 1000);
$("#toggle-header").on("click", toggleEdit);
// Fade everything in
$(".gridster").css("opacity", 1);
});

17
js/head.js 100644
View File

@ -0,0 +1,17 @@
(function(a,w){function f(a){p[p.length]=a}function m(a){q.className=q.className.replace(RegExp("\\b"+a+"\\b"),"")}function k(a,d){for(var b=0,c=a.length;b<c;b++)d.call(a,a[b],b)}function s(){q.className=q.className.replace(/ (w-|eq-|gt-|gte-|lt-|lte-|portrait|no-portrait|landscape|no-landscape)\d+/g,"");var b=a.innerWidth||q.clientWidth,d=a.outerWidth||a.screen.width;h.screen.innerWidth=b;h.screen.outerWidth=d;f("w-"+b);k(c.screens,function(a){b>a?(c.screensCss.gt&&f("gt-"+a),c.screensCss.gte&&f("gte-"+
a)):b<a?(c.screensCss.lt&&f("lt-"+a),c.screensCss.lte&&f("lte-"+a)):b===a&&(c.screensCss.lte&&f("lte-"+a),c.screensCss.eq&&f("e-q"+a),c.screensCss.gte&&f("gte-"+a))});var d=a.innerHeight||q.clientHeight,g=a.outerHeight||a.screen.height;h.screen.innerHeight=d;h.screen.outerHeight=g;h.feature("portrait",d>b);h.feature("landscape",d<b)}function r(){a.clearTimeout(u);u=a.setTimeout(s,100)}var n=a.document,g=a.navigator,t=a.location,q=n.documentElement,p=[],c={screens:[240,320,480,640,768,800,1024,1280,
1440,1680,1920],screensCss:{gt:!0,gte:!1,lt:!0,lte:!1,eq:!1},browsers:[{ie:{min:6,max:10}}],browserCss:{gt:!0,gte:!1,lt:!0,lte:!1,eq:!0},section:"-section",page:"-page",head:"head"};if(a.head_conf)for(var b in a.head_conf)a.head_conf[b]!==w&&(c[b]=a.head_conf[b]);var h=a[c.head]=function(){h.ready.apply(null,arguments)};h.feature=function(a,b,c){if(!a)return q.className+=" "+p.join(" "),p=[],h;"[object Function]"===Object.prototype.toString.call(b)&&(b=b.call());f((b?"":"no-")+a);h[a]=!!b;c||(m("no-"+
a),m(a),h.feature());return h};h.feature("js",!0);b=g.userAgent.toLowerCase();g=/mobile|midp/.test(b);h.feature("mobile",g,!0);h.feature("desktop",!g,!0);b=/(chrome|firefox)[ \/]([\w.]+)/.exec(b)||/(iphone|ipad|ipod)(?:.*version)?[ \/]([\w.]+)/.exec(b)||/(android)(?:.*version)?[ \/]([\w.]+)/.exec(b)||/(webkit|opera)(?:.*version)?[ \/]([\w.]+)/.exec(b)||/(msie) ([\w.]+)/.exec(b)||[];g=b[1];b=parseFloat(b[2]);switch(g){case "msie":g="ie";b=n.documentMode||b;break;case "firefox":g="ff";break;case "ipod":case "ipad":case "iphone":g=
"ios";break;case "webkit":g="safari"}h.browser={name:g,version:b};h.browser[g]=!0;for(var v=0,x=c.browsers.length;v<x;v++)for(var i in c.browsers[v])if(g===i){f(i);for(var A=c.browsers[v][i].max,l=c.browsers[v][i].min;l<=A;l++)b>l?(c.browserCss.gt&&f("gt-"+i+l),c.browserCss.gte&&f("gte-"+i+l)):b<l?(c.browserCss.lt&&f("lt-"+i+l),c.browserCss.lte&&f("lte-"+i+l)):b===l&&(c.browserCss.lte&&f("lte-"+i+l),c.browserCss.eq&&f("eq-"+i+l),c.browserCss.gte&&f("gte-"+i+l))}else f("no-"+i);"ie"===g&&9>b&&k("abbr article aside audio canvas details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),
function(a){n.createElement(a)});k(t.pathname.split("/"),function(a,b){if(2<this.length&&this[b+1]!==w)b&&f(this.slice(1,b+1).join("-").toLowerCase()+c.section);else{var g=a||"index",h=g.indexOf(".");0<h&&(g=g.substring(0,h));q.id=g.toLowerCase()+c.page;b||f("root"+c.section)}});h.screen={height:a.screen.height,width:a.screen.width};s();var u=0;a.addEventListener?a.addEventListener("resize",r,!1):a.attachEvent("onresize",r)})(window);
(function(a,w){function f(a){var f=a.charAt(0).toUpperCase()+a.substr(1),a=(a+" "+r.join(f+" ")+f).split(" "),c;a:{for(c in a)if(k[a[c]]!==w){c=!0;break a}c=!1}return!!c}var m=a.document.createElement("i"),k=m.style,s=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),r=["Webkit","Moz","O","ms","Khtml"],n=a[a.head_conf&&a.head_conf.head||"head"],g={gradient:function(){k.cssText=("background-image:"+s.join("gradient(linear,left top,right bottom,from(#9f9),to(#fff));background-image:")+s.join("linear-gradient(left top,#eee,#fff);background-image:")).slice(0,
-17);return!!k.backgroundImage},rgba:function(){k.cssText="background-color:rgba(0,0,0,0.5)";return!!k.backgroundColor},opacity:function(){return""===m.style.opacity},textshadow:function(){return""===k.textShadow},multiplebgs:function(){k.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(k.background)},boxshadow:function(){return f("boxShadow")},borderimage:function(){return f("borderImage")},borderradius:function(){return f("borderRadius")},cssreflections:function(){return f("boxReflect")},
csstransforms:function(){return f("transform")},csstransitions:function(){return f("transition")},touch:function(){return"ontouchstart"in a},retina:function(){return 1<a.devicePixelRatio},fontface:function(){var a=n.browser.version;switch(n.browser.name){case "ie":return 9<=a;case "chrome":return 13<=a;case "ff":return 6<=a;case "ios":return 5<=a;case "android":return!1;case "webkit":return 5.1<=a;case "opera":return 10<=a;default:return!1}}},t;for(t in g)g[t]&&n.feature(t,g[t].call(),!0);n.feature()})(window);
(function(a,w){function f(){}function m(j,a){if(j){"object"===typeof j&&(j=[].slice.call(j));for(var b=0,c=j.length;b<c;b++)a.call(j,j[b],b)}}function k(a,b){var e=Object.prototype.toString.call(b).slice(8,-1);return b!==w&&null!==b&&e===a}function s(a){return k("Function",a)}function r(a){a=a||f;a._done||(a(),a._done=1)}function n(a){var b={};if("object"===typeof a)for(var e in a)a[e]&&(b={name:e,url:a[e]});else b=a.split("/"),b=b[b.length-1],e=b.indexOf("?"),b={name:-1!==e?b.substring(0,e):b,url:a};
return(a=i[b.name])&&a.url===b.url?a:i[b.name]=b}function g(a){var a=a||i,b;for(b in a)if(a.hasOwnProperty(b)&&a[b].state!==y)return!1;return!0}function t(a,b){b=b||f;a.state===y?b():a.state===D?d.ready(a.name,b):a.state===C?a.onpreload.push(function(){t(a,b)}):(a.state=D,q(a,function(){a.state=y;b();m(x[a.name],function(a){r(a)});u&&g()&&m(x.ALL,function(a){r(a)})}))}function q(j,c){var c=c||f,e;/\.css[^\.]*$/.test(j.url)?(e=b.createElement("link"),e.type="text/"+(j.type||"css"),e.rel="stylesheet",
e.href=j.url):(e=b.createElement("script"),e.type="text/"+(j.type||"javascript"),e.src=j.url);e.onload=e.onreadystatechange=function(j){j=j||a.event;if("load"===j.type||/loaded|complete/.test(e.readyState)&&(!b.documentMode||9>b.documentMode))e.onload=e.onreadystatechange=e.onerror=null,c()};e.onerror=function(){e.onload=e.onreadystatechange=e.onerror=null;c()};e.async=!1;e.defer=!1;var d=b.head||b.getElementsByTagName("head")[0];d.insertBefore(e,d.lastChild)}function p(){b.body?u||(u=!0,m(h,function(a){r(a)})):
(a.clearTimeout(d.readyTimeout),d.readyTimeout=a.setTimeout(p,50))}function c(){b.addEventListener?(b.removeEventListener("DOMContentLoaded",c,!1),p()):"complete"===b.readyState&&(b.detachEvent("onreadystatechange",c),p())}var b=a.document,h=[],v=[],x={},i={},A="async"in b.createElement("script")||"MozAppearance"in b.documentElement.style||a.opera,l,u,B=a.head_conf&&a.head_conf.head||"head",d=a[B]=a[B]||function(){d.ready.apply(null,arguments)},C=1,D=3,y=4;d.load=A?function(){var a=arguments,b=a[a.length-
1],e={};s(b)||(b=null);m(a,function(c,d){c!==b&&(c=n(c),e[c.name]=c,t(c,b&&d===a.length-2?function(){g(e)&&r(b)}:null))});return d}:function(){var a=arguments,b=[].slice.call(a,1),c=b[0];if(!l)return v.push(function(){d.load.apply(null,a)}),d;c?(m(b,function(a){if(!s(a)){var b=n(a);b.state===w&&(b.state=C,b.onpreload=[],q({url:b.url,type:"cache"},function(){b.state=2;m(b.onpreload,function(a){a.call()})}))}}),t(n(a[0]),s(c)?c:function(){d.load.apply(null,b)})):t(n(a[0]));return d};d.js=d.load;d.test=
function(a,b,c,g){a="object"===typeof a?a:{test:a,success:b?k("Array",b)?b:[b]:!1,failure:c?k("Array",c)?c:[c]:!1,callback:g||f};(b=!!a.test)&&a.success?(a.success.push(a.callback),d.load.apply(null,a.success)):!b&&a.failure?(a.failure.push(a.callback),d.load.apply(null,a.failure)):g();return d};d.ready=function(a,c){if(a===b)return u?r(c):h.push(c),d;s(a)&&(c=a,a="ALL");if("string"!==typeof a||!s(c))return d;var e=i[a];if(e&&e.state===y||"ALL"===a&&g()&&u)return r(c),d;(e=x[a])?e.push(c):x[a]=[c];
return d};d.ready(b,function(){g()&&m(x.ALL,function(a){r(a)});d.feature&&d.feature("domloaded",!0)});if("complete"===b.readyState)p();else if(b.addEventListener)b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",p,!1);else{b.attachEvent("onreadystatechange",c);a.attachEvent("onload",p);var z=!1;try{z=null==a.frameElement&&b.documentElement}catch(F){}z&&z.doScroll&&function E(){if(!u){try{z.doScroll("left")}catch(b){a.clearTimeout(d.readyTimeout);d.readyTimeout=a.setTimeout(E,50);
return}p()}}()}setTimeout(function(){l=!0;m(v,function(a){a()})},300)})(window);

3868
js/jquery.gridster.js 100644

File diff suppressed because it is too large Load Diff

6
js/jquery.js vendored 100644

File diff suppressed because one or more lines are too long

12
js/jquery.peity.min.js vendored 100644
View File

@ -0,0 +1,12 @@
// Peity jQuery plugin version 1.2.0
// (c) 2013 Ben Pickles
//
// http://benpickles.github.com/peity
//
// Released under MIT license.
(function(h,j,k,m){var r=j.createElement("canvas").getContext,i=h.fn.peity=function(a,b){r&&this.each(function(){var d=h(this),c=d.data("peity");if(c)a&&(c.type=a),h.extend(c.opts,b),c.draw();else{var f=i.defaults[a],e={};h.each(d.data(),function(a,b){a in f&&(e[a]=b)});var l=h.extend({},f,e,b),c=new q(d,a,l);c.draw();d.change(function(){c.draw()}).data("peity",c)}});return this},q=function(a,b,d){this.$el=a;this.type=b;this.opts=d},j=q.prototype;j.colours=function(){var a=this.opts.colours,b=a;h.isFunction(b)||
(b=function(b,c){return a[c%a.length]});return b};j.draw=function(){i.graphers[this.type].call(this,this.opts)};j.prepareCanvas=function(a,b){var d=this.canvas,c;d?(this.context.clearRect(0,0,d.width,d.height),c=h(d)):(c=h("<canvas>").css({height:b,width:a}).addClass("peity").data("peity",this),this.canvas=d=c[0],this.context=d.getContext("2d"),this.$el.hide().after(d));d.height=c.height()*m;d.width=c.width()*m;return d};j.values=function(){return h.map(this.$el.text().split(this.opts.delimiter),
function(a){return parseFloat(a)})};i.defaults={};i.graphers={};i.register=function(a,b,d){this.defaults[a]=b;this.graphers[a]=d};i.register("pie",{colours:["#ff9900","#fff4dd","#ffc66e"],delimiter:null,diameter:16},function(a){if(!a.delimiter){var b=this.$el.text().match(/[^0-9\.]/);a.delimiter=b?b[0]:","}b=this.values();if("/"==a.delimiter)var d=b[0],b=[d,b[1]-d];for(var c=0,d=b.length,f=0;c<d;c++)f+=b[c];var e=this.prepareCanvas(a.width||a.diameter,a.height||a.diameter),a=this.context,c=e.width,
l=e.height,e=k.min(c,l)/2,h=k.PI,n=this.colours();a.save();a.translate(c/2,l/2);a.rotate(-h/2);for(c=0;c<d;c++){var l=b[c],g=2*l/f*h;a.beginPath();a.moveTo(0,0);a.arc(0,0,e,0,g,!1);a.fillStyle=n.call(this,l,c,b);a.fill();a.rotate(g)}a.restore()});i.register("line",{colour:"#c6d9fd",strokeColour:"#4d89f9",strokeWidth:1,delimiter:",",height:16,max:null,min:0,width:32},function(a){var b=this.values();1==b.length&&b.push(b[0]);var d=k.max.apply(k,b.concat([a.max])),c=k.min.apply(k,b.concat([a.min])),
f=this.prepareCanvas(a.width,a.height),e=this.context,l=f.width,f=f.height,h=l/(b.length-1),d=f/(d-c),n=[],g;e.beginPath();e.moveTo(0,f+c*d);for(g=0;g<b.length;g++){var i=g*h,j=f-d*(b[g]-c);n.push({x:i,y:j});e.lineTo(i,j)}e.lineTo(l,f+c*d);e.fillStyle=a.colour;e.fill();if(a.strokeWidth){e.beginPath();e.moveTo(0,n[0].y);for(g=0;g<n.length;g++)e.lineTo(n[g].x,n[g].y);e.lineWidth=a.strokeWidth*m;e.strokeStyle=a.strokeColour;e.stroke()}});i.register("bar",{colours:["#4D89F9"],delimiter:",",height:16,
max:null,min:0,spacing:m,width:32},function(a){for(var b=this.values(),d=k.max.apply(k,b.concat([a.max])),c=k.min.apply(k,b.concat([a.min])),f=this.prepareCanvas(a.width,a.height),e=this.context,h=f.height,i=h/(d-c),a=a.spacing,f=(f.width+a)/b.length,j=this.colours(),g=0;g<b.length;g++){var m=b[g],o=h-i*(m-c),p;if(0==m){if(0<=c||0<d)o-=1;p=1}else p=i*b[g];e.fillStyle=j.call(this,m,g,b);e.fillRect(g*f,o,f-a,p)}})})(jQuery,document,Math,window.devicePixelRatio||1);

5
js/jquery.sparkline.min.js vendored 100644

File diff suppressed because one or more lines are too long

12
js/justgage.1.0.1.min.js vendored 100644

File diff suppressed because one or more lines are too long

10
js/raphael.2.1.0.min.js vendored 100644

File diff suppressed because one or more lines are too long

6
js/underscore.js 100644

File diff suppressed because one or more lines are too long