Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 1 | window.home_page = "home"; |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 2 | // footer signup widget |
| 3 | // automatically adds it to the .layout-main div of the page |
| 4 | // adds events and also random goodies. |
| 5 | |
| 6 | erpnext.set_request_signup = function(page_name) { |
| 7 | |
| 8 | // goodies |
| 9 | var goodies = [ |
| 10 | "ERPNext also contains a module to build your website. \ |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 11 | The way it works is, when you log out, the app becomes your website. \ |
| 12 | This website is generated from ERPNext.", |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 13 | |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 14 | "You can add custom fields to your transactions in ERPNext to \ |
| 15 | capture specific information about your business.", |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 16 | |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 17 | "All forms in ERPNext can be customized, if you feel there are \ |
| 18 | features you do not want to use, you can hide them.", |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 19 | |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 20 | "You can email transactions like Quotations and Invoices directly \ |
| 21 | from the system. You can also set this process to become automatic", |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 22 | |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 23 | "You can create your own Roles and assign user to those roles. \ |
| 24 | You can also set detailed permissions for each role in transactions.", |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 25 | |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 26 | "ERPNext allows you to assign any transaction like an Invoice \ |
| 27 | or Customer Issue to a user. You can also add comments on any \ |
| 28 | transaction.", |
| 29 | |
| 30 | "Stay on top with a daily, weekly or montly email summarizing all your business\ |
| 31 | activites and accounting data like Income, Receivables, Paybles etc.", |
| 32 | |
| 33 | "Integrate incoming Support queries to your email into ERPNext. \ |
| 34 | Keep track of open tickets and allocate tickets to your users." |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 35 | |
| 36 | ]; |
| 37 | |
| 38 | |
| 39 | // add the footer |
| 40 | |
| 41 | $('#page-' + page_name + ' .layout-main').append('<div class="page-footer">\ |
| 42 | <h2 style="padding: 0px">Try before you buy. \ |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 43 | Request a 30-day Free Trial.</h2>\ |
| 44 | <ul>\ |
| 45 | <li><a href="erpnext-pricing.html">Starts at an un-believable $299 per year.</a>\ |
| 46 | <li><a href="http://demo.erpnext.com" target="_blank">\ |
| 47 | Show me a full demo (new page).</a>\ |
| 48 | <li><a href="sign-up.html">Take me to the sign-up page.</a>\ |
| 49 | </ul>\ |
| 50 | <p>\ |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 51 | <i class="icon-hand-right"></i> <b>ERPNext Goodies:</b> <span class="goodie">' |
| 52 | |
| 53 | + goodies[parseInt(Math.random() * goodies.length)]+ |
| 54 | |
| 55 | '</goodie></p>\ |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 56 | <p>ERPNext is <a href="open-source.html">Open Source</a> under the GNU/General Public License.</p>\ |
| 57 | <p><g:plusone size="medium" annotation="inline"></g:plusone></p>\ |
| 58 | \ |
| 59 | <table><tr><td style="width: 115px">\ |
| 60 | <a href="https://twitter.com/erpnext" class="twitter-follow-button" \ |
| 61 | data-show-count="false">Follow @erpnext</a></td>\ |
| 62 | <td style="width: 150px; font-size: 80%; vertical-align: middle;">\ |
| 63 | Get status updates on Twitter.</td></tr>\ |
| 64 | </table>'); |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 65 | |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 66 | // render plusone |
| 67 | window.gapi && window.gapi.plusone.go(); |
| 68 | |
| 69 | // render twitter button |
| 70 | twttr.widgets.load(); |
| 71 | } |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 72 | |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 73 | //////////////// Hide Login for frappe! |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 74 | |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 75 | $(document).ready(function() { |
| 76 | setTimeout("$('#login-topbar-item').toggle(false);", 1000); |
| 77 | }); |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 78 | |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 79 | //////////////// Analytics |
| 80 | |
| 81 | window._gaq = window._gaq || []; |
| 82 | window._gaq.push(['_setAccount', 'UA-8911157-1']); |
| 83 | window._gaq.push(['_trackPageview']); |
| 84 | |
| 85 | (function() { |
| 86 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
| 87 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
| 88 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
| 89 | })(); |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 90 | |
| 91 | |
Anand Doshi | 17fb35f | 2012-05-10 12:39:25 +0530 | [diff] [blame] | 92 | /////////////// Page view |
| 93 | |
| 94 | $(window).bind('hashchange', function() { |
| 95 | window._gaq.push(['_trackPageview', wn.get_route_str()]); |
| 96 | }); |
| 97 | |
| 98 | /////////////// Update conversion |
| 99 | |
| 100 | erpnext.update_conversion = function() { |
| 101 | $('body').append('<div style="display:inline;">\ |
| 102 | <img height="1" width="1" style="border-style:none;" alt="" \ |
| 103 | src="http://www.googleadservices.com/pagead/conversion/1032834481/?label=JvAUCLX41gEQsZu_7AM&guid=ON&script=0"/>\ |
| 104 | </div>') |
| 105 | }; |
| 106 | |
| 107 | ////////////// Plus One |
| 108 | |
| 109 | (function() { |
| 110 | var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; |
| 111 | po.src = 'https://apis.google.com/js/plusone.js'; |
| 112 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); |
| 113 | })(); |
| 114 | |
| 115 | ////////////// Twitter |
| 116 | |
| 117 | (function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0]; |
| 118 | if(!d.getElementById(id)){js=d.createElement(s);js.id=id; |
| 119 | js.src="//platform.twitter.com/widgets.js"; |
| 120 | fjs.parentNode.insertBefore(js,fjs);}})(document,"script","twitter-wjs"); |
| 121 | |