Author: eallen
Date: 2009-08-12 14:15:11 -0400 (Wed, 12 Aug 2009)
New Revision: 3564
Modified:
mgmt/trunk/cumin/resources/app.js
Log:
Modified ofc_change_priority() to highlight the editbox and select the text when a flash
pie slice is clicked.
Modified: mgmt/trunk/cumin/resources/app.js
===================================================================
--- mgmt/trunk/cumin/resources/app.js 2009-08-12 18:06:08 UTC (rev 3563)
+++ mgmt/trunk/cumin/resources/app.js 2009-08-12 18:15:11 UTC (rev 3564)
@@ -455,13 +455,24 @@
}
}
-function ofc_change_priority() {
- var args = "(";
- var sep = "";
- for (var i=0; i<arguments.length; i++) {
- args += sep+arguments[i];
- sep = ", ";
+function ofc_change_priority(index, text) {
+ var fields = text.split("|");
+ //var percent = fields[0].substring(0, fields[0].length - 1);
+ //var value = fields[1];
+ var label = fields[2];
+ //var id = fields[3];
+
+ var selinput = null;
+ $$(".slider").each( function (el, i) {
+ var input = el.getParent("tr").getElement("input");
+ if (el.id == label) {
+ selinput = input;
+ } else {
+ input.selectRange(0, 0);
+ }
+ });
+ if (selinput) {
+ selinput.focus();
+ selinput.selectRange(0, selinput.value.length);
}
- args += ")";
- alert("change priority " + args);
}
\ No newline at end of file
Show replies by date