mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-10-26 07:50:05 -05:00
FIXES for PWA, theme-customizer and sidebar.
This commit is contained in:
1 parent
5065bc88cd
commit
dce7c8be85
5 files changed
+7
-39
No files matched your search
@@ -121,7 +121,6 @@ class ProgressiveWebApp(Controller):
|
||||
'/web_flectra/static/src/img/icons/icon-192x192.png',
|
||||
'/web_flectra/static/src/img/icons/icon-256x256.png',
|
||||
'/web_flectra/static/src/img/icons/icon-512x512.png',
|
||||
'/pwa/offline',
|
||||
])
|
||||
cache_version = "-".join(version_list)
|
||||
mimetype = "text/javascript;charset=utf-8"
|
||||
@@ -139,10 +138,6 @@ class ProgressiveWebApp(Controller):
|
||||
company_id = kwargs.get('company_id')
|
||||
return self._get_manifest(company_id)
|
||||
|
||||
@route('/pwa/offline', type='http', auth="public", website=True)
|
||||
def pwa_offline(self):
|
||||
return request.render("web_flectra.pwa_offline")
|
||||
|
||||
@route('/pwa/icon/128/<int:company_id>', type='http', auth="public")
|
||||
def icon_128(self, **kwargs):
|
||||
return self._get_icon(128, kwargs.get('company_id'))
|
||||
|
||||
@@ -120,7 +120,6 @@ class ScssEditor(models.AbstractModel):
|
||||
view_to_xpath = self.env["ir.ui.view"].get_related_views(
|
||||
xmlid, bundles=True
|
||||
).filtered(lambda v: v.arch.find(url) >= 0)
|
||||
|
||||
self.env["ir.ui.view"].create({
|
||||
'name': custom_url,
|
||||
'key': 'web_editor.scss_%s' % str(uuid.uuid4())[:6],
|
||||
@@ -140,6 +139,7 @@ class ScssEditor(models.AbstractModel):
|
||||
'new_url': custom_url,
|
||||
}
|
||||
})
|
||||
self.env["ir.qweb"].clear_caches()
|
||||
|
||||
def replace_values(self, url, xmlid, variables):
|
||||
content = self._replace_variables(
|
||||
|
||||
@@ -93,7 +93,7 @@ var SideMenu = Widget.extend({
|
||||
* @param {Number} action id of the menu entry to select
|
||||
*/
|
||||
set_menu: function (app) {
|
||||
if (!app.actionID) {
|
||||
if (!app.actionID || !app.menuID) {
|
||||
return;
|
||||
}
|
||||
var $main_menu = $('.f_launcher_content');
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
<link rel="stylesheet" type="text/scss" href='/web_flectra/static/src/scss/color_palettes.scss'/>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="assets_common" name="Common Assets (used in backend interface and website)" inherit_id="web.assets_common">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/web_flectra/static/src/js/pwa.js"/>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="assets_backend" name="assets_backend ( Backend Theme Assets )" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" type="text/scss" href='/web_flectra/static/src/scss/backend_theme_customizer/dark_mode.scss' />
|
||||
@@ -38,7 +43,6 @@
|
||||
<script type="text/javascript" src="/web_flectra/static/src/js/sidebar.js" />
|
||||
<script type="text/javascript" src="/web_flectra/static/src/js/field_upgrade.js"/>
|
||||
<script type="text/javascript" src="/web_flectra/static/src/js/web_responsive.js"/>
|
||||
<script type="text/javascript" src="/web_flectra/static/src/js/pwa.js"/>
|
||||
<script type="text/javascript" src="/web_flectra/static/src/js/backend_theme_customizer.js" />
|
||||
<script type="text/javascript" src="/web_flectra/static/src/js/control_panel.js" />
|
||||
|
||||
|
||||
@@ -37,37 +37,6 @@
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="pwa_offline">
|
||||
<t t-call="web.frontend_layout">
|
||||
<div id="wrap">
|
||||
<t t-raw="0"/>
|
||||
<div class="oe_structure oe_empty">
|
||||
<section class="pt128 pb104">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-center text-md-right my-md-auto mb-5 mb-md-0">
|
||||
<img class="img img-fluid" src="/web_flectra/static/src/img/icons/icon-256x256.png"/>
|
||||
</div>
|
||||
<div class="col-md-6 text-center text-md-left my-auto">
|
||||
<h1 class="mt-5">You are offline</h1>
|
||||
<p><b>Don't panic.</b> The requested URL is not working right now, because you have lost internet connection.</p>
|
||||
</div>
|
||||
<div class="col-12 pt40 pb24">
|
||||
<hr/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<p class="text-center pt24"><b>Please reload the page after your connection goes back online.</b></p>
|
||||
<ul class="list-inline text-center">
|
||||
<li class="list-inline-item mb-2"><a class="btn btn-secondary" href="javascript:window.location.reload(true)">Reload Page</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</template>
|
||||
<template id="service_worker_settings" name="PWA service worker settings">
|
||||
const CACHE_NAME = '<t t-esc="pwa_cache_name" />';
|
||||
const FILES_TO_CACHE = [
|
||||
|
||||
Reference in new issue
Block a user