refactor: remove code related to background image

This commit is contained in:
Shivam Mishra 2019-08-09 10:42:03 +05:30
parent 047e175097
commit 4492dbfc38
4 changed files with 2 additions and 9 deletions

View file

@ -280,7 +280,7 @@ user_privacy_documents = [
'doctype': 'User',
'match_field': 'name',
'personal_fields': ['email', 'username', 'first_name', 'middle_name', 'last_name', 'full_name', 'birth_date',
'user_image', 'phone', 'mobile_no', 'location', 'banner_image', 'interest', 'bio', 'email_signature', 'background_image'],
'user_image', 'phone', 'mobile_no', 'location', 'banner_image', 'interest', 'bio', 'email_signature'],
'applies_to_website_user': 1
},

View file

@ -178,7 +178,7 @@ class UserPermissions:
def load_user(self):
d = frappe.db.sql("""select email, first_name, last_name, creation,
email_signature, user_type, language, background_style, background_image,
email_signature, user_type, language, background_style,
mute_sounds, send_me_a_copy, document_follow_notify
from tabUser where name = %s""", (self.name,), as_dict=1)[0]

View file

@ -33,11 +33,6 @@
<footer></footer>
</div>
<!-- hack! load background image asap, before desktop is rendered -->
{% if background_image %}
<img src="{{ background_image }}" style="height: 1px; width: 1px; margin-bottom: -1px;">
{% endif %}
<script type="text/javascript" src="/assets/frappe/js/lib/jquery/jquery.min.js"></script>
<script type="text/javascript">

View file

@ -41,8 +41,6 @@ def get_context(context):
"sounds": hooks["sounds"],
"boot": boot if context.get("for_mobile") else boot_json,
"csrf_token": csrf_token,
"background_image": (boot.status != 'failed' and
(boot.user.background_image or boot.default_background_image) or None),
"google_analytics_id": frappe.conf.get("google_analytics_id"),
"mixpanel_id": frappe.conf.get("mixpanel_id")
})