Rushabh Mehta | ad45e31 | 2013-11-20 12:59:58 +0530 | [diff] [blame] | 1 | // Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors |
Rushabh Mehta | e67d1fb | 2013-08-05 14:59:54 +0530 | [diff] [blame] | 2 | // License: GNU General Public License v3. See license.txt |
| 3 | |
Rushabh Mehta | 793ba6b | 2014-02-14 15:47:51 +0530 | [diff] [blame] | 4 | frappe.provide('erpnext'); |
Rushabh Mehta | 8c309be | 2012-01-20 13:47:16 +0530 | [diff] [blame] | 5 | |
Rushabh Mehta | a920943 | 2012-05-07 18:00:57 +0530 | [diff] [blame] | 6 | // add toolbar icon |
Rushabh Mehta | 8c309be | 2012-01-20 13:47:16 +0530 | [diff] [blame] | 7 | $(document).bind('toolbar_setup', function() { |
Rushabh Mehta | 793ba6b | 2014-02-14 15:47:51 +0530 | [diff] [blame] | 8 | frappe.app.name = "ERPNext"; |
Rushabh Mehta | 8a40c13 | 2014-04-15 16:30:55 +0530 | [diff] [blame] | 9 | |
| 10 | $('.navbar-brand').html('<i class="icon-home"></i>') |
| 11 | .attr("title", "Home") |
Anand Doshi | c8b2c0f | 2013-07-18 18:15:56 +0530 | [diff] [blame] | 12 | .addClass("navbar-icon-home") |
Anand Doshi | 28d59a0 | 2013-07-19 17:50:25 +0530 | [diff] [blame] | 13 | .css({ |
| 14 | "max-width": "200px", |
Anand Doshi | 28d59a0 | 2013-07-19 17:50:25 +0530 | [diff] [blame] | 15 | "text-overflow": "ellipsis", |
| 16 | "white-space": "nowrap" |
| 17 | }); |
Anand Doshi | 859cb72 | 2012-04-10 11:35:19 +0530 | [diff] [blame] | 18 | }); |
Rushabh Mehta | 3ae2542 | 2013-08-07 11:45:39 +0530 | [diff] [blame] | 19 | |
Rushabh Mehta | 793ba6b | 2014-02-14 15:47:51 +0530 | [diff] [blame] | 20 | frappe.provide('frappe.ui.misc'); |
| 21 | frappe.ui.misc.about = function() { |
| 22 | if(!frappe.ui.misc.about_dialog) { |
Pratik Vyas | b52618c | 2014-04-14 16:25:30 +0530 | [diff] [blame] | 23 | var d = new frappe.ui.Dialog({title: __('About')}) |
Rushabh Mehta | 8a40c13 | 2014-04-15 16:30:55 +0530 | [diff] [blame] | 24 | |
Rushabh Mehta | 3ae2542 | 2013-08-07 11:45:39 +0530 | [diff] [blame] | 25 | $(d.body).html(repl("<div>\ |
Nabin Hait | dc15b4f | 2014-01-20 16:48:49 +0530 | [diff] [blame] | 26 | <h2>ERPNext</h2> \ |
Rushabh Mehta | 8a40c13 | 2014-04-15 16:30:55 +0530 | [diff] [blame] | 27 | <h4 class='text-muted'>"+__("Built on") + " Frappe Framework"+"</h4> \ |
| 28 | <p>"+__("Open source ERP built for the web") + "</p>" + |
Pratik Vyas | b52618c | 2014-04-14 16:25:30 +0530 | [diff] [blame] | 29 | "<p>"+__("To report an issue, go to ")+"<a href='https://github.com/frappe/erpnext/issues'>GitHub Issues</a></p> \ |
Nabin Hait | dc15b4f | 2014-01-20 16:48:49 +0530 | [diff] [blame] | 30 | <p><a href='http://erpnext.org' target='_blank'>http://erpnext.org</a>.</p>\ |
Rushabh Mehta | 3ae2542 | 2013-08-07 11:45:39 +0530 | [diff] [blame] | 31 | <p><a href='http://www.gnu.org/copyleft/gpl.html'>License: GNU General Public License Version 3</a></p>\ |
Nabin Hait | dc15b4f | 2014-01-20 16:48:49 +0530 | [diff] [blame] | 32 | <hr>\ |
| 33 | <p>© 2014 Web Notes Technologies Pvt. Ltd and contributers </p> \ |
Rushabh Mehta | 793ba6b | 2014-02-14 15:47:51 +0530 | [diff] [blame] | 34 | </div>", frappe.app)); |
Rushabh Mehta | 8a40c13 | 2014-04-15 16:30:55 +0530 | [diff] [blame] | 35 | |
| 36 | frappe.ui.misc.about_dialog = d; |
Rushabh Mehta | 3ae2542 | 2013-08-07 11:45:39 +0530 | [diff] [blame] | 37 | } |
Rushabh Mehta | 8a40c13 | 2014-04-15 16:30:55 +0530 | [diff] [blame] | 38 | |
Rushabh Mehta | 793ba6b | 2014-02-14 15:47:51 +0530 | [diff] [blame] | 39 | frappe.ui.misc.about_dialog.show(); |
Rushabh Mehta | 3ae2542 | 2013-08-07 11:45:39 +0530 | [diff] [blame] | 40 | } |