[ux] fixed primary action
diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js
index e39d77b..e185375 100644
--- a/erpnext/accounts/doctype/account/account.js
+++ b/erpnext/accounts/doctype/account/account.js
@@ -65,10 +65,10 @@
 
 	if (cstr(doc.group_or_ledger) == 'Group') {
 		cur_frm.add_custom_button(__('Convert to Ledger'),
-			function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
+			function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet', 'btn-default');
 	} else if (cstr(doc.group_or_ledger) == 'Ledger') {
 		cur_frm.add_custom_button(__('Convert to Group'),
-			function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
+			function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet', 'btn-default')
 
 		cur_frm.appframe.add_button(__('View Ledger'), function() {
 			frappe.route_options = {
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.js b/erpnext/accounts/doctype/cost_center/cost_center.js
index 808ad52..d9e71d9 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.js
+++ b/erpnext/accounts/doctype/cost_center/cost_center.js
@@ -64,10 +64,12 @@
 cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
 	if (cstr(doc.group_or_ledger) == 'Group') {
 		cur_frm.add_custom_button(__('Convert to Ledger'),
-			function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
+			function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet',
+				"btn-default")
 	} else if (cstr(doc.group_or_ledger) == 'Ledger') {
 		cur_frm.add_custom_button(__('Convert to Group'),
-			function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
+			function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet',
+				"btn-default")
 	}
 }
 
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js
index f6f19f7..4c80ba2 100644
--- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js
@@ -14,7 +14,8 @@
 		this.frm.toggle_enable('year_end_date', doc.__islocal)
 
 		if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
-			this.frm.add_custom_button(__("Set as Default"), this.frm.cscript.set_as_default);
+			this.frm.add_custom_button('<i class="icon-star"></i> ' + __("Set as Default"),
+				this.frm.cscript.set_as_default);
 			this.frm.set_intro(__("To set this Fiscal Year as Default, click on 'Set as Default'"));
 		} else {
 			this.frm.set_intro("");
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index 4f6bd08..49ed12c 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -27,7 +27,8 @@
 
 		// Show / Hide button
 		if(doc.docstatus==1 && doc.outstanding_amount > 0)
-			this.frm.add_custom_button(__('Make Payment Entry'), this.make_bank_voucher);
+			this.frm.add_custom_button(__('Make Payment Entry'), this.make_bank_voucher,
+				frappe.boot.doctype_icons["Journal Voucher"]);
 
 		if(doc.docstatus==1) {
 			cur_frm.appframe.add_button(__('View Ledger'), function() {
@@ -56,7 +57,7 @@
 							company: cur_frm.doc.company
 						}
 					})
-				});
+				}, "icon-download", "btn-default");
 
 			cur_frm.add_custom_button(__('From Purchase Receipt'),
 				function() {
@@ -69,7 +70,7 @@
 							company: cur_frm.doc.company
 						}
 					})
-				});
+				}, "icon-download", "btn-default");
 
 		}
 
@@ -112,7 +113,7 @@
 
 	entries_add: function(doc, cdt, cdn) {
 		var row = frappe.get_doc(cdt, cdn);
-		this.frm.script_manager.copy_from_first_row("entries", row, 
+		this.frm.script_manager.copy_from_first_row("entries", row,
 			["expense_account", "cost_center", "project_name"]);
 	},
 
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 06a496a..c5e9418 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -74,11 +74,12 @@
 					});
 
 				if(!from_delivery_note)
-					cur_frm.appframe.add_primary_action(__('Make Delivery'), cur_frm.cscript['Make Delivery Note'])
+					cur_frm.appframe.add_primary_action(__('Make Delivery'), cur_frm.cscript['Make Delivery Note'], "icon-truck")
 			}
 
-			if(doc.outstanding_amount!=0)
-				cur_frm.appframe.add_primary_action(__('Make Payment Entry'), cur_frm.cscript.make_bank_voucher);
+			if(doc.outstanding_amount!=0) {
+				cur_frm.appframe.add_primary_action(__('Make Payment Entry'), cur_frm.cscript.make_bank_voucher, "icon-money");
+			}
 		}
 
 		// Show buttons only when pos view is active
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index 6474446..9433ebe 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -22,14 +22,18 @@
 			cur_frm.dashboard.add_progress(cint(doc.per_billed) + __("% Billed"),
 				doc.per_billed);
 
-			cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
-
 			if(flt(doc.per_received, 2) < 100)
-				cur_frm.add_custom_button(__('Make Purchase Receipt'), this.make_purchase_receipt);
+				cur_frm.add_custom_button(__('Make Purchase Receipt'),
+					this.make_purchase_receipt, frappe.boot.doctype_icons["Purchase Receipt"]);
 			if(flt(doc.per_billed, 2) < 100)
-				cur_frm.add_custom_button(__('Make Invoice'), this.make_purchase_invoice);
+				cur_frm.add_custom_button(__('Make Invoice'), this.make_purchase_invoice,
+					frappe.boot.doctype_icons["Purchase Invoice"]);
 			if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100)
-				cur_frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Purchase Order'], "icon-exclamation");
+				cur_frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Purchase Order'],
+					"icon-exclamation", "btn-default");
+
+			cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms, "icon-mobile-phone", true);
+
 		} else if(doc.docstatus===0) {
 			cur_frm.cscript.add_from_mappers();
 		}
