Merge branch 'responsive' of github.com:webnotes/erpnext into responsive
diff --git a/public/js/complete_setup.js b/public/js/complete_setup.js
index 4fb29e3..a93aae6 100644
--- a/public/js/complete_setup.js
+++ b/public/js/complete_setup.js
@@ -75,6 +75,7 @@
 			if(!data) return;
 			$(this).set_working();
 			$c_obj('Setup Control','setup_account',data,function(r, rt){
+				$(this).done_working();
 				if(!r.exc) {
 					sys_defaults = r.message;
 					user_fullname = r.message.user_fullname;
@@ -84,12 +85,16 @@
 					wn.container.wntoolbar.set_user_name();
 					
 					setTimeout(function() { window.location.reload(); }, 3000);
-				} else {
-					$(this).done_working();
 				}
 			});
 		};
-		
+
+		d.fields_dict.company_name.input.onchange = function() {
+			var parts = d.get_input("company_name").val().split(" ");
+			var abbr = $.map(parts, function(p) { return p ? p.substr(0,1) : null }).join("");
+			d.get_input("company_abbr").val(abbr.toUpperCase());
+		}
+
 		d.fields_dict.country.input.onchange = function() {
 			var country = d.fields_dict.country.input.value;
 			var $timezone = $(d.fields_dict.timezone.input);
diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py
index ea3d1b9..968296c 100644
--- a/setup/doctype/company/company.py
+++ b/setup/doctype/company/company.py
@@ -39,6 +39,7 @@
 			where company=%s and docstatus<2 limit 1""", self.doc.name):
 			self.create_default_accounts()
 			self.create_default_warehouses()
+			self.create_default_web_page()
 		
 		if not self.doc.cost_center:
 			self.create_default_cost_center()
@@ -52,8 +53,46 @@
 		for whname in ("Stores", "Work In Progress", "Finished Goods"):
 			webnotes.bean({
 				"doctype":"Warehouse",
+				"warehouse_name": whname,
 				"company": self.doc.name
 			}).insert()
+			
+	def create_default_web_page(self):
+		if not webnotes.conn.get_value("Website Settings", None, "home_page"):
+			import os
+			with open(os.path.join(os.path.dirname(__file__), "sample_home_page.html"), "r") as webfile:
+				webpage = webnotes.bean({
+					"doctype": "Web Page",
+					"title": self.doc.name + " Home",
+					"published": 1,
+					"description": "Standard Home Page for " + self.doc.company,
+					"main_section": webfile.read() % self.doc.fields
+				}).insert()
+			
+				# update in home page in settings
+				website_settings = webnotes.bean("Website Settings", "Website Settings")
+				website_settings.doc.home_page = webpage.doc.name
+				website_settings.doc.banner_html = """<h3 style='margin-bottom: 20px;'>""" + self.doc.name + "</h3>"
+				website_settings.doc.copyright = self.doc.name
+				website_settings.doclist.append({
+					"doctype": "Top Bar Item",
+					"parentfield": "top_bar_items",
+					"label":"Home",
+					"url": webpage.doc.name
+				})
+				website_settings.doclist.append({
+					"doctype": "Top Bar Item",
+					"parentfield": "top_bar_items",
+					"label":"Contact",
+					"url": "contact"
+				})
+				website_settings.doclist.append({
+					"doctype": "Top Bar Item",
+					"parentfield": "top_bar_items",
+					"label":"Blog",
+					"url": "blog"
+				})
+				website_settings.save()
 
 	def create_default_accounts(self):
 		self.fld_dict = {'account_name':0,'parent_account':1,'group_or_ledger':2,'is_pl_account':3,'account_type':4,'debit_or_credit':5,'company':6,'tax_rate':7}
diff --git a/setup/doctype/company/sample_home_page.html b/setup/doctype/company/sample_home_page.html
new file mode 100644
index 0000000..32e58bd
--- /dev/null
+++ b/setup/doctype/company/sample_home_page.html
@@ -0,0 +1,22 @@
+<h2 style="text-align: center;"><i class="icon-home"></i> Sample Home Page</h2>
+<br>
+<p>This is a sample home page for your company <b>%(name)s's</b> website. This was 
+	created from the Website Module inside ERPNext. ERPNext provides you with simple 
+	tools to build and update your website. You can add sections like your Product Catalog,
+	Blog, Contact Us, About Us and so on. Messages entered in the "Contact" page are
+	automatically added as Leads in the system.
+
+<h5>What you can do with your website:</h5>
+
+<ul>
+	<li>Automatically generate products / services catalog from your Items.
+	<li>Capture Leads from your website.
+	<li>Communicate with your customers by sharing your thoughts in your Blog.
+	<li>Introduce your company and team in the About Us page.
+</ul>
+
+<p>Infact, 
+	<a href="https://erpnext.com" target="_blank">erpnext.com</a> 
+	website is built on ERPNext itself.</p>
+
+<p class="text-muted">For more help, click here</p>
diff --git a/setup/doctype/notification_control/notification_control.txt b/setup/doctype/notification_control/notification_control.txt
index c1f559b..81e08a5 100644
--- a/setup/doctype/notification_control/notification_control.txt
+++ b/setup/doctype/notification_control/notification_control.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2012-07-12 23:29:45", 
   "docstatus": 0, 
-  "modified": "2013-07-10 14:54:11", 
+  "modified": "2013-07-10 19:24:07", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -12,6 +12,7 @@
   "allow_print": 1, 
   "description": "Send automatic emails to Contacts on Submitting transactions.", 
   "doctype": "DocType", 
+  "icon": "icon-envelope", 
   "issingle": 1, 
   "module": "Setup", 
   "name": "__common__"
diff --git a/setup/doctype/setup_control/setup_control.py b/setup/doctype/setup_control/setup_control.py
index c6b0b6c..a85384b 100644
--- a/setup/doctype/setup_control/setup_control.py
+++ b/setup/doctype/setup_control/setup_control.py
@@ -65,7 +65,7 @@
 		webnotes.bean([{
 			"doctype":"Fiscal Year",
 			'year': curr_fiscal_year,
-			'year_start_date': fy_start_date,
+			'year_start_date': fy_start_date
 		}]).insert()
 
 		curr_fiscal_year, fy_start_date, fy_abbr = self.get_fy_details(args.get('fy_start'))
@@ -79,9 +79,10 @@
 		# Company
 		webnotes.bean([{
 			"doctype":"Company",
+			'domain': args.get("industry"),
 			'company_name':args.get('company_name'),
 			'abbr':args.get('company_abbr'),
-			'default_currency':args.get('currency')
+			'default_currency':args.get('currency'),
 		}]).insert()
 		
 		self.curr_fiscal_year = curr_fiscal_year
@@ -148,7 +149,7 @@
 
 		# control panel
 		cp = webnotes.doc("Control Panel", "Control Panel")
-		for k in ['industry', 'country', 'timezone', 'company_name']:
+		for k in ['country', 'timezone', 'company_name']:
 			cp.fields[k] = args[k]
 			
 		cp.save()
diff --git a/startup/install.py b/startup/install.py
index 5b948a9..896a6cd 100644
--- a/startup/install.py
+++ b/startup/install.py
@@ -146,9 +146,6 @@
 		{'doctype': 'Supplier Type', 'supplier_type': 'Hardware'},
 		{'doctype': 'Supplier Type', 'supplier_type': 'Pharmaceutical'},
 		{'doctype': 'Supplier Type', 'supplier_type': 'Distributor'},
-
-		# Workstation
-		{'doctype': 'Workstation', 'name': 'Default Workstation', 'workstation_name': 'Default Workstation', 'warehouse': 'Default Warehouse'},
 		
 		# Sales Person
 		{'doctype': 'Sales Person', 'sales_person_name': 'Sales Team', 'is_group': "Yes", "parent_sales_person": ""},
@@ -166,12 +163,11 @@
 	
 	from webnotes.modules import scrub
 	for r in records:
-		if not webnotes.conn.exists(r['doctype'], r['name']):
-			bean = webnotes.bean(r)
-			
-			# ignore mandatory for root
-			parent_link_field = ("parent_" + scrub(bean.doc.doctype))
-			if parent_link_field in bean.doc.fields and not bean.doc.fields.get(parent_link_field):
-				bean.ignore_mandatory = True
-			
-			bean.insert()
\ No newline at end of file
+		bean = webnotes.bean(r)
+		
+		# ignore mandatory for root
+		parent_link_field = ("parent_" + scrub(bean.doc.doctype))
+		if parent_link_field in bean.doc.fields and not bean.doc.fields.get(parent_link_field):
+			bean.ignore_mandatory = True
+		
+		bean.insert()
\ No newline at end of file
diff --git a/website/css/website.css b/website/css/website.css
index 816b3ef..21e1cb2 100644
--- a/website/css/website.css
+++ b/website/css/website.css
@@ -41,6 +41,10 @@
 	margin-left: 5px;
 }
 
+div.web-footer {
+	border-top: 1px solid #dddddd;
+	padding-top: 10px;
+}
 
 .web-footer-menu ul {
 	list-style: none;
diff --git a/website/doctype/style_settings/custom_template.css b/website/doctype/style_settings/custom_template.css
index 996774e..eb422c9 100644
--- a/website/doctype/style_settings/custom_template.css
+++ b/website/doctype/style_settings/custom_template.css
@@ -9,7 +9,7 @@
 	background-color: #{{ doc.background_color }};
 	background-image: none;
 {% else %}
-	background-color: #edede7;
+	background-color: #ffffff;
 {% endif %}	
 {% if doc.font or doc.google_web_font_for_text %}
 	font-family: '{{ doc.google_web_font_for_text or doc.font }}', 'Helvetica Neue', Arial, Sans !important;
diff --git a/website/doctype/website_settings/website_settings.js b/website/doctype/website_settings/website_settings.js
index 57c32e9..2322b7c 100644
--- a/website/doctype/website_settings/website_settings.js
+++ b/website/doctype/website_settings/website_settings.js
@@ -34,7 +34,7 @@
 	
 	url: function(doc, cdt, cdn) {
 		this.label(doc, cdt, cdn);
-	}
+	},
 	
 	set_parent_label_options: function() {
 		wn.meta.get_docfield("Top Bar Item", "parent_label", cur_frm.docname).options = 
diff --git a/website/doctype/website_settings/website_settings.txt b/website/doctype/website_settings/website_settings.txt
index b3828a2..f8ceafe 100644
--- a/website/doctype/website_settings/website_settings.txt
+++ b/website/doctype/website_settings/website_settings.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-04-30 12:58:46", 
   "docstatus": 0, 
-  "modified": "2013-07-05 15:02:50", 
+  "modified": "2013-07-10 20:37:38", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
diff --git a/website/templates/html/navbar.html b/website/templates/html/navbar.html
index 635cf34..11f2fb0 100644
--- a/website/templates/html/navbar.html
+++ b/website/templates/html/navbar.html
@@ -1,4 +1,4 @@
-<div class="navbar navbar-inverse" style="">
+<div class="navbar" style="margin: 0px -15px">
 	{%- if brand_html %}<a class="navbar-brand" href="index">{{ brand_html }}</a>{% endif -%}
 	<div class="container">
 		<button type="button" class="navbar-toggle" data-toggle="collapse"