如何操作SAP UI5应用Footer区域工具栏按钮的背景颜色

简介: 如何操作SAP UI5应用Footer区域工具栏按钮的背景颜色

Recently I get a customer requirement to remove the background color of edit button in footer toolbar:

image.pngimage.pngThe screenshot is made from CRM Fiori application “My Opportunity”. Customer are using it in their Android device. They complained since the button in Android platform will have blue as its background color automatically when clicked, so it is difficult to judge whether a button with blue background itself is actually clicked or not.


Here below is my analysis process how to achieve the customer requirement.


(1) First of all, we need to figure out how the blue background color is implemented in the standard application. Check related controller code regarding footer toolbar button definition, and there is no style definition regarding Edit button. So it must definitely be done by UI5 framework.

image.png(2) Now we need to know how this CSS style is added by UI5 framework. Search by keyword “Emphasized” and I just find what I look for in a second. In line 80 there is an IF evaluation to check the availability of oEditBtn of variable oController._oHeaderFooterOptions, whose value is filled by we application code.

It means if application has explicitly declared the edit button, it is set with style = Emphasized automatically in line 87.

image.pngThe idea is to clear the oHeaderFooterOptions.oEditBtn manuall so that the IF evaluation in line 80 will not succeed, and then we jut define the Edit button as “normal” button by inserting it into the array oHeaderFooterOptions.buttonList.

However while testing, it is found that every time you navigate to Edit mode and then back, there will be a new Edit button generated in toolbar.

image.png


相关文章
|
23天前
|
前端开发 编解码 数据格式
浅谈响应式编程在企业级前端应用 UI 开发中的实践
浅谈响应式编程在企业级前端应用 UI 开发中的实践
20 0
浅谈响应式编程在企业级前端应用 UI 开发中的实践
|
1月前
|
Web App开发 数据采集 前端开发
纯技术讨论:如何让 SAP UI5 应用无法被别人在浏览器里调试 - 这种做法不推荐试读版
纯技术讨论:如何让 SAP UI5 应用无法被别人在浏览器里调试 - 这种做法不推荐试读版
15 0
|
1月前
|
XML 存储 数据格式
SAP UI5 控件 customData 属性的应用介绍
SAP UI5 控件 customData 属性的应用介绍
33 0
|
2月前
让 SAP UI5 应用的日志打印变得五彩缤纷试读版
让 SAP UI5 应用的日志打印变得五彩缤纷试读版
97 2
|
1月前
|
前端开发 搜索推荐 开发者
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
27 0
|
1月前
|
JavaScript 前端开发 开发者
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
15 0
|
1月前
|
前端开发 JavaScript API
SAP UI5 sap.ui.require.toUrl 的作用介绍
SAP UI5 sap.ui.require.toUrl 的作用介绍
31 0
|
1月前
|
搜索推荐
如何让 SAP UI5 Smart Table 支持多项选择(Multiple-Selection)试读版
如何让 SAP UI5 Smart Table 支持多项选择(Multiple-Selection)试读版
18 0
|
1月前
使用 SAP UI5 Event Bus 机制,修复 SAP UI5 分页显示数据的一个 bug 试读版
使用 SAP UI5 Event Bus 机制,修复 SAP UI5 分页显示数据的一个 bug 试读版
20 0
|
2月前
|
Web App开发 前端开发 JavaScript
乱花渐欲迷人眼 - 让 SAP UI5 应用的日志输出不再素面朝天
乱花渐欲迷人眼 - 让 SAP UI5 应用的日志输出不再素面朝天
48 0

热门文章

最新文章