diff --git a/frappe/change_log/current/web_forms.md b/frappe/change_log/current/web_forms.md new file mode 100644 index 0000000000..95e07f30e8 --- /dev/null +++ b/frappe/change_log/current/web_forms.md @@ -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 diff --git a/frappe/commands.py b/frappe/commands.py index d0fac47d07..46023ee508 100644 --- a/frappe/commands.py +++ b/frappe/commands.py @@ -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() diff --git a/frappe/core/doctype/user/user.js b/frappe/core/doctype/user/user.js index b96d591fc8..9e6afe4d41 100644 --- a/frappe/core/doctype/user/user.js +++ b/frappe/core/doctype/user/user.js @@ -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); } diff --git a/frappe/core/doctype/user/user.json b/frappe/core/doctype/user/user.json index 22e99cf76b..51fc55df99 100644 --- a/frappe/core/doctype/user/user.json +++ b/frappe/core/doctype/user/user.json @@ -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", diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index dbe0463d20..415a6c71ac 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -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) diff --git a/frappe/core/page/data_import_tool/data_import_tool.py b/frappe/core/page/data_import_tool/data_import_tool.py index 9a1ebe2b44..39f80a2aef 100644 --- a/frappe/core/page/data_import_tool/data_import_tool.py +++ b/frappe/core/page/data_import_tool/data_import_tool.py @@ -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 diff --git a/frappe/database.py b/frappe/database.py index 2d572cecbd..6fd3d5712d 100644 --- a/frappe/database.py +++ b/frappe/database.py @@ -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)): diff --git a/frappe/handler.py b/frappe/handler.py index 821d7cc591..25e28a063d 100755 --- a/frappe/handler.py +++ b/frappe/handler.py @@ -31,8 +31,7 @@ def logout(): def web_logout(): frappe.local.login_manager.logout() frappe.db.commit() - frappe.respond_as_web_page("Logged Out", """

You have been logged out.

-

Back to Home

""") + frappe.respond_as_web_page("Logged Out", """

Back to Home

