blob: 929bfcaa59352d50a67fdad23fe08241b4e74b39 [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
Anand Doshic9d1ac42012-04-17 13:54:53 +05304wn.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() {
Anand Doshib0dab892013-08-07 16:19:30 +05308 wn.app.name = "ERPNext";
9
Anand Doshi28d59a02013-07-19 17:50:25 +053010 var brand = ($("<div></div>").append(wn.boot.website_settings.brand_html).text() || 'erpnext');
11 $('.navbar-brand').html('<div style="display: inline-block;">\
Anand Doshi674765a2013-07-18 19:28:46 +053012 <object type="image/svg+xml" data="app/images/splash.svg" class="toolbar-splash"></object>\
Anand Doshi28d59a02013-07-19 17:50:25 +053013 </div>' + brand)
14 .attr("title", brand)
Anand Doshic8b2c0f2013-07-18 18:15:56 +053015 .addClass("navbar-icon-home")
Anand Doshi28d59a02013-07-19 17:50:25 +053016 .css({
17 "max-width": "200px",
18 "overflow": "hidden",
19 "text-overflow": "ellipsis",
20 "white-space": "nowrap"
21 });
Anand Doshi859cb722012-04-10 11:35:19 +053022});
Rushabh Mehta3ae25422013-08-07 11:45:39 +053023
24wn.provide('wn.ui.misc');
25wn.ui.misc.about = function() {
26 if(!wn.ui.misc.about_dialog) {
Bárbara Perretti97408252013-10-07 17:29:58 -030027 var d = new wn.ui.Dialog({title: wn._('About ERPNext')})
Rushabh Mehta3ae25422013-08-07 11:45:39 +053028
29 $(d.body).html(repl("<div>\
Bárbara Perretti97408252013-10-07 17:29:58 -030030 <p>"+wn._("ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\
Rushabh Mehta3ae25422013-08-07 11:45:39 +053031 to provide an integrated tool to manage most processes in a small organization.\
Bárbara Perretti97408252013-10-07 17:29:58 -030032 For more information about Web Notes, or to buy hosting servies, go to ")+
33 "<a href='https://erpnext.com'>https://erpnext.com</a>.</p>\
34 <p>"+wn._("To report an issue, go to ")+"<a href='https://github.com/webnotes/erpnext/issues'>GitHub Issues</a></p>\
Rushabh Mehta3ae25422013-08-07 11:45:39 +053035 <hr>\
36 <p><a href='http://www.gnu.org/copyleft/gpl.html'>License: GNU General Public License Version 3</a></p>\
37 </div>", wn.app));
38
39 wn.ui.misc.about_dialog = d;
40 }
41
42 wn.ui.misc.about_dialog.show();
43}