Merge pull request #1140 from rmehta/portal-fixes

[fixes] cleanup of web from, portal, login page
This commit is contained in:
Rushabh Mehta 2015-06-02 10:32:46 +05:30
commit 9e8ad39879
33 changed files with 1684 additions and 241 deletions

View file

@ -0,0 +1,6 @@
#### Updates to Web Forms
- Web Forms list now is a standard portal list and includes paging and other extensions
- Section, Column Breaks in Web Forms
- Consistent User Interface
- Cleanup of Portal Pages

View file

@ -483,7 +483,7 @@ def export_json(context, doctype, name, path):
try:
frappe.init(site=site)
frappe.connect()
data_import_tool.export_json(doctype, name, path)
data_import_tool.export_json(doctype, path, name=name)
finally:
frappe.destroy()

View file

@ -46,9 +46,7 @@ cur_frm.cscript.refresh = function(doc) {
window.location.reload();
}
cur_frm.toggle_display('change_password', !doc.__islocal);
cur_frm.toggle_display(['sb1', 'sb3'], false);
cur_frm.toggle_display(['sb1', 'sb3', 'modules_access'], false);
if(!doc.__islocal){
cur_frm.add_custom_button(__("Set User Permissions"), function() {
@ -59,7 +57,7 @@ cur_frm.cscript.refresh = function(doc) {
}, null, "btn-default")
if(has_common(user_roles, ["Administrator", "System Manager"])) {
cur_frm.toggle_display(['sb1', 'sb3'], true);
cur_frm.toggle_display(['sb1', 'sb3', 'modules_access'], true);
}
cur_frm.cscript.enabled(doc);
@ -77,7 +75,7 @@ cur_frm.cscript.refresh = function(doc) {
cur_frm.cscript.enabled = function(doc) {
if(!doc.__islocal && has_common(user_roles, ["Administrator", "System Manager"])) {
cur_frm.toggle_display(['sb1', 'sb3'], doc.enabled);
cur_frm.toggle_display(['sb1', 'sb3', 'modules_access'], doc.enabled);
cur_frm.toggle_enable('*', doc.enabled);
cur_frm.set_df_property('enabled', 'read_only', 0);
}

View file

@ -115,6 +115,7 @@
"permlevel": 0
},
{
"depends_on": "eval:!doc.__islocal",
"fieldname": "change_password",
"fieldtype": "Section Break",
"label": "",
@ -127,6 +128,14 @@
"no_copy": 1,
"permlevel": 0
},
{
"depends_on": "",
"fieldname": "send_password_update_notification",
"fieldtype": "Check",
"label": "Send Password Update Notification",
"permlevel": 0,
"precision": ""
},
{
"fieldname": "reset_password_key",
"fieldtype": "Data",
@ -473,7 +482,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 5,
"modified": "2015-04-24 14:37:26.430454",
"modified": "2015-06-01 01:00:32.901851",
"modified_by": "Administrator",
"module": "Core",
"name": "User",

View file

@ -76,8 +76,9 @@ class User(Document):
if new_password and not self.in_insert:
_update_password(self.name, new_password)
self.password_update_mail(new_password)
frappe.msgprint(_("New password emailed"))
if self.send_password_update_notification:
self.password_update_mail(new_password)
frappe.msgprint(_("New password emailed"))
def on_update(self):
# clear new password
@ -324,12 +325,16 @@ def get_perm_info(arg=None):
and docstatus<2 order by parent, permlevel""", (frappe.form_dict['role'],), as_dict=1)
@frappe.whitelist(allow_guest=True)
def update_password(new_password, key=None):
def update_password(new_password, key=None, old_password=None):
# verify old password
if key:
user = frappe.db.get_value("User", {"reset_password_key":key})
if not user:
return _("Cannot Update: Incorrect / Expired Link.")
elif old_password:
# verify old password
frappe.local.login_manager.check_password(frappe.session.user, old_password)
user = frappe.session.user
_update_password(user, new_password)

View file

@ -3,7 +3,7 @@
from __future__ import unicode_literals
import frappe, json, os
import frappe, os
from frappe import _
import frappe.modules.import_file
@ -43,7 +43,7 @@ def export_csv(doctype, path):
get_template(doctype=doctype, all_doctypes="Yes", with_data="Yes")
csvfile.write(frappe.response.result.encode("utf-8"))
def export_json(doctype, path, filters=None):
def export_json(doctype, path, filters=None, name=None):
def post_process(out):
del_keys = ('parent', 'parentfield', 'parenttype', 'modified_by', 'creation', 'owner', 'idx')
for doc in out:
@ -57,9 +57,10 @@ def export_json(doctype, path, filters=None):
if key in child:
del child[key]
from frappe.utils.response import json_handler
out = []
if frappe.db.get_value("DocType", doctype, "issingle"):
if name:
out.append(frappe.get_doc(doctype, name).as_dict())
elif frappe.db.get_value("DocType", doctype, "issingle"):
out.append(frappe.get_doc(doctype).as_dict())
else:
for doc in frappe.get_all(doctype, fields=["name"], filters=filters, limit_page_length=0, order_by="creation asc"):
@ -85,7 +86,6 @@ def import_doc(path, overwrite=False, ignore_links=False, ignore_insert=False, i
else:
files = [path]
for f in files:
if f.endswith(".json"):
frappe.flags.mute_emails = True

View file

@ -511,6 +511,10 @@ class Database:
tabSingles where doctype=%s and field=%s""", (doctype, fieldname))
return val[0][0] if val else None
def get_singles_value(self, *args, **kwargs):
"""Alias for get_single_value"""
return self.get_single_value(*args, **kwargs)
def _get_values_from_table(self, fields, filters, doctype, as_dict, debug, order_by=None, update=None):
fl = []
if isinstance(fields, (list, tuple)):

View file

@ -11,6 +11,10 @@ from frappe.utils.user import get_enabled_system_users
weekdays = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]
class Event(Document):
def get_route(self):
"""for test-case"""
return "/Event/" + self.name
def validate(self):
if self.starts_on and self.ends_on and self.starts_on > self.ends_on:
frappe.msgprint(frappe._("Event end must be after start"), raise_exception=True)

View file

@ -31,8 +31,7 @@ def logout():
def web_logout():
frappe.local.login_manager.logout()
frappe.db.commit()
frappe.respond_as_web_page("Logged Out", """<p>You have been logged out.</p>
<p><a href='index'>Back to Home</a></p>""")
frappe.respond_as_web_page("Logged Out", """<p><a href="/index" class="text-muted">Back to Home</a></p>""")
@frappe.whitelist(allow_guest=True)
def run_custom_method(doctype, name, custom_method):

View file

@ -114,6 +114,9 @@ class Meta(Document):
list_fields.append(self.title_field)
return list_fields
def get_title_field(self):
return self.title_field or "name"
def process(self):
# don't process for special doctypes
# prevent's circular dependency

View file

@ -0,0 +1,185 @@
.shepherd-element, .shepherd-element:after, .shepherd-element:before, .shepherd-element *, .shepherd-element *:after, .shepherd-element *:before {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box; }
.shepherd-element {
position: absolute;
display: none; }
.shepherd-element.shepherd-open {
display: block; }
.shepherd-element.shepherd-theme-arrows-plain-buttons {
max-width: 100%;
max-height: 100%; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
position: relative;
font-family: inherit;
background: #fff;
color: #444;
padding: 1em;
font-size: 1.1em;
line-height: 1.5em;
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
-webkit-transform: translateZ(0);
transform: translateZ(0);
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2)); }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content:before {
content: "";
display: block;
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-width: 16px;
border-style: solid; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content:before {
top: 100%;
left: 50%;
margin-left: -16px;
border-top-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content:before {
bottom: 100%;
left: 50%;
margin-left: -16px;
border-bottom-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content:before {
left: 100%;
top: 50%;
margin-top: -16px;
border-left-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content:before {
right: 100%;
top: 50%;
margin-top: -16px;
border-right-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
left: 16px;
border-bottom-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
right: 16px;
border-bottom-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
left: 16px;
border-top-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
right: 16px;
border-top-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
top: 16px;
left: 100%;
border-left-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
top: 16px;
right: 100%;
border-right-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
bottom: 16px;
left: 100%;
border-left-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
bottom: 16px;
right: 100%;
border-right-color: #fff; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-center.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before {
border-bottom-color: #eee; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header {
background: #eee;
padding: 1em; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link {
padding: 0;
margin-bottom: 0; }
.shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-cancel-link .shepherd-content header h3 {
float: left; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content {
padding: 0; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content header {
*zoom: 1;
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px;
border-radius: 5px 5px 0 0; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content header:after {
content: "";
display: table;
clear: both; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content header h3 {
margin: 0;
line-height: 1;
font-weight: normal; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content header a.shepherd-cancel-link {
float: right;
text-decoration: none;
font-size: 1.25em;
line-height: 0.8em;
font-weight: normal;
color: rgba(0, 0, 0, 0.5);
opacity: 0.25;
position: relative;
top: 0.1em;
padding: 0.8em;
margin-bottom: -0.8em; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content header a.shepherd-cancel-link:hover {
opacity: 1; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content .shepherd-text {
padding: 1em; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content .shepherd-text p {
margin: 0 0 0.5em 0;
line-height: 1.3em; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content .shepherd-text p:last-child {
margin-bottom: 0; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer {
padding: 0 1em 1em; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons {
text-align: right;
list-style: none;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons li {
display: inline;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons li .shepherd-button {
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
*zoom: 1;
*display: inline;
cursor: pointer;
margin: 0 0.5em 0 0;
text-decoration: none; }
.shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons li:last-child .shepherd-button {
margin-right: 0; }

View file

@ -0,0 +1,201 @@
.shepherd-element, .shepherd-element:after, .shepherd-element:before, .shepherd-element *, .shepherd-element *:after, .shepherd-element *:before {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box; }
.shepherd-element {
position: absolute;
display: none; }
.shepherd-element.shepherd-open {
display: block; }
.shepherd-element.shepherd-theme-arrows {
max-width: 100%;
max-height: 100%; }
.shepherd-element.shepherd-theme-arrows .shepherd-content {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
position: relative;
font-family: inherit;
background: #fff;
/*color: #444;*/
padding: 1em;
/*font-size: 1.1em;*/
/*line-height: 1.5em;*/
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
-webkit-transform: translateZ(0);
transform: translateZ(0);
-webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2)); }
.shepherd-element.shepherd-theme-arrows .shepherd-content:before {
content: "";
display: block;
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-width: 16px;
border-style: solid; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content:before {
top: 100%;
left: 50%;
margin-left: -16px;
border-top-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content:before {
bottom: 100%;
left: 50%;
margin-left: -16px;
border-bottom-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content:before {
left: 100%;
top: 50%;
margin-top: -16px;
border-left-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content:before {
right: 100%;
top: 50%;
margin-top: -16px;
border-right-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
left: 16px;
border-bottom-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
right: 16px;
border-bottom-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
left: 16px;
border-top-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
right: 16px;
border-top-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
top: 16px;
left: 100%;
border-left-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
top: 16px;
right: 100%;
border-right-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
bottom: 16px;
left: 100%;
border-left-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
bottom: 16px;
right: 100%;
border-right-color: #fff; }
.shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-center.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-arrows.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before {
border-bottom-color: #eee; }
.shepherd-element.shepherd-theme-arrows.shepherd-has-title .shepherd-content header {
background: #eee;
padding: 1em; }
.shepherd-element.shepherd-theme-arrows.shepherd-has-title .shepherd-content header a.shepherd-cancel-link {
padding: 0;
margin-bottom: 0; }
.shepherd-element.shepherd-theme-arrows.shepherd-has-cancel-link .shepherd-content header h3 {
float: left; }
.shepherd-element.shepherd-theme-arrows .shepherd-content {
padding: 0; }
.shepherd-element.shepherd-theme-arrows .shepherd-content * {
font-size: inherit; }
.shepherd-element.shepherd-theme-arrows .shepherd-content header {
*zoom: 1;
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px;
border-radius: 5px 5px 0 0; }
.shepherd-element.shepherd-theme-arrows .shepherd-content header:after {
content: "";
display: table;
clear: both; }
.shepherd-element.shepherd-theme-arrows .shepherd-content header h3 {
margin: 0;
line-height: 1;
font-weight: normal; }
.shepherd-element.shepherd-theme-arrows .shepherd-content header a.shepherd-cancel-link {
float: right;
text-decoration: none;
font-size: 1.25em;
line-height: 0.8em;
font-weight: normal;
color: rgba(0, 0, 0, 0.5);
opacity: 0.25;
position: relative;
top: 0.1em;
padding: 0.8em;
margin-bottom: -0.8em; }
.shepherd-element.shepherd-theme-arrows .shepherd-content header a.shepherd-cancel-link:hover {
opacity: 1; }
.shepherd-element.shepherd-theme-arrows .shepherd-content .shepherd-text {
padding: 1em; }
.shepherd-element.shepherd-theme-arrows .shepherd-content .shepherd-text p {
margin: 0 0 0.5em 0;
line-height: 1.3em; }
.shepherd-element.shepherd-theme-arrows .shepherd-content .shepherd-text p:last-child {
margin-bottom: 0; }
.shepherd-element.shepherd-theme-arrows .shepherd-content footer {
padding: 0 1em 1em; }
.shepherd-element.shepherd-theme-arrows .shepherd-content footer .shepherd-buttons {
text-align: right;
list-style: none;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-arrows .shepherd-content footer .shepherd-buttons li {
display: inline;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-arrows .shepherd-content footer .shepherd-buttons li .shepherd-button {
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
*zoom: 1;
*display: inline;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
cursor: pointer;
border: 0;
margin: 0 0.5em 0 0;
font-family: inherit;
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 0.8em;
line-height: 1em;
padding: 0.75em 2em;
background: #3288e6;
color: #fff; }
.shepherd-element.shepherd-theme-arrows .shepherd-content footer .shepherd-buttons li .shepherd-button.shepherd-button-secondary {
background: #eee;
color: #888; }
.shepherd-element.shepherd-theme-arrows .shepherd-content footer .shepherd-buttons li:last-child .shepherd-button {
margin-right: 0; }

View file

@ -0,0 +1,223 @@
.shepherd-element, .shepherd-element:after, .shepherd-element:before, .shepherd-element *, .shepherd-element *:after, .shepherd-element *:before {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box; }
.shepherd-element {
position: absolute;
display: none; }
.shepherd-element.shepherd-open {
display: block; }
.shepherd-element.shepherd-theme-dark {
max-width: 100%;
max-height: 100%; }
.shepherd-element.shepherd-theme-dark .shepherd-content {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
position: relative;
font-family: inherit;
background: #232323;
color: #eee;
padding: 1em;
font-size: 1.1em;
line-height: 1.5em; }
.shepherd-element.shepherd-theme-dark .shepherd-content:before {
content: "";
display: block;
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-width: 16px;
border-style: solid; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content:before {
top: 100%;
left: 50%;
margin-left: -16px;
border-top-color: #232323; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content:before {
bottom: 100%;
left: 50%;
margin-left: -16px;
border-bottom-color: #232323; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content:before {
left: 100%;
top: 50%;
margin-top: -16px;
border-left-color: #232323; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content:before {
right: 100%;
top: 50%;
margin-top: -16px;
border-right-color: #232323; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
left: 16px;
border-bottom-color: #232323; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
right: 16px;
border-bottom-color: #232323; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
left: 16px;
border-top-color: #232323; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
right: 16px;
border-top-color: #232323; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
top: 16px;
left: 100%;
border-left-color: #232323; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
top: 16px;
right: 100%;
border-right-color: #232323; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
bottom: 16px;
left: 100%;
border-left-color: #232323; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
bottom: 16px;
right: 100%;
border-right-color: #232323; }
.shepherd-element.shepherd-theme-dark {
z-index: 9999;
max-width: 24em;
font-size: 1em; }
.shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-center.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-dark.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before {
border-bottom-color: #303030; }
.shepherd-element.shepherd-theme-dark.shepherd-has-title .shepherd-content header {
background: #303030;
padding: 1em; }
.shepherd-element.shepherd-theme-dark.shepherd-has-title .shepherd-content header a.shepherd-cancel-link {
padding: 0;
margin-bottom: 0; }
.shepherd-element.shepherd-theme-dark.shepherd-has-cancel-link .shepherd-content header h3 {
float: left; }
.shepherd-element.shepherd-theme-dark .shepherd-content {
-moz-box-shadow: 0 0 1em rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 0 1em rgba(0, 0, 0, 0.2);
box-shadow: 0 0 1em rgba(0, 0, 0, 0.2);
padding: 0; }
.shepherd-element.shepherd-theme-dark .shepherd-content * {
font-size: inherit; }
.shepherd-element.shepherd-theme-dark .shepherd-content header {
*zoom: 1;
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px;
border-radius: 5px 5px 0 0; }
.shepherd-element.shepherd-theme-dark .shepherd-content header:after {
content: "";
display: table;
clear: both; }
.shepherd-element.shepherd-theme-dark .shepherd-content header h3 {
margin: 0;
line-height: 1;
font-weight: normal; }
.shepherd-element.shepherd-theme-dark .shepherd-content header a.shepherd-cancel-link {
float: right;
text-decoration: none;
font-size: 1.25em;
line-height: 0.8em;
font-weight: normal;
color: rgba(0, 0, 0, 0.5);
opacity: 0.25;
position: relative;
top: 0.1em;
padding: 0.8em;
margin-bottom: -0.8em; }
.shepherd-element.shepherd-theme-dark .shepherd-content header a.shepherd-cancel-link:hover {
opacity: 1; }
.shepherd-element.shepherd-theme-dark .shepherd-content .shepherd-text {
padding: 1em; }
.shepherd-element.shepherd-theme-dark .shepherd-content .shepherd-text p {
margin: 0 0 0.5em 0;
line-height: 1.3em; }
.shepherd-element.shepherd-theme-dark .shepherd-content .shepherd-text p:last-child {
margin-bottom: 0; }
.shepherd-element.shepherd-theme-dark .shepherd-content footer {
padding: 0 1em 1em; }
.shepherd-element.shepherd-theme-dark .shepherd-content footer .shepherd-buttons {
text-align: right;
list-style: none;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-dark .shepherd-content footer .shepherd-buttons li {
display: inline;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-dark .shepherd-content footer .shepherd-buttons li .shepherd-button {
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
*zoom: 1;
*display: inline;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
cursor: pointer;
border: 0;
margin: 0 0.5em 0 0;
font-family: inherit;
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 0.8em;
line-height: 1em;
padding: 0.75em 2em;
background: #3288e6;
color: #fff; }
.shepherd-element.shepherd-theme-dark .shepherd-content footer .shepherd-buttons li .shepherd-button.shepherd-button-secondary {
background: #eee;
color: #888; }
.shepherd-element.shepherd-theme-dark .shepherd-content footer .shepherd-buttons li:last-child .shepherd-button {
margin-right: 0; }
.shepherd-start-tour-button.shepherd-theme-dark {
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
*zoom: 1;
*display: inline;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
cursor: pointer;
border: 0;
margin: 0 0.5em 0 0;
font-family: inherit;
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 0.8em;
line-height: 1em;
padding: 0.75em 2em;
background: #3288e6;
color: #fff; }

View file

@ -0,0 +1,223 @@
.shepherd-element, .shepherd-element:after, .shepherd-element:before, .shepherd-element *, .shepherd-element *:after, .shepherd-element *:before {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box; }
.shepherd-element {
position: absolute;
display: none; }
.shepherd-element.shepherd-open {
display: block; }
.shepherd-element.shepherd-theme-default {
max-width: 100%;
max-height: 100%; }
.shepherd-element.shepherd-theme-default .shepherd-content {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
position: relative;
font-family: inherit;
background: #f6f6f6;
color: #444;
padding: 1em;
font-size: 1.1em;
line-height: 1.5em; }
.shepherd-element.shepherd-theme-default .shepherd-content:before {
content: "";
display: block;
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-width: 16px;
border-style: solid; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content:before {
top: 100%;
left: 50%;
margin-left: -16px;
border-top-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content:before {
bottom: 100%;
left: 50%;
margin-left: -16px;
border-bottom-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content:before {
left: 100%;
top: 50%;
margin-top: -16px;
border-left-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content:before {
right: 100%;
top: 50%;
margin-top: -16px;
border-right-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
left: 16px;
border-bottom-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
right: 16px;
border-bottom-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
left: 16px;
border-top-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
right: 16px;
border-top-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
top: 16px;
left: 100%;
border-left-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
top: 16px;
right: 100%;
border-right-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
bottom: 16px;
left: 100%;
border-left-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
bottom: 16px;
right: 100%;
border-right-color: #f6f6f6; }
.shepherd-element.shepherd-theme-default {
z-index: 9999;
max-width: 24em;
font-size: 1em; }
.shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-center.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-default.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before {
border-bottom-color: #e6e6e6; }
.shepherd-element.shepherd-theme-default.shepherd-has-title .shepherd-content header {
background: #e6e6e6;
padding: 1em; }
.shepherd-element.shepherd-theme-default.shepherd-has-title .shepherd-content header a.shepherd-cancel-link {
padding: 0;
margin-bottom: 0; }
.shepherd-element.shepherd-theme-default.shepherd-has-cancel-link .shepherd-content header h3 {
float: left; }
.shepherd-element.shepherd-theme-default .shepherd-content {
-moz-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.17);
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.17);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.17);
padding: 0; }
.shepherd-element.shepherd-theme-default .shepherd-content * {
font-size: inherit; }
.shepherd-element.shepherd-theme-default .shepherd-content header {
*zoom: 1;
-moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px;
border-radius: 5px 5px 0 0; }
.shepherd-element.shepherd-theme-default .shepherd-content header:after {
content: "";
display: table;
clear: both; }
.shepherd-element.shepherd-theme-default .shepherd-content header h3 {
margin: 0;
line-height: 1;
font-weight: normal; }
.shepherd-element.shepherd-theme-default .shepherd-content header a.shepherd-cancel-link {
float: right;
text-decoration: none;
font-size: 1.25em;
line-height: 0.8em;
font-weight: normal;
color: rgba(0, 0, 0, 0.5);
opacity: 0.25;
position: relative;
top: 0.1em;
padding: 0.8em;
margin-bottom: -0.8em; }
.shepherd-element.shepherd-theme-default .shepherd-content header a.shepherd-cancel-link:hover {
opacity: 1; }
.shepherd-element.shepherd-theme-default .shepherd-content .shepherd-text {
padding: 1em; }
.shepherd-element.shepherd-theme-default .shepherd-content .shepherd-text p {
margin: 0 0 0.5em 0;
line-height: 1.3em; }
.shepherd-element.shepherd-theme-default .shepherd-content .shepherd-text p:last-child {
margin-bottom: 0; }
.shepherd-element.shepherd-theme-default .shepherd-content footer {
padding: 0 1em 1em; }
.shepherd-element.shepherd-theme-default .shepherd-content footer .shepherd-buttons {
text-align: right;
list-style: none;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-default .shepherd-content footer .shepherd-buttons li {
display: inline;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-default .shepherd-content footer .shepherd-buttons li .shepherd-button {
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
*zoom: 1;
*display: inline;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
cursor: pointer;
border: 0;
margin: 0 0.5em 0 0;
font-family: inherit;
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 0.8em;
line-height: 1em;
padding: 0.75em 2em;
background: #3288e6;
color: #fff; }
.shepherd-element.shepherd-theme-default .shepherd-content footer .shepherd-buttons li .shepherd-button.shepherd-button-secondary {
background: #eee;
color: #888; }
.shepherd-element.shepherd-theme-default .shepherd-content footer .shepherd-buttons li:last-child .shepherd-button {
margin-right: 0; }
.shepherd-start-tour-button.shepherd-theme-default {
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
*zoom: 1;
*display: inline;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
cursor: pointer;
border: 0;
margin: 0 0.5em 0 0;
font-family: inherit;
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 0.8em;
line-height: 1em;
padding: 0.75em 2em;
background: #3288e6;
color: #fff; }

View file

@ -0,0 +1,229 @@
.shepherd-element, .shepherd-element:after, .shepherd-element:before, .shepherd-element *, .shepherd-element *:after, .shepherd-element *:before {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box; }
.shepherd-element {
position: absolute;
display: none; }
.shepherd-element.shepherd-open {
display: block; }
.shepherd-element.shepherd-theme-square-dark {
max-width: 100%;
max-height: 100%; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
position: relative;
font-family: inherit;
background: #232323;
color: #eee;
padding: 1em;
font-size: 1.1em;
line-height: 1.5em; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content:before {
content: "";
display: block;
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-width: 16px;
border-style: solid; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content:before {
top: 100%;
left: 50%;
margin-left: -16px;
border-top-color: #232323; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content:before {
bottom: 100%;
left: 50%;
margin-left: -16px;
border-bottom-color: #232323; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content:before {
left: 100%;
top: 50%;
margin-top: -16px;
border-left-color: #232323; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content:before {
right: 100%;
top: 50%;
margin-top: -16px;
border-right-color: #232323; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
left: 16px;
border-bottom-color: #232323; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
right: 16px;
border-bottom-color: #232323; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
left: 16px;
border-top-color: #232323; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
right: 16px;
border-top-color: #232323; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
top: 16px;
left: 100%;
border-left-color: #232323; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
top: 16px;
right: 100%;
border-right-color: #232323; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
bottom: 16px;
left: 100%;
border-left-color: #232323; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
bottom: 16px;
right: 100%;
border-right-color: #232323; }
.shepherd-element.shepherd-theme-square-dark {
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
z-index: 9999;
max-width: 24em;
font-size: 1em; }
.shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-center.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-square-dark.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before {
border-bottom-color: #303030; }
.shepherd-element.shepherd-theme-square-dark.shepherd-has-title .shepherd-content header {
background: #303030;
padding: 1em; }
.shepherd-element.shepherd-theme-square-dark.shepherd-has-title .shepherd-content header a.shepherd-cancel-link {
padding: 0;
margin-bottom: 0; }
.shepherd-element.shepherd-theme-square-dark.shepherd-has-cancel-link .shepherd-content header h3 {
float: left; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content {
-moz-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.17);
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.17);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.17);
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
padding: 0; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content * {
font-size: inherit; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content header {
*zoom: 1;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content header:after {
content: "";
display: table;
clear: both; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content header h3 {
margin: 0;
line-height: 1;
font-weight: normal; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content header a.shepherd-cancel-link {
float: right;
text-decoration: none;
font-size: 1.25em;
line-height: 0.8em;
font-weight: normal;
color: rgba(0, 0, 0, 0.5);
opacity: 0.25;
position: relative;
top: 0.1em;
padding: 0.8em;
margin-bottom: -0.8em; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content header a.shepherd-cancel-link:hover {
opacity: 1; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content .shepherd-text {
padding: 1em; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content .shepherd-text p {
margin: 0 0 0.5em 0;
line-height: 1.3em; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content .shepherd-text p:last-child {
margin-bottom: 0; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content footer {
padding: 0 1em 1em; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content footer .shepherd-buttons {
text-align: right;
list-style: none;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content footer .shepherd-buttons li {
display: inline;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content footer .shepherd-buttons li .shepherd-button {
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
*zoom: 1;
*display: inline;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
cursor: pointer;
border: 0;
margin: 0 0.5em 0 0;
font-family: inherit;
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 0.8em;
line-height: 1em;
padding: 0.75em 2em;
background: #3288e6;
color: #fff; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content footer .shepherd-buttons li .shepherd-button.shepherd-button-secondary {
background: #eee;
color: #888; }
.shepherd-element.shepherd-theme-square-dark .shepherd-content footer .shepherd-buttons li:last-child .shepherd-button {
margin-right: 0; }
.shepherd-start-tour-button.shepherd-theme-square-dark {
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
*zoom: 1;
*display: inline;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
cursor: pointer;
border: 0;
margin: 0 0.5em 0 0;
font-family: inherit;
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 0.8em;
line-height: 1em;
padding: 0.75em 2em;
background: #3288e6;
color: #fff; }

View file

@ -0,0 +1,229 @@
.shepherd-element, .shepherd-element:after, .shepherd-element:before, .shepherd-element *, .shepherd-element *:after, .shepherd-element *:before {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box; }
.shepherd-element {
position: absolute;
display: none; }
.shepherd-element.shepherd-open {
display: block; }
.shepherd-element.shepherd-theme-square {
max-width: 100%;
max-height: 100%; }
.shepherd-element.shepherd-theme-square .shepherd-content {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
position: relative;
font-family: inherit;
background: #f6f6f6;
color: #444;
padding: 1em;
font-size: 1.1em;
line-height: 1.5em; }
.shepherd-element.shepherd-theme-square .shepherd-content:before {
content: "";
display: block;
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-width: 16px;
border-style: solid; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content:before {
top: 100%;
left: 50%;
margin-left: -16px;
border-top-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content:before {
bottom: 100%;
left: 50%;
margin-left: -16px;
border-bottom-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content:before {
left: 100%;
top: 50%;
margin-top: -16px;
border-left-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content:before {
right: 100%;
top: 50%;
margin-top: -16px;
border-right-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
left: 16px;
border-bottom-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content {
margin-top: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content:before {
bottom: 100%;
right: 16px;
border-bottom-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
left: 16px;
border-top-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content {
margin-bottom: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content:before {
top: 100%;
right: 16px;
border-top-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
top: 16px;
left: 100%;
border-left-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
top: 16px;
right: 100%;
border-right-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
margin-right: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
bottom: 16px;
left: 100%;
border-left-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
margin-left: 16px; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
bottom: 16px;
right: 100%;
border-right-color: #f6f6f6; }
.shepherd-element.shepherd-theme-square {
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
z-index: 9999;
max-width: 24em;
font-size: 1em; }
.shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-center.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-square.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before {
border-bottom-color: #e6e6e6; }
.shepherd-element.shepherd-theme-square.shepherd-has-title .shepherd-content header {
background: #e6e6e6;
padding: 1em; }
.shepherd-element.shepherd-theme-square.shepherd-has-title .shepherd-content header a.shepherd-cancel-link {
padding: 0;
margin-bottom: 0; }
.shepherd-element.shepherd-theme-square.shepherd-has-cancel-link .shepherd-content header h3 {
float: left; }
.shepherd-element.shepherd-theme-square .shepherd-content {
-moz-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.17);
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.17);
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.17);
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
padding: 0; }
.shepherd-element.shepherd-theme-square .shepherd-content * {
font-size: inherit; }
.shepherd-element.shepherd-theme-square .shepherd-content header {
*zoom: 1;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0; }
.shepherd-element.shepherd-theme-square .shepherd-content header:after {
content: "";
display: table;
clear: both; }
.shepherd-element.shepherd-theme-square .shepherd-content header h3 {
margin: 0;
line-height: 1;
font-weight: normal; }
.shepherd-element.shepherd-theme-square .shepherd-content header a.shepherd-cancel-link {
float: right;
text-decoration: none;
font-size: 1.25em;
line-height: 0.8em;
font-weight: normal;
color: rgba(0, 0, 0, 0.5);
opacity: 0.25;
position: relative;
top: 0.1em;
padding: 0.8em;
margin-bottom: -0.8em; }
.shepherd-element.shepherd-theme-square .shepherd-content header a.shepherd-cancel-link:hover {
opacity: 1; }
.shepherd-element.shepherd-theme-square .shepherd-content .shepherd-text {
padding: 1em; }
.shepherd-element.shepherd-theme-square .shepherd-content .shepherd-text p {
margin: 0 0 0.5em 0;
line-height: 1.3em; }
.shepherd-element.shepherd-theme-square .shepherd-content .shepherd-text p:last-child {
margin-bottom: 0; }
.shepherd-element.shepherd-theme-square .shepherd-content footer {
padding: 0 1em 1em; }
.shepherd-element.shepherd-theme-square .shepherd-content footer .shepherd-buttons {
text-align: right;
list-style: none;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-square .shepherd-content footer .shepherd-buttons li {
display: inline;
padding: 0;
margin: 0; }
.shepherd-element.shepherd-theme-square .shepherd-content footer .shepherd-buttons li .shepherd-button {
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
*zoom: 1;
*display: inline;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
cursor: pointer;
border: 0;
margin: 0 0.5em 0 0;
font-family: inherit;
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 0.8em;
line-height: 1em;
padding: 0.75em 2em;
background: #3288e6;
color: #fff; }
.shepherd-element.shepherd-theme-square .shepherd-content footer .shepherd-buttons li .shepherd-button.shepherd-button-secondary {
background: #eee;
color: #888; }
.shepherd-element.shepherd-theme-square .shepherd-content footer .shepherd-buttons li:last-child .shepherd-button {
margin-right: 0; }
.shepherd-start-tour-button.shepherd-theme-square {
display: inline-block;
vertical-align: middle;
*vertical-align: auto;
*zoom: 1;
*display: inline;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
cursor: pointer;
border: 0;
margin: 0 0.5em 0 0;
font-family: inherit;
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 0.8em;
line-height: 1em;
padding: 0.75em 2em;
background: #3288e6;
color: #fff; }

View file

@ -459,6 +459,10 @@ body {
.panel-body {
padding-left: 15px;
}
.page-header-actions-block {
padding-top: 20px;
text-align: right;
}
fieldset {
margin-bottom: 20px;
}
@ -529,8 +533,18 @@ fieldset {
border-top: 1px solid #d1d8dd;
}
/* post and post list */
.list-group-item {
border-radius: 0px !important;
}
.website-list {
min-height: 200px;
padding-bottom: 15px;
}
.website-list .result {
border: 1px solid #d1d8dd;
}
.web-list-item {
padding: 5px 0px;
padding: 10px;
border-bottom: 1px solid #d1d8dd;
}
.web-list-item h1,
@ -547,9 +561,8 @@ fieldset {
color: inherit !important;
text-decoration: none;
}
.web-list-item:first-child {
margin-top: -1px;
border-top: 1px solid #d1d8dd;
.web-list-item:hover {
background: #f7fafc;
}
.web-list-item:last-child {
border-bottom: none;
@ -559,8 +572,20 @@ fieldset {
border-top: 1px solid #d1d8dd;
margin: 0px -15px -20px -15px;
}
.blog-list-content .website-list .result {
border: 0px;
}
.blog-list-content .web-list-item {
padding: 0px;
}
.blog-list-content .web-list-item:hover {
background: transparent;
}
.longform {
padding: 15px 0px;
line-height: 1.5;
font-size: 1.1em;
max-width: 700px;
}
.longform p {
margin-bottom: 30px;
@ -586,6 +611,7 @@ fieldset {
}
.blog-comment-row:last-child {
margin-bottom: 30px;
border-bottom: 0px;
}
textarea {
resize: vertical;

2
frappe/public/js/lib/shepherd.min.js vendored Executable file

File diff suppressed because one or more lines are too long

View file

@ -117,6 +117,10 @@
padding-left: 15px;
}
.page-header-actions-block {
padding-top: 20px;
text-align: right;
}
fieldset {
margin-bottom: 20px;
@ -203,8 +207,21 @@ fieldset {
/* post and post list */
.list-group-item {
border-radius: 0px !important;
}
.website-list {
min-height: 200px;
padding-bottom: 15px;
}
.website-list .result {
border: 1px solid @border-color;
}
.web-list-item {
padding: 5px 0px;
padding: 10px;
border-bottom: 1px solid @border-color;
h1, h2, h3 {
@ -220,9 +237,8 @@ fieldset {
}
}
.web-list-item:first-child {
margin-top: -1px;
border-top: 1px solid @border-color;
.web-list-item:hover {
background: @panel-bg;
}
.web-list-item:last-child {
@ -235,8 +251,23 @@ fieldset {
margin: 0px -15px -20px -15px;
}
.blog-list-content .website-list .result {
border: 0px;
}
.blog-list-content .web-list-item {
padding: 0px;
}
.blog-list-content .web-list-item:hover {
background: transparent;
}
.longform {
padding: 15px 0px;
line-height: 1.5;
font-size: 1.1em;
max-width: 700px;
p {
margin-bottom: 30px;
@ -268,6 +299,7 @@ fieldset {
.blog-comment-row:last-child {
margin-bottom: 30px;
border-bottom: 0px;
}
textarea {

View file

@ -4,6 +4,19 @@
{{ title }}
{% endblock %}
{% block header_actions %}
{% if params.name or params.new %}
<button type="submit" class="btn btn-primary btn-sm btn-form-submit">
{{ _("Submit") if params.new else _("Update") }}</button>
<a href="{{ pathname }}" class="btn btn-default btn-sm">
{{ _("Cancel") }}</a>
{% elif is_list %}
<a href="/{{ pathname }}?new=1" class="btn btn-primary btn-new btn-sm">
{{ _("New {0}").format(_(doc_type)) }}
</a>
{% endif %}
{% endblock %}
{% block content %}
<!-- no-sidebar -->
<div class="introduction">
@ -23,48 +36,107 @@
</a>
</p>
</div>
{% elif (login_required and allow_multiple and not params.name and not params.new) %}
<p>
<a href="/{{ pathname }}?new=1" class="btn btn-primary btn-new">
{{ _("New {0}").format(_(doc_type)) }}
</a>
</p>
<div class="list-group">
{% for i in items %}
<div class="list-group-item">
{% if allow_delete %}
<button class="close" data-name="{{ i.name }}">&times;</button>
{% endif %}
<a href="{{ pathname }}?name={{ i.name }}">
{{ i.title }}
</a><br>
<div class="text-muted small">
{{ frappe.format_date(i.creation) }}
</div>
</div>
{% endfor %}
</div>
{% elif is_list %}
{% include "templates/includes/list/list.html" %}
<script>{% include "templates/includes/list/list.js" %}</script>
{% else %}
{%- macro properties(field) %}name="{{ field.fieldname }}" id="{{ field.fieldname }}" {% if field.placeholder %}placeholder="{{ field.placeholder }}"{% endif %} data-label="{{ field.label }}" data-fieldtype="{{ field.fieldtype }}" {{ (field.reqd and field.fieldtype!="Attach") and "required" or "" }} {{ field.read_only and "disabled" or "" }}{% endmacro -%}
<br>
{%- macro properties(field) %}
name="{{ field.fieldname }}" id="{{ field.fieldname }}"
{% if field.placeholder %}placeholder="{{ field.placeholder }}"{% endif %}
data-label="{{ field.label }}" data-fieldtype="{{ field.fieldtype }}"
{{ (field.reqd and field.fieldtype!="Attach") and "required" or "" }}
{{ field.read_only and "disabled" or "" }}
{% endmacro -%}
{%- macro value(field) -%}{% if doc %}{{ doc.get(field.fieldname) or field.default or "" }}{% else %}{{ getCookie(field.options) or field.default or "" }}{% endif %}{%- endmacro -%}
{%- macro help(field) -%}
{% if field.description -%}
<span class="help-block small">{{ field.description }}</span>
{%- endif -%}
{% if field.description -%}
<span class="help-block small">{{ field.description }}</span>
{%- endif -%}
{%- endmacro %}
{% macro label(field) %}<label for="{{ field.fieldname }}" class="col-sm-3 control-label">{{ field.label }}</label>{% endmacro %}
{% macro label(field) %}
<label for="{{ field.fieldname }}" class="control-label text-muted small">
{{ field.label }}</label>
{% endmacro %}
{% macro render_field(field) %}
{% if field.hidden %}
<input type="hidden"
name="{{ field.fieldname }}" value="{{ field.default }}">
{% elif field.fieldtype == "HTML" and field.options %}
<div class="form-group">
{{ field.options }}
</div>
{% elif field.fieldtype in ("Data", "Date", "Datetime") %}
<div class="form-group">
{{ label(field) }}
<input type="text" class="form-control" {{ properties(field) }}
value="{{ value(field) }}">
{{ help(field) }}
</div>
{% elif field.fieldtype=="Select" %}
<div class="form-group">
{{ label(field) }}
<select class="form-control" {{ properties(field) }}>
{% for option in field.options.split("\n") -%}
<option value="{{ option }}"
{{ 'selected="selected"' if value(field)==option else '' }}>
{{ option }}</option>
{%- endfor %}
</select>
{{ help(field) }}
</div>
{% elif field.fieldtype=="Text" %}
<div class="form-group">
{{ label(field) }}
<textarea class="form-control" style="height: 200px;"
{{ properties(field) }}>{{ value(field) }}</textarea>
{{ help(field) }}
</div>
{% elif field.fieldtype=="Attach" %}
<div class="form-group">
{{ label(field) }}
{% if value(field) -%}
<p class="small">
<a href="{{ doc.get(field.fieldname) }}" target="blank">
{{ doc.get(field.fieldname) }}
</a>
<br><button class="btn btn-small btn-default btn-xs
change-attach" style="margin-top: 5px;">Change</button>
</p>
{%- endif %}
<p class="{{ value(field) and 'hide' or '' }} attach-input-wrap">
<input type="file" style="margin-top: 7px;"
{{ properties(field) }}>
</p>
{{ help(field) }}
</div>
{% elif field.fieldtype=="Check" %}
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" id="{{ field.fieldname }}"
name="{{ field.fieldname }}"
{{ doc and doc.get(field.fieldname) and 'checked' or '' }}>
{{ field.label }}
</label>
{{ help(field) }}
</div>
</div>
{% endif %}
{% endmacro %}
<div class="form-message text-muted hide"></div>
<form class="form-horizontal" role="form"
<form role="form"
data-web-form="{{ name }}">
{% if params.name and web_page_link_text %}
<div class="row">
<div class="col-sm-offset-3 col-sm-9">
<div class="col-sm-9">
<div class="text-muted">
<a href="{{ ('/' + doc.parent_website_route) if doc.parent_website_route else '' }}/{{ doc.page_name }}">
{{ web_page_link_text }}</a>
@ -77,97 +149,24 @@
{% if params.name -%}
<input type="hidden" name="name" value="{{ params.name }}">
{%- endif %}
{% for field in web_form_fields %}
{% if field.hidden %}
<input type="hidden"
name="{{ field.fieldname }}" value="{{ field.default }}">
{% elif field.fieldtype == "HTML" and field.options %}
<div class="form-group">
{{ field.options }}
</div>
{% elif field.fieldtype in ("Data", "Date", "Datetime") %}
<div class="form-group">
{{ label(field) }}
<div class="col-sm-9">
<input type="text" class="form-control" {{ properties(field) }}
value="{{ value(field) }}">
{{ help(field) }}
</div>
</div>
{% elif field.fieldtype=="Select" %}
<div class="form-group">
{{ label(field) }}
<div class="col-sm-9">
<select class="form-control" {{ properties(field) }}>
{% for option in field.options.split("\n") -%}
<option value="{{ option }}"
{{ 'selected="selected"' if value(field)==option else '' }}>
{{ option }}</option>
{%- endfor %}
</select>
{{ help(field) }}
</div>
</div>
{% elif field.fieldtype=="Text" %}
<div class="form-group">
{{ label(field) }}
<div class="col-sm-9">
<textarea class="form-control" style="height: 200px;"
{{ properties(field) }}>{{ value(field) }}</textarea>
{{ help(field) }}
</div>
</div>
{% elif field.fieldtype=="Attach" %}
<div class="form-group">
{{ label(field) }}
<div class="col-sm-9">
{% if value(field) -%}
<p>
<i class="icon-paperclip"></i>
<a href="{{ doc.get(field.fieldname) }}" target="blank">
{{ doc.get(field.fieldname) }}
</a>
<br><button class="btn btn-small btn-default
change-attach" style="margin-top: 5px;">Change</button>
</p>
{%- endif %}
<p class="{{ value(field) and 'hide' or '' }} attach-input-wrap">
<input type="file" style="margin-top: 7px;"
{{ properties(field) }}>
</p>
{{ help(field) }}
</div>
</div>
{% elif field.fieldtype=="Check" %}
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div class="checkbox">
<label>
<input type="checkbox" id="{{ field.fieldname }}"
name="{{ field.fieldname }}"
{{ doc and doc.get(field.fieldname) and 'checked' or '' }}>
{{ field.label }}
</label>
{{ help(field) }}
</div>
</div>
</div>
{% endif %}
{% endfor %}
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-primary">Submit</button>
<a href="{{ pathname }}" class="btn btn-default">Cancel</a>
</div>
</div>
{% for section in layout %}
<div class="row">
{% for column in section %}
<div class="col-sm-{{ (12 / (section|len))|int }}">
{% for field in column %}
{{ render_field(field) }}
{% endfor %}
</div>
{% endfor %}
</div>
{% endfor %}
</form>
{% if allow_comments -%}
<div class="row comments">
<div class="col-sm-offset-3 col-sm-9">
<hr>
<h3>{{ _("Comments") }}</h3>
{% include 'templates/includes/comments/comments.html' %}
</div>
{% if allow_comments and not params.new -%}
<div class="comments">
<br><br>
<h3>{{ _("Comments") }}</h3>
{% include 'templates/includes/comments/comments.html' %}
</div>
{%- endif %}
{% endif %}
@ -177,6 +176,7 @@
<script>
frappe.ready(function() {
window.file_reading = false;
window.success_message = "{{ success_message or "" }}";
frappe.datepicker_format = "{{ frappe.date_format.replace('yyyy', 'yy') }}";
var $form = $("form[data-web-form='{{ name }}']");
@ -214,7 +214,7 @@ frappe.ready(function() {
});
// submit
$("form[data-web-form='{{ name }}']").on("submit", function() {
$(".btn-form-submit").on("click", function() {
var args = {};
if(window.saving)
return;
@ -257,15 +257,19 @@ frappe.ready(function() {
btn: $form.find("[type='submit']"),
callback: function(data) {
if(!data.exc) {
$form.addClass("hide");
$(".comments, .introduction").addClass("hide");
scroll(0, 0);
$(".form-message")
.html('{{ success_message or _("Thank You") }}'
+ '<p><a href="{{ success_url }}">{{ _("Continue") }}</a></p>')
.removeClass("hide");
window.saving = false;
if(window.success_message) {
$form.addClass("hide");
$(".comments, .introduction").addClass("hide");
scroll(0, 0);
$(".form-message")
.html('{{ success_message }}<p><a href="{{ success_url }}">\
{{ _("Continue") }}</a></p>')
.removeClass("hide");
} else {
window.location.href = "{{ success_url }}";
}
}
window.saving = false;
}
});

View file

@ -1,6 +1,7 @@
{% if not comment_list %}
<div class="no-comment">
<p class="text-muted">{{ _("Start a new discussion.") }}</p>
<br>
</div>
{% endif %}
@ -16,7 +17,7 @@
</div>
<div class="comment-form-wrapper">
<a class="add-comment">{{ _("Add Comment") }}</a>
<a class="add-comment btn btn-default btn-sm">{{ _("Add Comment") }}</a>
<div style="display: none;" id="comment-form">
<p>{{ _("Add Comment") }}</p>
<div class="alert" style="display:none;"></div>
@ -34,8 +35,10 @@
</div>
<textarea class="form-control" name="comment" rows=10
placeholder="{{ _("Comment") }}"></textarea>
<br>
<button class="btn btn-primary" id="submit-comment">{{ _("Submit") }}</button>
<p>
<button class="btn btn-primary btn-sm" id="submit-comment">
{{ _("Submit") }}</button>
</p>
</fieldset>
</form>
</div>
@ -71,8 +74,8 @@
comment_by_fullname: $("[name='comment_by_fullname']").val(),
comment_by: $("[name='comment_by']").val(),
comment: $("[name='comment']").val(),
comment_doctype: "{{ doctype }}",
comment_docname: "{{ name }}",
comment_doctype: "{{ comment_doctype or doctype }}",
comment_docname: "{{ comment_docname or name }}",
comment_type: "Comment",
page_name: "{{ pathname }}",
}

View file

@ -1,4 +0,0 @@
.website-list-row {
display: block;
padding: 15px;
}

View file

@ -1,20 +1,21 @@
{% if not result -%}
<div class="text-muted" style="min-height: 200px;">
{{ no_result_message or _("Nothing to show") }}
</div>
{% else %}
<div class="website-list" data-doctype="{{ doctype }}"
data-txt="{{ txt or '[notxt]' }}">
<!-- {% if not hide_filters -%}
{% include "templates/includes/list/filters.html" %}
{%- endif %} -->
<div class="website-list" data-doctype="{{ doctype }}" data-txt="{{ txt or '[notxt]' }}">
<!-- {% if not hide_filters -%}
{% include "templates/includes/list/filters.html" %}
{%- endif %} -->
<div class="result">
{% for item in result %}
{{ item }}
{% endfor %}
{% if not result -%}
<div class="text-muted padding">
{{ no_result_message or _("Nothing to show") }}
</div>
{%- endif %}
</div>
<div class="more-block border-top {% if not show_more -%} hide {%- endif %}">
<button class="btn btn-default btn-more">More</button>
</div>
</div>
<div class="result">
{% for item in result %}
{{ item }}
{% endfor %}
</div>
<div class="more-block {% if not show_more -%} hide {%- endif %}">
<button class="btn btn-default btn-more btn-sm">More</button>
</div>
</div>
{%- endif %}

View file

@ -19,6 +19,7 @@ login.bind_events = function() {
return false;
}
login.call(args);
return false;
});
$(".form-signup").on("submit", function(event) {
@ -32,6 +33,7 @@ login.bind_events = function() {
return false;
}
login.call(args);
return false;
});
$(".form-forgot").on("submit", function(event) {
@ -44,6 +46,7 @@ login.bind_events = function() {
return false;
}
login.call(args);
return false;
});
}
@ -72,7 +75,7 @@ login.signup = function() {
// Login
login.call = function(args) {
$('.btn-primary').prop("disabled", true);
frappe.freeze();
$.ajax({
type: "POST",
@ -81,8 +84,8 @@ login.call = function(args) {
dataType: "json",
statusCode: login.login_handlers
}).always(function(){
$('.btn-primary').prop("disabled", false);
})
frappe.unfreeze();
});
}
login.login_handlers = (function() {
@ -105,12 +108,14 @@ login.login_handlers = (function() {
if(localStorage) {
var last_visited =
localStorage.getItem("last_visited")
|| get_url_arg("redirect-to")
|| "/index";
|| get_url_arg("redirect-to");
localStorage.removeItem("last_visited");
}
if(last_visited && last_visited != "/login") {
window.location.href = last_visited;
} else {
window.location.href = "/index";
window.location.href = "/me";
}
} else if(["#signup", "#forgot"].indexOf(window.location.hash)!==-1) {
frappe.msgprint(data.message);

View file

@ -2,9 +2,22 @@
{% if page_or_generator=="Generator" %}data-doctype="{{ doctype }}"{% endif %}>
<div class="page-content">
<div class="page-content-wrapper">
<div class="page-header-block" data-html-block="header">
{%- if header is defined -%}{% if header %}{{ header }}{% endif %}{%- endif -%}
</div>
<div class="row">
<div class="col-sm-8">
<div class="page-header-block" data-html-block="header">
{%- if header is defined -%}
{% if header %}{{ header }}{% endif %}
{%- endif -%}
</div>
</div>
<div class="col-sm-4">
<div class="page-header-actions-block" data-html-block="header-actions">
{%- if header_actions is defined -%}
{% if header_actions %}{{ header_actions }}{% endif %}
{%- endif -%}
</div>
</div>
</div>
<div class="page-breadcrumbs" data-html-block="breadcrumbs">
{%- if breadcrumbs is defined -%}{{ breadcrumbs }}{%- endif -%}
</div>

View file

@ -12,8 +12,16 @@
{% endif %}
{% endblock %}
{% block header_actions %}
{% if create_new %}
<div class="pull-right">
<a href="{{ create_new | abs_url }}" class="btn btn-primary btn-sm">
{{ _("New") }}
</a>
</div>
{% endif %}
{% endblock %}
{% block content %}{% include "templates/includes/list/list.html" %}{% endblock %}
{% block script %}{% include "templates/includes/list/list.js" %}{% endblock %}
{% block style %}{% include "templates/includes/list/list.css" %}{% endblock %}

View file

@ -14,12 +14,10 @@ def get_context(context):
"""Returns context for a list standard list page.
Will also update `get_list_context` from the doctype module file"""
doctype = frappe.local.form_dict.doctype
context.parents = [{"name":"me", "title":_("My Account")}]
context.update(get_list_context(context, doctype) or {})
context.doctype = doctype
context.txt = frappe.local.form_dict.txt
context.update(get(**frappe.local.form_dict))
@frappe.whitelist(allow_guest=True)
@ -62,7 +60,9 @@ def get(doctype, txt=None, limit_start=0, **kwargs):
row_template = list_context.row_template or "templates/includes/list/row_template.html"
for doc in raw_result:
doc.doctype = doctype
new_context = { "doc": doc, "meta": meta, "pathname": frappe.local.request.path.strip("/ ") }
new_context = { "doc": doc, "meta": meta }
if not frappe.flags.in_test:
new_context["pathname"] = frappe.local.request.path.strip("/ ")
new_context.update(list_context)
rendered_row = frappe.render_template(row_template, new_context, is_path=True)
result.append(rendered_row)

View file

@ -1,7 +1,6 @@
{% block title %}{{ _("My Account") }}{% endblock %}
{% block content %}
<!-- no-header -->
<!-- no-sidebar -->
<!-- no-cache -->
<div class="row">
@ -12,17 +11,22 @@
</div>
<div>
<h4><a href="/me">{{ fullname }}</a></h4>
<ul class="list-unstyled small user-options">
<li><a href="/update-password">{{ _("Reset Password") }}</a></li>
<li><a href="/?cmd=web_logout">{{ _("Logout") }}</a></li>
<ul class="list-unstyled">
<li><a href="/update-password">
<h6 class="text-muted">{{ _("Reset Password") }}</h6>
</a></li>
<li><a href="/?cmd=web_logout">
<h6 class="text-muted">{{ _("Logout") }}</h6>
</a></li>
</ul>
</div>
</div>
</div>
<div class="col-sm-9">
<ul class="list-unstyled my-account-list">
<ul class="list-group" style="margin: 15px 0px;">
{% for opts in my_account_list -%}
<li><a href="{{ opts.url }}">{{ opts.label }}</a></li>
<li class="list-group-item"><a href="{{ opts.url }}">
<h4>{{ opts.label }}</h4></a></li>
{%- endfor %}
</ul>
</div>

View file

@ -4,7 +4,7 @@
{% block content %}
<!-- no-sidebar -->
<div class="message-content">
<div class="message-content" style="min-height: 200px;">
<div>
{{ message }}
</div>

View file

@ -1,33 +1,23 @@
{% block title %} {{_("Reset Password")}} {% endblock %}
{% block breadcrumbs %}{% endblock %}
{% block content %}
<!-- no-header -->
<!-- no-sidebar -->
<div class="container">
<div class="row" style="margin-top: 40px; margin-bottom: 20px">
<div class="col-sm-offset-3 col-sm-6">
<div class="panel panel-default">
<div class="panel-heading">
<h4><i class="icon-key"></i> {{_("Reset Password")}}</h4>
</div>
<div class="panel-body">
<div class="form-group">
<input id="old_password" type="password"
class="form-control" placeholder="{{ _("Old Password") }}">
</div>
<div class="form-group">
<input id="new_password" type="password"
class="form-control" placeholder="{{ _("New Password") }}">
</div>
<div class="form-group">
<button type="submit" id="update"
class="btn btn-primary">{{_("Update")}}</button>
</div>
</div>
<div class="row" style="margin-top: 40px; margin-bottom: 20px">
<div class="col-sm-6">
<form id="reset-password">
<div class="form-group">
<input id="old_password" type="password"
class="form-control" placeholder="{{ _("Old Password") }}">
</div>
</div>
<div class="form-group">
<input id="new_password" type="password"
class="form-control" placeholder="{{ _("New Password") }}">
</div>
<div class="form-group">
<button type="submit" id="update"
class="btn btn-primary">{{_("Update")}}</button>
</div>
</form>
</div>
</div>
@ -38,6 +28,10 @@ $(document).ready(function() {
$("#old_password").parent().toggle(false);
}
$("#reset-password").on("submit", function() {
return false;
});
$("#new_password").on("keypress", function(e) {
if(e.which===13) $("#update").click();
})
@ -71,9 +65,14 @@ $(document).ready(function() {
window.location.href = r.message;
}, 2000);
}
if(r.exc) {
frappe.msgprint(r.exc);
}
}
})
})
});
return false;
});
});
</script>

View file

@ -1,5 +1,11 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
# MIT License. See license.txt
from __future__ import unicode_literals
from frappe import _
no_sitemap = 1
no_cache = 1
def get_context(context):
context.parents = [{"name":"me", "title":_("My Account")}]

View file

@ -6,6 +6,8 @@ import frappe, json
from frappe.website.website_generator import WebsiteGenerator
from frappe import _
from frappe.utils.file_manager import save_file, remove_file_by_url
from frappe.website.utils import get_comment_list
from frappe.templates.pages.list import get_context as get_list_context
class WebForm(WebsiteGenerator):
website = frappe._dict(
@ -20,27 +22,51 @@ class WebForm(WebsiteGenerator):
if self.login_required and frappe.session.user != "Guest":
if self.allow_edit:
if self.allow_multiple:
meta = frappe.get_meta(self.doc_type)
context.items = frappe.db.sql("""select name,
{0} as title, creation
from `tab{1}`
where owner=%s and docstatus = 0
order by creation desc""".format(meta.title_field or "name",
self.doc_type), frappe.session.user, as_dict=True)
if not context.params.name and not context.params.new:
frappe.form_dict.doctype = self.doc_type
get_list_context(context)
context.is_list = True
else:
name = frappe.db.get_value(self.doc_type, {"owner": frappe.session.user},
"name")
if name:
frappe.form_dict.name = name
if frappe.form_dict.name or frappe.form_dict.new:
context.layout = self.get_layout()
context.parents = [{"name": self.get_route(), "title": self.title }]
if frappe.form_dict.name:
context.doc = frappe.get_doc(self.doc_type, frappe.form_dict.name)
context.title = context.doc.get(context.doc.meta.get_title_field())
context.comment_doctype = context.doc.doctype
context.comment_docname = context.doc.name
if self.allow_comments and frappe.form_dict.name:
context.comment_list = get_comment_list(context.doc.doctype, context.doc.name)
context.types = [f.fieldtype for f in self.web_form_fields]
return context
def get_layout(self):
layout = []
for df in self.web_form_fields:
if df.fieldtype=="Section Break" or not layout:
layout.append([])
if df.fieldtype=="Column Break" or not layout[-1]:
layout[-1].append([])
if df.fieldtype not in ("Section Break", "Column Break"):
layout[-1][-1].append(df)
return layout
def get_parents(self, context):
if self.breadcrumbs:
if context.parents:
return context.parents
elif self.breadcrumbs:
return json.loads(self.breadcrumbs)
@frappe.whitelist(allow_guest=True)

View file

@ -36,7 +36,7 @@
"in_list_view": 1,
"label": "Fieldtype",
"no_copy": 0,
"options": "Attach\nCheck\nData\nDate\nDatetime\nHTML\nSelect\nText",
"options": "Attach\nCheck\nData\nDate\nDatetime\nHTML\nSelect\nText\nSection Break\nColumn Break",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
@ -59,7 +59,7 @@
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
"reqd": 0,
"search_index": 0,
"set_only_once": 0
},
@ -194,7 +194,7 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2014-09-03 15:47:51.643284",
"modified": "2015-06-01 06:45:30.240450",
"modified_by": "Administrator",
"module": "Website",
"name": "Web Form Field",