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 | |
Anand Doshi | c9d1ac4 | 2012-04-17 13:54:53 +0530 | [diff] [blame] | 4 | wn.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() { |
Anand Doshi | b0dab89 | 2013-08-07 16:19:30 +0530 | [diff] [blame] | 8 | wn.app.name = "ERPNext"; |
| 9 | |
Anand Doshi | 28d59a0 | 2013-07-19 17:50:25 +0530 | [diff] [blame] | 10 | var brand = ($("<div></div>").append(wn.boot.website_settings.brand_html).text() || 'erpnext'); |
| 11 | $('.navbar-brand').html('<div style="display: inline-block;">\ |
Rushabh Mehta | 1f84799 | 2013-12-12 19:12:19 +0530 | [diff] [blame] | 12 | <object type="image/svg+xml" data="assets/erpnext/images/splash.svg" class="toolbar-splash"></object>\ |
Anand Doshi | 28d59a0 | 2013-07-19 17:50:25 +0530 | [diff] [blame] | 13 | </div>' + brand) |
| 14 | .attr("title", brand) |
Anand Doshi | c8b2c0f | 2013-07-18 18:15:56 +0530 | [diff] [blame] | 15 | .addClass("navbar-icon-home") |
Anand Doshi | 28d59a0 | 2013-07-19 17:50:25 +0530 | [diff] [blame] | 16 | .css({ |
| 17 | "max-width": "200px", |
| 18 | "overflow": "hidden", |
| 19 | "text-overflow": "ellipsis", |
| 20 | "white-space": "nowrap" |
| 21 | }); |
Anand Doshi | 859cb72 | 2012-04-10 11:35:19 +0530 | [diff] [blame] | 22 | }); |
Rushabh Mehta | 3ae2542 | 2013-08-07 11:45:39 +0530 | [diff] [blame] | 23 | |
| 24 | wn.provide('wn.ui.misc'); |
| 25 | wn.ui.misc.about = function() { |
| 26 | if(!wn.ui.misc.about_dialog) { |
Bárbara Perretti | 9740825 | 2013-10-07 17:29:58 -0300 | [diff] [blame] | 27 | var d = new wn.ui.Dialog({title: wn._('About ERPNext')}) |
Rushabh Mehta | 3ae2542 | 2013-08-07 11:45:39 +0530 | [diff] [blame] | 28 | |
| 29 | $(d.body).html(repl("<div>\ |
Rushabh Mehta | 2b08985 | 2013-12-19 18:27:48 +0530 | [diff] [blame] | 30 | <p>"+wn._("ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd. to provide an integrated tool to manage most processes in a small organization. For more information about Web Notes, or to buy hosting servies, go to ")+ |
Bárbara Perretti | 9740825 | 2013-10-07 17:29:58 -0300 | [diff] [blame] | 31 | "<a href='https://erpnext.com'>https://erpnext.com</a>.</p>\ |
| 32 | <p>"+wn._("To report an issue, go to ")+"<a href='https://github.com/webnotes/erpnext/issues'>GitHub Issues</a></p>\ |
Rushabh Mehta | 3ae2542 | 2013-08-07 11:45:39 +0530 | [diff] [blame] | 33 | <hr>\ |
| 34 | <p><a href='http://www.gnu.org/copyleft/gpl.html'>License: GNU General Public License Version 3</a></p>\ |
| 35 | </div>", wn.app)); |
| 36 | |
| 37 | wn.ui.misc.about_dialog = d; |
| 38 | } |
| 39 | |
| 40 | wn.ui.misc.about_dialog.show(); |
| 41 | } |