user background
diff --git a/erpnext/startup/event_handlers.py b/erpnext/startup/event_handlers.py
index 79fd603..dca9e0c 100644
--- a/erpnext/startup/event_handlers.py
+++ b/erpnext/startup/event_handlers.py
@@ -93,6 +93,8 @@
# if no company, show a dialog box to create a new company
bootinfo['setup_complete'] = webnotes.conn.sql("""select name from
tabCompany limit 1""") and 'Yes' or 'No'
+
+ bootinfo['user_background'] = webnotes.conn.get_value("Profile", webnotes.session['user'], 'background_image') or ''
def get_letter_heads():
"""load letter heads with startup"""
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index aef298c..ad8289e 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -50,6 +50,9 @@
if(wn.boot.custom_css) {
set_style(wn.boot.custom_css);
}
+ if(wn.boot.user_background) {
+ erpnext.set_user_background(wn.boot.user_background);
+ }
if(user == 'Guest'){
if(wn.boot.website_settings.title_prefix) {
@@ -132,6 +135,10 @@
wn.updates.id = setInterval(update_messages, 60000);
}
+erpnext.set_user_background = function(src) {
+ set_style(repl('body { background: url("files/%(src)s") repeat !important;}', {src:src}))
+}
+
// =======================================
// start