@@ -67,7 +71,7 @@
 						company: cur_frm.doc.company
 					}
 				})
-			}
+			}, "icon-download", "btn-default"
 		);
 
 		cur_frm.add_custom_button(__('From Supplier Quotation'),
@@ -81,7 +85,7 @@
 						company: cur_frm.doc.company
 					}
 				})
-			}
+			}, "icon-download", "btn-default"
 		);
 
 		cur_frm.add_custom_button(__('For Supplier'),
@@ -93,7 +97,7 @@
 						docstatus: ["!=", 2],
 					}
 				})
-			}
+			}, "icon-download", "btn-default"
 		);
 	},
 
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
index 37326af..b8d40ca 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
@@ -16,10 +16,11 @@
 		this._super();
 
 		if (this.frm.doc.docstatus === 1) {
-			cur_frm.add_custom_button(__("Make Purchase Order"), this.make_purchase_order);
-		} 
+			cur_frm.add_custom_button(__("Make Purchase Order"), this.make_purchase_order,
+				frappe.boot.doctype_icons["Journal Voucher"]);
+		}
 		else if (this.frm.doc.docstatus===0) {
-			cur_frm.add_custom_button(__('From Material Request'), 
+			cur_frm.add_custom_button(__('From Material Request'),
 				function() {
 					frappe.model.map_current_doc({
 						method: "erpnext.stock.doctype.material_request.material_request.make_supplier_quotation",
@@ -32,10 +33,10 @@
 							company: cur_frm.doc.company
 						}
 					})
-				});
+				}, "icon-download", "btn-default");
 		}
-	},	
-		
+	},
+
 	make_purchase_order: function() {
 		frappe.model.open_mapped_doc({
 			method: "erpnext.buying.doctype.supplier_quotation.supplier_quotation.make_purchase_order",
@@ -51,7 +52,7 @@
 	// no need to trigger updation of stock uom, as this field doesn't exist in supplier quotation
 }
 
-cur_frm.fields_dict['quotation_items'].grid.get_field('project_name').get_query = 
+cur_frm.fields_dict['quotation_items'].grid.get_field('project_name').get_query =
 	function(doc, cdt, cdn) {
 		return{
 			filters:[
@@ -70,4 +71,4 @@
 	return {
 		filters:{'supplier': doc.supplier}
 	}
-}
\ No newline at end of file
+}
diff --git a/erpnext/home/page/activity/activity.js b/erpnext/home/page/activity/activity.js
index 57a38ac..4562ca8 100644
--- a/erpnext/home/page/activity/activity.js
+++ b/erpnext/home/page/activity/activity.js
@@ -8,7 +8,7 @@
 		single_column: true
 	})
 	wrapper.appframe.add_module_icon("Activity");
-	
+
 	var list = new frappe.ui.Listing({
 		hide_refresh: true,
 		appframe: wrapper.appframe,
@@ -21,12 +21,12 @@
 	list.run();
 
 	wrapper.appframe.set_title_right("Refresh", function() { list.run(); });
-	
+
 	// Build Report Button
 	if(frappe.boot.user.can_get_report.indexOf("Feed")!=-1) {
 		wrapper.appframe.add_primary_action(__('Build Report'), function() {
 			frappe.set_route('Report', "Feed");
-		}, 'icon-th')
+		}, 'icon-th', true);
 	}
 }
 
