[website] fix for contact.js
This commit is contained in:
parent
6721adfc17
commit
814dee9a61
7 changed files with 32 additions and 39 deletions
|
|
@ -42,9 +42,7 @@ app_include_css = [
|
|||
]
|
||||
|
||||
web_include_js = [
|
||||
"website_script.js",
|
||||
"assets/js/control.min.js",
|
||||
"assets/js/dialog.min.js"
|
||||
"website_script.js"
|
||||
]
|
||||
|
||||
bootstrap = "assets/frappe/css/bootstrap.css"
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@
|
|||
],
|
||||
"js/dialog.min.js": [
|
||||
"public/js/frappe/dom.js",
|
||||
"public/js/frappe/ui/modal.html",
|
||||
|
||||
"public/js/frappe/form/formatters.js",
|
||||
"public/js/frappe/form/layout.js",
|
||||
|
|
@ -142,7 +141,6 @@
|
|||
"public/js/frappe/assets.js",
|
||||
"public/js/frappe/format.js",
|
||||
"public/js/frappe/form/formatters.js",
|
||||
"public/js/frappe/ui/modal.html",
|
||||
"public/js/frappe/dom.js",
|
||||
"public/js/frappe/ui/messages.js",
|
||||
"public/js/frappe/ui/keyboard.js",
|
||||
|
|
|
|||
|
|
@ -245,7 +245,32 @@ frappe.scrub = function(text) {
|
|||
};
|
||||
|
||||
frappe.get_modal = function(title, content) {
|
||||
return $(frappe.render_template("modal", {title:title, content:content})).appendTo(document.body);
|
||||
return $(`<div class="modal fade" style="overflow: auto;" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
<span class="indicator hidden"></span>
|
||||
<h4 class="modal-title" style="font-weight: bold;">${title}</h4>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="text-right buttons">
|
||||
<button type="button" class="btn btn-default btn-sm btn-modal-close"
|
||||
data-dismiss="modal">
|
||||
<i class="octicon octicon-x visible-xs" style="padding: 1px 0px;"></i>
|
||||
<span class="hidden-xs">${__("Close")}</span></button>
|
||||
<button type="button" class="btn btn-primary btn-sm hide">
|
||||
${__("Confirm")}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body ui-front">${content}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`)
|
||||
};
|
||||
|
||||
frappe.is_online = function() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import './field_group';
|
||||
import '../dom';
|
||||
|
||||
frappe.provide('frappe.ui');
|
||||
|
||||
|
|
|
|||
|
|
@ -180,13 +180,7 @@ frappe.msgprint = function(msg, title) {
|
|||
return msg_dialog;
|
||||
}
|
||||
|
||||
// Proxy for frappe.msgprint
|
||||
Object.defineProperty(window, 'msgprint', {
|
||||
get: function() {
|
||||
console.warn('Please use `frappe.msgprint` instead of `msgprint`. It will be deprecated soon.');
|
||||
return frappe.msgprint;
|
||||
}
|
||||
});
|
||||
window.msgprint = frappe.msgprint;
|
||||
|
||||
frappe.hide_msgprint = function(instant) {
|
||||
// clear msgprint
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
<div class="modal fade" style="overflow: auto;" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
<span class="indicator hidden"></span>
|
||||
<h4 class="modal-title" style="font-weight: bold;">{%= title %}</h4>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="text-right buttons">
|
||||
<button type="button" class="btn btn-default btn-sm btn-modal-close"
|
||||
data-dismiss="modal">
|
||||
<i class="octicon octicon-x visible-xs" style="padding: 1px 0px;"></i>
|
||||
<span class="hidden-xs">{%= __("Close") %}</span></button>
|
||||
<button type="button" class="btn btn-primary btn-sm hide">
|
||||
{%= __("Confirm") %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body ui-front">{%= content %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
<h1>{{ _(title) }}</h1>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{% if has_header and login_required %}
|
||||
{% include "templates/includes/breadcrumbs.html" %}
|
||||
|
|
@ -162,6 +163,8 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script type="text/javascript" src="/assets/js/dialog.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/control.min.js"></script>
|
||||
|
||||
<script>
|
||||
window.web_form_settings = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue