blob: e976052afba9b75dfd6357e74cdc8c6b94a7a7eb [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";
Anand Doshib0dab892013-08-07 16:19:30 +05309
Rushabh Mehta793ba6b2014-02-14 15:47:51 +053010 var brand = ($("<div></div>").append(frappe.boot.website_settings.brand_html).text() || 'erpnext');
Anand Doshi28d59a02013-07-19 17:50:25 +053011 $('.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",
Anand Doshi28d59a02013-07-19 17:50:25 +053018 "text-overflow": "ellipsis",
19 "white-space": "nowrap"
20 });
Anand Doshi859cb722012-04-10 11:35:19 +053021});
Rushabh Mehta3ae25422013-08-07 11:45:39 +053022
Rushabh Mehta793ba6b2014-02-14 15:47:51 +053023frappe.provide('frappe.ui.misc');
24frappe.ui.misc.about = function() {
25 if(!frappe.ui.misc.about_dialog) {
26 var d = new frappe.ui.Dialog({title: frappe._('About')})
Rushabh Mehta3ae25422013-08-07 11:45:39 +053027
28 $(d.body).html(repl("<div>\
Nabin Haitdc15b4f2014-01-20 16:48:49 +053029 <h2>ERPNext</h2> \
Rushabh Mehta793ba6b2014-02-14 15:47:51 +053030 <p>"+frappe._("An open source ERP made for the web.</p>") +
31 "<p>"+frappe._("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 +053032 <p><a href='http://erpnext.org' target='_blank'>http://erpnext.org</a>.</p>\
Rushabh Mehta3ae25422013-08-07 11:45:39 +053033 <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 +053034 <hr>\
35 <p>&copy; 2014 Web Notes Technologies Pvt. Ltd and contributers </p> \
Rushabh Mehta793ba6b2014-02-14 15:47:51 +053036 </div>", frappe.app));
Rushabh Mehta3ae25422013-08-07 11:45:39 +053037
Rushabh Mehta793ba6b2014-02-14 15:47:51 +053038 frappe.ui.misc.about_dialog = d;
Rushabh Mehta3ae25422013-08-07 11:45:39 +053039 }
40
Rushabh Mehta793ba6b2014-02-14 15:47:51 +053041 frappe.ui.misc.about_dialog.show();
Rushabh Mehta3ae25422013-08-07 11:45:39 +053042}