Author: eallen
Date: 2009-03-30 18:27:37 -0400 (Mon, 30 Mar 2009)
New Revision: 3242
Modified:
mgmt/trunk/cumin/python/cumin/stat.strings
mgmt/trunk/cumin/resources/app.js
Log:
Moved cumin functions into app.js
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-03-30 22:22:08 UTC (rev 3241)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-03-30 22:27:37 UTC (rev 3242)
@@ -53,32 +53,6 @@
<td class="ralign"> {item_rate}</td>
</tr>
-[StatValueChart.javascript]
-(function() {
- cumin.refreshTime = function(src) {
- var sep = src.lastIndexOf(";");
- var time = new Date().getTime();
-
- if (isNaN(parseInt(src.substring(sep + 1)))) {
- src = src + ";" + time;
- } else {
- src = src.substring(0, sep) + ";" + time;
- }
-
- return src;
- }
-
- cumin.updateChart = function(id) {
- var chart = wooly.doc().elembyid(id);
-
- var img = chart.elem("img")
- var src = img.getattr("src");
- src = cumin.refreshTime(src);
-
- img.setattr("src", src);
- }
-}())
-
[StatValueChart.css]
div.StatValueChart {
font-size: 0.9em;
Modified: mgmt/trunk/cumin/resources/app.js
===================================================================
--- mgmt/trunk/cumin/resources/app.js 2009-03-30 22:22:08 UTC (rev 3241)
+++ mgmt/trunk/cumin/resources/app.js 2009-03-30 22:27:37 UTC (rev 3242)
@@ -21,6 +21,30 @@
this.runModelListeners = runModelListeners;
this.runObjectListeners = runObjectListeners;
+
+ this.refreshTime = function(src) {
+ var sep = src.lastIndexOf(";");
+ var time = new Date().getTime();
+
+ if (isNaN(parseInt(src.substring(sep + 1)))) {
+ src = src + ";" + time;
+ } else {
+ src = src.substring(0, sep) + ";" + time;
+ }
+
+ return src;
+ }
+
+ this.updateChart = function(id) {
+ var chart = wooly.doc().elembyid(id);
+
+ var img = chart.elem("img")
+ var src = img.getattr("src");
+ src = cumin.refreshTime(src);
+
+ img.setattr("src", src);
+ }
+
}
}())
Show replies by date