Skip to content

Commit

Permalink
updates, check log
Browse files Browse the repository at this point in the history
  • Loading branch information
toorshia committed Mar 19, 2013
1 parent 58ee3e0 commit a9ffaf7
Show file tree
Hide file tree
Showing 7 changed files with 293 additions and 187 deletions.
70 changes: 35 additions & 35 deletions R&D/donut/index.html
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
<!doctype html>
<html>
<html>

<head>
<meta charset="utf-8"/>
<title>Donuts, baby!</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" href="style.css">

<link rel="stylesheet" href="../lib/style.css">

<style>

.container {
width: 940px;
margin: 0 auto;
text-align: center;
}

.gauge_container {
text-align: left;
height: 450px;
display: inline-block;
border: 1px solid #ccc;
margin: 40px 5px 0 5px;
}

.gauge {
width: 300px;
height: 200px;
display: inline-block;
}

.controls {
text-align: left;
}

li {
padding: 10px 0 0 0;
}

li.refresh {
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
padding-top:15px;
padding-bottom: 15px;
}

label {
font-family: Arial;
display: inline-block;
Expand All @@ -54,15 +54,15 @@
padding: 5px;
color: #919191;
}

input {
font-weight: bold;
font-size: 13px;
padding: 10px;
border: 1px solid #ccc;
margin: 5px;
}

input[disabled=disabled] {
font-weight: normal;
font-size: 11px;
Expand All @@ -72,22 +72,22 @@
border-color: transparent;
background: #fff;
}

a:link.button,
a:active.button,
a:visited.button,
a:hover.button {
margin: 0px 5px 0 2px;
padding: 7px 13px;
}

</style>

</head>


<body>

<div class="container clearfix">
<!-- Ttfb -->
<div class="gauge_container">
Expand All @@ -112,34 +112,34 @@
</div>
</div>
</div>
<script src="jquery-1.7.2.min.js"></script>
<script src="raphael.2.1.0.min.js"></script>


<script src="../lib/jquery-1.7.2.min.js"></script>
<script src="../lib/raphael.2.1.0.min.js"></script>
<script src="../../justgage.js"></script>

<script>
$(document).ready(function(){
reload(gg1);
$('#gg1_reload').bind('click', function() {
reload(gg1);
return false;
});

});

var gg1 = new JustGage({
id: "gg1",
value: 65,
id: "gg1",
value: 65,
symbol: "\xB0",
min: 0,
max: 100,
showMinMax : false,
label: "",
title: " ",
donut: true
});
});

function reload(gid) {
var id = gid.config.id;
var title = gid.config.title;
Expand All @@ -149,19 +149,19 @@
var showMinMax = gid.config.showMinMax;
if($('#'+ id + '_gaugevalue') != null ) { var gaugevalue = $('#'+ id + '_gaugevalue').attr('value'); } else { var gaugevalue = 0; }
if($('#'+ id + '_gaugeunit') != null ) { var gaugeunit = $('#'+ id + '_gaugeunit').attr('value'); } else { var gaugeunit = ""; }

var notNumber = isNaN(gaugevalue);

if (notNumber) {
alert("Please enter integer or float value!");
return false;
}

$('#' + id).empty();
gid = "";
gid = "";
gid = new JustGage({
id: id,
value: gaugevalue,
id: id,
value: gaugevalue,
symbol: gaugeunit,
min: 0,
max: 100,
Expand All @@ -175,7 +175,7 @@
gid.refresh(getRandomInt(0, 100));
return false;
});

}
</script>
</body>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
70 changes: 70 additions & 0 deletions R&D/refreshmax/refreshmax.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!doctype html>
<html>

<head>
<meta charset="utf-8"/>
<title>Donuts, baby!</title>
<meta name="viewport" content="width=device-width">

<link rel="stylesheet" href="../lib/style.css">

<script src="../lib/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../lib/raphael.2.1.0.min.js"></script>
<script type="text/javascript" src="../../justgage.js"></script>

<style>
.container {
width: 450px;
margin: 50px auto 0 auto;
text-align: center;
}

.gauge {
width: 450px;
height: 450px;
}

a:link.button,
a:active.button,
a:visited.button,
a:hover.button {
margin: 30px 5px 0 2px;
padding: 7px 13px;
}

</style>

</head>


<body>

<div class="container">
<div id="g1" class="gauge"></div>
<a href="#" id="g1_refresh" class="button grey">Random Refresh</a>
<a href="#" id="g1_refreshmax" class="button grey">Refresh Maximum</a>
</div>

<script>
var g1 = new JustGage({
id: "g1",
value : 50,
min: 0,
max: 100,
decimals: 0,
gaugeWidthScale: 0.6
});
$(document).ready(function(){
$('#g1_refresh').bind('click', function() {
g1.refresh(getRandomInt(0, 100));
return false;
});

$('#g1_refreshmax').bind('click', function() {
g1.refresh(50, 200);
return false;
});
});
</script>
</body>
</html>
Loading

0 comments on commit a9ffaf7

Please sign in to comment.