@@ -44,23 +44,23 @@
 	scrub_data: function(data) {
 		data.by = frappe.user_info(data.owner).fullname;
 		data.imgsrc = frappe.utils.get_file_link(frappe.user_info(data.owner).image);
-		
+
 		// feedtype
 		if(!data.feed_type) {
 			data.feed_type = __(data.doc_type);
 			data.add_class = "label-info";
 			data.onclick = repl('onclick="window.location.href=\'#!List/%(feed_type)s\';"', data)
 		}
-		
+
 		// color for comment
 		if(data.feed_type=='Comment') {
 			data.add_class = "label-danger";
 		}
-		
+
 		if(data.feed_type=='Assignment') {
 			data.add_class = "label-warning";
 		}
-		
+
 		// link
 		if(data.doc_name && data.feed_type!='Login') {
 			data.link = frappe.format(data.doc_name, {"fieldtype":"Link", "options":data.doc_type})
@@ -71,7 +71,7 @@
 	add_date_separator: function(row, data) {
 		var date = dateutil.str_to_obj(data.modified);
 		var last = erpnext.last_feed_date;
-		
+
 		if((last && dateutil.obj_to_str(last) != dateutil.obj_to_str(date)) || (!last)) {
 			var diff = dateutil.get_day_diff(dateutil.get_today(), dateutil.obj_to_str(date));
 			if(diff < 1) {
@@ -85,4 +85,4 @@
 		}
 		erpnext.last_feed_date = date;
 	}
-})
\ No newline at end of file
+})
diff --git a/erpnext/hr/doctype/employee/employee.js b/erpnext/hr/doctype/employee/employee.js
index 96aca00..0934bc5 100644
--- a/erpnext/hr/doctype/employee/employee.js
+++ b/erpnext/hr/doctype/employee/employee.js
@@ -21,7 +21,7 @@
 		if(!this.frm.doc.__islocal && this.frm.doc.__onload &&
 			!this.frm.doc.__onload.salary_structure_exists) {
 				cur_frm.add_custom_button(__('Make Salary Structure'), function() {
-					me.make_salary_structure(this); });
+					me.make_salary_structure(this); }, frappe.boot.doctype_icons["Salary Structure"]);
 		}
 	},
 
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.js b/erpnext/hr/doctype/expense_claim/expense_claim.js
index fbc5994..4ef2efc 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.js
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.js
@@ -45,18 +45,18 @@
 cur_frm.cscript.onload = function(doc,cdt,cdn) {
 	if(!doc.approval_status)
 		cur_frm.set_value("approval_status", "Draft")
-			
+
 	if (doc.__islocal) {
 		cur_frm.set_value("posting_date", dateutil.get_today());
-		if(doc.amended_from) 
+		if(doc.amended_from)
 			cur_frm.set_value("approval_status", "Draft");
 		cur_frm.cscript.clear_sanctioned(doc);
 	}
-	
+
 	cur_frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
 		return{
 			query: "erpnext.controllers.queries.employee_query"
-		}	
+		}
 	}
 	var exp_approver = doc.exp_approver;
 	return cur_frm.call({
@@ -75,7 +75,7 @@
 	}
 
 	doc.total_sanctioned_amount = '';
-	refresh_many(['sanctioned_amount', 'total_sanctioned_amount']);	
+	refresh_many(['sanctioned_amount', 'total_sanctioned_amount']);
 }
 
 cur_frm.cscript.refresh = function(doc,cdt,cdn){
@@ -84,15 +84,16 @@
 	if(!doc.__islocal) {
 		cur_frm.toggle_enable("exp_approver", (doc.owner==user && doc.approval_status=="Draft"));
 		cur_frm.toggle_enable("approval_status", (doc.exp_approver==user && doc.docstatus==0));
-	
-		if(!doc.__islocal && user!=doc.exp_approver) 
+
+		if(!doc.__islocal && user!=doc.exp_approver)
 			cur_frm.frm_head.appframe.set_title_right("");
-	
+
 		if(doc.docstatus==0 && doc.exp_approver==user && doc.approval_status=="Approved")
 			 cur_frm.savesubmit();
-		
+
 		if(doc.docstatus==1 && frappe.model.can_create("Journal Voucher"))
-			 cur_frm.add_custom_button(__("Make Bank Voucher"), cur_frm.cscript.make_bank_voucher);
+			 cur_frm.add_custom_button(__("Make Bank Voucher"),
+			 	cur_frm.cscript.make_bank_voucher, frappe.boot.doctype_icons["Journal Voucher"]);
 	}
 }
 
@@ -131,7 +132,7 @@
 		}
 		doc.total_sanctioned_amount += d.sanctioned_amount;
 	});
-	
+
 	refresh_field("total_claimed_amount");
 	refresh_field('total_sanctioned_amount');
 
@@ -142,7 +143,7 @@
 }
 cur_frm.cscript.claim_amount = function(doc,cdt,cdn){
 	cur_frm.cscript.calculate_total(doc,cdt,cdn);
-	
+
 	var child = locals[cdt][cdn];
 	refresh_field("sanctioned_amount", child.name, child.parentfield);
 }
@@ -154,4 +155,4 @@
 	if(cint(frappe.boot.notification_settings && frappe.boot.notification_settings.expense_claim)) {
 		cur_frm.email_doc(frappe.boot.notification_settings.expense_claim_message);
 	}
-}
\ No newline at end of file
+}
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js
index ddaf88c..a5a3ad3 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.js
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.js
@@ -12,7 +12,8 @@
 
 cur_frm.cscript.refresh = function(doc, dt, dn){
 	if((!doc.__islocal) && (doc.is_active == 'Yes')){
-		cur_frm.add_custom_button(__('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']);
+		cur_frm.add_custom_button(__('Make Salary Slip'),
+			cur_frm.cscript['Make Salary Slip'], frappe.boot.doctype_icons["Salary Slip"]);
 	}
 }
 
diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js
index d73ac9a..7787ea4 100644
--- a/erpnext/manufacturing/doctype/bom/bom.js
+++ b/erpnext/manufacturing/doctype/bom/bom.js
@@ -7,7 +7,8 @@
 	cur_frm.toggle_enable("item", doc.__islocal);
 
 	if (!doc.__islocal && doc.docstatus<2) {
-		cur_frm.add_custom_button(__("Update Cost"), cur_frm.cscript.update_cost);
+		cur_frm.add_custom_button(__("Update Cost"), cur_frm.cscript.update_cost,
+			"icon-money", "btn-default");
 	}
 
 	cur_frm.cscript.with_operations(doc);
diff --git a/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js
index d5fb1c9..a4bf14c 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.js
+++ b/erpnext/manufacturing/doctype/production_order/production_order.js
@@ -58,14 +58,20 @@
 
 var cfn_set_fields = function(doc, dt, dn) {
 	if (doc.docstatus == 1) {
-		if (doc.status != 'Stopped' && doc.status != 'Completed')
-		cur_frm.add_custom_button(__('Stop!'), cur_frm.cscript['Stop Production Order'], "icon-exclamation");
-		else if (doc.status == 'Stopped')
-			cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Production Order'], "icon-check");
 
 		if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){
-			cur_frm.add_custom_button(__('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']);
-			cur_frm.add_custom_button(__('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']);
+			cur_frm.add_custom_button(__('Transfer Raw Materials'),
+				cur_frm.cscript['Transfer Raw Materials'], frappe.boot.doctype_icons["Stock Entry"]);
+			cur_frm.add_custom_button(__('Update Finished Goods'),
+				cur_frm.cscript['Update Finished Goods'], frappe.boot.doctype_icons["Stock Entry"]);
+		}
+
+		if (doc.status != 'Stopped' && doc.status != 'Completed') {
+			cur_frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Production Order'],
+				"icon-exclamation", "btn-default");
+		} else if (doc.status == 'Stopped') {
+			cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Production Order'],
+			"icon-check", "btn-default");
 		}
 	}
 }
diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js
index 95c7963..8a9be1d 100644
--- a/erpnext/public/js/transaction.js
+++ b/erpnext/public/js/transaction.js
@@ -57,23 +57,23 @@
 		this.set_dynamic_labels();
 
 		// Show POS button only if it is enabled from features setup
-		if(cint(sys_defaults.fs_pos_view)===1 && this.frm.doctype!="Material Request")
+		if(cint(sys_defaults.fs_pos_view)===1 && this.frm.doctype!="Material Request" && this.frm.doc.docstatus===0)
 			this.make_pos_btn();
 	},
 
 	make_pos_btn: function() {
 		if(!this.pos_active) {
 			var btn_label = __("POS View"),
-				icon = "icon-desktop";
+				icon = "icon-th";
 		} else {
-			var btn_label = __(this.frm.doctype) + __(" View"),
+			var btn_label = __("Form View"),
 				icon = "icon-file-text";
 		}
 		var me = this;
 
-		this.$pos_btn = this.frm.appframe.add_button(btn_label, function() {
+		this.$pos_btn = this.frm.appframe.add_primary_action(btn_label, function() {
 			me.toggle_pos();
-		}, icon);
+		}, icon, "btn-default");
 	},
 
 	toggle_pos: function(show) {
diff --git a/erpnext/selling/doctype/installation_note/installation_note.js b/erpnext/selling/doctype/installation_note/installation_note.js
index 34d915c..e8dee46 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.js
+++ b/erpnext/selling/doctype/installation_note/installation_note.js
@@ -5,13 +5,13 @@
 cur_frm.cscript.fname = "installed_item_details";
 
 
-frappe.ui.form.on_change("Installation Note", "customer", 
+frappe.ui.form.on_change("Installation Note", "customer",
 	function(frm) { erpnext.utils.get_party_details(frm); });
 
-frappe.ui.form.on_change("Installation Note", "customer_address", 
+frappe.ui.form.on_change("Installation Note", "customer_address",
 	function(frm) { erpnext.utils.get_address_display(frm); });
 
-frappe.ui.form.on_change("Installation Note", "contact_person", 
+frappe.ui.form.on_change("Installation Note", "contact_person",
 	function(frm) { erpnext.utils.get_contact_details(frm); });
 
 frappe.provide("erpnext.selling");
@@ -19,37 +19,37 @@
 erpnext.selling.InstallationNote = frappe.ui.form.Controller.extend({
 	onload: function() {
 		if(!this.frm.doc.status) set_multiple(dt,dn,{ status:'Draft'});
-		if(this.frm.doc.__islocal) set_multiple(this.frm.doc.doctype, this.frm.doc.name, 
+		if(this.frm.doc.__islocal) set_multiple(this.frm.doc.doctype, this.frm.doc.name,
 				{inst_date: get_today()});
-		
+
 		this.setup_queries();
 	},
-	
+
 	setup_queries: function() {
 		var me = this;
-		
+
 		this.frm.set_query("customer_address", function() {
 			return {
 				filters: {'customer': me.frm.doc.customer }
 			}
 		});
-		
+
 		this.frm.set_query("contact_person", function() {
 			return {
 				filters: {'customer': me.frm.doc.customer }
 			}
 		});
-		
+
 		this.frm.set_query("customer", function() {
 			return {
 				query: "erpnext.controllers.queries.customer_query"
 			}
 		});
 	},
-	
+
 	refresh: function() {
 		if (this.frm.doc.docstatus===0) {
-			cur_frm.add_custom_button(__('From Delivery Note'), 
+			cur_frm.add_custom_button(__('From Delivery Note'),
 				function() {
 					frappe.model.map_current_doc({
 						method: "erpnext.stock.doctype.delivery_note.delivery_note.make_installation_note",
@@ -62,10 +62,10 @@
 							company: cur_frm.doc.company
 						}
 					})
-				}
+				}, "icon-download", "btn-default"
 			);
 		}
-	},	
+	},
 });
 
-$.extend(cur_frm.cscript, new erpnext.selling.InstallationNote({frm: cur_frm}));
\ No newline at end of file
+$.extend(cur_frm.cscript, new erpnext.selling.InstallationNote({frm: cur_frm}));
diff --git a/erpnext/selling/doctype/lead/lead.js b/erpnext/selling/doctype/lead/lead.js
index ba9741b..24fbbf0 100644
--- a/erpnext/selling/doctype/lead/lead.js
+++ b/erpnext/selling/doctype/lead/lead.js
@@ -32,8 +32,10 @@
 		erpnext.toggle_naming_series();
 
 		if(!this.frm.doc.__islocal && this.frm.doc.__onload && !this.frm.doc.__onload.is_customer) {
-			this.frm.add_custom_button(__("Create Customer"), this.create_customer);
-			this.frm.add_custom_button(__("Create Opportunity"), this.create_opportunity);
+			this.frm.add_custom_button(__("Create Customer"), this.create_customer,
+				frappe.boot.doctype_icons["Customer"], "btn-default");
+			this.frm.add_custom_button(__("Create Opportunity"), this.create_opportunity,
+				frappe.boot.doctype_icons["Opportunity"], "btn-default");
 			this.frm.appframe.add_button(__("Send SMS"), this.frm.cscript.send_sms, "icon-mobile-phone");
 		}
 
diff --git a/erpnext/selling/doctype/opportunity/opportunity.js b/erpnext/selling/doctype/opportunity/opportunity.js
index ce7c6ea..6ff1abb 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.js
+++ b/erpnext/selling/doctype/opportunity/opportunity.js
@@ -82,11 +82,15 @@
 	erpnext.toggle_naming_series();
 
 	if(doc.docstatus === 1 && doc.status!=="Lost") {
-		cur_frm.add_custom_button(__('Create Quotation'), cur_frm.cscript.create_quotation);
+		cur_frm.add_custom_button(__('Create Quotation'),
+			cur_frm.cscript.create_quotation, frappe.boot.doctype_icons["Quotation"],
+			"btn-default");
 		if(doc.status!=="Quotation")
-			cur_frm.add_custom_button(__('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']);
+			cur_frm.add_custom_button(__('Opportunity Lost'),
+				cur_frm.cscript['Declare Opportunity Lost'], "icon-remove", "btn-default");
 
-		cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
+		cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms,
+			"icon-mobile-phone", true);
 	}
 }
 
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index e65fcbe..8cff8d8 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -27,10 +27,10 @@
 
 		if(doc.docstatus == 1 && doc.status!=='Lost') {
 			cur_frm.add_custom_button(__('Make Sales Order'),
-				cur_frm.cscript['Make Sales Order']);
+				cur_frm.cscript['Make Sales Order'], frappe.boot.doctype_icons["Sales Order"]);
 			if(doc.status!=="Ordered") {
 				cur_frm.add_custom_button(__('Set as Lost'),
-					cur_frm.cscript['Declare Order Lost'], "icon-exclamation");
+					cur_frm.cscript['Declare Order Lost'], "icon-exclamation", "btn-default");
 			}
 			cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
 		}
