[Reconnoiter-devel] [reconnoiter commit] r538 - in trunk/ui/web/htdocs: . js

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Tue Dec 9 18:21:37 EST 2008


Author: umar
Date: 2008-12-09 18:21:36 -0500 (Tue, 09 Dec 2008)
New Revision: 538

Modified:
   trunk/ui/web/htdocs/graph_panel.inc
   trunk/ui/web/htdocs/js/recon.js
Log:
bug fixes to graph creation/editing

Modified: trunk/ui/web/htdocs/graph_panel.inc
===================================================================
--- trunk/ui/web/htdocs/graph_panel.inc	2008-12-05 04:21:49 UTC (rev 537)
+++ trunk/ui/web/htdocs/graph_panel.inc	2008-12-09 23:21:36 UTC (rev 538)
@@ -14,20 +14,24 @@
 var locked = true;
 		
 function lock_forms() {
-	$("input[@type='text']").attr("disabled", "true");
-        $("input[@type='checkbox']").attr("disabled", "true");
-        $("input[@type='radio']").attr("disabled", "true");
-	$("select").attr("disabled", "true");
+	$("input[@name='math1']").attr("disabled", "true");
+	$("input[@name='math2']").attr("disabled", "true");
+        $("input[@name='view']").attr("disabled", "true");
+        $("input[@class='graphType']").attr("disabled", "true");
+	$("select[@name='derive']").attr("disabled", "true");
+
 	$("h2#graphTitle").unbind();
 	$(".datatitle").unbind();
 }
 
 function unlock_forms() {
-        $("input[@type='text']").removeAttr("disabled");
-        $("input[@type='checkbox']").removeAttr("disabled");
-        $("input[@type='radio']").removeAttr("disabled");
-        $("select").removeAttr("disabled");
 
+	$("input[@name='math1']").removeAttr("disabled");
+	$("input[@name='math2']").removeAttr("disabled");
+        $("input[@name='view']").removeAttr("disabled");
+        $("input[@class='graphType']").removeAttr("disabled");
+	$("select[@name='derive']").removeAttr("disabled");
+
 	$("h2#graphTitle").editable(function(value, settings) { 
            graphinfo.title = value;
            update_current_graph(false);
@@ -236,7 +240,12 @@
     if(graphinfo.saved) set_current_graph_id('');
     else if(graphinfo.saved!=undefined && graphinfo.saved==false) {
     	 confirm("I will forget the current graph.  Are you sure?", function() {
-       	     set_current_graph_id('');
+             $.getJSON('json/graph/forget/' + graphinfo.id,
+	       function (r) {
+	         if(r.error) alert(r.error);
+                 else set_current_graph_id('');
+	       });
+
 	 });
     }
     return false;

Modified: trunk/ui/web/htdocs/js/recon.js
===================================================================
--- trunk/ui/web/htdocs/js/recon.js	2008-12-05 04:21:49 UTC (rev 537)
+++ trunk/ui/web/htdocs/js/recon.js	2008-12-09 23:21:36 UTC (rev 538)
@@ -274,8 +274,8 @@
           $.getJSON('json/graph/forget/' + graphid,
             function (r) {
               if(r.error) { alert(r.error); }
-              else {
-                perform_graph_search(params);
+              else { 
+                perform_graph_search_edit(params);
               }
             });
           return false;



More information about the Reconnoiter-devel mailing list