blob: e45acf239c512a1cb825d28409ea4a9204cdc6fd [file] [log] [blame]
Anand Doshi17fb35f2012-05-10 12:39:25 +05301window.home_page = "home";
Rushabh Mehtaa9209432012-05-07 18:00:57 +05302// footer signup widget
3// automatically adds it to the .layout-main div of the page
4// adds events and also random goodies.
5
6erpnext.set_request_signup = function(page_name) {
7
8 // goodies
9 var goodies = [
10 "ERPNext also contains a module to build your website. \
Anand Doshi17fb35f2012-05-10 12:39:25 +053011 The way it works is, when you log out, the app becomes your website. \
12 This website is generated from ERPNext.",
Rushabh Mehtaa9209432012-05-07 18:00:57 +053013
Anand Doshi17fb35f2012-05-10 12:39:25 +053014 "You can add custom fields to your transactions in ERPNext to \
15 capture specific information about your business.",
Rushabh Mehtaa9209432012-05-07 18:00:57 +053016
Anand Doshi17fb35f2012-05-10 12:39:25 +053017 "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 Mehtaa9209432012-05-07 18:00:57 +053019
Anand Doshi17fb35f2012-05-10 12:39:25 +053020 "You can email transactions like Quotations and Invoices directly \
21 from the system. You can also set this process to become automatic",
Rushabh Mehtaa9209432012-05-07 18:00:57 +053022
Anand Doshi17fb35f2012-05-10 12:39:25 +053023 "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 Mehtaa9209432012-05-07 18:00:57 +053025
Anand Doshi17fb35f2012-05-10 12:39:25 +053026 "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 Mehtaa9209432012-05-07 18:00:57 +053035
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 Doshi17fb35f2012-05-10 12:39:25 +053043Request 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">\
47Show 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 Mehtaa9209432012-05-07 18:00:57 +053051<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 Doshi17fb35f2012-05-10 12:39:25 +053056<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 Mehtaa9209432012-05-07 18:00:57 +053065
Anand Doshi17fb35f2012-05-10 12:39:25 +053066 // render plusone
67 window.gapi && window.gapi.plusone.go();
68
69 // render twitter button
70 twttr.widgets.load();
71}
Rushabh Mehtaa9209432012-05-07 18:00:57 +053072
Anand Doshi17fb35f2012-05-10 12:39:25 +053073//////////////// Hide Login for frappe!
Rushabh Mehtaa9209432012-05-07 18:00:57 +053074
Anand Doshi17fb35f2012-05-10 12:39:25 +053075$(document).ready(function() {
76 setTimeout("$('#login-topbar-item').toggle(false);", 1000);
77});
Rushabh Mehtaa9209432012-05-07 18:00:57 +053078
Anand Doshi17fb35f2012-05-10 12:39:25 +053079//////////////// Analytics
80
81window._gaq = window._gaq || [];
82window._gaq.push(['_setAccount', 'UA-8911157-1']);
83window._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 Mehtaa9209432012-05-07 18:00:57 +053090
91
Anand Doshi17fb35f2012-05-10 12:39:25 +053092/////////////// Page view
93
94$(window).bind('hashchange', function() {
95 window._gaq.push(['_trackPageview', wn.get_route_str()]);
96});
97
98/////////////// Update conversion
99
100erpnext.update_conversion = function() {
101 $('body').append('<div style="display:inline;">\
102<img height="1" width="1" style="border-style:none;" alt="" \
103src="http://www.googleadservices.com/pagead/conversion/1032834481/?label=JvAUCLX41gEQsZu_7AM&amp;guid=ON&amp;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];
118if(!d.getElementById(id)){js=d.createElement(s);js.id=id;
119js.src="//platform.twitter.com/widgets.js";
120fjs.parentNode.insertBefore(js,fjs);}})(document,"script","twitter-wjs");
121