[email] wip
This commit is contained in:
parent
6113e17871
commit
1d77d3114d
14 changed files with 101 additions and 679 deletions
|
|
@ -1,6 +1,6 @@
|
|||
email_defaults = {
|
||||
"GMail": {
|
||||
"pop3_mail_server": "pop.gmail.com",
|
||||
"pop3_server": "pop.gmail.com",
|
||||
"use_ssl": 1,
|
||||
"enable_outgoing": 1,
|
||||
"smtp_server": "smtp.gmail.com",
|
||||
|
|
@ -8,7 +8,7 @@ email_defaults = {
|
|||
"use_tls": 1
|
||||
},
|
||||
"Outlook.com": {
|
||||
"pop3_mail_server": "pop3.live.com",
|
||||
"pop3_server": "pop3.live.com",
|
||||
"use_ssl": 1,
|
||||
"enable_outgoing": 1,
|
||||
"smtp_server": "smtp.live.com",
|
||||
|
|
@ -16,7 +16,7 @@ email_defaults = {
|
|||
"use_tls": 1
|
||||
},
|
||||
"Yahoo Mail": {
|
||||
"pop3_mail_server": "pop.mail.yahoo.com ",
|
||||
"pop3_server": "pop.mail.yahoo.com ",
|
||||
"use_ssl": 1,
|
||||
"enable_outgoing": 1,
|
||||
"smtp_server": "smtp.mail.yahoo.com",
|
||||
|
|
|
|||
|
|
@ -16,22 +16,6 @@
|
|||
"permlevel": 0,
|
||||
"precision": ""
|
||||
},
|
||||
{
|
||||
"description": "Make this Email Account default for all users",
|
||||
"fieldname": "is_default",
|
||||
"fieldtype": "Check",
|
||||
"label": "Default",
|
||||
"permlevel": 0,
|
||||
"precision": ""
|
||||
},
|
||||
{
|
||||
"description": "Check this if this is a global email id like \"sales@yourcompany.com\"",
|
||||
"fieldname": "is_global",
|
||||
"fieldtype": "Check",
|
||||
"label": "Global",
|
||||
"permlevel": 0,
|
||||
"precision": ""
|
||||
},
|
||||
{
|
||||
"fieldname": "service",
|
||||
"fieldtype": "Select",
|
||||
|
|
@ -47,7 +31,7 @@
|
|||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Email Id",
|
||||
"no_copy": 0,
|
||||
"options": "email",
|
||||
|
|
@ -103,6 +87,7 @@
|
|||
"description": "Append as communication against this DocType (must have fields, \"Status\", \"Subject\")",
|
||||
"fieldname": "append_to",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"label": "Append To",
|
||||
"options": "DocType",
|
||||
"permlevel": 0,
|
||||
|
|
@ -136,7 +121,7 @@
|
|||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Enable Incoming",
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
|
|
@ -150,13 +135,14 @@
|
|||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"depends_on": "enable_incoming",
|
||||
"description": "e.g. pop.gmail.com",
|
||||
"fieldname": "pop3_server",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "POP3 Server",
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
|
|
@ -170,12 +156,13 @@
|
|||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"depends_on": "enable_incoming",
|
||||
"fieldname": "use_ssl",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 1,
|
||||
"in_list_view": 0,
|
||||
"label": "Use SSL",
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
|
|
@ -189,6 +176,7 @@
|
|||
},
|
||||
{
|
||||
"default": "1",
|
||||
"depends_on": "enable_incoming",
|
||||
"description": "Ignore attachments over this size",
|
||||
"fieldname": "attachment_limit",
|
||||
"fieldtype": "Int",
|
||||
|
|
@ -196,6 +184,15 @@
|
|||
"permlevel": 0,
|
||||
"precision": ""
|
||||
},
|
||||
{
|
||||
"depends_on": "enable_incoming",
|
||||
"description": "e.g. replies@yourcomany.com. All replies will come to this inbox.",
|
||||
"fieldname": "default_incoming",
|
||||
"fieldtype": "Check",
|
||||
"label": "Default Incoming",
|
||||
"permlevel": 0,
|
||||
"precision": ""
|
||||
},
|
||||
{
|
||||
"fieldname": "outgoing_mail_settings",
|
||||
"fieldtype": "Section Break",
|
||||
|
|
@ -205,6 +202,7 @@
|
|||
},
|
||||
{
|
||||
"default": "1",
|
||||
"description": "SMTP Settings for outgoing emails",
|
||||
"fieldname": "enable_outgoing",
|
||||
"fieldtype": "Check",
|
||||
"label": "Enable Outgoing",
|
||||
|
|
@ -212,6 +210,7 @@
|
|||
"precision": ""
|
||||
},
|
||||
{
|
||||
"depends_on": "enable_outgoing",
|
||||
"description": "e.g. smtp.gmail.com",
|
||||
"fieldname": "smtp_server",
|
||||
"fieldtype": "Data",
|
||||
|
|
@ -220,6 +219,7 @@
|
|||
"precision": ""
|
||||
},
|
||||
{
|
||||
"depends_on": "enable_outgoing",
|
||||
"fieldname": "use_tls",
|
||||
"fieldtype": "Check",
|
||||
"label": "Use TLS",
|
||||
|
|
@ -227,6 +227,7 @@
|
|||
"precision": ""
|
||||
},
|
||||
{
|
||||
"depends_on": "enable_outgoing",
|
||||
"description": "If non standard port (e.g. 587)",
|
||||
"fieldname": "smtp_port",
|
||||
"fieldtype": "Data",
|
||||
|
|
@ -234,6 +235,15 @@
|
|||
"permlevel": 0,
|
||||
"precision": ""
|
||||
},
|
||||
{
|
||||
"depends_on": "enable_outgoing",
|
||||
"description": "Notifications and bulk mails will be sent from this outgoing server.",
|
||||
"fieldname": "default_outgoing",
|
||||
"fieldtype": "Check",
|
||||
"label": "Default Outgoing",
|
||||
"permlevel": 0,
|
||||
"precision": ""
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"fieldname": "signature_section",
|
||||
|
|
@ -362,7 +372,7 @@
|
|||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"modified": "2015-01-07 15:58:10.079334",
|
||||
"modified": "2015-01-20 12:38:10.322621",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Email",
|
||||
"name": "Email Account",
|
||||
|
|
|
|||
|
|
@ -25,40 +25,32 @@ class EmailAccount(Document):
|
|||
frappe.throw(_("{0} is not a valid email id").format(self.email_id),
|
||||
frappe.InvalidEmailAddressError)
|
||||
|
||||
self.there_must_be_atleast_one_default()
|
||||
|
||||
if frappe.local.flags.in_patch or frappe.local.flags.in_test:
|
||||
return
|
||||
|
||||
if self.enable_incoming:
|
||||
self.get_pop3()
|
||||
if not frappe.locals.flags.in_install and not frappe.locals.flags.in_patch:
|
||||
if self.enable_incoming:
|
||||
self.get_pop3()
|
||||
|
||||
self.check_smtp()
|
||||
self.check_smtp()
|
||||
|
||||
def on_update(self):
|
||||
self.there_must_be_only_one_default()
|
||||
|
||||
def there_must_be_atleast_one_default(self):
|
||||
if not frappe.db.get_value("Email Account", {"is_default": 1}):
|
||||
if not self.is_default and (self.is_global and self.enable_outgoing):
|
||||
self.is_default = 1
|
||||
frappe.msgprint(_("Setting as Default"))
|
||||
|
||||
def there_must_be_only_one_default(self):
|
||||
if self.is_default:
|
||||
for email_account in frappe.get_all("Email Account",
|
||||
{"is_default": 1}):
|
||||
if email_account.name==self.name:
|
||||
continue
|
||||
email_account = frappe.get_doc("Email Account",
|
||||
email_account.name)
|
||||
email_account.is_default = 0
|
||||
email_account.save()
|
||||
for fn in ("default_incoming", "default_outgoing"):
|
||||
if self.get(fn):
|
||||
for email_account in frappe.get_all("Email Account",
|
||||
{fn: 1}):
|
||||
if email_account.name==self.name:
|
||||
continue
|
||||
email_account = frappe.get_doc("Email Account",
|
||||
email_account.name)
|
||||
email_account.set(fn, 0)
|
||||
email_account.save()
|
||||
|
||||
def check_smtp(self):
|
||||
if self.enable_outgoing and self.smtp_server \
|
||||
and not frappe.local.flags.in_patch:
|
||||
|
||||
if self.enable_outgoing:
|
||||
if not self.smtp_server:
|
||||
frappe.throw(_("{0} is required").format("SMTP Server"))
|
||||
|
||||
|
|
@ -140,6 +132,9 @@ class EmailAccount(Document):
|
|||
if parent.meta.get_field("subject"):
|
||||
parent.subject = email.subject
|
||||
|
||||
if parent.meta.get_field("sender"):
|
||||
parent.sender = email.from_email
|
||||
|
||||
parent.ignore_mandatory = True
|
||||
parent.insert(ignore_permissions=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
frappe.listview_settings["Email Account"] = {
|
||||
add_fields: ["is_global", "is_default"],
|
||||
add_fields: ["default_incoming", "default_outgoing"],
|
||||
get_indicator: function(doc) {
|
||||
if(doc.is_default && doc.is_global) {
|
||||
return [__("Global Default"), "green", "is_default,=,Yes|is_global,=,Yes"]
|
||||
if(doc.default_incoming && doc.default_outgoing) {
|
||||
return [__("Default Sending and Inbox"), "blue", "default_incoming,=,Yes|default_outgoing,=,Yes"]
|
||||
}
|
||||
else if(doc.is_default) {
|
||||
return [__("Default"), "blue", "is_default,=,Yes"];
|
||||
else if(doc.default_incoming) {
|
||||
return [__("Default Inbox"), "blue", "default_incoming,=,Yes"];
|
||||
}
|
||||
else if(doc.is_global) {
|
||||
return [__("Global"), "green", "is_global,=,Yes"];
|
||||
else if(doc.default_outgoing) {
|
||||
return [__("Default Sending"), "blue", "default_outgoing,=,Yes"];
|
||||
}
|
||||
else {
|
||||
return [__("Personal"), "darkgrey", "is_global,=,No|is_default=No"];
|
||||
else {
|
||||
return [__("Inbox"), "darkgrey", "is_global,=,No|is_default=No"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import _socket
|
|||
from frappe.utils import cint
|
||||
from frappe import _
|
||||
|
||||
def send(email, as_bulk=False):
|
||||
def send(email, as_bulk=False, append_to=None):
|
||||
"""send the message or add it to Outbox Email"""
|
||||
if frappe.flags.mute_emails or frappe.conf.get("mute_emails") or False:
|
||||
frappe.msgprint(_("Emails are muted"))
|
||||
|
|
@ -20,7 +20,7 @@ def send(email, as_bulk=False):
|
|||
return
|
||||
|
||||
try:
|
||||
smtpserver = SMTPServer()
|
||||
smtpserver = SMTPServer(append_to=append_to)
|
||||
if hasattr(smtpserver, "always_use_login_id_as_sender") and \
|
||||
cint(smtpserver.always_use_login_id_as_sender) and smtpserver.login:
|
||||
if not email.reply_to:
|
||||
|
|
@ -37,13 +37,22 @@ def send(email, as_bulk=False):
|
|||
frappe.msgprint(_("Invalid recipient address"))
|
||||
raise
|
||||
|
||||
def get_outgoing_email_account(raise_exception_not_set=True):
|
||||
def get_outgoing_email_account(raise_exception_not_set=True, append_to=None):
|
||||
"""Returns outgoing email account based on `append_to` or the default
|
||||
outgoing account. If default outgoing account is not found, it will
|
||||
try getting settings from `site_config.json`."""
|
||||
def _get_email_account(filters):
|
||||
name = frappe.db.get_value("Email Account", filters)
|
||||
return frappe.get_doc("Email Account", name) if name else None
|
||||
|
||||
if not getattr(frappe.local, "outgoing_email_account", None):
|
||||
email_account = frappe.db.get_value("Email Account", {
|
||||
"email_id": frappe.session.user, "enable_outgoing": 1})
|
||||
email_account = None
|
||||
|
||||
if append_to:
|
||||
email_account = _get_email_account({"enable_outgoing": 1, "append_to": append_to})
|
||||
|
||||
if not email_account:
|
||||
email_account = frappe.db.get_value('Email Account', {"is_default": 1})
|
||||
email_account = _get_email_account({"enable_outgoing": 1, "default_outgoing": 1})
|
||||
|
||||
if not email_account and frappe.conf.get("mail_server"):
|
||||
# from site_config.json
|
||||
|
|
@ -58,21 +67,18 @@ def get_outgoing_email_account(raise_exception_not_set=True):
|
|||
})
|
||||
email_account.from_site_config = True
|
||||
|
||||
frappe.local.outgoing_email_account = email_account
|
||||
if not email_account and not raise_exception_not_set:
|
||||
return None
|
||||
|
||||
else:
|
||||
if not email_account and not raise_exception_not_set:
|
||||
return None
|
||||
if not email_account:
|
||||
frappe.throw(_("Please setup default Email Account from Setup > Email > Email Account"))
|
||||
|
||||
if not email_account:
|
||||
frappe.throw(_("Please setup default Email Account from Setup > Email > Email Account"))
|
||||
|
||||
frappe.local.outgoing_email_account = frappe.get_doc("Email Account", email_account)
|
||||
frappe.local.outgoing_email_account = frappe.get_doc("Email Account", email_account)
|
||||
|
||||
return frappe.local.outgoing_email_account
|
||||
|
||||
class SMTPServer:
|
||||
def __init__(self, login=None, password=None, server=None, port=None, use_ssl=None):
|
||||
def __init__(self, login=None, password=None, server=None, port=None, use_ssl=None, append_to=None):
|
||||
# get defaults from mail settings
|
||||
|
||||
self._sess = None
|
||||
|
|
@ -85,9 +91,9 @@ class SMTPServer:
|
|||
self.password = password
|
||||
|
||||
else:
|
||||
self.setup_from_user_or_default_outgoing()
|
||||
self.setup_email_account()
|
||||
|
||||
def setup_from_user_or_default_outgoing(self):
|
||||
def setup_email_account(self):
|
||||
self.email_account = get_outgoing_email_account(raise_exception_not_set=False)
|
||||
if self.email_account:
|
||||
self.server = self.email_account.smtp_server
|
||||
|
|
|
|||
1
frappe/public/css/bootstrap.css
vendored
1
frappe/public/css/bootstrap.css
vendored
|
|
@ -6609,4 +6609,3 @@ h4.modal-title {
|
|||
.navbar-search-icon {
|
||||
color: #b8c2cb;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap.css.map */
|
||||
|
|
|
|||
|
|
@ -1,319 +0,0 @@
|
|||
html {
|
||||
min-height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
body {
|
||||
height: 100%;
|
||||
margin: 0px;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
/* Prevent scroll on narrow devices */
|
||||
}
|
||||
.desk-container {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.desk-main-section {
|
||||
width: 100%;
|
||||
}
|
||||
a,
|
||||
.badge,
|
||||
.btn,
|
||||
.ui-menu .ui-menu-item {
|
||||
transition: 0.2s;
|
||||
-webkit-transition: 0.2s;
|
||||
}
|
||||
a.disabled,
|
||||
a.disabled:hover {
|
||||
color: #888;
|
||||
cursor: default;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.grey,
|
||||
.sidebar-section a,
|
||||
.nav-pills a,
|
||||
.control-value a,
|
||||
.data-row a {
|
||||
color: inherit;
|
||||
border-bottom: 1px solid transparent;
|
||||
margin-bottom: 0.4em;
|
||||
}
|
||||
a.grey:hover,
|
||||
.sidebar-section a:hover,
|
||||
.nav-pills a:hover,
|
||||
.control-value a:hover,
|
||||
.data-row a:hover {
|
||||
border-bottom: 1px solid #212a33;
|
||||
color: #212a33;
|
||||
}
|
||||
.text-muted {
|
||||
color: #8d99a6 !important;
|
||||
}
|
||||
.text-extra-muted {
|
||||
color: #d1d8dd !important;
|
||||
}
|
||||
a.text-muted,
|
||||
a.text-extra-muted {
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
a.text-muted:hover,
|
||||
a.text-muted:focus,
|
||||
a.text-extra-muted:hover,
|
||||
a.text-extra-muted:focus {
|
||||
color: inherit;
|
||||
border-bottom: 1px solid #8d99a6;
|
||||
}
|
||||
.nav-pills a,
|
||||
.nav-pills a:hover {
|
||||
border-bottom: none;
|
||||
}
|
||||
a.form-link {
|
||||
color: inherit;
|
||||
font-weight: bold;
|
||||
font-size: 102%;
|
||||
}
|
||||
.link-btn {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 4px;
|
||||
background-color: #f5f7fa;
|
||||
border-radius: 2px;
|
||||
padding: 3px;
|
||||
display: none;
|
||||
}
|
||||
em.link-option {
|
||||
font-weight: normal;
|
||||
}
|
||||
.text-ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.scroll-to-top {
|
||||
background-color: #fafbfc;
|
||||
padding: 7px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.alert-badge {
|
||||
margin: 4px 0px;
|
||||
}
|
||||
.alert-badge .badge {
|
||||
margin-top: 3px;
|
||||
}
|
||||
/* alert */
|
||||
#alert-container {
|
||||
position: fixed;
|
||||
bottom: 8px;
|
||||
right: 8px;
|
||||
z-index: 1050;
|
||||
}
|
||||
#alert-container .alert {
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
overflow: hidden;
|
||||
max-width: 400px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.missing-image {
|
||||
background-color: #fafbfc;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
}
|
||||
.missing-image .octicon {
|
||||
font-size: 32px;
|
||||
color: #d1d8dd;
|
||||
}
|
||||
.missing-image.small {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.missing-image.small .octicon {
|
||||
font-size: 16px;
|
||||
}
|
||||
.frappe-editor {
|
||||
cursor: text;
|
||||
}
|
||||
.frappe-editor img {
|
||||
max-width: 100%;
|
||||
}
|
||||
textarea.form-control {
|
||||
height: 120px;
|
||||
}
|
||||
ul.linked-with-list {
|
||||
list-style: none;
|
||||
margin: 0 0 20px 0;
|
||||
padding: 0 0 0 0;
|
||||
}
|
||||
ul.linked-with-list li {
|
||||
padding: 5px 0px;
|
||||
border-bottom: 1px solid #d1d8dd;
|
||||
}
|
||||
/* jquery ui */
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year {
|
||||
display: inline;
|
||||
}
|
||||
.hidden-xs-inline,
|
||||
.hidden-xs-inline-block {
|
||||
display: none;
|
||||
}
|
||||
.ui-autocomplete {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.ui-autocomplete a {
|
||||
transition: none;
|
||||
}
|
||||
.ui-autocomplete .ui-menu-item a:hover,
|
||||
.ui-autocomplete .ui-menu-item a:focus,
|
||||
.ui-autocomplete .ui-menu-item a:active {
|
||||
color: inherit;
|
||||
}
|
||||
.ui-widget-content {
|
||||
border-radius: 0px 0px 4px 4px;
|
||||
box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.176);
|
||||
border-color: #d1d8dd;
|
||||
padding: 0px;
|
||||
}
|
||||
.ui-widget-content .ui-state-focus,
|
||||
.ui-widget-content .ui-state-hover {
|
||||
background-color: #f0f4f7 !important;
|
||||
color: #36414c !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
.ui-widget-content .ui-state-active {
|
||||
background-color: #5e64ff !important;
|
||||
color: #fff !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
padding: 7px;
|
||||
font-size: 12px;
|
||||
}
|
||||
/* z-index hack */
|
||||
.ui-datepicker {
|
||||
z-index: 9999999 !important;
|
||||
}
|
||||
.ui-autocomplete {
|
||||
z-index: 9999999 !important;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.hidden-xs-inline {
|
||||
display: inline;
|
||||
}
|
||||
.hidden-xs-inline-block {
|
||||
display: inline-block;
|
||||
}
|
||||
.listview-main-section {
|
||||
border-right: 1px solid #d1d8dd;
|
||||
}
|
||||
}
|
||||
.panel-bg {
|
||||
background-color: #f7fafc;
|
||||
}
|
||||
.modal-backdrop {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.form-group {
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
.bold,
|
||||
.strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
.print-preview {
|
||||
padding: 0px;
|
||||
max-width: 8.3in;
|
||||
margin: auto;
|
||||
min-height: 11.69in;
|
||||
}
|
||||
.open-notification {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
left: 2px;
|
||||
display: inline-block;
|
||||
background: #ff5858;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
padding: 0 8px;
|
||||
color: #fff;
|
||||
border-radius: 10px;
|
||||
}
|
||||
/* on small screens, show only icons on top */
|
||||
@media (max-width: 767px) {
|
||||
.module-view-layout .nav-stacked > li {
|
||||
float: left;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.nav-stacked > li + li {
|
||||
margin-top: 0px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
#freeze {
|
||||
z-index: 1020;
|
||||
bottom: 0;
|
||||
}
|
||||
kbd {
|
||||
color: inherit;
|
||||
background-color: #f0f4f7;
|
||||
}
|
||||
.msg-box {
|
||||
padding: 30px 15px;
|
||||
text-align: center;
|
||||
color: #8d99a6;
|
||||
}
|
||||
.no-border {
|
||||
border: none !important;
|
||||
}
|
||||
.message-row {
|
||||
padding: 10px 15px;
|
||||
}
|
||||
.message-row .indicator {
|
||||
margin-left: -10px;
|
||||
margin-right: -20px;
|
||||
}
|
||||
.message-box .indicator {
|
||||
margin-right: 15px;
|
||||
margin-top: 7px;
|
||||
}
|
||||
.page-only-label {
|
||||
margin-top: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
.padding {
|
||||
padding: 15px;
|
||||
}
|
||||
.set-filters .btn-xs {
|
||||
padding: 0px 10px 2px;
|
||||
}
|
||||
.btn [class^="icon-"],
|
||||
.nav [class^="icon-"],
|
||||
.btn [class*=" icon-"],
|
||||
.nav [class*=" icon-"] {
|
||||
display: inline-block;
|
||||
}
|
||||
.dropdown-menu > li > a {
|
||||
padding: 14px;
|
||||
}
|
||||
.dropdown-menu {
|
||||
min-width: 200px;
|
||||
padding: 0px;
|
||||
font-size: 12px;
|
||||
border-radius: 0px 0px 4px 4px;
|
||||
}
|
||||
.dropdown-menu .divider {
|
||||
margin: 0px;
|
||||
}
|
||||
|
|
@ -1,146 +0,0 @@
|
|||
#page-desktop {
|
||||
min-width: 100%;
|
||||
padding-top: 40px;
|
||||
border: 0px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
.case-wrapper {
|
||||
position: relative;
|
||||
margin: 0px;
|
||||
float: left;
|
||||
width: 138px;
|
||||
height: 120px;
|
||||
}
|
||||
.case-label {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.4px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin-top: -10px;
|
||||
transition: 0.2s;
|
||||
-webkit-transition: 0.2s;
|
||||
text-shadow: 1px 1px 1px #000000, 0px 1px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.app-icon {
|
||||
/* border-radius: 5px;*/
|
||||
overflow: hidden;
|
||||
padding: 20px;
|
||||
display: inline-block;
|
||||
margin: auto;
|
||||
margin-bottom: 7px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.app-icon i {
|
||||
font-size: 32px;
|
||||
min-width: 32px;
|
||||
color: #fafbfc;
|
||||
display: inline-block;
|
||||
transition: 0.2s;
|
||||
-webkit-transition: 0.2s;
|
||||
}
|
||||
.app-icon svg,
|
||||
.app-icon img {
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
margin-top: -3px;
|
||||
}
|
||||
.app-icon path {
|
||||
fill: #fafbfc;
|
||||
transition: 0.2s;
|
||||
-webkit-transition: 0.2s;
|
||||
}
|
||||
.circle {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: -10px;
|
||||
color: #fff;
|
||||
background-color: #ff5858;
|
||||
padding: 6px;
|
||||
border-radius: 50%;
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
min-width: 25px;
|
||||
text-align: center;
|
||||
text-shadow: none;
|
||||
}
|
||||
.app-icon:hover path {
|
||||
fill: #ffffff;
|
||||
}
|
||||
.app-icon:hover i,
|
||||
.app-icon:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
.app-icon-small {
|
||||
padding: 12px;
|
||||
}
|
||||
.app-icon-img.app-icon-small {
|
||||
padding: 0px;
|
||||
height: 54px;
|
||||
width: 54px;
|
||||
}
|
||||
.app-icon-img {
|
||||
padding: 0px;
|
||||
height: 70px;
|
||||
width: 70px;
|
||||
}
|
||||
.app-icon-img img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
#icon-grid {
|
||||
padding-top: 15px;
|
||||
padding-bottom: 30px;
|
||||
max-width: 970px;
|
||||
margin: auto;
|
||||
}
|
||||
@media (min-width: 768px) and (max-width: 991px) {
|
||||
#icon-grid {
|
||||
max-width: 690px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
#icon-grid {
|
||||
max-width: 320px;
|
||||
}
|
||||
.case-wrapper {
|
||||
width: 80px;
|
||||
height: 90px;
|
||||
}
|
||||
.case-label {
|
||||
font-size: 80%;
|
||||
font-weight: normal;
|
||||
}
|
||||
.app-icon {
|
||||
padding: 10px;
|
||||
}
|
||||
.app-icon i {
|
||||
font-size: 32px;
|
||||
min-width: 32px;
|
||||
}
|
||||
.app-icon svg,
|
||||
.app-icon img {
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
}
|
||||
.circle {
|
||||
right: 0px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 320px) {
|
||||
#icon-grid {
|
||||
max-width: 280px;
|
||||
}
|
||||
.case-wrapper {
|
||||
width: 70px;
|
||||
height: 90px;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
.navbar .dropdown-toggle {
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
.navbar-fixed-top {
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
}
|
||||
.navbar a {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.navbar .breadcrumb-divider {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.navbar .breadcrumb-divider i {
|
||||
color: #9d9d9d;
|
||||
}
|
||||
.navbar-icon-home {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.navbar-icon-home:hover,
|
||||
.navbar-icon-home:focus,
|
||||
.navbar-icon-home:active,
|
||||
.navbar-icon-home-hover {
|
||||
opacity: 1;
|
||||
Filter: alpha(opacity=100);
|
||||
/* For IE8 and earlier */
|
||||
}
|
||||
.navbar-user-image {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 3px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.navbar-new-comments {
|
||||
display: inline-block;
|
||||
min-width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 4px;
|
||||
background-color: #ff5858;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
padding: 1px 5px;
|
||||
}
|
||||
#navbar-search {
|
||||
width: 300px;
|
||||
}
|
||||
.navbar .navbar-search-icon {
|
||||
color: #6c7680;
|
||||
font-size: inherit;
|
||||
position: relative;
|
||||
right: 24px;
|
||||
top: 1px;
|
||||
}
|
||||
.navbar .badge {
|
||||
font-weight: normal;
|
||||
}
|
||||
#navbar-notification > li > a:hover .badge,
|
||||
#navbar-notification > li > a:focus .badge,
|
||||
#navbar-notification > li > a:active .badge {
|
||||
background-color: #D8DFE5;
|
||||
}
|
||||
#navbar-search-results {
|
||||
left: auto;
|
||||
right: inherit;
|
||||
margin-top: -1px;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
.page-container {
|
||||
margin-top: 40px;
|
||||
}
|
||||
.page-head {
|
||||
border-bottom: 1px solid #d1d8dd;
|
||||
height: 70px;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
background-color: #fff;
|
||||
z-index: 2;
|
||||
}
|
||||
.sub-heading {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.page-body {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.page-title h6 {
|
||||
margin-top: -8px;
|
||||
}
|
||||
.page-title .title-text {
|
||||
margin-right: 7px;
|
||||
}
|
||||
.page-actions {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.page-icon-group a {
|
||||
margin-right: 7px;
|
||||
}
|
||||
.layout-main {
|
||||
margin-top: 70px;
|
||||
}
|
||||
/* show menu aligned to the right border of the dropdown */
|
||||
.page-actions .dropdown-menu {
|
||||
right: 0px;
|
||||
left: auto;
|
||||
}
|
||||
.layout-main-section {
|
||||
border: 1px solid #d1d8dd;
|
||||
border-top: 0px;
|
||||
}
|
||||
.form-intro-area {
|
||||
padding: 15px;
|
||||
}
|
||||
.page-form {
|
||||
margin: 0px;
|
||||
padding-top: 15px;
|
||||
border-bottom: 1px solid #d1d8dd;
|
||||
}
|
||||
.page-form .form-group {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.page-form .checkbox {
|
||||
margin-top: 2px;
|
||||
}
|
||||
.page-form .checkbox input {
|
||||
margin-top: -3px;
|
||||
}
|
||||
.layout-main-section-wrapper {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
|
@ -47,6 +47,12 @@ frappe.route = function() {
|
|||
if(frappe.route_titles[window.location.hash]) {
|
||||
document.title = frappe.route_titles[window.location.hash];
|
||||
}
|
||||
|
||||
if(frappe._cur_route==="") {
|
||||
$(".navbar").addClass("navbar-inverse");
|
||||
} else {
|
||||
$(".navbar").removeClass("navbar-inverse");
|
||||
}
|
||||
}
|
||||
|
||||
frappe.get_route = function(route) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand toggle-sidebar visible-xs">
|
||||
|
|
|
|||
|
|
@ -19,3 +19,10 @@
|
|||
|
||||
@navbar-default-color: #6C7680;
|
||||
@navbar-inverse-color: #9D9D9D;
|
||||
@breadcrumb-divider-color: #C0C9D2;
|
||||
|
||||
@label-primary-bg: #D9F6FF;
|
||||
@label-success-bg: #E4FFC1;
|
||||
@label-info-bg: #E8DDFF;
|
||||
@label-warning-bg: #FFE6BF;
|
||||
@label-danger-bg: #FFDCDC;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{% if(doc) { %}
|
||||
<div class="row" style="background-color: #{%= {
|
||||
"Fold": "ffc",
|
||||
"Section Break": "ddd",
|
||||
"Column Break": "eee"
|
||||
"Fold": "b8c2cc",
|
||||
"Section Break": "D9F6FF",
|
||||
"Column Break": "f5f7fa"
|
||||
}[doc.fieldtype] || "fff" %}; padding: 10px; margin: -10px -15px;">
|
||||
<div class="col-sm-4">
|
||||
<p>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue