From c39feead6b8a792b86e43e18fdf7c13ddaaf0387 Mon Sep 17 00:00:00 2001 From: nielmishra Date: Mon, 4 Jan 2016 15:14:57 +0530 Subject: beta-1 --- script/savenetlist.js | 137 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 96 insertions(+), 41 deletions(-) (limited to 'script/savenetlist.js') diff --git a/script/savenetlist.js b/script/savenetlist.js index fc45a63..2d89915 100755 --- a/script/savenetlist.js +++ b/script/savenetlist.js @@ -1,10 +1,83 @@ jQuery(document).ready(function(){ - jQuery("#webtronics_netlist_text_save").click(function(){ - console.log("button clicked"); + +/*------------------------------------------------------------------------------------------------------------------------------------------------ +For Simulation of Netlist and Removal of netlist Window +------------------------------------------------------------------------------------------------------------------------------------------------*/ + + jQuery("#webtronics_netlist_simulate").click(function(){ + 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("nada"); + //} + + // else if (data = 'success') { + //console.log("ya"); + //} +}, + + + }); + + + }); + +/*------------------------------------------------------------------------------------------------------------------------------------------------ +VIEW NETLIST WINDOW +------------------------------------------------------------------------------------------------------------------------------------------------*/ + +jQuery("#webtronics_netlist").click(function(){ + + jQuery('#webtronics_netlist_text_div').show(); + jQuery('#webtronics_netlist_buttons').show(); + jQuery('#webtronics_netlist_text').show(); + jQuery('#webtronics_disable').show(); + + + }); + +/*------------------------------------------------------------------------------------------------------------------------------------------------ +For Download of netlist +------------------------------------------------------------------------------------------------------------------------------------------------*/ + + jQuery("#webtronics_netlist_text_download").click(function(){ + //console.log("button clicked"); jQuery.ajax({ - url: "/webtronix/webtronix-master/download.php", + url: "/eSIM/download.php", type: "POST", data: {netlist:jQuery("#webtronics_netlist_text_area").val()}, @@ -15,15 +88,16 @@ jQuery(document).ready(function(){ } */ - - success: function( data ) { - console.log(data.status); - if( data.status == 'error' ) { + success: function() { + //console.log(data); + window.location = "/eSIM/download.php" ; + //if( data == 'fail' ) { + //console.log("nahi hua "); + //} - console.log("nahi hua bc"); - } else /*if (data.status == 'success')*/ { - console.log("ho gaya bc"); - } + // else if (data = 'success') { + //console.log("ho gaya "); + //} }, @@ -31,6 +105,9 @@ jQuery(document).ready(function(){ }); + + + /*------------------------------------------------------------------------------------------------------------------------------------------------ DC FUNCTIONALITY IS WRITTEN HERE ---------------------------------------------------------------------------------------------------------------------------------------------------*/ @@ -367,7 +444,7 @@ jQuery("#step_time_selectbox").change(function(){ step_trans_unit = "12"; } - //console.log(step_trans_unit); + console.log(step_trans_unit); }); jQuery("#stop_time_selectbox").change(function(){ @@ -391,7 +468,7 @@ jQuery("#stop_time_selectbox").change(function(){ stop_trans_unit = "12"; } - //console.log(stop_trans_unit); + console.log(stop_trans_unit); }); /*------------------------------------------------------------------------------------------------------------------------------------------------ @@ -417,7 +494,7 @@ Flag = ""; { //console.log(jQuery("#analysis_selectbox").val()); - jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ ".endc \n"+ ".end \n" ); + jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ); change_val = "1"; //console.log(jQuery("#analysis_selectbox").val()); @@ -429,7 +506,7 @@ Here are the all AC Cases for generating final netlist values ------------------------------------------------------------------------------------------------------------------------------------------------*/ else if (analysis_type == "2") { - jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+".endc \n"+ ".end \n" ); + jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ); change_val = "1"; } @@ -439,7 +516,7 @@ Here are the all Transiet Cases for generating final netlist values //else if (analysis_type == "3" && time == "1") else if (analysis_type == "3") { - jQuery("#webtronics_netlist_text_area").val(Flag + '\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ ".endc \n" +".end \n" ); + jQuery("#webtronics_netlist_text_area").val(Flag + '\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n" +".end \n" ); change_val = "1"; } @@ -459,7 +536,7 @@ else if( change_val == "1") { - jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ ".endc \n"+ ".end \n" ); + jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".dc" + " " + source + " " + start + "e" + "-" + start_dc_unit + " " + stop + "e" + "-" + stop_dc_unit + " " + increment + "e" + "-" + increment_dc_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ); change_val = "1"; } @@ -467,7 +544,7 @@ else if( change_val == "1") else if (analysis_type == "2") { - jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+".endc \n"+ ".end \n" ); + jQuery("#webtronics_netlist_text_area").val(Flag + '\n'+ ".ac" + " " + scale_val + " " + noofpoint + " " + startfreq + start_ac_unit + " " + stopfreq + stop_ac_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n"+ ".end \n" ); change_val = "1"; } @@ -475,7 +552,7 @@ else if( change_val == "1") else if (analysis_type == "3") { - jQuery("#webtronics_netlist_text_area").val(Flag + '\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ ".endc \n" +".end \n" ); + jQuery("#webtronics_netlist_text_area").val(Flag + '\n' + ".tran" + " " + step_trans + "e" + "-" + step_trans_unit + " " + stop_trans + "e"+ "-" + stop_trans_unit + " " + start_trans + "e" + "-" + start_trans_unit + '\n' + '\n'+ ".control \n"+ "run \n"+ "print allv > dumpv.txt \n" + "print alli > dumpi.txt \n" + ".endc \n" +".end \n" ); change_val = "1"; } @@ -487,25 +564,3 @@ else if( change_val == "1") }); }); - - - - - - - - - -//jQuery("#analysis_selectbox").click(function(){ -//var eles = ''; - -// jQuery('#domchange').append(eles); -//jQuery(this).prop('disabled', true); -//console.log(jQuery(this)); -//if opt - //alert("hello world"); - - - -//jQuery("#analysis").click(function(){ - -- cgit