git.ucc.asn.au
/
matches
/
MCTX3420.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7d87636
)
Fix two bugs in mctx.gui.js ++
author
Jeremy Tan
<
[email protected]
>
Sat, 19 Oct 2013 06:49:42 +0000
(14:49 +0800)
committer
Jeremy Tan
<
[email protected]
>
Sat, 19 Oct 2013 06:49:42 +0000
(14:49 +0800)
testing/MCTXWeb/public_html/control.html
patch
|
blob
|
history
testing/MCTXWeb/public_html/static/mctx.control.js
[new file with mode: 0644]
patch
|
blob
testing/MCTXWeb/public_html/static/mctx.graph.js
patch
|
blob
|
history
testing/MCTXWeb/public_html/static/mctx.gui.js
patch
|
blob
|
history
diff --git
a/testing/MCTXWeb/public_html/control.html
b/testing/MCTXWeb/public_html/control.html
index
86a7f82
..
61157b6
100644
(file)
--- a/
testing/MCTXWeb/public_html/control.html
+++ b/
testing/MCTXWeb/public_html/control.html
@@
-9,19
+9,15
@@
<script type="text/javascript" src="static/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="static/jquery.flot.min.js"></script>
<script type="text/javascript" src="static/mctx.gui.js"></script>
<script type="text/javascript" src="static/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="static/jquery.flot.min.js"></script>
<script type="text/javascript" src="static/mctx.gui.js"></script>
+ <script type="text/javascript" src="static/mctx.control.js"></script>
<link rel="stylesheet" type="text/css" href="static/style.css">
<link rel="stylesheet" type="text/css" href="static/nav-menu.css">
<script type="text/javascript">
runBeforeLoad().done(function () {
$(document).ready(function () {
<link rel="stylesheet" type="text/css" href="static/style.css">
<link rel="stylesheet" type="text/css" href="static/nav-menu.css">
<script type="text/javascript">
runBeforeLoad().done(function () {
$(document).ready(function () {
- $("#main_controls").submit(function () {
- //Validate!
- return false;
- });
});
})
});
})
-
</script>
</head>
</script>
</head>
@@
-94,11
+90,6
@@
<input id="experiment-stop" type="button" value="Stop">
</td>
</tr>
<input id="experiment-stop" type="button" value="Stop">
</td>
</tr>
- <tr id="state-software-r">
- <th>Software status</th>
- <td id="state-software"></td>
- <td></td>
- </tr>
</table>
<div class="sub-title">Error and warning messages</div>
</table>
<div class="sub-title">Error and warning messages</div>
@@
-111,7
+102,7
@@
<form id="start-controls" class="nice" action="#">
<p>
<label for="experiment_name">Experiment name</label>
<form id="start-controls" class="nice" action="#">
<p>
<label for="experiment_name">Experiment name</label>
- <input id="experiment_name" type="text"
name="experiment_name"
>
+ <input id="experiment_name" type="text">
</p>
<p id="start-result">
</p>
<p id="start-result">
diff --git a/testing/MCTXWeb/public_html/static/mctx.control.js
b/testing/MCTXWeb/public_html/static/mctx.control.js
new file mode 100644
(file)
index 0000000..
cf67629
--- /dev/null
+++ b/
testing/MCTXWeb/public_html/static/mctx.control.js
@@ -0,0
+1,17
@@
+/**
+ * Code for the controls page.
+ * @date 19-10-2013
+ */
+
+mctx.control = {};
+mctx.control.api = mctx.api + 'control'
+
+$(document).ready(function () {
+ $.ajax({
+ url : mctx.control.api,
+ data : {'action' : 'identify'}
+ }).done(function () {
+
+ });
+});
+
diff --git
a/testing/MCTXWeb/public_html/static/mctx.graph.js
b/testing/MCTXWeb/public_html/static/mctx.graph.js
index
e79b6a8
..
4bb3e06
100644
(file)
--- a/
testing/MCTXWeb/public_html/static/mctx.graph.js
+++ b/
testing/MCTXWeb/public_html/static/mctx.graph.js
@@
-23,6
+23,15
@@
mctx.graph.chart = null;
* Appends each value pair to the result
* @returns result
*/
* Appends each value pair to the result
* @returns result
*/
+/**
+ * Helper - Calculate pairs of (dependent, independent) values
+ * Given input as (time, value) pairs for dependent and independent
+ * Appends each value pair to the result
+ * @param {array[][]} dependent Dependent data to be correlated with independent
+ * @param {array[][]} independent Independent data
+ * @param {array[][]} result Storage location
+ * @returns {dataMerge.result}
+ */
function dataMerge(dependent, independent, result) {
var j = 0;
for (var i = 0; i < dependent.length-1; ++i) {
function dataMerge(dependent, independent, result) {
var j = 0;
for (var i = 0; i < dependent.length-1; ++i) {
diff --git
a/testing/MCTXWeb/public_html/static/mctx.gui.js
b/testing/MCTXWeb/public_html/static/mctx.gui.js
index
48737b5
..
3198055
100644
(file)
--- a/
testing/MCTXWeb/public_html/static/mctx.gui.js
+++ b/
testing/MCTXWeb/public_html/static/mctx.gui.js
@@
-71,7
+71,14
@@
function debugLog () {
alert(arguments[i]);
}
} else {
alert(arguments[i]);
}
} else {
- console.log.apply(this, arguments);
+ try {
+ console.log.apply(this, arguments);
+ } catch (e) {
+ //Chromie
+ for (var i = 0; i < arguments.length; i++) {
+ console.log(arguments[i]);
+ }
+ }
}
}
}
}
}
}
@@
-265,11
+272,16
@@
$.fn.setErrorLog = function () {
var url = mctx.api + "errorlog";
var outdiv = this;
var url = mctx.api + "errorlog";
var outdiv = this;
+ if ($(this).length <= 0) {
+ //No error log, so do nothing.
+ return;
+ }
+
var updater = function () {
$.ajax({url : url}).done(function (data) {
outdiv.text(data);
outdiv.scrollTop(
var updater = function () {
$.ajax({url : url}).done(function (data) {
outdiv.text(data);
outdiv.scrollTop(
- outdiv[0].scrollHeight - outdiv.height()
+
outdiv[0].scrollHeight - outdiv.height()
);
setTimeout(updater, 3000);
}).fail(function (jqXHR) {
);
setTimeout(updater, 3000);
}).fail(function (jqXHR) {
UCC
git Repository :: git.ucc.asn.au