gpt4 book ai didi

javascript - 在 Traccar 应用程序中更改或添加元素

转载 作者:行者123 更新时间:2023-11-27 23:29:16 24 4
gpt4 key购买 nike

Traccar 应用程序正在使用 Extjs/javascript,我正在尝试将一些 div 元素添加到应用程序用户界面中。这是右上角的我的 traccar 服务器 UI,默认情况下它有四个 div 元素: https://ibb.co/0yZXvVV

在这个 UI 中,所有者在 UI 中添加了两个 div 元素,我想添加到我的 UI 中的元素在图片中以红色四舍五入: https://ibb.co/HBbz7hj

如果您需要检查一些代码,这里是访问演示登录: http://acesso.rastreieaqui.com.br/index.html用户名:演示,密码:演示

这是该 div 元素的代码:

<a class="x-btn x-unselectable x-box-item x-toolbar-item x-btn-default-toolbar-small" hidefocus="on" unselectable="on" role="button" aria-hidden="false" aria-disabled="false" id="button-1078" tabindex="0" aria-pressed="false" data-componentid="button-1078" style="right: auto; left: 1028px; margin: 0px; top: 0px;">
<span id="button-1078-btnWrap" data-ref="btnWrap" role="presentation" unselectable="on" style="" class="x-btn-wrap x-btn-wrap-default-toolbar-small ">
<span id="button-1078-btnEl" data-ref="btnEl" role="presentation" unselectable="on" style="" class="x-btn-button x-btn-button-default-toolbar-small x-btn-no-text x-btn-icon x-btn-icon-left x-btn-button-center ">
<span id="button-1078-btnIconEl" data-ref="btnIconEl" role="presentation" unselectable="on" class="x-btn-icon-el x-btn-icon-el-default-toolbar-small x-btn-glyph" style="font-family:FontAwesome;"></span>
<span id="button-1078-btnInnerEl" data-ref="btnInnerEl" unselectable="on" class="x-btn-inner x-btn-inner-default-toolbar-small">&nbsp;</span>
</span>
</span>
</a>

我在 web 文件夹中只有一个 html 文件,但是当我在那个 html 文件中添加这个元素时,没有任何变化。那么我该如何将这个元素添加到我的 traccar UI 中,我是否需要编辑 extjs 以及我该怎么做,或者我可以只在某处添加这个代码元素?这是我的 html 文件:

<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>traccar</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
</head>
<body>
<div class="bg-banner" id="bg-bn"></div>




<div id="attribution">Powered by <a href="traccar">GPS Tracking System</a></div>

<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>

<script src="lib/sweetalert/sweetalert.min.js"></script>

<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>

<script id="loadScript" src="load.js"></script>
</body>
</html>```

最佳答案

如果你想在 map 面板上添加一个新的按钮,你需要编辑Map.js文件:

https://github.com/traccar/traccar-web/blob/master/web/app/view/map/Map.js

确保您在之后编译源代码或使用应用程序的调试版本。

关于javascript - 在 Traccar 应用程序中更改或添加元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57572619/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com