""") @frappe.whitelist(allow_guest=True) def run_custom_method(doctype, name, custom_method): diff --git a/frappe/model/meta.py b/frappe/model/meta.py index f58b290fa0..025dbd21a3 100644 --- a/frappe/model/meta.py +++ b/frappe/model/meta.py @@ -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 diff --git a/frappe/public/css/shepherd/shepherd-theme-arrows-plain-buttons.css b/frappe/public/css/shepherd/shepherd-theme-arrows-plain-buttons.css new file mode 100755 index 0000000000..4b07981756 --- /dev/null +++ b/frappe/public/css/shepherd/shepherd-theme-arrows-plain-buttons.css @@ -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; } diff --git a/frappe/public/css/shepherd/shepherd-theme-arrows.css b/frappe/public/css/shepherd/shepherd-theme-arrows.css new file mode 100755 index 0000000000..5091c726ce --- /dev/null +++ b/frappe/public/css/shepherd/shepherd-theme-arrows.css @@ -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; } diff --git a/frappe/public/css/shepherd/shepherd-theme-dark.css b/frappe/public/css/shepherd/shepherd-theme-dark.css new file mode 100755 index 0000000000..d079dc7139 --- /dev/null +++ b/frappe/public/css/shepherd/shepherd-theme-dark.css @@ -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; } diff --git a/frappe/public/css/shepherd/shepherd-theme-default.css b/frappe/public/css/shepherd/shepherd-theme-default.css new file mode 100755 index 0000000000..b6ab7e766a --- /dev/null +++ b/frappe/public/css/shepherd/shepherd-theme-default.css @@ -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; } diff --git a/frappe/public/css/shepherd/shepherd-theme-square-dark.css b/frappe/public/css/shepherd/shepherd-theme-square-dark.css new file mode 100755 index 0000000000..c941280510 --- /dev/null +++ b/frappe/public/css/shepherd/shepherd-theme-square-dark.css @@ -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; } diff --git a/frappe/public/css/shepherd/shepherd-theme-square.css b/frappe/public/css/shepherd/shepherd-theme-square.css new file mode 100755 index 0000000000..4faba44d9b --- /dev/null +++ b/frappe/public/css/shepherd/shepherd-theme-square.css @@ -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; } diff --git a/frappe/public/css/website.css b/frappe/public/css/website.css index f3b3ad1c44..994002dd0a 100644 --- a/frappe/public/css/website.css +++ b/frappe/public/css/website.css @@ -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,17 @@ 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; +} .longform { padding: 15px 0px; + line-height: 1.5; + font-size: 1.1em; + max-width: 700px; } .longform p { margin-bottom: 30px; @@ -586,6 +608,7 @@ fieldset { } .blog-comment-row:last-child { margin-bottom: 30px; + border-bottom: 0px; } textarea { resize: vertical; diff --git a/frappe/public/js/lib/shepherd.min.js b/frappe/public/js/lib/shepherd.min.js new file mode 100755 index 0000000000..bf80265569 --- /dev/null +++ b/frappe/public/js/lib/shepherd.min.js @@ -0,0 +1,2 @@ +/*! shepherd 0.7.1 */ +!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(){return function(){var t,e,i,o,n,s,r,h,l,a,p,u,f,c,d,g,m,v={}.hasOwnProperty,b=[].indexOf||function(t){for(var e=0,i=this.length;i>e;e++)if(e in this&&this[e]===t)return e;return-1},y=[].slice;null==this.Tether&&(this.Tether={modules:[]}),p=function(t){var e,i,o,n,s;if(i=getComputedStyle(t).position,"fixed"===i)return t;for(o=void 0,e=t;e=e.parentNode;){try{n=getComputedStyle(e)}catch(r){}if(null==n)return e;if(/(auto|scroll)/.test(n.overflow+n["overflow-y"]+n["overflow-x"])&&("absolute"!==i||"relative"===(s=n.position)||"absolute"===s||"fixed"===s))return e}return document.body},d=function(){var t;return t=0,function(){return t++}}(),m={},l=function(t){var e,o,s,r,h;if(s=t._tetherZeroElement,null==s&&(s=t.createElement("div"),s.setAttribute("data-tether-id",d()),n(s.style,{top:0,left:0,position:"absolute"}),t.body.appendChild(s),t._tetherZeroElement=s),e=s.getAttribute("data-tether-id"),null==m[e]){m[e]={},h=s.getBoundingClientRect();for(o in h)r=h[o],m[e][o]=r;i(function(){return m[e]=void 0})}return m[e]},f=null,r=function(t){var e,i,o,n,s,r,h;t===document?(i=document,t=document.documentElement):i=t.ownerDocument,o=i.documentElement,e={},h=t.getBoundingClientRect();for(n in h)r=h[n],e[n]=r;return s=l(i),e.top-=s.top,e.left-=s.left,null==e.width&&(e.width=document.body.scrollWidth-e.left-e.right),null==e.height&&(e.height=document.body.scrollHeight-e.top-e.bottom),e.top=e.top-o.clientTop,e.left=e.left-o.clientLeft,e.right=i.body.clientWidth-e.width-e.left,e.bottom=i.body.clientHeight-e.height-e.top,e},h=function(t){return t.offsetParent||document.documentElement},a=function(){var t,e,i,o,s;return t=document.createElement("div"),t.style.width="100%",t.style.height="200px",e=document.createElement("div"),n(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e),o=t.offsetWidth,e.style.overflow="scroll",s=t.offsetWidth,o===s&&(s=e.clientWidth),document.body.removeChild(e),i=o-s,{width:i,height:i}},n=function(t){var e,i,o,n,s,r,h;for(null==t&&(t={}),e=[],Array.prototype.push.apply(e,arguments),h=e.slice(1),s=0,r=h.length;r>s;s++)if(o=h[s])for(i in o)v.call(o,i)&&(n=o[i],t[i]=n);return t},c=function(t,e){var i,o,n,s,r;if(null!=t.classList){for(s=e.split(" "),r=[],o=0,n=s.length;n>o;o++)i=s[o],i.trim()&&r.push(t.classList.remove(i));return r}return t.className=t.className.replace(new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi")," ")},e=function(t,e){var i,o,n,s,r;if(null!=t.classList){for(s=e.split(" "),r=[],o=0,n=s.length;n>o;o++)i=s[o],i.trim()&&r.push(t.classList.add(i));return r}return c(t,e),t.className+=" "+e},u=function(t,e){return null!=t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)},g=function(t,i,o){var n,s,r,h,l,a;for(s=0,h=o.length;h>s;s++)n=o[s],b.call(i,n)<0&&u(t,n)&&c(t,n);for(a=[],r=0,l=i.length;l>r;r++)n=i[r],a.push(u(t,n)?void 0:e(t,n));return a},o=[],i=function(t){return o.push(t)},s=function(){var t,e;for(e=[];t=o.pop();)e.push(t());return e},t=function(){function t(){}return t.prototype.on=function(t,e,i,o){var n;return null==o&&(o=!1),null==this.bindings&&(this.bindings={}),null==(n=this.bindings)[t]&&(n[t]=[]),this.bindings[t].push({handler:e,ctx:i,once:o})},t.prototype.once=function(t,e,i){return this.on(t,e,i,!0)},t.prototype.off=function(t,e){var i,o,n;if(null!=(null!=(o=this.bindings)?o[t]:void 0)){if(null==e)return delete this.bindings[t];for(i=0,n=[];i=e&&e>=t-i},x=function(){var t,e,i,o,n;for(t=document.createElement("div"),n=["transform","webkitTransform","OTransform","MozTransform","msTransform"],i=0,o=n.length;o>i;i++)if(e=n[i],void 0!==t.style[e])return e}(),O=[],C=function(){var t,e,i;for(e=0,i=O.length;i>e;e++)t=O[e],t.position(!1);return p()},v=function(){var t;return null!=(t="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?t:+new Date},function(){var t,e,i,o,n,s,r,h,l;for(e=null,i=null,o=null,n=function(){if(null!=i&&i>16)return i=Math.min(i-16,250),void(o=setTimeout(n,250));if(!(null!=e&&v()-e<10))return null!=o&&(clearTimeout(o),o=null),e=v(),C(),i=v()-e},h=["resize","scroll","touchmove"],l=[],s=0,r=h.length;r>s;s++)t=h[s],l.push(window.addEventListener(t,n));return l}(),t={center:"center",left:"right",right:"left"},e={middle:"middle",top:"bottom",bottom:"top"},i={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},h=function(i,o){var n,s;return n=i.left,s=i.top,"auto"===n&&(n=t[o.left]),"auto"===s&&(s=e[o.top]),{left:n,top:s}},r=function(t){var e,o;return{left:null!=(e=i[t.left])?e:t.left,top:null!=(o=i[t.top])?o:t.top}},s=function(){var t,e,i,o,n,s,r;for(e=1<=arguments.length?L.call(arguments,0):[],i={top:0,left:0},n=0,s=e.length;s>n;n++)r=e[n],o=r.top,t=r.left,"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof t&&(t=parseFloat(t,10)),i.top+=o,i.left+=t;return i},b=function(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t},y=w=function(t){var e,i,o;return o=t.split(" "),i=o[0],e=o[1],{top:i,left:e}},A=function(){function t(t){this.position=_(this.position,this);var e,i,n,s,r;for(O.push(this),this.history=[],this.setOptions(t,!1),s=o.modules,i=0,n=s.length;n>i;i++)e=s[i],null!=(r=e.initialize)&&r.call(this);this.position()}return t.modules=[],t.prototype.getClass=function(t){var e,i;return(null!=(e=this.options.classes)?e[t]:void 0)?this.options.classes[t]:(null!=(i=this.options.classes)?i[t]:void 0)!==!1?this.options.classPrefix?""+this.options.classPrefix+"-"+t:t:""},t.prototype.setOptions=function(t,e){var i,o,s,r,h,l;for(this.options=t,null==e&&(e=!0),i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},this.options=a(i,this.options),h=this.options,this.element=h.element,this.target=h.target,this.targetModifier=h.targetModifier,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),l=["element","target"],s=0,r=l.length;r>s;s++){if(o=l[s],null==this[o])throw new Error("Tether Error: Both element and target must be defined");null!=this[o].jquery?this[o]=this[o][0]:"string"==typeof this[o]&&(this[o]=document.querySelector(this[o]))}if(n(this.element,this.getClass("element")),n(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");return this.targetAttachment=y(this.options.targetAttachment),this.attachment=y(this.options.attachment),this.offset=w(this.options.offset),this.targetOffset=w(this.options.targetOffset),null!=this.scrollParent&&this.disable(),this.scrollParent="scroll-handle"===this.targetModifier?this.target:g(this.target),this.options.enabled!==!1?this.enable(e):void 0},t.prototype.getTargetBounds=function(){var t,e,i,o,n,s,r,h,l;if(null==this.targetModifier)return u(this.target);switch(this.targetModifier){case"visible":return this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:(t=u(this.target),n={height:t.height,width:t.width,top:t.top,left:t.left},n.height=Math.min(n.height,t.height-(pageYOffset-t.top)),n.height=Math.min(n.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),n.height=Math.min(innerHeight,n.height),n.height-=2,n.width=Math.min(n.width,t.width-(pageXOffset-t.left)),n.width=Math.min(n.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),n.width=Math.min(innerWidth,n.width),n.width-=2,n.topl.clientWidth||"scroll"===[h.overflow,h.overflowX]||this.target!==document.body,s=0,i&&(s=15),o=t.height-parseFloat(h.borderTopWidth)-parseFloat(h.borderBottomWidth)-s,n={width:15,height:.975*o*(o/l.scrollHeight),left:t.left+t.width-parseFloat(h.borderLeftWidth)-15},e=0,408>o&&this.target===document.body&&(e=-11e-5*Math.pow(o,2)-.00727*o+22.58),this.target!==document.body&&(n.height=Math.max(n.height,24)),r=this.target.scrollTop/(l.scrollHeight-o),n.top=r*(o-n.height-e)+t.top+parseFloat(h.borderTopWidth),this.target===document.body&&(n.height=Math.max(n.height,24)),n}},t.prototype.clearCache=function(){return this._cache={}},t.prototype.cache=function(t,e){return null==this._cache&&(this._cache={}),null==this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]},t.prototype.enable=function(t){return null==t&&(t=!0),n(this.target,this.getClass("enabled")),n(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t?this.position():void 0},t.prototype.disable=function(){return T(this.target,this.getClass("enabled")),T(this.element,this.getClass("enabled")),this.enabled=!1,null!=this.scrollParent?this.scrollParent.removeEventListener("scroll",this.position):void 0},t.prototype.destroy=function(){var t,e,i,o,n;for(this.disable(),n=[],t=i=0,o=O.length;o>i;t=++i){if(e=O[t],e===this){O.splice(t,1);break}n.push(void 0)}return n},t.prototype.updateAttachClasses=function(t,e){var i,o,n,s,r,h,a,p,u,f=this;for(null==t&&(t=this.attachment),null==e&&(e=this.targetAttachment),s=["left","top","bottom","right","middle","center"],(null!=(u=this._addAttachClasses)?u.length:void 0)&&this._addAttachClasses.splice(0,this._addAttachClasses.length),i=null!=this._addAttachClasses?this._addAttachClasses:this._addAttachClasses=[],t.top&&i.push(""+this.getClass("element-attached")+"-"+t.top),t.left&&i.push(""+this.getClass("element-attached")+"-"+t.left),e.top&&i.push(""+this.getClass("target-attached")+"-"+e.top),e.left&&i.push(""+this.getClass("target-attached")+"-"+e.left),o=[],r=0,a=s.length;a>r;r++)n=s[r],o.push(""+this.getClass("element-attached")+"-"+n);for(h=0,p=s.length;p>h;h++)n=s[h],o.push(""+this.getClass("target-attached")+"-"+n);return l(function(){return null!=f._addAttachClasses?(S(f.element,f._addAttachClasses,o),S(f.target,f._addAttachClasses,o),f._addAttachClasses=void 0):void 0})},t.prototype.position=function(t){var e,i,n,l,a,c,g,m,v,y,w,C,T,O,x,S,E,A,M,L,_,B,W,P,z,H,F,k,N,Y,X,j,q,U,I,R=this;if(null==t&&(t=!0),this.enabled){for(this.clearCache(),L=h(this.targetAttachment,this.attachment),this.updateAttachClasses(this.attachment,L),e=this.cache("element-bounds",function(){return u(R.element)}),z=e.width,n=e.height,0===z&&0===n&&null!=this.lastSize?(Y=this.lastSize,z=Y.width,n=Y.height):this.lastSize={width:z,height:n},W=B=this.cache("target-bounds",function(){return R.getTargetBounds()}),v=b(r(this.attachment),{width:z,height:n}),_=b(r(L),W),a=b(this.offset,{width:z,height:n}),c=b(this.targetOffset,W),v=s(v,a),_=s(_,c),l=B.left+_.left-v.left,P=B.top+_.top-v.top,X=o.modules,H=0,k=X.length;k>H;H++)if(g=X[H],x=g.position.call(this,{left:l,top:P,targetAttachment:L,targetPos:B,attachment:this.attachment,elementPos:e,offset:v,targetOffset:_,manualOffset:a,manualTargetOffset:c,scrollbarSize:A}),null!=x&&"object"==typeof x){if(x===!1)return!1;P=x.top,l=x.left}if(m={page:{top:P,left:l},viewport:{top:P-pageYOffset,bottom:pageYOffset-P-n+innerHeight,left:l-pageXOffset,right:pageXOffset-l-z+innerWidth}},document.body.scrollWidth>window.innerWidth&&(A=this.cache("scrollbar-size",d),m.viewport.bottom-=A.height),document.body.scrollHeight>window.innerHeight&&(A=this.cache("scrollbar-size",d),m.viewport.right-=A.width),(""!==(j=document.body.style.position)&&"static"!==j||""!==(q=document.body.parentElement.style.position)&&"static"!==q)&&(m.page.bottom=document.body.scrollHeight-P-n,m.page.right=document.body.scrollWidth-l-z),(null!=(U=this.options.optimizations)?U.moveElement:void 0)!==!1&&null==this.targetModifier){for(w=this.cache("target-offsetparent",function(){return f(R.target)}),O=this.cache("target-offsetparent-bounds",function(){return u(w)}),T=getComputedStyle(w),i=getComputedStyle(this.element),C=O,y={},I=["Top","Left","Bottom","Right"],F=0,N=I.length;N>F;F++)M=I[F],y[M.toLowerCase()]=parseFloat(T["border"+M+"Width"]);O.right=document.body.scrollWidth-O.left-C.width+y.right,O.bottom=document.body.scrollHeight-O.top-C.height+y.bottom,m.page.top>=O.top+y.top&&m.page.bottom>=O.bottom&&m.page.left>=O.left+y.left&&m.page.right>=O.right&&(E=w.scrollTop,S=w.scrollLeft,m.offset={top:m.page.top-O.top+E-y.top,left:m.page.left-O.left+S-y.left})}return this.move(m),this.history.unshift(m),this.history.length>3&&this.history.pop(),t&&p(),!0}},t.prototype.move=function(t){var e,i,o,n,s,r,h,p,u,c,d,g,m,v,b,y,w,C=this;if(null!=this.element.parentNode){p={};for(c in t){p[c]={};for(n in t[c]){for(o=!1,y=this.history,v=0,b=y.length;b>v;v++)if(h=y[v],!E(null!=(w=h[c])?w[n]:void 0,t[c][n])){o=!0;break}o||(p[c][n]=!0)}}e={top:"",left:"",right:"",bottom:""},u=function(t,i){var o,n,s;return(null!=(s=C.options.optimizations)?s.gpu:void 0)===!1?(t.top?e.top=""+i.top+"px":e.bottom=""+i.bottom+"px",t.left?e.left=""+i.left+"px":e.right=""+i.right+"px"):(t.top?(e.top=0,n=i.top):(e.bottom=0,n=-i.bottom),t.left?(e.left=0,o=i.left):(e.right=0,o=-i.right),e[x]="translateX("+Math.round(o)+"px) translateY("+Math.round(n)+"px)","msTransform"!==x?e[x]+=" translateZ(0)":void 0)},s=!1,(p.page.top||p.page.bottom)&&(p.page.left||p.page.right)?(e.position="absolute",u(p.page,t.page)):(p.viewport.top||p.viewport.bottom)&&(p.viewport.left||p.viewport.right)?(e.position="fixed",u(p.viewport,t.viewport)):null!=p.offset&&p.offset.top&&p.offset.left?(e.position="absolute",r=this.cache("target-offsetparent",function(){return f(C.target)}),f(this.element)!==r&&l(function(){return C.element.parentNode.removeChild(C.element),r.appendChild(C.element)}),u(p.offset,t.offset),s=!0):(e.position="absolute",u({top:!0,left:!0},t.page)),s||"BODY"===this.element.parentNode.tagName||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element)),m={},g=!1;for(n in e)d=e[n],i=this.element.style[n],""===i||""===d||"top"!==n&&"left"!==n&&"bottom"!==n&&"right"!==n||(i=parseFloat(i),d=parseFloat(d)),i!==d&&(g=!0,m[n]=e[n]);return g?l(function(){return a(C.element.style,m)}):void 0}},t}(),o.position=C,this.Tether=a(A,o)}.call(this),function(){var t,e,i,o,n,s,r,h,l,a,p=[].indexOf||function(t){for(var e=0,i=this.length;i>e;e++)if(e in this&&this[e]===t)return e;return-1};a=this.Tether.Utils,r=a.getOuterSize,s=a.getBounds,h=a.getSize,o=a.extend,l=a.updateClasses,i=a.defer,e={left:"right",right:"left",top:"bottom",bottom:"top",middle:"middle"},t=["left","top","right","bottom"],n=function(e,i){var o,n,r,h,l,a,p;if("scrollParent"===i?i=e.scrollParent:"window"===i&&(i=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),i===document&&(i=i.documentElement),null!=i.nodeType)for(n=h=s(i),l=getComputedStyle(i),i=[n.left,n.top,h.width+n.left,h.height+n.top],o=a=0,p=t.length;p>a;o=++a)r=t[o],r=r[0].toUpperCase()+r.substr(1),"Top"===r||"Left"===r?i[o]+=parseFloat(l["border"+r+"Width"]):i[o]-=parseFloat(l["border"+r+"Width"]);return i},this.Tether.modules.push({position:function(e){var r,h,a,u,f,c,d,g,m,v,b,y,w,C,T,O,x,S,E,A,M,L,_,B,W,P,z,H,F,k,N,Y,X,j,q,U,I,R,D,Z,$,V,G,J,K,Q,te,ee=this;if(P=e.top,b=e.left,M=e.targetAttachment,!this.options.constraints)return!0;for(S=function(e){var i,o,n,s;for(ee.removeClass(e),s=[],o=0,n=t.length;n>o;o++)i=t[o],s.push(ee.removeClass(""+e+"-"+i));return s},Z=this.cache("element-bounds",function(){return s(ee.element)}),v=Z.height,z=Z.width,0===z&&0===v&&null!=this.lastSize&&($=this.lastSize,z=$.width,v=$.height),_=this.cache("target-bounds",function(){return ee.getTargetBounds()}),L=_.height,B=_.width,A={},m={},h=[this.getClass("pinned"),this.getClass("out-of-bounds")],V=this.options.constraints,H=0,Y=V.length;Y>H;H++)g=V[H],g.outOfBoundsClass&&h.push(g.outOfBoundsClass),g.pinnedClass&&h.push(g.pinnedClass);for(F=0,X=h.length;X>F;F++)for(d=h[F],G=["left","top","right","bottom"],k=0,j=G.length;j>k;k++)E=G[k],h.push(""+d+"-"+E);for(r=[],A=o({},M),m=o({},this.attachment),J=this.options.constraints,N=0,q=J.length;q>N;N++){if(g=J[N],W=g.to,a=g.attachment,T=g.pin,null==a&&(a=""),p.call(a," ")>=0?(K=a.split(" "),c=K[0],f=K[1]):f=c=a,u=n(this,W),("target"===c||"both"===c)&&(Pu[3]&&"bottom"===A.top&&(P-=L,A.top="top")),"together"===c&&(Pu[3]&&"bottom"===A.top&&("top"===m.top?(P-=L,A.top="top",P-=v,m.top="bottom"):"bottom"===m.top&&(P-=L,A.top="top",P+=v,m.top="top")),"middle"===A.top&&(P+v>u[3]&&"top"===m.top?(P-=v,m.top="bottom"):Pu[2]&&"right"===A.left&&(b-=B,A.left="left")),"together"===f&&(bu[2]&&"right"===A.left?"left"===m.left?(b-=B,A.left="left",b-=z,m.left="right"):"right"===m.left&&(b-=B,A.left="left",b+=z,m.left="left"):"center"===A.left&&(b+z>u[2]&&"left"===m.left?(b-=z,m.left="right"):bu[3]&&"top"===m.top&&(P-=v,m.top="bottom")),("element"===f||"both"===f)&&(bu[2]&&"left"===m.left&&(b-=z,m.left="right")),"string"==typeof T?T=function(){var t,e,i,o;for(i=T.split(","),o=[],e=0,t=i.length;t>e;e++)C=i[e],o.push(C.trim());return o}():T===!0&&(T=["top","left","right","bottom"]),T||(T=[]),O=[],y=[],P=0?(P=u[1],O.push("top")):y.push("top")),P+v>u[3]&&(p.call(T,"bottom")>=0?(P=u[3]-v,O.push("bottom")):y.push("bottom")),b=0?(b=u[0],O.push("left")):y.push("left")),b+z>u[2]&&(p.call(T,"right")>=0?(b=u[2]-z,O.push("right")):y.push("right")),O.length)for(x=null!=(Q=this.options.pinnedClass)?Q:this.getClass("pinned"),r.push(x),R=0,U=O.length;U>R;R++)E=O[R],r.push(""+x+"-"+E);if(y.length)for(w=null!=(te=this.options.outOfBoundsClass)?te:this.getClass("out-of-bounds"),r.push(w),D=0,I=y.length;I>D;D++)E=y[D],r.push(""+w+"-"+E);(p.call(O,"left")>=0||p.call(O,"right")>=0)&&(m.left=A.left=!1),(p.call(O,"top")>=0||p.call(O,"bottom")>=0)&&(m.top=A.top=!1),(A.top!==M.top||A.left!==M.left||m.top!==this.attachment.top||m.left!==this.attachment.left)&&this.updateAttachClasses(m,A)}return i(function(){return l(ee.target,r,h),l(ee.element,r,h)}),{top:P,left:b}}})}.call(this),function(){var t,e,i,o;o=this.Tether.Utils,e=o.getBounds,i=o.updateClasses,t=o.defer,this.Tether.modules.push({position:function(o){var n,s,r,h,l,a,p,u,f,c,d,g,m,v,b,y,w,C,T,O,x,S,E,A,M,L=this;if(d=o.top,a=o.left,x=this.cache("element-bounds",function(){return e(L.element)}),l=x.height,g=x.width,c=this.getTargetBounds(),h=d+l,p=a+g,n=[],d<=c.bottom&&h>=c.top)for(S=["left","right"],m=0,w=S.length;w>m;m++)u=S[m],((E=c[u])===a||E===p)&&n.push(u);if(a<=c.right&&p>=c.left)for(A=["top","bottom"],v=0,C=A.length;C>v;v++)u=A[v],((M=c[u])===d||M===h)&&n.push(u);for(r=[],s=[],f=["left","top","right","bottom"],r.push(this.getClass("abutted")),b=0,T=f.length;T>b;b++)u=f[b],r.push(""+this.getClass("abutted")+"-"+u);for(n.length&&s.push(this.getClass("abutted")),y=0,O=n.length;O>y;y++)u=n[y],s.push(""+this.getClass("abutted")+"-"+u);return t(function(){return i(L.target,s,r),i(L.element,s,r)}),!0}})}.call(this),function(){this.Tether.modules.push({position:function(t){var e,i,o,n,s,r,h;return r=t.top,e=t.left,this.options.shift?(i=function(t){return"function"==typeof t?t.call(this,{top:r,left:e}):t},o=i(this.options.shift),"string"==typeof o?(o=o.split(" "),o[1]||(o[1]=o[0]),s=o[0],n=o[1],s=parseFloat(s,10),n=parseFloat(n,10)):(h=[o.top,o.left],s=h[0],n=h[1]),r+=s,e+=n,{top:r,left:e}):void 0}})}.call(this),this.Tether}),function(){var t,e,i,o,n,s,r,h,l,a,p,u,f,c,d,g=function(t,e){return function(){return t.apply(e,arguments)}},m={}.hasOwnProperty,v=function(t,e){function i(){this.constructor=t}for(var o in e)m.call(e,o)&&(t[o]=e[o]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t};d=Tether.Utils,h=d.extend,f=d.removeClass,s=d.addClass,a=d.hasClass,e=d.Evented,l=d.getBounds,c=d.uniqueId,i=new e,t={top:"bottom center",left:"middle right",right:"middle left",bottom:"top center",center:"middle center"},r=function(t){var e;return e=document.createElement("div"),e.innerHTML=t,e.children[0]},p=function(t,e){var i,o,n,s,r,h;return i=null!=(o=null!=(n=null!=(s=null!=(r=null!=(h=t.matches)?h:t.matchesSelector)?r:t.msMatchesSelector)?s:t.webkitMatchesSelector)?n:t.mozMatchesSelector)?o:t.oMatchesSelector,i.call(t,e)},u=function(t,e){var i,o,n,s,r,h;if(null==t)return t;if("object"==typeof t)return t;for(s=t.split(" "),s.length>e.length&&(s[0]=s.slice(0,+(s.length-e.length)+1||9e9).join(" "),s.splice(1,s.length-e.length)),o={},i=r=0,h=e.length;h>r;i=++r)n=e[i],o[n]=s[i];return o},o=function(e){function i(t,e){this.tour=t,this.destroy=g(this.destroy,this),this.scrollTo=g(this.scrollTo,this),this.complete=g(this.complete,this),this.cancel=g(this.cancel,this),this.isOpen=g(this.isOpen,this),this.hide=g(this.hide,this),this._show=g(this._show,this),this.show=g(this.show,this),this.setOptions(e)}return v(i,e),i.prototype.setOptions=function(t){var e,i,o,n;if(this.options=null!=t?t:{},this.destroy(),this.id=this.options.id||this.id||"step-"+c(),this.options.when){n=this.options.when;for(e in n)i=n[e],this.on(e,i,this)}return null!=(o=this.options).buttons?(o=this.options).buttons:o.buttons=[{text:"Next",action:this.tour.next}]},i.prototype.getTour=function(){return this.tour},i.prototype.bindAdvance=function(){var t,e,i,o,n=this;return o=u(this.options.advanceOn,["selector","event"]),t=o.event,i=o.selector,e=function(t){if(n.isOpen())if(null!=i){if(p(t.target,i))return n.tour.next()}else if(n.el&&t.target===n.el)return n.tour.next()},document.body.addEventListener(t,e),this.on("destroy",function(){return document.body.removeEventListener(t,e)})},i.prototype.getAttachTo=function(){var t,e;if(t=u(this.options.attachTo,["element","on"]),null==t&&(t={}),e=t.element,"string"==typeof t.element&&(t.element=document.querySelector(t.element),null==t.element))throw new Error("The element for this Shepherd step was not found "+e);return t},i.prototype.setupTether=function(){var e,i,o;if("undefined"==typeof Tether||null===Tether)throw new Error("Using the attachment feature of Shepherd requires the Tether library");return i=this.getAttachTo(),e=t[i.on||"right"],null==i.element&&(i.element="viewport",e="middle center"),o={classPrefix:"shepherd",element:this.el,constraints:[{to:"window",pin:!0,attachment:"together"}],target:i.element,offset:i.offset||"0 0",attachment:e},this.tether=new Tether(h(o,this.options.tetherOptions))},i.prototype.show=function(){var t,e,i,o=this;return null!=(e="function"==typeof(t=this.options).beforeShowPromise&&null!=(i=t.beforeShowPromise())?i.then(function(){return o._show()}):void 0)?e:this._show()},i.prototype._show=function(){var t=this;return this.trigger("before-show"),null==this.el&&this.render(),s(this.el,"shepherd-open"),document.body.setAttribute("data-shepherd-step",this.id),this.setupTether(),this.options.scrollTo&&setTimeout(function(){return t.scrollTo()}),this.trigger("show")},i.prototype.hide=function(){var t;return this.trigger("before-hide"),f(this.el,"shepherd-open"),document.body.removeAttribute("data-shepherd-step"),null!=(t=this.tether)&&t.destroy(),this.tether=null,this.trigger("hide")},i.prototype.isOpen=function(){return a(this.el,"shepherd-open")},i.prototype.cancel=function(){return this.tour.cancel(),this.trigger("cancel")},i.prototype.complete=function(){return this.tour.complete(),this.trigger("complete")},i.prototype.scrollTo=function(){var t;return t=this.getAttachTo().element,null!=this.options.scrollToHandler?this.options.scrollToHandler(t):null!=t?t.scrollIntoView():void 0},i.prototype.destroy=function(){var t;return null!=this.el&&(document.body.removeChild(this.el),delete this.el),null!=(t=this.tether)&&t.destroy(),this.tether=null,this.trigger("destroy")},i.prototype.render=function(){var t,e,i,o,n,s,h,l,a,p,u,f,c,d,g,m,v;if(null!=this.el&&this.destroy(),this.el=r("
"),o=document.createElement("div"),o.className="shepherd-content",this.el.appendChild(o),s=document.createElement("header"),o.appendChild(s),null!=this.options.title&&(s.innerHTML+="

"+this.options.title+"

",this.el.className+=" shepherd-has-title"),this.options.showCancelLink&&(h=r(""),s.appendChild(h),this.el.className+=" shepherd-has-cancel-link",this.bindCancelLink(h)),null!=this.options.text){if(p=r("
"),a=this.options.text,"function"==typeof a&&(a=this.options.text.call(this,p)),a instanceof HTMLElement)p.appendChild(a);else for("string"==typeof a&&(a=[a]),u=0,c=a.length;c>u;u++)l=a[u],p.innerHTML+="

"+l+"

";o.appendChild(p)}if(n=document.createElement("footer"),this.options.buttons){for(e=r("
    "),m=this.options.buttons,f=0,d=m.length;d>f;f++)i=m[f],t=r("
  • "+i.text+""),e.appendChild(t),this.bindButtonEvents(i,t.querySelector("a"));n.appendChild(e)}return o.appendChild(n),document.body.appendChild(this.el),this.setupTether(),this.options.advanceOn?this.bindAdvance():void 0},i.prototype.bindCancelLink=function(t){var e=this;return t.addEventListener("click",function(t){return t.preventDefault(),e.cancel()})},i.prototype.bindButtonEvents=function(t,e){var i,o,n,s,r=this;null==t.events&&(t.events={}),null!=t.action&&(t.events.click=t.action),s=t.events;for(i in s)o=s[i],"string"==typeof o&&(n=o,o=function(){return r.tour.show(n)}),e.addEventListener(i,o);return this.on("destroy",function(){var n,s;n=t.events,s=[];for(i in n)o=n[i],s.push(e.removeEventListener(i,o));return s})},i}(e),n=function(t){function e(t){var e,o,n,s,r,h,l=this;for(this.options=null!=t?t:{},this.hide=g(this.hide,this),this.complete=g(this.complete,this),this.cancel=g(this.cancel,this),this.back=g(this.back,this),this.next=g(this.next,this),this.steps=null!=(r=this.options.steps)?r:[],h=["complete","cancel","hide","start","show","active","inactive"],o=function(t){return l.on(t,function(e){return null==e&&(e={}),e.tour=l,i.trigger(t,e)})},n=0,s=h.length;s>n;n++)e=h[n],o(e)}return v(e,t),e.prototype.addStep=function(t,e){var i;return null==e&&(e=t),e instanceof o?e.tour=this:(("string"==(i=typeof t)||"number"===i)&&(e.id=t.toString()),e=h({},this.options.defaults,e),e=new o(this,e)),this.steps.push(e),this},e.prototype.getById=function(t){var e,i,o,n;for(n=this.steps,i=0,o=n.length;o>i;i++)if(e=n[i],e.id===t)return e},e.prototype.getCurrentStep=function(){return this.currentStep},e.prototype.next=function(){var t;return t=this.steps.indexOf(this.currentStep),t===this.steps.length-1?(this.hide(t),this.trigger("complete"),this.done()):this.show(t+1)},e.prototype.back=function(){var t;return t=this.steps.indexOf(this.currentStep),this.show(t-1)},e.prototype.cancel=function(){var t;return null!=(t=this.currentStep)&&t.hide(),this.trigger("cancel"),this.done()},e.prototype.complete=function(){var t;return null!=(t=this.currentStep)&&t.hide(),this.trigger("complete"),this.done()},e.prototype.hide=function(){var t;return null!=(t=this.currentStep)&&t.hide(),this.trigger("hide"),this.done()},e.prototype.done=function(){return i.activeTour=null,f(document.body,"shepherd-active"),this.trigger("inactive",{tour:this})},e.prototype.show=function(t){var e;return null==t&&(t=0),this.currentStep?this.currentStep.hide():(s(document.body,"shepherd-active"),this.trigger("active",{tour:this})),i.activeTour=this,e="string"==typeof t?this.getById(t):this.steps[t],e?(this.trigger("show",{step:e,previous:this.currentStep}),this.currentStep=e,e.show()):void 0},e.prototype.start=function(){return this.trigger("start"),this.currentStep=null,this.next()},e}(e),h(i,{Tour:n,Step:o,Evented:e}),window.Shepherd=i}.call(this); \ No newline at end of file diff --git a/frappe/public/less/website.less b/frappe/public/less/website.less index 865baf41c2..d340c9cb3e 100644 --- a/frappe/public/less/website.less +++ b/frappe/public/less/website.less @@ -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,19 @@ fieldset { margin: 0px -15px -20px -15px; } +.blog-list-content .website-list .result { + border: 0px; +} + +.blog-list-content .web-list-item { + padding: 0px; +} + .longform { padding: 15px 0px; + line-height: 1.5; + font-size: 1.1em; + max-width: 700px; p { margin-bottom: 30px; @@ -268,6 +295,7 @@ fieldset { .blog-comment-row:last-child { margin-bottom: 30px; + border-bottom: 0px; } textarea { diff --git a/frappe/templates/generators/web_form.html b/frappe/templates/generators/web_form.html index 9c4c2d4d0c..75ee451d84 100644 --- a/frappe/templates/generators/web_form.html +++ b/frappe/templates/generators/web_form.html @@ -4,6 +4,19 @@ {{ title }} {% endblock %} +{% block header_actions %} + {% if params.name or params.new %} + + + {{ _("Cancel") }} + {% elif is_list %} + + {{ _("New {0}").format(_(doc_type)) }} + + {% endif %} +{% endblock %} + {% block content %}
    @@ -23,48 +36,108 @@

    -{% elif (login_required and allow_multiple and not params.name and not params.new) %} -

    - - {{ _("New {0}").format(_(doc_type)) }} - -

    -
    - {% for i in items %} -
    - {% if allow_delete %} - - {% endif %} - - {{ i.title }} -
    -
    - {{ frappe.format_date(i.creation) }} -
    -
    - {% endfor %} -
    +{% elif is_list %} + {% include "templates/includes/list/list.html" %} + {% 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 -%} +
    + +{%- 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 -%} -{{ field.description }} -{%- endif -%} + {% if field.description -%} + {{ field.description }} + {%- endif -%} {%- endmacro %} -{% macro label(field) %}{% endmacro %} +{% macro label(field) %} + +{% endmacro %} +{% macro render_field(field) %} + {% if field.hidden %} + + {% elif field.fieldtype == "HTML" and field.options %} +
    + {{ field.options }} +
    + {% elif field.fieldtype in ("Data", "Date", "Datetime") %} +
    + {{ label(field) }} + + {{ help(field) }} +
    + {% elif field.fieldtype=="Select" %} +
    + {{ label(field) }} + + {{ help(field) }} +
    + {% elif field.fieldtype=="Text" %} +
    + {{ label(field) }} + + {{ help(field) }} +
    + {% elif field.fieldtype=="Attach" %} +
    + {{ label(field) }} + {% if value(field) -%} +

    + + + {{ doc.get(field.fieldname) }} + +
    +

    + {%- endif %} +

    + +

    + {{ help(field) }} +
    + {% elif field.fieldtype=="Check" %} +
    +
    + + {{ help(field) }} +
    +
    + {% endif %} +{% endmacro %}
    -
    {% if params.name and web_page_link_text %}
    -
    +
    {{ web_page_link_text }} @@ -77,97 +150,24 @@ {% if params.name -%} {%- endif %} -{% for field in web_form_fields %} - {% if field.hidden %} - - {% elif field.fieldtype == "HTML" and field.options %} -
    - {{ field.options }} -
    - {% elif field.fieldtype in ("Data", "Date", "Datetime") %} -
    - {{ label(field) }} -
    - - {{ help(field) }} -
    -
    - {% elif field.fieldtype=="Select" %} -
    - {{ label(field) }} -
    - - {{ help(field) }} -
    -
    - {% elif field.fieldtype=="Text" %} -
    - {{ label(field) }} -
    - - {{ help(field) }} -
    -
    - {% elif field.fieldtype=="Attach" %} -
    - {{ label(field) }} -
    - {% if value(field) -%} -

    - - - {{ doc.get(field.fieldname) }} - -
    -

    - {%- endif %} -

    - -

    - {{ help(field) }} -
    -
    - {% elif field.fieldtype=="Check" %} -
    -
    -
    - - {{ help(field) }} -
    -
    -
    - {% endif %} -{% endfor %} -
    -
    - - Cancel -
    -
    + + {% for section in layout %} +
    + {% for column in section %} +
    + {% for field in column %} + {{ render_field(field) }} + {% endfor %} +
    + {% endfor %} +
    + {% endfor %} {% if allow_comments -%} -
    -
    -
    -

    {{ _("Comments") }}

    - {% include 'templates/includes/comments/comments.html' %} -
    +
    +

    +

    {{ _("Comments") }}

    + {% include 'templates/includes/comments/comments.html' %}
    {%- endif %} {% endif %} @@ -177,6 +177,7 @@ diff --git a/frappe/templates/pages/update_password.py b/frappe/templates/pages/update_password.py index e4c485ceed..5ed7ad913d 100644 --- a/frappe/templates/pages/update_password.py +++ b/frappe/templates/pages/update_password.py @@ -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")}] diff --git a/frappe/website/doctype/web_form/web_form.py b/frappe/website/doctype/web_form/web_form.py index e04293eef2..ae1fb66423 100644 --- a/frappe/website/doctype/web_form/web_form.py +++ b/frappe/website/doctype/web_form/web_form.py @@ -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,13 +22,10 @@ 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: + 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") @@ -34,13 +33,38 @@ class WebForm(WebsiteGenerator): frappe.form_dict.name = name if frappe.form_dict.name: + context.layout = self.get_layout() context.doc = frappe.get_doc(self.doc_type, frappe.form_dict.name) + context.title = context.doc.get(context.doc.meta.get_title_field()) + context.parents = [{"name": self.get_route(), "title": self.title }] + + context.comment_doctype = context.doc.doctype + context.comment_docname = context.doc.name + + if self.allow_comments: + 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) diff --git a/frappe/website/doctype/web_form_field/web_form_field.json b/frappe/website/doctype/web_form_field/web_form_field.json index 782182b2cc..9ad0f437a7 100644 --- a/frappe/website/doctype/web_form_field/web_form_field.json +++ b/frappe/website/doctype/web_form_field/web_form_field.json @@ -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",