]> jspc29.x-matter.uni-frankfurt.de Git - coral.git/commitdiff
update on the settings form handling
authorMichael Wiebusch <m.wiebusch@gsi.de>
Wed, 18 Feb 2015 17:33:47 +0000 (18:33 +0100)
committerMichael Wiebusch <m.wiebusch@gsi.de>
Wed, 18 Feb 2015 17:33:47 +0000 (18:33 +0100)
user_interface/coral_scanner.js
user_interface/has_settings.pm

index 4f8e810b7a2e5446154980d2f56e1f11b0d5771d..482371107acb7057d4cd9640e9df094398c90452 100644 (file)
@@ -25,6 +25,26 @@ $(document).ready(function(){
     get_scan_status()
   });
   
+  
+  
+  $(".has_settings_form").submit(function( event ){
+      var url = $(this).attr("action");
+      event.preventDefault();
+      $.ajax({
+          url: url,
+          type: 'post',
+          dataType: 'text',
+          data: $(this).serialize(),
+          success: function(data) {
+            alert(data);
+          }
+      });
+  });
+  
+  
+  
+  
+  
   unfolds($("#show_main_controls"),$("#main_controls_container"));
   unfolds($("#show_pmt_ro_settings"),$("#pmt_ro_settings_container"));
   unfolds($("#show_table_control_settings"),$("#table_control_settings_container"));
index 3fb6e69f4538b82dc13676b78f478815eded93af..908ef5e4327686a23be1efec0e6be098023dfea4 100644 (file)
@@ -77,7 +77,7 @@ span.dropt:hover span {margin: 20px 0 0 170px; background: #ffffff; z-index:6;}
 </style>
 
   
-<form action="'.ref($self).'.pl" method="get" target="_blank">
+<form class="has_settings_form" action="'.ref($self).'.pl" method="get" target="_blank">
   <input type="text" name="sub" value="save_settings" class="hidden"><br>
   <table>
   ';