UNPKG

shubhadownloader

Version:

There is large amount of information available in market place. The markets are always in sync. In today's world investors find it very difficult to make effective use of information available to them. Shubha Downloader is great tool which resolves this problem and helps investor to increase his productivity and stay focused on decision making. Shubha Downloader enable end user to download market data from available sources and organize it. Shubha Downloader is Open source & FREE utility for end users. Shubha Downloader have main features as follows End of the day market data from web to your favorite charting application . Fundamental market data from web to your favorite charting application. Market reports from web to your favorite charting application.

362 lines (310 loc) 8.67 kB
/***************** Company Name:XNet Inc. Last Modified Date:02-Jan-2013 Author: Prashant Shilimkar Description :This page will render UI for all tabs. ******************/ /******************************** <Shubha Downloader, It downloads end of day pricing data from publicly available sites and converts it different formats....> Copyright (C) 2013 Shubhalabha.in This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/> ***********************************/ /* Ext.require([ 'Ext.form.*' ]); */ Ext.onReady(function() { var formPanel2 = Ext.create('Ext.form.Panel', { frame: true, title: 'Registration form', layout: 'fit', width: 690, height: 325, bodyPadding: 5, fieldDefaults: { labelAlign: 'left', labelWidth: 90, anchor: '100%' }, items: [ // Credit card info { xtype: 'fieldset', title: '', layout: 'anchor', defaults: { anchor: '100%' }, defaultType: 'textfield', items: [ { fieldLabel: 'First Name*', name: 'txtFirstName', id: 'first_name' }, { fieldLabel: 'Last Name*', name: 'last_name', id: 'last_name' }, { fieldLabel: 'Company Name', name: 'txtTitle', id: 'txtTitle' }, { fieldLabel: 'Mobile*', name: 'phone_mobile', id: 'phone_mobile' }, { fieldLabel: 'City*', name: 'phone_home', id: 'phone_home' }, { fieldLabel: 'Email Address*', name: 'email1', id: 'email1' }, { fieldLabel: 'Comment', name: 'description', id: 'description', x:5, y: 65, xtype: 'textarea' } ] } ], buttons: [{ text: 'Reset', handler: function() { this.up('form').getForm().reset(); } }, { text: 'Submit', width: 150, handler: function() { if(document.getElementById("txtTitle-inputEl").value != "") { var flagTitle = checkTitle(); if(!flagTitle) { return; } } var flagFirstName = checkFirstName(); if(!flagFirstName) { return; } var flagLastName = checkLastName(); if(!flagLastName) { return; } var flagContactNumber = checkContactNumber(); if(!flagContactNumber) { return; } var flagHomeContactNumber = checkHomeContactNumber(); if(!flagHomeContactNumber) { return; } var flagEmail = checkEmail(); if(!flagEmail) { return; } var flagClientRemark = checkClientRemark(); if(!flagClientRemark) { return; } /**** Form fields ****/ var account_name = $('#txtTitle-inputEl').val(); var first_name = $('#first_name-inputEl').val(); var last_name = $('#last_name-inputEl').val(); var phone_mobile = $('#phone_mobile-inputEl').val(); var phone_home = $('#phone_home-inputEl').val(); var email1 = $('#email1-inputEl').val(); var description = $('#description-inputEl').val(); /***** Hidden fields ****/ var campaign_id = '425bfaf4-9b0e-0f0e-7670-50f566732e7b'; var assigned_user_id = '1'; var req_id = 'last_name'; $("#lbl").show(); $("#lbl").html("<font color=green><b>Please Wait Sendiing data to server...</b></font>"); $.post("http://shubhalabha.in/eng/crm/index.php?entryPoint=WebToLeadCapture", { account_name:account_name, first_name:first_name, last_name:last_name,phone_mobile:phone_mobile,phone_home:phone_home, email1:email1,description:description, campaign_id:campaign_id,assigned_user_id:assigned_user_id, req_id:req_id } ,function(result) { var fs = require('fs'); fs.unlink('reg.txt'); Ext.Msg.alert('Status', ''+result); window.location="index.html"; }); this.up('form').getForm().reset(); } }] }); formPanel2.render('contactus'); $("#form-1045_header").css("height","27px"); $("#form-1045_header-innerCt").css("height","15px"); $("#form-1045-body").css("top","28px"); $("#form-1045-body").css("height","257px"); $("#fieldset-1046-body").css("height","220px"); $("#fieldset-1046").css("height","250px"); //$("#fieldset-1057").css("height","234px"); $("#toolbar-1047-innerCt").css("height","30px"); $("#toolbar-1047-innerCt").css("height","30px"); $("#toolbar-1047").css("top","290px"); $("#toolbar-1047").css("height","45px"); $("#toolbar-1047").css("height","32px"); $("#button-1049").css("height","23px"); $("#button-1049-btnEl").css("height","17px"); $("#button-1048-btnEl").css("height","17px"); }); function checkTitle() { re = /^[A-Za-z].+$/; if(re.test(document.getElementById("txtTitle-inputEl").value)) { return true; } else { Ext.Msg.alert("Message","Invalid title"); return false; } } function checkFirstName() { if(document.getElementById("first_name-inputEl").value == "") { Ext.Msg.alert("Message","Please enter first name"); return false; } re = /^[A-Za-z]+$/; if(re.test(document.getElementById("first_name-inputEl").value)) { return true; } else { Ext.Msg.alert("Message","Invalid first name"); return false; } } function checkLastName() { if(document.getElementById("last_name-inputEl").value == "") { Ext.Msg.alert("Message","Please enter last name"); return false; } re = /^[A-Za-z]+$/; if(re.test(document.getElementById("last_name-inputEl").value)) { return true; } else { Ext.Msg.alert("Message","Invalid last name"); return false; } } function checkContactNumber() { if(document.getElementById("phone_mobile-inputEl").value.length == 10) { if(document.getElementById("phone_mobile-inputEl").value == "") { Ext.Msg.alert("Message","Please enter mobile number"); return false; } re = /[0-9]/; if(re.test(document.getElementById("phone_mobile-inputEl").value)) { return true; } else { Ext.Msg.alert("Message","Invalid mobile number"); return false; } }else { Ext.Msg.alert("Message","Invalid mobile number. It should be 10 digit number."); return false; } } function checkHomeContactNumber() { if(document.getElementById("phone_home-inputEl").value == "") { Ext.Msg.alert("Message","Please enter city"); return false; } re = /^[A-Za-z]+$/; if(re.test(document.getElementById("phone_home-inputEl").value)) { return true; } else { Ext.Msg.alert("Message","Invalid City"); return false; } } function checkEmail() { if(document.getElementById("email1-inputEl").value == "") { Ext.Msg.alert("Message","Please enter email"); return false; } var x=document.getElementById("email1-inputEl").value; var atpos=x.indexOf("@"); var dotpos=x.lastIndexOf("."); if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) { Ext.Msg.alert("Message","Invalid email"); return false; } return true; } function checkClientRemark() { re = /^[a-zA-Z0-9\s/().'-]*$/; if(re.test(document.getElementById("description-inputEl").value)) { return true; } else { Ext.Msg.alert("Message","Invalid comment"); return false; } }