fix: Update all /assets urls with new urls
This commit is contained in:
parent
0076e99ae1
commit
34c6d099b1
18 changed files with 48 additions and 43 deletions
|
|
@ -203,7 +203,7 @@ frappe.ui.form.on('Data Import', {
|
|||
},
|
||||
|
||||
download_template(frm) {
|
||||
frappe.require('/assets/js/data_import_tools.min.js', () => {
|
||||
frappe.require('/assets/frappe/dist/js/data_import_tools.bundle.js', () => {
|
||||
frm.data_exporter = new frappe.data_import.DataExporter(
|
||||
frm.doc.reference_doctype,
|
||||
frm.doc.import_type
|
||||
|
|
@ -287,7 +287,7 @@ frappe.ui.form.on('Data Import', {
|
|||
return;
|
||||
}
|
||||
|
||||
frappe.require('/assets/js/data_import_tools.min.js', () => {
|
||||
frappe.require('/assets/frappe/dist/js/data_import_tools.bundle.js', () => {
|
||||
frm.import_preview = new frappe.data_import.ImportPreview({
|
||||
wrapper: frm.get_field('import_preview').$wrapper,
|
||||
doctype: frm.doc.reference_doctype,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ frappe.pages['recorder'].on_page_load = function(wrapper) {
|
|||
frappe.recorder.show();
|
||||
});
|
||||
|
||||
frappe.require('/assets/js/frappe-recorder.min.js');
|
||||
frappe.require('/assets/frappe/dist/js/recorder.bundle.js');
|
||||
};
|
||||
|
||||
class Recorder {
|
||||
|
|
|
|||
|
|
@ -29,16 +29,16 @@ page_js = {
|
|||
|
||||
# website
|
||||
app_include_js = [
|
||||
"frappe/public/js/libs.bundle.js",
|
||||
"frappe/public/js/desk.bundle.js",
|
||||
"frappe/public/js/list.bundle.js",
|
||||
"frappe/public/js/form.bundle.js",
|
||||
"frappe/public/js/controls.bundle.js",
|
||||
"frappe/public/js/report.bundle.js",
|
||||
"/assets/frappe/dist/js/libs.bundle.js",
|
||||
"/assets/frappe/dist/js/desk.bundle.js",
|
||||
"/assets/frappe/dist/js/list.bundle.js",
|
||||
"/assets/frappe/dist/js/form.bundle.js",
|
||||
"/assets/frappe/dist/js/controls.bundle.js",
|
||||
"/assets/frappe/dist/js/report.bundle.js",
|
||||
]
|
||||
app_include_css = [
|
||||
"frappe/public/scss/desk.bundle.scss",
|
||||
"frappe/public/scss/report.bundle.scss",
|
||||
"/assets/frappe/dist/css/desk.bundle.css",
|
||||
"/assets/frappe/dist/css/report.bundle.css",
|
||||
]
|
||||
|
||||
doctype_js = {
|
||||
|
|
@ -52,7 +52,7 @@ web_include_js = [
|
|||
|
||||
web_include_css = []
|
||||
|
||||
email_css = ['/assets/frappe/build/scss/email.css']
|
||||
email_css = ['/assets/frappe/dist/css/email.bundle.css']
|
||||
|
||||
website_route_rules = [
|
||||
{"from_route": "/blog/<category>", "to_route": "Blog Post"},
|
||||
|
|
|
|||
|
|
@ -410,12 +410,12 @@ frappe.ui.form.PrintView = class {
|
|||
this.print_wrapper.find('.print-format-skeleton').remove();
|
||||
this.$print_format_body.find('head').html(
|
||||
`<style type="text/css">${out.style}</style>
|
||||
<link href="${frappe.urllib.get_base_url()}/assets/css/printview.css" rel="stylesheet">`
|
||||
<link href="${frappe.urllib.get_base_url()}/assets/frappe/dist/css/print.bundle.css" rel="stylesheet">`
|
||||
);
|
||||
|
||||
if (frappe.utils.is_rtl(this.lang_code)) {
|
||||
this.$print_format_body.find('head').append(
|
||||
`<link type="text/css" rel="stylesheet" href="${frappe.urllib.get_base_url()}/assets/css/frappe-rtl.css"></link>`
|
||||
`<link type="text/css" rel="stylesheet" href="${frappe.urllib.get_base_url()}/assets/frappe/dist/css/frappe-rtl.bundle.css"></link>`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<title>{{ title }}</title>
|
||||
<link href="{{ base_url }}/assets/css/printview.css" rel="stylesheet">
|
||||
<link href="{{ base_url }}/assets/frappe/dist/css/print.bundle.css" rel="stylesheet">
|
||||
<style>
|
||||
{{ print_css }}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import "./frappe/model/meta.js";
|
|||
import "./frappe/model/model.js";
|
||||
import "./frappe/model/perm.js";
|
||||
|
||||
import "./web/bootstrap-4";
|
||||
import "./bootstrap-4-web.bundle";
|
||||
|
||||
|
||||
import "../../website/js/website.js";
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ frappe.barcode.scan_barcode = function() {
|
|||
}
|
||||
}, reject);
|
||||
} else {
|
||||
frappe.require('/assets/js/barcode_scanner.min.js', () => {
|
||||
frappe.require('/assets/frappe/dist/js/barcode_scanner.bundle.js', () => {
|
||||
frappe.barcode.get_barcode().then(barcode => {
|
||||
resolve(barcode);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -491,7 +491,7 @@ frappe.Application = class Application {
|
|||
var ls = document.createElement('link');
|
||||
ls.rel="stylesheet";
|
||||
ls.type = "text/css";
|
||||
ls.href= "assets/css/frappe-rtl.css";
|
||||
ls.href= "/assets/frappe/dist/css/frappe-rtl.bundle.css";
|
||||
document.getElementsByTagName('head')[0].appendChild(ls);
|
||||
$('body').addClass('frappe-rtl');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Razorpay Payment
|
||||
|
||||
1. Include checkout script in your code
|
||||
<script type="text/javascript" src="/assets/js/checkout.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/dist/js/checkout.bundle.js"></script>
|
||||
|
||||
2. Create the Order controller in your backend
|
||||
def get_razorpay_order(self):
|
||||
|
|
@ -145,4 +145,4 @@ frappe.require('https://checkout.razorpay.com/v1/checkout.js').then(() => {
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@
|
|||
{%- if theme.name != 'Standard' -%}
|
||||
<link type="text/css" rel="stylesheet" href="{{ theme.theme_url }}">
|
||||
{%- else -%}
|
||||
<link type="text/css" rel="stylesheet" href="/assets/css/frappe-web-b4.css?ver={{ build_version }}">
|
||||
<link type="text/css" rel="stylesheet" href="/assets/frappe/dist/css/website.bundle.css">
|
||||
{%- endif -%}
|
||||
|
||||
{%- for link in web_include_css %}
|
||||
<link type="text/css" rel="stylesheet" href="{{ link|abs_url }}?ver={{ build_version }}">
|
||||
<link type="text/css" rel="stylesheet" href="{{ link|abs_url }}">
|
||||
{%- endfor -%}
|
||||
{%- endblock -%}
|
||||
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
|
||||
{% block base_scripts %}
|
||||
<!-- js should be loaded in body! -->
|
||||
<script type="text/javascript" src="/assets/frappe/build/js/frappe-web.bundle.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/dist/js/frappe-web.bundle.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{%- for link in web_include_js %}
|
||||
|
|
|
|||
|
|
@ -235,13 +235,13 @@ def web_blocks(blocks):
|
|||
def script(path):
|
||||
path = assets_url(path)
|
||||
if '/public/' in path:
|
||||
path = path.replace('/public/', '/build/')
|
||||
path = path.replace('/public/', '/dist/')
|
||||
return f'<script type="text/javascript" src="{path}"></script>'
|
||||
|
||||
def style(path):
|
||||
path = assets_url(path)
|
||||
if '/public/' in path:
|
||||
path = path.replace('/public/', '/build/')
|
||||
path = path.replace('/public/', '/dist/')
|
||||
if path.endswith(('.scss', '.sass', '.less', '.styl')):
|
||||
path = path.rsplit('.', 1)[0] + '.css'
|
||||
return f'<link type="text/css" rel="stylesheet" href="{path}">'
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ def prepare_header_footer(soup):
|
|||
head = soup.find("head").contents
|
||||
styles = soup.find_all("style")
|
||||
|
||||
css = frappe.read_file(os.path.join(frappe.local.sites_path, "assets/css/printview.css"))
|
||||
css = frappe.read_file(os.path.join(frappe.local.sites_path, "assets/frappe/dist/css/print.bundle.css"))
|
||||
|
||||
# extract header and footer
|
||||
for html_id in ("header-html", "footer-html"):
|
||||
|
|
|
|||
|
|
@ -87,24 +87,26 @@ $(".file-size").each(function() {
|
|||
$(this).text(frappe.form.formatters.FileSize($(this).text()));
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="/assets/js/control.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/dist/js/controls.bundle.js"></script>
|
||||
{% if is_list %}
|
||||
{# web form list #}
|
||||
<script type="text/javascript" src="/assets/js/moment-bundle.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/dialog.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/web_form.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/bootstrap-4-web.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/node_modules/moment/min/moment-with-locales.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/node_modules/moment-timezone/builds/moment-timezone-with-data.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/dist/js/dialog.bundle.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/dist/js/web_form.bundle.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/dist/js/bootstrap-4-web.bundle.js"></script>
|
||||
{% else %}
|
||||
{# web form #}
|
||||
<script type="text/javascript" src="/assets/js/dialog.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/moment-bundle.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/dist/js/dialog.bundle.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/node_modules/moment/min/moment-with-locales.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/node_modules/moment-timezone/builds/moment-timezone-with-data.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/node_modules/vue/dist/vue.js"></script>
|
||||
<script>
|
||||
Vue.prototype.__ = window.__;
|
||||
Vue.prototype.frappe = window.frappe;
|
||||
</script>
|
||||
<script type="text/javascript" src="/assets/js/web_form.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/bootstrap-4-web.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/dist/js/web_form.bundle.js"></script>
|
||||
<script type="text/javascript" src="/assets/frappe/dist/js/bootstrap-4-web.bundle.js"></script>
|
||||
<script>
|
||||
|
||||
{% if client_script %}
|
||||
|
|
@ -127,7 +129,7 @@ frappe.init_client_script = () => {
|
|||
|
||||
{% block style %}
|
||||
{% if not is_list %}
|
||||
<link type="text/css" rel="stylesheet" href="/assets/css/web_form.css">
|
||||
<link type="text/css" rel="stylesheet" href="/assets/frappe/dist/css/web_form.bundle.css">
|
||||
{% endif %}
|
||||
|
||||
<style>
|
||||
|
|
|
|||
|
|
@ -634,8 +634,13 @@ $(document).on("page-change", function() {
|
|||
frappe.ready(function() {
|
||||
frappe.show_language_picker();
|
||||
if (window.is_chat_enabled) {
|
||||
frappe.require(['/assets/js/moment-bundle.min.js', "/assets/css/frappe-chat-web.css", "/assets/frappe/js/lib/socket.io.min.js"], () => {
|
||||
frappe.require('/assets/js/chat.js', () => {
|
||||
frappe.require([
|
||||
"/assets/frappe/node_modules/moment/min/moment-with-locales.min.js",
|
||||
"/assets/frappe/node_modules/moment-timezone/builds/moment-timezone-with-data.min.js",
|
||||
"/assets/frappe/dist/less/chat.bundle.css",
|
||||
"/assets/frappe/js/lib/socket.io.min.js"
|
||||
], () => {
|
||||
frappe.require('/assets/frappe/dist/js/chat.bundle.js', () => {
|
||||
frappe.chat.setup();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@
|
|||
<footer></footer>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="/assets/frappe/js/lib/jquery/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
window._version_number = "{{ build_version }}";
|
||||
// browser support
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
{% endmacro %}
|
||||
|
||||
{% block head_include %}
|
||||
<link type="text/css" rel="stylesheet" href="/assets/css/login.css?ver={{ build_version }}">
|
||||
<link type="text/css" rel="stylesheet" href="/assets/frappe/dist/css/login.bundle.css">
|
||||
{% endblock %}
|
||||
|
||||
{% macro logo_section() %}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ title }}</title>
|
||||
<meta name="generator" content="frappe">
|
||||
<link type="text/css" rel="stylesheet" href="/assets/css/printview.css">
|
||||
<link type="text/css" rel="stylesheet" href="/assets/frappe/dist/css/print.bundle.css">
|
||||
{%- if has_rtl -%}
|
||||
<link type="text/css" rel="stylesheet" href="assets/css/frappe-rtl.css">
|
||||
<link type="text/css" rel="stylesheet" href="/assets/frappe/dist/css/frappe-rtl.bundle.css">
|
||||
{%- endif -%}
|
||||
<style>
|
||||
{{ css }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue