blob: 65ffe2db7220bf8f3e2d3920fb6be82ce3ab64ff [file] [log] [blame]
Rushabh Mehtaad45e312013-11-20 12:59:58 +05301// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
Rushabh Mehtae67d1fb2013-08-05 14:59:54 +05302// License: GNU General Public License v3. See license.txt
3
Rushabh Mehta793ba6b2014-02-14 15:47:51 +05304frappe.provide('erpnext');
Rushabh Mehta8c309be2012-01-20 13:47:16 +05305
Rushabh Mehtaa9209432012-05-07 18:00:57 +05306// add toolbar icon
Rushabh Mehta8c309be2012-01-20 13:47:16 +05307$(document).bind('toolbar_setup', function() {
Rushabh Mehta793ba6b2014-02-14 15:47:51 +05308 frappe.app.name = "ERPNext";
Rushabh Mehta8a40c132014-04-15 16:30:55 +05309
10 $('.navbar-brand').html('<i class="icon-home"></i>')
11 .attr("title", "Home")
Anand Doshic8b2c0f2013-07-18 18:15:56 +053012 .addClass("navbar-icon-home")
Anand Doshi28d59a02013-07-19 17:50:25 +053013 .css({
14 "max-width": "200px",
Anand Doshi28d59a02013-07-19 17:50:25 +053015 "text-overflow": "ellipsis",
16 "white-space": "nowrap"
17 });
Anand Doshi859cb722012-04-10 11:35:19 +053018});
Rushabh Mehta3ae25422013-08-07 11:45:39 +053019
Rushabh Mehta793ba6b2014-02-14 15:47:51 +053020frappe.provide('frappe.ui.misc');
21frappe.ui.misc.about = function() {
22 if(!frappe.ui.misc.about_dialog) {
Pratik Vyasb52618c2014-04-14 16:25:30 +053023 var d = new frappe.ui.Dialog({title: __('About')})
Rushabh Mehta8a40c132014-04-15 16:30:55 +053024
Rushabh Mehta3ae25422013-08-07 11:45:39 +053025 $(d.body).html(repl("<div>\
Nabin Haitdc15b4f2014-01-20 16:48:49 +053026 <h2>ERPNext</h2> \
Rushabh Mehta8a40c132014-04-15 16:30:55 +053027 <h4 class='text-muted'>"+__("Built on") + " Frappe Framework"+"</h4> \
28 <p>"+__("Open source ERP built for the web") + "</p>" +
Pratik Vyasb52618c2014-04-14 16:25:30 +053029 "<p>"+__("To report an issue, go to ")+"<a href='https://github.com/frappe/erpnext/issues'>GitHub Issues</a></p> \
Nabin Haitdc15b4f2014-01-20 16:48:49 +053030 <p><a href='http://erpnext.org' target='_blank'>http://erpnext.org</a>.</p>\
Rushabh Mehta3ae25422013-08-07 11:45:39 +053031 <p><a href='http://www.gnu.org/copyleft/gpl.html'>License: GNU General Public License Version 3</a></p>\
Nabin Haitdc15b4f2014-01-20 16:48:49 +053032 <hr>\
33 <p>&copy; 2014 Web Notes Technologies Pvt. Ltd and contributers </p> \
Rushabh Mehta793ba6b2014-02-14 15:47:51 +053034 </div>", frappe.app));
Rushabh Mehta8a40c132014-04-15 16:30:55 +053035
36 frappe.ui.misc.about_dialog = d;
Rushabh Mehta3ae25422013-08-07 11:45:39 +053037 }
Rushabh Mehta8a40c132014-04-15 16:30:55 +053038
Rushabh Mehta793ba6b2014-02-14 15:47:51 +053039 frappe.ui.misc.about_dialog.show();
Rushabh Mehta3ae25422013-08-07 11:45:39 +053040}