@@ -50,7 +50,7 @@
 							company: cur_frm.doc.company
 						}
 					})
-				});
+				}, "icon-download", "btn-default");
 		}
 
 		if (!doc.__islocal) {
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index c8ddcf5..628e43e 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -25,30 +25,36 @@
 				cur_frm.dashboard.add_progress(cint(doc.per_billed) + __("% Billed"),
 					doc.per_billed);
 
-				cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
 				// delivery note
 				if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1)
-					cur_frm.add_custom_button(__('Make Delivery'), this.make_delivery_note);
-
-				// maintenance
-				if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)===-1) {
-					cur_frm.add_custom_button(__('Make Maint. Visit'), this.make_maintenance_visit);
-					cur_frm.add_custom_button(__('Make Maint. Schedule'),
-						this.make_maintenance_schedule);
-				}
+					cur_frm.add_custom_button(__('Make Delivery'), this.make_delivery_note, "icon-truck");
 
 				// indent
 				if(!doc.order_type || ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1)
 					cur_frm.add_custom_button(__('Make ') + __('Material Request'),
-						this.make_material_request);
+						this.make_material_request, "icon-ticket");
 
 				// sales invoice
-				if(flt(doc.per_billed, 2) < 100)
-					cur_frm.add_custom_button(__('Make Invoice'), this.make_sales_invoice);
+				if(flt(doc.per_billed, 2) < 100) {
+					cur_frm.add_custom_button(__('Make Invoice'), this.make_sales_invoice,
+						frappe.boot.doctype_icons["Sales Invoice"]);
+				}
 
 				// stop
 				if(flt(doc.per_delivered, 2) < 100 || doc.per_billed < 100)
-					cur_frm.add_custom_button(__('Stop!'), cur_frm.cscript['Stop Sales Order'],"icon-exclamation");
+					cur_frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Sales Order'],
+						"icon-exclamation", "btn-default")
+
+						// maintenance
+						if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)===-1) {
+							cur_frm.add_custom_button(__('Make Maint. Visit'),
+								this.make_maintenance_visit, null, "btn-default");
+							cur_frm.add_custom_button(__('Make Maint. Schedule'),
+								this.make_maintenance_schedule, null, "btn-default");
+						}
+
+				cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone", true);
+
 			} else {
 				// un-stop
 				cur_frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop");
@@ -70,7 +76,7 @@
 							company: cur_frm.doc.company
 						}
 					})
-				});
+				}, "icon-download", "btn-default");
 		}
 
 		this.order_type(doc);
diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js
index ee7d66a..44f228f 100644
--- a/erpnext/setup/doctype/company/company.js
+++ b/erpnext/setup/doctype/company/company.js
@@ -4,8 +4,6 @@
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
 	if(doc.abbr && !doc.__islocal) {
 		cur_frm.set_df_property("abbr", "read_only", 1);
-		if(in_list(user_roles, "System Manager"))
-			cur_frm.add_custom_button("Replace Abbreviation", cur_frm.cscript.replace_abbr)
 	}
 
 	if(!doc.__islocal) {
@@ -14,7 +12,7 @@
 	}
 }
 
