From e81a2c44bfd0f8f6541abbb235865d87e1337d91 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Sat, 14 Mar 2015 12:54:59 +0200 Subject: [PATCH] [IMP] use Font Awesome instead of Entypo font for model icons --- .../static/src/css/main.css | 2 - web_last_viewed_records/static/src/js/main.js | 42 ++++++++++--------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/web_last_viewed_records/static/src/css/main.css b/web_last_viewed_records/static/src/css/main.css index 7529374d..48cfcf20 100644 --- a/web_last_viewed_records/static/src/css/main.css +++ b/web_last_viewed_records/static/src/css/main.css @@ -40,6 +40,4 @@ content: "f"; } .oe_last_viewed_icon{ - font-family: "entypoRegular" !important; - font-size: 1.8em; } \ No newline at end of file diff --git a/web_last_viewed_records/static/src/js/main.js b/web_last_viewed_records/static/src/js/main.js index 1d20925e..80d8b17c 100644 --- a/web_last_viewed_records/static/src/js/main.js +++ b/web_last_viewed_records/static/src/js/main.js @@ -47,25 +47,29 @@ openerp.web_last_viewed_records = function(instance){ save_last_viewed_history: function(data){ localStorage[this.last_viewed_history_var] = JSON.stringify(data); }, - // icon map: http://bistro.convergencecms.co/entypo + // icon map: http://fortawesome.github.io/Font-Awesome/icons/ _model2icon: { - 'res.partner':'+', - 'crm.lead':'4', - 'sale.order':'l', - 'account.analytic.account':'7', - 'crm.phonecall':'!', - 'hr.employee':'.', - 'hr.applicant':'-', - 'project.project':'t', - 'project.task':'W', - 'account.invoice':'h', - 'ir.module.module':'Z', - 'hr_timesheet_sheet.sheet': 'N', - 'res.groups': ',', - 'res.company': '_', - 'res.user': 'ó', - 'gamification.challenge':'è', - 'gamification.badge':'8', + 'account.analytic.account':'fa-book', + 'account.invoice':'fa-pencil-square-o', + 'calendar.event':'fa-calendar', + 'crm.lead':'fa-star', + 'crm.phonecall':'fa-phone', + 'hr.employee':'fa-male', + 'hr.payslip':'fa-money', + 'hr_timesheet_sheet.sheet': 'fa-clock-o', + 'ir.attachment': 'fa-file-o', + 'ir.module.module':'fa-plus-circle', + 'product.product': 'fa-sitemap', + 'project.issue':'fa-bug', + 'project.project':'fa-folder', + 'project.task':'fa-tasks', + 'purchase.order':'fa-shopping-cart', + 'purchase.order.line':'fa-shopping-cart', + 'res.company': 'fa-building-o', + 'res.groups': 'fa-users', + 'res.partner':'fa-user', + 'res.user': 'fa-user-plus', + 'sale.order':'fa-strikethrough', }, get_last_viewed_title: function(){ var titles = []; @@ -82,7 +86,7 @@ openerp.web_last_viewed_records = function(instance){ if (!icon && /\.settings/.test(model)) icon = 'c'; if (icon) - icon = _.str.sprintf('%s', icon); + icon = _.str.sprintf('', icon); titles.push(_.str.sprintf('%s %s ', title, url,