blob: 73099d1f371e51eb8a2ce9275894e787c05be0e9 [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;">\
Rushabh Mehta1f847992013-12-12 19:12:19 +053012 <object type="image/svg+xml" data="assets/erpnext/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) {
Nabin Haitdc15b4f2014-01-20 16:48:49 +053027 var d = new wn.ui.Dialog({title: wn._('About')})
Rushabh Mehta3ae25422013-08-07 11:45:39 +053028
29 $(d.body).html(repl("<div>\
Nabin Haitdc15b4f2014-01-20 16:48:49 +053030 <h2>ERPNext</h2> \
31 <p>"+wn._("An open source ERP made for the web.</p>") +
32 "<p>"+wn._("To report an issue, go to ")+"<a href='https://github.com/webnotes/erpnext/issues'>GitHub Issues</a></p> \
33 <p><a href='http://erpnext.org' target='_blank'>http://erpnext.org</a>.</p>\
Rushabh Mehta3ae25422013-08-07 11:45:39 +053034 <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 +053035 <hr>\
36 <p>&copy; 2014 Web Notes Technologies Pvt. Ltd and contributers </p> \
Rushabh Mehta3ae25422013-08-07 11:45:39 +053037 </div>", wn.app));
38
39 wn.ui.misc.about_dialog = d;
40 }
41
42 wn.ui.misc.about_dialog.show();
43}