[us-commits] r287 - in trunk: js lib
svn at svn.aucsolutions.com
svn at svn.aucsolutions.com
Sun May 5 06:14:01 MDT 2019
Author: gegorbet
Date: 2019-05-05 12:13:59 +0000 (Sun, 05 May 2019)
New Revision: 287
Modified:
trunk/js/2DSA.js
trunk/js/DMGA.js
trunk/js/GA.js
trunk/js/PCSA.js
trunk/lib/controls.php
trunk/lib/file_writer.php
trunk/lib/payload_manager.php
Log:
fix strange behavior of fit-meniscus/bottom parameters on some browsers
Modified: trunk/js/2DSA.js
===================================================================
--- trunk/js/2DSA.js 2019-04-23 17:08:11 UTC (rev 286)
+++ trunk/js/2DSA.js 2019-05-05 12:13:59 UTC (rev 287)
@@ -320,11 +320,11 @@
// What if the user requests meniscus fitting but the fit range extends into
// the data?
- var meniscus_option = 0;
- if ( valid_field(f.meniscus_option) )
- meniscus_option = parseInt( get_radio_value(f.meniscus_option) );
+ var fit_mb_select = 0;
+ if ( valid_field(f.fit_mb_select) )
+ fit_mb_select = parseInt(f.fit_mb_select.value);
- if ( meniscus_option == 1 )
+ if ( fit_mb_select == 1 || fit_mb_select == 3 )
{
var meniscus_range = parseFloat( f.meniscus_range.value );
@@ -344,7 +344,7 @@
else
{ // If not fitting meniscus, just be sure meniscus below data range
- f.meniscus_range.value = 0.001;
+ f.meniscus_range.value = 0.03;
if ( meniscus_radius >= data_left )
{
@@ -365,7 +365,7 @@
function validate_single( f )
{
var contact_bo = "\nIf you have any questions about this policy, please " +
- "contact Borries Demeler (demeler at biochem.uthscsa.edu).";
+ "contact Borries Demeler (borries.demeler at umontana.edu).";
// Some things should only be done if monte carlo is 1
var monte_carlo = 1;
@@ -439,7 +439,7 @@
function validate_multiple( f )
{
var contact_bo = "\nIf you have any questions about this policy, please " +
- "contact Borries Demeler (demeler at biochem.uthscsa.edu).";
+ "contact Borries Demeler (borries.demeler at umontana.edu).";
// For global analyses ti and ri noise subtraction should not be checked
var ti_noise = 0;
@@ -462,13 +462,11 @@
}
// No meniscus fitting in global analyses
- var meniscus_option = 0;
- if ( valid_field(f.meniscus_option) )
- meniscus_option = parseInt( get_radio_value(f.meniscus_option) );
+ var fit_mb_select = 0;
+ if ( valid_field(f.fit_mb_select) )
+ fit_mb_select = parseInt(f.fit_mb_select.value);
- // alert("meniscus_option = " + meniscus_option);
-
- if ( meniscus_option == 1 )
+ if ( fit_mb_select > 0 )
{
alert( "Meniscus fitting is not allowed on multiple datasets.\n" +
contact_bo);
Modified: trunk/js/DMGA.js
===================================================================
--- trunk/js/DMGA.js 2019-04-23 17:08:11 UTC (rev 286)
+++ trunk/js/DMGA.js 2019-05-05 12:13:59 UTC (rev 287)
@@ -560,7 +560,7 @@
function validate_single( f )
{
var contact_bo = "\nIf you have any questions about this policy, please " +
- "contact Borries Demeler (demeler at biochem.uthscsa.edu).";
+ "contact Borries Demeler (borries.demeler at umontana.edu).";
return( true );
}
@@ -571,7 +571,7 @@
if ( advanceLevel > 0 ) return( true );
var contact_bo = "\nIf you have any questions about this policy, please " +
- "contact Borries Demeler (demeler at biochem.uthscsa.edu).";
+ "contact Borries Demeler (borries.demeler at umontana.edu).";
// Let's only produce this message the first time. On subsequent pages
// most of the controls are absent, so...
Modified: trunk/js/GA.js
===================================================================
--- trunk/js/GA.js 2019-04-23 17:08:11 UTC (rev 286)
+++ trunk/js/GA.js 2019-05-05 12:13:59 UTC (rev 287)
@@ -582,7 +582,7 @@
function validate_single( f )
{
var contact_bo = "\nIf you have any questions about this policy, please " +
- "contact Borries Demeler (demeler at biochem.uthscsa.edu).";
+ "contact Borries Demeler (borries.demeler at umontana.edu).";
return( true );
}
@@ -593,7 +593,7 @@
if ( advanceLevel > 0 ) return( true );
var contact_bo = "\nIf you have any questions about this policy, please " +
- "contact Borries Demeler (demeler at biochem.uthscsa.edu).";
+ "contact Borries Demeler (borries.demeler at umontana.edu).";
// Let's only produce this message the first time. On subsequent pages
// most of the controls are absent, so...
Modified: trunk/js/PCSA.js
===================================================================
--- trunk/js/PCSA.js 2019-04-23 17:08:11 UTC (rev 286)
+++ trunk/js/PCSA.js 2019-05-05 12:13:59 UTC (rev 287)
@@ -357,41 +357,6 @@
}
}
- // What if the user requests meniscus fitting but the fit range extends into
- // the data?
- var meniscus_option = 0;
- if ( valid_field(f.meniscus_option) )
- meniscus_option = parseInt( get_radio_value(f.meniscus_option) );
-
- if ( meniscus_option == 1 )
- {
- var meniscus_range = parseFloat( f.meniscus_range.value );
-
- // alert( "meniscus range = " + meniscus_range +
- // "\nmeniscus radius = " + meniscus_radius +
- // "\nleftmost data point = " + data_left );
-
- var range_limit = data_left - meniscus_radius - 0.002; // a fudge factor
- range_limit = Math.round( range_limit * 2000 ) / 1000; // multiply by 2 and round to 3 digits
- if ( meniscus_range > range_limit )
- {
- f.meniscus_range.value = range_limit;
- alert( "The meniscus fit range extends beyond the left data range limit. " +
- "The meniscus range has been reduced to " + range_limit );
- }
- }
-
- else
- { // If not fitting meniscus, just be sure meniscus below data range
- f.meniscus_range.value = 0.001;
-
- if ( meniscus_radius >= data_left )
- {
- alert( "The data's meniscus value extends beyond the left data range limit." );
- return( false );
- }
- }
-
if ( count_datasets == 1 || separate_datasets == 1 )
return( validate_single(f) );
@@ -404,7 +369,7 @@
function validate_single( f )
{
var contact_bo = "\nIf you have any questions about this policy, please " +
- "contact Borries Demeler (demeler at biochem.uthscsa.edu).";
+ "contact Borries Demeler (borries.demeler at umontana.edu).";
// Some things should only be done if monte carlo is 1
var monte_carlo = 1;
@@ -478,7 +443,7 @@
function validate_multiple( f )
{
var contact_bo = "\nIf you have any questions about this policy, please " +
- "contact Borries Demeler (demeler at biochem.uthscsa.edu).";
+ "contact Borries Demeler (borries.demeler at umontana.edu).";
// For global analyses ti and ri noise subtraction should not be checked
var ti_noise = 0;
Modified: trunk/lib/controls.php
===================================================================
--- trunk/lib/controls.php 2019-04-23 17:08:11 UTC (rev 286)
+++ trunk/lib/controls.php 2019-05-05 12:13:59 UTC (rev 287)
@@ -430,17 +430,18 @@
}
// Function to display the fit meniscus option
+/*
function fit_meniscus()
{
echo<<<HTML
<fieldset class='option_value'>
<legend>Fit Meniscus</legend>
- <input type="radio" name="meniscus_option" value="1" onclick="show_ctl(1);"/> On<br/>
- <input type="radio" name="meniscus_option" value="0" onclick="hide(1);"
+ <input type="radio" name="meniscus_option" value="1" onclick="show_ctl(9);"/> On<br/>
+ <input type="radio" name="meniscus_option" value="0" onclick="hide(9);"
checked='checked'/> Off<br/>
- <div style="display:none" id="mag1">
+ <div style="display:none" id="mag9">
<br/>
- <input type="text" name="meniscus_range" value="0.03"/>Meniscus Fit Range (cm)<br/>
+ <input type="text" name="meniscus_range_9" value="0.03"/>Meniscus Fit Range (cm)<br/>
<br/>
<fieldset>
<legend>Meniscus Grid Points</legend>
@@ -461,27 +462,29 @@
</fieldset>
HTML;
}
+*/
+// <input type="text" name="meniscus_range" value="0.03"/>Fit Range (cm)<br/>
// Function to display the fit meniscus/bottom option
function fit_menibott()
{
echo<<<HTML
<fieldset class='option_value'>
<legend>Fit Meniscus | Bottom</legend>
- <select name="fit_mb_select">
- <option value="0" selected="selected" onclick="hide(1);">None</option>
- <option value="1" onclick="show_ctl(1);">Fit Meniscus</option>
- <option value="2" onclick="show_ctl(1);">Fit Bottom</option>
- <option value="3" onclick="show_ctl(1);">Fit Meniscus and Bottom</option>
+ <select name="fit_mb_select" size="4">
+ <option value="0" selected="selected" onclick="hide(1)">None</option>
+ <option value="1" onclick="show_ctl(1)">Fit Meniscus</option>
+ <option value="2" onclick="show_ctl(1)">Fit Bottom</option>
+ <option value="3" onclick="show_ctl(1)">Fit Meniscus and Bottom</option>
</select>
<div style="display:none" id="mag1">
<br/>
- <input type="text" name="meniscus_range" value="0.03"/>Fit Range (cm)<br/>
+ <input type="text" value="0.03" name="meniscus_range"/>Fit Range (cm)<br/>
<br/>
<fieldset>
<legend>Fit Grid Points</legend>
<div class='newslider' id='meniscus-slider'></div>
- <br />
+ <br/>
Value: <input name='meniscus_points'
id='meniscus_points'
size='12'
Modified: trunk/lib/file_writer.php
===================================================================
--- trunk/lib/file_writer.php 2019-04-23 17:08:11 UTC (rev 286)
+++ trunk/lib/file_writer.php 2019-05-05 12:13:59 UTC (rev 287)
@@ -637,6 +637,8 @@
$xml->endElement(); // fit_mb_select
$xml->startElement( 'meniscus_range' );
$xml->writeAttribute( 'value', $parameters['meniscus_range'] );
+// $xml->writeAttribute( 'MRposted', $parameters['MR_posted'] );
+// $xml->writeAttribute( 'MRpostval', $parameters['MR_postval'] );
$xml->endElement(); // meniscus_range
$xml->startElement( 'meniscus_points' );
$xml->writeAttribute( 'value', $parameters['meniscus_points'] );
Modified: trunk/lib/payload_manager.php
===================================================================
--- trunk/lib/payload_manager.php 2019-04-23 17:08:11 UTC (rev 286)
+++ trunk/lib/payload_manager.php 2019-05-05 12:13:59 UTC (rev 287)
@@ -524,14 +524,25 @@
$job_parameters['req_mgroupcount'] = 1;
$job_parameters['tinoise_option'] = $_POST['tinoise_option'];
- $job_parameters['fit_mb_select'] = $_POST['fit_mb_select'];
- $job_parameters['meniscus_range'] = ( $_POST['fit_mb_select'] > 0 )
- ? $_POST['meniscus_range'] : 0.0;
- $job_parameters['meniscus_points'] = ( $_POST['fit_mb_select'] > 0 )
- ? $_POST['meniscus_points'] : 1;
+ $job_parameters['rinoise_option'] = $_POST['rinoise_option'];
+
+ $fit_mb_select = $_POST['fit_mb_select'];
+ $job_parameters['fit_mb_select'] = $fit_mb_select;
+ if ( $fit_mb_select > 0 )
+ {
+ $job_parameters['meniscus_range'] = $_POST['meniscus_range'];
+ $job_parameters['meniscus_points'] = $_POST['meniscus_points'];
+ }
+ else
+ {
+ $job_parameters['meniscus_range'] = 0.0;
+ $job_parameters['meniscus_points'] = 1;
+ }
+//$job_parameters['MR_posted'] = isset( $_POST['meniscus_range'] ) ? 1 : 0;
+//$job_parameters['MR_postval']=$_POST['meniscus_range'];
+
$job_parameters['max_iterations'] = ( $_POST['iterations_option'] == 1 )
? $_POST['max_iterations'] : 1;
- $job_parameters['rinoise_option'] = $_POST['rinoise_option'];
$job_parameters['debug_timings'] = ( isset( $_POST['debug_timings'] ) &&
$_POST['debug_timings'] == 'on' )
? 1 : 0;
@@ -540,10 +551,10 @@
$job_parameters['experimentID'] = $parameters['experimentID'];
$job_parameters['timelast'] = $parameters['timelast'];
$this->add( 'job_parameters', $job_parameters );
- if ( $job_parameters['fit_mb_select'] == 1 ||
- $job_parameters['fit_mb_select'] == 3 )
+ if ( $fit_mb_select == 1 ||
+ $fit_mb_select == 3 )
$analType .= '-FM';
- if ( $job_parameters['fit_mb_select'] == 2 )
+ if ( $fit_mb_select == 2 )
$analType .= '-FB';
if ( $job_parameters['max_iterations' ] > 1 )
$analType .= '-IT';
@@ -668,14 +679,25 @@
$job_parameters['req_mgroupcount'] = 1;
$job_parameters['tinoise_option'] = $_POST['tinoise_option'];
- $job_parameters['fit_mb_select'] = $_POST['fit_mb_select'];
- $job_parameters['meniscus_range'] = ( $_POST['fit_mb_select'] > 0 )
- ? $_POST['meniscus_range'] : 0.0;
- $job_parameters['meniscus_points'] = ( $_POST['fit_mb_select'] > 0 )
- ? $_POST['meniscus_points'] : 1;
+ $job_parameters['rinoise_option'] = $_POST['rinoise_option'];
+
+ $fit_mb_select = $_POST['fit_mb_select'];
+ $job_parameters['fit_mb_select'] = $fit_mb_select;
+ if ( $fit_mb_select > 0 )
+ {
+ $job_parameters['meniscus_range'] = $_POST['meniscus_range'];
+ $job_parameters['meniscus_points'] = $_POST['meniscus_points'];
+ }
+ else
+ {
+ $job_parameters['meniscus_range'] = 0.0;
+ $job_parameters['meniscus_points'] = 1;
+ }
+//$job_parameters['MR_posted'] = isset( $_POST['meniscus_range'] ) ? 1 : 0;
+//$job_parameters['MR_postval'] = $_POST['meniscus_range'];
+
$job_parameters['max_iterations'] = ( $_POST['iterations_option'] == 1 )
? $_POST['max_iterations'] : 1;
- $job_parameters['rinoise_option'] = $_POST['rinoise_option'];
$job_parameters['debug_timings'] = ( isset( $_POST['debug_timings'] ) &&
$_POST['debug_timings'] == 'on' )
? 1 : 0;
@@ -687,10 +709,10 @@
$dataset = array();
$dataset[ 0 ]['files'] = array(); // This will be done later
$dataset[ 0 ]['parameters'] = array();
- if ( $job_parameters['fit_mb_select'] == 1 ||
- $job_parameters['fit_mb_select'] == 3 )
+ if ( $fit_mb_select == 1 ||
+ $fit_mb_select == 3 )
$analType .= '-FM';
- if ( $job_parameters['fit_mb_select'] == 2 )
+ if ( $fit_mb_select == 2 )
$analType .= '-FB';
if ( $job_parameters['max_iterations' ] > 1 )
$analType .= '-IT';
More information about the us-commits
mailing list