Skip to content

Commit

Permalink
Mar 13 : [FIX] Bug Fixed 'backend_theme_infinito'
Browse files Browse the repository at this point in the history
  • Loading branch information
AjmalCybro committed Mar 13, 2023
1 parent 8ec08bc commit e26ffd9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend_theme_infinito/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
Main Highlight Of The Theme Is You Can Dynamically Change The Colors,
Views, Buttons, Different Types Sidebar...Etc""",
"category": "Themes/Backend",
"version": "16.0.1.0.0",
"version": "16.0.1.0.1",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
Expand Down
11 changes: 11 additions & 0 deletions backend_theme_infinito/models/recent_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,19 @@ class RecentApps(models.Model):
name = fields.Char(compute='_compute_icon', store=True)
app_id = fields.Integer()
icon = fields.Binary(compute='_compute_icon', store=True)
type = fields.Char(compute='_compute_type', store=True)
user_id = fields.Many2one('res.users')

@api.depends('app_id')
def _compute_type(self):
menu_ui = self.env['ir.ui.menu']
for rec in self:
app = menu_ui.browse(rec.app_id)
la = str(app.web_icon)
spl_word = '.'
res = la.split(spl_word, 1)
splitString = res[1]
rec.type = splitString
@api.depends('app_id')
def _compute_icon(self):
menu_ui = self.env['ir.ui.menu']
Expand Down
1 change: 0 additions & 1 deletion backend_theme_infinito/static/src/js/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ patch(ControlPanel.prototype, 'backend_theme_infinito/static/src/js/navbar.Contr
ev.target.classList.add("active");
this.state.infinitoBookmarks.push(action_id)
this.state.infinitoMenuBookmarks.push(book);
console.log(this.state)
} else {
let index = this.state.infinitoBookmarks.indexOf(action_id);
this.state.infinitoBookmarks.splice(index, 1);
Expand Down
3 changes: 2 additions & 1 deletion backend_theme_infinito/static/src/js/recentApps.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ InfinitoRecentApps.template = xml`
<t t-foreach="recentApps" t-as="app" t-key="app">
<a class="icon" t-attf-href="#menu_id={{app.app_id}}">
<div class="img_wrapper">
<img class="sidebar_img" t-attf-src="data:image/svg+xml;base64,{{app.icon}}" width="40px" height="40px"/>
<img t-if="app.type=='svg'" class="sidebar_img" t-attf-src="data:image/svg+xml;base64,{{app.icon}}" width="40px" height="40px"/>
<img t-if="app.type=='png'" class="sidebar_img" t-attf-src="data:image/png;base64,{{app.icon}}" width="40px" height="40px"/>
</div>
<span class="zoomIn" t-esc="app.name"/>
</a>
Expand Down
8 changes: 4 additions & 4 deletions backend_theme_infinito/static/src/xml/sidebar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
class="nav-link">
<t t-if="sidebarName">
<t t-if="sidebarIcon">
<img t-att-title="app.name"
<img t-att-title="app.name"
style="width: 30px;height:30px;"
t-attf-src="data:image/svg+xml;base64,{{app.webIconData}}"/>
t-attf-src="data:image/png;base64,{{app.webIconData}}"/>

<span class="sidebar_app_name" style="margin-left: 10px;">
<t t-esc="app.name"/>
Expand All @@ -99,7 +99,7 @@
<t t-elif="sidebarIcon">
<img t-att-title="app.name"
style="width: 60px;height:60px;"
t-attf-src="data:image/svg+xml;base64,{{app.webIconData}}"/>
t-attf-src="data:image/png;base64,{{app.webIconData}}"/>
</t>
</a>
</li>
Expand Down Expand Up @@ -162,7 +162,7 @@
<div class="img_wrapper">
<img t-att-title="app.name"
style="width: 70px !important;height: 70px !important;border-radius: 10px !important;margin: 5px 5px 5px -5px;"
t-attf-src="data:image/svg+xml;base64,{{app.webIconData}}"/>
t-attf-src="data:image/png;base64,{{app.webIconData}}"/>
<!-- <img t-attf-src="data:image/png;base64,{{app.webIconData}}"/>-->
</div>
<!-- <b class="a_app_menu_title"><t t-esc="app.name"/></b>-->
Expand Down

0 comments on commit e26ffd9

Please sign in to comment.