-cur_frm.cscript.replace_abbr = function() {
+cur_frm.cscript.change_abbr = function() {
 	var dialog = new frappe.ui.Dialog({
 		title: "Replace Abbr",
 		fields: [
diff --git a/erpnext/setup/doctype/company/company.json b/erpnext/setup/doctype/company/company.json
index 4209e7d..773526a 100644
--- a/erpnext/setup/doctype/company/company.json
+++ b/erpnext/setup/doctype/company/company.json
@@ -40,6 +40,13 @@
    "reqd": 1
   }, 
   {
+   "depends_on": "eval:!doc.__islocal && in_list(user_roles, \"System Manager\")", 
+   "fieldname": "change_abbr", 
+   "fieldtype": "Button", 
+   "label": "Change Abbreviation", 
+   "permlevel": 0
+  }, 
+  {
    "fieldname": "cb0", 
    "fieldtype": "Column Break", 
    "permlevel": 0, 
@@ -349,7 +356,7 @@
  ], 
  "icon": "icon-building", 
  "idx": 1, 
- "modified": "2014-07-17 19:30:24.487672", 
+ "modified": "2014-08-07 05:20:47.711849", 
  "modified_by": "Administrator", 
  "module": "Setup", 
  "name": "Company", 
diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py
index bd623e6..1846052 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -35,12 +35,12 @@
 			self.default_currency != self.previous_default_currency and \
 			self.check_if_transactions_exist():
 				frappe.throw(_("Cannot change company's default currency, because there are existing transactions. Transactions must be cancelled to change the default currency."))
-				
+
 		self.validate_default_accounts()
-		
+
 	def validate_default_accounts(self):
-		for field in ["default_bank_account", "default_cash_account", "receivables_group", "payables_group", 
-			"default_expense_account", "default_income_account", "stock_received_but_not_billed", 
+		for field in ["default_bank_account", "default_cash_account", "receivables_group", "payables_group",
+			"default_expense_account", "default_income_account", "stock_received_but_not_billed",
 			"stock_adjustment_account", "expenses_included_in_valuation"]:
 				if self.get(field):
 					for_company = frappe.db.get_value("Account", self.get(field), "company")
@@ -127,7 +127,7 @@
 			_set_default_account("expenses_included_in_valuation", "Expenses Included In Valuation")
 
 		if not self.default_income_account:
-			self.db_set("default_income_account", frappe.db.get_value("Account", 
+			self.db_set("default_income_account", frappe.db.get_value("Account",
 				{"account_name": _("Sales"), "company": self.name}))
 
 	def create_default_cost_center(self):
@@ -277,6 +277,8 @@
 
 @frappe.whitelist()
 def replace_abbr(company, old, new):
+	frappe.only_for("System Manager")
+
 	frappe.db.set_value("Company", company, "abbr", new)
 
 	def _rename_record(dt):
diff --git a/erpnext/setup/doctype/email_digest/email_digest.js b/erpnext/setup/doctype/email_digest/email_digest.js
index 9adb7e2..fb08f90 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.js
+++ b/erpnext/setup/doctype/email_digest/email_digest.js
@@ -28,7 +28,7 @@
 		} else {
 			msgprint(save_msg);
 		}
-	}, 1);
+	}, "icon-eye-open", "btn-default");
 	cur_frm.add_custom_button(__('Send Now'), function() {
 		doc = locals[dt][dn];
 		if(doc.__unsaved != 1) {
@@ -44,7 +44,7 @@
 		} else {
 			msgprint(save_msg);
 		}
-	}, 1);
+	}, "icon-envelope", "btn-default");
 }
 
 cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index d2e60eb..009ac4c 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -38,7 +38,8 @@
 		}
 
 		if(doc.docstatus==0 && !doc.__islocal) {
-			cur_frm.add_custom_button(__('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']);
+			cur_frm.add_custom_button(__('Make Packing Slip'),
+				cur_frm.cscript['Make Packing Slip'], frappe.boot.doctype_icons["Packing Slip"], "btn-default");
 		}
 
 		erpnext.stock.delivery_note.set_print_hide(doc, dt, dn);
@@ -62,7 +63,7 @@
 							company: cur_frm.doc.company
 						}
 					})
-				});
+				}, "icon-download", "btn-default");
 		}
 
 	},
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index 7a47765..e592f8d 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -30,26 +30,30 @@
 		}
 
 		if(doc.docstatus==0) {
-			cur_frm.add_custom_button(__("Get Items from BOM"), cur_frm.cscript.get_items_from_bom, "icon-sitemap");
+			cur_frm.add_custom_button(__("Get Items from BOM"),
+				cur_frm.cscript.get_items_from_bom, "icon-sitemap", "btn-default");
 		}
 
 		if(doc.docstatus == 1 && doc.status != 'Stopped') {
 			if(doc.material_request_type === "Purchase")
 				cur_frm.add_custom_button(__("Make Supplier Quotation"),
-					this.make_supplier_quotation);
+					this.make_supplier_quotation,
+						frappe.boot.doctype_icons["Supplier Quotation"]);
 
 			if(doc.material_request_type === "Transfer" && doc.status === "Submitted")
-				cur_frm.add_custom_button(__("Transfer Material"), this.make_stock_entry);
+				cur_frm.add_custom_button(__("Transfer Material"), this.make_stock_entry,
+					frappe.boot.doctype_icons["Stock Entry"]);
 
 			if(flt(doc.per_ordered, 2) < 100) {
 				if(doc.material_request_type === "Purchase")
 					cur_frm.add_custom_button(__('Make Purchase Order'),
-						this.make_purchase_order);
+						this.make_purchase_order, frappe.boot.doctype_icons["Purchase Order"]);
 
-				cur_frm.add_custom_button(__('Stop Material Request'),
-					cur_frm.cscript['Stop Material Request'], "icon-exclamation");
+				cur_frm.add_custom_button(__('Stop'),
+					cur_frm.cscript['Stop Material Request'], "icon-exclamation", "btn-default");
 			}
-			cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
+			cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms,
+				"icon-mobile-phone", true);
 
 		}
 
@@ -66,7 +70,7 @@
 							company: cur_frm.doc.company
 						}
 					})
-				});
+				}, "icon-download", "btn-default");
 		}
 
 		if(doc.docstatus == 1 && doc.status == 'Stopped')
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index f80b4f8..632d42c 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -16,14 +16,15 @@
 
 		if(this.frm.doc.docstatus == 1) {
 			if(this.frm.doc.__onload && !this.frm.doc.__onload.billing_complete) {
-				cur_frm.add_custom_button(__('Make Purchase Invoice'), this.make_purchase_invoice);
+				cur_frm.add_custom_button(__('Make Purchase Invoice'), this.make_purchase_invoice,
+					frappe.boot.doctype_icons["Purchase Invoice"]);
 			}
-			cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
+			cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms, "icon-mobile-phone", true);
 
 			this.show_stock_ledger();
 			this.show_general_ledger();
 		} else {
-			cur_frm.add_custom_button(__(__('From Purchase Order')),
+			cur_frm.add_custom_button(__('From Purchase Order'),
 				function() {
 					frappe.model.map_current_doc({
 						method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_receipt",
@@ -36,7 +37,7 @@
 							company: cur_frm.doc.company
 						}
 					})
-				});
+				}, "icon-download", "btn-default");
 		}
 	},
 
diff --git a/erpnext/stock/doctype/serial_no/serial_no.js b/erpnext/stock/doctype/serial_no/serial_no.js
index dce9d45..e7c2c37 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.js
+++ b/erpnext/stock/doctype/serial_no/serial_no.js
@@ -22,5 +22,5 @@
 		cur_frm.add_custom_button(__('Set Status as Available'), function() {
 			cur_frm.set_value("status", "Available");
 			cur_frm.save();
-		});
+		}, "icon-ok", "btn-default");
 });
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 96b2cd5..af6493d 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -71,10 +71,12 @@
 		if(this.frm.doc.docstatus === 1 &&
 				frappe.boot.user.can_create.indexOf("Journal Voucher")!==-1) {
 			if(this.frm.doc.purpose === "Sales Return") {
-				this.frm.add_custom_button(__("Make Credit Note"), function() { me.make_return_jv(); });
+				this.frm.add_custom_button(__("Make Credit Note"),
+					function() { me.make_return_jv(); }, frappe.boot.doctype_icons["Journal Voucher"]);
 				this.add_excise_button();
 			} else if(this.frm.doc.purpose === "Purchase Return") {
-				this.frm.add_custom_button(__("Make Debit Note"), function() { me.make_return_jv(); });
+				this.frm.add_custom_button(__("Make Debit Note"),
+					function() { me.make_return_jv(); }, frappe.boot.doctype_icons["Journal Voucher"]);
 				this.add_excise_button();
 			}
 		}
@@ -199,7 +201,7 @@
 				excise = locals['Journal Voucher'][excise];
 				excise.voucher_type = 'Excise Voucher';
 				loaddoc('Journal Voucher', excise.name);
-			});
+			}, frappe.boot.doctype_icons["Journal Voucher"], "btn-default");
 	},
 
 	make_return_jv: function() {
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index 5373436..432a999 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -124,7 +124,7 @@
 				this.title = __("Stock Reconcilation Data");
 				frappe.tools.downloadify(JSON.parse(me.frm.doc.reconciliation_json), null, this);
 				return false;
-			}, "icon-download");
+			}, "icon-download", "btn-default");
 		}
 	},
 
diff --git a/erpnext/support/doctype/customer_issue/customer_issue.js b/erpnext/support/doctype/customer_issue/customer_issue.js
index 036f14e..67a265d 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue.js
+++ b/erpnext/support/doctype/customer_issue/customer_issue.js
@@ -13,7 +13,8 @@
 erpnext.support.CustomerIssue = frappe.ui.form.Controller.extend({
 	refresh: function() {
 		if((cur_frm.doc.status=='Open' || cur_frm.doc.status == 'Work In Progress')) {
-			cur_frm.add_custom_button(__('Make Maintenance Visit'), this.make_maintenance_visit)
+			cur_frm.add_custom_button(__('Make Maintenance Visit'),
+				this.make_maintenance_visit, frappe.boot.doctype_icons["Maintenance Visit"], "btn-default")
 		}
 	},
 
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
index 17cc29d..a31dfa6 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
@@ -28,7 +28,7 @@
 							company: me.frm.doc.company
 						}
 					});
-				});
+				}, "icon-download", "btn-default");
 		} else if (this.frm.doc.docstatus === 1) {
 			this.frm.add_custom_button(__("Make Maintenance Visit"), function() {
 				frappe.model.open_mapped_doc({
@@ -36,7 +36,7 @@
 					source_name: me.frm.doc.name,
 					frm: me.frm
 				})
-			});
+			}, frappe.boot.doctype_icons["Maintenance Visit"]);
 		}
 	},
 
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
index 0f70cf2..e9a7c84 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
@@ -3,18 +3,18 @@
 
 frappe.provide("erpnext.support");
 
-frappe.ui.form.on_change("Maintenance Visit", "customer", function(frm) { 
+frappe.ui.form.on_change("Maintenance Visit", "customer", function(frm) {
 	erpnext.utils.get_party_details(frm) });
-frappe.ui.form.on_change("Maintenance Visit", "customer_address", 
+frappe.ui.form.on_change("Maintenance Visit", "customer_address",
 	erpnext.utils.get_address_display);
-frappe.ui.form.on_change("Maintenance Visit", "contact_person", 
-	erpnext.utils.get_contact_details);	
+frappe.ui.form.on_change("Maintenance Visit", "contact_person",
+	erpnext.utils.get_contact_details);
 
 // TODO commonify this code
 erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({
 	refresh: function() {
 		if (this.frm.doc.docstatus===0) {
-			cur_frm.add_custom_button(__('From Maintenance Schedule'), 
+			cur_frm.add_custom_button(__('From Maintenance Schedule'),
 				function() {
 					frappe.model.map_current_doc({
 						method: "erpnext.support.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit",
@@ -25,8 +25,8 @@
 							company: cur_frm.doc.company
 						}
 					})
-				});
-			cur_frm.add_custom_button(__('From Customer Issue'), 
+				}, "icon-download", "btn-default");
+			cur_frm.add_custom_button(__('From Customer Issue'),
 				function() {
 					frappe.model.map_current_doc({
 						method: "erpnext.support.doctype.customer_issue.customer_issue.make_maintenance_visit",
@@ -37,8 +37,8 @@
 							company: cur_frm.doc.company
 						}
 					})
-				});
-			cur_frm.add_custom_button(__('From Sales Order'), 
+				}, "icon-download", "btn-default");
+			cur_frm.add_custom_button(__('From Sales Order'),
 				function() {
 					frappe.model.map_current_doc({
 						method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_visit",
@@ -50,7 +50,7 @@
 							company: cur_frm.doc.company
 						}
 					})
-				});
+				}, "icon-download", "btn-default");
 		}
 	},
 });
@@ -91,4 +91,4 @@
 
 cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
 	return {query: "erpnext.controllers.queries.customer_query" }
-}
\ No newline at end of file
+}
diff --git a/erpnext/support/doctype/newsletter/newsletter.js b/erpnext/support/doctype/newsletter/newsletter.js
index c514a21..9edb14c 100644
--- a/erpnext/support/doctype/newsletter/newsletter.js
+++ b/erpnext/support/doctype/newsletter/newsletter.js
@@ -20,7 +20,7 @@
 			return $c_obj(doc, 'send_emails', '', function(r) {
 				cur_frm.refresh();
 			});
-		})
+		}, "icon-play", "btn-success");
 	}
 
 	cur_frm.cscript.setup_dashboard();
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.js b/erpnext/support/doctype/support_ticket/support_ticket.js
index 0144d14..919ae65 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.js
+++ b/erpnext/support/doctype/support_ticket/support_ticket.js
@@ -15,27 +15,29 @@
 				<span class="help">'+__("Integrate incoming support emails to Support Ticket")+'</span></p>';
 		}
 	},
-	
+
 	refresh: function(doc) {
 		erpnext.toggle_naming_series();
 		cur_frm.cscript.make_listing(doc);
 		if(!doc.__islocal) {
 			if(cur_frm.fields_dict.status.get_status()=="Write") {
-				if(doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cur_frm.cscript['Close Ticket']);
-				if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket', cur_frm.cscript['Re-Open Ticket']);
+				if(doc.status!='Closed') cur_frm.add_custom_button('Close',
+					cur_frm.cscript['Close Ticket'], "icon-ok", "btn-success");
+				if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket',
+					cur_frm.cscript['Re-Open Ticket'], null, "btn-default");
 			}
-			
+
 			cur_frm.toggle_enable(["subject", "raised_by"], false);
 			cur_frm.toggle_display("description", false);
 		}
 		refresh_field('status');
 	},
-	
+
 	make_listing: function(doc) {
 		var wrapper = cur_frm.fields_dict['thread_html'].wrapper;
-		
+
 		var comm_list = frappe.get_list("Communication", {"parent": doc.name, "parenttype":"Support Ticket"})
-		
+
 		if(!comm_list.length) {
 			comm_list.push({
 				"sender": doc.raised_by,
@@ -43,7 +45,7 @@
 				"subject": doc.subject,
 				"content": doc.description});
 		}
-					
+
 		cur_frm.communication_view = new frappe.views.CommunicationList({
 			list: comm_list,
 			parent: wrapper,
@@ -52,11 +54,11 @@
 		})
 
 	},
-		
+
 	'Close Ticket': function() {
 		cur_frm.cscript.set_status("Closed");
 	},
-	
+
 	'Re-Open Ticket': function() {
 		cur_frm.cscript.set_status("Open");
 	},
@@ -72,8 +74,8 @@
 				if(!r.exc) cur_frm.reload_doc();
 			}
 		})
-		
+
 	}
-	
+
 })