在SAP WebClient UI里显示倒数计时的UI
First let’s have a look at what is achieved: Once you click work center “Jerry count down”, the count down is displayed with a small animation.
The steps to build this application are almost the same as Step by step to create Bar Chart in Webclient UI.
(1) Create a new WebUI component with a view main.htm:
Paste the following source code for the created view:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script src="count/jquery.lwtCountdown-1.0.js"></script>
<link rel="Stylesheet" type="text/css" href="count/main.css"></link>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Countdown demo</title>
</head>
<body>
<div id="container">
<h1>Jerry's count down demo</h1>
<h2 class="subtitle">Time left for year 2017</h2>
<div id="countdown_dashboard">
<div class="dash weeks_dash">
<span class="dash_title">weeks</span>
<div class="digit">0</div>
<div class="digit">0</div>
</div>
<div class="dash days_dash">
<span class="dash_title">days</span>
<div class="digit">0</div>
<div class="digit">0</div>
</div>
<div class="dash hours_dash">
<span class="dash_title">hours</span>
<div class="digit">0</div>
<div class="digit">0</div>
</div>
<div class="dash minutes_dash">
<span class="dash_title">minutes</span>
<div class="digit">0</div>
<div class="digit">0</div>
</div>
<div class="dash seconds_dash">
<span class="dash_title">seconds</span>
<div class="digit">0</div>
<div class="digit">0</div>
</div>
</div>
<script language="javascript" type="text/javascript">
jQuery(document).ready(function() {
$('#countdown_dashboard').countDown({
targetDate: {
'day': 31,
'month': 11,
'year': 2017,
'hour': 23,
'min': 59,
'sec': 59
}
});
});
</script>
</div>
</body>
</html>
As you see I hard code the last second of year 2017 as the time to count down here, feel free to replace with your own date and time.
(2) Go to tcode SE80, tab MIME Repository, create a new folder named count and import these nine files.
(3) Create a new work center and put the ui component into it.
Please find step by step about how to achieve it from this wiki page How to add an custom UI component into a new work center.
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- 详解linux下查看系统版本号信息的方法(总结)
- 详解Centos8 配置静态IP的实现
- Linux server配置安装Java与Tomcat服务器教程详解
- Ubuntu系统下安装ImageMagick出错的解决过程
- linux 远程控制windows系统下的程序(三种方法)
- 详解Linux上svn命令行批量操作
- 详解linux ntp服务器时间同步设置
- CentOS设置静态IP的方法总结
- ubuntu服务器上快速部署docker的方法
- centos7使用supervisor的详细教程
- Ubuntu安装PHP和PHP Nginx配置方法
- Django在Ubuntu14.04的部署方法
- ubuntu19系统及以下版本安装android studio的教程
- CentOS7升级内核kernel5.0版本
- 详解ubuntu14.04如何设置静态IP的方法