summaryrefslogtreecommitdiff
path: root/views/script
diff options
context:
space:
mode:
authorfahim-oscad2016-07-18 17:07:22 +0530
committerfahim-oscad2016-07-18 17:07:22 +0530
commit7fd21a2571e597e890896aff236eaec17a3c3a4e (patch)
tree2901f19d2c056bd577158032008a352250b54fd8 /views/script
parent5485b54b6117f87aeb7e93db17b1bbf8d7afbd80 (diff)
downloadeSimWebApp-7fd21a2571e597e890896aff236eaec17a3c3a4e.tar.gz
eSimWebApp-7fd21a2571e597e890896aff236eaec17a3c3a4e.tar.bz2
eSimWebApp-7fd21a2571e597e890896aff236eaec17a3c3a4e.zip
Removed unwanted download.php,simulate.php and its relevant code
Diffstat (limited to 'views/script')
-rw-r--r--views/script/savenetlist.js696
1 files changed, 251 insertions, 445 deletions
diff --git a/views/script/savenetlist.js b/views/script/savenetlist.js
index dca3110..28b6f90 100644
--- a/views/script/savenetlist.js
+++ b/views/script/savenetlist.js
@@ -1,183 +1,77 @@
jQuery(document).ready(function(){
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-For Simulation of Netlist and Removal of netlist Window
-------------------------------------------------------------------------------------------------------------------------------------------------*/
-
- jQuery("#webtronics_netlist_simulate").click(function(){
- socket.emit('netlist', jQuery("#webtronics_netlist_text_area").val());
- //console.log("simulation button clicked");
- jQuery('#webtronics_netlist_text_div').hide();
- jQuery('#webtronics_netlist_buttons').hide();
- jQuery('#webtronics_netlist_text').hide();
- jQuery('#webtronics_disable').hide();
-
-
-
-
-
-
-
- jQuery.ajax({
-
- url: "/eSIM/simulation.php",
- type: "POST",
- data: {netlist:jQuery("#webtronics_netlist_text_area").val()},
- dataType: "html",
-
- /*
- type: "POST",
- url: "/eSIM/simulation.php",
- data: '$image,$image1',
- success:function(phpData){
- alert(phpData);
- }*/
-
-
-
-
- success:function() {
-
- //console.log(data);
- //window.location = "/eSIM/simulation.php";
- window.open('/eSIM/simulation.php','about:blank','scrollbars=auto , scrollbars=1, left=300,top=50,width=800,height=600,toolbar=0,resizable=0');
- //alert ();
- //if( data == 'fail' ) {
- //console.log("nahi hua bc");
- //}
-
- // else if (data = 'success') {
- //console.log("ho gaya bc");
- //}
-},
-
-
- });
-
-
- });
-
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-VIEW NETLIST WINDOW
-------------------------------------------------------------------------------------------------------------------------------------------------*/
-
-
-
-
-
-
-
-
-// jQuery(".view_netlist").click(function(){
-
-// jQuery('#webtronics_netlist_text_div').show();
-// jQuery('#webtronics_netlist_text').show();
-// });
-
-
-
-
-
-
+ /*------------------------------------------------------------------------------------------------------------------------------------------------
+ For Simulation of Netlist and Removal of netlist Window
+ ------------------------------------------------------------------------------------------------------------------------------------------------*/
+
+ jQuery("#webtronics_netlist_simulate").click(function(){
+ socket.emit('netlist', jQuery("#webtronics_netlist_text_area").val());
+ //console.log("simulation button clicked");
+ jQuery('#webtronics_netlist_text_div').hide();
+ jQuery('#webtronics_netlist_buttons').hide();
+ jQuery('#webtronics_netlist_text').hide();
+ jQuery('#webtronics_disable').hide();
+ });
-
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-For Download of netlist
-------------------------------------------------------------------------------------------------------------------------------------------------*/
+ /*------------------------------------------------------------------------------------------------------------------------------------------------
+ For Download of netlist
+ ------------------------------------------------------------------------------------------------------------------------------------------------*/
jQuery("#webtronics_netlist_text_download").click(function(){
- //console.log("button clicked");
+ console.log("button clicked");
- jQuery.ajax({
-
- url: "/eSIM/download.php",
-
- type: "POST",
- data: {netlist:jQuery("#webtronics_netlist_text_area").val()},
- dataType: "html",
-
- /* success: function() {
- console.log("success");
- }
-
- */
- success: function() {
- //console.log(data);
- window.location = "/eSIM/download.php" ;
- //if( data == 'fail' ) {
- //console.log("nahi hua ");
- //}
-
- // else if (data = 'success') {
- //console.log("ho gaya ");
- //}
-},
-
-
- });
-
-
- });
-
-
-
-/*------------------------------------------------------------------------------------------------------------------------------------------------
-DC FUNCTIONALITY IS WRITTEN HERE
----------------------------------------------------------------------------------------------------------------------------------------------------*/
-jQuery(function(){
- jQuery("#select").show();
- jQuery("#dc_menu").hide();
- jQuery("#ac_menu").hide();
- jQuery("#transient_menu").show();
- jQuery("#dc_sweep_menu").hide();
- jQuery("#analysis_selectbox").change(function(){
-
- if (jQuery(this).val() == "5")
- {
- jQuery("#select").show();
- jQuery("#transient_menu").hide();
- jQuery("#dc_menu").hide();
- jQuery("#ac_menu").hide();
- jQuery("#dc_sweep_menu").hide();
-
- }
- else if (jQuery(this).val() == "1")
- {
- jQuery("#select").hide();
- jQuery("#dc_menu").show();
- jQuery("#ac_menu").hide();
- jQuery("#transient_menu").hide();
- jQuery("#dc_sweep_menu").hide();
- }
- else if (jQuery(this).val() == "2")
- {
- jQuery("#select").hide();
- jQuery("#ac_menu").show();
- jQuery("#dc_menu").hide();
- jQuery("#transient_menu").hide();
- jQuery("#dc_sweep_menu").hide();
- }
- else if (jQuery(this).val() == "3")
- {
- jQuery("#select").hide();
- jQuery("#transient_menu").show();
- jQuery("#dc_menu").hide();
- jQuery("#ac_menu").hide();
- jQuery("#dc_sweep_menu").hide();
-
- }
- else if (jQuery(this).val() == "4")
- {
- jQuery("#select").hide();
- jQuery("#transient_menu").hide();
- jQuery("#dc_menu").hide();
- jQuery("#ac_menu").hide();
- jQuery("#dc_sweep_menu").show();
- }
+ });
+
+ /*------------------------------------------------------------------------------------------------------------------------------------------------
+ DC FUNCTIONALITY IS WRITTEN HERE
+ ---------------------------------------------------------------------------------------------------------------------------------------------------*/
+
+ jQuery(function(){
+ jQuery("#select").show();
+ jQuery("#dc_menu").hide();
+ jQuery("#ac_menu").hide();
+ jQuery("#transient_menu").show();
+ jQuery("#dc_sweep_menu").hide();
+ jQuery("#analysis_selectbox").change(function(){
+
+ if (jQuery(this).val() == "5"){
+ jQuery("#select").show();
+ jQuery("#transient_menu").hide();
+ jQuery("#dc_menu").hide();
+ jQuery("#ac_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
+ }
+ else if (jQuery(this).val() == "1"){
+ jQuery("#select").hide();
+ jQuery("#dc_menu").show();
+ jQuery("#ac_menu").hide();
+ jQuery("#transient_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
+ }
+ else if (jQuery(this).val() == "2"){
+ jQuery("#select").hide();
+ jQuery("#ac_menu").show();
+ jQuery("#dc_menu").hide();
+ jQuery("#transient_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
+ }
+ else if (jQuery(this).val() == "3"){
+ jQuery("#select").hide();
+ jQuery("#transient_menu").show();
+ jQuery("#dc_menu").hide();
+ jQuery("#ac_menu").hide();
+ jQuery("#dc_sweep_menu").hide();
+ }
+ else if (jQuery(this).val() == "4"){
+ jQuery("#select").hide();
+ jQuery("#transient_menu").hide();
+ jQuery("#dc_menu").hide();
+ jQuery("#ac_menu").hide();
+ jQuery("#dc_sweep_menu").show();
+ }
-
- //$("#preview").change(function(){
- //jQuery"#analysis_selectbox".val();
+ //$("#preview").change(function(){
+ //jQuery"#analysis_selectbox".val();
//$("#div1, #div2").toggle();
});
});
@@ -208,42 +102,39 @@ Ac netlist variable for ac
------------------------------------------------------------------------------------------------------------------------------------------------*/
jQuery("#saveac").click(function(){
-
startfreq = jQuery("#startfreqval").val();
stopfreq = jQuery("#stopfreqval").val();
noofpoint = jQuery("#noofpointsval").val();
//console.log(startfreq,stopfreq,noofpoint);
//console.log(startfreq);
- if (startfreq == "")
- {
- alert("Please enter Start Frequency");
+ if (startfreq == ""){
+ alert("Please enter Start Frequency");
}
- else if (stopfreq == "")
- {
- alert("Please enter Stop Frequency value");
+ else if (stopfreq == ""){
+ alert("Please enter Stop Frequency value");
}
- else if (noofpoint == "")
- {
- alert("Please Enter No Of Points");
+ else if (noofpoint == ""){
+ alert("Please Enter No Of Points");
}
else{
-
jQuery("#webtronics_netlist_analysis").hide();
jQuery("#webtronics_disable").hide();
}
-scale_val=savedacval1;
-if(scale_val==""){
- scale_val="lin";
-}
-start_ac_unit=savedacval2;
-if(start_ac_unit==""){
- start_ac_unit="Hz";
-}
-stop_ac_unit=savedacval3;
-if(stop_ac_unit==""){
- stop_ac_unit="Hz";
-}
+ scale_val=savedacval1;
+ if(scale_val==""){
+ scale_val="lin";
+ }
+
+ start_ac_unit=savedacval2;
+ if(start_ac_unit==""){
+ start_ac_unit="Hz";
+ }
+
+ stop_ac_unit=savedacval3;
+ if(stop_ac_unit==""){
+ stop_ac_unit="Hz";
+ }
});
@@ -256,73 +147,60 @@ jQuery("#frequency_selectbox").change(function(){
jQuery("#scale_selectbox").change(function(){
scale = jQuery(this).val();
- if (scale == "1")
- {
- scale_val = "lin";
+ if (scale == "1"){
+ scale_val = "lin";
}
- else if (scale == "2")
- {
- scale_val = "dec";
+ else if (scale == "2"){
+ scale_val = "dec";
}
- else if (scale == "3")
- {
- scale_val = "octal";
+ else if (scale == "3"){
+ scale_val = "octal";
}
savedacval1=scale_val;
});
jQuery("#start_frequency_selectbox").change(function(){
-
ac_start_freq = jQuery(this).val();
-
- if (ac_start_freq == "1")
- {
- start_ac_unit = "Hz";
+
+ if (ac_start_freq == "1"){
+ start_ac_unit = "Hz";
}
- else if (ac_start_freq == "2")
- {
- start_ac_unit = "THz";
+ else if (ac_start_freq == "2"){
+ start_ac_unit = "THz";
}
- if (ac_start_freq == "3")
- {
- start_ac_unit = "GHz";
+ else if (ac_start_freq == "3"){
+ start_ac_unit = "GHz";
}
- else if (ac_start_freq == "4")
- {
- start_ac_unit = "Meg";
+ else if (ac_start_freq == "4"){
+ start_ac_unit = "Meg";
}
else if (ac_start_freq == "5")
{
- start_ac_unit = "KHz";
+ start_ac_unit = "KHz";
}
savedacval2=start_ac_unit;
});
jQuery("#stop_frequency_selectbox").change(function(){
-
ac_stop_freq = jQuery(this).val();
-
- if (ac_stop_freq == "1")
- {
- stop_ac_unit = "Hz";
+
+ if (ac_stop_freq == "1"){
+ stop_ac_unit = "Hz";
}
- else if (ac_stop_freq == "2")
- {
- stop_ac_unit = "THz";
+ else if (ac_stop_freq == "2"){
+ stop_ac_unit = "THz";
}
- if (ac_stop_freq == "3")
- {
- stop_ac_unit = "GHz";
+ else if (ac_stop_freq == "3"){
+ stop_ac_unit = "GHz";
}
- else if (ac_stop_freq == "4")
- {
- stop_ac_unit = "Meg";
+ else if (ac_stop_freq == "4"){
+ stop_ac_unit = "Meg";
}
- else if (ac_stop_freq == "5")
- {
- stop_ac_unit = "KHz";
+ else if (ac_stop_freq == "5"){
+ stop_ac_unit = "KHz";
}
- savedacval3=stop_ac_unit;
+
+ savedacval3=stop_ac_unit;
});
@@ -330,29 +208,24 @@ jQuery("#stop_frequency_selectbox").change(function(){
Dc netlist variable for dc
------------------------------------------------------------------------------------------------------------------------------------------------*/
jQuery("#savedc").click(function(){
-
source = jQuery("#sourceval").val();
- start = jQuery("#startval").val();
- increment = jQuery("#Incrementval").val();
- stop = jQuery("#stopval").val();
- // console.log(source,start,increment,stop);
- // console.log(start);
- if (source == "")
- {
- alert("Please enter Source Name");
- }
- else if (start == "")
- {
- alert("Please enter Start Time");
- }
- else if (increment == "")
- {
- alert("Please enter the increment value");
- }
- else if (stop == "")
- {
- alert("Please enter the Stop Time");
- }
+ start = jQuery("#startval").val();
+ increment = jQuery("#Incrementval").val();
+ stop = jQuery("#stopval").val();
+ // console.log(source,start,increment,stop);
+ // console.log(start);
+ if (source == ""){
+ alert("Please enter Source Name");
+ }
+ else if (start == ""){
+ alert("Please enter Start Time");
+ }
+ else if (increment == ""){
+ alert("Please enter the increment value");
+ }
+ else if (stop == ""){
+ alert("Please enter the Stop Time");
+ }
else{
@@ -360,104 +233,88 @@ jQuery("#savedc").click(function(){
jQuery("#webtronics_disable").hide();
}
-start_dc_unit=saveddcval1;
-if(start_dc_unit==""){
- start_dc_unit="00";
-}
-increment_dc_unit=saveddcval2;
-if(increment_dc_unit==""){
- increment_dc_unit="00";
-}
-stop_dc_unit=saveddcval3;
-if(stop_dc_unit==""){
- stop_dc_unit="00";
-}
+ start_dc_unit=saveddcval1;
+ if(start_dc_unit==""){
+ start_dc_unit="00";
+ }
+ increment_dc_unit=saveddcval2;
+ if(increment_dc_unit==""){
+ increment_dc_unit="00";
+ }
+ stop_dc_unit=saveddcval3;
+ if(stop_dc_unit==""){
+ stop_dc_unit="00";
+ }
});
jQuery("#start_volt_selectbox").change(function(){
-
dc_start_time = jQuery(this).val();
- if (dc_start_time == "1")
- {
- start_dc_unit = "00";
+ if (dc_start_time == "1"){
+ start_dc_unit = "00";
}
- else if (dc_start_time == "2")
- {
- start_dc_unit = "03";
+ else if (dc_start_time == "2"){
+ start_dc_unit = "03";
}
- if (dc_start_time == "3")
- {
- start_dc_unit = "06";
+ else if (dc_start_time == "3"){
+ start_dc_unit = "06";
}
- else if (dc_start_time == "4")
- {
- start_dc_unit = "09";
+ else if (dc_start_time == "4"){
+ start_dc_unit = "09";
}
- else if (dc_start_time == "5")
- {
- start_dc_unit = "12";
+ else if (dc_start_time == "5"){
+ start_dc_unit = "12";
}
saveddcval1=start_dc_unit;
console.log(start_dc_unit);
});
jQuery("#inc_volt_selectbox").change(function(){
-
-
+
dc_increment_time = jQuery(this).val();
- if (dc_increment_time == "1")
- {
- increment_dc_unit = "00";
+ if (dc_increment_time == "1"){
+ increment_dc_unit = "00";
}
- else if (dc_increment_time == "2")
- {
- increment_dc_unit = "03";
+ else if (dc_increment_time == "2"){
+ increment_dc_unit = "03";
}
- if (dc_increment_time == "3")
- {
- increment_dc_unit = "06";
+ else if (dc_increment_time == "3"){
+ increment_dc_unit = "06";
}
else if (dc_increment_time == "4")
{
- increment_dc_unit = "09";
+ increment_dc_unit = "09";
}
else if (dc_increment_time == "5")
{
- increment_dc_unit = "12";
+ increment_dc_unit = "12";
}
saveddcval2=increment_dc_unit;
console.log(increment_dc_unit);
});
jQuery("#stop_volt_selectbox").change(function(){
-
dc_stop_time = jQuery(this).val();
- if (dc_stop_time == "1")
- {
- stop_dc_unit = "00";
+ if (dc_stop_time == "1"){
+ stop_dc_unit = "00";
}
- else if (dc_stop_time == "2")
- {
- stop_dc_unit = "03";
+ else if (dc_stop_time == "2"){
+ stop_dc_unit = "03";
}
- if (dc_stop_time == "3")
- {
- stop_dc_unit = "06";
+ else if (dc_stop_time == "3"){
+ stop_dc_unit = "06";
}
- else if (dc_stop_time == "4")
- {
- stop_dc_unit = "09";
- }
- else if (dc_stop_time == "5")
- {
- stop_dc_unit = "12";
+ else if (dc_stop_time == "4"){
+ stop_dc_unit = "09";
+ }
+ else if (dc_stop_time == "5"){
+ stop_dc_unit = "12";
}
- saveddcval3=stop_dc_unit;
+ saveddcval3=stop_dc_unit;
console.log(stop_dc_unit);
});
@@ -477,36 +334,28 @@ jQuery("#savedcs").click(function(){
stop2 = jQuery("#stopval2").val();
//console.log(source1,start1,increment1,stop1);
//console.log(start1);
- if (source1 == "")
- {
+ if (source1 == ""){
alert("Please enter Source Name");
}
- else if (start1 == "")
- {
+ else if (start1 == ""){
alert("Please enter Start Time");
}
- else if (increment1 == "")
- {
+ else if (increment1 == ""){
alert("Please enter the increment value");
}
- else if (stop1 == "")
- {
+ else if (stop1 == ""){
alert("Please enter the Stop Time");
}
- else if (source2 == "")
- {
+ else if (source2 == ""){
alert("Please enter Source Name");
}
- else if (start2 == "")
- {
+ else if (start2 == ""){
alert("Please enter Start Time");
}
- else if (increment2 == "")
- {
+ else if (increment2 == ""){
alert("Please enter the increment value");
}
- else if (stop2 == "")
- {
+ else if (stop2 == ""){
alert("Please enter the Stop Time");
}
@@ -547,24 +396,19 @@ jQuery("#start_volt_selectbox1").change(function(){
dc_start_time1 = jQuery(this).val();
- if (dc_start_time1 == "1")
- {
+ if (dc_start_time1 == "1"){
start_dc_unit1 = "00";
}
- else if (dc_start_time1 == "2")
- {
+ else if (dc_start_time1 == "2"){
start_dc_unit1 = "03";
}
- if (dc_start_time1 == "3")
- {
+ else if (dc_start_time1 == "3"){
start_dc_unit1 = "06";
}
- else if (dc_start_time1 == "4")
- {
+ else if (dc_start_time1 == "4"){
start_dc_unit1 = "09";
}
- else if (dc_start_time1 == "5")
- {
+ else if (dc_start_time1 == "5"){
start_dc_unit1 = "12";
}
savedsweepval1=start_dc_unit1;
@@ -574,24 +418,19 @@ jQuery("#start_volt_selectbox1").change(function(){
jQuery("#inc_volt_selectbox1").change(function(){
dc_increment_time1 = jQuery(this).val();
- if (dc_increment_time1 == "1")
- {
+ if (dc_increment_time1 == "1"){
increment_dc_unit1 = "00";
}
- else if (dc_increment_time1 == "2")
- {
+ else if (dc_increment_time1 == "2"){
increment_dc_unit1 = "03";
}
- if (dc_increment_time1 == "3")
- {
+ else if (dc_increment_time1 == "3"){
increment_dc_unit1 = "06";
}
- else if (dc_increment_time1 == "4")
- {
+ else if (dc_increment_time1 == "4"){
increment_dc_unit1 = "09";
}
- else if (dc_increment_time1 == "5")
- {
+ else if (dc_increment_time1 == "5"){
increment_dc_unit1 = "12";
}
savedsweepval2=increment_dc_unit1;
@@ -602,20 +441,16 @@ jQuery("#stop_volt_selectbox1").change(function(){
dc_stop_time1 = jQuery(this).val();
- if (dc_stop_time1 == "1")
- {
+ if (dc_stop_time1 == "1"){
stop_dc_unit1 = "00";
}
- else if (dc_stop_time1 == "2")
- {
+ else if (dc_stop_time1 == "2"){
stop_dc_unit1 = "03";
}
- if (dc_stop_time1 == "3")
- {
+ else if (dc_stop_time1 == "3"){
stop_dc_unit1 = "06";
}
- else if (dc_stop_time1 == "4")
- {
+ else if (dc_stop_time1 == "4"){
stop_dc_unit1 = "09";
}
else if (dc_stop_time1 == "5")
@@ -631,16 +466,13 @@ jQuery("#start_volt_selectbox2").change(function(){
dc_start_time2 = jQuery(this).val();
- if (dc_start_time2 == "1")
- {
+ if (dc_start_time2 == "1"){
start_dc_unit2 = "00";
}
- else if (dc_start_time2 == "2")
- {
+ else if (dc_start_time2 == "2"){
start_dc_unit2 = "03";
}
- if (dc_start_time2 == "3")
- {
+ else if (dc_start_time2 == "3"){
start_dc_unit2 = "06";
}
else if (dc_start_time2 == "4")
@@ -658,16 +490,13 @@ jQuery("#start_volt_selectbox2").change(function(){
jQuery("#inc_volt_selectbox2").change(function(){
dc_increment_time2 = jQuery(this).val();
- if (dc_increment_time2 == "1")
- {
+ if (dc_increment_time2 == "1"){
increment_dc_unit2 = "00";
}
- else if (dc_increment_time2 == "2")
- {
+ else if (dc_increment_time2 == "2"){
increment_dc_unit2 = "03";
}
- if (dc_increment_time2 == "3")
- {
+ else if (dc_increment_time2 == "3"){
increment_dc_unit2 = "06";
}
else if (dc_increment_time2 == "4")
@@ -686,24 +515,19 @@ jQuery("#stop_volt_selectbox2").change(function(){
dc_stop_time2 = jQuery(this).val();
- if (dc_stop_time2 == "1")
- {
+ if (dc_stop_time2 == "1"){
stop_dc_unit2 = "00";
}
- else if (dc_stop_time2 == "2")
- {
+ else if (dc_stop_time2 == "2"){
stop_dc_unit2 = "03";
}
- if (dc_stop_time2 == "3")
- {
+ else if (dc_stop_time2 == "3"){
stop_dc_unit2 = "06";
}
- else if (dc_stop_time2 == "4")
- {
+ else if (dc_stop_time2 == "4"){
stop_dc_unit2 = "09";
}
- else if (dc_stop_time2 == "5")
- {
+ else if (dc_stop_time2 == "5"){
stop_dc_unit2 = "12";
}
savedsweepval6=stop_dc_unit2;
@@ -723,59 +547,49 @@ jQuery("#savetransient").click(function(){
stop_trans = jQuery("#stop_time").val();
//console.log(start_trans, step_trans, stop_trans);
- if (start_trans == "")
- {
- alert("Please enter Start Time")
+ if (start_trans == ""){
+ alert("Please enter Start Time")
}
- else if (step_trans == "")
- {
- alert("Please enter Step Time");
+ else if (step_trans == ""){
+ alert("Please enter Step Time");
}
- else if (stop_trans == "")
- {
- alert("Please enter the Stop Time");
+ else if (stop_trans == ""){
+ alert("Please enter the Stop Time");
}
else{
-
jQuery("#webtronics_netlist_analysis").hide();
jQuery("#webtronics_disable").hide();
}
-start_trans_unit=savedtransval1;
-if(start_trans_unit==""){
- start_trans_unit="03";
-}
-step_trans_unit=savedtransval2;
-if(step_trans_unit==""){
- step_trans_unit="03";
-}
-stop_trans_unit=savedtransval3;
-if(stop_trans_unit==""){
- stop_trans_unit="03";
-}
-
-
+ start_trans_unit=savedtransval1;
+ if(start_trans_unit==""){
+ start_trans_unit="03";
+ }
+ step_trans_unit=savedtransval2;
+ if(step_trans_unit==""){
+ step_trans_unit="03";
+ }
+ stop_trans_unit=savedtransval3;
+ if(stop_trans_unit==""){
+ stop_trans_unit="03";
+ }
});
jQuery("#start_time_selectbox").change(function(){
trans_start_time = jQuery(this).val();
- if (trans_start_time == "1")
- {
- start_trans_unit = "03";
+ if (trans_start_time == "1"){
+ start_trans_unit = "03";
}
- else if (trans_start_time == "2")
- {
- start_trans_unit = "06";
+ else if (trans_start_time == "2"){
+ start_trans_unit = "06";
}
- if (trans_start_time == "3")
- {
- start_trans_unit = "09";
+ else if (trans_start_time == "3"){
+ start_trans_unit = "09";
}
- else if (trans_start_time == "4")
- {
- start_trans_unit = "12";
+ else if (trans_start_time == "4"){
+ start_trans_unit = "12";
}
savedtransval1=start_trans_unit;
console.log(start_trans_unit);
@@ -785,21 +599,17 @@ jQuery("#step_time_selectbox").change(function(){
trans_step_time = jQuery(this).val();
- if (trans_step_time == "1")
- {
- step_trans_unit = "03";
+ if (trans_step_time == "1"){
+ step_trans_unit = "03";
}
- else if (trans_step_time == "2")
- {
- step_trans_unit = "06";
+ else if (trans_step_time == "2"){
+ step_trans_unit = "06";
}
- if (trans_step_time == "3")
- {
- step_trans_unit = "09";
+ else if (trans_step_time == "3"){
+ step_trans_unit = "09";
}
- else if (trans_step_time == "4")
- {
- step_trans_unit = "12";
+ else if (trans_step_time == "4"){
+ step_trans_unit = "12";
}
savedtransval2=step_trans_unit;
console.log(step_trans_unit);
@@ -809,21 +619,17 @@ jQuery("#stop_time_selectbox").change(function(){
trans_stop_time = jQuery(this).val();
- if (trans_stop_time == "1")
- {
- stop_trans_unit = "03";
+ if (trans_stop_time == "1"){
+ stop_trans_unit = "03";
}
- else if (trans_stop_time == "2")
- {
- stop_trans_unit = "06";
+ else if (trans_stop_time == "2"){
+ stop_trans_unit = "06";
}
- if (trans_stop_time == "3")
- {
- stop_trans_unit = "09";
+ else if (trans_stop_time == "3"){
+ stop_trans_unit = "09";
}
- else if (trans_stop_time == "4")
- {
- stop_trans_unit = "12";
+ else if (trans_stop_time == "4"){
+ stop_trans_unit = "12";
}
savedtransval3=stop_trans_unit;
console.log(stop_trans_unit);